5 Commits

Author SHA1 Message Date
5afd22a7bf Update copyright year in About 2025-03-29 14:50:54 -05:00
af07f8853a Fix SettingsDialog to do validity check when OK is pressed 2025-03-29 14:45:32 -05:00
2e9b37f3b4 Fix default Show button 2025-03-27 20:32:53 -05:00
c4e792c9a7 Bump version to 1.0-beta6 2025-03-27 20:29:46 -05:00
01cd6b7ba8 Add icon 2025-03-27 20:26:25 -05:00
7 changed files with 14 additions and 9 deletions

View File

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

View File

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

View File

@ -144,7 +144,7 @@ void MainWindow::setupMenu() {
R"(Slide Controller 9000 - %1 R"(Slide Controller 9000 - %1
Build date: %2 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 Slide Controller 9000 is released under the MPL 2.0
Built on Qt library under LGPL 2.0)").arg(Version, __DATE__)); Built on Qt library under LGPL 2.0)").arg(Version, __DATE__));
about.exec(); about.exec();
@ -201,8 +201,8 @@ void MainWindow::setupViewControls(QVBoxLayout *rootLyt) {
}); });
views.emplace_back(View{ views.emplace_back(View{
.name = tr("Show"), .name = tr("Show"),
.slides = false, .slides = true,
.obsSlides = false, .obsSlides = true,
}); });
} }
setupViewControlButtons(views, viewCtlLyt); 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; return root;
} }
void SettingsDialog::handleApply() { int SettingsDialog::handleApply() {
QSettings settings; QSettings settings;
QVector<View> views; QVector<View> views;
auto const viewsErr = collectViews(views); auto const viewsErr = collectViews(views);
if (viewsErr) { if (viewsErr) {
return; return -1;
} }
setViews(settings, views); setViews(settings, views);
setCameraConnectionData(settings, { setCameraConnectionData(settings, {
@ -227,12 +227,14 @@ void SettingsDialog::handleApply() {
}); });
collectVideoConfig(); collectVideoConfig();
setVideoConfig(settings, m_videoConfig); setVideoConfig(settings, m_videoConfig);
return 0;
} }
void SettingsDialog::handleOK() { void SettingsDialog::handleOK() {
handleApply(); if (handleApply() == 0) {
accept(); accept();
} }
}
void SettingsDialog::setupViewRow(int row, View const&view) { void SettingsDialog::setupViewRow(int row, View const&view) {
// name // name

View File

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