mainwindow.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3. #include "SARibbonMainWindow.h"
  4. #include <QTreeWidget>
  5. #include <QTreeWidgetItem>
  6. #include <QStackedWidget>
  7. class SARibbonCategory;
  8. class SARibbonContextCategory;
  9. class SARibbonCustomizeWidget;
  10. class SARibbonActionsManager;
  11. class SARibbonQuickAccessBar;
  12. class SARibbonButtonGroupWidget;
  13. class QTextEdit;
  14. class MainWindow : public SARibbonMainWindow
  15. {
  16. Q_OBJECT
  17. public:
  18. MainWindow(QWidget* par = nullptr);
  19. private:
  20. void initTree();
  21. void initStack();
  22. void createCategoryFile(SARibbonCategory* page);
  23. void createCategoryDisplay(SARibbonCategory* page);
  24. void createCategoryData(SARibbonCategory* page);
  25. void createCategoryGrid(SARibbonCategory* page);
  26. void createCategoryHelp(SARibbonCategory* page);
  27. void createQuickAccessBar(SARibbonQuickAccessBar* quickAccessBar);
  28. void createRightButtonGroup(SARibbonButtonGroupWidget* rightBar);
  29. QAction* createAction(const QString& text, const QString& iconurl, const QString& objName);
  30. QAction* createAction(const QString& text, const QString& iconurl);
  31. private slots:
  32. void pageSwitch(QTreeWidgetItem* item,int column);
  33. private:
  34. SARibbonCustomizeWidget* m_customizeWidget;
  35. QTextEdit* m_edit;
  36. SARibbonActionsManager* m_actMgr;
  37. int m_actionTagText;
  38. int m_actionTagWithIcon;
  39. QAction* mActionWordWrap { nullptr };
  40. QDockWidget *mTreeList;
  41. QDockWidget *mConsole;
  42. QDockWidget *mCent;
  43. QTreeWidget* mTree;
  44. QStackedWidget* mStack;
  45. };
  46. #endif // MAINWINDOW_H