equal
deleted
inserted
replaced
27 #include <QWidget> |
27 #include <QWidget> |
28 #include <QGraphicsWidget> |
28 #include <QGraphicsWidget> |
29 #include <QGraphicsItem> |
29 #include <QGraphicsItem> |
30 |
30 |
31 class QPainter; |
31 class QPainter; |
|
32 #include "BWFGlobal.h" |
|
33 |
32 |
34 |
33 namespace WRT { |
35 namespace WRT { |
34 /*! |
36 /*! |
35 * \class FlowInterface |
37 * \class FlowInterface |
36 * |
38 * |
38 * i.e., PictureFlow, VisualFlow |
40 * i.e., PictureFlow, VisualFlow |
39 * |
41 * |
40 * This class is designed so that the Views using these engines can implement some functionality |
42 * This class is designed so that the Views using these engines can implement some functionality |
41 * in common modules, and assign the specific engine at a higher level |
43 * in common modules, and assign the specific engine at a higher level |
42 */ |
44 */ |
43 class FlowInterfaceBase |
45 class BWF_EXPORT FlowInterfaceBase |
44 { |
46 { |
45 public: |
47 public: |
46 //! Perform init steps on flow |
48 //! Perform init steps on flow |
47 virtual void init() = 0; |
49 virtual void init() = 0; |
48 |
50 |
86 virtual void removeAt(int) {} |
88 virtual void removeAt(int) {} |
87 |
89 |
88 //! handle the display mode change |
90 //! handle the display mode change |
89 virtual void displayModeChanged(QString&) {} |
91 virtual void displayModeChanged(QString&) {} |
90 |
92 |
|
93 //! handle the display mode change |
|
94 virtual void displayModeChanged(QSize) {} |
|
95 |
91 //! prepare start-animation |
96 //! prepare start-animation |
92 virtual void prepareStartAnimation() {} |
97 virtual void prepareStartAnimation() {} |
93 |
98 |
94 //! run start-animation |
99 //! run start-animation |
95 virtual void runStartAnimation() {} |
100 virtual void runStartAnimation() {} |
96 |
101 |
97 //! run end-animation |
102 //! run end-animation |
98 virtual void runEndAnimation() {} |
103 virtual void runEndAnimation() {} |
99 }; |
104 }; |
100 |
105 |
101 class FlowInterface : public QWidget, public FlowInterfaceBase |
106 class BWF_EXPORT FlowInterface : public QWidget, public FlowInterfaceBase |
102 { |
107 { |
103 Q_OBJECT |
108 Q_OBJECT |
104 public: |
109 public: |
105 //! Init the FlowInterface with a QWidget parent |
110 //! Init the FlowInterface with a QWidget parent |
106 FlowInterface(QWidget* parent) : QWidget(parent) {} |
111 FlowInterface(QWidget* parent) : QWidget(parent) {} |
110 void centerIndexChanged(int index); |
115 void centerIndexChanged(int index); |
111 void ok(int index); |
116 void ok(int index); |
112 void cancel(); |
117 void cancel(); |
113 }; |
118 }; |
114 |
119 |
115 class GraphicsFlowInterface : public QGraphicsWidget, public FlowInterfaceBase |
120 class BWF_EXPORT GraphicsFlowInterface : public QGraphicsWidget, public FlowInterfaceBase |
116 { |
121 { |
117 Q_OBJECT |
122 Q_OBJECT |
118 public: |
123 public: |
119 //! Init the FlowInterface with a QWidget parent |
124 //! Init the FlowInterface with a QWidget parent |
120 GraphicsFlowInterface(QGraphicsItem* parent) : QGraphicsWidget(parent) {} |
125 GraphicsFlowInterface(QGraphicsItem* parent); |
121 |
126 bool event(QEvent* event); |
|
127 |
122 signals: |
128 signals: |
123 void centerIndexChanged(int index); |
129 void centerIndexChanged(int index); |
124 void ok(int index); |
130 void ok(int index); |
125 void cancel(); |
131 void cancel(); |
126 }; |
132 }; |