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 #include <QApplication>
21 #include <KChartChart>
22 #include <KChartBarDiagram>
23 
24 
25 //class ChartWidget : public QWidget {
26 //  Q_OBJECT
27 //public:
28 //  explicit ChartWidget(QWidget* parent=0)
29 //    : QWidget(parent)
30 //  {
31 
32 //    m_model.insertRows( 0, 2, QModelIndex() );
33 //    m_model.insertColumns(  0,  3,  QModelIndex() );
34 //    for (int row = 0; row < 3; ++row) {
35 //            for (int column = 0; column < 3; ++column) {
36 //                QModelIndex index = m_model.index(row, column, QModelIndex());
37 //                m_model.setData(index, QVariant(row+1 * column) );
38 //            }
39 //    }
40 
41 //    KChart::BarDiagram* diagram = new KChart::BarDiagram;
42 //    diagram->setModel(&m_model);
43 
44 //    m_chart.coordinatePlane()->replaceDiagram(diagram);
45 
46 //    QVBoxLayout* l = new QVBoxLayout(this);
47 //    l->addWidget(&m_chart);
48 //    setLayout(l);
49 //    m_timer = new QTimer(this);
50 //    connect( m_timer, SIGNAL(timeout()),
51 //             this, SLOT(slotTimeout()) );
52 //    m_timer->start( 200 );
53 //  }
54 
55 //private Q_SLOTS:
56 //      void slotTimeout() {
57 //          QModelIndex index = m_model.index( 0, 1, QModelIndex());
58 //          qreal value = ( m_model.data( index ).toInt() % 24 ) +1;
59 //          m_model.setData( index, value );
60 //      }
61 
62 //private:
63 //  KChart::Chart m_chart;
64 //  QStandardItemModel m_model;
65 //  QTimer *m_timer;
66 //};
67 
68 #include "mainwindow.h"
69 
main(int argc,char ** argv)70 int main( int argc, char** argv ) {
71     QApplication app( argc, argv );
72 
73     //ChartWidget w;
74     MainWindow w;
75     w.show();
76 
77     return app.exec();
78 }
79 
80 //#include "main.moc"
81