ImportIndexWidget.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef IMPORTINDEXWIDGET_H
  2. #define IMPORTINDEXWIDGET_H
  3. #include <QDialog>
  4. class QLabel;
  5. class QListWidget;
  6. class PushButton;
  7. class QVBoxLayout;
  8. class QHBoxLayout;
  9. struct IndexSystemInfo
  10. {
  11. int projId = -1;
  12. int indexType = -1;
  13. QString projName = "";
  14. };
  15. class ImportIndexWidget : public QDialog
  16. {
  17. Q_OBJECT
  18. public:
  19. ImportIndexWidget(QWidget *parent = nullptr);
  20. signals:
  21. void sigImport(int projId, int indexType);
  22. private:
  23. void initWindow();
  24. void initWidgets();
  25. void initLayout();
  26. void connectSignalsAndSlots();
  27. void showEvent(QShowEvent *) override;
  28. void loadIndex();
  29. void showIndex();
  30. private slots:
  31. void slotConfirm();
  32. void slotCancel();
  33. void slotCurrentChanged();
  34. private:
  35. QLabel *m_title = nullptr;
  36. QLabel *m_tips = nullptr;
  37. QListWidget *m_listWidget = nullptr;
  38. PushButton *m_confirm = nullptr;
  39. PushButton *m_cancel = nullptr;
  40. QVBoxLayout *m_layout = nullptr;
  41. QHBoxLayout *m_buttonLayout = nullptr;
  42. QList<IndexSystemInfo> m_indexSysList;
  43. };
  44. #endif // IMPORTINDEXWIDGET_H