Merge branch 'master' of ssh://github.com/86Box/86Box
This commit is contained in:
@@ -257,6 +257,7 @@ add_library(ui STATIC
|
||||
|
||||
qt_iconindicators.hpp
|
||||
qt_iconindicators.cpp
|
||||
qt_cgasettingsdialog.hpp qt_cgasettingsdialog.cpp qt_cgasettingsdialog.ui
|
||||
)
|
||||
|
||||
if(EMU_BUILD_NUM)
|
||||
|
||||
@@ -2936,3 +2936,21 @@ msgstr ""
|
||||
|
||||
msgid "&Update mouse every CPU frame"
|
||||
msgstr ""
|
||||
|
||||
msgid "Hue"
|
||||
msgstr ""
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr ""
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr ""
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr ""
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr ""
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr ""
|
||||
|
||||
@@ -2936,3 +2936,21 @@ msgstr "%1 Hz"
|
||||
|
||||
msgid "&Update mouse every CPU frame"
|
||||
msgstr "&Aktualizovat myš při každém rámce CPU"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Saturace"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Jas"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Ostrý"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Kompozitní nastavení CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Maus bei jedem CPU-Frame aktualisieren"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP-Abbilder"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Sättigung"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Helligkeit"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Schärfe"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA-Kompositeinstellungen..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Actualiza el estado del ratón en cada bloco de CPU"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Imagenes ZIP"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Tono"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Saturación"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Contraste"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Brillo"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Nitidez"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Configuración compuesta CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Mettre à jour le statut du souris en qualquier bloc de processeur"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Images ZIP"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Teinte"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Saturation"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Contraste"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Luminosité"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Netteté"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Paramètres composites CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Ažuriraj status miša kod skavog bloka procesora"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP slike"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Telítettség"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontraszt"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Fényerő"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Élesség"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA összetett beállítások..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Aggiorano stato mouse ad ogni blocco CPU"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Immagini ZIP"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Saturazione"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Contrasto"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Luminosità"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Nitidezza"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Impostazioni composite CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "マウスをCPUフレームごとに更新(&U)"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIPイメージ"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "色相"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "飽和"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "対比"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "明るさ"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "シャープネス"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA コンポジット設定..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr ""
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP 이미지"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "색조"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "포화도"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "대조"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "밝기"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "선명도"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA 복합 설정..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Muis bijwerken bij elk CPU-frame"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP-images"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Verzadiging"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Contrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Helderheid"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Scherpte"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA-composietinstellingen..."
|
||||
|
||||
@@ -2936,3 +2936,21 @@ msgstr "System nie będzie dodany."
|
||||
|
||||
msgid "&Update mouse every CPU frame"
|
||||
msgstr "Aktualizuj &mysz z każdą ramką CPU"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Barwa"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Nasycenie"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Jasność"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Ostrość"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Ustawienia kompozytowe CGA..."
|
||||
|
||||
@@ -2936,3 +2936,21 @@ msgstr "O sistema não será adicionado."
|
||||
|
||||
msgid "&Update mouse every CPU frame"
|
||||
msgstr "At&ualiza o estado do mouse em cada quadro do CPU"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Matiz"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Saturação"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Contraste"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Brilho"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Nitidez"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Configurações compostas CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Atualiza o estado do rato em cada bloco do CPU"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Imagens ZIP"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Matiz"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Saturação"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Contraste"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Brilho"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Nitidez"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Configurações compostas CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Обновлять мышь при каждом кадре ЦП"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Образы ZIP"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Тон"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Насыщенность"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Контраст"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Яркость"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Резкость"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Настройки композитного видео CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Aktualizovať myš pri každom rámci CPU"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Obrazy ZIP diskov"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Odtieň"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Sýtosť"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Jas"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Ostrý"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Kompozitné nastavenia CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Posodibi stanje miške ob vsakem bloku procesorja"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP slike"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Nasičenost"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Svetlost"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Ostrina"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA sestavljene nastavitve..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr ""
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Zip-avbildningar"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Mättnad"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Ljusstyrka"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Skärpa"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA-kompositinställningar..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr ""
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP imajları"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Hue"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Doygunluk"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Kontrast"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Parlaklık"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Keskinlik"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA bileşik ayarları..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Оновлювати мишу при кожному кадрі ЦП"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Образи ZIP"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Відтінок"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Насичення"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Контраст"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Яскравість"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Гострота"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Комбіновані налаштування CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr "&Cập nhật chuột mỗi cỡ khung CPU"
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "Ảnh đĩa ZIP"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "Huế"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "Độ bão hòa"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "Sự tương phản"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "Độ sáng"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "Độ sắc nét"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "Cài đặt composite CGA..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr ""
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP 映像"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "色调"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "饱和度"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "对比"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "亮度"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "锐度"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA 复合设置..."
|
||||
|
||||
@@ -2948,3 +2948,21 @@ msgstr ""
|
||||
|
||||
#~ msgid "ZIP images"
|
||||
#~ msgstr "ZIP 映像"
|
||||
|
||||
msgid "Hue"
|
||||
msgstr "色調"
|
||||
|
||||
msgid "Saturation"
|
||||
msgstr "飽和度"
|
||||
|
||||
msgid "Contrast"
|
||||
msgstr "對比"
|
||||
|
||||
msgid "Brightness"
|
||||
msgstr "亮度"
|
||||
|
||||
msgid "Sharpness"
|
||||
msgstr "銳利度"
|
||||
|
||||
msgid "CGA composite settings..."
|
||||
msgstr "CGA 複合設定..."
|
||||
|
||||
94
src/qt/qt_cgasettingsdialog.cpp
Normal file
94
src/qt/qt_cgasettingsdialog.cpp
Normal file
@@ -0,0 +1,94 @@
|
||||
#include "qt_cgasettingsdialog.hpp"
|
||||
#include "ui_qt_cgasettingsdialog.h"
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include <86box/86box.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/vid_cga_comp.h>
|
||||
}
|
||||
|
||||
CGASettingsDialog::CGASettingsDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::CGASettingsDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
cga_hue = vid_cga_comp_hue;
|
||||
cga_saturation = vid_cga_comp_saturation;
|
||||
cga_brightness = vid_cga_comp_brightness;
|
||||
cga_contrast = vid_cga_comp_contrast;
|
||||
cga_sharpness = vid_cga_comp_sharpness;
|
||||
|
||||
ui->horizontalSliderHue->setValue(vid_cga_comp_hue);
|
||||
ui->horizontalSliderSaturation->setValue(vid_cga_comp_saturation);
|
||||
ui->horizontalSliderBrightness->setValue(vid_cga_comp_brightness);
|
||||
ui->horizontalSliderContrast->setValue(vid_cga_comp_contrast);
|
||||
ui->horizontalSliderSharpness->setValue(vid_cga_comp_sharpness);
|
||||
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::Apply), &QPushButton::clicked, this, &CGASettingsDialog::applySettings);
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::Reset), &QPushButton::clicked, this, [this]
|
||||
{
|
||||
ui->horizontalSliderHue->setValue(0);
|
||||
ui->horizontalSliderSaturation->setValue(100);
|
||||
ui->horizontalSliderBrightness->setValue(0);
|
||||
ui->horizontalSliderContrast->setValue(100);
|
||||
ui->horizontalSliderSharpness->setValue(0);
|
||||
});
|
||||
|
||||
connect(ui->horizontalSliderHue, &QSlider::valueChanged, this, [this] { updateDisplay(); } );
|
||||
connect(ui->horizontalSliderSaturation, &QSlider::valueChanged, this, [this] { updateDisplay(); } );
|
||||
connect(ui->horizontalSliderBrightness, &QSlider::valueChanged, this, [this] { updateDisplay(); } );
|
||||
connect(ui->horizontalSliderContrast, &QSlider::valueChanged, this, [this] { updateDisplay(); } );
|
||||
connect(ui->horizontalSliderSharpness, &QSlider::valueChanged, this, [this] { updateDisplay(); } );
|
||||
}
|
||||
|
||||
CGASettingsDialog::~CGASettingsDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void CGASettingsDialog::updateDisplay()
|
||||
{
|
||||
auto temp_cga_comp_hue = ui->horizontalSliderHue->value();
|
||||
auto temp_cga_comp_saturation = ui->horizontalSliderSaturation->value();
|
||||
auto temp_cga_comp_brightness = ui->horizontalSliderBrightness->value();
|
||||
auto temp_cga_comp_contrast = ui->horizontalSliderContrast->value();
|
||||
auto temp_cga_comp_sharpness = ui->horizontalSliderSharpness->value();
|
||||
cga_comp_reload(temp_cga_comp_brightness, temp_cga_comp_saturation, temp_cga_comp_sharpness, temp_cga_comp_hue, temp_cga_comp_contrast);
|
||||
}
|
||||
|
||||
void CGASettingsDialog::applySettings()
|
||||
{
|
||||
vid_cga_comp_hue = ui->horizontalSliderHue->value();
|
||||
vid_cga_comp_saturation = ui->horizontalSliderSaturation->value();
|
||||
vid_cga_comp_brightness = ui->horizontalSliderBrightness->value();
|
||||
vid_cga_comp_contrast = ui->horizontalSliderContrast->value();
|
||||
vid_cga_comp_sharpness = ui->horizontalSliderSharpness->value();
|
||||
cga_comp_reload(vid_cga_comp_brightness, vid_cga_comp_saturation, vid_cga_comp_sharpness, vid_cga_comp_hue, vid_cga_comp_contrast);
|
||||
|
||||
cga_hue = vid_cga_comp_hue;
|
||||
cga_saturation = vid_cga_comp_saturation;
|
||||
cga_brightness = vid_cga_comp_brightness;
|
||||
cga_contrast = vid_cga_comp_contrast;
|
||||
cga_sharpness = vid_cga_comp_sharpness;
|
||||
}
|
||||
|
||||
void CGASettingsDialog::on_buttonBox_accepted()
|
||||
{
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void CGASettingsDialog::on_buttonBox_rejected()
|
||||
{
|
||||
vid_cga_comp_hue = cga_hue;
|
||||
vid_cga_comp_saturation = cga_saturation;
|
||||
vid_cga_comp_brightness = cga_brightness;
|
||||
vid_cga_comp_contrast = cga_contrast;
|
||||
vid_cga_comp_sharpness = cga_sharpness;
|
||||
|
||||
cga_comp_reload(vid_cga_comp_brightness, vid_cga_comp_saturation, vid_cga_comp_sharpness, vid_cga_comp_hue, vid_cga_comp_contrast);
|
||||
}
|
||||
|
||||
31
src/qt/qt_cgasettingsdialog.hpp
Normal file
31
src/qt/qt_cgasettingsdialog.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef QT_CGASETTINGSDIALOG_HPP
|
||||
#define QT_CGASETTINGSDIALOG_HPP
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class CGASettingsDialog;
|
||||
}
|
||||
|
||||
class CGASettingsDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CGASettingsDialog(QWidget *parent = nullptr);
|
||||
~CGASettingsDialog();
|
||||
|
||||
private slots:
|
||||
void on_buttonBox_accepted();
|
||||
|
||||
void on_buttonBox_rejected();
|
||||
|
||||
private:
|
||||
Ui::CGASettingsDialog *ui;
|
||||
|
||||
void applySettings();
|
||||
void updateDisplay();
|
||||
|
||||
int cga_hue, cga_saturation, cga_sharpness, cga_brightness, cga_contrast;
|
||||
};
|
||||
|
||||
#endif // QT_CGASETTINGSDIALOG_HPP
|
||||
167
src/qt/qt_cgasettingsdialog.ui
Normal file
167
src/qt/qt_cgasettingsdialog.ui
Normal file
@@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CGASettingsDialog</class>
|
||||
<widget class="QDialog" name="CGASettingsDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>CGA composite settings...</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SizeConstraint::SetFixedSize</enum>
|
||||
</property>
|
||||
<item row="2" column="2">
|
||||
<widget class="QSlider" name="horizontalSliderBrightness">
|
||||
<property name="minimum">
|
||||
<number>-100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QSlider" name="horizontalSliderSaturation">
|
||||
<property name="maximum">
|
||||
<number>360</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Hue</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QSlider" name="horizontalSliderSharpness">
|
||||
<property name="minimum">
|
||||
<number>-50</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::StandardButton::Apply|QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok|QDialogButtonBox::StandardButton::Reset</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QSlider" name="horizontalSliderContrast">
|
||||
<property name="maximum">
|
||||
<number>360</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Contrast</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QSlider" name="horizontalSliderHue">
|
||||
<property name="minimum">
|
||||
<number>-360</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>360</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Sharpness</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Saturation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Brightness</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>CGASettingsDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>CGASettingsDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -33,6 +33,8 @@
|
||||
#include "qt_rendererstack.hpp"
|
||||
#include "qt_renderercommon.hpp"
|
||||
|
||||
#include "qt_cgasettingsdialog.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include <86box/86box.h>
|
||||
#include <86box/config.h>
|
||||
@@ -293,6 +295,13 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
#else
|
||||
ui->menuTablet_tool->menuAction()->setVisible(false);
|
||||
#endif
|
||||
|
||||
bool enable_comp_option = false;
|
||||
for (int i = 0; i < MONITORS_NUM; i++) {
|
||||
if (monitors[i].mon_composite) { enable_comp_option = true; break; }
|
||||
}
|
||||
|
||||
ui->actionCGA_composite_settings->setEnabled(enable_comp_option);
|
||||
});
|
||||
|
||||
connect(this, &MainWindow::showMessageForNonQtThread, this, &MainWindow::showMessage_, Qt::QueuedConnection);
|
||||
@@ -1497,7 +1506,7 @@ MainWindow::eventFilter(QObject *receiver, QEvent *event)
|
||||
if (event->type() == QEvent::WindowBlocked) {
|
||||
window_blocked = true;
|
||||
curdopause = dopause;
|
||||
plat_pause(isShowMessage ? 2 : 1);
|
||||
plat_pause(isNonPause ? dopause : (isShowMessage ? 2 : 1));
|
||||
emit setMouseCapture(false);
|
||||
releaseKeyboard();
|
||||
} else if (event->type() == QEvent::WindowUnblocked) {
|
||||
@@ -1530,6 +1539,13 @@ MainWindow::refreshMediaMenu()
|
||||
int int_ax_kbd = machine_has_flags(machine, MACHINE_KEYBOARD_JIS) &&
|
||||
!machine_has_bus(machine, MACHINE_BUS_PS2_PORTS);
|
||||
kana_label->setVisible(ext_ax_kbd || int_ax_kbd);
|
||||
|
||||
bool enable_comp_option = false;
|
||||
for (int i = 0; i < MONITORS_NUM; i++) {
|
||||
if (monitors[i].mon_composite) { enable_comp_option = true; break; }
|
||||
}
|
||||
|
||||
ui->actionCGA_composite_settings->setEnabled(enable_comp_option);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2329,3 +2345,14 @@ void MainWindow::on_actionACPI_Shutdown_triggered()
|
||||
{
|
||||
acpi_pwrbut_pressed = 1;
|
||||
}
|
||||
|
||||
void MainWindow::on_actionCGA_composite_settings_triggered()
|
||||
{
|
||||
isNonPause = true;
|
||||
CGASettingsDialog dialog;
|
||||
dialog.setModal(true);
|
||||
dialog.exec();
|
||||
isNonPause = false;
|
||||
config_save();
|
||||
}
|
||||
|
||||
|
||||
@@ -168,6 +168,8 @@ private slots:
|
||||
|
||||
void on_actionApply_fullscreen_stretch_mode_when_maximized_triggered(bool checked);
|
||||
|
||||
void on_actionCGA_composite_settings_triggered();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
std::unique_ptr<MachineStatus> status;
|
||||
@@ -204,6 +206,7 @@ private:
|
||||
QIcon caps_icon_off, scroll_icon_off, num_icon_off, kana_icon_off;
|
||||
|
||||
bool isShowMessage = false;
|
||||
bool isNonPause = false;
|
||||
bool window_blocked = false;
|
||||
};
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>724</width>
|
||||
<height>23</height>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuAction">
|
||||
@@ -205,6 +205,7 @@
|
||||
<addaction name="actionFullscreen"/>
|
||||
<addaction name="menuFullscreen_stretch_mode"/>
|
||||
<addaction name="actionApply_fullscreen_stretch_mode_when_maximized"/>
|
||||
<addaction name="actionCGA_composite_settings"/>
|
||||
<addaction name="menuEGA_S_VGA_settings"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionCGA_PCjr_Tandy_EGA_S_VGA_overscan"/>
|
||||
@@ -232,7 +233,7 @@
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<widget class="QToolBar" name="toolBar">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::PreventContextMenu</enum>
|
||||
<enum>Qt::ContextMenuPolicy::PreventContextMenu</enum>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">toolBar</string>
|
||||
@@ -244,7 +245,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="allowedAreas">
|
||||
<set>Qt::TopToolBarArea</set>
|
||||
<set>Qt::ToolBarArea::TopToolBarArea</set>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
@@ -253,7 +254,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolButtonStyle">
|
||||
<enum>Qt::ToolButtonIconOnly</enum>
|
||||
<enum>Qt::ToolButtonStyle::ToolButtonIconOnly</enum>
|
||||
</property>
|
||||
<property name="floatable">
|
||||
<bool>false</bool>
|
||||
@@ -368,7 +369,7 @@
|
||||
<string>E&xit</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::QuitRole</enum>
|
||||
<enum>QAction::MenuRole::QuitRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSettings">
|
||||
@@ -380,7 +381,7 @@
|
||||
<string>&Settings...</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::NoRole</enum>
|
||||
<enum>QAction::MenuRole::NoRole</enum>
|
||||
</property>
|
||||
<property name="iconVisibleInMenu">
|
||||
<bool>false</bool>
|
||||
@@ -682,7 +683,7 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::AboutQtRole</enum>
|
||||
<enum>QAction::MenuRole::AboutQtRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAbout_86Box">
|
||||
@@ -690,7 +691,7 @@
|
||||
<string>&About 86Box...</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::AboutRole</enum>
|
||||
<enum>QAction::MenuRole::AboutRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDocumentation">
|
||||
@@ -743,7 +744,7 @@
|
||||
<string>&Preferences...</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::PreferencesRole</enum>
|
||||
<enum>QAction::MenuRole::PreferencesRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEnable_Discord_integration">
|
||||
@@ -816,7 +817,7 @@
|
||||
<string>Renderer &options...</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::NoRole</enum>
|
||||
<enum>QAction::MenuRole::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionVulkan">
|
||||
@@ -888,6 +889,11 @@
|
||||
<string>&Pen</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCGA_composite_settings">
|
||||
<property name="text">
|
||||
<string>CGA composite settings...</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
||||
@@ -439,6 +439,8 @@ plat_pause(int p)
|
||||
}
|
||||
|
||||
if ((!!p) == dopause) {
|
||||
QTimer::singleShot(0, main_window, &MainWindow::updateUiPauseState);
|
||||
|
||||
#ifdef Q_OS_WINDOWS
|
||||
if (source_hwnd)
|
||||
PostMessage((HWND) (uintptr_t) source_hwnd, WM_SENDSTATUS, (WPARAM) !!p, (LPARAM) (HWND) main_window->winId());
|
||||
|
||||
Reference in New Issue
Block a user