13 #include <QtWidgets/QMessageBox>
14 #include <QtCore/QEvent>
15 #include <QtCore/QString>
30 static const unsigned int DtVK_NUMPAD0 = 0x60;
31 static const unsigned int DtVK_NUMPAD1 = 0x61;
32 static const unsigned int DtVK_NUMPAD2 = 0x62;
33 static const unsigned int DtVK_NUMPAD3 = 0x63;
34 static const unsigned int DtVK_NUMPAD4 = 0x64;
35 static const unsigned int DtVK_NUMPAD5 = 0x65;
36 static const unsigned int DtVK_NUMPAD6 = 0x66;
37 static const unsigned int DtVK_NUMPAD7 = 0x67;
38 static const unsigned int DtVK_NUMPAD8 = 0x68;
39 static const unsigned int DtVK_NUMPAD9 = 0x69;
42 static const unsigned int DtVK_MULTIPLY = 0x6A;
43 static const unsigned int DtVK_ADD = 0x6B;
44 static const unsigned int DtVK_SUBTRACT = 0x6D;
45 static const unsigned int DtVK_DECIMAL = 0x6E;
46 static const unsigned int DtVK_DIVIDE = 0x6F;
50 static const unsigned int DtVK_NUMPAD0_LINUX = 0xFFB0;
51 static const unsigned int DtVK_NUMPAD1_LINUX = 0xFFB1;
52 static const unsigned int DtVK_NUMPAD2_LINUX = 0xFFB2;
53 static const unsigned int DtVK_NUMPAD3_LINUX = 0xFFB3;
54 static const unsigned int DtVK_NUMPAD4_LINUX = 0xFFB4;
55 static const unsigned int DtVK_NUMPAD5_LINUX = 0xFFB5;
56 static const unsigned int DtVK_NUMPAD6_LINUX = 0xFFB6;
57 static const unsigned int DtVK_NUMPAD7_LINUX = 0xFFB7;
58 static const unsigned int DtVK_NUMPAD8_LINUX = 0xFFB8;
59 static const unsigned int DtVK_NUMPAD9_LINUX = 0xFFB9;
62 static const unsigned int DtVK_MULTIPLY_LINUX = 0xFFAA;
63 static const unsigned int DtVK_ADD_LINUX = 0xFFAB;
64 static const unsigned int DtVK_SUBTRACT_LINUX = 0xFFAD;
65 static const unsigned int DtVK_DECIMAL_LINUX = 0xFFAE;
66 static const unsigned int DtVK_DIVIDE_LINUX = 0xFFAF;
72 static QString eventTypeName(QEvent::Type eventType);
77 static QString eventTypeName(
QEvent const * event);
81 static QMessageBox::StandardButton critical(
82 QWidget * parent,
const QString & title,
const QString & text,
83 QMessageBox::StandardButtons buttons = QMessageBox::Ok,
84 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton,
85 Qt::WindowFlags f = Qt::Tool | Qt::MSWindowsFixedSizeDialogHint);
89 static QMessageBox::StandardButton critical(
90 QWidget * parent,
const QString & title,
const QString & text,
91 bool & checkBoxChecked,
const QString& checkBoxText = QString::fromStdString(
"Do not show this dialog again"),
92 QMessageBox::StandardButtons buttons = QMessageBox::Ok,
93 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton,
94 Qt::WindowFlags f = Qt::Tool | Qt::MSWindowsFixedSizeDialogHint);
98 static QMessageBox::StandardButton information (
99 QWidget * parent,
const QString & title,
const QString & text,
100 const QString& checkBoxText = QString(),
101 QMessageBox::StandardButtons buttons = QMessageBox::Ok,
102 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton,
103 Qt::WindowFlags f = Qt::Tool | Qt::MSWindowsFixedSizeDialogHint );
107 static QMessageBox::StandardButton information(
108 QWidget * parent,
const QString & title,
const QString & text,
109 bool & checkBoxChecked,
const QString& checkBoxText = QString::fromStdString(
"Do not show this dialog again"),
110 QMessageBox::StandardButtons buttons = QMessageBox::Ok,
111 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton,
112 Qt::WindowFlags f = Qt::Tool | Qt::MSWindowsFixedSizeDialogHint);
116 static QMessageBox::StandardButton question (
117 QWidget * parent,
const QString & title,
const QString & text,
118 QMessageBox::StandardButtons buttons = QMessageBox::Yes | QMessageBox::No,
119 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton,
120 Qt::WindowFlags f = Qt::MSWindowsFixedSizeDialogHint | Qt::Tool);
124 static QMessageBox::StandardButton question(
125 QWidget * parent,
const QString & title,
const QString & text,
126 bool & checkBoxChecked,
const QString& checkBoxText = QString::fromStdString(
"Do not show this dialog again"),
127 QMessageBox::StandardButtons buttons = QMessageBox::Yes | QMessageBox::No,
128 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton,
129 Qt::WindowFlags f = Qt::MSWindowsFixedSizeDialogHint | Qt::Tool);
133 static QMessageBox::StandardButton warning (
134 QWidget * parent,
const QString & title,
const QString & text,
135 QMessageBox::StandardButtons buttons = QMessageBox::Ok,
136 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton,
137 Qt::WindowFlags f = Qt::MSWindowsFixedSizeDialogHint | Qt::Tool);
141 static QMessageBox::StandardButton warning(
142 QWidget * parent,
const QString & title,
const QString & text,
143 bool & checkBoxChecked,
const QString& checkBoxText = QString::fromStdString(
"Do not show this dialog again"),
144 QMessageBox::StandardButtons buttons = QMessageBox::Ok,
145 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton,
146 Qt::WindowFlags f = Qt::MSWindowsFixedSizeDialogHint | Qt::Tool);
154 static int calculateStepSize(
int maxRange,
int numberOfSteps );
155 static double calculateStepSize(
double maxRange,
int numberOfSteps,
int decimals );
162 static QMessageBox::StandardButton showMessageBox (
163 QMessageBox& mbox, QMessageBox::StandardButton defaultButton);