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
public:
enum Type
enum Type : qint16
{
NoType = -1,
@ -33,7 +33,7 @@ class QSK_EXPORT QskGesture
};
Q_ENUM( Type )
enum State
enum State : quint8
{
NoGesture,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -390,7 +390,7 @@ void QskDialogButtonBox::setActions( QskDialog::Actions actions )
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 );
if ( action & actions )

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -20,7 +20,7 @@ class QSK_EXPORT QskFillNode : public QSGGeometryNode
using Inherited = QSGGeometryNode;
public:
enum Coloring
enum Coloring : quint8
{
Monochrome,
Polychrome,
@ -30,7 +30,7 @@ class QSK_EXPORT QskFillNode : public QSGGeometryNode
Conic
};
enum Hint
enum Hint : quint8
{
/*
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
this is what is also done in the Qt/Quick classes.
*/
PreferColoredGeometry = 1
PreferColoredGeometry = 1 << 0
};
Q_ENUM( Hint )

View File

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

View File

@ -33,7 +33,7 @@ class QSK_EXPORT QskGraduationRenderer
Q_GADGET
public:
enum Flag
enum Flag : quint8
{
Backbone = 1 << 0,
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
application.
*/
enum RenderHint
enum RenderHint : quint8
{
Raster,
OpenGL