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

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 KCHARTDATASETSELECTOR_H
0010 #define KCHARTDATASETSELECTOR_H
0011 
0012 #include <QFrame>
0013 
0014 #include "KChartDatasetProxyModel.h"
0015 
0016 
0017 /**
0018  * \cond PRIVATE_API_DOCU
0019  *
0020  * ( This class is used internally by DatasetSelectorWidget. )
0021  */
0022 QT_BEGIN_NAMESPACE
0023 namespace Ui {
0024     class DatasetSelector;
0025 }
0026 QT_END_NAMESPACE
0027 /**
0028  * \endcond
0029  */
0030 
0031 namespace KChart {
0032 
0033     class KCHART_EXPORT DatasetSelectorWidget : public QFrame
0034     {
0035         Q_OBJECT
0036 
0037     public:
0038         explicit DatasetSelectorWidget ( QWidget* parent = nullptr );
0039         ~DatasetSelectorWidget() override;
0040 
0041     public Q_SLOTS:
0042         void setSourceRowCount ( const int& rowCount );
0043         void setSourceColumnCount ( const int& columnCount );
0044 
0045     Q_SIGNALS:
0046         void configureDatasetProxyModel (
0047             const KChart::DatasetDescriptionVector& rowConfig,
0048             const KChart::DatasetDescriptionVector& columnConfig );
0049 
0050         void mappingDisabled ();
0051 
0052     private Q_SLOTS:
0053         void updateState ( bool );
0054         void calculateMapping();
0055 
0056     private:
0057         void resetDisplayValues ();
0058 
0059         Ui::DatasetSelector* mUi;
0060         int mSourceRowCount;
0061         int mSourceColumnCount;
0062     };
0063 
0064 }
0065 
0066 #endif