launchpage.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef LAUNCHPAGE_H
  2. #define LAUNCHPAGE_H
  3. #include <QMainWindow>
  4. #include <QFileDialog>
  5. #include <QString>
  6. #include <QMessageBox>
  7. #include <QDialogButtonBox>
  8. #include "projectmanager.h"
  9. namespace Ui {
  10. class LaunchPage;
  11. }
  12. static QString lanchStyle(//正常状态样式
  13. "QPushButton{"
  14. "background-color:rgba(0,191,255,50);"//背景色(也可以设置图片)
  15. "border-style:outset;" //边框样式(inset/outset)
  16. "border-width:4px;" //边框宽度像素
  17. "border-radius:10px;" //边框圆角半径像素
  18. "border-color:rgba(255,255,255,0);" //边框颜色
  19. "padding:7px;" //填衬
  20. "}"
  21. //鼠标按下样式
  22. "QPushButton:pressed{"
  23. "background-color:rgba(100,255,100,100);"
  24. "border-color:rgba(255,255,255,200);"
  25. "color:rgba(0,0,0,255);"
  26. "}"
  27. //界面背景色
  28. "QMainWindow{"
  29. "background-color:rgba(255,255,255,255);"
  30. "}") ;
  31. class LaunchPage : public QMainWindow
  32. {
  33. Q_OBJECT
  34. public:
  35. explicit LaunchPage(QWidget *parent = 0);
  36. ~LaunchPage();
  37. private slots:
  38. void on_confirmButton_clicked();
  39. void on_openExample_toggled(bool checked);
  40. void on_browseButton_clicked();
  41. void on_createExample_toggled(bool checked);
  42. private:
  43. Ui::LaunchPage *ui;
  44. QFileDialog *mOpenDialog;
  45. QFileDialog *mViewDialog;
  46. QString mSetName;
  47. QString mChosePath;
  48. QString mFileName;
  49. QString mFilePath;
  50. };
  51. #endif // LAUNCHPAGE_H