-
Notifications
You must be signed in to change notification settings - Fork 0
/
aucrEdit.h
168 lines (141 loc) · 3.34 KB
/
aucrEdit.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
//aucrEdit.h
#ifndef AUCREDIT_H
#define AUCREDIT_H
#include <qwidget.h>
#include <qevent.h>
#include <qstring.h>
#include <qmainwindow.h>
#include <qwidgetstack.h>
#include <qmenubar.h>
#include <qpopupmenu.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qdialog.h>
#include <qtooltip.h>
#include <qmessagebox.h>
#include <qclipboard.h>
#include <qhbox.h>
#include <qlist.h>
#include <qpe/qpeapplication.h>
#include <qpe/applnk.h>
#include <qpe/fileselector.h>
#include <qpe/global.h>
#include <qpe/config.h>
#include <qpe/filemanager.h>
#include <wchar.h>
#include <stdlib.h>
#include "AUCR.h"
#include "textEdit.h"
#include "alfEdit.h"
#include "recogArea.h"
#include "editArea.h"
class textEdit;
class alfEdit;
class recogArea;
class editArea;
class MyMultiLineEdit;
class MyDialog : public QDialog
{
Q_OBJECT
public slots:
void save();
void cancel();
void discard();
signals:
public:
MyDialog( QWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 );
~MyDialog();
private:
};
class MyFileSelector : public QHBox
{
Q_OBJECT
public slots:
void reread();
signals:
void fileSelected( const DocLnk & );
void newSelected( const DocLnk & );
void closeMe();
public:
MyFileSelector( const QString & f, QWidget * parent, const char * name = 0,
bool newVisible = TRUE, bool closeVisible = TRUE );
~MyFileSelector();
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
private:
FileSelector* fileBrowse;
};
class aucrEdit : public QMainWindow
{
Q_OBJECT
public slots:
void setDocument( const QString& applnk_filename );
void newText();
void openText();
void openText( const DocLnk& );
bool saveText();
bool saveAsText();
bool changedTextSave();
void callCloseText();
void newAlphabet();
void openAlphabet();
void openAlphabet( const DocLnk& );
bool saveAlphabet();
bool saveAsAlphabet();
bool changedAlphabetSave();
void callCloseAlphabet();
void cut();
void copy();
void paste();
void deleteMe();
void selectAll();
void viewText();
void viewAlphabet();
void setClear();
void aboutQtopia();
void aboutAUCR();
void usingaucrEdit();
void checkFileMenu();
void checkEditMenu();
void checkViewMenu();
signals:
public:
aucrEdit( QWidget *parent, const char *name, WFlags f );
~aucrEdit();
void closeEvent( QCloseEvent * e );
static QString nameDialog( QString type, QString init );
static int saveDialog( QString type );
static void errorDialog( AUCR_Error type );
bool alfDirty();
bool textDirty();
void alfChanged( AUCR_Alphabet_Ptr thisAlf );
void textChanged( QString thisText );
QSize sizeHint() const;
QSizePolicy sizePolicy() const;
private:
QMenuBar* myMenu;
QPopupMenu* fileMenu;
QPopupMenu* editMenu;
QPopupMenu* viewMenu;
QPopupMenu* helpMenu;
QWidgetStack* myStack;
textEdit* TextWidget;
alfEdit* AlfWidget;
DocLnk* myAlfFile;
DocLnk* myTextFile;
AUCR_Alphabet_Ptr myAlf;
AUCR_Error error;
QString* myTextString;
MyMultiLineEdit* textbox;
recogArea* entry;
editArea* entry1;
editArea* entry2;
editArea* entry3;
FileManager* fm;
MyFileSelector* whichAlfFile;
MyFileSelector* whichTextFile;
Config* defConfig;
};
#endif //AUCREDIT_H