kspread
kspread_dlg_preference.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __kspread_dlg_preference__
00028 #define __kspread_dlg_preference__
00029
00030 #include <kdialogbase.h>
00031
00032 class KConfig;
00033 class KIntNumInput;
00034 class KDoubleNumInput;
00035 class KSpellConfig;
00036 class QCheckBox;
00037 class QComboBox;
00038 class QVGroupBox;
00039 class QPushButton;
00040 class KColorButton;
00041
00042 namespace KSpread
00043 {
00044 class Sheet;
00045 class View;
00046
00047 class parameterLocale : public QObject
00048 {
00049 Q_OBJECT
00050 public:
00051 parameterLocale( View* _view,QVBox *box, char *name = 0);
00052 void apply();
00053 public slots:
00054 void updateDefaultSystemConfig();
00055 protected:
00059 void updateToMatchLocale(KLocale* locale);
00060
00061 QLabel *m_shortDate,*m_time,*m_money,*m_date,*m_language,*m_number;
00062 QPushButton *m_updateButton;
00063 View* m_pView;
00064 bool m_bUpdateLocale;
00065 };
00066
00067 class configure : public QObject
00068 {
00069 Q_OBJECT
00070 public:
00071 configure( View* _view,QVBox *box, char *name = 0 );
00072 void apply();
00073 void slotDefault();
00074 protected:
00075 View* m_pView;
00076 KIntNumInput *nbPage;
00077 KIntNumInput* nbRecentFile;
00078 KIntNumInput* autoSaveDelay;
00079 QCheckBox *showVScrollBar;
00080 QCheckBox *showHScrollBar;
00081 QCheckBox *showColHeader;
00082 QCheckBox *showRowHeader;
00083 QCheckBox *showTabBar;
00084 QCheckBox *showFormulaBar;
00085 QCheckBox *showStatusBar;
00086 QCheckBox *m_createBackupFile;
00087 bool m_oldBackupFile;
00088
00089 KConfig* config;
00090 int oldRecent;
00091 int oldAutoSaveValue;
00092 } ;
00093
00094
00095 class miscParameters : public QObject
00096 {
00097 Q_OBJECT
00098 public:
00099 miscParameters( View* _view, QVBox *box, char *name = 0 );
00100 void apply();
00101 void slotDefault();
00102
00103 void initComboBox();
00104
00105 public slots:
00106 void slotTextComboChanged(const QString &);
00107
00108 protected:
00109 View* m_pView;
00110 KDoubleNumInput *valIndent;
00111
00115 KoUnit::Unit indentUnit;
00116 KConfig* config;
00117 QComboBox *typeCompletion;
00118 QComboBox *typeCalc;
00119 QComboBox *typeOfMove;
00120 QCheckBox *msgError;
00121 KIntNumInput* m_undoRedoLimit;
00122 bool comboChanged;
00123 int m_oldNbRedo;
00124 } ;
00125
00126 class colorParameters : public QObject
00127 {
00128 Q_OBJECT
00129 public:
00130 colorParameters( View* _view, QVBox *box, char *name = 0 );
00131 void apply();
00132 void slotDefault();
00133 protected:
00134 View* m_pView;
00135 KColorButton* gridColor;
00136 KColorButton* pageBorderColor;
00137 KConfig* config;
00138 } ;
00139
00140 class configureLayoutPage : public QObject
00141 {
00142 Q_OBJECT
00143 public:
00144 configureLayoutPage( View* _view,QVBox *box, char *name = 0 );
00145 void apply();
00146 void slotDefault();
00147 void initCombo();
00148 protected:
00149 View* m_pView;
00150 QComboBox *defaultOrientationPage;
00151 QComboBox *defaultSizePage;
00152 QComboBox *defaultUnit;
00153
00154 int paper;
00155 int orientation;
00156 int unit;
00157
00158 KConfig* config;
00159 } ;
00160
00161 class configureSpellPage : public QObject
00162 {
00163 Q_OBJECT
00164 public:
00165 configureSpellPage( View* _view, QVBox *box, char *name = 0 );
00166 void apply();
00167 void slotDefault();
00168 protected:
00169 View * m_pView;
00170 KConfig * config;
00171 KSpellConfig *m_spellConfigWidget;
00172 QCheckBox *dontCheckUpperWord;
00173 QCheckBox *dontCheckTitleCase;
00174 } ;
00175
00176 class configureTTSPage : public QObject
00177 {
00178 Q_OBJECT
00179 public:
00180 configureTTSPage( View *_view, QVBox *box, char *name = 0 );
00181 void slotDefault();
00182 void apply();
00183 private slots:
00184 void screenReaderOptionChanged();
00185 private:
00186 KConfig* config;
00187 QCheckBox* m_cbSpeakPointerWidget;
00188 QCheckBox* m_cbSpeakFocusWidget;
00189 QVGroupBox* m_gbScreenReaderOptions;
00190 QCheckBox* m_cbSpeakTooltips;
00191 QCheckBox* m_cbSpeakWhatsThis;
00192 QCheckBox* m_cbSpeakDisabled;
00193 QCheckBox* m_cbSpeakAccelerators;
00194 QLabel* m_lblAcceleratorPrefix;
00195 QLineEdit* m_leAcceleratorPrefixWord;
00196 KIntNumInput* m_iniPollingInterval;
00197 };
00198
00199 class PreferenceDialog : public KDialogBase
00200 {
00201 Q_OBJECT
00202 public:
00203 enum { KS_PREFERENCES = 1, KS_LOCALE = 2, KS_INTERFACE = 4,
00204 KS_MISC = 8, KS_COLOR = 16, KS_LAYOUT = 32, KS_SPELLING = 64 };
00205 PreferenceDialog( View* parent, const char* name);
00206 public slots:
00207 void slotApply();
00208 void slotDefault();
00209 void openPage(int flags);
00210 private :
00211 View* m_pView;
00212 configure * _configure;
00213 miscParameters *_miscParameter;
00214 colorParameters *_colorParameter;
00215 configureLayoutPage *_layoutPage;
00216 configureSpellPage *_spellPage;
00217 parameterLocale *_localePage;
00218 configureTTSPage *_ttsPage;
00219 };
00220
00221 }
00222
00223 #endif
|