Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
viewport.h
Go to the documentation of this file.
1 
8 #ifndef VIEWPORT_H
9 #define VIEWPORT_H
10 
11 #include <QWidget>
12 
13 class QCloseEvent;
14 
15 class CAViewPort : public QWidget {
16 Q_OBJECT
17 
18 public:
19  CAViewPort(QWidget *parent=0);
20 
21  virtual ~CAViewPort();
22 
26  };
27 
29 
30  virtual CAViewPort *clone() = 0;
31  virtual CAViewPort *clone(QWidget *parent) = 0;
32 
33  virtual void rebuild() = 0;
34 
35  static const int DEFAULT_VIEWPORT_WIDTH;
36  static const int DEFAULT_VIEWPORT_HEIGHT;
37 
38 protected slots:
39  void mousePressEvent(QMouseEvent *e);
40  inline void closeEvent(QCloseEvent*) { emit closed(this); }
41 
42 signals:
43  void clicked();
44  void closed(CAViewPort*);
45 
46 protected:
48 
50  // General properties //
53 };
54 #endif