1 /** 2 * Copyright (C) 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved. 3 * 4 * This file is part of the KD Chart library. 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 of 9 * the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <https://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef DIAGRAMTYPEDIALOG_H 21 #define DIAGRAMTYPEDIALOG_H 22 23 #include <QDialog> 24 #include <QHash> 25 26 class QAbstractItemModel; 27 namespace KChart 28 { 29 class Chart; 30 } 31 32 class DiagramTypeDialog : public QDialog 33 { 34 Q_OBJECT 35 public: 36 enum DiagramType{ Bar, LyingBar, Line, Plotter, Pie }; 37 enum Subtype{ Normal, Percent, Stacked }; 38 explicit DiagramTypeDialog( KChart::Chart *chart, QWidget *parent = nullptr ); 39 ~DiagramTypeDialog(); 40 41 void setDefaultModels( QHash< DiagramType, QAbstractItemModel* > models ); 42 43 Q_SIGNALS: 44 void diagramTypeChanged( DiagramType, Subtype ); 45 46 private: 47 class Private; 48 Private *d; 49 }; 50 51 #endif // DIAGRAMTYPEDIALOG_H 52