Last change
on this file since 52 was
52,
checked in by sven, 14 years ago
|
Punch Card Editor: Code reordering and class renaming, rewriting.
Now using the namespace QPunchCard everywhere.
Parted the whole application into 5 parts/directories:
- app: The application core with MainWindow and main() function
- qpunchcard: Everything directly binary card related (no interpretation):
modeling, input/output, view. Most important classes
are Card, Deck, FileFormat, Widget
- text: Everything related to text interpretation of Cards/Card Decks.
Having the abstract Codec classes and the Text::Editor, Text::EditorDock
- deckviewer: Application components like binary card editing central widget
(CardEditor) and Navigator (Model View Controller classes)
- driver: Basis for the driver framework, must be written soon.
Deck now hides the complete Storage to implement frontend methods that
implement versioning (Undo framework). All code was cleaned up, but doesn't
compile right now (still quite some non heavy errors).
-- Sven @ workstation
|
File size:
1.0 KB
|
Line | |
---|
1 | #ifndef NAVIGATORDOCK_H |
---|
2 | #define NAVIGATORDOCK_H |
---|
3 | |
---|
4 | #include <QDockWidget> |
---|
5 | #include <QListView> |
---|
6 | #include <QAbstractListModel> |
---|
7 | #include <QVariant> |
---|
8 | #include <QList> |
---|
9 | #include <QSize> |
---|
10 | |
---|
11 | namespace QPunchCard { |
---|
12 | namespace Navigator { |
---|
13 | class Dock; |
---|
14 | }; |
---|
15 | }; |
---|
16 | |
---|
17 | #include "deckviewer/navigatormodel.h" |
---|
18 | #include "deckviewer/navigatorview.h" |
---|
19 | #include "app/mainwindow.h" |
---|
20 | |
---|
21 | namespace QPunchCard { |
---|
22 | namespace Navigator { |
---|
23 | |
---|
24 | class Dock : public QDockWidget { |
---|
25 | Q_OBJECT |
---|
26 | |
---|
27 | App::MainWindow* main; |
---|
28 | View* view; |
---|
29 | Model* model; |
---|
30 | friend class Model; |
---|
31 | friend class View; |
---|
32 | |
---|
33 | public: |
---|
34 | Dock(App::MainWindow* parent); |
---|
35 | |
---|
36 | public slots: |
---|
37 | void setCard(DeckIndex i); |
---|
38 | |
---|
39 | signals: |
---|
40 | void cardSelected(DeckIndex i); |
---|
41 | |
---|
42 | private slots: |
---|
43 | void cardSelected_translator(const QModelIndex& i) { |
---|
44 | qDebug("Karte i angeklickt: r=%d, c=%d", i.row(), i.column()); |
---|
45 | emit cardSelected(i.row()); |
---|
46 | } |
---|
47 | |
---|
48 | void setFlowOnLocationChange(Qt::DockWidgetArea new_area); |
---|
49 | |
---|
50 | protected: |
---|
51 | void resizeEvent(QResizeEvent* event); |
---|
52 | }; |
---|
53 | |
---|
54 | }; // namespace Navigator |
---|
55 | }; // namespace QPunchCard |
---|
56 | |
---|
57 | #endif // NAVIGATORDOCK_H |
---|
Note: See
TracBrowser
for help on using the repository browser.