From c736b37ce7d6b510ff7bda2c365195fc139bc609 Mon Sep 17 00:00:00 2001 From: ItsSK Date: Tue, 28 Dec 2021 20:42:34 -0800 Subject: [PATCH 1/3] Modified Project: > Added 2 additional screen displays > Ability to add rectangle behind text with color (green screen) > Dark Theme via INI file and windows registry --- announcementsettingwidget.cpp | 201 ++- announcementsettingwidget.hpp | 18 +- announcementsettingwidget.ui | 1111 +++++++++++- biblesettingwidget.cpp | 773 ++++++++- biblesettingwidget.hpp | 50 +- biblesettingwidget.ui | 2754 +++++++++++++++++++++++++++++- generalsettingwidget.cpp | 140 +- generalsettingwidget.hpp | 5 + generalsettingwidget.ui | 142 +- imagegenerator.cpp | 38 +- imagegenerator.hpp | 3 +- main.cpp | 95 +- managedatadialog.cpp | 31 +- passivesettingwidget.cpp | 85 +- passivesettingwidget.hpp | 12 +- passivesettingwidget.ui | 540 +++++- settings.cpp | 98 +- settings.hpp | 27 +- settingsdialog.cpp | 53 +- settingsdialog.hpp | 12 +- softprojector.cpp | 275 ++- softprojector.hpp | 10 +- softprojector.ui | 2 +- songsettingwidget.cpp | 588 ++++++- songsettingwidget.hpp | 38 +- songsettingwidget.ui | 2964 ++++++++++++++++++++++++++++++++- songwidget.ui | 2 +- theme.cpp | 90 +- theme.hpp | 8 + 29 files changed, 9866 insertions(+), 299 deletions(-) diff --git a/announcementsettingwidget.cpp b/announcementsettingwidget.cpp index 17edbdb..7e8b9bf 100644 --- a/announcementsettingwidget.cpp +++ b/announcementsettingwidget.cpp @@ -44,10 +44,12 @@ void AnnouncementSettingWidget::changeEvent(QEvent *e) } } -void AnnouncementSettingWidget::setSettings(TextSettings &settings, TextSettings &settings2) +void AnnouncementSettingWidget::setSettings(TextSettings &settings, TextSettings &settings2, TextSettings &settings3, TextSettings &settings4) { mySettings = settings; mySettings2 = settings2; + mySettings3 = settings3; + mySettings4 = settings4; loadSettings(); } @@ -62,6 +64,14 @@ void AnnouncementSettingWidget::loadSettings() ui->checkBoxUseFading2->setChecked(mySettings2.useFading); ui->checkBoxUseBlurredShadow2->setChecked(mySettings2.useBlurShadow); + ui->checkBoxUseShadow3->setChecked(mySettings3.useShadow); + ui->checkBoxUseFading3->setChecked(mySettings3.useFading); + ui->checkBoxUseBlurredShadow3->setChecked(mySettings3.useBlurShadow); + + ui->checkBoxUseShadow4->setChecked(mySettings4.useShadow); + ui->checkBoxUseFading4->setChecked(mySettings4.useFading); + ui->checkBoxUseBlurredShadow4->setChecked(mySettings4.useBlurShadow); + // Set background ui->groupBoxBackground->setChecked(mySettings.useBackground); ui->lineEditBackground->setText(mySettings.backgroundName); @@ -69,6 +79,12 @@ void AnnouncementSettingWidget::loadSettings() ui->groupBoxBackground2->setChecked(mySettings2.useBackground); ui->lineEditBackground2->setText(mySettings2.backgroundName); + ui->groupBoxBackground3->setChecked(mySettings3.useBackground); + ui->lineEditBackground3->setText(mySettings3.backgroundName); + + ui->groupBoxBackground4->setChecked(mySettings4.useBackground); + ui->lineEditBackground4->setText(mySettings4.backgroundName); + // Set Alignment ui->comboBoxVerticalAling->setCurrentIndex(mySettings.textAlignmentV); ui->comboBoxHorizontalAling->setCurrentIndex(mySettings.textAlignmentH); @@ -76,6 +92,12 @@ void AnnouncementSettingWidget::loadSettings() ui->comboBoxVerticalAling2->setCurrentIndex(mySettings2.textAlignmentV); ui->comboBoxHorizontalAling2->setCurrentIndex(mySettings2.textAlignmentH); + ui->comboBoxVerticalAling3->setCurrentIndex(mySettings3.textAlignmentV); + ui->comboBoxHorizontalAling3->setCurrentIndex(mySettings3.textAlignmentH); + + ui->comboBoxVerticalAling4->setCurrentIndex(mySettings4.textAlignmentV); + ui->comboBoxHorizontalAling4->setCurrentIndex(mySettings4.textAlignmentH); + // Set text color QPalette p; p.setColor(QPalette::Base,mySettings.textColor); @@ -84,15 +106,29 @@ void AnnouncementSettingWidget::loadSettings() p.setColor(QPalette::Base,mySettings2.textColor); ui->graphicViewTextColor2->setPalette(p); + p.setColor(QPalette::Base,mySettings3.textColor); + ui->graphicViewTextColor3->setPalette(p); + + p.setColor(QPalette::Base,mySettings4.textColor); + ui->graphicViewTextColor4->setPalette(p); + // Set text font lable ui->labelFont->setText(getFontText(mySettings.textFont)); ui->labelFont2->setText(getFontText(mySettings2.textFont)); + ui->labelFont3->setText(getFontText(mySettings3.textFont)); + ui->labelFont4->setText(getFontText(mySettings4.textFont)); + + ui->groupBoxUseDisp2->setChecked(!mySettings2.useDisp1settings); + on_groupBoxUseDisp2_toggled(!mySettings2.useDisp1settings); - ui->groupBoxUseDisp2->setChecked(mySettings2.useDisp2settings); - on_groupBoxUseDisp2_toggled(mySettings2.useDisp2settings); + ui->groupBoxUseDisp3->setChecked(!mySettings3.useDisp1settings); + on_groupBoxUseDisp3_toggled(!mySettings3.useDisp1settings); + + ui->groupBoxUseDisp4->setChecked(!mySettings4.useDisp1settings); + on_groupBoxUseDisp4_toggled(!mySettings4.useDisp1settings); } -void AnnouncementSettingWidget::getSettings(TextSettings &settings, TextSettings &settings2) +void AnnouncementSettingWidget::getSettings(TextSettings &settings, TextSettings &settings2, TextSettings &settings3, TextSettings &settings4) { // Effects mySettings.useShadow = ui->checkBoxUseShadow->isChecked(); @@ -103,6 +139,14 @@ void AnnouncementSettingWidget::getSettings(TextSettings &settings, TextSettings mySettings2.useFading = ui->checkBoxUseFading2->isChecked(); mySettings2.useBlurShadow = ui->checkBoxUseBlurredShadow2->isChecked(); + mySettings3.useShadow = ui->checkBoxUseShadow3->isChecked(); + mySettings3.useFading = ui->checkBoxUseFading3->isChecked(); + mySettings3.useBlurShadow = ui->checkBoxUseBlurredShadow3->isChecked(); + + mySettings4.useShadow = ui->checkBoxUseShadow4->isChecked(); + mySettings4.useFading = ui->checkBoxUseFading4->isChecked(); + mySettings4.useBlurShadow = ui->checkBoxUseBlurredShadow4->isChecked(); + // Get Background mySettings.useBackground = ui->groupBoxBackground->isChecked(); mySettings.backgroundName = ui->lineEditBackground->text(); @@ -110,17 +154,38 @@ void AnnouncementSettingWidget::getSettings(TextSettings &settings, TextSettings mySettings2.useBackground = ui->groupBoxBackground2->isChecked(); mySettings2.backgroundName = ui->lineEditBackground2->text(); - // Alingmet + mySettings3.useBackground = ui->groupBoxBackground3->isChecked(); + mySettings3.backgroundName = ui->lineEditBackground3->text(); + + mySettings4.useBackground = ui->groupBoxBackground4->isChecked(); + mySettings4.backgroundName = ui->lineEditBackground4->text(); + + // Alignmet mySettings.textAlignmentV = ui->comboBoxVerticalAling->currentIndex(); mySettings.textAlignmentH = ui->comboBoxHorizontalAling->currentIndex(); mySettings2.textAlignmentV = ui->comboBoxVerticalAling2->currentIndex(); mySettings2.textAlignmentH = ui->comboBoxHorizontalAling2->currentIndex(); + mySettings3.textAlignmentV = ui->comboBoxVerticalAling3->currentIndex(); + mySettings3.textAlignmentH = ui->comboBoxHorizontalAling3->currentIndex(); + + mySettings4.textAlignmentV = ui->comboBoxVerticalAling4->currentIndex(); + mySettings4.textAlignmentH = ui->comboBoxHorizontalAling4->currentIndex(); + + mySettings2.useDisp1settings = !ui->groupBoxUseDisp2->isChecked(); mySettings2.useDisp2settings = ui->groupBoxUseDisp2->isChecked(); + mySettings3.useDisp1settings = !ui->groupBoxUseDisp3->isChecked(); + mySettings3.useDisp3settings = ui->groupBoxUseDisp3->isChecked(); + + mySettings4.useDisp1settings = !ui->groupBoxUseDisp4->isChecked(); + mySettings4.useDisp4settings = ui->groupBoxUseDisp4->isChecked(); + settings = mySettings; - settings2 = mySettings2; + settings2 = mySettings2; + settings3 = mySettings3; + settings4 = mySettings4; } void AnnouncementSettingWidget::on_checkBoxUseShadow_stateChanged(int arg1) @@ -145,6 +210,28 @@ void AnnouncementSettingWidget::on_checkBoxUseShadow2_stateChanged(int arg1) } } +void AnnouncementSettingWidget::on_checkBoxUseShadow3_stateChanged(int arg1) +{ + if(arg1==2) + ui->checkBoxUseBlurredShadow3->setEnabled(true); + else + { + ui->checkBoxUseBlurredShadow3->setChecked(false); + ui->checkBoxUseBlurredShadow3->setEnabled(false); + } +} + +void AnnouncementSettingWidget::on_checkBoxUseShadow4_stateChanged(int arg1) +{ + if(arg1==2) + ui->checkBoxUseBlurredShadow4->setEnabled(true); + else + { + ui->checkBoxUseBlurredShadow4->setChecked(false); + ui->checkBoxUseBlurredShadow4->setEnabled(false); + } +} + void AnnouncementSettingWidget::on_buttonBackground_clicked() { QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for announcement wallpaper"), @@ -175,11 +262,51 @@ void AnnouncementSettingWidget::on_buttonBackground2_clicked() } } +void AnnouncementSettingWidget::on_buttonBackground3_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for announcement wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + mySettings3.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings3.backgroundName = filename; + ui->lineEditBackground3->setText(filename); + } +} + +void AnnouncementSettingWidget::on_buttonBackground4_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for announcement wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + mySettings4.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings4.backgroundName = filename; + ui->lineEditBackground4->setText(filename); + } +} + void AnnouncementSettingWidget::setDispScreen2Visible(bool visible) { ui->groupBoxUseDisp2->setVisible(visible); } +void AnnouncementSettingWidget::setDispScreen3Visible(bool visible) +{ + ui->groupBoxUseDisp3->setVisible(visible); +} + +void AnnouncementSettingWidget::setDispScreen4Visible(bool visible) +{ + ui->groupBoxUseDisp4->setVisible(visible); +} + void AnnouncementSettingWidget::on_toolButtonColor_clicked() { QColor c(QColorDialog::getColor(mySettings.textColor,this)); @@ -200,6 +327,26 @@ void AnnouncementSettingWidget::on_toolButtonColor2_clicked() ui->graphicViewTextColor2->setPalette(p); } +void AnnouncementSettingWidget::on_toolButtonColor3_clicked() +{ + QColor c(QColorDialog::getColor(mySettings3.textColor,this)); + if(c.isValid()) + mySettings3.textColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings3.textColor); + ui->graphicViewTextColor3->setPalette(p); +} + +void AnnouncementSettingWidget::on_toolButtonColor4_clicked() +{ + QColor c(QColorDialog::getColor(mySettings4.textColor,this)); + if(c.isValid()) + mySettings4.textColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings4.textColor); + ui->graphicViewTextColor4->setPalette(p); +} + void AnnouncementSettingWidget::on_toolButtonFont_clicked() { bool ok; @@ -220,6 +367,26 @@ void AnnouncementSettingWidget::on_toolButtonFont2_clicked() ui->labelFont2->setText(getFontText(mySettings2.textFont)); } +void AnnouncementSettingWidget::on_toolButtonFont3_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings3.textFont,this); + if(ok) + mySettings3.textFont = font; + + ui->labelFont3->setText(getFontText(mySettings3.textFont)); +} + +void AnnouncementSettingWidget::on_toolButtonFont4_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings4.textFont,this); + if(ok) + mySettings4.textFont = font; + + ui->labelFont4->setText(getFontText(mySettings4.textFont)); +} + void AnnouncementSettingWidget::on_groupBoxUseDisp2_toggled(bool arg1) { ui->groupBoxBackground2->setVisible(arg1); @@ -227,11 +394,27 @@ void AnnouncementSettingWidget::on_groupBoxUseDisp2_toggled(bool arg1) ui->groupBoxTextProperties2->setVisible(arg1); } +void AnnouncementSettingWidget::on_groupBoxUseDisp3_toggled(bool arg1) +{ + ui->groupBoxBackground3->setVisible(arg1); + ui->groupBoxEffects3->setVisible(arg1); + ui->groupBoxTextProperties3->setVisible(arg1); +} + +void AnnouncementSettingWidget::on_groupBoxUseDisp4_toggled(bool arg1) +{ + ui->groupBoxBackground4->setVisible(arg1); + ui->groupBoxEffects4->setVisible(arg1); + ui->groupBoxTextProperties4->setVisible(arg1); +} + void AnnouncementSettingWidget::on_pushButtonDefault_clicked() { TextSettings a; mySettings = a; mySettings2 = a; + mySettings3 = a; + mySettings4 = a; loadSettings(); } @@ -262,6 +445,12 @@ void AnnouncementSettingWidget::setBackgroungds(QString name, QPixmap back) mySettings.backgroundPix = back; mySettings2.backgroundName = name; mySettings2.backgroundPix = back; + mySettings3.backgroundName = name; + mySettings3.backgroundPix = back; + mySettings4.backgroundName = name; + mySettings4.backgroundPix = back; ui->lineEditBackground->setText(name); ui->lineEditBackground2->setText(name); + ui->lineEditBackground3->setText(name); + ui->lineEditBackground4->setText(name); } diff --git a/announcementsettingwidget.hpp b/announcementsettingwidget.hpp index c6780c1..ae04224 100644 --- a/announcementsettingwidget.hpp +++ b/announcementsettingwidget.hpp @@ -38,9 +38,11 @@ class AnnouncementSettingWidget : public QWidget ~AnnouncementSettingWidget(); public slots: - void setSettings(TextSettings& settings, TextSettings &settings2); - void getSettings(TextSettings& settings, TextSettings &settings2); + void setSettings(TextSettings& settings, TextSettings &settings2, TextSettings& settings3, TextSettings &settings4); + void getSettings(TextSettings& settings, TextSettings &settings2, TextSettings& settings3, TextSettings &settings4); void setDispScreen2Visible(bool visible); + void setDispScreen3Visible(bool visible); + void setDispScreen4Visible(bool visible); void setBackgroungds(QString name, QPixmap back); signals: @@ -52,18 +54,28 @@ private slots: void on_pushButtonDefault_clicked(); void on_checkBoxUseShadow_stateChanged(int arg1); void on_groupBoxUseDisp2_toggled(bool arg1); + void on_groupBoxUseDisp3_toggled(bool arg1); + void on_groupBoxUseDisp4_toggled(bool arg1); void on_checkBoxUseShadow2_stateChanged(int arg1); + void on_checkBoxUseShadow3_stateChanged(int arg1); + void on_checkBoxUseShadow4_stateChanged(int arg1); void on_buttonBackground2_clicked(); + void on_buttonBackground3_clicked(); + void on_buttonBackground4_clicked(); void on_toolButtonColor_clicked(); void on_toolButtonColor2_clicked(); + void on_toolButtonColor3_clicked(); + void on_toolButtonColor4_clicked(); void on_toolButtonFont_clicked(); void on_toolButtonFont2_clicked(); + void on_toolButtonFont3_clicked(); + void on_toolButtonFont4_clicked(); QString getFontText(QFont font); void on_pushButtonApplyToAll_clicked(); private: - TextSettings mySettings, mySettings2; + TextSettings mySettings, mySettings2, mySettings3, mySettings4; Ui::AnnouncementSettingWidget *ui; protected: virtual void changeEvent(QEvent *e); diff --git a/announcementsettingwidget.ui b/announcementsettingwidget.ui index 2653d66..d9f95d8 100644 --- a/announcementsettingwidget.ui +++ b/announcementsettingwidget.ui @@ -7,7 +7,7 @@ 0 0 437 - 554 + 1100 @@ -231,7 +231,7 @@ 85 0 - 127 + 0 @@ -240,7 +240,7 @@ 85 0 - 127 + 0 @@ -249,16 +249,25 @@ 85 0 - 127 + 0 - 170 - 85 - 255 + 118 + 50 + 50 + + + + + + + 85 + 0 + 0 @@ -269,7 +278,7 @@ 85 0 - 127 + 0 @@ -278,7 +287,7 @@ 85 0 - 127 + 0 @@ -287,16 +296,25 @@ 85 0 - 127 + 0 - 170 - 85 - 255 + 118 + 50 + 50 + + + + + + + 85 + 0 + 0 @@ -338,6 +356,15 @@ + + + + 85 + 0 + 127 + + + @@ -370,7 +397,7 @@ 85 0 - 127 + 0 @@ -381,7 +408,7 @@ 85 0 - 127 + 0 @@ -449,7 +476,7 @@ 85 0 - 127 + 0 @@ -460,7 +487,7 @@ 85 0 - 127 + 0 @@ -512,7 +539,7 @@ 85 0 - 127 + 0 @@ -523,7 +550,7 @@ 85 0 - 127 + 0 @@ -673,6 +700,1052 @@ + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 0 + 120 + 215 + + + + + + + 0 + 0 + 0 + + + + + + + + Use Separate Tertiary Display Screen Settings + + + true + + + true + + + + 0 + + + 9 + + + 0 + + + 0 + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Effects + + + false + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + + + Use fading effects + + + + + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + + + Use shadow + + + + + + + false + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + + + Use blurred shadow + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Use Background Image + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + + + + Browse... + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Text Properties + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + + + + + + + + + 0 + + + 0 + + + + + Alignment: + + + + + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 0 + 120 + 215 + + + + + + + 0 + 0 + 0 + + + + + + + + Use Separate Quaternary Display Screen Settings + + + true + + + true + + + + 0 + + + 9 + + + 0 + + + 0 + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Effects + + + false + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + + + Use fading effects + + + + + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + + + Use shadow + + + + + + + false + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + + + Use blurred shadow + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Use Background Image + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + + + + Browse... + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Text Properties + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + + + + + + + + + 0 + + + 0 + + + + + Alignment: + + + + + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + diff --git a/biblesettingwidget.cpp b/biblesettingwidget.cpp index 55c642e..98a0ed2 100644 --- a/biblesettingwidget.cpp +++ b/biblesettingwidget.cpp @@ -44,15 +44,17 @@ void BibleSettingWidget::changeEvent(QEvent *e) } } -void BibleSettingWidget::setSettings(BibleSettings &settings, BibleSettings &settings2) +void BibleSettingWidget::setSettings(BibleSettings &settings, BibleSettings &settings2, BibleSettings &settings3, BibleSettings &settings4) { mySettings = settings; mySettings2 = settings2; + mySettings3 = settings3; + mySettings4 = settings4; loadSettings(); } -void BibleSettingWidget::getSettings(BibleSettings &settings, BibleSettings &settings2) +void BibleSettingWidget::getSettings(BibleSettings &settings, BibleSettings &settings2, BibleSettings &settings3, BibleSettings &settings4) { // Effects mySettings.useShadow = ui->checkBoxUseShadow->isChecked(); @@ -63,13 +65,33 @@ void BibleSettingWidget::getSettings(BibleSettings &settings, BibleSettings &set mySettings2.useFading = ui->checkBoxUseFading2->isChecked(); mySettings2.useBlurShadow = ui->checkBoxUseBlurredShadow2->isChecked(); - // Backgroud + mySettings3.useShadow = ui->checkBoxUseShadow3->isChecked(); + mySettings3.useFading = ui->checkBoxUseFading3->isChecked(); + mySettings3.useBlurShadow = ui->checkBoxUseBlurredShadow3->isChecked(); + + mySettings4.useShadow = ui->checkBoxUseShadow4->isChecked(); + mySettings4.useFading = ui->checkBoxUseFading4->isChecked(); + mySettings4.useBlurShadow = ui->checkBoxUseBlurredShadow4->isChecked(); + + // Background mySettings.useBackground = ui->groupBoxBackground->isChecked(); mySettings.backgroundName = ui->lineEditBackPath->text(); mySettings2.useBackground = ui->groupBoxBackground2->isChecked(); mySettings2.backgroundName = ui->lineEditBackPath2->text(); + mySettings3.useBackground = ui->groupBoxBackground3->isChecked(); + mySettings3.backgroundName = ui->lineEditBackPath3->text(); + + mySettings4.useBackground = ui->groupBoxBackground4->isChecked(); + mySettings4.backgroundName = ui->lineEditBackPath4->text(); + + // Background Color 4 Text Group + mySettings.bibleAddBKColorToText = ui->groupBoxAddBackgroundToText->isChecked(); + mySettings2.bibleAddBKColorToText = ui->groupBoxAddBackgroundToText2->isChecked(); + mySettings3.bibleAddBKColorToText = ui->groupBoxAddBackgroundToText3->isChecked(); + mySettings4.bibleAddBKColorToText = ui->groupBoxAddBackgroundToText4->isChecked(); + //Alignment mySettings.textAlignmentV = ui->comboBoxVerticalAling->currentIndex(); mySettings.textAlignmentH = ui->comboBoxHorizontalAling->currentIndex(); @@ -77,6 +99,12 @@ void BibleSettingWidget::getSettings(BibleSettings &settings, BibleSettings &set mySettings2.textAlignmentV = ui->comboBoxVerticalAling2->currentIndex(); mySettings2.textAlignmentH = ui->comboBoxHorizontalAling2->currentIndex(); + mySettings3.textAlignmentV = ui->comboBoxVerticalAling3->currentIndex(); + mySettings3.textAlignmentH = ui->comboBoxHorizontalAling3->currentIndex(); + + mySettings4.textAlignmentV = ui->comboBoxVerticalAling4->currentIndex(); + mySettings4.textAlignmentH = ui->comboBoxHorizontalAling4->currentIndex(); + //Caption Alignment mySettings.captionPosition = ui->comboBoxCaptionPosition->currentIndex(); mySettings.captionAlignment = ui->comboBoxCaptionAlign->currentIndex(); @@ -84,9 +112,17 @@ void BibleSettingWidget::getSettings(BibleSettings &settings, BibleSettings &set mySettings2.captionPosition = ui->comboBoxCaptionPosition2->currentIndex(); mySettings2.captionAlignment = ui->comboBoxCaptionAlign2->currentIndex(); + mySettings3.captionPosition = ui->comboBoxCaptionPosition3->currentIndex(); + mySettings3.captionAlignment = ui->comboBoxCaptionAlign3->currentIndex(); + + mySettings4.captionPosition = ui->comboBoxCaptionPosition4->currentIndex(); + mySettings4.captionAlignment = ui->comboBoxCaptionAlign4->currentIndex(); + // Version Abbreviations mySettings.useAbbriviation = ui->checkBoxAbbiviations->isChecked(); mySettings2.useAbbriviation = ui->checkBoxAbbiviations2->isChecked(); + mySettings3.useAbbriviation = ui->checkBoxAbbiviations3->isChecked(); + mySettings4.useAbbriviation = ui->checkBoxAbbiviations4->isChecked(); // Max screen use mySettings.screenUse = ui->spinBoxMaxScreen->value(); @@ -95,21 +131,40 @@ void BibleSettingWidget::getSettings(BibleSettings &settings, BibleSettings &set mySettings2.screenUse = ui->spinBoxMaxScreen2->value(); mySettings2.screenPosition = ui->comboBoxScreenPosition2->currentIndex(); + mySettings3.screenUse = ui->spinBoxMaxScreen3->value(); + mySettings3.screenPosition = ui->comboBoxScreenPosition3->currentIndex(); + + mySettings4.screenUse = ui->spinBoxMaxScreen4->value(); + mySettings4.screenPosition = ui->comboBoxScreenPosition4->currentIndex(); + // Get if to use secodary screen settings + mySettings2.useDisp1settings = !ui->groupBoxUseDisp2->isChecked(); mySettings2.useDisp2settings = ui->groupBoxUseDisp2->isChecked(); + // Get if to use tertiary screen settings + mySettings3.useDisp1settings = !ui->groupBoxUseDisp3->isChecked(); + mySettings3.useDisp3settings = ui->groupBoxUseDisp3->isChecked(); + + // Get if to use quaternary screen settings + mySettings4.useDisp1settings = !ui->groupBoxUseDisp4->isChecked(); + mySettings4.useDisp4settings = ui->groupBoxUseDisp4->isChecked(); + settings = mySettings; settings2 = mySettings2; + settings3 = mySettings3; + settings4 = mySettings4; } -void BibleSettingWidget::setBibleVersions(BibleVersionSettings &bver, BibleVersionSettings &bver2) +void BibleSettingWidget::setBibleVersions(BibleVersionSettings &bver, BibleVersionSettings &bver2, BibleVersionSettings &bver3, BibleVersionSettings &bver4) { bversion = bver; bversion2 = bver2; + bversion3 = bver3; + bversion4 = bver4; loadBibleVersions(); } -void BibleSettingWidget::getBibleVersions(BibleVersionSettings &bver, BibleVersionSettings &bver2) +void BibleSettingWidget::getBibleVersions(BibleVersionSettings &bver, BibleVersionSettings &bver2, BibleVersionSettings &bver3, BibleVersionSettings &bver4) { int pbx = ui->comboBoxPrimaryBible->currentIndex(); int sbx = ui->comboBoxSecondaryBible->currentIndex(); @@ -174,8 +229,66 @@ void BibleSettingWidget::getBibleVersions(BibleVersionSettings &bver, BibleVersi bversion2.operatorBible = "same"; } + // Get Bible versions for tertiary screen + pbx = ui->comboBoxPrimaryBible3->currentIndex(); + sbx = ui->comboBoxSecondaryBible3->currentIndex(); + tbx = ui->comboBoxTrinaryBible3->currentIndex(); + if(pbx != -1) + { + // Primary + bversion3.primaryBible = bible_id_list.at(pbx); + // Secondary + if(sbx <=0) + bversion3.secondaryBible = "none"; + else + bversion3.secondaryBible = secondary_id_list3.at(sbx-1); + // Trinary + if(tbx <=0) + bversion3.trinaryBible = "none"; + else + bversion3.trinaryBible = trinary_id_list3.at(tbx-1); + } + else + { + // There are no bibles in the database + bversion3.primaryBible = "none"; + bversion3.secondaryBible = "none"; + bversion3.trinaryBible = "none"; + bversion3.operatorBible = "same"; + } + + // Get Bible versions for quaternary screen + pbx = ui->comboBoxPrimaryBible4->currentIndex(); + sbx = ui->comboBoxSecondaryBible4->currentIndex(); + tbx = ui->comboBoxTrinaryBible4->currentIndex(); + if(pbx != -1) + { + // Primary + bversion4.primaryBible = bible_id_list.at(pbx); + // Secondary + if(sbx <=0) + bversion4.secondaryBible = "none"; + else + bversion4.secondaryBible = secondary_id_list4.at(sbx-1); + // Trinary + if(tbx <=0) + bversion4.trinaryBible = "none"; + else + bversion4.trinaryBible = trinary_id_list4.at(tbx-1); + } + else + { + // There are no bibles in the database + bversion4.primaryBible = "none"; + bversion4.secondaryBible = "none"; + bversion4.trinaryBible = "none"; + bversion4.operatorBible = "same"; + } + bver = bversion; bver2 = bversion2; + bver3 = bversion3; + bver4 = bversion4; } void BibleSettingWidget::loadSettings() @@ -189,6 +302,14 @@ void BibleSettingWidget::loadSettings() ui->checkBoxUseFading2->setChecked(mySettings2.useFading); ui->checkBoxUseBlurredShadow2->setChecked(mySettings2.useBlurShadow); + ui->checkBoxUseShadow3->setChecked(mySettings3.useShadow); + ui->checkBoxUseFading3->setChecked(mySettings3.useFading); + ui->checkBoxUseBlurredShadow3->setChecked(mySettings3.useBlurShadow); + + ui->checkBoxUseShadow4->setChecked(mySettings4.useShadow); + ui->checkBoxUseFading4->setChecked(mySettings4.useFading); + ui->checkBoxUseBlurredShadow4->setChecked(mySettings4.useBlurShadow); + // Set background use ui->groupBoxBackground->setChecked(mySettings.useBackground); ui->lineEditBackPath->setText(mySettings.backgroundName); @@ -196,6 +317,12 @@ void BibleSettingWidget::loadSettings() ui->groupBoxBackground2->setChecked(mySettings2.useBackground); ui->lineEditBackPath2->setText(mySettings2.backgroundName); + ui->groupBoxBackground3->setChecked(mySettings3.useBackground); + ui->lineEditBackPath3->setText(mySettings3.backgroundName); + + ui->groupBoxBackground4->setChecked(mySettings4.useBackground); + ui->lineEditBackPath4->setText(mySettings4.backgroundName); + // Set text color QPalette p; p.setColor(QPalette::Base,mySettings.textColor); @@ -204,17 +331,31 @@ void BibleSettingWidget::loadSettings() p.setColor(QPalette::Base,mySettings2.textColor); ui->graphicViewTextColor2->setPalette(p); + p.setColor(QPalette::Base,mySettings3.textColor); + ui->graphicViewTextColor3->setPalette(p); + + p.setColor(QPalette::Base,mySettings4.textColor); + ui->graphicViewTextColor4->setPalette(p); + // Set text font ui->labelFont->setText(getFontText(mySettings.textFont)); ui->labelFont2->setText(getFontText(mySettings2.textFont)); + ui->labelFont3->setText(getFontText(mySettings3.textFont)); + ui->labelFont4->setText(getFontText(mySettings4.textFont)); - // Set alignment + // Set Alignment ui->comboBoxVerticalAling->setCurrentIndex(mySettings.textAlignmentV); ui->comboBoxHorizontalAling->setCurrentIndex(mySettings.textAlignmentH); ui->comboBoxVerticalAling2->setCurrentIndex(mySettings2.textAlignmentV); ui->comboBoxHorizontalAling2->setCurrentIndex(mySettings2.textAlignmentH); + ui->comboBoxVerticalAling3->setCurrentIndex(mySettings3.textAlignmentV); + ui->comboBoxHorizontalAling3->setCurrentIndex(mySettings3.textAlignmentH); + + ui->comboBoxVerticalAling4->setCurrentIndex(mySettings4.textAlignmentV); + ui->comboBoxHorizontalAling4->setCurrentIndex(mySettings4.textAlignmentH); + // Set caption color p.setColor(QPalette::Base,mySettings.captionColor); ui->graphicViewCaptionColor->setPalette(p); @@ -222,20 +363,34 @@ void BibleSettingWidget::loadSettings() p.setColor(QPalette::Base,mySettings2.captionColor); ui->graphicViewCaptionColor2->setPalette(p); + p.setColor(QPalette::Base,mySettings3.captionColor); + ui->graphicViewCaptionColor3->setPalette(p); + + p.setColor(QPalette::Base,mySettings4.captionColor); + ui->graphicViewCaptionColor4->setPalette(p); + // Set caption font ui->labelFontCaption->setText(getFontText(mySettings.captionFont)); ui->labelFontCaption2->setText(getFontText(mySettings2.captionFont)); + ui->labelFontCaption3->setText(getFontText(mySettings3.captionFont)); + ui->labelFontCaption4->setText(getFontText(mySettings4.captionFont)); // Set caption alignment ui->comboBoxCaptionPosition->setCurrentIndex(mySettings.captionPosition); ui->comboBoxCaptionPosition2->setCurrentIndex(mySettings2.captionPosition); + ui->comboBoxCaptionPosition3->setCurrentIndex(mySettings3.captionPosition); + ui->comboBoxCaptionPosition4->setCurrentIndex(mySettings4.captionPosition); ui->comboBoxCaptionAlign->setCurrentIndex(mySettings.captionAlignment); ui->comboBoxCaptionAlign2->setCurrentIndex(mySettings2.captionAlignment); + ui->comboBoxCaptionAlign3->setCurrentIndex(mySettings3.captionAlignment); + ui->comboBoxCaptionAlign4->setCurrentIndex(mySettings4.captionAlignment); // Set abbriviations use ui->checkBoxAbbiviations->setChecked(mySettings.useAbbriviation); ui->checkBoxAbbiviations2->setChecked(mySettings2.useAbbriviation); + ui->checkBoxAbbiviations3->setChecked(mySettings3.useAbbriviation); + ui->checkBoxAbbiviations4->setChecked(mySettings4.useAbbriviation); // Set max screen use ui->spinBoxMaxScreen->setValue(mySettings.screenUse); @@ -244,9 +399,56 @@ void BibleSettingWidget::loadSettings() ui->spinBoxMaxScreen2->setValue(mySettings2.screenUse); ui->comboBoxScreenPosition2->setCurrentIndex(mySettings2.screenPosition); + ui->spinBoxMaxScreen3->setValue(mySettings3.screenUse); + ui->comboBoxScreenPosition3->setCurrentIndex(mySettings3.screenPosition); + + ui->spinBoxMaxScreen4->setValue(mySettings4.screenUse); + ui->comboBoxScreenPosition4->setCurrentIndex(mySettings4.screenPosition); + + // Background Color 4 Text + // Display 1 + ui->groupBoxAddBackgroundToText->setChecked(mySettings.bibleAddBKColorToText); + p.setColor(QPalette::Base,mySettings.bibleTextRecBKColor); + ui->graphicViewAddBKColor->setPalette(p); + + p.setColor(QPalette::Base,mySettings.bibleTextGenBKColor); + ui->graphicViewChangeGenBKColor->setPalette(p); + + // Display 2 + ui->groupBoxAddBackgroundToText2->setChecked(mySettings2.bibleAddBKColorToText); + p.setColor(QPalette::Base,mySettings2.bibleTextRecBKColor); + ui->graphicViewAddBKColor2->setPalette(p); + + p.setColor(QPalette::Base,mySettings2.bibleTextGenBKColor); + ui->graphicViewChangeGenBKColor2->setPalette(p); + + // Display 3 + ui->groupBoxAddBackgroundToText3->setChecked(mySettings3.bibleAddBKColorToText); + p.setColor(QPalette::Base,mySettings3.bibleTextRecBKColor); + ui->graphicViewAddBKColor3->setPalette(p); + + p.setColor(QPalette::Base,mySettings3.bibleTextGenBKColor); + ui->graphicViewChangeGenBKColor3->setPalette(p); + + // Display 4 + ui->groupBoxAddBackgroundToText4->setChecked(mySettings4.bibleAddBKColorToText); + p.setColor(QPalette::Base,mySettings4.bibleTextRecBKColor); + ui->graphicViewAddBKColor4->setPalette(p); + + p.setColor(QPalette::Base,mySettings4.bibleTextGenBKColor); + ui->graphicViewChangeGenBKColor4->setPalette(p); + // Set if to use secondary screen settings - ui->groupBoxUseDisp2->setChecked(mySettings2.useDisp2settings); - on_groupBoxUseDisp2_toggled(mySettings2.useDisp2settings); + ui->groupBoxUseDisp2->setChecked(!mySettings2.useDisp1settings); + on_groupBoxUseDisp2_toggled(!mySettings2.useDisp1settings); + + // Set if to use tertiary screen settings + ui->groupBoxUseDisp3->setChecked(!mySettings3.useDisp1settings); + on_groupBoxUseDisp3_toggled(!mySettings3.useDisp1settings); + + // Set if to use quaternary screen settings + ui->groupBoxUseDisp4->setChecked(!mySettings4.useDisp1settings); + on_groupBoxUseDisp4_toggled(!mySettings4.useDisp1settings); } void BibleSettingWidget::loadBibleVersions() @@ -287,6 +489,24 @@ void BibleSettingWidget::loadBibleVersions() ui->comboBoxTrinaryBible2->addItem(tr("None")); ui->comboBoxTrinaryBible2->addItems(bibles); + ui->comboBoxPrimaryBible3->clear(); + ui->comboBoxPrimaryBible3->addItems(bibles); + ui->comboBoxSecondaryBible3->clear(); + ui->comboBoxSecondaryBible3->addItem(tr("None")); + ui->comboBoxSecondaryBible3->addItems(bibles); + ui->comboBoxTrinaryBible3->clear(); + ui->comboBoxTrinaryBible3->addItem(tr("None")); + ui->comboBoxTrinaryBible3->addItems(bibles); + + ui->comboBoxPrimaryBible4->clear(); + ui->comboBoxPrimaryBible4->addItems(bibles); + ui->comboBoxSecondaryBible4->clear(); + ui->comboBoxSecondaryBible4->addItem(tr("None")); + ui->comboBoxSecondaryBible4->addItems(bibles); + ui->comboBoxTrinaryBible4->clear(); + ui->comboBoxTrinaryBible4->addItem(tr("None")); + ui->comboBoxTrinaryBible4->addItems(bibles); + // Set current primary bible if(bversion.primaryBible == "none") ui->comboBoxPrimaryBible->setCurrentIndex(0); @@ -298,6 +518,16 @@ void BibleSettingWidget::loadBibleVersions() else ui->comboBoxPrimaryBible2->setCurrentIndex(bible_id_list.indexOf(bversion2.primaryBible)); + if(bversion3.primaryBible == "none") + ui->comboBoxPrimaryBible3->setCurrentIndex(0); + else + ui->comboBoxPrimaryBible3->setCurrentIndex(bible_id_list.indexOf(bversion3.primaryBible)); + + if(bversion4.primaryBible == "none") + ui->comboBoxPrimaryBible4->setCurrentIndex(0); + else + ui->comboBoxPrimaryBible4->setCurrentIndex(bible_id_list.indexOf(bversion4.primaryBible)); + // Set current secondary bible if(bversion.secondaryBible == "none") ui->comboBoxSecondaryBible->setCurrentIndex(0); @@ -309,7 +539,17 @@ void BibleSettingWidget::loadBibleVersions() else ui->comboBoxSecondaryBible2->setCurrentIndex(bible_id_list.indexOf(bversion2.secondaryBible)+1); - // Set current trinaty bibile + if(bversion3.secondaryBible == "none") + ui->comboBoxSecondaryBible3->setCurrentIndex(0); + else + ui->comboBoxSecondaryBible3->setCurrentIndex(bible_id_list.indexOf(bversion3.secondaryBible)+1); + + if(bversion4.secondaryBible == "none") + ui->comboBoxSecondaryBible4->setCurrentIndex(0); + else + ui->comboBoxSecondaryBible4->setCurrentIndex(bible_id_list.indexOf(bversion4.secondaryBible)+1); + + // Set current trinary bible if(bversion.trinaryBible == "none") ui->comboBoxTrinaryBible->setCurrentIndex(0); else @@ -322,7 +562,19 @@ void BibleSettingWidget::loadBibleVersions() ui->comboBoxTrinaryBible2->setCurrentIndex(bible_id_list.indexOf(bversion2.trinaryBible)+1); updateSecondaryBibleMenu2(); - // Set current operator bibile + if(bversion3.trinaryBible == "none") + ui->comboBoxTrinaryBible3->setCurrentIndex(0); + else + ui->comboBoxTrinaryBible3->setCurrentIndex(bible_id_list.indexOf(bversion3.trinaryBible)+1); + updateSecondaryBibleMenu3(); + + if(bversion4.trinaryBible == "none") + ui->comboBoxTrinaryBible4->setCurrentIndex(0); + else + ui->comboBoxTrinaryBible4->setCurrentIndex(bible_id_list.indexOf(bversion4.trinaryBible)+1); + updateSecondaryBibleMenu4(); + + // Set current operator bible if(bversion.operatorBible == "same") ui->comboBoxOperatorBible->setCurrentIndex(0); else @@ -371,6 +623,48 @@ void BibleSettingWidget::updateSecondaryBibleMenu2() updateTrinaryBibleMenu2(); } +// Bible for Display 3 +void BibleSettingWidget::updateSecondaryBibleMenu3() +{ + QString pbible = ui->comboBoxPrimaryBible3->currentText(); + QString sbible = ui->comboBoxSecondaryBible3->currentText(); + secondary_bibles3 = bibles; + secondary_bibles3.removeOne(pbible); + + secondary_id_list3 = bible_id_list; + secondary_id_list3.removeAt(ui->comboBoxPrimaryBible3->currentIndex()); + ui->comboBoxSecondaryBible3->clear(); + ui->comboBoxSecondaryBible3->addItem(tr("None")); + ui->comboBoxSecondaryBible3->addItems(secondary_bibles3); + + int i = ui->comboBoxSecondaryBible3->findText(sbible); + if( i != -1 ) // The same Tertiary bible is still available + ui->comboBoxSecondaryBible3->setCurrentIndex(i); + + updateTrinaryBibleMenu3(); +} + +// Bible for Display 4 +void BibleSettingWidget::updateSecondaryBibleMenu4() +{ + QString pbible = ui->comboBoxPrimaryBible4->currentText(); + QString sbible = ui->comboBoxSecondaryBible4->currentText(); + secondary_bibles4 = bibles; + secondary_bibles4.removeOne(pbible); + + secondary_id_list4 = bible_id_list; + secondary_id_list4.removeAt(ui->comboBoxPrimaryBible4->currentIndex()); + ui->comboBoxSecondaryBible4->clear(); + ui->comboBoxSecondaryBible4->addItem(tr("None")); + ui->comboBoxSecondaryBible4->addItems(secondary_bibles4); + + int i = ui->comboBoxSecondaryBible4->findText(sbible); + if( i != -1 ) // The same Tertiary bible is still available + ui->comboBoxSecondaryBible4->setCurrentIndex(i); + + updateTrinaryBibleMenu4(); +} + void BibleSettingWidget::updateTrinaryBibleMenu() { if (ui->comboBoxSecondaryBible->currentIndex() == 0) @@ -427,6 +721,62 @@ void BibleSettingWidget::updateTrinaryBibleMenu2() } } +void BibleSettingWidget::updateTrinaryBibleMenu3() +{ + if (ui->comboBoxSecondaryBible3->currentIndex() == 0) + { + ui->comboBoxTrinaryBible3->setCurrentIndex(0); + ui->comboBoxTrinaryBible3->setEnabled(false); + } + else + { + ui->comboBoxTrinaryBible3->setEnabled(true); + QString sbible = ui->comboBoxSecondaryBible3->currentText(); + QString tbible = ui->comboBoxTrinaryBible3->currentText(); + QStringList trinary_bibles = secondary_bibles3; + trinary_bibles.removeOne(sbible); + + trinary_id_list3 = secondary_id_list3; + trinary_id_list3.removeAt(ui->comboBoxSecondaryBible3->currentIndex()-1); + ui->comboBoxTrinaryBible3->clear(); + ui->comboBoxTrinaryBible3->addItem(tr("None")); + ui->comboBoxTrinaryBible3->addItems(trinary_bibles); + + int i = ui->comboBoxTrinaryBible3->findText(tbible); + if( i != -1 ) + // The same secondary bible is still available + ui->comboBoxTrinaryBible3->setCurrentIndex(i); + } +} + +void BibleSettingWidget::updateTrinaryBibleMenu4() +{ + if (ui->comboBoxSecondaryBible4->currentIndex() == 0) + { + ui->comboBoxTrinaryBible4->setCurrentIndex(0); + ui->comboBoxTrinaryBible4->setEnabled(false); + } + else + { + ui->comboBoxTrinaryBible4->setEnabled(true); + QString sbible = ui->comboBoxSecondaryBible4->currentText(); + QString tbible = ui->comboBoxTrinaryBible4->currentText(); + QStringList trinary_bibles = secondary_bibles4; + trinary_bibles.removeOne(sbible); + + trinary_id_list4 = secondary_id_list4; + trinary_id_list4.removeAt(ui->comboBoxSecondaryBible4->currentIndex()-1); + ui->comboBoxTrinaryBible4->clear(); + ui->comboBoxTrinaryBible4->addItem(tr("None")); + ui->comboBoxTrinaryBible4->addItems(trinary_bibles); + + int i = ui->comboBoxTrinaryBible4->findText(tbible); + if( i != -1 ) + // The same secondary bible is still available + ui->comboBoxTrinaryBible4->setCurrentIndex(i); + } +} + void BibleSettingWidget::updateOperatorBibleMenu() { QString pbible = ui->comboBoxPrimaryBible->currentText(); @@ -451,6 +801,16 @@ void BibleSettingWidget::setDispScreen2Visible(bool visible) ui->groupBoxUseDisp2->setVisible(visible); } +void BibleSettingWidget::setDispScreen3Visible(bool visible) +{ + ui->groupBoxUseDisp3->setVisible(visible); +} + +void BibleSettingWidget::setDispScreen4Visible(bool visible) +{ + ui->groupBoxUseDisp4->setVisible(visible); +} + void BibleSettingWidget::on_comboBoxPrimaryBible_activated(const QString &arg1) { updateSecondaryBibleMenu(); @@ -463,6 +823,18 @@ void BibleSettingWidget::on_comboBoxPrimaryBible2_activated(const QString &arg1) updateTrinaryBibleMenu2(); } +void BibleSettingWidget::on_comboBoxPrimaryBible3_activated(const QString &arg1) +{ + updateSecondaryBibleMenu3(); + updateTrinaryBibleMenu3(); +} + +void BibleSettingWidget::on_comboBoxPrimaryBible4_activated(const QString &arg1) +{ + updateSecondaryBibleMenu4(); + updateTrinaryBibleMenu4(); +} + void BibleSettingWidget::on_comboBoxSecondaryBible_activated(const QString &arg1) { updateTrinaryBibleMenu(); @@ -473,6 +845,16 @@ void BibleSettingWidget::on_comboBoxSecondaryBible2_activated(const QString &arg updateTrinaryBibleMenu2(); } +void BibleSettingWidget::on_comboBoxSecondaryBible3_activated(const QString &arg1) +{ + updateTrinaryBibleMenu3(); +} + +void BibleSettingWidget::on_comboBoxSecondaryBible4_activated(const QString &arg1) +{ + updateTrinaryBibleMenu4(); +} + void BibleSettingWidget::on_checkBoxUseShadow_stateChanged(int arg1) { if(arg1==2) @@ -495,6 +877,30 @@ void BibleSettingWidget::on_checkBoxUseShadow2_stateChanged(int arg1) } } +// Display screen 3 +void BibleSettingWidget::on_checkBoxUseShadow3_stateChanged(int arg1) +{ + if(arg1==2) + ui->checkBoxUseBlurredShadow3->setEnabled(true); + else + { + ui->checkBoxUseBlurredShadow3->setChecked(false); + ui->checkBoxUseBlurredShadow3->setEnabled(false); + } +} + +// Display screen 4 +void BibleSettingWidget::on_checkBoxUseShadow4_stateChanged(int arg1) +{ + if(arg1==2) + ui->checkBoxUseBlurredShadow4->setEnabled(true); + else + { + ui->checkBoxUseBlurredShadow4->setChecked(false); + ui->checkBoxUseBlurredShadow4->setEnabled(false); + } +} + void BibleSettingWidget::on_buttonBrowseBackground_clicked() { QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for Bible wallpaper"), @@ -525,6 +931,36 @@ void BibleSettingWidget::on_buttonBrowseBackground2_clicked() } } +void BibleSettingWidget::on_buttonBrowseBackground3_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for Bible wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + mySettings3.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings3.backgroundName = filename; + ui->lineEditBackPath3->setText(filename); + } +} + +void BibleSettingWidget::on_buttonBrowseBackground4_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for Bible wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + mySettings4.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings4.backgroundName = filename; + ui->lineEditBackPath4->setText(filename); + } +} + void BibleSettingWidget::on_toolButtonTextColor_clicked() { QColor c(QColorDialog::getColor(mySettings.textColor,this)); @@ -545,6 +981,26 @@ void BibleSettingWidget::on_toolButtonTextColor2_clicked() ui->graphicViewTextColor2->setPalette(p); } +void BibleSettingWidget::on_toolButtonTextColor3_clicked() +{ + QColor c(QColorDialog::getColor(mySettings3.textColor,this)); + if(c.isValid()) + mySettings3.textColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings3.textColor); + ui->graphicViewTextColor3->setPalette(p); +} + +void BibleSettingWidget::on_toolButtonTextColor4_clicked() +{ + QColor c(QColorDialog::getColor(mySettings4.textColor,this)); + if(c.isValid()) + mySettings4.textColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings4.textColor); + ui->graphicViewTextColor4->setPalette(p); +} + void BibleSettingWidget::on_toolButtonTextFont_clicked() { bool ok; @@ -565,6 +1021,26 @@ void BibleSettingWidget::on_toolButtonTextFont2_clicked() ui->labelFont2->setText(getFontText(mySettings2.textFont)); } +void BibleSettingWidget::on_toolButtonTextFont3_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings3.textFont,this); + if(ok) + mySettings3.textFont = font; + + ui->labelFont3->setText(getFontText(mySettings3.textFont)); +} + +void BibleSettingWidget::on_toolButtonTextFont4_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings4.textFont,this); + if(ok) + mySettings4.textFont = font; + + ui->labelFont4->setText(getFontText(mySettings4.textFont)); +} + void BibleSettingWidget::on_toolButtonCaptionColor_clicked() { QColor c(QColorDialog::getColor(mySettings.captionColor,this)); @@ -585,6 +1061,26 @@ void BibleSettingWidget::on_toolButtonCaptionColor2_clicked() ui->graphicViewCaptionColor2->setPalette(p); } +void BibleSettingWidget::on_toolButtonCaptionColor3_clicked() +{ + QColor c(QColorDialog::getColor(mySettings3.captionColor,this)); + if(c.isValid()) + mySettings3.captionColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings3.captionColor); + ui->graphicViewCaptionColor3->setPalette(p); +} + +void BibleSettingWidget::on_toolButtonCaptionColor4_clicked() +{ + QColor c(QColorDialog::getColor(mySettings4.captionColor,this)); + if(c.isValid()) + mySettings4.captionColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings4.captionColor); + ui->graphicViewCaptionColor4->setPalette(p); +} + void BibleSettingWidget::on_toolButtonCaptionFont_clicked() { bool ok; @@ -605,6 +1101,230 @@ void BibleSettingWidget::on_toolButtonCaptionFont2_clicked() ui->labelFontCaption2->setText(getFontText(mySettings2.captionFont)); } +void BibleSettingWidget::on_toolButtonCaptionFont3_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings3.captionFont,this); + if(ok) + mySettings3.captionFont = font; + + ui->labelFontCaption3->setText(getFontText(mySettings3.captionFont)); +} + +void BibleSettingWidget::on_toolButtonCaptionFont4_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings4.captionFont,this); + if(ok) + mySettings4.captionFont = font; + + ui->labelFontCaption4->setText(getFontText(mySettings4.captionFont)); +} + +void BibleSettingWidget::on_groupBoxAddBackgroundToText_toggled(bool arg1) +{ + QColor c(mySettings.bibleTextGenBKColor); + if(arg1) + { + QPixmap px(1920, 1080); + px.fill(c); + mySettings.useBackground = arg1; + mySettings.backgroundName = c.name(); + mySettings.backgroundPix = px; + ui->comboBoxVerticalAling->setCurrentIndex(2); // Bottom + ui->lineEditBackPath->setText(c.name()); + ui->groupBoxBackground->setChecked(arg1); + } + else + { + mySettings.useBackground = arg1; + mySettings.backgroundName = ""; + mySettings.backgroundPix = QPixmap(1,1); + ui->groupBoxBackground->setChecked(arg1); + ui->lineEditBackPath->clear(); + } +} + +void BibleSettingWidget::on_groupBoxAddBackgroundToText2_toggled(bool arg1) +{ + QColor c(mySettings2.bibleTextGenBKColor); + if(arg1) + { + QPixmap px(1920, 1080); + px.fill(c); + mySettings2.useBackground = arg1; + mySettings2.backgroundName = c.name(); + mySettings2.backgroundPix = px; + ui->comboBoxVerticalAling2->setCurrentIndex(2); // Bottom + ui->lineEditBackPath2->setText(c.name()); + ui->groupBoxBackground2->setChecked(arg1); + } + else + { + mySettings2.useBackground = arg1; + mySettings2.backgroundName = ""; + mySettings2.backgroundPix = QPixmap(1,1); + ui->groupBoxBackground2->setChecked(arg1); + ui->lineEditBackPath2->clear(); + } +} + +void BibleSettingWidget::on_groupBoxAddBackgroundToText3_toggled(bool arg1) +{ + QColor c(mySettings3.bibleTextGenBKColor); + if(arg1) + { + QPixmap px(1920, 1080); + px.fill(c); + mySettings3.useBackground = arg1; + mySettings3.backgroundName = c.name(); + mySettings3.backgroundPix = px; + ui->comboBoxVerticalAling3->setCurrentIndex(2); // Bottom + ui->lineEditBackPath3->setText(c.name()); + ui->groupBoxBackground3->setChecked(arg1); + } + else + { + mySettings3.useBackground = arg1; + mySettings3.backgroundName = ""; + mySettings3.backgroundPix = QPixmap(1,1); + ui->groupBoxBackground3->setChecked(arg1); + ui->lineEditBackPath3->clear(); + } +} + +void BibleSettingWidget::on_groupBoxAddBackgroundToText4_toggled(bool arg1) +{ + QColor c(mySettings4.bibleTextGenBKColor); + if(arg1) + { + QPixmap px(1920, 1080); + px.fill(c); + mySettings4.useBackground = arg1; + mySettings4.backgroundName = c.name(); + mySettings4.backgroundPix = px; + ui->comboBoxVerticalAling4->setCurrentIndex(2); // Bottom + ui->lineEditBackPath4->setText(c.name()); + ui->groupBoxBackground4->setChecked(arg1); + } + else + { + mySettings4.useBackground = arg1; + mySettings4.backgroundName = ""; + mySettings4.backgroundPix = QPixmap(1,1); + ui->groupBoxBackground4->setChecked(arg1); + ui->lineEditBackPath4->clear(); + } +} + +void BibleSettingWidget::on_toolButtonAddBKColorText_clicked() +{ + QColor c(QColorDialog::getColor(mySettings.bibleTextRecBKColor,this)); + if(c.isValid()) + mySettings.bibleTextRecBKColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings.bibleTextRecBKColor); + ui->graphicViewAddBKColor->setPalette(p); +} + +void BibleSettingWidget::on_toolButtonAddBKColorText2_clicked() +{ + QColor c(QColorDialog::getColor(mySettings2.bibleTextRecBKColor,this)); + if(c.isValid()) + mySettings2.bibleTextRecBKColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings2.bibleTextRecBKColor); + ui->graphicViewAddBKColor2->setPalette(p); +} + +void BibleSettingWidget::on_toolButtonAddBKColorText3_clicked() +{ + QColor c(QColorDialog::getColor(mySettings3.bibleTextRecBKColor,this)); + if(c.isValid()) + mySettings3.bibleTextRecBKColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings3.bibleTextRecBKColor); + ui->graphicViewAddBKColor3->setPalette(p); +} + +void BibleSettingWidget::on_toolButtonAddBKColorText4_clicked() +{ + QColor c(QColorDialog::getColor(mySettings4.bibleTextRecBKColor,this)); + if(c.isValid()) + mySettings4.bibleTextRecBKColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings4.bibleTextRecBKColor); + ui->graphicViewAddBKColor4->setPalette(p); +} + +void BibleSettingWidget::on_toolButtonChangeGenBKColor_clicked() +{ + QColor c(QColorDialog::getColor(mySettings.bibleTextGenBKColor,this)); + if(c.isValid()) + { + mySettings.bibleTextGenBKColor = c; + QPixmap px(1920, 1080); + px.fill(c); + mySettings.backgroundPix = px; + mySettings.backgroundName = c.name(); + ui->lineEditBackPath->setText(c.name()); + } + QPalette p; + p.setColor(QPalette::Base,mySettings.bibleTextGenBKColor); + ui->graphicViewChangeGenBKColor->setPalette(p); +} + +void BibleSettingWidget::on_toolButtonChangeGenBKColor2_clicked() +{ + QColor c(QColorDialog::getColor(mySettings2.bibleTextGenBKColor,this)); + if(c.isValid()) + { + mySettings2.bibleTextGenBKColor = c; + QPixmap px(1920, 1080); + px.fill(c); + mySettings2.backgroundPix = px; + mySettings2.backgroundName = c.name(); + ui->lineEditBackPath2->setText(c.name()); + } + QPalette p; + p.setColor(QPalette::Base,mySettings2.bibleTextGenBKColor); + ui->graphicViewChangeGenBKColor2->setPalette(p); +} + +void BibleSettingWidget::on_toolButtonChangeGenBKColor3_clicked() +{ + QColor c(QColorDialog::getColor(mySettings3.bibleTextGenBKColor,this)); + if(c.isValid()) + { + mySettings3.bibleTextGenBKColor = c; + QPixmap px(1920, 1080); + px.fill(c); + mySettings3.backgroundPix = px; + mySettings3.backgroundName = c.name(); + ui->lineEditBackPath3->setText(c.name()); + } + QPalette p; + p.setColor(QPalette::Base,mySettings3.bibleTextGenBKColor); + ui->graphicViewChangeGenBKColor3->setPalette(p); +} + +void BibleSettingWidget::on_toolButtonChangeGenBKColor4_clicked() +{ + QColor c(QColorDialog::getColor(mySettings4.bibleTextGenBKColor,this)); + if(c.isValid()) + { + mySettings4.bibleTextGenBKColor = c; + QPixmap px(1920, 1080); + px.fill(c); + mySettings4.backgroundPix = px; + mySettings4.backgroundName = c.name(); + ui->lineEditBackPath4->setText(c.name()); + } + QPalette p; + p.setColor(QPalette::Base,mySettings4.bibleTextGenBKColor); + ui->graphicViewChangeGenBKColor4->setPalette(p); +} + void BibleSettingWidget::on_groupBoxUseDisp2_toggled(bool arg1) { ui->widgetBibles2->setVisible(arg1); @@ -613,14 +1333,41 @@ void BibleSettingWidget::on_groupBoxUseDisp2_toggled(bool arg1) ui->groupBoxMaxScreen2->setVisible(arg1); ui->groupBoxCaptionProperties2->setVisible(arg1); ui->groupBoxTextProperties2->setVisible(arg1); + ui->groupBoxAddBackgroundToText2->setVisible(arg1); ui->checkBoxAbbiviations2->setVisible(arg1); } +void BibleSettingWidget::on_groupBoxUseDisp3_toggled(bool arg1) +{ + ui->groupWidgetBibles3->setVisible(arg1); + ui->groupBoxEffects3->setVisible(arg1); + ui->groupBoxBackground3->setVisible(arg1); + ui->groupBoxMaxScreen3->setVisible(arg1); + ui->groupBoxCaptionProperties3->setVisible(arg1); + ui->groupBoxTextProperties3->setVisible(arg1); + ui->groupBoxAddBackgroundToText3->setVisible(arg1); + ui->checkBoxAbbiviations3->setVisible(arg1); +} + +void BibleSettingWidget::on_groupBoxUseDisp4_toggled(bool arg1) +{ + ui->groupWidgetBibles4->setVisible(arg1); + ui->groupBoxEffects4->setVisible(arg1); + ui->groupBoxBackground4->setVisible(arg1); + ui->groupBoxMaxScreen4->setVisible(arg1); + ui->groupBoxCaptionProperties4->setVisible(arg1); + ui->groupBoxTextProperties4->setVisible(arg1); + ui->groupBoxAddBackgroundToText4->setVisible(arg1); + ui->checkBoxAbbiviations4->setVisible(arg1); +} + void BibleSettingWidget::on_pushButtonDefault_clicked() { BibleSettings b; mySettings = b; mySettings2 = b; + mySettings3 = b; + mySettings4 = b; loadSettings(); } @@ -651,6 +1398,12 @@ void BibleSettingWidget::setBackgroungds(QString name, QPixmap back) mySettings.backgroundPix = back; mySettings2.backgroundName = name; mySettings2.backgroundPix = back; + mySettings3.backgroundName = name; + mySettings3.backgroundPix = back; + mySettings4.backgroundName = name; + mySettings4.backgroundPix = back; ui->lineEditBackPath->setText(name); ui->lineEditBackPath2->setText(name); + ui->lineEditBackPath3->setText(name); + ui->lineEditBackPath4->setText(name); } diff --git a/biblesettingwidget.hpp b/biblesettingwidget.hpp index 896bf65..e8f7e22 100644 --- a/biblesettingwidget.hpp +++ b/biblesettingwidget.hpp @@ -39,11 +39,13 @@ class BibleSettingWidget : public QWidget ~BibleSettingWidget(); public slots: - void setSettings(BibleSettings &settings, BibleSettings &settings2); - void getSettings(BibleSettings &settings, BibleSettings &settings2); - void setBibleVersions(BibleVersionSettings &bver, BibleVersionSettings &bver2); - void getBibleVersions(BibleVersionSettings &bver, BibleVersionSettings &bver2); + void setSettings(BibleSettings &settings, BibleSettings &settings2, BibleSettings &settings3, BibleSettings &settings4); + void getSettings(BibleSettings &settings, BibleSettings &settings2, BibleSettings &settings3, BibleSettings &settings4); + void setBibleVersions(BibleVersionSettings &bver, BibleVersionSettings &bver2, BibleVersionSettings &bver3, BibleVersionSettings &bver4); + void getBibleVersions(BibleVersionSettings &bver, BibleVersionSettings &bver2, BibleVersionSettings &bver3, BibleVersionSettings &bver4); void setDispScreen2Visible(bool visible); + void setDispScreen3Visible(bool visible); + void setDispScreen4Visible(bool visible); void setBackgroungds(QString name, QPixmap back); signals: @@ -54,27 +56,61 @@ private slots: void loadBibleVersions(); void updateSecondaryBibleMenu(); void updateSecondaryBibleMenu2(); + void updateSecondaryBibleMenu3(); + void updateSecondaryBibleMenu4(); void updateTrinaryBibleMenu(); void updateTrinaryBibleMenu2(); + void updateTrinaryBibleMenu3(); + void updateTrinaryBibleMenu4(); void updateOperatorBibleMenu(); void on_comboBoxPrimaryBible_activated(const QString &arg1); void on_comboBoxPrimaryBible2_activated(const QString &arg1); + void on_comboBoxPrimaryBible3_activated(const QString &arg1); + void on_comboBoxPrimaryBible4_activated(const QString &arg1); void on_comboBoxSecondaryBible_activated(const QString &arg1); void on_comboBoxSecondaryBible2_activated(const QString &arg1); + void on_comboBoxSecondaryBible3_activated(const QString &arg1); + void on_comboBoxSecondaryBible4_activated(const QString &arg1); void on_buttonBrowseBackground_clicked(); void on_buttonBrowseBackground2_clicked(); + void on_buttonBrowseBackground3_clicked(); + void on_buttonBrowseBackground4_clicked(); void on_checkBoxUseShadow_stateChanged(int arg1); void on_checkBoxUseShadow2_stateChanged(int arg1); + void on_checkBoxUseShadow3_stateChanged(int arg1); + void on_checkBoxUseShadow4_stateChanged(int arg1); void on_toolButtonTextColor_clicked(); void on_toolButtonTextColor2_clicked(); + void on_toolButtonTextColor3_clicked(); + void on_toolButtonTextColor4_clicked(); void on_toolButtonTextFont_clicked(); void on_toolButtonTextFont2_clicked(); + void on_toolButtonTextFont3_clicked(); + void on_toolButtonTextFont4_clicked(); void on_toolButtonCaptionColor_clicked(); void on_toolButtonCaptionColor2_clicked(); + void on_toolButtonCaptionColor3_clicked(); + void on_toolButtonCaptionColor4_clicked(); void on_toolButtonCaptionFont_clicked(); void on_toolButtonCaptionFont2_clicked(); + void on_toolButtonCaptionFont3_clicked(); + void on_toolButtonCaptionFont4_clicked(); + void on_groupBoxAddBackgroundToText_toggled(bool arg1); + void on_groupBoxAddBackgroundToText2_toggled(bool arg1); + void on_groupBoxAddBackgroundToText3_toggled(bool arg1); + void on_groupBoxAddBackgroundToText4_toggled(bool arg1); + void on_toolButtonAddBKColorText_clicked(); + void on_toolButtonChangeGenBKColor_clicked(); + void on_toolButtonAddBKColorText2_clicked(); + void on_toolButtonChangeGenBKColor2_clicked(); + void on_toolButtonAddBKColorText3_clicked(); + void on_toolButtonChangeGenBKColor3_clicked(); + void on_toolButtonAddBKColorText4_clicked(); + void on_toolButtonChangeGenBKColor4_clicked(); void on_groupBoxUseDisp2_toggled(bool arg1); + void on_groupBoxUseDisp3_toggled(bool arg1); + void on_groupBoxUseDisp4_toggled(bool arg1); void on_pushButtonDefault_clicked(); QString getFontText(QFont font); @@ -84,8 +120,10 @@ private slots: QStringList bibles, secondary_bibles; QStringList bible_id_list, secondary_id_list, trinary_id_list, operator_id_list; QStringList secondary_bibles2, secondary_id_list2, trinary_id_list2; - BibleSettings mySettings, mySettings2; - BibleVersionSettings bversion,bversion2; + QStringList secondary_bibles3, secondary_id_list3, trinary_id_list3; + QStringList secondary_bibles4, secondary_id_list4, trinary_id_list4; + BibleSettings mySettings, mySettings2, mySettings3, mySettings4; + BibleVersionSettings bversion,bversion2,bversion3,bversion4; Ui::BibleSettingWidget *ui; protected: virtual void changeEvent(QEvent *e); diff --git a/biblesettingwidget.ui b/biblesettingwidget.ui index 5a34384..19fdb0d 100644 --- a/biblesettingwidget.ui +++ b/biblesettingwidget.ui @@ -7,7 +7,7 @@ 0 0 477 - 1148 + 2810 @@ -450,6 +450,151 @@ + + + + Add Background to Text + + + false + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + Add Background Color behind Text + + + + + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Change General Background Color + + + + + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + @@ -537,7 +682,7 @@ 85 0 - 127 + 0 @@ -546,7 +691,7 @@ 85 0 - 127 + 0 @@ -555,16 +700,25 @@ 85 0 - 127 + 0 - 170 - 85 - 255 + 118 + 50 + 50 + + + + + + + 85 + 0 + 0 @@ -575,7 +729,7 @@ 85 0 - 127 + 0 @@ -584,7 +738,7 @@ 85 0 - 127 + 0 @@ -593,16 +747,25 @@ 85 0 - 127 + 0 - 170 - 85 - 255 + 118 + 50 + 50 + + + + + + + 85 + 0 + 0 @@ -644,6 +807,15 @@ + + + + 85 + 0 + 127 + + + @@ -754,7 +926,7 @@ 85 0 - 127 + 0 @@ -765,7 +937,7 @@ 85 0 - 127 + 0 @@ -833,7 +1005,7 @@ 85 0 - 127 + 0 @@ -844,7 +1016,7 @@ 85 0 - 127 + 0 @@ -896,7 +1068,7 @@ 85 0 - 127 + 0 @@ -907,7 +1079,7 @@ 85 0 - 127 + 0 @@ -1064,7 +1236,7 @@ 85 0 - 127 + 0 @@ -1075,7 +1247,7 @@ 85 0 - 127 + 0 @@ -1225,14 +1397,7 @@ - - - Show Bible Version Abbreviation - - - - - + @@ -1241,7 +1406,7 @@ 85 0 - 127 + 0 @@ -1252,7 +1417,7 @@ 85 0 - 127 + 0 @@ -1271,57 +1436,2524 @@ - Amount Of Screen To Use + Add Background to Text - - - + + false + + + true + + + + 9 + + + 9 + + + + + Add Background Color behind Text + + + + + + + 0 + + + 0 + - + - Amount of screen to use: + Color... - - - Percent of screen to be used. - - - % + + + + 50 + 20 + - - 100 + + + 50 + 20 + - + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Change General Background Color + + + + + + + 0 + + + 0 + + + - Position: + Color... - - - Select to use either top portion of the screen or bottom. + + + + 50 + 20 + + + + + 50 + 20 + - - - Top of Screen - - - - - Bottom of Screen - - - + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 0 + + + 0 + + + + + Show Bible Version Abbriviation + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Amount Of Screen To Use + + + + + + + + Amount of screen to use: + + + + + + + Percent of screen to be used. + + + % + + + 100 + + + + + + + Position: + + + + + + + Select to use either top portion of the screen or bottom. + + + + Top of Screen + + + + + Bottom of Screen + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 0 + 120 + 215 + + + + + + + 0 + 0 + 0 + + + + + + + + Use Separate Tertiary Display Screen Settings + + + true + + + true + + + + 0 + + + 9 + + + 0 + + + 0 + + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + Primary Bible: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Secondary Bible: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Trinary Bible: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Effects + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + + + Use fading effects + + + + + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + + + Use shadow + + + + + + + false + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + + + Use blurred shadow + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Use Background Image + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + + + + Browse... + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Text Properties + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + + 0 + + + 0 + + + + + Alignment: + + + + + + + 0 + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Caption Properties + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + 0 + 0 + + + + + + + true + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Position: + + + + + + + + 0 + 0 + + + + + 85 + 0 + + + + Above Text + + + + Above Text + + + + + Below Text + + + + + + + + Alignment: + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Add Background to Text + + + false + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + Add Background Color behind Text + + + + + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Change General Background Color + + + + + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 0 + + + 0 + + + + + Show Bible Version Abbriviation + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Amount Of Screen To Use + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Amount of screen to use: + + + + + + + % + + + 100 + + + + + + + Position: + + + + + + + + 112 + 0 + + + + + Top of Screen + + + + + Bottom of Screen + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 0 + 120 + 215 + + + + + + + 0 + 0 + 0 + + + + + + + + Use Separate Quaternary Display Screen Settings + + + true + + + true + + + + 0 + + + 9 + + + 0 + + + 0 + + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + + + + Primary Bible: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Secondary Bible: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Trinary Bible: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Effects + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + + + Use fading effects + + + + + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + + + Use shadow + + + + + + + false + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + + + Use blurred shadow + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Use Background Image + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + + + + Browse... + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Text Properties + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + 0 + 0 + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Alignment: + + + + + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Caption Properties + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + 0 + 0 + + + + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Position: + + + + + + + + 85 + 0 + + + + + Above Text + + + + + Below Text + + + + + + + + Alignment: + + + + + + + + 16777215 + 16777215 + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Add Background to Text + + + false + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + Add Background Color behind Text + + + + + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Change General Background Color + + + + + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 0 + + + 0 + + + + + Show Bible Version Abbriviation + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Amount Of Screen To Use + + + + 10 + + + 10 + + + 10 + + + 10 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Amount of screen to use: + + + + + + + % + + + 100 + + + + + + + Position: + + + + + + + + 112 + 0 + + + + + Top of Screen + + + + + Bottom of Screen + + + + + + Qt::Horizontal diff --git a/generalsettingwidget.cpp b/generalsettingwidget.cpp index e582cb6..29647c5 100644 --- a/generalsettingwidget.cpp +++ b/generalsettingwidget.cpp @@ -53,6 +53,12 @@ void GeneralSettingWidget::setSettings(GeneralSettings settings) void GeneralSettingWidget::loadSettings() { ui->checkBoxDisplayOnTop->setChecked(mySettings.displayIsOnTop); + QSettings settings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize",QSettings::NativeFormat); + if(settings.value("SoftProjectorUseLightTheme")==0) + ui->checkBoxUseDarkTheme->setChecked(true); + else + ui->checkBoxUseDarkTheme->setChecked(false); + ui->labelDarkThemeInfo->setToolTip(qApp->applicationDirPath()+"/DarkTheme.ini"); ui->checkBoxDisplayOnStartUp->setChecked(mySettings.displayOnStartUp); // Load Themes @@ -78,6 +84,12 @@ void GeneralSettingWidget::loadSettings() ui->comboBoxDisplayScreen_2->clear(); ui->comboBoxDisplayScreen_2->addItem(tr("none")); ui->comboBoxDisplayScreen_2->addItems(monitors); + ui->comboBoxDisplayScreen_3->clear(); + ui->comboBoxDisplayScreen_3->addItem(tr("none")); + ui->comboBoxDisplayScreen_3->addItems(monitors); + ui->comboBoxDisplayScreen_4->clear(); + ui->comboBoxDisplayScreen_4->addItem(tr("none")); + ui->comboBoxDisplayScreen_4->addItems(monitors); // Set primary display screen if(mySettings.displayScreen<0 || mySettings.displayScreen>=screen_count) @@ -85,11 +97,47 @@ void GeneralSettingWidget::loadSettings() else ui->comboBoxDisplayScreen->setCurrentIndex(mySettings.displayScreen); - // Set secondaty display screen + // Set secondary display screen if(mySettings.displayScreen2<-1 || mySettings.displayScreen2>=screen_count) ui->comboBoxDisplayScreen_2->setCurrentIndex(0); else ui->comboBoxDisplayScreen_2->setCurrentIndex(mySettings.displayScreen2+1); + + // Set third display screen + if(mySettings.displayScreen3<-1 || mySettings.displayScreen3>=screen_count) + ui->comboBoxDisplayScreen_3->setCurrentIndex(0); + else + ui->comboBoxDisplayScreen_3->setCurrentIndex(mySettings.displayScreen3+1); + + // Set fourth display screen + if(mySettings.displayScreen4<-1 || mySettings.displayScreen4>=screen_count) + ui->comboBoxDisplayScreen_4->setCurrentIndex(0); + else + ui->comboBoxDisplayScreen_4->setCurrentIndex(mySettings.displayScreen4+1); + + if(screen_count -1 <2) + { + ui->comboBoxDisplayScreen_2->setCurrentIndex(0); + ui->comboBoxDisplayScreen_2->setEnabled(false); + ui->comboBoxDisplayScreen_2->setToolTip("Display unavailable"); + } + + if(ui->comboBoxDisplayScreen_2->currentIndex() == 0) + ui->comboBoxDisplayScreen_3->setEnabled(false); + + if(screen_count -1 <3) + { + ui->comboBoxDisplayScreen_3->setCurrentIndex(0); + ui->comboBoxDisplayScreen_3->setEnabled(false); + ui->comboBoxDisplayScreen_3->setToolTip("Display unavailable"); + } + + if(screen_count -1 <4) + { + ui->comboBoxDisplayScreen_4->setCurrentIndex(0); + ui->comboBoxDisplayScreen_4->setEnabled(false); + ui->comboBoxDisplayScreen_4->setToolTip("Display unavailable"); + } updateSecondaryDisplayScreen(); // Set Display Controls @@ -121,6 +169,7 @@ void GeneralSettingWidget::loadThemes() GeneralSettings GeneralSettingWidget::getSettings() { mySettings.displayIsOnTop = ui->checkBoxDisplayOnTop->isChecked(); + mySettings.useDarkTheme = ui->checkBoxUseDarkTheme->isChecked(); mySettings.displayOnStartUp = ui->checkBoxDisplayOnStartUp->isChecked(); int tmx = ui->comboBoxTheme->currentIndex(); @@ -130,7 +179,9 @@ GeneralSettings GeneralSettingWidget::getSettings() mySettings.currentThemeId = 0; mySettings.displayScreen = ui->comboBoxDisplayScreen->currentIndex(); - mySettings.displayScreen2 = monitors.indexOf(ui->comboBoxDisplayScreen_2->currentText()); + mySettings.displayScreen2 = monitors.indexOf(ui->comboBoxDisplayScreen_2->currentText()); + mySettings.displayScreen3 = monitors.indexOf(ui->comboBoxDisplayScreen_3->currentText()); + mySettings.displayScreen4 = monitors.indexOf(ui->comboBoxDisplayScreen_4->currentText()); mySettings.displayControls.buttonSize = ui->comboBoxIconSize->currentIndex(); mySettings.displayControls.alignmentV = ui->comboBoxControlsAlignV->currentIndex(); @@ -153,7 +204,10 @@ void GeneralSettingWidget::updateSecondaryDisplayScreen() { QString ds1 = ui->comboBoxDisplayScreen->currentText(); QString ds2 = ui->comboBoxDisplayScreen_2->currentText(); + QString ds3 = ui->comboBoxDisplayScreen_3->currentText(); + QString ds4 = ui->comboBoxDisplayScreen_4->currentText(); QStringList monitors2 = monitors; + //Display 2 (ds2) monitors2.removeOne(ds1); ui->comboBoxDisplayScreen_2->clear(); @@ -168,6 +222,41 @@ void GeneralSettingWidget::updateSecondaryDisplayScreen() ui->comboBoxDisplayScreen_2->setCurrentIndex(0); emit setDisp2Use(false); } + + // Display 3 (ds3) + monitors2.removeOne(ds1); + monitors2.removeOne(ds2); + + ui->comboBoxDisplayScreen_3->clear(); + ui->comboBoxDisplayScreen_3->addItem(tr("None")); + ui->comboBoxDisplayScreen_3->addItems(monitors2); + + i = ui->comboBoxDisplayScreen_3->findText(ds3); + if(i != -1) + ui->comboBoxDisplayScreen_3->setCurrentIndex(i); + else + { + ui->comboBoxDisplayScreen_3->setCurrentIndex(0); + emit setDisp3Use(false); + } + + // Display 4 (ds4) + monitors2.removeOne(ds1); + monitors2.removeOne(ds2); + monitors2.removeOne(ds3); + + ui->comboBoxDisplayScreen_4->clear(); + ui->comboBoxDisplayScreen_4->addItem(tr("None")); + ui->comboBoxDisplayScreen_4->addItems(monitors2); + + i = ui->comboBoxDisplayScreen_4->findText(ds4); + if(i != -1) + ui->comboBoxDisplayScreen_4->setCurrentIndex(i); + else + { + ui->comboBoxDisplayScreen_4->setCurrentIndex(0); + emit setDisp4Use(false); + } } void GeneralSettingWidget::on_comboBoxDisplayScreen_activated(const QString &arg1) @@ -177,10 +266,45 @@ void GeneralSettingWidget::on_comboBoxDisplayScreen_activated(const QString &arg void GeneralSettingWidget::on_comboBoxDisplayScreen_2_activated(int index) { + updateSecondaryDisplayScreen(); + int screen_count = QGuiApplication::screens().count(); if(index<=0) + { emit setDisp2Use(false); + ui->comboBoxDisplayScreen_3->setEnabled(false); + } else + { emit setDisp2Use(true); + if(screen_count -1 >=3) + ui->comboBoxDisplayScreen_3->setEnabled(true); + } +} + +void GeneralSettingWidget::on_comboBoxDisplayScreen_3_activated(int index) +{ + updateSecondaryDisplayScreen(); + int screen_count = QGuiApplication::screens().count(); + if(index<=0) + { + emit setDisp3Use(false); + ui->comboBoxDisplayScreen_4->setEnabled(false); + } + + else + { + emit setDisp3Use(true); + if(screen_count -1 >=4) + ui->comboBoxDisplayScreen_4->setEnabled(true); + } +} + +void GeneralSettingWidget::on_comboBoxDisplayScreen_4_activated(int index) +{ + if(index<=0) + emit setDisp4Use(false); + else + emit setDisp4Use(true); } void GeneralSettingWidget::on_pushButtonAddTheme_clicked() @@ -218,3 +342,15 @@ void GeneralSettingWidget::on_comboBoxTheme_activated(int index) { emit themeChanged(themeIdList.at(index)); } + +void GeneralSettingWidget::on_checkBoxUseDarkTheme_clicked() +{ + QSettings settings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", QSettings::NativeFormat); + if (ui->checkBoxUseDarkTheme->isChecked()) + settings.setValue("SoftProjectorUseLightTheme", 0); + else + settings.setValue("SoftProjectorUseLightTheme", 1); + QMessageBox msgBox; + msgBox.setText("Re-launch the application for the changes to take place."); + msgBox.exec(); +} diff --git a/generalsettingwidget.hpp b/generalsettingwidget.hpp index fc6fbff..438c2b8 100644 --- a/generalsettingwidget.hpp +++ b/generalsettingwidget.hpp @@ -52,6 +52,8 @@ public slots: signals: void setDisp2Use(bool toUse); + void setDisp3Use(bool toUse); + void setDisp4Use(bool toUse); void themeChanged(int theme_id); private slots: @@ -60,8 +62,11 @@ private slots: void loadSettings(); void on_comboBoxDisplayScreen_activated(const QString &arg1); void on_comboBoxDisplayScreen_2_activated(int index); + void on_comboBoxDisplayScreen_3_activated(int index); + void on_comboBoxDisplayScreen_4_activated(int index); void on_pushButtonAddTheme_clicked(); void on_comboBoxTheme_activated(int index); + void on_checkBoxUseDarkTheme_clicked(); protected: virtual void changeEvent(QEvent *e); }; diff --git a/generalsettingwidget.ui b/generalsettingwidget.ui index f2d843a..b3b79aa 100644 --- a/generalsettingwidget.ui +++ b/generalsettingwidget.ui @@ -21,6 +21,26 @@ + + + + Immediately Updates Registry + + + Use Dark Theme + + + + + + + + + + NOTE: You can customize the settings in 'DarkTheme.ini' + + + @@ -59,20 +79,10 @@ Display Screen Selection - - - - Primary Display Screen: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - + + - + 0 0 @@ -82,6 +92,19 @@ + + + + Qt::Horizontal + + + + 162 + 20 + + + + @@ -95,18 +118,31 @@ - - + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + - Secondary Display Screen: + Primary Display Screen: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + 0 @@ -118,26 +154,76 @@ - - + + + + + 0 + 0 + + + + Select onto which screen to dispaly + + + + + + + Tertiary Display Screen: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Secondary Display Screen: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Show Display Screen on SoftProjector Startup + + + + + + + Quaternary Display Screen: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Select onto which screen to display + + + + + Qt::Horizontal - 162 + 40 20 - - - - Show Display Screen on SoftProjector Startup - - - diff --git a/imagegenerator.cpp b/imagegenerator.cpp index 25ee667..f7d3198 100644 --- a/imagegenerator.cpp +++ b/imagegenerator.cpp @@ -78,6 +78,9 @@ QPixmap ImageGenerator::generateBibleImage(Verse verse, BibleSettings &bSets) // m_blurShadow = (m_bSets.effectsType == 2); m_shadow = m_bSets.useShadow; m_blurShadow = m_bSets.useBlurShadow; + m_bibleAddBKColorToText = m_bSets.bibleAddBKColorToText; + m_bibleTextRecBKColor = m_bSets.bibleTextRecBKColor; + m_bibleTextGenBKColor = m_bSets.bibleTextGenBKColor; m_isTextPrepared = false; return renderText(); @@ -97,6 +100,9 @@ QPixmap ImageGenerator::generateSongImage(Stanza stanza, SongSettings &sSets) // m_blurShadow = (m_sSets.effectsType == 2); m_shadow = m_sSets.useShadow; m_blurShadow = m_sSets.useBlurShadow; + m_songAddBKColorToText = m_sSets.songAddBKColorToText; + m_songTextRecBKColor = m_sSets.songTextRecBKColor; + m_songTextGenBKColor = m_sSets.songTextGenBKColor; m_isTextPrepared = false; return renderText(); @@ -123,7 +129,14 @@ QPixmap ImageGenerator::renderText() { QPixmap textMap(m_screenSize), shadowMap(m_screenSize), outMap(m_screenSize); //fill with transparent background - textMap.fill(QColor(0,0,0,0)); + if(m_bibleAddBKColorToText == 1 || m_songAddBKColorToText == 1 || m_announcementAddBKColorToText == 1) + { + if(m_announcementAddBKColorToText == 1) textMap.fill(m_announcementTextGenBKColor); + if(m_songAddBKColorToText == 1) textMap.fill(m_songTextGenBKColor); + if(m_bibleAddBKColorToText == 1) textMap.fill(m_bibleTextGenBKColor); + } else { + textMap.fill(QColor(0,0,0,0)); + } shadowMap.fill(QColor(0,0,0,0)); outMap.fill(QColor(0,0,0,0)); @@ -145,7 +158,7 @@ QPixmap ImageGenerator::renderText() } break; case 2: - // Braw Song + // Draw Song drawSongText(&textPaint,false); if(m_shadow) { @@ -421,6 +434,12 @@ void ImageGenerator::drawBibleTextToRect(QPainter *painter, QRect& trect, QRect& painter->setFont(m_bSets.textFont); trect = painter->boundingRect(left, top, width, height-crect.height(), tflags, ttext); + if(m_bibleAddBKColorToText == 1) + { + int fillheight = trect.height()+crect.height(); + painter->fillRect(QRect(0, top+height-fillheight-left, width+(left*2), top+height), QBrush(m_bibleTextRecBKColor, Qt::SolidPattern)); + } + // reset capion location int ch = crect.height(); int th = trect.height(); @@ -567,7 +586,7 @@ void ImageGenerator::drawSongText(QPainter *painter, bool isShadow) painter->setFont(m_sSets.endingFont); ending_rect = boundRectOrDrawText(painter, false, left, top, width, height, Qt::AlignHCenter | Qt::AlignTop, song_ending); - // Decrease songe ending font size so that it would fit in the screen width + // Decrease song ending font size so that it would fit in the screen width while(ending_rect.width()> width) { m_sSets.endingFont.setPointSize(m_sSets.endingFont.pointSize()-1); @@ -579,6 +598,7 @@ void ImageGenerator::drawSongText(QPainter *painter, bool isShadow) // Prepare Main Text painter->setFont(main_font); main_rect = boundRectOrDrawText(painter, false, left, top, width, height, main_flags, main_text); + mainh = main_rect.height(); mainw = main_rect.width(); totalh = caph+endh+mainh; @@ -635,6 +655,12 @@ void ImageGenerator::drawSongText(QPainter *painter, bool isShadow) endh = m_sdSets.eRect.height(); main_flags = m_sdSets.tFlags; mainh = height-caph-endh; + + if(m_songAddBKColorToText == 1) + { + int fillheight = main_rect.height()+caption_rect.height(); + painter->fillRect(QRect(0, top+height-fillheight-left, width+(left*2), top+height), QBrush(m_songTextRecBKColor, Qt::SolidPattern)); + } if(m_sSets.infoAling == 0 && m_sSets.endingPosition == 0) { painter->setFont(m_sSets.infoFont); @@ -793,6 +819,12 @@ void ImageGenerator::drawAnnounceText(QPainter *painter, bool isShadow) m_isTextPrepared = true; } + if(m_announcementAddBKColorToText == 1) + { + int fillheight = m_adSets.tRect.height(); + painter->fillRect(QRect(0, top+h-fillheight-left, w+(left*2), top+h), QBrush(m_announcementTextRecBKColor, Qt::SolidPattern)); + } + painter->setFont(m_aSets.textFont); if(isShadow) painter->setPen(QColor(Qt::black)); diff --git a/imagegenerator.hpp b/imagegenerator.hpp index fdc6775..4ca88f3 100644 --- a/imagegenerator.hpp +++ b/imagegenerator.hpp @@ -49,9 +49,10 @@ class ImageGenerator private: QSize m_screenSize; - bool m_shadow, m_blurShadow, m_isTextPrepared; + bool m_shadow, m_blurShadow, m_isTextPrepared, m_bibleAddBKColorToText, m_songAddBKColorToText, m_announcementAddBKColorToText; int m_type; // 0 = empty, 1 = bible, 2 = song, 3 = announce int m_shadowOffset, m_blurRadius; + QColor m_bibleTextRecBKColor, m_bibleTextGenBKColor, m_songTextRecBKColor, m_songTextGenBKColor, m_announcementTextRecBKColor, m_announcementTextGenBKColor; Verse m_verse; BibleSettings m_bSets; diff --git a/main.cpp b/main.cpp index bf4f123..17feb5e 100644 --- a/main.cpp +++ b/main.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include "softprojector.hpp" // Definitions for database versions 'dbVer' numbers @@ -82,21 +83,23 @@ bool connect(QString database_file) "'use_background' BOOL, 'background_name' TEXT, 'background' BLOB, 'count' INTEGER DEFAULT 0, 'date' TEXT)"); sq.exec("CREATE TABLE 'ThemeAnnounce' ('theme_id' INTEGER, 'disp' INTEGER, 'use_shadow' BOOL, 'use_fading' BOOL, " "'use_blur_shadow' BOOL, 'use_background' BOOL, 'background_name' TEXT, 'background' BLOB, 'text_font' TEXT, " - "'text_color' INTEGER, 'text_align_v' INTEGER, 'text_align_h' INTEGER, 'use_disp_2' BOOL)"); + "'text_color' INTEGER, 'text_align_v' INTEGER, 'text_align_h' INTEGER, 'use_disp_1' BOOL)"); sq.exec("CREATE TABLE 'ThemeBible' ('theme_id' INTEGER, 'disp' INTEGER, 'use_shadow' BOOL, 'use_fading' BOOL, " "'use_blur_shadow' BOOL, 'use_background' BOOL, 'background_name' TEXT, 'background' BLOB, 'text_font' TEXT, " "'text_color' INTEGER, 'text_align_v' INTEGER, 'text_align_h' INTEGER, 'caption_font' TEXT, " "'caption_color' INTEGER, 'caption_align' INTEGER, 'caption_position' INTEGER, 'use_abbr' BOOL, " - "'screen_use' INTEGER, 'screen_position' INTEGER, 'use_disp_2' BOOL)"); + "'screen_use' INTEGER, 'screen_position' INTEGER, 'use_disp_1' BOOL, " + "'add_background_color_to_text' BOOL, 'text_rec_background_color' INTEGER, 'text_gen_background_color' INTEGER)"); sq.exec("CREATE TABLE 'ThemePassive' ('theme_id' INTEGER, 'disp' INTEGER, 'use_background' BOOL, " - "'background_name' TEXT, 'background' BLOB, 'use_disp_2' BOOL)"); + "'background_name' TEXT, 'background' BLOB, 'use_disp_1' BOOL)"); sq.exec("CREATE TABLE 'ThemeSong' ('theme_id' INTEGER, 'disp' INTEGER, 'use_shadow' BOOL, 'use_fading' BOOL, " "'use_blur_shadow' BOOL, 'show_stanza_title' BOOL, 'show_key' BOOL, 'show_number' BOOL, " "'info_color' INTEGER, 'info_font' TEXT, 'info_align' INTEGER, 'show_song_ending' BOOL, " "'ending_color' INTEGER, 'ending_font' TEXT, 'ending_type' INTEGER, 'ending_position' INTEGER, " "'use_background' BOOL, 'background_name' TEXT, 'background' BLOB, 'text_font' TEXT, " "'text_color' INTEGER, 'text_align_v' INTEGER, 'text_align_h' INTEGER, " - "'screen_use' INTEGER, 'screen_position' INTEGER, 'use_disp_2' BOOL)"); + "'screen_use' INTEGER, 'screen_position' INTEGER, 'use_disp_1' BOOL, " + "'add_background_color_to_text' BOOL, 'text_rec_background_color' INTEGER, 'text_gen_background_color' INTEGER)"); //sq.exec("CREATE TABLE 'ThemeData' ('theme_id' INTEGER, 'type' TEXT, 'sets' TEXT)"); sq.exec("CREATE TABLE 'Themes' ('id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , 'name' TEXT, 'comment' TEXT)"); } @@ -196,6 +199,90 @@ int main(int argc, char *argv[]) #else database_dir = a.applicationDirPath() + QDir::separator(); #endif +#ifdef Q_OS_WIN + // Use Dark Theme + QSettings settings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize",QSettings::NativeFormat); + if(settings.value("SoftProjectorUseLightTheme")==0) + { + // Check if ini exists + QString iniFilePath = qApp->applicationDirPath()+"\\DarkTheme.ini"; + bool darkTheme_Exists = ( QFile::exists(iniFilePath) ); + QString darkColor,disabledColor,custom,WindowText,Base,ToolTipBase,ToolTipText,Text,ButtonText,BrightText,Link,Highlight,HighlightedText; + + if(darkTheme_Exists) + { + // Load settings + QSettings settings(iniFilePath, QSettings::IniFormat); + darkColor = settings.value("Settings/darkColor","#2D2D2D").value(); + disabledColor = settings.value("Settings/disabledColor","#7F7F7F").value(); + custom = settings.value("Settings/custom").value(); + WindowText = settings.value("Settings/WindowText","#FFFFFF").value(); + Base = settings.value("Settings/Base","#121212").value(); + ToolTipBase = settings.value("Settings/ToolTipBase","#FFFFFF").value(); + ToolTipText = settings.value("Settings/ToolTipText","#FFFFFF").value(); + Text = settings.value("Settings/Text","#cccccc").value(); + ButtonText = settings.value("Settings/ButtonText","#FFFFFF").value(); + BrightText = settings.value("Settings/BrightText","#FF0000").value(); + Link = settings.value("Settings/Link","#2A82DA").value(); + Highlight = settings.value("Settings/Highlight","#15416D").value(); + HighlightedText = settings.value("Settings/HighlightedText","#FFFFFF").value(); + } else { + // Create settings + QSettings* settings = new QSettings(iniFilePath, QSettings::IniFormat); + settings->setValue("Settings/darkColor","#2D2D2D"); + darkColor = "#2D2D2D"; + settings->setValue("Settings/disabledColor","#7F7F7F"); + disabledColor = "#7F7F7F"; + settings->setValue("Settings/custom","QToolTip { color: #ffffff; background-color: #15416d; border: 1px solid white; } QGroupBox { color: #e7d1ad; }"); + custom = "QToolTip { color: #ffffff; background-color: #15416d; border: 1px solid white; } QGroupBox { color: #e7d1ad; }"; + settings->setValue("Settings/WindowText","#FFFFFF"); + WindowText = "#FFFFFF"; + settings->setValue("Settings/Base","#121212"); + Base = "#121212"; + settings->setValue("Settings/ToolTipBase","#FFFFFF"); + ToolTipBase = "#FFFFFF"; + settings->setValue("Settings/ToolTipText","#FFFFFF"); + ToolTipText = "#FFFFFF"; + settings->setValue("Settings/Text","#cccccc"); + Text = "#cccccc"; + settings->setValue("Settings/ButtonText","#FFFFFF"); + ButtonText = "#FFFFFF"; + settings->setValue("Settings/BrightText","#FF0000"); + BrightText = "#FF0000"; + settings->setValue("Settings/Link","#2A82DA"); + Link = "#2A82DA"; + settings->setValue("Settings/Highlight","#15416D"); + Highlight = "#15416D"; + settings->setValue("Settings/HighlightedText","#FFFFFF"); + HighlightedText = "#FFFFFF"; + settings->setValue("Example/Use_this_to_generate_Hex_codes","https://www.color-hex.com/color/ffffff"); + settings->sync(); + } + + // Apply settings to palette + QPalette darkPalette; + qApp->setStyle(QStyleFactory::create("Fusion")); + darkPalette.setColor(QPalette::Window, darkColor); + darkPalette.setColor(QPalette::WindowText, WindowText); + darkPalette.setColor(QPalette::Base, Base); + darkPalette.setColor(QPalette::AlternateBase, darkColor); + darkPalette.setColor(QPalette::ToolTipBase, ToolTipBase); + darkPalette.setColor(QPalette::ToolTipText, ToolTipText); + darkPalette.setColor(QPalette::Text, Text); + darkPalette.setColor(QPalette::Disabled, QPalette::Text, disabledColor); + darkPalette.setColor(QPalette::Button, darkColor); + darkPalette.setColor(QPalette::ButtonText, ButtonText); + darkPalette.setColor(QPalette::Disabled, QPalette::ButtonText, disabledColor); + darkPalette.setColor(QPalette::BrightText, BrightText); + darkPalette.setColor(QPalette::Link, Link); + darkPalette.setColor(QPalette::Highlight, Highlight); + darkPalette.setColor(QPalette::HighlightedText, HighlightedText); + darkPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, disabledColor); + + qApp->setPalette(darkPalette); + qApp->setStyleSheet(custom); + } +#endif // Try to connect to database if( !connect(database_dir) ) diff --git a/managedatadialog.cpp b/managedatadialog.cpp index ec96181..2d31f9b 100644 --- a/managedatadialog.cpp +++ b/managedatadialog.cpp @@ -1573,22 +1573,23 @@ void ManageDataDialog::exportTheme(QString path, bool all) sqt.exec("CREATE TABLE 'ThemeAnnounce' ('theme_id' INTEGER, 'disp' INTEGER, 'use_shadow' BOOL, " "'use_fading' BOOL, 'use_blur_shadow' BOOL, 'use_background' BOOL, 'background_name' TEXT, " "'background' BLOB, 'text_font' TEXT, 'text_color' INTEGER, 'text_align_v' INTEGER, " - "'text_align_h' INTEGER, 'use_disp_2' BOOL)"); + "'text_align_h' INTEGER, 'use_disp_1' BOOL)"); sqt.exec("CREATE TABLE 'ThemeBible' ('theme_id' INTEGER, 'disp' INTEGER, 'use_shadow' BOOL, " "'use_fading' BOOL, 'use_blur_shadow' BOOL, 'use_background' BOOL, 'background_name' TEXT, " "'background' BLOB, 'text_font' TEXT, 'text_color' INTEGER, 'text_align_v' INTEGER, " "'text_align_h' INTEGER, 'caption_font' TEXT, 'caption_color' INTEGER, 'caption_align' INTEGER, " "'caption_position' INTEGER, 'use_abbr' BOOL, 'screen_use' INTEGER, 'screen_position' INTEGER, " - "'use_disp_2' BOOL)"); + "'use_disp_1' BOOL, 'add_background_color_to_text' BOOL, 'text_rec_background_color' INTEGER, " + "'text_gen_background_color' INTEGER)"); sqt.exec("CREATE TABLE 'ThemePassive' ('theme_id' INTEGER, 'disp' INTEGER, 'use_background' BOOL, " - "'background_name' TEXT, 'background' BLOB, 'use_disp_2' BOOL)"); + "'background_name' TEXT, 'background' BLOB, 'use_disp_1' BOOL)"); sqt.exec("CREATE TABLE 'ThemeSong' ('theme_id' INTEGER, 'disp' INTEGER, 'use_shadow' BOOL, 'use_fading' BOOL, " "'use_blur_shadow' BOOL, 'show_stanza_title' BOOL, 'show_key' BOOL, 'show_number' BOOL, " "'info_color' INTEGER, 'info_font' TEXT, 'info_align' INTEGER, 'show_song_ending' BOOL, " "'ending_color' INTEGER, 'ending_font' TEXT, 'ending_type' INTEGER, 'ending_position' INTEGER, " "'use_background' BOOL, 'background_name' TEXT, 'background' BLOB, 'text_font' TEXT, " "'text_color' INTEGER, 'text_align_v' INTEGER, 'text_align_h' INTEGER, " - "'screen_use' INTEGER, 'screen_position' INTEGER, 'use_disp_2' BOOL)"); + "'screen_use' INTEGER, 'screen_position' INTEGER, 'use_disp_1' BOOL)"); sqt.exec("CREATE TABLE 'Themes' ('id' INTEGER , 'name' TEXT, 'comment' TEXT)"); if(all) @@ -1671,7 +1672,7 @@ void ManageDataDialog::transferTheme(QSqlQuery &sqf, QSqlQuery &sqt) void ManageDataDialog::transferThemeAnnounce(QSqlQuery &sqf, QSqlQuery &sqt, int tmId) { sqt.prepare("INSERT INTO ThemeAnnounce (theme_id, disp, use_shadow, use_fading, use_blur_shadow, use_background, " - "background_name, background, text_font, text_color, text_align_v, text_align_h, use_disp_2) " + "background_name, background, text_font, text_color, text_align_v, text_align_h, use_disp_1) " "VALUES(:id, :di, :us, :uf, :uu, :ub, :bn, :ba, :tf, :tc, :av, :ah, :ud)"); while(sqf.next()) @@ -1691,7 +1692,7 @@ void ManageDataDialog::transferThemeAnnounce(QSqlQuery &sqf, QSqlQuery &sqt, int sqt.bindValue(":tc",sqf.record().value("text_color")); sqt.bindValue(":av",sqf.record().value("text_align_v")); sqt.bindValue(":ah",sqf.record().value("text_align_h")); - sqt.bindValue(":ud",sqf.record().value("use_disp_2")); + sqt.bindValue(":ud",sqf.record().value("use_disp_1")); sqt.exec(); } } @@ -1700,9 +1701,10 @@ void ManageDataDialog::transferThemeBible(QSqlQuery &sqf, QSqlQuery &sqt, int tm { sqt.prepare("INSERT INTO ThemeBible (theme_id, disp, use_shadow, use_fading, use_blur_shadow, use_background, " "background_name, background, text_font, text_color, text_align_v, text_align_h, caption_font, " - "caption_color, caption_align, caption_position, use_abbr, screen_use, screen_position, use_disp_2) " + "caption_color, caption_align, caption_position, use_abbr, screen_use, screen_position, use_disp_1," + "add_background_color_to_text, text_rec_background_color, text_gen_background_color) " "VALUES(:id, :di, :us, :uf, :uu, :ub, :bn, :ba, :tf, :tc, :av, :ah, :cf, :cc, :ca, :cp, " - ":ua, :su, :sp, :ud)"); + ":ua, :su, :sp, :ud, :ab, :rc, :gc)"); while(sqf.next()) { @@ -1728,14 +1730,17 @@ void ManageDataDialog::transferThemeBible(QSqlQuery &sqf, QSqlQuery &sqt, int tm sqt.bindValue(":ua",sqf.record().value("use_abbr")); sqt.bindValue(":su",sqf.record().value("screen_use")); sqt.bindValue(":sp",sqf.record().value("screen_position")); - sqt.bindValue(":ud",sqf.record().value("use_disp_2")); + sqt.bindValue(":ud",sqf.record().value("use_disp_1")); + sqt.bindValue(":ab",sqf.record().value("add_background_color_to_text")); + sqt.bindValue(":rc",sqf.record().value("text_rec_background_color")); + sqt.bindValue(":gc",sqf.record().value("text_gen_background_color")); sqt.exec(); } } void ManageDataDialog::transferThemePassive(QSqlQuery &sqf, QSqlQuery &sqt, int tmId) { - sqt.prepare("INSERT INTO ThemePassive (theme_id, disp, use_background, background_name, background, use_disp_2) " + sqt.prepare("INSERT INTO ThemePassive (theme_id, disp, use_background, background_name, background, use_disp_1) " "VALUES(:id, :di, :ub, :bn, :ba, :ud)"); while(sqf.next()) @@ -1748,7 +1753,7 @@ void ManageDataDialog::transferThemePassive(QSqlQuery &sqf, QSqlQuery &sqt, int sqt.bindValue(":ub",sqf.record().value("use_background")); sqt.bindValue(":bn",sqf.record().value("background_name")); sqt.bindValue(":ba",sqf.record().value("background")); - sqt.bindValue(":ud",sqf.record().value("use_disp_2")); + sqt.bindValue(":ud",sqf.record().value("use_disp_1")); sqt.exec(); } } @@ -1758,7 +1763,7 @@ void ManageDataDialog::transferThemeSong(QSqlQuery &sqf, QSqlQuery &sqt, int tmI sqt.prepare("INSERT INTO ThemeSong (theme_id, disp, use_shadow, use_fading, use_blur_shadow, show_stanza_title, " "show_key, show_number, info_color, info_font, info_align, show_song_ending, ending_color, ending_font, " "ending_type, ending_position, use_background, background_name, background, text_font, text_color, " - "text_align_v, text_align_h, screen_use, screen_position, use_disp_2) " + "text_align_v, text_align_h, screen_use, screen_position, use_disp_1) " "VALUES(:id, :di, :us, :uf, :uu, :ss, :sk, :sn, :ic, :if, :ia, :se, :ec, :ef, :et, :ep, " ":ub, :bn, :ba, :tf, :tc, :av, :ah, :su, :sp, :ud)"); @@ -1792,7 +1797,7 @@ void ManageDataDialog::transferThemeSong(QSqlQuery &sqf, QSqlQuery &sqt, int tmI sqt.bindValue(":ah",sqf.record().value("text_align_h")); sqt.bindValue(":su",sqf.record().value("screen_use")); sqt.bindValue(":sp",sqf.record().value("screen_position")); - sqt.bindValue(":ud",sqf.record().value("use_disp_2")); + sqt.bindValue(":ud",sqf.record().value("use_disp_1")); sqt.exec(); } } diff --git a/passivesettingwidget.cpp b/passivesettingwidget.cpp index 640b250..0122570 100644 --- a/passivesettingwidget.cpp +++ b/passivesettingwidget.cpp @@ -44,25 +44,42 @@ void PassiveSettingWidget::changeEvent(QEvent *e) } } -void PassiveSettingWidget::setSetings(TextSettings &settings, TextSettings &settings2) +void PassiveSettingWidget::setSetings(TextSettings &settings, TextSettings &settings2, TextSettings &settings3, TextSettings &settings4) { mySettings = settings; mySettings2 = settings2; + mySettings3 = settings3; + mySettings4 = settings4; loadSettings(); } -void PassiveSettingWidget::getSettings(TextSettings &settings, TextSettings &settings2) +void PassiveSettingWidget::getSettings(TextSettings &settings, TextSettings &settings2, TextSettings &settings3, TextSettings &settings4) { mySettings.useBackground = ui->groupBoxBackground->isChecked(); mySettings.backgroundName = ui->lineEditBackgroundPath->text(); // Get display two settings + mySettings2.useDisp1settings = !ui->groupBoxDisp2Sets->isChecked(); mySettings2.useDisp2settings = ui->groupBoxDisp2Sets->isChecked(); mySettings2.useBackground = ui->groupBoxBackground2->isChecked(); mySettings2.backgroundName = ui->lineEditBackgroundPath2->text(); + // Get display three settings + mySettings3.useDisp1settings = !ui->groupBoxDisp3Sets->isChecked(); + mySettings3.useDisp3settings = ui->groupBoxDisp3Sets->isChecked(); + mySettings3.useBackground = ui->groupBoxBackground3->isChecked(); + mySettings3.backgroundName = ui->lineEditBackgroundPath3->text(); + + // Get display four settings + mySettings4.useDisp1settings = !ui->groupBoxDisp4Sets->isChecked(); + mySettings4.useDisp4settings = ui->groupBoxDisp4Sets->isChecked(); + mySettings4.useBackground = ui->groupBoxBackground4->isChecked(); + mySettings4.backgroundName = ui->lineEditBackgroundPath4->text(); + settings = mySettings; settings2 = mySettings2; + settings3 = mySettings3; + settings4 = mySettings4; } void PassiveSettingWidget::loadSettings() @@ -71,9 +88,19 @@ void PassiveSettingWidget::loadSettings() ui->lineEditBackgroundPath->setText(mySettings.backgroundName); // Displpay screen two - ui->groupBoxDisp2Sets->setChecked(mySettings2.useDisp2settings); + ui->groupBoxDisp2Sets->setChecked(!mySettings2.useDisp1settings); ui->groupBoxBackground2->setChecked(mySettings2.useBackground); ui->lineEditBackgroundPath2->setText(mySettings2.backgroundName); + + // Displpay screen three + ui->groupBoxDisp3Sets->setChecked(!mySettings3.useDisp1settings); + ui->groupBoxBackground3->setChecked(mySettings3.useBackground); + ui->lineEditBackgroundPath3->setText(mySettings3.backgroundName); + + // Displpay screen four + ui->groupBoxDisp4Sets->setChecked(!mySettings4.useDisp1settings); + ui->groupBoxBackground4->setChecked(mySettings4.useBackground); + ui->lineEditBackgroundPath4->setText(mySettings4.backgroundName); } void PassiveSettingWidget::setDispScreen2Visible(bool visible) @@ -81,6 +108,16 @@ void PassiveSettingWidget::setDispScreen2Visible(bool visible) ui->groupBoxDisp2Sets->setVisible(visible); } +void PassiveSettingWidget::setDispScreen3Visible(bool visible) +{ + ui->groupBoxDisp3Sets->setVisible(visible); +} + +void PassiveSettingWidget::setDispScreen4Visible(bool visible) +{ + ui->groupBoxDisp4Sets->setVisible(visible); +} + void PassiveSettingWidget::on_buttonBrowseBackgound_clicked() { QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for passive wallpaper"), @@ -101,6 +138,16 @@ void PassiveSettingWidget::on_groupBoxDisp2Sets_toggled(bool arg1) ui->groupBoxBackground2->setVisible(arg1); } +void PassiveSettingWidget::on_groupBoxDisp3Sets_toggled(bool arg1) +{ + ui->groupBoxBackground3->setVisible(arg1); +} + +void PassiveSettingWidget::on_groupBoxDisp4Sets_toggled(bool arg1) +{ + ui->groupBoxBackground4->setVisible(arg1); +} + void PassiveSettingWidget::on_buttonBrowseBackgound2_clicked() { QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for passive wallpaper"), @@ -116,10 +163,42 @@ void PassiveSettingWidget::on_buttonBrowseBackgound2_clicked() } } +void PassiveSettingWidget::on_buttonBrowseBackgound3_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for passive wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + mySettings3.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings3.backgroundName = filename; + ui->lineEditBackgroundPath3->setText(filename); + } +} + +void PassiveSettingWidget::on_buttonBrowseBackgound4_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for passive wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + mySettings4.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings4.backgroundName = filename; + ui->lineEditBackgroundPath4->setText(filename); + } +} + void PassiveSettingWidget::on_pushButtonDefault_clicked() { TextSettings p; mySettings = p; mySettings2 = p; + mySettings3 = p; + mySettings4 = p; loadSettings(); } diff --git a/passivesettingwidget.hpp b/passivesettingwidget.hpp index 2fcc2f9..6caac68 100644 --- a/passivesettingwidget.hpp +++ b/passivesettingwidget.hpp @@ -39,20 +39,26 @@ class PassiveSettingWidget : public QWidget ~PassiveSettingWidget(); public slots: - void setSetings(TextSettings &settings, TextSettings &settings2); - void getSettings(TextSettings &settings, TextSettings &settings2); + void setSetings(TextSettings &settings, TextSettings &settings2, TextSettings &settings3, TextSettings &settings4); + void getSettings(TextSettings &settings, TextSettings &settings2, TextSettings &settings3, TextSettings &settings4); void setDispScreen2Visible(bool visible); + void setDispScreen3Visible(bool visible); + void setDispScreen4Visible(bool visible); private slots: void loadSettings(); void on_buttonBrowseBackgound_clicked(); void on_groupBoxDisp2Sets_toggled(bool arg1); + void on_groupBoxDisp3Sets_toggled(bool arg1); + void on_groupBoxDisp4Sets_toggled(bool arg1); void on_buttonBrowseBackgound2_clicked(); + void on_buttonBrowseBackgound3_clicked(); + void on_buttonBrowseBackgound4_clicked(); void on_pushButtonDefault_clicked(); private: Ui::PassiveSettingWidget *ui; - TextSettings mySettings,mySettings2; + TextSettings mySettings,mySettings2,mySettings3,mySettings4; protected: virtual void changeEvent(QEvent *e); }; diff --git a/passivesettingwidget.ui b/passivesettingwidget.ui index a955ae7..68c7893 100644 --- a/passivesettingwidget.ui +++ b/passivesettingwidget.ui @@ -7,7 +7,7 @@ 0 0 441 - 230 + 419 @@ -47,7 +47,7 @@ 85 0 - 127 + 0 @@ -56,7 +56,7 @@ 85 0 - 127 + 0 @@ -65,7 +65,25 @@ 85 0 - 127 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 0 @@ -76,7 +94,7 @@ 85 0 - 127 + 0 @@ -85,7 +103,7 @@ 85 0 - 127 + 0 @@ -94,7 +112,25 @@ 85 0 - 127 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 0 @@ -127,6 +163,24 @@ + + + + 0 + 120 + 215 + + + + + + + 85 + 0 + 127 + + + @@ -159,7 +213,7 @@ 85 0 - 127 + 0 @@ -170,7 +224,7 @@ 85 0 - 127 + 0 @@ -215,6 +269,474 @@ + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 0 + 120 + 215 + + + + + + + 0 + 0 + 0 + + + + + + + + Use Separate Tertiary Display Screen Settings + + + true + + + true + + + + 0 + + + 9 + + + 0 + + + 0 + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Use Passive Background Image + + + true + + + + + + + + + Browse... + + + + + + + + + + + + + + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 0 + 120 + 215 + + + + + + + 0 + 0 + 0 + + + + + + + + Use Separate Quaternary Display Screen Settings + + + true + + + true + + + + 0 + + + 9 + + + 0 + + + 0 + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Use Passive Background Image + + + true + + + + + + + + + Browse... + + + + + + + + + diff --git a/settings.cpp b/settings.cpp index fe711a2..4f03169 100644 --- a/settings.cpp +++ b/settings.cpp @@ -38,13 +38,21 @@ TextSettingsBase::TextSettingsBase() transitionType = 0; effectsType = 1; useSameForDisp2 = true; + useSameForDisp3 = true; + useSameForDisp4 = true; // older implementation, Use it for now useShadow = true; useFading = true; useBlurShadow = false; useBackground = false; + useDisp1settings = true; useDisp2settings = false; + useDisp3settings = false; + useDisp4settings = false; + announcementAddBKColorToText = false; + announcementTextRecBKColor = QColor(Qt::black); + announcementTextGenBKColor = QColor(Qt::green); setBaseChangeHandles(); } @@ -70,6 +78,9 @@ BibleSettings::BibleSettings() captionAlignment = 2; captionPosition = 1; useAbbriviation = false; + bibleAddBKColorToText = false; + bibleTextRecBKColor = QColor(Qt::black); + bibleTextGenBKColor = QColor(Qt::green); setChangeHandes(); } @@ -94,6 +105,9 @@ SongSettings::SongSettings() endingFont.fromString("Arial,16,-1,5,50,0,0,0,0,0"); endingType = 0; endingPosition = 0; + songAddBKColorToText = false; + songTextRecBKColor = QColor(Qt::black); + songTextGenBKColor = QColor(Qt::green); setChangeHandes(); } @@ -131,7 +145,7 @@ void TextSettingsBase::setBaseChangeHandles() isChangedAlingV = isChangedAlingH = isChangesTranType = isChangedEffectType = isChangedBackType = isChangedBackColor = isChangedBackPix = isChangedBackVid = isChangedScreenUse = - isChangedScreenPos = isChangedSameDisp2 = true; + isChangedScreenPos = isChangedSameDisp2 = isChangedSameDisp3 = isChangedSameDisp4 = true; } void TextSettingsBase::resetBaseChangeHandles() @@ -140,7 +154,7 @@ void TextSettingsBase::resetBaseChangeHandles() isChangedAlingV = isChangedAlingH = isChangesTranType = isChangedEffectType = isChangedBackType = isChangedBackColor = isChangedBackPix = isChangedBackVid = isChangedScreenUse = - isChangedScreenPos = isChangedSameDisp2 = false; + isChangedScreenPos = isChangedSameDisp2 = isChangedSameDisp3 = isChangedSameDisp4 = false; } void TextSettingsBase::loadBase() @@ -190,6 +204,10 @@ void TextSettingsBase::loadBase(QSqlQuery &sq) effectsType = sq.value(1).toInt(); else if(n == "useSameForDisp2") useSameForDisp2 = sq.value(1).toBool(); + else if(n == "useSameForDisp3") + useSameForDisp3 = sq.value(1).toBool(); + else if(n == "useSameForDisp4") + useSameForDisp4 = sq.value(1).toBool(); } resetBaseChangeHandles(); } @@ -220,6 +238,8 @@ void TextSettingsBase::saveBase(QSqlQuery &sq) saveIndividualSettings(sq,id,themeId,"screenUse",screenUse); saveIndividualSettings(sq,id,themeId,"screenPosition",screenPosition); saveIndividualSettings(sq,id,themeId,"useSameForDisp2",useSameForDisp2); + saveIndividualSettings(sq,id,themeId,"useSameForDisp3",useSameForDisp3); + saveIndividualSettings(sq,id,themeId,"useSameForDisp4",useSameForDisp4); sq.prepare("INSERT INTO ThemeData (sid, theme_id, sname, svalue, sdata) VALUES (?,?,?,?,?)"); sq.addBindValue(id); @@ -284,6 +304,12 @@ void TextSettingsBase::updateBase(QSqlQuery &sq) if(isChangedSameDisp2) updateIndividualSettings(sq,id,themeId,"useSameForDisp2",useSameForDisp2); + if(isChangedSameDisp3) + updateIndividualSettings(sq,id,themeId,"useSameForDisp3",useSameForDisp3); + + if(isChangedSameDisp4) + updateIndividualSettings(sq,id,themeId,"useSameForDisp4",useSameForDisp4); + if(isChangedBackPix) { sq.prepare("UPDATE ThemeData SET svalue = ?, sdata = ? WHERE sid = ? AND theme_id = ? AND sname = ?"); @@ -708,6 +734,8 @@ GeneralSettings::GeneralSettings() displayIsOnTop = false; displayScreen = 0; displayScreen2 = -1; // interger "-1" mean "None" or not to display + displayScreen3 = -1; + displayScreen4 = -1; currentThemeId = 0; displayOnStartUp = false; settingsChangedAll = false; @@ -759,8 +787,8 @@ void Settings::loadSettings() { QString t,n,v,s,sets; // type, name, value, userValues QStringList set,values; - bool dataGenOk,dataSpOk,dataB1Ok,dataB2Ok, dataPixOk; - dataGenOk = dataSpOk = dataB1Ok = dataB2Ok = dataPixOk = false; + bool dataGenOk,dataSpOk,dataB1Ok,dataB2Ok,dataB3Ok,dataB4Ok, dataPixOk; + dataGenOk = dataSpOk = dataB1Ok = dataB2Ok = dataB3Ok = dataB4Ok = dataPixOk = false; QSqlQuery sq; sq.exec(QString("SELECT type, sets FROM Settings ")); while (sq.next()) @@ -790,6 +818,10 @@ void Settings::loadSettings() else if (n == "displayScreen2") general.displayScreen2 = v.toInt(); // End display screen 2 settings + else if (n == "displayScreen3") + general.displayScreen3 = v.toInt(); + else if (n == "displayScreen4") + general.displayScreen4 = v.toInt(); else if (n == "dcIconSize") general.displayControls.buttonSize = v.toInt(); else if (n == "dcAlignment") @@ -865,6 +897,42 @@ void Settings::loadSettings() bibleSets2.trinaryBible = v; } } + else if(t == "bible3") + { + dataB3Ok = true; + values = sets.split("\n"); + for(int i(0);isetSettings(gsettings); - bibleSettingswidget->setBibleVersions(bsettings,bsettings2); + bibleSettingswidget->setBibleVersions(bsettings,bsettings2,bsettings3,bsettings4); pictureSettingWidget->setSettings(ssettings); setThemes(); } @@ -120,6 +127,22 @@ void SettingsDialog::setUseDispScreen2(bool toUse) announcementSettingswidget->setDispScreen2Visible(toUse); } +void SettingsDialog::setUseDispScreen3(bool toUse) +{ + passiveSettingwidget->setDispScreen3Visible(toUse); + bibleSettingswidget->setDispScreen3Visible(toUse); + songSettingswidget->setDispScreen3Visible(toUse); + announcementSettingswidget->setDispScreen3Visible(toUse); +} + +void SettingsDialog::setUseDispScreen4(bool toUse) +{ + passiveSettingwidget->setDispScreen4Visible(toUse); + bibleSettingswidget->setDispScreen4Visible(toUse); + songSettingswidget->setDispScreen4Visible(toUse); + announcementSettingswidget->setDispScreen4Visible(toUse); +} + void SettingsDialog::on_buttonBox_clicked(QAbstractButton *button) { if(button == btnOk) @@ -136,17 +159,19 @@ void SettingsDialog::on_buttonBox_clicked(QAbstractButton *button) void SettingsDialog::applySettings() { gsettings = generalSettingswidget->getSettings(); - bibleSettingswidget->getBibleVersions(bsettings,bsettings2); + bibleSettingswidget->getBibleVersions(bsettings,bsettings2,bsettings3,bsettings4); pictureSettingWidget->getSettings(ssettings); getThemes(); // Apply settings - emit updateSettings(gsettings,theme,ssettings,bsettings,bsettings2); + emit updateSettings(gsettings,theme,ssettings,bsettings,bsettings2,bsettings3,bsettings4); // Update only when changed, or when screen location has been changed if(is_always_on_top!=gsettings.displayIsOnTop || current_display_screen!=gsettings.displayScreen - || currentDisplayScreen2!=gsettings.displayScreen2) + || currentDisplayScreen2!=gsettings.displayScreen2 + || currentDisplayScreen3!=gsettings.displayScreen3 + || currentDisplayScreen4!=gsettings.displayScreen4) { emit positionsDisplayWindow(); } @@ -161,22 +186,24 @@ void SettingsDialog::applySettings() is_always_on_top = gsettings.displayIsOnTop; current_display_screen = gsettings.displayScreen; currentDisplayScreen2 = gsettings.displayScreen2; + currentDisplayScreen3 = gsettings.displayScreen3; + currentDisplayScreen4 = gsettings.displayScreen4; } void SettingsDialog::getThemes() { - passiveSettingwidget->getSettings(theme.passive, theme.passive2); - bibleSettingswidget->getSettings(theme.bible, theme.bible2); - songSettingswidget->getSettings(theme.song, theme.song2); - announcementSettingswidget->getSettings(theme.announce, theme.announce2); + passiveSettingwidget->getSettings(theme.passive, theme.passive2, theme.passive3, theme.passive4); + bibleSettingswidget->getSettings(theme.bible, theme.bible2, theme.bible3, theme.bible4); + songSettingswidget->getSettings(theme.song, theme.song2, theme.song3, theme.song4); + announcementSettingswidget->getSettings(theme.announce, theme.announce2, theme.announce3, theme.announce4); } void SettingsDialog::setThemes() { - passiveSettingwidget->setSetings(theme.passive, theme.passive2); - bibleSettingswidget->setSettings(theme.bible, theme.bible2); - songSettingswidget->setSettings(theme.song, theme.song2); - announcementSettingswidget->setSettings(theme.announce, theme.announce2); + passiveSettingwidget->setSetings(theme.passive, theme.passive2, theme.passive3, theme.passive4); + bibleSettingswidget->setSettings(theme.bible, theme.bible2, theme.bible3, theme.bible4); + songSettingswidget->setSettings(theme.song, theme.song2, theme.song3, theme.song4); + announcementSettingswidget->setSettings(theme.announce, theme.announce2, theme.announce3, theme.announce4); } void SettingsDialog::changeTheme(int theme_id) diff --git a/settingsdialog.hpp b/settingsdialog.hpp index 82f58b0..479d86a 100644 --- a/settingsdialog.hpp +++ b/settingsdialog.hpp @@ -45,11 +45,13 @@ class SettingsDialog : public QDialog { public slots: void loadSettings(GeneralSettings& sets, Theme &thm, SlideShowSettings &ssets, - BibleVersionSettings &bsets, BibleVersionSettings &bsets2); + BibleVersionSettings &bsets, BibleVersionSettings &bsets2, + BibleVersionSettings &bsets3, BibleVersionSettings &bsets4); signals: void updateSettings(GeneralSettings& sets, Theme &thm, SlideShowSettings &ssets, - BibleVersionSettings& bsets, BibleVersionSettings& bsets2); + BibleVersionSettings& bsets, BibleVersionSettings& bsets2, + BibleVersionSettings& bsets3, BibleVersionSettings& bsets4); void positionsDisplayWindow(); void updateScreen(); @@ -58,12 +60,16 @@ public slots: int current_display_screen; int currentDisplayScreen2; + int currentDisplayScreen3; + int currentDisplayScreen4; bool is_always_on_top; GeneralSettings gsettings; Theme theme; BibleVersionSettings bsettings; BibleVersionSettings bsettings2; + BibleVersionSettings bsettings3; + BibleVersionSettings bsettings4; SlideShowSettings ssettings; GeneralSettingWidget *generalSettingswidget; @@ -80,6 +86,8 @@ public slots: private slots: void on_listWidget_currentRowChanged(int currentRow); void setUseDispScreen2(bool toUse); + void setUseDispScreen3(bool toUse); + void setUseDispScreen4(bool toUse); void on_buttonBox_clicked(QAbstractButton *button); void applySettings(); void changeTheme(int theme_id); diff --git a/softprojector.cpp b/softprojector.cpp index be4ef7b..ca35aef 100644 --- a/softprojector.cpp +++ b/softprojector.cpp @@ -36,6 +36,8 @@ SoftProjector::SoftProjector(QWidget *parent) // Update Themes Bible Versions theme.bible.versions = mySettings.bibleSets; theme.bible2.versions = mySettings.bibleSets2; + theme.bible3.versions = mySettings.bibleSets3; + theme.bible4.versions = mySettings.bibleSets4; //Setting up the Display Screen desktop = new QDesktopWidget(); @@ -43,6 +45,8 @@ SoftProjector::SoftProjector(QWidget *parent) // so this will initialize the Display1 widget on the main screen: pds1 = new ProjectorDisplayScreen(desktop->screen(0)); pds2 = new ProjectorDisplayScreen(desktop->screen(0)); //for future + pds3 = new ProjectorDisplayScreen(desktop->screen(0)); //for future + pds4 = new ProjectorDisplayScreen(desktop->screen(0)); //for future // Don't worry, we'll move it later bibleWidget = new BibleWidget; @@ -69,7 +73,7 @@ SoftProjector::SoftProjector(QWidget *parent) // display window (Mac OS X) // Apply Settings - applySetting(mySettings.general, theme, mySettings.slideSets, mySettings.bibleSets, mySettings.bibleSets2); + applySetting(mySettings.general, theme, mySettings.slideSets, mySettings.bibleSets, mySettings.bibleSets2, mySettings.bibleSets3, mySettings.bibleSets4); positionDisplayWindow(); @@ -105,8 +109,10 @@ SoftProjector::SoftProjector(QWidget *parent) connect(pds1,SIGNAL(nextSlide()),this,SLOT(nextSlide())); connect(pds1,SIGNAL(prevSlide()),this,SLOT(prevSlide())); connect(settingsDialog,SIGNAL(updateSettings(GeneralSettings&,Theme&,SlideShowSettings&, + BibleVersionSettings&,BibleVersionSettings&, BibleVersionSettings&,BibleVersionSettings&)), this,SLOT(updateSetting(GeneralSettings&,Theme&,SlideShowSettings&, + BibleVersionSettings&,BibleVersionSettings&, BibleVersionSettings&,BibleVersionSettings&))); connect(settingsDialog,SIGNAL(positionsDisplayWindow()),this,SLOT(positionDisplayWindow())); connect(settingsDialog,SIGNAL(updateScreen()),this,SLOT(updateScreen())); @@ -198,6 +204,8 @@ SoftProjector::~SoftProjector() delete mediaPlayer; delete pds1; delete pds2; + delete pds3; + delete pds4; delete desktop; delete languageGroup; delete settingsDialog; @@ -218,11 +226,15 @@ void SoftProjector::positionDisplayWindow() { pds1->setWindowFlags(Qt::WindowStaysOnTopHint); pds2->setWindowFlags(Qt::WindowStaysOnTopHint); + pds3->setWindowFlags(Qt::WindowStaysOnTopHint); + pds4->setWindowFlags(Qt::WindowStaysOnTopHint); } else { pds1->setWindowFlags(0); // Do not show always on top pds2->setWindowFlags(0); // Do not show always on top + pds3->setWindowFlags(0); // Do not show always on top + pds4->setWindowFlags(0); // Do not show always on top } if(desktop->screenCount() > 1) @@ -273,6 +285,56 @@ void SoftProjector::positionDisplayWindow() pds2->hide(); } + // check if to display tertiary display screen + if(mySettings.general.displayScreen3>=0) + { + hasDisplayScreen3 = true; + if (desktop->isVirtualDesktop()) + { + // Move the display widget to screen 1 (tertiary screen): + pds3->setGeometry(desktop->screenGeometry(mySettings.general.displayScreen3)); + pds3->resetImGenSize(); + + } + pds3->setCursor(Qt::BlankCursor); //Sets a Blank Mouse to the screen + pds3->renderPassiveText(theme.passive3.backgroundPix,theme.passive3.useBackground); + pds3->setControlsVisible(false); + if(mySettings.general.displayOnStartUp) + { + pds3->showFullScreen(); + } + } + else + { + hasDisplayScreen3 = false; + pds3->hide(); + } + + // check if to display quaternary display screen + if(mySettings.general.displayScreen4>=0) + { + hasDisplayScreen4 = true; + if (desktop->isVirtualDesktop()) + { + // Move the display widget to screen 1 (quaternary screen): + pds4->setGeometry(desktop->screenGeometry(mySettings.general.displayScreen4)); + pds4->resetImGenSize(); + + } + pds4->setCursor(Qt::BlankCursor); //Sets a Blank Mouse to the screen + pds4->renderPassiveText(theme.passive4.backgroundPix,theme.passive4.useBackground); + pds4->setControlsVisible(false); + if(mySettings.general.displayOnStartUp) + { + pds4->showFullScreen(); + } + } + else + { + hasDisplayScreen4 = false; + pds4->hide(); + } + // specify that there is more than one diplay screen(monitor) availbale isSingleScreen = false; } @@ -285,6 +347,8 @@ void SoftProjector::positionDisplayWindow() showDisplayScreen(false); isSingleScreen = true; hasDisplayScreen2 = false; + hasDisplayScreen3 = false; + hasDisplayScreen4 = false; } } @@ -337,12 +401,15 @@ void SoftProjector::saveSettings() } void SoftProjector::updateSetting(GeneralSettings &g, Theme &t, SlideShowSettings &ssets, - BibleVersionSettings &bsets, BibleVersionSettings &bsets2) + BibleVersionSettings &bsets, BibleVersionSettings &bsets2, + BibleVersionSettings &bsets3, BibleVersionSettings &bsets4) { mySettings.general = g; mySettings.slideSets = ssets; mySettings.bibleSets = bsets; mySettings.bibleSets2 = bsets2; + mySettings.bibleSets3 = bsets3; + mySettings.bibleSets4 = bsets4; mySettings.saveSettings(); theme = t; bibleWidget->setSettings(mySettings.bibleSets); @@ -350,12 +417,15 @@ void SoftProjector::updateSetting(GeneralSettings &g, Theme &t, SlideShowSetting theme.bible.versions = mySettings.bibleSets; theme.bible2.versions = mySettings.bibleSets2; + theme.bible3.versions = mySettings.bibleSets3; + theme.bible4.versions = mySettings.bibleSets4; } void SoftProjector::applySetting(GeneralSettings &g, Theme &t, SlideShowSettings &s, - BibleVersionSettings &b1, BibleVersionSettings &b2) + BibleVersionSettings &b1, BibleVersionSettings &b2, + BibleVersionSettings &b3, BibleVersionSettings &b4) { - updateSetting(g,t,s,b1,b2); + updateSetting(g,t,s,b1,b2,b3,b4); // Apply splitter states ui->splitter->restoreState(mySettings.spMain.spSplitter); @@ -447,7 +517,7 @@ void SoftProjector::keyPressEvent(QKeyEvent *event) } else if(key == Qt::Key_F8) ui->projectTab->setCurrentWidget(announceWidget); - if(key == Qt::Key_F9) + else if(key == Qt::Key_F9) { ui->projectTab->setCurrentWidget(bibleWidget); bibleWidget->setBibleSearchActive(); @@ -613,6 +683,14 @@ void SoftProjector::playVideo() { pds2->playVideo(); } + if(hasDisplayScreen3) + { + pds3->playVideo(); + } + if(hasDisplayScreen4) + { + pds4->playVideo(); + } } void SoftProjector::pauseVideo() @@ -622,6 +700,14 @@ void SoftProjector::pauseVideo() { pds2->pauseVideo(); } + if(hasDisplayScreen3) + { + pds3->pauseVideo(); + } + if(hasDisplayScreen4) + { + pds4->pauseVideo(); + } } void SoftProjector::stopVideo() @@ -631,6 +717,14 @@ void SoftProjector::stopVideo() { pds2->stopVideo(); } + if(hasDisplayScreen3) + { + pds3->stopVideo(); + } + if(hasDisplayScreen4) + { + pds4->stopVideo(); + } } void SoftProjector::setVideoPosition(qint64 position) @@ -640,6 +734,14 @@ void SoftProjector::setVideoPosition(qint64 position) { pds2->setVideoPosition(position); } + if(hasDisplayScreen3) + { + pds3->setVideoPosition(position); + } + if(hasDisplayScreen4) + { + pds4->setVideoPosition(position); + } } void SoftProjector::videoStopped() @@ -681,7 +783,7 @@ void SoftProjector::updateScreen() if(hasDisplayScreen2) { - if(theme.passive2.useDisp2settings) + if(!theme.passive2.useDisp1settings) { pds2->renderPassiveText(theme.passive2.backgroundPix,theme.passive2.useBackground); } @@ -690,6 +792,32 @@ void SoftProjector::updateScreen() pds2->renderPassiveText(theme.passive.backgroundPix,theme.passive.useBackground); } + } + + if(hasDisplayScreen3) + { + if(!theme.passive3.useDisp1settings) + { + pds3->renderPassiveText(theme.passive3.backgroundPix,theme.passive3.useBackground); + } + else + { + pds3->renderPassiveText(theme.passive.backgroundPix,theme.passive.useBackground); + } + + } + + if(hasDisplayScreen4) + { + if(!theme.passive4.useDisp1settings) + { + pds4->renderPassiveText(theme.passive4.backgroundPix,theme.passive4.useBackground); + } + else + { + pds4->renderPassiveText(theme.passive.backgroundPix,theme.passive.useBackground); + } + } stopVideo(); ui->actionShow->setEnabled(true); @@ -763,7 +891,7 @@ void SoftProjector::showBible() theme.bible); if(hasDisplayScreen2) { - if(theme.bible2.useDisp2settings) + if(!theme.bible2.useDisp1settings) { pds2->renderBibleText(bibleWidget->bible. getCurrentVerseAndCaption(currentRows,theme.bible2, @@ -776,6 +904,38 @@ void SoftProjector::showBible() mySettings.bibleSets),theme.bible); } } + + if(hasDisplayScreen3) + { + if(!theme.bible3.useDisp1settings) + { + pds3->renderBibleText(bibleWidget->bible. + getCurrentVerseAndCaption(currentRows,theme.bible3, + mySettings.bibleSets3),theme.bible3); + } + else + { + pds3->renderBibleText(bibleWidget->bible. + getCurrentVerseAndCaption(currentRows,theme.bible, + mySettings.bibleSets),theme.bible); + } + } + + if(hasDisplayScreen4) + { + if(!theme.bible4.useDisp1settings) + { + pds4->renderBibleText(bibleWidget->bible. + getCurrentVerseAndCaption(currentRows,theme.bible4, + mySettings.bibleSets4),theme.bible4); + } + else + { + pds4->renderBibleText(bibleWidget->bible. + getCurrentVerseAndCaption(currentRows,theme.bible, + mySettings.bibleSets),theme.bible); + } + } } void SoftProjector::showSong(int currentRow) @@ -783,18 +943,22 @@ void SoftProjector::showSong(int currentRow) // Get Song Settings SongSettings s1 = theme.song; SongSettings s2 = theme.song2; + SongSettings s3 = theme.song3; + SongSettings s4 = theme.song4; // Apply Song specific settings if there is one if(current_song.usePrivateSettings) { current_song.getSettings(s1); current_song.getSettings(s2); + current_song.getSettings(s3); + current_song.getSettings(s4); } pds1->renderSongText(current_song.getStanza(currentRow),s1); if(hasDisplayScreen2) { - if(theme.song2.useDisp2settings) + if(!theme.song2.useDisp1settings) { pds2->renderSongText(current_song.getStanza(currentRow),s2); } @@ -803,6 +967,29 @@ void SoftProjector::showSong(int currentRow) pds2->renderSongText(current_song.getStanza(currentRow),s1); } } + if(hasDisplayScreen3) + { + if(!theme.song3.useDisp1settings) + { + pds3->renderSongText(current_song.getStanza(currentRow),s3); + } + else + { + pds3->renderSongText(current_song.getStanza(currentRow),s1); + } + } + if(hasDisplayScreen4) + { + if(!theme.song4.useDisp1settings) + { + pds4->renderSongText(current_song.getStanza(currentRow),s4); + } + else + { + pds4->renderSongText(current_song.getStanza(currentRow),s1); + } + } + } void SoftProjector::showAnnounce(int currentRow) @@ -810,7 +997,7 @@ void SoftProjector::showAnnounce(int currentRow) pds1->renderAnnounceText(currentAnnounce.getAnnounceSlide(currentRow),theme.announce); if(hasDisplayScreen2) { - if(theme.announce2.useDisp2settings) + if(!theme.announce2.useDisp1settings) { pds2->renderAnnounceText(currentAnnounce.getAnnounceSlide(currentRow),theme.announce2); } @@ -819,6 +1006,28 @@ void SoftProjector::showAnnounce(int currentRow) pds2->renderAnnounceText(currentAnnounce.getAnnounceSlide(currentRow),theme.announce); } } + if(hasDisplayScreen3) + { + if(!theme.announce3.useDisp1settings) + { + pds3->renderAnnounceText(currentAnnounce.getAnnounceSlide(currentRow),theme.announce3); + } + else + { + pds3->renderAnnounceText(currentAnnounce.getAnnounceSlide(currentRow),theme.announce); + } + } + if(hasDisplayScreen4) + { + if(!theme.announce4.useDisp1settings) + { + pds4->renderAnnounceText(currentAnnounce.getAnnounceSlide(currentRow),theme.announce4); + } + else + { + pds4->renderAnnounceText(currentAnnounce.getAnnounceSlide(currentRow),theme.announce); + } + } } void SoftProjector::showPicture(int currentRow) @@ -828,6 +1037,14 @@ void SoftProjector::showPicture(int currentRow) { pds2->renderSlideShow(pictureShowList.at(currentRow).image,mySettings.slideSets); } + if(hasDisplayScreen3) + { + pds3->renderSlideShow(pictureShowList.at(currentRow).image,mySettings.slideSets); + } + if(hasDisplayScreen4) + { + pds4->renderSlideShow(pictureShowList.at(currentRow).image,mySettings.slideSets); + } } void SoftProjector::showVideo() @@ -840,6 +1057,18 @@ void SoftProjector::showVideo() pds2->setVideoMuted(true); pds2->renderVideo(currentVideo); } + if(hasDisplayScreen3) + { + pds3->setVideoVolume(0); + pds3->setVideoMuted(true); + pds3->renderVideo(currentVideo); + } + if(hasDisplayScreen4) + { + pds4->setVideoVolume(0); + pds4->setVideoMuted(true); + pds4->renderVideo(currentVideo); + } } void SoftProjector::on_actionShow_triggered() @@ -861,6 +1090,14 @@ void SoftProjector::on_actionClear_triggered() { pds2->renderNotText(); } + if(hasDisplayScreen3) + { + pds3->renderNotText(); + } + if(hasDisplayScreen4) + { + pds4->renderNotText(); + } ui->actionClear->setEnabled(false); ui->actionShow->setEnabled(true); // ui->actionHide->setEnabled(false); @@ -875,6 +1112,14 @@ void SoftProjector::on_actionCloseDisplay_triggered() { pds2->showFullScreen(); } + if(hasDisplayScreen3) + { + pds3->showFullScreen(); + } + if(hasDisplayScreen4) + { + pds4->showFullScreen(); + } } else { @@ -883,6 +1128,14 @@ void SoftProjector::on_actionCloseDisplay_triggered() { pds2->hide(); } + if(hasDisplayScreen3) + { + pds3->hide(); + } + if(hasDisplayScreen4) + { + pds4->hide(); + } showing = false; } @@ -899,7 +1152,7 @@ void SoftProjector::updateCloseDisplayButtons(bool isOn) void SoftProjector::on_actionSettings_triggered() { - settingsDialog->loadSettings(mySettings.general,theme,mySettings.slideSets, mySettings.bibleSets,mySettings.bibleSets2); + settingsDialog->loadSettings(mySettings.general,theme,mySettings.slideSets, mySettings.bibleSets,mySettings.bibleSets2,mySettings.bibleSets3,mySettings.bibleSets4); settingsDialog->exec(); } @@ -1079,7 +1332,7 @@ void SoftProjector::on_actionManage_Database_triggered() t.setThemeId(sq.value(0).toInt()); t.loadTheme(); g.currentThemeId = t.getThemeId(); - updateSetting(g,t,mySettings.slideSets,mySettings.bibleSets,mySettings.bibleSets2); + updateSetting(g,t,mySettings.slideSets,mySettings.bibleSets,mySettings.bibleSets2,mySettings.bibleSets3,mySettings.bibleSets4); updateScreen(); } } diff --git a/softprojector.hpp b/softprojector.hpp index 3bcd1ee..e2cd732 100644 --- a/softprojector.hpp +++ b/softprojector.hpp @@ -72,6 +72,8 @@ class SoftProjector : public QMainWindow EditWidget *editWidget; ProjectorDisplayScreen *pds1; ProjectorDisplayScreen *pds2; + ProjectorDisplayScreen *pds3; + ProjectorDisplayScreen *pds4; PictureWidget *pictureWidget; MediaWidget *mediaPlayer; MediaControl *mediaControls; @@ -89,7 +91,8 @@ class SoftProjector : public QMainWindow public slots: void updateSetting(GeneralSettings &g,Theme &t, SlideShowSettings &ssets, - BibleVersionSettings &bsets, BibleVersionSettings &bsets2); + BibleVersionSettings &bsets, BibleVersionSettings &bsets2, + BibleVersionSettings &bsets3, BibleVersionSettings &bsets4); void saveSettings(); void positionDisplayWindow(); void updateScreen(); @@ -115,6 +118,8 @@ public slots: QString cur_locale; bool isSingleScreen; bool hasDisplayScreen2; + bool hasDisplayScreen3; + bool hasDisplayScreen4; // shortcuts QShortcut *shpgUP; @@ -139,7 +144,8 @@ private slots: void showDisplayScreen(bool show); void applySetting(GeneralSettings &g, Theme &t, SlideShowSettings &s, - BibleVersionSettings &b1, BibleVersionSettings &b2); + BibleVersionSettings &b1, BibleVersionSettings &b2, + BibleVersionSettings &b3, BibleVersionSettings &b4); void on_actionSong_Counter_triggered(); void on_projectTab_currentChanged(int index); void updateEditActions(); diff --git a/softprojector.ui b/softprojector.ui index 39799c5..a29b06c 100644 --- a/softprojector.ui +++ b/softprojector.ui @@ -216,7 +216,7 @@ 0 0 1055 - 26 + 21 diff --git a/songsettingwidget.cpp b/songsettingwidget.cpp index 80ff40e..455cfc4 100644 --- a/songsettingwidget.cpp +++ b/songsettingwidget.cpp @@ -44,14 +44,16 @@ SongSettingWidget::~SongSettingWidget() delete ui; } -void SongSettingWidget::setSettings(SongSettings &settings, SongSettings &settings2) +void SongSettingWidget::setSettings(SongSettings &settings, SongSettings &settings2, SongSettings &settings3, SongSettings &settings4) { mySettings = settings; mySettings2 = settings2; + mySettings3 = settings3; + mySettings4 = settings4; loadSettings(); } -void SongSettingWidget::getSettings(SongSettings &settings, SongSettings &settings2) +void SongSettingWidget::getSettings(SongSettings &settings, SongSettings &settings2, SongSettings &settings3, SongSettings &settings4) { // Effects mySettings.useShadow = ui->checkBoxUseShadow->isChecked(); @@ -62,6 +64,14 @@ void SongSettingWidget::getSettings(SongSettings &settings, SongSettings &settin mySettings2.useFading = ui->checkBoxUseFading2->isChecked(); mySettings2.useBlurShadow = ui->checkBoxUseBlurredShadow2->isChecked(); + mySettings3.useShadow = ui->checkBoxUseShadow3->isChecked(); + mySettings3.useFading = ui->checkBoxUseFading3->isChecked(); + mySettings3.useBlurShadow = ui->checkBoxUseBlurredShadow3->isChecked(); + + mySettings4.useShadow = ui->checkBoxUseShadow4->isChecked(); + mySettings4.useFading = ui->checkBoxUseFading4->isChecked(); + mySettings4.useBlurShadow = ui->checkBoxUseBlurredShadow4->isChecked(); + // Save Song info mySettings.showStanzaTitle = ui->checkBoxStanzaTitle->isChecked(); mySettings.showSongKey = ui->checkBoxSongKey->isChecked(); @@ -73,6 +83,16 @@ void SongSettingWidget::getSettings(SongSettings &settings, SongSettings &settin mySettings2.showSongNumber = ui->checkBoxSongNumber2->isChecked(); mySettings2.infoAling = ui->comboBoxInfoAlign2->currentIndex(); + mySettings3.showStanzaTitle = ui->checkBoxStanzaTitle3->isChecked(); + mySettings3.showSongKey = ui->checkBoxSongKey3->isChecked(); + mySettings3.showSongNumber = ui->checkBoxSongNumber3->isChecked(); + mySettings3.infoAling = ui->comboBoxInfoAlign3->currentIndex(); + + mySettings4.showStanzaTitle = ui->checkBoxStanzaTitle4->isChecked(); + mySettings4.showSongKey = ui->checkBoxSongKey4->isChecked(); + mySettings4.showSongNumber = ui->checkBoxSongNumber4->isChecked(); + mySettings4.infoAling = ui->comboBoxInfoAlign4->currentIndex(); + // Save song ending mySettings.showSongEnding = ui->groupBoxSongEnding->isChecked(); mySettings.endingType = ui->comboBoxEndingType->currentIndex(); @@ -82,6 +102,14 @@ void SongSettingWidget::getSettings(SongSettings &settings, SongSettings &settin mySettings2.endingType = ui->comboBoxEndingType2->currentIndex(); mySettings2.endingPosition = ui->comboBoxEndingPosition2->currentIndex(); + mySettings3.showSongEnding = ui->groupBoxSongEnding3->isChecked(); + mySettings3.endingType = ui->comboBoxEndingType3->currentIndex(); + mySettings3.endingPosition = ui->comboBoxEndingPosition3->currentIndex(); + + mySettings4.showSongEnding = ui->groupBoxSongEnding4->isChecked(); + mySettings4.endingType = ui->comboBoxEndingType4->currentIndex(); + mySettings4.endingPosition = ui->comboBoxEndingPosition4->currentIndex(); + // Save song background mySettings.useBackground = ui->groupBoxSongBackground->isChecked(); mySettings.backgroundName = ui->lineEditSongBackground->text(); @@ -89,6 +117,12 @@ void SongSettingWidget::getSettings(SongSettings &settings, SongSettings &settin mySettings2.useBackground = ui->groupBoxSongBackground2->isChecked(); mySettings2.backgroundName = ui->lineEditSongBackground2->text(); + mySettings3.useBackground = ui->groupBoxSongBackground3->isChecked(); + mySettings3.backgroundName = ui->lineEditSongBackground3->text(); + + mySettings4.useBackground = ui->groupBoxSongBackground4->isChecked(); + mySettings4.backgroundName = ui->lineEditSongBackground4->text(); + // Save alignment mySettings.textAlignmentV = ui->comboBoxVerticalAling->currentIndex(); mySettings.textAlignmentH = ui->comboBoxHorizontalAling->currentIndex(); @@ -96,6 +130,18 @@ void SongSettingWidget::getSettings(SongSettings &settings, SongSettings &settin mySettings2.textAlignmentV = ui->comboBoxVerticalAling2->currentIndex(); mySettings2.textAlignmentH = ui->comboBoxHorizontalAling2->currentIndex(); + mySettings3.textAlignmentV = ui->comboBoxVerticalAling3->currentIndex(); + mySettings3.textAlignmentH = ui->comboBoxHorizontalAling3->currentIndex(); + + mySettings4.textAlignmentV = ui->comboBoxVerticalAling4->currentIndex(); + mySettings4.textAlignmentH = ui->comboBoxHorizontalAling4->currentIndex(); + + // Background Color 4 Text Group + mySettings.songAddBKColorToText = ui->groupBoxSongAddBKToText->isChecked(); + mySettings2.songAddBKColorToText = ui->groupBoxSongAddBKToText2->isChecked(); + mySettings3.songAddBKColorToText = ui->groupBoxSongAddBKToText3->isChecked(); + mySettings4.songAddBKColorToText = ui->groupBoxSongAddBKToText4->isChecked(); + // Screen use mySettings.screenUse = ui->spinBoxScreenUse->value(); mySettings.screenPosition = ui->comboBoxScreenUse->currentIndex(); @@ -103,11 +149,26 @@ void SongSettingWidget::getSettings(SongSettings &settings, SongSettings &settin mySettings2.screenUse = ui->spinBoxScreenUse2->value(); mySettings2.screenPosition = ui->comboBoxScreenUse2->currentIndex(); + mySettings3.screenUse = ui->spinBoxScreenUse3->value(); + mySettings3.screenPosition = ui->comboBoxScreenUse3->currentIndex(); + + mySettings4.screenUse = ui->spinBoxScreenUse4->value(); + mySettings4.screenPosition = ui->comboBoxScreenUse4->currentIndex(); + // Use secondary display screen settings + mySettings2.useDisp1settings = !ui->groupBoxDisplay2->isChecked(); mySettings2.useDisp2settings = ui->groupBoxDisplay2->isChecked(); + mySettings3.useDisp1settings = !ui->groupBoxDisplay3->isChecked(); + mySettings3.useDisp3settings = ui->groupBoxDisplay3->isChecked(); + + mySettings4.useDisp1settings = !ui->groupBoxDisplay4->isChecked(); + mySettings4.useDisp4settings = ui->groupBoxDisplay4->isChecked(); + settings = mySettings; settings2 = mySettings2; + settings3 = mySettings3; + settings4 = mySettings4; } void SongSettingWidget::loadSettings() @@ -122,6 +183,14 @@ void SongSettingWidget::loadSettings() ui->checkBoxUseFading2->setChecked(mySettings2.useFading); ui->checkBoxUseBlurredShadow2->setChecked(mySettings2.useBlurShadow); + ui->checkBoxUseShadow3->setChecked(mySettings3.useShadow); + ui->checkBoxUseFading3->setChecked(mySettings3.useFading); + ui->checkBoxUseBlurredShadow3->setChecked(mySettings3.useBlurShadow); + + ui->checkBoxUseShadow4->setChecked(mySettings4.useShadow); + ui->checkBoxUseFading4->setChecked(mySettings4.useFading); + ui->checkBoxUseBlurredShadow4->setChecked(mySettings4.useBlurShadow); + // Set Song Information ui->checkBoxStanzaTitle->setChecked(mySettings.showStanzaTitle); ui->checkBoxSongKey->setChecked(mySettings.showSongKey); @@ -139,6 +208,22 @@ void SongSettingWidget::loadSettings() ui->labelInfoFont2->setText(getFontText(mySettings2.infoFont)); ui->comboBoxInfoAlign2->setCurrentIndex(mySettings2.infoAling); + ui->checkBoxStanzaTitle3->setChecked(mySettings3.showStanzaTitle); + ui->checkBoxSongKey3->setChecked(mySettings3.showSongKey); + ui->checkBoxSongNumber3->setChecked(mySettings3.showSongNumber); + p.setColor(QPalette::Base,mySettings3.infoColor); + ui->graphicViewInfoColor3->setPalette(p); + ui->labelInfoFont3->setText(getFontText(mySettings3.infoFont)); + ui->comboBoxInfoAlign3->setCurrentIndex(mySettings3.infoAling); + + ui->checkBoxStanzaTitle4->setChecked(mySettings4.showStanzaTitle); + ui->checkBoxSongKey4->setChecked(mySettings4.showSongKey); + ui->checkBoxSongNumber4->setChecked(mySettings4.showSongNumber); + p.setColor(QPalette::Base,mySettings4.infoColor); + ui->graphicViewInfoColor4->setPalette(p); + ui->labelInfoFont4->setText(getFontText(mySettings4.infoFont)); + ui->comboBoxInfoAlign4->setCurrentIndex(mySettings4.infoAling); + // Set Song Ending ui->groupBoxSongEnding->setChecked(mySettings.showSongEnding); p.setColor(QPalette::Base,mySettings.endingColor); @@ -154,6 +239,20 @@ void SongSettingWidget::loadSettings() ui->comboBoxEndingType2->setCurrentIndex(mySettings2.endingType); ui->comboBoxEndingPosition2->setCurrentIndex(mySettings2.endingPosition); + ui->groupBoxSongEnding3->setChecked(mySettings3.showSongEnding); + p.setColor(QPalette::Base,mySettings3.endingColor); + ui->graphicViewEndingColor3->setPalette(p); + ui->labelEndingFont3->setText(getFontText(mySettings3.endingFont)); + ui->comboBoxEndingType3->setCurrentIndex(mySettings3.endingType); + ui->comboBoxEndingPosition3->setCurrentIndex(mySettings3.endingPosition); + + ui->groupBoxSongEnding4->setChecked(mySettings4.showSongEnding); + p.setColor(QPalette::Base,mySettings4.endingColor); + ui->graphicViewEndingColor4->setPalette(p); + ui->labelEndingFont4->setText(getFontText(mySettings4.endingFont)); + ui->comboBoxEndingType4->setCurrentIndex(mySettings4.endingType); + ui->comboBoxEndingPosition4->setCurrentIndex(mySettings4.endingPosition); + // Set Song Background ui->groupBoxSongBackground->setChecked(mySettings.useBackground); ui->lineEditSongBackground->setText(mySettings.backgroundName); @@ -161,6 +260,12 @@ void SongSettingWidget::loadSettings() ui->groupBoxSongBackground2->setChecked(mySettings2.useBackground); ui->lineEditSongBackground2->setText(mySettings2.backgroundName); + ui->groupBoxSongBackground3->setChecked(mySettings3.useBackground); + ui->lineEditSongBackground3->setText(mySettings3.backgroundName); + + ui->groupBoxSongBackground4->setChecked(mySettings4.useBackground); + ui->lineEditSongBackground4->setText(mySettings4.backgroundName); + // Set Text Properties p.setColor(QPalette::Base,mySettings.textColor); ui->graphicViewTextColor->setPalette(p); @@ -174,6 +279,52 @@ void SongSettingWidget::loadSettings() ui->comboBoxVerticalAling2->setCurrentIndex(mySettings2.textAlignmentV); ui->comboBoxHorizontalAling2->setCurrentIndex(mySettings2.textAlignmentH); + p.setColor(QPalette::Base,mySettings3.textColor); + ui->graphicViewTextColor3->setPalette(p); + ui->labelFont3->setText(getFontText(mySettings3.textFont)); + ui->comboBoxVerticalAling3->setCurrentIndex(mySettings3.textAlignmentV); + ui->comboBoxHorizontalAling3->setCurrentIndex(mySettings3.textAlignmentH); + + p.setColor(QPalette::Base,mySettings4.textColor); + ui->graphicViewTextColor4->setPalette(p); + ui->labelFont4->setText(getFontText(mySettings4.textFont)); + ui->comboBoxVerticalAling4->setCurrentIndex(mySettings4.textAlignmentV); + ui->comboBoxHorizontalAling4->setCurrentIndex(mySettings4.textAlignmentH); + + // Background Color 4 Text + // Display 1 + ui->groupBoxSongAddBKToText->setChecked(mySettings.songAddBKColorToText); + p.setColor(QPalette::Base,mySettings.songTextRecBKColor); + ui->graphicViewSongAddBKColor->setPalette(p); + + p.setColor(QPalette::Base,mySettings.songTextGenBKColor); + ui->graphicViewSongChangeGenBKColor->setPalette(p); + + // Display 2 + ui->groupBoxSongAddBKToText2->setChecked(mySettings2.songAddBKColorToText); + p.setColor(QPalette::Base,mySettings2.songTextRecBKColor); + ui->graphicViewSongAddBKColor2->setPalette(p); + + p.setColor(QPalette::Base,mySettings2.songTextGenBKColor); + ui->graphicViewSongChangeGenBKColor2->setPalette(p); + + // Display 3 + ui->groupBoxSongAddBKToText3->setChecked(mySettings3.songAddBKColorToText); + p.setColor(QPalette::Base,mySettings3.songTextRecBKColor); + ui->graphicViewSongAddBKColor3->setPalette(p); + + p.setColor(QPalette::Base,mySettings3.songTextGenBKColor); + ui->graphicViewSongChangeGenBKColor3->setPalette(p); + + // Display 4 + ui->groupBoxSongAddBKToText4->setChecked(mySettings4.songAddBKColorToText); + p.setColor(QPalette::Base,mySettings4.songTextRecBKColor); + ui->graphicViewSongAddBKColor4->setPalette(p); + + p.setColor(QPalette::Base,mySettings4.songTextGenBKColor); + ui->graphicViewSongChangeGenBKColor4->setPalette(p); + + // Set Screen Use ui->spinBoxScreenUse->setValue(mySettings.screenUse); ui->comboBoxScreenUse->setCurrentIndex(mySettings.screenPosition); @@ -181,9 +332,21 @@ void SongSettingWidget::loadSettings() ui->spinBoxScreenUse2->setValue(mySettings2.screenUse); ui->comboBoxScreenUse2->setCurrentIndex(mySettings2.screenPosition); + ui->spinBoxScreenUse3->setValue(mySettings3.screenUse); + ui->comboBoxScreenUse3->setCurrentIndex(mySettings3.screenPosition); + + ui->spinBoxScreenUse4->setValue(mySettings4.screenUse); + ui->comboBoxScreenUse4->setCurrentIndex(mySettings4.screenPosition); + // Set secondary screen - ui->groupBoxDisplay2->setChecked(mySettings2.useDisp2settings); - on_groupBoxDisplay2_toggled(mySettings2.useDisp2settings); + ui->groupBoxDisplay2->setChecked(!mySettings2.useDisp1settings); + on_groupBoxDisplay2_toggled(!mySettings2.useDisp1settings); + + ui->groupBoxDisplay3->setChecked(!mySettings3.useDisp1settings); + on_groupBoxDisplay3_toggled(!mySettings3.useDisp1settings); + + ui->groupBoxDisplay4->setChecked(!mySettings4.useDisp1settings); + on_groupBoxDisplay4_toggled(!mySettings4.useDisp1settings); } void SongSettingWidget::setDispScreen2Visible(bool visible) @@ -191,6 +354,16 @@ void SongSettingWidget::setDispScreen2Visible(bool visible) ui->groupBoxDisplay2->setVisible(visible); } +void SongSettingWidget::setDispScreen3Visible(bool visible) +{ + ui->groupBoxDisplay3->setVisible(visible); +} + +void SongSettingWidget::setDispScreen4Visible(bool visible) +{ + ui->groupBoxDisplay4->setVisible(visible); +} + void SongSettingWidget::on_checkBoxUseShadow_stateChanged(int arg1) { if(arg1==2) @@ -212,6 +385,29 @@ void SongSettingWidget::on_checkBoxUseShadow2_stateChanged(int arg1) ui->checkBoxUseBlurredShadow2->setEnabled(false); } } + +void SongSettingWidget::on_checkBoxUseShadow3_stateChanged(int arg1) +{ + if(arg1==2) + ui->checkBoxUseBlurredShadow3->setEnabled(true); + else + { + ui->checkBoxUseBlurredShadow3->setChecked(false); + ui->checkBoxUseBlurredShadow3->setEnabled(false); + } +} + +void SongSettingWidget::on_checkBoxUseShadow4_stateChanged(int arg1) +{ + if(arg1==2) + ui->checkBoxUseBlurredShadow4->setEnabled(true); + else + { + ui->checkBoxUseBlurredShadow4->setChecked(false); + ui->checkBoxUseBlurredShadow4->setEnabled(false); + } +} + void SongSettingWidget::on_toolButtonInfoColor_clicked() { QColor c(QColorDialog::getColor(mySettings.infoColor,this)); @@ -232,6 +428,26 @@ void SongSettingWidget::on_toolButtonInfoColor2_clicked() ui->graphicViewInfoColor2->setPalette(p); } +void SongSettingWidget::on_toolButtonInfoColor3_clicked() +{ + QColor c(QColorDialog::getColor(mySettings3.infoColor,this)); + if(c.isValid()) + mySettings3.infoColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings3.infoColor); + ui->graphicViewInfoColor3->setPalette(p); +} + +void SongSettingWidget::on_toolButtonInfoColor4_clicked() +{ + QColor c(QColorDialog::getColor(mySettings4.infoColor,this)); + if(c.isValid()) + mySettings4.infoColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings4.infoColor); + ui->graphicViewInfoColor4->setPalette(p); +} + void SongSettingWidget::on_toolButtonInfoFont_clicked() { bool ok; @@ -252,6 +468,26 @@ void SongSettingWidget::on_toolButtonInfoFont2_clicked() ui->labelInfoFont2->setText(getFontText(mySettings2.infoFont)); } +void SongSettingWidget::on_toolButtonInfoFont3_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings3.infoFont,this); + if(ok) + mySettings3.infoFont = font; + + ui->labelInfoFont3->setText(getFontText(mySettings3.infoFont)); +} + +void SongSettingWidget::on_toolButtonInfoFont4_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings4.infoFont,this); + if(ok) + mySettings4.infoFont = font; + + ui->labelInfoFont4->setText(getFontText(mySettings4.infoFont)); +} + void SongSettingWidget::on_toolButtonEndingColor_clicked() { QColor c(QColorDialog::getColor(mySettings.endingColor,this)); @@ -272,6 +508,26 @@ void SongSettingWidget::on_toolButtonEndingColor2_clicked() ui->graphicViewEndingColor2->setPalette(p); } +void SongSettingWidget::on_toolButtonEndingColor3_clicked() +{ + QColor c(QColorDialog::getColor(mySettings3.endingColor,this)); + if(c.isValid()) + mySettings3.endingColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings3.endingColor); + ui->graphicViewEndingColor3->setPalette(p); +} + +void SongSettingWidget::on_toolButtonEndingColor4_clicked() +{ + QColor c(QColorDialog::getColor(mySettings4.endingColor,this)); + if(c.isValid()) + mySettings4.endingColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings4.endingColor); + ui->graphicViewEndingColor4->setPalette(p); +} + void SongSettingWidget::on_toolButtonEndingFont_clicked() { bool ok; @@ -292,6 +548,26 @@ void SongSettingWidget::on_toolButtonEndingFont2_clicked() ui->labelEndingFont2->setText(getFontText(mySettings2.endingFont)); } +void SongSettingWidget::on_toolButtonEndingFont3_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings3.endingFont,this); + if(ok) + mySettings3.endingFont = font; + + ui->labelEndingFont3->setText(getFontText(mySettings3.endingFont)); +} + +void SongSettingWidget::on_toolButtonEndingFont4_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings4.endingFont,this); + if(ok) + mySettings4.endingFont = font; + + ui->labelEndingFont4->setText(getFontText(mySettings4.endingFont)); +} + void SongSettingWidget::on_buttonSongBackground_clicked() { QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for song wallpaper"), @@ -322,6 +598,36 @@ void SongSettingWidget::on_buttonSongBackground2_clicked() } } +void SongSettingWidget::on_buttonSongBackground3_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for song wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + mySettings3.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings3.backgroundName = filename; + ui->lineEditSongBackground3->setText(filename); + } +} + +void SongSettingWidget::on_buttonSongBackground4_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for song wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + mySettings4.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings4.backgroundName = filename; + ui->lineEditSongBackground4->setText(filename); + } +} + void SongSettingWidget::on_toolButtonColor_clicked() { QColor c(QColorDialog::getColor(mySettings.textColor,this)); @@ -342,6 +648,26 @@ void SongSettingWidget::on_toolButtonColor2_clicked() ui->graphicViewTextColor2->setPalette(p); } +void SongSettingWidget::on_toolButtonColor3_clicked() +{ + QColor c(QColorDialog::getColor(mySettings3.textColor,this)); + if(c.isValid()) + mySettings3.textColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings3.textColor); + ui->graphicViewTextColor3->setPalette(p); +} + +void SongSettingWidget::on_toolButtonColor4_clicked() +{ + QColor c(QColorDialog::getColor(mySettings4.textColor,this)); + if(c.isValid()) + mySettings4.textColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings4.textColor); + ui->graphicViewTextColor4->setPalette(p); +} + void SongSettingWidget::on_toolButtonFont_clicked() { bool ok; @@ -362,6 +688,229 @@ void SongSettingWidget::on_toolButtonFont2_clicked() ui->labelFont2->setText(getFontText(mySettings2.textFont)); } +void SongSettingWidget::on_toolButtonFont3_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings3.textFont,this); + if(ok) + mySettings3.textFont = font; + + ui->labelFont3->setText(getFontText(mySettings3.textFont)); +} + +void SongSettingWidget::on_toolButtonFont4_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings4.textFont,this); + if(ok) + mySettings4.textFont = font; + + ui->labelFont4->setText(getFontText(mySettings4.textFont)); +} + +void SongSettingWidget::on_groupBoxSongAddBKToText_toggled(bool arg1) +{ + QColor c(mySettings.songTextGenBKColor); + if(arg1) + { + QPixmap px(1920, 1080); + px.fill(c); + mySettings.useBackground = arg1; + mySettings.backgroundName = c.name(); + mySettings.backgroundPix = px; + ui->lineEditSongBackground->setText(c.name()); + ui->groupBoxSongBackground->setChecked(arg1); + } + else + { + mySettings.useBackground = arg1; + mySettings.backgroundName = ""; + mySettings.backgroundPix = QPixmap(1,1); + ui->groupBoxSongBackground->setChecked(arg1); + ui->lineEditSongBackground->clear(); + } +} + +void SongSettingWidget::on_groupBoxSongAddBKToText2_toggled(bool arg1) +{ + QColor c(mySettings2.songTextGenBKColor); + + if(arg1) + { + QPixmap px(1920, 1080); + px.fill(c); + mySettings2.useBackground = arg1; + mySettings2.backgroundName = c.name(); + mySettings2.backgroundPix = px; + ui->lineEditSongBackground2->setText(c.name()); + ui->groupBoxSongBackground2->setChecked(arg1); + } + else + { + mySettings2.useBackground = arg1; + mySettings2.backgroundName = ""; + mySettings2.backgroundPix = QPixmap(1,1); + ui->groupBoxSongBackground2->setChecked(arg1); + ui->lineEditSongBackground2->clear(); + } +} + +void SongSettingWidget::on_groupBoxSongAddBKToText3_toggled(bool arg1) +{ + QColor c(mySettings3.songTextGenBKColor); + + if(arg1) + { + QPixmap px(1920, 1080); + px.fill(c); + mySettings3.useBackground = arg1; + mySettings3.backgroundName = c.name(); + mySettings3.backgroundPix = px; + ui->lineEditSongBackground3->setText(c.name()); + ui->groupBoxSongBackground3->setChecked(arg1); + } + else + { + mySettings3.useBackground = arg1; + mySettings3.backgroundName = ""; + mySettings3.backgroundPix = QPixmap(1,1); + ui->groupBoxSongBackground3->setChecked(arg1); + ui->lineEditSongBackground3->clear(); + } +} + +void SongSettingWidget::on_groupBoxSongAddBKToText4_toggled(bool arg1) +{ + QColor c(mySettings4.songTextGenBKColor); + + if(arg1) + { + QPixmap px(1920, 1080); + px.fill(c); + mySettings4.useBackground = arg1; + mySettings4.backgroundName = c.name(); + mySettings4.backgroundPix = px; + ui->lineEditSongBackground4->setText(c.name()); + ui->groupBoxSongBackground4->setChecked(arg1); + } + else + { + mySettings4.useBackground = arg1; + mySettings4.backgroundName = ""; + mySettings4.backgroundPix = QPixmap(1,1); + ui->groupBoxSongBackground4->setChecked(arg1); + ui->lineEditSongBackground4->clear(); + } +} + +void SongSettingWidget::on_tBSongAddBKColorText_clicked() +{ + QColor c(QColorDialog::getColor(mySettings.songTextRecBKColor,this)); + if(c.isValid()) + mySettings.songTextRecBKColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings.songTextRecBKColor); + ui->graphicViewSongAddBKColor->setPalette(p); +} + +void SongSettingWidget::on_tBSongAddBKColorText2_clicked() +{ + QColor c(QColorDialog::getColor(mySettings2.songTextRecBKColor,this)); + if(c.isValid()) + mySettings2.songTextRecBKColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings2.songTextRecBKColor); + ui->graphicViewSongAddBKColor2->setPalette(p); +} + +void SongSettingWidget::on_tBSongAddBKColorText3_clicked() +{ + QColor c(QColorDialog::getColor(mySettings3.songTextRecBKColor,this)); + if(c.isValid()) + mySettings3.songTextRecBKColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings3.songTextRecBKColor); + ui->graphicViewSongAddBKColor3->setPalette(p); +} + +void SongSettingWidget::on_tBSongAddBKColorText4_clicked() +{ + QColor c(QColorDialog::getColor(mySettings4.songTextRecBKColor,this)); + if(c.isValid()) + mySettings4.songTextRecBKColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings4.songTextRecBKColor); + ui->graphicViewSongAddBKColor4->setPalette(p); +} + +void SongSettingWidget::on_tBSongChangeGenBKColor_clicked() +{ + QColor c(QColorDialog::getColor(mySettings.songTextGenBKColor,this)); + if(c.isValid()) + { + mySettings.songTextGenBKColor = c; + QPixmap px(1920, 1080); + px.fill(c); + mySettings.backgroundName = c.name(); + mySettings.backgroundPix = px; + ui->lineEditSongBackground->setText(c.name()); + } + QPalette p; + p.setColor(QPalette::Base,mySettings.songTextGenBKColor); + ui->graphicViewSongChangeGenBKColor->setPalette(p); +} + +void SongSettingWidget::on_tBSongChangeGenBKColor2_clicked() +{ + QColor c(QColorDialog::getColor(mySettings2.songTextGenBKColor,this)); + if(c.isValid()) + { + mySettings2.songTextGenBKColor = c; + QPixmap px(1920, 1080); + px.fill(c); + mySettings2.backgroundName = c.name(); + mySettings2.backgroundPix = px; + ui->lineEditSongBackground2->setText(c.name()); + } + QPalette p; + p.setColor(QPalette::Base,mySettings2.songTextGenBKColor); + ui->graphicViewSongChangeGenBKColor2->setPalette(p); +} + +void SongSettingWidget::on_tBSongChangeGenBKColor3_clicked() +{ + QColor c(QColorDialog::getColor(mySettings3.songTextGenBKColor,this)); + if(c.isValid()) + { + mySettings3.songTextGenBKColor = c; + QPixmap px(1920, 1080); + px.fill(c); + mySettings3.backgroundName = c.name(); + mySettings3.backgroundPix = px; + ui->lineEditSongBackground3->setText(c.name()); + } + QPalette p; + p.setColor(QPalette::Base,mySettings3.songTextGenBKColor); + ui->graphicViewSongChangeGenBKColor3->setPalette(p); +} + +void SongSettingWidget::on_tBSongChangeGenBKColor4_clicked() +{ + QColor c(QColorDialog::getColor(mySettings4.songTextGenBKColor,this)); + if(c.isValid()) + { + mySettings4.songTextGenBKColor = c; + QPixmap px(1920, 1080); + px.fill(c); + mySettings4.backgroundName = c.name(); + mySettings4.backgroundPix = px; + ui->lineEditSongBackground4->setText(c.name()); + } + QPalette p; + p.setColor(QPalette::Base,mySettings4.songTextGenBKColor); + ui->graphicViewSongChangeGenBKColor4->setPalette(p); +} + void SongSettingWidget::on_groupBoxDisplay2_toggled(bool arg1) { ui->groupBoxEffects2->setVisible(arg1); @@ -369,14 +918,39 @@ void SongSettingWidget::on_groupBoxDisplay2_toggled(bool arg1) ui->groupBoxSongEnding2->setVisible(arg1); ui->groupBoxSongInfo2->setVisible(arg1); ui->groupBoxTextProperties2->setVisible(arg1); + ui->groupBoxSongAddBKToText2->setVisible(arg1); ui->groupBoxScreenUse2->setVisible(arg1); } +void SongSettingWidget::on_groupBoxDisplay3_toggled(bool arg1) +{ + ui->groupBoxEffects3->setVisible(arg1); + ui->groupBoxSongBackground3->setVisible(arg1); + ui->groupBoxSongEnding3->setVisible(arg1); + ui->groupBoxSongInfo3->setVisible(arg1); + ui->groupBoxTextProperties3->setVisible(arg1); + ui->groupBoxSongAddBKToText3->setVisible(arg1); + ui->groupBoxScreenUse3->setVisible(arg1); +} + +void SongSettingWidget::on_groupBoxDisplay4_toggled(bool arg1) +{ + ui->groupBoxEffects4->setVisible(arg1); + ui->groupBoxSongBackground4->setVisible(arg1); + ui->groupBoxSongEnding4->setVisible(arg1); + ui->groupBoxSongInfo4->setVisible(arg1); + ui->groupBoxTextProperties4->setVisible(arg1); + ui->groupBoxSongAddBKToText4->setVisible(arg1); + ui->groupBoxScreenUse4->setVisible(arg1); +} + void SongSettingWidget::on_pushButtonDefault_clicked() { SongSettings s; mySettings = s; mySettings2 = s; + mySettings3 = s; + mySettings4 = s; loadSettings(); } @@ -407,6 +981,12 @@ void SongSettingWidget::setBackgroungds(QString name, QPixmap back) mySettings.backgroundPix = back; mySettings2.backgroundName = name; mySettings2.backgroundPix = back; + mySettings3.backgroundName = name; + mySettings3.backgroundPix = back; + mySettings4.backgroundName = name; + mySettings4.backgroundPix = back; ui->lineEditSongBackground->setText(name); ui->lineEditSongBackground2->setText(name); + ui->lineEditSongBackground3->setText(name); + ui->lineEditSongBackground4->setText(name); } diff --git a/songsettingwidget.hpp b/songsettingwidget.hpp index f81c6ee..0bbc022 100644 --- a/songsettingwidget.hpp +++ b/songsettingwidget.hpp @@ -36,9 +36,11 @@ class SongSettingWidget : public QWidget ~SongSettingWidget(); public slots: - void getSettings(SongSettings &settings, SongSettings &settings2); - void setSettings(SongSettings &settings, SongSettings &settings2); + void getSettings(SongSettings &settings, SongSettings &settings2, SongSettings &settings3, SongSettings &settings4); + void setSettings(SongSettings &settings, SongSettings &settings2, SongSettings &settings3, SongSettings &settings4); void setDispScreen2Visible(bool visible); + void setDispScreen3Visible(bool visible); + void setDispScreen4Visible(bool visible); void setBackgroungds(QString name, QPixmap back); signals: @@ -48,21 +50,51 @@ private slots: void loadSettings(); void on_checkBoxUseShadow_stateChanged(int arg1); void on_checkBoxUseShadow2_stateChanged(int arg1); + void on_checkBoxUseShadow3_stateChanged(int arg1); + void on_checkBoxUseShadow4_stateChanged(int arg1); void on_toolButtonInfoColor_clicked(); void on_toolButtonInfoColor2_clicked(); + void on_toolButtonInfoColor3_clicked(); + void on_toolButtonInfoColor4_clicked(); void on_toolButtonInfoFont_clicked(); void on_toolButtonInfoFont2_clicked(); + void on_toolButtonInfoFont3_clicked(); + void on_toolButtonInfoFont4_clicked(); void on_toolButtonEndingColor_clicked(); void on_toolButtonEndingColor2_clicked(); + void on_toolButtonEndingColor3_clicked(); + void on_toolButtonEndingColor4_clicked(); void on_toolButtonEndingFont_clicked(); void on_toolButtonEndingFont2_clicked(); + void on_toolButtonEndingFont3_clicked(); + void on_toolButtonEndingFont4_clicked(); void on_buttonSongBackground_clicked(); void on_buttonSongBackground2_clicked(); + void on_buttonSongBackground3_clicked(); + void on_buttonSongBackground4_clicked(); void on_toolButtonColor_clicked(); void on_toolButtonColor2_clicked(); + void on_toolButtonColor3_clicked(); + void on_toolButtonColor4_clicked(); void on_toolButtonFont_clicked(); void on_toolButtonFont2_clicked(); + void on_toolButtonFont3_clicked(); + void on_toolButtonFont4_clicked(); + void on_groupBoxSongAddBKToText_toggled(bool arg1); + void on_groupBoxSongAddBKToText2_toggled(bool arg1); + void on_groupBoxSongAddBKToText3_toggled(bool arg1); + void on_groupBoxSongAddBKToText4_toggled(bool arg1); + void on_tBSongAddBKColorText_clicked(); + void on_tBSongAddBKColorText2_clicked(); + void on_tBSongAddBKColorText3_clicked(); + void on_tBSongAddBKColorText4_clicked(); + void on_tBSongChangeGenBKColor_clicked(); + void on_tBSongChangeGenBKColor2_clicked(); + void on_tBSongChangeGenBKColor3_clicked(); + void on_tBSongChangeGenBKColor4_clicked(); void on_groupBoxDisplay2_toggled(bool arg1); + void on_groupBoxDisplay3_toggled(bool arg1); + void on_groupBoxDisplay4_toggled(bool arg1); void on_pushButtonDefault_clicked(); QString getFontText(QFont font); void on_pushButtonApplyToAll_clicked(); @@ -70,6 +102,8 @@ private slots: private: SongSettings mySettings; SongSettings mySettings2; + SongSettings mySettings3; + SongSettings mySettings4; Ui::SongSettingWidget *ui; protected: diff --git a/songsettingwidget.ui b/songsettingwidget.ui index 499ced2..cd2134b 100644 --- a/songsettingwidget.ui +++ b/songsettingwidget.ui @@ -7,7 +7,7 @@ 0 0 456 - 1150 + 2800 @@ -508,6 +508,145 @@ + + + + Add Background to Text + + + false + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + Add Background Color behind Text + + + + + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Change General Background Color + + + + + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + @@ -584,7 +723,7 @@ 85 0 - 127 + 0 @@ -593,7 +732,7 @@ 85 0 - 127 + 0 @@ -602,16 +741,25 @@ 85 0 - 127 + 0 - 170 - 85 - 255 + 118 + 50 + 50 + + + + + + + 85 + 0 + 0 @@ -622,7 +770,7 @@ 85 0 - 127 + 0 @@ -631,7 +779,7 @@ 85 0 - 127 + 0 @@ -640,16 +788,25 @@ 85 0 - 127 + 0 - 170 - 85 - 255 + 118 + 50 + 50 + + + + + + + 85 + 0 + 0 @@ -691,6 +848,15 @@ + + + + 85 + 0 + 127 + + + @@ -723,7 +889,7 @@ 85 0 - 127 + 0 @@ -734,7 +900,7 @@ 85 0 - 127 + 0 @@ -802,7 +968,7 @@ 85 0 - 127 + 0 @@ -813,7 +979,7 @@ 85 0 - 127 + 0 @@ -965,7 +1131,7 @@ 85 0 - 127 + 0 @@ -976,7 +1142,7 @@ 85 0 - 127 + 0 @@ -1058,7 +1224,7 @@ - + Type: @@ -1163,7 +1329,7 @@ 85 0 - 127 + 0 @@ -1174,7 +1340,7 @@ 85 0 - 127 + 0 @@ -1226,7 +1392,7 @@ 85 0 - 127 + 0 @@ -1237,7 +1403,7 @@ 85 0 - 127 + 0 @@ -1385,7 +1551,7 @@ - + @@ -1394,7 +1560,7 @@ 85 0 - 127 + 0 @@ -1405,7 +1571,7 @@ 85 0 - 127 + 0 @@ -1424,58 +1590,237 @@ - Amount Of Screen To Use + Add Background to Text - + + false + + + true + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + - + - Vertical Screen Use + Add Background Color behind Text - - - Percent of screen to be used. - - - % - - - 100 + + + 0 - + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - + - Position: + Change General Background Color - - - Select to use either top portion of the screen or bottom. + + + 0 - - Top of Screen - + + + Color... + + - - Bottom of Screen - + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + - + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - - Qt::Horizontal - + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Amount Of Screen To Use + + + + + + Vertical Screen Use + + + + + + + Percent of screen to be used. + + + % + + + 100 + + + + + + + Position: + + + + + + + Select to use either top portion of the screen or bottom. + + + + Top of Screen + + + + + Bottom of Screen + + + + + + + + Qt::Horizontal + 110 @@ -1490,6 +1835,2509 @@ + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 0 + 120 + 215 + + + + + + + 0 + 0 + 0 + + + + + + + + Use Separate Tertiary Display Screen Settings + + + true + + + true + + + + 6 + + + 0 + + + 9 + + + 0 + + + 0 + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Effects + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + Use fading effects + + + + + + + Use shadow + + + + + + + false + + + Use blurred shadow + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Song Information + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + 0 + + + 0 + + + + + Show Stanza Title + + + + + + + Show Song Key + + + + + + + Show Song Number + + + + + + + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + + + + + + + + + 0 + + + 0 + + + + + Alignment: + + + + + + + + 85 + 0 + + + + + Above Text + + + + + Below Text + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Show Song Ending + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + + + + + + + + + 0 + + + 0 + + + + + Type: + + + + + + + + 126 + 0 + + + + + * * * + + + + + - - - + + + + + ° ° ° + + + + + • • • + + + + + ● ● ● + + + + + ▪ ▪ ▪ + + + + + ■ ■ ■ + + + + + Song Copyright Info + + + + + + + + Position: + + + + + + + + 112 + 0 + + + + + Below Song Text + + + + + Bottom of Screen + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Use Background Image + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + + + + Browse... + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Song Text Properties + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + + + + + + + + + 0 + + + 0 + + + + + Alignment: + + + + + + + + 63 + 0 + + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + 62 + 0 + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Add Background to Text + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + Add Background Color behind Text + + + + + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Change General Background Color + + + + + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Amount Of Screen To Use + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + Vertical Screen Use + + + + + + + + 56 + 0 + + + + % + + + 100 + + + + + + + Position: + + + + + + + + 112 + 0 + + + + + Top of Screen + + + + + Bottom of Screen + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 85 + 0 + 0 + + + + + + + 118 + 50 + 50 + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 0 + 120 + 215 + + + + + + + 0 + 0 + 0 + + + + + + + + Use Separate Quaternary Display Screen Settings + + + true + + + true + + + + 0 + + + 9 + + + 0 + + + 0 + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Effects + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + Use fading effects + + + + + + + Use shadow + + + + + + + false + + + Use blurred shadow + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Song Information + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + 0 + + + 0 + + + + + Show Stanza Title + + + + + + + Show Song Key + + + + + + + Show Song Number + + + + + + + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + + + + + + + + + 0 + + + 0 + + + + + Alignment: + + + + + + + + 85 + 0 + + + + + Above Text + + + + + Below Text + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Show Song Ending + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + + + + + + + + + 0 + + + 0 + + + + + Type: + + + + + + + + 126 + 0 + + + + + * * * + + + + + - - - + + + + + ° ° ° + + + + + • • • + + + + + ● ● ● + + + + + ▪ ▪ ▪ + + + + + ■ ■ ■ + + + + + Song Copyright Info + + + + + + + + Position: + + + + + + + + 112 + 0 + + + + + Below Song Text + + + + + Bottom of Screen + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Use Background Image + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + + + + Browse... + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Song Text Properties + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + + + + + + + + + 0 + + + 0 + + + + + Alignment: + + + + + + + + 63 + 0 + + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + 62 + 0 + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Add Background to Text + + + true + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + Add Background Color behind Text + + + + + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Change General Background Color + + + + + + + 0 + + + 0 + + + + + Color... + + + + + + + + 0 + 0 + + + + + 20 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 85 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Amount Of Screen To Use + + + + 9 + + + 9 + + + 9 + + + 9 + + + + + Vertical Screen Use + + + + + + + + 56 + 0 + + + + % + + + 100 + + + + + + + Position: + + + + + + + + 112 + 0 + + + + + Top of Screen + + + + + Bottom of Screen + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + diff --git a/songwidget.ui b/songwidget.ui index b9be48c..e076e4b 100644 --- a/songwidget.ui +++ b/songwidget.ui @@ -278,7 +278,7 @@ false - 26 + 20 diff --git a/theme.cpp b/theme.cpp index 8f9e936..81a851e 100644 --- a/theme.cpp +++ b/theme.cpp @@ -24,7 +24,7 @@ PassiveSettings::PassiveSettings() useBackground = false; backgroundName = ""; backgroundPix = QPixmap(); - useDisp2settings = false; + useDisp1settings = false; } BibleSettings::BibleSettings() @@ -47,7 +47,7 @@ BibleSettings::BibleSettings() useAbbriviation = false; screenUse = 100; screenPosition = 1; - useDisp2settings = false; + useDisp1settings = false; } SongSettings::SongSettings() @@ -76,7 +76,7 @@ SongSettings::SongSettings() textAlignmentH = 1; screenUse = 100; screenPositon = 1; - useDisp2settings = false; + useDisp1settings = false; } AnnounceSettings::AnnounceSettings() @@ -92,7 +92,7 @@ AnnounceSettings::AnnounceSettings() textColor = QColor(Qt::white); textAlignmentV = 0; textAlignmentH = 1; - useDisp2settings = false; + useDisp1settings = false; } */ ThemeInfo::ThemeInfo() @@ -124,8 +124,12 @@ void Theme::saveThemeNew() m_info.themeId = sq.value(0).toInt(); savePassiveNew(1,passive); savePassiveNew(2,passive2); + savePassiveNew(3,passive3); + savePassiveNew(4,passive4); saveBibleNew(1,bible); saveBibleNew(2,bible2); + saveBibleNew(3,bible3); + saveBibleNew(4,bible4); saveSongNew(1,song); saveSongNew(2,song2); saveAnnounceNew(1,announce); @@ -135,14 +139,14 @@ void Theme::saveThemeNew() void Theme::savePassiveNew(int screen, TextSettings &settings) { QSqlQuery sq; - sq.prepare("INSERT INTO ThemePassive (theme_id, disp, use_background, background_name, background, use_disp_2) " + sq.prepare("INSERT INTO ThemePassive (theme_id, disp, use_background, background_name, background, use_disp_1) " "VALUES(?,?,?,?,?,?)"); sq.addBindValue(m_info.themeId); sq.addBindValue(screen); sq.addBindValue(settings.useBackground); sq.addBindValue(settings.backgroundName); sq.addBindValue(pixToByte(settings.backgroundPix)); - sq.addBindValue(settings.useDisp2settings); + sq.addBindValue(settings.useDisp1settings); sq.exec(); } @@ -151,8 +155,9 @@ void Theme::saveBibleNew(int screen, BibleSettings &settings) QSqlQuery sq; sq.prepare("INSERT INTO ThemeBible (theme_id, disp, use_shadow, use_fading, use_blur_shadow, use_background, " "background_name, background, text_font, text_color, text_align_v, text_align_h, caption_font, " - "caption_color, caption_align, caption_position, use_abbr, screen_use, screen_position, use_disp_2) " - "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + "caption_color, caption_align, caption_position, use_abbr, screen_use, screen_position, use_disp_1, " + "add_background_color_to_text, text_rec_background_color, text_gen_background_color) " + "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); sq.addBindValue(m_info.themeId); sq.addBindValue(screen); sq.addBindValue(settings.useShadow); @@ -172,7 +177,10 @@ void Theme::saveBibleNew(int screen, BibleSettings &settings) sq.addBindValue(settings.useAbbriviation); sq.addBindValue(settings.screenUse); sq.addBindValue(settings.screenPosition); - sq.addBindValue(settings.useDisp2settings); + sq.addBindValue(settings.useDisp1settings); + sq.addBindValue(settings.bibleAddBKColorToText); + sq.addBindValue((unsigned int)(settings.bibleTextRecBKColor.rgb())); + sq.addBindValue((unsigned int)(settings.bibleTextGenBKColor.rgb())); sq.exec(); } @@ -182,8 +190,9 @@ void Theme::saveSongNew(int screen, SongSettings &settings) sq.prepare("INSERT INTO ThemeSong (theme_id, disp, use_shadow, use_fading, use_blur_shadow, show_stanza_title, " "show_key, show_number, info_color, info_font, info_align, show_song_ending, ending_color, ending_font, " "ending_type, ending_position, use_background, background_name, background, text_font, text_color, " - "text_align_v, text_align_h, screen_use, screen_position, use_disp_2) " - "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + "text_align_v, text_align_h, screen_use, screen_position, use_disp_1, " + "add_background_color_to_text, text_rec_background_color, text_gen_background_color) " + "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); sq.addBindValue(m_info.themeId); sq.addBindValue(screen); sq.addBindValue(settings.useShadow); @@ -209,7 +218,10 @@ void Theme::saveSongNew(int screen, SongSettings &settings) sq.addBindValue(settings.textAlignmentH); sq.addBindValue(settings.screenUse); sq.addBindValue(settings.screenPosition); - sq.addBindValue(settings.useDisp2settings); + sq.addBindValue(settings.useDisp1settings); + sq.addBindValue(settings.songAddBKColorToText); + sq.addBindValue((unsigned int)(settings.songTextRecBKColor.rgb())); + sq.addBindValue((unsigned int)(settings.songTextGenBKColor.rgb())); sq.exec(); } @@ -217,7 +229,7 @@ void Theme::saveAnnounceNew(int screen, TextSettings &settings) { QSqlQuery sq; sq.prepare("INSERT INTO ThemeAnnounce (theme_id, disp, use_shadow, use_fading, use_blur_shadow, use_background, " - "background_name, background, text_font, text_color, text_align_v, text_align_h, use_disp_2) " + "background_name, background, text_font, text_color, text_align_v, text_align_h, use_disp_1) " "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)"); sq.addBindValue(m_info.themeId); sq.addBindValue(screen); @@ -231,7 +243,7 @@ void Theme::saveAnnounceNew(int screen, TextSettings &settings) sq.addBindValue(settings.textColor.rgb()); sq.addBindValue(settings.textAlignmentV); sq.addBindValue(settings.textAlignmentH); - sq.addBindValue(settings.useDisp2settings); + sq.addBindValue(settings.useDisp1settings); sq.exec(); } @@ -246,23 +258,31 @@ void Theme::saveThemeUpdate() savePassiveUpdate(1,passive); savePassiveUpdate(2,passive2); + savePassiveUpdate(3,passive3); + savePassiveUpdate(4,passive4); saveBibleUpdate(1,bible); saveBibleUpdate(2,bible2); + saveBibleUpdate(3,bible3); + saveBibleUpdate(4,bible4); saveSongUpdate(1,song); saveSongUpdate(2,song2); + saveSongUpdate(3,song3); + saveSongUpdate(4,song4); saveAnnounceUpdate(1,announce); saveAnnounceUpdate(2,announce2); + saveAnnounceUpdate(3,announce3); + saveAnnounceUpdate(4,announce4); } void Theme::savePassiveUpdate(int screen, TextSettings &settings) { QSqlQuery sq; - sq.prepare("UPDATE ThemePassive SET use_background = ?, background_name = ?, background = ?, use_disp_2 = ? " + sq.prepare("UPDATE ThemePassive SET use_background = ?, background_name = ?, background = ?, use_disp_1 = ? " "WHERE theme_id = ? AND disp = ?"); sq.addBindValue(settings.useBackground); sq.addBindValue(settings.backgroundName); sq.addBindValue(pixToByte(settings.backgroundPix)); - sq.addBindValue(settings.useDisp2settings); + sq.addBindValue(settings.useDisp1settings); sq.addBindValue(m_info.themeId); sq.addBindValue(screen); sq.exec(); @@ -275,7 +295,8 @@ void Theme::saveBibleUpdate(int screen, BibleSettings &settings) sq.prepare("UPDATE ThemeBible SET use_shadow = ?, use_fading = ?, use_blur_shadow = ?, " "use_background = ?, background_name = ?, background = ?, text_font = ?, text_color = ?, text_align_v = ?, " "text_align_h = ?, caption_font = ?, caption_color = ?, caption_align = ?, caption_position = ?, " - "use_abbr = ?, screen_use = ?, screen_position = ?, use_disp_2 = ? " + "use_abbr = ?, screen_use = ?, screen_position = ?, use_disp_1 = ?, " + "add_background_color_to_text = ?, text_rec_background_color = ?, text_gen_background_color = ? " "WHERE theme_id = ? AND disp = ?"); sq.addBindValue(settings.useShadow); sq.addBindValue(settings.useFading); @@ -294,7 +315,10 @@ void Theme::saveBibleUpdate(int screen, BibleSettings &settings) sq.addBindValue(settings.useAbbriviation); sq.addBindValue(settings.screenUse); sq.addBindValue(settings.screenPosition); - sq.addBindValue(settings.useDisp2settings); + sq.addBindValue(settings.useDisp1settings); + sq.addBindValue(settings.bibleAddBKColorToText); + sq.addBindValue((unsigned int)(settings.bibleTextRecBKColor.rgb())); + sq.addBindValue((unsigned int)(settings.bibleTextGenBKColor.rgb())); sq.addBindValue(m_info.themeId); sq.addBindValue(screen); sq.exec(); @@ -307,7 +331,8 @@ void Theme::saveSongUpdate(int screen, SongSettings &settings) "show_stanza_title = ?, show_key = ?, show_number = ?, info_color = ?, info_font = ?, info_align = ?, " "show_song_ending = ?, ending_color = ?, ending_font = ?, ending_type = ?, ending_position = ?, " "use_background = ?, background_name = ?, background = ?, text_font = ?, text_color = ?, text_align_v = ?, " - "text_align_h = ?, screen_use = ?, screen_position = ?, use_disp_2 = ? " + "text_align_h = ?, screen_use = ?, screen_position = ?, use_disp_1 = ?, " + "add_background_color_to_text = ?, text_rec_background_color = ?, text_gen_background_color = ? " "WHERE theme_id = ? AND disp = ?"); sq.addBindValue(settings.useShadow); sq.addBindValue(settings.useFading); @@ -332,7 +357,10 @@ void Theme::saveSongUpdate(int screen, SongSettings &settings) sq.addBindValue(settings.textAlignmentH); sq.addBindValue(settings.screenUse); sq.addBindValue(settings.screenPosition); - sq.addBindValue(settings.useDisp2settings); + sq.addBindValue(settings.useDisp1settings); + sq.addBindValue(settings.songAddBKColorToText); + sq.addBindValue((unsigned int)(settings.songTextRecBKColor.rgb())); + sq.addBindValue((unsigned int)(settings.songTextGenBKColor.rgb())); sq.addBindValue(m_info.themeId); sq.addBindValue(screen); sq.exec(); @@ -343,7 +371,7 @@ void Theme::saveAnnounceUpdate(int screen, TextSettings &settings) QSqlQuery sq; sq.prepare("UPDATE ThemeAnnounce SET use_shadow = ?, use_fading = ?, use_blur_shadow = ?, " "use_background = ?, background_name = ?, background = ?, text_font = ?, text_color = ?, " - "text_align_v = ?, text_align_h = ?, use_disp_2 = ? " + "text_align_v = ?, text_align_h = ?, use_disp_1 = ? " "WHERE theme_id = ? AND disp = ?"); sq.addBindValue(settings.useShadow); sq.addBindValue(settings.useFading); @@ -355,7 +383,7 @@ void Theme::saveAnnounceUpdate(int screen, TextSettings &settings) sq.addBindValue(settings.textColor.rgb()); sq.addBindValue(settings.textAlignmentV); sq.addBindValue(settings.textAlignmentH); - sq.addBindValue(settings.useDisp2settings); + sq.addBindValue(settings.useDisp1settings); sq.addBindValue(m_info.themeId); sq.addBindValue(screen); sq.exec(); @@ -399,8 +427,12 @@ void Theme::loadTheme() { loadPassive(1,passive); loadPassive(2,passive2); + loadPassive(3,passive3); + loadPassive(4,passive4); loadBible(1,bible); loadBible(2,bible2); + loadBible(3,bible3); + loadBible(4,bible4); loadSong(1,song); loadSong(2,song2); loadAnnounce(1,announce); @@ -418,7 +450,7 @@ void Theme::loadPassive(int screen, TextSettings &settings) settings.useBackground = sr.field("use_background").value().toBool(); settings.backgroundName = sr.field("background_name").value().toString(); settings.backgroundPix.loadFromData(sr.field("background").value().toByteArray()); - settings.useDisp2settings = sr.field("use_disp_2").value().toBool(); + settings.useDisp1settings = sr.field("use_disp_1").value().toBool(); } void Theme::loadBible(int screen, BibleSettings &settings) @@ -445,7 +477,10 @@ void Theme::loadBible(int screen, BibleSettings &settings) settings.useAbbriviation = sr.field("use_abbr").value().toBool(); settings.screenUse = sr.field("screen_use").value().toInt(); settings.screenPosition = sr.field("screen_position").value().toInt(); - settings.useDisp2settings = sr.field("use_disp_2").value().toBool(); + settings.useDisp1settings = sr.field("use_disp_1").value().toBool(); + settings.bibleAddBKColorToText = sr.field("add_background_color_to_text").value().toBool(); + settings.bibleTextRecBKColor = QColor::fromRgb(sr.field("text_rec_background_color").value().toUInt()); + settings.bibleTextGenBKColor = QColor::fromRgb(sr.field("text_gen_background_color").value().toUInt()); } void Theme::loadSong(int screen, SongSettings &settings) @@ -478,7 +513,10 @@ void Theme::loadSong(int screen, SongSettings &settings) settings.textAlignmentH = sr.field("text_align_h").value().toInt(); settings.screenUse = sr.field("screen_use").value().toInt(); settings.screenPosition = sr.field("screen_position").value().toInt(); - settings.useDisp2settings = sr.field("use_disp_2").value().toBool(); + settings.useDisp1settings = sr.field("use_disp_1").value().toBool(); + settings.songAddBKColorToText = sr.field("add_background_color_to_text").value().toBool(); + settings.songTextRecBKColor = QColor::fromRgb(sr.field("text_rec_background_color").value().toUInt()); + settings.songTextGenBKColor = QColor::fromRgb(sr.field("text_gen_background_color").value().toUInt()); } void Theme::loadAnnounce(int screen, TextSettings &settings) @@ -498,7 +536,7 @@ void Theme::loadAnnounce(int screen, TextSettings &settings) settings.textColor = QColor::fromRgb(sr.field("text_color").value().toUInt()); settings.textAlignmentV = sr.field("text_align_v").value().toInt(); settings.textAlignmentH = sr.field("text_align_h").value().toInt(); - settings.useDisp2settings = sr.field("use_disp_2").value().toBool(); + settings.useDisp1settings = sr.field("use_disp_1").value().toBool(); } void Theme::setThemeInfo(ThemeInfo info) diff --git a/theme.hpp b/theme.hpp index 5afe937..7c0fa82 100644 --- a/theme.hpp +++ b/theme.hpp @@ -128,12 +128,20 @@ class Theme TextSettingsBase common2; // Holds secondary display screen settings TextSettings passive; TextSettings passive2; // Holds secondary display screen settings + TextSettings passive3; + TextSettings passive4; // Holds fourth display screen settings BibleSettings bible; BibleSettings bible2; // Holds secondary display screen settings + BibleSettings bible3; + BibleSettings bible4; // Holds fourth display screen settings SongSettings song; SongSettings song2; // Holds secondary display screen settings + SongSettings song3; + SongSettings song4; // Holds fourth display screen settings TextSettings announce; TextSettings announce2; // Holds secondary display screen settings + TextSettings announce3; + TextSettings announce4; // Holds fourth display screen settings public slots: void saveThemeNew(); From afca67309a4ee10e74c6d0f89144339406648bc1 Mon Sep 17 00:00:00 2001 From: ItsSK Date: Thu, 7 Apr 2022 07:47:21 -0700 Subject: [PATCH 2/3] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a667d5..c5c3d78 100644 --- a/README.md +++ b/README.md @@ -1 +1,5 @@ -# softprojector \ No newline at end of file +# softprojector + +To compile the code, build your project in IDE of your choice, copy the EXE it produces to a folder. +Run the following command to compile the EXE into runnable project (Make sure you download windeployqt compiler) +.\windeployqt.exe --qmldir "" "" From a89d22c2f35d608b5047666de0f81e4ff7a56d57 Mon Sep 17 00:00:00 2001 From: ItsSK Date: Thu, 7 Apr 2022 07:50:27 -0700 Subject: [PATCH 3/3] Update README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c5c3d78..f14670b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # softprojector -To compile the code, build your project in IDE of your choice, copy the EXE it produces to a folder. -Run the following command to compile the EXE into runnable project (Make sure you download windeployqt compiler) +> To compile the code, build your project in IDE of your choice, copy the EXE it produces to a folder. +> Run the following command to compile the EXE into runnable project (Make sure you download windeployqt compiler) + +``` .\windeployqt.exe --qmldir "" "" +```