VPTissue Reference Manual
Client.h
Go to the documentation of this file.
1 #ifndef SIMPT_PAREX_CLIENT_H_INCLUDED
2 #define SIMPT_PAREX_CLIENT_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  */
22 #include "Status.h"
24 
25 #include <QAction>
26 #include <QMainWindow>
27 #include <QString>
28 #include <QPushButton>
29 #include <QSettings>
30 #include <boost/property_tree/xml_parser.hpp>
31 #include <boost/property_tree/exceptions.hpp>
32 
33 namespace SimPT_Parex {
34 
35 class ClientProtocol;
36 class Exploration;
37 class ExplorationPtreeView;
38 class ExplorationSelection;
39 class TaskOverview;
40 
41 
45 class Client : public QMainWindow
46 {
47  Q_OBJECT
48 public:
50  Client();
51 
53  virtual ~Client();
54 
55 private slots:
56 
58  void Connect();
59 
61  void Disconnect();
62 
64  void Subscribe();
65 
67  void StartExploration();
68 
70  void DeleteExploration();
71 
73  void DownloadExploration();
74 
76  void StopTask(int);
77 
79  void RestartTask(int);
80 
82  void SetWorkspace();
83 
85  void ShowTaskOverview();
86 
88  void Connected(std::string name);
89 
91  void ConnectExplorationNames(const std::vector<std::string> &names);
92 
94  void UpdateStatus(const ExplorationProgress *status);
95 
97  void ExplorationDeleted();
98 
100  void Disconnected();
101 
102 private:
103  ClientProtocol* m_client;
104  std::string m_workspace_path;
105  std::shared_ptr<const Exploration> m_last_exploration;
106  std::string m_subscribed_exploration;
107 
108  Status* m_status;
109  QStatusBar* m_statusbar;
110  QPushButton* m_connection_button;
111 
112  TaskOverview* m_task_view;
113 
114  QAction* action_connect;
115  QAction* action_subscribe;
116  QAction* action_start_exploration;
117  QAction* action_delete_exploration;
118  QAction* action_download_exploration;
119  QAction* action_workspace_wizard;
120  QAction* action_edit_workspace;
121  QAction* action_task_overview;
122 
123  QSettings m_settings;
124 
126  void InitWorkspace();
127 };
128 
129 } // namespace
130 
131 #endif // end-of-include-guard
Client()
Constructor.
Definition: Client.cpp:58
virtual ~Client()
Destructor.
Definition: Client.cpp:167
Interface for Status.
Class describing the progress state of an exploration.
Interface for ClientProtocol.
Overview of tasks.
Definition: TaskOverview.h:37
Client for Parameter Exploration.
Definition: Client.h:45
see the online Qt documentation
Namespace for SimPT parameter explorer package.
Definition: Client.cpp:52
Widget to display status of subscribed exploration.
Definition: Status.h:34
Client side of the protocol.