4 #include <qmainwindow.h>
7 #include <qfontdatabase.h>
11 enum EditorState {inactiveEditor,emptyEditor,filledEditor};
13 QString textConvertToASCII(const QString &);
15 class TextEditor : public QMainWindow {
22 void setShowWithMain (bool);
24 void setFontHint(const QString&);
25 QString getFontHint();
26 QString getFontHintDefault();
27 void setFilename (const QString&);
28 QString getFilename ();
29 void setFilenameHint (const QString&);
30 QString getFilenameHint ();
31 bool findText(const QString &, const bool &); // find Text
34 void setupFileActions();
35 void setupEditActions();
36 void setupFormatActions();
37 void setupSettingsActions();
38 void closeEvent( QCloseEvent* );
45 void editorChanged(); // received when text() changed
46 void setText(QString); // set Text (by MapEditor)
47 void setInactive(); // Nothing can be entered
51 void textHasChanged();
52 void fontFamilyHasChanged();
53 void fontSizeHasChanged();
59 void textConvertPar();
61 void textExportAsASCII();
64 void toggleFonthint();
70 void textFamily( const QString &f );
71 void textSize( const QString &p );
73 void textAlign(QAction*);
74 void fontChanged( const QFont &f );
75 void colorChanged( const QColor &c );
76 void alignmentChanged( int a );
78 void disableActions();
83 QPoint lastPos; // save last position of window
87 QBrush emptyPaper; // setting the background color
88 QBrush filledPaper; // depending on the state
89 QBrush inactivePaper; // depending on the state
91 bool showwithmain; // same visibility as mainwindow?
99 QAction *actionFileLoad,
108 *actionEditDeleteAll,
109 *actionEditConvertPar,
110 *actionEditJoinLines,
111 *actionFormatUseFixedFont,
112 *actionSettingsVarFont,
113 *actionSettingsFixedFont,
114 *actionSettingsFonthintDefault,
116 *actionTextUnderline,