VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Static Public Member Functions | Static Public Attributes | Static Private Member Functions
makVrv::DtQtUtil Class Reference

Provides static utility functions for Qt.

Static Public Member Functions

static QString eventTypeName (QEvent::Type eventType)
 
static QString eventTypeName (QEvent const *event)
 
static QMessageBox::StandardButton critical (DtDe &de, QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=QMessageBox::Ok, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton, Qt::WindowFlags f=Qt::Tool|Qt::MSWindowsFixedSizeDialogHint)
 
static QMessageBox::StandardButton critical (DtDe &de, QWidget *parent, const QString &title, const QString &text, bool &checkBoxChecked, const QString &checkBoxText=QString::fromStdString("Do not show this dialog again"), QMessageBox::StandardButtons buttons=QMessageBox::Ok, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton, Qt::WindowFlags f=Qt::Tool|Qt::MSWindowsFixedSizeDialogHint)
 
static QMessageBox::StandardButton information (DtDe &de, QWidget *parent, const QString &title, const QString &text, const QString &checkBoxText=QString(), QMessageBox::StandardButtons buttons=QMessageBox::Ok, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton, Qt::WindowFlags f=Qt::Tool|Qt::MSWindowsFixedSizeDialogHint)
 
static QMessageBox::StandardButton information (DtDe &de, QWidget *parent, const QString &title, const QString &text, bool &checkBoxChecked, const QString &checkBoxText=QString::fromStdString("Do not show this dialog again"), QMessageBox::StandardButtons buttons=QMessageBox::Ok, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton, Qt::WindowFlags f=Qt::Tool|Qt::MSWindowsFixedSizeDialogHint)
 
static QMessageBox::StandardButton question (DtDe &de, QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=QMessageBox::Yes|QMessageBox::No, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton, Qt::WindowFlags f=Qt::MSWindowsFixedSizeDialogHint|Qt::Tool)
 
static QMessageBox::StandardButton question (DtDe &de, QWidget *parent, const QString &title, const QString &text, bool &checkBoxChecked, const QString &checkBoxText=QString::fromStdString("Do not show this dialog again"), QMessageBox::StandardButtons buttons=QMessageBox::Yes|QMessageBox::No, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton, Qt::WindowFlags f=Qt::MSWindowsFixedSizeDialogHint|Qt::Tool)
 
static QMessageBox::StandardButton warning (DtDe &de, QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=QMessageBox::Ok, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton, Qt::WindowFlags f=Qt::MSWindowsFixedSizeDialogHint|Qt::Tool)
 
static QMessageBox::StandardButton warning (DtDe &de, QWidget *parent, const QString &title, const QString &text, bool &checkBoxChecked, const QString &checkBoxText=QString::fromStdString("Do not show this dialog again"), QMessageBox::StandardButtons buttons=QMessageBox::Ok, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton, Qt::WindowFlags f=Qt::MSWindowsFixedSizeDialogHint|Qt::Tool)
 
static int calculateStepSize (int maxRange, int numberOfSteps)
 
static double calculateStepSize (double maxRange, int numberOfSteps, int decimals)
 
static void showLayout (QLayout *layout)
 
static void hideLayout (QLayout *layout)
 

Static Public Attributes

static const unsigned int DtVK_NUMPAD0 = 0x60
 
static const unsigned int DtVK_NUMPAD1 = 0x61
 
static const unsigned int DtVK_NUMPAD2 = 0x62
 
static const unsigned int DtVK_NUMPAD3 = 0x63
 
static const unsigned int DtVK_NUMPAD4 = 0x64
 
static const unsigned int DtVK_NUMPAD5 = 0x65
 
static const unsigned int DtVK_NUMPAD6 = 0x66
 
static const unsigned int DtVK_NUMPAD7 = 0x67
 
static const unsigned int DtVK_NUMPAD8 = 0x68
 
static const unsigned int DtVK_NUMPAD9 = 0x69
 
static const unsigned int DtVK_MULTIPLY = 0x6A
 
static const unsigned int DtVK_ADD = 0x6B
 
static const unsigned int DtVK_SUBTRACT = 0x6D
 
static const unsigned int DtVK_DECIMAL = 0x6E
 
static const unsigned int DtVK_DIVIDE = 0x6F
 
static const unsigned int DtVK_NUMPAD0_LINUX = 0xFFB0
 
static const unsigned int DtVK_NUMPAD1_LINUX = 0xFFB1
 
static const unsigned int DtVK_NUMPAD2_LINUX = 0xFFB2
 
static const unsigned int DtVK_NUMPAD3_LINUX = 0xFFB3
 
static const unsigned int DtVK_NUMPAD4_LINUX = 0xFFB4
 
