Elaztek Developer Hub
Blamite Game Engine - Keystone  00390.07.02.23.1947.blamite
A library that enables the use of Qt in Blamite's editing tools.
qt_message_box.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <QDialog>
4 #include "ui_qt_message_box.h"
5 #include "api/keystone_api.h"
6 
11 {
12  None,
13  Warning,
14  Error,
15  Question,
16  Help,
17  Info
18 };
19 
24 {
25  Ok,
26  OkCancel,
28  YesNo,
30 };
31 
39 class qt_message_box : public QDialog
40 {
41  Q_OBJECT
42 
43 private slots:
44  void button_Clicked(QAbstractButton* button);
45 
46 private:
47  Ui::qt_message_box ui;
48 
49  QGraphicsScene* scene;
50  QGraphicsPixmapItem* pixmap_item;
51  std::string icon_resource_name;
52 
54 
55  void resizeEvent(QResizeEvent* event);
56  void showEvent(QShowEvent* event);
57 
61  void UpdateIconView();
62 
63 public:
73  qt_message_box(KeystoneMessageBoxType type, KeystoneMessageBoxButtons buttons, QString title, QString message, QWidget *parent = Q_NULLPTR);
75 
82 };
KeystoneDialogResult::Default_NotSet
@ Default_NotSet
The dialog result has not yet been set.
KeystoneDialogResult
KeystoneDialogResult
Enumerator containing all possible generic dialog results.
Definition: keystone_api.h:30
KeystoneMessageBoxButtons::AbortRetryIgnore
@ AbortRetryIgnore
Dialog is shown with an [Abort], [Retry] and [Ignore] button.
KeystoneMessageBoxButtons
KeystoneMessageBoxButtons
Enumerator containing different possible button combinations.
Definition: qt_message_box.h:23
KeystoneMessageBoxButtons::Ok
@ Ok
Dialog is shown with an [OK] button.
themes.h
KeystoneMessageBoxType::Error
@ Error
Dialog icon will be a red circle with an X.
KeystoneDialogResult::Cancel
@ Cancel
The user pressed the 'Cancel' button.
qt_message_box::qt_message_box
qt_message_box(KeystoneMessageBoxType type, KeystoneMessageBoxButtons buttons, QString title, QString message, QWidget *parent=Q_NULLPTR)
Initializes a new message box.
Definition: qt_message_box.cpp:7
KeystoneDialogResult::OK
@ OK
The user pressed the 'OK' button.
KeystoneMessageBoxType
KeystoneMessageBoxType
Enumerator containing different possible message box types, primarily used to control the icon that i...
Definition: qt_message_box.h:10
KeystoneDialogResult::Ignore
@ Ignore
The user pressed the 'Ignore' button.
KeystoneMessageBoxButtons::YesNo
@ YesNo
Dialog is shown with a [Yes] and [No] button.
KeystoneMessageBoxButtons::YesNoCancel
@ YesNoCancel
Dialog is shown with a [Yes], [No], and [Cancel] button.
keystone_api.h
KeystoneMessageBoxType::Warning
@ Warning
Dialog icon will be a yellow triangle with an exclamation mark.
BlamKeystone::Themes::GetActiveTheme
KEYSTONE BlamEditorTheme * GetActiveTheme()
Retrieves the currently selected theme.
Definition: themes.cpp:335
qt_message_box.h
KeystoneDialogResult::Yes
@ Yes
The user pressed the 'Yes' button.
KeystoneMessageBoxType::Help
@ Help
Dialog icon will be a purple book with a question mark.
qt_message_box::~qt_message_box
~qt_message_box()
Definition: qt_message_box.cpp:104
KeystoneMessageBoxType::None
@ None
The dialog will not contain an icon.
qt_message_box::GetResult
KeystoneDialogResult GetResult()
Retrieves the dialog result.
Definition: qt_message_box.cpp:167
KeystoneMessageBoxType::Question
@ Question
Dialog icon will be a speech bubble with a question mark.
KeystoneDialogResult::Abort
@ Abort
The user pressed the 'Abort' button.
KeystoneDialogResult::No
@ No
The user pressed the 'No' button.
KeystoneMessageBoxButtons::OkCancel
@ OkCancel
Dialog is shown with an [OK] and [Cancel] button.
KeystoneMessageBoxType::Info
@ Info
Dialog icon will be a white circle with an i.
KeystoneDialogResult::Retry
@ Retry
The user pressed the 'Retry' button.
qt_message_box
A basic message box dialog.
Definition: qt_message_box.h:39