taskcreator.h 872 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef TASKCREATOR_H
  2. #define TASKCREATOR_H
  3. #include "QVector"
  4. #include "QColorDialog"
  5. #include "DataHelper.h"
  6. namespace Ui {
  7. class TaskCreator;
  8. }
  9. class TaskCreator : public QWidget
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit TaskCreator(QWidget *parent = nullptr);
  14. ~TaskCreator();
  15. void setTaskCreation(bool status, const QVector<Group*> *groups);
  16. signals:
  17. void sendTaskToParent(QString *newTaskName, int groupId, uint timer, uint times);
  18. void sendGroupToParent(QString *newGroupName, QColor *color);
  19. private slots:
  20. void on_addTaskBtn_clicked();
  21. void on_exitTaskBtn_clicked();
  22. void on_changeColorBtn_clicked();
  23. void on_userSelectColor(const QColor &color);
  24. private:
  25. Ui::TaskCreator *ui;
  26. const QVector<Group*> *groups;
  27. bool isTaskCreating;
  28. QColorDialog colorSelector;
  29. QColor groupColor;
  30. };
  31. #endif // TASKCREATOR_H