QSettingsDialog  1.0.0
A Qt library to easily create a settings dialog for user configurable settings
D:/felix/linked/Qworkplace/QSettingsDialog/QSettingsDialog/qsettingsdialog_global.h
1 #ifndef QSETTINGSDIALOGENGINE_GLOBAL_H
2 #define QSETTINGSDIALOGENGINE_GLOBAL_H
3 
4 #include <QtCore/qglobal.h>
5 #include <QSharedPointer>
6 #ifndef QT_NO_DEBUG
7 #include <QDebug>
8 #endif
9 
10 #if defined(QSETTINGSDIALOG_LIBRARY)
11 # define QSETTINGSDIALOGSHARED_EXPORT Q_DECL_EXPORT
12 #else
13 # define QSETTINGSDIALOGSHARED_EXPORT Q_DECL_IMPORT
14 #endif
15 
17 #define outParam &
18 
19 #ifdef QT_NO_DEBUG
20 #define safe_cast static_cast
21 #else
22 template <typename TTo, typename TFrom>
23 inline TTo safeCast(TFrom from) {
24  Q_ASSERT_X(dynamic_cast<TTo>(from), "", "static cast not possible! Dynamic cast assertion failed!");
25  return static_cast<TTo>(from);
26 }
27 #define safe_cast safeCast
28 #endif
29 
30 #ifdef QT_NO_DEBUG
31 #define sharedSafeCast(type, sharedPointer) sharedPointer.staticCast<type>()
32 #else
33 template <typename TTo, typename TFrom>
34 inline QSharedPointer<TTo> safeCast_sharedPointer(QSharedPointer<TFrom> from) {
35  Q_ASSERT_X(from.template dynamicCast<TTo>(), "", "static cast not possible! Dynamic cast assertion failed!");
36  return from.template staticCast<TTo>();
37 }
38 #define sharedSafeCast(type, sharedPointer) safeCast_sharedPointer<type>(sharedPointer)
39 #endif
40 
43 
44 #endif // QSETTINGSDIALOGENGINE_GLOBAL_H
QHash< QString, QVariant > UiPropertyMap
a Hash for strings to variant, to provide properties for edit widgets
Definition: qsettingsdialog_global.h:42