File indexing completed on 2024-05-12 04:20:06

0001 /**
0002  * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
0003  *
0004  * This file is part of the KD Chart library.
0005  *
0006  * SPDX-License-Identifier: GPL-2.0-or-later
0007  */
0008 
0009 #ifndef DIAGRAMTYPEDIALOG_H
0010 #define DIAGRAMTYPEDIALOG_H
0011 
0012 #include <QDialog>
0013 #include <QHash>
0014 
0015 class QAbstractItemModel;
0016 namespace KChart
0017 {
0018     class Chart;
0019 }
0020 
0021 class DiagramTypeDialog : public QDialog
0022 {
0023     Q_OBJECT
0024 public:
0025     enum DiagramType{ Bar, LyingBar, Line, Plotter, Pie };
0026     enum Subtype{ Normal, Percent, Stacked };
0027     explicit DiagramTypeDialog( KChart::Chart *chart, QWidget *parent = nullptr );
0028     ~DiagramTypeDialog() override;
0029 
0030     void setDefaultModels( QHash< DiagramType, QAbstractItemModel* > models );
0031 
0032 Q_SIGNALS:
0033     void diagramTypeChanged( DiagramTypeDialog::DiagramType, DiagramTypeDialog::Subtype );
0034 
0035 private:
0036     class Private;
0037     Private *d;
0038 };
0039 
0040 #endif // DIAGRAMTYPEDIALOG_H