API Documentation
Loading...
Searching...
No Matches
QCustomMessageBox Class Reference

#include <QCustomMessageBox.h>

Inheritance diagram for QCustomMessageBox:
[legend]
Collaboration diagram for QCustomMessageBox:
[legend]

Public Member Functions

void clearButtons ()
 
void setIcon (const String &image, fltp08 icon_size_mult=1.0)
 
void setText (const TranslatedString &text)
 
void setButtons (QMessageBox::StandardButtons buttons)
 
void setButtons (const Buffer< TranslatedString > &button_labels)
 
void setCallback (std::function< void(QMessageBox::StandardButton, PopupInfo)> callback)
 
void setLabelCallback (std::function< void(TranslatedString, PopupInfo)> callback)
 
void setGenericOptionCallback (std::function< void(GenericOption, PopupInfo)> callback)
 
QSize sizeHint () const override
 
virtual bool processKeyEvent (const String &id, const KeyEvent &key_event, DesignObjectLookup *lookup, Camera *camera) override
 
virtual void resetKeyControllerToDefaults () override
 
- Public Member Functions inherited from BasicKeyController
NDEVR_BASE_API BasicKeyController (const TranslatedString &key_controller_title)
 
NDEVR_BASE_API bool processKeyEvent (const KeyEvent &key_event, DesignObjectLookup *lookup, Camera *camera) final override
 
NDEVR_BASE_API const TranslatedStringkeyControllerTitle () const
 
NDEVR_BASE_API const Buffer< KeyOption > & currentKeyMaps () const
 
virtual NDEVR_BASE_API void setKeyOption (const KeyOption &option)
 
virtual NDEVR_BASE_API void getINI (INIFactory &factory) override
 
virtual NDEVR_BASE_API void addKeyOption (const KeyOption &option)
 
- Public Member Functions inherited from KeyControllerBase
- Public Member Functions inherited from INIInterface
 INIInterface (const File &default_ini)
 
virtual ~INIInterface ()
 
virtual void writeToLog (ProgressInfo *log, uint01 log_level=2U)
 
virtual void writeToLog (const String &title, ProgressInfo *log, uint01 log_level=2U)
 
void setDefaultINIFile (const File &file)
 
virtual bool readINIOptions ()
 
virtual bool readINIOptions (File &ini_file)
 
virtual void finishReadingINI (INIFactory &)
 
virtual void prepareForINI (INIFactory &)
 
virtual bool saveINIOptions (bool multithead=false)
 
virtual bool saveINIOptions (File &ini_file, bool multithead=false)
 

Static Public Member Functions

static QCustomMessageBoxCreateMessageBox (const TranslatedString &title, const TranslatedString &text, QMessageBox::StandardButtons buttons, std::function< void(QMessageBox::StandardButton, PopupInfo)> on_select=nullptr)
 
static QCustomMessageBoxCreateMessageBox (const TranslatedString &title, const TranslatedString &text, const Buffer< TranslatedString > &button_labels, std::function< void(TranslatedString, PopupInfo)> on_select=nullptr)
 
static QCustomMessageBoxCreateMessageBox (const GenericOption &entry_type, std::function< void(GenericOption, PopupInfo)> on_select=nullptr)
 

Protected Member Functions

 QCustomMessageBox (const TranslatedString &title, const TranslatedString &text, QMessageBox::StandardButtons buttons, std::function< void(QMessageBox::StandardButton, PopupInfo)> on_select=nullptr)
 
 QCustomMessageBox (const TranslatedString &title, const TranslatedString &text, const Buffer< TranslatedString > &button_labels, std::function< void(TranslatedString, PopupInfo)> on_select=nullptr)
 
 QCustomMessageBox (const GenericOption &entry_type, std::function< void(GenericOption, PopupInfo)> on_select)
 
virtual ~QCustomMessageBox ()
 
void buttonPressed (QMessageBox::StandardButton button, PopupInfo)
 
void buttonPressed (const TranslatedString &button_label, PopupInfo)
 
void addButtonsToLayout ()
 

Protected Attributes

QLabel * m_text
 
Buffer< Button * > m_buttons
 
String m_pixmap
 
QHBoxLayout * m_top_layout
 
ImageViewm_image_view
 
std::function< void(QMessageBox::StandardButton, PopupInfo)> m_callback
 
std::function< void(TranslatedString, PopupInfo)> m_label_callback
 
std::function< void(GenericOption, PopupInfo)> m_user_entry_callback
 
GenericOption m_generic_option
 
