more enum types specified

This commit is contained in:
Uwe Rathmann 2024-12-09 15:39:06 +01:00
parent 0849571523
commit 23beda3c28
26 changed files with 36 additions and 36 deletions

View File

@ -16,7 +16,7 @@ class QSK_EXPORT QskGesture
Q_GADGET Q_GADGET
public: public:
enum Type enum Type : qint16
{ {
NoType = -1, NoType = -1,
@ -33,7 +33,7 @@ class QSK_EXPORT QskGesture
}; };
Q_ENUM( Type ) Q_ENUM( Type )
enum State enum State : quint8
{ {
NoGesture, NoGesture,

View File

@ -32,7 +32,7 @@ class QSK_EXPORT QskGestureRecognizer : public QObject
using Inherited = QObject; using Inherited = QObject;
public: public:
enum State enum State : quint8
{ {
Idle, Idle,
Pending, Pending,

View File

@ -40,7 +40,7 @@ class QSK_EXPORT QskGraphicLabel : public QskControl
public: public:
QSK_SUBCONTROLS( Panel, Graphic ) QSK_SUBCONTROLS( Panel, Graphic )
enum FillMode enum FillMode : quint8
{ {
Stretch, Stretch,
PreserveAspectFit, PreserveAspectFit,

View File

@ -32,7 +32,7 @@ class QSK_EXPORT QskListView : public QskScrollView
QSK_SUBCONTROLS( Cell, Text, Graphic ) QSK_SUBCONTROLS( Cell, Text, Graphic )
QSK_STATES( Selected ) QSK_STATES( Selected )
enum SelectionMode enum SelectionMode : quint8
{ {
NoSelection, NoSelection,
SingleSelection, SingleSelection,

View File

@ -27,7 +27,7 @@ class QSK_EXPORT QskPopup : public QskControl
QSK_SUBCONTROLS( Overlay ) QSK_SUBCONTROLS( Overlay )
QSK_STATES( Closed ) QSK_STATES( Closed )
enum PopupFlag enum PopupFlag : quint8
{ {
DeleteOnClose = 1 << 0, DeleteOnClose = 1 << 0,
CloseOnPressOutside = 1 << 1 CloseOnPressOutside = 1 << 1

View File

@ -20,7 +20,7 @@ class QSK_EXPORT QskProgressRing : public QskProgressIndicator
public: public:
QSK_SUBCONTROLS( Groove, Fill ) QSK_SUBCONTROLS( Groove, Fill )
enum Size enum Size : qint8
{ {
SmallSize = -1, SmallSize = -1,
NormalSize = 0, NormalSize = 0,

View File

@ -47,7 +47,7 @@ class QSK_EXPORT QskPushButton : public QskAbstractButton
public: public:
QSK_SUBCONTROLS( Panel, Splash, Text, Icon ) QSK_SUBCONTROLS( Panel, Splash, Text, Icon )
enum Emphasis enum Emphasis : qint8
{ {
VeryLowEmphasis = -2, VeryLowEmphasis = -2,
LowEmphasis = -1, LowEmphasis = -1,

View File

@ -36,7 +36,7 @@ class QSK_EXPORT QskSkin : public QObject
public: public:
#if 1 #if 1
// Use Qt::ColorScheme once minimum version is Qt 6.5 // Use Qt::ColorScheme once minimum version is Qt 6.5
enum ColorScheme enum ColorScheme : quint8
{ {
UnknownScheme, UnknownScheme,

View File

@ -22,7 +22,7 @@ template< typename Key, typename T > class QHash;
class QSK_EXPORT QskSkinTransition class QSK_EXPORT QskSkinTransition
{ {
public: public:
enum Type enum Type : quint8
{ {
Color = 1, Color = 1,
Metric = 2, Metric = 2,

View File

@ -46,7 +46,7 @@ class QskSkinStateChanger;
class QSK_EXPORT QskSkinHintStatus class QSK_EXPORT QskSkinHintStatus
{ {
public: public:
enum Source enum Source : quint8
{ {
NoSource = 0, NoSource = 0,

View File

@ -25,7 +25,7 @@ class QSK_EXPORT QskSpinBox : public QskBoundedValueInput
QSK_STATES( Decreasing, Increasing ) QSK_STATES( Decreasing, Increasing )
enum Decoration enum Decoration : quint8
{ {
NoDecoration, NoDecoration,

View File

@ -34,7 +34,7 @@ class QSK_EXPORT QskSubWindow : public QskPopup
using Inherited = QskPopup; using Inherited = QskPopup;
public: public:
enum Decoration enum Decoration : quint16
{ {
NoDecoration = 0, NoDecoration = 0,

View File

@ -27,7 +27,7 @@ class QSK_EXPORT QskSwitchButton : public QskAbstractButton
public: public:
QSK_SUBCONTROLS( Groove, Handle, Icon ) QSK_SUBCONTROLS( Groove, Handle, Icon )
enum IconMode enum IconMode : quint8
{ {
NoIcon, NoIcon,
ShowIconWhenSelected, ShowIconWhenSelected,

View File

@ -58,7 +58,7 @@ class QSK_EXPORT QskTextField : public QskControl
QSK_SUBCONTROLS( Panel, Text, PlaceholderText ) QSK_SUBCONTROLS( Panel, Text, PlaceholderText )
QSK_STATES( ReadOnly, Editing ) QSK_STATES( ReadOnly, Editing )
enum ActivationMode enum ActivationMode : quint8
{ {
NoActivation, NoActivation,
@ -73,7 +73,7 @@ class QSK_EXPORT QskTextField : public QskControl
Q_ENUM( ActivationMode ) Q_ENUM( ActivationMode )
Q_DECLARE_FLAGS( ActivationModes, ActivationMode ) Q_DECLARE_FLAGS( ActivationModes, ActivationMode )
enum EchoMode enum EchoMode : quint8
{ {
Normal, Normal,
NoEcho, NoEcho,

View File

@ -29,7 +29,7 @@ class QSK_EXPORT QskWindow : public QQuickWindow
using Inherited = QQuickWindow; using Inherited = QQuickWindow;
public: public:
enum EventAcceptance enum EventAcceptance : quint8
{ {
EventProcessed = 0, EventProcessed = 0,
EventPropagationStopped = 1 EventPropagationStopped = 1

View File

@ -31,7 +31,7 @@ class QSK_EXPORT QskDialog : public QObject
WRITE setTransientParent NOTIFY transientParentChanged ) WRITE setTransientParent NOTIFY transientParentChanged )
public: public:
enum Policy enum Policy : quint8
{ {
EmbeddedBox, EmbeddedBox,
EmbeddedWindow, // not yet implemented, do we need it ? EmbeddedWindow, // not yet implemented, do we need it ?
@ -41,7 +41,7 @@ class QSK_EXPORT QskDialog : public QObject
Q_ENUM( Policy ) Q_ENUM( Policy )
// a.k.a QMessageBox::StandardButton or QPlatformDialogHelper::StandardButton // a.k.a QMessageBox::StandardButton or QPlatformDialogHelper::StandardButton
enum Action enum Action : quint32
{ {
NoAction = 0, NoAction = 0,
Ok = 1 << 10, Ok = 1 << 10,
@ -68,7 +68,7 @@ class QSK_EXPORT QskDialog : public QObject
Q_DECLARE_FLAGS( Actions, Action ) Q_DECLARE_FLAGS( Actions, Action )
// a.k.a QMessageBox::ButtonRole // a.k.a QMessageBox::ButtonRole
enum ActionRole enum ActionRole : qint8
{ {
InvalidRole = -1, InvalidRole = -1,
@ -88,7 +88,7 @@ class QSK_EXPORT QskDialog : public QObject
Q_ENUM( ActionRole ) Q_ENUM( ActionRole )
// for building the mask in QskSkin::dialogButtonLayout // for building the mask in QskSkin::dialogButtonLayout
enum ButtonLayoutFlag enum ButtonLayoutFlag : quint32
{ {
// from QPlatformDialogHelper::ButtonRole // from QPlatformDialogHelper::ButtonRole
ActionMask = 0x0FFFFFFF, ActionMask = 0x0FFFFFFF,
@ -98,7 +98,7 @@ class QSK_EXPORT QskDialog : public QObject
Reverse = 1 << 30 Reverse = 1 << 30
}; };
enum DialogCode enum DialogCode : quint8
{ {
Rejected = 0, Rejected = 0,
Accepted Accepted

View File

@ -390,7 +390,7 @@ void QskDialogButtonBox::setActions( QskDialog::Actions actions )
m_data->buttons[ i ].clear(); m_data->buttons[ i ].clear();
} }
for ( int i = QskDialog::Ok; i <= QskDialog::RestoreDefaults; i <<= 1 ) for ( uint i = QskDialog::Ok; i <= QskDialog::RestoreDefaults; i <<= 1 )
{ {
const auto action = static_cast< QskDialog::Action >( i ); const auto action = static_cast< QskDialog::Action >( i );
if ( action & actions ) if ( action & actions )

View File

@ -38,14 +38,14 @@ class QSK_EXPORT QskGraphic : public QPaintDevice
using Inherited = QPaintDevice; using Inherited = QPaintDevice;
public: public:
enum RenderHint enum RenderHint : quint8
{ {
RenderPensUnscaled = 0x1 RenderPensUnscaled = 1 << 0
}; };
typedef QFlags< RenderHint > RenderHints; typedef QFlags< RenderHint > RenderHints;
enum CommandType enum CommandType : quint8
{ {
VectorData = 1 << 0, VectorData = 1 << 0,
RasterData = 1 << 1, RasterData = 1 << 1,

View File

@ -17,7 +17,7 @@ class QSK_EXPORT QskPainterCommand
{ {
public: public:
//! Type of the paint command //! Type of the paint command
enum Type enum Type : qint8
{ {
//! Invalid command //! Invalid command
Invalid = -1, Invalid = -1,

View File

@ -15,7 +15,7 @@ namespace QskStandardSymbol
{ {
Q_NAMESPACE_EXPORT( QSK_EXPORT ) Q_NAMESPACE_EXPORT( QSK_EXPORT )
enum Type enum Type : qint16
{ {
NoSymbol = -1, NoSymbol = -1,

View File

@ -47,7 +47,7 @@ class QskLayoutChain
QskLayoutMetrics metrics; QskLayoutMetrics metrics;
}; };
enum FillMode enum FillMode : quint8
{ {
Leading = 1 << 0, Leading = 1 << 0,
Trailing = 1 << 1 Trailing = 1 << 1

View File

@ -52,7 +52,7 @@ class QSK_EXPORT QskLayoutEngine2D
protected: protected:
QRectF geometryAt( const QskLayoutElement*, const QRect& grid ) const; QRectF geometryAt( const QskLayoutElement*, const QRect& grid ) const;
enum enum : quint8
{ {
ElementCache = 1 << 0, ElementCache = 1 << 0,
LayoutCache = 1 << 1 LayoutCache = 1 << 1

View File

@ -20,7 +20,7 @@ class QSK_EXPORT QskFillNode : public QSGGeometryNode
using Inherited = QSGGeometryNode; using Inherited = QSGGeometryNode;
public: public:
enum Coloring enum Coloring : quint8
{ {
Monochrome, Monochrome,
Polychrome, Polychrome,
@ -30,7 +30,7 @@ class QSK_EXPORT QskFillNode : public QSGGeometryNode
Conic Conic
}; };
enum Hint enum Hint : quint8
{ {
/* /*
Colors might be defined in the material ( QskGradientMaterial, Colors might be defined in the material ( QskGradientMaterial,
@ -46,7 +46,7 @@ class QSK_EXPORT QskFillNode : public QSGGeometryNode
The default setting is to use colored points where possible. Note, that The default setting is to use colored points where possible. Note, that
this is what is also done in the Qt/Quick classes. this is what is also done in the Qt/Quick classes.
*/ */
PreferColoredGeometry = 1 PreferColoredGeometry = 1 << 0
}; };
Q_ENUM( Hint ) Q_ENUM( Hint )

View File

@ -21,7 +21,7 @@ class QSK_EXPORT QskGraduationNode : public QskBasicLinesNode
using Inherited = QskBasicLinesNode; using Inherited = QskBasicLinesNode;
public: public:
enum Alignment enum Alignment : quint8
{ {
Leading, Leading,
Centered, Centered,

View File

@ -33,7 +33,7 @@ class QSK_EXPORT QskGraduationRenderer
Q_GADGET Q_GADGET
public: public:
enum Flag enum Flag : quint8
{ {
Backbone = 1 << 0, Backbone = 1 << 0,
CenteredTickmarks = 1 << 1, CenteredTickmarks = 1 << 1,

View File

@ -27,7 +27,7 @@ class QSK_EXPORT QskPaintedNode : public QSGNode
OpenGL might be ignored depending on the backend used by the OpenGL might be ignored depending on the backend used by the
application. application.
*/ */
enum RenderHint enum RenderHint : quint8
{ {
Raster, Raster,
OpenGL OpenGL