QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskMenu Class Reference

Detailed Description

Definition at line 16 of file QskMenu.h.

Inheritance diagram for QskMenu:

Properties

QPointF origin
 
bool cascading
 
bool wrapping
 
QVector< QskLabelDataoptions
 
int currentIndex
 
int triggeredIndex
 
QString triggeredText
 
QString currentText
 
- Properties inherited from QskPopup
bool open
 
bool modal
 
bool fading
 
bool overlay
 
uint priority
 
- Properties inherited from QskControl
QLocale locale
 
QskAspect::Section section
 
bool autoLayoutChildren
 
bool visibleToLayout
 
QskMargins margins
 
QskGradient background
 
QskSizePolicy sizePolicy
 
QskPlacementPolicy placementPolicy
 
QSizeF minimumSize
 
QSizeF maximumSize
 
QSizeF preferredSize
 
QSizeF sizeConstraint
 
- Properties inherited from QskItem
QRectF geometry
 
QRectF rect
 
bool tabFence
 
bool polishOnResize
 
bool polishOnParentResize
 
Qt::FocusPolicy focusPolicy
 
bool wheelEnabled
 
bool visibleToParent
 
bool hasChildItems
 
bool initiallyPainted
 
UpdateFlags updateFlags
 

Static Public Attributes

static const QskAspect::Subcontrol Panel
 
static const QskAspect::Subcontrol Segment
 
static const QskAspect::Subcontrol Cursor
 
static const QskAspect::Subcontrol Text
 
static const QskAspect::Subcontrol Icon
 
static const QskAspect::Subcontrol Separator
 
static const QskAspect::State Selected
 
static const QskAspect::State Pressed
 
- Static Public Attributes inherited from QskPopup
static const QskAspect::Subcontrol Overlay
 
static const QskAspect::State Closed
 
- Static Public Attributes inherited from QskControl
static const QskAspect::Subcontrol Background
 
static const QskAspect::State Disabled
 
static const QskAspect::State Hovered
 
static const QskAspect::State Focused
 

Public Member Functions

 QskMenu (QQuickItem *parentItem=nullptr)
 
bool isCascading () const
 
void setCascading (bool)
 
void resetCascading ()
 
bool isWrapping () const
 
void setWrapping (bool)
 
void setOrigin (const QPointF &)
 
QPointF origin () const
 
void setTextOptions (const QskTextOptions &)
 
QskTextOptions textOptions () const
 
int addOption (const QString &, const QString &)
 
int addOption (const QUrl &, const QString &)
 
int addOption (const QskLabelData &)
 
void addSeparator ()
 
void setOptions (const QVector< QskLabelData > &)
 
void setOptions (const QStringList &)
 
QVector< QskLabelDataoptions () const
 
QskLabelData optionAt (int) const
 
QVector< int > separators () const
 
QVector< int > actions () const
 
int currentIndex () const
 
QString currentText () const
 
int triggeredIndex () const
 
QString triggeredText () const
 
QRectF focusIndicatorRect () const override
 
QRectF cellRect (int index) const
 
int indexAtPosition (const QPointF &) const
 
bool isPressed () const
 
QRectF clipRect () const override
 
QskAspect fadingAspect () const override
 
Q_INVOKABLE int exec ()
 
- Public Member Functions inherited from QskPopup
 QskPopup (QQuickItem *parent=nullptr)
 
void setPopupFlags (PopupFlags)
 
PopupFlags popupFlags () const
 
void setPopupFlag (PopupFlag, bool on=true)
 
bool testPopupFlag (PopupFlag) const
 
void setModal (bool on=true)
 
bool isModal () const
 
void setOverlay (bool on=true)
 
void resetOverlay ()
 
bool hasOverlay () const
 
void setPriority (uint)
 
uint priority () const
 
bool isOpen () const
 
bool isClosed () const
 
bool isFading () const
 
qreal fadingFactor () const
 
virtual QRectF overlayRect () const
 
- Public Member Functions inherited from QskControl
 QskControl (QQuickItem *parent=nullptr)
 
 ~QskControl () override
 
void setMargins (qreal)
 
void setMargins (qreal, qreal, qreal, qreal)
 
void setMargins (const QMarginsF &)
 
void resetMargins ()
 
QMarginsF margins () const
 
void setBackground (const QskGradient &)
 
void resetBackground ()
 
QskGradient background () const
 
void setBackgroundColor (const QColor &)
 
QRectF contentsRect () const
 
QRectF layoutRect () const
 
virtual QRectF layoutRectForSize (const QSizeF &) const
 
virtual QRectF focusIndicatorClipRect () const
 
QRectF subControlRect (QskAspect::Subcontrol) const
 
QRectF subControlRect (const QSizeF &, QskAspect::Subcontrol) const
 
QRectF subControlContentsRect (QskAspect::Subcontrol) const
 
QRectF subControlContentsRect (const QSizeF &, QskAspect::Subcontrol) const
 
void setAutoLayoutChildren (bool)
 
bool autoLayoutChildren () const
 
void setSection (QskAspect::Section)
 
void resetSection ()
 
QskAspect::Section section () const override final
 
void setSizePolicy (QskSizePolicy)
 
void setSizePolicy (QskSizePolicy::Policy, QskSizePolicy::Policy)
 
void setSizePolicy (Qt::Orientation, QskSizePolicy::Policy)
 
QskSizePolicy sizePolicy () const
 
QskSizePolicy::Policy sizePolicy (Qt::Orientation) const
 
void setLayoutAlignmentHint (Qt::Alignment)
 
Qt::Alignment layoutAlignmentHint () const
 
void setPlacementPolicy (QskPlacementPolicy)
 
void setPlacementPolicy (QskPlacementPolicy::Policy, QskPlacementPolicy::Policy)
 
void setPlacementPolicy (Qsk::Visibilities, QskPlacementPolicy::Policy)
 
void resetPlacementPolicy ()
 
QskPlacementPolicy placementPolicy () const
 
QskPlacementPolicy::Policy placementPolicy (Qsk::Visibility) const
 
QskPlacementPolicy::Policy effectivePlacementPolicy () const
 
bool isVisibleToLayout () const
 
void setMinimumSize (const QSizeF &)
 
void setMinimumSize (qreal width, qreal height)
 
void setMinimumWidth (qreal width)
 
void setMinimumHeight (qreal height)
 
void setMaximumSize (const QSizeF &)
 
void setMaximumSize (qreal width, qreal height)
 
void setMaximumWidth (qreal width)
 
void setMaximumHeight (qreal height)
 
void setPreferredSize (const QSizeF &)
 
void setPreferredSize (qreal width, qreal height)
 
void setPreferredWidth (qreal width)
 
void setPreferredHeight (qreal height)
 
void setFixedSize (const QSizeF &)
 
void setFixedSize (qreal width, qreal height)
 
void setFixedWidth (qreal width)
 
void setFixedHeight (qreal height)
 
void setExplicitSizeHint (Qt::SizeHint, const QSizeF &)
 
void setExplicitSizeHint (Qt::SizeHint, qreal width, qreal height)
 
void resetExplicitSizeHint (Qt::SizeHint)
 
QSizeF minimumSize () const
 
QSizeF maximumSize () const
 
QSizeF preferredSize () const
 
QSizeF explicitSizeHint (Qt::SizeHint) const
 
QSizeF implicitSizeHint (Qt::SizeHint, const QSizeF &constraint) const
 
QSizeF sizeHint () const
 
qreal heightForWidth (qreal width) const
 
qreal widthForHeight (qreal height) const
 
QSizeF effectiveSizeHint (Qt::SizeHint, const QSizeF &constraint=QSizeF()) const
 
QSizeF sizeConstraint (Qt::SizeHint, const QSizeF &constraint=QSizeF()) const
 
QSizeF sizeConstraint () const
 
QLocale locale () const
 
void resetLocale ()
 
QVector< QskAspect::SubcontrolsubControls () const
 
QRectF subControlRect (const QRectF &, QskAspect::Subcontrol) const
 Calculate position and size of a subControl.
 
QRectF subControlContentsRect (const QRectF &, QskAspect::Subcontrol) const
 Calculate the inner rectangle for subControl.
 
- Public Member Functions inherited from QskItem
const char * className () const
 
bool isVisibleTo (const QQuickItem *) const
 
bool isVisibleToParent () const
 
bool hasChildItems () const
 
QRectF rect () const
 
QSizeF implicitSize () const
 
void setGeometry (qreal x, qreal y, qreal width, qreal height)
 
void setGeometry (const QPointF &, const QSizeF &)
 
QRectF geometry () const
 
