File indexing completed on 2024-05-12 16:35:18
0001 /* This file is part of the KDE project 0002 Copyright (C) 2002-2004 Ariya Hidayat <ariya@kde.org> 0003 (C) 2002-2003 Norbert Andres <nandres@web.de> 0004 (C) 2000-2003 Laurent Montel <montel@kde.org> 0005 (C) 2002 John Dailey <dailey@vt.edu> 0006 (C) 2002 Philipp Mueller <philipp.mueller@gmx.de> 0007 (C) 2001-2002 David Faure <faure@kde.org> 0008 (C) 2001 Werner Trobin <trobin@kde.org> 0009 (C) 2000 Bernd Johannes Wuebben <wuebben@kde.org> 0010 0011 This library is free software; you can redistribute it and/or 0012 modify it under the terms of the GNU Library General Public 0013 License as published by the Free Software Foundation; either 0014 version 2 of the License, or (at your option) any later version. 0015 0016 This library is distributed in the hope that it will be useful, 0017 but WITHOUT ANY WARRANTY; without even the implied warranty of 0018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0019 Library General Public License for more details. 0020 0021 You should have received a copy of the GNU Library General Public License 0022 along with this library; see the file COPYING.LIB. If not, write to 0023 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0024 Boston, MA 02110-1301, USA. 0025 */ 0026 0027 #ifndef CALLIGRA_SHEETS_DOCUMENT_SETTINGS_DIALOG 0028 #define CALLIGRA_SHEETS_DOCUMENT_SETTINGS_DIALOG 0029 0030 #include <QGroupBox> 0031 #include <QLabel> 0032 0033 #include <kpagedialog.h> 0034 0035 class KoVBox; 0036 class KLocale; 0037 class QCheckBox; 0038 class QSpinBox; 0039 class QComboBox; 0040 class QPushButton; 0041 0042 namespace Sonnet 0043 { 0044 } 0045 0046 namespace Calligra 0047 { 0048 namespace Sheets 0049 { 0050 class Selection; 0051 class CalculationSettings; 0052 0053 /** 0054 * \ingroup UI 0055 * Dialog page to show the calculation settings used by the document. 0056 */ 0057 class calcSettings : public QObject 0058 { 0059 Q_OBJECT 0060 public: 0061 calcSettings(Selection* selection, KoVBox *box); 0062 void apply(); 0063 protected: 0064 CalculationSettings *m_cs; 0065 QCheckBox *m_caseSensitiveCheckbox, *m_precisionAsShownCheckbox, *m_searchCriteriaMustApplyToWholeCellCheckbox, *m_automaticFindLabelsCheckbox; 0066 QComboBox *m_matchModeCombobox; 0067 QSpinBox *m_nullYearEdit; 0068 }; 0069 0070 /** 0071 * \ingroup UI 0072 * Dialog page to show the current locale used by the document. 0073 */ 0074 class parameterLocale : public QObject 0075 { 0076 Q_OBJECT 0077 public: 0078 parameterLocale(Selection* selection, KoVBox *box); 0079 void apply(); 0080 public Q_SLOTS: 0081 void updateDefaultSystemConfig(); 0082 protected: 0083 /** 0084 * Updates the GUI widgets to match the specified locale. 0085 */ 0086 void updateToMatchLocale(KLocale* locale); 0087 0088 QLabel *m_shortDate, *m_time, *m_money, *m_date, *m_language, *m_number; 0089 QPushButton *m_updateButton; 0090 Selection* m_selection; 0091 bool m_bUpdateLocale; 0092 }; 0093 0094 0095 /** 0096 * \ingroup UI 0097 * Dialog to alter document settings. 0098 */ 0099 class DocumentSettingsDialog : public KPageDialog 0100 { 0101 Q_OBJECT 0102 public: 0103 explicit DocumentSettingsDialog(Selection* selection, QWidget* parent); 0104 ~DocumentSettingsDialog() override; 0105 0106 public Q_SLOTS: 0107 void slotApply(); 0108 void slotDefault(); 0109 void slotReset(); 0110 0111 private: 0112 class Private; 0113 Private * const d; 0114 }; 0115 0116 } // namespace Sheets 0117 } // namespace Calligra 0118 0119 #endif // CALLIGRA_SHEETS_DOCUMENT_SETTINGS_DIALOG