static const unsigned int DtVK_NUMPAD5_LINUX = 0xFFB5
 
static const unsigned int DtVK_NUMPAD6_LINUX = 0xFFB6
 
static const unsigned int DtVK_NUMPAD7_LINUX = 0xFFB7
 
static const unsigned int DtVK_NUMPAD8_LINUX = 0xFFB8
 
static const unsigned int DtVK_NUMPAD9_LINUX = 0xFFB9
 
static const unsigned int DtVK_MULTIPLY_LINUX = 0xFFAA
 
static const unsigned int DtVK_ADD_LINUX = 0xFFAB
 
static const unsigned int DtVK_SUBTRACT_LINUX = 0xFFAD
 
static const unsigned int DtVK_DECIMAL_LINUX = 0xFFAE
 
static const unsigned int DtVK_DIVIDE_LINUX = 0xFFAF
 

Static Private Member Functions

static QMessageBox::StandardButton showMessageBox (QMessageBox &mbox, QMessageBox::StandardButton defaultButton)
 

Member Function Documentation

static QString makVrv::DtQtUtil::eventTypeName ( QEvent::Type  eventType)
static

Get a string-name of the event type.

Returns
The event type converted into a string, or the type-id as a string if unknown.
static QString makVrv::DtQtUtil::eventTypeName ( QEvent const *  event)
static

Get a string-name of the event type.

Returns
The event type converted into a string, or the type-id as a string if unknown.
static QMessageBox::StandardButton makVrv::DtQtUtil::critical ( DtDe de,
QWidget *  parent,
const QString &  title,
const QString &  text,
QMessageBox::StandardButtons  buttons = QMessageBox::Ok,
QMessageBox::StandardButton  defaultButton = QMessageBox::NoButton,
Qt::WindowFlags  f = Qt::Tool|Qt::MSWindowsFixedSizeDialogHint 
)
static

Display a critical message box.

Returns
The button clicked to dismiss the message box.
static QMessageBox::StandardButton makVrv::DtQtUtil::critical ( DtDe de,
QWidget *  parent,
const QString &  title,
const QString &  text,
bool checkBoxChecked,
const QString &  checkBoxText = QString::fromStdString("Do not show this dialog again"),
QMessageBox::StandardButtons  buttons = QMessageBox::Ok,
QMessageBox::StandardButton  defaultButton = QMessageBox::NoButton,
Qt::WindowFlags  f = Qt::Tool|Qt::MSWindowsFixedSizeDialogHint 
)
static

Display a critical message box with a checkBox.

Returns
The button clicked to dismiss the message box.
static QMessageBox::StandardButton makVrv::DtQtUtil::information ( DtDe de,
QWidget *  parent,
const QString &  title,
const QString &  text,
const QString &  checkBoxText = QString(),
QMessageBox::StandardButtons  buttons = QMessageBox::Ok,
QMessageBox::StandardButton  defaultButton = QMessageBox::NoButton,
Qt::WindowFlags  f = Qt::Tool|Qt::MSWindowsFixedSizeDialogHint 
)
static

Display an information message box.

Returns
The button clicked to dismiss the message box.
static QMessageBox::StandardButton makVrv::DtQtUtil::information ( DtDe de,
QWidget *  parent,
const QString &  title,
const QString &  text,
bool checkBoxChecked,
const QString &  checkBoxText = QString::fromStdString("Do not show this dialog again"),
QMessageBox::StandardButtons  buttons = QMessageBox::Ok,
QMessageBox::StandardButton  defaultButton = QMessageBox::NoButton,
Qt::WindowFlags  f = Qt::Tool|Qt::MSWindowsFixedSizeDialogHint 
)
static

Display an information message box with a checkBox.

Returns
The button clicked to dismiss the message box.
static QMessageBox::StandardButton makVrv::DtQtUtil::question ( DtDe de,
QWidget *  parent,
const QString &  title,
const QString &  text,
QMessageBox::StandardButtons  buttons = QMessageBox::Yes|QMessageBox::No,
QMessageBox::StandardButton  defaultButton = QMessageBox::NoButton,
Qt::WindowFlags  f = Qt::MSWindowsFixedSizeDialogHint|Qt::Tool 
)
static

Display an inquiry message box.

Returns
The button clicked to dismiss the message box.
static QMessageBox::StandardButton makVrv::DtQtUtil::question ( DtDe de,
QWidget *  parent,
const QString &  title,
const QString &  text,
bool checkBoxChecked,
const QString &  checkBoxText = QString::fromStdString("Do not show this dialog again"),
QMessageBox::StandardButtons  buttons = QMessageBox::Yes|QMessageBox::No,
QMessageBox::StandardButton  defaultButton = QMessageBox::NoButton,
Qt::WindowFlags  f = Qt::MSWindowsFixedSizeDialogHint|Qt::Tool 
)
static

