java.lang.Object
io.qt.QFlags<T>
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
EnumAttributes
,MetaDataAttributes
,MetaObjectFlags
,MethodAttributes
,PropertyAttributes
,QAbstract3DGraph.OptimizationHints
,QAbstract3DGraph.SelectionFlags
,QAbstractAxis.AxisTypes
,QAbstractFileEngine.FileFlags
,QAbstractFileIconProvider.Options
,QAbstractItemModel.CheckIndexOptions
,QAbstractItemView.EditTriggers
,QAbstractPrintDialog.PrintDialogOptions
,QAbstractSocket.BindMode
,QAbstractSocket.PauseModes
,QAbstractSpinBox.StepEnabled
,QAccessible.Relation
,QAnimationCallback.Flags
,QBluetooth.AttAccessConstraints
,QBluetooth.SecurityFlags
,QBluetoothDeviceDiscoveryAgent.DiscoveryMethods
,QBluetoothDeviceInfo.CoreConfigurations
,QBluetoothDeviceInfo.Fields
,QBluetoothDeviceInfo.ServiceClasses
,QByteArray.Base64Options
,QCamera.Features
,QCanBusDevice.Directions
,QCanBusDevice.Filter.FormatFilters
,QCanBusFrame.FrameErrors
,QCborValue.DiagnosticNotationOptions
,QCborValue.EncodingOptions
,QChart.AnimationOptions
,QChartView.RubberBands
,QColorDialog.ColorDialogOptions
,QCommandLineOption.Flags
,QDateTimeEdit.Sections
,QDBusConnection.ConnectionCapabilities
,QDBusConnection.RegisterOptions
,QDBusServiceWatcher.WatchMode
,QDesignerFormWindowInterface.Feature
,QDesignerIntegrationInterface.Feature
,QDialogButtonBox.StandardButtons
,QDir.Filters
,QDir.SortFlags
,QDirIterator.IteratorFlags
,QDockWidget.DockWidgetFeatures
,QEventLoop.ProcessEventsFlags
,QEventPoint.States
,QFileDevice.FileHandleFlags
,QFileDevice.MemoryMapFlags
,QFileDevice.Permissions
,QFileDialog.Options
,QFileSystemModel.Options
,QFontComboBox.FontFilters
,QFontDialog.FontDialogOptions
,QGeoAreaMonitorSource.AreaMonitorFeatures
,QGeoPositionInfoSource.PositioningMethods
,QGestureRecognizer.Result
,QGlyphRun.GlyphRunFlags
,QGraphicsBlurEffect.BlurHints
,QGraphicsEffect.ChangeFlags
,QGraphicsItem.GraphicsItemFlags
,QGraphicsScene.SceneLayers
,QGraphicsView.CacheMode
,QGraphicsView.OptimizationFlags
,QHostAddress.ConversionMode
,QHstsPolicy.PolicyFlags
,QImageIOHandler.Transformations
,QImageIOPlugin.Capabilities
,QInputDevice.Capabilities
,QInputDevice.DeviceTypes
,QInputDialog.InputDialogOptions
,QIODeviceBase.OpenMode
,QItemSelectionModel.SelectionFlags
,QJSEngine.Extensions
,QLibrary.LoadHints
,QLocale.DataSizeFormats
,QLocale.NumberOptions
,QLocalServer.SocketOptions
,QLocalSocket.SocketOptions
,QLowEnergyCharacteristic.PropertyTypes
,QLowEnergyService.ServiceTypes
,QMainWindow.DockOptions
,QMatrix4x4.Flags
,QMdiArea.AreaOptions
,QMdiSubWindow.SubWindowOptions
,QMemoryBarrier.Operations
,QMessageBox.StandardButtons
,QMetaType.GenericFlags
,QMetaType.TypeFlags
,QNearFieldTarget.AccessMethods
,QNetworkInformation.Features
,QNetworkInterface.InterfaceFlags
,QNetworkProxy.Capabilities
,QOpenGLBuffer.RangeAccessFlags
,QOpenGLDebugMessage.Severities
,QOpenGLDebugMessage.Sources
,QOpenGLDebugMessage.Types
,QOpenGLFunctions.OpenGLFeatures
,QOpenGLShader.ShaderType
,QOpenGLTexture.Features
,QPaintEngine.DirtyFlags
,QPaintEngine.PaintEngineFeatures
,QPainter.PixmapFragmentHints
,QPainter.RenderHints
,QPinchGesture.ChangeFlags
,QPointingDevice.PointerTypes
,QPolarChart.PolarOrientations
,QQmlImageProviderBase.Flags
,QQuickItem.Flags
,QQuickPaintedItem.PerformanceHints
,QQuickWindow.CreateTextureOptions
,QRawFont.LayoutFlags
,QRegularExpression.MatchOptions
,QRegularExpression.PatternOptions
,QRegularExpression.WildcardConversionOptions
,QSerialPort.Directions
,QSerialPort.PinoutSignals
,QSGImageNode.TextureCoordinatesTransformMode
,QSGMaterial.Flags
,QSGMaterialShader.Flags
,QSGMaterialShader.GraphicsPipelineState.ColorMask
,QSGMaterialShader.RenderState.DirtyStates
,QSGNode.DirtyState
,QSGNode.Flags
,QSGRendererInterface.ShaderCompilationTypes
,QSGRendererInterface.ShaderSourceTypes
,QSGRenderNode.RenderingFlags
,QSGRenderNode.StateFlags
,QSGSimpleTextureNode.TextureCoordinatesTransformMode
,QSizePolicy.ControlTypes
,QSql.ParamType
,QSsl.SslOptions
,QStandardPaths.LocateOptions
,QString.SectionFlags
,QStringConverterBase.Flags
,QStyle.State
,QStyleOptionButton.ButtonFeatures
,QStyleOptionFrame.FrameFeatures
,QStyleOptionTab.CornerWidgets
,QStyleOptionTab.TabFeatures
,QStyleOptionToolBar.ToolBarFeatures
,QStyleOptionToolButton.ToolButtonFeatures
,QStyleOptionViewItem.ViewItemFeatures
,QSurface3DSeries.DrawFlags
,QSurfaceFormat.FormatOptions
,Qt.Alignment
,Qt.ApplicationStates
,Qt.DockWidgetAreas
,Qt.DropActions
,Qt.Edges
,Qt.FindChildOptions
,Qt.GestureFlags
,Qt.ImageConversionFlags
,Qt.InputMethodHints
,Qt.InputMethodQueries
,Qt.ItemFlags
,Qt.KeyboardModifiers
,Qt.MatchFlags
,Qt.MouseButtons
,Qt.MouseEventFlags
,Qt.Orientations
,Qt.ScreenOrientations
,Qt.SplitBehavior
,Qt.TextInteractionFlags
,Qt.ToolBarAreas
,Qt.TouchPointStates
,Qt.WindowFlags
,Qt.WindowStates
,QtConcurrent.ReduceOptions
,QTextBoundaryFinder.BoundaryReasons
,QTextDocument.FindFlags
,QTextDocument.MarkdownFeatures
,QTextEdit.AutoFormatting
,QTextFormat.PageBreakFlags
,QTextItem.RenderFlags
,QTextOption.Flags
,QTextStream.NumberFlags
,QTreeWidgetItemIterator.IteratorFlags
,QUrl.ComponentFormattingOptions
,QUrl.FormattingOptions
,QUrl.UserInputResolutionOptions
,QVideoFrame.PaintOptions.PaintFlags
,QVirtualKeyboardInputEngine.ReselectFlags
,QWebEngineContextMenuRequest.EditFlags
,QWebEngineContextMenuRequest.MediaFlags
,QWebEnginePage.FindFlags
,QWebEngineUrlScheme.Flags
,QWidget.RenderFlags
,QWizard.WizardOptions
public abstract class QFlags<T extends QtAbstractFlagEnumerator>
extends Object
implements Serializable, Cloneable
This class manages a set of QtFlagEnumerator values. Each enum value
is treated as a flag that is either set or unset. You can set and
clear flags, and query which flags are set.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
Clears the flagother
.final void
Clears all flags ints
.final void
clearAll()
Clears all flags.clone()
Clones the flagsCombines this flags with enum entry.final boolean
T[]
flags()
Returns an array of flag objects represented by this QFlags.protected final T[]
Returns an unmodifiable set of flag objects represented by this QFlags.final int
hashCode()
final boolean
Tests if other flags are set.final boolean
Tests if other flags are set.final void
Sets the flagflag
final void
Sets the flags ints
.Sets the flagflag
Sets or clears the flagflag
final void
setValue
(int value) Sets the value of this QFlags.final boolean
testAnyFlags
(QFlags<T> flags) Tests if given flags are set.final boolean
testAnyFlags
(T... flags) Tests if any of the given flags is set.final boolean
Tests if other flag is set.final boolean
Tests if given flags are set.final boolean
Tests if given flags are set.final int
toInt()
Returns the value of this QFlags.final String
toString()
final int
value()
Returns the value of this QFlags.
-
Constructor Details
-
QFlags
Creates a new QFlags where the flags inargs
are set.- Parameters:
args
- enum entries
-
QFlags
protected QFlags(int value) Creates a new QFlags with givenvalue
.- Parameters:
value
-
-
-
Method Details
-
clone
Clones the flags -
combined
Combines this flags with enum entry.- Parameters:
flag
- enum entry- Returns:
- new flag
-
set
Sets the flagflag
- Parameters:
other
- other entry
-
setFlag
Sets the flagflag
- Parameters:
flag
- other entry- Returns:
- this
-
setFlag
Sets or clears the flagflag
- Parameters:
flag
- other entryon
- set (true) or clear (false)- Returns:
- this
-
set
Sets the flags ints
. -
isSet
Tests if other flags are set.- Parameters:
other
- other flags- Returns:
- true if flag
other
is set
-
isSet
Tests if other flags are set.- Parameters:
flags
- other other flags- Returns:
- true if flag
other
is set
-
testFlag
Tests if other flag is set.- Parameters:
other
- other flag- Returns:
- true if flag
other
is set
-
testFlags
Tests if given flags are set.- Parameters:
flags
- other flags- Returns:
- true if flags are set
-
testFlags
Tests if given flags are set.- Parameters:
flags
- other flags- Returns:
- true if flags are set
-
testAnyFlags
Tests if given flags are set.- Parameters:
flags
- other flags- Returns:
- true if flags are set
-
testAnyFlags
Tests if any of the given flags is set.- Parameters:
flags
- other flags- Returns:
- true if any of the given flags is set
-
clear
Clears the flagother
. -
clear
Clears all flags ints
. -
clearAll
public final void clearAll()Clears all flags. -
setValue
public final void setValue(int value) Sets the value of this QFlags.- Parameters:
value
- new value
-
toInt
public final int toInt()Returns the value of this QFlags.- Returns:
- value
-
value
public final int value()Returns the value of this QFlags.- Returns:
- value
-
flags
Returns an array of flag objects represented by this QFlags.- Returns:
- array of enum entries
-
flags
Returns an unmodifiable set of flag objects represented by this QFlags.- Returns:
- array of enum entries
-
equals
-
hashCode
public final int hashCode() -
toString
-