1
/****************************************************************************
2
** Copyright (C) 2006 Klarälvdalens Datakonsult AB. All rights reserved.
4
** This file is part of the KD Chart library.
6
** This file may be used under the terms of the GNU General Public
7
** License versions 2.0 or 3.0 as published by the Free Software
8
** Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
9
** included in the packaging of this file. Alternatively you may (at
10
** your option) use any later version of the GNU General Public
11
** License if such license has been publicly approved by
12
** Klarälvdalens Datakonsult AB (or its successors, if any).
14
** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
15
** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
16
** A PARTICULAR PURPOSE. Klarälvdalens Datakonsult AB reserves all rights
17
** not expressly granted herein.
19
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22
**********************************************************************/
24
#include <QApplication>
25
#include <KDChartWidget>
30
#include "mainwindow.h"
32
using namespace KDChart;
34
int main( int argc, char** argv ) {
35
QApplication app( argc, argv );
39
window.resize( 800, 600 );
41
QVector< double > vec0;
53
window.widget->setDataset( 0, vec0);
55
QVector< double > vec1;
67
window.widget->setDataset( 1, vec1 );
69
QVector< double > vec2;
81
window.widget->setDataset( 2, vec2 );
83
window.widget->addHeaderFooter( "Zoom Example",
84
HeaderFooter::Header, Position::NorthWest );
85
window.widget->addHeaderFooter( "zoom in/out: PageDn / PageUp",
86
HeaderFooter::Header, Position::North );
87
window.widget->addHeaderFooter( "pan around: Left / Right / Up / Down",
88
HeaderFooter::Header, Position::NorthEast );
89
window.widget->addHeaderFooter( "SouthEast",
90
HeaderFooter::Footer, Position::SouthEast );
91
window.widget->addHeaderFooter( "South",
92
HeaderFooter::Footer, Position::South );
93
window.widget->addHeaderFooter( "SouthWest",
94
HeaderFooter::Footer, Position::SouthWest );
96
window.widget->addLegend( Position::East );
98
//window.widget->setType( Widget::Polar );