6 enum EditorState {inactiveEditor,emptyEditor,filledEditor};
10 class TextEditor : public QMainWindow {
17 void setFontHint(const QString&);
18 QString getFontHint();
19 QString getFontHintDefault();
20 void setFilename (const QString&);
21 QString getFilename ();
22 void setFilenameHint (const QString&);
23 QString getFilenameHint ();
24 bool findText(const QString &, const QTextDocument::FindFlags &); // find Text
27 void setupFileActions();
28 void setupEditActions();
29 void setupFormatActions();
30 void setupSettingsActions();
31 void closeEvent( QCloseEvent* );
38 void editorChanged(); // received when text() changed
39 void setText(QString); // set Text (by MapEditor)
40 void setInactive(); // Nothing can be entered
44 void textHasChanged();
46 void fontFamilyHasChanged();
47 void fontSizeHasChanged();
53 void textExportAsASCII();
56 void toggleFonthint();
62 void textFamily( const QString &f );
63 void textSize( const QString &p );
65 void textAlign(QAction*);
67 void fontChanged( const QFont &f );
68 void colorChanged( const QColor &c );
69 void formatChanged (const QTextCharFormat &f);
70 void alignmentChanged( int a );
71 void verticalAlignmentChanged(QTextCharFormat::VerticalAlignment);
73 void disableActions();
74 void setState (EditorState);
79 QPoint lastPos; // save last position of window
83 QBrush emptyPaper; // setting the background color
84 QBrush filledPaper; // depending on the state
85 QBrush inactivePaper; // depending on the state
87 bool blockChangedSignal;
91 QComboBox *comboFont, *comboSize;
93 QAction *actionFileLoad,
102 *actionEditDeleteAll,
103 *actionFormatUseFixedFont,
104 *actionSettingsVarFont,
105 *actionSettingsFixedFont,
106 *actionSettingsFonthintDefault,
108 *actionTextUnderline,
111 *actionAlignSubScript,
112 *actionAlignSuperScript,