COPASI API  4.16.103
CQRDFTreeView.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/MIRIAMUI/CQRDFTreeView.h,v $
3 // $Revision: 1.4 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2011/09/30 16:36:11 $
7 // End CVS Header
8 
9 // Copyright (C) 2011 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
16 // and The University of Manchester.
17 // All rights reserved.
18 
19 #ifndef CQRDFTreeView_h
20 #define CQRDFTreeView_h
21 
22 #include <map>
23 #include <QtCore/QVariant>
24 
25 #include "copasi/MIRIAMUI/ui_CQRDFTreeView.h"
26 #include "copasi/UI/copasiWidget.h"
27 
28 class CRDFNode;
29 class CQRDFTreeViewItem;
30 class CRDFGraph;
31 
32 class CQRDFTreeView : public CopasiWidget, public Ui::CQRDFTreeView
33 {
34  Q_OBJECT
35 
36 public:
37  CQRDFTreeView(QWidget* parent = 0, const char* name = 0);
38  virtual ~CQRDFTreeView();
39 
40  virtual bool update(ListViews::ObjectType objectType, ListViews::Action action, const std::string & key);
41 
42 protected:
43  virtual bool enterProtected();
44 
45 protected slots:
46 
47 public slots:
48  /**
49  * Clear the listeview
50  */
51  virtual void clear();
52 
53  /**
54  * Returns the list view item for node if it exists otherwise NULL.
55  * @param const CRDFNode * pSubject
56  * @return CQRDFTreeViewItem * listViewItem
57  */
58  CQRDFTreeViewItem * find(const CRDFNode * pNode);
59 
60  /**
61  * Insert a map from a CRDFNode to a CRDFListView
62  * @param const CRDFNode * pSubject
63  * @param CQRDFTreeViewItem * pItem
64  */
65  void insert(const CRDFNode * pNode, CQRDFTreeViewItem * pItem);
66 
67  // Attributes
68 private:
69  /**
70  * A map to look up items associated with a node.
71  */
72  std::map< const CRDFNode *, CQRDFTreeViewItem * > mNode2Item;
73 
74  /**
75  * The RDF Graph
76  */
78 
79  void load();
80 };
81 
82 #endif // CQRDFTreeView_h
objectType
virtual bool enterProtected()
virtual void clear()
std::map< const CRDFNode *, CQRDFTreeViewItem * > mNode2Item
Definition: CQRDFTreeView.h:72
CQRDFTreeView(QWidget *parent=0, const char *name=0)
void insert(const CRDFNode *pNode, CQRDFTreeViewItem *pItem)
virtual bool update(ListViews::ObjectType objectType, ListViews::Action action, const std::string &key)
CQRDFTreeViewItem * find(const CRDFNode *pNode)
CRDFGraph * mpGraph
Definition: CQRDFTreeView.h:77
virtual ~CQRDFTreeView()