VPTissue Reference Manual
ServerDialog.h
Go to the documentation of this file.
1 #ifndef SIMPT_PAREX_SERVER_DIALOG_H_INCLUDED
2 #define SIMPT_PAREX_SERVER_DIALOG_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 <QDialog>
23 #include <QString>
24 #include <QComboBox>
25 #include <boost/property_tree/xml_parser.hpp>
26 #include <vector>
27 
28 namespace SimPT_Parex {
29 
30 class ServerInfo;
31 
35 class ServerDialog : public QDialog
36 {
37  Q_OBJECT
38 public:
44  ServerDialog(std::string path);
45 
49  virtual ~ServerDialog();
50 
56 
57 private:
58  QLineEdit* m_name;
59  QLineEdit* m_address;
60  QLineEdit* m_port;
61 
62  std::string m_path;
63 
64  std::vector<ServerInfo*> m_servers;
65  ServerInfo* m_current_server;
66  ServerInfo* m_last_server;
67 
68  QComboBox* m_server_list;
69 
73  void LoadServerList();
74 
80  void SaveServerList(bool last);
81 
82 private slots:
83 
87  void Connect();
88 
94  void SelectionChanged(int index);
95 
100  void UpdateName(const QString name);
101 
106  void UpdateAddress(const QString address);
107 
112  void UpdatePort(const QString port);
113 
117  void SaveServer();
118 
122  void DeleteServer();
123 };
124 
125 } // namespace
126 
127 #endif // end_of_include_guard
virtual ~ServerDialog()
Destructor.
ServerDialog(std::string path)
Constructor.
ServerInfo * GetServer()
Return the server to connect to.
Class for storing server info used on client-side.
Definition: ServerInfo.h:29
Namespace for SimPT parameter explorer package.
Definition: Client.cpp:52
see the online Qt documentation
Dialog for connecting to server.
Definition: ServerDialog.h:35