kchart

kchart_view.cpp
1
5
6
7#include <tqfile.h>
8#include <tqpainter.h>
9#include <tqcursor.h>
10#include <tqpopupmenu.h>
11#include <tqpaintdevicemetrics.h>
12#include <tqcstring.h> // For TQByteArray
13
14#include <tdeaction.h>
15#include <tdeglobal.h>
16#include <tdelocale.h>
17#include <kiconloader.h>
18#include <kdebug.h>
19#include <kprinter.h>
20#include <kstandarddirs.h>
21#include <tdetempfile.h>
22#include <dcopobject.h>
23#include <kxmlguifactory.h>
24#include <tdefiledialog.h>
25#include <tdemessagebox.h>
26
27#include <KoTemplateCreateDia.h>
28
29#include "kdchart/KDChart.h"
30#include "kchart_view.h"
31#include "kchart_factory.h"
32#include "kchart_part.h"
33#include "kchart_params.h"
34#include "kchartWizard.h"
35#include "kchartDataEditor.h"
36#include "kchartConfigDialog.h"
37#include "KChartViewIface.h"
38#include "kchartPageLayout.h"
39#include "kchartPrinterDlg.h"
40#include "csvimportdialog.h"
41
42
43using namespace std;
44
45
46//#include "sheetdlg.h"
47
48namespace KChart
49{
50
51
52KChartView::KChartView( KChartPart* part, TQWidget* parent, const char* name )
53 : KoView( part, parent, name )
54{
55
56 // No flicker
57 setBackgroundMode( TQt::NoBackground );
58
59 setInstance( KChartFactory::global() );
60 if ( koDocument()->isReadWrite() )
61 setXMLFile( "kchart.rc" );
62 else
63 setXMLFile( "kchart_readonly.rc" );
64 m_dcop = 0;
65 dcopObject(); // build it
66
67 m_importData = new TDEAction( i18n( "Import Data..." ), 0,
68 this, TQ_SLOT( importData() ),
69 actionCollection(), "import_data" );
70#if 0
71 TDEAction * actionExtraCreateTemplate =
72#endif
73 new TDEAction( i18n( "&Create Template From Document..." ), 0,
74 this, TQ_SLOT( extraCreateTemplate() ),
75 actionCollection(), "extra_template" );
76
77 m_wizard = new TDEAction( i18n("Customize with &Wizard..."),
78 "wizard", 0,
79 this, TQ_SLOT( wizard() ),
80 actionCollection(), "wizard");
81 m_edit = new TDEAction( i18n("Edit &Data..."), "edit", 0,
82 this, TQ_SLOT( editData() ),
83 actionCollection(), "editdata");
84 m_config = new TDEAction( i18n( "&Chart..." ), "configure", 0,
85
86 this, TQ_SLOT( slotConfig() ),
87 actionCollection(), "config" );
88
89 // One TDEToggleAction per chart type
90 m_chartbars = new TDEToggleAction( i18n("&Bar"), "chart_bar_3d", 0, this,
91 TQ_SLOT( barsChart() ), actionCollection(),
92 "barschart");
93 m_chartbars->setExclusiveGroup( "charttypes" );
94 m_chartbars->setChecked( true );
95
96 m_chartline = new TDEToggleAction( i18n("&Line"), "chart_line", 0, this,
97 TQ_SLOT( lineChart() ), actionCollection(),
98 "linechart");
99 m_chartline->setExclusiveGroup( "charttypes" );
100
101 m_chartareas = new TDEToggleAction( i18n("&Area"), "chart_area", 0, this,
102 TQ_SLOT( areasChart() ), actionCollection(),
103 "areaschart");
104 m_chartareas->setExclusiveGroup( "charttypes" );
105
106 m_charthilo = new TDEToggleAction( i18n("&HiLo"), "chart_hilo", 0, this,
107 TQ_SLOT( hiLoChart() ), actionCollection(),
108 "hilochart");
109 m_charthilo->setExclusiveGroup( "charttypes" );
110
111 m_chartbw = new TDEToggleAction( i18n("Bo&x && Whiskers"), "chart_boxwhisker", 0, this,
112 TQ_SLOT( bwChart() ), actionCollection(),
113 "bwchart");
114 m_chartbw->setExclusiveGroup( "charttypes" );
115
116 m_chartpie = new TDEToggleAction( i18n("&Pie"), "chart_pie", 0, this,
117 TQ_SLOT( pieChart() ), actionCollection(),
118 "piechart");
119 m_chartpie->setExclusiveGroup( "charttypes" );
120
121 m_chartring = new TDEToggleAction( i18n("&Ring"), "chart_ring", 0, this,
122 TQ_SLOT( ringChart() ), actionCollection(),
123 "ringchart");
124 m_chartring->setExclusiveGroup( "charttypes" );
125
126 m_chartpolar = new TDEToggleAction( i18n("&Polar"), "chart_polar", 0, this,
127 TQ_SLOT( polarChart() ), actionCollection(),
128 "polarchart");
129 m_chartpolar->setExclusiveGroup( "charttypes" );
130
131 // Configuration TDEActions
132 m_colorConfig = new TDEAction( i18n( "&Colors..." ), 0,
133 this, TQ_SLOT( slotConfigColor() ),
134 actionCollection(), "color_config" );
135
136 m_fontConfig = new TDEAction( i18n( "&Font..." ), 0,
137 this, TQ_SLOT( slotConfigFont() ),
138 actionCollection(), "font_config" );
139
140 m_backConfig = new TDEAction( i18n( "&Background..." ), 0,
141 this, TQ_SLOT( slotConfigBack() ),
142 actionCollection(), "back_config" );
143
144 m_legendConfig = new TDEAction( i18n( "&Legend..." ), 0,
145 this, TQ_SLOT( slotConfigLegend() ),
146 actionCollection(), "legend_config" );
147
148 m_subTypeChartConfig = new TDEAction( i18n( "Chart &Sub-type..." ), 0,
149 this, TQ_SLOT( slotConfigSubTypeChart() ),
150 actionCollection(), "legend_subtype" );
151
152 m_dataFormatConfig = new TDEAction( i18n( "&Data Format..." ), 0,
153 this, TQ_SLOT( slotConfigDataFormat() ),
154 actionCollection(), "data_format" );
155
156 m_headerFooterConfig = new TDEAction( i18n( "&Header && Footer..." ), 0,
157 this, TQ_SLOT( slotConfigHeaderFooterChart() ),
158 actionCollection(), "headerfooter_subtype" );
159
160 m_pageLayoutConfig = new TDEAction( i18n( "Page Layout..." ), 0,
161 this, TQ_SLOT( slotConfigPageLayout() ),
162 actionCollection(), "page_layout" );
163
164 // initialize the configuration
165 // loadConfig();
166
167 // Disable some things if we can't change the data, e.g. because
168 // we are inside another application that provides the data for us.
169 if (!((KChartPart*)koDocument())->canChangeValue()) {
170 m_edit->setEnabled(false);
171 m_importData->setEnabled(false);
172 }
173
174 updateGuiTypeOfChart();
175}
176
177
178KChartView::~KChartView()
179{
180 delete m_dcop;
181}
182
183
184DCOPObject* KChartView::dcopObject()
185{
186 if ( !m_dcop )
187 m_dcop = new KChartViewIface( this );
188
189 return m_dcop;
190}
191
192
193void KChartView::paintEvent( TQPaintEvent* /*ev*/ )
194{
195 TQPainter painter( this );
196
197 // ### TODO: Scaling
198
199 // Let the document do the drawing
200 // This calls KChartPart::paintContent, basically.
201 koDocument()->paintEverything( painter, rect(), false, this );
202}
203
204
205void KChartView::updateReadWrite( bool /*readwrite*/ )
206{
207#ifdef __GNUC__
208#warning TODO
209#endif
210}
211
212
213// Edit the data to the chart.
214// This opens a spreadsheet like editor with the data in it.
215//
216
217void KChartView::editData()
218{
219 kchartDataEditor ed(this);
220 KChartParams *params = ((KChartPart*)koDocument())->params();
221 KDChartTableData *dat = ((KChartPart*)koDocument())->data();
222
223 kdDebug(35001) << "***Before calling editor: cols =" << dat->cols()
224 << " , rows = " << dat->rows()
225 << " , usedCols = " << dat->usedCols()
226 << " usedRows = " << dat->usedRows() << endl;
227
228 ed.setData( params, dat );
229 ed.setRowLabels(((KChartPart*)koDocument())->rowLabelTexts());
230 ed.setColLabels(((KChartPart*)koDocument())->colLabelTexts());
231
232 // Activate the Apply button in the editor.
233 connect(&ed, TQ_SIGNAL(applyClicked(kchartDataEditor *)),
234 this, TQ_SLOT(applyEdit(kchartDataEditor *)));
235
236 // Execute the data editor.
237 if ( ed.exec() != TQDialog::Accepted ) {
238 return;
239 }
240 if (!ed.modified())
241 return;
242
243 // Get the data and legend back.
244 ed.getData(params, dat);
245 ed.getRowLabels(((KChartPart*)koDocument())->rowLabelTexts());
246 ed.getColLabels(((KChartPart*)koDocument())->colLabelTexts());
247 ((KChartPart*)koDocument())->setModified(true);
248
249 kdDebug(35001) << "***After calling editor: cols =" << dat->cols()
250 << " , rows = " << dat->rows()
251 << " , usedCols = " << dat->usedCols()
252 << " usedRows = " << dat->usedRows() << endl;
253 update();
254}
255
256
257void KChartView::applyEdit(kchartDataEditor *ed)
258{
259 if (!ed->modified())
260 return;
261
262 ed->getData( ((KChartPart*)koDocument())->params(),
263 ((KChartPart*)koDocument())->data() );
264 ed->getRowLabels(((KChartPart*)koDocument())->rowLabelTexts());
265 ed->getColLabels(((KChartPart*)koDocument())->colLabelTexts());
266
267 ((KChartPart*)koDocument())->setModified(true);
268
269 update();
270}
271
272
273void KChartView::wizard()
274{
275 kdDebug(35001) << "Wizard called" << endl;
276 KChartWizard *wiz = new KChartWizard((KChartPart*)koDocument(), this,
277 "KChart Wizard", true);
278 kdDebug(35001) << "Executed. Now, display it" << endl;
279 if (wiz->exec()) {
280 ((KChartPart*)koDocument())->setModified(true);
281 update();
282 updateGuiTypeOfChart();
283 kdDebug(35001) << "Ok, executed..." << endl;
284 }
285}
286
287
288void KChartView::updateGuiTypeOfChart()
289{
290 KDChartParams* params = ((KChartPart*)koDocument())->params();
291
292 switch(params->chartType()) {
293 case KDChartParams::Bar:
294 m_chartbars->setChecked(true);
295 break;
296 case KDChartParams::Line:
297 m_chartline->setChecked(true);
298 break;
299 case KDChartParams::Area:
300 m_chartareas->setChecked(true);
301 break;
302 case KDChartParams::Pie:
303 m_chartpie->setChecked(true);
304 break;
305 case KDChartParams::HiLo:
306 m_charthilo->setChecked(true);
307 break;
308 case KDChartParams::Ring:
309 m_chartring->setChecked(true);
310 break;
311 case KDChartParams::Polar:
312 m_chartpolar->setChecked(true);
313 break;
314 case KDChartParams::BoxWhisker:
315 m_chartbw->setChecked( true );
316 break;
317 default:
318 //todo
319 break;
320 }
321
322 // Disable subtype configuration button if appropriate.
323 updateButton();
324}
325
326
327void KChartView::slotConfig()
328{
329 config(KChartConfigDialog::KC_ALL);
330}
331
332
333void KChartView::config(int flags)
334{
335 // open a config dialog depending on the chart type
336 KChartParams *params = ((KChartPart*)koDocument())->params();
337 KDChartTableData *dat = ((KChartPart*)koDocument())->data();
338
339 KChartConfigDialog *d = new KChartConfigDialog( params, this, flags,
340 dat );
341
342 connect( d, TQ_SIGNAL( dataChanged() ),
343 this, TQ_SLOT( slotRepaint() ) );
344 d->exec();
345 delete d;
346}
347
348
349void KChartView::slotRepaint()
350{
351 ((KChartPart*)koDocument())->setModified(true);
352 update();
353}
354
355
356void KChartView::saveConfig()
357{
358 kdDebug(35001) << "Save config..." << endl;
359 ((KChartPart*)koDocument())->saveConfig( TDEGlobal::config() );
360}
361
362
363void KChartView::loadConfig()
364{
365 kdDebug(35001) << "Load config..." << endl;
366
367 TDEGlobal::config()->reparseConfiguration();
368 ((KChartPart*)koDocument())->loadConfig( TDEGlobal::config() );
369
370 updateGuiTypeOfChart();
371 //refresh chart when you load config
372 update();
373}
374
375
376void KChartView::defaultConfig()
377{
378 ((KChartPart*)koDocument())->defaultConfig( );
379 updateGuiTypeOfChart();
380 update();
381}
382
383
384void KChartView::pieChart()
385{
386 if ( m_chartpie->isChecked() ) {
387 forceAxisParams(false);
388 KChartParams *params = ((KChartPart*)koDocument())->params();
389
390 params->setChartType( KChartParams::Pie );
391 params->setThreeDPies(params->threeDBars());
392 params->setExplodeFactor( 0 );
393 params->setExplode( true );
394
395 updateButton();
396 update();
397 ((KChartPart*)koDocument())->setModified(true);
398 }
399 else
400 m_chartpie->setChecked( true ); // always one has to be checked !
401}
402
403void KChartView::forceAxisParams(bool lineMode) {
404 KChartParams *params = ((KChartPart*)koDocument())->params();
405 KDChartAxisParams axisParams;
406 axisParams = params->axisParams( KDChartAxisParams::AxisPosLeft );
407 if(params->chartType() == KChartParams::Line)
408 m_logarithmicScale = axisParams.axisCalcMode();
409 if(lineMode) {
410 if(m_logarithmicScale)
411 axisParams.setAxisCalcMode(KDChartAxisParams::AxisCalcLogarithmic);
412 } else
413 axisParams.setAxisCalcMode(KDChartAxisParams::AxisCalcLinear);
414 params->setAxisParams( KDChartAxisParams::AxisPosLeft, axisParams );
415}
416
417void KChartView::lineChart()
418{
419 if ( m_chartline->isChecked() ) {
420 forceAxisParams(true);
421 KChartParams* params = ((KChartPart*)koDocument())->params();
422
423 params->setChartType( KChartParams::Line );
424 params->setLineChartSubType( KDChartParams::LineNormal );
425
426 updateButton();
427 update();
428 ((KChartPart*)koDocument())->setModified(true);
429 }
430 else
431 m_chartline->setChecked( true ); // always one has to be checked !
432
433}
434
435
436void KChartView::barsChart()
437{
438 if ( m_chartbars->isChecked() ) {
439 forceAxisParams(false);
440 KChartParams* params = ((KChartPart*)koDocument())->params();
441
442 params->setChartType( KChartParams::Bar );
443 params->setBarChartSubType( KDChartParams::BarNormal );
444
445 updateButton();
446 params->setThreeDBars( params->threeDPies() );
447 update();
448 ((KChartPart*)koDocument())->setModified(true);
449 }
450 else
451 m_chartbars->setChecked( true ); // always one has to be checked !
452}
453
454
455void KChartView::areasChart()
456{
457 if ( m_chartareas->isChecked() ) {
458 forceAxisParams(false);
459 KChartParams* params = ((KChartPart*)koDocument())->params();
460
461 params->setChartType( KChartParams::Area );
462 params->setAreaChartSubType( KDChartParams::AreaNormal );
463
464 updateButton();
465 update();
466 ((KChartPart*)koDocument())->setModified(true);
467 }
468 else
469 m_chartareas->setChecked( true ); // always one has to be checked !
470
471}
472
473
474void KChartView::hiLoChart()
475{
476 if ( m_charthilo->isChecked() ) {
477 forceAxisParams(false);
478 KChartParams* params = ((KChartPart*)koDocument())->params();
479
480 params->setChartType( KChartParams::HiLo );
481 params->setHiLoChartSubType( KDChartParams::HiLoNormal );
482
483 updateButton();
484 update();
485 ((KChartPart*)koDocument())->setModified(true);
486 }
487 else
488 m_charthilo->setChecked( true ); // always one has to be checked !
489}
490
491
492void KChartView::ringChart()
493{
494 if ( m_chartring->isChecked() ) {
495 forceAxisParams(false);
496 KChartParams* params = ((KChartPart*)koDocument())->params();
497
498 params->setChartType( KChartParams::Ring );
499
500 updateButton();
501 update();
502 ((KChartPart*)koDocument())->setModified(true);
503 }
504 else
505 m_chartring->setChecked( true ); // always one has to be checked !
506
507}
508
509
510void KChartView::polarChart()
511{
512 if ( m_chartpolar->isChecked() ) {
513 forceAxisParams(false);
514 KDChartParams* params = ((KChartPart*)koDocument())->params();
515
516 params->setChartType( KDChartParams::Polar );
517 params->setPolarChartSubType( KDChartParams::PolarNormal );
518
519 update();
520 ((KChartPart*)koDocument())->setModified(true);
521 }
522 else
523 m_chartpolar->setChecked( true ); // always one has to be checked !
524}
525
526
527void KChartView::bwChart()
528{
529 if ( m_chartbw->isChecked() ) {
530 forceAxisParams(false);
531 KDChartParams* params = ((KChartPart*)koDocument())->params();
532
533 params->setChartType( KDChartParams::BoxWhisker );
534 params->setBWChartSubType( KDChartParams::BWNormal );
535
536 update();
537 ((KChartPart*)koDocument())->setModified(true);
538 }
539 else
540 m_chartbw->setChecked( true ); // always one has to be checked !
541}
542
543
544void KChartView::mousePressEvent ( TQMouseEvent *e )
545{
546 if (!koDocument()->isReadWrite() || !factory())
547 return;
548 if ( e->button() == TQt::RightButton )
549 ((TQPopupMenu*)factory()->container("action_popup",this))->popup(TQCursor::pos());
550}
551
552
553void KChartView::slotConfigColor()
554{
555 config(KChartConfigDialog::KC_COLORS);
556}
557
558
559void KChartView::slotConfigFont()
560{
561 config(KChartConfigDialog::KC_FONT);
562}
563
564
565void KChartView::slotConfigBack()
566{
567 config(KChartConfigDialog::KC_BACK);
568}
569
570
571void KChartView::slotConfigLegend()
572{
573 config(KChartConfigDialog::KC_LEGEND);
574}
575
576void KChartView::slotConfigDataFormat()
577{
578 config(KChartConfigDialog::KC_DATAFORMAT);
579}
580
581void KChartView::slotConfigSubTypeChart()
582{
583 config(KChartConfigDialog::KC_SUBTYPE);
584}
585
586
587void KChartView::slotConfigHeaderFooterChart()
588{
589 config(KChartConfigDialog::KC_HEADERFOOTER);
590}
591
592
593// FIXME: Rename into something suitable.
594void KChartView::updateButton()
595{
596 // Disable sub chart config item.
597 KChartParams* params = ((KChartPart*)koDocument())->params();
598
599 bool state=(params->chartType()==KChartParams::Bar ||
600 params->chartType()==KChartParams::Area ||
601 params->chartType()==KChartParams::Line ||
602 params->chartType()==KChartParams::HiLo ||
603 params->chartType()==KChartParams::Polar);
604 m_subTypeChartConfig->setEnabled(state);
605}
606
607
608void KChartView::slotConfigPageLayout()
609{
610 KChartParams *params = ((KChartPart*)koDocument())->params();
611 KChartPageLayout *dialog = new KChartPageLayout(params, this,
612 "Page Layout");
613
614 connect( dialog, TQ_SIGNAL( dataChanged() ),
615 this, TQ_SLOT( slotRepaint() ) );
616
617 dialog->exec();
618 delete dialog;
619}
620
621
622void KChartView::setupPrinter( KPrinter &printer )
623{
624 if ( !printer.previewOnly() )
625 printer.addDialogPage( new KChartPrinterDlg( 0, "KChart page" ) );
626}
627
628
629void KChartView::print(KPrinter &printer)
630{
631 printer.setFullPage( false );
632
633 TQPainter painter;
634 painter.begin(&printer);
635 TQPaintDeviceMetrics pdm( &printer );
636
637 int height;
638 int width;
639 if ( !printer.previewOnly() ) {
640 int const scalex = printer.option("kde-kchart-printsizex").toInt();
641 int const scaley = printer.option("kde-kchart-printsizey").toInt();
642
643 width = pdm.width() * scalex / 100;
644 height = pdm.height() * scaley / 100;
645 }
646 else {
647 // Fill the whole page.
648 width = pdm.width();
649 height = pdm.height();
650 }
651
652 TQRect rect(0, 0, width, height);
653 KDChart::print(&painter,
654 ((KChartPart*)koDocument())->params(),
655 ((KChartPart*)koDocument())->data(),
656 0, // regions
657 &rect);
658
659 painter.end();
660}
661
662
663// Import data from a Comma Separated Values file.
664//
665
666void KChartView::importData()
667{
668 // Get the name of the file to open.
669 TQString filename = KFileDialog::getOpenFileName(TQString(),// startDir
670 TQString(),// filter
671 0,
672 i18n("Import Data"));
673 kdDebug(35001) << "Filename = <" << filename << ">" << endl;
674 if (filename.isEmpty())
675 return;
676
677 // Check to see if we can read the file.
678 TQFile inFile(filename);
679 if (!inFile.open(IO_ReadOnly)) {
680 KMessageBox::sorry( 0, i18n("The file %1 could not be read.")
681 .arg(filename) );
682 inFile.close();
683 return;
684 }
685
686 // Let the CSV dialog structure the data in the file.
687 TQByteArray inData( inFile.readAll() );
688 inFile.close();
689 CSVImportDialog *dialog = new CSVImportDialog(0L, inData);
690
691 if ( !dialog->exec() ) {
692 kdDebug(35001) << "Cancel was pressed" << endl;
693 return;
694 }
695
696 kdDebug(35001) << "OK was pressed" << endl;
697
698 uint rows = dialog->rows();
699 uint cols = dialog->cols();
700
701 kdDebug(35001) << "Rows: " << rows << " Cols: " << cols << endl;
702
703 bool hasRowHeaders = ( rows > 1 && dialog->firstRowContainHeaders() );
704 bool hasColHeaders = ( cols > 1 && dialog->firstColContainHeaders() );
705
706 KDChartTableData data( rows, cols );
707 data.setUsedRows( rows );
708 data.setUsedCols( cols );
709 for (uint row = 0; row < rows; row++) {
710 for (uint col = 0; col < cols; col++) {
711 bool ok;
712 TQString tmp;
713 double val;
714
715 // Get the text and convert to double unless in the headers.
716 tmp = dialog->text( row, col );
717 if ( ( row == 0 && hasRowHeaders )
718 || ( col == 0 && hasColHeaders ) ) {
719 kdDebug(35001) << "Setting header (" << row << "," << col
720 << ") to value " << tmp << endl;
721 data.setCell( row, col, tmp );
722 }
723 else {
724 val = tmp.toDouble(&ok);
725 if (!ok)
726 val = 0.0;
727
728 kdDebug(35001) << "Setting (" << row << "," << col
729 << ") to value " << val << endl;
730
731 // and do the actual setting.
732 data.setCell( row, col, val );
733 }
734 }
735 }
736
737 ((KChartPart*)koDocument())->doSetData( data,
738 hasRowHeaders, hasColHeaders );
739}
740
741
742void KChartView::extraCreateTemplate()
743{
744 int width = 60;
745 int height = 60;
746 TQPixmap pix = koDocument()->generatePreview(TQSize(width, height));
747
748 KTempFile tempFile( TQString(), ".chrt" );
749 tempFile.setAutoDelete(true);
750
751 koDocument()->saveNativeFormat( tempFile.name() );
752
753 KoTemplateCreateDia::createTemplate( "kchart_template", KChartFactory::global(),
754 tempFile.name(), pix, this );
755
756 KChartFactory::global()->dirs()->addResourceType("kchart_template",
757 TDEStandardDirs::kde_default( "data" ) +
758 "kchart/templates/");
759}
760
761
762} //KChart namespace
763
764#include "kchart_view.moc"
Definition of a single entry-point to the charting engine for applications that wish to provide their...
access the chart axis parameters.
void setAxisCalcMode(AxisCalcMode axisCalcMode)
enum AxisCalcMode { AxisCalcLinear, AxisCalcLogarithmic }; The axis calculation mode.
AxisCalcMode axisCalcMode() const
Returns the axis calculation mode configured in this params object.
Bundles the display parameters of a chart.
void setChartType(ChartType chartType)
Specifies the chart type.
void setPolarChartSubType(PolarChartSubType polarChartSubType)
Specifies the polar chart subtype.
void setBWChartSubType(BWChartSubType bWChartSubType)
Specifies the BoxWhisker chart subtype.
ChartType chartType() const
Returns the chart type configured in this params object.
static void print(TQPainter *, KDChartParams *, KDChartTableDataBase *, KDChartDataRegionList *regions=0, const TQRect *rect=0, bool mustCalculateGeometry=true)
Paints a chart with the specified parameters on the specified painter which should use a TQPrinter as...
Definition KDChart.cpp:354