You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
134 lines
4.6 KiB
134 lines
4.6 KiB
15 years ago
|
/* $Id$ */
|
||
|
|
||
|
#include "kchartWizardSetupDataPage.h"
|
||
|
#include "kchart_view.h"
|
||
|
#include "kchartWizard.h"
|
||
|
|
||
14 years ago
|
#include <tqradiobutton.h>
|
||
|
#include <tqcheckbox.h>
|
||
|
#include <tqbuttongroup.h>
|
||
|
#include <tqlabel.h>
|
||
15 years ago
|
|
||
|
namespace KChart
|
||
|
{
|
||
|
|
||
13 years ago
|
KChartWizardSetupDataPage::KChartWizardSetupDataPage( TQWidget* parent,
|
||
15 years ago
|
KChartPart* chart) :
|
||
13 years ago
|
TQWidget( parent ),
|
||
15 years ago
|
_chart( chart ),
|
||
13 years ago
|
_parent( (KChartWizard*)parent )
|
||
15 years ago
|
{
|
||
14 years ago
|
TQButtonGroup* tmpTQGroupBox;
|
||
|
tmpTQGroupBox = new TQButtonGroup( this, "GroupBox_1" );
|
||
|
tmpTQGroupBox->setGeometry( 260, 10, 130, 80 );
|
||
|
tmpTQGroupBox->setFrameStyle( 49 );
|
||
13 years ago
|
tmpTQGroupBox->setAlignment( 1 );
|
||
15 years ago
|
|
||
14 years ago
|
datarow = new TQRadioButton( this, "RadioButton_1" );
|
||
15 years ago
|
datarow->setGeometry( 270, 40, 100, 20 );
|
||
|
datarow->setText( i18n("Rows") );
|
||
14 years ago
|
connect( datarow, TQT_SIGNAL( clicked() ),
|
||
|
this, TQT_SLOT( dataInRowsClicked() ) );
|
||
|
tmpTQGroupBox->insert( datarow );
|
||
15 years ago
|
|
||
14 years ago
|
datacol = new TQRadioButton( this, "RadioButton_2" );
|
||
15 years ago
|
datacol->setGeometry( 270, 60, 100, 20 );
|
||
|
datacol->setText( i18n("Columns") );
|
||
|
datacol->setChecked( true );
|
||
14 years ago
|
connect( datarow, TQT_SIGNAL( clicked() ),
|
||
|
this, TQT_SLOT( dataInColsClicked() ) );
|
||
|
tmpTQGroupBox->insert( datacol );
|
||
15 years ago
|
|
||
14 years ago
|
TQLabel* tmpTQLabel;
|
||
|
tmpTQLabel = new TQLabel( this, "Label_3" );
|
||
|
tmpTQLabel->setGeometry( 270, 20, 100, 20 );
|
||
|
tmpTQLabel->setText( i18n("Data is in:") );
|
||
15 years ago
|
|
||
14 years ago
|
TQButtonGroup* descrBG = new TQButtonGroup( this );
|
||
15 years ago
|
descrBG->hide();
|
||
14 years ago
|
coldescript = new TQCheckBox( this, "CheckBox_3" );
|
||
15 years ago
|
coldescript->setGeometry( 260, 110, 20, 30 );
|
||
|
coldescript->setChecked( true );
|
||
14 years ago
|
connect( coldescript, TQT_SIGNAL( toggled( bool ) ),
|
||
|
this, TQT_SLOT( firstColumnIsDescriptionToggled( bool ) ) );
|
||
15 years ago
|
coldescript->setText( "" );
|
||
|
descrBG->insert( coldescript );
|
||
|
|
||
14 years ago
|
tmpTQLabel = new TQLabel( this, "Label_4" );
|
||
|
tmpTQLabel->setGeometry( 280, 110, 100, 30 );
|
||
|
tmpTQLabel->setText( i18n("Use first row as description") );
|
||
13 years ago
|
tmpTQLabel->setAlignment( 1313 );
|
||
15 years ago
|
|
||
14 years ago
|
rowdescript = new TQCheckBox( this, "CheckBox_4" );
|
||
15 years ago
|
rowdescript->setGeometry( 260, 150, 20, 30 );
|
||
14 years ago
|
connect( rowdescript, TQT_SIGNAL( toggled( bool ) ),
|
||
|
this, TQT_SLOT( firstRowIsDescriptionToggled( bool ) ) );
|
||
15 years ago
|
rowdescript->setText( "" );
|
||
|
descrBG->insert( rowdescript );
|
||
|
|
||
14 years ago
|
tmpTQLabel = new TQLabel( this, "Label_5" );
|
||
|
tmpTQLabel->setGeometry( 280, 150, 100, 30 );
|
||
|
tmpTQLabel->setText( i18n("Use first column as description") );
|
||
13 years ago
|
tmpTQLabel->setAlignment( 1313 );
|
||
15 years ago
|
|
||
14 years ago
|
TQFrame* tmpTQFrame;
|
||
|
tmpTQFrame = new TQFrame( this, "Frame_1" );
|
||
|
tmpTQFrame->setGeometry( 10, 10, 240, 220 );
|
||
|
tmpTQFrame->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
|
||
|
tmpTQFrame->setLineWidth( 2 );
|
||
15 years ago
|
|
||
|
/*
|
||
14 years ago
|
preview = new kchartWidget( _chart, tmpTQFrame );
|
||
15 years ago
|
preview->show();
|
||
|
_chart->addAutoUpdate( preview );
|
||
14 years ago
|
preview->resize( tmpTQFrame->contentsRect().width(),
|
||
|
tmpTQFrame->contentsRect().height() );
|
||
15 years ago
|
*/
|
||
13 years ago
|
//parent->resize( 400, 350 );
|
||
15 years ago
|
}
|
||
|
|
||
|
|
||
|
KChartWizardSetupDataPage::~KChartWizardSetupDataPage()
|
||
|
{
|
||
|
/*
|
||
|
_chart->removeAutoUpdate( preview );
|
||
|
*/
|
||
|
}
|
||
|
|
||
|
|
||
|
void KChartWizardSetupDataPage::dataInRowsClicked()
|
||
|
{
|
||
|
_parent->emitNeedNewData( (const char*)_parent->dataArea().local8Bit(), KChartWizard::Row,
|
||
|
coldescript->isChecked(),
|
||
|
rowdescript->isChecked() );
|
||
|
}
|
||
|
|
||
|
void KChartWizardSetupDataPage::dataInColsClicked()
|
||
|
{
|
||
|
_parent->emitNeedNewData( (const char*)_parent->dataArea().local8Bit(), KChartWizard::Col,
|
||
|
coldescript->isChecked(),
|
||
|
rowdescript->isChecked() );
|
||
|
}
|
||
|
|
||
|
void KChartWizardSetupDataPage::firstColumnIsDescriptionToggled( bool )
|
||
|
{
|
||
|
_parent->emitNeedNewData( (const char*)_parent->dataArea().local8Bit(),
|
||
|
( datarow->isChecked() ? KChartWizard::Row :
|
||
|
KChartWizard::Col ),
|
||
|
coldescript->isChecked(),
|
||
|
rowdescript->isChecked() );
|
||
|
}
|
||
|
|
||
|
void KChartWizardSetupDataPage::firstRowIsDescriptionToggled( bool )
|
||
|
{
|
||
|
_parent->emitNeedNewData( (const char*)_parent->dataArea().local8Bit(),
|
||
|
( datarow->isChecked() ? KChartWizard::Row
|
||
|
: KChartWizard::Col ),
|
||
|
coldescript->isChecked(),
|
||
|
rowdescript->isChecked() );
|
||
|
}
|
||
|
|
||
|
} //namespace KChart
|
||
|
|
||
|
#include "kchartWizardSetupDataPage.moc"
|