diff --git a/src/qt/evdev_mouse.cpp b/src/qt/evdev_mouse.cpp index cb4cd4ffe..c04c8c8d6 100644 --- a/src/qt/evdev_mouse.cpp +++ b/src/qt/evdev_mouse.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Linux/FreeBSD libevdev mouse input module. + * + * + * + * Authors: Cacodemon345 + * + * Copyright 2021-2022 Cacodemon345 + */ #include "evdev_mouse.hpp" #include #include diff --git a/src/qt/qt.c b/src/qt/qt.c index 507645c84..259f79c88 100644 --- a/src/qt/qt.c +++ b/src/qt/qt.c @@ -1,3 +1,17 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * + * + * Authors: Joakim L. Gilje + * + * Copyright 2021 Joakim L. Gilje + */ /* * C functionality for Qt platform, where the C equivalent is not easily * implemented in Qt diff --git a/src/qt/qt_deviceconfig.cpp b/src/qt/qt_deviceconfig.cpp index 32e202e76..c51a8a49e 100644 --- a/src/qt/qt_deviceconfig.cpp +++ b/src/qt/qt_deviceconfig.cpp @@ -1,3 +1,21 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Device configuration UI code. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2022 Cacodemon345 + */ #include "qt_deviceconfig.hpp" #include "ui_qt_deviceconfig.h" diff --git a/src/qt/qt_filefield.cpp b/src/qt/qt_filefield.cpp index 770a244e0..75523c20e 100644 --- a/src/qt/qt_filefield.cpp +++ b/src/qt/qt_filefield.cpp @@ -1,3 +1,21 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * File field widget. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2022 Cacodemon345 + */ #include "qt_filefield.hpp" #include "ui_qt_filefield.h" diff --git a/src/qt/qt_harddiskdialog.cpp b/src/qt/qt_harddiskdialog.cpp index 2ed784a42..3e933ddab 100644 --- a/src/qt/qt_harddiskdialog.cpp +++ b/src/qt/qt_harddiskdialog.cpp @@ -1,3 +1,21 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Hard disk dialog code. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2022 Cacodemon345 + */ #include "qt_harddiskdialog.hpp" #include "ui_qt_harddiskdialog.h" @@ -22,6 +40,7 @@ extern "C" { #include #include "qt_harddrive_common.hpp" +#include "qt_settings_bus_tracking.hpp" #include "qt_models_common.hpp" #include "qt_util.hpp" @@ -609,6 +628,7 @@ bool HarddiskDialog::checkAndAdjustCylinders() { void HarddiskDialog::on_comboBoxBus_currentIndexChanged(int index) { + int chanIdx = 0; if (index < 0) { return; } @@ -665,6 +685,27 @@ void HarddiskDialog::on_comboBoxBus_currentIndexChanged(int index) { ui->lineEditSectors->setValidator(new QIntValidator(1, max_sectors, this)); Harddrives::populateBusChannels(ui->comboBoxChannel->model(), ui->comboBoxBus->currentData().toInt()); + switch (ui->comboBoxBus->currentData().toInt()) + { + case HDD_BUS_MFM: + chanIdx = (Harddrives::busTrackClass->next_free_mfm_channel()); + break; + case HDD_BUS_XTA: + chanIdx = (Harddrives::busTrackClass->next_free_xta_channel()); + break; + case HDD_BUS_ESDI: + chanIdx = (Harddrives::busTrackClass->next_free_esdi_channel()); + break; + case HDD_BUS_ATAPI: + case HDD_BUS_IDE: + chanIdx = (Harddrives::busTrackClass->next_free_ide_channel()); + break; + case HDD_BUS_SCSI: + chanIdx = (Harddrives::busTrackClass->next_free_scsi_id()); + break; + } + + ui->comboBoxChannel->setCurrentIndex(chanIdx); } void HarddiskDialog::on_lineEditSize_textEdited(const QString &text) { diff --git a/src/qt/qt_harddrive_common.cpp b/src/qt/qt_harddrive_common.cpp index fbc60f627..fa08f7f2c 100644 --- a/src/qt/qt_harddrive_common.cpp +++ b/src/qt/qt_harddrive_common.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Common storage devices module. + * + * + * + * Authors: Joakim L. Gilje + * + * Copyright 2021 Joakim L. Gilje + */ #include "qt_harddrive_common.hpp" #include diff --git a/src/qt/qt_hardwarerenderer.cpp b/src/qt/qt_hardwarerenderer.cpp index ca0e60efb..b322cbaf2 100644 --- a/src/qt/qt_hardwarerenderer.cpp +++ b/src/qt/qt_hardwarerenderer.cpp @@ -1,3 +1,23 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Hardware renderer module. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * Teemu Korhonen + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2021-2022 Cacodemon345 + * Copyright 2021-2022 Teemu Korhonen + */ #include "qt_hardwarerenderer.hpp" #include #include @@ -199,4 +219,4 @@ std::vector> HardwareRenderer::getBuffer buffers.push_back(std::make_tuple(imagebufs[1].get(), &buf_usage[1])); return buffers; -} \ No newline at end of file +} diff --git a/src/qt/qt_joystickconfiguration.cpp b/src/qt/qt_joystickconfiguration.cpp index 83b2f50be..594a1ef17 100644 --- a/src/qt/qt_joystickconfiguration.cpp +++ b/src/qt/qt_joystickconfiguration.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Joystick configuration UI module. + * + * + * + * Authors: Joakim L. Gilje + * + * Copyright 2021 Joakim L. Gilje + */ #include "qt_joystickconfiguration.hpp" #include "ui_qt_joystickconfiguration.h" diff --git a/src/qt/qt_machinestatus.cpp b/src/qt/qt_machinestatus.cpp index b844ade83..47274994a 100644 --- a/src/qt/qt_machinestatus.cpp +++ b/src/qt/qt_machinestatus.cpp @@ -1,3 +1,21 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Joystick configuration UI module. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2021-2022 Cacodemon345 + */ #include "qt_machinestatus.hpp" extern "C" { diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index a6a999fa1..b95d1e9e9 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -1,3 +1,22 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Main entry point module + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * Teemu Korhonen + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2021-2022 Cacodemon345 + * Copyright 2021-2022 Teemu Korhonen + */ #include #include #include diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 881053cdc..9f7f845ea 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -1,3 +1,25 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Main window module. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * Teemu Korhonen + * dob205 + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2021-2022 Cacodemon345 + * Copyright 2021-2022 Teemu Korhonen + * Copyright 2022 dob205 + */ #include "qt_mainwindow.hpp" #include "ui_qt_mainwindow.h" @@ -88,7 +110,15 @@ MainWindow::MainWindow(QWidget *parent) : auto toolbar_label = new QLabel(); ui->toolBar->addWidget(toolbar_label); +#ifdef RELEASE_BUILD + this->setWindowIcon(QIcon(":/settings/win/icons/86Box-green.ico")); +#elif defined ALPHA_BUILD + this->setWindowIcon(QIcon(":/settings/win/icons/86Box-red.ico")) +#elif defined BETA_BUILD this->setWindowIcon(QIcon(":/settings/win/icons/86Box-yellow.ico")); +#else + this->setWindowIcon(QIcon(":/settings/win/icons/86Box-gray.ico")); +#endif this->setWindowFlag(Qt::MSWindowsFixedSizeDialogHint, vid_resize != 1); this->setWindowFlag(Qt::WindowMaximizeButtonHint, vid_resize == 1); @@ -347,7 +377,6 @@ MainWindow::MainWindow(QWidget *parent) : #ifdef MTR_ENABLED { - ui->menuTools->addSeparator(); ui->actionBegin_trace->setVisible(true); ui->actionEnd_trace->setVisible(true); ui->actionBegin_trace->setShortcut(QKeySequence(Qt::Key_Control + Qt::Key_T)); @@ -1407,7 +1436,15 @@ void MainWindow::on_actionAbout_86Box_triggered() { QDesktopServices::openUrl(QUrl("https://86box.net/")); }); +#ifdef RELEASE_BUILD + msgBox.setIconPixmap(QIcon(":/settings/win/icons/86Box-green.ico").pixmap(32, 32)); +#elif defined ALPHA_BUILD + msgBox.setIconPixmap(QIcon(":/settings/win/icons/86Box-red.ico").pixmap(32, 32)) +#elif defined BETA_BUILD msgBox.setIconPixmap(QIcon(":/settings/win/icons/86Box-yellow.ico").pixmap(32, 32)); +#else + msgBox.setIconPixmap(QIcon(":/settings/win/icons/86Box-gray.ico").pixmap(32, 32)); +#endif msgBox.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); msgBox.exec(); } diff --git a/src/qt/qt_mediamenu.cpp b/src/qt/qt_mediamenu.cpp index 2aabe04a8..8ffccffdd 100644 --- a/src/qt/qt_mediamenu.cpp +++ b/src/qt/qt_mediamenu.cpp @@ -1,3 +1,23 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Media menu UI module. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * Teemu Korhonen + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2021-2022 Cacodemon345 + * Copyright 2021-2022 Teemu Korhonen + */ #include "qt_mediamenu.hpp" #include "qt_machinestatus.hpp" diff --git a/src/qt/qt_models_common.cpp b/src/qt/qt_models_common.cpp index 892048605..eaa14bc0d 100644 --- a/src/qt/qt_models_common.cpp +++ b/src/qt/qt_models_common.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Common storage devices module. + * + * + * + * Authors: Joakim L. Gilje + * + * Copyright 2021 Joakim L. Gilje + */ #include "qt_models_common.hpp" #include diff --git a/src/qt/qt_newfloppydialog.cpp b/src/qt/qt_newfloppydialog.cpp index 9450dfe1c..1a9d1364a 100644 --- a/src/qt/qt_newfloppydialog.cpp +++ b/src/qt/qt_newfloppydialog.cpp @@ -1,3 +1,23 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Common storage devices module. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * Teemu Korhonen + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2022 Cacodemon345 + * Copyright 2022 Teemu Korhonen + */ #include "qt_newfloppydialog.hpp" #include "ui_qt_newfloppydialog.h" diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index b13e2a877..95ff15eba 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -1,3 +1,22 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Common platform functions. + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * Teemu Korhonen + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2021-2022 Cacodemon345 + * Copyright 2021-2022 Teemu Korhonen + */ #include #include diff --git a/src/qt/qt_progsettings.cpp b/src/qt/qt_progsettings.cpp index f7fbd2ea6..c51070132 100644 --- a/src/qt/qt_progsettings.cpp +++ b/src/qt/qt_progsettings.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Program settings UI module. + * + * + * + * Authors: Cacodemon345 + * + * Copyright 2021-2022 Cacodemon345 + */ #include #include "qt_progsettings.hpp" diff --git a/src/qt/qt_renderercommon.cpp b/src/qt/qt_renderercommon.cpp index 10cd72d8c..0974c1f78 100644 --- a/src/qt/qt_renderercommon.cpp +++ b/src/qt/qt_renderercommon.cpp @@ -1,3 +1,20 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Program settings UI module. + * + * + * + * Authors: Joakim L. Gilje + * + * Copyright 2021 Joakim L. Gilje + */ + #include "qt_renderercommon.hpp" #include "qt_mainwindow.hpp" diff --git a/src/qt/qt_rendererstack.cpp b/src/qt/qt_rendererstack.cpp index b07ed34f7..eff53d441 100644 --- a/src/qt/qt_rendererstack.cpp +++ b/src/qt/qt_rendererstack.cpp @@ -1,3 +1,23 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Program settings UI module. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * Teemu Korhonen + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2021-2021 Teemu Korhonen + * Copyright 2021-2022 Cacodemon345 + */ #include "qt_rendererstack.hpp" #include "ui_qt_rendererstack.h" diff --git a/src/qt/qt_settings.cpp b/src/qt/qt_settings.cpp index b7678bb8e..c8312013a 100644 --- a/src/qt/qt_settings.cpp +++ b/src/qt/qt_settings.cpp @@ -1,3 +1,21 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Program settings UI module. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2021-2022 Cacodemon345 + */ #include "qt_settings.hpp" #include "ui_qt_settings.h" diff --git a/src/qt/qt_settings_bus_tracking.cpp b/src/qt/qt_settings_bus_tracking.cpp index 3744c10c7..41c7990da 100644 --- a/src/qt/qt_settings_bus_tracking.cpp +++ b/src/qt/qt_settings_bus_tracking.cpp @@ -1,3 +1,21 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Program settings UI module. + * + * + * + * Authors: Miran Grca + * Cacodemon345 + * + * Copyright 2022 Miran Grca + * Copyright 2022 Cacodemon345 + */ #include #include #include diff --git a/src/qt/qt_settingsdisplay.cpp b/src/qt/qt_settingsdisplay.cpp index 4cd604305..b3a2cfd0d 100644 --- a/src/qt/qt_settingsdisplay.cpp +++ b/src/qt/qt_settingsdisplay.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Display settings UI module. + * + * + * + * Authors: Joakim L. Gilje + * + * Copyright 2021 Joakim L. Gilje + */ #include "qt_settingsdisplay.hpp" #include "ui_qt_settingsdisplay.h" diff --git a/src/qt/qt_settingsfloppycdrom.cpp b/src/qt/qt_settingsfloppycdrom.cpp index 0f4ede800..ba2c1d601 100644 --- a/src/qt/qt_settingsfloppycdrom.cpp +++ b/src/qt/qt_settingsfloppycdrom.cpp @@ -1,3 +1,21 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Floppy/CD-ROM devices configuration UI module. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * + * Copyright 2021-2022 Cacodemon345 + * Copyright 2021 Joakim L. Gilje + */ #include "qt_settingsfloppycdrom.hpp" #include "ui_qt_settingsfloppycdrom.h" @@ -173,8 +191,8 @@ void SettingsFloppyCDROM::onCDROMRowChanged(const QModelIndex ¤t) { if (! match.isEmpty()) { ui->comboBoxChannel->setCurrentIndex(match.first().row()); } - else ui->comboBoxChannel->setCurrentIndex(8); - ui->comboBoxSpeed->setCurrentIndex(speed - 1); + + ui->comboBoxSpeed->setCurrentIndex(speed == 0 ? 7 : speed - 1); } void SettingsFloppyCDROM::on_checkBoxTurboTimings_stateChanged(int arg1) { diff --git a/src/qt/qt_settingsharddisks.cpp b/src/qt/qt_settingsharddisks.cpp index ac3ec67ca..25fc06bfe 100644 --- a/src/qt/qt_settingsharddisks.cpp +++ b/src/qt/qt_settingsharddisks.cpp @@ -1,3 +1,21 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Hard disk configuration UI module. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * + * Copyright 2021-2022 Cacodemon345 + * Copyright 2021 Joakim L. Gilje + */ #include "qt_settingsharddisks.hpp" #include "ui_qt_settingsharddisks.h" diff --git a/src/qt/qt_settingsinput.cpp b/src/qt/qt_settingsinput.cpp index f9b99dd7a..120065a88 100644 --- a/src/qt/qt_settingsinput.cpp +++ b/src/qt/qt_settingsinput.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Mouse/Joystick configuration UI module. + * + * + * + * Authors: Joakim L. Gilje + * + * Copyright 2021 Joakim L. Gilje + */ #include "qt_settingsinput.hpp" #include "ui_qt_settingsinput.h" diff --git a/src/qt/qt_settingsmachine.cpp b/src/qt/qt_settingsmachine.cpp index 8a1f12be2..37d66e9c0 100644 --- a/src/qt/qt_settingsmachine.cpp +++ b/src/qt/qt_settingsmachine.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Machine selection and configuration UI module. + * + * + * + * Authors: Joakim L. Gilje + * + * Copyright 2021 Joakim L. Gilje + */ #include "qt_settingsmachine.hpp" #include "ui_qt_settingsmachine.h" diff --git a/src/qt/qt_settingsnetwork.cpp b/src/qt/qt_settingsnetwork.cpp index a8a6dd2fc..836e3f83d 100644 --- a/src/qt/qt_settingsnetwork.cpp +++ b/src/qt/qt_settingsnetwork.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Network devices configuration UI module. + * + * + * + * Authors: Joakim L. Gilje + * + * Copyright 2021 Joakim L. Gilje + */ #include "qt_settingsnetwork.hpp" #include "ui_qt_settingsnetwork.h" diff --git a/src/qt/qt_settingsotherperipherals.cpp b/src/qt/qt_settingsotherperipherals.cpp index 7fa28f812..ffa7391a8 100644 --- a/src/qt/qt_settingsotherperipherals.cpp +++ b/src/qt/qt_settingsotherperipherals.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Other peripherals configuration UI module. + * + * + * + * Authors: Joakim L. Gilje + * + * Copyright 2021 Joakim L. Gilje + */ #include "qt_settingsotherperipherals.hpp" #include "ui_qt_settingsotherperipherals.h" diff --git a/src/qt/qt_settingsotherremovable.cpp b/src/qt/qt_settingsotherremovable.cpp index c6f089f80..574fdccb5 100644 --- a/src/qt/qt_settingsotherremovable.cpp +++ b/src/qt/qt_settingsotherremovable.cpp @@ -1,3 +1,21 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Other removable devices configuration UI module. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * + * Copyright 2021-2022 Cacodemon345 + * Copyright 2021 Joakim L. Gilje + */ #include "qt_settingsotherremovable.hpp" #include "ui_qt_settingsotherremovable.h" diff --git a/src/qt/qt_settingsports.cpp b/src/qt/qt_settingsports.cpp index e2a0a4fdc..dbabae73c 100644 --- a/src/qt/qt_settingsports.cpp +++ b/src/qt/qt_settingsports.cpp @@ -1,3 +1,21 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Serial/Parallel ports configuration UI module. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * + * Copyright 2022 Cacodemon345 + * Copyright 2021 Joakim L. Gilje + */ #include "qt_settingsports.hpp" #include "ui_qt_settingsports.h" @@ -18,7 +36,7 @@ SettingsPorts::SettingsPorts(QWidget *parent) : { ui->setupUi(this); - for (int i = 0; i < 3; i++) { + for (int i = 0; i < 4; i++) { auto* cbox = findChild(QString("comboBoxLpt%1").arg(i+1)); auto* model = cbox->model(); int c = 0; @@ -79,3 +97,8 @@ void SettingsPorts::on_checkBoxParallel3_stateChanged(int state) { ui->comboBoxLpt3->setEnabled(state == Qt::Checked); } + +void SettingsPorts::on_checkBoxParallel4_stateChanged(int state) { + ui->comboBoxLpt4->setEnabled(state == Qt::Checked); +} + diff --git a/src/qt/qt_settingsports.hpp b/src/qt/qt_settingsports.hpp index e4a8a050a..c5deef80a 100644 --- a/src/qt/qt_settingsports.hpp +++ b/src/qt/qt_settingsports.hpp @@ -21,6 +21,8 @@ private slots: void on_checkBoxParallel2_stateChanged(int arg1); void on_checkBoxParallel1_stateChanged(int arg1); + void on_checkBoxParallel4_stateChanged(int arg1); + private: Ui::SettingsPorts *ui; }; diff --git a/src/qt/qt_settingsports.ui b/src/qt/qt_settingsports.ui index 0e52b4f3f..a1fbb47e7 100644 --- a/src/qt/qt_settingsports.ui +++ b/src/qt/qt_settingsports.ui @@ -58,6 +58,16 @@ + + + + LPT4 Device: + + + + + + @@ -111,6 +121,13 @@ + + + + Parallel port 4 + + + diff --git a/src/qt/qt_settingssound.cpp b/src/qt/qt_settingssound.cpp index fa8188567..7277f4007 100644 --- a/src/qt/qt_settingssound.cpp +++ b/src/qt/qt_settingssound.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Sound/MIDI devices configuration UI module. + * + * + * + * Authors: Joakim L. Gilje + * + * Copyright 2021 Joakim L. Gilje + */ #include "qt_settingssound.hpp" #include "ui_qt_settingssound.h" diff --git a/src/qt/qt_settingsstoragecontrollers.cpp b/src/qt/qt_settingsstoragecontrollers.cpp index 8432a300a..0b66cec0a 100644 --- a/src/qt/qt_settingsstoragecontrollers.cpp +++ b/src/qt/qt_settingsstoragecontrollers.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Storage devices configuration UI module. + * + * + * + * Authors: Joakim L. Gilje + * + * Copyright 2021 Joakim L. Gilje + */ #include "qt_settingsstoragecontrollers.hpp" #include "ui_qt_settingsstoragecontrollers.h" diff --git a/src/qt/qt_softwarerenderer.cpp b/src/qt/qt_softwarerenderer.cpp index 6a935a7a5..1245fd70a 100644 --- a/src/qt/qt_softwarerenderer.cpp +++ b/src/qt/qt_softwarerenderer.cpp @@ -1,3 +1,23 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Software renderer module. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * Teemu Korhonen + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2021-2022 Cacodemon345 + * Copyright 2021-2022 Teemu Korhonen + */ #include "qt_softwarerenderer.hpp" #include #include diff --git a/src/qt/qt_soundgain.cpp b/src/qt/qt_soundgain.cpp index 9f02608e7..7b3f7cc04 100644 --- a/src/qt/qt_soundgain.cpp +++ b/src/qt/qt_soundgain.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Sound gain dialog UI module. + * + * + * + * Authors: Cacodemon345 + * + * Copyright 2021-2022 Cacodemon345 + */ #include "qt_soundgain.hpp" #include "ui_qt_soundgain.h" diff --git a/src/qt/qt_specifydimensions.cpp b/src/qt/qt_specifydimensions.cpp index 4a5b0ea0f..caf831466 100644 --- a/src/qt/qt_specifydimensions.cpp +++ b/src/qt/qt_specifydimensions.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Specify dimensions UI module. + * + * + * + * Authors: Cacodemon345 + * + * Copyright 2021-2022 Cacodemon345 + */ #include "qt_specifydimensions.h" #include "ui_qt_specifydimensions.h" diff --git a/src/qt/qt_styleoverride.cpp b/src/qt/qt_styleoverride.cpp index 449b167aa..3beb4c2db 100644 --- a/src/qt/qt_styleoverride.cpp +++ b/src/qt/qt_styleoverride.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Style override class. + * + * + * + * Authors: Teemu Korhonen + * + * Copyright 2022 Teemu Korhonen + */ #include "qt_styleoverride.hpp" int StyleOverride::styleHint( @@ -18,4 +34,4 @@ void StyleOverride::polish(QWidget* widget) /* Disable title bar context help buttons globally as they are unused. */ if (widget->isWindow()) widget->setWindowFlag(Qt::WindowContextHelpButtonHint, false); -} \ No newline at end of file +} diff --git a/src/qt/qt_ui.cpp b/src/qt/qt_ui.cpp index d45fb889b..c2ea294c8 100644 --- a/src/qt/qt_ui.cpp +++ b/src/qt/qt_ui.cpp @@ -1,3 +1,21 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Common UI functions. + * + * + * + * Authors: Joakim L. Gilje + * Cacodemon345 + * + * Copyright 2021 Joakim L. Gilje + * Copyright 2021-2022 Cacodemon345 + */ #include #include @@ -82,6 +100,10 @@ void ui_sb_set_text_w(wchar_t *wstr) { main_window->statusBar()->showMessage(QString::fromWCharArray(wstr)); } +void ui_sb_set_text(char *str) { + main_window->statusBar()->showMessage(QString(str)); +} + void ui_sb_update_tip(int arg) { main_window->updateStatusBarTip(arg); @@ -97,7 +119,10 @@ void ui_sb_bugui(char *str) { } void ui_sb_set_ready(int ready) { - qDebug() << Q_FUNC_INFO << ready; + if (ready == 0) { + ui_sb_bugui(nullptr); + ui_sb_set_text(nullptr); + } } void diff --git a/src/qt/qt_util.cpp b/src/qt/qt_util.cpp index 3c41d6745..96a60004b 100644 --- a/src/qt/qt_util.cpp +++ b/src/qt/qt_util.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Utility functions. + * + * + * + * Authors: Teemu Korhonen + * + * Copyright 2022 Teemu Korhonen + */ #include #include #include "qt_util.hpp" @@ -28,4 +44,4 @@ namespace util return " (" % temp.join(' ') % ")" % (!last ? ";;" : ""); } -} \ No newline at end of file +} diff --git a/src/qt/wl_mouse.cpp b/src/qt/wl_mouse.cpp index b399dafd7..36a91b68e 100644 --- a/src/qt/wl_mouse.cpp +++ b/src/qt/wl_mouse.cpp @@ -1,3 +1,19 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Wayland mouse input module. + * + * + * + * Authors: Cacodemon345 + * + * Copyright 2021-2022 Cacodemon345 + */ #include "wl_mouse.hpp" #include #include @@ -86,4 +102,4 @@ void wl_mouse_uncapture() zwp_relative_pointer_v1_destroy(rel_pointer); rel_pointer = nullptr; conf_pointer = nullptr; -} \ No newline at end of file +}