# HG changeset patch # User Ideenmodellierer # Date 1764524252 -3600 # Node ID e30f00f760d3e9d803f8f773b7ce8b1d990082c3 # Parent 4ace58a7c03caf7d577b30f8a6df701b33fc2343 Cleanup OSTC label and removed url The computer type will now show OSTC 4/5 instead of only 4. The url has been removed because it is no longer maintained. The ui header have been deleted because they are generated files shich should not be under version controll. Delete locally if you want to force an update of the dialog layout. diff -r 4ace58a7c03c -r e30f00f760d3 CmakeLists.txt --- a/CmakeLists.txt Fri Nov 28 20:00:02 2025 +0100 +++ b/CmakeLists.txt Sun Nov 30 18:37:32 2025 +0100 @@ -79,7 +79,6 @@ OSTC4Operations.h OSTC_CR_Operations.h editlogdialog.h - ui_LogEditor.h ) set(UIS diff -r 4ace58a7c03c -r e30f00f760d3 HardwareOperations.cpp --- a/HardwareOperations.cpp Fri Nov 28 20:00:02 2025 +0100 +++ b/HardwareOperations.cpp Sun Nov 30 18:37:32 2025 +0100 @@ -136,7 +136,7 @@ case HW_OSTCcR_b : LOG_TRACE("OSTC cR found"); break; case HW_OSTC3 : LOG_TRACE("OSTC 3 found"); break; case HW_OSTC3p_a : LOG_TRACE("OSTC 3+ found"); break; - case HW_OSTC4 : LOG_TRACE("OSTC 4 found"); break; + case HW_OSTC4 : LOG_TRACE("OSTC 4/5 found"); break; case HW_OSTCSport_b : LOG_TRACE("OSTC Sport, OSTC 2 or OSTC 3 found."); break; diff -r 4ace58a7c03c -r e30f00f760d3 MainWindow.cpp --- a/MainWindow.cpp Fri Nov 28 20:00:02 2025 +0100 +++ b/MainWindow.cpp Sun Nov 30 18:37:32 2025 +0100 @@ -147,39 +147,6 @@ ? QString(" beta %1").arg(PATCH_VERSION) : QString::number(PATCH_VERSION)) ); - - _ui->companionUrlL->setText( QString("%1 " - "ostc-planner.net/wp/companion" - "" - "") - .arg( tr("Official web site") ) - .arg(QString::number(MAJOR_VERSION)) - .arg(QString::number(MINOR_VERSION)) - .arg(BETA_VERSION ? QString("beta%1").arg(PATCH_VERSION) - : QString("%1") .arg(PATCH_VERSION)) - .arg(_op->model()) - ); } @@ -252,8 +219,8 @@ // backword compatibility >= translate name if necessary if ( name =="hwOS (Bluetooth)") name = "ostc3p"; - if( name =="hwOS (USB)") name = "ostc3"; - + if( name =="hwOS (USB)") name = "ostc3"; + if( name =="ostc 4/5") name = "ostc4"; _ui->computerImage->setPixmap( QPixmap(":/Images/" + name + "_160x120.png")); diff -r 4ace58a7c03c -r e30f00f760d3 MainWindow.ui --- a/MainWindow.ui Fri Nov 28 20:00:02 2025 +0100 +++ b/MainWindow.ui Sun Nov 30 18:37:32 2025 +0100 @@ -19,7 +19,63 @@ - + + + + Open the Preferences menu. + + + ... + + + + :/Images/Settings.svg:/Images/Settings.svg + + + + + + + Qt::Orientation::Horizontal + + + QSizePolicy::Policy::Minimum + + + + 8 + 20 + + + + + + + + false + + + Edit Log + + + + + + + Qt::Orientation::Vertical + + + QSizePolicy::Policy::Minimum + + + + 20 + 0 + + + + + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -29,36 +85,107 @@ - - - - H&W dive computer model. + + + + Qt::Orientation::Vertical + + + QSizePolicy::Policy::Minimum + + + + 20 + 0 + + + + + + + + Qt::Orientation::Horizontal - - 0 + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 160 + 120 + + + + + 160 + 120 + - - - OSTC2 mk.2/2n/2c - - - - - OSTC hwOS (USB) - - - - - OSTC hwOS (Bluetooth) - - - - - OSTC4 - - + + + + + :/Images/frog_160x120.png + + + + + + 0 + 46 + + + + QFrame::Shadow::Sunken + + + Qt::ScrollBarPolicy::ScrollBarAlwaysOn + + + Qt::ScrollBarPolicy::ScrollBarAlwaysOff + + + false + + + true + + + false + + + 4 + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + @@ -193,171 +320,34 @@ - - - - <html><head/><body><p>See us on <a href="https://ostc-planner.net/wp/companion/"><span style=" text-decoration: underline; color:#0000ff;">ostc-planner.net/wp/companion</span></a></p></body></html> - - - true - - - - - - - Qt::Orientation::Horizontal - - - - 40 - 20 - - - - - - + + - Open the Preferences menu. - - - ... - - - - :/Images/Settings.svg:/Images/Settings.svg + H&W dive computer model. - - - - - - - 0 - 46 - - - - QFrame::Shadow::Sunken - - - Qt::ScrollBarPolicy::ScrollBarAlwaysOn - - - Qt::ScrollBarPolicy::ScrollBarAlwaysOff - - - false - - - true - - - false - - - 4 - - - - - - - - 0 - 0 - - - - - 160 - 120 - + + 0 - - - 160 - 120 - - - - - - - :/Images/frog_160x120.png - - - - - - - Qt::Orientation::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Orientation::Horizontal - - - QSizePolicy::Policy::Minimum - - - - 8 - 20 - - - - - - - - Qt::Orientation::Vertical - - - QSizePolicy::Policy::Minimum - - - - 20 - 0 - - - - - - - - Qt::Orientation::Vertical - - - QSizePolicy::Policy::Minimum - - - - 20 - 0 - - - - - - - - false - - - Edit Log - + + + OSTC 2 mk.2/2n/2c + + + + + OSTC hwOS (USB) + + + + + OSTC hwOS (Bluetooth) + + + + + OSTC 4/5 + + diff -r 4ace58a7c03c -r e30f00f760d3 OSTC4Operations.cpp --- a/OSTC4Operations.cpp Fri Nov 28 20:00:02 2025 +0100 +++ b/OSTC4Operations.cpp Sun Nov 30 18:37:32 2025 +0100 @@ -59,7 +59,7 @@ QString OSTC4Operations::model() const { - return "OSTC4"; + return "OSTC 4/5"; } HardwareOperations::CompanionFeatures OSTC4Operations::supported() const @@ -114,7 +114,7 @@ LOG_TRACE("Getting model..."); HardwareDescriptor hw = hardwareDescriptor(); if( hw != HW_OSTC4 ) - LOG_THROW("Not an OSTC4."); + LOG_THROW("Not an OSTC4/5."); LOG_TRACE("Getting identity..."); getCommonIdentity(); @@ -187,19 +187,19 @@ OSTC4Operations::OSTC4Operations() : fileChecksum(0,0) { - emulatorName = "OSTC4"; + emulatorName = "OSTC4/5"; } ////////////////////////////////////////////////////////////////////////////// void OSTC4Operations::upgradeFW(const QString &fileName) { - LOG_INFO("Starting OSTC4 firmware upgrade..."); + LOG_INFO("Starting OSTC4/5 firmware upgrade..."); openFirmware(fileName, true); openFirmware(fileName, false); - LOG_INFO("Please wait for OSTC4 to complete installation..."); + LOG_INFO("Please wait for OSTC4/5 to complete installation..."); } ////////////////////////////////////////////////////////////////////////////// @@ -218,7 +218,7 @@ void OSTC4Operations::openFirmware(const QString &fileName, bool dryRun) { - LOG_TRACE("Opening OSTC4 firmware '" << fileName << "'..."); + LOG_TRACE("Opening OSTC4/5 firmware '" << fileName << "'..."); bool forceFirmwareUpdate; bool forceRTEUpdate; @@ -275,11 +275,11 @@ if( _connectMode != SERVICE_MODE ) connectServiceMode(); if( _connectMode != SERVICE_MODE ) - LOG_THROW("Cannot connect OSTC4 service mode..."); + LOG_THROW("Cannot connect OSTC 4/5 service mode..."); //---- Check if needed ? --------------------------------------------- LOG_TRACE("Check part " << part << " is needed ?"); - unsigned char echo = retryCommand(_serial, 'k'); // 0x69 OSTC4 FW Details. + unsigned char echo = retryCommand(_serial, 'k'); // 0x6B OSTC4 FW Details. if( echo != 'k' ) LOG_THROW("Bad firmware details."); @@ -328,7 +328,7 @@ PROGRESS(step++, steps); echo = retryCommand(_serial, 's'); // 0x73 OSTC4 FW Upgrade if( echo != 's' ) - LOG_THROW("Bad OSTC4 FW upgrade commande."); + LOG_THROW("Bad OSTC4/5 FW upgrade commande."); //---- Header PROGRESS(step++, steps); diff -r 4ace58a7c03c -r e30f00f760d3 ui_LogEditor - Kopie.h --- a/ui_LogEditor - Kopie.h Fri Nov 28 20:00:02 2025 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,152 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'LogEditor.ui' -** -** Created by: Qt User Interface Compiler version 5.13.0 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_LOGEDITOR_H -#define UI_LOGEDITOR_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_editLogWnd -{ -public: - QLabel *noPortLabel; - QFrame *line_4; - QFrame *line; - QPushButton *WriteAllHeader; - QPushButton *okB; - QPushButton *ReadAllSamples; - QPushButton *WriteAllSamples; - QProgressBar *HeaderUsage; - QProgressBar *SampleUsage; - QPushButton *pushButton; - QTableWidget *SectorView; - QPushButton *pushButton_2; - QPushButton *LoadDump; - QLabel *label; - QTextBrowser *textBrowser_2; - QTableWidget *SampleView; - QPushButton *ResetSampleAddr; - - void setupUi(QDialog *editLogWnd) - { - if (editLogWnd->objectName().isEmpty()) - editLogWnd->setObjectName(QString::fromUtf8("editLogWnd")); - editLogWnd->resize(853, 385); - noPortLabel = new QLabel(editLogWnd); - noPortLabel->setObjectName(QString::fromUtf8("noPortLabel")); - noPortLabel->setGeometry(QRect(9, 34, 16, 16)); - QSizePolicy sizePolicy(QSizePolicy::Ignored, QSizePolicy::Preferred); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(noPortLabel->sizePolicy().hasHeightForWidth()); - noPortLabel->setSizePolicy(sizePolicy); - noPortLabel->setTextFormat(Qt::RichText); - noPortLabel->setAlignment(Qt::AlignCenter); - noPortLabel->setOpenExternalLinks(true); - line_4 = new QFrame(editLogWnd); - line_4->setObjectName(QString::fromUtf8("line_4")); - line_4->setGeometry(QRect(20, 150, 341, 16)); - line_4->setFrameShape(QFrame::HLine); - line_4->setFrameShadow(QFrame::Sunken); - line = new QFrame(editLogWnd); - line->setObjectName(QString::fromUtf8("line")); - line->setGeometry(QRect(20, 300, 341, 20)); - line->setFrameShape(QFrame::HLine); - line->setFrameShadow(QFrame::Sunken); - WriteAllHeader = new QPushButton(editLogWnd); - WriteAllHeader->setObjectName(QString::fromUtf8("WriteAllHeader")); - WriteAllHeader->setGeometry(QRect(30, 80, 101, 23)); - okB = new QPushButton(editLogWnd); - okB->setObjectName(QString::fromUtf8("okB")); - okB->setGeometry(QRect(240, 330, 75, 23)); - okB->setAutoDefault(false); - ReadAllSamples = new QPushButton(editLogWnd); - ReadAllSamples->setObjectName(QString::fromUtf8("ReadAllSamples")); - ReadAllSamples->setGeometry(QRect(30, 230, 101, 23)); - WriteAllSamples = new QPushButton(editLogWnd); - WriteAllSamples->setObjectName(QString::fromUtf8("WriteAllSamples")); - WriteAllSamples->setGeometry(QRect(30, 260, 101, 23)); - HeaderUsage = new QProgressBar(editLogWnd); - HeaderUsage->setObjectName(QString::fromUtf8("HeaderUsage")); - HeaderUsage->setGeometry(QRect(30, 20, 131, 23)); - HeaderUsage->setValue(24); - SampleUsage = new QProgressBar(editLogWnd); - SampleUsage->setObjectName(QString::fromUtf8("SampleUsage")); - SampleUsage->setGeometry(QRect(30, 190, 131, 23)); - SampleUsage->setValue(24); - pushButton = new QPushButton(editLogWnd); - pushButton->setObjectName(QString::fromUtf8("pushButton")); - pushButton->setGeometry(QRect(30, 50, 101, 23)); - SectorView = new QTableWidget(editLogWnd); - SectorView->setObjectName(QString::fromUtf8("SectorView")); - SectorView->setGeometry(QRect(180, 10, 151, 131)); - pushButton_2 = new QPushButton(editLogWnd); - pushButton_2->setObjectName(QString::fromUtf8("pushButton_2")); - pushButton_2->setGeometry(QRect(110, 330, 75, 23)); - LoadDump = new QPushButton(editLogWnd); - LoadDump->setObjectName(QString::fromUtf8("LoadDump")); - LoadDump->setGeometry(QRect(20, 330, 75, 23)); - label = new QLabel(editLogWnd); - label->setObjectName(QString::fromUtf8("label")); - label->setGeometry(QRect(520, 10, 47, 13)); - textBrowser_2 = new QTextBrowser(editLogWnd); - textBrowser_2->setObjectName(QString::fromUtf8("textBrowser_2")); - textBrowser_2->setGeometry(QRect(570, 10, 256, 361)); - SampleView = new QTableWidget(editLogWnd); - SampleView->setObjectName(QString::fromUtf8("SampleView")); - SampleView->setGeometry(QRect(180, 180, 171, 41)); - ResetSampleAddr = new QPushButton(editLogWnd); - ResetSampleAddr->setObjectName(QString::fromUtf8("ResetSampleAddr")); - ResetSampleAddr->setGeometry(QRect(340, 10, 101, 23)); - - retranslateUi(editLogWnd); - QObject::connect(okB, SIGNAL(clicked()), editLogWnd, SLOT(accept())); - - okB->setDefault(true); - - - QMetaObject::connectSlotsByName(editLogWnd); - } // setupUi - - void retranslateUi(QDialog *editLogWnd) - { - editLogWnd->setWindowTitle(QCoreApplication::translate("editLogWnd", "OSTC Companion settings", nullptr)); - WriteAllHeader->setText(QCoreApplication::translate("editLogWnd", "WriteAllHeader", nullptr)); - okB->setText(QCoreApplication::translate("editLogWnd", "OK", nullptr)); -#if QT_CONFIG(shortcut) - okB->setShortcut(QCoreApplication::translate("editLogWnd", "Return", nullptr)); -#endif // QT_CONFIG(shortcut) - ReadAllSamples->setText(QCoreApplication::translate("editLogWnd", "ReadAllSamples", nullptr)); - WriteAllSamples->setText(QCoreApplication::translate("editLogWnd", "WriteAllSamples", nullptr)); - pushButton->setText(QCoreApplication::translate("editLogWnd", "ReadAllHeader", nullptr)); - pushButton_2->setText(QCoreApplication::translate("editLogWnd", "Save Dump", nullptr)); - LoadDump->setText(QCoreApplication::translate("editLogWnd", "Load Dump", nullptr)); - label->setText(QCoreApplication::translate("editLogWnd", "Info", nullptr)); - ResetSampleAddr->setText(QCoreApplication::translate("editLogWnd", "ResetSampleAddr", nullptr)); - } // retranslateUi - -}; - -namespace Ui { - class editLogWnd: public Ui_editLogWnd {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_LOGEDITOR_H diff -r 4ace58a7c03c -r e30f00f760d3 ui_LogEditor.h --- a/ui_LogEditor.h Fri Nov 28 20:00:02 2025 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'LogEditor.ui' -** -** Created by: Qt User Interface Compiler version 6.10.1 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_LOGEDITOR_H -#define UI_LOGEDITOR_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_editLogWnd -{ -public: - QLabel *noPortLabel; - QPushButton *WriteAllHeader; - QPushButton *okB; - QPushButton *ReadAllSamples; - QPushButton *WriteAllSamples; - QProgressBar *HeaderUsage; - QProgressBar *SampleUsage; - QPushButton *pushButton; - QTableWidget *SectorView; - QPushButton *pushButton_2; - QPushButton *LoadDump; - QLabel *label; - QTextBrowser *textBrowser_2; - QTableWidget *SampleView; - QPushButton *ResetSampleAddr; - - void setupUi(QDialog *editLogWnd) - { - if (editLogWnd->objectName().isEmpty()) - editLogWnd->setObjectName("editLogWnd"); - editLogWnd->resize(853, 385); - noPortLabel = new QLabel(editLogWnd); - noPortLabel->setObjectName("noPortLabel"); - noPortLabel->setGeometry(QRect(9, 34, 16, 16)); - QSizePolicy sizePolicy(QSizePolicy::Policy::Ignored, QSizePolicy::Policy::Preferred); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(noPortLabel->sizePolicy().hasHeightForWidth()); - noPortLabel->setSizePolicy(sizePolicy); - noPortLabel->setTextFormat(Qt::TextFormat::RichText); - noPortLabel->setAlignment(Qt::AlignmentFlag::AlignCenter); - noPortLabel->setOpenExternalLinks(true); - WriteAllHeader = new QPushButton(editLogWnd); - WriteAllHeader->setObjectName("WriteAllHeader"); - WriteAllHeader->setGeometry(QRect(30, 80, 101, 23)); - okB = new QPushButton(editLogWnd); - okB->setObjectName("okB"); - okB->setGeometry(QRect(220, 330, 75, 23)); - okB->setAutoDefault(false); - ReadAllSamples = new QPushButton(editLogWnd); - ReadAllSamples->setObjectName("ReadAllSamples"); - ReadAllSamples->setGeometry(QRect(30, 230, 101, 23)); - WriteAllSamples = new QPushButton(editLogWnd); - WriteAllSamples->setObjectName("WriteAllSamples"); - WriteAllSamples->setGeometry(QRect(30, 260, 101, 23)); - HeaderUsage = new QProgressBar(editLogWnd); - HeaderUsage->setObjectName("HeaderUsage"); - HeaderUsage->setGeometry(QRect(30, 20, 131, 23)); - HeaderUsage->setValue(24); - SampleUsage = new QProgressBar(editLogWnd); - SampleUsage->setObjectName("SampleUsage"); - SampleUsage->setGeometry(QRect(30, 190, 131, 23)); - SampleUsage->setValue(24); - pushButton = new QPushButton(editLogWnd); - pushButton->setObjectName("pushButton"); - pushButton->setGeometry(QRect(30, 50, 101, 23)); - SectorView = new QTableWidget(editLogWnd); - SectorView->setObjectName("SectorView"); - SectorView->setGeometry(QRect(180, 10, 151, 131)); - pushButton_2 = new QPushButton(editLogWnd); - pushButton_2->setObjectName("pushButton_2"); - pushButton_2->setGeometry(QRect(110, 330, 75, 23)); - LoadDump = new QPushButton(editLogWnd); - LoadDump->setObjectName("LoadDump"); - LoadDump->setGeometry(QRect(20, 330, 75, 23)); - label = new QLabel(editLogWnd); - label->setObjectName("label"); - label->setGeometry(QRect(520, 10, 47, 13)); - textBrowser_2 = new QTextBrowser(editLogWnd); - textBrowser_2->setObjectName("textBrowser_2"); - textBrowser_2->setGeometry(QRect(570, 10, 256, 361)); - textBrowser_2->setAcceptRichText(true); - SampleView = new QTableWidget(editLogWnd); - SampleView->setObjectName("SampleView"); - SampleView->setGeometry(QRect(180, 180, 171, 41)); - ResetSampleAddr = new QPushButton(editLogWnd); - ResetSampleAddr->setObjectName("ResetSampleAddr"); - ResetSampleAddr->setGeometry(QRect(340, 10, 101, 23)); - - retranslateUi(editLogWnd); - QObject::connect(okB, &QPushButton::clicked, editLogWnd, qOverload<>(&QDialog::accept)); - - okB->setDefault(true); - - - QMetaObject::connectSlotsByName(editLogWnd); - } // setupUi - - void retranslateUi(QDialog *editLogWnd) - { - editLogWnd->setWindowTitle(QCoreApplication::translate("editLogWnd", "OSTC Companion settings", nullptr)); - WriteAllHeader->setText(QCoreApplication::translate("editLogWnd", "WriteAllHeader", nullptr)); - okB->setText(QCoreApplication::translate("editLogWnd", "OK", nullptr)); -#if QT_CONFIG(shortcut) - okB->setShortcut(QCoreApplication::translate("editLogWnd", "Return", nullptr)); -#endif // QT_CONFIG(shortcut) - ReadAllSamples->setText(QCoreApplication::translate("editLogWnd", "ReadAllSamples", nullptr)); - WriteAllSamples->setText(QCoreApplication::translate("editLogWnd", "WriteAllSamples", nullptr)); - pushButton->setText(QCoreApplication::translate("editLogWnd", "ReadAllHeader", nullptr)); - pushButton_2->setText(QCoreApplication::translate("editLogWnd", "Save Dump", nullptr)); - LoadDump->setText(QCoreApplication::translate("editLogWnd", "Load Dump", nullptr)); - label->setText(QCoreApplication::translate("editLogWnd", "Info", nullptr)); - ResetSampleAddr->setText(QCoreApplication::translate("editLogWnd", "ResetSampleAddr", nullptr)); - } // retranslateUi - -}; - -namespace Ui { - class editLogWnd: public Ui_editLogWnd {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_LOGEDITOR_H diff -r 4ace58a7c03c -r e30f00f760d3 ui_MainWindow.h --- a/ui_MainWindow.h Fri Nov 28 20:00:02 2025 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,300 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'MainWindow.ui' -** -** Created by: Qt User Interface Compiler version 6.10.1 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_MAINWINDOW_H -#define UI_MAINWINDOW_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_MainWindow -{ -public: - QWidget *centralWidget; - QGridLayout *gridLayout; - QProgressBar *progressBar; - QComboBox *computerType; - QVBoxLayout *verticalLayout; - QHBoxLayout *horizontalLayout; - QPushButton *connectButton; - QPushButton *dateButton; - QPushButton *nameButton; - QPushButton *iconButton; - QPushButton *signalButton; - QPushButton *upgradeButton; - QPushButton *closeButton; - QSpacerItem *verticalSpacer; - QPushButton *quitButton; - QLabel *companionUrlL; - QSpacerItem *horizontalSpacer_2; - QToolButton *settingsButton; - QPlainTextEdit *console; - QLabel *computerImage; - QSpacerItem *horizontalSpacer_3; - QSpacerItem *horizontalSpacer; - QSpacerItem *verticalSpacer_3; - QSpacerItem *verticalSpacer_2; - QPushButton *editLog; - - void setupUi(QMainWindow *MainWindow) - { - if (MainWindow->objectName().isEmpty()) - MainWindow->setObjectName("MainWindow"); - MainWindow->resize(451, 418); - MainWindow->setWindowTitle(QString::fromUtf8("OSTC Companion")); - QIcon icon; - icon.addFile(QString::fromUtf8(":/Images/app_OSTC_Companion.svg"), QSize(), QIcon::Mode::Normal, QIcon::State::Off); - MainWindow->setWindowIcon(icon); - centralWidget = new QWidget(MainWindow); - centralWidget->setObjectName("centralWidget"); - gridLayout = new QGridLayout(centralWidget); - gridLayout->setSpacing(6); - gridLayout->setContentsMargins(11, 11, 11, 11); - gridLayout->setObjectName("gridLayout"); - progressBar = new QProgressBar(centralWidget); - progressBar->setObjectName("progressBar"); - progressBar->setAlignment(Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter); - progressBar->setTextVisible(true); - - gridLayout->addWidget(progressBar, 7, 0, 1, 4); - - computerType = new QComboBox(centralWidget); - computerType->addItem(QString::fromUtf8("OSTC2 mk.2/2n/2c")); - computerType->addItem(QString::fromUtf8("OSTC hwOS (USB)")); - computerType->addItem(QString::fromUtf8("OSTC hwOS (Bluetooth)")); - computerType->addItem(QString::fromUtf8("OSTC4")); - computerType->setObjectName("computerType"); - - gridLayout->addWidget(computerType, 0, 1, 1, 1); - - verticalLayout = new QVBoxLayout(); - verticalLayout->setSpacing(0); - verticalLayout->setObjectName("verticalLayout"); - verticalLayout->setContentsMargins(-1, -1, 0, 0); - horizontalLayout = new QHBoxLayout(); - horizontalLayout->setSpacing(6); - horizontalLayout->setObjectName("horizontalLayout"); - connectButton = new QPushButton(centralWidget); - connectButton->setObjectName("connectButton"); - connectButton->setMinimumSize(QSize(0, 23)); - connectButton->setStyleSheet(QString::fromUtf8("QPushButton {\n" -" border: 1px solid blue;\n" -" border-radius: 6px;\n" -" background: qlineargradient(x1:0, y1:0, x2:0, y2:1, \n" -" stop:0.00 white,\n" -" stop:0.55 #55aaff,\n" -" stop:0.56 #4964ff,\n" -" stop:1.00 #55aaff)\n" -"}")); - connectButton->setAutoDefault(true); - - horizontalLayout->addWidget(connectButton); - - - verticalLayout->addLayout(horizontalLayout); - - dateButton = new QPushButton(centralWidget); - dateButton->setObjectName("dateButton"); - - verticalLayout->addWidget(dateButton); - - nameButton = new QPushButton(centralWidget); - nameButton->setObjectName("nameButton"); - - verticalLayout->addWidget(nameButton); - - iconButton = new QPushButton(centralWidget); - iconButton->setObjectName("iconButton"); - - verticalLayout->addWidget(iconButton); - - signalButton = new QPushButton(centralWidget); - signalButton->setObjectName("signalButton"); - - verticalLayout->addWidget(signalButton); - - upgradeButton = new QPushButton(centralWidget); - upgradeButton->setObjectName("upgradeButton"); - - verticalLayout->addWidget(upgradeButton); - - closeButton = new QPushButton(centralWidget); - closeButton->setObjectName("closeButton"); - - verticalLayout->addWidget(closeButton); - - verticalSpacer = new QSpacerItem(105, 8, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Minimum); - - verticalLayout->addItem(verticalSpacer); - - quitButton = new QPushButton(centralWidget); - quitButton->setObjectName("quitButton"); - - verticalLayout->addWidget(quitButton); - - - gridLayout->addLayout(verticalLayout, 0, 3, 6, 1); - - companionUrlL = new QLabel(centralWidget); - companionUrlL->setObjectName("companionUrlL"); - companionUrlL->setText(QString::fromUtf8("

