コード例 #1
0
pieDialog::pieDialog( QWidget* parent,  const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
		setName( "pieDialog" );
	setFixedWidth(521);
	setFixedHeight(260);
    setCaption( tr( "QtiPlot - Pie Options" ) );
    setSizeGripEnabled( FALSE );

    generalDialog = new QTabWidget( this, "generalDialog" );
	
	initPiePage();
	initBorderPage();
	
	QButtonGroup *GroupBox1 = new QButtonGroup(4,QGroupBox::Horizontal,tr(""),this, "GroupBox1" );
	GroupBox1->setLineWidth(0);
	GroupBox1->setFlat (TRUE);
	
	buttonWrk = new QPushButton( GroupBox1, "buttonWrk" );
    buttonWrk->setText( tr( "&Worksheet" ) );
	
	buttonApply = new QPushButton( GroupBox1, "buttonApply" );
    buttonApply->setText( tr( "&Apply" ) );
	
    buttonOk = new QPushButton(GroupBox1, "buttonOk" );
    buttonOk->setText( tr( "&OK" ) );
    buttonOk->setDefault( TRUE );
	
    buttonCancel = new QPushButton(GroupBox1, "buttonCancel" );
    buttonCancel->setText( tr( "&Cancel" ) );
	
	QVBoxLayout* vl = new QVBoxLayout(this,5,5, "vl");
	vl->addWidget(generalDialog);
    vl->addWidget(GroupBox1);
   
    // signals and slots connections
	connect( buttonWrk, SIGNAL(clicked()), this, SLOT(showWorksheet()));
	connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
	connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
	connect( buttonApply, SIGNAL( clicked() ), this, SLOT(updatePlot() ) );
}
コード例 #2
0
void Plot3DDialog::worksheet()
{
	emit showWorksheet();
	close();
}