kdk::KCrumb(3)

NAME
kdk::KCrumb - 面包屑控件

SYNOPSIS

#include <kcrumb.h>

Inherits KCustomTabBar.

  Public Slots
void leftScroll ()
void rightScroll ()
Public Slots inherited from KCustomTabBar
void setCurrentIndex (int index)
void leftScrollTabs ()
void rightScrollTabs ()
void closeTab ()

  Public Member Functions
KCrumb (QWidget *parent=nullptr)
int addTab (const QString &text)
添加tab
int addTab (const QIcon &icon, const QString &text)
添加tab
int insertTab (int index, const QString &text)
在index位置插入tab
int insertTab (int index, const QIcon &icon, const QString &text)
在index位置插入tab
void removeTab (int index)
删除index位置的tab
void moveTab (int from, int to)
将from位置tab移至to位置
void setIcon (const QIcon &icon)
设置图标
QIcon icon () const
获取图标
bool isFlat () const
返回按钮边框是否凸起
void setFlat (bool flat)
设置按钮边框是否凸起
Public Member Functions inherited from KCustomTabBar
KCustomTabBar (QWidget *parent=nullptr)
Shape shape () const
void setShape (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)
void setTabContent (int index, const QString &text)
QColor tabTextColor (int index) const
void setTabTextColor (int index, const QColor &color)
QIcon tabIcon (int index) const
void setTabIcon (int index, const QIcon &icon)
Qt::TextElideMode elideMode () const
void setElideMode (Qt::TextElideMode)
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
QSize sizeHint () const override
QSize minimumSizeHint () const override
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, ButtonPosition position, QWidget *widget)
QWidget * tabButton (int index, ButtonPosition position) const
SelectionBehavior selectionBehaviorOnRemove () const
void setSelectionBehaviorOnRemove (SelectionBehavior behavior)
bool expanding () const
void setExpanding (bool enabled)
bool isMovable () const
void setMovable (bool movable)
bool documentMode () const
void setDocumentMode (bool set)
bool autoHide () const
void setAutoHide (bool hide)
bool changeCurrentOnDrag () const
void setChangeCurrentOnDrag (bool change)
QString accessibleTabName (int index) const
void setAccessibleTabName (int index, const QString &name)

  Protected Member Functions
QSize tabSizeHint (int index) const
void paintEvent (QPaintEvent *event)
Protected Member Functions inherited from KCustomTabBar
virtual QSize minimumTabSizeHint (int index) const
virtual void tabInserted (int index)
virtual void tabRemoved (int index)
virtual void tabLayoutChange ()
bool event (QEvent *) override
void resizeEvent (QResizeEvent *) override
void showEvent (QShowEvent *) override
void hideEvent (QHideEvent *) override
void paintEvent (QPaintEvent *) override
void mousePressEvent (QMouseEvent *) override
void mouseMoveEvent (QMouseEvent *) override
void mouseReleaseEvent (QMouseEvent *) override
void wheelEvent (QWheelEvent *event) override
void keyPressEvent (QKeyEvent *) override
void changeEvent (QEvent *) override
void timerEvent (QTimerEvent *event) override
void initStyleOption (QStyleOptionTab *option, int tabIndex) const

  Additional Inherited Members
Public Types inherited from KCustomTabBar
enum Shape { RoundedNorth, RoundedSouth, RoundedWest, RoundedEast, TriangularNorth, TriangularSouth, TriangularWest, TriangularEast }
enum ButtonPosition { LeftSide, RightSide }
enum SelectionBehavior { SelectLeftTab, SelectRightTab, SelectPreviousTab }
Signals inherited from KCustomTabBar
void currentChanged (int index)
void tabCloseRequested (int index)
void tabMoved (int from, int to)
void tabBarClicked (int index)
void tabBarDoubleClicked (int index)
void leftBStatus (bool flag)
void rightBStatus (bool flag)
Properties inherited from KCustomTabBar
Shape shape
int currentIndex
int count
bool drawBase
QSize iconSize
Qt::TextElideMode elideMode
bool usesScrollButtons
bool tabsClosable
SelectionBehavior selectionBehaviorOnRemove
bool expanding
bool movable
bool documentMode
bool autoHide
bool changeCurrentOnDrag

Detailed Description

面包屑控件

Member Function Documentation

  int kdk::KCrumb::addTab (const QIcon & icon, const QString & text)

添加tab

Parameters
    icon
    text

Returns

  int kdk::KCrumb::addTab (const QString & text)

添加tab

Parameters
    text

Returns

  QIcon kdk::KCrumb::icon () const

获取图标

Returns

  int kdk::KCrumb::insertTab (int index, const QIcon & icon, const QString & text)

在index位置插入tab

Parameters
    index
    icon
    text

Returns

  int kdk::KCrumb::insertTab (int index, const QString & text)

在index位置插入tab

Parameters
    index
    text

Returns

  bool kdk::KCrumb::isFlat () const

返回按钮边框是否凸起

Returns

  void kdk::KCrumb::moveTab (int from, int to)

将from位置tab移至to位置

Parameters
    from
    to

  void kdk::KCrumb::removeTab (int index)

删除index位置的tab

Parameters
    index

  void kdk::KCrumb::setFlat (bool flat)

设置按钮边框是否凸起

Parameters
    flat

  void kdk::KCrumb::setIcon (const QIcon & icon)

设置图标

Parameters
    icon

  QSize kdk::KCrumb::tabSizeHint (int index) const [protected], [virtual]

Reimplemented from KCustomTabBar.

Author

Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code.