See us on ostc-planner.net/wp/companion

")); - companionUrlL->setOpenExternalLinks(true); - - gridLayout->addWidget(companionUrlL, 6, 0, 1, 4); - - horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); - - gridLayout->addItem(horizontalSpacer_2, 2, 0, 1, 1); - - settingsButton = new QToolButton(centralWidget); - settingsButton->setObjectName("settingsButton"); - QIcon icon1; - icon1.addFile(QString::fromUtf8(":/Images/Settings.svg"), QSize(), QIcon::Mode::Normal, QIcon::State::Off); - settingsButton->setIcon(icon1); - - gridLayout->addWidget(settingsButton, 0, 0, 1, 1); - - console = new QPlainTextEdit(centralWidget); - console->setObjectName("console"); - console->setMinimumSize(QSize(0, 46)); - console->setFrameShadow(QFrame::Shadow::Sunken); - console->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOn); - console->setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOff); - console->setUndoRedoEnabled(false); - console->setReadOnly(true); - console->setCenterOnScroll(false); - console->setProperty("tabStopWidth", QVariant(4)); - - gridLayout->addWidget(console, 8, 0, 1, 4); - - computerImage = new QLabel(centralWidget); - computerImage->setObjectName("computerImage"); - QSizePolicy sizePolicy(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(computerImage->sizePolicy().hasHeightForWidth()); - computerImage->setSizePolicy(sizePolicy); - computerImage->setMinimumSize(QSize(160, 120)); - computerImage->setMaximumSize(QSize(160, 120)); - computerImage->setPixmap(QPixmap(QString::fromUtf8(":/Images/frog_160x120.png"))); - - gridLayout->addWidget(computerImage, 2, 1, 1, 1); - - horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); - - gridLayout->addItem(horizontalSpacer_3, 2, 2, 1, 1); - - horizontalSpacer = new QSpacerItem(8, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Minimum); - - gridLayout->addItem(horizontalSpacer, 0, 2, 1, 1); - - verticalSpacer_3 = new QSpacerItem(20, 0, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Minimum); - - gridLayout->addItem(verticalSpacer_3, 5, 1, 1, 1); - - verticalSpacer_2 = new QSpacerItem(20, 0, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Minimum); - - gridLayout->addItem(verticalSpacer_2, 1, 1, 1, 1); - - editLog = new QPushButton(centralWidget); - editLog->setObjectName("editLog"); - editLog->setEnabled(false); - - gridLayout->addWidget(editLog, 5, 2, 1, 1); - - MainWindow->setCentralWidget(centralWidget); - - retranslateUi(MainWindow); - QObject::connect(computerType, SIGNAL(activated(int)), MainWindow, SLOT(changeTypeSlot())); - QObject::connect(quitButton, &QPushButton::clicked, MainWindow, qOverload<>(&QMainWindow::close)); - QObject::connect(dateButton, SIGNAL(clicked()), MainWindow, SLOT(dateSlot())); - QObject::connect(nameButton, SIGNAL(clicked()), MainWindow, SLOT(nameSlot())); - QObject::connect(iconButton, SIGNAL(clicked()), MainWindow, SLOT(iconSlot())); - QObject::connect(upgradeButton, SIGNAL(clicked()), MainWindow, SLOT(upgradeSlot())); - QObject::connect(connectButton, SIGNAL(clicked()), MainWindow, SLOT(connectSlot())); - QObject::connect(settingsButton, SIGNAL(clicked()), MainWindow, SLOT(settingsSlot())); - QObject::connect(closeButton, SIGNAL(clicked()), MainWindow, SLOT(closeSlot())); - - computerType->setCurrentIndex(0); - - - QMetaObject::connectSlotsByName(MainWindow); - } // setupUi - - void retranslateUi(QMainWindow *MainWindow) - { - -#if QT_CONFIG(tooltip) - computerType->setToolTip(QCoreApplication::translate("MainWindow", "H&W dive computer model.", nullptr)); -#endif // QT_CONFIG(tooltip) -#if QT_CONFIG(tooltip) - connectButton->setToolTip(QCoreApplication::translate("MainWindow", "Open or re-open the last selected USB or Bluetooth port (See Preferences).\n" -"NOTE: make sure to connect the serial cable, or to set the bluetooth mode first...", nullptr)); -#endif // QT_CONFIG(tooltip) - connectButton->setText(QCoreApplication::translate("MainWindow", "Connect", nullptr)); -#if QT_CONFIG(tooltip) - dateButton->setToolTip(QCoreApplication::translate("MainWindow", "Set the H&W computer date and time.\n" -"Can be automatic at each connect, if asked to in the Preferences.\n" -"(Valid once device is connected).", nullptr)); -#endif // QT_CONFIG(tooltip) - dateButton->setText(QCoreApplication::translate("MainWindow", "Set Date && Time", nullptr)); -#if QT_CONFIG(tooltip) - nameButton->setToolTip(QCoreApplication::translate("MainWindow", "Change the name displayed on the H&W device.\n" -"(Valid once device is connected).", nullptr)); -#endif // QT_CONFIG(tooltip) - nameButton->setText(QCoreApplication::translate("MainWindow", "Set Name...", nullptr)); -#if QT_CONFIG(tooltip) - iconButton->setToolTip(QCoreApplication::translate("MainWindow", "Upload a customization icon.\n" -"Only supported on Frog yet.\n" -"(Valid once device is connected).", nullptr)); -#endif // QT_CONFIG(tooltip) - iconButton->setText(QCoreApplication::translate("MainWindow", "Set Icon...", nullptr)); - signalButton->setText(QCoreApplication::translate("MainWindow", "Check Signal", nullptr)); -#if QT_CONFIG(tooltip) - upgradeButton->setToolTip(QCoreApplication::translate("MainWindow", "Ask for a firmware file, and upload it to the H&W device.\n" -"Can be done before or after device (re-)connection.", nullptr)); -#endif // QT_CONFIG(tooltip) - upgradeButton->setText(QCoreApplication::translate("MainWindow", "Upgrade Firmware...", nullptr)); -#if QT_CONFIG(tooltip) - closeButton->setToolTip(QCoreApplication::translate("MainWindow", "Close USB or Bluetooth connection to the device.", nullptr)); -#endif // QT_CONFIG(tooltip) - closeButton->setText(QCoreApplication::translate("MainWindow", "Close", nullptr)); - quitButton->setText(QCoreApplication::translate("MainWindow", "Quit", nullptr)); -#if QT_CONFIG(tooltip) - settingsButton->setToolTip(QCoreApplication::translate("MainWindow", "Open the Preferences menu.", nullptr)); -#endif // QT_CONFIG(tooltip) - settingsButton->setText(QCoreApplication::translate("MainWindow", "...", nullptr)); - computerImage->setText(QString()); - editLog->setText(QCoreApplication::translate("MainWindow", "Edit Log", nullptr)); - (void)MainWindow; - } // retranslateUi - -}; - -namespace Ui { - class MainWindow: public Ui_MainWindow {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_MAINWINDOW_H diff -r 4ace58a7c03c -r e30f00f760d3 ui_Settings.h --- a/ui_Settings.h Fri Nov 28 20:00:02 2025 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,252 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'Settings.ui' -** -** Created by: Qt User Interface Compiler version 5.13.0 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_SETTINGS_H -#define UI_SETTINGS_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_Settings -{ -public: - QGridLayout *gridLayout; - QFrame *line_3; - QCheckBox *forceFirmwareUpdate; - QComboBox *portMenu; - QCheckBox *autoSetDateTimeCB; - QCheckBox *forceFontlibUpdate; - QLabel *noPortLabel; - QComboBox *languageMenu; - QToolButton *updatePorts; - QHBoxLayout *horizontalLayout; - QPushButton *resetB; - QSpacerItem *horizontalSpacer_2; - QPushButton *okB; - QPushButton *cancelB; - QLabel *label; - QCheckBox *forceRTEUpdate; - QFrame *line_4; - QLabel *label_2; - QSpacerItem *horizontalSpacer; - QFrame *line; - QCheckBox *useFastMode; - - void setupUi(QDialog *Settings) - { - if (Settings->objectName().isEmpty()) - Settings->setObjectName(QString::fromUtf8("Settings")); - Settings->resize(341, 293); - gridLayout = new QGridLayout(Settings); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - line_3 = new QFrame(Settings); - line_3->setObjectName(QString::fromUtf8("line_3")); - line_3->setFrameShape(QFrame::HLine); - line_3->setFrameShadow(QFrame::Sunken); - - gridLayout->addWidget(line_3, 10, 0, 1, 3); - - forceFirmwareUpdate = new QCheckBox(Settings); - forceFirmwareUpdate->setObjectName(QString::fromUtf8("forceFirmwareUpdate")); - - gridLayout->addWidget(forceFirmwareUpdate, 6, 0, 1, 2); - - portMenu = new QComboBox(Settings); - portMenu->setObjectName(QString::fromUtf8("portMenu")); - portMenu->setEditable(true); - - gridLayout->addWidget(portMenu, 2, 1, 1, 1); - - autoSetDateTimeCB = new QCheckBox(Settings); - autoSetDateTimeCB->setObjectName(QString::fromUtf8("autoSetDateTimeCB")); - - gridLayout->addWidget(autoSetDateTimeCB, 11, 0, 1, 3); - - forceFontlibUpdate = new QCheckBox(Settings); - forceFontlibUpdate->setObjectName(QString::fromUtf8("forceFontlibUpdate")); - - gridLayout->addWidget(forceFontlibUpdate, 8, 0, 1, 2); - - noPortLabel = new QLabel(Settings); - noPortLabel->setObjectName(QString::fromUtf8("noPortLabel")); - QSizePolicy sizePolicy(QSizePolicy::Ignored, QSizePolicy::Preferred); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(noPortLabel->sizePolicy().hasHeightForWidth()); - noPortLabel->setSizePolicy(sizePolicy); - noPortLabel->setTextFormat(Qt::RichText); - noPortLabel->setAlignment(Qt::AlignCenter); - noPortLabel->setOpenExternalLinks(true); - - gridLayout->addWidget(noPortLabel, 4, 0, 1, 3); - - languageMenu = new QComboBox(Settings); - QIcon icon; - icon.addFile(QString::fromUtf8(":/icons/Icons/german.png"), QSize(), QIcon::Normal, QIcon::Off); - languageMenu->addItem(icon, QString::fromUtf8("Deutsch")); - QIcon icon1; - icon1.addFile(QString::fromUtf8(":/icons/Icons/english.png"), QSize(), QIcon::Normal, QIcon::Off); - languageMenu->addItem(icon1, QString::fromUtf8("English")); - QIcon icon2; - icon2.addFile(QString::fromUtf8(":/icons/Icons/spanish.png"), QSize(), QIcon::Normal, QIcon::Off); - languageMenu->addItem(icon2, QString::fromUtf8("Espa\303\261ol")); - QIcon icon3; - icon3.addFile(QString::fromUtf8(":/icons/Icons/french.png"), QSize(), QIcon::Normal, QIcon::Off); - languageMenu->addItem(icon3, QString::fromUtf8("Fran\303\247ais")); - QIcon icon4; - icon4.addFile(QString::fromUtf8(":/icons/Icons/italian.png"), QSize(), QIcon::Normal, QIcon::Off); - languageMenu->addItem(icon4, QString::fromUtf8("Italiano")); - QIcon icon5; - icon5.addFile(QString::fromUtf8(":/icons/Icons/russian.png"), QSize(), QIcon::Normal, QIcon::Off); - languageMenu->addItem(icon5, QString::fromUtf8("\320\240\321\203\321\201\321\201\320\272\320\270\320\271")); - languageMenu->setObjectName(QString::fromUtf8("languageMenu")); - languageMenu->setInsertPolicy(QComboBox::NoInsert); - - gridLayout->addWidget(languageMenu, 0, 1, 1, 1); - - updatePorts = new QToolButton(Settings); - updatePorts->setObjectName(QString::fromUtf8("updatePorts")); - updatePorts->setText(QString::fromUtf8("...")); - - gridLayout->addWidget(updatePorts, 2, 2, 1, 1); - - horizontalLayout = new QHBoxLayout(); - horizontalLayout->setSpacing(0); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - resetB = new QPushButton(Settings); - resetB->setObjectName(QString::fromUtf8("resetB")); - - horizontalLayout->addWidget(resetB); - - horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout->addItem(horizontalSpacer_2); - - okB = new QPushButton(Settings); - okB->setObjectName(QString::fromUtf8("okB")); - okB->setAutoDefault(false); - - horizontalLayout->addWidget(okB); - - cancelB = new QPushButton(Settings); - cancelB->setObjectName(QString::fromUtf8("cancelB")); - - horizontalLayout->addWidget(cancelB); - - - gridLayout->addLayout(horizontalLayout, 15, 0, 1, 3); - - label = new QLabel(Settings); - label->setObjectName(QString::fromUtf8("label")); - label->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - - gridLayout->addWidget(label, 0, 0, 1, 1); - - forceRTEUpdate = new QCheckBox(Settings); - forceRTEUpdate->setObjectName(QString::fromUtf8("forceRTEUpdate")); - - gridLayout->addWidget(forceRTEUpdate, 7, 0, 1, 2); - - line_4 = new QFrame(Settings); - line_4->setObjectName(QString::fromUtf8("line_4")); - line_4->setFrameShape(QFrame::HLine); - line_4->setFrameShadow(QFrame::Sunken); - - gridLayout->addWidget(line_4, 5, 0, 1, 3); - - label_2 = new QLabel(Settings); - label_2->setObjectName(QString::fromUtf8("label_2")); - QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Preferred); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth()); - label_2->setSizePolicy(sizePolicy1); - label_2->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); - - gridLayout->addWidget(label_2, 2, 0, 1, 1); - - horizontalSpacer = new QSpacerItem(0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - gridLayout->addItem(horizontalSpacer, 0, 2, 1, 1); - - line = new QFrame(Settings); - line->setObjectName(QString::fromUtf8("line")); - line->setFrameShape(QFrame::HLine); - line->setFrameShadow(QFrame::Sunken); - - gridLayout->addWidget(line, 14, 0, 1, 3); - - useFastMode = new QCheckBox(Settings); - useFastMode->setObjectName(QString::fromUtf8("useFastMode")); - - gridLayout->addWidget(useFastMode, 13, 0, 1, 3); - - - retranslateUi(Settings); - QObject::connect(okB, SIGNAL(clicked()), Settings, SLOT(accept())); - QObject::connect(cancelB, SIGNAL(clicked()), Settings, SLOT(reject())); - QObject::connect(languageMenu, SIGNAL(activated(int)), Settings, SLOT(languageSlot(int))); - QObject::connect(updatePorts, SIGNAL(clicked()), Settings, SLOT(updatePortsSlot())); - QObject::connect(resetB, SIGNAL(clicked()), Settings, SLOT(resetSettingsSlot())); - - languageMenu->setCurrentIndex(0); - okB->setDefault(true); - - - QMetaObject::connectSlotsByName(Settings); - } // setupUi - - void retranslateUi(QDialog *Settings) - { - Settings->setWindowTitle(QCoreApplication::translate("Settings", "OSTC Companion settings", nullptr)); - forceFirmwareUpdate->setText(QCoreApplication::translate("Settings", "Force Firmware update", nullptr)); -#if QT_CONFIG(tooltip) - autoSetDateTimeCB->setToolTip(QCoreApplication::translate("Settings", "If checked, any configuration upload will also setup date and time.", nullptr)); -#endif // QT_CONFIG(tooltip) - autoSetDateTimeCB->setText(QCoreApplication::translate("Settings", "Auto setup of date && time", nullptr)); - forceFontlibUpdate->setText(QCoreApplication::translate("Settings", "Force FontLib update", nullptr)); - -#if QT_CONFIG(tooltip) - updatePorts->setToolTip(QCoreApplication::translate("Settings", "Update port list with currently connected USB or Bluetooth devices.", nullptr)); -#endif // QT_CONFIG(tooltip) - resetB->setText(QCoreApplication::translate("Settings", "Restore Defaults", nullptr)); - okB->setText(QCoreApplication::translate("Settings", "OK", nullptr)); -#if QT_CONFIG(shortcut) - okB->setShortcut(QCoreApplication::translate("Settings", "Return", nullptr)); -#endif // QT_CONFIG(shortcut) - cancelB->setText(QCoreApplication::translate("Settings", "Cancel", nullptr)); -#if QT_CONFIG(shortcut) - cancelB->setShortcut(QCoreApplication::translate("Settings", "Ctrl+W", nullptr)); -#endif // QT_CONFIG(shortcut) - label->setText(QCoreApplication::translate("Settings", "Language:", nullptr)); - forceRTEUpdate->setText(QCoreApplication::translate("Settings", "Force RTE update", nullptr)); - label_2->setText(QCoreApplication::translate("Settings", "Communication port:", nullptr)); - useFastMode->setText(QCoreApplication::translate("Settings", "Enable fast mode if supported", nullptr)); - } // retranslateUi - -}; - -namespace Ui { - class Settings: public Ui_Settings {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_SETTINGS_H