32#include "kchartPrinterDlg.h"
36 KChartPrinterDlg::KChartPrinterDlg( TQWidget *parent, const char *name )
37 : KPrintDialogPage( parent, name )
39 setTitle( i18n( "KChart Options" ) );
40 TQVBoxLayout *layout = new TQVBoxLayout( this );
41 layout->setMargin( KDialog::marginHint() );
42 layout->setSpacing( KDialog::spacingHint() );
43 txtSizex = new KIntNumInput( this );
44 txtSizex->setSuffix( "%");
45 txtSizex->setMinValue(1);
46 txtSizex->setMaxValue(100);
47 txtSizex->setValue(100);
48 txtSizey = new KIntNumInput( this );
49 txtSizey->setSuffix( "%");
50 txtSizey->setMinValue(1);
51 txtSizey->setMaxValue(100);
52 txtSizey->setValue(100);
54 layout->addWidget( new TQLabel(i18n( "Print Size"), this) );
55 layout->addWidget( new TQLabel(i18n( "Width: "), this) );
56 layout->addWidget( txtSizex );
57 layout->addWidget( new TQLabel(i18n( "Height: "), this) );
58 layout->addWidget( txtSizey );
59 layout->addStretch( 1 );
62void KChartPrinterDlg::getOptions( TQMap<TQString, TQString>& opts, bool )
64 opts[ "kde-kchart-printsizex"] = TQString::number(txtSizex->value());
65 opts[ "kde-kchart-printsizey"] = TQString::number(txtSizey->value());
68void KChartPrinterDlg::setOptions( const TQMap<TQString, TQString>& opts )
70 if ( opts[ "kde-kchart-printsizex"].isEmpty() )
71 txtSizex->setValue(100);
73 txtSizex->setValue((opts[ "kde-kchart-printsizex"]).toInt());
74 if ( opts[ "kde-kchart-printsizey"].isEmpty() )
75 txtSizey->setValue(100);
77 txtSizey->setValue((opts[ "kde-kchart-printsizey"]).toInt());
80bool KChartPrinterDlg::isValid( const TQString& )
85#include "kchartPrinterDlg.moc"
|