1#ifndef SARIBBONGALLERY_H
2#define SARIBBONGALLERY_H
3#include "SARibbonGlobal.h"
7#include "SARibbonGalleryGroup.h"
69 static void setGalleryButtonMaximumWidth(
int w);
86 virtual void pageUp();
88 virtual void pageDown();
90 virtual void showMoreDetail();
92 void onItemClicked(
const QModelIndex& index);
93 virtual void onTriggered(QAction* action);
99 void resizeEvent(QResizeEvent* event)
override;
113 void addWidget(QWidget* w,
const QString& title);
119 QList< SARibbonGalleryGroup* > galleryGroupList()
const;
121 int galleryHeight()
const;
128 bool eventFilter(QObject* o, QEvent* e)
override;
129 void showEvent(QShowEvent* e)
override;
130 void hideEvent(QHideEvent* e)
override;
131 void resizeEvent(QResizeEvent* e)
override;
134 QWidget* m_contentWidget {
nullptr };
135 QVBoxLayout* m_layout;
136 QMap< QWidget*, QLabel* > m_widgetToTitleLabel;
137 QSizeGrip* m_sizeGrip;
Gallery的组
Definition SARibbonGalleryGroup.h:60
SARibbonGallery的Viewport class
Definition SARibbonGallery.h:106
void addWidget(QWidget *w)
添加窗口不带标题
Definition SARibbonGallery.cpp:178
QLabel * titleLabel(QWidget *w)
通过SARibbonGalleryGroup获取对应的标题,用户可以通过此函数设置QLabel的属性
Definition SARibbonGallery.cpp:227
int heightHintForWidth(int w) const
根据宽度计算高度推荐值
Definition SARibbonGallery.cpp:276
void removeWidget(QWidget *w)
移除窗口
Definition SARibbonGallery.cpp:236
void onTitleChanged(QWidget *w, const QString &title)
widget的标题改变
Definition SARibbonGallery.cpp:302
Gallery控件
Definition SARibbonGallery.h:48
void hovered(QAction *action)
转发管理的SARibbonGalleryGroup::hovered
void triggered(QAction *action)
转发管理的SARibbonGalleryGroup::triggered 所有加入SARibbonGallery的action都会被一个QActionGroup管理,...