kspread

ApplicationSettings.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright 2008 Stefan Nikolaus <stefan.nikolaus@kdemail.net>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KSPREADAPPLICATIONSETTINGS
00021 #define KSPREADAPPLICATIONSETTINGS
00022 
00023 #include <KGlobalSettings>
00024 
00025 #include <QColor>
00026 #include <QObject>
00027 
00028 #include "Global.h"
00029 #include "kspread_export.h"
00030 
00031 namespace KSpread
00032 {
00033 
00037 class KSPREAD_EXPORT ApplicationSettings : public QObject
00038 {
00039     Q_OBJECT
00040     Q_PROPERTY(bool showVerticalScrollBar READ showVerticalScrollBar WRITE setShowVerticalScrollBar)
00041     Q_PROPERTY(bool showHorizontalScrollBar READ showHorizontalScrollBar WRITE setShowHorizontalScrollBar)
00042     Q_PROPERTY(bool showColumnHeader READ showColumnHeader WRITE setShowColumnHeader)
00043     Q_PROPERTY(bool showRowHeader READ showRowHeader WRITE setShowRowHeader)
00044     Q_PROPERTY(bool showStatusBar READ showStatusBar WRITE setShowStatusBar)
00045     Q_PROPERTY(bool showTabBar READ showTabBar WRITE setShowTabBar)
00046 
00047 public:
00051     ApplicationSettings();
00052 
00056     ~ApplicationSettings();
00057 
00058     void load();
00059     void save() const;
00060 
00065     void setShowVerticalScrollBar(bool enable);
00066 
00070     bool showVerticalScrollBar() const;
00071 
00076     void setShowHorizontalScrollBar(bool enable);
00077 
00081     bool showHorizontalScrollBar() const;
00082 
00087     void setShowColumnHeader(bool enable);
00088 
00092     bool showColumnHeader() const;
00093 
00098     void setShowRowHeader(bool enable);
00099 
00103     bool showRowHeader() const;
00104 
00108     void setGridColor(const QColor& color);
00109 
00113     QColor gridColor() const;
00114 
00118     void setIndentValue(double val);
00119 
00123     double indentValue() const;
00124 
00129     void setShowStatusBar(bool enable);
00130 
00134     bool showStatusBar() const;
00135 
00140     void setShowTabBar(bool enable);
00141 
00145     bool showTabBar() const;
00146 
00150     KGlobalSettings::Completion completionMode() const;
00151 
00156     void setCompletionMode(KGlobalSettings::Completion mode);
00157 
00158     KSpread::MoveTo moveToValue() const;
00159     void setMoveToValue(KSpread::MoveTo moveTo);
00160 
00164     void setTypeOfCalc(MethodOfCalc calc);
00165     MethodOfCalc getTypeOfCalc() const;
00166 
00167     QColor pageBorderColor() const;
00168     void changePageBorderColor(const QColor& color);
00169 
00170     void setCaptureAllArrowKeys(bool capture);
00171     bool captureAllArrowKeys() const;
00172 
00173 private:
00174     class Private;
00175     Private * const d;
00176 };
00177 
00178 } // namespace KSpread
00179 
00180 #endif // KSPREADAPPLICATIONSETTINGS