SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ProvenanceWindow.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_PROVENANCEWINDOW_H
30 #define INTERFACE_APPLICATION_PROVENANCEWINDOW_H
31 
32 #include "ui_ProvenanceWindow.h"
33 
38 
39 namespace SCIRun {
40 namespace Gui {
41 
42  class NetworkEditor;
43 
44 class ProvenanceWindow : public QDockWidget, public Ui::ProvenanceWindow
45 {
46  Q_OBJECT
47 
48 public:
49  explicit ProvenanceWindow(SCIRun::Dataflow::Engine::ProvenanceManagerHandle provenanceManager, QWidget* parent = 0);
51 public Q_SLOTS:
52  void clear();
54  void undo();
55  void redo();
56  void undoAll();
57  void redoAll();
58 private Q_SLOTS:
59  void displayInfo(QListWidgetItem* item);
60 Q_SIGNALS:
61  void modifyingNetwork(bool modifying);
62  void undoStateChanged(bool enabled);
63  void redoStateChanged(bool enabled);
64 private:
66  int lastUndoRow_;
67  const SCIRun::Dataflow::Engine::ProvenanceManagerHandle::element_type::IOType* networkEditor_;
68 
69  void setUndoEnabled(bool enable);
70  void setRedoEnabled(bool enable);
71 };
72 
73 //TODO: will become several classes
74 class GuiActionProvenanceConverter : public QObject
75 {
76  Q_OBJECT
77 public:
79 public Q_SLOTS:
80  void moduleAdded(const std::string& name, SCIRun::Dataflow::Networks::ModuleHandle module);
84  void moduleMoved(const SCIRun::Dataflow::Networks::ModuleId& id, double newX, double newY);
85  void networkBeingModifiedByProvenanceManager(bool inProgress);
86 Q_SIGNALS:
88 private:
89  NetworkEditor* editor_;
90  bool provenanceManagerModifyingNetwork_;
91 };
92 
93 }
94 }
95 
96 #endif
void redoAll()
Definition: ProvenanceWindow.cc:239
Definition: ConnectionId.h:67
void connectionRemoved(const SCIRun::Dataflow::Networks::ConnectionId &id)
Definition: ProvenanceWindow.cc:290
void redo()
Definition: ProvenanceWindow.cc:196
boost::shared_ptr< NetworkFile > NetworkFileHandle
Definition: NetworkFwd.h:86
void moduleAdded(const std::string &name, SCIRun::Dataflow::Networks::ModuleHandle module)
Definition: ProvenanceWindow.cc:263
void provenanceItemCreated(SCIRun::Dataflow::Engine::ProvenanceItemHandle item)
void modifyingNetwork(bool modifying)
void networkBeingModifiedByProvenanceManager(bool inProgress)
Definition: ProvenanceWindow.cc:308
const char * name[]
Definition: BoostGraphExampleTests.cc:87
boost::shared_ptr< Dataflow::Engine::ProvenanceManager< Networks::NetworkFileHandle > > ProvenanceManagerHandle
Definition: ControllerInterfaces.h:59
ProvenanceWindow(SCIRun::Dataflow::Engine::ProvenanceManagerHandle provenanceManager, QWidget *parent=0)
Definition: ProvenanceWindow.cc:44
Definition: ModuleDescription.h:77
Definition: NetworkEditor.h:104
void moduleMoved(const SCIRun::Dataflow::Networks::ModuleId &id, double newX, double newY)
Definition: ProvenanceWindow.cc:299
void undoStateChanged(bool enabled)
Definition: ProvenanceWindow.h:74
void connectionAdded(const SCIRun::Dataflow::Networks::ConnectionDescription &)
Definition: ProvenanceWindow.cc:281
void moduleRemoved(const SCIRun::Dataflow::Networks::ModuleId &id)
Definition: ProvenanceWindow.cc:272
void addProvenanceItem(SCIRun::Dataflow::Engine::ProvenanceItemHandle item)
Definition: ProvenanceWindow.cc:121
boost::shared_ptr< ModuleInterface > ModuleHandle
Definition: NetworkFwd.h:74
boost::shared_ptr< Dataflow::Engine::ProvenanceItem< Networks::NetworkFileHandle > > ProvenanceItemHandle
Definition: ControllerInterfaces.h:54
void undoAll()
Definition: ProvenanceWindow.cc:223
void clear()
Definition: ProvenanceWindow.cc:143
void undo()
Definition: ProvenanceWindow.cc:169
tuple file
Definition: eab.py:7
void showFile(SCIRun::Dataflow::Networks::NetworkFileHandle file)
Definition: ProvenanceWindow.cc:63
void redoStateChanged(bool enabled)
GuiActionProvenanceConverter(NetworkEditor *editor)
Definition: ProvenanceWindow.cc:258
Definition: ProvenanceWindow.h:44