mainwindow.h 1.6 KB

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