Display an inquiry message box with a checkBox.

Returns
The button clicked to dismiss the message box.
static QMessageBox::StandardButton makVrv::DtQtUtil::warning ( DtDe de,
QWidget *  parent,
const QString &  title,
const QString &  text,
QMessageBox::StandardButtons  buttons = QMessageBox::Ok,
QMessageBox::StandardButton  defaultButton = QMessageBox::NoButton,
Qt::WindowFlags  f = Qt::MSWindowsFixedSizeDialogHint|Qt::Tool 
)
static

Display a warning message box.

Returns
The button clicked to dismiss the message box.
static QMessageBox::StandardButton makVrv::DtQtUtil::warning ( DtDe de,
QWidget *  parent,
const QString &  title,
const QString &  text,
bool checkBoxChecked,
const QString &  checkBoxText = QString::fromStdString("Do not show this dialog again"),
QMessageBox::StandardButtons  buttons = QMessageBox::Ok,
QMessageBox::StandardButton  defaultButton = QMessageBox::NoButton,
Qt::WindowFlags  f = Qt::MSWindowsFixedSizeDialogHint|Qt::Tool 
)
static

Display a warning message box with a checkBox.

Returns
The button clicked to dismiss the message box.
static int makVrv::DtQtUtil::calculateStepSize ( int  maxRange,
int  numberOfSteps 
)
static

Calculate an appropriate step size given a maximum range and a suggested number of desired steps. Steps are rounded (down) to a factor of 10. (includes 10**0, or 1). For the form that returns a double, the step size is clamped to the decimals size (so if decimals is set to 1, the return value will be no less that .1).

static double makVrv::DtQtUtil::calculateStepSize ( double  maxRange,
int  numberOfSteps,
int  decimals 
)
static

Calculate an appropriate step size given a maximum range and a suggested number of desired steps. Steps are rounded (down) to a factor of 10. (includes 10**0, or 1). For the form that returns a double, the step size is clamped to the decimals size (so if decimals is set to 1, the return value will be no less that .1).

static void makVrv::DtQtUtil::showLayout ( QLayout *  layout)
static

These methods iterate through the layout, calling show/hide on any QWidgets, and calling themselves (recursively) for any QLayouts.

static void makVrv::DtQtUtil::hideLayout ( QLayout *  layout)
static

These methods iterate through the layout, calling show/hide on any QWidgets, and calling themselves (recursively) for any QLayouts.

static QMessageBox::StandardButton makVrv::DtQtUtil::showMessageBox ( QMessageBox mbox,
QMessageBox::StandardButton  defaultButton 
)
staticprivate

Display a message box with the given default button.

Returns
The button clicked to dismiss the message box.

Member Data Documentation

const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD0 = 0x60
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD1 = 0x61
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD2 = 0x62
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD3 = 0x63
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD4 = 0x64
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD5 = 0x65
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD6 = 0x66
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD7 = 0x67
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD8 = 0x68
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD9 = 0x69
static
const unsigned int makVrv::DtQtUtil::DtVK_MULTIPLY = 0x6A
static
const unsigned int makVrv::DtQtUtil::DtVK_ADD = 0x6B
static
const unsigned int makVrv::DtQtUtil::DtVK_SUBTRACT = 0x6D
static
const unsigned int makVrv::DtQtUtil::DtVK_DECIMAL = 0x6E
static
const unsigned int makVrv::DtQtUtil::DtVK_DIVIDE = 0x6F
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD0_LINUX = 0xFFB0
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD1_LINUX = 0xFFB1
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD2_LINUX = 0xFFB2
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD3_LINUX = 0xFFB3
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD4_LINUX = 0xFFB4
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD5_LINUX = 0xFFB5
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD6_LINUX = 0xFFB6
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD7_LINUX = 0xFFB7
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD8_LINUX = 0xFFB8
static
const unsigned int makVrv::DtQtUtil::DtVK_NUMPAD9_LINUX = 0xFFB9
static
const unsigned int makVrv::DtQtUtil::DtVK_MULTIPLY_LINUX = 0xFFAA
static
const unsigned int makVrv::DtQtUtil::DtVK_ADD_LINUX = 0xFFAB
static
const unsigned int makVrv::DtQtUtil::DtVK_SUBTRACT_LINUX = 0xFFAD
static
const unsigned int makVrv::DtQtUtil::DtVK_DECIMAL_LINUX = 0xFFAE
static
const unsigned int makVrv::DtQtUtil::DtVK_DIVIDE_LINUX = 0xFFAF
static

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)