File indexing completed on 2024-05-12 16:35:26
0001 /* This file is part of the KDE project 0002 Copyright 2007 Stefan Nikolaus <stefan.nikolaus@kdemail.net> 0003 Copyright 2003 Laurent Montel <montel@kde.org> 0004 Copyright 2003 Norbert Andres <nandres@web.de> 0005 0006 This library is free software; you can redistribute it and/or 0007 modify it under the terms of the GNU Library General Public 0008 License as published by the Free Software Foundation; either 0009 version 2 of the License, or (at your option) any later version. 0010 0011 This library is distributed in the hope that it will be useful, 0012 but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 Library General Public License for more details. 0015 0016 You should have received a copy of the GNU Library General Public License 0017 along with this library; see the file COPYING.LIB. If not, write to 0018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0019 Boston, MA 02110-1301, USA. 0020 */ 0021 0022 #ifndef CALLIGRA_SHEETS_STYLE_MANAGER_DIALOG 0023 #define CALLIGRA_SHEETS_STYLE_MANAGER_DIALOG 0024 0025 #include <KoDialog.h> 0026 0027 class QPushButton; 0028 class QTreeWidget; 0029 class QTreeWidgetItem; 0030 0031 class KComboBox; 0032 0033 namespace Calligra 0034 { 0035 namespace Sheets 0036 { 0037 class Selection; 0038 class StyleManager; 0039 0040 /** 0041 * \ingroup UI 0042 * Dialog to manage names cell styles. 0043 */ 0044 class StyleManagerDialog : public KoDialog 0045 { 0046 Q_OBJECT 0047 0048 public: 0049 StyleManagerDialog(QWidget* parent, Selection* selection, StyleManager* manager); 0050 ~StyleManagerDialog() override; 0051 0052 protected Q_SLOTS: 0053 void slotOk(); 0054 void slotNew(); 0055 void slotEdit(); 0056 void slotRemove(); 0057 void slotDisplayMode(int mode); 0058 void selectionChanged(QTreeWidgetItem*); 0059 0060 private: 0061 void fillComboBox(); 0062 0063 private: 0064 Selection* m_selection; 0065 StyleManager* m_styleManager; 0066 QTreeWidget* m_styleList; 0067 KComboBox* m_displayBox; 0068 QPushButton* m_newButton; 0069 QPushButton* m_modifyButton; 0070 QPushButton* m_deleteButton; 0071 }; 0072 0073 } // namespace Sheets 0074 } // namespace Calligra 0075 0076 #endif // CALLIGRA_SHEETS_STYLE_MANAGER_DIALOG