TransmissionDialog::TransmissionDialog(AbstractDiagInterface *diagInterface, QString language) : ControlUnitDialog(tr("Transmission Control Unit"), diagInterface, language) { // *** Initialize global variables: _content_DCs = NULL; _content_MBsSWs = NULL; _content_Adjustments = NULL; _mode = DCs_mode; // we start in Diagnostic Codes mode // Show information-widget: _infoWidget = new CUinfo_Transmission(); setInfoWidget(_infoWidget); _infoWidget->show(); // Setup functions: QPushButton *pushButton = addFunction(tr("&Diagnostic Codes"), QIcon(QString::fromUtf8(":/icons/chrystal/22x22/messagebox_warning.png")), true); pushButton->setChecked(true); connect( pushButton, SIGNAL( clicked() ), this, SLOT( DTCs() ) ); pushButton = addFunction(tr("&Measuring Blocks"), QIcon(QString::fromUtf8(":/icons/oxygen/22x22/applications-utilities.png")), true); connect( pushButton, SIGNAL( clicked() ), this, SLOT( measuringblocks() ) ); pushButton = addFunction(tr("&Adjustments"), QIcon(QString::fromUtf8(":/icons/chrystal/22x22/configure.png")), true); connect( pushButton, SIGNAL( clicked() ), this, SLOT( adjustments() ) ); _clearMemory_pushButton = addFunction(tr("Clear Memory"), QIcon(QString::fromUtf8(":/icons/chrystal/22x22/eraser.png")), false); connect( _clearMemory_pushButton, SIGNAL( clicked() ), this, SLOT( clearMemory() ) ); _clearMemory2_pushButton = addFunction(tr("Clear Memory 2"), QIcon(QString::fromUtf8(":/icons/chrystal/22x22/eraser.png")), false); connect( _clearMemory2_pushButton, SIGNAL( clicked() ), this, SLOT( clearMemory2() ) ); // NOTE: using released() instead of pressed() as workaround for a Qt-Bug occuring under MS Windows // Load/Show Diagnostic Code content: _content_DCs = new CUcontent_DCs_twoMemories(); setContentWidget(tr("Diagnostic Codes:"), _content_DCs); _content_DCs->show(); // Make GUI visible this->show(); // Connect to Control Unit, get data and setup GUI: setup(); }
CruiseControlDialog::CruiseControlDialog(AbstractDiagInterface *diagInterface, QString language) : ControlUnitDialog(controlUnitName(), diagInterface, language) { // Add information widget: setInfoWidget( new CUinfo_simple() ); // Add content: addContent(ContentSelection::DCsMode); addContent(ContentSelection::MBsSWsMode); }