Compare commits

...

6 Commits

7 changed files with 14 additions and 21 deletions

View File

@ -16,6 +16,7 @@ add_executable(
settingsdata.cpp
settingsdialog.cpp
slideview.cpp
sc9k.rc
)
target_link_libraries(

View File

@ -10,5 +10,5 @@
constexpr auto MaxCameraPresets = 9;
constexpr auto MaxViews = 9;
constexpr auto Version = "1.0-beta5";
constexpr auto Version = "1.0.0";

View File

@ -121,18 +121,6 @@ void MainWindow::setupMenu() {
});
menu->addAction(cameraPresetAct);
}
menu->addSeparator();
auto const rebootAct = new QAction(tr("&Reboot"), this);
connect(rebootAct, &QAction::triggered, &m_cameraClient, [this] {
QMessageBox confirm(this);
confirm.setText(tr("Are you sure you want to reboot the camera? This will take about 20 seconds."));
confirm.addButton(tr("&No"), QMessageBox::ButtonRole::NoRole);
confirm.addButton(tr("&Yes"), QMessageBox::ButtonRole::YesRole);
if (confirm.exec()) {
m_cameraClient.reboot();
}
});
menu->addAction(rebootAct);
}
// help menu
{
@ -144,7 +132,7 @@ void MainWindow::setupMenu() {
R"(Slide Controller 9000 - %1
Build date: %2
Copyright 2021 - 2024 Gary Talent (gary@drinkingtea.net)
Copyright 2021 - 2025 Gary Talent (gary@drinkingtea.net)
Slide Controller 9000 is released under the MPL 2.0
Built on Qt library under LGPL 2.0)").arg(Version, __DATE__));
about.exec();
@ -201,8 +189,8 @@ void MainWindow::setupViewControls(QVBoxLayout *rootLyt) {
});
views.emplace_back(View{
.name = tr("Show"),
.slides = false,
.obsSlides = false,
.slides = true,
.obsSlides = true,
});
}
setupViewControlButtons(views, viewCtlLyt);

BIN
src/sc9k.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

1
src/sc9k.rc Normal file
View File

@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "sc9k.ico"

View File

@ -205,12 +205,12 @@ QWidget *SettingsDialog::setupButtons(QWidget *parent) {
return root;
}
void SettingsDialog::handleApply() {
int SettingsDialog::handleApply() {
QSettings settings;
QVector<View> views;
auto const viewsErr = collectViews(views);
if (viewsErr) {
return;
return -1;
}
setViews(settings, views);
setCameraConnectionData(settings, {
@ -227,11 +227,13 @@ void SettingsDialog::handleApply() {
});
collectVideoConfig();
setVideoConfig(settings, m_videoConfig);
return 0;
}
void SettingsDialog::handleOK() {
handleApply();
accept();
if (handleApply() == 0) {
accept();
}
}
void SettingsDialog::setupViewRow(int row, View const&view) {

View File

@ -38,7 +38,8 @@ class SettingsDialog: public QDialog {
QWidget *setupViewConfig(QWidget *parent);
QWidget *setupImageConfig(QWidget *parent);
QWidget *setupButtons(QWidget *parent);
void handleApply();
[[nodiscard]]
int handleApply();
void handleOK();
void setupViewRow(int row, View const&view = {});
/**