File indexing completed on 2024-05-12 16:33:31
0001 /* This file is part of the KDE project 0002 0003 Copyright 2018 Dag Andersen <danders@get2net.dk> 0004 0005 This library is free software; you can redistribute it and/or 0006 modify it under the terms of the GNU Library General Public 0007 License as published by the Free Software Foundation; either 0008 version 2 of the License, or (at your option) any later version. 0009 0010 This library is distributed in the hope that it will be useful, 0011 but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0013 Library General Public License for more details. 0014 0015 You should have received a copy of the GNU Library General Public License 0016 along with this library; see the file COPYING.LIB. If not, write to 0017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0018 * Boston, MA 02110-1301, USA. 0019 */ 0020 0021 0022 #ifndef KOCHART_CONFIGSUBWIDGETBASE 0023 #define KOCHART_CONFIGSUBWIDGETBASE 0024 0025 0026 #include "ChartShape.h" 0027 0028 #include <QWidget> 0029 0030 namespace KoChart 0031 { 0032 0033 class ConfigSubWidgetBase : public QWidget 0034 { 0035 Q_OBJECT 0036 public: 0037 ConfigSubWidgetBase(QWidget *parent = 0); 0038 0039 ConfigSubWidgetBase(QList<ChartType> types, QWidget *parent = 0); 0040 0041 ~ConfigSubWidgetBase(); 0042 0043 void setChartTypes(QList<ChartType> types); 0044 0045 virtual void open(ChartShape *shape); 0046 virtual void deactivate(); 0047 0048 // reimplement to update the ui 0049 virtual void updateData(ChartType type, ChartSubtype subtype); 0050 0051 void deleteSubDialogs(ChartType type = LastChartType); 0052 0053 void blockSignals(bool block); 0054 0055 void blockSignals(QWidget *w, bool block); 0056 0057 public: 0058 ChartShape *chart; 0059 QList<ChartType> chartTypes; 0060 0061 private Q_SLOTS: 0062 void removeSubDialogs(ChartType type, ChartType prev = LastChartType); 0063 }; 0064 0065 } // namespace KoChart 0066 0067 0068 #endif // KOCHART_CONFIGSUBWIDGETBASE