OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
coVrbMenue.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef COVRBMENUE_H
9 #define COVRBMENUE_H
10 
11 #include <string>
12 #include <set>
13 #include <vector>
14 #include <memory>
15 #include <vrbclient/SessionID.h>
16 #include "ui/Owner.h"
17 #include <vrbclient/SharedState.h>
18 
19 namespace vrb
20 {
21 class SessionID;
22 }
23 namespace opencover {
24 namespace ui
25 {
26 class Action;
27 class EditField;
28 class Menu;
29 class Group;
30 class SelectionList;
31 class Slider;
32 
33 }
34 
35 class VrbMenue: public ui::Owner
36 {
37 private:
38  ui::Menu *menue;
39  ui::Group *sessionGroup;
40  ui::Group *ioGroup;
41  ui::EditField *newSessionEf;
42  ui::Action *newSessionBtn;
43  ui::SelectionList *sessionsSl;
44  ui::Action *saveBtn;
45  ui::SelectionList *loadSL;
46  std::vector<std::string> savedRegistries;
47  std::vector<vrb::SessionID> availiableSessions;
48 
49 
50  void init();
51  void saveSession();
52  void loadSession(int index);
53  void loadSession(const std::string &filename);
54  void unloadAll();
55  void requestNewSession(const std::string & name);
56  void selectSession(int id);
57  const std::string noSavedSession = "nothing";
58 public:
59  VrbMenue();
60  void updateState(bool state);
61  void updateRegistries(const std::vector<std::string> &registries);
62  void updateSessions(const std::vector<vrb::SessionID> &sessions);
63  void setCurrentSession(const vrb::SessionID &session);
64  std::string remoteFetch(const char * filename);
65  std::string getFileName(const std::string & fileName);
66  std::string cutFileName(const std::string & fileName);
68  ui::Slider * testSlider;
69  ui::Action *requestFile;
70 };
71 
72 
73 }
74 #endif
std::string cutFileName(const std::string &fileName)
std::string remoteFetch(const char *filename)
vrb::SharedState< double > testTest
Definition: coVrbMenue.h:67
void setCurrentSession(const vrb::SessionID &session)
ui::Action * requestFile
Definition: coVrbMenue.h:69
void updateSessions(const std::vector< vrb::SessionID > &sessions)
void updateRegistries(const std::vector< std::string > &registries)
ui::Slider * testSlider
Definition: coVrbMenue.h:68
std::string getFileName(const std::string &fileName)
void updateState(bool state)
Definition: coVrbMenue.h:35