Last change
on this file since 53 was
53,
checked in by sven, 14 years ago
|
Punch Card Editor, ongoing development
- Extended new Deck interface, expanding the undo framework
- Implemented editor changes via undo framework
- revised the menu and toolbar actions and structure
(now dynamic construction at deck load time), implemented
undo viewer
- Started implementation of device driver framework in menu
- Embedded the Qextserialport library
(http://qextserialport.sourceforge.net/)
- Started the Documation M200 Client device driver
(well, just created the directory structure and qmake
project file infrastructure)
- At the current state, the complete project compiles :-)
Statistics: About 3500 Lines of code (without libqextserialport)
-- sven @ workstation
|
File size:
862 bytes
|
Line | |
---|
1 | #ifndef DRIVER_H |
---|
2 | #define DRIVER_H |
---|
3 | |
---|
4 | #include <QDockWidget> |
---|
5 | #include <QString> |
---|
6 | #include <QList> |
---|
7 | |
---|
8 | namespace QPunchCard { |
---|
9 | namespace Device { |
---|
10 | class Dock; |
---|
11 | class Driver; // Backend |
---|
12 | class DriverFactory; |
---|
13 | }; |
---|
14 | }; |
---|
15 | |
---|
16 | #include "app/mainwindow.h" |
---|
17 | |
---|
18 | namespace QPunchCard { |
---|
19 | namespace Device { |
---|
20 | |
---|
21 | class Dock : public QDockWidget { |
---|
22 | Q_OBJECT |
---|
23 | |
---|
24 | App::MainWindow* main; |
---|
25 | QString driver_name; |
---|
26 | QPointer<QWidget> controller; |
---|
27 | public: |
---|
28 | Dock(QString driver_name, App::MainWindow* parent); |
---|
29 | bool isStarted() const { return controller; } |
---|
30 | private slots: |
---|
31 | void visibilityHook(bool visible); |
---|
32 | }; |
---|
33 | |
---|
34 | class DriverFactory { |
---|
35 | public: |
---|
36 | static QList<QString> availableDrivers(); |
---|
37 | static Dock* createDock(const QString& name, App::MainWindow* window); |
---|
38 | static QWidget* createController(const QString& name, QWidget* parent = 0); |
---|
39 | }; |
---|
40 | |
---|
41 | |
---|
42 | |
---|
43 | }; // namespace Driver |
---|
44 | }; // namespace QPunchCard |
---|
45 | |
---|
46 | |
---|
47 | #endif // DRIVER_H |
---|
48 | |
---|
Note: See
TracBrowser
for help on using the repository browser.