34#include <NDEVR/KeyController.h>
35#include <NDEVR/Buffer.h>
36#include <NDEVR/String.h>
37#include <NDEVR/Dictionary.h>
38#include <NDEVR/UUID.h>
39#include <NDEVR/GenericOption.h>
BasicKeyController(const TranslatedString &key_controller_title)
Constructs a BasicKeyController with the given title.
The equivelent of std::vector but with a bit more control.
A core object representing a user view as well as convenience functions for moving this view through ...
A core class where all Design Objects including models, materials, and geometries are stored.
A hash-based key-value store, useful for quick associative lookups.
A widget that shows a raster image or icon.
Describes a user key press event used to trigger behavior in the NDEVR API.
virtual void resetKeyControllerToDefaults() override
Resets the key controller bindings to their default values.
void setGenericOptionCallback(std::function< void(GenericOption, PopupInfo)> callback)
Sets the callback invoked when a generic option entry is submitted.
static Dictionary< UUID, QPointer< QCustomMessageBox > > s_message_boxes
Global registry of active message boxes keyed by UUID.
void setLabelCallback(std::function< void(TranslatedString, PopupInfo)> callback)
Sets the callback invoked when a custom labeled button is pressed.
QCustomMessageBox(const TranslatedString &title, const TranslatedString &text, const Buffer< TranslatedString > &button_labels, std::function< void(TranslatedString, PopupInfo)> on_select=nullptr)
Constructs a message box with custom labeled buttons.
Buffer< Button * > m_buttons
The collection of buttons displayed in the message box.
QCustomMessageBox(const TranslatedString &title, const TranslatedString &text, QMessageBox::StandardButtons buttons, std::function< void(QMessageBox::StandardButton, PopupInfo)> on_select=nullptr)
Constructs a message box with standard Qt buttons.
void buttonPressed(const TranslatedString &button_label, PopupInfo)
Handles the event when a custom labeled button is pressed.
std::function< void(TranslatedString, PopupInfo)> m_label_callback
Callback for custom labeled button selection.
void setButtons(const Buffer< TranslatedString > &button_labels)
Replaces the current buttons with custom labeled buttons.
QLabel * m_text
The label displaying the main message text.
void setText(const TranslatedString &text)
Sets the main informational text displayed in the message box.
void clearButtons()
Removes all buttons from the message box.
String m_pixmap
The icon resource name for the message box icon.
ImageView * m_image_view
The image view widget displaying the icon.
void buttonPressed(QMessageBox::StandardButton button, PopupInfo)
Handles the event when a standard button is pressed.
void addButtonsToLayout()
Adds the current set of buttons to the message box layout.
QHBoxLayout * m_top_layout
The top horizontal layout containing the icon and text.
QCustomMessageBox(const GenericOption &entry_type, std::function< void(GenericOption, PopupInfo)> on_select)
Constructs a message box with a generic option entry for user input.
void setCallback(std::function< void(QMessageBox::StandardButton, PopupInfo)> callback)
Sets the callback invoked when a standard button is pressed.
void setButtons(QMessageBox::StandardButtons buttons)
Replaces the current buttons with a set of standard Qt buttons.
void setIcon(const StringView &image, fltp08 icon_size_mult=1.0)
Sets the icon displayed in the message box.
static QCustomMessageBox * CreateMessageBox(const GenericOption &entry_type, std::function< void(GenericOption, PopupInfo)> on_select=nullptr)
Creates a message box with a generic option entry and displays it as a popup.
static QCustomMessageBox * CreateMessageBox(const TranslatedString &title, const TranslatedString &text, const Buffer< TranslatedString > &button_labels, std::function< void(TranslatedString, PopupInfo)> on_select=nullptr)
Creates a message box with custom labeled buttons and displays it as a popup.
std::function< void(QMessageBox::StandardButton, PopupInfo)> m_callback
Callback for standard button selection.
std::function< void(GenericOption, PopupInfo)> m_user_entry_callback
Callback for generic option entry submission.
virtual bool processKeyEvent(const StringView &id, const KeyEvent &key_event, DesignObjectLookup *lookup, Camera *camera) override
Processes a key event for keyboard interaction with the message box.
static QCustomMessageBox * CreateMessageBox(const TranslatedString &title, const TranslatedString &text, QMessageBox::StandardButtons buttons, std::function< void(QMessageBox::StandardButton, PopupInfo)> on_select=nullptr)
Creates a message box with standard Qt buttons and displays it as a popup.
QSize sizeHint() const override
Returns the recommended size for the message box.
GenericOption m_generic_option
The generic option used for user input collection.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
The primary namespace for the NDEVR SDK.
double fltp08
Defines an alias representing an 8 byte floating-point number.
Stores a generic option of any type as well as some information about how the user might interact wit...