com.trolltech.qt
Class QFlags<T extends QtEnumerator>
java.lang.Object
com.trolltech.qt.QFlags<T>
- All Implemented Interfaces:
- QtEnumerator, java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- QAbstractFileEngine.FileFlags, QAbstractItemView.EditTriggers, QAbstractPrintDialog.PrintDialogOptions, QAbstractSpinBox.StepEnabled, QAccessible.Relation, QAccessible.State, QDateTimeEdit.Sections, QDialogButtonBox.StandardButtons, QDir.Filters, QDir.SortFlags, QDirIterator.IteratorFlags, QDockWidget.DockWidgetFeatures, QEventLoop.ProcessEventsFlags, QFile.Permissions, QFileDialog.Options, QFontComboBox.FontFilters, QGL.FormatOptions, QGLFormat.OpenGLVersionFlags, QGraphicsItem.GraphicsItemFlags, QGraphicsScene.SceneLayers, QGraphicsView.CacheMode, QGraphicsView.OptimizationFlags, QIODevice.OpenMode, QItemSelectionModel.SelectionFlags, QLocale.NumberOptions, QMainWindow.DockOptions, QMdiArea.AreaOptions, QMdiSubWindow.SubWindowOptions, QMessageBox.StandardButtons, QNetworkInterface.InterfaceFlags, QPaintEngine.DirtyFlags, QPaintEngine.PaintEngineFeatures, QPainter.RenderHints, QSizePolicy.ControlTypes, QSql.ParamType, QStyle.State, QStyleOptionButton.ButtonFeatures, QStyleOptionFrameV2.FrameFeatures, QStyleOptionTab.CornerWidgets, QStyleOptionToolBar.ToolBarFeatures, QStyleOptionToolButton.ToolButtonFeatures, QStyleOptionViewItemV2.ViewItemFeatures, Qt.Alignment, Qt.DockWidgetAreas, Qt.DropActions, Qt.ImageConversionFlags, Qt.ItemFlags, Qt.KeyboardModifiers, Qt.MatchFlags, Qt.MouseButtons, Qt.Orientations, Qt.TextInteractionFlags, Qt.ToolBarAreas, Qt.WindowFlags, Qt.WindowStates, QTextCodec.ConversionFlags, QTextDocument.FindFlags, QTextEdit.AutoFormatting, QTextFormat.PageBreakFlags, QTextItem.RenderFlags, QTextOption.Flags, QTextStream.NumberFlags, QTreeWidgetItemIterator.IteratorFlags, QUdpSocket.BindMode, QUrl.FormattingOptions, QWidget.RenderFlags, QWizard.WizardOptions
public abstract class QFlags<T extends QtEnumerator>
- extends java.lang.Object
- implements QtEnumerator, java.io.Serializable, java.lang.Cloneable
This class manages a set of QtEnumerator 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:
- Serialized Form
Constructor Summary |
protected |
QFlags(T... args)
Creates a new QFlags where the flags in args are set. |
Method Summary |
void |
clear(QFlags<T> other)
Clears the flag other. |
void |
clear(T... ts)
Clears all flags in ts. |
void |
clearAll()
Clears all flags. |
boolean |
equals(java.lang.Object object)
|
boolean |
isSet(QFlags<T> other)
Returns true if flag other is set; otherwise, returns
false. |
boolean |
isSet(T... ts)
Returns true if all ts flags are set; otherwise,
returns false. |
void |
set(QFlags<T> other)
Sets the flag other |
void |
set(T... ts)
Sets the flags in ts. |
void |
setValue(int value)
Sets the value of this QFlags. |
java.lang.String |
toString()
|
int |
value()
Returns the value of this QFlags. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
QFlags
protected QFlags(T... args)
- Creates a new QFlags where the flags in args are set.
set
public final void set(QFlags<T> other)
- Sets the flag other
set
public final void set(T... ts)
- Sets the flags in ts.
isSet
public final boolean isSet(QFlags<T> other)
- Returns true if flag other is set; otherwise, returns
false.
isSet
public final boolean isSet(T... ts)
- Returns true if all ts flags are set; otherwise,
returns false.
clear
public final void clear(QFlags<T> other)
- Clears the flag other.
clear
public final void clear(T... ts)
- Clears all flags in ts.
clearAll
public final void clearAll()
- Clears all flags.
setValue
public final void setValue(int value)
- Sets the value of this QFlags.
value
public final int value()
- Returns the value of this QFlags.
- Specified by:
value
in interface QtEnumerator
equals
public final boolean equals(java.lang.Object object)
-
- Overrides:
equals
in class java.lang.Object
toString
public final java.lang.String toString()
-
- Overrides:
toString
in class java.lang.Object