Choreonoid  1.8
MainWindow.h
Go to the documentation of this file.
1 
5 #ifndef CNOID_BASE_MAIN_WINDOW_H
6 #define CNOID_BASE_MAIN_WINDOW_H
7 
8 #include "Archive.h"
9 #include <QMainWindow>
10 #include "exportdecl.h"
11 
12 namespace cnoid {
13 
14 class ToolBarArea;
15 class ViewArea;
16 class ToolBar;
17 class ExtensionManager;
18 
19 class CNOID_EXPORT MainWindow : public QMainWindow
20 {
21 public:
22  static MainWindow* initialize(const char* appName, ExtensionManager* ext);
23  static MainWindow* instance();
24 
25  ~MainWindow();
26 
27  void show();
28  void setProjectTitle(const std::string& title);
29  ToolBarArea* toolBarArea();
30  ViewArea* viewArea();
31  void addToolBar(ToolBar* toolbar);
32  void removeToolBar(ToolBar* toolbar);
33  std::vector<ToolBar*> toolBars() const;
34  std::vector<ToolBar*> visibleToolBars() const;
35 
36  void restoreLayout(ArchivePtr archive);
37  void storeLayout(ArchivePtr archive);
38  void setInitialLayout(ArchivePtr archive);
39  void storeWindowStateConfig();
40 
41 protected:
42  virtual void changeEvent(QEvent* event);
43  virtual void resizeEvent(QResizeEvent* event);
44  virtual void keyPressEvent(QKeyEvent* event);
45 
46 private:
47  class Impl;
48  Impl* impl;
49 
50  MainWindow(const char* appName, ExtensionManager* ext);
51 
52  friend class ExtensionManager;
53 };
54 
55 }
56 
57 #endif
cnoid::ToolBar
Definition: ToolBar.h:22
cnoid::ExtensionManager
Definition: ExtensionManager.h:23
cnoid::ToolBarArea
Definition: ToolBarArea.h:18
cnoid::MainWindow
Definition: MainWindow.h:19
cnoid::ViewArea
Definition: ViewArea.h:16
cnoid::ref_ptr< Archive >
Archive.h
cnoid
Definition: AbstractSceneLoader.h:11