- Protected Attributes inherited from BasicKeyController
bool m_save_ini_on_change_key_option_change = false
 
Buffer< KeyOptionm_key_options
 
TranslatedString m_key_controller_title
 
- Protected Attributes inherited from INIInterface
File m_default_ini
 

Static Protected Attributes

static Dictionary< UUID, QPointer< QCustomMessageBox > > s_message_boxes
 

Constructor & Destructor Documentation

◆ QCustomMessageBox() [1/3]

QCustomMessageBox ( const TranslatedString & title,
const TranslatedString & text,
QMessageBox::StandardButtons buttons,
std::function< void(QMessageBox::StandardButton, PopupInfo)> on_select = nullptr )
protected

◆ QCustomMessageBox() [2/3]

QCustomMessageBox ( const TranslatedString & title,
const TranslatedString & text,
const Buffer< TranslatedString > & button_labels,
std::function< void(TranslatedString, PopupInfo)> on_select = nullptr )
protected

◆ QCustomMessageBox() [3/3]

QCustomMessageBox ( const GenericOption & entry_type,
std::function< void(GenericOption, PopupInfo)> on_select )
protected

◆ ~QCustomMessageBox()

~QCustomMessageBox ( )
protectedvirtual

Member Function Documentation

◆ addButtonsToLayout()

void addButtonsToLayout ( )
protected

◆ buttonPressed() [1/2]

void buttonPressed ( const TranslatedString & button_label,
PopupInfo info )
protected

◆ buttonPressed() [2/2]

void buttonPressed ( QMessageBox::StandardButton button,
PopupInfo info )
protected

◆ clearButtons()

void clearButtons ( )

◆ CreateMessageBox() [1/3]

QCustomMessageBox * CreateMessageBox ( const GenericOption & entry_type,
std::function< void(GenericOption, PopupInfo)> on_select = nullptr )
static

◆ CreateMessageBox() [2/3]

QCustomMessageBox * CreateMessageBox ( const TranslatedString & title,
const TranslatedString & text,
const Buffer< TranslatedString > & button_labels,
std::function< void(TranslatedString, PopupInfo)> on_select = nullptr )
static

◆ CreateMessageBox() [3/3]

QCustomMessageBox * CreateMessageBox ( const TranslatedString & title,
const TranslatedString & text,
QMessageBox::StandardButtons buttons,
std::function< void(QMessageBox::StandardButton, PopupInfo)> on_select = nullptr )
static

◆ processKeyEvent()

bool processKeyEvent ( const String & id,
const KeyEvent & key_event,
DesignObjectLookup * lookup,
Camera * camera )
overridevirtual

Implements BasicKeyController.

◆ resetKeyControllerToDefaults()

void resetKeyControllerToDefaults ( )
overridevirtual

Implements BasicKeyController.

◆ setButtons() [1/2]

void setButtons ( const Buffer< TranslatedString > & button_labels)

◆ setButtons() [2/2]

void setButtons ( QMessageBox::StandardButtons buttons)

◆ setCallback()

void setCallback ( std::function< void(QMessageBox::StandardButton, PopupInfo)> callback)
inline

◆ setGenericOptionCallback()

void setGenericOptionCallback ( std::function< void(GenericOption, PopupInfo)> callback)
inline

◆ setIcon()

void setIcon ( const String & image,
fltp08 icon_size_mult = 1.0 )

◆ setLabelCallback()

void setLabelCallback ( std::function< void(TranslatedString, PopupInfo)> callback)
inline

◆ setText()

void setText ( const TranslatedString & text)

◆ sizeHint()

QSize sizeHint ( ) const
override

Member Data Documentation

◆ m_buttons

Buffer<Button*> m_buttons
protected

◆ m_callback

std::function<void(QMessageBox::StandardButton, PopupInfo)> m_callback
protected

◆ m_generic_option

GenericOption m_generic_option
protected

◆ m_image_view

ImageView* m_image_view
protected

◆ m_label_callback

std::function<void(TranslatedString, PopupInfo)> m_label_callback
protected

◆ m_pixmap

String m_pixmap
protected

◆ m_text

QLabel* m_text
protected

◆ m_top_layout

QHBoxLayout* m_top_layout
protected

◆ m_user_entry_callback

std::function<void(GenericOption, PopupInfo)> m_user_entry_callback
protected

◆ s_message_boxes

Dictionary< UUID, QPointer< QCustomMessageBox > > s_message_boxes
staticprotected

The documentation for this class was generated from the following files: