class MenuItemList; class QAbstractButton; class QAction; class QActionGroup; class QButtonGroup; class QMenu; class QMenuBar; class QPushButton; class QtMenuItem; class QtFrame;
/* *QtMenucanrepresent *(1)thetop-levelmenuofamenubar,inwhichcase'mbMenuBar'istrueand *'mpQMenuBar'referstothecorrespondingQMenuBar *(2)anotherkindofmenu(likeaPopupMenu),inwhichcasethecorrespondingQMenu *objectisinstantiatedandownedbythisQtMenu(heldin'mpOwnedQMenu'). *(3)a"submenu"inanexistingmenu(like(1)),inwhichcasethecorresponding *QMenuobjectisownedbythecorrespondingQtMenuItem. * *For(2)and(3),member'mpQMenu'pointstothecorrespondingQMenuobject.
*/ class QtMenu : public QObject, public SalMenu
{
Q_OBJECT private:
std::vector<QtMenuItem*> maItems;
VclPtr<Menu> mpVCLMenu;
QtMenu* mpParentSalMenu;
QtFrame* mpFrame; bool mbMenuBar;
QMenuBar* mpQMenuBar; // self-created QMenu that this QtMenu represents, if applicable (s. comment for class)
std::unique_ptr<QMenu> mpOwnedQMenu; // pointer to QMenu owned by the corresponding QtMenuItem or self (-> mpOwnedQMenu)
QMenu* mpQMenu;
QButtonGroup* m_pButtonGroup;
// help ID of currently/last selected item static OUString m_sCurrentHelpId;
class QtMenuItem : public SalMenuItem
{ public:
QtMenuItem(const SalItemParams*);
QAction* getAction() const;
QtMenu* mpParentMenu; // The menu into which this menu item is inserted
QtMenu* mpSubMenu; // Submenu of this item (if defined)
std::unique_ptr<QAction> mpAction; // action corresponding to this item
std::unique_ptr<QMenu> mpMenu; // menu corresponding to this item
std::shared_ptr<QActionGroup> mpActionGroup; // empty if it's a separator element
sal_uInt16 mnId; // Item ID
MenuItemType mnType; // Item type bool mbVisible; // Item visibility. bool mbEnabled; // Item active.
Image maImage; // Item image
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.