Example #1
0
HITLWidget::HITLWidget(QWidget *parent)
    : QWidget(parent),
    simulator(0)
{
    widget = new Ui_HITLWidget();
    widget->setupUi(this);
    widget->startButton->setEnabled(true);
    widget->stopButton->setEnabled(false);

    greenColor      = "rgb(35, 221, 35)"; // Change the green color in order to make it a bit more vibrant
    strStyleEnable  = QString("QFrame{background-color: %1; color: white}").arg(greenColor);
    strStyleDisable = "QFrame{background-color: red; color: white}";

    strAutopilotDisconnected = " Autopilot OFF ";
    strSimulatorDisconnected = " Simulator OFF ";
    strAutopilotConnected    = " Autopilot ON ";

    widget->apLabel->setText(strAutopilotDisconnected);
    widget->simLabel->setText(strSimulatorDisconnected);

    connect(widget->startButton, SIGNAL(clicked()), this, SLOT(startButtonClicked()));
    connect(widget->stopButton, SIGNAL(clicked()), this, SLOT(stopButtonClicked()));
    connect(widget->buttonClearLog, SIGNAL(clicked()), this, SLOT(buttonClearLogClicked()));
}
Example #2
0
HITLWidget::HITLWidget(QWidget *parent)
	: QWidget(parent),
	simulator(0)
{
	widget = new Ui_HITLWidget();
	widget->setupUi(this);
	widget->startButton->setEnabled(true);
	widget->stopButton->setEnabled(false);

	greenColor = "rgb(35, 221, 35)";

	strAutopilotDisconnected = " Autopilot OFF ";
	strSimulatorDisconnected = " Simulator OFF ";
	strAutopilotConnected = " Autopilot ON ";
	strSimulatorConnected = " Simulator ON ";

	widget->apLabel->setText(strAutopilotDisconnected);
	widget->simLabel->setText(strSimulatorDisconnected);

	connect(widget->startButton, SIGNAL(clicked()), this, SLOT(startButtonClicked()));
	connect(widget->stopButton, SIGNAL(clicked()), this, SLOT(stopButtonClicked()));
	connect(widget->buttonClearLog, SIGNAL(clicked()), this, SLOT(buttonClearLogClicked()));

}