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:
819 bytes
|
Line | |
---|
1 | #ifndef TEXTEDITORDOCK_H |
---|
2 | #define TEXTEDITORDOCK_H |
---|
3 | |
---|
4 | #include <QPlainTextEdit> |
---|
5 | #include <QDockWidget> |
---|
6 | #include <QSharedPointer> |
---|
7 | |
---|
8 | namespace QPunchCard { |
---|
9 | namespace Text { |
---|
10 | class EditorDock; |
---|
11 | }; |
---|
12 | }; |
---|
13 | |
---|
14 | #include "app/mainwindow.h" |
---|
15 | #include "qpunchcard/card.h" |
---|
16 | #include "text/codec.h" |
---|
17 | #include "text/editor.h" |
---|
18 | |
---|
19 | namespace QPunchCard { |
---|
20 | namespace Text { |
---|
21 | |
---|
22 | class EditorDock : public QDockWidget { |
---|
23 | Q_OBJECT |
---|
24 | |
---|
25 | App::MainWindow* main; |
---|
26 | Text::Editor* editor; |
---|
27 | QWidget* code_bar; |
---|
28 | QWidget* color_bar; |
---|
29 | public: |
---|
30 | EditorDock(App::MainWindow* parent); |
---|
31 | |
---|
32 | private: |
---|
33 | void create_code_bar(); |
---|
34 | void create_color_bar(); |
---|
35 | |
---|
36 | public slots: |
---|
37 | void setCard(DeckIndex i); |
---|
38 | void setCodec(QString by_name); |
---|
39 | void showTextConverterDialog(); |
---|
40 | |
---|
41 | signals: |
---|
42 | void cardSelected(DeckIndex i); |
---|
43 | }; |
---|
44 | |
---|
45 | }; // Namespace Text |
---|
46 | }; // Namespace QPunchCard |
---|
47 | |
---|
48 | #endif // TEXTEDITORDOCK_H |
---|
Note: See
TracBrowser
for help on using the repository browser.