VPTissue Reference Manual
TaskOverview.h
Go to the documentation of this file.
1 #ifndef SIMPT_PAREX_TASK_OVERVIEW_H_INCLUDED
2 #define SIMPT_PAREX_TASK_OVERVIEW_H_INCLUDED
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
23 
24 #include <QWidget>
25 #include <map>
26 #include <memory>
27 
28 class QStandardItemModel;
29 class QTimer;
30 class QTableView;
31 
32 namespace SimPT_Parex {
33 
37 class TaskOverview: public QWidget
38 {
39  Q_OBJECT
40 public:
46  TaskOverview();
47 
51  virtual ~TaskOverview();
52 
58  void UpdateExploration(const std::shared_ptr<const ExplorationProgress> &explorationProgress);
59 
60 signals:
66  void StopTask(int task);
67 
73  void StartTask(int task);
74 
75 protected:
79  virtual void showEvent(QShowEvent *event) override;
80 
84  virtual void hideEvent(QHideEvent *event) override;
85 
86 private slots:
87  void Refresh();
88 
89 private:
90 
91  std::shared_ptr<const ExplorationProgress> m_exploration_progress;
92 
93  QTableView *m_table;
94  QStandardItemModel *m_model;
95  QTimer *m_refresh_timer;
96 };
97 
98 } // namespace
99 
100 #endif // end_of_include_guard
TaskOverview()
Constructor.
virtual ~TaskOverview()
Destructor.
void UpdateExploration(const std::shared_ptr< const ExplorationProgress > &explorationProgress)
Update the current exploration.
void StartTask(int task)
Send message to restart a stopped task.
Overview of tasks.
Definition: TaskOverview.h:37
virtual void showEvent(QShowEvent *event) override
Overriding QWidget::showEvent to start the refresh timer.
virtual void hideEvent(QHideEvent *event) override
Overriding QWidget::hideEvent to stop the refresh timer.
void StopTask(int task)
Send message to stop a certain task.
see the online Qt documentation
Namespace for SimPT parameter explorer package.
Definition: Client.cpp:52
Interface for ExplorationProgress.