1#ifndef SARIBBONCATEGORY_H
2#define SARIBBONCATEGORY_H
3#include "SARibbonGlobal.h"
5#include "SARibbonPanel.h"
6#include <QScopedPointer>
71 Q_PROPERTY(
bool isCanCustomize READ isCanCustomize WRITE setCanCustomize)
72 Q_PROPERTY(QString categoryName READ categoryName WRITE setCategoryName)
82 QString categoryName()
const;
85 void setCategoryName(
const QString& title);
100 Q_INVOKABLE
void addPanel(QWidget* panel);
109 SARibbonPanel* panelByObjectName(
const QString& objname)
const;
118 void movePanel(
int from,
int to);
127 bool removePanel(
int index);
130 QList< SARibbonPanel* > panelList()
const;
133 bool isContextCategory()
const;
136 int panelCount()
const;
139 bool isCanCustomize()
const;
141 void setCanCustomize(
bool b);
144 int panelTitleHeight()
const;
146 void setPanelTitleHeight(
int h);
149 bool isEnableShowPanelTitle()
const;
151 void setEnableShowPanelTitle(
bool on);
154 void setCategoryAlignment(SARibbonAlignment al);
156 SARibbonAlignment categoryAlignment()
const;
159 void setPanelSpacing(
int n);
161 int panelSpacing()
const;
164 void setPanelToolButtonIconSize(
const QSize& s);
166 QSize panelToolButtonIconSize()
const;
172 void updateItemGeometry();
175 void setUseAnimatingScroll(
bool useAnimating);
177 bool isUseAnimatingScroll()
const;
180 void setWheelScrollStep(
int step);
182 int wheelScrollStep()
const;
185 void setAnimationDuration(
int duration);
187 int animationDuration()
const;
190 bool isEnableWordWrap()
const;
193 qreal buttonMaximumAspectRatio()
const;
196 bool iteratePanel(FpPanelIterate fp)
const;
198 QSize sizeHint()
const Q_DECL_OVERRIDE;
213 virtual bool event(QEvent* e)
override;
215 void wheelEvent(QWheelEvent* event)
override;
217 void changeEvent(QEvent* event)
override;
220 void markIsContextCategory(
bool isContextCategory =
true);
226 void setEnableWordWrap(
bool on);
229 void setButtonMaximumAspectRatio(qreal fac = 1.4);
SARibbonBar继承于QMenuBar,在SARibbonMainWindow中直接替换了原来的QMenuBar
Definition SARibbonBar.h:94
The SARibbonCategoryLayout class
Definition SARibbonCategoryLayout.h:17
Ribbon控件中的分类选项卡页面(Category)
Definition SARibbonCategory.h:66
void categoryNameChanged(const QString &n)
Category title changed signal/category标题发生了改变信号
void actionTriggered(QAction *action)
Refer to QToolBar::actionTriggered signal/参考QToolBar::actionTriggered的信号
管理上下文标签的类
Definition SARibbonContextCategory.h:11
panel页窗口,panel是ribbon的面板用于承放控件 / Ribbon panel container, used to hold controls
Definition SARibbonPanel.h:93
PanelLayoutMode
Layout mode for the panel / 面板的布局模式
Definition SARibbonPanel.h:109