Choreonoid  1.8
GraphViewBase.h
Go to the documentation of this file.
1 
5 #ifndef CNOID_BASE_GRAPH_VIEW_BASE_H
6 #define CNOID_BASE_GRAPH_VIEW_BASE_H
7 
8 #include "GraphWidget.h"
9 #include <cnoid/View>
10 #include <cnoid/ItemList>
11 #include <QBoxLayout>
12 
13 namespace cnoid {
14 
15 class GraphViewBaseImpl;
16 
17 class GraphViewBase : public View
18 {
19 public:
20  GraphViewBase();
22 
23  virtual bool storeState(Archive& archive);
24  virtual bool restoreState(const Archive& archive);
25 
26  virtual QWidget* indicatorOnInfoBar();
27 
28 protected:
29 
30  virtual int currentNumParts(const ItemList<>& items) const;
31  virtual ItemList<> extractTargetItems(const ItemList<>& items) const = 0;
32  virtual void addGraphDataHandlers(Item* item, int partIndex, std::vector<GraphDataHandlerPtr>& out_handlers) = 0;
33  virtual void updateGraphDataHandler(Item* item, GraphDataHandlerPtr handler) = 0;
34 
35  void updateSelections();
36  void notifyUpdateByEditing(Item* item);
37 
38  QVBoxLayout* leftVBox() const;
39 
40 private:
41  GraphViewBaseImpl* impl;
42  friend class GraphViewBaseImpl;
43 };
44 
45 }
46 
47 #endif
cnoid::GraphViewBase::GraphViewBaseImpl
friend class GraphViewBaseImpl
Definition: GraphViewBase.h:42
cnoid::GraphViewBase::updateSelections
void updateSelections()
Definition: GraphViewBase.cpp:258
cnoid::GraphViewBase::extractTargetItems
virtual ItemList extractTargetItems(const ItemList<> &items) const =0
cnoid::GraphViewBase::leftVBox
QVBoxLayout * leftVBox() const
Definition: GraphViewBase.cpp:161
cnoid::View
Definition: View.h:27
cnoid::Archive
Definition: Archive.h:22
cnoid::GraphViewBase::storeState
virtual bool storeState(Archive &archive)
Definition: GraphViewBase.cpp:320
cnoid::GraphViewBase::updateGraphDataHandler
virtual void updateGraphDataHandler(Item *item, GraphDataHandlerPtr handler)=0
GraphWidget.h
cnoid::GraphDataHandlerPtr
std::shared_ptr< GraphDataHandler > GraphDataHandlerPtr
Definition: GraphWidget.h:23
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::Item
Definition: Item.h:29
cnoid::GraphViewBase::addGraphDataHandlers
virtual void addGraphDataHandlers(Item *item, int partIndex, std::vector< GraphDataHandlerPtr > &out_handlers)=0
cnoid::GraphViewBase
Definition: GraphViewBase.h:17
cnoid::ItemList
Definition: Item.h:20
cnoid::GraphViewBase::currentNumParts
virtual int currentNumParts(const ItemList<> &items) const
Definition: GraphViewBase.cpp:224
cnoid::GraphViewBase::notifyUpdateByEditing
void notifyUpdateByEditing(Item *item)
Definition: GraphViewBase.cpp:303
cnoid::GraphViewBase::GraphViewBase
GraphViewBase()
Definition: GraphViewBase.cpp:105
cnoid::GraphViewBase::restoreState
virtual bool restoreState(const Archive &archive)
Definition: GraphViewBase.cpp:326
cnoid::GraphViewBase::~GraphViewBase
~GraphViewBase()
Definition: GraphViewBase.cpp:148
cnoid::GraphViewBase::indicatorOnInfoBar
virtual QWidget * indicatorOnInfoBar()
Definition: GraphViewBase.cpp:167