HIDCalibrateDialog::~HIDCalibrateDialog() { delete layout; disconnect(ui.okButton, SIGNAL(clicked()), this, SLOT(OkButtonClicked())); disconnect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(CancelButtonClicked())); disconnect(ui.startButton, SIGNAL(clicked()), this, SLOT(StartButtonClicked())); disconnect(ui.stopButton, SIGNAL(clicked()), this, SLOT(StopButtonClicked())); disconnect(m_USBHIDDev, SIGNAL(CalibrateThreadStarted(QString)), this, SLOT(CalibrationStarted(QString))); disconnect(m_USBHIDDev, SIGNAL(CalibrateThreadStopped(QString)), this, SLOT(CalibrationStopped(QString))); disconnect(m_USBHIDDev, SIGNAL(CaptureThreadButtonTriggered(unsigned char,unsigned char)), this, SLOT(HIDButtonPressed(unsigned char,unsigned char))); StopCalibration(); if(m_bSuccesfullyInitialized) { m_USBHIDDev->StopCaptureThread(true); } delete renderArea; }
HIDCalibrateDialog::HIDCalibrateDialog(USBHIDDevice *pUSBHIDDEV, QWidget *parent) : QDialog(parent) { m_bSuccesfullyInitialized = false; m_bCalibrationActive = false; m_USBHIDDev = pUSBHIDDEV; ui.setupUi(this); setWindowTitle(tr("HID Calibration")); ResetCurrentCalibration(); layout = new QHBoxLayout(ui.groupBox); renderArea = new RenderArea; connect(ui.okButton, SIGNAL(clicked()), this, SLOT(OkButtonClicked())); connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(CancelButtonClicked())); connect(ui.startButton, SIGNAL(clicked()), this, SLOT(StartButtonClicked())); connect(ui.stopButton, SIGNAL(clicked()), this, SLOT(StopButtonClicked())); connect(m_USBHIDDev, SIGNAL(CalibrateThreadStarted(QString)), this, SLOT(CalibrationStarted(QString))); connect(m_USBHIDDev, SIGNAL(CalibrateThreadStopped(QString)), this, SLOT(CalibrationStopped(QString))); connect(m_USBHIDDev, SIGNAL(CaptureThreadButtonTriggered(unsigned char, unsigned char)), this, SLOT(HIDButtonPressed(unsigned char,unsigned char))); ui.label->setText("Ready to start the calibration.\nPress the 'Start' button or the Joysticks Left button to start the calibration.\nPress the Joysticks Right button to exit the calibration."); m_bSuccesfullyInitialized = Initialize(); }
int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; SimonModel simon; w.show(); QObject::connect(&w, SIGNAL(ColorButtonClicked(int)), &simon, SLOT(ColorClicked(int))); QObject::connect(&w, SIGNAL(StartButtonClicked()), &simon, SLOT(StartClicked())); QObject::connect(&w, SIGNAL(HintRequest()), &simon, SLOT(GiveHint())); QObject::connect(&simon, SIGNAL(flashColor(int)), &w, SLOT(flashButtonWithColor(int))); QObject::connect(&simon, SIGNAL(flashDone()), &w, SLOT(flashComplete())); QObject::connect(&simon, SIGNAL(startToRestart()), &w, SLOT(makeRestartButton())); QObject::connect(&simon, SIGNAL(playersTurn()), &w, SLOT(playersTurn())); QObject::connect(&simon, SIGNAL(simonsTurn()), &w, SLOT(simonsTurn())); QObject::connect(&simon, SIGNAL(updateProgress(int, int)), &w, SLOT(updateProgress(int, int))); QObject::connect(&simon, SIGNAL(endGame()), &w, SLOT(gameOver())); QObject::connect(&simon, SIGNAL(provideHints(int, int)), &w, SLOT(updateHint(int, int))); return a.exec(); }
void QmitkBasicImageProcessing::CreateConnections() { if ( m_Controls ) { connect( (QObject*)(m_Controls->cbWhat1), SIGNAL( activated(int) ), this, SLOT( SelectAction(int) ) ); connect( (QObject*)(m_Controls->btnDoIt), SIGNAL(clicked()),(QObject*) this, SLOT(StartButtonClicked())); connect( (QObject*)(m_Controls->cbWhat2), SIGNAL( activated(int) ), this, SLOT( SelectAction2(int) ) ); connect( (QObject*)(m_Controls->btnDoIt2), SIGNAL(clicked()),(QObject*) this, SLOT(StartButton2Clicked())); connect( (QObject*)(m_Controls->rBOneImOp), SIGNAL( clicked() ), this, SLOT( ChangeGUI() ) ); connect( (QObject*)(m_Controls->rBTwoImOp), SIGNAL( clicked() ), this, SLOT( ChangeGUI() ) ); connect( (QObject*)(m_Controls->cbParam4), SIGNAL( activated(int) ), this, SLOT( SelectInterpolator(int) ) ); } m_TimeStepperAdapter = new QmitkStepperAdapter((QObject*) m_Controls->sliceNavigatorTime, GetActiveStdMultiWidget()->GetTimeNavigationController()->GetTime(), "sliceNavigatorTimeFromBIP"); }
void QmitkVirtualSurgery::CreateConnections() { if ( m_Controls ) { connect( (QObject*)(m_Controls->m_TreeNodeSelector), SIGNAL(Activated(mitk::DataTreeIteratorClone)),(QObject*) this, SLOT(ImageSelected(mitk::DataTreeIteratorClone)) ); connect( (QObject*)(m_Controls->m_StartButton), SIGNAL(clicked()),(QObject*) this, SLOT(StartButtonClicked())); connect( (QObject*)(m_Controls->m_btnManualErode), SIGNAL(clicked()),(QObject*) this, SLOT(ManualErodeVesselClicked())); connect( (QObject*)(m_Controls->m_btnPortalVeinSegment), SIGNAL(clicked()),(QObject*) this, SLOT(PortalVeinSegmentButtonClicked())); } }