6 enum EditorState {inactiveEditor,emptyEditor,filledEditor};
10 class TextEditor : public QMainWindow {
17 void setShowWithMain (bool);
19 void setFontHint(const QString&);
20 QString getFontHint();
21 QString getFontHintDefault();
22 void setFilename (const QString&);
23 QString getFilename ();
24 void setFilenameHint (const QString&);
25 QString getFilenameHint ();
26 bool findText(const QString &, const QTextDocument::FindFlags &); // find Text
29 void setupFileActions();
30 void setupEditActions();
31 void setupFormatActions();
32 void setupSettingsActions();
33 void closeEvent( QCloseEvent* );
40 void editorChanged(); // received when text() changed
41 void setText(QString); // set Text (by MapEditor)
42 void setInactive(); // Nothing can be entered
46 void textHasChanged();
47 void textEditorClosed();
48 void fontFamilyHasChanged();
49 void fontSizeHasChanged();
55 void textExportAsASCII();
58 void toggleFonthint();
64 void textFamily( const QString &f );
65 void textSize( const QString &p );
67 void textAlign(QAction*);
69 void fontChanged( const QFont &f );
70 void colorChanged( const QColor &c );
71 void formatChanged (const QTextCharFormat &f);
72 void alignmentChanged( int a );
73 void verticalAlignmentChanged(QTextCharFormat::VerticalAlignment);
75 void disableActions();
76 void setState (EditorState);
81 QPoint lastPos; // save last position of window
85 QBrush emptyPaper; // setting the background color
86 QBrush filledPaper; // depending on the state
87 QBrush inactivePaper; // depending on the state
89 bool showwithmain; // same visibility as mainwindow?
93 QComboBox *comboFont, *comboSize;
95 QAction *actionFileLoad,
104 *actionEditDeleteAll,
105 *actionFormatUseFixedFont,
106 *actionSettingsVarFont,
107 *actionSettingsFixedFont,
108 *actionSettingsFonthintDefault,
110 *actionTextUnderline,
113 *actionAlignSubScript,
114 *actionAlignSuperScript,