kword
KWConfig.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __kwconfig__
00021 #define __kwconfig__
00022
00023 #include <kdialogbase.h>
00024
00025 namespace KFormula {
00026 class ConfigurePage;
00027 }
00028
00029 class KWView;
00030 class QCheckBox;
00031 class KIntNumInput;
00032 class KoUnitDoubleSpinBox;
00033 class KConfig;
00034 class QComboBox;
00035 class KIntNumInput;
00036 class KCommand;
00037 class KWDocument;
00038 class KListView;
00039 class QVGroupBox;
00040 class QLabel;
00041
00042 namespace KSpell2 {
00043 class ConfigWidget;
00044 }
00045
00046 class ConfigureSpellPage : public QObject
00047 {
00048 Q_OBJECT
00049 public:
00050 ConfigureSpellPage( KWView *view, QVBox *box, char *name = 0 );
00051 void apply();
00052 void slotDefault();
00053 private:
00054 KWView* m_pView;
00055 KConfig* config;
00056 KSpell2::ConfigWidget *m_spellConfigWidget;
00057 };
00058
00059 class ConfigureInterfacePage : public QObject
00060 {
00061 Q_OBJECT
00062 public:
00063 ConfigureInterfacePage( KWView *view, QVBox *box, char *name = 0 );
00064 void apply();
00065 void slotDefault();
00066 void setUnit( KoUnit::Unit unit );
00067
00068 signals:
00069
00070 void unitChanged( int );
00071 private:
00072 KWView* m_pView;
00073 KConfig* config;
00074 QComboBox *m_unitCombo;
00075 KoUnitDoubleSpinBox* gridX,*gridY;
00076 KoUnitDoubleSpinBox* indent;
00077 KIntNumInput* recentFiles;
00078 QCheckBox *showStatusBar, *showScrollBar, *pgUpDownMovesCaret;
00079 int oldNbRecentFiles;
00080 KIntNumInput *m_nbPagePerRow;
00081 };
00082
00083 class ConfigureMiscPage : public QObject
00084 {
00085 Q_OBJECT
00086 public:
00087 ConfigureMiscPage( KWView *view, QVBox *box, char *name = 0 );
00088 KCommand* apply();
00089 void slotDefault();
00090 void setUnit( KoUnit::Unit unit );
00091 private:
00092 KWView* m_pView;
00093 KConfig* config;
00094 KIntNumInput* m_undoRedoLimit;
00095 int m_oldNbRedo;
00096 bool m_oldFormattingEndParag, m_oldFormattingSpace, m_oldFormattingTabs, m_oldFormattingBreak;
00097 QCheckBox* m_displayLink, *m_displayComment, *m_underlineLink, *m_displayFieldCode;
00098 QCheckBox* m_cbViewFormattingEndParag, *m_cbViewFormattingSpace;
00099 QCheckBox* m_cbViewFormattingTabs, *m_cbViewFormattingBreak;
00100 };
00101
00102 class ConfigureDefaultDocPage : public QObject
00103 {
00104 Q_OBJECT
00105 public:
00106 ConfigureDefaultDocPage( KWView *view, QVBox *box, char *name = 0 );
00107 ~ConfigureDefaultDocPage();
00108 KCommand* apply();
00109 void slotDefault();
00110 void setUnit( KoUnit::Unit unit );
00111 public slots:
00112 void selectNewDefaultFont();
00113 private:
00114 KWView* m_pView;
00115 KConfig* config;
00116 QFont *font;
00117 QLabel *fontName;
00118 QLabel *tabStop;
00119
00120 KoUnitDoubleSpinBox* m_columnSpacing;
00121
00122 KIntNumInput* autoSave;
00123 int oldAutoSaveValue;
00124 double m_oldTabStopWidth;
00125
00126 int m_oldStartingPage;
00127 bool m_oldBackupFile;
00128 KIntNumInput* m_variableNumberOffset;
00129 KoUnitDoubleSpinBox *m_tabStopWidth;
00130 QCheckBox *m_cursorInProtectedArea;
00131 QCheckBox *m_createBackupFile;
00132
00133 QCheckBox *m_autoHyphenation;
00134 QComboBox *m_globalLanguage;
00135 QString m_oldLanguage;
00136 bool m_oldHyphenation;
00137 };
00138
00139 class ConfigurePathPage : public QObject
00140 {
00141 Q_OBJECT
00142 public:
00143 ConfigurePathPage( KWView *view, QVBox *box, char *name = 0 );
00144 void slotDefault();
00145 void apply();
00146 private slots:
00147 void slotModifyPath();
00148 void slotSelectionChanged(QListViewItem *);
00149 private:
00150 KWView* m_pView;
00151 KConfig* config;
00152 KListView* m_pPathView;
00153 QPushButton *m_modifyPath;
00154 };
00155
00156 class ConfigureTTSPage : public QObject
00157 {
00158 Q_OBJECT
00159 public:
00160 ConfigureTTSPage( KWView *view, QVBox *box, char *name = 0 );
00161 void slotDefault();
00162 void apply();
00163 private slots:
00164 void screenReaderOptionChanged();
00165 private:
00166 KConfig* config;
00167 QCheckBox* m_cbSpeakPointerWidget;
00168 QCheckBox* m_cbSpeakFocusWidget;
00169 QVGroupBox* m_gbScreenReaderOptions;
00170 QCheckBox* m_cbSpeakTooltips;
00171 QCheckBox* m_cbSpeakWhatsThis;
00172 QCheckBox* m_cbSpeakDisabled;
00173 QCheckBox* m_cbSpeakAccelerators;
00174 QLabel* m_lblAcceleratorPrefix;
00175 QLineEdit* m_leAcceleratorPrefixWord;
00176 KIntNumInput* m_iniPollingInterval;
00177 };
00178
00179 class KWConfig : public KDialogBase
00180 {
00181 Q_OBJECT
00182 public:
00183 enum { KW_KSPELL=1,KP_INTERFACE=2,KP_MISC=4, KP_DOCUMENT=8, KP_FORMULA=16, KP_PATH = 32};
00184 KWConfig( KWView* parent );
00185 void openPage(int flags);
00186 public slots:
00187 void slotApply();
00188 void slotDefault();
00189 void unitChanged( int );
00190 private:
00191 ConfigureSpellPage *m_spellPage;
00192 ConfigureInterfacePage *m_interfacePage;
00193 ConfigureMiscPage *m_miscPage;
00194 ConfigureDefaultDocPage *m_defaultDocPage;
00195 KFormula::ConfigurePage *m_formulaPage;
00196 ConfigurePathPage *m_pathPage;
00197 ConfigureTTSPage *m_ttsPage;
00198 KWDocument *m_doc;
00199 };
00200
00201
00202
00203 #endif
|