mainwindow.h 1.9 KB

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