diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 01:29:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-01-20 01:29:50 +0000 |
commit | 8362bf63dea22bbf6736609b0f49c152f975eb63 (patch) | |
tree | 0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kspread/dialogs/kspread_dlg_preference.h | |
download | koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip |
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspread/dialogs/kspread_dlg_preference.h')
-rw-r--r-- | kspread/dialogs/kspread_dlg_preference.h | 223 |
1 files changed, 223 insertions, 0 deletions
diff --git a/kspread/dialogs/kspread_dlg_preference.h b/kspread/dialogs/kspread_dlg_preference.h new file mode 100644 index 00000000..d23739b8 --- /dev/null +++ b/kspread/dialogs/kspread_dlg_preference.h @@ -0,0 +1,223 @@ +/* This file is part of the KDE project + Copyright (C) 2002-2004 Ariya Hidayat <[email protected]> + (C) 2002-2003 Norbert Andres <[email protected]> + (C) 2000-2003 Laurent Montel <[email protected]> + (C) 2002 John Dailey <[email protected]> + (C) 2002 Philipp Mueller <[email protected]> + (C) 2001-2002 David Faure <[email protected]> + (C) 2001 Werner Trobin <[email protected]> + (C) 2000 Bernd Johannes Wuebben <[email protected]> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. +*/ + +#ifndef __kspread_dlg_preference__ +#define __kspread_dlg_preference__ + +#include <kdialogbase.h> + +class KConfig; +class KIntNumInput; +class KDoubleNumInput; +class KSpellConfig; +class QCheckBox; +class QComboBox; +class QVGroupBox; +class QPushButton; +class KColorButton; + +namespace KSpread +{ +class Sheet; +class View; + +class parameterLocale : public QObject +{ + Q_OBJECT +public: + parameterLocale( View* _view,QVBox *box, char *name = 0); + void apply(); +public slots: + void updateDefaultSystemConfig(); + protected: + /** + * Updates the GUI widgets to match the specified locale. + */ + void updateToMatchLocale(KLocale* locale); + + QLabel *m_shortDate,*m_time,*m_money,*m_date,*m_language,*m_number; + QPushButton *m_updateButton; + View* m_pView; + bool m_bUpdateLocale; +}; + +class configure : public QObject +{ + Q_OBJECT +public: + configure( View* _view,QVBox *box, char *name = 0 ); + void apply(); + void slotDefault(); +protected: + View* m_pView; + KIntNumInput *nbPage; + KIntNumInput* nbRecentFile; + KIntNumInput* autoSaveDelay; + QCheckBox *showVScrollBar; + QCheckBox *showHScrollBar; + QCheckBox *showColHeader; + QCheckBox *showRowHeader; + QCheckBox *showTabBar; + QCheckBox *showFormulaBar; + QCheckBox *showStatusBar; + QCheckBox *m_createBackupFile; + bool m_oldBackupFile; + + KConfig* config; + int oldRecent; + int oldAutoSaveValue; +} ; + + +class miscParameters : public QObject +{ + Q_OBJECT +public: + miscParameters( View* _view, QVBox *box, char *name = 0 ); + void apply(); + void slotDefault(); + + void initComboBox(); + +public slots: + void slotTextComboChanged(const QString &); + +protected: + View* m_pView; + KDoubleNumInput *valIndent; + + /** + * Needed to ensure the same unit for loading and saving. + */ + KoUnit::Unit indentUnit; + KConfig* config; + QComboBox *typeCompletion; + QComboBox *typeCalc; + QComboBox *typeOfMove; + QCheckBox *msgError; + KIntNumInput* m_undoRedoLimit; + bool comboChanged; + int m_oldNbRedo; +} ; + +class colorParameters : public QObject +{ + Q_OBJECT +public: + colorParameters( View* _view, QVBox *box, char *name = 0 ); + void apply(); + void slotDefault(); +protected: + View* m_pView; + KColorButton* gridColor; + KColorButton* pageBorderColor; + KConfig* config; +} ; + +class configureLayoutPage : public QObject +{ + Q_OBJECT +public: + configureLayoutPage( View* _view,QVBox *box, char *name = 0 ); + void apply(); + void slotDefault(); + void initCombo(); +protected: + View* m_pView; + QComboBox *defaultOrientationPage; + QComboBox *defaultSizePage; + QComboBox *defaultUnit; + //store old config + int paper; + int orientation; + int unit; + + KConfig* config; +} ; + +class configureSpellPage : public QObject +{ + Q_OBJECT +public: + configureSpellPage( View* _view, QVBox *box, char *name = 0 ); + void apply(); + void slotDefault(); +protected: + View * m_pView; + KConfig * config; + KSpellConfig *m_spellConfigWidget; + QCheckBox *dontCheckUpperWord; + QCheckBox *dontCheckTitleCase; +} ; + +class configureTTSPage : public QObject +{ + Q_OBJECT +public: + configureTTSPage( View *_view, QVBox *box, char *name = 0 ); + void slotDefault(); + void apply(); +private slots: + void screenReaderOptionChanged(); +private: + KConfig* config; + QCheckBox* m_cbSpeakPointerWidget; + QCheckBox* m_cbSpeakFocusWidget; + QVGroupBox* m_gbScreenReaderOptions; + QCheckBox* m_cbSpeakTooltips; + QCheckBox* m_cbSpeakWhatsThis; + QCheckBox* m_cbSpeakDisabled; + QCheckBox* m_cbSpeakAccelerators; + QLabel* m_lblAcceleratorPrefix; + QLineEdit* m_leAcceleratorPrefixWord; + KIntNumInput* m_iniPollingInterval; +}; + +class PreferenceDialog : public KDialogBase +{ + Q_OBJECT +public: + enum { KS_PREFERENCES = 1, KS_LOCALE = 2, KS_INTERFACE = 4, + KS_MISC = 8, KS_COLOR = 16, KS_LAYOUT = 32, KS_SPELLING = 64 }; + PreferenceDialog( View* parent, const char* name); +public slots: + void slotApply(); + void slotDefault(); + void openPage(int flags); +private : + View* m_pView; + configure * _configure; + miscParameters *_miscParameter; + colorParameters *_colorParameter; + configureLayoutPage *_layoutPage; + configureSpellPage *_spellPage; + parameterLocale *_localePage; + configureTTSPage *_ttsPage; +}; + +} // namespace KSpread + +#endif |