Ejemplo n.º 1
0
NewTabDialog::NewTabDialog(QWidget *parent) :
    QDialog(parent), dialog(new Ui::NewTabDialog)
{
    dialog->setupUi(this);
    connect(dialog->OKButton, SIGNAL(clicked()), this, SLOT(OKButtonClicked()));
    connect(dialog->CancelButton, SIGNAL(clicked()), this, SLOT(CancelButtonClicked()));
}
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
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();
}