The class QtxMenu represents the popup menu with the title. More...
#include <QtxMenu.h>

Data Structures | |
| class | Title |
| Popup menu title item. More... | |
Public Types | |
| enum | TitleMode { TitleAuto, TitleOn, TitleOff } |
Popup menu title mode. More... | |
Public Slots | |
| virtual void | setVisible (bool) |
| Customize show/hide menu operation. | |
Public Member Functions | |
| QtxMenu (QWidget *=0) | |
| Constructor. | |
| virtual | ~QtxMenu () |
| Destructor. | |
| QIcon | titleIcon () const |
| Get title icon. | |
| QString | titleText () const |
| Get title menu text. | |
| TitleMode | titleMode () const |
| Get title item display mode. | |
| Qt::Alignment | titleAlignment () const |
| Get title alignment flags. | |
| virtual void | setTitleIcon (const QIcon &) |
| Set title icon. | |
| virtual void | setTitleText (const QString &) |
| Set title menu text. | |
| virtual void | setTitleMode (const TitleMode) |
| Set title item display mode. | |
| virtual void | setTitleAlignment (const Qt::Alignment) |
| Set title alignment flags. | |
Private Member Functions | |
| void | updateTitle () |
| Update title item. | |
| void | insertTitle () |
| Insert title item to the popup menu. | |
| void | removeTitle () |
| Remove title item from the popup menu. | |
Private Attributes | |
| TitleMode | myMode |
| Title * | myTitle |
| QWidgetAction * | myAction |
The title for the popup menu can be set via setTitleText() method. In addition, title item can contain the icon, which can be set using setTitleIcon() method. Current title text and icon can be retrieved with titleText() and titleIcon() methods.
The title text alignment flags can be changed using setTitleAlignment() method and retrieved with titleAlignment() method.
By default, QtxMenu.TitleAuto mode is used. In this mode, the title item is shown only if it is not empty. To show title always (even empty), pass QtxMenu.TitleOn to the setTitleMode() method. To hide the title, use setTitleMode() method with QtxMenu.TitleOff parameter.
| enum QtxMenu::TitleMode |
| QtxMenu::QtxMenu | ( | QWidget * | parent = 0 | ) |
| QtxMenu::~QtxMenu | ( | ) | [virtual] |
| QIcon QtxMenu::titleIcon | ( | ) | const |
References QtxMenu.Title.icon(), and myTitle.
| QString QtxMenu::titleText | ( | ) | const |
References myTitle, and QtxMenu.Title.text().
| QtxMenu::TitleMode QtxMenu::titleMode | ( | ) | const |
References myMode.
| Qt::Alignment QtxMenu::titleAlignment | ( | ) | const |
References QtxMenu.Title.alignment(), and myTitle.
| void QtxMenu::setTitleIcon | ( | const QIcon & | ico | ) | [virtual] |
| ico | title item icon |
References myTitle, QtxMenu.Title.setIcon(), and updateTitle().
| void QtxMenu::setTitleText | ( | const QString & | txt | ) | [virtual] |
| txt | menu text to be used for the title item |
References myTitle, QtxMenu.Title.setText(), titleText(), and updateTitle().
| void QtxMenu::setTitleMode | ( | const TitleMode | m | ) | [virtual] |
| m | popup menu title display mode (QtxMenu.TitleMode) |
References myMode, and updateTitle().
| void QtxMenu::setTitleAlignment | ( | const Qt::Alignment | a | ) | [virtual] |
| a | title alignment flags |
References myTitle, QtxMenu.Title.setAlignment(), titleAlignment(), and updateTitle().
| void QtxMenu::setVisible | ( | bool | on | ) | [virtual, slot] |
| on | new popup menu visibility state |
References insertTitle(), and removeTitle().
| void QtxMenu::updateTitle | ( | ) | [private] |
References insertTitle(), myAction, and removeTitle().
| void QtxMenu::insertTitle | ( | ) | [private] |
References myAction, TitleAuto, titleMode(), TitleOff, and titleText().
| void QtxMenu::removeTitle | ( | ) | [private] |
References myAction.
TitleMode QtxMenu.myMode [private] |
Title* QtxMenu.myTitle [private] |
QWidgetAction* QtxMenu.myAction [private] |