|
DtkWidget
DTK Widget module
|
Public 槽 | |
| void | setCurrentIndex (int index) |
| 设置当前标签索引位置. | |
| void | setVisibleAddButton (bool visibleAddButton) |
| 设置新建标签按钮是否显示. | |
| void | setStartDragDistance (int startDragDistance) |
| 设置开始拖动距离. | |
| void | setMaskColor (QColor maskColor) |
| 设置颜色. | |
| void | setFlashColor (QColor flashColor) |
| void | startDrag (int index) |
| void | stopDrag (Qt::DropAction action) |
信号 | |
| void | currentChanged (int index) |
| 当前索引位置改变. | |
| void | tabCloseRequested (int index) |
| 点击关闭后发出. | |
| void | tabMoved (int from, int to) |
| 索引位置发生变化 | |
| void | tabIsInserted (int index) |
| 新标签已插入. | |
| void | tabIsRemoved (int index) |
| 标签已删除. | |
| void | tabBarClicked (int index) |
| 点击索引标签. | |
| void | tabBarDoubleClicked (int index) |
| 双击索引标签. | |
| void | tabAddRequested () |
| 新标签加入. | |
| void | tabReleaseRequested (int index) |
| 索引标签鼠标释放. | |
| void | tabDroped (int index, Qt::DropAction action, QObject *target) |
| 标签拖放. | |
| void | dragActionChanged (Qt::DropAction action) |
| 鼠标形状发生变化. | |
| void | dragStarted () |
| 开始拖起. | |
| void | dragEnd (Qt::DropAction action) |
| 拖放结束. | |
Public 成员函数 | |
| DTabBar (QWidget *parent=0) | |
| void | setTabMinimumSize (int index, const QSize &size) |
| 设置索引标签的最小尺寸. | |
| void | setTabMaximumSize (int index, const QSize &size) |
| 设置索引标签的最大尺寸. | |
| bool | visibleAddButton () const |
| 新建标签栏按钮是否可见. | |
| QTabBar::Shape | shape () const |
| 标签栏形状. | |
| void | setShape (QTabBar::Shape shape) |
| 设置标签栏形状. | |
| int | addTab (const QString &text) |
| 添加一个新的标签,返回新标签的索引. | |
| int | addTab (const QIcon &icon, const QString &text) |
| 添加一个新的标签,包含图标、文本. | |
| int | insertTab (int index, const QString &text) |
| 插入一个文本标签. | |
| int | insertTab (int index, const QIcon &icon, const QString &text) |
| 插入一个图标文本标签. | |
| void | removeTab (int index) |
| 移除标签索引位置 | |
| void | moveTab (int from, int to) |
| 移动标签索引位置 | |
| bool | isTabEnabled (int index) const |
| 是否启用标签索引位置 | |
| void | setTabEnabled (int index, bool) |
| 设置标签索引位置启用状态 | |
| QString | tabText (int index) const |
| 返回标签索引位置文本. | |
| void | setTabText (int index, const QString &text) |
| 设置标签索引位置文本. | |
| QIcon | tabIcon (int index) const |
| 返回标签索引位置图标. | |
| void | setTabIcon (int index, const QIcon &icon) |
| 设置标签索引位置图标. | |
| Qt::TextElideMode | elideMode () const |
| 缩略模式. | |
| void | setElideMode (Qt::TextElideMode mode) |
| 设置缩略模式 | |
| void | setTabToolTip (int index, const QString &tip) |
| 设置标签索引位置提示文本. | |
| QString | tabToolTip (int index) const |
| 返回标签索引位置提示文本. | |
| void | setTabWhatsThis (int index, const QString &text) |
| QString | tabWhatsThis (int index) const |
| void | setTabData (int index, const QVariant &data) |
| 设置标签索引位置数据. | |
| QVariant | tabData (int index) const |
| 返回标签索引位置数据. | |
| QRect | tabRect (int index) const |
| 返回标签索引位置矩形. | |
| int | tabAt (const QPoint &pos) const |
| 根据位置返回标签索引位置. | |
| int | currentIndex () const |
| 当前的标签索引位置. | |
| int | count () const |
| 标签总数. | |
| void | setDrawBase (bool drawTheBase) |
| bool | drawBase () const |
| QSize | iconSize () const |
| 图标大小. | |
| void | setIconSize (const QSize &size) |
| 设置图标大小. | |
| bool | usesScrollButtons () const |
| void | setUsesScrollButtons (bool useButtons) |
| bool | tabsClosable () const |
| 标签栏是否可关闭. | |
| void | setTabsClosable (bool closable) |
| 设置标签栏是否可关闭. | |
| void | setTabButton (int index, QTabBar::ButtonPosition position, QWidget *widget) |
| QWidget * | tabButton (int index, QTabBar::ButtonPosition position) const |
| QTabBar::SelectionBehavior | selectionBehaviorOnRemove () const |
| void | setSelectionBehaviorOnRemove (QTabBar::SelectionBehavior behavior) |
| bool | expanding () const |
| void | setExpanding (bool enabled) |
| bool | isMovable () const |
| void | setMovable (bool movable) |
| bool | isDragable () const |
| void | setDragable (bool dragable) |
| bool | documentMode () const |
| void | setDocumentMode (bool set) |
| bool | autoHide () const |
| void | setAutoHide (bool hide) |
| bool | changeCurrentOnDrag () const |
| void | setChangeCurrentOnDrag (bool change) |
| int | startDragDistance () const |
| QColor | maskColor () const |
| QColor | flashColor () const |
| QWindow * | dragIconWindow () const |
| void | setEnabledEmbedStyle (bool enable) |
| 启用直角样式的 Tabbar. 此风格适用于切换窗口的操作,多用于支持多开的应用. | |
| void | setTabLabelAlignment (Qt::Alignment alignment) |
| 设置 tab 标签文字对齐方式. | |
友元 | |
| class | DTabBarPrivate |
| int DTabBar::addTab | ( | const QIcon & | icon, |
| const QString & | text | ||
| ) |
添加一个新的标签,包含图标、文本.
| [in] | icon | 新标签的标题图标 |
| [in] | text | 新标签的标题文本. |
| int DTabBar::addTab | ( | const QString & | text | ) |
添加一个新的标签,返回新标签的索引.
| [in] | text | 新标签的标题文本. |
| int DTabBar::count | ( | ) | const |
标签总数.
|
signal |
当前索引位置改变.
| [in] | index | 改变的索引值. |
| int DTabBar::currentIndex | ( | ) | const |
当前的标签索引位置.
|
signal |
鼠标形状发生变化.
| [in] | action | 改变的拖拽动作. |
|
signal |
拖放结束.
| [in] | action | 拖放动作. |
| Qt::TextElideMode DTabBar::elideMode | ( | ) | const |
缩略模式.
| QSize DTabBar::iconSize | ( | ) | const |
图标大小.
| int DTabBar::insertTab | ( | int | index, |
| const QIcon & | icon, | ||
| const QString & | text | ||
| ) |
插入一个图标文本标签.
| [in] | index | 被插入的标签索引值 |
| [in] | icon | 新标签的图标 |
| [in] | text | 新标签文本 |
| int DTabBar::insertTab | ( | int | index, |
| const QString & | text | ||
| ) |
插入一个文本标签.
| [in] | index | 被插入的标签索引值 |
| [in] | text | 新标签的标题文本. |
| bool DTabBar::isTabEnabled | ( | int | index | ) | const |
是否启用标签索引位置
| [in] | index | 标签索引值. |
| void DTabBar::moveTab | ( | int | from, |
| int | to | ||
| ) |
移动标签索引位置
| [in] | from | 被移动前的标签索引 |
| [in] | to | 被移动后的标签索引. |
| void DTabBar::removeTab | ( | int | index | ) |
移除标签索引位置
| [in] | index | 被移除的标签索引值. |
|
slot |
设置当前标签索引位置.
| [in] | index | 标签索引. |
| void DTabBar::setElideMode | ( | Qt::TextElideMode | mode | ) |
设置缩略模式
| [in] | mode | 文本缩略模式. |
| void DTabBar::setEnabledEmbedStyle | ( | bool | enable | ) |
启用直角样式的 Tabbar. 此风格适用于切换窗口的操作,多用于支持多开的应用.
| [in] | enable | true 启用直角样式的Tabbar,false 关闭直角样式 |
| void DTabBar::setIconSize | ( | const QSize & | size | ) |
设置图标大小.
| [in] | size | 图标大小. |
|
slot |
设置颜色.
| [in] | maskColor | 遮罩颜色. |
| void DTabBar::setShape | ( | QTabBar::Shape | shape | ) |
设置标签栏形状.
| [in] | shape | 标签栏形状. |
|
slot |
设置开始拖动距离.
| [in] | startDragDistance | 开始拖动的距离. |
| void DTabBar::setTabData | ( | int | index, |
| const QVariant & | data | ||
| ) |
设置标签索引位置数据.
| [in] | index | 标签索引 |
| [in] | data | 标签数据. |
| void DTabBar::setTabEnabled | ( | int | index, |
| bool | enable | ||
| ) |
设置标签索引位置启用状态
| [in] | index | 标签索引 |
| [in] | enable | 是否启用. |
| void DTabBar::setTabIcon | ( | int | index, |
| const QIcon & | icon | ||
| ) |
设置标签索引位置图标.
| [in] | index | 标签索引 |
| [in] | icon | 对应的标签图标. |
| void DTabBar::setTabLabelAlignment | ( | Qt::Alignment | alignment | ) |
设置 tab 标签文字对齐方式.
| [in] | alignment | 对齐方式. |
| void DTabBar::setTabMaximumSize | ( | int | index, |
| const QSize & | size | ||
| ) |
设置索引标签的最大尺寸.
| [in] | index | 被设置标签的索引值 |
| [in] | size | size的最大大小. |
| void DTabBar::setTabMinimumSize | ( | int | index, |
| const QSize & | size | ||
| ) |
设置索引标签的最小尺寸.
| [in] | index | 被设置标签的索引值 |
| [in] | size | size的最小大小. |
| void DTabBar::setTabsClosable | ( | bool | closable | ) |
设置标签栏是否可关闭.
| [in] | closable | 标签是否可关闭. |
| void DTabBar::setTabText | ( | int | index, |
| const QString & | text | ||
| ) |
设置标签索引位置文本.
| [in] | index | 标签索引 |
| [in] | text | 标签文本. |
| void DTabBar::setTabToolTip | ( | int | index, |
| const QString & | tip | ||
| ) |
设置标签索引位置提示文本.
| [in] | index | 标签索引 |
| [in] | tip | 提示文本. |
|
slot |
设置新建标签按钮是否显示.
| [in] | visibleAddButton | 新建按钮是否可视. |
| QTabBar::Shape DTabBar::shape | ( | ) | const |
标签栏形状.
| int DTabBar::tabAt | ( | const QPoint & | pos | ) | const |
根据位置返回标签索引位置.
| [in] | pos | 对应标签坐标,可以时标签内的任意坐标. |
|
signal |
点击索引标签.
| [in] | index | 点击标签的索引值. |
|
signal |
双击索引标签.
| [in] | index | 双击标记的索引值. |
|
signal |
点击关闭后发出.
| [in] | index | 关闭的索引值. |
| QVariant DTabBar::tabData | ( | int | index | ) | const |
返回标签索引位置数据.
| [in] | index | 标签索引. |
|
signal |
标签拖放.
| [in] | index | 拖放的标签索引 |
| [in] | action | 拖放的动作 |
| [in] | target | 被拖拽的 DTabBar 实例 |
| QIcon DTabBar::tabIcon | ( | int | index | ) | const |
返回标签索引位置图标.
| [in] | index | 标签索引. |
|
signal |
新标签已插入.
| [in] | index | 被插入标签的索引值. |
|
signal |
标签已删除.
| [in] | index | 被删除标签的索引值. |
|
signal |
索引位置发生变化
| [in] | from | 索引位置变化的初始值 |
| [in] | to | 位置变化后的索引值. |
| QRect DTabBar::tabRect | ( | int | index | ) | const |
返回标签索引位置矩形.
| [in] | index | 标签索引. |
|
signal |
索引标签鼠标释放.
| [in] | index | 标签释放的索引值. |
| bool DTabBar::tabsClosable | ( | ) | const |
标签栏是否可关闭.
| QString DTabBar::tabText | ( | int | index | ) | const |
返回标签索引位置文本.
| [in] | index | 标签索引. |
| QString DTabBar::tabToolTip | ( | int | index | ) | const |
返回标签索引位置提示文本.
| [in] | index | 标签索引. |
| bool DTabBar::visibleAddButton | ( | ) | const |
新建标签栏按钮是否可见.