File indexing completed on 2024-05-12 16:35:23
0001 /* This file is part of the KDE project 0002 Copyright 2007 Stefan Nikolaus <stefan.nikolaus@kdemail.net> 0003 Copyright 2002-2003 Norbert Andres <nandres@web.de> 0004 Copyright 2002 Ariya Hidayat <ariya@kde.org> 0005 Copyright 2002 Harri Porten <porten@kde.org> 0006 Copyright 2002 John Dailey <dailey@vt.edu> 0007 Copyright 1999-2002 Laurent Montel <montel@kde.org> 0008 Copyright 2001-2002 Philipp Mueller <philipp.mueller@gmx.de> 0009 Copyright 1998-2000 Torben Weis <weis@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_NAMED_AREA_DIALOG 0028 #define CALLIGRA_SHEETS_NAMED_AREA_DIALOG 0029 0030 #include <KoDialog.h> 0031 0032 class KComboBox; 0033 class QLabel; 0034 class KLineEdit; 0035 class QPushButton; 0036 class QListWidget; 0037 0038 namespace Calligra 0039 { 0040 namespace Sheets 0041 { 0042 class Region; 0043 class Selection; 0044 0045 /** 0046 * \ingroup UI 0047 * Dialog to manage named areas. 0048 */ 0049 class NamedAreaDialog : public KoDialog 0050 { 0051 Q_OBJECT 0052 0053 public: 0054 NamedAreaDialog(QWidget* parent, Selection* selection); 0055 0056 public Q_SLOTS: 0057 void slotOk(); 0058 void slotClose(); 0059 void slotNew(); 0060 void slotEdit(); 0061 void slotRemove(); 0062 void displayAreaValues(const QString& name); 0063 0064 private: 0065 Selection* m_selection; 0066 QListWidget* m_list; 0067 QLabel* m_rangeName; 0068 QPushButton* m_newButton; 0069 QPushButton* m_editButton; 0070 QPushButton* m_removeButton; 0071 }; 0072 0073 0074 /** 0075 * \ingroup UI 0076 * Dialog to edit a named area. 0077 */ 0078 class EditNamedAreaDialog : public KoDialog 0079 { 0080 Q_OBJECT 0081 0082 public: 0083 EditNamedAreaDialog(QWidget* parent, Selection* selection); 0084 ~EditNamedAreaDialog() override; 0085 0086 QString areaName() const; 0087 void setAreaName(const QString& areaname); 0088 void setRegion(const Region& region); 0089 0090 public Q_SLOTS: 0091 void slotOk(); 0092 void slotAreaNameModified(const QString&); 0093 0094 private: 0095 Selection* m_selection; 0096 KLineEdit* m_areaNameEdit; 0097 KComboBox* m_sheets; 0098 KLineEdit* m_cellRange; 0099 QString m_initialAreaName; 0100 }; 0101 0102 } // namespace Sheets 0103 } // namespace Calligra 0104 0105 #endif // CALLIGRA_SHEETS_NAMED_AREA_DIALOG