File indexing completed on 2024-11-24 03:57:51

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 <TableModel.h>
0014 
0015 QT_BEGIN_NAMESPACE
0016 class QTimer;
0017 QT_END_NAMESPACE
0018 namespace KChart {
0019     class Chart;
0020     class PieDiagram;
0021 }
0022 
0023 class MainWindow : public QWidget, private Ui::MainWindow
0024 {
0025     Q_OBJECT
0026 
0027 public:
0028     MainWindow( QWidget* parent = nullptr );
0029 
0030 private Q_SLOTS:
0031     // start position
0032     void on_startPositionSB_valueChanged( double pos );
0033     void on_startPositionSL_valueChanged( int pos );
0034 
0035     // explode
0036     void on_explodeSubmitPB_clicked();
0037     void on_animateExplosionCB_toggled( bool toggle );
0038     void setExplodeFactor( int column, qreal value );
0039 
0040     // animation
0041     void slotNextFrame();
0042 
0043     // 3D
0044     void on_threeDGB_toggled( bool toggle );
0045     void on_threeDFactorSB_valueChanged( int factor );
0046 
0047 private:
0048     KChart::Chart* m_chart;
0049     TableModel m_model;
0050     KChart::PieDiagram* m_pie;
0051     QTimer* m_timer;
0052 
0053     int m_currentFactor;
0054     int m_currentDirection;
0055     int m_currentSlice;
0056 };
0057 
0058 
0059 #endif /* MAINWINDOW_H */
0060