14class RibbonGalleryGroupPrivate;
46 void setRecalcGridSizeBlock(
bool on =
true);
47 bool isRecalcGridSizeBlock()
const;
48 void recalcGridSize();
49 void recalcGridSize(
int galleryHeight);
51 void setGalleryGroupStyle(GalleryGroupStyle style);
52 GalleryGroupStyle galleryGroupStyle()
const;
54 void addItem(
const QString &
text,
const QIcon &icon);
55 void addItem(QAction *act);
56 void addItems(
const QList<QAction *> &acts);
58 void setGroupTitle(
const QString &title);
59 QString groupTitle()
const;
61 void selectByIndex(
int i);
63 void setDisplayRow(DisplayRow r);
64 DisplayRow displayRow()
const;
66 void setGridMinimumWidth(
int w);
67 int gridMinimumWidth()
const;
69 void setGridMaximumWidth(
int w);
70 int gridMaximumWidth()
const;
72 QSize sizeHint()
const override;
74 QActionGroup *actionGroup()
const;
76 void onItemClicked(
const QModelIndex &index);
77 void onItemEntered(
const QModelIndex &index);
DisplayRow
定义Gallery在一个group下面显示的图标行数
void triggered(QAction *action)
等同QActionGroup的triggered 所有加入RibbonGalleryGroup的action都会被一个QActionGroup管理,可以通过
void hovered(QAction *action)
等同QActionGroup的hovered 所有加入RibbonGalleryGroup的action都会被一个QActionGroup管理,可以通过
GalleryGroupStyle
GalleryGroup显示的样式
@ IconWithWordWrapText
图标带文字,文字会换行显示,此模式只会对DisplayOneRow生效,如果不是DisplayOneRow,等同IconWithText
void groupTitleChanged(const QString &title)
#define QX_DECLARE_PRIVATE(Class)
#define Q_NULLPTR
Copyleft (C) 2025 maminjie canpool@163.com SPDX-License-Identifier: MulanPSL-2.0
#define QX_RIBBON_END_NAMESPACE
#define QX_RIBBON_BEGIN_NAMESPACE