Mercurial > public > ostc_companion
comparison ui_MainWindow.h @ 1:0b3630a29ad8
Initial version based on previous repository.
Project was ported to QT6 and in now cmake based.
| author | Ideenmodellierer <tiefenrauscher@web.de> |
|---|---|
| date | Thu, 27 Nov 2025 18:40:28 +0100 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 0:76ccd6ce50c0 | 1:0b3630a29ad8 |
|---|---|
| 1 /******************************************************************************** | |
| 2 ** Form generated from reading UI file 'MainWindow.ui' | |
| 3 ** | |
| 4 ** Created by: Qt User Interface Compiler version 6.10.1 | |
| 5 ** | |
| 6 ** WARNING! All changes made in this file will be lost when recompiling UI file! | |
| 7 ********************************************************************************/ | |
| 8 | |
| 9 #ifndef UI_MAINWINDOW_H | |
| 10 #define UI_MAINWINDOW_H | |
| 11 | |
| 12 #include <QtCore/QVariant> | |
| 13 #include <QtGui/QIcon> | |
| 14 #include <QtWidgets/QApplication> | |
| 15 #include <QtWidgets/QComboBox> | |
| 16 #include <QtWidgets/QGridLayout> | |
| 17 #include <QtWidgets/QHBoxLayout> | |
| 18 #include <QtWidgets/QLabel> | |
| 19 #include <QtWidgets/QMainWindow> | |
| 20 #include <QtWidgets/QPlainTextEdit> | |
| 21 #include <QtWidgets/QProgressBar> | |
| 22 #include <QtWidgets/QPushButton> | |
| 23 #include <QtWidgets/QSpacerItem> | |
| 24 #include <QtWidgets/QToolButton> | |
| 25 #include <QtWidgets/QVBoxLayout> | |
| 26 #include <QtWidgets/QWidget> | |
| 27 | |
| 28 QT_BEGIN_NAMESPACE | |
| 29 | |
| 30 class Ui_MainWindow | |
| 31 { | |
| 32 public: | |
| 33 QWidget *centralWidget; | |
| 34 QGridLayout *gridLayout; | |
| 35 QProgressBar *progressBar; | |
| 36 QComboBox *computerType; | |
| 37 QVBoxLayout *verticalLayout; | |
| 38 QHBoxLayout *horizontalLayout; | |
| 39 QPushButton *connectButton; | |
| 40 QPushButton *dateButton; | |
| 41 QPushButton *nameButton; | |
| 42 QPushButton *iconButton; | |
| 43 QPushButton *signalButton; | |
| 44 QPushButton *upgradeButton; | |
| 45 QPushButton *closeButton; | |
| 46 QSpacerItem *verticalSpacer; | |
| 47 QPushButton *quitButton; | |
| 48 QLabel *companionUrlL; | |
| 49 QSpacerItem *horizontalSpacer_2; | |
| 50 QToolButton *settingsButton; | |
| 51 QPlainTextEdit *console; | |
| 52 QLabel *computerImage; | |
| 53 QSpacerItem *horizontalSpacer_3; | |
| 54 QSpacerItem *horizontalSpacer; | |
| 55 QSpacerItem *verticalSpacer_3; | |
| 56 QSpacerItem *verticalSpacer_2; | |
| 57 QPushButton *editLog; | |
| 58 | |
| 59 void setupUi(QMainWindow *MainWindow) | |
| 60 { | |
| 61 if (MainWindow->objectName().isEmpty()) | |
| 62 MainWindow->setObjectName("MainWindow"); | |
| 63 MainWindow->resize(451, 418); | |
| 64 MainWindow->setWindowTitle(QString::fromUtf8("OSTC Companion")); | |
| 65 QIcon icon; | |
| 66 icon.addFile(QString::fromUtf8(":/Images/app_OSTC_Companion.svg"), QSize(), QIcon::Mode::Normal, QIcon::State::Off); | |
| 67 MainWindow->setWindowIcon(icon); | |
| 68 centralWidget = new QWidget(MainWindow); | |
| 69 centralWidget->setObjectName("centralWidget"); | |
| 70 gridLayout = new QGridLayout(centralWidget); | |
| 71 gridLayout->setSpacing(6); | |
| 72 gridLayout->setContentsMargins(11, 11, 11, 11); | |
| 73 gridLayout->setObjectName("gridLayout"); | |
| 74 progressBar = new QProgressBar(centralWidget); | |
| 75 progressBar->setObjectName("progressBar"); | |
| 76 progressBar->setAlignment(Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter); | |
| 77 progressBar->setTextVisible(true); | |
| 78 | |
| 79 gridLayout->addWidget(progressBar, 7, 0, 1, 4); | |
| 80 | |
| 81 computerType = new QComboBox(centralWidget); | |
| 82 computerType->addItem(QString::fromUtf8("OSTC2 mk.2/2n/2c")); | |
| 83 computerType->addItem(QString::fromUtf8("OSTC hwOS (USB)")); | |
| 84 computerType->addItem(QString::fromUtf8("OSTC hwOS (Bluetooth)")); | |
| 85 computerType->addItem(QString::fromUtf8("OSTC4")); | |
| 86 computerType->setObjectName("computerType"); | |
| 87 | |
| 88 gridLayout->addWidget(computerType, 0, 1, 1, 1); | |
| 89 | |
| 90 verticalLayout = new QVBoxLayout(); | |
| 91 verticalLayout->setSpacing(0); | |
| 92 verticalLayout->setObjectName("verticalLayout"); | |
| 93 verticalLayout->setContentsMargins(-1, -1, 0, 0); | |
| 94 horizontalLayout = new QHBoxLayout(); | |
| 95 horizontalLayout->setSpacing(6); | |
| 96 horizontalLayout->setObjectName("horizontalLayout"); | |
| 97 connectButton = new QPushButton(centralWidget); | |
| 98 connectButton->setObjectName("connectButton"); | |
| 99 connectButton->setMinimumSize(QSize(0, 23)); | |
| 100 connectButton->setStyleSheet(QString::fromUtf8("QPushButton {\n" | |
| 101 " border: 1px solid blue;\n" | |
| 102 " border-radius: 6px;\n" | |
| 103 " background: qlineargradient(x1:0, y1:0, x2:0, y2:1, \n" | |
| 104 " stop:0.00 white,\n" | |
| 105 " stop:0.55 #55aaff,\n" | |
| 106 " stop:0.56 #4964ff,\n" | |
| 107 " stop:1.00 #55aaff)\n" | |
| 108 "}")); | |
| 109 connectButton->setAutoDefault(true); | |
| 110 | |
| 111 horizontalLayout->addWidget(connectButton); | |
| 112 | |
| 113 | |
| 114 verticalLayout->addLayout(horizontalLayout); | |
| 115 | |
| 116 dateButton = new QPushButton(centralWidget); | |
| 117 dateButton->setObjectName("dateButton"); | |
| 118 | |
| 119 verticalLayout->addWidget(dateButton); | |
| 120 | |
| 121 nameButton = new QPushButton(centralWidget); | |
| 122 nameButton->setObjectName("nameButton"); | |
| 123 | |
| 124 verticalLayout->addWidget(nameButton); | |
| 125 | |
| 126 iconButton = new QPushButton(centralWidget); | |
| 127 iconButton->setObjectName("iconButton"); | |
| 128 | |
| 129 verticalLayout->addWidget(iconButton); | |
| 130 | |
| 131 signalButton = new QPushButton(centralWidget); | |
| 132 signalButton->setObjectName("signalButton"); | |
| 133 | |
| 134 verticalLayout->addWidget(signalButton); | |
| 135 | |
| 136 upgradeButton = new QPushButton(centralWidget); | |
| 137 upgradeButton->setObjectName("upgradeButton"); | |
| 138 | |
| 139 verticalLayout->addWidget(upgradeButton); | |
| 140 | |
| 141 closeButton = new QPushButton(centralWidget); | |
| 142 closeButton->setObjectName("closeButton"); | |
| 143 | |
| 144 verticalLayout->addWidget(closeButton); | |
| 145 | |
| 146 verticalSpacer = new QSpacerItem(105, 8, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Minimum); | |
| 147 | |
| 148 verticalLayout->addItem(verticalSpacer); | |
| 149 | |
| 150 quitButton = new QPushButton(centralWidget); | |
| 151 quitButton->setObjectName("quitButton"); | |
| 152 | |
| 153 verticalLayout->addWidget(quitButton); | |
| 154 | |
| 155 | |
| 156 gridLayout->addLayout(verticalLayout, 0, 3, 6, 1); | |
| 157 | |
| 158 companionUrlL = new QLabel(centralWidget); | |
| 159 companionUrlL->setObjectName("companionUrlL"); | |
| 160 companionUrlL->setText(QString::fromUtf8("<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>")); | |
| 161 companionUrlL->setOpenExternalLinks(true); | |
| 162 | |
| 163 gridLayout->addWidget(companionUrlL, 6, 0, 1, 4); | |
| 164 | |
| 165 horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); | |
| 166 | |
| 167 gridLayout->addItem(horizontalSpacer_2, 2, 0, 1, 1); | |
| 168 | |
| 169 settingsButton = new QToolButton(centralWidget); | |
| 170 settingsButton->setObjectName("settingsButton"); | |
| 171 QIcon icon1; | |
| 172 icon1.addFile(QString::fromUtf8(":/Images/Settings.svg"), QSize(), QIcon::Mode::Normal, QIcon::State::Off); | |
| 173 settingsButton->setIcon(icon1); | |
| 174 | |
| 175 gridLayout->addWidget(settingsButton, 0, 0, 1, 1); | |
| 176 | |
| 177 console = new QPlainTextEdit(centralWidget); | |
| 178 console->setObjectName("console"); | |
| 179 console->setMinimumSize(QSize(0, 46)); | |
| 180 console->setFrameShadow(QFrame::Shadow::Sunken); | |
| 181 console->setVerticalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOn); | |
| 182 console->setHorizontalScrollBarPolicy(Qt::ScrollBarPolicy::ScrollBarAlwaysOff); | |
| 183 console->setUndoRedoEnabled(false); | |
| 184 console->setReadOnly(true); | |
| 185 console->setCenterOnScroll(false); | |
| 186 console->setProperty("tabStopWidth", QVariant(4)); | |
| 187 | |
| 188 gridLayout->addWidget(console, 8, 0, 1, 4); | |
| 189 | |
| 190 computerImage = new QLabel(centralWidget); | |
| 191 computerImage->setObjectName("computerImage"); | |
| 192 QSizePolicy sizePolicy(QSizePolicy::Policy::Fixed, QSizePolicy::Policy::Fixed); | |
| 193 sizePolicy.setHorizontalStretch(0); | |
| 194 sizePolicy.setVerticalStretch(0); | |
| 195 sizePolicy.setHeightForWidth(computerImage->sizePolicy().hasHeightForWidth()); | |
| 196 computerImage->setSizePolicy(sizePolicy); | |
| 197 computerImage->setMinimumSize(QSize(160, 120)); | |
| 198 computerImage->setMaximumSize(QSize(160, 120)); | |
| 199 computerImage->setPixmap(QPixmap(QString::fromUtf8(":/Images/frog_160x120.png"))); | |
| 200 | |
| 201 gridLayout->addWidget(computerImage, 2, 1, 1, 1); | |
| 202 | |
| 203 horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum); | |
| 204 | |
| 205 gridLayout->addItem(horizontalSpacer_3, 2, 2, 1, 1); | |
| 206 | |
| 207 horizontalSpacer = new QSpacerItem(8, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Minimum); | |
| 208 | |
| 209 gridLayout->addItem(horizontalSpacer, 0, 2, 1, 1); | |
| 210 | |
| 211 verticalSpacer_3 = new QSpacerItem(20, 0, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Minimum); | |
| 212 | |
| 213 gridLayout->addItem(verticalSpacer_3, 5, 1, 1, 1); | |
| 214 | |
| 215 verticalSpacer_2 = new QSpacerItem(20, 0, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Minimum); | |
| 216 | |
| 217 gridLayout->addItem(verticalSpacer_2, 1, 1, 1, 1); | |
| 218 | |
| 219 editLog = new QPushButton(centralWidget); | |
| 220 editLog->setObjectName("editLog"); | |
| 221 editLog->setEnabled(false); | |
| 222 | |
| 223 gridLayout->addWidget(editLog, 5, 2, 1, 1); | |
| 224 | |
| 225 MainWindow->setCentralWidget(centralWidget); | |
| 226 | |
| 227 retranslateUi(MainWindow); | |
| 228 QObject::connect(computerType, SIGNAL(activated(int)), MainWindow, SLOT(changeTypeSlot())); | |
| 229 QObject::connect(quitButton, &QPushButton::clicked, MainWindow, qOverload<>(&QMainWindow::close)); | |
| 230 QObject::connect(dateButton, SIGNAL(clicked()), MainWindow, SLOT(dateSlot())); | |
| 231 QObject::connect(nameButton, SIGNAL(clicked()), MainWindow, SLOT(nameSlot())); | |
| 232 QObject::connect(iconButton, SIGNAL(clicked()), MainWindow, SLOT(iconSlot())); | |
| 233 QObject::connect(upgradeButton, SIGNAL(clicked()), MainWindow, SLOT(upgradeSlot())); | |
| 234 QObject::connect(connectButton, SIGNAL(clicked()), MainWindow, SLOT(connectSlot())); | |
| 235 QObject::connect(settingsButton, SIGNAL(clicked()), MainWindow, SLOT(settingsSlot())); | |
| 236 QObject::connect(closeButton, SIGNAL(clicked()), MainWindow, SLOT(closeSlot())); | |
| 237 | |
| 238 computerType->setCurrentIndex(0); | |
| 239 | |
| 240 | |
| 241 QMetaObject::connectSlotsByName(MainWindow); | |
| 242 } // setupUi | |
| 243 | |
| 244 void retranslateUi(QMainWindow *MainWindow) | |
| 245 { | |
| 246 | |
| 247 #if QT_CONFIG(tooltip) | |
| 248 computerType->setToolTip(QCoreApplication::translate("MainWindow", "H&W dive computer model.", nullptr)); | |
| 249 #endif // QT_CONFIG(tooltip) | |
| 250 #if QT_CONFIG(tooltip) | |
| 251 connectButton->setToolTip(QCoreApplication::translate("MainWindow", "Open or re-open the last selected USB or Bluetooth port (See Preferences).\n" | |
| 252 "NOTE: make sure to connect the serial cable, or to set the bluetooth mode first...", nullptr)); | |
| 253 #endif // QT_CONFIG(tooltip) | |
| 254 connectButton->setText(QCoreApplication::translate("MainWindow", "Connect", nullptr)); | |
| 255 #if QT_CONFIG(tooltip) | |
| 256 dateButton->setToolTip(QCoreApplication::translate("MainWindow", "Set the H&W computer date and time.\n" | |
| 257 "Can be automatic at each connect, if asked to in the Preferences.\n" | |
| 258 "(Valid once device is connected).", nullptr)); | |
| 259 #endif // QT_CONFIG(tooltip) | |
| 260 dateButton->setText(QCoreApplication::translate("MainWindow", "Set Date && Time", nullptr)); | |
| 261 #if QT_CONFIG(tooltip) | |
| 262 nameButton->setToolTip(QCoreApplication::translate("MainWindow", "Change the name displayed on the H&W device.\n" | |
| 263 "(Valid once device is connected).", nullptr)); | |
| 264 #endif // QT_CONFIG(tooltip) | |
| 265 nameButton->setText(QCoreApplication::translate("MainWindow", "Set Name...", nullptr)); | |
| 266 #if QT_CONFIG(tooltip) | |
| 267 iconButton->setToolTip(QCoreApplication::translate("MainWindow", "Upload a customization icon.\n" | |
| 268 "Only supported on Frog yet.\n" | |
| 269 "(Valid once device is connected).", nullptr)); | |
| 270 #endif // QT_CONFIG(tooltip) | |
| 271 iconButton->setText(QCoreApplication::translate("MainWindow", "Set Icon...", nullptr)); | |
| 272 signalButton->setText(QCoreApplication::translate("MainWindow", "Check Signal", nullptr)); | |
| 273 #if QT_CONFIG(tooltip) | |
| 274 upgradeButton->setToolTip(QCoreApplication::translate("MainWindow", "Ask for a firmware file, and upload it to the H&W device.\n" | |
| 275 "Can be done before or after device (re-)connection.", nullptr)); | |
| 276 #endif // QT_CONFIG(tooltip) | |
| 277 upgradeButton->setText(QCoreApplication::translate("MainWindow", "Upgrade Firmware...", nullptr)); | |
| 278 #if QT_CONFIG(tooltip) | |
| 279 closeButton->setToolTip(QCoreApplication::translate("MainWindow", "Close USB or Bluetooth connection to the device.", nullptr)); | |
| 280 #endif // QT_CONFIG(tooltip) | |
| 281 closeButton->setText(QCoreApplication::translate("MainWindow", "Close", nullptr)); | |
| 282 quitButton->setText(QCoreApplication::translate("MainWindow", "Quit", nullptr)); | |
| 283 #if QT_CONFIG(tooltip) | |
| 284 settingsButton->setToolTip(QCoreApplication::translate("MainWindow", "Open the Preferences menu.", nullptr)); | |
| 285 #endif // QT_CONFIG(tooltip) | |
| 286 settingsButton->setText(QCoreApplication::translate("MainWindow", "...", nullptr)); | |
| 287 computerImage->setText(QString()); | |
| 288 editLog->setText(QCoreApplication::translate("MainWindow", "Edit Log", nullptr)); | |
| 289 (void)MainWindow; | |
| 290 } // retranslateUi | |
| 291 | |
| 292 }; | |
| 293 | |
| 294 namespace Ui { | |
| 295 class MainWindow: public Ui_MainWindow {}; | |
| 296 } // namespace Ui | |
| 297 | |
| 298 QT_END_NAMESPACE | |
| 299 | |
| 300 #endif // UI_MAINWINDOW_H |
