3#include "kchartWizardSetupDataPage.h"
4#include "kchart_view.h"
5#include "kchartWizard.h"
7#include <tqradiobutton.h>
9#include <tqbuttongroup.h>
15KChartWizardSetupDataPage::KChartWizardSetupDataPage( TQWidget* parent,
19 _parent( (KChartWizard*)parent )
21 TQButtonGroup* tmpTQGroupBox;
22 tmpTQGroupBox =
new TQButtonGroup(
this,
"GroupBox_1" );
23 tmpTQGroupBox->setGeometry( 260, 10, 130, 80 );
24 tmpTQGroupBox->setFrameStyle( 49 );
25 tmpTQGroupBox->setAlignment( 1 );
27 datarow =
new TQRadioButton(
this,
"RadioButton_1" );
28 datarow->setGeometry( 270, 40, 100, 20 );
29 datarow->setText( i18n(
"Rows") );
30 connect( datarow, TQ_SIGNAL( clicked() ),
31 this, TQ_SLOT( dataInRowsClicked() ) );
32 tmpTQGroupBox->insert( datarow );
34 datacol =
new TQRadioButton(
this,
"RadioButton_2" );
35 datacol->setGeometry( 270, 60, 100, 20 );
36 datacol->setText( i18n(
"Columns") );
37 datacol->setChecked(
true );
38 connect( datarow, TQ_SIGNAL( clicked() ),
39 this, TQ_SLOT( dataInColsClicked() ) );
40 tmpTQGroupBox->insert( datacol );
43 tmpTQLabel =
new TQLabel(
this,
"Label_3" );
44 tmpTQLabel->setGeometry( 270, 20, 100, 20 );
45 tmpTQLabel->setText( i18n(
"Data is in:") );
47 TQButtonGroup* descrBG =
new TQButtonGroup(
this );
49 coldescript =
new TQCheckBox(
this,
"CheckBox_3" );
50 coldescript->setGeometry( 260, 110, 20, 30 );
51 coldescript->setChecked(
true );
52 connect( coldescript, TQ_SIGNAL( toggled(
bool ) ),
53 this, TQ_SLOT( firstColumnIsDescriptionToggled(
bool ) ) );
54 coldescript->setText(
"" );
55 descrBG->insert( coldescript );
57 tmpTQLabel =
new TQLabel(
this,
"Label_4" );
58 tmpTQLabel->setGeometry( 280, 110, 100, 30 );
59 tmpTQLabel->setText( i18n(
"Use first row as description") );
60 tmpTQLabel->setAlignment( 1313 );
62 rowdescript =
new TQCheckBox(
this,
"CheckBox_4" );
63 rowdescript->setGeometry( 260, 150, 20, 30 );
64 connect( rowdescript, TQ_SIGNAL( toggled(
bool ) ),
65 this, TQ_SLOT( firstRowIsDescriptionToggled(
bool ) ) );
66 rowdescript->setText(
"" );
67 descrBG->insert( rowdescript );
69 tmpTQLabel =
new TQLabel(
this,
"Label_5" );
70 tmpTQLabel->setGeometry( 280, 150, 100, 30 );
71 tmpTQLabel->setText( i18n(
"Use first column as description") );
72 tmpTQLabel->setAlignment( 1313 );
75 tmpTQFrame =
new TQFrame(
this,
"Frame_1" );
76 tmpTQFrame->setGeometry( 10, 10, 240, 220 );
77 tmpTQFrame->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
78 tmpTQFrame->setLineWidth( 2 );
91KChartWizardSetupDataPage::~KChartWizardSetupDataPage()
99void KChartWizardSetupDataPage::dataInRowsClicked()
101 _parent->emitNeedNewData( (
const char*)_parent->dataArea().local8Bit(), KChartWizard::Row,
102 coldescript->isChecked(),
103 rowdescript->isChecked() );
106void KChartWizardSetupDataPage::dataInColsClicked()
108 _parent->emitNeedNewData( (
const char*)_parent->dataArea().local8Bit(), KChartWizard::Col,
109 coldescript->isChecked(),
110 rowdescript->isChecked() );
113void KChartWizardSetupDataPage::firstColumnIsDescriptionToggled(
bool )
115 _parent->emitNeedNewData( (
const char*)_parent->dataArea().local8Bit(),
116 ( datarow->isChecked() ? KChartWizard::Row :
118 coldescript->isChecked(),
119 rowdescript->isChecked() );
122void KChartWizardSetupDataPage::firstRowIsDescriptionToggled(
bool )
124 _parent->emitNeedNewData( (
const char*)_parent->dataArea().local8Bit(),
125 ( datarow->isChecked() ? KChartWizard::Row
126 : KChartWizard::Col ),
127 coldescript->isChecked(),
128 rowdescript->isChecked() );
133#include "kchartWizardSetupDataPage.moc"