kchart
kchartParameterPolarConfigPage.cc00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "kchartParameterPolarConfigPage.h"
00021
00022 #include "kchartParameterPolarConfigPage.moc"
00023
00024 #include <kapplication.h>
00025 #include <klocale.h>
00026 #include <kdebug.h>
00027 #include <kdialog.h>
00028
00029 #include <qlayout.h>
00030 #include <qlabel.h>
00031 #include <qbuttongroup.h>
00032 #include <qcheckbox.h>
00033 #include <qlineedit.h>
00034 #include <qradiobutton.h>
00035 #include <qspinbox.h>
00036 #include <qvbuttongroup.h>
00037 #include <qwhatsthis.h>
00038
00039 #include "kchart_params.h"
00040
00041 namespace KChart
00042 {
00043
00044 KChartParameterPolarConfigPage::KChartParameterPolarConfigPage( KChartParams* params,
00045 QWidget* parent ) :
00046 QWidget( parent ),_params( params )
00047 {
00048 QVBoxLayout *grid1 = new QVBoxLayout(this);
00049 QVButtonGroup* gb = new QVButtonGroup( i18n( "Parameter" ), this );
00050 grid1->addWidget(gb);
00051
00052 polarMarker=new QCheckBox(i18n("Polar marker"), gb);
00053 QWhatsThis::add(polarMarker, i18n("If this is checked, the polar markers are shown; otherwise they are not."));
00054 showCircularLabel = new QCheckBox(i18n("Show circular label"), gb);
00055 QWhatsThis::add(showCircularLabel, i18n("Toggle the circular label display."));
00056
00057 QLabel *label = new QLabel( i18n( "Zero degree position:" ), gb );
00058 angle = new QSpinBox(-359, 359, 1, gb);
00059 QWhatsThis::add(angle, i18n("Set the position for the X axis (horizontal) from -359 to 359. Default is 0."));
00060
00061 label=new QLabel(i18n("Line width:"), gb);
00062 lineWidth=new QSpinBox(gb);
00063 QWhatsThis::add(lineWidth, i18n("Set the width for the chart lines. 0 is default and is the thinnest."));
00064
00065 grid1->activate();
00066 }
00067
00068
00069 void KChartParameterPolarConfigPage::init()
00070 {
00071 polarMarker->setChecked(_params->polarMarker());
00072 angle->setValue( _params->polarZeroDegreePos() );
00073 showCircularLabel->setChecked(_params->polarRotateCircularLabels());
00074 lineWidth->setValue(_params->polarLineWidth());
00075 }
00076
00077
00078 void KChartParameterPolarConfigPage::apply()
00079 {
00080 _params->setPolarZeroDegreePos(angle->value());
00081 _params->setPolarMarker(polarMarker->isChecked());
00082 _params->setPolarRotateCircularLabels(showCircularLabel->isChecked());
00083 _params->setPolarLineWidth(lineWidth->value());
00084 }
00085
00086 }
|