34 QWidget* parent =
nullptr,
35 Qt::WindowFlags f = Qt::WindowFlags());
38 QWidget* parent =
nullptr,
39 Qt::WindowFlags f = Qt::WindowFlags());
56 LevelRole = Qt::UserRole + 1,
57 PointerRole = Qt::UserRole + 2,
58 CanCustomizeRole = Qt::UserRole + 3,
59 CustomizeRole = Qt::UserRole + 4,
60 CustomizeObjNameRole = Qt::UserRole + 5
67 bool isApplied()
const;
70 bool isCached()
const;
73 const QStandardItemModel* model()
const;
79 void updateModel(RibbonTreeShowType type);
85 bool toXml(QXmlStreamWriter* xml)
const;
86 bool toXml(
const QString& xmlpath)
const;
89 void fromXml(QXmlStreamReader* xml);
90 void fromXml(
const QString& xmlpath);
96 void makeActionsApplied();
111 QAction* selectedAction()
const;
112 QAction* itemToAction(QStandardItem* item)
const;
114 QStandardItem* selectedItem()
const;
117 int selectedRibbonLevel()
const;
120 int itemLevel(QStandardItem* item)
const;
123 void setSelectItem(QStandardItem* item,
bool ensureVisible =
true);
126 bool isItemCanCustomize(QStandardItem* item)
const;
127 bool isSelectedItemCanCustomize()
const;
130 bool isCustomizeItem(QStandardItem* item)
const;
131 bool isSelectedItemIsCustomize()
const;
134 void removeItem(QStandardItem* item);
137 void onComboBoxActionIndexCurrentIndexChanged(
int index);
138 void onRadioButtonGroupButtonClicked(QAbstractButton* b);
139 void onPushButtonNewCategoryClicked();
140 void onPushButtonNewPanelClicked();
141 void onPushButtonRenameClicked();
142 void onPushButtonAddClicked();
143 void onPushButtonDeleteClicked();
144 void onListViewSelectClicked(
const QModelIndex& index);
145 void onTreeViewResultClicked(
const QModelIndex& index);
146 void onToolButtonUpClicked();
147 void onToolButtonDownClicked();
148 void onItemChanged(QStandardItem* item);
149 void onLineEditSearchActionTextEdited(
const QString& text);
150 void onPushButtonResetClicked();
154 void initConnection();
172bool SA_RIBBON_EXPORT sa_customize_datas_to_xml(QXmlStreamWriter* xml,
const QList< SARibbonCustomizeData >& cds);
如果要使用SARibbonBar,必须使用此类代替QMainWindow
Definition SARibbonMainWindow.h:60