QCAD
Open Source 2D CAD
RMdiArea.h
Go to the documentation of this file.
1 
20 #ifndef RMDIAREA_H_
21 #define RMDIAREA_H_
22 
23 #include "gui_global.h"
24 
25 #include <QMdiArea>
26 #include <QMetaType>
27 
28 class QToolButton;
29 class RMdiChildQt;
30 
38 class QCADGUI_EXPORT RMdiArea: public QMdiArea {
39  Q_OBJECT
40 
41 public:
42  RMdiArea(QWidget* parent=0);
43  virtual ~RMdiArea();
44 
45  QToolButton* getAddTabButton() {
46  return addTabButton;
47  }
48 
49 public slots:
50  void updateTabBar(RMdiChildQt* child = NULL);
51  void updateTabBarSize();
52  void updateAddButtonLocation();
53  void closeTab(int i);
54  void activateTab(int i);
55 
56 signals:
57  void addTabClicked();
58 
59 protected:
60  virtual void resizeEvent(QResizeEvent* event);
61  virtual void keyPressEvent(QKeyEvent* event);
62 
63 private:
64  QTabBar* tabBarOri;
65  QTabBar* tabBar;
67  QToolButton* addTabButton;
68 };
69 
71 
72 #endif
MDI area with tabbar that features add tab button.
Definition: RMdiArea.h:38
QToolButton * getAddTabButton()
Definition: RMdiArea.h:45
#define QCADGUI_EXPORT
Definition: gui_global.h:10
QTabBar * tabBarOri
Definition: RMdiArea.h:64
QToolButton * addTabButton
Definition: RMdiArea.h:67
QTabBar * tabBar
Definition: RMdiArea.h:65
QWidget * addTabButtonWidget
Definition: RMdiArea.h:66
Q_DECLARE_METATYPE(RMath *)
MDI child window.
Definition: RMdiChildQt.h:41