6 enum EditorState {inactiveEditor,emptyEditor,filledEditor};
10 class TextEditor : public QMainWindow {
18 void setShowWithMain (bool);
20 void setFontHint(const QString&);
21 QString getFontHint();
22 QString getFontHintDefault();
23 void setFilename (const QString&);
24 QString getFilename ();
25 void setFilenameHint (const QString&);
26 QString getFilenameHint ();
29 void setNote(const NoteObj ¬e);
31 bool findText(const QString &, const QTextDocument::FindFlags &);
32 bool findText(const QString &, const QTextDocument::FindFlags &,int i);
33 void setTextCursor (const QTextCursor & cursor );
34 QTextCursor getTextCursor();
37 void setupFileActions();
38 void setupEditActions();
39 void setupFormatActions();
40 void setupSettingsActions();
41 void closeEvent( QCloseEvent* );
45 void editorChanged(); // received when text() changed
46 void setText(const QString &); // set Text (by MapEditor)
47 void setInactive(); // Nothing can be entered
51 void textHasChanged();
53 void fontFamilyHasChanged();
54 void fontSizeHasChanged();
60 void textExportAsASCII();
63 void toggleFonthint();
69 void textFamily( const QString &f );
70 void textSize( const QString &p );
72 void textAlign(QAction*);
74 void fontChanged( const QFont &f );
75 void colorChanged( const QColor &c );
76 void formatChanged (const QTextCharFormat &f);
77 void alignmentChanged( int a );
78 void verticalAlignmentChanged(QTextCharFormat::VerticalAlignment);
80 void disableActions();
81 void setState (EditorState);
86 QPoint lastPos; // save last position of window
90 QBrush emptyPaper; // setting the background color
91 QBrush filledPaper; // depending on the state
92 QBrush inactivePaper; // depending on the state
94 bool showwithmain; // same visibility as mainwindow?
95 bool blockChangedSignal;
99 QComboBox *comboFont, *comboSize;
101 QAction *actionFileLoad,
110 *actionEditDeleteAll,
111 *actionFormatUseFixedFont,
112 *actionSettingsVarFont,
113 *actionSettingsFixedFont,
114 *actionSettingsFonthintDefault,
116 *actionTextUnderline,
119 *actionAlignSubScript,
120 *actionAlignSuperScript,