File indexing completed on 2024-05-26 04:23:41

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 MAINWINDOW_H
0010 #define MAINWINDOW_H
0011 
0012 #include "ui_mainwindow.h"
0013 #include <QStandardItemModel>
0014 
0015 namespace KChart {
0016     class Chart;
0017     class DatasetProxyModel;
0018     class PolarDiagram;
0019     class PolarCoordinatePlane;
0020 }
0021 
0022 class MainWindow : public QWidget, private Ui::MainWindow
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     MainWindow( QWidget* parent = nullptr );
0028 
0029 private Q_SLOTS:
0030     // start position of circular grid
0031     void on_startPositionSB_valueChanged( double pos );
0032     void on_startPositionSL_valueChanged( int pos );
0033 
0034     // show grid
0035     void on_circularGridCB_toggled( bool toggle );
0036     void on_sagittalGridCB_toggled( bool toggle );
0037 
0038     /* planned for future release:
0039     // show axes
0040     void on_circularAxisCB_toggled( bool toggle );
0041     void on_sagittalAxisCB_toggled( bool toggle );
0042     */
0043 
0044 private:
0045     void initKChartClasses();
0046     void wireUpKChartClasses();
0047     void setItemModelData();
0048 
0049     // For a change we do not use our special TableModel here,
0050     // but we just use the standard model that comes with Qt.
0051     QStandardItemModel m_model;
0052 
0053     KChart::Chart* m_chart;
0054     KChart::PolarDiagram* m_diagram;
0055     KChart::PolarCoordinatePlane* m_polarPlane;
0056 
0057     int m_currentFactor;
0058     int m_currentDirection;
0059     int m_currentSlice;
0060 };
0061 
0062 
0063 #endif /* MAINWINDOW_H */