ToolBoxWidget::ToolBoxWidget(QWidget *parent) : QDockWidget(parent), ui(new Ui::ToolBoxWidget) { ui->setupUi(this); emptyPage = new QWidget; //index 0 this-ui->stackedWidget->addWidget(emptyPage); createBlockW = new CreateBlockWidget; //index 1 this->ui->stackedWidget->addWidget(createBlockW); moveVerticesW = new MoveVerticesWidget; //index 2 this->ui->stackedWidget->addWidget(moveVerticesW); setBCsW = new SetBCsWidget; //index 3 this->ui->stackedWidget->addWidget(setBCsW); edgePropsW = new EdgePropsWidget; //index 4 this->ui->stackedWidget->addWidget(edgePropsW); this->ui->stackedWidget->setCurrentIndex(1); connect(createBlockW,SIGNAL(cancel()),this,SLOT(slotCancel())); connect(setBCsW,SIGNAL(done()),this,SLOT(slotCancel())); connect(moveVerticesW,SIGNAL(setStatusText(QString)),this,SLOT(slotSetStatusText(QString))); connect(moveVerticesW,SIGNAL(moveDone()),this,SLOT(slotCancel())); connect(createBlockW,SIGNAL(setStatusText(QString)),this,SLOT(slotSetStatusText(QString))); connect(setBCsW,SIGNAL(setStatusText(QString)),this,SLOT(slotSetStatusText(QString))); connect(edgePropsW,SIGNAL(cancel()),this,SLOT(slotCancel())); connect(edgePropsW,SIGNAL(setStatusText(QString)),this,SLOT(slotSetStatusText(QString))); }
ToolBoxWidget::ToolBoxWidget(QWidget *parent) : QDockWidget(parent), ui(new Ui::ToolBoxWidget) { ui->setupUi(this); emptyPage = new QWidget; //index 0 this-ui->stackedWidget->addWidget(emptyPage); createBlockW = new CreateBlockWidget; //index 1 this->ui->stackedWidget->addWidget(createBlockW); moveVerticesW = new MoveVerticesWidget; //index 2 this->ui->stackedWidget->addWidget(moveVerticesW); setBCsW = new SetBCsWidget; //index 3 this->ui->stackedWidget->addWidget(setBCsW); edgePropsW = new EdgePropsWidget; //index 4 this->ui->stackedWidget->addWidget(edgePropsW); edgeSetTypeW = new EdgeSetTypeWidget; //index 5; this->ui->stackedWidget->addWidget(edgeSetTypeW); rotateVerticesW = new RotateVerticesWidget; //index 6 this->ui->stackedWidget->addWidget(rotateVerticesW); connect(createBlockW,SIGNAL(cancel()),this,SLOT(slotCancel())); connect(setBCsW,SIGNAL(done()),this,SLOT(slotCancel())); connect(moveVerticesW,SIGNAL(setStatusText(QString)),this,SLOT(slotSetStatusText(QString))); connect(moveVerticesW,SIGNAL(moveDone()),this,SLOT(slotCancel())); connect(rotateVerticesW,SIGNAL(setStatusText(QString)),this,SLOT(slotSetStatusText(QString))); connect(rotateVerticesW,SIGNAL(rotateDone()),this,SLOT(slotCancel())); connect(createBlockW,SIGNAL(setStatusText(QString)),this,SLOT(slotSetStatusText(QString))); connect(setBCsW,SIGNAL(setStatusText(QString)),this,SLOT(slotSetStatusText(QString))); connect(edgePropsW,SIGNAL(cancel()),this,SLOT(slotCancel())); connect(edgePropsW,SIGNAL(setStatusText(QString)),this,SLOT(slotSetStatusText(QString))); connect(edgePropsW,SIGNAL(openSetTypeDialog(vtkIdType)),this,SLOT(slotOpenSetEdgeTypeDialog(vtkIdType))); connect(edgeSetTypeW,SIGNAL(setStatusText(QString)),this,SLOT(slotSetStatusText(QString))); connect(edgeSetTypeW,SIGNAL(apply()),this,SLOT(slotCloseSetEdgeTypeDialog())); this->ui->stackedWidget->setCurrentIndex(1); }