4 #include <qmainwindow.h>
7 #include <qfontdatabase.h>
11 enum EditorState {inactiveEditor,emptyEditor,filledEditor};
13 class TextEditor : public QMainWindow {
20 void setShowWithMain (bool);
22 void setFontHint(const QString&);
23 QString getFontHint();
24 QString getFontHintDefault();
25 void setFilename (const QString&);
26 QString getFilename ();
27 void setFilenameHint (const QString&);
28 QString getFilenameHint ();
29 bool findText(const QString &, const bool &); // find Text
32 void setupFileActions();
33 void setupEditActions();
34 void setupFormatActions();
35 void setupSettingsActions();
36 void closeEvent( QCloseEvent* );
43 void editorChanged(); // received when text() changed
44 void setText(QString); // set Text (by MapEditor)
45 void setInactive(); // Nothing can be entered
49 void textHasChanged();
50 void fontFamilyHasChanged();
51 void fontSizeHasChanged();
57 void textConvertPar();
59 QString textConvertToASCII(const QString &);
60 void textExportAsASCII();
63 void toggleFonthint();
69 void textFamily( const QString &f );
70 void textSize( const QString &p );
72 void textAlign(QAction*);
73 void fontChanged( const QFont &f );
74 void colorChanged( const QColor &c );
75 void alignmentChanged( int a );
77 void disableActions();
82 QPoint lastPos; // save last position of window
86 QBrush emptyPaper; // setting the background color
87 QBrush filledPaper; // depending on the state
88 QBrush inactivePaper; // depending on the state
90 bool showwithmain; // same visibility as mainwindow?
98 QAction *actionFileLoad,
107 *actionEditDeleteAll,
108 *actionEditConvertPar,
109 *actionEditJoinLines,
110 *actionFormatUseFixedFont,
111 *actionSettingsVarFont,
112 *actionSettingsFixedFont,
113 *actionSettingsFonthintDefault,
115 *actionTextUnderline,