void setPosition (qreal x, qreal y)
 
void setSize (qreal width, qreal height)
 
void setPolishOnResize (bool)
 
bool polishOnResize () const
 
void setPolishOnParentResize (bool)
 
bool polishOnParentResize () const
 
void setFocusPolicy (Qt::FocusPolicy)
 
Qt::FocusPolicy focusPolicy () const
 
void setTabFence (bool)
 
bool isTabFence () const
 
void setWheelEnabled (bool)
 
bool isWheelEnabled () const
 
void setLayoutMirroring (bool on, bool childrenInherit=false)
 
void resetLayoutMirroring ()
 
bool layoutMirroring () const
 
void resetUpdateFlags ()
 
UpdateFlags updateFlags () const
 
void setUpdateFlag (UpdateFlag, bool on=true)
 
void resetUpdateFlag (UpdateFlag)
 
bool testUpdateFlag (UpdateFlag) const
 
void classBegin () override
 
void componentComplete () override
 
void releaseResources () override
 
bool isPolishScheduled () const
 
bool isUpdateNodeScheduled () const
 
bool isInitiallyPainted () const
 
bool maybeUnresized () const
 
- Public Member Functions inherited from QskSkinnable
 QskSkinnable ()
 
virtual ~QskSkinnable ()
 
void setSkinlet (const QskSkinlet *)
 Set an individual skinlet to render/display the content.
 
const QskSkinletskinlet () const
 
QFont effectiveFont (QskAspect) const
 
qreal effectiveFontHeight (QskAspect) const
 
QskColorFilter effectiveGraphicFilter (QskAspect::Subcontrol) const
 
void setSubcontrolProxy (QskAspect::Subcontrol, QskAspect::Subcontrol proxy)
 
void resetSubcontrolProxy (QskAspect::Subcontrol)
 
QskAspect::Subcontrol subcontrolProxy (QskAspect::Subcontrol) const
 
bool setAnimationHint (QskAspect, QskAnimationHint)
 
QskAnimationHint animationHint (QskAspect, QskSkinHintStatus *=nullptr) const
 
bool hasAnimationHint (QskAspect) const
 
bool setSkinHint (QskAspect, const QVariant &)
 Insert a hint into the local hint table.
 
bool resetSkinHint (QskAspect)
 Remove a hint from the local hint table.
 
bool moveSkinHint (QskAspect, const QVariant &)
 
bool moveSkinHint (QskAspect, const QVariant &, const QVariant &)
 
QskAnimationHint effectiveAnimation (QskAspect::Type, QskAspect::Subcontrol, QskAspect::States, QskSkinHintStatus *status=nullptr) const
 
QVariant effectiveSkinHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Find the value for a specific aspect.
 
virtual QskAspect::Variation effectiveVariation () const
 
QskSkinHintStatus hintStatus (QskAspect) const
 
QRectF subControlRect (const QRectF &, QskAspect::Subcontrol) const
 Calculate position and size of a subControl.
 
QRectF subControlContentsRect (const QRectF &, QskAspect::Subcontrol) const
 Calculate the inner rectangle for subControl.
 
QSizeF outerBoxSize (QskAspect, const QSizeF &innerBoxSize) const
 Calculate the size, when being expanded by paddings, indentations.
 
QSizeF innerBoxSize (QskAspect, const QSizeF &outerBoxSize) const
 Calculate the size, with paddings, indentations being subtracted.
 
QRectF innerBox (QskAspect, const QRectF &outerBox) const
 Calculate the rectangle, whith paddings, indentations being subtracted.
 
QRectF outerBox (QskAspect, const QRectF &innerBox) const
 Calculate the rectangle, when being expanded by paddings, indentations.
 
QMarginsF innerPadding (QskAspect, const QSizeF &) const
 Calculate the padding from attributes for the given aspect.
 
const QskSkinleteffectiveSkinlet () const
 
QskSkineffectiveSkin () const
 
void startTransition (QskAspect, QskAnimationHint, const QVariant &from, const QVariant &to)
 
void startTransition (QskAspect, int index, QskAnimationHint, const QVariant &from, const QVariant &to)
 
QskAspect::Subcontrol effectiveSubcontrol (QskAspect::Subcontrol) const
 
QskControlcontrolCast ()
 
const QskControlcontrolCast () const
 
virtual const QMetaObject * metaObject () const =0
 
void debug (QskAspect) const
 
