1#ifndef SARIBBONGALLERY_H
2#define SARIBBONGALLERY_H
3#include "SARibbonGlobal.h"
7#include "SARibbonGalleryGroup.h"
103 static void setGalleryButtonMaximumWidth(
int w);
105 void setSingleRowMode(
bool on);
107 bool isSingleRowMode()
const;
140 virtual void pageUp();
142 virtual void pageDown();
144 virtual void showMoreDetail();
147 void onItemClicked(
const QModelIndex& index);
149 virtual void onTriggered(QAction* action);
156 void resizeEvent(QResizeEvent* event)
override;
158 void changeEvent(QEvent* event)
override;
178 void addWidget(QWidget* w,
const QString& title);
184 QList< SARibbonGalleryGroup* > galleryGroupList()
const;
186 int galleryHeight()
const;
193 bool eventFilter(QObject* o, QEvent* e)
override;
194 void showEvent(QShowEvent* e)
override;
195 void hideEvent(QHideEvent* e)
override;
199 QWidget* m_contentWidget {
nullptr };
200 QVBoxLayout* m_layout;
201 QMap< QWidget*, QLabel* > m_widgetToTitleLabel;
202 QSizeGrip* m_sizeGrip;
Definition SARibbonGalleryGroup.h:100
Definition SARibbonGallery.h:171
void addWidget(QWidget *w)
添加窗口不带标题
Definition SARibbonGallery.cpp:182
QLabel * titleLabel(QWidget *w)
通过SARibbonGalleryGroup获取对应的标题,用户可以通过此函数设置QLabel的属性
Definition SARibbonGallery.cpp:231
int heightHintForWidth(int w) const
根据宽度计算高度推荐值
Definition SARibbonGallery.cpp:280
void resizeEvent(QResizeEvent *e) override
Definition SARibbonGallery.cpp:351
void removeWidget(QWidget *w)
移除窗口
Definition SARibbonGallery.cpp:240
void onTitleChanged(QWidget *w, const QString &title)
widget的标题改变
Definition SARibbonGallery.cpp:305
Definition SARibbonGallery.h:80
void hovered(QAction *action)
void triggered(QAction *action)