mainwindow.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3. #include <QMainWindow>
  4. #include <QGroupBox>
  5. #include <QScrollArea>
  6. #include <QLabel>
  7. #include <QLineEdit>
  8. #include <QCheckBox>
  9. #include <QComboBox>
  10. #include <QPushButton>
  11. #include <QtXml>
  12. #include <QDomComment>
  13. #include <QFile>
  14. extern std::string gstrdirpath;
  15. extern std::string gstrxmlpath;
  16. namespace iv {
  17. struct appitem
  18. {
  19. QLabel * mpLabelIndex;
  20. QLabel * mpLabelAppName;
  21. QLineEdit * mpLEArgs;
  22. QComboBox * mpCBAppClass;
  23. QComboBox * mpCBAppAuto;
  24. QCheckBox * mpCheckCheckBox;
  25. };
  26. struct appuse
  27. {
  28. std::string appname ;
  29. std::string strdir ;
  30. std::string strargs ;
  31. std::string strbstart ;
  32. std::string strgroup;
  33. };
  34. }
  35. QT_BEGIN_NAMESPACE
  36. namespace Ui { class MainWindow; }
  37. QT_END_NAMESPACE
  38. class MainWindow : public QMainWindow
  39. {
  40. Q_OBJECT
  41. public:
  42. MainWindow(QWidget *parent = nullptr);
  43. ~MainWindow();
  44. public:
  45. void resizeEvent(QResizeEvent *event);
  46. private slots:
  47. void onClickSave();
  48. private:
  49. Ui::MainWindow *ui;
  50. private:
  51. void loadxml(std::string strxmlpath);
  52. void savexml(std::string strxmlpath);
  53. QStringList LoadAppNames();
  54. private:
  55. QScrollArea * mpscroll;
  56. QGroupBox * mpGroup;
  57. QStringList mListAppNames;
  58. int mnFontHeight;
  59. std::string mstrclass[5] = {"Driver","Detection","Fusion","Control","Tool"};
  60. std::vector<iv::appuse> mvectorapp;
  61. std::vector<iv::appitem> mvectorappitem;
  62. std::string mstrxmlpath = gstrxmlpath;//"/home/yuchuli/qt/TAG/V1.0/modularization/deploy/app_tag1.0_ubuntu1804x64/IVSysMan.xml";
  63. std::string mstrdirpath = gstrdirpath; //"/home/yuchuli/qt/TAG/V1.0/modularization/deploy/app_tag1.0_ubuntu1804x64";
  64. };
  65. #endif // MAINWINDOW_H