QtGui: use Q_ENUM instead of Q_ENUMS
Change-Id: I92ac2ea218e9134aa36ecb179b8ae790a2dba56a Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
ba7cedb058
commit
e768d96e8b
@ -60,7 +60,6 @@ class QTextCursor;
|
||||
class Q_GUI_EXPORT QAccessible
|
||||
{
|
||||
Q_GADGET
|
||||
Q_ENUMS(Role Event)
|
||||
public:
|
||||
|
||||
enum Event {
|
||||
@ -140,6 +139,7 @@ public:
|
||||
|
||||
InvalidEvent
|
||||
};
|
||||
Q_ENUM(Event)
|
||||
|
||||
// 64 bit enums seem hard on some platforms (windows...)
|
||||
// which makes using a bit field a sensible alternative
|
||||
@ -344,6 +344,7 @@ public:
|
||||
|
||||
UserRole = 0x0000ffff
|
||||
};
|
||||
Q_ENUM(Role)
|
||||
|
||||
enum Text {
|
||||
Name = 0,
|
||||
|
@ -58,7 +58,6 @@ class Q_GUI_EXPORT QMovie : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PRIVATE(QMovie)
|
||||
Q_ENUMS(MovieState CacheMode)
|
||||
Q_PROPERTY(int speed READ speed WRITE setSpeed)
|
||||
Q_PROPERTY(CacheMode cacheMode READ cacheMode WRITE setCacheMode)
|
||||
public:
|
||||
@ -67,10 +66,12 @@ public:
|
||||
Paused,
|
||||
Running
|
||||
};
|
||||
Q_ENUM(MovieState)
|
||||
enum CacheMode {
|
||||
CacheNone,
|
||||
CacheAll
|
||||
};
|
||||
Q_ENUM(CacheMode)
|
||||
|
||||
explicit QMovie(QObject *parent = 0);
|
||||
explicit QMovie(QIODevice *device, const QByteArray &format = QByteArray(), QObject *parent = 0);
|
||||
|
@ -223,12 +223,12 @@ protected:
|
||||
class Q_GUI_EXPORT QTabletEvent : public QInputEvent
|
||||
{
|
||||
Q_GADGET
|
||||
Q_ENUMS(TabletDevice)
|
||||
Q_ENUMS(PointerType)
|
||||
public:
|
||||
enum TabletDevice { NoDevice, Puck, Stylus, Airbrush, FourDMouse,
|
||||
XFreeEraser /*internal*/, RotationStylus };
|
||||
Q_ENUM(TabletDevice)
|
||||
enum PointerType { UnknownPointer, Pen, Cursor, Eraser };
|
||||
Q_ENUM(PointerType)
|
||||
QTabletEvent(Type t, const QPointF &pos, const QPointF &globalPos,
|
||||
int device, int pointerType, qreal pressure, int xTilt, int yTilt,
|
||||
qreal tangentialPressure, qreal rotation, int z,
|
||||
|
@ -55,7 +55,6 @@ class Q_GUI_EXPORT QInputMethod : public QObject
|
||||
Q_PROPERTY(QLocale locale READ locale NOTIFY localeChanged)
|
||||
Q_PROPERTY(Qt::LayoutDirection inputDirection READ inputDirection NOTIFY inputDirectionChanged)
|
||||
|
||||
Q_ENUMS(Action)
|
||||
public:
|
||||
QTransform inputItemTransform() const;
|
||||
void setInputItemTransform(const QTransform &transform);
|
||||
@ -73,6 +72,7 @@ public:
|
||||
Click,
|
||||
ContextMenu
|
||||
};
|
||||
Q_ENUM(Action)
|
||||
|
||||
bool isVisible() const;
|
||||
void setVisible(bool visible);
|
||||
|
@ -62,7 +62,6 @@ class QKeySequencePrivate;
|
||||
class Q_GUI_EXPORT QKeySequence
|
||||
{
|
||||
Q_GADGET
|
||||
Q_ENUMS(StandardKey)
|
||||
|
||||
public:
|
||||
enum StandardKey {
|
||||
@ -137,6 +136,7 @@ public:
|
||||
DeleteCompleteLine,
|
||||
Backspace
|
||||
};
|
||||
Q_ENUM(StandardKey)
|
||||
|
||||
enum SequenceFormat {
|
||||
NativeText,
|
||||
|
@ -47,7 +47,6 @@ class QVariant;
|
||||
class Q_GUI_EXPORT QPalette
|
||||
{
|
||||
Q_GADGET
|
||||
Q_ENUMS(ColorGroup ColorRole)
|
||||
public:
|
||||
QPalette();
|
||||
QPalette(const QColor &button);
|
||||
@ -80,6 +79,7 @@ public:
|
||||
|
||||
// Do not change the order, the serialization format depends on it
|
||||
enum ColorGroup { Active, Disabled, Inactive, NColorGroups, Current, All, Normal = Active };
|
||||
Q_ENUM(ColorGroup)
|
||||
enum ColorRole { WindowText, Button, Light, Midlight, Dark, Mid,
|
||||
Text, BrightText, ButtonText, Base, Window, Shadow,
|
||||
Highlight, HighlightedText,
|
||||
@ -90,6 +90,7 @@ public:
|
||||
NColorRoles = ToolTipText + 1,
|
||||
Foreground = WindowText, Background = Window
|
||||
};
|
||||
Q_ENUM(ColorRole)
|
||||
|
||||
inline ColorGroup currentColorGroup() const { return static_cast<ColorGroup>(data.current_group); }
|
||||
inline void setCurrentColorGroup(ColorGroup cg) { data.current_group = cg; }
|
||||
|
@ -84,8 +84,6 @@ class Q_GUI_EXPORT QWindow : public QObject, public QSurface
|
||||
Q_OBJECT
|
||||
Q_DECLARE_PRIVATE(QWindow)
|
||||
|
||||
Q_ENUMS(Visibility)
|
||||
|
||||
// All properties which are declared here are inherited by QQuickWindow and therefore available in QML.
|
||||
// So please think carefully about what it does to the QML namespace if you add any new ones,
|
||||
// particularly the possible meanings these names might have in any specializations of Window.
|
||||
@ -122,6 +120,7 @@ public:
|
||||
Maximized,
|
||||
FullScreen
|
||||
};
|
||||
Q_ENUM(Visibility)
|
||||
|
||||
explicit QWindow(QScreen *screen = 0);
|
||||
explicit QWindow(QWindow *parent);
|
||||
|
@ -147,7 +147,6 @@ class QOpenGLDebugLoggerPrivate;
|
||||
class Q_GUI_EXPORT QOpenGLDebugLogger : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS(LoggingMode)
|
||||
Q_PROPERTY(LoggingMode loggingMode READ loggingMode)
|
||||
|
||||
public:
|
||||
@ -155,6 +154,7 @@ public:
|
||||
AsynchronousLogging,
|
||||
SynchronousLogging
|
||||
};
|
||||
Q_ENUM(LoggingMode)
|
||||
|
||||
explicit QOpenGLDebugLogger(QObject *parent = 0);
|
||||
~QOpenGLDebugLogger();
|
||||
|
@ -324,7 +324,7 @@ public:
|
||||
TotalSnippetCount, InvalidSnippetName
|
||||
};
|
||||
#if defined (QT_DEBUG)
|
||||
Q_ENUMS(SnippetName)
|
||||
Q_ENUM(SnippetName)
|
||||
static QByteArray snippetNameStr(SnippetName snippetName);
|
||||
#endif
|
||||
|
||||
|
@ -167,7 +167,6 @@ typedef QVector<QGradientStop> QGradientStops;
|
||||
class Q_GUI_EXPORT QGradient
|
||||
{
|
||||
Q_GADGET
|
||||
Q_ENUMS(Type Spread CoordinateMode)
|
||||
public:
|
||||
enum Type {
|
||||
LinearGradient,
|
||||
@ -175,18 +174,21 @@ public:
|
||||
ConicalGradient,
|
||||
NoGradient
|
||||
};
|
||||
Q_ENUM(Type)
|
||||
|
||||
enum Spread {
|
||||
PadSpread,
|
||||
ReflectSpread,
|
||||
RepeatSpread
|
||||
};
|
||||
Q_ENUM(Spread)
|
||||
|
||||
enum CoordinateMode {
|
||||
LogicalMode,
|
||||
StretchToDeviceMode,
|
||||
ObjectBoundingMode
|
||||
};
|
||||
Q_ENUM(CoordinateMode)
|
||||
|
||||
enum InterpolationMode {
|
||||
ColorInterpolation,
|
||||
|
@ -49,7 +49,6 @@ class QVariant;
|
||||
class Q_GUI_EXPORT QFont
|
||||
{
|
||||
Q_GADGET
|
||||
Q_ENUMS(StyleStrategy)
|
||||
public:
|
||||
enum StyleHint {
|
||||
Helvetica, SansSerif = Helvetica,
|
||||
@ -78,6 +77,7 @@ public:
|
||||
NoSubpixelAntialias = 0x0800,
|
||||
NoFontMerging = 0x8000
|
||||
};
|
||||
Q_ENUM(StyleStrategy)
|
||||
|
||||
enum HintingPreference {
|
||||
PreferDefaultHinting = 0,
|
||||
|
@ -51,8 +51,6 @@ class QFontDatabasePrivate;
|
||||
class Q_GUI_EXPORT QFontDatabase
|
||||
{
|
||||
Q_GADGET
|
||||
Q_ENUMS(WritingSystem)
|
||||
Q_ENUMS(SystemFont)
|
||||
public:
|
||||
// do not re-order or delete entries from this enum without updating the
|
||||
// QPF2 format and makeqpf!!
|
||||
@ -98,6 +96,7 @@ public:
|
||||
|
||||
WritingSystemsCount
|
||||
};
|
||||
Q_ENUM(WritingSystem)
|
||||
|
||||
enum SystemFont {
|
||||
GeneralFont,
|
||||
@ -105,6 +104,7 @@ public:
|
||||
TitleFont,
|
||||
SmallestReadableFont
|
||||
};
|
||||
Q_ENUM(SystemFont)
|
||||
|
||||
static QList<int> standardSizes();
|
||||
|
||||
|
@ -126,7 +126,6 @@ Q_GUI_EXPORT QDebug operator<<(QDebug, const QTextFormat &);
|
||||
class Q_GUI_EXPORT QTextFormat
|
||||
{
|
||||
Q_GADGET
|
||||
Q_ENUMS(FormatType Property ObjectTypes)
|
||||
public:
|
||||
enum FormatType {
|
||||
InvalidFormat = -1,
|
||||
@ -140,6 +139,7 @@ public:
|
||||
|
||||
UserFormat = 100
|
||||
};
|
||||
Q_ENUM(FormatType)
|
||||
|
||||
enum Property {
|
||||
ObjectIndex = 0x0,
|
||||
@ -257,6 +257,7 @@ public:
|
||||
// --
|
||||
UserProperty = 0x100000
|
||||
};
|
||||
Q_ENUM(Property)
|
||||
|
||||
enum ObjectTypes {
|
||||
NoObject,
|
||||
@ -266,6 +267,7 @@ public:
|
||||
|
||||
UserObject = 0x1000
|
||||
};
|
||||
Q_ENUM(ObjectTypes)
|
||||
|
||||
enum PageBreakFlag {
|
||||
PageBreak_Auto = 0,
|
||||
|
@ -120,7 +120,6 @@ class Q_GUI_EXPORT QDoubleValidator : public QValidator
|
||||
Q_PROPERTY(double bottom READ bottom WRITE setBottom NOTIFY bottomChanged)
|
||||
Q_PROPERTY(double top READ top WRITE setTop NOTIFY topChanged)
|
||||
Q_PROPERTY(int decimals READ decimals WRITE setDecimals NOTIFY decimalsChanged)
|
||||
Q_ENUMS(Notation)
|
||||
Q_PROPERTY(Notation notation READ notation WRITE setNotation NOTIFY notationChanged)
|
||||
|
||||
public:
|
||||
@ -132,6 +131,7 @@ public:
|
||||
StandardNotation,
|
||||
ScientificNotation
|
||||
};
|
||||
Q_ENUM(Notation)
|
||||
QValidator::State validate(QString &, int &) const Q_DECL_OVERRIDE;
|
||||
|
||||
virtual void setRange(double bottom, double top, int decimals = 0);
|
||||
|
Loading…
Reference in New Issue
Block a user