void debug (QskAspect::State) const
 
void debug (QDebug, QskAspect) const
 
void debug (QDebug, QskAspect::State) const
 
void setSkinStates (QskAspect::States)
 
void setSkinStateFlag (QskAspect::State, bool on=true)
 
void addSkinStates (QskAspect::States)
 
void clearSkinStates (QskAspect::States)
 
bool hasSkinState (QskAspect::State) const
 
QskAspect::States skinStates () const
 
const char * skinStatesAsPrintable () const
 
const char * skinStatesAsPrintable (QskAspect::States) const
 
bool setColor (QskAspect, Qt::GlobalColor)
 Sets a color hint.
 
bool setColor (QskAspect, QRgb)
 Sets a color hint.
 
bool setColor (QskAspect, const QColor &)
 Sets a color hint.
 
bool moveColor (QskAspect, Qt::GlobalColor)
 
bool moveColor (QskAspect, QRgb)
 
bool moveColor (QskAspect, const QColor &)
 
bool resetColor (QskAspect)
 Removes a color hint from the local table.
 
QColor color (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a color hint.
 
bool setMetric (QskAspect, qreal)
 Sets a metric hint.
 
bool moveMetric (QskAspect, qreal)
 
bool resetMetric (QskAspect)
 Removes a metric hint from the local table.
 
qreal metric (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a metric hint.
 
bool setFlagHint (QskAspect, int flag)
 Sets a flag hint.
 
template<typename T >
flagHint (QskAspect, T=T()) const
 Retrieves a flag hint.
 
bool setPositionHint (QskAspect, qreal)
 
bool movePositionHint (QskAspect, qreal)
 
bool movePositionHint (QskAspect, qreal from, qreal to)
 
bool resetPositionHint (QskAspect)
 
qreal positionHint (QskAspect, QskSkinHintStatus *=nullptr) const
 
bool setStrutSizeHint (QskAspect, const QSizeF &)
 Sets a metric hint.
 
bool setStrutSizeHint (QskAspect, qreal width, qreal height)
 Sets a strut size hint.
 
bool resetStrutSizeHint (QskAspect)
 Removes a strut size hint from the local table.
 
QSizeF strutSizeHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a strut size hint.
 
bool setMarginHint (QskAspect, qreal)
 Sets a margin hint.
 
bool setMarginHint (QskAspect, const QMarginsF &)
 Sets a margin hint.
 
bool resetMarginHint (QskAspect)
 Removes a margin hint from the local table.
 
QMarginsF marginHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a margin hint.
 
bool setPaddingHint (QskAspect, qreal)
 Sets a padding hint.
 
bool setPaddingHint (QskAspect, const QMarginsF &)
 Sets a padding hint.
 
bool resetPaddingHint (QskAspect)
 Removes a padding hint from the local table.
 
QMarginsF paddingHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a padding hint.
 
bool setGradientHint (QskAspect, const QskGradient &)
 Sets a gradient as color hint.
 
QskGradient gradientHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a color hint as gradient.
 
bool setBoxShapeHint (QskAspect, const QskBoxShapeMetrics &)
 Sets a shape hint.
 
bool resetBoxShapeHint (QskAspect)
 Removes a shape hint from the local table.
 
QskBoxShapeMetrics boxShapeHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a shape hint.
 
bool setBoxBorderMetricsHint (QskAspect, const QskBoxBorderMetrics &)
 Sets a border metrics hint.
 
bool resetBoxBorderMetricsHint (QskAspect)
 Removes a border metrics hint from the local table.
 
QskBoxBorderMetrics boxBorderMetricsHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a border hint.
 
bool setBoxBorderColorsHint (QskAspect, const QskBoxBorderColors &)
 Sets a border colors hint.
 
bool resetBoxBorderColorsHint (QskAspect)
 Removes a border colors hint from the local table.
 
QskBoxBorderColors boxBorderColorsHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves border colors hint.
 
bool setShadowMetricsHint (QskAspect, const QskShadowMetrics &)
 
bool resetShadowMetricsHint (QskAspect)
 
QskShadowMetrics shadowMetricsHint (QskAspect, QskSkinHintStatus *=nullptr) const
 
bool setShadowColorHint (QskAspect, const QColor &)
 
bool resetShadowColorHint (QskAspect)
 
QColor shadowColorHint (QskAspect, QskSkinHintStatus *=nullptr) const
 
QskBoxHints boxHints (QskAspect) const
 
bool setArcMetricsHint (QskAspect, const QskArcMetrics &)
 
bool resetArcMetricsHint (QskAspect)
 
QskArcMetrics arcMetricsHint (QskAspect, QskSkinHintStatus *=nullptr) const
 
bool setStippleMetricsHint (QskAspect, const QskStippleMetrics &)
 
bool resetStippleMetricsHint (QskAspect)
 
QskStippleMetrics stippleMetricsHint (QskAspect, QskSkinHintStatus *=nullptr) const
 
bool setSpacingHint (QskAspect, qreal)
 Sets a spacing hint.
 
bool resetSpacingHint (QskAspect)
 Removes a spacing hint from the local table.
 
qreal spacingHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a spacing hint.
 
bool setAlignmentHint (QskAspect, Qt::Alignment)
 Sets an alignment hint.
 
bool resetAlignmentHint (QskAspect)
 Removes an alignment hint from the local table.
 
Qt::Alignment alignmentHint (QskAspect, Qt::Alignment=Qt::Alignment()) const
 Retrieves an alignment hint.
 
bool setTextOptionsHint (QskAspect, const QskTextOptions &)
 
bool resetTextOptionsHint (QskAspect)
 
QskTextOptions textOptionsHint (QskAspect, QskSkinHintStatus *=nullptr) const
 
bool setFontRoleHint (QskAspect, const QskFontRole &)
 Sets a font role hint.
 
bool resetFontRoleHint (QskAspect)
 Removes a font role hint from the local table.
 
QskFontRole fontRoleHint (QskAspect, QskSkinHintStatus *=nullptr) const
 Retrieves a font role hint.
 
bool setGraphicRoleHint (QskAspect, int role)
 Sets a graphic role hint.
 
bool resetGraphicRoleHint (QskAspect)
 Removes a graphic role hint from the local table.
 
int graphicRoleHint (QskAspect, QskSkinHintStatus *=nullptr) const
 A Retrieves a graphic role hint.
 
bool setSymbolHint (const QskAspect, const QskGraphic &)
 
bool resetSymbolHint (const QskAspect)
 
QskGraphic symbolHint (const QskAspect, QskSkinHintStatus *=nullptr) const
 
const QskSkinHintTablehintTable () const
 Accessor for local skin hint table.
 
bool startHintTransitions (QskAspect::States, QskAspect::States, int index=-1)
 
bool startHintTransitions (const QVector< QskAspect::Subcontrol > &, QskAspect::States, QskAspect::States, int index=-1)
 
const QskHintAnimatorrunningHintAnimator (QskAspect, int index=-1) const
 

Public Slots

void setCurrentIndex (int)
 
void clear ()
 
- Public Slots inherited from QskPopup
void open ()
 
void close ()
 
void toggle ()
 
void setOpen (bool)
 
- Public Slots inherited from QskControl
void setLocale (const QLocale &)
 
- Public Slots inherited from QskItem
void setGeometry (const QRectF &)
 
void show ()
 
void hide ()
 
void setHidden (bool)
 
void setDisabled (bool)
 
void resetImplicitSize ()
 

Signals

void wrappingChanged (bool)
 
void cascadingChanged (bool)
 
void originChanged (const QPointF &)
 
void triggered (int index)
 
void currentIndexChanged (int)
 
void optionsChanged ()
 
- Signals inherited from QskPopup
void opened ()
 
void closed ()
 
void openChanged (bool)
 
void fadingChanged (bool)
 
void modalChanged (bool)
 
void overlayChanged (bool)
 
void priorityChanged (uint)
 
- Signals inherited from QskControl
void backgroundChanged ()
 
void sectionChanged (QskAspect::Section)
 
void marginsChanged (const QMarginsF &)
 
void focusIndicatorRectChanged ()
 
void localeChanged (const QLocale &)
 
- Signals inherited from QskItem
void wheelEnabledChanged (bool)
 
void focusPolicyChanged (Qt::FocusPolicy)
 
void itemFlagsChanged ()
 
void updateFlagsChanged (UpdateFlags)
 

Protected Member Functions

void keyPressEvent (QKeyEvent *) override
 
void keyReleaseEvent (QKeyEvent *) override
 
void hoverEnterEvent (QHoverEvent *) override
 
void hoverMoveEvent (QHoverEvent *) override
 
void hoverLeaveEvent (QHoverEvent *) override
 
void wheelEvent (QWheelEvent *) override
 
void mousePressEvent (QMouseEvent *) override
 
void mouseUngrabEvent () override
 
void mouseReleaseEvent (QMouseEvent *) override
 
void aboutToShow () override
 
void trigger (int)
 
void updateResources () override
 
void updateNode (QSGNode *) override
 
- Protected Member Functions inherited from QskPopup
void aboutToShow () override
 
int execPopup ()
 
bool event (QEvent *) override
 
void focusInEvent (QFocusEvent *) override
 
void focusOutEvent (QFocusEvent *) override
 
void keyPressEvent (QKeyEvent *) override
 
void windowChangeEvent (QskWindowChangeEvent *) override
 
void itemChange (QQuickItem::ItemChange, const QQuickItem::ItemChangeData &) override
 
virtual QQuickItem * focusSuccessor () const
 
bool isTransitionAccepted (QskAspect) const override
 Additional check if an transition should be started.
 
void grabFocus (bool)
 
- Protected Member Functions inherited from QskControl
bool event (QEvent *) override
 
virtual void gestureEvent (QskGestureEvent *)
 
void hoverEnterEvent (QHoverEvent *) override
 
void hoverLeaveEvent (QHoverEvent *) override
 
bool childMouseEventFilter (QQuickItem *, QEvent *) override
 
void itemChange (ItemChange, const ItemChangeData &) override
 
void geometryChange (const QRectF &, const QRectF &) override
 
void initSizePolicy (QskSizePolicy::Policy, QskSizePolicy::Policy)
 
virtual void updateLayout ()
 
virtual QSizeF contentsSizeHint (Qt::SizeHint, const QSizeF &) const
 
virtual QSizeF layoutSizeHint (Qt::SizeHint, const QSizeF &) const
 
- Protected Member Functions inherited from QskItem
 QskItem (QskItemPrivate &, QQuickItem *=nullptr)
 
bool event (QEvent *) override
 
virtual void changeEvent (QEvent *)
 
virtual void geometryChangeEvent (QskGeometryChangeEvent *)
 
void mouseUngrabEvent () override
 
void touchUngrabEvent () override
 
void itemChange (ItemChange, const ItemChangeData &) override
 
void geometryChange (const QRectF &, const QRectF &) override
 
- Protected Member Functions inherited from QskSkinnable
virtual QskAspect::Subcontrol substitutedSubcontrol (QskAspect::Subcontrol) const
 
QskSkinHintTablehintTable ()
 Accessor for local skin hint table.
 

Additional Inherited Members

- Public Types inherited from QskPopup
enum  PopupFlag { DeleteOnClose = 1 << 0 , CloseOnPressOutside = 1 << 1 }
 
- Public Types inherited from QskItem
enum  UpdateFlag {
  DeferredUpdate = 1 << 0 , DeferredPolish = 1 << 1 , DeferredLayout = 1 << 2 , CleanupOnVisibility = 1 << 3 ,
  PreferRasterForTextures = 1 << 4 , DebugForceBackground = 1 << 7
}
 

Constructor & Destructor Documentation

◆ QskMenu()

QskMenu::QskMenu ( QQuickItem *  parentItem = nullptr)

Definition at line 61 of file QskMenu.cpp.

◆ ~QskMenu()

QskMenu::~QskMenu ( )
override

Definition at line 95 of file QskMenu.cpp.

Member Function Documentation

◆ aboutToShow()

void QskMenu::aboutToShow ( )
overrideprotectedvirtual

A specific hook that is intended to be overloaded by controls that need to do some specific operations, when an item is painted the first time after becoming visible.

The default implementation is a no operation.

See also
initiallyPainted
QQuickItem::setVisible()

Reimplemented from QskItem.

Definition at line 513 of file QskMenu.cpp.

◆ actions()

QVector< int > QskMenu::actions ( ) const

Definition at line 257 of file QskMenu.cpp.

◆ addOption() [1/3]

int QskMenu::addOption ( const QskLabelData option)

Definition at line 180 of file QskMenu.cpp.

◆ addOption() [2/3]

int QskMenu::addOption ( const QString &  graphicSource,
const QString &  text 
)

Definition at line 170 of file QskMenu.cpp.

◆ addOption() [3/3]

int QskMenu::addOption ( const QUrl &  graphicSource,
const QString &  text 
)

Definition at line 175 of file QskMenu.cpp.

◆ addSeparator()

void QskMenu::addSeparator ( )

Definition at line 247 of file QskMenu.cpp.

◆ cellRect()

QRectF QskMenu::cellRect ( int  index) const

Definition at line 542 of file QskMenu.cpp.

◆ clear

void QskMenu::clear ( )
slot

Definition at line 232 of file QskMenu.cpp.

◆ clipRect()

QRectF QskMenu::clipRect ( ) const
override

Definition at line 99 of file QskMenu.cpp.

◆ currentIndex()

int QskMenu::currentIndex ( ) const

Definition at line 262 of file QskMenu.cpp.

◆ currentText()

QString QskMenu::currentText ( ) const

Definition at line 291 of file QskMenu.cpp.

◆ exec()

int QskMenu::exec ( )

Definition at line 577 of file QskMenu.cpp.

◆ fadingAspect()

QskAspect QskMenu::fadingAspect ( ) const
overridevirtual

Reimplemented from QskPopup.

Definition at line 572 of file QskMenu.cpp.

◆ focusIndicatorRect()

QRectF QskMenu::focusIndicatorRect ( ) const
overridevirtual

Returns the rectangle where to draw the focus indicator

For controls, that implement some sort of internal focus chain ( list boxes, sliders with more handles ... ) the rectangle might change according to the state of the control.

The default implementation return contentsRect()

See also
QskFocusIndicator, focusIndicatorClipRect(), focusIndicatorRectChanged()

Reimplemented from QskControl.

Definition at line 526 of file QskMenu.cpp.

◆ hoverEnterEvent()

void QskMenu::hoverEnterEvent ( QHoverEvent *  event)
overrideprotected

Definition at line 395 of file QskMenu.cpp.

◆ hoverLeaveEvent()

void QskMenu::hoverLeaveEvent ( QHoverEvent *  )
overrideprotected

Definition at line 411 of file QskMenu.cpp.

◆ hoverMoveEvent()

void QskMenu::hoverMoveEvent ( QHoverEvent *  event)
overrideprotected

Definition at line 403 of file QskMenu.cpp.

◆ indexAtPosition()

int QskMenu::indexAtPosition ( const QPointF &  pos) const

Definition at line 550 of file QskMenu.cpp.

◆ isCascading()

bool QskMenu::isCascading ( ) const

Definition at line 127 of file QskMenu.cpp.

◆ isPressed()

bool QskMenu::isPressed ( ) const

Definition at line 558 of file QskMenu.cpp.

◆ isWrapping()

bool QskMenu::isWrapping ( ) const

Definition at line 110 of file QskMenu.cpp.

◆ keyPressEvent()

void QskMenu::keyPressEvent ( QKeyEvent *  event)
overrideprotected

Definition at line 340 of file QskMenu.cpp.

◆ keyReleaseEvent()

void QskMenu::keyReleaseEvent ( QKeyEvent *  )
overrideprotected

Definition at line 381 of file QskMenu.cpp.

◆ mousePressEvent()

void QskMenu::mousePressEvent ( QMouseEvent *  event)
overrideprotected

Definition at line 464 of file QskMenu.cpp.

◆ mouseReleaseEvent()

void QskMenu::mouseReleaseEvent ( QMouseEvent *  event)
overrideprotected

Definition at line 489 of file QskMenu.cpp.

◆ mouseUngrabEvent()

void QskMenu::mouseUngrabEvent ( )
overrideprotected

Definition at line 483 of file QskMenu.cpp.

◆ optionAt()

QskLabelData QskMenu::optionAt ( int  index) const

Definition at line 242 of file QskMenu.cpp.

◆ options()

QVector< QskLabelData > QskMenu::options ( ) const

Definition at line 237 of file QskMenu.cpp.

◆ origin()

QPointF QskMenu::origin ( ) const

Definition at line 155 of file QskMenu.cpp.

◆ resetCascading()

void QskMenu::resetCascading ( )

Definition at line 138 of file QskMenu.cpp.

◆ separators()

QVector< int > QskMenu::separators ( ) const

Definition at line 252 of file QskMenu.cpp.

◆ setCascading()

void QskMenu::setCascading ( bool  on)

Definition at line 132 of file QskMenu.cpp.

◆ setCurrentIndex

void QskMenu::setCurrentIndex ( int  index)
slot

Definition at line 267 of file QskMenu.cpp.

◆ setOptions() [1/2]

void QskMenu::setOptions ( const QStringList &  options)

Definition at line 200 of file QskMenu.cpp.

◆ setOptions() [2/2]

void QskMenu::setOptions ( const QVector< QskLabelData > &  options)

Definition at line 205 of file QskMenu.cpp.

◆ setOrigin()

void QskMenu::setOrigin ( const QPointF &  origin)

Definition at line 146 of file QskMenu.cpp.

◆ setTextOptions()

void QskMenu::setTextOptions ( const QskTextOptions textOptions)

Definition at line 160 of file QskMenu.cpp.

◆ setWrapping()

void QskMenu::setWrapping ( bool  on)

Definition at line 115 of file QskMenu.cpp.

◆ textOptions()

QskTextOptions QskMenu::textOptions ( ) const

Definition at line 165 of file QskMenu.cpp.

◆ trigger()

void QskMenu::trigger ( int  index)
protected

Definition at line 563 of file QskMenu.cpp.

◆ triggeredIndex()

int QskMenu::triggeredIndex ( ) const

Definition at line 296 of file QskMenu.cpp.

◆ triggeredText()

QString QskMenu::triggeredText ( ) const

Definition at line 301 of file QskMenu.cpp.

◆ updateNode()

void QskMenu::updateNode ( QSGNode *  parentNode)
overrideprotectedvirtual

This method replaces the QQuickItem::updatePaintNode method as the preferred paint method to override when subclassing QskControl. This allows QskControl to perform some additional steps before calling updateNode(), and provides a consistent parent node which subclasses can rely on.

The default implementation simply forwards the operation to the skinlet,

Parameters
parentNodeThe parent of the nodes to be added in this method.
Note
Overriding updateNode() might break the themeability and the usual strategy to implement custom painting is to customize or replace the skinlet.
See also
QskSkinlet::updateSubNode()

Reimplemented from QskSkinnable.

Definition at line 317 of file QskMenu.cpp.

◆ updateResources()

void QskMenu::updateResources ( )
overrideprotectedvirtual

Reimplemented from QskControl.

Definition at line 306 of file QskMenu.cpp.

◆ wheelEvent()

void QskMenu::wheelEvent ( QWheelEvent *  event)
overrideprotected

Definition at line 421 of file QskMenu.cpp.

Member Data Documentation

◆ Cursor

const QskAspect::Subcontrol QskMenu::Cursor
static

Definition at line 43 of file QskMenu.h.

◆ Icon

const QskAspect::Subcontrol QskMenu::Icon
static

Definition at line 43 of file QskMenu.h.

◆ Panel

const QskAspect::Subcontrol QskMenu::Panel
static

Definition at line 43 of file QskMenu.h.

◆ Pressed

const QskAspect::State QskMenu::Pressed
static

Definition at line 44 of file QskMenu.h.

◆ Segment

const QskAspect::Subcontrol QskMenu::Segment
static

Definition at line 43 of file QskMenu.h.

◆ Selected

const QskAspect::State QskMenu::Selected
static

Definition at line 44 of file QskMenu.h.

◆ Separator

const QskAspect::Subcontrol QskMenu::Separator
static

Definition at line 43 of file QskMenu.h.

◆ Text

const QskAspect::Subcontrol QskMenu::Text
static

Definition at line 43 of file QskMenu.h.

Property Documentation

◆ cascading

bool QskMenu::cascading
readwrite

Definition at line 23 of file QskMenu.h.

◆ currentIndex

int QskMenu::currentIndex
readwrite

Definition at line 32 of file QskMenu.h.

◆ currentText

QString QskMenu::currentText
read

Definition at line 38 of file QskMenu.h.

◆ options

QVector< QskLabelData > QskMenu::options
readwrite

Definition at line 29 of file QskMenu.h.

◆ origin

QPointF QskMenu::origin
readwrite

Definition at line 20 of file QskMenu.h.

◆ triggeredIndex

int QskMenu::triggeredIndex
read

Definition at line 35 of file QskMenu.h.

◆ triggeredText

QString QskMenu::triggeredText
read

Definition at line 37 of file QskMenu.h.

◆ wrapping

bool QskMenu::wrapping
readwrite

Definition at line 26 of file QskMenu.h.