Choreonoid  1.8
ImageView.h
Go to the documentation of this file.
1 #ifndef CNOID_BASE_IMAGE_VIEW_H
2 #define CNOID_BASE_IMAGE_VIEW_H
3 
4 #include "View.h"
5 #include "ToolBar.h"
6 #include "exportdecl.h"
7 
8 class QImage;
9 
10 namespace cnoid {
11 
12 class Image;
13 class ImageableItem;
14 
15 class CNOID_EXPORT ImageView : public View
16 {
17 public:
18  static void initializeClass(ExtensionManager* ext);
19  static ImageView* instance();
20 
21  ImageView();
22  ~ImageView();
23 
24  void setPixmap(const QPixmap& pixmap);
25  void setImage(const Image& image);
26  void setImage(const QImage& image);
27 
28  void setScalingEnabled(bool on);
29  bool isScalingEnabled() const;
30 
31  ImageableItem* getImageableItem();
32  void setImageableItem(ImageableItem* imageable);
33 
34  virtual bool storeState(Archive& archive) override;
35  virtual bool restoreState(const Archive& archive) override;
36 
37 protected:
38  virtual void onDeactivated() override;
39  virtual void onFocusChanged(bool on) override;
40 
41 private:
42  class Impl;
43  Impl* impl;
44 
45 };
46 
47 class CNOID_EXPORT ImageViewBar : public ToolBar
48 {
49 public:
50  static void initialize(ExtensionManager* ext);
51  static ImageViewBar* instance();
52 
53  ImageableItem* getSelectedImageableItem();
54 
55 private:
56  class Impl;
57  Impl* impl;
58 
59  friend class ImageView;
60 
61  ImageViewBar();
62  ~ImageViewBar();
63 };
64 
65 }
66 
67 #endif
cnoid::ImageView
Definition: ImageView.h:15
ToolBar.h
cnoid::ToolBar
Definition: ToolBar.h:22
cnoid::ExtensionManager
Definition: ExtensionManager.h:23
cnoid::View
Definition: View.h:27
cnoid::Archive
Definition: Archive.h:22
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::ImageViewBar
Definition: ImageView.h:47
cnoid::Image
Definition: Image.h:16
View.h
cnoid::ImageableItem
Definition: ImageableItem.h:10