mainwindow.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3. #include <QMainWindow>
  4. #include <QListWidget>
  5. #include <QPushButton>
  6. #include <QVariant>
  7. namespace Ui {
  8. class MainWindow;
  9. }
  10. class MainWindow : public QMainWindow
  11. {
  12. Q_OBJECT
  13. public:
  14. QString blue_style = "background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.505682, stop:0.9 rgba(0, 0, 255, 255), stop:1 rgba(255, 255, 255, 0));";
  15. QString red_style = "background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.505682, stop:0.9 rgba(255, 0, 0, 255), stop:1 rgba(255, 255, 255, 0));";
  16. QString green_style = "background-color: qradialgradient(spread:pad, cx:0.5, cy:0.5, radius:0.5, fx:0.5, fy:0.505682, stop:0.9 rgba(0, 255, 0, 255), stop:1 rgba(255, 255, 255, 0));";
  17. int label_color = 0;
  18. explicit MainWindow(QWidget *parent = 0);
  19. ~MainWindow();
  20. protected:
  21. void AddLog(std::string log);
  22. private slots:
  23. void on_m_test_btn_clicked();
  24. void on_m_add_clicked();
  25. private slots:
  26. void ProcessSlot(QVariant data);
  27. //void on_m_add_clicked(bool checked);
  28. void on_m_signal_test_clicked();
  29. private:
  30. QPushButton* m_test_button;
  31. private:
  32. Ui::MainWindow *ui;
  33. };
  34. #endif // MAINWINDOW_H