kpresenter

KPrConfig.h

00001 // -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
00002 /* This file is part of the KDE project
00003    Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
00004    Copyright (C) 2005 Thorsten Zachmann <zachmann@kde.org>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef __kpresenter_dlg_config__
00023 #define __kpresenter_dlg_config__
00024 
00025 #include <kdialogbase.h>
00026 
00027 class KPrView;
00028 class KPrDocument;
00029 class KIntNumInput;
00030 class KColorButton;
00031 class KConfig;
00032 class QCheckBox;
00033 class KLineEdit;
00034 class KDoubleNumInput;
00035 class KoSpellConfigWidget;
00036 class KPrPenStyleWidget;
00037 class KPrBrushProperty;
00038 class KPrRectProperty;
00039 class KPrPolygonProperty;
00040 class KPrPieProperty;
00041 class KoUnitDoubleSpinBox;
00042 class QVGroupBox;
00043 
00044 namespace KSpell2 {
00045     class ConfigWidget;
00046 }
00047 
00048 
00049 class KPrConfigureInterfacePage : public QWidget
00050 {
00051     Q_OBJECT
00052 public:
00053     KPrConfigureInterfacePage( KPrView *_view, QWidget *parent = 0, char *name = 0 );
00054     void apply();
00055     void slotDefault();
00056 private:
00057     KPrView* m_pView;
00058     KConfig* config;
00059     int oldNbRecentFiles;
00060     KDoubleNumInput* indent;
00061     KIntNumInput* recentFiles;
00062     QCheckBox *showRuler, *showStatusBar;
00063 };
00064 
00065 class KPrConfigureColorBackground : public QWidget
00066 {
00067     Q_OBJECT
00068 public:
00069     KPrConfigureColorBackground( KPrView* _view, QWidget *parent = 0, char *name = 0 );
00070     void apply();
00071     void slotDefault();
00072 protected:
00073     KPrView* m_pView;
00074     KColorButton* bgColor;
00075     KColorButton* gridColor;
00076     KConfig* config;
00077     QColor oldBgColor;
00078     QColor oldGridColor;
00079 } ;
00080 
00081 class KPrConfigureSpellPage : public QWidget
00082 {
00083     Q_OBJECT
00084 public:
00085     KPrConfigureSpellPage( KPrView *_view, QWidget *parent, char *name = 0 );
00086     void apply();
00087     void slotDefault();
00088 private:
00089     KPrView* m_pView;
00090     KSpell2::ConfigWidget *m_spellConfigWidget;
00091     KConfig* config;
00092 };
00093 
00094 class KPrConfigureMiscPage : public QWidget
00095 {
00096     Q_OBJECT
00097 public:
00098     KPrConfigureMiscPage( KPrView  *_view, QWidget *parent, char *name = 0 );
00099     KCommand *apply();
00100     void slotDefault();
00101 private:
00102     KPrView* m_pView;
00103     KConfig* config;
00104     KIntNumInput* m_undoRedoLimit;
00105     int m_oldNbRedo;
00106     bool m_printNotes;
00107     QCheckBox* m_displayLink, *m_displayComment, *m_underlineLink, *m_displayFieldCode, *m_cbPrintNotes;
00108     KoUnitDoubleSpinBox * resolutionY, * resolutionX;
00109     KDoubleNumInput *m_rotation;
00110 };
00111 
00112 class KPrConfigureDefaultDocPage : public QWidget
00113 {
00114     Q_OBJECT
00115 public:
00116     KPrConfigureDefaultDocPage( KPrView  *_view, QWidget *parent, char *name = 0 );
00117     ~KPrConfigureDefaultDocPage();
00118     KCommand *apply();
00119     void slotDefault();
00120 public slots:
00121     void selectNewDefaultFont();
00122 private:
00123     int oldAutoSaveValue;
00124     int m_oldStartingPage;
00125     double m_oldTabStopWidth;
00126     bool m_oldBackupFile;
00127     QString m_oldLanguage;
00128     KPrView* m_pView;
00129     KConfig* config;
00130     QFont *font;
00131     QLabel *fontName;
00132     KIntNumInput* autoSave;
00133     KIntNumInput* m_variableNumberOffset;
00134     KoUnitDoubleSpinBox *m_tabStopWidth;
00135     QCheckBox *m_cursorInProtectedArea;
00136     QCheckBox *m_createBackupFile;
00137     QCheckBox *m_directInsertCursor;
00138     QComboBox *m_globalLanguage;
00139     QCheckBox *m_autoHyphenation;
00140     bool m_oldHyphenation;
00141 };
00142 
00143 class KPrConfigureToolsPage : public QWidget
00144 {
00145     Q_OBJECT
00146 public:
00147     KPrConfigureToolsPage( KPrView  *_view, QWidget *parent, char *name = 0 );
00148     ~KPrConfigureToolsPage();
00149     void apply();
00150     void slotDefault();
00151 public slots:
00152 
00153 private:
00154     KPrView* m_pView;
00155     KConfig* config;
00156 
00157     KPrPenStyleWidget *m_confPenDia;
00158     KPrBrushProperty *m_brushProperty;
00159     KPrRectProperty *m_rectProperty;
00160     KPrPolygonProperty *m_polygonProperty;
00161     KPrPieProperty *m_pieProperty;
00162 };
00163 
00164 class KPrConfigurePathPage : public QWidget
00165 {
00166     Q_OBJECT
00167 public:
00168     KPrConfigurePathPage( KPrView *_view, QWidget *parent, char *name = 0 );
00169     void slotDefault();
00170     void apply();
00171 private slots:
00172     void slotModifyPath();
00173     void slotSelectionChanged(QListViewItem *);
00174 private:
00175     KPrView* m_pView;
00176     KConfig* config;
00177     KListView* m_pPathView;
00178     QPushButton *m_modifyPath;
00179 };
00180 
00181 class KPrConfigureTTSPage : public QWidget
00182 {
00183   Q_OBJECT
00184 public:
00185   KPrConfigureTTSPage( KPrView *_view, QWidget *parent, char *name = 0 );
00186   void slotDefault();
00187   void apply();
00188 private slots:
00189   void screenReaderOptionChanged();
00190 private:
00191   KConfig* config;
00192   QCheckBox* m_cbSpeakPointerWidget;
00193   QCheckBox* m_cbSpeakFocusWidget;
00194   QVGroupBox* m_gbScreenReaderOptions;
00195   QCheckBox* m_cbSpeakTooltips;
00196   QCheckBox* m_cbSpeakWhatsThis;
00197   QCheckBox* m_cbSpeakDisabled;
00198   QCheckBox* m_cbSpeakAccelerators;
00199   QLabel* m_lblAcceleratorPrefix;
00200   QLineEdit* m_leAcceleratorPrefixWord;
00201   KIntNumInput* m_iniPollingInterval;
00202 };
00203 
00204 
00205 class KPrConfig : public KDialogBase
00206 {
00207     Q_OBJECT
00208 public:
00209     enum { KP_INTERFACE = 1, KP_COLOR=2, KP_KSPELL=4,KP_MISC=8, KP_DOC=16, KP_TOOLS=32,KP_PATH = 64 };
00210     KPrConfig( KPrView* parent );
00211 public slots:
00212     void slotApply();
00213     void slotDefault();
00214     void openPage(int flags);
00215 private:
00216     KPrConfigureInterfacePage *_interfacePage;
00217     KPrConfigureColorBackground *_colorBackground;
00218     KPrConfigureSpellPage *_spellPage;
00219     KPrConfigureMiscPage *_miscPage;
00220     KPrConfigureDefaultDocPage *_defaultDocPage;
00221     KPrConfigureToolsPage *_toolsPage;
00222     KPrConfigurePathPage *m_pathPage;
00223     KPrConfigureTTSPage *m_ttsPage;
00224     KPrDocument* m_doc;
00225 
00226 };
00227 
00228 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys