QtCanpool 3.3.0
载入中...
搜索中...
未找到
QxApp::QxNavigationBar类 参考

A vertical rail of exclusive, checkable entries. 更多...

#include <qxapp/qxnavigationbar.h>

类 QxApp::QxNavigationBar 继承关系图:

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 行定义.

构造及析构函数说明

◆ QxNavigationBar()

QxApp::QxNavigationBar::QxNavigationBar ( QWidget *  parent = 0)
explicit

在文件 qxnavigationbar.cpp 第 94 行定义.

◆ ~QxNavigationBar()

QxApp::QxNavigationBar::~QxNavigationBar ( )
override

在文件 qxnavigationbar.cpp 第 103 行定义.

成员函数说明

◆ addItem()

int QxApp::QxNavigationBar::addItem ( const QIcon &  icon,
const QString &  text 
)

Appends an entry and returns its index.

在文件 qxnavigationbar.cpp 第 108 行定义.

◆ button()

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 行定义.

◆ clear()

void QxApp::QxNavigationBar::clear ( )

Removes every entry.

在文件 qxnavigationbar.cpp 第 160 行定义.

◆ count()

int QxApp::QxNavigationBar::count ( ) const

Number of entries.

在文件 qxnavigationbar.cpp 第 168 行定义.

◆ currentChanged()

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.

◆ currentIndex()

int QxApp::QxNavigationBar::currentIndex ( ) const

Index of the selected entry, or -1 when nothing is selected.

在文件 qxnavigationbar.cpp 第 174 行定义.

◆ iconSize()

QSize QxApp::QxNavigationBar::iconSize ( ) const

Icon size shared by every entry; 24x24 by default.

在文件 qxnavigationbar.cpp 第 201 行定义.

◆ insertItem()

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 行定义.

◆ isItemEnabled()

bool QxApp::QxNavigationBar::isItemEnabled ( int  index) const

在文件 qxnavigationbar.cpp 第 194 行定义.

◆ itemIcon()

QIcon QxApp::QxNavigationBar::itemIcon ( int  index) const

在文件 qxnavigationbar.cpp 第 187 行定义.

◆ itemText()

QString QxApp::QxNavigationBar::itemText ( int  index) const

在文件 qxnavigationbar.cpp 第 180 行定义.

◆ removeItem()

void QxApp::QxNavigationBar::removeItem ( int  index)

Removes the entry at the given index; no-op when it is out of range.

在文件 qxnavigationbar.cpp 第 142 行定义.

◆ setCurrentIndex()

void QxApp::QxNavigationBar::setCurrentIndex ( int  index)

Selects the entry at the given index; pass -1 to clear the selection.

在文件 qxnavigationbar.cpp 第 213 行定义.

◆ setIconSize()

void QxApp::QxNavigationBar::setIconSize ( const QSize &  size)

在文件 qxnavigationbar.cpp 第 276 行定义.

◆ setItemEnabled()

void QxApp::QxNavigationBar::setItemEnabled ( int  index,
bool  enabled 
)

在文件 qxnavigationbar.cpp 第 258 行定义.

◆ setItemIcon()

void QxApp::QxNavigationBar::setItemIcon ( int  index,
const QIcon &  icon 
)

在文件 qxnavigationbar.cpp 第 249 行定义.

◆ setItemText()

void QxApp::QxNavigationBar::setItemText ( int  index,
const QString &  text 
)

在文件 qxnavigationbar.cpp 第 240 行定义.

◆ setItemToolTip()

void QxApp::QxNavigationBar::setItemToolTip ( int  index,
const QString &  toolTip 
)

在文件 qxnavigationbar.cpp 第 267 行定义.


该类的文档由以下文件生成: