Initial import.
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 bool findText(const QString &, const bool &); // find Text
30 void setupFileActions();
31 void setupEditActions();
32 void setupFormatActions();
33 void setupSettingsActions();
34 void closeEvent( QCloseEvent* );
41 void editorChanged(); // received when text() changed
42 void setText(QString); // set Text (by MapEditor)
43 void setInactive(); // Nothing can be entered
47 void textHasChanged();
48 void fontFamilyHasChanged();
49 void fontSizeHasChanged();
55 void textConvertPar();
57 QString textConvertToASCII(const QString &);
58 void textExportAsASCII();
61 void toggleFonthint();
67 void textFamily( const QString &f );
68 void textSize( const QString &p );
70 void textAlign(QAction*);
71 void fontChanged( const QFont &f );
72 void colorChanged( const QColor &c );
73 void alignmentChanged( int a );
75 void disableActions();
80 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 showwithmain; // same visibility as mainwindow?
95 QAction *actionFileLoad,
104 *actionEditDeleteAll,
105 *actionEditConvertPar,
106 *actionEditJoinLines,
107 *actionFormatUseFixedFont,
108 *actionSettingsVarFont,
109 *actionSettingsFixedFont,
110 *actionSettingsFonthintDefault,
112 *actionTextUnderline,