void MainBottomWidget::initConnect() { connect(m_examineAnimation, SIGNAL(finished()), this, SLOT(goExamineFinished())); connect(m_returnAnimation, SIGNAL(finished()), this, SLOT(goMainFinished())); connect(m_firstWidget, SIGNAL(safeClicked()), this, SIGNAL(safeClicked())); connect(m_firstWidget, SIGNAL(cleanClicked()), this, SIGNAL(cleanClicked())); connect(m_firstWidget, SIGNAL(youhuaClicked()), this, SIGNAL(youhuaClicked())); connect(m_firstWidget, SIGNAL(advtoolMoreClicked()), this, SIGNAL(advtoolMoreClicked())); }
void MainBottomFirstWidget::initConnect() { connect(m_safeButton, SIGNAL(buttonClicked()), this, SIGNAL(safeClicked())); connect(m_cleanButton, SIGNAL(buttonClicked()), this, SIGNAL(cleanClicked())); connect(m_youhuaButton, SIGNAL(buttonClicked()), this, SIGNAL(youhuaClicked())); connect(m_advtoolMore, SIGNAL(buttonClicked()), this, SIGNAL(advtoolMoreClicked())); }
void SliceViewer::addControls() { int ext[6]; mVolume->GetExtent(ext); int range[2]; switch( mOrientation ) { case 0: { range[0]=ext[0]; range[1]=ext[1]; break; } case 1: { range[0]=ext[2]; range[1]=ext[3]; break; } case 2: { range[0]=ext[4]; range[1]=ext[5]; break; } } QFrame* w0=new QFrame; w0->setFrameStyle(QFrame::WinPanel | QFrame::Sunken); //w0->setFrameStyle(QFrame::NoFrame); //w0->setLineWidth(2); QVBoxLayout* l= new QVBoxLayout; w0->setLayout(l); QSizePolicy sizePolicy( QSizePolicy::Fixed,QSizePolicy::Preferred); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); QPixmap* pixx; pixx= new QPixmap(remove_xpm); mTButton=new QPushButton(w0); mTButton->setIcon(QIcon(*pixx)); mTButton->setIconSize(QSize(22,22)); mTButton->resize(22, 22); mTButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); connect( mTButton, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) ); l->addWidget(mTButton); mSlider=new QSlider(Qt::Vertical,w0); mSlider->setMinimum(range[0]); mSlider->setMaximum(range[1]); mSlider->setValue(mSliceNumber); mSlider->setTickPosition(QSlider::TicksRight); l->addWidget(mSlider,0,Qt::AlignHCenter); mSpinBox=new QSpinBox(w0); mSpinBox->setMinimum(range[0]); mSpinBox->setMaximum(range[1]); mSpinBox->setValue(mSliceNumber); l->addWidget(mSpinBox,0,Qt::AlignHCenter); QObject::connect(mSlider, SIGNAL(valueChanged(int)), mSpinBox, SLOT(setValue(int))); QObject::connect(mSpinBox, SIGNAL(valueChanged(int)), mSlider, SLOT(setValue(int))); QObject::connect(mSlider, SIGNAL(valueChanged(int)), this, SLOT(sliceSlot(int))); QPushButton* b=new QPushButton(w0); b->setText( tr( "c" ) ); b->setFixedSize(22, 22); b->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); connect( b, SIGNAL( clicked() ), this, SLOT( cleanClicked() ) ); l->addWidget(b); mLayout->addWidget(w0); }