|
QtCanpool 3.3.0
|
A vertical rail of exclusive, checkable entries. 更多...
#include <qxapp/qxnavigationbar.h>

Public 成员函数 | |
| QxNavigationBar (QWidget *parent=0) | |
| ~QxNavigationBar () override | |
| int | addItem (const QIcon &icon, const QString &text) |
| Appends an entry and returns its index. | |
| void | insertItem (int index, const QIcon &icon, const QString &text) |
| Inserts an entry at the given index, which may also be count(). | |
| void | removeItem (int index) |
| Removes the entry at the given index; no-op when it is out of range. | |
| void | clear () |
| Removes every entry. | |
| int | count () const |
| Number of entries. | |
| int | currentIndex () const |
| Index of the selected entry, or -1 when nothing is selected. | |
| QString | itemText (int index) const |
| QIcon | itemIcon (int index) const |
| bool | isItemEnabled (int index) const |
| QSize | iconSize () const |
| Icon size shared by every entry; 24x24 by default. | |
| QToolButton * | button (int index) const |
| The button behind the given index, for the rare case that needs to tweak something the bar does not expose. | |
| void | setCurrentIndex (int index) |
| Selects the entry at the given index; pass -1 to clear the selection. | |
| void | setItemText (int index, const QString &text) |
| void | setItemIcon (int index, const QIcon &icon) |
| void | setItemEnabled (int index, bool enabled) |
| void | setItemToolTip (int index, const QString &toolTip) |
| void | setIconSize (const QSize &size) |
| void | currentChanged (int index) |
| Emitted when the selection moves: on a click, on an explicit setCurrentIndex(), and also when an entry is inserted or removed in front of the selected one and the index shifts. | |
A vertical rail of exclusive, checkable entries.
It is the navigation half of QxAppShell, which pairs it with a page stack so that selecting an entry brings the matching page to the front. On its own the bar carries no policy: adding the first entry does not select it, and only the caller - or a click - moves the selection.
Entries are addressed by index, and an out-of-range index makes every index-based call a no-op instead of an assertion, so a caller that caches an index cannot crash the bar.
在文件 qxnavigationbar.h 第 36 行定义.
|
explicit |
在文件 qxnavigationbar.cpp 第 94 行定义.
|
override |
在文件 qxnavigationbar.cpp 第 103 行定义.
| int QxApp::QxNavigationBar::addItem | ( | const QIcon & | icon, |
| const QString & | text | ||
| ) |
Appends an entry and returns its index.
在文件 qxnavigationbar.cpp 第 108 行定义.
| QToolButton * QxApp::QxNavigationBar::button | ( | int | index | ) | const |
The button behind the given index, for the rare case that needs to tweak something the bar does not expose.
Null when the index is out of range.
在文件 qxnavigationbar.cpp 第 207 行定义.
| void QxApp::QxNavigationBar::clear | ( | ) |
Removes every entry.
在文件 qxnavigationbar.cpp 第 160 行定义.
| int QxApp::QxNavigationBar::count | ( | ) | const |
Number of entries.
在文件 qxnavigationbar.cpp 第 168 行定义.
| void QxApp::QxNavigationBar::currentChanged | ( | int | index | ) |
Emitted when the selection moves: on a click, on an explicit setCurrentIndex(), and also when an entry is inserted or removed in front of the selected one and the index shifts.
Treat the index as an address into the bar, not as the identity of an entry.
| int QxApp::QxNavigationBar::currentIndex | ( | ) | const |
Index of the selected entry, or -1 when nothing is selected.
在文件 qxnavigationbar.cpp 第 174 行定义.
| QSize QxApp::QxNavigationBar::iconSize | ( | ) | const |
Icon size shared by every entry; 24x24 by default.
在文件 qxnavigationbar.cpp 第 201 行定义.
| void QxApp::QxNavigationBar::insertItem | ( | int | index, |
| const QIcon & | icon, | ||
| const QString & | text | ||
| ) |
Inserts an entry at the given index, which may also be count().
在文件 qxnavigationbar.cpp 第 116 行定义.
| bool QxApp::QxNavigationBar::isItemEnabled | ( | int | index | ) | const |
在文件 qxnavigationbar.cpp 第 194 行定义.
| QIcon QxApp::QxNavigationBar::itemIcon | ( | int | index | ) | const |
在文件 qxnavigationbar.cpp 第 187 行定义.
| QString QxApp::QxNavigationBar::itemText | ( | int | index | ) | const |
在文件 qxnavigationbar.cpp 第 180 行定义.
| void QxApp::QxNavigationBar::removeItem | ( | int | index | ) |
Removes the entry at the given index; no-op when it is out of range.
在文件 qxnavigationbar.cpp 第 142 行定义.
| void QxApp::QxNavigationBar::setCurrentIndex | ( | int | index | ) |
Selects the entry at the given index; pass -1 to clear the selection.
在文件 qxnavigationbar.cpp 第 213 行定义.
| void QxApp::QxNavigationBar::setIconSize | ( | const QSize & | size | ) |
在文件 qxnavigationbar.cpp 第 276 行定义.
| void QxApp::QxNavigationBar::setItemEnabled | ( | int | index, |
| bool | enabled | ||
| ) |
在文件 qxnavigationbar.cpp 第 258 行定义.
| void QxApp::QxNavigationBar::setItemIcon | ( | int | index, |
| const QIcon & | icon | ||
| ) |
在文件 qxnavigationbar.cpp 第 249 行定义.
| void QxApp::QxNavigationBar::setItemText | ( | int | index, |
| const QString & | text | ||
| ) |
在文件 qxnavigationbar.cpp 第 240 行定义.
| void QxApp::QxNavigationBar::setItemToolTip | ( | int | index, |
| const QString & | toolTip | ||
| ) |
在文件 qxnavigationbar.cpp 第 267 行定义.