VPTissue Reference Manual
cpp_simptshell/workspace/Project.h
Go to the documentation of this file.
1 #ifndef SIMPT_WS_SIMPT_PROJECT_H_INCLUDED
2 #define SIMPT_WS_SIMPT_PROJECT_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 "../../cpp_simshell/workspace/Project.h"
23 
24 #include "StartupFileBase.h"
25 #include "WorkspaceFactory.h"
26 
27 namespace SimShell {
28 namespace Ws {
29 
30  extern template class Project<SimPT_Shell::Ws::StartupFileBase,
31  SimPT_Shell::Ws::WorkspaceFactory::g_project_index_file>;
32 
33 } // namespace
34 } // namespace
35 
36 
37 namespace SimPT_Shell {
38 
39 class ConverterWindow;
40 
41 namespace Ws {
42 
43  using SimPTProjectBase = SimShell::Ws::Project<StartupFileBase,
44  SimPT_Shell::Ws::WorkspaceFactory::g_project_index_file> ;
45 
53  class Project : public SimPTProjectBase
54  {
55  public:
56  Project(const std::string& path,
57  const std::string& prefs_file,
58  const std::shared_ptr<SimShell::Ws::IWorkspace>&);
59 
60  virtual ~Project();
61 
62  static const ConstructorType Constructor;
63 
65  virtual std::vector<QAction*> GetContextMenuActions() const;
66 
68  virtual std::vector<WidgetCallback> GetWidgets();
69 
71  virtual void Refresh();
72 
73  private:
74  std::weak_ptr<ConverterWindow> m_converter_window;
75  };
76 
77 } // namespace
78 } // namespace
79 
80 #endif // end_of_include_guard
virtual std::vector< QAction * > GetContextMenuActions() const
Definition: Project.cpp:85
Abstraction of project info on filesystem, as well as a maintainer of a work session.
Namespace for SimPT shell package.
Definition: Client.cpp:50
virtual std::vector< WidgetCallback > GetWidgets()
Definition: Project.cpp:90
Abstraction of project in workspace on file system.
virtual ~Project()
Virtual destructor.
Definition: Project.cpp:69
virtual void Refresh()
Overrides SimShell::Ws::Project::Refresh.
Definition: Project.cpp:105
Base class representing the file types used to initiate a session.
Interface for StartupFileBase.
std::function< std::shared_ptr< IProject >(const std::string &, const std::string &, const std::string &, const std::shared_ptr< IWorkspace > &)> ConstructorType
First argument : type of project to create.
Definition: IProject.h:71
Interface for WorkspaceFactory.
Namespace for generic graphical shell for simulators.
Definition: SimSession.h:32