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
|
Rev | Line | |
---|
[52] | 1 | #ifndef DRIVER_H |
---|
| 2 | #define DRIVER_H |
---|
| 3 | |
---|
[53] | 4 | #include <QDockWidget> |
---|
[52] | 5 | #include <QString> |
---|
| 6 | #include <QList> |
---|
| 7 | |
---|
| 8 | namespace QPunchCard { |
---|
[53] | 9 | namespace Device { |
---|
| 10 | class Dock; |
---|
| 11 | class Driver; // Backend |
---|
[52] | 12 | class DriverFactory; |
---|
| 13 | }; |
---|
| 14 | }; |
---|
| 15 | |
---|
| 16 | #include "app/mainwindow.h" |
---|
| 17 | |
---|
| 18 | namespace QPunchCard { |
---|
[53] | 19 | namespace Device { |
---|
[52] | 20 | |
---|
[53] | 21 | class Dock : public QDockWidget { |
---|
| 22 | Q_OBJECT |
---|
[52] | 23 | |
---|
[53] | 24 | App::MainWindow* main; |
---|
| 25 | QString driver_name; |
---|
| 26 | QPointer<QWidget> controller; |
---|
[52] | 27 | public: |
---|
[53] | 28 | Dock(QString driver_name, App::MainWindow* parent); |
---|
| 29 | bool isStarted() const { return controller; } |
---|
| 30 | private slots: |
---|
| 31 | void visibilityHook(bool visible); |
---|
[52] | 32 | }; |
---|
| 33 | |
---|
| 34 | class DriverFactory { |
---|
[53] | 35 | public: |
---|
[52] | 36 | static QList<QString> availableDrivers(); |
---|
[53] | 37 | static Dock* createDock(const QString& name, App::MainWindow* window); |
---|
| 38 | static QWidget* createController(const QString& name, QWidget* parent = 0); |
---|
[52] | 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.