The QWinThumbnailToolBar class allows manipulating the thumbnail toolbar of a window. 更多...
| 頭: | #include <QWinThumbnailToolBar> |
| qmake: | QT += winextras |
| Since: | Qt 5.2 |
| 繼承: | QObject |
|
|
| QWinThumbnailToolBar (QObject * parent = nullptr) | |
| virtual | ~QWinThumbnailToolBar () |
| void | addButton (QWinThumbnailToolButton * button ) |
| QList<QWinThumbnailToolButton *> | buttons () const |
| int | count () const |
| QPixmap | iconicLivePreviewPixmap () const |
| bool | iconicPixmapNotificationsEnabled () const |
| QPixmap | iconicThumbnailPixmap () const |
| void | removeButton (QWinThumbnailToolButton * button ) |
| void | setButtons (const QList<QWinThumbnailToolButton *> & buttons ) |
| void | setIconicPixmapNotificationsEnabled (bool enabled ) |
| void | setWindow (QWindow * window ) |
| QWindow * | window () const |
| void | clear () |
| void | setIconicLivePreviewPixmap ( const QPixmap & ) |
| void | setIconicThumbnailPixmap ( const QPixmap & ) |
| void | iconicLivePreviewPixmapRequested () |
| void | iconicThumbnailPixmapRequested () |
| const QMetaObject | staticMetaObject |
The QWinThumbnailToolBar class allows manipulating the thumbnail toolbar of a window.
應用程序可以將工具欄嵌入窗口縮略圖,會展示工具欄當鼠標懸停任務欄圖標時。縮略工具欄可以提供窗口命令的快速訪問,無需要求用戶還原或激活窗口。
The following example code illustrates how to use the functions in the QWinThumbnailToolBar and QWinThumbnailToolButton 類以實現縮略圖工具欄:
QWinThumbnailToolBar *thumbbar = new QWinThumbnailToolBar(widget);
thumbbar->setWindow(widget->windowHandle());
QWinThumbnailToolButton *settings = new QWinThumbnailToolButton(thumbbar);
settings->setToolTip("Settings");
settings->setIcon(":/settings.png");
settings->setDismissOnClick(true);
connect(settings, SIGNAL(clicked()), settingsPage, SLOT(show()));
QWinThumbnailToolButton *playPause = new QWinThumbnailToolButton(thumbbar);
playPause->setToolTip("Play/Pause");
playPause->setIcon(":/play.png");
connect(playPause, SIGNAL(clicked()), mediaPlayer, SLOT(play()));
thumbbar->addButton(settings);
thumbbar->addButton(playPause);
另請參閱 QWinThumbnailToolButton .
This property holds the number of buttons in the thumbnail toolbar
注意:
The number of buttons is limited to
7
.
訪問函數:
| int | count () const |
This property holds the pixmap for use as a live (peek) preview when tabbing into the application
該特性在 Qt 5.4 引入。
訪問函數:
| QPixmap | iconicLivePreviewPixmap () const |
| void | setIconicLivePreviewPixmap ( const QPixmap & ) |
This property holds whether signals iconicThumbnailPixmapRequested () 和 iconicLivePreviewPixmapRequested () will be emitted
該特性在 Qt 5.4 引入。
訪問函數:
| bool | iconicPixmapNotificationsEnabled () const |
| void | setIconicPixmapNotificationsEnabled (bool enabled ) |
另請參閱 QWinThumbnailToolBar::iconicThumbnailPixmap and QWinThumbnailToolBar::iconicLivePreviewPixmap .
This property holds the pixmap for use as a thumbnail representation
該特性在 Qt 5.4 引入。
訪問函數:
| QPixmap | iconicThumbnailPixmap () const |
| void | setIconicThumbnailPixmap ( const QPixmap & ) |
另請參閱 QWinThumbnailToolBar::iconicPixmapNotificationsEnabled .
This property holds the window whose thumbnail toolbar is manipulated
訪問函數:
| QWindow * | window () const |
| void | setWindow (QWindow * window ) |
構造 QWinThumbnailToolBar 采用指定 parent .
若 parent 是實例 QWindow , it is automatically assigned as the thumbnail toolbar's window .
[虛擬]
QWinThumbnailToolBar::
~QWinThumbnailToolBar
()
Destroys and clears the QWinThumbnailToolBar .
添加 button to the thumbnail toolbar.
注意:
The number of buttons is limited to
7
.
Returns the list of buttons in the thumbnail toolbar.
另請參閱 setButtons ().
[slot]
void
QWinThumbnailToolBar::
clear
()
Removes all buttons from the thumbnail toolbar.
[signal]
void
QWinThumbnailToolBar::
iconicLivePreviewPixmapRequested
()
This signal is emitted when the operating system requests a new iconic live preview pixmap, typically when the user ALT-tabs to the application.
該函數在 Qt 5.4 引入。
另請參閱 iconicLivePreviewPixmap .
[signal]
void
QWinThumbnailToolBar::
iconicThumbnailPixmapRequested
()
This signal is emitted when the operating system requests a new iconic thumbnail pixmap, typically when the thumbnail is shown.
該函數在 Qt 5.4 引入。
另請參閱 iconicThumbnailPixmap .
移除 button from the thumbnail toolbar.
Sets the list of buttons in the thumbnail toolbar.
注意: 任何現有按鈕會被替換。
另請參閱 buttons ().