mainwindow-rector.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #ifndef MAINWINDOW_RECTOR_H
  2. #define MAINWINDOW_RECTOR_H
  3. #include <QMainWindow>
  4. #include <QComboBox>
  5. #include <QGroupBox>
  6. #include <QCheckBox>
  7. #include <QLabel>
  8. #include <QHBoxLayout>
  9. #include <QTimer>
  10. #include <QNetworkReply>
  11. #include <QMap>
  12. #include "mainwindow-common.h"
  13. #include "redmine.h"
  14. namespace Ui
  15. {
  16. class MainWindowRector;
  17. }
  18. class MainWindowRector : public MainWindowCommon
  19. {
  20. Q_OBJECT
  21. CALLBACK_DISPATCHER ( Redmine, MainWindowRector, NULL )
  22. public:
  23. explicit MainWindowRector ( QWidget *parent = 0 );
  24. ~MainWindowRector();
  25. protected slots:
  26. private slots:
  27. void on_actionExit_triggered();
  28. void on_actionHelp_triggered();
  29. void issues_doubleClick ( int row, int column );
  30. int updateTasks();
  31. void on_issues_itemSelectionChanged();
  32. void append_assignee ( QNetworkReply *reply, QJsonDocument *coassignee_doc, void *_arg );
  33. void sortColumnSwitch ( int columnIdx );
  34. private:
  35. void issue_add ( QJsonObject issue );
  36. void issues_clear();
  37. void issue_display_oneissue ( int pos );
  38. void issues_display();
  39. QList<QJsonObject> issues_get();
  40. Ui::MainWindowRector *ui;
  41. QAction *showHideAction;
  42. QAction *quitAction;
  43. void createTrayActions();
  44. void resizeEvent ( QResizeEvent *event );
  45. void issuesSetup();
  46. QHash<int, QJsonObject> issue_row2issue;
  47. QList <QJsonObject> issues_list;
  48. QTimer *timerUpdateTasks;
  49. void get_issues_callback ( QNetworkReply *reply, QJsonDocument *json, void *arg );
  50. QMap <int, enum ESortColumn> sortColumnAscByIdx;
  51. QMap <int, enum ESortColumn> sortColumnDescByIdx;
  52. void iconActivated ( QSystemTrayIcon::ActivationReason reason );
  53. };
  54. #endif // MAINWINDOW_RECTOR_H