SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NetworkEditorControllerGuiProxy.h
Go to the documentation of this file.
1 /*
2  For more information, please see: http://software.sci.utah.edu
3 
4  The MIT License
5 
6  Copyright (c) 2012 Scientific Computing and Imaging Institute,
7  University of Utah.
8 
9  License for the specific language governing rights and limitations under
10  Permission is hereby granted, free of charge, to any person obtaining a
11  copy of this software and associated documentation files (the "Software"),
12  to deal in the Software without restriction, including without limitation
13  the rights to use, copy, modify, merge, publish, distribute, sublicense,
14  and/or sell copies of the Software, and to permit persons to whom the
15  Software is furnished to do so, subject to the following conditions:
16 
17  The above copyright notice and this permission notice shall be included
18  in all copies or substantial portions of the Software.
19 
20  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26  DEALINGS IN THE SOFTWARE.
27 */
28 
29 #ifndef INTERFACE_APPLICATION_NETWORKEDITORCONTROLLERGUIPROXY_H
30 #define INTERFACE_APPLICATION_NETWORKEDITORCONTROLLERGUIPROXY_H
31 
32 #include <QObject>
33 #include <vector>
34 #include <boost/shared_ptr.hpp>
36 
37 namespace SCIRun {
38  namespace Dataflow { namespace Engine { class NetworkEditorController; struct DisableDynamicPortSwitch; }}
39 
40 namespace Gui {
41 
42  class NetworkEditorControllerGuiProxy : public QObject//, public SCIRun::Dataflow::Networks::ConnectionMakerService
43  {
44  Q_OBJECT
45  public:
46  explicit NetworkEditorControllerGuiProxy(boost::shared_ptr<SCIRun::Dataflow::Engine::NetworkEditorController> controller);
47  public Q_SLOTS:
48  void addModule(const std::string& moduleName);
53  void connectNewModule(const SCIRun::Dataflow::Networks::ModuleHandle& moduleToConnectTo, const SCIRun::Dataflow::Networks::PortDescriptionInterface* portToConnect, const std::string& newModuleName);
57  size_t numModules() const;
58  int errorCode() const;
59  void setExecutorType(int type);
60  public:
63  boost::shared_ptr<SCIRun::Dataflow::Engine::DisableDynamicPortSwitch> createDynamicPortSwitch();
64  Q_SIGNALS:
65  void moduleAdded(const std::string& name, SCIRun::Dataflow::Networks::ModuleHandle module);
71  void executionStarted();
72  void executionFinished(int returnCode);
73  private:
74  boost::shared_ptr<SCIRun::Dataflow::Engine::NetworkEditorController> controller_;
75  };
76 
77 }
78 }
79 
80 #endif
void moduleAdded(const std::string &name, SCIRun::Dataflow::Networks::ModuleHandle module)
void removeModule(const SCIRun::Dataflow::Networks::ModuleId &id)
Definition: NetworkEditorControllerGuiProxy.cc:57
Definition: ConnectionId.h:67
void portRemoved(const SCIRun::Dataflow::Networks::ModuleId &mid, const SCIRun::Dataflow::Networks::PortId &pid)
void moduleRemoved(const SCIRun::Dataflow::Networks::ModuleId &id)
size_t numModules() const
Definition: NetworkEditorControllerGuiProxy.cc:87
boost::shared_ptr< NetworkFile > NetworkFileHandle
Definition: NetworkFwd.h:86
void loadNetwork(const SCIRun::Dataflow::Networks::NetworkFileHandle &xml)
Definition: NetworkEditorControllerGuiProxy.cc:77
int errorCode() const
Definition: NetworkEditorControllerGuiProxy.cc:92
const SCIRun::Dataflow::Networks::ModuleDescriptionMap & getAllAvailableModuleDescriptions() const
Definition: NetworkEditorControllerGuiProxy.cc:117
void connectionRemoved(const SCIRun::Dataflow::Networks::ConnectionId &id)
void connectNewModule(const SCIRun::Dataflow::Networks::ModuleHandle &moduleToConnectTo, const SCIRun::Dataflow::Networks::PortDescriptionInterface *portToConnect, const std::string &newModuleName)
Definition: NetworkEditorControllerGuiProxy.cc:112
const char * name[]
Definition: BoostGraphExampleTests.cc:87
Definition: ModuleDescription.h:77
std::map< std::string, std::map< std::string, std::map< std::string, ModuleDescription > > > ModuleDescriptionMap
Definition: NetworkFwd.h:88
void setExecutorType(int type)
Definition: NetworkEditorControllerGuiProxy.cc:102
Definition: NetworkEditorControllerGuiProxy.h:42
void requestConnection(const SCIRun::Dataflow::Networks::PortDescriptionInterface *from, const SCIRun::Dataflow::Networks::PortDescriptionInterface *to)
Definition: NetworkEditorControllerGuiProxy.cc:62
void duplicateModule(const SCIRun::Dataflow::Networks::ModuleHandle &module)
Definition: NetworkEditorControllerGuiProxy.cc:107
boost::shared_ptr< ModuleInterface > ModuleHandle
Definition: NetworkFwd.h:74
void removeConnection(const SCIRun::Dataflow::Networks::ConnectionId &id)
Definition: NetworkEditorControllerGuiProxy.cc:67
void connectionAdded(const SCIRun::Dataflow::Networks::ConnectionDescription &cd)
boost::shared_ptr< SCIRun::Dataflow::Engine::DisableDynamicPortSwitch > createDynamicPortSwitch()
Definition: NetworkEditorControllerGuiProxy.cc:122
Definition: ModuleDescription.h:45
SCIRun::Dataflow::Networks::NetworkFileHandle saveNetwork() const
Definition: NetworkEditorControllerGuiProxy.cc:72
SCIRun::Dataflow::Networks::NetworkGlobalSettings & getSettings()
Definition: NetworkEditorControllerGuiProxy.cc:97
void addModule(const std::string &moduleName)
Definition: NetworkEditorControllerGuiProxy.cc:52
Definition: NetworkInterface.h:48
void portAdded(const SCIRun::Dataflow::Networks::ModuleId &mid, const SCIRun::Dataflow::Networks::PortId &pid)
void executeAll(const SCIRun::Dataflow::Networks::ExecutableLookup &lookup)
Definition: NetworkEditorControllerGuiProxy.cc:82
NetworkEditorControllerGuiProxy(boost::shared_ptr< SCIRun::Dataflow::Engine::NetworkEditorController > controller)
Definition: NetworkEditorControllerGuiProxy.cc:39