diff --git a/DisplayArea.qml b/DisplayArea.qml new file mode 100644 index 0000000..533028b --- /dev/null +++ b/DisplayArea.qml @@ -0,0 +1,670 @@ +import QtQuick 2.2 +import QtMultimedia 5.0 + +Rectangle { + id: dispArea + visible: true + color: "#000000" + anchors.fill: parent + + property int mx: 0 + property int my: 0 + property int mTox: 0 + property int mToy: 0 + + property int rotation1:0 + property int rotation2:0 + + property int tranTime: 500 + + MediaPlayer + { + id: player + objectName: "player" + autoPlay: false + onSourceChanged: console.debug(player.source) + + } + + VideoOutput + { + id: vidOut + objectName: "vidOut" + source:player + anchors.fill: parent +// fillMode: VideoOutput.Stretch + } + + Image + { + id: backImage1 + objectName: "backImage1" +// anchors.fill: parent + cache: false +// transform: Rotation +// { +// id: rotBack1 +// angle: 0 +// axis {x:0; y:0; z:0} +// origin {x:backImage1/2; y:backImage1/2} +// } + } + + Image + { + id: backImage2 + objectName: "backImage2" +// anchors.fill: parent + cache: false +// transform: Rotation +// { +// id: rotBack2 +// angle: rotation1 +// axis {x:0; y:0; z:0} +// origin {x:backImage2/2; y:backImage2/2} +// } + } + + Image + { + id: textImage1 + objectName: "textImage1" +// anchors.fill: parent +// fillMode: Image.Stretch +// anchors.centerIn: parent + cache: false +// transform: Rotation +// { +// id: rotText1 +// angle: 0 +// axis {x:0; y:0; z:0} +// origin {x:textImage1/2; y:textImage1/2} +// } + } + + Image + { + id: textImage2 + objectName: "textImage2" +// anchors.fill: parent +// fillMode: Image.Stretch +// anchors.centerIn: parent + cache: false +// transform: Rotation +// { +// id: rotText2 +// angle: rotation2 +// axis {x:0; y:0; z:0} +// origin {x:textImage2/2; y:textImage2/2} +// } + } + + Rectangle + { + id: controls + objectName: "controls" +// opacity: 0.5 + color: "#00000000" + height: 128 + width: height*3 +20 + + x:20; y:20 + + Image + { + id: prevBtn + objectName: "prevBtn" + source: "qrc:/icons/icons/controlPrev.png" + width: parent.height; height: parent.height + + MouseArea + { + id: maPrev + anchors.fill: parent + hoverEnabled: true + onHoveredChanged: + { + if(maPrev.containsMouse) + prevBtn.source = "qrc:/icons/icons/controlPrevHovered.png" + else + prevBtn.source= "qrc:/icons/icons/controlPrev.png" + } + onPressed: + { + prevBtn.source = "qrc:/icons/icons/controlPrevPressed.png" + } + onReleased: + { + prevBtn.source = "qrc:/icons/icons/controlPrevHovered.png" + } + } + } + + Image + { + id: nextBtn + objectName: "nextBtn" + source: "qrc:/icons/icons/controlNext.png" + width: prevBtn.width; height: prevBtn.height + anchors.left: prevBtn.right + anchors.leftMargin: 10 + anchors.top: prevBtn.top + opacity: prevBtn.opacity + MouseArea + { + id: maNext + anchors.fill: parent + hoverEnabled: true + onHoveredChanged: + { + if(maNext.containsMouse) + nextBtn.source = "qrc:/icons/icons/controlNextHovered.png" + else + nextBtn.source= "qrc:/icons/icons/controlNext.png" + } + onPressed: + { + nextBtn.source = "qrc:/icons/icons/controlNextPressed.png" + } + onReleased: + { + nextBtn.source = "qrc:/icons/icons/controlNextHovered.png" + } + } + } + + Image + { + id: exitBtn + objectName: "exitBtn" + source: "qrc:/icons/icons/controlExit.png" + width: prevBtn.width; height: prevBtn.height + anchors.left: nextBtn.right + anchors.leftMargin: 10 + anchors.top: prevBtn.top + opacity: prevBtn.opacity + MouseArea + { + id: maExit + anchors.fill: parent + hoverEnabled: true + onHoveredChanged: + { + if(maExit.containsMouse) + exitBtn.source = "qrc:/icons/icons/controlExitHovered.png" + else + exitBtn.source= "qrc:/icons/icons/controlExit.png" + } + onPressed: + { + exitBtn.source = "qrc:/icons/icons/controlExitPressed.png" + } + onReleased: + { + exitBtn.source = "qrc:/icons/icons/controlExitHovered.png" + } + } + } + } + + SequentialAnimation + { + id:seqFade1to2 + running: false + NumberAnimation { target: textImage1; property: "opacity"; to: 0.0; duration: tranTime/2;} + NumberAnimation { target: textImage2; property: "opacity"; to: 1.0; duration: tranTime/2;} + } + + SequentialAnimation + { + id:seqFade2to1 + running: false + NumberAnimation { target: textImage2; property: "opacity"; to: 0.0; duration: tranTime/2;} + NumberAnimation { target: textImage1; property: "opacity"; to: 1.0; duration: tranTime/2;} + } + + ParallelAnimation + { + id:parFade1to2 + running: false + NumberAnimation { target: textImage1; property: "opacity"; to: 0.0; duration: tranTime;} + NumberAnimation { target: textImage2; property: "opacity"; to: 1.0; duration: tranTime;} + } + + ParallelAnimation + { + id:parFade2to1 + running: false + NumberAnimation { target: textImage1; property: "opacity"; to: 1.0; duration: tranTime;} + NumberAnimation { target: textImage2; property: "opacity"; to: 0.0; duration: tranTime;} + } + + ParallelAnimation + { + id:parBackFade1to2 + running: false + NumberAnimation { target: backImage1; property: "opacity"; to: 0.0; duration: tranTime;} + NumberAnimation { target: backImage2; property: "opacity"; to: 1.0; duration: tranTime;} + } + + ParallelAnimation + { + id:parBackFade2to1 + running: false + NumberAnimation { target: backImage1; property: "opacity"; to: 1.0; duration: tranTime;} + NumberAnimation { target: backImage2; property: "opacity"; to: 0.0; duration: tranTime;} + } + + ParallelAnimation + { + id:moveTextX1to2 + running:false + NumberAnimation { target: textImage1; property: "x"; to: mTox; duration: tranTime;} + NumberAnimation { target: textImage2; property: "x"; to: mx; duration: tranTime;} + } + + ParallelAnimation + { + id:moveTextX2to1 + running:false + NumberAnimation { target: textImage1; property: "x"; to: mx; duration: tranTime;} + NumberAnimation { target: textImage2; property: "x"; to: mTox; duration: tranTime;} + } + + ParallelAnimation + { + id:moveTextY1to2 + running:false + NumberAnimation { target: textImage1; property: "y"; to: mToy; duration: tranTime;} + NumberAnimation { target: textImage2; property: "y"; to: my; duration: tranTime;} + } + + ParallelAnimation + { + id:moveTextY2to1 + running:false + NumberAnimation { target: textImage1; property: "y"; to: my; duration: tranTime;} + NumberAnimation { target: textImage2; property: "y"; to: mToy; duration: tranTime;} + } + + ParallelAnimation + { + id:moveBackX1to2 + running:false + NumberAnimation { target: backImage1; property: "x"; to: mTox; duration: tranTime;} + NumberAnimation { target: backImage2; property: "x"; to: mx; duration: tranTime;} + } + + ParallelAnimation + { + id:moveBackX2to1 + running:false + NumberAnimation { target: backImage1; property: "x"; to: mx; duration: tranTime;} + NumberAnimation { target: backImage2; property: "x"; to: mTox; duration: tranTime;} + } + + ParallelAnimation + { + id:moveBackY1to2 + running:false + NumberAnimation { target: backImage1; property: "y"; to: mToy; duration: tranTime;} + NumberAnimation { target: backImage2; property: "y"; to: my; duration: tranTime;} + } + + ParallelAnimation + { + id:moveBackY2to1 + running:false + NumberAnimation { target: backImage1; property: "y"; to: my; duration: tranTime;} + NumberAnimation { target: backImage2; property: "y"; to: mToy; duration: tranTime;} + } + + SequentialAnimation + { + id:rotate1to2 + running: false +// NumberAnimation{ target: rotText1; property: "angle"; from:0; to:90; duration: 250} +// NumberAnimation{ target: rotText2; property: "angle"; from:270; to:360; duration: 250} + + NumberAnimation{ target: dispArea; properties: "rotation1"; from:0; to:90; duration: 1000} + NumberAnimation{ target: dispArea; properties: "rotation2"; from:270; to:360; duration: 1000} + } + + SequentialAnimation + { + id:rotate2to1 + running: false +// NumberAnimation{ target: rotText2; property: "angle"; from:0; to:90; duration: 250} +// NumberAnimation{ target: rotText1; property: "angle"; from:270; to:360; duration: 250} + NumberAnimation{ target: dispArea; properties: "rotation2"; from:0; to:90; duration: 1000} + NumberAnimation{ target: dispArea; properties: "rotation1"; from:270; to:360; duration: 1000} + } + + function stopTransitions() + { + seqFade1to2.stop() + seqFade2to1.stop() + parFade1to2.stop() + parFade2to1.stop() + parBackFade1to2.stop() + parBackFade2to1.stop() + } + + function transitionText1to2(tranType) + { + if(tranType === 1) + { + textImage2.opacity = 0.0 + parFade1to2.start() + } + else if(tranType === 2) + { + textImage2.opacity = 0.0 + seqFade1to2.start() + } + else if(tranType === 3) + { + mTox = mx + parent.width + textImage1.y = my + textImage1.x = mx + textImage2.y = my + textImage2.x = mx - parent.width + textImage1.opacity = 1.0 + textImage2.opacity = 1.0 + moveTextX1to2.start() + } + else if(tranType === 4) + { + mTox = mx - parent.width + textImage1.y = my + textImage1.x = mx + textImage2.y = my + textImage2.x = mx + parent.width + textImage1.opacity = 1.0 + textImage2.opacity = 1.0 + moveTextX1to2.start() + } + else if(tranType === 5) + { + mToy = my - parent.height + textImage1.y = my + textImage1.x = mx + textImage2.y = my + parent.height + textImage2.x = mx + textImage1.opacity = 1.0 + textImage2.opacity = 1.0 + moveTextY1to2.start() + } + else if(tranType === 6) + { + mToy = my + parent.height + textImage1.y = my + textImage1.x = mx + textImage2.y = my - parent.height + textImage2.x = mx + textImage1.opacity = 1.0 + textImage2.opacity = 1.0 + moveTextY1to2.start() + } + else if(tranType === "rotate") + { + rotText1.axis.x = 0 + rotText1.axis.y = 1 + rotText2.axis.x = 0 + rotText2.axis.y = 1 + textImage1.opacity = 1.0 + textImage2.opacity = 1.0 + rotate1to2.start() + } + else + { + textImage1.opacity = 0.0 + textImage2.opacity = 1.0 + textImage1.x = parent.x + textImage1.y = parent.y + textImage2.x = parent.x + textImage2.y = parent.y + } + } + + function transitionText2to1(tranType) + { + if(tranType === 1) + { + textImage1.opacity = 0.0 + parFade2to1.start() + } + else if(tranType === 2) + { + textImage1.opacity = 0.0 + seqFade2to1.start() + } + else if(tranType === 3) + { + mTox = mx + parent.width + textImage1.y = my + textImage1.x = mx - parent.width + textImage2.y = my + textImage2.x = mx + textImage1.opacity = 1.0 + textImage2.opacity = 1.0 + moveTextX2to1.start() + } + else if(tranType === 4) + { + mTox = mx - parent.width + textImage1.y = my + textImage1.x = mx + parent.width + textImage2.y = my + textImage2.x = mx + textImage1.opacity = 1.0 + textImage2.opacity = 1.0 + moveTextX2to1.start() + } + else if(tranType === 5) + { + mToy = my - parent.height + textImage1.y = my + parent.height + textImage1.x = mx + textImage2.y = my + textImage2.x = mx + textImage1.opacity = 1.0 + textImage2.opacity = 1.0 + moveTextY2to1.start() + } + else if(tranType === 6) + { + mToy = my + parent.height + textImage1.y = my - parent.height + textImage1.x = mx + textImage2.y = my + textImage2.x = mx + textImage1.opacity = 1.0 + textImage2.opacity = 1.0 + moveTextY2to1.start() + } + else if(tranType === "rotate") + { + rotText1.axis.x = 0 + rotText1.axis.y = 1 + rotText2.axis.x = 0 + rotText2.axis.y = 1 + textImage1.opacity = 1.0 + textImage2.opacity = 1.0 + rotate2to1.start() + } + else + { + textImage1.opacity = 1.0 + textImage2.opacity = 0.0 + textImage1.x = parent.x + textImage1.y = parent.y + textImage2.x = parent.x + textImage2.y = parent.y + } + } + + function transitionBack1to2(tranType) + { + if(tranType === 1 || tranType === 2) + { + backImage2.opacity = 0.0 + parBackFade1to2.start() + } + else if(tranType === 3) + { + mTox = mx + parent.width + backImage1.y = my + backImage1.x = mx + backImage2.y = my + backImage2.x = mx - parent.width + backImage1.opacity = 1.0 + backImage2.opacity = 1.0 + moveBackX1to2.start() + } + else if(tranType === 4) + { + mTox = mx - parent.width + backImage1.y = my + backImage1.x = mx + backImage2.y = my + backImage2.x = mx + parent.width + backImage1.opacity = 1.0 + backImage2.opacity = 1.0 + moveBackX1to2.start() + } + else if(tranType === 5) + { + mToy = my - parent.height + backImage1.y = my + backImage1.x = mx + backImage2.y = my + parent.height + backImage2.x = mx + backImage1.opacity = 1.0 + backImage2.opacity = 1.0 + moveBackY1to2.start() + } + else if(tranType === 6) + { + mToy = my + parent.height + backImage1.y = my + backImage1.x = mx + backImage2.y = my - parent.height + backImage2.x = mx + backImage1.opacity = 1.0 + backImage2.opacity = 1.0 + moveBackY1to2.start() + } + else + { + backImage1.opacity = 0.0 + backImage2.opacity = 1.0 + backImage1.x = parent.x + backImage1.y = parent.y + backImage2.x = parent.x + backImage2.y = parent.y + } + } + + function transitionBack2to1(tranType) + { + if(tranType === 1 || tranType === 2) + { + backImage1.opacity = 0.0 + parBackFade2to1.start() + } + else if(tranType === 3) + { + mTox = mx + parent.width + backImage1.y = my + backImage1.x = mx - parent.width + backImage2.y = my + backImage2.x = mx + backImage1.opacity = 1.0 + backImage2.opacity = 1.0 + moveBackX2to1.start() + } + else if(tranType === 4) + { + mTox = mx - parent.width + backImage1.y = my + backImage1.x = mx + parent.width + backImage2.y = my + backImage2.x = mx + backImage1.opacity = 1.0 + backImage2.opacity = 1.0 + moveBackX2to1.start() + } + else if(tranType === 5) + { + mToy = my - parent.height + backImage1.y = my + parent.height + backImage1.x = mx + backImage2.y = my + backImage2.x = mx + backImage1.opacity = 1.0 + backImage2.opacity = 1.0 + moveBackY2to1.start() + } + else if(tranType === 6) + { + mToy = my + parent.height + backImage1.y = my - parent.height + backImage1.x = mx + backImage2.y = my + backImage2.x = mx + backImage1.opacity = 1.0 + backImage2.opacity = 1.0 + moveBackY2to1.start() + } + else + { + backImage1.opacity = 1.0 + backImage2.opacity = 0.0 + backImage1.x = parent.x + backImage1.y = parent.y + backImage2.x = parent.x + backImage2.y = parent.y + } + } + +// function setVideoSource(vidSource) +// { +// player.source = vidSource +// } + + function playVideo() + { + if(player.playbackState === MediaPlayer.StoppedState + || player.playbackState === MediaPlayer.PausedState) + player.play() + + } + + function stopVideo() + { + if(player.playbackState === MediaPlayer.PlayingState + || player.playbackState === MediaPlayer.PausedState) + player.stop() + } + + function pauseVideo() + { + player.pause() + } + + function positionControls(iX,iY,iSize,dOpacity) + { + controls.height = iSize; + controls.opacity = dOpacity; + controls.x = iX; + controls.y = iY; + } + + function setControlsVisible(isVisible) + { + //controls.opacity = dOpacity; + controls.visible = isVisible; + } +} + diff --git a/aboutdialog.cpp b/aboutdialog.cpp new file mode 100644 index 0000000..e6d2ee0 --- /dev/null +++ b/aboutdialog.cpp @@ -0,0 +1,53 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "aboutdialog.h" +#include "ui_aboutdialog.h" + + +AboutDialog::AboutDialog(QWidget *parent, QString version_string) : + QDialog(parent), + ui(new Ui::AboutDialog) +{ + ui->setupUi(this); + softProjector = (SoftProjector*)parent; + ui->version_label->setText(version_string); +} + +AboutDialog::~AboutDialog() +{ + delete ui; +} + +void AboutDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void AboutDialog::on_pushButton_clicked() +{ + close(); +} diff --git a/aboutdialog.h b/aboutdialog.h new file mode 100644 index 0000000..76fcbb2 --- /dev/null +++ b/aboutdialog.h @@ -0,0 +1,48 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef ABOUTDIALOG_H +#define ABOUTDIALOG_H + +#include +#include "softprojector.h" + +namespace Ui { + class AboutDialog; +} + +class AboutDialog : public QDialog { + Q_OBJECT + Q_DISABLE_COPY(AboutDialog) +public: + explicit AboutDialog(QWidget *parent, QString version_string); + virtual ~AboutDialog(); + +protected: + virtual void changeEvent(QEvent *e); + +private: + Ui::AboutDialog *ui; + SoftProjector *softProjector; + +private slots: + void on_pushButton_clicked(); +}; + +#endif // ABOUTDIALOG_H diff --git a/aboutdialog.ui b/aboutdialog.ui new file mode 100644 index 0000000..2211abb --- /dev/null +++ b/aboutdialog.ui @@ -0,0 +1,553 @@ + + + AboutDialog + + + + 0 + 0 + 435 + 569 + + + + About softProjecor + + + + + + + + + + Qt::Horizontal + + + + 13 + 108 + + + + + + + + + 15 + 75 + true + + + + + + + :/icons/icons/softprojector_cloud.png + + + + + + + Qt::Horizontal + + + + 17 + 148 + + + + + + + + + + + + + + + 255 + 0 + 0 + + + + + + + + + 255 + 0 + 0 + + + + + + + + + 118 + 116 + 108 + + + + + + + + + 10 + + + + Version: + + + + + + + + + + + + 255 + 0 + 0 + + + + + + + + + 255 + 0 + 0 + + + + + + + + + 118 + 116 + 108 + + + + + + + + + 10 + + + + Version: *gets set later* + + + + + + + Qt::Horizontal + + + + 40 + 13 + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 10 + + + + an open souce media projection software + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 13 + + + + + + + + + + + 75 + true + + + + Developers: + + + + + + + + 10 + + + + Vladislav Kobzar +------------------- +Ilya Spivakov +Matvey Adzhigirey + + + + + + + Qt::Vertical + + + + 20 + 18 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 75 + true + + + + Mac Build: + + + + + + + + 10 + + + + Volodimir Vasuk + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 75 + true + + + + Special Thanks To: + + + + + + + + 10 + + + + Vitaliy Zhaborovskyy + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 75 + true + + + + Translators: + + + + + + + + 10 + + + + Russian: +German: +Czech: +Ukranian: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 10 + + + + Vladimir Zinchenko +Eduard Schlak +Pavel Fric +Vitaliy Zhaborovskyy + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Vertical + + + + 20 + 18 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 13 + + + + + + + + + 10 + + + + If you would like to help developing this program<br> +or would like to contribute data, please visit:<br> +<a href="http://softprojector.org/">http://softprojector.org/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + + + true + + + + + + + Qt::Vertical + + + + 125 + 27 + + + + + + + + + + + 75 + true + + + + <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FPCLPXFMH9XP4">Donate</a> + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Close + + + + + + + + + + + + diff --git a/addsongbookdialog.cpp b/addsongbookdialog.cpp new file mode 100644 index 0000000..b200e0f --- /dev/null +++ b/addsongbookdialog.cpp @@ -0,0 +1,69 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "addsongbookdialog.h" +#include "ui_addsongbookdialog.h" + +AddSongbookDialog::AddSongbookDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::AddSongbookDialog) +{ + ui->setupUi(this); +} + +AddSongbookDialog::~AddSongbookDialog() +{ + delete ui; +} + +void AddSongbookDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void AddSongbookDialog::on_buttonBox_accepted() +{ + title = ui->songbook_title_box->text().trimmed(); + info = ui->songbook_info_box->toPlainText().trimmed(); + close(); +} + +void AddSongbookDialog::on_buttonBox_rejected() +{ + close(); +} + +void AddSongbookDialog::setSongbook(QString i_title, QString i_info) +{ + ui->songbook_title_box->setText(i_title); + ui->songbook_info_box->setPlainText(i_info); +} + +void AddSongbookDialog::setWindowText(QString lblName, QString lblInfo) +{ + ui->sbonik_title_label->setText(lblName); + ui->songbook_info_label->setText(lblInfo); +} diff --git a/addsongbookdialog.h b/addsongbookdialog.h new file mode 100644 index 0000000..1656775 --- /dev/null +++ b/addsongbookdialog.h @@ -0,0 +1,53 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef ADDSONGBOOKDIALOG_H +#define ADDSONGBOOKDIALOG_H + +#include + +namespace Ui { + class AddSongbookDialog; +} + +class AddSongbookDialog : public QDialog { + Q_OBJECT + Q_DISABLE_COPY(AddSongbookDialog) +public: + QString title; + QString info; + explicit AddSongbookDialog(QWidget *parent = 0); + virtual ~AddSongbookDialog(); + +public slots: + void setSongbook(QString i_title, QString i_info); + void setWindowText(QString lblName, QString lblInfo); + +protected: + virtual void changeEvent(QEvent *e); + +private: + Ui::AddSongbookDialog *ui; + +private slots: + void on_buttonBox_rejected(); + void on_buttonBox_accepted(); +}; + +#endif // ADDSONGBOOKDIALOG_H diff --git a/addsongbookdialog.ui b/addsongbookdialog.ui new file mode 100644 index 0000000..1624c21 --- /dev/null +++ b/addsongbookdialog.ui @@ -0,0 +1,122 @@ + + + AddSongbookDialog + + + + 0 + 0 + 436 + 314 + + + + Add songbook + + + + :/icons/icons/add_songbook.png:/icons/icons/add_songbook.png + + + + + + + + Songbook Title: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + Description: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + songbook_title_box + songbook_info_box + buttonBox + + + + + + + buttonBox + accepted() + AddSongbookDialog + accept() + + + 257 + 304 + + + 157 + 274 + + + + + buttonBox + rejected() + AddSongbookDialog + reject() + + + 325 + 304 + + + 286 + 274 + + + + + diff --git a/announcement.cpp b/announcement.cpp new file mode 100644 index 0000000..13b3035 --- /dev/null +++ b/announcement.cpp @@ -0,0 +1,324 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include +#include +#include "announcement.h" + +Announcement::Announcement() +{ + setDefaults(); +} + +Announcement::Announcement(int id) +{ + setDefaults(); + idNum = id; +} + +void Announcement::readData() +{ + QSqlQuery sq; + // 0 1 2 3 4 5 6 7 + sq.exec("SELECT title, text, usePrivate, useAuto, loop, slideTime, useBackground, backgoundPath, " + "font, color, alignment FROM Announcements WHERE id = " + QString::number(idNum)); + // 8 9 10 + sq.first(); + title = sq.value(0).toString().trimmed(); + text = sq.value(1).toString().trimmed(); + usePrivateSettings = sq.value(2).toBool(); + useAutoNext = sq.value(3).toBool(); + loop = sq.value(4).toBool(); + slideTimer = sq.value(5).toInt(); + useBackground = sq.value(6).toBool(); + backgroundPath = sq.value(7).toString().trimmed(); + font.fromString(sq.value(8).toString().trimmed()); + color = QColor(sq.value(9).toUInt()); + QString str = sq.value(10).toString().trimmed(); + QStringList l = str.split(","); + alignmentV = l.at(0).toInt(); + alignmentH = l.at(1).toInt(); +} + +QStringList Announcement::getAnnounceList() +{ + QStringList alist; + QStringList l = text.split("\n"); + QString anPart; + foreach(const QString s,l) + { + if(isAnnounceTitle(s)) + { + if(!anPart.isEmpty()) + alist.append(anPart.trimmed()); + anPart.clear(); + } + anPart += s + "\n"; + } + + anPart = anPart.trimmed(); + if(!anPart.isEmpty()) + alist.append(anPart.trimmed()); + + return alist; +} + +void Announcement::saveNew() +{ + QSqlQuery sq; + sq.prepare("INSERT INTO Announcements (title, text, usePrivate, useAuto, loop, slideTime, " + "useBackground, backgoundPath, font, color, alignment) VALUES (?,?,?,?,?,?,?,?,?,?,?)"); + sq.addBindValue(title); // 1 + sq.addBindValue(text); // 2 + sq.addBindValue(usePrivateSettings); // 3 + sq.addBindValue(useAutoNext); // 4 + sq.addBindValue(loop); // 5 + sq.addBindValue(slideTimer); // 6 + sq.addBindValue(useBackground); // 7 + sq.addBindValue(backgroundPath); // 8 + sq.addBindValue(font.toString()); // 9 + unsigned int txtColor = (unsigned int)(color.rgb()); + sq.addBindValue(QString::number(txtColor)); // 10 + sq.addBindValue(QString("%1,%2").arg(alignmentV).arg(alignmentH)); // 11 + sq.exec(); + sq.clear(); + + // Update id number + sq.exec("SELECT seq FROM sqlite_sequence WHERE name = 'Announcements'"); + sq.first(); + idNum = sq.value(0).toInt(); +} + +void Announcement::saveUpdate() +{ + QSqlQuery sq; + sq.prepare("UPDATE Announcements SET title = ?, text = ?, usePrivate = ?, useAuto = ?, loop = ?, slideTime = ?, " + "useBackground = ?, backgoundPath = ?, font = ?, color = ?, alignment = ? WHERE id = ?"); + sq.addBindValue(title); + sq.addBindValue(text); + sq.addBindValue(usePrivateSettings); + sq.addBindValue(useAutoNext); + sq.addBindValue(loop); + sq.addBindValue(slideTimer); + sq.addBindValue(useBackground); + sq.addBindValue(backgroundPath); + sq.addBindValue(font.toString()); + unsigned int txtColor = (unsigned int)(color.rgb()); + sq.addBindValue(QString::number(txtColor)); + sq.addBindValue(QString("%1,%2").arg(alignmentV).arg(alignmentH)); + sq.addBindValue(idNum); + sq.exec(); +} + +void Announcement::deleteAnnouce() +{ + QSqlQuery sq; + sq.exec("DELETE FROM Announcements WHERE id = " + QString::number(idNum)); +} + +void Announcement::setDefaults() +{ + idNum = 0; + title = ""; + text = ""; + usePrivateSettings = false; + useAutoNext = true; + loop = true; + slideTimer = 10; + font = QFont(); + color = QColor(Qt::white); + useBackground = false; + backgroundPath = ""; + alignmentV = 0; + alignmentH = 1; +} + +AnnounceSlide Announcement::getAnnounceSlide(int current) +{ + AnnounceSlide aslide; + QStringList alist = getAnnounceList(); + QStringList slist = alist.at(current).split("\n"); + if(isAnnounceTitle(slist.at(0))) + slist.removeFirst(); + + aslide.text = slist.join("\n").trimmed(); + aslide.alignmentH = alignmentH; + aslide.alignmentV = alignmentV; + aslide.backgroundPath = backgroundPath; + aslide.color = color; + aslide.font = font; + aslide.usePrivateSettings = usePrivateSettings; + return aslide; +} + +//////////////////////////////////////////////////////////////////////// +// ANNOUNCE MODEL +//////////////////////////////////////////////////////////////////////// +AnnounceModel::AnnounceModel() +{ +} + +void AnnounceModel::setAnnoucements(QList announcements) +{ + emit layoutAboutToBeChanged(); + announceList.clear(); + announceList = announcements; + emit layoutChanged(); +} + +void AnnounceModel::addAnnouncement(Announcement announce) +{ + beginInsertRows(QModelIndex(), rowCount(),rowCount()); + announceList.append(announce); + endInsertRows(); +} + +Announcement AnnounceModel::getAnnounce(int row) +{ + return announceList.at(row); +} + +Announcement AnnounceModel::getAnnounce(QModelIndex index) +{ + return announceList.at(index.row()); +} + +int AnnounceModel::rowCount(const QModelIndex &parent) const +{ + return announceList.count(); +} + +int AnnounceModel::columnCount(const QModelIndex &parent) const +{ + return 1; +} + +QVariant AnnounceModel::data(const QModelIndex &index, int role) const +{ + if(!index.isValid()) + return QVariant(); + + if(role == Qt::DisplayRole) + { + Announcement announce = announceList.at(index.row()); + if(index.column() == 0) // title + return QVariant(announce.title.trimmed()); + } + return QVariant(); +} + +QVariant AnnounceModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + if (role == Qt::DisplayRole && orientation == Qt::Horizontal ) + { + switch(section) + { + case 0: + return QVariant(tr("Title")); + } + } + return QVariant(); +} + +bool AnnounceModel::removeRows(int row, int count, const QModelIndex &parent) +{ + beginRemoveRows(parent,row,row+count-1); + for(int i=row+count-1; i>=row;i--) + announceList.removeAt(i); + endRemoveRows(); + return true; +} + +void AnnounceModel::emitLayoutChanged() +{ + emit layoutChanged(); +} + +void AnnounceModel::emitLayoutAboutToBeChanged() +{ + emit layoutAboutToBeChanged(); +} + +void AnnounceModel::updateAnnounceFromDatabase(int annId) +{ + emit layoutAboutToBeChanged(); + for(int i=0; iidNum == annId) + { + ann->readData(); + emit layoutChanged(); + return; + } + } +} + +//void AnnounceModel::updateAnnounceFromDatabase(int newAnnId, int oldAnnId) +//{ +// // TODO: do if needed +//} + +bool AnnounceModel::isInTable(int annId) +{ + foreach(Announcement agent, announceList) + if(agent.idNum == annId) + return true; + return false; +} + +AnnounceProxyModel::AnnounceProxyModel(QObject *parent) : QSortFilterProxyModel(parent) +{ + filterString = QString(); + matchExact = false; + matchBeginning = false; +} + +void AnnounceProxyModel::setFilterString(QString new_string, bool new_match_beginning, bool new_exact_match) +{ + filterString = new_string; + matchExact = new_exact_match; + matchBeginning = new_match_beginning; +} + +bool AnnounceProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const +{ + QModelIndex index0 = sourceModel()->index(sourceRow,0,sourceParent); // Title + QString str0 = sourceModel()->data(index0).toString(); // Title + + if(filterString.isEmpty()) + return true; + + QRegExp rx; + rx.setCaseSensitivity(Qt::CaseInsensitive); + QString fs = filterString; + fs.replace(" ","\\W"); + if(matchExact) + return(str0.compare(filterString, Qt::CaseInsensitive) == 0); + else if(matchBeginning) + { + rx.setPattern("^"+fs); + return(str0.contains(rx)); + } + else + { + rx.setPattern(fs); + return(str0.contains(rx)); + } +} diff --git a/announcement.h b/announcement.h new file mode 100644 index 0000000..d6eefa2 --- /dev/null +++ b/announcement.h @@ -0,0 +1,110 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef ANNOUNCEMENT_H +#define ANNOUNCEMENT_H + +#include +#include "spfunctions.h" + +class AnnounceSlide +{ +public: + QString text; + bool usePrivateSettings; + int alignmentV; + int alignmentH; + QString backgroundPath; + QColor color; + QFont font; +}; + +class Announcement +{ +public: + Announcement(); + Announcement(int id); + int idNum; + QString title; + QString text; + bool usePrivateSettings; + bool useAutoNext; + bool loop; + int slideTimer; + QFont font; + QColor color; + bool useBackground; + QString backgroundPath; + int alignmentV; + int alignmentH; + int align_flags; + + void saveNew(); + void saveUpdate(); + void deleteAnnouce(); + void readData(); + + QStringList getAnnounceList(); + AnnounceSlide getAnnounceSlide(int current); + +private: + void setDefaults(); +}; + +class AnnounceModel : public QAbstractTableModel + // Class to store data from Announcement table +{ + Q_OBJECT + Q_DISABLE_COPY(AnnounceModel) +public: + AnnounceModel(); + void setAnnoucements(QList announcements); + void addAnnouncement(Announcement announce); + Announcement getAnnounce(int row); + Announcement getAnnounce(QModelIndex index); + + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + bool removeRows( int row, int count, const QModelIndex & parent = QModelIndex() ); + + void emitLayoutChanged(); + void emitLayoutAboutToBeChanged(); + void updateAnnounceFromDatabase(int annId); + // void updateAnnounceFromDatabase(int newAnnId, int oldAnnId); + bool isInTable(int annId); + + QList announceList; +}; + +class AnnounceProxyModel : public QSortFilterProxyModel +{ + Q_OBJECT +public: + AnnounceProxyModel(QObject *parent = 0); + void setFilterString(QString new_string, bool new_match_beginning, bool new_exact_match); + bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; + +private: + QString filterString; + bool matchBeginning, matchExact; +}; + +#endif // ANNOUNCEMENT_H diff --git a/announcementsettingwidget.cpp b/announcementsettingwidget.cpp new file mode 100644 index 0000000..81c49ce --- /dev/null +++ b/announcementsettingwidget.cpp @@ -0,0 +1,272 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "announcementsettingwidget.h" +#include "ui_announcementsettingwidget.h" + +AnnouncementSettingWidget::AnnouncementSettingWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::AnnouncementSettingWidget) +{ + ui->setupUi(this); +} + +AnnouncementSettingWidget::~AnnouncementSettingWidget() +{ + delete ui; +} + +void AnnouncementSettingWidget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch ( e->type() ) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void AnnouncementSettingWidget::setSettings(TextSettings &settings, TextSettings &settings2) +{ + mySettings = settings; + mySettings2 = settings2; + loadSettings(); +} + +void AnnouncementSettingWidget::loadSettings() +{ + // Set Effects + ui->checkBoxUseShadow->setChecked(mySettings.useShadow); + ui->checkBoxUseFading->setChecked(mySettings.useFading); + ui->checkBoxUseBlurredShadow->setChecked(mySettings.useBlurShadow); + + ui->checkBoxUseShadow2->setChecked(mySettings2.useShadow); + ui->checkBoxUseFading2->setChecked(mySettings2.useFading); + ui->checkBoxUseBlurredShadow2->setChecked(mySettings2.useBlurShadow); + + // Set background + ui->groupBoxBackground->setChecked(mySettings.useBackground); + ui->lineEditBackground->setText(mySettings.backgroundName); + + ui->groupBoxBackground2->setChecked(mySettings2.useBackground); + ui->lineEditBackground2->setText(mySettings2.backgroundName); + + // Set Alingment + ui->comboBoxVerticalAling->setCurrentIndex(mySettings.textAlingmentV); + ui->comboBoxHorizontalAling->setCurrentIndex(mySettings.textAlingmentH); + + ui->comboBoxVerticalAling2->setCurrentIndex(mySettings2.textAlingmentV); + ui->comboBoxHorizontalAling2->setCurrentIndex(mySettings2.textAlingmentH); + + // Set text color + QPalette p; + p.setColor(QPalette::Base,mySettings.textColor); + ui->graphicViewTextColor->setPalette(p); + + p.setColor(QPalette::Base,mySettings2.textColor); + ui->graphicViewTextColor2->setPalette(p); + + // Set text font lable + ui->labelFont->setText(getFontText(mySettings.textFont)); + ui->labelFont2->setText(getFontText(mySettings2.textFont)); + + ui->groupBoxUseDisp2->setChecked(mySettings2.useDisp2settings); + on_groupBoxUseDisp2_toggled(mySettings2.useDisp2settings); +} + +void AnnouncementSettingWidget::getSettings(TextSettings &settings, TextSettings &settings2) +{ + // Effects + mySettings.useShadow = ui->checkBoxUseShadow->isChecked(); + mySettings.useFading = ui->checkBoxUseFading->isChecked(); + mySettings.useBlurShadow = ui->checkBoxUseBlurredShadow->isChecked(); + + mySettings2.useShadow = ui->checkBoxUseShadow2->isChecked(); + mySettings2.useFading = ui->checkBoxUseFading2->isChecked(); + mySettings2.useBlurShadow = ui->checkBoxUseBlurredShadow2->isChecked(); + + // Get Background + mySettings.useBackground = ui->groupBoxBackground->isChecked(); + mySettings.backgroundName = ui->lineEditBackground->text(); + + mySettings2.useBackground = ui->groupBoxBackground2->isChecked(); + mySettings2.backgroundName = ui->lineEditBackground2->text(); + + // Alingmet + mySettings.textAlingmentV = ui->comboBoxVerticalAling->currentIndex(); + mySettings.textAlingmentH = ui->comboBoxHorizontalAling->currentIndex(); + + mySettings2.textAlingmentV = ui->comboBoxVerticalAling2->currentIndex(); + mySettings2.textAlingmentH = ui->comboBoxHorizontalAling2->currentIndex(); + + mySettings2.useDisp2settings = ui->groupBoxUseDisp2->isChecked(); + + settings = mySettings; + settings2 = mySettings2; +} + +void AnnouncementSettingWidget::on_checkBoxUseShadow_stateChanged(int arg1) +{ + if(arg1==2) + ui->checkBoxUseBlurredShadow->setEnabled(true); + else + { + ui->checkBoxUseBlurredShadow->setChecked(false); + ui->checkBoxUseBlurredShadow->setEnabled(false); + } +} + +void AnnouncementSettingWidget::on_checkBoxUseShadow2_stateChanged(int arg1) +{ + if(arg1==2) + ui->checkBoxUseBlurredShadow2->setEnabled(true); + else + { + ui->checkBoxUseBlurredShadow2->setChecked(false); + ui->checkBoxUseBlurredShadow2->setEnabled(false); + } +} + +void AnnouncementSettingWidget::on_buttonBackground_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for announcement wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + if(p.width()>1280 || p.height()>1280) + mySettings.backgroundPix = p.scaled(1280,1280,Qt::KeepAspectRatio); + else + mySettings.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings.backgroundName = filename; + ui->lineEditBackground->setText(filename); + } +} + +void AnnouncementSettingWidget::on_buttonBackground2_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for announcement wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + if(p.width()>1280 || p.height()>1280) + mySettings2.backgroundPix = p.scaled(1280,1280,Qt::KeepAspectRatio); + else + mySettings2.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings2.backgroundName = filename; + ui->lineEditBackground2->setText(filename); + } +} + +void AnnouncementSettingWidget::setDispScreen2Visible(bool visible) +{ + ui->groupBoxUseDisp2->setVisible(visible); +} + +void AnnouncementSettingWidget::on_toolButtonColor_clicked() +{ + QColor c(QColorDialog::getColor(mySettings.textColor,this)); + if(c.isValid()) + mySettings.textColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings.textColor); + ui->graphicViewTextColor->setPalette(p); +} + +void AnnouncementSettingWidget::on_toolButtonColor2_clicked() +{ + QColor c(QColorDialog::getColor(mySettings2.textColor,this)); + if(c.isValid()) + mySettings2.textColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings2.textColor); + ui->graphicViewTextColor2->setPalette(p); +} + +void AnnouncementSettingWidget::on_toolButtonFont_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings.textFont,this); + if(ok) + mySettings.textFont = font; + + ui->labelFont->setText(getFontText(mySettings.textFont)); +} + +void AnnouncementSettingWidget::on_toolButtonFont2_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings2.textFont,this); + if(ok) + mySettings2.textFont = font; + + ui->labelFont2->setText(getFontText(mySettings2.textFont)); +} + +void AnnouncementSettingWidget::on_groupBoxUseDisp2_toggled(bool arg1) +{ + ui->groupBoxBackground2->setVisible(arg1); + ui->groupBoxEffects2->setVisible(arg1); + ui->groupBoxTextProperties2->setVisible(arg1); +} + +void AnnouncementSettingWidget::on_pushButtonDefault_clicked() +{ + TextSettings a; + mySettings = a; + mySettings2 = a; + loadSettings(); +} + +QString AnnouncementSettingWidget::getFontText(QFont font) +{ + QString st(QString("%1: %2").arg(font.rawName()).arg(font.pointSize())); + if(font.bold()) + st += ", " + tr("Bold"); + if(font.italic()) + st += ", " + tr("Italic"); + if(font.strikeOut()) + st += ", " + tr("StrikeOut"); + if(font.underline()) + st += ", " + tr("Underline"); + + return st; +} + +void AnnouncementSettingWidget::on_pushButtonApplyToAll_clicked() +{ + emit applyBackToAll(3,mySettings.backgroundName,mySettings.backgroundPix); +} + +void AnnouncementSettingWidget::setBackgroungds(QString name, QPixmap back) +{ + mySettings.backgroundName = name; + mySettings.backgroundPix = back; + mySettings2.backgroundName = name; + mySettings2.backgroundPix = back; + ui->lineEditBackground->setText(name); + ui->lineEditBackground2->setText(name); +} diff --git a/announcementsettingwidget.h b/announcementsettingwidget.h new file mode 100644 index 0000000..ec117db --- /dev/null +++ b/announcementsettingwidget.h @@ -0,0 +1,72 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef ANNOUNCEMENTSETTINGWIDGET_H +#define ANNOUNCEMENTSETTINGWIDGET_H + +#include +#include "theme.h" +#include "spfunctions.h" +#include "settings.h" + +namespace Ui { +class AnnouncementSettingWidget; +} + +class AnnouncementSettingWidget : public QWidget +{ + Q_OBJECT + +public: + explicit AnnouncementSettingWidget(QWidget *parent = 0); + ~AnnouncementSettingWidget(); + +public slots: + void setSettings(TextSettings& settings, TextSettings &settings2); + void getSettings(TextSettings& settings, TextSettings &settings2); + void setDispScreen2Visible(bool visible); + void setBackgroungds(QString name, QPixmap back); + +signals: + void applyBackToAll(int t, QString backName, QPixmap background); + +private slots: + void loadSettings(); + void on_buttonBackground_clicked(); + void on_pushButtonDefault_clicked(); + void on_checkBoxUseShadow_stateChanged(int arg1); + void on_groupBoxUseDisp2_toggled(bool arg1); + void on_checkBoxUseShadow2_stateChanged(int arg1); + void on_buttonBackground2_clicked(); + void on_toolButtonColor_clicked(); + void on_toolButtonColor2_clicked(); + void on_toolButtonFont_clicked(); + void on_toolButtonFont2_clicked(); + QString getFontText(QFont font); + + void on_pushButtonApplyToAll_clicked(); + +private: + TextSettings mySettings, mySettings2; + Ui::AnnouncementSettingWidget *ui; +protected: + virtual void changeEvent(QEvent *e); +}; + +#endif // ANNOUNCEMENTSETTINGWIDGET_H diff --git a/announcementsettingwidget.ui b/announcementsettingwidget.ui new file mode 100644 index 0000000..604f369 --- /dev/null +++ b/announcementsettingwidget.ui @@ -0,0 +1,745 @@ + + + AnnouncementSettingWidget + + + + 0 + 0 + 399 + 549 + + + + + + + Effects + + + + + + 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 + + + + + + + + + + Use Background Image + + + true + + + + + + true + + + + + + + Browse... + + + + + + + Apply this background to all active backgrounds. + + + + :/icons/icons/apply_to_all.png:/icons/icons/apply_to_all.png + + + + + + + + + + Text Properties + + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + 0 + 0 + + + + true + + + + + + + + + + + Alignment: + + + + + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + 170 + 85 + 255 + + + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + 170 + 85 + 255 + + + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 51 + 153 + 255 + + + + + + + + Use Separate Secondary Display Screen Settings + + + true + + + true + + + + 0 + + + 0 + + + 0 + + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Effects + + + + + + 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 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Use Background Image + + + true + + + + + + true + + + + + + + Browse... + + + + + + + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Text Properties + + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + 0 + 0 + + + + true + + + + + + + + + + + Alignment: + + + + + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 59 + 20 + + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 0 + + + + + + + + + + Reset All To Default + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + checkBoxUseFading + checkBoxUseShadow + checkBoxUseBlurredShadow + groupBoxBackground + buttonBackground + lineEditBackground + toolButtonColor + graphicViewTextColor + toolButtonFont + comboBoxVerticalAling + comboBoxHorizontalAling + groupBoxUseDisp2 + checkBoxUseFading2 + checkBoxUseShadow2 + checkBoxUseBlurredShadow2 + groupBoxBackground2 + buttonBackground2 + lineEditBackground2 + toolButtonColor2 + graphicViewTextColor2 + toolButtonFont2 + comboBoxVerticalAling2 + comboBoxHorizontalAling2 + pushButtonDefault + + + + + + diff --git a/announcewidget.cpp b/announcewidget.cpp new file mode 100644 index 0000000..7ba42a4 --- /dev/null +++ b/announcewidget.cpp @@ -0,0 +1,235 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include +#include +#include "announcewidget.h" +#include "ui_announcewidget.h" + +AnnounceWidget::AnnounceWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::AnnounceWidget) +{ + ui->setupUi(this); + + editAnounceDialog = new EditAnnouncementDialog(this); + connect(editAnounceDialog,SIGNAL(announceToAdd(Announcement)),this,SLOT(addNewAnnouncement(Announcement))); + connect(editAnounceDialog,SIGNAL(announceToUpdate()),this,SLOT(updateAnnouncement())); + + announceModel = new AnnounceModel; + announceProxy = new AnnounceProxyModel(this); + announceProxy->setSourceModel(announceModel); + announceProxy->setDynamicSortFilter(true); + ui->tableViewAnnouncements->setModel(announceProxy); + setAnnounceList(); + loadAnnouncements(); + + connect(ui->tableViewAnnouncements->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), + this, SLOT(announceViewRowChanged(QModelIndex,QModelIndex))); + + // Derease row height + ui->tableViewAnnouncements->resizeRowsToContents(); +} + +AnnounceWidget::~AnnounceWidget() +{ + delete editAnounceDialog; + delete announceModel; + delete ui; +} + +void AnnounceWidget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void AnnounceWidget::announceViewRowChanged(const QModelIndex ¤t, const QModelIndex &previous) +{ + if(current.isValid()) + { + int row = announceProxy->mapToSource(current).row(); + previewAnnounce = announceModel->getAnnounce(row); + loadAnnouncement(); + } +} + +void AnnounceWidget::loadAnnouncements() +{ + announceModel->setAnnoucements(announceList); +} + +void AnnounceWidget::loadAnnouncement() +{ + ui->listWidgetAnnouncement->clear(); + ui->listWidgetAnnouncement->addItems(previewAnnounce.getAnnounceList()); + ui->labelAnnounceTitle->setText(previewAnnounce.title); +} + +void AnnounceWidget::setAnnounceList() +{ + QSqlQuery sq; + Announcement a; + announceList.clear(); + // 0 1 2 3 4 5 6 7 + sq.exec("SELECT title, text, usePrivate, useAuto, loop, slideTime, useBackground, backgoundPath, " + "font, color, alignment, id FROM Announcements"); + // 8 9 10 11 + while(sq.next()) + { + a.title = sq.value(0).toString().trimmed(); + a.text = sq.value(1).toString().trimmed(); + a.usePrivateSettings = sq.value(2).toBool(); + a.useAutoNext = sq.value(3).toBool(); + a.loop = sq.value(4).toBool(); + a.slideTimer = sq.value(5).toInt(); + a.useBackground = sq.value(6).toBool(); + a.backgroundPath = sq.value(7).toString().trimmed(); + a.font.fromString(sq.value(8).toString().trimmed()); + a.color = QColor(sq.value(9).toUInt()); + QString str = sq.value(10).toString().trimmed(); + QStringList l = str.split(","); + a.alignmentV = l.at(0).toInt(); + a.alignmentH = l.at(1).toInt(); + a.idNum = sq.value(11).toInt(); + + announceList.append(a); + } +} + +void AnnounceWidget::setPreview(Announcement announce) +{ + previewAnnounce = announce; + ui->listWidgetAnnouncement->clear(); + ui->labelAnnounceTitle->setText(previewAnnounce.title); + ui->listWidgetAnnouncement->addItems(previewAnnounce.getAnnounceList()); +} + +void AnnounceWidget::newAnnouncement() +{ + editAnounceDialog->setNewAnnouce(); + editAnounceDialog->exec(); +} + +void AnnounceWidget::editAnnouncement() +{ + if(previewAnnounce.idNum>0) + { + editAnounceDialog->setEditAnnouce(previewAnnounce); + editAnounceDialog->exec(); + } +} + +void AnnounceWidget::copyAnnouncement() +{ + if(previewAnnounce.idNum>0) + { + editAnounceDialog->setCopyAnnouce(previewAnnounce); + editAnounceDialog->exec(); + } +} + +void AnnounceWidget::deleteAnnouncement() +{ + if(previewAnnounce.idNum>0) + { + previewAnnounce.deleteAnnouce(); + previewAnnounce = Announcement(); + ui->listWidgetAnnouncement->clear(); + ui->labelAnnounceTitle->clear(); + int row = ui->tableViewAnnouncements->currentIndex().row(); + announceModel->removeRow(row); + } +} + +void AnnounceWidget::addNewAnnouncement(Announcement announce) +{ + announceModel->addAnnouncement(announce); + ui->tableViewAnnouncements->selectRow(announceModel->rowCount()-1); +} + +void AnnounceWidget::updateAnnouncement() +{ + announceModel->updateAnnounceFromDatabase(previewAnnounce.idNum); + setPreview(currentAnnouncement()); + loadAnnouncement(); +} + +bool AnnounceWidget::isAnnounceValid() +{ + if(ui->tableViewAnnouncements->selectionModel()->selectedRows().count()>0) + return true; + else + return false; +} + +Announcement AnnounceWidget::getAnnouncement() +{ + return previewAnnounce; +} + +void AnnounceWidget::sendToProjector() +{ + if(isAnnounceValid()) + emit sendAnnounce(previewAnnounce,ui->listWidgetAnnouncement->currentRow()); +} + +void AnnounceWidget::on_pushButtonLive_clicked() +{ + sendToProjector(); +} + +void AnnounceWidget::on_listWidgetAnnouncement_doubleClicked(const QModelIndex &index) +{ + sendToProjector(); +} + +void AnnounceWidget::on_tableViewAnnouncements_doubleClicked(const QModelIndex &index) +{ + int row = announceProxy->mapToSource(index).row(); + Announcement announce = announceModel->getAnnounce(row); + emit addToSchedule(announce); + setPreview(announce); +} + +Announcement AnnounceWidget::currentAnnouncement() +{ + Announcement ancmnt; + QModelIndex index; + int row; + index = announceProxy->mapToSource(ui->tableViewAnnouncements->currentIndex()); + row = index.row(); + + if(row>=0) + ancmnt = announceModel->getAnnounce(row); + + return ancmnt; +} + +void AnnounceWidget::setAnnouncementFromHistory(Announcement &announce) +{ + ui->tableViewAnnouncements->clearSelection(); + setPreview(announce); +} diff --git a/announcewidget.h b/announcewidget.h new file mode 100644 index 0000000..996d8a3 --- /dev/null +++ b/announcewidget.h @@ -0,0 +1,77 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef ANNOUNCEWIDGET_H +#define ANNOUNCEWIDGET_H + +#include +#include "announcement.h" +#include "editannouncementdialog.h" + +namespace Ui { +class AnnounceWidget; +} + +class AnnounceWidget : public QWidget { + Q_OBJECT + Q_DISABLE_COPY(AnnounceWidget) +public: + explicit AnnounceWidget(QWidget *parent = 0); + virtual ~AnnounceWidget(); + +public slots: + void loadAnnouncements(); + void newAnnouncement(); + void editAnnouncement(); + void copyAnnouncement(); + void deleteAnnouncement(); + bool isAnnounceValid(); + Announcement getAnnouncement(); + void setAnnouncementFromHistory(Announcement &announce); + +protected: + virtual void changeEvent(QEvent *e); + +private slots: + void loadAnnouncement(); + void announceViewRowChanged(const QModelIndex ¤t, const QModelIndex &previous); + void setAnnounceList(); + void setPreview(Announcement announce); + void addNewAnnouncement(Announcement announce); + void updateAnnouncement(); + void sendToProjector(); + void on_pushButtonLive_clicked(); + void on_listWidgetAnnouncement_doubleClicked(const QModelIndex &index); + Announcement currentAnnouncement(); + void on_tableViewAnnouncements_doubleClicked(const QModelIndex &index); + +signals: + void sendAnnounce(Announcement announce, int row); + void addToSchedule(Announcement &announce); + +private: + Ui::AnnounceWidget *ui; + EditAnnouncementDialog * editAnounceDialog; + QList announceList; + Announcement previewAnnounce; + AnnounceModel *announceModel; + AnnounceProxyModel * announceProxy; +}; + +#endif // ANNOUNCEWIDGET_H diff --git a/announcewidget.ui b/announcewidget.ui new file mode 100644 index 0000000..063d74d --- /dev/null +++ b/announcewidget.ui @@ -0,0 +1,130 @@ + + + AnnounceWidget + + + + 0 + 0 + 538 + 415 + + + + + 0 + 0 + + + + + 400 + 0 + + + + Form + + + + + + Qt::Horizontal + + + + + + + Announcements: + + + + + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + true + + + true + + + false + + + 20 + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Quickly display announcement + + + Go Live (F5) + + + + :/icons/icons/go_live.png:/icons/icons/go_live.png + + + F5 + + + + + + + + + Announcement Preview: + + + + + + + true + + + 3 + + + + + + + + + + + + + + diff --git a/bible.cpp b/bible.cpp new file mode 100644 index 0000000..835cae9 --- /dev/null +++ b/bible.cpp @@ -0,0 +1,433 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "bible.h" + +Bible::Bible() +{ +} + +void Bible::setBiblesId(QString& id) +{ + bibleId = id; + retrieveBooks(); +} + +QString Bible::getBibleName() +{ + if(bibleId.isEmpty()) + return ""; + QSqlQuery sq; + sq.exec("SELECT bible_name FROM BibleVersions WHERE id = "+ bibleId ); + sq.first(); + QString b = sq.value(0).toString().trimmed(); + return b; +} + +void Bible::retrieveBooks() +{ + BibleBook book; + QSqlQuery sq; + books.clear(); + sq.exec("SELECT book_name, id, chapter_count FROM BibleBooks WHERE bible_id = "+ bibleId ); + while (sq.next()) + { + book.book = sq.value(0).toString().trimmed(); + book.bookId = sq.value(1).toString(); + book.chapterCount = sq.value(2).toInt(); + books.append(book); + } +} + +QStringList Bible::getBooks() +{ + QStringList book_list; + if( books.count() == 0 ) + retrieveBooks(); + for(int i(0); books.count()>i;++i) + book_list.append(books.at(i).book); + + return book_list; +} + +QString Bible::getBookName(int id) +{ + QString book; + foreach (const BibleBook bk, books) + { + if(bk.bookId.toInt() == id) + { + book = bk.book; + break; + } + } + return book; +} + +void Bible::getVerseRef(QString vId, QString &book, int &chapter, int &verse) +{ + if(vId.contains(",")) + vId = vId.split(",").first(); + + foreach(const BibleVerse &bv, operatorBible) + { + if(bv.verseId == vId) + { + book = QString::number(bv.book); + chapter = bv.chapter; + verse = bv.verseNumber; + } + } + + foreach (const BibleBook bk, books) + { + if(bk.bookId == book) + book = bk.book; + } +} + +int Bible::getVerseNumberLast(QString vId) +{ + int vernum(0); + if(vId.contains(",")) + vId = vId.split(",").last(); + + foreach(const BibleVerse &bv, operatorBible) + { + if(bv.verseId == vId) + { + vernum = bv.verseNumber; + break; + } + } + return vernum; +} + +int Bible::getCurrentBookRow(QString book) +{ + int chapters(0); + for(int i(0); books.count()>i;++i) + { + if(books.at(i).book==book) + { + chapters = i; + break; + } + } + return chapters; +} + +QStringList Bible::getChapter(int book, int chapter) +{ + QString verseText, id; + int verse(0), verse_old(0); + + previewIdList.clear(); + verseList.clear(); + foreach (const BibleVerse &bv,operatorBible) + { + if(bv.book == book && bv.chapter == chapter) + { + verse = bv.verseNumber; + if(verse==verse_old) + { + verseText = verseText.simplified() + " " + bv.verseText; + id += "," + bv.verseId; + verseList.removeLast(); + previewIdList.removeLast(); + } + else + { + verseText = bv.verseText; + id = bv.verseId; + } + verseList << QString::number(verse) + ". " + verseText; + previewIdList << id; + verse_old = verse; + } + } + + return verseList; +} + +Verse Bible::getCurrentVerseAndCaption(QList currentRows, BibleSettings& sets, BibleVersionSettings &bv) +{ + QString verse_id; + for(int i(0);i Bible::searchBible(bool allWords, QRegExp searchExp) +{ ///////// Search entire Bible ////////// + + QList return_results; + + QString sw = searchExp.pattern(); + sw.remove("\\b("); + sw.remove(")\\b"); + + foreach(const BibleVerse &bv,operatorBible) + { + if(bv.verseText.contains(searchExp)) + { + if(allWords) + { + QStringList stl = sw.split("|"); + bool hasAll = false; + for (int j(0);j Bible::searchBible(bool allWords, QRegExp searchExp, int book) +{ ///////// Search in selected book ////////// + + QList return_results; + + QString sw = searchExp.pattern(); + sw.remove("\\b("); + sw.remove(")\\b"); + + foreach(const BibleVerse &bv,operatorBible) + { + if(bv.verseText.contains(searchExp) && bv.book == book) + { + if(allWords) + { + QStringList stl = sw.split("|"); + bool hasAll = false; + for (int j(0);j Bible::searchBible(bool allWords, QRegExp searchExp, int book, int chapter) +{ ///////// Search in selected chapter ////////// + + QList return_results; + + QString sw = searchExp.pattern(); + sw.remove("\\b("); + sw.remove(")\\b"); + + foreach(const BibleVerse &bv,operatorBible) + { + if(bv.verseText.contains(searchExp) && bv.book == book && bv.chapter == chapter) + { + if(allWords) + { + QStringList stl = sw.split("|"); + bool hasAll = false; + for (int j(0);j &bsl) +{ + BibleSearch results; + foreach (const BibleBook &bk,books) + { + if(bk.bookId == QString::number(bv.book)) + { + results.book = bk.book; + break; + } + } + results.chapter = QString::number(bv.chapter); + results.verse = QString::number(bv.verseNumber); + results.verse_text = QString("%1 %2:%3 %4").arg(results.book).arg(results.chapter).arg(results.verse).arg(bv.verseText); + + bsl.append(results); +} + +void Bible::loadOperatorBible() +{ + operatorBible.clear(); + BibleVerse bv; + QSqlQuery sq; + sq.exec("SELECT verse_id, book, chapter, verse, verse_text FROM BibleVerse WHERE bible_id = '"+bibleId+"'"); + while(sq.next()) + { + bv.verseId = sq.value(0).toString().trimmed(); + bv.book = sq.value(1).toInt(); + bv.chapter = sq.value(2).toInt(); + bv.verseNumber = sq.value(3).toInt(); + bv.verseText = sq.value(4).toString().trimmed(); + operatorBible.append(bv); + } +} diff --git a/bible.h b/bible.h new file mode 100644 index 0000000..2aa9cfa --- /dev/null +++ b/bible.h @@ -0,0 +1,113 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef BIBLE_H +#define BIBLE_H + +#include +#include "theme.h" +#include "settings.h" + +class BibleVerse +{ +public: + // Hold Bible Verse Info + QString verseId; + int book; + int chapter; + int verseNumber; + QString verseText; +}; + +class Verse +{ +public: + // For now both primary and secondary information is stored in + // primary_text and primary_caption + QString primary_text; + QString secondary_text; + QString primary_caption; + QString secondary_caption; + QString trinary_text; + QString trinary_caption; +}; + +class BibleSearch +{ + // For holding search results +public: + QString book; + QString chapter; + QString verse; + QString verse_text; + QString verse_id; + QString display_text; + int first_v; + int last_v; +}; + +class BibleHistory +{ +public: + QString verseIds; + QString caption; + QString captionLong; +}; + +class BibleBook +{ + // For Holding Bible book infromation +public: + QString book; + QString bookId; + int chapterCount; +}; + +class Bible +{ +public: + Bible(); + QStringList verseList; + QStringList previewIdList; // Verses that are in the preview (chapter) list + QStringList currentIdList; // Verses that are in the show list + QList books; +public slots: + QList searchBible(bool begins, QRegExp searchExp); + QList searchBible(bool allWords, QRegExp searchExp, int book); + QList searchBible(bool allWords, QRegExp searchExp, int book, int chapter); + QStringList getBooks(); + QString getBookName(int id); + void getVerseRef(QString vId, QString &book, int &chapter, int &verse); + int getVerseNumberLast(QString vId); + QStringList getChapter(int book, int chapter); + void getVerseAndCaption(QString &verse, QString &caption, QString verId, QString &bibId, bool useAbbr); + int getCurrentBookRow(QString book); + Verse getCurrentVerseAndCaption(QList currentRows, BibleSettings& sets, BibleVersionSettings& bv); + void setBiblesId(QString& id); + QString getBibleName(); + void loadOperatorBible(); +private: + QString bibleId; + QList operatorBible; + void retrieveBooks(); +private slots: + void addSearchResult(const BibleVerse &bv,QList &bsl); +}; + +#endif // BIBLE_H diff --git a/bibleinformationdialog.cpp b/bibleinformationdialog.cpp new file mode 100644 index 0000000..d62eff9 --- /dev/null +++ b/bibleinformationdialog.cpp @@ -0,0 +1,59 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "bibleinformationdialog.h" +#include "ui_bibleinformationdialog.h" + +BibleInformationDialog::BibleInformationDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::BibleInformationDialog) +{ + ui->setupUi(this); +} + +BibleInformationDialog::~BibleInformationDialog() +{ + delete ui; +} + +void BibleInformationDialog::on_buttonBox_accepted() +{ + title = ui->bible_name_lineEdit->text().trimmed(); + abbr = ui->abbr_lineEdit->text().trimmed(); + info = ui->info_TextEdit->toPlainText().trimmed(); + if (ui->rtol_checkBox->isChecked()) + isRtoL = true; + else + isRtoL = false; + + close(); +} + +void BibleInformationDialog::on_buttonBox_rejected() +{ + close(); +} + +void BibleInformationDialog::setBibleIformation(QString _title, QString _abbr, QString _info, bool is_rtol) +{ + ui->bible_name_lineEdit->setText(_title); + ui->abbr_lineEdit->setText(_abbr); + ui->info_TextEdit->setPlainText(_info); + ui->rtol_checkBox->setChecked(is_rtol); +} diff --git a/bibleinformationdialog.h b/bibleinformationdialog.h new file mode 100644 index 0000000..9d824f2 --- /dev/null +++ b/bibleinformationdialog.h @@ -0,0 +1,52 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef BIBLEINFORMATIONDIALOG_H +#define BIBLEINFORMATIONDIALOG_H + +#include + +namespace Ui { + class BibleInformationDialog; +} + +class BibleInformationDialog : public QDialog +{ + Q_OBJECT + +public: + QString title; + QString abbr; + QString info; + bool isRtoL; + explicit BibleInformationDialog(QWidget *parent = 0); + ~BibleInformationDialog(); + +public slots: + void setBibleIformation(QString title, QString abbreviation, QString info, bool is_rtol); + +private: + Ui::BibleInformationDialog *ui; + +private slots: + void on_buttonBox_rejected(); + void on_buttonBox_accepted(); +}; + +#endif // BIBLEINFORMATIONDIALOG_H diff --git a/bibleinformationdialog.ui b/bibleinformationdialog.ui new file mode 100644 index 0000000..f09eecd --- /dev/null +++ b/bibleinformationdialog.ui @@ -0,0 +1,130 @@ + + + BibleInformationDialog + + + + 0 + 0 + 400 + 300 + + + + Bible Information + + + + :/icons/icons/book.png:/icons/icons/book.png + + + + + + Bible Name: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Abbreviation: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Information\ +Copyright: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Qt::Vertical + + + + 20 + 143 + + + + + + + + Right to left + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + + + buttonBox + accepted() + BibleInformationDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + BibleInformationDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/biblesettingwidget.cpp b/biblesettingwidget.cpp new file mode 100644 index 0000000..201d9ec --- /dev/null +++ b/biblesettingwidget.cpp @@ -0,0 +1,661 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "biblesettingwidget.h" +#include "ui_biblesettingwidget.h" + +BibleSettingWidget::BibleSettingWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::BibleSettingWidget) +{ + ui->setupUi(this); +} + +BibleSettingWidget::~BibleSettingWidget() +{ + delete ui; +} + +void BibleSettingWidget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch ( e->type() ) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void BibleSettingWidget::setSettings(BibleSettings &settings, BibleSettings &settings2) +{ + mySettings = settings; + mySettings2 = settings2; + + loadSettings(); +} + +void BibleSettingWidget::getSettings(BibleSettings &settings, BibleSettings &settings2) +{ + // Effects + mySettings.useShadow = ui->checkBoxUseShadow->isChecked(); + mySettings.useFading = ui->checkBoxUseFading->isChecked(); + mySettings.useBlurShadow = ui->checkBoxUseBlurredShadow->isChecked(); + + mySettings2.useShadow = ui->checkBoxUseShadow2->isChecked(); + mySettings2.useFading = ui->checkBoxUseFading2->isChecked(); + mySettings2.useBlurShadow = ui->checkBoxUseBlurredShadow2->isChecked(); + + // Backgroud + mySettings.useBackground = ui->groupBoxBackground->isChecked(); + mySettings.backgroundName = ui->lineEditBackPath->text(); + + mySettings2.useBackground = ui->groupBoxBackground2->isChecked(); + mySettings2.backgroundName = ui->lineEditBackPath2->text(); + + //Alingment + mySettings.textAlingmentV = ui->comboBoxVerticalAling->currentIndex(); + mySettings.textAlingmentH = ui->comboBoxHorizontalAling->currentIndex(); + + mySettings2.textAlingmentV = ui->comboBoxVerticalAling2->currentIndex(); + mySettings2.textAlingmentH = ui->comboBoxHorizontalAling2->currentIndex(); + + //Caption Alignment + mySettings.captionPosition = ui->comboBoxCaptionPosition->currentIndex(); + mySettings.captionAlingment = ui->comboBoxCaptionAlign->currentIndex(); + + mySettings2.captionPosition = ui->comboBoxCaptionPosition2->currentIndex(); + mySettings2.captionAlingment = ui->comboBoxCaptionAlign2->currentIndex(); + + // Version Abbreviations + mySettings.useAbbriviation = ui->checkBoxAbbiviations->isChecked(); + mySettings2.useAbbriviation = ui->checkBoxAbbiviations2->isChecked(); + + // Max screen use + mySettings.screenUse = ui->spinBoxMaxScreen->value(); + mySettings.screenPosition = ui->comboBoxScreenPosition->currentIndex(); + + mySettings2.screenUse = ui->spinBoxMaxScreen2->value(); + mySettings2.screenPosition = ui->comboBoxScreenPosition2->currentIndex(); + + // Get if to use secodary screen settings + mySettings2.useDisp2settings = ui->groupBoxUseDisp2->isChecked(); + + settings = mySettings; + settings2 = mySettings2; +} + +void BibleSettingWidget::setBibleVersions(BibleVersionSettings &bver, BibleVersionSettings &bver2) +{ + bversion = bver; + bversion2 = bver2; + loadBibleVersions(); +} + +void BibleSettingWidget::getBibleVersions(BibleVersionSettings &bver, BibleVersionSettings &bver2) +{ + int pbx = ui->comboBoxPrimaryBible->currentIndex(); + int sbx = ui->comboBoxSecondaryBible->currentIndex(); + int tbx = ui->comboBoxTrinaryBible->currentIndex(); + int obx = ui->comboBoxOperatorBible->currentIndex(); + + // Get Bible version settings + if(pbx != -1) + { + // Primary + bversion.primaryBible = bible_id_list.at(pbx); + // Secondary + if(sbx <=0) + bversion.secondaryBible = "none"; + else + bversion.secondaryBible = secondary_id_list.at(sbx-1); + // Trinary + if(tbx <=0) + bversion.trinaryBible = "none"; + else + bversion.trinaryBible = trinary_id_list.at(tbx-1); + // Operatror + if(obx <=0) + bversion.operatorBible = "same"; + else + bversion.operatorBible = operator_id_list.at(obx-1); + } + else + { + // There are no bibles in the database + bversion.primaryBible = "none"; + bversion.secondaryBible = "none"; + bversion.trinaryBible = "none"; + bversion.operatorBible = "same"; + } + + // Get Bible versions for secondary screen + pbx = ui->comboBoxPrimaryBible2->currentIndex(); + sbx = ui->comboBoxSecondaryBible2->currentIndex(); + tbx = ui->comboBoxTrinaryBible2->currentIndex(); + if(pbx != -1) + { + // Primary + bversion2.primaryBible = bible_id_list.at(pbx); + // Secondary + if(sbx <=0) + bversion2.secondaryBible = "none"; + else + bversion2.secondaryBible = secondary_id_list2.at(sbx-1); + // Trinary + if(tbx <=0) + bversion2.trinaryBible = "none"; + else + bversion2.trinaryBible = trinary_id_list2.at(tbx-1); + } + else + { + // There are no bibles in the database + bversion2.primaryBible = "none"; + bversion2.secondaryBible = "none"; + bversion2.trinaryBible = "none"; + bversion2.operatorBible = "same"; + } + + bver = bversion; + bver2 = bversion2; +} + +void BibleSettingWidget::loadSettings() +{ + // Set Effects + ui->checkBoxUseShadow->setChecked(mySettings.useShadow); + ui->checkBoxUseFading->setChecked(mySettings.useFading); + ui->checkBoxUseBlurredShadow->setChecked(mySettings.useBlurShadow); + + ui->checkBoxUseShadow2->setChecked(mySettings2.useShadow); + ui->checkBoxUseFading2->setChecked(mySettings2.useFading); + ui->checkBoxUseBlurredShadow2->setChecked(mySettings2.useBlurShadow); + + // Set background use + ui->groupBoxBackground->setChecked(mySettings.useBackground); + ui->lineEditBackPath->setText(mySettings.backgroundName); + + ui->groupBoxBackground2->setChecked(mySettings2.useBackground); + ui->lineEditBackPath2->setText(mySettings2.backgroundName); + + // Set text color + QPalette p; + p.setColor(QPalette::Base,mySettings.textColor); + ui->graphicViewTextColor->setPalette(p); + + p.setColor(QPalette::Base,mySettings2.textColor); + ui->graphicViewTextColor2->setPalette(p); + + // Set text font + ui->labelFont->setText(getFontText(mySettings.textFont)); + ui->labelFont2->setText(getFontText(mySettings2.textFont)); + + // Set alingment + ui->comboBoxVerticalAling->setCurrentIndex(mySettings.textAlingmentV); + ui->comboBoxHorizontalAling->setCurrentIndex(mySettings.textAlingmentH); + + ui->comboBoxVerticalAling2->setCurrentIndex(mySettings2.textAlingmentV); + ui->comboBoxHorizontalAling2->setCurrentIndex(mySettings2.textAlingmentH); + + // Set caption color + p.setColor(QPalette::Base,mySettings.captionColor); + ui->graphicViewCaptionColor->setPalette(p); + + p.setColor(QPalette::Base,mySettings2.captionColor); + ui->graphicViewCaptionColor2->setPalette(p); + + // Set caption font + ui->labelFontCaption->setText(getFontText(mySettings.captionFont)); + ui->labelFontCaption2->setText(getFontText(mySettings2.captionFont)); + + // Set caption alignment + ui->comboBoxCaptionPosition->setCurrentIndex(mySettings.captionPosition); + ui->comboBoxCaptionPosition2->setCurrentIndex(mySettings2.captionPosition); + + ui->comboBoxCaptionAlign->setCurrentIndex(mySettings.captionAlingment); + ui->comboBoxCaptionAlign2->setCurrentIndex(mySettings2.captionAlingment); + + // Set abbriviations use + ui->checkBoxAbbiviations->setChecked(mySettings.useAbbriviation); + ui->checkBoxAbbiviations2->setChecked(mySettings2.useAbbriviation); + + // Set max screen use + ui->spinBoxMaxScreen->setValue(mySettings.screenUse); + ui->comboBoxScreenPosition->setCurrentIndex(mySettings.screenPosition); + + ui->spinBoxMaxScreen2->setValue(mySettings2.screenUse); + ui->comboBoxScreenPosition2->setCurrentIndex(mySettings2.screenPosition); + + // Set if to use secondary screen settings + ui->groupBoxUseDisp2->setChecked(mySettings2.useDisp2settings); + on_groupBoxUseDisp2_toggled(mySettings2.useDisp2settings); +} + +void BibleSettingWidget::loadBibleVersions() +{ + // Clear items if exitst + bibles.clear(); + bible_id_list.clear(); + + // Get Bibles that exist in the database + QSqlQuery sq; + sq.exec("SELECT bible_name, id FROM BibleVersions"); + while(sq.next()) + { + bibles << sq.value(0).toString(); + bible_id_list << sq.value(1).toString(); + } + sq.clear(); + + // Fill bibles comboboxes + ui->comboBoxPrimaryBible->clear(); + ui->comboBoxPrimaryBible->addItems(bibles); + ui->comboBoxSecondaryBible->clear(); + ui->comboBoxSecondaryBible->addItem(tr("None")); + ui->comboBoxSecondaryBible->addItems(bibles); + ui->comboBoxTrinaryBible->clear(); + ui->comboBoxTrinaryBible->addItem(tr("None")); + ui->comboBoxTrinaryBible->addItems(bibles); + ui->comboBoxOperatorBible->clear(); + ui->comboBoxOperatorBible->addItem(tr("Same as primary Bible")); + ui->comboBoxOperatorBible->addItems(bibles); + + ui->comboBoxPrimaryBible2->clear(); + ui->comboBoxPrimaryBible2->addItems(bibles); + ui->comboBoxSecondaryBible2->clear(); + ui->comboBoxSecondaryBible2->addItem(tr("None")); + ui->comboBoxSecondaryBible2->addItems(bibles); + ui->comboBoxTrinaryBible2->clear(); + ui->comboBoxTrinaryBible2->addItem(tr("None")); + ui->comboBoxTrinaryBible2->addItems(bibles); + + // Set current primary bible + if(bversion.primaryBible == "none") + ui->comboBoxPrimaryBible->setCurrentIndex(0); + else + ui->comboBoxPrimaryBible->setCurrentIndex(bible_id_list.indexOf(bversion.primaryBible)); + + if(bversion2.primaryBible == "none") + ui->comboBoxPrimaryBible2->setCurrentIndex(0); + else + ui->comboBoxPrimaryBible2->setCurrentIndex(bible_id_list.indexOf(bversion2.primaryBible)); + + // Set current secondary bible + if(bversion.secondaryBible == "none") + ui->comboBoxSecondaryBible->setCurrentIndex(0); + else + ui->comboBoxSecondaryBible->setCurrentIndex(bible_id_list.indexOf(bversion.secondaryBible)+1); + + if(bversion2.secondaryBible == "none") + ui->comboBoxSecondaryBible2->setCurrentIndex(0); + else + ui->comboBoxSecondaryBible2->setCurrentIndex(bible_id_list.indexOf(bversion2.secondaryBible)+1); + + // Set current trinaty bibile + if(bversion.trinaryBible == "none") + ui->comboBoxTrinaryBible->setCurrentIndex(0); + else + ui->comboBoxTrinaryBible->setCurrentIndex(bible_id_list.indexOf(bversion.trinaryBible)+1); + updateSecondaryBibleMenu(); + + if(bversion2.trinaryBible == "none") + ui->comboBoxTrinaryBible2->setCurrentIndex(0); + else + ui->comboBoxTrinaryBible2->setCurrentIndex(bible_id_list.indexOf(bversion2.trinaryBible)+1); + updateSecondaryBibleMenu2(); + + // Set current operator bibile + if(bversion.operatorBible == "same") + ui->comboBoxOperatorBible->setCurrentIndex(0); + else + ui->comboBoxOperatorBible->setCurrentIndex(bible_id_list.indexOf(bversion.operatorBible)+1); + updateOperatorBibleMenu(); +} + +void BibleSettingWidget::updateSecondaryBibleMenu() +{ + QString pbible = ui->comboBoxPrimaryBible->currentText(); + QString sbible = ui->comboBoxSecondaryBible->currentText(); + secondary_bibles = bibles; + secondary_bibles.removeOne(pbible); + + secondary_id_list = bible_id_list; + secondary_id_list.removeAt(ui->comboBoxPrimaryBible->currentIndex()); + ui->comboBoxSecondaryBible->clear(); + ui->comboBoxSecondaryBible->addItem(tr("None")); + ui->comboBoxSecondaryBible->addItems(secondary_bibles); + + int i = ui->comboBoxSecondaryBible->findText(sbible); + if( i != -1 ) + // The same secondary bible is still available + ui->comboBoxSecondaryBible->setCurrentIndex(i); + + updateTrinaryBibleMenu(); +} + +void BibleSettingWidget::updateSecondaryBibleMenu2() +{ + QString pbible = ui->comboBoxPrimaryBible2->currentText(); + QString sbible = ui->comboBoxSecondaryBible2->currentText(); + secondary_bibles2 = bibles; + secondary_bibles2.removeOne(pbible); + + secondary_id_list2 = bible_id_list; + secondary_id_list2.removeAt(ui->comboBoxPrimaryBible2->currentIndex()); + ui->comboBoxSecondaryBible2->clear(); + ui->comboBoxSecondaryBible2->addItem(tr("None")); + ui->comboBoxSecondaryBible2->addItems(secondary_bibles2); + + int i = ui->comboBoxSecondaryBible2->findText(sbible); + if( i != -1 ) // The same secondary bible is still available + ui->comboBoxSecondaryBible2->setCurrentIndex(i); + + updateTrinaryBibleMenu2(); +} + +void BibleSettingWidget::updateTrinaryBibleMenu() +{ + if (ui->comboBoxSecondaryBible->currentIndex() == 0) + { + ui->comboBoxTrinaryBible->setCurrentIndex(0); + ui->comboBoxTrinaryBible->setEnabled(false); + } + else + { + ui->comboBoxTrinaryBible->setEnabled(true); + QString sbible = ui->comboBoxSecondaryBible->currentText(); + QString tbible = ui->comboBoxTrinaryBible->currentText(); + QStringList trinary_bibles = secondary_bibles; + trinary_bibles.removeOne(sbible); + + trinary_id_list = secondary_id_list; + trinary_id_list.removeAt(ui->comboBoxSecondaryBible->currentIndex()-1); + ui->comboBoxTrinaryBible->clear(); + ui->comboBoxTrinaryBible->addItem(tr("None")); + ui->comboBoxTrinaryBible->addItems(trinary_bibles); + + int i = ui->comboBoxTrinaryBible->findText(tbible); + if( i != -1 ) + // The same secondary bible is still available + ui->comboBoxTrinaryBible->setCurrentIndex(i); + } +} + +void BibleSettingWidget::updateTrinaryBibleMenu2() +{ + if (ui->comboBoxSecondaryBible2->currentIndex() == 0) + { + ui->comboBoxTrinaryBible2->setCurrentIndex(0); + ui->comboBoxTrinaryBible2->setEnabled(false); + } + else + { + ui->comboBoxTrinaryBible2->setEnabled(true); + QString sbible = ui->comboBoxSecondaryBible2->currentText(); + QString tbible = ui->comboBoxTrinaryBible2->currentText(); + QStringList trinary_bibles = secondary_bibles2; + trinary_bibles.removeOne(sbible); + + trinary_id_list2 = secondary_id_list2; + trinary_id_list2.removeAt(ui->comboBoxSecondaryBible2->currentIndex()-1); + ui->comboBoxTrinaryBible2->clear(); + ui->comboBoxTrinaryBible2->addItem(tr("None")); + ui->comboBoxTrinaryBible2->addItems(trinary_bibles); + + int i = ui->comboBoxTrinaryBible2->findText(tbible); + if( i != -1 ) + // The same secondary bible is still available + ui->comboBoxTrinaryBible2->setCurrentIndex(i); + } +} + +void BibleSettingWidget::updateOperatorBibleMenu() +{ + QString pbible = ui->comboBoxPrimaryBible->currentText(); + QString obible = ui->comboBoxOperatorBible->currentText(); + QStringList operator_bibles = bibles; + operator_bibles.removeOne(pbible); + + operator_id_list = bible_id_list; + operator_id_list.removeAt(ui->comboBoxPrimaryBible->currentIndex()); + ui->comboBoxOperatorBible->clear(); + ui->comboBoxOperatorBible->addItem(tr("Same as primary Bible")); + ui->comboBoxOperatorBible->addItems(operator_bibles); + + int i = ui->comboBoxOperatorBible->findText(obible); + if( i != -1 ) + // The same operaotr bible is still available + ui->comboBoxOperatorBible->setCurrentIndex(i); +} + +void BibleSettingWidget::setDispScreen2Visible(bool visible) +{ + ui->groupBoxUseDisp2->setVisible(visible); +} + +void BibleSettingWidget::on_comboBoxPrimaryBible_activated(const QString &arg1) +{ + updateSecondaryBibleMenu(); + updateOperatorBibleMenu(); +} + +void BibleSettingWidget::on_comboBoxPrimaryBible2_activated(const QString &arg1) +{ + updateSecondaryBibleMenu2(); + updateTrinaryBibleMenu2(); +} + +void BibleSettingWidget::on_comboBoxSecondaryBible_activated(const QString &arg1) +{ + updateTrinaryBibleMenu(); +} + +void BibleSettingWidget::on_comboBoxSecondaryBible2_activated(const QString &arg1) +{ + updateTrinaryBibleMenu2(); +} + +void BibleSettingWidget::on_checkBoxUseShadow_stateChanged(int arg1) +{ + if(arg1==2) + ui->checkBoxUseBlurredShadow->setEnabled(true); + else + { + ui->checkBoxUseBlurredShadow->setChecked(false); + ui->checkBoxUseBlurredShadow->setEnabled(false); + } +} + +void BibleSettingWidget::on_checkBoxUseShadow2_stateChanged(int arg1) +{ + if(arg1==2) + ui->checkBoxUseBlurredShadow2->setEnabled(true); + else + { + ui->checkBoxUseBlurredShadow2->setChecked(false); + ui->checkBoxUseBlurredShadow2->setEnabled(false); + } +} + +void BibleSettingWidget::on_buttonBrowseBackground_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for Bible wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + if(p.width()>1280 || p.height()>1280) + mySettings.backgroundPix = p.scaled(1280,1280,Qt::KeepAspectRatio); + else + mySettings.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings.backgroundName = filename; + ui->lineEditBackPath->setText(filename); + } +} + +void BibleSettingWidget::on_buttonBrowseBackground2_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for Bible wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + if(p.width()>1280 || p.height()>1280) + mySettings2.backgroundPix = p.scaled(1280,1280,Qt::KeepAspectRatio); + else + mySettings2.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings2.backgroundName = filename; + ui->lineEditBackPath2->setText(filename); + } +} + +void BibleSettingWidget::on_toolButtonTextColor_clicked() +{ + QColor c(QColorDialog::getColor(mySettings.textColor,this)); + if(c.isValid()) + mySettings.textColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings.textColor); + ui->graphicViewTextColor->setPalette(p); +} + +void BibleSettingWidget::on_toolButtonTextColor2_clicked() +{ + QColor c(QColorDialog::getColor(mySettings2.textColor,this)); + if(c.isValid()) + mySettings2.textColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings2.textColor); + ui->graphicViewTextColor2->setPalette(p); +} + +void BibleSettingWidget::on_toolButtonTextFont_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings.textFont,this); + if(ok) + mySettings.textFont = font; + + ui->labelFont->setText(getFontText(mySettings.textFont)); +} + +void BibleSettingWidget::on_toolButtonTextFont2_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings2.textFont,this); + if(ok) + mySettings2.textFont = font; + + ui->labelFont2->setText(getFontText(mySettings2.textFont)); +} + +void BibleSettingWidget::on_toolButtonCaptionColor_clicked() +{ + QColor c(QColorDialog::getColor(mySettings.captionColor,this)); + if(c.isValid()) + mySettings.captionColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings.captionColor); + ui->graphicViewCaptionColor->setPalette(p); +} + +void BibleSettingWidget::on_toolButtonCaptionColor2_clicked() +{ + QColor c(QColorDialog::getColor(mySettings2.captionColor,this)); + if(c.isValid()) + mySettings2.captionColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings2.captionColor); + ui->graphicViewCaptionColor2->setPalette(p); +} + +void BibleSettingWidget::on_toolButtonCaptionFont_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings.captionFont,this); + if(ok) + mySettings.captionFont = font; + + ui->labelFontCaption->setText(getFontText(mySettings.captionFont)); +} + +void BibleSettingWidget::on_toolButtonCaptionFont2_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings2.captionFont,this); + if(ok) + mySettings2.captionFont = font; + + ui->labelFontCaption2->setText(getFontText(mySettings2.captionFont)); +} + +void BibleSettingWidget::on_groupBoxUseDisp2_toggled(bool arg1) +{ + ui->widgetBibles2->setVisible(arg1); + ui->groupBoxEffects2->setVisible(arg1); + ui->groupBoxBackground2->setVisible(arg1); + ui->groupBoxMaxScreen2->setVisible(arg1); + ui->groupBoxCaptionProperties2->setVisible(arg1); + ui->groupBoxTextProperties2->setVisible(arg1); + ui->checkBoxAbbiviations2->setVisible(arg1); +} + +void BibleSettingWidget::on_pushButtonDefault_clicked() +{ + BibleSettings b; + mySettings = b; + mySettings2 = b; + loadSettings(); +} + +QString BibleSettingWidget::getFontText(QFont font) +{ + QString st(QString("%1: %2").arg(font.rawName()).arg(font.pointSize())); + if(font.bold()) + st += ", " + tr("Bold"); + if(font.italic()) + st += ", " + tr("Italic"); + if(font.strikeOut()) + st += ", " + tr("StrikeOut"); + if(font.underline()) + st += ", " + tr("Underline"); + + return st; +} + +void BibleSettingWidget::on_pushButtonApplyToAll_clicked() +{ + emit applyBackToAll(1,mySettings.backgroundName,mySettings.backgroundPix); +} + +void BibleSettingWidget::setBackgroungds(QString name, QPixmap back) +{ + mySettings.backgroundName = name; + mySettings.backgroundPix = back; + mySettings2.backgroundName = name; + mySettings2.backgroundPix = back; + ui->lineEditBackPath->setText(name); + ui->lineEditBackPath2->setText(name); +} diff --git a/biblesettingwidget.h b/biblesettingwidget.h new file mode 100644 index 0000000..17a3d8c --- /dev/null +++ b/biblesettingwidget.h @@ -0,0 +1,94 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef BIBLESETTINGWIDGET_H +#define BIBLESETTINGWIDGET_H + +#include +#include +#include "theme.h" +#include "settings.h" +#include "spfunctions.h" + +namespace Ui { +class BibleSettingWidget; +} + +class BibleSettingWidget : public QWidget +{ + Q_OBJECT + +public: + explicit BibleSettingWidget(QWidget *parent = 0); + ~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 setDispScreen2Visible(bool visible); + void setBackgroungds(QString name, QPixmap back); + +signals: + void applyBackToAll(int t, QString backName, QPixmap background); + +private slots: + void loadSettings(); + void loadBibleVersions(); + void updateSecondaryBibleMenu(); + void updateSecondaryBibleMenu2(); + void updateTrinaryBibleMenu(); + void updateTrinaryBibleMenu2(); + void updateOperatorBibleMenu(); + + void on_comboBoxPrimaryBible_activated(const QString &arg1); + void on_comboBoxPrimaryBible2_activated(const QString &arg1); + void on_comboBoxSecondaryBible_activated(const QString &arg1); + void on_comboBoxSecondaryBible2_activated(const QString &arg1); + void on_buttonBrowseBackground_clicked(); + void on_buttonBrowseBackground2_clicked(); + void on_checkBoxUseShadow_stateChanged(int arg1); + void on_checkBoxUseShadow2_stateChanged(int arg1); + void on_toolButtonTextColor_clicked(); + void on_toolButtonTextColor2_clicked(); + void on_toolButtonTextFont_clicked(); + void on_toolButtonTextFont2_clicked(); + void on_toolButtonCaptionColor_clicked(); + void on_toolButtonCaptionColor2_clicked(); + void on_toolButtonCaptionFont_clicked(); + void on_toolButtonCaptionFont2_clicked(); + void on_groupBoxUseDisp2_toggled(bool arg1); + void on_pushButtonDefault_clicked(); + + QString getFontText(QFont font); + void on_pushButtonApplyToAll_clicked(); + +private: + 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; + Ui::BibleSettingWidget *ui; +protected: + virtual void changeEvent(QEvent *e); +}; + +#endif // BIBLESETTINGWIDGET_H diff --git a/biblesettingwidget.ui b/biblesettingwidget.ui new file mode 100644 index 0000000..da0aa4f --- /dev/null +++ b/biblesettingwidget.ui @@ -0,0 +1,1427 @@ + + + BibleSettingWidget + + + + 0 + 0 + 426 + 1015 + + + + + 9 + + + 9 + + + 9 + + + + + + + Primary Bible: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + Secondary Bible: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + Trinary Bible: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + Operator Screen Bible: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + This bible version will be used for the operator to select verses and search bible + + + + + + + + + Effects + + + + + + 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 + + + + + + + + + + Use Background Image + + + true + + + + + + true + + + + + + + Browse... + + + + + + + Apply this background to all active backgrounds. + + + + :/icons/icons/apply_to_all.png:/icons/icons/apply_to_all.png + + + + + + + + + + Text Properties + + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + 0 + 0 + + + + true + + + + + + + + + + + Alignment: + + + + + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + Caption Properties + + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + 0 + 0 + + + + true + + + + + + + + + + + Position: + + + + + + + + Above Text + + + + + Below Text + + + + + + + + Alignment: + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + Show Bible Version Abbriviation + + + + + + + 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 + + + + + Botton of Screen + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + 170 + 85 + 255 + + + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + 170 + 85 + 255 + + + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 51 + 153 + 255 + + + + + + + + Use Separate Secondary Display Screen Settings + + + true + + + true + + + + 0 + + + 0 + + + 0 + + + + + + 0 + + + + + Primary Bible: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + Secondary Bible: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + Trinary Bible: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Effects + + + + + + 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 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Use Background Image + + + true + + + + + + true + + + + + + + Browse... + + + + + + + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Text Properties + + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + 0 + 0 + + + + true + + + + + + + + + + + Alignment: + + + + + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Caption Properties + + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 20 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + 0 + 0 + + + + true + + + + + + + + + + + Position: + + + + + + + + Above Text + + + + + Below Text + + + + + + + + Alignment: + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + Show Bible Version Abbriviation + + + + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 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 + + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + Reset All To Default + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + comboBoxPrimaryBible + comboBoxSecondaryBible + comboBoxTrinaryBible + comboBoxOperatorBible + checkBoxUseFading + checkBoxUseShadow + checkBoxUseBlurredShadow + groupBoxBackground + buttonBrowseBackground + lineEditBackPath + toolButtonTextColor + graphicViewTextColor + toolButtonTextFont + comboBoxVerticalAling + comboBoxHorizontalAling + toolButtonCaptionColor + graphicViewCaptionColor + toolButtonCaptionFont + comboBoxCaptionPosition + comboBoxCaptionAlign + checkBoxAbbiviations + spinBoxMaxScreen + comboBoxScreenPosition + groupBoxUseDisp2 + comboBoxPrimaryBible2 + comboBoxSecondaryBible2 + comboBoxTrinaryBible2 + checkBoxUseFading2 + checkBoxUseShadow2 + checkBoxUseBlurredShadow2 + groupBoxBackground2 + buttonBrowseBackground2 + lineEditBackPath2 + toolButtonTextColor2 + graphicViewTextColor2 + toolButtonTextFont2 + comboBoxVerticalAling2 + comboBoxHorizontalAling2 + toolButtonCaptionColor2 + graphicViewCaptionColor2 + toolButtonCaptionFont2 + comboBoxCaptionPosition2 + comboBoxCaptionAlign2 + checkBoxAbbiviations2 + spinBoxMaxScreen2 + comboBoxScreenPosition2 + pushButtonDefault + + + + + + diff --git a/biblewidget.cpp b/biblewidget.cpp new file mode 100644 index 0000000..26c2bd9 --- /dev/null +++ b/biblewidget.cpp @@ -0,0 +1,568 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "biblewidget.h" +#include "ui_biblewidget.h" +#include "song.h" +//#include + +//double diffclock(clock_t clock1,clock_t clock2) +//{ +// double diffticks=clock1-clock2; +// double diffms=(diffticks*1000)/CLOCKS_PER_SEC; +// return diffms; +//} + +BibleWidget::BibleWidget(QWidget *parent) : + QWidget(parent), ui(new Ui::BibleWidget) +{ + ui->setupUi(this); + on_hide_result_button_clicked(); + + chapter_validator = new QIntValidator(1, 1, ui->chapter_ef); + verse_validator = new QIntValidator(1, 1, ui->verse_ef); + + ui->chapter_ef->setValidator( chapter_validator ); + ui->verse_ef->setValidator( verse_validator ); + + highlight = new HighlighterDelegate(ui->search_results_list); + ui->search_results_list->setItemDelegate(highlight); +} + +BibleWidget::~BibleWidget() +{ + delete chapter_validator; + delete verse_validator; + delete ui; +} + +void BibleWidget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void BibleWidget::setSettings(BibleVersionSettings &sets) +{ + QString initial_bible = mySettings.operatorBible; + mySettings = sets; + loadBibles(initial_bible); +} + +void BibleWidget::loadBibles(QString initialId) +{ + // if operator bible = "same", then set it to primary bible + if(mySettings.operatorBible == "same") + mySettings.operatorBible = mySettings.primaryBible; + + // make sure that program does not drop if no bible is present + if(mySettings.operatorBible == "none") + ui->btnLive->setEnabled(false); + else + ui->btnLive->setEnabled(true); + + // Check if primary bible is different that what has been loaded already + // If it is different, then reload the bible list + if(initialId!=mySettings.operatorBible) + { + bible.setBiblesId(mySettings.operatorBible); + bible.loadOperatorBible(); + ui->listBook->clear(); + ui->listBook->addItems(bible.getBooks()); + ui->listBook->setCurrentRow(0); + } +} + +void BibleWidget::on_listBook_currentTextChanged(QString currentText) +{ + int s = ui->listBook->currentRow(); + if( s != -1 ) + { + int max_chapter = bible.books.at(bible.getCurrentBookRow(currentText)).chapterCount; + ui->listChapterNum->clear(); + for(int i=0; ilistChapterNum->addItem(QString::number(i+1)); + chapter_validator->setTop(max_chapter); + if( ui->listChapterNum->currentRow() != 0 ) + ui->listChapterNum->setCurrentRow(0); + } + else + { + // No bible book selected + chapter_validator->setTop(1); + ui->listChapterNum->clear(); + } +} + +void BibleWidget::on_listChapterNum_currentTextChanged(QString currentText) +{ + int s = ui->listChapterNum->currentRow(); + if( s != -1 ) + { + // This optimization is required in order for the bible filter entry field to work fast: + if( currentBook != getCurrentBook() || currentChapter != currentText.toInt() ) + { + currentBook = getCurrentBook(); + currentChapter = currentText.toInt(); + currentChapterList = bible.getChapter(bible.books.at(bible.getCurrentBookRow(currentBook)).bookId.toInt(), currentChapter); + } + + ui->chapter_preview_list->clear(); + ui->chapter_preview_list->addItems(currentChapterList); + ui->chapter_ef->setText(currentText); + verse_validator->setTop(ui->chapter_preview_list->count()); + ui->chapter_preview_list->setCurrentRow(0); + } + else + { + ui->chapter_preview_list->clear(); + } +} + +QString BibleWidget::getCurrentBook() +{ + return ui->listBook->currentItem()->text(); +} + +int BibleWidget::getCurrentChapter() +{ + return ui->listChapterNum->currentItem()->text().toInt(); +} + +/* +bool BibleWidget::eventFilter(QObject *object, QEvent *event) +{ + if (object == ui->spinVerse && event->type() == QEvent::KeyPress) + { + QKeyEvent *keyEvent = static_cast(event); + if (keyEvent->key() == Qt::KeyDown) { + qDebug() << "DOWN KEY"; + // Special tab handling + return true; + } else + return false; + } + return false; +} +*/ + +void BibleWidget::on_chapter_preview_list_currentRowChanged(int currentRow) +{ + ui->verse_ef->setText(QString::number(currentRow+1)); +} + +void BibleWidget::on_chapter_preview_list_doubleClicked(QModelIndex index) +{ + // Called when a chapter or verse is double clicked + sendToProjector(true); +} + +void BibleWidget::sendToProjector(bool add_to_history) +{ + bible.currentIdList = bible.previewIdList; + QItemSelection selectedItems = ui->chapter_preview_list->selectionModel()->selection(); + // Get the caption string to show above the show list (right-most list) + QString cap = QString("%1 %2").arg(ui->listBook->currentItem()->text()).arg(ui->listChapterNum->currentItem()->text()); + emit goLive(bible.verseList, cap,selectedItems); + if (add_to_history) + addToHistory(); +} + +void BibleWidget::on_lineEditBook_textChanged(QString text) +{ + // Called when the bible book filter field is modified. + QStringList all_books = bible.getBooks(); + + // Remove trailing spaces: + text = text.trimmed(); + + int chapter = 0; + int verse = 0; + + // Check whether the user entered a search string that include book, chapter, + // and verse. For example: "1King 3 13" + QStringList search_words = text.split(" "); + + // Allows the user to use more than one space as a seperator: + search_words.removeAll(""); + + if( search_words.count() > 1 ) + { + bool ok; + int num1 = search_words.last().toInt(&ok); + if( ok ) + { + chapter = num1; + search_words.removeLast(); + if( search_words.count() > 1 ) + { + bool ok2; + int num2 = search_words.last().toInt(&ok2); + if( ok2 ) + { + search_words.removeLast(); + chapter = num2; + verse = num1; + } + } + text = search_words.join(" "); + } + } + + // Now search all books to find the matching book: + if( text.isEmpty() ) + { + // Show all bible books + if( ui->listBook->count() != all_books.count() ) + { + // This is an important optimization + ui->listBook->clear(); + ui->listBook->addItems(all_books); + } + } + else + { + // Show only the bible books that match the filter + QStringList filtered_books; + if( text.at(0).isDigit() ) + { + // First character of filter text is a number. Special search, where the + // first character must be the first character of the first word of the book; + // while the rest of the filter must be the beginning of the second book word. + QString num_str(text.at(0)); + QString name_str = text.remove(0, 1); + for(int i=0; ilistBook->count() != filtered_books.count() ) + { + // This is an important optimization + // FIXME don't just check the count; check values + ui->listBook->clear(); + ui->listBook->addItems(filtered_books); + } + } + + if( ui->listBook->count() > 0 ) + // Select the first row. This will take a longer time only if it will cause + // a new chapter to be loaded into the preview + ui->listBook->setCurrentRow(0); + + if( chapter != 0 && chapter <= ui->listChapterNum->count() ) + { + if( ui->listChapterNum->currentRow() != (chapter-1) ) + ui->listChapterNum->setCurrentRow(chapter-1); + if( verse != 0 && verse <= ui->chapter_preview_list->count() ) + ui->chapter_preview_list->setCurrentRow(verse-1); + } +} + +void BibleWidget::on_btnLive_clicked() +{ + sendToProjector(true); +} + +void BibleWidget::on_verse_ef_textChanged(QString new_string) +{ + int value = new_string.toInt(); + ui->chapter_preview_list->setCurrentRow(value-1); +} + +void BibleWidget::on_chapter_ef_textChanged(QString new_string) +{ + int value = new_string.toInt(); + ui->listChapterNum->setCurrentRow(value-1); +} + +void BibleWidget::on_search_button_clicked() +{ + QString search_text = ui->search_ef->text(); + search_text = clean(search_text); // remove all none alphanumeric charecters + + // Make sure that there is some text to do a search for, if none, then return + if(search_text.count()<1) + { + ui->search_ef->clear(); + ui->search_ef->setPlaceholderText(tr("Please enter search text")); + return; + } + + emit setWaitCursor(); + int type = ui->comboBoxSearchType->currentIndex(); + int range = ui->comboBoxSearchRange->currentIndex(); + + QRegExp rx, rxh; + rx.setCaseSensitivity(Qt::CaseInsensitive); + search_text.replace(" ","\\W*"); + if(type == 0) + { + // Search text phrase + rx.setPattern(search_text); + rxh.setPattern(search_text); + } + else if(type == 1) + { + // Search whole word exsact phrase only + rx.setPattern("\\b"+search_text+"\\b"); + rxh.setPattern("\\b"+search_text+"\\b"); + } + else if(type == 2) + { + // Search begining of every line + rx.setPattern("^"+search_text); + rxh.setPattern(search_text); + } + else if(type == 3 || type == 4) + { + // Search for any of the search words + search_text.replace("\\W*","|"); + rx.setPattern("\\b("+search_text+")\\b"); + rxh.setPattern("\\b("+search_text+")\\b"); + } + + highlight->highlighter->setHighlightText(rxh.pattern()); // set highlighting rule + + if(range == 0) // Search entire Bible + search_results = bible.searchBible((type == 4),rx); + else if(range == 1) // Search current book only + search_results = bible.searchBible((type == 4),rx, + bible.books.at(bible.getCurrentBookRow(ui->listBook->currentItem()->text())).bookId.toInt()); + else if (range == 2) // Search current chapter only + search_results = bible.searchBible((type == 4),rx, + bible.books.at(bible.getCurrentBookRow(ui->listBook->currentItem()->text())).bookId.toInt(), + ui->listChapterNum->currentItem()->text().toInt()); + + ui->search_results_list->clear(); + + if (!search_results.isEmpty()) // If have results, then show them + { + if( not ui->result_label->isVisible() ) + { + ui->lineEditBook->clear(); + hidden_splitter_state = ui->results_splitter->saveState(); + ui->result_label->show(); + ui->result_count_label->show(); + ui->search_results_list->show(); + ui->hide_result_button->show(); + ui->search_layout->addItem(ui->results_layout); + ui->results_splitter->restoreState(shown_splitter_state); + } + QStringList verse_list; + int count = search_results.count(); + + ui->result_count_label->setText(tr("Total\nresutls:\n%1").arg(count)); + + for(int i(0);isearch_results_list->addItems(verse_list); + } + else // If no relust, notify the user and hide result list + ui->result_count_label->setText(tr("No search\nresults.")); + + emit setArrowCursor(); +} + +void BibleWidget::on_hide_result_button_clicked() +{ + shown_splitter_state = ui->results_splitter->saveState(); + ui->result_label->hide(); + ui->result_count_label->hide(); + ui->search_results_list->hide(); + ui->hide_result_button->hide(); + ui->search_layout->removeItem(ui->results_layout); + ui->results_splitter->restoreState(hidden_splitter_state); +} + +void BibleWidget::on_search_results_list_currentRowChanged(int currentRow) +{ + if (currentRow >=0) + { + QStringList all_books = bible.getBooks(); + + if(ui->listBook->count() != all_books.count()) + { + ui->listBook->clear(); + ui->listBook->addItems(all_books); + } + + int row = all_books.indexOf(search_results.at(currentRow).book); + ui->listBook->setCurrentRow(row); + + ui->chapter_ef->setText(search_results.at(currentRow).chapter); + ui->verse_ef->setText(search_results.at(currentRow).verse); + } +} + +void BibleWidget::on_search_results_list_doubleClicked(QModelIndex index) +{ + on_search_results_list_currentRowChanged(index.row()); + on_btnLive_clicked(); +} + +void BibleWidget::addToHistory() +{ + BibleHistory b = getCurrentVerse(); + history_items.append(b); + ui->history_listWidget->addItem(b.captionLong); +} + +void BibleWidget::addToHistory(BibleHistory &b) +{ + history_items.append(b); + ui->history_listWidget->addItem(b.captionLong); +} + +void BibleWidget::clearHistory() +{ + ui->history_listWidget->clear(); + history_items.clear(); +} + +void BibleWidget::on_history_listWidget_currentRowChanged(int currentRow) +{ + if (currentRow >= 0) + { + BibleHistory bh = history_items.at(currentRow); + setSelectedHistory(bh); + } +} + +void BibleWidget::setSelectedHistory(BibleHistory &b) +{ + QStringList all_books = bible.getBooks(); + if(ui->listBook->count()!=all_books.count()) + { + ui->listBook->clear(); + ui->listBook->addItems(all_books); + } + QString bk; + int ch,vr,vrl; + bible.getVerseRef(b.verseIds,bk,ch,vr); + vrl = bible.getVerseNumberLast(b.verseIds); + + ui->listBook->setCurrentRow(all_books.indexOf(bk)); + ui->chapter_ef->setText(QString::number(ch)); + QItemSelection sel; + sel.select(ui->chapter_preview_list->model()->index(vr-1,0,QModelIndex()), + ui->chapter_preview_list->model()->index(vrl-1,0,QModelIndex())); + ui->chapter_preview_list->clearSelection(); + ui->verse_ef->setText(QString::number(vr)); + ui->chapter_preview_list->selectionModel()->select(sel,QItemSelectionModel::Select); +} + +void BibleWidget::on_history_listWidget_doubleClicked(QModelIndex index) +{ + sendToProjector( false); +} + +QByteArray BibleWidget::getHiddenSplitterState() +{ + if(ui->hide_result_button->isHidden()) + hidden_splitter_state = ui->results_splitter->saveState(); + return hidden_splitter_state; +} + +QByteArray BibleWidget::getShownSplitterState() +{ + if(!ui->hide_result_button->isHidden()) + shown_splitter_state = ui->results_splitter->saveState(); + return shown_splitter_state; +} + +void BibleWidget::setHiddenSplitterState(QByteArray& state) +{ + hidden_splitter_state = state; + ui->results_splitter->restoreState(hidden_splitter_state); +} + +void BibleWidget::setShownSplitterState(QByteArray& state) +{ + shown_splitter_state = state; +} + +BibleHistory BibleWidget::getCurrentVerse() +{ + BibleHistory b; + QString selected_ids; + + QString book = ui->listBook->currentItem()->text(); + QString chapter = ui->chapter_ef->text(); + + int first_selected(-1),last_selected(-1); + for(int i(0);ichapter_preview_list->count();++i) + { + if(ui->chapter_preview_list->item(i)->isSelected()) + { + if(first_selected == -1) + first_selected = i; + last_selected = i; + selected_ids += bible.previewIdList.at(i) + ","; + } + } + selected_ids.chop(1); + + QString verse_text = ui->chapter_preview_list->item(first_selected)->text().trimmed(); + b.verseIds = selected_ids; + + if(first_selected==last_selected) + { + b.caption = book + " " + chapter + ":" + QString::number(first_selected+1); + b.captionLong = book + " " + chapter + ":" + verse_text; + } + else + { // Create multi verse caption for display + int f(first_selected+1), l(last_selected+1),j(0); + QString v=verse_text,p="."; + while(v.at(j)!=p.at(0)) + ++j; + v = v.remove(0,j); + + b.caption = book + " " + chapter + ":" + QString::number(f) + "-" + QString::number(l); + b.captionLong = book + " " + chapter + ":" + QString::number(f) + "-" + QString::number(l) + v + "..."; + } + + return b; +} + +bool BibleWidget::isVerseSelected() +{ + if(ui->chapter_preview_list->selectedItems().count() >= 1) + return true; + else + return false; +} diff --git a/biblewidget.h b/biblewidget.h new file mode 100644 index 0000000..2a9cd32 --- /dev/null +++ b/biblewidget.h @@ -0,0 +1,100 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef BIBLEWIDGET_H +#define BIBLEWIDGET_H + +#include +#include +#include +#include "bible.h" +#include "highlight.h" +#include "settings.h" + +namespace Ui { +class BibleWidget; +} + +class BibleWidget : public QWidget { + Q_OBJECT + Q_DISABLE_COPY(BibleWidget) +public: + explicit BibleWidget(QWidget *parent = 0); + virtual ~BibleWidget(); + Bible bible; + QString getCurrentBook(); + + // For optimization: + QString currentBook; + int currentChapter; + QStringList currentChapterList; + + int getCurrentChapter(); + +public slots: + QByteArray getHiddenSplitterState(); + QByteArray getShownSplitterState(); + void setHiddenSplitterState(QByteArray& state); + void setShownSplitterState(QByteArray& state); + void loadBibles(QString initialId); + void sendToProjector(bool add_to_history); + void setSettings(BibleVersionSettings& sets); + BibleHistory getCurrentVerse(); + void addToHistory(BibleHistory &b); + void clearHistory(); + void setSelectedHistory(BibleHistory &b); + bool isVerseSelected(); + +protected: + virtual void changeEvent(QEvent *e); + +signals: + void setWaitCursor(); + void setArrowCursor(); + void goLive(QStringList chapter_list, QString caption, QItemSelection selectItems); + +private slots: + void on_history_listWidget_doubleClicked(QModelIndex index); + void on_history_listWidget_currentRowChanged(int currentRow); + void on_search_results_list_doubleClicked(QModelIndex index); + void on_search_results_list_currentRowChanged(int currentRow); + void on_hide_result_button_clicked(); + void on_search_button_clicked(); + void on_chapter_ef_textChanged(QString new_string); + void on_verse_ef_textChanged(QString new_string); + void on_btnLive_clicked(); + void on_lineEditBook_textChanged(QString ); + void on_chapter_preview_list_doubleClicked(QModelIndex index); + void on_chapter_preview_list_currentRowChanged(int currentRow); + void on_listChapterNum_currentTextChanged(QString currentText); + void on_listBook_currentTextChanged(QString currentText); + void addToHistory(); + +private: + BibleVersionSettings mySettings; + Ui::BibleWidget *ui; + HighlighterDelegate *highlight; + QList search_results; + QList history_items; + QIntValidator *chapter_validator, *verse_validator; + QByteArray hidden_splitter_state, shown_splitter_state; + QButtonGroup search_type_buttongroup; +}; + +#endif // BIBLEWIDGET_H diff --git a/biblewidget.ui b/biblewidget.ui new file mode 100644 index 0000000..1126b4a --- /dev/null +++ b/biblewidget.ui @@ -0,0 +1,589 @@ + + + BibleWidget + + + + 0 + 0 + 488 + 772 + + + + + 400 + 0 + + + + Form + + + + + + Qt::Vertical + + + false + + + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Search: + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + Search the bible for specified text. Matched verses will appear in the list below. If a bible book is selected, only that book will be searched. + + + + + + + Select search range + + + + Entire Bible + + + + + Current Book + + + + + Current Chapter + + + + + + + + Select search type + + + + Contains Phrase + + + + + Contains Word Phrase + + + + + Verse Begins + + + + + Contains Any Word + + + + + Contains All Words + + + + + + + + Quickly display the selected Bible verse on the screen + + + Search + + + + :/icons/icons/search.png:/icons/icons/search.png + + + Return + + + + + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 20 + + + + Results: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + + + + + 0 + 61 + 90 + + + + + + + + + 0 + 61 + 90 + + + + + + + + + 118 + 116 + 108 + + + + + + + + + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 20 + 0 + + + + + + + + + + + + + 0 + 0 + + + + + 160 + 0 + + + + + 16777215 + 16777215 + + + + false + + + + + + + + + + + Hide +Results + + + + + + + Qt::Vertical + + + + 20 + 0 + + + + + + + + + + + + + + QLayout::SetNoConstraint + + + + + + + + 160 + 0 + + + + + 160 + 16777215 + + + + Book: + + + + + + + + 0 + 0 + + + + + 160 + 0 + + + + + 160 + 16777215 + + + + Filter criteria for the bible list. If the first character of the filter is a number, then only books starting with this number are matched. Example filters: "Deuter", "1Thes". + + + + + + + + 0 + 0 + + + + + 160 + 0 + + + + + 160 + 16777215 + + + + false + + + + + + + + + QLayout::SetDefaultConstraint + + + + + + 16777215 + 16777215 + + + + Chapter: + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 60 + 16777215 + + + + Filter criteria for the bible list. If the first character of the filter is a number, then only books starting with this number are matched. Example filters: "Deuter", "1Thes". + + + + + + + + 0 + 0 + + + + + 60 + 16777215 + + + + false + + + + + + + + + 6 + + + + + 6 + + + + + + + Verse: + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 50 + 16777215 + + + + Filter criteria for the bible list. If the first character of the filter is a number, then only books starting with this number are matched. Example filters: "Deuter", "1Thes". + + + + + + + + + Qt::Horizontal + + + + 17 + 13 + + + + + + + + + 0 + 0 + + + + Quickly display the selected Bible verse on the screen + + + Go Live (F5) + + + + :/icons/icons/go_live.png:/icons/icons/go_live.png + + + F5 + + + + + + + 0 + + + + + + + + + false + + + QAbstractItemView::ContiguousSelection + + + true + + + + + + + + + + + QLayout::SetMinimumSize + + + + + This list contains verses that were sent to be shown + + + + + + + + + + + lineEditBook + chapter_ef + verse_ef + listBook + listChapterNum + chapter_preview_list + btnLive + search_ef + comboBoxSearchRange + comboBoxSearchType + search_button + search_results_list + hide_result_button + history_listWidget + + + + + + diff --git a/controlbutton.cpp b/controlbutton.cpp new file mode 100644 index 0000000..e5207a3 --- /dev/null +++ b/controlbutton.cpp @@ -0,0 +1,123 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "controlbutton.h" + +ControlButton::ControlButton(QWidget * parent) + : QPushButton(parent) +{ + m_hovered = false; + m_pressed = false; + m_opacity = 1.0; +} + +ControlButton::ControlButton(const QIcon & icon, const QIcon &iconHovered, const QIcon &iconPressed, QWidget *parent) + : QPushButton(parent) +{ + m_icon = icon; + m_iconHovered = iconHovered; + m_iconPressed = iconPressed; + m_hovered = false; + m_pressed = false; + m_opacity = 1.0; +} + +ControlButton::~ControlButton(){} + +void ControlButton::paintEvent(QPaintEvent * pe) +{ + Q_UNUSED(pe); + + QPainter painter(this); + painter.setRenderHint(QPainter::Antialiasing); + + //test for state changes + QColor button_color; + QIcon button_icon; + if(this->isEnabled()) + { + if(m_hovered) + button_icon = m_iconHovered; + else + button_icon = m_icon; + + if(m_pressed) + button_icon = m_iconPressed; + } + else + button_color = QColor(50, 50, 50); + + QRect button_rect = this->geometry(); + + if(!button_icon.isNull()) + { + QSize icon_size = this->iconSize(); + QRect icon_position = this->calculateIconPosition(button_rect, icon_size); + painter.setOpacity(m_opacity); + painter.drawPixmap(icon_position, QPixmap(button_icon.pixmap(icon_size))); + } +} + +void ControlButton::enterEvent(QEvent * e) +{ + m_hovered = true; + this->repaint(); + + QPushButton::enterEvent(e); +} + +void ControlButton::leaveEvent(QEvent * e) +{ + m_hovered = false; + this->repaint(); + + QPushButton::leaveEvent(e); +} + +void ControlButton::mousePressEvent(QMouseEvent * e) +{ + m_pressed = true; + this->repaint(); + + QPushButton::mousePressEvent(e); +} + +void ControlButton::mouseReleaseEvent(QMouseEvent * e) +{ + m_pressed = false; + this->repaint(); + + QPushButton::mouseReleaseEvent(e); +} + +QRect ControlButton::calculateIconPosition(QRect button_rect, QSize icon_size) +{ + int x = (button_rect.width() / 2) - (icon_size.width() / 2); + int y = (button_rect.height() / 2) - (icon_size.height() / 2); + int width = icon_size.width(); + int height = icon_size.height(); + + QRect icon_position; + icon_position.setX(x); + icon_position.setY(y); + icon_position.setWidth(width); + icon_position.setHeight(height); + + return icon_position; +} diff --git a/controlbutton.h b/controlbutton.h new file mode 100644 index 0000000..bfab6c0 --- /dev/null +++ b/controlbutton.h @@ -0,0 +1,59 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef CONTROLBUTTON_H +#define CONTROLBUTTON_H + +#include +//#include + +class ControlButton : public QPushButton +{ + Q_OBJECT + +public: + ControlButton(QWidget * parent = 0); + ControlButton(const QIcon & icon, const QIcon & iconHovered, const QIcon & iconPressed, QWidget * parent = 0); + + ~ControlButton(); + + //Range: 0.0 [invisible] - 1.0 [opaque] + void setOpacity(qreal opacity) { m_opacity = opacity; } + +protected: + void paintEvent(QPaintEvent * pe); + void enterEvent(QEvent * e); + void leaveEvent(QEvent * e); + void mousePressEvent(QMouseEvent * e); + void mouseReleaseEvent(QMouseEvent * e); + +private: + QRect calculateIconPosition(QRect button_rect, QSize icon_size); + +private: + bool m_hovered; + bool m_pressed; + + qreal m_opacity; + QIcon m_icon; + QIcon m_iconHovered; + QIcon m_iconPressed; +}; + +#endif // CONTROLBUTTON_H diff --git a/displayscreen.cpp b/displayscreen.cpp new file mode 100644 index 0000000..82a297a --- /dev/null +++ b/displayscreen.cpp @@ -0,0 +1,1476 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "displayscreen.h" +#include "ui_displayscreen.h" + +#define BLUR_RADIUS 5 + +DisplayScreen::DisplayScreen(QWidget *parent) : + QWidget(parent), + ui(new Ui::DisplayScreen) +{ + ui->setupUi(this); + /* + setPalette(QPalette(QColor(Qt::black),QColor(Qt::black))); + + timer = new QTimer(this); + timer_out = new QTimer(this); + + acounter[0]=255; + + // add video player + + videoPlayer = new Phonon::MediaObject; + videoWidget = new Phonon::VideoWidget(this); + videoWidget->setVisible(false); + Phonon::createPath(videoPlayer,videoWidget); + + connect(videoPlayer, SIGNAL(tick(qint64)),this,SLOT(updateTimeText())); + connect(videoPlayer, SIGNAL(totalTimeChanged(qint64)),this,SLOT(updateTimeText())); + connect(videoPlayer, SIGNAL(stateChanged(Phonon::State,Phonon::State)),this,SLOT(playerStateChanged(Phonon::State,Phonon::State))); + + + // add text render lable + textRenderLabel = new QLabel(this); + + // Add control buttons + btnNext = new ControlButton(QIcon(":/icons/icons/controlNext.png"), + QIcon(":/icons/icons/controlNextHovered.png"), + QIcon(":/icons/icons/controlNextPressed.png"),this); + btnPrev = new ControlButton(QIcon(":/icons/icons/controlPrev.png"), + QIcon(":/icons/icons/controlPrevHovered.png"), + QIcon(":/icons/icons/controlPrevPressed.png"),this); + btnExit = new ControlButton(QIcon(":/icons/icons/controlExit.png"), + QIcon(":/icons/icons/controlExitHovered.png"), + QIcon(":/icons/icons/controlExitPressed.png"),this); + + connect(timer, SIGNAL(timeout()), this, SLOT(fadeIn())); + connect(btnNext,SIGNAL(clicked()),this,SLOT(btnNextClicked())); + connect(btnPrev,SIGNAL(clicked()),this,SLOT(btnPrevClicked())); + connect(btnExit,SIGNAL(clicked()),this,SLOT(btnExitClicked())); + */ +} + +DisplayScreen::~DisplayScreen() +{ +// delete timer; +// delete timer_out; +// delete videoPlayer; +// delete videoWidget; +// delete textRenderLabel; +// delete btnPrev; +// delete btnNext; +// delete btnExit; + delete ui; +} +/* +void DisplayScreen::keyReleaseEvent(QKeyEvent *event) +{ + // Will get called when a key is released + int key = event->key(); + if(key == Qt::Key_Left) + prevSlide(); + else if(key == Qt::Key_Up) + prevSlide(); + else if(key == Qt::Key_PageUp) + prevSlide(); + else if(key == Qt::Key_Back) + prevSlide(); + else if(key == Qt::Key_Right) + nextSlide(); + else if(key == Qt::Key_Down) + nextSlide(); + else if(key == Qt::Key_PageDown) + nextSlide(); + else if(key == Qt::Key_Forward) + nextSlide(); + else if(key == Qt::Key_Enter) + nextSlide(); + else if(key == Qt::Key_Return) + nextSlide(); + else if(key == Qt::Key_Escape) + exitSlide(); + else + QWidget::keyReleaseEvent(event); +} + +void DisplayScreen::positionOpjects() +{ +// videoWidget->setGeometry(0,0,width(),height()); + textRenderLabel->setGeometry(0,0,width(),height()); +} + +void DisplayScreen::setControlsSettings(DisplayControlsSettings &settings) +{ + controlsSettings = settings; + positionControlButtons(); +} + +void DisplayScreen::setControlButtonsVisible(bool visible) +{ + btnPrev->setVisible(visible); + btnNext->setVisible(visible); + btnExit->setVisible(visible); +} + +void DisplayScreen::positionControlButtons() +{ + // set icon sise + int buttonSize(controlsSettings.buttonSize); + if(buttonSize == 0) + buttonSize = 16; + else if(buttonSize == 1) + buttonSize = 24; + else if(buttonSize == 2) + buttonSize = 32; + else if(buttonSize == 3) + buttonSize = 48; + else if(buttonSize == 4) + buttonSize = 64; + else if(buttonSize == 5) + buttonSize = 96; + else + buttonSize = 48; + btnNext->setIconSize(QSize(buttonSize,buttonSize)); + btnPrev->setIconSize(QSize(buttonSize,buttonSize)); + btnExit->setIconSize(QSize(buttonSize,buttonSize)); + + // set buttons size to be 2px greater than the icon size + buttonSize +=2; + + // calculate button position + int y(this->height()), x(this->width()), margin(5); + + // calculate y position + if(controlsSettings.alignmentV==0)//top + y = margin; + else if(controlsSettings.alignmentV==1)//middle + y = (y-buttonSize)/2; + else if(controlsSettings.alignmentV==2)//buttom + y = y-buttonSize-margin; + else + y = y-buttonSize-margin; + + // calculate x position + int xt((buttonSize*3)+10); //total width of the button group + if(controlsSettings.alignmentH==0) + x = margin; + else if(controlsSettings.alignmentH==1) + x = (x-xt)/2; + else if (controlsSettings.alignmentH==2) + x = x-xt-margin; + else + x = (x-xt)/2; + + int x1(x); + int x2(x1+buttonSize+5); + int x3(x2+buttonSize+5); + + //set button positon + btnPrev->setGeometry(x1,y,buttonSize,buttonSize); + btnNext->setGeometry(x2,y,buttonSize,buttonSize); + btnExit->setGeometry(x3,y,buttonSize,buttonSize); + + //set button opacity + btnPrev->setOpacity(controlsSettings.opacity); + btnNext->setOpacity(controlsSettings.opacity); + btnExit->setOpacity(controlsSettings.opacity); + + // repaint buttons + btnPrev->repaint(); + btnNext->repaint(); + btnExit->repaint(); +} + +void DisplayScreen::btnNextClicked() +{ + emit nextSlide(); +} + +void DisplayScreen::btnPrevClicked() +{ + emit prevSlide(); +} + +void DisplayScreen::btnExitClicked() +{ + emit exitSlide(); +} + +void DisplayScreen::fadeIn() +{ + if (useFading) + { + acounter[0]+=64; // fade step increaments + if (acounter[0]>255) + acounter[0]=255; + + if (acounter[0]>254) + timer->stop(); + update(); + } +} + +void DisplayScreen::fadeOut() // For future +{ + // acounter[0]-=24; + // if (acounter[0]<0)acounter[0]=0; + // if (acounter[0]<1){timer_out->stop();} + // update(); +} + +void DisplayScreen::renderText(bool text_present) +{ +// if(displayType=="video") +// { +// if(!videoWidget->isVisible()) +// videoWidget->setVisible(true); +// if(textRenderLabel->isVisible()) // Need to remove when text lable on top of video properly works +// textRenderLabel->setVisible(false); +// } +// else +// { + if(!textRenderLabel->isVisible()) // Need to remove when text lable on top of video properly works + textRenderLabel->setVisible(true); +// if(videoWidget->isVisible()) +// { +// videoPlayer->stop(); +// videoWidget->setVisible(false); +// } +// } + + if(!text_present) + displayType.clear(); + + if(useFading) + { + acounter[0]=0; + } + // Save the previous image for fade-out effect: + previous_image_pixmap = QPixmap::fromImage(output_image); + + // For later determening which background to draw, and whether to transition to it: + background_needs_transition = ( use_active_background != text_present ); + use_active_background = text_present; + + // Render the foreground text: + QImage text_image(width(), height(), QImage::Format_ARGB32);//_Premultiplied); + + // Fill transparent background instead of initial garbage (fixes issues on MacOSX): + text_image.fill(qRgba(0, 0, 0, 0)); //transparent background + + QPainter text_painter(&text_image); + //text_painter.setRenderHint(QPainter::TextAntialiasing); + //text_painter.setRenderHint(QPainter::Antialiasing); + + // Request to write its text to the QPainter: + if(displayType == "bible") + drawBibleText(&text_painter, width(), height(),false); + else if(displayType == "song") + drawSongText(&text_painter, width(), height(),false); + else if(displayType == "announce") + drawAnnounceText(&text_painter, width(), height(),false); + text_painter.end(); + + // Draw the shadow image: + QImage shadow_image(width(), height(), QImage::Format_ARGB32);//_Premultiplied); + shadow_image.fill(qRgba(0, 0, 0, 0)); //transparent background + QPainter shadow_painter(&shadow_image); + shadow_painter.setPen(QColor(Qt::black)); + + if(useShadow) + { + if(displayType == "bible") + drawBibleText(&shadow_painter, width(), height(),true); + else if(displayType == "song") + drawSongText(&shadow_painter, width(), height(),true); + else if(displayType == "announce") + drawAnnounceText(&shadow_painter, width(), height(),true); + shadow_painter.end(); + } + + // Set the blured image to the produced text image: + if(useBluredShadow) // Blur the shadow: + fastbluralpha(shadow_image, BLUR_RADIUS); + + QImage temp_image(width(), height(), QImage::Format_ARGB32);//_Premultiplied); + output_image = temp_image; + output_image.fill(qRgba(0, 0, 0, 0)); //transparent background + + // Painter for drawing the final image: + QPainter output_painter(&output_image); + //output_painter.setRenderHint(QPainter::TextAntialiasing); + //output_painter.setRenderHint(QPainter::Antialiasing); + + // Offset the shadow by a fraction of the font size: + int shadow_offset(0); + if(displayType == "bible") + shadow_offset = (bdSets.tFont.pointSize() / 15); + else if(displayType == "song") + shadow_offset = (songSets.textFont.pointSize() / 15); + else if(displayType == "announce") + shadow_offset = (annouceSets.textFont.pointSize() / 15 ); + + // Draw the shadow: + output_painter.drawImage(shadow_offset, shadow_offset, shadow_image); + + // Draw the text: + output_painter.drawImage(0, 0, text_image); + output_painter.end(); + + if(useFading) + timer->start(32); // time beween fade steps in milliseconds + else + update(); +} + +void DisplayScreen::renderBibleText(Verse verse, BibleSettings &bibleSetings) +{ + // Render bible verse text + displayType = "bible"; + bibleVerse = verse; + bibleSets = bibleSetings; + + useFading = bibleSets.useFading; + useShadow = bibleSets.useShadow; + useBluredShadow = bibleSets.useBlurShadow; + setNewWallpaper(bibleSets.background,bibleSets.useBackground); + + isTextPrepared = false; + renderText(true); +} + +void DisplayScreen::renderSongText(Stanza stanza, SongSettings &songSettings) +{ + // Render song stanza text + displayType = "song"; + songStanza = stanza; + songSets = songSettings; + + useFading = songSets.useFading; + useShadow = songSets.useShadow; + useBluredShadow = songSets.useBlurShadow; + if(songStanza.usePrivateSettings) + { + // Set song specific settings + songSets.useBackground = songStanza.useBackground; + songSets.backgroundName = songStanza.backgroundName; + songSets.background = songStanza.background; + songSets.textFont = songStanza.font; + songSets.textColor = songStanza.color; + songSets.infoColor = songStanza.infoColor; + songSets.infoFont = songStanza.infoFont; + songSets.endingColor = songStanza.endingColor; + songSets.infoFont = songStanza.endingFont; + songSets.textAlingmentV = songStanza.alignmentV; + songSets.textAlingmentH = songStanza.alignmentH; + } + + setNewWallpaper(songSets.background,songSets.useBackground); + + isTextPrepared = false; + renderText(true); +} + +void DisplayScreen::renderAnnounceText(AnnounceSlide announce, AnnounceSettings &announceSettings) +{ + // Render announcement slide text + displayType = "announce"; + announcement = announce; + annouceSets = announceSettings; + + useFading = annouceSets.useFading; + useShadow = annouceSets.useShadow; + useBluredShadow = annouceSets.useBlurShadow; + setNewWallpaper(annouceSets.background,annouceSets.useBackground); + + isTextPrepared = false; + renderText(true); +} + +void DisplayScreen::renderPicture(QPixmap image, SlideShowSettings ssSets) +{ + displayType = "pix"; + bool expand; + if(image.width()stop(); +// videoPlayer->setCurrentSource(Phonon::MediaSource(vid.filePath)); +// videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatio(vid.aspectRatio)); +// videoPlayer->play(); +} + +void DisplayScreen::renderClear() +{ + displayType = "clear"; + renderText(true); +} + +void DisplayScreen::updateTimeText() +{ + long len = 0;//videoPlayer->totalTime(); + long pos = 0;//videoPlayer->currentTime(); + QString timeString; + if (pos || len) + { + int sec = pos/1000; + int min = sec/60; + int hour = min/60; + int msec = pos; + + QTime playTime(hour%60, min%60, sec%60, msec%1000); + sec = len / 1000; + min = sec / 60; + hour = min / 60; + msec = len; + + QTime stopTime(hour%60, min%60, sec%60, msec%1000); + QString timeFormat = "m:ss"; + if (hour > 0) + timeFormat = "h:mm:ss"; + timeString = playTime.toString(timeFormat); + if (len) + timeString += " / " + stopTime.toString(timeFormat); + } + + emit sendTimeText(timeString); +} + +void DisplayScreen::playerStateChanged(Phonon::State newstate, Phonon::State oldstate) +{ + Q_UNUSED(oldstate); + switch (newstate) + { + case Phonon::ErrorState: + videoPlayer->pause(); + QMessageBox::warning(this,tr("Video Player Error"),videoPlayer->errorString(),QMessageBox::Close); + break; + case Phonon::StoppedState: + case Phonon::PausedState: + emit updatePlayButton(false); + break; + case Phonon::PlayingState: + emit updatePlayButton(true); + case Phonon::BufferingState: + break; + case Phonon::LoadingState: + break; + } +} + + +void DisplayScreen::drawBibleText(QPainter *painter, int width, int height, bool isShadow) +{ + // Margins: + int left = 30; + int top = 20; + + //int right = width - left; + int w = width - left - left; + int h = height - top - top; + + // set maximum screen size - For primary bibile only + int maxh = h * bibleSets.screenUse/100; // maximun screen height + int maxtop; // top of max screen + if(bibleSets.screenPosition == 0) + maxtop = top; + if(bibleSets.screenPosition == 1) + maxtop = top+h-maxh; + + // apply max screen use settings + h=maxh; + top=maxtop; + + // Keep decreasing the font size until the text fits into the allocated space: + + // Rects for storing the position of the text and caption drawing: + QRect trect1, crect1, trect2, crect2, trect3, crect3; + // Flags to be used for drawing verse text and caption: + int tflags = Qt::TextWordWrap; + tflags = Qt::TextWordWrap; + + if(bibleSets.textAlingmentV==0) + tflags += Qt::AlignTop; + else if(bibleSets.textAlingmentV==1) + tflags += Qt::AlignVCenter; + else if(bibleSets.textAlingmentV==2) + tflags += Qt::AlignBottom; + + if(bibleSets.textAlingmentH==0) + tflags += Qt::AlignLeft; + else if(bibleSets.textAlingmentH==1) + tflags += Qt::AlignHCenter; + else if(bibleSets.textAlingmentH==2) + tflags += Qt::AlignRight; + + int cflags = Qt::AlignTop ; + if(bibleSets.captionAlingment==0) + cflags += Qt::AlignLeft; + else if(bibleSets.captionAlingment==1) + cflags += Qt::AlignHCenter; + else if(bibleSets.captionAlingment==2) + cflags += Qt::AlignRight; + + bool exit = false; + if(!isTextPrepared) + { + bdSets.clear(); + while( !exit ) + { + if(bibleVerse.secondary_text.isEmpty() && bibleVerse.trinary_text.isEmpty()) + { + // Prepare primary version only, 2nd and 3rd do not exist + // Figure out how much space the drawing will take at the current font size: + drawBibleTextToRect(painter,trect1,crect1,bibleVerse.primary_text,bibleVerse.primary_caption, + tflags,cflags,top,left,w,h); + + // Make sure that all fits into the screen + int th = trect1.height()+crect1.height(); + exit = (th<=h); + } + else if(!bibleVerse.secondary_text.isEmpty() && bibleVerse.trinary_text.isEmpty()) + { + // Prepare primary and secondary versions, trinary does not exist + // Figure out how much space the drawing will take at the current font size for primary: + drawBibleTextToRect(painter,trect1,crect1,bibleVerse.primary_text,bibleVerse.primary_caption, + tflags,cflags,top,left,w,h/2); + + // set new top for secondary + int top2 = crect1.bottom(); + if(top2setFont(bdSets.tFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(bibleSets.textColor); + painter->drawText(bdSets.ptRect, tflags, bibleVerse.primary_text); + if(!bibleVerse.secondary_text.isNull()) + painter->drawText(bdSets.stRect, tflags, bibleVerse.secondary_text); + if(!bibleVerse.trinary_text.isNull()) + painter->drawText(bdSets.ttRect, tflags, bibleVerse.trinary_text); + + // Draw the verse caption(s) at the final size: + painter->setFont(bdSets.cFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(bibleSets.captionColor); + painter->drawText(bdSets.pcRect, cflags, bibleVerse.primary_caption); + if(!bibleVerse.secondary_text.isNull()) + painter->drawText(bdSets.scRect, cflags, bibleVerse.secondary_caption); + if(!bibleVerse.trinary_caption.isNull()) + painter->drawText(bdSets.tcRect, cflags, bibleVerse.trinary_caption); +} + +void DisplayScreen::drawBibleTextToRect(QPainter *painter, QRect& trect, QRect& crect, QString ttext, + QString ctext, int tflags, int cflags, int top, int left, + int width, int height) +{ + // prepare caption + painter->setFont(bibleSets.captionFont); + crect = painter->boundingRect(left, top, width, height, cflags, ctext); + + // prepare text + painter->setFont(bibleSets.textFont); + trect = painter->boundingRect(left, top, width, height-crect.height(), tflags, ttext); + + // reset capion location + int ch = crect.height(); + int th = trect.height(); + if(bibleSets.captionPosition == 0) + { + crect.setTop(trect.top()); + crect.setHeight(ch); + trect.setTop(crect.bottom()); + trect.setHeight(th); + } + else if(bibleSets.captionPosition == 1) + { + crect.setTop(trect.bottom()); + crect.setHeight(ch); + } +} + +void DisplayScreen::drawSongText(QPainter *painter, int width, int height, bool isShadow) +{ + // Draw the text of the current song verse to the specified painter; making + // sure that the output rect is narrower than and shorter than . + + QString main_text = songStanza.stanza; + QString caption_str; + QString song_ending = " "; + + //QStringList lines_list = song_list.at(current_song_verse).split("\n"); + QString song_num_str = QString::number(songStanza.number); + QString song_key_str = songStanza.tune; + + // Check whether to display song numbers + if (songSets.showSongNumber) + song_num_str = song_num_str; + else + song_num_str = " "; + + // Check whether to display song key + if (songSets.showSongKey) + song_num_str = song_key_str + " " + song_num_str; + else + song_num_str = song_num_str; + + // Check wheter to display stanza tiles + if (songSets.showStanzaTitle) + caption_str = songStanza.stanzaTitle; + else + caption_str = " "; + + // If No cation,number or tune, give the space to song text + if(!songSets.showSongNumber && !songSets.showSongKey && !songSets.showStanzaTitle) + { + song_num_str.clear(); + caption_str.clear(); + } + + // Prepare Song ending string + if(songStanza.isLast) + { + // first check if to show ending + if(songSets.showSongEnding) + { + if(songSets.endingType == 0) + song_ending = "* * *"; + else if(songSets.endingType == 1) + song_ending = "- - -"; + else if(songSets.endingType == 2) + song_ending = QString::fromUtf8("° ° °"); + else if(songSets.endingType == 3) + song_ending = QString::fromUtf8("• • •"); + else if(songSets.endingType == 4) + song_ending = QString::fromUtf8("● ● ●"); + else if(songSets.endingType == 5) + song_ending = QString::fromUtf8("▪ ▪ ▪"); + else if(songSets.endingType == 6) + song_ending = QString::fromUtf8("■ ■ ■"); + else if(songSets.endingType == 7) + { + // First check if copyrigth info exist. If it does show it. + // If some exist, then show what exist. If nothing exist, then show '* * *' + if(!songStanza.wordsBy.isEmpty() && !songStanza.musicBy.isEmpty()) + song_ending = QString(tr("Words by: %1, Music by: %2")).arg(songStanza.wordsBy).arg(songStanza.musicBy); + else if(!songStanza.wordsBy.isEmpty() && songStanza.musicBy.isEmpty()) + song_ending = QString(tr("Words by: %1")).arg(songStanza.wordsBy); + else if(songStanza.wordsBy.isEmpty() && !songStanza.musicBy.isEmpty()) + song_ending = QString(tr("Music by: %1")).arg(songStanza.musicBy); + else if(songStanza.wordsBy.isEmpty() && songStanza.musicBy.isEmpty()) + song_ending = "* * *"; + } + } + } + + // if not to show song ending, return its space to main text + if(!songSets.showSongEnding) + song_ending.clear(); + + // Margins: + int left = 30; + int top = 20; + int w = width - left - left; + int h = height - top - top; + int maxh = h * songSets.screenUse/100; + int maxtop; // top of max screen + if(songSets.screenPositon == 0) + maxtop = top; + if(songSets.screenPositon == 1) + maxtop = top+h-maxh; + + height = maxh; + top = maxtop; + width = w; + + QRect caption_rect, num_rect, main_rect, ending_rect; + int main_flags(0); + + if(songSets.textAlingmentV==0) + main_flags += Qt::AlignTop; + else if(songSets.textAlingmentV==1) + main_flags += Qt::AlignVCenter; + else if(songSets.textAlingmentV==2) + main_flags += Qt::AlignBottom; + if(songSets.textAlingmentH==0) + main_flags += Qt::AlignLeft; + else if(songSets.textAlingmentH==1) + main_flags += Qt::AlignHCenter; + else if(songSets.textAlingmentH==2) + main_flags += Qt::AlignRight; + + QFont main_font = songSets.textFont; + + int caph, endh, mainh, mainw, totalh; + + if(!isTextPrepared) + { + sdSets.clear(); + + // Prepare Caption + painter->setFont(songSets.infoFont); + caption_rect = boundRectOrDrawText(painter, false, left, top, width, height, Qt::AlignLeft | Qt::AlignTop, caption_str); + caph = caption_rect.height(); + + // Prepare Ending + painter->setFont(songSets.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 + while(ending_rect.width()> width) + { + songSets.endingFont.setPointSize(songSets.endingFont.pointSize()-1); + painter->setFont(songSets.endingFont); + ending_rect = boundRectOrDrawText(painter, false, left, top, width, height, Qt::AlignHCenter | Qt::AlignTop, song_ending); + } + endh = ending_rect.height(); + + // 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; + + // Decrease song text to fit the screen + while(mainw > width || totalh > height) + { + main_font.setPointSize(main_font.pointSize() - 1); + 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; + } + + // Check if main font is less then 4/5 of original. if so, then song preparation again with text wrap + if(main_font.pointSize() <(songSets.textFont.pointSize()*4/5)) + { + main_flags += Qt::TextWordWrap; + main_font = songSets.textFont; + + // Prepare Main Text + painter->setFont(songSets.textFont); + 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; + + // Decrease song text to fit the screen + while(mainw > width || totalh > height) + { + main_font.setPointSize(main_font.pointSize() - 1); + 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; + } + } + songSets.textFont = main_font; + isTextPrepared = true; + sdSets.cRect = caption_rect; + sdSets.tRect = main_rect; + sdSets.eRect = ending_rect; + sdSets.tFlags = main_flags; + } + + // AT This piont, all sizes should be good. + // Set object location and DRAW + caption_rect = sdSets.cRect; + main_rect = sdSets.tRect; + ending_rect = sdSets.eRect; + caph = sdSets.cRect.height(); + endh = sdSets.eRect.height(); + main_flags = sdSets.tFlags; + mainh = height-caph-endh; + if(songSets.infoAling == 0 && songSets.endingPosition == 0) + { + painter->setFont(songSets.infoFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(songSets.infoColor); + caption_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignLeft | Qt::AlignTop, caption_str); + num_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignRight | Qt::AlignTop, song_num_str); + painter->setFont(songSets.textFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(songSets.textColor); + main_rect = boundRectOrDrawText(painter, true, left, caption_rect.bottom(), width, mainh, main_flags, main_text); + painter->setFont(songSets.endingFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(songSets.endingColor); + ending_rect = boundRectOrDrawText(painter, true, left, main_rect.bottom(), width, height, Qt::AlignHCenter | Qt::AlignTop, song_ending); + } + else if(songSets.infoAling == 0 && songSets.endingPosition == 1) + { + painter->setFont(songSets.infoFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(songSets.infoColor); + caption_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignLeft | Qt::AlignTop, caption_str); + num_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignRight | Qt::AlignTop, song_num_str); + painter->setFont(songSets.endingFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(songSets.endingColor); + ending_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignHCenter | Qt::AlignBottom, song_ending); + painter->setFont(songSets.textFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(songSets.textColor); + main_rect = boundRectOrDrawText(painter, true, left, caption_rect.bottom(), width, mainh, main_flags, main_text); + } + else if(songSets.infoAling == 1 && songSets.endingPosition == 0) + { + painter->setFont(songSets.textFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(songSets.textColor); + main_rect = boundRectOrDrawText(painter, true, left, top, width, mainh, main_flags, main_text); + painter->setFont(songSets.infoFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(songSets.infoColor); + caption_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignLeft | Qt::AlignBottom, caption_str); + num_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignRight | Qt::AlignBottom, song_num_str); + painter->setFont(songSets.endingFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(songSets.endingColor); + ending_rect = boundRectOrDrawText(painter, true, left, main_rect.bottom(), width, height, Qt::AlignHCenter | Qt::AlignTop, song_ending); + } + else if(songSets.infoAling == 1 && songSets.endingPosition == 1) + { + endh = height-caph; + painter->setFont(songSets.textFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(songSets.textColor); + main_rect = boundRectOrDrawText(painter, true, left, top, width, mainh, main_flags, main_text); + painter->setFont(songSets.infoFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(songSets.infoColor); + caption_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignLeft | Qt::AlignBottom, caption_str); + num_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignRight | Qt::AlignBottom, song_num_str); + painter->setFont(songSets.endingFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(songSets.endingColor); + ending_rect = boundRectOrDrawText(painter, true, left, top, width, endh, Qt::AlignHCenter | Qt::AlignBottom, song_ending); + } +} + +QRect DisplayScreen::boundRectOrDrawText(QPainter *painter, bool draw, int left, int top, int width, int height, int flags, QString text) +{ + // If draw is false, calculate the rectangle that the specified text would be + // drawn into if it was draw. If draw is true, draw as well. + // Output rect is returned. + + QRect out_rect; + if(draw) + painter->drawText(left, top, width, height, flags, text, &out_rect); + else + out_rect = painter->boundingRect(left, top, width, height, flags, text); + return out_rect; +} + +void DisplayScreen::drawAnnounceText(QPainter *painter, int width, int height, bool isShadow) +{ + // Margins: + int left = 30; + int top = 20; + int w = width - left - left; + int h = height - top - top; + + int flags = Qt::TextWordWrap; + if(annouceSets.textAlingmentV==0) + flags += Qt::AlignTop; + else if(annouceSets.textAlingmentV==1) + flags += Qt::AlignVCenter; + else if(annouceSets.textAlingmentV==2) + flags += Qt::AlignBottom; + if(annouceSets.textAlingmentH==0) + flags += Qt::AlignLeft; + else if(annouceSets.textAlingmentH==1) + flags += Qt::AlignHCenter; + else if(annouceSets.textAlingmentH==2) + flags += Qt::AlignRight; + + QFont font = annouceSets.textFont; + int orig_font_size = font.pointSize(); + + // Keep decreasing the font size until the text fits into the allocated space: + QRect rect; + + if(!isTextPrepared) + { + painter->setFont(font); + bool exit = false; + while( !exit ) + { + rect = painter->boundingRect(left, top, w, h, flags, announcement.text); + exit = ( rect.width() <= w && rect.height() <= h ); + if( !exit ) + { + font.setPointSize( font.pointSize()-1 ); + painter->setFont(font); + } + } + + // Force wrapping of songs that have really wide lines: + // (Do not allow font to be shrinked less than a 4/5 of the desired font) + if( font.pointSize() < (orig_font_size*4/5) ) + { + font.setPointSize(orig_font_size); + painter->setFont(font); + flags = (flags | Qt::TextWordWrap); + exit = false; + while( !exit ) + { + rect = painter->boundingRect(left, top, w, h, flags, announcement.text); + exit = ( rect.width() <= w && rect.height() <= h ); + if( !exit ) + { + font.setPointSize( font.pointSize()-1 ); + painter->setFont(font); + } + } + } + annouceSets.textFont = font; + adSets.tRect = rect; + isTextPrepared = true; + } + + painter->setFont(annouceSets.textFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(annouceSets.textColor); + painter->drawText(adSets.tRect, flags, announcement.text); +} + +void DisplayScreen::setFading(bool fade) +{ + useFading = fade; +} + +void DisplayScreen::setDisplaySettings(DisplaySettings sets) +{ +} + +void DisplayScreen::setNewWallpaper(QString path, bool isToUse) +{ + if(isToUse) + wallpaperPath = path; + else + wallpaperPath.clear(); + + if(wallpaperPath.simplified().isEmpty() ) + wallpaper = QPixmap(); + else + { + wallpaper.load(wallpaperPath); + wallpaper = wallpaper.scaled(width(),height()); + } +} + +void DisplayScreen::setNewWallpaper(QPixmap wallPix, bool isToUse) +{ + if(isToUse) + wallpaper = wallPix.scaled(width(),height()); + else + wallpaper = QPixmap(); +} + +void DisplayScreen::setNewPassiveWallpaper(QPixmap wallPix, bool isToUse) +{ + if(isToUse) + //passiveWallpaper = wallPix.scaled(width(),height(),Qt::IgnoreAspectRatio,Qt::SmoothTransformation); + passiveWallpaper = wallPix; + else + passiveWallpaper = QPixmap(); +} + +void DisplayScreen::paintEvent(QPaintEvent *event ) +{ + QPainter painter(this); + QImage txtPix(width(), height(), QImage::Format_ARGB32);//_Premultiplied); + txtPix.fill(qRgba(0, 0, 0, 0)); //transparent background + QPainter txtPainter(&txtPix); + + // This code will, with each iteraction, draw the previous image with increasing transparency, and draw + // the current image with increasing opacity; making a smooth transition: + double curr_opacity = acounter[0] / 255.0; + double prev_opacity = 1.0 - curr_opacity; + + // FIXME transition out of the previous background as well + // Draw the background at the current opacity: + if(background_needs_transition) + painter.setOpacity(curr_opacity); + + if( use_active_background ) + { + // Draw the active wallpaper if there is text to display + if (displayType != "pix" && (wallpaper.width()!=width() || wallpaper.isNull())) + { + wallpaper.load(wallpaperPath); + if( !wallpaper.isNull() ) + wallpaper = wallpaper.scaled(width(),height()); + } + if( ! wallpaper.isNull() ) + { + int ww = wallpaper.width(); + int wh = wallpaper.height(); + if(displayType == "pix" && ww!=width() && wh!=height()) + painter.drawPixmap((width()-ww)/2,(height()-wh)/2,wallpaper); + else if(displayType == "pix" && ww!=width()) + painter.drawPixmap((width()-ww)/2,0,wallpaper); + else if(displayType == "pix" && wh!=height()) + painter.drawPixmap(0,(height()-wh)/2,wallpaper); + else + painter.drawPixmap(0,0,wallpaper); + } + else + { + // Use black for the background: + painter.setPen(QColor(Qt::black)); + painter.drawRect( 0, 0, width(), height() ); + } + } + else + { + // Draw the passive wallpaper if set: + if(!passiveWallpaper.isNull()) + { + if(passiveWallpaper.width()!=width() || passiveWallpaper.height()!=height()) + passiveWallpaper = passiveWallpaper.scaled(width(),height()); + + painter.drawPixmap(0,0, passiveWallpaper); + } + else + { + // Use black for the background: + painter.setPen(QColor(Qt::black)); + painter.drawRect( 0, 0, width(), height() ); + } +// if (passiveWallpaper.width()!=width() || passiveWallpaper.isNull()) +// { +// passiveWallpaper.load(passiveWallpaperPath); +// if( !passiveWallpaper.isNull() ) +// //passiveWallpaper = passiveWallpaper.scaled(width(),height(),Qt::IgnoreAspectRatio,Qt::SmoothTransformation); +// passiveWallpaper = passiveWallpaper.scaled(width(),height()); +// } +// if( ! passiveWallpaper.isNull() ) +// painter.drawPixmap(0,0, passiveWallpaper); +// else +// { +// // Use black for the background: +// painter.setPen(QColor(Qt::black)); +// painter.drawRect( 0, 0, width(), height() ); +// } + } + + // Draw the previous image into the window, at decreasing opacity: + txtPainter.setOpacity(prev_opacity); + txtPainter.drawPixmap(0, 0, previous_image_pixmap); + + // Draw the output_image into the window, at increasing opacity: + txtPainter.setOpacity(curr_opacity); + txtPainter.drawImage(0, 0, output_image); + + textRenderLabel->setPixmap(QPixmap::fromImage(txtPix)); + + // Reset the opacity to default opaque: + painter.setOpacity(1.0); + txtPainter.setOpacity(1.0); +} + +// Stack Blur Algorithm by Mario Klingemann +void DisplayScreen::fastbluralpha(QImage &img, int radius) +{ + if (radius < 1) + return; + + QRgb *pix = (QRgb*)img.bits(); + int w = img.width(); + int h = img.height(); + int wm = w-1; + int hm = h-1; + int wh = w*h; + int div = radius+radius+1; + double junk; + + int *r = new int[wh]; + int *g = new int[wh]; + int *b = new int[wh]; + int *a = new int[wh]; + int rsum, gsum, bsum, asum, x, y, i, yp, yi, yw; + QRgb p; + int *vmin = new int[qMax(w,h)]; + + int divsum = (div+1)>>1; + divsum *= divsum; + int *dv = new int[256*divsum]; + for (i=0; i < 256*divsum; ++i) + { + dv[i] = (i/divsum); + } + + yw = yi = 0; + + int **stack = new int*[div]; + for (int i = 0; i < div; ++i) + { + stack[i] = new int[4]; + } + + int stackpointer; + int stackstart; + int *sir; + int rbs; + int r1 = radius+1; + int routsum, goutsum, boutsum, aoutsum; + int rinsum, ginsum, binsum, ainsum; + + for (y = 0; y < h; ++y) + { + rinsum = ginsum = binsum = ainsum + = routsum = goutsum = boutsum = aoutsum + = rsum = gsum = bsum = asum = 0; + for (i =- radius; i <= radius; ++i) + { + p = pix[yi+qMin(wm,qMax(i,0))]; + sir = stack[i+radius]; + sir[0] = qRed(p); + sir[1] = qGreen(p); + sir[2] = qBlue(p); + sir[3] = qAlpha(p); + + rbs = r1-abs(i); + rsum += sir[0]*rbs; + gsum += sir[1]*rbs; + bsum += sir[2]*rbs; + asum += sir[3]*rbs; + + if (i > 0) + { + rinsum += sir[0]; + ginsum += sir[1]; + binsum += sir[2]; + ainsum += sir[3]; + } + else + { + routsum += sir[0]; + goutsum += sir[1]; + boutsum += sir[2]; + aoutsum += sir[3]; + } + } + stackpointer = radius; + + for (x=0; x < w; ++x) + { + r[yi] = dv[rsum]; + g[yi] = dv[gsum]; + b[yi] = dv[bsum]; + a[yi] = dv[asum]; + + rsum -= routsum; + gsum -= goutsum; + bsum -= boutsum; + asum -= aoutsum; + + stackstart = stackpointer-radius+div; + sir = stack[stackstart%div]; + + routsum -= sir[0]; + goutsum -= sir[1]; + boutsum -= sir[2]; + aoutsum -= sir[3]; + + if (y == 0) + { + vmin[x] = qMin(x+radius+1,wm); + } + p = pix[yw+vmin[x]]; + + sir[0] = qRed(p); + sir[1] = qGreen(p); + sir[2] = qBlue(p); + sir[3] = qAlpha(p); + + rinsum += sir[0]; + ginsum += sir[1]; + binsum += sir[2]; + ainsum += sir[3]; + + rsum += rinsum; + gsum += ginsum; + bsum += binsum; + asum += ainsum; + + stackpointer = (stackpointer+1)%div; + sir = stack[(stackpointer)%div]; + + routsum += sir[0]; + goutsum += sir[1]; + boutsum += sir[2]; + aoutsum += sir[3]; + + rinsum -= sir[0]; + ginsum -= sir[1]; + binsum -= sir[2]; + ainsum -= sir[3]; + + ++yi; + } + yw += w; + } + for (x=0; x < w; ++x) + { + rinsum = ginsum = binsum = ainsum + = routsum = goutsum = boutsum = aoutsum + = rsum = gsum = bsum = asum = 0; + + yp =- radius * w; + + for (i=-radius; i <= radius; ++i) + { + yi=qMax(0,yp)+x; + + sir = stack[i+radius]; + + sir[0] = r[yi]; + sir[1] = g[yi]; + sir[2] = b[yi]; + sir[3] = a[yi]; + + rbs = r1-abs(i); + + rsum += r[yi]*rbs; + gsum += g[yi]*rbs; + bsum += b[yi]*rbs; + asum += a[yi]*rbs; + + if (i > 0) + { + rinsum += sir[0]; + ginsum += sir[1]; + binsum += sir[2]; + ainsum += sir[3]; + } + else + { + routsum += sir[0]; + goutsum += sir[1]; + boutsum += sir[2]; + aoutsum += sir[3]; + } + + if (i < hm) + { + yp += w; + } + } + + yi = x; + stackpointer = radius; + + for (y=0; y < h; ++y) + { + junk=dv[asum]; + junk=junk*2.4; + if (junk>255)junk=255; + pix[yi] = qRgba(dv[rsum], dv[gsum], dv[bsum], int(junk));///dv[asum]); + + rsum -= routsum; + gsum -= goutsum; + bsum -= boutsum; + asum -= aoutsum; + + stackstart = stackpointer-radius+div; + sir = stack[stackstart%div]; + + routsum -= sir[0]; + goutsum -= sir[1]; + boutsum -= sir[2]; + aoutsum -= sir[3]; + + if (x==0) + { + vmin[y] = qMin(y+r1,hm)*w; + } + p = x+vmin[y]; + + sir[0] = r[p]; + sir[1] = g[p]; + sir[2] = b[p]; + sir[3] = a[p]; + + rinsum += sir[0]; + ginsum += sir[1]; + binsum += sir[2]; + ainsum += sir[3]; + + rsum += rinsum; + gsum += ginsum; + bsum += binsum; + asum += ainsum; + + stackpointer = (stackpointer+1)%div; + sir = stack[stackpointer]; + + routsum += sir[0]; + goutsum += sir[1]; + boutsum += sir[2]; + aoutsum += sir[3]; + + rinsum -= sir[0]; + ginsum -= sir[1]; + binsum -= sir[2]; + ainsum -= sir[3]; + + yi += w; + } + } + delete [] r; + delete [] g; + delete [] b; + delete [] a; + delete [] vmin; + delete [] dv; +} +*/ diff --git a/displayscreen.h b/displayscreen.h new file mode 100644 index 0000000..cb751ba --- /dev/null +++ b/displayscreen.h @@ -0,0 +1,141 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef DISPLAYSCREEN_H +#define DISPLAYSCREEN_H + +#include +//#include +//#include +//#include +#include "settings.h" +#include "theme.h" +#include "controlbutton.h" +#include "bible.h" +#include "song.h" +#include "announcewidget.h" +#include "videoinfo.h" +#include "displaysetting.h" + +namespace Ui { +class DisplayScreen; +} + +class DisplayScreen : public QWidget +{ + Q_OBJECT + +public: + explicit DisplayScreen(QWidget *parent = 0); + ~DisplayScreen(); +// Phonon::MediaObject *videoPlayer; +/* +public slots: + void setNewWallpaper(QString path, bool isToUse); + void setNewWallpaper(QPixmap wallPix, bool isToUse); + void setNewPassiveWallpaper(QPixmap wallPix, bool isToUse); + + void fadeIn(); + void fadeOut(); + void setDisplaySettings(DisplaySettings sets); + void setFading(bool fade); + + void fastbluralpha(QImage &img, int radius); + void setControlsSettings(DisplayControlsSettings &settings); + void setControlButtonsVisible(bool visible); + void positionOpjects(); + + void renderText(bool text_present); + void renderBibleText(Verse verse, BibleSettings &bibleSetings); + void renderSongText(Stanza stanza, SongSettings &songSettings); + void renderAnnounceText(AnnounceSlide announce, TextSettings &announceSettings); + void renderPicture(QPixmap image, SlideShowSettings ssSets); + void renderVideo(VideoInfo &vid); + void renderClear(); + +signals: + void exitSlide(); + void nextSlide(); + void prevSlide(); + void sendTimeText(QString cTime); + void updatePlayButton(bool isPlaying); + +protected: + void paintEvent(QPaintEvent *event); + void keyReleaseEvent(QKeyEvent *event); + +private slots: + void positionControlButtons(); + void btnNextClicked(); + void btnPrevClicked(); + void btnExitClicked(); + + void drawBibleText(QPainter *painter, int width, int height, bool isShadow); + void drawBibleTextToRect(QPainter *painter, QRect& trect, QRect& crect, QString ttext, QString ctext, int tflags, int cflags, int top, int left, int width, int height); + void drawSongText(QPainter *painter, int width, int height, bool isShadow); + QRect boundRectOrDrawText(QPainter *painter, bool draw, int left, int top, int width, int height, int flags, QString text); + void drawAnnounceText(QPainter *painter, int width, int height, bool isShadow); + + void updateTimeText(); +// void playerStateChanged(Phonon::State newstate, Phonon::State oldstate); + +private: + Ui::DisplayScreen *ui; + DisplayControlsSettings controlsSettings; + bool useFading; + bool useShadow; + bool useBluredShadow; + bool isTextPrepared; + QString wallpaperPath; // Wallpaper image file path + QPixmap wallpaper; + QString passiveWallpaperPath; + QPixmap passiveWallpaper; + QColor foregroundColor; + + QPixmap previous_image_pixmap; + QImage output_image; + bool use_active_background; + bool background_needs_transition; + int acounter[2]; + QTimer *timer; + QTimer *timer_out; + + ControlButton *btnNext; + ControlButton *btnPrev; + ControlButton *btnExit; + + SongSettings songSets; + BibleSettings bibleSets; + TextSettings annouceSets; + + Verse bibleVerse; + Stanza songStanza; + AnnounceSlide announcement; + + QString displayType; + QLabel *textRenderLabel; +// Phonon::VideoWidget *videoWidget; + + BibleDisplaySettings bdSets; + SongDisplaySettings sdSets; + AnnounceDisplaySettings adSets; + */ +}; + +#endif // DISPLAYSCREEN_H diff --git a/displayscreen.ui b/displayscreen.ui new file mode 100644 index 0000000..90c0551 --- /dev/null +++ b/displayscreen.ui @@ -0,0 +1,33 @@ + + + DisplayScreen + + + + 0 + 0 + 578 + 442 + + + + Dispaly Screen + + + + :/icons/icons/display.png:/icons/icons/display.png + + + + 0 + + + 0 + + + + + + + + diff --git a/displaysetting.cpp b/displaysetting.cpp new file mode 100644 index 0000000..ff8992a --- /dev/null +++ b/displaysetting.cpp @@ -0,0 +1,50 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "displaysetting.h" + +DisplaySetting::DisplaySetting() +{ +} + +void BibleDisplaySettings::clear() +{ + ptRect = QRect(); + pcRect = QRect(); + stRect = QRect(); + scRect = QRect(); + ttRect = QRect(); + scRect = QRect(); + tFont = QFont(); + cFont = QFont(); +} + +void SongDisplaySettings::clear() +{ + cRect = QRect(); + nRect = QRect(); + tRect = QRect(); + eRect = QRect(); + tFlags = 0; +} + +void AnnounceDisplaySettings::clear() +{ + tRect = QRect(); +} diff --git a/displaysetting.h b/displaysetting.h new file mode 100644 index 0000000..877bfbd --- /dev/null +++ b/displaysetting.h @@ -0,0 +1,64 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef DISPLAYSETTING_H +#define DISPLAYSETTING_H + +#include +#include + +class DisplaySetting +{ +public: + DisplaySetting(); +}; + +class BibleDisplaySettings +{ +public: + QRect ptRect; + QRect pcRect; + QRect stRect; + QRect scRect; + QRect ttRect; + QRect tcRect; + QFont tFont; + QFont cFont; + void clear(); +}; + +class SongDisplaySettings +{ +public: + QRect cRect; + QRect nRect; + QRect tRect; + QRect eRect; + int tFlags; + void clear(); +}; + +class AnnounceDisplaySettings +{ +public: + QRect tRect; + void clear(); +}; + +#endif // DISPLAYSETTING_H diff --git a/editannouncementdialog.cpp b/editannouncementdialog.cpp new file mode 100644 index 0000000..5adf346 --- /dev/null +++ b/editannouncementdialog.cpp @@ -0,0 +1,157 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "editannouncementdialog.h" +#include "ui_editannouncementdialog.h" + +EditAnnouncementDialog::EditAnnouncementDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::EditAnnouncementDialog) +{ + ui->setupUi(this); + highlight = new HighlightAnnounce(ui->textEditAnnouncement->document()); + ui->groupBoxPrivateSettings->setVisible(false); + ui->checkBoxUsePrivateSettings->setVisible(false); +} + +EditAnnouncementDialog::~EditAnnouncementDialog() +{ + delete highlight; + delete ui; +} + +void EditAnnouncementDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + switch ( e->type() ) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void EditAnnouncementDialog::on_checkBoxUsePrivateSettings_stateChanged(int arg1) +{ + ui->groupBoxPrivateSettings->setVisible(arg1 == 2); +} + +void EditAnnouncementDialog::on_checkBoxTimedSlides_stateChanged(int arg1) +{ + ui->spinBoxTimeOut->setEnabled(arg1 == 2); + ui->checkBoxLoop->setEnabled(arg1 == 2); +} + +void EditAnnouncementDialog::setNewAnnouce() +{ + resetUiItems(); + isNew = true; +} + +void EditAnnouncementDialog::setEditAnnouce(Announcement &editAnnoucement) +{ + editAnnounce = editAnnoucement; + setUiItems(); + isNew = false; +} + +void EditAnnouncementDialog::setCopyAnnouce(Announcement ©Annoucement) +{ + editAnnounce = copyAnnoucement; + editAnnounce.idNum = 0; + setUiItems(); + isNew = true; +} + +void EditAnnouncementDialog::setUiItems() +{ + ui->lineEditTitle->setText(editAnnounce.title); + ui->labelIdNum->setText(QString::number(editAnnounce.idNum)); + ui->textEditAnnouncement->setPlainText(editAnnounce.text); + ui->checkBoxUsePrivateSettings->setChecked(editAnnounce.usePrivateSettings); + ui->checkBoxTimedSlides->setChecked(editAnnounce.useAutoNext); + ui->spinBoxTimeOut->setValue(editAnnounce.slideTimer); + ui->checkBoxLoop->setChecked(editAnnounce.loop); +} + +void EditAnnouncementDialog::resetUiItems() +{ + Announcement a; + a.text = tr("Announce\n - Text of the announcement goes here\n\n" + "Slide\n - Text of the announcement goes here\n" + "You can have both Annouce or Slide as announcement block titles."); + ui->lineEditTitle->setText(a.title); + ui->labelIdNum->setText(QString::number(a.idNum)); + ui->textEditAnnouncement->setPlainText(a.text); + ui->checkBoxUsePrivateSettings->setChecked(a.usePrivateSettings); + ui->checkBoxTimedSlides->setChecked(a.useAutoNext); + ui->spinBoxTimeOut->setValue(a.slideTimer); + ui->checkBoxLoop->setChecked(a.loop); +} + +bool EditAnnouncementDialog::setSave() +{ + QString t = ui->lineEditTitle->text(); + t = t.simplified(); + if(!t.isEmpty()) + { + editAnnounce.title = t; + editAnnounce.text = ui->textEditAnnouncement->toPlainText(); + editAnnounce.usePrivateSettings = ui->checkBoxUsePrivateSettings->isChecked(); + editAnnounce.useAutoNext = ui->checkBoxTimedSlides->isChecked(); + editAnnounce.slideTimer = ui->spinBoxTimeOut->value(); + editAnnounce.loop = ui->checkBoxLoop->isChecked(); + return true; + } + else + { + QMessageBox mb(this); + mb.setText(tr("Announcement title cannot be left empty.\nPlease enter announcement title.")); + mb.setWindowTitle(tr("Announcement title is missing")); + mb.setIcon(QMessageBox::Warning); + mb.exec(); + ui->lineEditTitle->setFocus(); + return false; + } +} + +void EditAnnouncementDialog::on_pushButtonSave_clicked() +{ + if(!setSave()) + return; + + if(isNew) + { + editAnnounce.saveNew(); + emit announceToAdd(editAnnounce); + } + else + { + editAnnounce.saveUpdate(); + emit announceToUpdate(); + } + + close(); +} + +void EditAnnouncementDialog::on_pushButtonCancel_clicked() +{ + close(); +} diff --git a/editannouncementdialog.h b/editannouncementdialog.h new file mode 100644 index 0000000..86d1040 --- /dev/null +++ b/editannouncementdialog.h @@ -0,0 +1,68 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef EDITANNOUNCEMENTDIALOG_H +#define EDITANNOUNCEMENTDIALOG_H + +#include +#include +#include "announcement.h" +#include "highlight.h" + +namespace Ui { +class EditAnnouncementDialog; +} + +class EditAnnouncementDialog : public QDialog +{ + Q_OBJECT + +public: + explicit EditAnnouncementDialog(QWidget *parent = 0); + ~EditAnnouncementDialog(); + +public slots: + void setNewAnnouce(); + void setEditAnnouce(Announcement &editAnnoucement); + void setCopyAnnouce(Announcement ©Annoucement); + +signals: + void announceToAdd(Announcement announce); + void announceToUpdate(); + +private slots: + void on_checkBoxUsePrivateSettings_stateChanged(int arg1); + void on_checkBoxTimedSlides_stateChanged(int arg1); + void on_pushButtonSave_clicked(); + void on_pushButtonCancel_clicked(); + + void resetUiItems(); + void setUiItems(); + bool setSave(); + +private: + Ui::EditAnnouncementDialog *ui; + Announcement editAnnounce; + bool isNew; + HighlightAnnounce * highlight; +protected: + virtual void changeEvent(QEvent *e); +}; + +#endif // EDITANNOUNCEMENTDIALOG_H diff --git a/editannouncementdialog.ui b/editannouncementdialog.ui new file mode 100644 index 0000000..1f79149 --- /dev/null +++ b/editannouncementdialog.ui @@ -0,0 +1,173 @@ + + + EditAnnouncementDialog + + + + 0 + 0 + 377 + 449 + + + + Edit Announcement + + + + :/icons/icons/announce_edit.png:/icons/icons/announce_edit.png + + + + + + + + Title: + + + + + + + + + + ID: + + + + + + + QFrame::Box + + + QFrame::Sunken + + + + + + + + + Use Private Settings + + + + + + + true + + + + 0 + + + 6 + + + 0 + + + 0 + + + + + + + Timed slides: + + + + + + + sec + + + 1000 + + + + + + + Loop + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + false + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Save + + + + + + + Cancel + + + + + + + + + lineEditTitle + checkBoxUsePrivateSettings + checkBoxTimedSlides + spinBoxTimeOut + checkBoxLoop + textEditAnnouncement + + + + + + diff --git a/editwidget.cpp b/editwidget.cpp new file mode 100644 index 0000000..bdac752 --- /dev/null +++ b/editwidget.cpp @@ -0,0 +1,552 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "editwidget.h" +#include "ui_editwidget.h" +#include "song.h" + +EditWidget::EditWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::EditWidget) +{ + song_database = SongDatabase(); + ui->setupUi(this); + highlight = new Highlight(ui->textEditSong->document()); + + //Add caterories to the list + loadCategories(false); + + // Allow only positive values for the song number: + song_num_validator = new QIntValidator(1,10000000,ui->lineEditSongNumber); + ui->lineEditSongNumber->setValidator(song_num_validator); +} + +EditWidget::~EditWidget() +{ + delete highlight; + delete ui; +} + +void EditWidget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void EditWidget::on_btnSave_clicked() +{ + // Check if song title exists. A song title MUST exits + QString song_title = ui->lineEditTitle->text(); + song_title = song_title.simplified(); // make sure that its not all empty spaces + + if(song_title.isEmpty()) + { + QMessageBox mb(this); + mb.setText(tr("Song title cannot be left empty.\nPlease enter song title.")); + mb.setWindowTitle(tr("Song title is missing")); + mb.setIcon(QMessageBox::Warning); + mb.exec(); + ui->lineEditTitle->setFocus(); + return; + } + setSave(); + + setWaitCursor(); + if (is_new) + { + newSong.saveNew(); + // Get new songs ID + QSqlQuery sq; + sq.exec("SELECT seq FROM sqlite_sequence WHERE name = 'Songs'"); + sq.last(); + newSong.songID = sq.value(0).toInt(); + + emit addedNew(newSong,song_to_edit_id); + } + else + { + newSong.saveUpdate(); + emit updateSongFromDatabase(newSong.songID,song_to_edit_id); + } + setArrowCursor(); + + resetUiItems(); + close(); +} + +void EditWidget::setArrowCursor() +{ + this->setCursor(Qt::ArrowCursor); +} + +void EditWidget::setWaitCursor() +{ + this->setCursor(Qt::WaitCursor); +} + +void EditWidget::on_btnCancel_clicked() +{ + resetUiItems(); + close(); +} + +QString EditWidget::setSongText(QString song) +{ + QString text, text2, verselist; + QStringList split, editlist; + int i(0),j(0),k(0); + + editlist = song.split("@$");// split the text into verses seperated by @$ + + while (i lineEditTitle->setText(ss.title); + ui->lineEditMusicBy->setText(ss.musicBy); + ui->lineEditWordsBy->setText(ss.wordsBy); + ui->lineEditKey->setText(ss.tune); + ui->comboBoxCategory->setCurrentIndex(cat_ids.indexOf(ss.category)); + ui->checkBoxSongSettings->setChecked(ss.usePrivateSettings); + ui->groupBoxSettings->setVisible(ss.usePrivateSettings); + ui->comboBoxVAlignment->setCurrentIndex(ss.alignmentV); + ui->comboBoxHAlignment->setCurrentIndex(ss.alignmentH); + QPalette p; + p.setColor(QPalette::Base,ss.color); + ui->graphicsViewTextColor->setPalette(p); + p.setColor(QPalette::Base,ss.infoColor); + ui->graphicsViewInfoColor->setPalette(p); + p.setColor(QPalette::Base,ss.endingColor); + ui->graphicsViewEndingColor->setPalette(p); + ui->checkBoxUseBackground->setChecked(ss.useBackground); + ui->lineEditBackgroundPath->setText(ss.backgroundName); + //ui->textEditSong->setPlainText(setSongText(ss.songText)); + ui->textEditSong->setPlainText(ss.songText); + ui->plainTextEditNotes->setPlainText(ss.notes); +} + +void EditWidget::setUiItems() +{ + ui->lineEditTitle->setText(editSong.title); + ui->lineEditMusicBy->setText(editSong.musicBy); + ui->lineEditWordsBy->setText(editSong.wordsBy); + ui->lineEditKey->setText(editSong.tune); + ui->comboBoxCategory->setCurrentIndex(cat_ids.indexOf(editSong.category)); + setSongbook(editSong.songID); + ui->checkBoxSongSettings->setChecked(editSong.usePrivateSettings); + ui->groupBoxSettings->setVisible(editSong.usePrivateSettings); + ui->comboBoxVAlignment->setCurrentIndex(editSong.alignmentV); + ui->comboBoxHAlignment->setCurrentIndex(editSong.alignmentH); + updateColor(); + updateInfoColor(); + updateEndingColor(); + ui->checkBoxUseBackground->setChecked(editSong.useBackground); + ui->lineEditBackgroundPath->setEnabled(editSong.useBackground); + ui->toolButtonBrowseBackground->setEnabled(editSong.useBackground); + ui->lineEditBackgroundPath->setText(editSong.backgroundName); +// ui->textEditSong->setPlainText(setSongText(editSong.songText)); + ui->textEditSong->setPlainText(editSong.songText); + ui->plainTextEditNotes->setPlainText(editSong.notes); +} + +void EditWidget::setSave(){ + newSong = editSong; + newSong.number = ui->lineEditSongNumber->text().toInt(); + newSong.songbook_id = song_database.getSongbookIdStringFromName(ui->songbook_label->text()); + newSong.songbook_name = ui->songbook_label->text(); + newSong.title = ui->lineEditTitle->text(); + newSong.category = cat_ids.at(ui->comboBoxCategory->currentIndex()); + newSong.tune = ui->lineEditKey->text(); + newSong.wordsBy = ui->lineEditWordsBy->text(); + newSong.musicBy = ui->lineEditMusicBy->text(); +// newSong.songText = resetLyric(ui->textEditSong->toPlainText()); + newSong.songText = ui->textEditSong->toPlainText().trimmed(); + newSong.alignmentV = ui->comboBoxVAlignment->currentIndex(); + newSong.alignmentH = ui->comboBoxHAlignment->currentIndex(); + newSong.usePrivateSettings = ui->checkBoxSongSettings->isChecked(); + newSong.useBackground = ui->checkBoxUseBackground->isChecked(); + newSong.backgroundName = ui->lineEditBackgroundPath->text(); + newSong.notes = ui->plainTextEditNotes->toPlainText(); +} + +QString EditWidget::resetLyric(QString lyric) +{ + QString fSong; + QStringList lSong = lyric.split("\n"); + int i(1); + lyric = lSong[0]; + while (itextEditSong->setPlainText(song.songText); + else + setUiItems(); + is_new = true; + bool ok; + + QSqlQuery sq; + QStringList songbook_list; + songbook_list << msgNewSongbook; + sq.exec("SELECT id, name FROM Songbooks"); + while (sq.next()) + songbook_list << sq.value(1).toString(); + + int current_songbook(0); + if (!add_to_songbook.isEmpty()) + current_songbook = songbook_list.indexOf(add_to_songbook); + else + current_songbook = 0; + + add_to_songbook = QInputDialog::getItem(this,tr("Select Songbook"),msgCaption, + songbook_list,current_songbook,false,&ok); + + if (ok && !add_to_songbook.isEmpty()) + { + if (add_to_songbook == msgNewSongbook) + { + // Add a Songbook to add a new song into + addSongbook(); + } + else + { + int last = song_database.lastUser(song_database.getSongbookIdStringFromName(add_to_songbook)); + ui->songbook_label->setText(add_to_songbook); + ui->lineEditSongNumber->setText(QString::number(last)); + } + } + else + close(); +} + +void EditWidget::addSongbook() +{ + AddSongbookDialog add_sbor; + add_sbor.setWindowTitle(tr("Add a Songbook")); + int last(0); + int ret = add_sbor.exec(); + switch(ret) + { + case AddSongbookDialog::Accepted: + song_database.addSongbook(add_sbor.title,add_sbor.info); + last = song_database.lastUser(song_database.getSongbookIdStringFromName(add_sbor.title)); + ui->songbook_label->setText(add_sbor.title); + ui->lineEditSongNumber->setText(QString::number(last)); + add_to_songbook = add_sbor.title; + break; + case AddSongbookDialog::Rejected: + close(); + break; + } +} + +QStringList EditWidget::categories() +{ + QStringList cat; + cat<comboBoxCategory->currentIndex(); + if(cur_index>=0) + cur_cat_id = cat_ids.at(cur_index); + + // get categories + QStringList cat_list; + cat_list = categories(); + + // create sorting by name and refrance categories id + QMap cmap; + for(int i(0); i< cat_list.count(); ++i) + cmap.insert(cat_list.at(i),i); + cat_ids.clear(); + cat_list.clear(); + cat_ids.append(cmap.values()); + cat_list.append(cmap.keys()); + + if(ui_update)// update ui translations + { + for(int i(0); i<= ui->comboBoxCategory->count()-1;++i) + ui->comboBoxCategory->setItemText(i,cat_list.at(i)); + + // reset to selected category + if(cur_cat_id>=0) + cur_index = cat_ids.indexOf(cur_cat_id); + ui->comboBoxCategory->setCurrentIndex(cur_index); + } + else if(!ui_update)// initialize + ui->comboBoxCategory->addItems(cat_list); +} + +int EditWidget::isInDatabase(Song *song) +{ + QString s_title(""), s_id("0"), sb_id("0"); + QSqlQuery sq; + + // check if song is part of songbook + sq.exec("SELECT id FROM Songbooks WHERE name = '" + song->songbook_name + "'"); + while(sq.next()) + sb_id = sq.value(0).toString().trimmed(); + sq.clear(); + if(sb_id == "0") + return 0; // no such songbook in database + + // get song id + sq.exec("SELECT id, title from Songs WHERE songbook_id = '" + sb_id +"' AND number = '" + QString::number(song->number) +"'"); + while(sq.next()) + { + s_id = sq.value(0).toString().trimmed(); + s_title = sq.value(1).toString().trimmed(); + } + sq.clear(); + if(s_id == "0") + return 0; // no matching song + song->songID = s_id.toInt(); + + // get song title + if(s_title!=song->title) + return 0; + else + return s_id.toInt(); +} + +void EditWidget::on_checkBoxSongSettings_toggled(bool checked) +{ + ui->groupBoxSettings->setVisible(checked); +} + +void EditWidget::updateColor() +{ + QPalette p; + p.setColor(QPalette::Base,editSong.color); + ui->graphicsViewTextColor->setPalette(p); +} + +void EditWidget::updateInfoColor() +{ + QPalette p; + p.setColor(QPalette::Base,editSong.infoColor); + ui->graphicsViewInfoColor->setPalette(p); +} + +void EditWidget::updateEndingColor() +{ + QPalette p; + p.setColor(QPalette::Base,editSong.endingColor); + ui->graphicsViewEndingColor->setPalette(p); +} + +void EditWidget::on_pushButtonPrint_clicked() +{ + setSave(); + PrintPreviewDialog* p; + p = new PrintPreviewDialog(this); + p->setText(newSong); + p->exec(); +} + +void EditWidget::on_toolButtonMainColor_clicked() +{ + QColor c(QColorDialog::getColor(editSong.color,this)); + if(c.isValid()) + editSong.color = c; + updateColor(); +} + +void EditWidget::on_toolButtonMainFont_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,editSong.font,this); + if(ok) + editSong.font = font; +} + +void EditWidget::on_toolButtonInfoColor_clicked() +{ + QColor c(QColorDialog::getColor(editSong.infoColor,this)); + if(c.isValid()) + editSong.infoColor = c; + updateInfoColor(); +} + +void EditWidget::on_toolButtonFont_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,editSong.infoFont,this); + if(ok) + editSong.infoFont = font; +} + +void EditWidget::on_toolButtonEndingColor_clicked() +{ + QColor c(QColorDialog::getColor(editSong.endingColor,this)); + if(c.isValid()) + editSong.endingColor = c; + updateEndingColor(); +} + +void EditWidget::on_toolButtonEndingFont_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,editSong.endingFont,this); + if(ok) + editSong.endingFont = font; +} + +void EditWidget::on_checkBoxUseBackground_toggled(bool checked) +{ + ui->lineEditBackgroundPath->setEnabled(checked); + ui->toolButtonBrowseBackground->setEnabled(checked); +} + +void EditWidget::on_toolButtonBrowseBackground_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select an image for the wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + + if( !filename.isNull() ) + { + QPixmap p(filename); + editSong.background = p.scaled(1280,1280,Qt::KeepAspectRatio); + QFileInfo fi(filename); + filename = fi.fileName(); + editSong.backgroundName = filename; + ui->lineEditBackgroundPath->setText(filename); + } +} diff --git a/editwidget.h b/editwidget.h new file mode 100644 index 0000000..ca6b6b7 --- /dev/null +++ b/editwidget.h @@ -0,0 +1,97 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef EDITWIDGET_H +#define EDITWIDGET_H + +#include +#include +#include "song.h" +#include "addsongbookdialog.h" +#include "highlight.h" +#include "printpreviewdialog.h" + +namespace Ui { +class EditWidget; +} + +class EditWidget : public QWidget { + Q_OBJECT + Q_DISABLE_COPY(EditWidget) +public: + explicit EditWidget(QWidget *parent = 0); + virtual ~EditWidget(); + +public slots: + void setCopy(Song copy); + void setEdit(Song sEdit); + void setNew(); + QStringList categories(); + void retranslateUis(); + +signals: + // For communicating with SongsModel + void updateSongFromDatabase(int songid, int initial_song_id); + void addedNew(Song song, int initial_song_id); + +protected: + virtual void changeEvent(QEvent *e); + +private: + Ui::EditWidget *ui; + Song editSong, newSong; + SongDatabase song_database; + bool is_new; + Highlight *highlight; + QIntValidator *song_num_validator; + void setWaitCursor(); + void setArrowCursor(); + QString add_to_songbook; + QList cat_ids; + int song_to_edit_id; + +private slots: + void addNewSong(Song song, QString msgNewSongbook, QString msgCaption); + void addSongbook(); + void on_btnCancel_clicked(); + void on_btnSave_clicked(); + void resetUiItems(); + void setUiItems(); + void setSave(); + void setSongbook(int id); + void loadCategories(bool ui_update); + QString resetLyric(QString lyric); + QString setSongText(QString text); + int isInDatabase(Song *song); + void on_checkBoxSongSettings_toggled(bool checked); + void updateColor(); + void updateInfoColor(); + void updateEndingColor(); + void on_pushButtonPrint_clicked(); + void on_toolButtonMainColor_clicked(); + void on_toolButtonMainFont_clicked(); + void on_toolButtonInfoColor_clicked(); + void on_toolButtonFont_clicked(); + void on_toolButtonEndingColor_clicked(); + void on_toolButtonEndingFont_clicked(); + void on_checkBoxUseBackground_toggled(bool checked); + void on_toolButtonBrowseBackground_clicked(); +}; + +#endif // EDITWIDGET_H diff --git a/editwidget.ui b/editwidget.ui new file mode 100644 index 0000000..49ef8f8 --- /dev/null +++ b/editwidget.ui @@ -0,0 +1,621 @@ + + + EditWidget + + + + 0 + 0 + 400 + 531 + + + + + 400 + 0 + + + + Edit and/or Add New songs + + + + :/icons/icons/edit.png:/icons/icons/edit.png + + + + + + + + Songbook: + + + + + + + + 100 + 0 + + + + + + + + + + + + 75 + 16777215 + + + + + + + + Print + + + + :/icons/icons/print.png:/icons/icons/print.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Title: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + Words by: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Music by: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + Key: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Category: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 200 + 0 + + + + QComboBox::AdjustToMinimumContentsLength + + + + + + + + + + + Use Private Song Settings + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + true + + + + 0 + + + + + + + Main Text Properties: + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 19 + + + + + 50 + 19 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Main Text Alignment: + + + + + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Song Information Properties: + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 19 + + + + + 50 + 19 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Song Ending Properties: + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 19 + + + + + 50 + 19 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Use Background: + + + + + + + true + + + true + + + + + + + Browse... + + + + + + + + + + + + false + + + + + + + Qt::Horizontal + + + + + + + + + Notes: + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 16777215 + 55 + + + + + + + + + + Qt::Horizontal + + + + 168 + 20 + + + + + + + + Save + + + Ctrl+S + + + + + + + Cancel + + + Ctrl+Q + + + + + + + + + lineEditSongNumber + lineEditTitle + lineEditWordsBy + lineEditMusicBy + lineEditKey + comboBoxCategory + textEditSong + plainTextEditNotes + pushButtonPrint + checkBoxSongSettings + toolButtonMainColor + graphicsViewTextColor + toolButtonMainFont + comboBoxVAlignment + comboBoxHAlignment + toolButtonInfoColor + graphicsViewInfoColor + toolButtonFont + toolButtonEndingColor + graphicsViewEndingColor + toolButtonEndingFont + checkBoxUseBackground + toolButtonBrowseBackground + lineEditBackgroundPath + btnSave + btnCancel + + + + + + diff --git a/generalsettingwidget.cpp b/generalsettingwidget.cpp new file mode 100644 index 0000000..d50615b --- /dev/null +++ b/generalsettingwidget.cpp @@ -0,0 +1,218 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "generalsettingwidget.h" +#include "ui_generalsettingwidget.h" + +GeneralSettingWidget::GeneralSettingWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::GeneralSettingWidget) +{ + ui->setupUi(this); +} + +GeneralSettingWidget::~GeneralSettingWidget() +{ + delete ui; +} + +void GeneralSettingWidget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch ( e->type() ) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void GeneralSettingWidget::setSettings(GeneralSettings settings) +{ + mySettings = settings; + loadSettings(); +} + +void GeneralSettingWidget::loadSettings() +{ + ui->checkBoxDisplayOnTop->setChecked(mySettings.displayIsOnTop); + + // Load Themes + loadThemes(); + ui->comboBoxTheme->setCurrentIndex(themeIdList.indexOf(mySettings.currentThemeId)); + + // Get display screen infomration + monitors.clear(); + QDesktopWidget d; + int screen_count = d.screenCount(); + ui->comboBoxDisplayScreen->clear(); + for(int i(0); i1) + ui->groupBoxDisplayScreen->setEnabled(true); + else + ui->groupBoxDisplayScreen->setEnabled(false); + + // Fill display screen comboBoxes + ui->comboBoxDisplayScreen->clear(); + ui->comboBoxDisplayScreen->addItems(monitors); + ui->comboBoxDisplayScreen_2->clear(); + ui->comboBoxDisplayScreen_2->addItem(tr("none")); + ui->comboBoxDisplayScreen_2->addItems(monitors); + + // Set primary display screen + if(mySettings.displayScreen<0 || mySettings.displayScreen>=screen_count) + ui->comboBoxDisplayScreen->setCurrentIndex(0); + else + ui->comboBoxDisplayScreen->setCurrentIndex(mySettings.displayScreen); + + // Set secondaty display screen + if(mySettings.displayScreen2<-1 || mySettings.displayScreen2>=screen_count) + ui->comboBoxDisplayScreen_2->setCurrentIndex(0); + else + ui->comboBoxDisplayScreen_2->setCurrentIndex(mySettings.displayScreen2+1); + updateSecondaryDisplayScreen(); + + // Set Display Controls + if(screen_count>1) + ui->groupBoxDisplayControls->setEnabled(false); + else + ui->groupBoxDisplayControls->setEnabled(true); + ui->comboBoxIconSize->setCurrentIndex(mySettings.displayControls.buttonSize); + ui->comboBoxControlsAlignV->setCurrentIndex(mySettings.displayControls.alignmentV); + ui->comboBoxControlsAlignH->setCurrentIndex(mySettings.displayControls.alignmentH); + ui->horizontalSliderOpacity->setValue(mySettings.displayControls.opacity*100); +} + +void GeneralSettingWidget::loadThemes() +{ + QSqlQuery sq; + sq.exec("SELECT id, name FROM Themes"); + themeIdList.clear(); + themes.clear(); + while(sq.next()) + { + themeIdList<< sq.value(0).toInt(); + themes<comboBoxTheme->clear(); + ui->comboBoxTheme->addItems(themes); +} + +GeneralSettings GeneralSettingWidget::getSettings() +{ + mySettings.displayIsOnTop = ui->checkBoxDisplayOnTop->isChecked(); + + int tmx = ui->comboBoxTheme->currentIndex(); + if(tmx != -1) + mySettings.currentThemeId = themeIdList.at(tmx); + else + mySettings.currentThemeId = 0; + + mySettings.displayScreen = ui->comboBoxDisplayScreen->currentIndex(); + mySettings.displayScreen2 = monitors.indexOf(ui->comboBoxDisplayScreen_2->currentText()); + + mySettings.displayControls.buttonSize = ui->comboBoxIconSize->currentIndex(); + mySettings.displayControls.alignmentV = ui->comboBoxControlsAlignV->currentIndex(); + mySettings.displayControls.alignmentH = ui->comboBoxControlsAlignH->currentIndex(); + qreal r = ui->horizontalSliderOpacity->value(); + r = r/100; + mySettings.displayControls.opacity = r; + + return mySettings; +} + +void GeneralSettingWidget::on_pushButtonDefault_clicked() +{ + GeneralSettings g; + mySettings = g; + loadSettings(); +} + +void GeneralSettingWidget::updateSecondaryDisplayScreen() +{ + QString ds1 = ui->comboBoxDisplayScreen->currentText(); + QString ds2 = ui->comboBoxDisplayScreen_2->currentText(); + QStringList monitors2 = monitors; + monitors2.removeOne(ds1); + + ui->comboBoxDisplayScreen_2->clear(); + ui->comboBoxDisplayScreen_2->addItem(tr("None")); + ui->comboBoxDisplayScreen_2->addItems(monitors2); + + int i = ui->comboBoxDisplayScreen_2->findText(ds2); + if(i != -1) + ui->comboBoxDisplayScreen_2->setCurrentIndex(i); + else + { + ui->comboBoxDisplayScreen_2->setCurrentIndex(0); + emit setDisp2Use(false); + } +} + +void GeneralSettingWidget::on_comboBoxDisplayScreen_activated(const QString &arg1) +{ + updateSecondaryDisplayScreen(); +} + +void GeneralSettingWidget::on_comboBoxDisplayScreen_2_activated(int index) +{ + if(index<=0) + emit setDisp2Use(false); + else + emit setDisp2Use(true); +} + +void GeneralSettingWidget::on_pushButtonAddTheme_clicked() +{ + Theme tm; + ThemeInfo tmi; + int nId; + + AddSongbookDialog theme_dia; + theme_dia.setWindowTitle(tr("Edit Theme")); + theme_dia.setWindowText(tr("Theme Name:"),tr("Comments:")); + theme_dia.setSongbook(tr("Default"),tr("This theme will contain program default settings.")); + int ret = theme_dia.exec(); + switch(ret) + { + case AddSongbookDialog::Accepted: + tmi.name = theme_dia.title; + tmi.comments = theme_dia.info; + tm.setThemeInfo(tmi); + tm.saveThemeNew(); + nId = tm.getThemeId(); + + loadThemes(); + + ui->comboBoxTheme->setCurrentIndex(themeIdList.indexOf(nId)); + emit themeChanged(nId); + + break; + case AddSongbookDialog::Rejected: + break; + } +} + +void GeneralSettingWidget::on_comboBoxTheme_activated(int index) +{ + emit themeChanged(themeIdList.at(index)); +} diff --git a/generalsettingwidget.h b/generalsettingwidget.h new file mode 100644 index 0000000..3367ccc --- /dev/null +++ b/generalsettingwidget.h @@ -0,0 +1,69 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef GENERALSETTINGWIDGET_H +#define GENERALSETTINGWIDGET_H + +#include +#include "settings.h" +#include "addsongbookdialog.h" +#include "theme.h" + +namespace Ui { +class GeneralSettingWidget; +} + +class GeneralSettingWidget : public QWidget +{ + Q_OBJECT + +public: + explicit GeneralSettingWidget(QWidget *parent = 0); + ~GeneralSettingWidget(); + +private: + Ui::GeneralSettingWidget *ui; + GeneralSettings mySettings; + Settings allSetings; + QStringList monitors; + QStringList themes; + QList themeIdList; + +public slots: + void setSettings(GeneralSettings settings); + void updateSecondaryDisplayScreen(); + GeneralSettings getSettings(); + +signals: + void setDisp2Use(bool toUse); + void themeChanged(int theme_id); + +private slots: + void on_pushButtonDefault_clicked(); + void loadThemes(); + void loadSettings(); + void on_comboBoxDisplayScreen_activated(const QString &arg1); + void on_comboBoxDisplayScreen_2_activated(int index); + void on_pushButtonAddTheme_clicked(); + void on_comboBoxTheme_activated(int index); +protected: + virtual void changeEvent(QEvent *e); +}; + +#endif // GENERALSETTINGWIDGET_H diff --git a/generalsettingwidget.ui b/generalsettingwidget.ui new file mode 100644 index 0000000..76f3368 --- /dev/null +++ b/generalsettingwidget.ui @@ -0,0 +1,349 @@ + + + GeneralSettingWidget + + + + 0 + 0 + 412 + 440 + + + + + + + If checked, the screen "window" is always drawn on top of other windows. This prevents the user from accidently drawing a window onto the projector's screen. + + + Display window always on top + + + + + + + + + Theme: + + + + + + + + 0 + 0 + + + + + + + + Add New Theme + + + + :/icons/icons/add.png:/icons/icons/add.png + + + + + + + + + Display Screen Selection + + + + + + Primary Display Screen: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Select onto which screen to dispaly + + + + + + + Qt::Horizontal + + + + 162 + 20 + + + + + + + + Secondary Display Screen: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + Select onto which screen to dispaly + + + + + + + Qt::Horizontal + + + + 162 + 20 + + + + + + + + + + + Primary Display Screen Controls + + + + + + + + Button Size: + + + + + + + + 16x16 + + + + + 24x24 + + + + + 32x32 + + + + + 48x48 + + + + + 64x64 + + + + + 96x96 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Alignment: + + + + + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + + + + + Opacity: + + + + + + + Transparent + + + + + + + 102 + + + Qt::Horizontal + + + + + + + Opaque + + + + + + + + + NOTE: Display screen controls will be visible on the primary display screen only when one monitor is avaliable. + + + true + + + + + + + + + + Qt::Vertical + + + + 20 + 14 + + + + + + + + + + Reset All To Default + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + checkBoxDisplayOnTop + comboBoxTheme + pushButtonAddTheme + comboBoxDisplayScreen + comboBoxDisplayScreen_2 + comboBoxIconSize + comboBoxControlsAlignV + comboBoxControlsAlignH + horizontalSliderOpacity + pushButtonDefault + + + + + + diff --git a/help/about.html b/help/about.html new file mode 100644 index 0000000..85100d7 --- /dev/null +++ b/help/about.html @@ -0,0 +1,71 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

1.1 About softProjector

+

 

+

In about 2007 a program called BibleProjector has been released by Ilya + Spivakov. It was a very simple program that showed Bible verses on the + screen in church. He also added ability to show song. In early 2009, one + more developer, Vladislav Kobzar has joined the programming. By now, + plans for have been set to rewrite initial program and call it "softProject". + So the writing has started again and in spring of 2009 fist development + release of soft projector has been released. During summer of 2009, + one more developer has joined the team, Matvey Adzhigirey, and with his + help, in the fall first alpha + release of softProjector has been released to the public and in spring + of 2010 first beta version has been made available. With Gods help and + wisdom, many changes improvements has been made, many new features has + been added, while keeping it simple and easy to use, but still powerful. +

+

Programming:
+ softProjector is written in C++ with Qt libraries. Writing with Qt + libraries, it enable to have this program easily complied on any operating + system without writing any additional code. All code is open source and + anyone who can program can do their modifications to it. Source code can be + downloaded form http://sourceforge.net/projects/softprojector/ without any charge. Qt + libraries are available from http://qt.nokia.com/

+

Distribution:
+ As softProjector is written as open source program, this means that + softProjector is completely free. There is no charge to use this program.

+

Minimum Requirements:
+ Minimum requirements for softProjector has not been set. softProjector has + been successfully build and tested on Linux (Fedora), Mac, and Windows (Xp, + Vista, 7).
+ Dual monitor support is required for softProjector to display as designed. + See section 5.4. Dual Screen Settings

Previous
Next
+ \ No newline at end of file diff --git a/help/about_de.html b/help/about_de.html new file mode 100644 index 0000000..ea7b4a2 --- /dev/null +++ b/help/about_de.html @@ -0,0 +1,72 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

1.1 Über softProjector

+

 

+

Im Jahre 2007 hat Ilya Spivakov ein Programm unter dem Namen BibleProjector + entworfen. Dies war ein sehr einfaches Programm zum Anzeigen der Bibelverse + an der Leinwand in der Kirche. Später fügte er die Option zum Anzeigen der Lieder zu. + Anfang 2009 stieß der Programmierer Vladislav Kobzar zu dem Projekt hinzu. + Die beiden haben sich entschloßen, den ursprünglichen Code neu zu schreiben + und nannten ihn "softProject". + Die Arbeit mit dem Programm bekam einen neuen Impuls, und im Frühjahr 2009 + ist die erste Herausgabe erschienen. Im Sommer 2009 kam der Programmierer + Matvey Adzhigirey dazu, und Dank seiner Teilnahme, erschien im Herbst des + gleichen Jahres die erste Alfa-, und im Frühjahr 2010 die erste Beta-Versionen. + Mit Gottes Hilfe wurden viele Verbesserungen unternommen und neue Optionen + hinzugefügt. Das Programm blieb, wie auch am Anfang geplant, ganz einfach + in der Bedienung, aber stark in der Leistung. +

+

Für Programmierer:
+ softProjector ist in C++ mit Qt Bibliotheken geschrieben. Dank der Nutzung der Qt + Bibliotheken, ist es einfach, dieses Programm in jedes beliebige System, ohne Zufügung + eines zusätzlichen Codes, zu kompilieren. Der Code ist offen, und jeder Programmierer + kann seine Änderungen unternehmen. + Den Code kann man hier kostenlos herunterladen: http://sourceforge.net/projects/softprojector/ + Qt Bibliotheken sind hier erhältlich: http://qt.nokia.com/

+

Vertrieb:
+ Da softProjector als ein freigegebenes Programm entwickelt wurde, ist es absolut + kostenlos. + Für die Nutzung des Programms werden keine Gebühren erhoben.

+

Mindestforderungen:
+ Es wurden keine Mindestforderungen für softProjector festgestellt. + softProjector wurde erfolgreich auf Linux, Mac und Windows (Xp, + Vista, 7) kompiliert und getestet.
+ Für die Nutzung des Programms ist die Unterstützung zweier Monitoren erfoderlich. + Siehe 5.4. Bildschirm-Einstellungen

Previous
Next
+ \ No newline at end of file diff --git a/help/about_ru.html b/help/about_ru.html new file mode 100644 index 0000000..651fc5c --- /dev/null +++ b/help/about_ru.html @@ -0,0 +1,69 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

1.1 О программе

+

 

+

В 2007 году Илья Спиваков создал программу под названием BibleProjector. + Это была очень простая программа для высвечивания на экране в церкви стихов из Библии. + Затем он добавил опцию показа песен. В начале 2009 к созданию программы подключился еще один + разработчик, Владислав Кобзар. Было решено переписать заново первоначальный код программы и назвать ее + "softProject" (далее "Софт Проектор"). Работа над программой получила новый импульс, и весной 2009 вышел в свет + ее первый выпуск. Летом 2009 в команду вошел еще один разработчик, Матвей Аджигирей, и при его + участии, осенью того же года вышла в свет первая альфа, а весной 2010 первая бета версия. + С Божьей помощью, было сделано много улучшений и добавлено много новых опций, + в то же время программа осталась, как и было задумано, простой в употреблении + но мощной по своим возможностям. +

+

Для программистов:
+ Софт Проектор написан на C++ с Qt библиотеками. Благодаря использованию Qt + библиотек, программу легко компилировать под любую операционную систему + без добавления дополнительного кода. Весь код открыт, и любой программист + может вносить в него свои изменения. + Скачать код можно бесплатно здесь: + http://sourceforge.net/projects/softprojector/. + Qt библиотеки можно скачать здесь: http://qt.nokia.com/

+

Распространение:
+ Поскольку softProjector создан как открытая программа, он абсолютно бесплатен. + За пользование программой не нужно ничего платить.

+

Минимальные требования:
+ Минимальные требования для Софт Проектора не установлены. + Софт Проектор успешно компилировался и тестировался на Линуксе (Федора), Макинтоше и Виндовзе + (XP, Vista, 7).
+ Для работы программы обязательна поддержка двух мониторов. + Подробнее

Previous
Next
+ \ No newline at end of file diff --git a/help/addsongbooks.html b/help/addsongbooks.html new file mode 100644 index 0000000..8e7e14e --- /dev/null +++ b/help/addsongbooks.html @@ -0,0 +1,48 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.1.1 Adding New + Songbooks

+

When adding or copping a song, at an option to add a new + songbook, a dialog will popup to add a new songbook. Enter new songbook information + and click okay to continue to add/copy a song.
+ Songbook can be also imported from softProjector songbook file (*.sps). See + Manage Songbooks to learn more.

+


+ Add Songbook
+ 1. "Songbook title". Enter the title of the new songbook.
+ 2. "Description". Enter short description about new songbook.
+ 3. Click "Ok" button. This will add a new songbook into the database. + This dialog box will close and now you will continue to add/copy your song.

+
Previous
Next
+ \ No newline at end of file diff --git a/help/addsongbooks_de.html b/help/addsongbooks_de.html new file mode 100644 index 0000000..8293887 --- /dev/null +++ b/help/addsongbooks_de.html @@ -0,0 +1,47 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.1.1 Gesangbuch hinzufügen

+

Beim Hinzufügen (speichern) neuer Lieder, erscheint ein Dialog-Fenster mit dem Vorschlag, + ein neues Gesangbuch hinzufügen. Tragen Sie bitte die Information über das neue Gesangbuch ein und + drücken Sie "Speichern", und tragen Sie in das Buch das Lied ein.
+ Ein Gesangbuch kann man auch aus der Datei (*.sps) importieren. Siehe + Ausführlicher: um mehr zu lernen.

+


+ Add Songbook
+ 1. "Name des Gesangbuches". Tragen Sie bitte den Namen des neuen Gesangbuches ein.
+ 2. "Beschreibung". Tragen Sie bitte eine kurze Beschreibung des neuen Gesangbuches ein.
+ 3. Klicken Sie den "Speichern" Knopf. Das neue Gesangbuch wird in die Datenbank hinzugefügt. + Das Dialog-Fenster wird geschlossen und Sie können mit dem Hinzufügen (speichern) der Lieder in dieses Gesangbuch fortsetzen.

+
Previous
Next
+ \ No newline at end of file diff --git a/help/addsongbooks_ru.html b/help/addsongbooks_ru.html new file mode 100644 index 0000000..64c73e6 --- /dev/null +++ b/help/addsongbooks_ru.html @@ -0,0 +1,47 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.1.1 + Добавление новых сборников

+

При добавлении (копировании) новых песен, появляется диалоговое окно с предложением добавить новый сборник. + Введите информацию о новом сборнике, нажмите на кнопку "Сохранить" и внесите в него песню. + Сборник можно также импортировать из файла базы данных (*.sps).
+ Подробнее:

+


+ Add Songbook
+ 1. "Название сборника". Введите название нового сборника.
+ 2. "Описание". Введите краткое описание нового сборника.
+ 3. Нажмите на кнопку "Сохранить". Новый сборник будет добавлен в базу данных. + Диалоговое окно закроется и вы сможете продолжать добавление (копирование) песни в данный сборник.

+
Previous
Next
+ \ No newline at end of file diff --git a/help/addsongs.html b/help/addsongs.html new file mode 100644 index 0000000..265cdc4 --- /dev/null +++ b/help/addsongs.html @@ -0,0 +1,63 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.1 Adding New Songs

+

To add a new song:
+ 1. Select "Songs" tab. + SoftProjector will allow song to be added only when "Songs" tab in selected.
+ 2. Edit>New Song. Shortcut: Crtl+N
+ Select Songbook
+ 3. Select Songbook.
Select a songbook to which you would want to add a new song to. If you do not want to add to any existing songbooks, you may + also add a new songbook. See + "Adding New Songbooks" for detail on adding a new songbook. + See also Editing Songs page for details on Edit Window.
+ 4. Enter song number. SoftProjector will automatically enter a next song number. If for any reason + the song number that softProjector give, is not the one you do not want to use, you may change it.
+ 5. Enter song title. You must have a song title for all song. All non-alphanumeric + characters will be removed from the title. This is done so that song searching/filtering + is made + easier.
+ 6. Enter author of the words for this song. "Words By" entry field.
+ 7. Enter author of the music for this song. "Music By" entry field.
+ 8. Enter tune(key). This is the tune/key that this song is sung in.
+ 9. Select Category.
+ 10. Enter song text. Song text must be properly + formatted in order not to crash the program and to show the song properly. See + Song Format + for detail.
+ 11. Click "Save" button. If you do not want to save changes, click "Cancel" button. + Allow few seconds for song table to reload after clicking "Save" button.
+

+
Previous
Next
+ + diff --git a/help/addsongs_de.html b/help/addsongs_de.html new file mode 100644 index 0000000..901cd9c --- /dev/null +++ b/help/addsongs_de.html @@ -0,0 +1,58 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.1 Hinzufügen eines neuen Liedes

+

Neues Lied hinzufügen:
+ 1. Wählen Sie "Lied" Reiter. + Neue Lieder kann man nur in diesem Reiter hinzufügen "Lieder" Reiter.
+ 2. Ändern>Neues Lied. Abkürzung: Crtl+N
+ Select Songbook
+ 3. Wählen Sie ein Gesangbuch.
Wählen Sie ein Gesangbuch oder erstellen Sie ein neues, in das Sie ein Lied hinzufügen möchten. Ausführlicher + über Hinzufügen eines neuen Gesangbuches, siehe + "Gesangbuch hinzufügen" und über das ändern der Lieder hier .
+ 4. Tragen Sie eine Lied-Nummer ein. SoftProjector gibt eine Nummer automatisch ein. + Auf Wunsch kann man die Nummer, die mit dem Programm eingegeben worden ist, ändern.
+ 5. Tragen Sie den Namen des Liedes ein. Alle Lieder müssen ihren Namen haben! Alle nicht alphabetisch-nummerische + Zeichen werden aus der Bezeichnung entfernt! Dies ist für eine normale Arbeit der Suche/Filter-Funktion erforderlich.
+ 6. Tragen Sie den Namen des Dichters in das Feld "Dichter" ein.
+ 7. Tragen Sie den Namen des Komponisten in das Feld "Komponist" ein.
+ 8. Tragen Sie die Tonart ein.
+ 9. Wählen Sie eine Kategorie.
+ 10. Tragen Sie den Text des Liedes ein. Der Text muss richtig formatiert werden, um Abstürze in dem Programm zu vermeiden, und dass der Text auf die Leinwand richtig übertragen wird. Siehe + Lied formatieren
+ 11. Drücken Sie "Speichern" Knopf. Falls Sie nicht wünschen die Änderungen zu speichern, so drücken Sie "Abbrechen" Knopf. + Nach dem Drücken des "Speichern" Knopfes, dauert es einige Sekunden, bis das Lied in die Datenbank geladen wird.
+

+
Previous
Next
+ + diff --git a/help/addsongs_ru.html b/help/addsongs_ru.html new file mode 100644 index 0000000..b57056b --- /dev/null +++ b/help/addsongs_ru.html @@ -0,0 +1,60 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.1 Добавление новых песен

+

Добавить новую песню:
+ 1. Выберите закладку "Песни". + Новые песни можно добавлять только на этой закладке.
+ 2. Выберите опцию "Правка>Новая песня". Горячие клавиши: Crtl+N
+ Select Songbook
+ 3. Выбрать сборник.
Выберите существующий сборник или создайте новый, в который вы хотите добавить песню. + Подробнее о добавлении нового сборника — здесь, + и о редактировании песен — здесь .
+ 4. Введите номер песни. Номер следующей песни программа задает автоматически. + При желании, можно изменить заданный программой номер.
+ 5. Введите название песни. Все песни должны иметь название. Любые не алфавитно-номерные знаки автоматически удаляются из названия. + Это необходимо для нормальной работы поиска / фильтрования песен.
+ 6. Введите имя автора слов в поле "Слова".
+ 7. Введите имя композитора в поле "Музыка".
+ 8. Введите тональность.
+ 9. Выберите категорию.
+ 10. Введите текст песни. Текст необходимо должным образом отформатировать, + чтобы не было сбоев в работе программы и текст выводился на экран правильно. Подробнее о форматировании — + здесь.
+ 11. Нажмите на кнопку "Сохранить". + Если вы не желаете сохранить внесенные изменения, нажмите на кнопку "Отмена". + После нажатия на кнопку "Сохранить", должно пройти несколько секунд, пока песня загрузится в базу данных.
+

+
Previous
Next
+ + diff --git a/help/biblesettings.html b/help/biblesettings.html new file mode 100644 index 0000000..bf7a3c2 --- /dev/null +++ b/help/biblesettings.html @@ -0,0 +1,43 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

5.2 Bible Settings

+

+ Bible Settings

+

1. Primary Bible: The Bible that version that will be display. + If secondary version is selected, it will show primary on top and secondary on the bottom. + At least one primary version needs to be selected

+

2. Secondary Bible A Bible version that will be displayed as + dual and will be below primary on the display screen. Currently there is no preview of secondary + Bible version, it shows only on the screen

Previous
Next
+ \ No newline at end of file diff --git a/help/biblesettings_de.html b/help/biblesettings_de.html new file mode 100644 index 0000000..56399dc --- /dev/null +++ b/help/biblesettings_de.html @@ -0,0 +1,41 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

5.2 Bible Settings

+

+ Bible Settings

+

1. Primäre Bibel: Eine Bibel, deren Text für das Zeigen an der Leinwand bestimmt ist. + Bei der gewählten sekundären Bibel, werden die Texte der primären Bibel oben und der sekundären - unten, angezeigt. + Es muss mindestens eine primäre Bibel gewählt werden.

+

2. Sekundäre Bibel Eine Bibel, deren Text, paralell zu der primären Bibel, in der unteren Hälfte der Leinwand angezeigt wird.

Previous
Next
+ \ No newline at end of file diff --git a/help/biblesettings_ru.html b/help/biblesettings_ru.html new file mode 100644 index 0000000..919b450 --- /dev/null +++ b/help/biblesettings_ru.html @@ -0,0 +1,42 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

5.2 Настройки для Библий

+

+ Bible Settings

+

1. Первичная Библия: Библия, текст которой предназначен для показа на экране. + При выбранной вторичной Библии, текст первичной будет расположен в верхней, а вторичной — в нижней части экрана. + Должна быть выбрана как минимум одна первичная Библия.

+

2. Вторичная Библия Библия, текст которой будет показан параллельно с первичной, в нижней части экрана. + На данный момент в программе нет предосмотра вторичной Библии, ее текст показывается только на экране.

Previous
Next
+ \ No newline at end of file diff --git a/help/copysong.html b/help/copysong.html new file mode 100644 index 0000000..8872d03 --- /dev/null +++ b/help/copysong.html @@ -0,0 +1,49 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.3 Coping Songs

+

SoftProjector allow to copy an existing song into a new songbook or an other + existing songbook.

+

To copy a song:
+ 1. Select a song that you want to copy.
+ 2. Edit>Copy Current Song...Shortcut: Crtl+C
+ Select Songbook
+ 3. Select a songbook into which to copy. If no + songbook already exits that you would like to copy the song into, select to + add a new songbook. Detail on adding new songbook.
+ 4. Edit Song. After selecting a songbook, a + song edit dialog will come up. Edit the song if + needed and click "Save"
+

+
Previous
Next
+ \ No newline at end of file diff --git a/help/copysong_de.html b/help/copysong_de.html new file mode 100644 index 0000000..80f9281 --- /dev/null +++ b/help/copysong_de.html @@ -0,0 +1,48 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.3 Lied kopieren

+

SoftProjector ermöglicht das Lied in ein neues oder in ein bereits erstelltes Gesangbuch zu kopieren.

+

Für Lied-Kopieren:
+ 1. Wählen Sie ein Lied, das Sie kopieren möchten.
+ 2. Wählen Sie "Ändern>das Lied kopieren..."Abkürz.: Crtl+C
+ Select Songbook
+ 3. Wählen Sie ein Gesangbuch, in das Sie das Lied kopieren möchten. Falls Sie nicht + möchten, dieses Lied in ein bereits erstelltes Gesangbuch zu kopieren, wählen Sie "Ein neues Gesangbuch erstellen". + Mehr hier.
+ 4. Das Lied ändern. Wählen Sie ein Gesangbuch und ein Lied. + Dann wählen Sie "Ändern" und Ändern. Nach dem Ändern drücken Sie + "Speichern"
+

+
Previous
Next
+ \ No newline at end of file diff --git a/help/copysong_ru.html b/help/copysong_ru.html new file mode 100644 index 0000000..4fc1f84 --- /dev/null +++ b/help/copysong_ru.html @@ -0,0 +1,46 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.3 Копирование песен

+

Софт Проектор позволяет копировать песню в новый или уже существующий сборник.

+

Для копирования песни:
+ 1. Выберите песню которую необходимо скопировать.
+ 2. Выберите опцию: "Правка>Копировать песню..." Горячие клавиши: Crtl+C
+ Select Songbook
+ 3. Выберите сборник в который будет скопирована песня. Если вы не желаете скопировать песню в существующий сборник, + выберите опцию создать новый сборник. Подробнее — здесь.
+ 4. Редактировать песню. Выберите нужный сборник и песню. После этого — выберите опцию "Правка" и подпункт + Редактировать песню. После завершения правки нажмите на кнопку "Сохранить"
+

+
Previous
Next
+ \ No newline at end of file diff --git a/help/deletesongs.html b/help/deletesongs.html new file mode 100644 index 0000000..be1b950 --- /dev/null +++ b/help/deletesongs.html @@ -0,0 +1,40 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.4 Deleting a Song

+

To delete a song:
+ 1. Select a song that you want to delete.
+ 2. Edit>Delete Current Song. A warning dialog box will pop up asking you, if you really want to + delete that song. Click "Yes" if you really want to do so or click "No" if you do not want to delete that song. Shortcut: Crtl+D

+
Previous
Next
+ \ No newline at end of file diff --git a/help/deletesongs_de.html b/help/deletesongs_de.html new file mode 100644 index 0000000..b98ddf6 --- /dev/null +++ b/help/deletesongs_de.html @@ -0,0 +1,41 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.4 Das Lied löschen

+

Für Lied löschen:
+ 1. Wählen Sie ein Lied, das Sie löschen möchten.
+ 2. Wählen Sie "Ändern>Das Lied löschen". Es erscheint ein Fenster mit der Frage, + ob Sie wirklich das Lied löschen möchten. Drücken Sie "Ja" wenn Sie wirklich das Lied löschen möchten, + oder "Nein" falls Sie es ohne Änderungen lassen möchten. Abkürz.: Crtl+D

+
Previous
Next
+ \ No newline at end of file diff --git a/help/deletesongs_ru.html b/help/deletesongs_ru.html new file mode 100644 index 0000000..99b5592 --- /dev/null +++ b/help/deletesongs_ru.html @@ -0,0 +1,41 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.4 Удаление песен

+

Для удаления песни:
+ 1. Выберите песню которую необходимо удалить.
+ 2. Выберите опцию: "Правка>Удалить песню". При этом появляется предупреждающий знак с вопросом, + действительно ли вы желаете удалит песню. Нажмите "Да" если вы действительно желаете удалить, + либо "Нет", если хотите оставить. Горячие клавиши: Crtl+D

+
Previous
Next
+ \ No newline at end of file diff --git a/help/dualscreen.html b/help/dualscreen.html new file mode 100644 index 0000000..bd645de --- /dev/null +++ b/help/dualscreen.html @@ -0,0 +1,81 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

5.4 Dual Screen + Settings

+

SoftProjector will require a secondary screen/monitor to be set up on + your computer to show words on the screen correctly.  SoftProjector + will display words on monitor 2. If monitor 1 is secondary and monitor 2 is + primary, then a special program is required.

+

Windows XP
+ Windows Vista
+ Windows 7
+ Other operating systems

+

Windows XP:
+ 1. From you desktop, right-click and select "Properties"
+ 2. Select "Settings" tab
+ 3. You should be able to have 2 monitor shown. If only one is shown, then + either your computer does not support secondary monitor, or drivers are not + installed properly.
+ 4. Select monitor 2
+ 5. Set applicable screen resolution
+ 6. Make sure that "Extend my Windows desktop onto this monitor" is checked. + This will allow to have separate screens, on for your monitor and other for + your projector.
+ Xp Display Properties

+

Windows Vista:
+ 1. From you desktop, right-click and select "Personalize"
+ 2. Select "Display Settings"
+ 3. You should be able to have 2 monitor shown. If only one is shown, then + either your computer does not support secondary monitor, or drivers are not + installed properly.
+ 4. Select monitor 2
+ 5. Set applicable screen resolution
+ 6. Make sure that "Extend the desktop onto this monitor" is checked. + This will allow to have separate screens, on for your monitor and other for + your projector.
+ Windows Vista Display Settings

+

Windows 7:
+ 1. From you desktop, right-click and select "Screen Resolution"
+ 2. You should be able to have 2 monitor shown. If only one is shown, then + either your computer does not support secondary monitor, or drivers are not + installed properly.
+ 3. Select monitor 2
+ 4. Set applicable screen resolution
+ 5. From "Multiple displays:" select "Extend these displays"
+ Windows 7 Display Settings

+

Other Operating Systems:
+ SoftProjector has been successfully tested on Linux and Mac. Because of + great variety of operating system, please refer to that systems manual + on how to set up secondary monitor

Previous
Next
+ \ No newline at end of file diff --git a/help/dualscreen_de.html b/help/dualscreen_de.html new file mode 100644 index 0000000..2307b5a --- /dev/null +++ b/help/dualscreen_de.html @@ -0,0 +1,76 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

5.4 Einstellungen für zwei Bildschirme

+

Für eine einwandfreie Arbeit des SoftProjectors werden Einstellungen für den zweiten Bildschirm benötigt.  SoftProjector + zeigt den Text auf dem 2. Bildschirm. Falls der 1. Bildschirm als säkunderer Bildschirm ist, und der 2. Bildschirm als primärer, + so benötigen Sie ein spezielles Programm.

+

Windows XP
+ Windows Vista
+ Windows 7
+ Andere Operationssysteme

+

Windows XP:
+ 1. Auf dem Desktop Ihres Computers drücken Sie mit der rechten Maustaste und wählen Sie "Eigenschaften"
+ 2. Wählen Sie "Einstellungen".
+ 3. Sie sehen zwei Bildschirme. Wenn Sie nur einen Bildschirm sehen, d.h. entweder unterstützt Ihr Computer + den zweiten Bildschirm nicht, oder es fehlt ein benötigter Treiber.
+ 4. Wählen Sie den 2. Bildschirm
+ 5. Treffen Sie eine Entscheidung
+ 6. Klicken Sie auf "Erweiterung des Desktops für diesen Bildschirm". + Dies erlaubt mit zwei Bildschirmen zu arbeiten: einer auf dem Bildschirm Ihres Computers, + der andere auf Ihrer Leinwand.
+ Xp Display Properties

+

Windows Vista:
+ 1. Auf dem Desktop Ihres Computers drücken Sie mit der rechten Maustaste und wählen Sie "Anpassen"
+ 2. Wählen Sie "Anzeige"
+ 3. Sie sehen zwei Bildschirme. Wenn Sie nur einen Bildschirm sehen, d.h. entweder unterstützt Ihr Computer + den zweiten Bildschirm nicht, oder es fehlt ein benötigter Treiber.
+ 4. Wählen Sie den 2. Bildschirm
+ 5. Set applicable screen resolution
+ 6. Treffen Sie eine Entscheidung "Erweiterung des Desktops für diesen Bildschirm". + Dies erlaubt mit zwei Bildschirmen zu arbeiten: einer auf dem Bildschirm Ihres Computers, + der andere auf Ihrer Leinwand.
+ Windows Vista Display Settings

+

Windows 7:
+ 1. Auf dem Desktop Ihres Computers drücken Sie mit der rechten Maustaste und wählen Sie "Bildschirmauflösung"
+ 2. Sie sehen zwei Bildschirme. Wenn Sie nur einen Bildschirm sehen, d.h. entweder unterstützt Ihr Computer + den zweiten Bildschirm nicht, oder es fehlt ein benötigter Treiber.
+ 3. Wählen Sie den 2. Bildschirm
+ 4. Treffen Sie eine Entscheidung
+ 5. Klicken Sie auf "Mehrere Bildschirme:" "Bildschirme erweitern"
+ Windows 7 Display Settings

+

Andere Operationssysteme:
+ SoftProjector wurde erfolgreich auf Linux und Mac getestet. Obwohl es sehr viele + Operationssysteme gibt, wenden Sie sich zur Hilfe des benötigten Systems, + um zu erfahren, wie man mit zweier Bildschirme arbeitet.

Previous
Next
+ \ No newline at end of file diff --git a/help/dualscreen_ru.html b/help/dualscreen_ru.html new file mode 100644 index 0000000..397b0ea --- /dev/null +++ b/help/dualscreen_ru.html @@ -0,0 +1,73 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

5.4 Настройки двойного экрана

+

Для правильной работы Софт Проектора, требуется настройка вторичного экрана/монитора.  + Софт Проектор показывает слова на мониторе 2. Если вторичным является монитор 1, а первичным монитор 2, + то понадобится специальная программа.

+

Windows XP
+ Windows Vista
+ Windows 7
+ Другие операционные системы

+

Windows XP:
+ 1. На рабочем столе компьютера щелкните правой кнопкой мыши и выберите "Свойства"
+ 2. Выберите закладку "Параметры".
+ 3. Вы должны увидеть изображение двух мониторов. Если показан только один монитор, то либо ваш компьютер + не поддерживает второй монитор, либо не установлен необходимый драйвер.
+ 4. Выберите монитор 2
+ 5. Установите нужное разрешение
+ 6. Поставьте отметку на опции "Расширить рабочий стол на этот монитор". + Это позволит работать с двумя экранами: один на мониторе компьютера, а другой на проекторе.
+ Xp Display Properties

+

Windows Vista:
+ 1. На рабочем столе компьютера щелкните правой кнопкой мыши и выберите "Персонализировать"
+ 2. Выберите "Свойства монитора"
+ 3. Вы должны увидеть изображение двух мониторов. Если показан только один монитор, то либо ваш компьютер + не поддерживает второй монитор, либо не установлен необходимый драйвер.
+ 4. Выберите монитор 2
+ 5. Установите нужное разрешение
+ 6. Поставьте отметку на опции "Расширьте мой рабочий стол на этот монитор". + Это позволит работать с двумя экранами: один на мониторе компьютера, а другой на проекторе
+ Windows Vista Display Settings

+

Windows 7:
+ 1. На рабочем столе компьютера щелкните правой кнопкой мыши и выберите "Разрешение экрана"
+ 2. Вы должны увидеть изображение двух мониторов. Если показан только один монитор, то либо ваш компьютер + не поддерживает второй монитор, либо не установлен необходимый драйвер.
+ 3. Выберите монитор 2
+ 4. Установите нужное разрешение
+ 5. Поставьте отметку на опции "Несколько мониторов:" "Расширить мониторы"
+ Windows 7 Display Settings

+

Другие операционные системы:
+ Софт Проектор успешно тестировался на Линуксе и Макинтоше. + Поскольку имеется множество других операционных систем, обратитесь к справочнику нужной системы о том, как пользоваться двумя мониторами.

Previous
Next
+ \ No newline at end of file diff --git a/help/editsong.html b/help/editsong.html new file mode 100644 index 0000000..04f9058 --- /dev/null +++ b/help/editsong.html @@ -0,0 +1,59 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.2 Editing Songs

+

To Edit a song:
+ 1. Select a song that you want to edit.
+2. Edit>Edit Current Song. A dialog box will pop up will all the data of that song. Shortcut: Crtl+E
+

+

Edit Dialog :
+ Edit Dialog
+ 1. Songbook Name - displays songbook name in which + edited song is found.
+ 2. Song Number - song number will be automatically + preloaded to the next song number in database when adding new song. If + needed, song numbers can be changes.
+ 3. Song Title - song title must be present; or + else, saving of the song will not be permitted. All non-alphanumeric + character will be removed.
+ 4. Words By - name of the author who wrote words of + a song.
+ 5. Music By - name of the author who wrote music of + a song.
+ 6. Key - Key/Tune in which a song is sung.
+ 7. Song Category - currently un used.
+ 8. Song Text - song text must be kept in proper + format. See Song Format for details.

+
Previous
Next
+ + diff --git a/help/editsong_de.html b/help/editsong_de.html new file mode 100644 index 0000000..e760949 --- /dev/null +++ b/help/editsong_de.html @@ -0,0 +1,56 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.2 Bearbeiten der Lieder

+

Zum Bearbeiten der Lieder:
+ 1. Wählen Sie ein Lide, das Sie bearbeiten möchten.
+2. Wählen Sie: "Ändern>Ein Lied bearbeiten. Es erscheint ein Fenster mit dem vollen Inhalt des Liedes. Abkürz.: Crtl+E
+

+

Inhalt des Dialog-Fensters:
+ Edit Song
+ 1. Name des Gesangbuches: - es wird der Name des Gesangbuches angezeigt, + aus dem das Lied gewählt wurde.
+ 2. Lied-Nummer: - beim Hinzufügen eines neuen Liedes wird eine Nummer automatisch + hinzugefügt. Bei Bedarf kann die Nummer des Liedes geändert werden.
+ 3. Name des Liedes: - ein Name des Liedes muss unbedingt vorhanden sein, + andernfalls kann das Lied nicht gespeichert werden. Alle nicht alphabetisch-nummerische Zeichen + werden automatisch entfernt.
+ 4. Dichter: - hier wird der Name des Dichters eingetragen.
+ 5. Komponist: - hier wird der Name des Komponisten eingetragen.
+ 6. Tonart: - hier wird die Tonart des Liedes eingetragen.
+ 7. Lied-Kategorie:- hier wird eine Kategorie aus dem Inhaltsverzeichnis gewählt.
+ 8. Lied-Text - Der Text muss richtig formatiert werden. + Siehe hier.

+
Previous
Next
+ + diff --git a/help/editsong_ru.html b/help/editsong_ru.html new file mode 100644 index 0000000..61ed5a9 --- /dev/null +++ b/help/editsong_ru.html @@ -0,0 +1,55 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Next

3.2 Редактирование песен

+

Для редактирования песен:
+ 1. Выберите песню в которой нужна правка.
+2. Выберите опцию: "Правка>Редактировать песню". При этом появится диалоговое окно с полным содержанием песни. Горячие клавиши: Crtl+E
+

+

Содержание диалогового окна:
+ Edit Dialog
+ 1. Сборник: - показывает название сборника из которой взята песня.
+ 2. Номер песни - при добавлении новой песни, номер автоматически генерируется для следующей песни. + При необходимости, номер песни можно изменить.
+ 3. Название: - название должно присутствовать обязательно, + иначе невозможно сохранение песни. Все не алфавитно-номерные знаки удаляются автоматически.
+ 4. Слова: - сюда вводится имя автора слов.
+ 5. Музыка: - сюда вводится имя композитора.
+ 6. Тональность: - сюда вводится тональность мелодии песни.
+ 7. Категория: - здесь выбирается категория из списка.
+ 8. Окно для текста песни. - Текст должен быть правильно отформатирован. + Подробнее о форматировании текста — здесь.

+
Previous
Next
+ + diff --git a/help/features.html b/help/features.html new file mode 100644 index 0000000..5b48027 --- /dev/null +++ b/help/features.html @@ -0,0 +1,77 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
+ softProjector Help
Previous
Next

1.2 Features

+
+ Bible
+
+
Show one or two bible at once.
+
Have unlimited bible versions.
+
Includes three bible versions: Russian (Synodal Translation), + English (KJV), and Ukrainian. Other version can be added or + imported.
+
Automatically add verses that have been sent to Live to history + list.
+
Import Unbound Bibles from http://unbound.biola.edu/
+
Export Bibles
+
+
+
Songs
+
+
Import/Export songbooks
+
Add/Edit/Copy/Delete songs
+
Have as many as possible songbooks
+
Add song to playlist
+
Preview songs before showing them
+
+
Other
+
+
Three background options: black, active, and passive
+
Static and Fade transitions
+
Options to show song number, keys and stanza titles
+
Show your own text as announcements
+
Single file database
+
Manage database
+
Two background options, one while showing verses and other when + not showing anything
+ +
+
+
Previous
Next
+ \ No newline at end of file diff --git a/help/features_de.html b/help/features_de.html new file mode 100644 index 0000000..c09b7f5 --- /dev/null +++ b/help/features_de.html @@ -0,0 +1,74 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

1.2 Merkmale

+
+ Bibel
+
+
Zeigt den Text einer oder zweier Bibel(n) an.
+
Es gibt eine Möglichkeit, eine unbegrenzte Zahl der Bibel-Versionen zu haben.
+
Es gibt drei "eingebaute" Bibel-Versionen: Russisch (Synodal Translation), + Englisch (KJV) und Ukrainisch. Es können noch zusätzliche Versionen hinzugefügt werden.
+
Die angezeigten Texte werden automatisch in die Geschichte + eingetragen.
+
Import Unbound Bibles von http://unbound.biola.edu/
+
Export der Bibel-Versionen
+
+
+
Songs
+
+
Import/Export der Gesangbücher
+
Hinzufügen/Bearbeiten/Kopieren/Löschen der Lieder
+
Es gibt eine Möglichkeit, eine unbegrenzte zahl der Gesangbücher zu haben.
+
Hinzufügen der Lieder in die "Abspiel"-Liste
+
Vorschau der Lieder vor dem Anzeigen auf der Leinwand
+
+
Other
+
+
Drei Optionen für den Hintergrund: schwarz, aktive und passiv
+
Animierter und schneller Übergänge
+
Es werden Nummer und Refrain sowie Tonart des Liedes angezeigt
+
Es können verschiedene Texte, z.B. Vermeldung, Ankündigung, Anzeige usw., angezeigt
+
Die komplette Datenbank befindet sich in einer Datei
+
Verwaltung der Datenbank
+
Zwei Hintergrund-Optionen: eine mit Text-, die andere ohne Textaufführung
+ +
+
+
Previous
Next
+ \ No newline at end of file diff --git a/help/features_ru.html b/help/features_ru.html new file mode 100644 index 0000000..f3b2f3f --- /dev/null +++ b/help/features_ru.html @@ -0,0 +1,74 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

1.2 Главные характеристики

+
+ Библия
+
+
Показывается текст одной или двух Библий одновременно.
+
Возможность содержать неограниченное количество модулей Библии.
+
Имеются три встроенных модуля Библии: русский (синодальный), + английский (KJV), и украинский (І. Огієнка). Другие модуля Библии могут быть добавленными или импортированными.
+
Показанные на экране стихи автоматически заносятся в список истории.
+
Поддерживается импортирование Unbound Bibles с сайта + http://unbound.biola.edu/
+
Поддерживается экспортирование модулей Библий
+
+
+
Песни
+
+
Импортирование / экспортирование сборников
+
Добавление / Редактирование / Копирование / Удаление песен
+
Возможность содержать неограниченное количество модулей сборников
+
Добавление песен в список воспроизведения
+
Предосмотр песен перед выводом на экран
+
+
Другие
+
+
Три опции для фона: черный тон, фоновый рисунок и заставка
+
Плавный и мнговенный переходы
+
Показывается номер песни и куплета, тональность
+
Показывается любой текст в качестве объявления и т.п.
+
Вся база данных находится в одном файле
+
Управление базой данных
+
Две опции для фонового рисунка: подтекстовый и заставка без текста
+ +
+
+
Previous
Next
+ \ No newline at end of file diff --git a/help/generalsettings.html b/help/generalsettings.html new file mode 100644 index 0000000..3f6edeb --- /dev/null +++ b/help/generalsettings.html @@ -0,0 +1,82 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

5.1 General + Settings

+

+ General Settings
+

+

1. Bible Settings:
+ Settings only for showing bible. See details + here.

+

2. General Settings:
+ Settings that will effect entire program.

+
+
+
+
2.1 Display screen always on top
+
When check, display screen will be always on top. All other + programs will be behind the screen. If PowerPoint or software is + used to display on projector, leave this unchecked. SoftProjector + will have to restart in order for this setting to take place.
+
2.2 Use fading effects
+
If checked, the transition from slide to slide will be faded + through instead of static change
+
2.3 Use blurred shadow
+
Create a shadow behind the text, making it easier to read + text when light wallpaper are used
+
2.4 Change Font
+
Use this to change the font, font size and font style, for + the text that will be projected
+
2.5 Active Wallpaper
+
Wallpaper that is used then text it been displayed. The text + box shows file location; cannot be edited manually
+
2.6 Browse...
+
Browse and select active wallpaper.
+
2.7 Remove wallpaper
+
Removes active wallpaper and returns it back to black + display screen
+
2.8 Passive wallpaper
+
Wallpaper that is shown when nothing is to be shown. When "Hide" + button is pressed, this wallpaper will be shown.
+
2.9 Browse...
+
Browse and select passive wallpaper.
+
2.10 Passive wallpaper
+
Removes passive wallpaper and returns it back to black + display screen
+
+
+

3. Song setting:
+ Settings only when showing songs. See details + here.

Previous
Next
+ \ No newline at end of file diff --git a/help/generalsettings_de.html b/help/generalsettings_de.html new file mode 100644 index 0000000..de9021f --- /dev/null +++ b/help/generalsettings_de.html @@ -0,0 +1,80 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

5.1 Programm-Einstellungen

+

+ General Settings
+

+

1. Bibel-Einstellungen:
+ Diese Einstellungen beeinflußen nur die Arbeit mit den Bibeln. Ausführlicher + hier.

+

2. Allgemeine Einstellungen:
+ Diese Einstellungen beeinflußen die Arbeit mit dem ganzem Programm.

+
+
+
+
2.1 Bildschirm immer oben
+
Bei Aktivierung wird das Fenster des Bildschirms immer überlappend über den anderen Fenstern sein. + Die Fenstern aller anderen Programmen werden "unter" dem Fenster des Bildschirms des softProjectors sein. + Wenn softProjector von PowerPoint oder einem anderen Programm genutzt wird, lassen Sie diese Option unaktiviert. + Damit diese Option in Kraft treten kann, muss softProjector neu gestartet werden.
+
2.2 Animationseffekt
+
Bei Aktivierung wird der Übergang von einem Bild zum anderen verblassend sein.
+
2.3 Verschwommener Schatten
+
Für ein besseres Lesen auf einem hellen Hintergrund, + erscheint der Text mit einem Schatten.
+
2.4 Schriftart wählen
+
Schriftart, Größe und Schriftschnitt des Textes, + der auf der Leinwand erscheint.
+
2.5 Aktiver Hintergrund
+
Hier wird ein Hintergrundbild für den Text gewählt. + In dem Fenster befindet sich ein Weg zur Bild-Datei; das Bild kann nicht manuell geändert werden.
+
2.6 Durchsuchen...
+
Durchsuchen und Auswahl eines Hintergrund-Bildes.
+
2.7 Hintergrund löschen
+
Hintergrund-Bild wird gelöscht. + Es erscheint ein schwarzer Hintergrund.
+
2.8 Passiver Hintergrund
+
Der Hintergrund erscheint auf der Leinwand ohne Text. + Er erscheint auch beim Drücken "Verstecken".
+
2.9 Durchsuchen...
+
Durchsuchen und Auswahl des passiven Hintergrunds.
+
2.10 Passiver Hintergrund
+
Der passiver Hintergrund wird entfernt. + Es erscheint ein schwarzer Hintergrund.
+
+
+

3. Lied-Einstellung:
+ Diese Einstellungen beeinflußen nur die Arbeit mit den Liedern. Siehe + hier.

Previous
Next
+ \ No newline at end of file diff --git a/help/generalsettings_ru.html b/help/generalsettings_ru.html new file mode 100644 index 0000000..760bf4b --- /dev/null +++ b/help/generalsettings_ru.html @@ -0,0 +1,73 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

5.1 Настройки программы

+

+ General Settings
+

+

1. Настройки для Библий:
+ Эти настройки влияют только на работу с Библиями. Подробнее — + здесь.

+

2. Общие настройки:
+ Эти настройки влияют на работу всей программы.

+
+
+
+
2.1 Экран всегда сверху
+
При активизации, окно экрана будет всегда находится поверх других окон. + Окна всех других программ будут расположены под окном экрана Софт Проектора. + Если проектор используется программой PowerPoint или другой программой, оставьте эту опцию не активизированной. + Для того чтобы данная опция вступила в силу, требуется перезапуск Софт Проектора.
+
2.2 Эффект затухания
+
При активизации, переход от слайда к слайду будет плавным, в противоположность моментальному.
+
2.3 Размытая тень
+
Создается тень под текстом, для более легкого чтения при светлом тоне фонового рисунка.
+
2.4 Выбрать шрифт
+
Подборка шрифта, его размера и стиля для подаваемого на экран текста.
+
2.5 Фоновый рисунок
+
Выбирается фоновый рисунок помещаемый под текстом. В окошке находится путь к файлу рисунка (не редактируемый вручную).
+
2.6 Обзор...
+
Обзор и выбор фонового рисунка.
+
2.7 Удалить рисунок
+
Удаляется фоновый рисунок и возвращается черный фон экрана.
+
2.8 Заставка
+
Заставка показывается на экране при отсутсвии текста. Она также появляется при нажатии на кнопку "Скрыть".
+
2.9 Обзор...
+
Обзор и выбор заставки.
+
2.10 Удалить заставку
+
Удаляется заставка и возвращается черный фон экрана.
+
+
+

3. Настройки для песен:
+ Эти настройки влияют только на работу с песнями. Подробнее — здесь.

Previous
Next
+ \ No newline at end of file diff --git a/help/images/add_songbook.png b/help/images/add_songbook.png new file mode 100644 index 0000000..6adbc7e Binary files /dev/null and b/help/images/add_songbook.png differ diff --git a/help/images/add_songbook_de.png b/help/images/add_songbook_de.png new file mode 100644 index 0000000..6139487 Binary files /dev/null and b/help/images/add_songbook_de.png differ diff --git a/help/images/add_songbook_ru.png b/help/images/add_songbook_ru.png new file mode 100644 index 0000000..a47dda1 Binary files /dev/null and b/help/images/add_songbook_ru.png differ diff --git a/help/images/announce.png b/help/images/announce.png new file mode 100644 index 0000000..bdf6a67 Binary files /dev/null and b/help/images/announce.png differ diff --git a/help/images/bible_settings.png b/help/images/bible_settings.png new file mode 100644 index 0000000..375e729 Binary files /dev/null and b/help/images/bible_settings.png differ diff --git a/help/images/bible_settings_de.png b/help/images/bible_settings_de.png new file mode 100644 index 0000000..74c1bc0 Binary files /dev/null and b/help/images/bible_settings_de.png differ diff --git a/help/images/bible_settings_ru.png b/help/images/bible_settings_ru.png new file mode 100644 index 0000000..7ebcb04 Binary files /dev/null and b/help/images/bible_settings_ru.png differ diff --git a/help/images/book.png b/help/images/book.png new file mode 100644 index 0000000..1b35455 Binary files /dev/null and b/help/images/book.png differ diff --git a/help/images/database.png b/help/images/database.png new file mode 100644 index 0000000..65d4a92 Binary files /dev/null and b/help/images/database.png differ diff --git a/help/images/de.png b/help/images/de.png new file mode 100644 index 0000000..37121b1 Binary files /dev/null and b/help/images/de.png differ diff --git a/help/images/edit_bible.png b/help/images/edit_bible.png new file mode 100644 index 0000000..6164437 Binary files /dev/null and b/help/images/edit_bible.png differ diff --git a/help/images/edit_bible_de.png b/help/images/edit_bible_de.png new file mode 100644 index 0000000..82f5458 Binary files /dev/null and b/help/images/edit_bible_de.png differ diff --git a/help/images/edit_bible_ru.png b/help/images/edit_bible_ru.png new file mode 100644 index 0000000..bbb844c Binary files /dev/null and b/help/images/edit_bible_ru.png differ diff --git a/help/images/edit_songbook.png b/help/images/edit_songbook.png new file mode 100644 index 0000000..836cd07 Binary files /dev/null and b/help/images/edit_songbook.png differ diff --git a/help/images/edit_songbook_de.png b/help/images/edit_songbook_de.png new file mode 100644 index 0000000..adfd2a9 Binary files /dev/null and b/help/images/edit_songbook_de.png differ diff --git a/help/images/edit_songbook_ru.png b/help/images/edit_songbook_ru.png new file mode 100644 index 0000000..760ab3d Binary files /dev/null and b/help/images/edit_songbook_ru.png differ diff --git a/help/images/edit_songs.png b/help/images/edit_songs.png new file mode 100644 index 0000000..0e397e5 Binary files /dev/null and b/help/images/edit_songs.png differ diff --git a/help/images/edit_songs_de.png b/help/images/edit_songs_de.png new file mode 100644 index 0000000..3f9b51d Binary files /dev/null and b/help/images/edit_songs_de.png differ diff --git a/help/images/edit_songs_ru.png b/help/images/edit_songs_ru.png new file mode 100644 index 0000000..41cb2c8 Binary files /dev/null and b/help/images/edit_songs_ru.png differ diff --git a/help/images/en.png b/help/images/en.png new file mode 100644 index 0000000..4de058b Binary files /dev/null and b/help/images/en.png differ diff --git a/help/images/exit.png b/help/images/exit.png new file mode 100644 index 0000000..ebe3b9c Binary files /dev/null and b/help/images/exit.png differ diff --git a/help/images/general_settings.png b/help/images/general_settings.png new file mode 100644 index 0000000..93d940f Binary files /dev/null and b/help/images/general_settings.png differ diff --git a/help/images/general_settings_de.png b/help/images/general_settings_de.png new file mode 100644 index 0000000..8783201 Binary files /dev/null and b/help/images/general_settings_de.png differ diff --git a/help/images/general_settings_ru.png b/help/images/general_settings_ru.png new file mode 100644 index 0000000..a1f5c23 Binary files /dev/null and b/help/images/general_settings_ru.png differ diff --git a/help/images/manage_bibles.png b/help/images/manage_bibles.png new file mode 100644 index 0000000..c5dec11 Binary files /dev/null and b/help/images/manage_bibles.png differ diff --git a/help/images/manage_bibles_de.png b/help/images/manage_bibles_de.png new file mode 100644 index 0000000..1254e95 Binary files /dev/null and b/help/images/manage_bibles_de.png differ diff --git a/help/images/manage_bibles_ru.png b/help/images/manage_bibles_ru.png new file mode 100644 index 0000000..a1b9036 Binary files /dev/null and b/help/images/manage_bibles_ru.png differ diff --git a/help/images/manage_songbooks.png b/help/images/manage_songbooks.png new file mode 100644 index 0000000..f3bc0ee Binary files /dev/null and b/help/images/manage_songbooks.png differ diff --git a/help/images/manage_songbooks_de.png b/help/images/manage_songbooks_de.png new file mode 100644 index 0000000..af7b8bb Binary files /dev/null and b/help/images/manage_songbooks_de.png differ diff --git a/help/images/manage_songbooks_ru.png b/help/images/manage_songbooks_ru.png new file mode 100644 index 0000000..acbe741 Binary files /dev/null and b/help/images/manage_songbooks_ru.png differ diff --git a/help/images/next.png b/help/images/next.png new file mode 100644 index 0000000..5b565aa Binary files /dev/null and b/help/images/next.png differ diff --git a/help/images/oveview.png b/help/images/oveview.png new file mode 100644 index 0000000..7e07f7e Binary files /dev/null and b/help/images/oveview.png differ diff --git a/help/images/oveview_de.png b/help/images/oveview_de.png new file mode 100644 index 0000000..4514de0 Binary files /dev/null and b/help/images/oveview_de.png differ diff --git a/help/images/oveview_ru.png b/help/images/oveview_ru.png new file mode 100644 index 0000000..a9ff16f Binary files /dev/null and b/help/images/oveview_ru.png differ diff --git a/help/images/prev.png b/help/images/prev.png new file mode 100644 index 0000000..22d60a5 Binary files /dev/null and b/help/images/prev.png differ diff --git a/help/images/ru.png b/help/images/ru.png new file mode 100644 index 0000000..52a021a Binary files /dev/null and b/help/images/ru.png differ diff --git a/help/images/select_songbook.png b/help/images/select_songbook.png new file mode 100644 index 0000000..8f0ed1d Binary files /dev/null and b/help/images/select_songbook.png differ diff --git a/help/images/select_songbook_c.png b/help/images/select_songbook_c.png new file mode 100644 index 0000000..cc41788 Binary files /dev/null and b/help/images/select_songbook_c.png differ diff --git a/help/images/select_songbook_c_de.png b/help/images/select_songbook_c_de.png new file mode 100644 index 0000000..03b7853 Binary files /dev/null and b/help/images/select_songbook_c_de.png differ diff --git a/help/images/select_songbook_c_ru.png b/help/images/select_songbook_c_ru.png new file mode 100644 index 0000000..9635fc5 Binary files /dev/null and b/help/images/select_songbook_c_ru.png differ diff --git a/help/images/select_songbook_de.png b/help/images/select_songbook_de.png new file mode 100644 index 0000000..303f6af Binary files /dev/null and b/help/images/select_songbook_de.png differ diff --git a/help/images/select_songbook_ru.png b/help/images/select_songbook_ru.png new file mode 100644 index 0000000..9e83c4c Binary files /dev/null and b/help/images/select_songbook_ru.png differ diff --git a/help/images/settings.png b/help/images/settings.png new file mode 100644 index 0000000..ff6aa69 Binary files /dev/null and b/help/images/settings.png differ diff --git a/help/images/show_announce.png b/help/images/show_announce.png new file mode 100644 index 0000000..2dcc3c9 Binary files /dev/null and b/help/images/show_announce.png differ diff --git a/help/images/show_announce_de.png b/help/images/show_announce_de.png new file mode 100644 index 0000000..87da71d Binary files /dev/null and b/help/images/show_announce_de.png differ diff --git a/help/images/show_announce_ru.png b/help/images/show_announce_ru.png new file mode 100644 index 0000000..d370807 Binary files /dev/null and b/help/images/show_announce_ru.png differ diff --git a/help/images/show_bible.png b/help/images/show_bible.png new file mode 100644 index 0000000..d16a071 Binary files /dev/null and b/help/images/show_bible.png differ diff --git a/help/images/show_bible_de.png b/help/images/show_bible_de.png new file mode 100644 index 0000000..d6cd104 Binary files /dev/null and b/help/images/show_bible_de.png differ diff --git a/help/images/show_bible_ru.png b/help/images/show_bible_ru.png new file mode 100644 index 0000000..c30c7c1 Binary files /dev/null and b/help/images/show_bible_ru.png differ diff --git a/help/images/show_main.png b/help/images/show_main.png new file mode 100644 index 0000000..ab8f28d Binary files /dev/null and b/help/images/show_main.png differ diff --git a/help/images/show_main_de.png b/help/images/show_main_de.png new file mode 100644 index 0000000..af779bf Binary files /dev/null and b/help/images/show_main_de.png differ diff --git a/help/images/show_main_ru.png b/help/images/show_main_ru.png new file mode 100644 index 0000000..0950071 Binary files /dev/null and b/help/images/show_main_ru.png differ diff --git a/help/images/show_songs.png b/help/images/show_songs.png new file mode 100644 index 0000000..cbc7bb6 Binary files /dev/null and b/help/images/show_songs.png differ diff --git a/help/images/show_songs_de.png b/help/images/show_songs_de.png new file mode 100644 index 0000000..05062db Binary files /dev/null and b/help/images/show_songs_de.png differ diff --git a/help/images/show_songs_ru.png b/help/images/show_songs_ru.png new file mode 100644 index 0000000..b495deb Binary files /dev/null and b/help/images/show_songs_ru.png differ diff --git a/help/images/softprojector_help.png b/help/images/softprojector_help.png new file mode 100644 index 0000000..0b481dc Binary files /dev/null and b/help/images/softprojector_help.png differ diff --git a/help/images/softprojector_help_cloud.png b/help/images/softprojector_help_cloud.png new file mode 100644 index 0000000..f8c3fd1 Binary files /dev/null and b/help/images/softprojector_help_cloud.png differ diff --git a/help/images/softprojector_help_cloud_de.png b/help/images/softprojector_help_cloud_de.png new file mode 100644 index 0000000..614838f Binary files /dev/null and b/help/images/softprojector_help_cloud_de.png differ diff --git a/help/images/softprojector_help_cloud_ru.png b/help/images/softprojector_help_cloud_ru.png new file mode 100644 index 0000000..bb55953 Binary files /dev/null and b/help/images/softprojector_help_cloud_ru.png differ diff --git a/help/images/softprojector_help_de.png b/help/images/softprojector_help_de.png new file mode 100644 index 0000000..6b391f3 Binary files /dev/null and b/help/images/softprojector_help_de.png differ diff --git a/help/images/softprojector_help_ru.png b/help/images/softprojector_help_ru.png new file mode 100644 index 0000000..02face8 Binary files /dev/null and b/help/images/softprojector_help_ru.png differ diff --git a/help/images/song_copy.png b/help/images/song_copy.png new file mode 100644 index 0000000..3876e42 Binary files /dev/null and b/help/images/song_copy.png differ diff --git a/help/images/song_delete.png b/help/images/song_delete.png new file mode 100644 index 0000000..c126396 Binary files /dev/null and b/help/images/song_delete.png differ diff --git a/help/images/song_edit.png b/help/images/song_edit.png new file mode 100644 index 0000000..751df48 Binary files /dev/null and b/help/images/song_edit.png differ diff --git a/help/images/song_new.png b/help/images/song_new.png new file mode 100644 index 0000000..eb75ef4 Binary files /dev/null and b/help/images/song_new.png differ diff --git a/help/images/song_settings.png b/help/images/song_settings.png new file mode 100644 index 0000000..695caf0 Binary files /dev/null and b/help/images/song_settings.png differ diff --git a/help/images/song_settings_de.png b/help/images/song_settings_de.png new file mode 100644 index 0000000..92e222c Binary files /dev/null and b/help/images/song_settings_de.png differ diff --git a/help/images/song_settings_ru.png b/help/images/song_settings_ru.png new file mode 100644 index 0000000..64270a0 Binary files /dev/null and b/help/images/song_settings_ru.png differ diff --git a/help/images/song_tab.png b/help/images/song_tab.png new file mode 100644 index 0000000..86da562 Binary files /dev/null and b/help/images/song_tab.png differ diff --git a/help/images/unbound_down.png b/help/images/unbound_down.png new file mode 100644 index 0000000..44441a2 Binary files /dev/null and b/help/images/unbound_down.png differ diff --git a/help/images/unbound_select.png b/help/images/unbound_select.png new file mode 100644 index 0000000..048ca4c Binary files /dev/null and b/help/images/unbound_select.png differ diff --git a/help/images/vistSettings.png b/help/images/vistSettings.png new file mode 100644 index 0000000..2fe63ad Binary files /dev/null and b/help/images/vistSettings.png differ diff --git a/help/images/w7Settings.png b/help/images/w7Settings.png new file mode 100644 index 0000000..8b32dcc Binary files /dev/null and b/help/images/w7Settings.png differ diff --git a/help/images/xpSettings.png b/help/images/xpSettings.png new file mode 100644 index 0000000..f76dc5b Binary files /dev/null and b/help/images/xpSettings.png differ diff --git a/help/images/xpSettings_ru.png b/help/images/xpSettings_ru.png new file mode 100644 index 0000000..d1969a7 Binary files /dev/null and b/help/images/xpSettings_ru.png differ diff --git a/help/index.html b/help/index.html new file mode 100644 index 0000000..4286e9e --- /dev/null +++ b/help/index.html @@ -0,0 +1,27 @@ + + + + +softProjector Help + + + + + +
+
+

This help manual is under construction. Will be available in final release.

+ + + + + + +
+
+ + + + \ No newline at end of file diff --git a/help/index_de.html b/help/index_de.html new file mode 100644 index 0000000..a7b21c0 --- /dev/null +++ b/help/index_de.html @@ -0,0 +1,87 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
+ softProject Hilfe
Previous
Next

+ SoftProjector Hilfe-Handbuch basiert auf Version 1.0. + Alle späteren Versionen können nicht in der Hilfe einbezogen werden.
+
+
+ 1. Einleitung +
+
+
1.1. Über das Programm
+
1.2. Merkmal
+
1.3. Überblick
+
+
2. Vorführung
+
+
2.1. Allgemeine Info
+
2.2. Vorführung der Bibeltexte auf die Leinwand
+
2.3. Vorführung der Lieder auf die Leinwand
+
2.4. Vorführung der Meldungen auf die Leinwand
+
+
3. Bearbeiten der Lieder
+
+
3.1. Hinzufügen der neuen Lieder
+
+
3.1.1. Hinzufügen der neuen Gesangbücher
+
3.1.2. Liedtext formatieren
+
+
3.2. Bearbeiten der Lieder
+
3.3. Lieder kopieren
+
3.4. Lieder löschen
+
+
+ 4. Datenbank verwalten +
+
+
4.1. Bibel verwalten
+
4.2. Gesangbücher verwalten
+
+
5. Einstellungen
+
+
5.1. Allgemeine Einstellungen
+
5.2. Bibel-Einstellungen
+
5.3. Lied-Einstellungen
+
5.4. Doppel-Bildschirm-Einstellungen
+
+
6. Anhang
+
+
6.1. Tastatur-Abkürzungen
+
6.2. Veröffentlichung dieser Version
+
+
+
Previous
Next
+ \ No newline at end of file diff --git a/help/index_ru.html b/help/index_ru.html new file mode 100644 index 0000000..2aab9ee --- /dev/null +++ b/help/index_ru.html @@ -0,0 +1,85 @@ + + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
+ softProject Help
Previous
Next

+ Справочник по Софт Проектору относится к версии 1.0. + Все новые версии могут быть не отображены в справочнике.
+
+
+ 1. Общее описание +
+
+
1.1. О программе
+
1.2. Главные характеристики
+
1.3. Обзор программы
+
2. Вывод на экран
+
+
2.1. Общая информация
+
2.2. Вывод на экран стихов Библии
+
2.3. Вывод на экран песен
+
2.4. Вывод на экран объявлений
+
+
3. Редактирование песен
+
+
3.1. Добавление новых песен
+
+
3.1.1. Добавление новых сборников
+
3.1.2. Форматирование текста песен
+
+
3.2. Редактирование песен
+
3.3. Копирование песен
+
3.4. Удаление песен
+
+
+ 4. Управление базой данных +
+
+
4.1. Управление модулями Библий
+
4.2. Управление модулями сборников
+
+
5. Настройки
+
+
5.1. Общие настройки
+
5.2. Настройки Библий
+
5.3. Настройки песен
+
5.4. Настройки двойного экрана
+
+
6. Дополнение
+
+
6.1. Клавиатурные сокращения
+
6.2. О версии выпуска
+
+
+
Previous
Next
+ \ No newline at end of file diff --git a/help/managebible.html b/help/managebible.html new file mode 100644 index 0000000..950581a --- /dev/null +++ b/help/managebible.html @@ -0,0 +1,73 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

4.1 Managing Bibles

+

To manage Bibles:
+ 1. Edit>Manage Database. This will open a dialog where managing will take place. Shortcut: Crtl+M
+ 2. Select "Bibles" tab. softProjector allows you to have as many Bible version as you would like to have. + Here you can import, edit, export or delete a Bible.

+

+ Manage Bibles

+

1. List of Bible versions in the programs
+

+

2. Import...
+
This will import a Bible from a softProjector Bible file (*.sps) and + also from Unbound Bible files. See below how to import Unbound Bible files

+

3. Edit...
+
A dialog box will appear where you can change the name or title of the Bible.
+ Edit Bible

+

4. Export...
+
 Export a Bible from the database that you want to share with someone else.

+

5. Delete.
+ Delete a Bible that you do not want to use any more. You will not be allowed to delete any more Bibles, if only one Bible is left.

+

Importing Unbound Bibles
+ 1. Go to http://unbound.biola.edu/ + web site.
+ 2. Click Downloads.
+ 3. Select which Bible version to download
+ Download Unbound Bibles
+ 4. Click "Download" button and save the *.zip file.
+ 5. Locate downloaded zip archive file and extract its content.
+ 6. From Manage Database dialog, click on "Import" button
+ 7. Select a file that ends with "_utf8.txt". All other files, softProjector + will not be able to import.
+ Select Unbound Bible file
+

+
Previous
Next
+ + diff --git a/help/managebible_de.html b/help/managebible_de.html new file mode 100644 index 0000000..2c9aa58 --- /dev/null +++ b/help/managebible_de.html @@ -0,0 +1,72 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

4.1 Bibel-Verwaltung

+

Für Bibel-Verwaltung:
+ 1. Wählen Sie "Ändern>Datenbank verwalten". Es wird ein Dialog-Fenster mit den Verwaltung-Optionen geöffnet. Abkürz.: Crtl+M
+ 2. Wählen Sie einen Reiter "Bibeln".softProjector ermöglicht das Hinzufügen von unbegrenzten Bibel-Versionen. + Im Dialog-Fenster kann man die Bibeln importieren, bearbeiten, exportieren oder löschen.

+

+ Manage Bibles

+

1. Liste der vorhandenen Bibel-Versionen
+

+

2. Import...
+
Diese Option ermöglicht eine Bibeldatei im softProjector-Format (*.sps) zu importieren. + sowie von der website Unbound Bible (ausführlicher - website-Adresse unten)

+

3. Bearbeiten...
+
Beim Drücken dieses Knopfes, offnet sich ein Dialog-Fenster, in dem eine Änderung der Bibel-Version vorgenommen werden kann.
+ Edit Bibles

+

4. Export...
+
 Exportieren einer Bibel-Version aus der Datenbank.

+

5. Löschen.
+ Löschen einer Bibel-Version, die nicht mehr gebraucht wird. Wenn in der Datenbank nur eine Bibel-Version vorhanden ist, so ist das Löschen deren nicht möglich.

+

Import Unbound Bibles
+ 1. Zur website: http://unbound.biola.edu/.
+ 2. Klicken Sie Downloads.
+ 3. Wählen Sie ein Bibel-Version zum download
+ Download Unbound Bibles
+ 4. Klicken Sie auf "Download" -Knopf und speichern Sie unter *.zip-Datei.
+ 5. Suchen Sie die heruntergeladene zip-Datei und öffnen Sie sie.
+ 6. Drücken Sie im Dialog-Fenster der Datenbank auf "Import" -Knopf.
+ 7. Wählen Sie die Datei mit der Endung "_utf8.txt". Alle anderen Dateien öffnet der softProjector + nicht.
+ Select Unbound Bible file
+

+
Previous
Next
+ + diff --git a/help/managebible_ru.html b/help/managebible_ru.html new file mode 100644 index 0000000..d5ea5a0 --- /dev/null +++ b/help/managebible_ru.html @@ -0,0 +1,72 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

4.1 Управление модулями Библий

+

Для управления модулями Библий:
+ 1. Выберите опцию: "Правка>Управление базой данных". + При этом открывается диалоговое окно с опциями управления. Горячие клавиши: Crtl+M
+ 2. Выберите закладку "Библии". + Софт Проектор позволяет вмещать любое количество Библейских модулей. + В диалоговом окне можно импортировать, редактировать, экспортировать и удалять модули Библий.

+

+ Manage Bibles

+

1. Список имеющихся модулей Библии.

+

2. Импорт
+
Эта опция позволяет импортировать Библию из файла в формате Софт Проектора (*.sps), + а также из сайта Unbound Bible (подробнее — ссылка внизу).

+

3. Правка
+
При нажатии на эту кнопку, открывается диалоговое окно, где можно изменить название модуля Библии.
+ Edit Bible

+

4. Экспорт
+
 Экспортирование модулей Библий из базы данных.

+

5. Удаление
+ Удаляются модули Библии, не нужные для употребления. Если в базе данных остается только один модуль Библии, его удаление будет невозможно.

+

Импортирование Unbound Bibles
+ 1. Идите на сайт: http://unbound.biola.edu/.
+ 2. Щелкните на Downloads.
+ 3. Выберите версию Библии для скачивания
+ Download Unbound Bibles
+ 4. Щелкните на кнопку "Download" и сохраните *.zip файл.
+ 5. Найдите скачанный zip файл и извлеките его содержимое.
+ 6. В диалоговом окне управления базой данных, нажмите на кнопку "Импорт".
+ 7. Выберите файл который заканчивается на "_utf8.txt". Все другие файлы Софт Проектор не импортирует.
+ Select Unbound Bible file
+

+
Previous
Next
+ + diff --git a/help/managesongbooks.html b/help/managesongbooks.html new file mode 100644 index 0000000..c2f63e2 --- /dev/null +++ b/help/managesongbooks.html @@ -0,0 +1,65 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

4.2 Managing Songbooks

+

 

+

To manage songbooks:
+ 1. Edit>Manage Database. This will open a dialog where managing will take place. Shortcut: Crtl+M
+ 2. Select "Songbooks" tab. + softProjector allows you to have as many songbooks as you would like to + have and it allows you to import, edit, export or delete a songbook.

+

+ Manage Songbook

+

1. Title Column:
+
Title column displays all title of songbooks are in the database of + the program.

+

2. Information:
+
A short description of each songbook

+

3. Import:
+
This will import a songbook.
+

+

4. Edit:
+
A dialog box will appear where you can change the title and + infromation of the songbook.
+ Edit songbook
+

+

5.Export:
+
Export a songbook from the database that you want to share with someone else. + Also, it is highly recommended to save a copy of your songbooks before + updating program.
+

+

6. Delete.
+ Delete a songbook that you do not want to use any more. You will not be allowed to delete any more songbooks if only one songbook is left.

+
Previous
Next
+ + diff --git a/help/managesongbooks_de.html b/help/managesongbooks_de.html new file mode 100644 index 0000000..993a28f --- /dev/null +++ b/help/managesongbooks_de.html @@ -0,0 +1,64 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

4.2 Gesangbücher-Verwaltung

+

 

+

Für Gesangbücher-Verwaltung:
+ 1. Wählen Sie "Ändern>Datenbank verwalten". Es erscheint ein Dialog-Fenster, in dem eine Verwaltung vorgenommen werden kann. Abkürz.: Crtl+M
+ 2. Wählen Sie "Gesangbücher". + softProjector kann eine unbegrenzte Zahl der Gesangbücher aufnehmen, + sowie importieren, bearbeiten, exportieren oder löschen.

+

+ Manage Songbooks

+

1. Spalte mit den Gesangbücher-Namen:
+
Hier werden alle vorhandenen Gesangbücher in der Datenbank angezeigt.

+

2. Information:
+
Kurze Beschreibungen der Gesangbücher

+

3. Importieren:
+
Hinzufügen neuer Gesangbücher.
+

+

4. Bearbeiten:
+
In dem geöffneten Dialog-Fenster können der Name der Gesangbücher + sowie Infromation deren geändert werden.
+ Edit Songbooks
+

+

5. Exportieren:
+
Exportieren eines Gesangbuches aus der Datenbank. + Es wird dringend empfohlen, eine Kopie des Gesangbuches vor dem installieren der neueren Programm-Version + zu erstellen.
+

+

6. Löschen.
+ Löschen eines Gesangbuches, das nicht mehr gebraucht wird. Wenn in der Datenbank nur ein Gesangbuch vorhanden ist, ist das Löschen dessen nicht möglich.

+
Previous
Next
+ + diff --git a/help/managesongbooks_ru.html b/help/managesongbooks_ru.html new file mode 100644 index 0000000..02ba19c --- /dev/null +++ b/help/managesongbooks_ru.html @@ -0,0 +1,63 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

4.2 Управление модулями сборников

+

 

+

Для управления модулями сборников:
+ 1. Выберите опцию: "Правка>Управление базами данных". + При этом открывается диалоговое окно, в котором происходит управление. Горячие клавиши: Crtl+M
+ 2. Выберите закладку "Сборники". + Софт Проектор может вмещать любое количество модулей сборников, + а также позволяет импортировать, редактировать, экспортировать и удалять эти модули.

+

+ Manage Songbook

+

1. Столбец с названиями сборников:
+
Здесь показаны все сборники, имеющиеся в базе данных программы.

+

2. Информация:
+
Краткие детали о сборниках

+

3. Импотировать:
+
Ввод в программу новых сборников.
+

+

4. Редактировать:
+
В появившемся диалоговом окне можно менять название и информацию о сборниках.
+ Edit songbook
+

+

5. Экспортирование:
+
Извлечение сборника из базы данных для передачи в пользование. Настоятельно рекомендуется сделать резервные копии сборников + перед установкой новой версии программы.
+

+

6. Удалить.
+ Удаляется сборник, не нужный более для употребления. Если в базе данных остается только один сборник, его удаление будет невозможно.

+
Previous
Next
+ + diff --git a/help/overview.html b/help/overview.html new file mode 100644 index 0000000..f594718 --- /dev/null +++ b/help/overview.html @@ -0,0 +1,111 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

1.3 Program Overview

+

 

+

+ Overview
+ softProjector is designed as 2 part; the prepare area, live area. In prepare + area, items are prepared and previewed before sent to live area to me + shown.

+

1. File Menu:
+ Contains only one menu item, Exit"Exit," + this will close the program.

+

2. Edit Menu:
+ Contains items to modify songs, manage database and program settings

+
+

2.1 + Add new song + "New Song..."
+ In softProjector, it is possible to add your own songs and song books. Use + this menu item to add a new song.

+

2.2 + Edit song + "Edit Current Song..."
+ Edit the song that is currently selected. More + details.

+

2.3 + Delete a song + "Copy Current Song"
+ Copy a song that is currently selected into a new songbook or into an + existing songbook. More + details.

+

2.4 + Delete a song + "Delete Current Song"
+ Delete the song that is currently selected. More + details.

+

2.5 + Database + "Manage Database..."
+ softProjector is created in the manner that it is possible to import/export + or change Bibles and + songbooks.

+

2.6 + Settings + "Settings..."
+ Use this to change setting for the program. + Settings like font, background, Bible to use and others.

+
+

3. Language Menu:
+ softProjector is enabled users to have program interface in different + languages. Currently three languages are available, English, Russian and + German. No program restart is needed to switch the language. softProjector + will remember language settings upon exit.

+

4. Help Menu:
+ If help information is needed, use this. Program information cab be also + found here.

+

5. Media Prepare Area:
+ Prior to show a verse or something else, it needs to be found and prepared. + All preparations are made in this area, and once know what needs to be + shown, it goes to "Show Control Area".

+

6. + Bible Bible Tab:
+ On the Bible tab, bible verses can be searched if verse location is unknown, + quickly looked up and then shown on the screen. More info on "Show + Bible" page.

+

7. + Songs Song Tab:
+ Probably primary use for this program will be to show songs. On this tab, + songs can be easily found and preview. If needed they can be edited, added + or deleted. More info on "Song Songs" page.

+

8. + Announce Announcements Tab:
+ softProjector allows users to show their own text at any time. More info on + "Show Announcements" page.

+

9. Live Show Control Area:
+ Once "Go Live" button on any media prepare tab has been clicked, focus goes + onto "Live show control area." Anything changed in this area, will be + immediately reflected on display screen.

+
Previous
Next
+ \ No newline at end of file diff --git a/help/overview_de.html b/help/overview_de.html new file mode 100644 index 0000000..257ee00 --- /dev/null +++ b/help/overview_de.html @@ -0,0 +1,105 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

1.3 Programm-Überblick

+

 

+

+ Overview
+ softProjector besteht aus zwei Hauptteilen: Vorbereitungs- und Leinwandbereich. In dem + Vorbereitungsbereich werden Texte gewählt und durchschaut, bevor die auf der Leinwand + angezeigt werden.

+

1. Datei-Menü:
+ Enthält nur eine Option: Exit"Beenden," + d.h. Beenden des Programms.

+

2. Bearbeiten-Menü:
+ Enthält Optionen für Bearbeitung der Lieder, sowie Verwaltung der Datenbank und allgemeine Einstellungen des Programms.

+
+

2.1 + Add new song + "Neues Lied..."
+ In softProjector gibt es eine Möglichkeit, die das Hinzufügen der Lieder und Gesangbücher nach Wunsch des Benutzers erlaubt. + Dafür gibt es eine Option Neues Lied.

+

2.2 + Edit song + "Lied bearbeiten..."
+ Das gewählte Lied kann bearbeitet werden. Ausführlicher:

+

2.3 + Delete a song + "Lied kopieren"
+ Das gewählte Lied wird in ein neues oder in ein vorhandenes Gesangbuch kopiert. + existing songbook. Ausführlicher:

+

2.4 + Delete a song + "Lied löschen"
+ Das gewählte Lied wird aus dem Gesangbuch entfernt. Ausführlicher:

+

2.5 + Database + "Datenbank verwalten..."
+ In softProjector ist importieren/exportieren/bearbeiten oder löschen der + Bibeln und + Gesangbüchervorgesehen.

+

2.6 + Settings + "Einstellungen..."
+ Veränderung der Programm-Einstellungen. + Einstellungen der Schriftart, Hintergrund, Bibeln u.ä. des Programms.

+
+

3. Sprache-Menü:
+ In softProjector ist eine Wahl der Sprache vorgesehen. Momentan sind drei Sprachen vorhanden: Englisch, Russisch und + Deutsch. Beim Ändern der Sprache ist kein Neustart des Programms erforderlich. softProjector + speichert die gewählte Sprache beim Beenden.

+

4. Hilfe-Menü:
+ Hier befinden sich Info und Hilfe über das Programm.

+

5. Vorbereitungsbereich:
+ Vor dem Anzeigen auf der Leinwand, muss ein Text gewählt und vorbereitet werden. + Nach dem Wählen des erforderlichen Textes, wird dieser auf dem "Vorschau-Fenster"angezeigt.

+

6. + Bible Bibel-Reiter:
+ In diesem Reiter ist es möglich, das schnelle Suchen eines Verses, falls die Bibelstelle unbekannt ist, + sowie Vorschau und Anzeigen an der Leinwand, zu unternehmen. Ausführlicher: "Bibel + anzeigen".

+

7. + Songs Lied-Reiter:
+ Dieses Programm ist hauptsächlich dafür gedacht, die Lieder an der Leinwand anzuzeigen. In diesem Reiter kann + man ein Lied ganz leicht finden und anschauen. Bei Bedarf können Lieder bearbeitet, neue hinzugefügt oder gelöscht werden. + Mehr Info: "Lied Lieder".

+

8. + Announce Ankündigung-Reiter:
+ softProjector ermöglicht es, einen beliebigen Text zu jeder Zeit anzuzeigen. Mehr Info: + "Ankündigung anzeigen".

+

9. Leinwandbereich:
+ Beim drücken auf "Anzeigen" -Knopf, wird die vorbereitete Information auf + "Leinwandbereich" angezeigt. Alle Änderungen, die in diesem Fenster unternommen wurden, + werden sofort auf der Leinwand angezeigt.

+
Previous
Next
+ \ No newline at end of file diff --git a/help/overview_ru.html b/help/overview_ru.html new file mode 100644 index 0000000..9459101 --- /dev/null +++ b/help/overview_ru.html @@ -0,0 +1,104 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

1.3 Обзор программы

+

 

+

+ Overview
+ Интерфейс программы состоит из двух главных частей: подготовительная и экранная. + В подготовительной части тексты выбираются и просматриваются перед выводом на экран. +

+

1. Меню "Файл":
+ Содержит только одну опцию: Выход"Выход," + выход из программы.

+

2. Меню "Правка":
+ Содержит опции редактирования песен, управления базой данных и общие настройки программы

+
+

2.1 + Add new song + "Новая песня"
+ В программе есть возможность добавления песен и сборников по усмотрению пользователя. + Для этого имеется опция Новая песня .

+

2.2 + Edit song + "Редактировать песню"
+ Редактируется выбранная на данный момент песня. Подробнее

+

2.3 + Delete a song + "Копировать песню"
+ Выбранная песня копируется в новый или существующий сборник. Подробнее

+

2.4 + Delete a song + "Удалить песню"
+ Выбранная песня удаляется из сборника. Подробнее

+

2.5 + Database + "Управление базой данных"
+ В программе предусмотрена возможность импортирования / экспортирования / редактирования и удаления + Библий и + песенников.

+

2.6 + Settings + "Настройки"
+ Изменение настроек программы. + Настройки шрифтов, фона, Библий и других параметров программы.

+
+

3. Меню "Язык":
+ В программе предусмотрен выбор языка интерфейса. На данный момент доступны три языка: английский, + русский и немецкий. При переключении на другой язык не требуется перезапуск программы. + Программа запоминает язык интерфейса при закрытии .

+

4. Меню "Справка":
+ Здесь находится информация о программе и справочник.

+

5. Подготовительная часть интерфейса:
+ Перед выводом на экран, текст нужно выбрать и подготовить. + После выбора необходимого текста, он выводится на окно + Предварительного просмотра.

+

6. + Bible Закладка "Библия":
+ На этой закладке можно осуществлять быстрый поиск стиха, если неизвестно его местонахождение, + его просмотр и вывод на экран. Подробнее

+

7. + Songs Закладка "Песни":
+ Данная программа главным образом предназначена для вывода на экран песен. + На этой закладке песню можно легко найти и просмотреть. При необходимости, песни можно + редактировать, добавлять новые или удалять. Подробнее

+

8. + Announce Закладка "Объявления":
+ Программа позволяет выводить на экран любой текст в любое время, по усмотрению пользователя. + Подробнее

+

9. Окно вывода на экран:
+ При нажатии на кнопку "На экран", вся подготовленная информация переводится в + "Окно вывода на экран ." Всякие изменения, сделанные в этом окне, будут отображаться + на экране немедленно.

+
Previous
Next
+ \ No newline at end of file diff --git a/help/releasenotes.html b/help/releasenotes.html new file mode 100644 index 0000000..7eaff5a --- /dev/null +++ b/help/releasenotes.html @@ -0,0 +1,72 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

6.2 Release Note

+
+
SoftProjector 1.0 release:
+
+
New Features:
+
+
Full English, Russian, and German help manual
+
A song tile must exist in order to add a song
+
+
Bug Fixes:
+
+
Some special Bible verse correspondence fix
+
Announcement alignment fix
+
+
+
+
+
Beta 2: changes since beta 1 release:
+
+
New Features:
+
+
Ability to move songs up and down in the playlist
+
Copy songs into new or existing songbooks
+
Memorizes to which songbook last song was added
+
+
Bug Fixes:
+
+
Manage database dialog is resizable
+
Optimized the bible filter entry field for much faster lookup
+
Only song text is copied into song edit widget.
+
Song tab selection fix
+
prevent edit/copy/delete a none selected song in the start-up of the program
+
+
+
+
Previous
Next
+ \ No newline at end of file diff --git a/help/releasenotes_de.html b/help/releasenotes_de.html new file mode 100644 index 0000000..aabfc6f --- /dev/null +++ b/help/releasenotes_de.html @@ -0,0 +1,72 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

6.2 Merkmale zu dieser Version

+
+
SoftProjector 1.0 Erscheinen:
+
+
Neue Möglichkeiten:
+
+
Ausführliche Englisch, Russisch und Deutsch Hilfe-Handbuch
+
Ein Lied Fliese muss vorhanden sein, um einen Titel hinzuzufügen
+
+
Programmfehler:
+
+
Einige spezielle Bibelvers Korrespondenz fix
+
Bekanntmachung Ausrichtung fixieren
+
+
+
+
+
Beta 2: Änderungen seit dem Erscheinen des Beta 1:
+
+
Neue Möglichkeiten:
+
+
Versetzen der Lieder nach oben und unten in der "Abspiel"-Liste
+
Kopieren der Lieder in ein neues oder in ein vorhandenes Gesangbuch
+
Beibehaltung des Gesangbuches, in das bei letzter Nutzung ein Lied hinzugefügt wurde
+
+
Programmfehler:
+
+
Das Dialog-Fenster der Datenbank hat jetzt eine veränderbare Größe.
+
Der Suche-Filter der Bibel wurde für eine schnellere Arbeit optimiert.
+
Beim Kopieren der Lieder, wird in das Feld nur der Text des Liedes eingefügt.
+
Die Wahl im Lieder-Reiter wurde "repariert".
+
Schutz vor einem möglichen Bearbeiten/Kopieren/Löschen des Liedes beim Start des Programms.
+
+
+
+
Previous
Next
+ \ No newline at end of file diff --git a/help/releasenotes_ru.html b/help/releasenotes_ru.html new file mode 100644 index 0000000..40df5d6 --- /dev/null +++ b/help/releasenotes_ru.html @@ -0,0 +1,72 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

6.2 Заметки по данному выпуску программы

+
+
 Выпуск SoftProjector 1.0:
+
+
Новые возможности:
+
+
Полный справочник на русском, немецком и английском языках
+
Для добавления новой песни, необходимо иметь название этой песни
+
+
Исправления:
+
+
Некоторые несоответствия между стихами разных переводов Библии
+
Проблемы с выравниванием текста в объявлениях
+
+
+
+
+
Бета 2: изменения с момента выпуска Беты 1:
+
+
Новые возможности:
+
+
Перемещение песен вверх и вниз в списке воспроизведения
+
Копирование песен в новый или существующий сборник
+
Запоминание сборника в который была добавлена песня в последний раз
+
+
Исправления:
+
+
Диалоговое окно базы данных теперь имеет изменяемый размер
+
Оптимизирован фильтр поиска по Библии для более быстрой работы
+
При копировании песен, в поле вводится только текст песни.
+
Исправлен выбор закладки "Песни"
+
Защита от случайного редактирования / копирования /удаления песни при запуске программы
+
+
+
+
Previous
Next
+ \ No newline at end of file diff --git a/help/shortcuts.html b/help/shortcuts.html new file mode 100644 index 0000000..ffacc5d --- /dev/null +++ b/help/shortcuts.html @@ -0,0 +1,87 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

6.1 Shortcuts

+
+
Main window
+
+
Ctrl+M - Open Manage Database dialog box
+
Ctrl+Q - Exit program
+
Ctrl+T - Open Settings dialog box
+
Esc - Hide the text on display screen and show black of passive + background
+
F1 - Open Help
+
F4 - Resume presentation. Show selected item from live list
+
F6 - Switch to Bible tab
+
F7 - Switch to Songs tab
+
F8 - Switch to Announcements tab
+
+
Bible Tab
+
+
F2 - Add current verse in preview list to history list
+
F3 - Remove a verse form history list
+
F5 - Send current verse to show
+
+
Songs Tab
+
+
Ctrl+C - Copy a song into a new or other existing songbook
+
Ctrl+D - Delete a song
+
Ctrl+E - Edit a song
+
Ctrl+N - Add a new song
+
F2 - Add current song to playlist
+
F3 - Remove a remove a song from playlist
+
F5 - Send current song to show
+
+
Announcements Tab
+
+
F2 - Add text to history list
+
F3 - Remove a announcement form history list
+
F5 - Send announcement to show
+
+
Manage Database Dialog for both Bibles and Songbooks tabs
+
+
Ctrl+E - Edit
+
Ctrl+D - Delete
+
Ctrl+I - Import
+
Ctrl+X - Export
+
Esc - Close dialog
+
+
Edit Song dialog
+
+
Ctrl+Q - Close dialog without saving
+
Ctrl+S - Save song and close
+
+
+ +
Previous
Next
+ \ No newline at end of file diff --git a/help/shortcuts_de.html b/help/shortcuts_de.html new file mode 100644 index 0000000..0488ce0 --- /dev/null +++ b/help/shortcuts_de.html @@ -0,0 +1,87 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

6.1 Abkürzungen

+
+
Hauptfenster
+
+
Ctrl+M - Verwaltung der Datenbank
+
Ctrl+Q - Beenden des Programms
+
Ctrl+T - Einstellungen
+
Esc - Text verstecken auf dem Bildschirm, schwarzen Hintergrund auf dem passiven + Hintergrund anzeigen
+
F1 - Hilfe
+
F4 - Anzeige erneuern. Das Gewählte aus der "Abspiel"-Liste anzeigen
+
F6 - Bibeln-Reiter
+
F7 - Lieder-Reiter
+
F8 - Ankündigungen-Reiter
+
+
Bibeln-Reiter
+
+
F2 - Hinzufügen eines Verses aus dem Vorschau in die Liste der Geschichte
+
F3 - Entfernen des Verses aus der Liste der Geschichte
+
F5 - Anzeigen des Verses auf dem Bildschirm
+
+
Lieder-Reiter
+
+
Ctrl+C - Kopieren eines Liedes in ein neues oder in ein vorhandenes Gesangbuch
+
Ctrl+D - Löschen des Liedes
+
Ctrl+E - Bearbeiten des Liedes
+
Ctrl+N - Hinzufügen eines neuen Liedes
+
F2 - Hinzufügen des Liedes in die "Abspiel"-Liste
+
F3 - Entfernen des Liedes aus der "Abspiel"-Liste
+
F5 - Anzeigen des Liedes auf dem Bildschirm
+
+
Ankündigungen-Reiter
+
+
F2 - Hinzufügen eines Ankündigunstextes in die Liste der Geschichte
+
F3 - Entfernen des Ankündigunstextes aus der Liste der Geschichte
+
F5 - Anzeigen des Ankündigungstextes
+
+
Verwaltung der Datenbank für Bibeln- und Gesangbücher-Reiter
+
+
Ctrl+E - Bearbeiten
+
Ctrl+D - Löschen
+
Ctrl+I - Importieren
+
Ctrl+X - Exportieren
+
Esc - Schließen
+
+
Lied bearbeiten
+
+
Ctrl+Q - Schließen des Fensters ohne jeglicher Änderung
+
Ctrl+S - Änderungen speichern und Fenster schließen
+
+
+ +
Previous
Next
+ \ No newline at end of file diff --git a/help/shortcuts_ru.html b/help/shortcuts_ru.html new file mode 100644 index 0000000..4fce671 --- /dev/null +++ b/help/shortcuts_ru.html @@ -0,0 +1,87 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

6.1 Горячие клавиши

+
+
В главном окне:
+
+
Ctrl+M - Управление базой данных
+
Ctrl+Q - Выход из прогаммы
+
Ctrl+T - Настройки
+
Esc - Спрятать текст на экране, показать черный фон или заставку
+
F1 - Справка
+
F4 - Возобновить показ. Показать выбранное из списка воспроизведения.
+
F6 - Закладка "Библии"
+
F7 - Закладка "Песни"
+
F8 - Закладка "Объявления"
+
+
На закладке "Библии":
+
+
F2 - Добавить стих из предосмотра в список истории
+
F3 - Удалить стих из списка истории
+
F5 - Показать стих на экране
+
+
На закладке "Песни":
+
+
Ctrl+C - Копировать песню в новый или существующий сборник
+
Ctrl+D - Удалить песню
+
Ctrl+E - Редактировать песню
+
Ctrl+N - Добавить новую песню
+
F2 - Добавить песню в список воспроизведения
+
F3 - Удалить песню из списка воспроизведения
+
F5 - Показать песню на экране
+
+
На закладке "Объявления":
+
+
F2 - Добавить текст объявления в список истории
+
F3 - Удалить текст объявления из списка истории
+
F5 - Показать объявление на экрани
+
+
В диалоговом окне "Управление базой данных": + (действительно для закладок Библии и Сборники)
+
+
Ctrl+E - Редактировать
+
Ctrl+D - Удалить
+
Ctrl+I - Импортировать
+
Ctrl+X - Экспортировать
+
Esc - Закрыть диалоговое окно
+
+
В диалоговом окне "Редактировать песню":
+
+
Ctrl+Q - Закрыть диалоговое окно без сохранения изменений
+
Ctrl+S - Сохранить изменения и закрыть окно
+
+
+ +
Previous
Next
+ \ No newline at end of file diff --git a/help/show.html b/help/show.html new file mode 100644 index 0000000..b417ce3 --- /dev/null +++ b/help/show.html @@ -0,0 +1,67 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

2.1 Showing - General + Information

+

 

+

+ Main Screenshot
+ softProjector is designed as 3 part; the prepare area, live area; and + the "Go Live" button.

+

1. Prepare Area:
+ This is the area where the user finds the Bible verse, song, or other media + that he would like to show. Anything done in this area will not affect what + is showing until "Go Live" button is clicked.

+

2. Live Area:
+ After "Go Live" button has been clicked, the selected Bible chapter/song is + populated in the show list. While "Show" is checked, changing selected any + item from the list will change what is shown, it will show currently + selected item. Double clicking on the show list will activate "Show" button + and send selected item to be shown.

+
+
2.1 "Hide" Button:
+ When "Hide" button is clicked, it becomes checked and "Show" button becomes + unchecked. The display screen clears all the text and background goes from + active to passive.
+
2.2 "Show" Button:
+ "Show" button is automatically checked when "Go Live" button is pressed. + When "Show" button is clicked, it becomes checked and "Hide" button becomes + unchecked. The display screen background switches from passive to active and + newly selected item in the show list.
+
+

3. "Go Live" Button:
+ "Go Live" button has the same function on all tab. It send prepared Bible + verse / Song / etc. to be shown. After it is clicked, the show list get + repopulated with new information and proper items gets selected, "Show" + button is activated and the verse is shown.

Previous
Next
+ \ No newline at end of file diff --git a/help/show_de.html b/help/show_de.html new file mode 100644 index 0000000..c7e6500 --- /dev/null +++ b/help/show_de.html @@ -0,0 +1,66 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

2.1 Vorführung auf dem Bildschirm

+

 

+

+ Show Main
+ softProjector besteht hauptsächlich aus drei Teilen: Vorbereitung, Vorführung auf dem Bildschirm und + "Anzeigen" -Knopf.

+

1. Vorbereitung:
+ In diesem Teil befinden sich Texte aus der Bibel, Lieder und alles das, was auf dem Bildschirm angezeigt werden soll. + Alles das, was in diesem Teil vorbereitet wird, hat keinen Einfluss auf das, was angezeigt werden soll, solange der + "Anzeigen" -Knopf nicht gedrückt wird.

+

2. Vorführung auf dem Bildschirm:
+ Nachdem der "Anzeigen" -Knopf gedrückt wurde, erscheinen gewählte Bibeltext oder Lied in der Anzeige-Liste. + Beim drücken "Zeigen" kann man mit der Maus aus der Anzeige-Liste wählen. + Während dessen wird der gewählte Text auf dem Bildschirm angezeigt. Beim Doppelklick + auf das Anzeige-Fenster, wird der "Zeigen" -Knopf aktiviert und sendet + den gewählten Text auf den Bildschirm.

+
+
2.1 "Verstecken" -Knopf:
+ Beim drücken des "Verstecken" -Knopfes, wird der "Zeigen" -Knopf deaktiviert + und die ganze Information verschwindet vom Bildschirm. + Während dessen wird das aktive Bild ins passive gewechselt.
+
2.2 "Zeigen" -Knopf:
+ "Zeigen" -Knopf wird automatisch aktiviert beim drücken des "Anzeigen" -Knopfes. + Beim drücken des "Zeigen" -Knopfes wird der "Verstecken" -Knopf deaktiviert. + Während dessen wird das passive Bild ins aktive gewechselt, aber der gewählte Text wird in + in die Liste eingetragen.
+
+

3. "Anzeigen" -Knopf:
+ "Anzeigen" -Knopf erfüllt die gleiche Funktion in allen Reitern, d.h. sendet die ausgewählten + Bibelverse/Lieder/Texte usw. auf den Bildschirm. Beim drücken des Knopfes wird die Anzeige-Liste + mit den gewählten Texten gefüllt, und der "Zeigen" + -Knopf wird aktiviert. Auf dem Bildschirm erscheint der gewählte Text.

Previous
Next
+ \ No newline at end of file diff --git a/help/show_ru.html b/help/show_ru.html new file mode 100644 index 0000000..5be0b34 --- /dev/null +++ b/help/show_ru.html @@ -0,0 +1,63 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

2.1 Вывод на экран

+

 

+

+ Main Screenshot
+ Интерфейс Софт Проектора состоит из трех важнейших элементов: подготовительная часть, окно вывода на экран + и кнопка "На экран".

+

1. Подготовительная часть:
+ В этой части находятся тексты из Библии, песни и все остальное, что нужно вывести на экран. + Все то, что готовится в этой части, не влияет на то что показано на экране до тех пор, пока не нажата кнопка + "На экран".

+

2. Окно вывода на экран:
+ После нажатия на кнопку "На экран", выбранный текст Библии или песня + появляется в списке показа. + При нажатой кнопке "Показать", можно мышью выбирать из списка в окне показа, + при этом выбранный текст будет показан на экране. Двойной щелчок по окну показа + активирует кнопку "Показать" и отсылает выбранный текст на экран.

+
+
2.1 Кнопка "Скрыть" :
+ При нажатии на кнопку "Скрыть" , кнопка "Показать" деактивируется и с экрана исчезает + вся информация. При этом фоновый рисунок переходит в заставку.
+
2.2 Кнопка "Показать" :
+ Кнопка "Показать" активизируется автоматически при нажатии на кнопку "На экран". + При нажатии на кнопку "Показать" , деактивизируется кнопка "Скрыть" . При этом + заставка переходит в фоновый рисунок, а выбранный текст заносится в список/активируется в списке показа.
+
+

3. Кнопка "На экран" :
+ Кнопка "На экран" выполняет одинаковую функцию во всех закладках, т.е. отсылает приготовленные стихи + Библии / песни / тексты и т.д. на экран. При ее нажатии, список показа заполняется выбранными текстами, + активируется кнопка "Показать" и на экране появляется выбранный текст.

Previous
Next
+ \ No newline at end of file diff --git a/help/showannounce.html b/help/showannounce.html new file mode 100644 index 0000000..e7c4235 --- /dev/null +++ b/help/showannounce.html @@ -0,0 +1,64 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

2.4 Showing + Announcements

+

+ To show an announcement:
+ 1. Enter text. Enter announcement text the + text box.
+ 2. Click "Go Live" button.

+
+

+ Show Announcements

+

1. Announcement Edit Text Box:
+ Write announcement text in this box. All text is plain text without + formatting. Text can be multiline and as long as needed. +

+

2. Horizontal Alignment:
+ Set text alignment to Left of the screen, Center of the screen, or Right of + the screen.

+

3. Vertical Alignment:
+ Set text alignment to Top of the screen, Middle of the screen, or Bottom of + the screen.

+

4. "Add" Button:
+ Add announcement text that is in text box (1) to playlist (6).

+

5. "Remove" Button:
+ Remove selected announcement text from playlist.

+

6. Announcement Text Playlist:
+ This playlist hold prepared announcements for further use. As soon as an + item in playlist will be selected, it will change the text in the text + box(1) to what was selected.

+
Previous
Next
+ + diff --git a/help/showannounce_de.html b/help/showannounce_de.html new file mode 100644 index 0000000..32e3906 --- /dev/null +++ b/help/showannounce_de.html @@ -0,0 +1,58 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

2.4 Ankündigungen anzeigen

+

+ Für Anzeigen der Ankündigungen:
+ 1. Tragen Sie einen Text in das Text-Fenster ein.
+ 2. Klicken Sie auf "Anzeigen" -Knopf.

+
+

+ Show Announce

+

1. Ankündigunstext-Fenster:
+ Den Text kann man entweder eintippen oder aus dem Puffer eintragen. Er muss einfach, ohne Formatierung sein. + Die Länge des Textes und die Anzahl der Zeilen sind unbegrenzt.

+

2. Horizontale Ausrichtung:
+ Die Einstellung der Text-Ausrichtung: links, zentriert und rechts.

+

3. Vertikale Ausrichtung:
+ Die Einstellung der Text-Ausrichtung: oben, zentriert und unten.

+

4. "Hinzufügen" -Knopf:
+ Hinzufügen des Ankündigunstextes (1) in die "Abspiel"-Liste (6).

+

5. "Entfernen" -Knopf:
+ Entfernt den Ankündigungstext aus der Liste.

+

6. Ankündigungstext-"Abspiel"-Liste:
+ Dieser Text beinhaltet Ankündigungen für die nächste Nutzung. + Beim Wählen eines Textes aus dieser Liste wird der vorhandene Text in dem Text-Fenster(1) ausgetauscht.

+
Previous
Next
+ + diff --git a/help/showannounce_ru.html b/help/showannounce_ru.html new file mode 100644 index 0000000..97ce32c --- /dev/null +++ b/help/showannounce_ru.html @@ -0,0 +1,59 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

2.4 Показ объявлений

+

+ Для показа объявлений:
+ 1. Введите текст объявления в текстовое окно.
+ 2. Нажмите на кнопку "На экран".

+
+

+ Show Announcements

+

1. Текстовое окно:
+ Текст можно либо напечатать, либо ввести через буфер обмена. Он должен быть простым, без форматирования. + Длина текста и количество строк не ограничиваются. +

+

2. Горизонтальное выравнивание:
+ Установка выравнивания текста по левому краю, по центру или по правому краю экрана.

+

3. Вертикальное выравнивание:
+ Установка выравнивания текста по верхнему краю, по середине или по нижнему краю экрана.

+

4. Кнопка "Добавить":
+ Добавление текста объявления (1) в список воспроизведения (6).

+

5. Кнопка "Удалить":
+ Удаляет выбранный текст объявления из списка вывода.

+

6. Список объявлений для вывода:
+ Этот список содержит объявления для последующего употребления. + При выборе текста из этого списка, он замещает имеющийся текст в текстовом окне(1).

+
Previous
Next
+ + diff --git a/help/showbible.html b/help/showbible.html new file mode 100644 index 0000000..7bde19a --- /dev/null +++ b/help/showbible.html @@ -0,0 +1,128 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

2.2 Showing Bible Verse

+

+ softProjector allows you to show a Bible verse on the screen. You are allowed to show one verse at a time. Ability to show multiple verses will possibly be in future. You are also are allowed to show a verse from two Bibles + simultaneously.

+

+ To show a verse:
+ 1. Select a book from book list(13). You may also enter book name in book filter box(12) above book list. This will filter book and leave you only matching books.
+ 2. Select a chapter from chapter list. You may also enter chapter number in the text field above the chapter list.
+ 3. Select a verse from verse column. You may also enter chapter number in the text field above the chapter list.
+ 4. Click "Go Live" button. After you have + selected a verse that you want to show, you may click "Go Live" button or double click the verse.

+
+

Bible Screen

+

1. Bible Search Block:
+ An area where a particular Bible verse can be search by a phrase or a part + of a phrase.

+
+
2. Search text entry field:
+ Field where search word/phrase is entered. Search string is case insensitive + and all none alphanumeric characters will be removed.
+
3. Begins:
+ Search all verses that begin with the search word/phrase.
+
4. Contains:
+ Search all verses that contain the search word/phrase. Will also return all + verses that begin with search word/phrase.
+
5. Search Button:
+ When pressed, it will search Bible, and afterwards, will display results + below.
+
6. Entire Bible:
+ Limit search to the entire Bible. The search will be performed over entire + Bible.
+
7. Current Book:
+ Limit search to currently selected book. Will search only the book that is + selected.
+
8. Current Chapter:
+ Limit search to currently selected chapter. Will search only the chapter + that is selected of the book that is selected.
+
9. Search Result List:
+ This list will contain search results. Search word/phrase will be + highlighted in red. Search phrases that contain + punctuation marks or other none alphanumeric characters may not always be + highlighter. For example: search phrase "and God" will not highlight result + of  and, God", but will bring back the result.
+ SoftProjector will return only 281 results. A label below search result list + will notify how many results are returned and if it is over limit. If it + is over limit, please modify search word/phrase or other search options.
+ Double-click the a verse and it will sent selected verse to be shown.
+
10. Hide Results Button:
+ This will hide search result list.
+
+ +

11. Bible Look-up Block:
+ In this block, Bible passages are looked up and prepared to be shown

+
+
12. Quick Find Entry Field:
+ Quickly find Bible passage by entering book, chapter and verse separated by + a space(" "). While book, chapter, or verse is entered, it will + automatically select corresponding passage. After passage information is + entered, and correct verse is selected, just press "F5" or click on "Go + Live" button.
+ Book can be beginning or part of a book, entire book name is not required, + ex: mat for Matthew. Incases where book names + are in series, do not use space the number and book name, ex: use + 1cor instead of 1 + cor for 1st Corinthians. Few examples of full passage selection: + da 3 12 for Daniel 3:12; + 1the 5 8 for 1st Thessalonians 5:8.
+
13. Book List:
+ Hold either entire list of book or only the list that matches entry in the + quick find field. Select the book.
+
14. Chapter Entry Field and List:
+ Chapter can be entered in the entry field or selected from the list.
+
15. Verse Entry Field and List:
+ Verse can be entered in the entry field or selected from the list.
+ Double-click on a verse in the list and it will be sent to be shown.
+
+

16. History/Hold Block:
+ History/Hold block contains verses that have been sent to be shown or verses + that has been added by "Add" button.

+
+
17. "Add" Button:
+ "Add" button will add selected passage above and add it to the history list.
+
18. "Remove" Button:
+ "Remove" button will remove selected verse in the list and remove it from + the list.
+
19. "Clear" Button:
+ "Clear" button will clear entire history list.
+
20 History Verse List:
+ After a verse is sent to be shown, it will be stored in this list until + removes. Double-click a verse and it will be shown again without adding it + second time to the list.
+
+
Previous
Next
+ + diff --git a/help/showbible_de.html b/help/showbible_de.html new file mode 100644 index 0000000..dc9b4de --- /dev/null +++ b/help/showbible_de.html @@ -0,0 +1,121 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

2.2 Anzeigen der Bibelverse

+

+ softProjector kann gleichzeitig nur einen Bibelvers anzeigen. Eine Option für das Anzeigen mehrerer Verse - ist eine Sache der Zukunft. + Es kann auch der gleiche Bibelvers aus zwei verschiedenen Bibelversionen angezeigt werden.

+

+ Für das Anzeigen des Bibelverses:
+ 1. Wählen Sie ein Buch der Bibel (13). Man kann auch ein Buch über den Filter (12) in dem Fenster über dem Buchverzeichnis der Bibel wählen.
+ 2. Wählen Sie ein Kapitel aus dem Verzeichnis, oder geben Sie manuell eine Nummer des Kapitels in dem Text-Fenster über dem Kapitel-Verzeichnis.
+ 3. Wählen Sie einen Vers aus der Vers-Spalte, oder geben Sie manuell eine Nummer des Verses in dem Text-Fenster über der Vers-Spalte.
+ 4. Klicken Sie den "Anzeigen"-Knopf. Nachdem ein gesuchter Vers gewählt wurde, + drücken Sie den "Anzeigen" -Knopf, oder doppelklicken Sie mit der Maus auf den Vers.

+
+

+ Show Bible

+

1. Suche in der Bibel:
+ Hier kann man einen Vers nach Phrase oder Wort suchen/finden.

+
+
2. Such-Fenster nach Text:
+ Hierhin werden Worte/Phrasen für die Suche eingefügt. Das Such-Fenster ist zum Register empfindlich + und alle Zeichen, außer Buchstaben-Zahlen, werden automatisch entfernt.
+
3. Beginn:
+ Suche nach Versen, die mit der/dem angegebener/m Phrase/Wort anfangen.
+
4. Enthält:
+ Suche nach Versen, die das/die angegebene Wort/Phrase enthält. Gleichzeitig werden + auch Verse gefunden, die mit der/dem angegebener/m Phrase/Wort anfangen.
+
5. "Suche"-Knopf:
+ Beim drücken dieses Knopfes werden Suche in der Bibel und Anzeigen der Ergebnisse im unteren Fenster + durchgeführt.
+
6. Suche in der ganzen Bibel:
+ Suche wird in der ganzen Bibel durchgeführt.
+
7. Suche in dem gewählten Buch:
+ Such wird in dem gewählten Buch durchgeführt.
+
8. Suche in dem gewählten Kapitel:
+ Suche wird nur in dem gewählten Kapitel durchgeführt.
+
9. Ergebnis der gefundenen Verse:
+ In diesem Fenster werden die Ergebnisse der Suche angezeigt. Die für die Suche angegebenen Worte/Phrasen + werden mit rot gekennzeichnet. Aber Phrasen, die Zeichen wie Punkt, Komma + oder nicht alphabetisch-nummerische Zeichen enthalten, werden nicht immer rot gekennzeichnet, obwohl + diese in dem Fenster der gefundenen Verse angezeigt werden. Z.B.: Suche eine Phrase "und Gott" wird nicht mit rot gekennzeichnet, + obwohl das Ergebnis mit   und, Gott" angezeigt wird.
+ SoftProjector kann nicht mehr als 281 Verse als Ergebnis herausgeben. Während dessen wird unter dem Fenster der gefundenen Versen + die Anzahl angezeigt sowie die Limitüberschreitung, wenn dies der Fall wäre. Bei einer Limitüberschreitung muss das/die gesuchte Wort/Phrase + geändert oder eine andere Suchoption verwendet werden.
+ Double-click the a verse and it will sent selected verse to be shown.
+
10. "Ergebnis-Verstecken"-Knopf:
+ Beim drücken dieses Knopfes verschwindet das Fenster mit den gefundenen Versen.
+
+ +

11. Block der Bibelbetrachtung:
+ In diesem Block kann man die Bibelverse vor dem Anzeigen auf der Leinwand betrachten und vorbereiten.

+
+
12. Fenster der Schnellsuche:
+ Man kann eine Bibelstelle sehr schnell finden, indem man den Namen des Buches, Kapitel und Vers (getrennt durch ein Lehrzeichen) + (" ") in dieses Fenster einfügt. Das Programm findet den gesuchten Vers automatisch. + Nachdem der Vers gefunden wurde, drücken Sie "F5" oder klicken Sie auf den "Anzeigen" -Knopf.
+ Es ist nicht unbedingt nötig, den vollen Name eines Buches der Bibel einzugeben. Es ist genügend, ein paar Anfangsbuchstaben + einzugeben, wie z.B.: matfür Matthäus. Falls ein Buch eine Zahl hat, so ist dieses mit einem Lehrzeichen + einzugeben, d.h. für die Suche 1. Korinther: verwenden + 1kor statt 1 + kor . Beispiele für eine richtige Eingabe: + da 3 12 für Daniel 3:12; + 1the 5 8 für 1. Thessalonicher 5:8 usw.
+
13. Buch-Verzeichnis:
+ Enthält entweder eine Liste aller Bücher der Bibel oder nur die, die in das Fenster der Bücherwahl eingegeben worden sind.
+
14. Fenster für Eingabe und Kapitel-Verzeichnis:
+ Eine Nummer des Kapitels kann man entweder im Fenster eingeben oder aus dem Verzeichnis wählen.
+
15. Fenster für Eingabe und Vers-Verzeichnis:
+ Eine Nummer des Verses kann man entweder im Fenster eingeben oder aus dem Verzeichnis wählen.
+ Beim Doppelklick auf den Vers im Verzeichnis, wird der Vers in das Fenster des Bildschirmes übertragen.
+
+

16. Block der Geschichte und der provisorischen Aufbewahrung:
+ In diesem Teil werden Verse, die zum Anzeigen gesendet wurden sowie + hinzugefügt wurden mifhilfe des "Hinzufügen" -Knopfes.

+
+
17. "Hinzufügen" -Knopf:
+ Beim Drücken des "Hinzufügen" -Knopfes werden die oben gewählten Verse in das Geschichte-Verzeichnis hinzugefügt.
+
18. "Löschen" -Knopf:
+ Beim Drücken des "Löschen" -Knopfes werden die gewählten Verse aus dem Geschichte-Verzeichnis gelöscht.
+
19. "Säubern" -Knopf:
+ Beim Drücken des "Säubern" -Knopfes wird das komplette Geschichte-Verzeichnis entfernt.
+
20. Geschichte-Verzeichnis:
+ Ein jeglicher Vers, der auf dem Bildschirm angezeigt wurde, wird in das Geschichte-Verzeichnis eingetragen + und bleibt dort bis zu seiner Entfernung. Beim Doppelklick auf den Vers, wird dieser auf dem Bildschirm angezeigt, + ohne der wiederholten Eintragung in das Geschichte-Verzeichnis.
+
+
Previous
Next
+ + diff --git a/help/showbible_ru.html b/help/showbible_ru.html new file mode 100644 index 0000000..d16be8a --- /dev/null +++ b/help/showbible_ru.html @@ -0,0 +1,129 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

2.2 Показ стихов из Библии

+

+ Софт Проектор может показывать одновременно только один стих из Библии. + Опция показа сразу нескольких стихов возможно появится в будущем. + Можно также показывать один и тот же стих сразу из двух разных Библий.

+

+ Для показа стиха:
+ 1. Выберите книгу Библии из списка (13). + Можно выбрать книгу также по фильтру (12) в окне над списком книг Библии.
+ 2. Выберите главу из списка, + либо задайте номер главы вручную в текстовом окошке над списком глав.
+ 3. Выберите стих из столбца со стихами, + либо задайте номер стиха вручную в текстовом окошке над столбцом со стихами.
+ 4. Нажмите кнопку "На экран". + После того как выбран нужный стих, можно нажать кнопку "На экран" + либо дважды щелкнуть мышью по стиху.

+
+

Bible Screen

+

1. Поиск по Библии:
+ Здесь можно искать стихи Библии по фразе или по словам.

+
+
2. Окно поиска по тексту:
+ Сюда вводятся слова/фразы для поиска. Окно поиска чувствительно к регистру, + а все знаки, кроме буквенно-цифровых, автоматически удаляются.
+
3. Начинается:
+ Поиск стихов, которые начинаются с заданного слова или фразы.
+
4. Содержит:
+ Поиск стихов, которые содержат заданное слово или фразу. + Одновременно находятся стихи, которые начинаются с этого же слова или фразы.
+
5. Кнопка "Поиск":
+ При ее нажатии осуществляется поиск по Библии и вывод результатов в нижнем окне.
+
6. Поиск по всей Библии:
+ Поиск осуществляется по всей Библии.
+
7. Поиск по выбранной книге:
+ Поиск осуществляется только по выбранной книге Библии.
+
8. Поиск по выбранной главе:
+ Поиск осуществляется только по выбранной главе.
+
9. Список найденных стихов:
+ В этом окне выводятся результаты поиска. Заданные для поиска слова или фразы обозначаются + красным цветом. Однако фразы, содержащие знаки пунктуации + или не алфавитно-номерные знаки не всегда обозначаются красным, хотя и будут + выведены в окно найденных стихов. + Например: заданная фраза "свет что" не обозначится красным цветом, + хотя поиск выдаст результат "свет, что".
+ Софт Проектор может выводить в результате поиска не более 281 стихов. + При этом под окном найденных стихов показывается их количество, а также указывается + превышение лимита, если он случается. При превышении лимита, + нужно изменить искомое слово или фразу, либо использовать другие опции поиска.
+ Двойной щелчок по стиху отсылает его в правое окно для показа на экране.
+
10. Кнопка "Скрыть найденное":
+ При ее нажатии исчезает окно с найденными стихами.
+
+ +

11. Блок просмотра Библии:
+ В этой части интерфейса можно просматривать и готовить стихи Библии + перед их выводом на экран.

+
+
12. Окно быстрого поиска:
+ Быстро найти место из Библии можно, если ввести в это окно + название книги, главу и стих, разделенные пробелами (" "). + При этом программа найдет нужный стих автоматически. + После того, как стих найден, нажмите "F5" или щелкните по кнопке "На экран".
+ Не обязательно вводить полное название книги, достаточно нескольких начальных букв, + например: мар для Марка. + Если у книги есть номер, то между номером и названием книги не нужен пробел, т.е. + для поиска 1 Коринфянам, нужно вводить не1 кор , + а 1кор . + Примеры правильного ввода для поиска: + для Даниила 3:12 - нужно ввести: да 3 12; + для 1 Фессалоникийцам 5:8 - нужно ввести: 1фес 5 8, и т.д.
+
13. Список книг:
+ Содержит либо список всех книг Библии, либо только тех, которые заданы в окне выбора книги.
+
14. Окно ввода и список глав:
+ Номер главы можно либо задать в окне, либо выбрать из списка.
+
15. Окно ввода и список стихов:
+ Номер стиха можно либо задать в окне, либо выбрать из списка.
+ Двойной щелчок по стиху в списке переносит его в окно вывода на экран.
+
+

16. Блок истории и временного хранения:
+ В этой части интерфейса содержатся стихи, которые были посланы на экран, + а также добавленные с помощью кнопки "Добавить".

+
+
17. Кнопка "Добавить":
+ С помощью кнопки "Добавить" выбранные выше стихи добавляются в список истории.
+
18. Кнопка "Удалить":
+ С помощью кнопки "Удалить" выбранные стихи удаляются из списка истории.
+
19. Кнопка "Очистить":
+ С помощью кнопки "Очистить" удаляется сразу весь список истории.
+
20 Список истории:
+ Всякий стих, показанный на экране, заносится в список истории + и находится там до его удаления. Двойной щелчок по стиху + выводит его на экран без повторного занесения в список.
+
+
Previous
Next
+ + diff --git a/help/showsongs.html b/help/showsongs.html new file mode 100644 index 0000000..2760d82 --- /dev/null +++ b/help/showsongs.html @@ -0,0 +1,114 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

2.3 Showing Songs

+

+ To show a song:
+ 1. Select a songbook (2). You may keep + songbook drop box stay at all songbook and use filter box + to help find the song. In order to use the song number entry filed (3), + a specific songbook needs to be selected.
+ 2. Select a song. To select a song, you may + just select a song from song title table (8). When a specific songbook + is selected, you may enter the number in the song number entry field or + in the filter filed.
+ 3. Click "Go Live" button. After you have + selected a song, clicking "Go Live" will show currently selected + verse/refrain in the song preview list. First item in the song preview + list will be always automatically selected when a song is selected. + Alternatively you may double click any verse/chorus from the preview + list and it will send current song to be shown and double clicked item + as current item.

+
+

Show Songs

+

1. Song Lookup Block:
+

+
+
2. Songbook Drop-Down Box:
+ Select which songbook to use. Selecting "All songbooks" will show all song + in song table (8) that are in the database. Selecting a particular songbook, + will filter out everything else and leave only songs from selected songbook.
+
3. Song Number Box:
+ Song number box is only enabled when a particular songbook is selected and + never when "All songbooks" is selected. Entering a number will only select a + song from song table but not filter anything out. It will set entire + songbook in the song table, sort song by the number and select entered song + number.
+
4. Filter Entry Field:
+ Entering filter text/phrase, will filter songs from song table that match + filter text/phrase.
+
5. Contains:
+ Will filter all matches that contain anywhere the filter text. Will not + search the body of the song, only titles and number.
+
6. Begins:
+ Filter all matches that start with filter text.
+
7. Exact Match:
+ Will filter out only the one that match entirely to the filter text. Is very + useful for song number. Sometime can be used instead of song number box(3).
+
8. Song Table:
+ Holds songs either all or filtered out songs. Selecting a song in the table + will show it in the preview list. Double-clicking, will add selected song to + playlist table.
+
+ +

9. Playlist Block:
+ Add and store songs in a playlist.

+
+
10. "Add" Button:
+ Add a song that is selected in the song table to playlist table. This button + is only enabled when a song is selected and in focus in the song table; + becomes disable when playlist table becomes focused.
+
11. "Remove" Button:
+ Remove a selected song from playlist table.
+
12. "Up" Button:
+ Move selected song up the list in the playlist table.
+
13. "Down" Button:
+ Move selected song down the list in the playlist table.
+
14. Playlist Table:
+ Holds playlist songs. Selecting a song in the table will show it in the + preview list. Double-clicking a song, will send the song to be shown on the + screen.
+
+

15. Preview Block:
+ In this are, you are able to preview the song and read the text of the song + before sending it live. Each time a different song is selected in the song + table or playlist table, preview will change to display selected song.
+ Clicking "Go Live" button will send current song in the preview to be shown + with currently selected verse to be displayed on screen. Double-clicking a + verse, will also send the song to live and double-clicked verse to be + displayed.

+
Previous
Next
+ + + diff --git a/help/showsongs_de.html b/help/showsongs_de.html new file mode 100644 index 0000000..5006f45 --- /dev/null +++ b/help/showsongs_de.html @@ -0,0 +1,107 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

2.3 Lieder anzeigen

+

+ Für Lieder anzeigen:
+ 1. Gesangbuch-Auswahl (2). Man kann alle Gesangbücher gleichzeitig + geöffnet halten und Lieder über den Filter wählen. Aber, um eine Nummer des Liedes in dem Fenster rechts (3), + einzugeben, muss ein bestimmtes Gesangbuch gewählt werden.
+ 2. Lied-Wahl. Für die Wahl eines Liedes kann man + das Verzeichnis benutzen (8). Wenn ein bestimmtes Gesangbuch gewählt worden ist, + so kann man eine Nummer des Liedes entweder in das Fenster mit den Nummern (rechts) oder + in das Fenster des Filters eingeben..
+ 3. Klicken Sie den "Anzeigen"-Knopf. Nachdem ein Lied + gewählt wurde, wird es in das Vorschau-Fenster eingetragen. Beim Drücken des "Anzeigen"-Knopfes, + wird der erste Vers/die erste Strophe des Liedes automatisch zum Anzeigen gesendet. + Falls es notwendig ist, eine(n) andere(n) Vers/Strophe zum Anzeigen bringen, müssen Sie + auf diese(n) Vers/Strophe im Vorschu-Fenster doppelklicken.

+
+

+ Show Song

+

1. Vorschau-Block der Lieder:
+

+
+
2. Drop-Down-Liste der Gesangbücher:
+ Wählen Sie ein bestimmtes Gesangbuch. Wenn die Option "Alle Gesangbücher" gewählt worden ist, werden + in dem Verzeichnis (8) alle Lieder, die in der Datenbank vorhanden sind, angezeigt. + Wenn ein bestimmtes Gesangbuch gewählt worden ist, werden in diesem Verzeichnis nur Lieder aus diesem Gesangbuch angezeigt.
+
3. Fenster der Lieder-Nummern:
+ Dieses Fenster wird nur dann aktiviert, wenn ein bestimmtes Gesangbuch gewählt worden ist, + und bleibt grau, wenn die Option "Alle Gesangbücher" gewählt worden ist. Beim Einfügen einer Nummer in dieses Fenster, + wird das volle Lieder-Verzeichnis des Gesangbuches, in dem das Lied mit der eingefügten Nummer markiert ist, angezeigt.
+
4. Filter-Fenster:
+ Hiehin wird ein(e) Wort/Phrase des gesuchten Liedes eingefügt. In dem Verzeichnis werden nur Lieder angezeigt, + die dem eingefügem Text entsprechen.
+
5. Enthält-Knopf:
+ Werden alle Lieder angezeigt, wo der eingegebene Text vorkommt. + Die Suche wird nur nach Nummern und den Namen der Lieder durchgefüht, nicht nach dem ganzen Text.
+
6. Beginnt-Knopf:
+ Werden alle Lieder angezeigt, die mit dem eingegebenem Text anfangen.
+
7. Genaue Übereinstimmung-Knopf:
+ Werden nur Lieder angezeigt, die mit dem eingegebenem Text genau übereinstimmen. Diese Option + ist sehr hilfreich für die Suche einer bestimmten Nummer des Liedes. Dies kann man statt Nummer-Fenster (3) benutzen.
+
8. Lieder-Verzeichnis:
+ Kann entweder einen vollen Verzeichnis der Lieder oder ein Such-Ergebnis enthalten. Beim Drücken auf den Namen + eines Liedes in diesem Verzeichnis, wird dieses in die Vorschau-Liste gesendet. Beim Doppelklick wird dieses Lied in die "Abspiel"-Liste (Playlist) + eingefügt.
+
+ +

9. "Abspiel"-Verzeichnis:
+ Hier werden die Lieder in das "Abspiel"-Verzeichnis hinzugefügt und werden hier gespeichert.

+
+
10. "Hinzufügen"-Knopf:
+ Beim Drücken auf diesen Knopf, wird das gewählte Lied in die "Abspiel"-Liste hinzugefügt. Dieser Knopf + ist nur dann aktiviert, wenn das Lied in dem Lieder-Verzeichnis gewählt wurde und diese List sich in dem Fokus befindet; + sie wird in grau makriert, wenn die "Abspiel"-Liste in dem Fokus sich befindet.
+
11. "Löschen"-Knopf:
+ Löscht das gewählte Lied aus der "Abspiel"-Liste.
+
12. "Nach oben"-Knopf:
+ Versetzt das Lied in der "Abspiel"-Liste nach oben.
+
13. "Nach unten"-Knopf:
+ Versetzt das Lied in der "Abspiel"-Liste nach unten.
+
14. "Abspiel"-Liste:
+ Enthält Lieder, die zum Anzeigen auf dem Bildschirm bestimmt wurden. + Beim Drücken auf den Namen des Liedes in dieser Liste, wird dieses in das Vorschau-Fenster gesendet. + Doppelklick bringt das Lied zum Anzeigen auf dem Bildschirm.
+
+

15. Vorschau-Block:
+ In diesem Teil kann man ein Lied durchschauen und -lesen, bevor es auf dem Bildschirm angezeigt wird. + Hierhin werden Lieder gesendet und automatisch ersetzt, die aus dem Lieder-Verzeichnis oder der "Abspiel"-Liste gewählt wurden.
+ Beim Drücken auf den "Anzeigen"-Knopf wird der gewählte Vers auf den Bildschirm gesendet. + Das Gleiche macht auch der Doppelklick auf den gewählten Vers.

+
Previous
Next
+ + + diff --git a/help/showsongs_ru.html b/help/showsongs_ru.html new file mode 100644 index 0000000..7bfb82f --- /dev/null +++ b/help/showsongs_ru.html @@ -0,0 +1,105 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

2.3 Показ песен

+

+ Для показа песен:
+ 1. Выбор сборника (2). + Можно держать открытыми сразу все сборники и выбирать песни с помощью фильтра. + Но для того чтобы задавать номер песен в окошке справа, нужно выбрать конкретный сборник.
+ 2. Выбор песни. + Для выбора песни можно воспользоваться списком (8). + Если выбран конкретный сборник, то можно ввести номер песни + либо в окошко с номерами (справа), либо в окошко фильтра.
+ 3. Кнопка "На экран". + После того как песня выбрана, она заносится в окно предосмотра. Щелчок по кнопке + "На экран" автоматически выводит для показа первый куплет песни. + Если необходимо вывести на экран другой куплет или припев, нужно дважды щелкнуть + по этому куплету в окне предварительного просмотра.

+
+

Show Songs

+

1. Блок просмотра песен:
+

+
+
2. Выпадающий список сборников:
+ Выберите конкретный сборник. Если выбрана опция "Все сборники", в списке (8) будут показаны + все песни, имеющиеся в базе данных. + Если выбран конкретный сборник, в этом списке будут показаны только песни с данного сборника.
+
3. Окошко номеров песен:
+ Это окошко активизируется только тогда, когда выбран конкретный сборник, и остается серым, + если выбрана опция "Все сборники". При вводе номера в это окошко, выводится + полный список песен сборника, в котором выделяется песня с заданным номером.
+
4. Окно фильтра:
+ Сюда вводится текст или фраза искомой песни. В списке + будут показаны лишь песни, соответствующие заданному тексту.
+
5. Кнопка "Содержит":
+ Выводятся все песни, где встречается заданный текст. + Поиск производится только по номерам и названиям песен, но не по всему тексту.
+
6. Кнопка "Начинается":
+ Выводятся все песни, которые начинаются по заданному тексту.
+
7. Кнопка "Точное соответствие":
+ Выводятся только песни, точно соответствующие заданному тексту. Эта опция особенно полезна + при поиске конкретного номера песни. Ее можно использовать вместо номерного окошка (3).
+
8. Список песен:
+ Может содержать либо полный список песен, либо результаты поиска. Щелчок по названию песни в этом списке + отсылает ее в список предосмотра. Двойной щелчок добавляет песню в список воспроизведения (плейлист).
+
+ +

9. Список воспроизведения:
+ Здесь песни заносятся в список воспроизведения и там сохраняются.

+
+
10. Кнопка "Добавить":
+ При ее нажатии, выбранная песня добавляется в список воспроизведения. + Эта кнопка активизирована только тогда, когда песня выбрана в списке песен и этот список находится в фокусе; + она становится серой, если в фокусе находится список воспроизведения.
+
11. Кнопка "Удалить":
+ Удаляет выбранную песню из списка воспроизведения.
+
12. Кнопка "Вверх":
+ Перемещает песню вверх в списке воспроизведения.
+
13. Кнопка "Вниз":
+ Перемещает песню вниз в списке воспроизведения.
+
14. Список воспроизведения:
+ Содержит песни предназначенные для вывода на экран. Щелчок по названию песни в этом списке + отсылает ее в окно предварительного просмотра. Двойной щелчок выводит ее на экран.
+
+

15. Блок предосмотра:
+ В этой части интерфейса можно просматривать и прочитывать песню + перед выводом ее на экран. Сюда выводятся и автоматически сменяют друг друга + те песни, которые выбираются в списке песен или в списке воспроизведения.
+ Щелчок по кнопке "На экран" отсылает выбранный куплет песни на экран. + То же самое делает двойной щелчок по выбранному куплету.

+
Previous
Next
+ + + diff --git a/help/songformat.html b/help/songformat.html new file mode 100644 index 0000000..5efede2 --- /dev/null +++ b/help/songformat.html @@ -0,0 +1,118 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.1.2 Song Format

+

Song format is REALLY IMPORTANT when adding a song or editing a song. Make sure that you keep proper song format. If the song format will not be kept, it may not show the song properly and + may cause program to crash.

+

Stanza Title.
+ Each stanza must have a stanza title. SoftProjector support three + different stanza titles: Verse Block, Refrain Block and Slide Block + (listed below). Stanza titles can be either in English or Russian and + must start from a beginning of a new line and must be capitalized.  After the stanza title (on the same line), + a stanza number or any text can be entered.

+
+
Verse Block. Block for song verses.
+
Verse, &Verse
+ Куплет, &Куплет
+ +
Refrain Block. + Will be automatically shown after each verse block and will not be shown after + slide block. If there is more than one refrain block, then the second refrain + block will replace the first one when it gets to it.
+
Chorus, &Chorus, + Refrain, &Refrain,
+ Припев, &Припев
+ +
Slide Block. This stanza block is for stanzas that is other than + verse or refrain. It will be shown only once and + refrain block will not follow automatically after. If refrain + block is needed after slide block, please add it manual.
+
Slide, Insert, + Intro, Ending, +
+ Вставка, Вступление, + Окончание
+ + +
+

+Special Stanza Blocks
+ Verse block and refrain block, each have special continuing block. Sometime a +verse or refrain is too large to put it into a one slide, adding & to next +verse/refrain block will solve the problem. An "&" sing in front of +verse/refrain title means that it is part of the block above it and the two +block will act as one. See examples below.
+

+

Some Examples
+ Example 1 - as Edited.Verse1, + Refrain, Verse2, + Verse3.
+ Example 1 - Shown.Verse1, + Refrain, Verse2,Refrain, + Verse3, + Refrain.
+ Example 2 - as Edited.Verse1, + Refrain, Verse2, Insert, + Verse3.
+ Example 2 - Shown.Verse1, + Refrain, Verse2,Refrain, + Insert,Verse3, + Refrain.
+ Example 3 - as Edited.Verse1, + Refrain1, Verse2, + Verse3, Refrain2.
+ Example 3 - Shown.Verse1, + Refrain1, Verse2,Refrain1, + Verse3, + Refrain2.
+ Example 4 - as Edited.Verse1a, &Verse1b, + Refrain, Verse2a, &Verse2b, + Verse3a, &Verse3b.
+ Example 4 - Shown.Verse1a, + Verse1b, + Refrain, Verse2a, Verse2b, + Refrain, Verse3a, Verse3b,Refrain.
+ Example 5 - as Edited.Verse1a, &Verse1b, + Refrain-a, &Refrain-b, + Verse2a, &Verse2b, + Verse3a, &Verse3b.
+ Example 5 - Shown.Verse1a, + Verse1b, Refrain-a, &Refrain-b, + + Verse2a, Verse2b, + Refrain-a, &Refrain-b, + + Verse3a, Verse3b, Refrain-a, &Refrain-b,
+

+
Previous
Next
+ \ No newline at end of file diff --git a/help/songformat_de.html b/help/songformat_de.html new file mode 100644 index 0000000..6e6e6f2 --- /dev/null +++ b/help/songformat_de.html @@ -0,0 +1,122 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.1.2 Liedtext formatieren

+

Beim Hinzufügen oder Bearbeiten der Lieder ist es SEHR WICHTIG!auf den eingegebenen Format zu achten. Beim Nichtbeachten des Formats, kann es vorkommen, dass das Lied auf dem Bildschirm nicht richtig angezegt wird. + Dies kann zu einem Programm-Absturz bringen.

+

Name der Strophe.
+ Jede Strophe muss einen eigenen Namen haben. softProjector unterstützt drei Varianten für Strophen-Namen: + Verse-Block, Refrain-Block und Slide-Block (siehe unten). Der Strophen-Name kann mit kyrillischen oder lateinischen Buchstaben + eingegeben werden; und muss mit Großbuchstabe anfangen. Nach dem Strophen-Namen, in der gleichen Zeile, kann auch eine Strophen-Nummer + oder ein anderer benötigter Text eingegeben werden.

+
+
Verse-Block. Feld für Lied-Strophen.
+
Verse, &Verse
+ Куплет, &Куплет
+ +
Refrain-Block. + Der Refrain erscheint automatisch nach jeder Lied-Strophe, jedoch nicht nach dem Slide. + Falls mehrere Refrains vorhanden sind, so wird der zweite den ersten ersetzen, + wenn es soweit kommt.
+
Chorus, &Chorus, + Refrain, &Refrain,
+ Припев, &Припев
+ +
Slide-Block. Dieses Feld ist für Strophen/Verse bestimmt, + die nicht zu der Strophe/Refrain-Kategorie gehören. Dieses wird nur einmal angezeigt, und nach ihm folgt + Refrain-Block falls dieser vorhanden ist. Wenn der Refrain-Block nach dem Slide-Block folgen soll, + so muss dieses manuell durchgeführt werden.
+
Slide, Insert, + Intro, Ending, +
+ Вставка, Вступление, + Окончание
+ + +
+

+Block für lange Strophen
+ Die Felder für die Strophen und Refrains haben noch eine zusätzliche Möglichkeit für eine Fortsetzung. Falls die Strophe +oder der Refrain zu lang sind und passen nicht auf eine Slide-Seite, kann man dieses Problem mit dem Hinzufügen des Zeichens & zum nächsten +Verse/Refrain, lösen. Das Zeichen "&" vor dem Verse/Refrain bedeutet seine Zugehörigkeit an den vorigen +Verse/Refrain. Und beide Verse/Refrains werden als einziger angezeigt. +Siehe Beispiele unten.
+

+

Einige Beispiele
+ Beispiel 1 - Wird geschrieben:Verse1, + Refrain, Verse2, + + Verse3.
+ Beispiel 1 - Wird angezeigt:Verse1, + Refrain, Verse2,Refrain, + Verse3, + Refrain.
+ Beispiel 2 - Wird geschrieben:Verse1, + Refrain, Verse2, Anzeige, + Verse3.
+ Beispiel 2 - Wird angezeigt:Verse1, + Refrain, Verse2,Refrain, + Anzeige,Verse3, + Refrain.
+ Beispiel 3 - Wird geschrieben:Verse1, + Refrain1, Verse2, + + Verse3, Refrain2.
+ Beispiel 3 - Wird angezeigt:Verse1, + Refrain1, Verse2,Refrain1, + Verse3, + Refrain2.
+ Beispiel 4 - Wird geschrieben:Verse1a, + &Verse1b, + Refrain, Verse2a, &Verse2b, + Verse3a, &Verse3b.
+ Beispiel 4 - Wird angezeigt:Verse1a, + Verse1b, + Refrain, Verse2a, + Verse2b, + Refrain, Verse3a, + Verse3b,Refrain.
+ Beispiel 5 - Wird geschrieben:Verse1a, &Verse1b, + Refrain-a, &Refrain-b, + Verse2a, &Verse2b, + Verse3a, &Verse3b.
+ Beispiel 5 - Wird angezeigt:Verse1a, + Verse1b, Refrain-a, &Refrain-b, + + Verse2a, Verse2b, + Refrain-a, &Refrain-b, + + Verse3a, Verse3b, Refrain-a, &Refrain-b,
+

+
Previous
Next
+ \ No newline at end of file diff --git a/help/songformat_ru.html b/help/songformat_ru.html new file mode 100644 index 0000000..9ed357c --- /dev/null +++ b/help/songformat_ru.html @@ -0,0 +1,110 @@ + + + + +Справочник по Софт Проектору + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

3.1.2 Форматирование текста песен

+

При добавлении или редактировании песен ОЧЕНЬ ВАЖНО + соблюдать заданный формат. При несоблюдении формата песня может быть выведена на экран неправильно, + и может случиться сбой в работе программы.

+

Название куплета.
+ Каждый куплет должен иметь свое название. Софт Проектор поддерживает три варианта названий для куплета: + Куплет, Припев и Слайд (см. ниже). Название куплета может быть написано кириллицей или латиницей + и должно начинаться с большой буквы. После названия куплета, на той же строчке, можно ввести номер куплета или другой нужный + текст.

+
+
Поле для куплета. + Поле для куплетов песен.
+
Verse, &Verse
+ Куплет, &Куплет
+ +
Поле для припева. + Припев появляется автоматически после каждого куплета, однако он не появляется после слайда. + Если имеется несколько припевов, то второй припев заменит первый, когда до него дойдет очередь.
+
Chorus, &Chorus, + Refrain, &Refrain,
+ Припев, &Припев
+ +
Поле для слайда. Это поле предназначено для куплетов (стихов) не относящихся к + категории куплета или припева. Оно показывается один раз, и за ним следует + поле для припева, если таковой имеется. Если блок припева необходимо вставить после блока слайдов, нужно ввести его вручную.
+
Slide, Insert, + Intro, Ending, +
+ Слайд,Вставка, Вступление, + Окончание
+ + +
+

+Поля для длинных куплетов
+ Поля для куплетов и припева имеют специальную возможность для продолжения. Если куплет или припев слишком длинный и не помещается в один слайд, + можно разрешить проблему путем добавления знака & к следующему куплету (припеву). + Знак "&" перед куплетом (припевом) означает его принадлежность к предыдущему куплету, и оба куплета будут показаны как один. См. примеры ниже.
+

+

Некоторые + примеры
+ Пример 1 - Пишется:Куплет1, + Припев, Куплет2, + Куплет3.
+ Пример 1 - Показыватся:Куплет1, + Припев, Куплет2,Припев, Куплет3, + Припев.
+ Пример 2 - Пишется:Куплет1, + Припев, Куплет2, Вставка, Куплет3.
+ Пример 2 - Показыватся:Куплет1, + Припев, Куплет2,Припев, + Вставка,Куплет3, + Припев.
+ Пример 3 - Пишется:Куплет1, + Припев1, Куплет2, + Куплет3, Припев2.
+ Example 3 - Показыватся:Куплет1, + Припев1, Куплет2,Припев1, Куплет3, + Припев2.
+ Example 4 - Пишется:Куплет1a, &Куплет1b, + Припев, Куплет2a, &Куплет2b, Куплет3a, &Куплет3b.
+ Example 4 - Показыватся:Куплет1a, Куплет1b, + Припев, Куплет2a, Куплет2b, + Припев, Куплет3a, Куплет3b, Припев.
+ Example 5 - Пишется:Куплет1a, &Куплет1b, + Припев-a, &Припев-b, Куплет2a, &Куплет2b, + Куплет3a, &Куплет3b.
+ Example 5 - Показыватся:Куплет1a, Куплет1b, Припев-a, Припев-b, Куплет2a, Куплет2b, + Припев-a, Припев-b, Куплет3a, Куплет3b, Припев-a, Припев-b.
+

+
Previous
Next
+ \ No newline at end of file diff --git a/help/songsettings.html b/help/songsettings.html new file mode 100644 index 0000000..cb1b052 --- /dev/null +++ b/help/songsettings.html @@ -0,0 +1,45 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

5.3 Song Settings

+

+ Song Settings
+

+

1. Show stanza title: will show stanza title on + display screen on the top left corner

+

2. Show song key: will show song key on the display + screen on the top right corner

+

3. Show song number: will show song number on the display + screen on the top right corner after the song key if used

+
Previous
Next
+ \ No newline at end of file diff --git a/help/songsettings_de.html b/help/songsettings_de.html new file mode 100644 index 0000000..14d0ef1 --- /dev/null +++ b/help/songsettings_de.html @@ -0,0 +1,45 @@ + + + + +softProjector Hilfe + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

5.3 Lied-Einstellungen

+

+ Song Settings
+

+

1. Anzeigen der Nummer des Verses/der Strophe: die Nummer wird + in der linken oberen Ecke des Bildschirmes angezeigt.

+

2. Anzeigen der Tonart des Liedes: die Tonart wird + in der rechten oberen Ecke des Bildschirmes angezeigt.

+

3. Anzeigen der Nummer des Liedes: die Nummer wird + in der äußersten rechten Ecke des Bildschirmes, hinter dem Zeichen der Tonart (falls sie angegeben ist) angezeigt.

+
Previous
Next
+ \ No newline at end of file diff --git a/help/songsettings_ru.html b/help/songsettings_ru.html new file mode 100644 index 0000000..707470e --- /dev/null +++ b/help/songsettings_ru.html @@ -0,0 +1,42 @@ + + + + +softProjector Help + + + + + + + + + + + + + + + + + + + + + + + +
+
+ English + Russian + German
+
softProjector Help
Previous
Next

5.3 Настройки для песен

+

+ Song Settings
+

+

1. Показывать номер куплета: — номер будет показан в левом верхнем углу экрана.

+

2. Показывать тональность песни: — тональность будет показана в правом верхнем углу экрана.

+

3. Показывать номер песни: — номер будет показан в крайнем правом углу экрана, за знаком тональности (если она указана).

+
Previous
Next
+ \ No newline at end of file diff --git a/help/sphelp.css b/help/sphelp.css new file mode 100644 index 0000000..d15d1cb --- /dev/null +++ b/help/sphelp.css @@ -0,0 +1,128 @@ +body +{ + background: #114E7B url('images/bg.jpg') no-repeat top center; + color: #666666; + font: normal 14px Arial, Helvetica, sans-serfi; + position: relative; +} + +img{ + border:none; + padding:1px; +} +.fixed{ + display:block; + min-height:1%; +} +*html .fixed{ + height:1%; +} +.fixed:after{ + content:"."; + display:block; + height:0; + clear:both; + visibility:hidden; +} + + +/* TYPES */ +#header{ + width: 90%; + padding: 0px 30px; + margin: 0 auto; + border: none; + color: #C0C0C0; +} +#header a{ + color: #C0C0C0; +} + +#content{ + background-color:#FFF; + width:90%; + color:#383F47; + min-height:300px; + padding:0px 30px; + margin: 0 auto; + line-height:20px; + border-radius:10px; +} +#content h2{ + padding:10px 5px; + font-size: 24px; + text-align:center; +} +#content h3{ + padding:6px 4px; + font-size: 18px; +} +#content h4{ + padding:5px 0px 0px 0px; + font-size: 16px; + font-weight:bold; +} + + +#main{ + width: 75%; + float: right; + padding: 0; + clear: none; +} +#main a { + color:#114E7B ; +} + +#mainbody{ + padding: 30px; +} +#mainbody a { + color:#114E7B ; +} + + +#menu{ + width:25%; + float:left; + padding:0; + line-height:24px; +} +#menu a { + color:#383F47; + text-decoration:none; +} +#menu a:hover{ + color:#114E7B; + text-decoration: underline; +} +#menu a.current{ + text-decoration: underline; + color: #114E7B; + font-weight: bold; +} + +/* CLASSES */ +.cap{ + font-size:12px; + font-style:italic; +} +.verse{ + background-color: #FFFF99; + color: #FF0000; +} + +.chorus{ + font-style: italic; + background-color: #d4f01c; + color: #000090; +} + +.insert{ + background-color: #e08c00; + color: #800080; +} +.imglist{ + list-style:none; +} + diff --git a/helpdialog.cpp b/helpdialog.cpp new file mode 100644 index 0000000..9e6d31a --- /dev/null +++ b/helpdialog.cpp @@ -0,0 +1,53 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include +#include "helpdialog.h" +#include "ui_helpdialog.h" + +HelpDialog::HelpDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::HelpDialog) +{ + ui->setupUi(this); + QString d = QString(QDir::separator()); +// ui->webViewHelp->load(QString(".%1help%2index.html").arg(d).arg(d)); +} + +HelpDialog::~HelpDialog() +{ + delete ui; +} + +void HelpDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void HelpDialog::on_close_pushButton_clicked() +{ + close(); +} diff --git a/helpdialog.h b/helpdialog.h new file mode 100644 index 0000000..9e144c9 --- /dev/null +++ b/helpdialog.h @@ -0,0 +1,48 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef HELPDIALOG_H +#define HELPDIALOG_H + +#include +#include +//#include + +namespace Ui { + class HelpDialog; +} + +class HelpDialog : public QDialog { + Q_OBJECT + Q_DISABLE_COPY(HelpDialog) +public: + explicit HelpDialog(QWidget *parent = 0); + virtual ~HelpDialog(); + +protected: + virtual void changeEvent(QEvent *e); + +private: + Ui::HelpDialog *ui; + +private slots: + void on_close_pushButton_clicked(); +}; + +#endif // HELPDIALOG_H diff --git a/helpdialog.ui b/helpdialog.ui new file mode 100644 index 0000000..1ac8596 --- /dev/null +++ b/helpdialog.ui @@ -0,0 +1,48 @@ + + + HelpDialog + + + + 0 + 0 + 600 + 640 + + + + softProjector Help + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Close + + + Ctrl+Q + + + + + + + + + + diff --git a/highlight.cpp b/highlight.cpp new file mode 100644 index 0000000..7f8702a --- /dev/null +++ b/highlight.cpp @@ -0,0 +1,197 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "highlight.h" + +Highlight::Highlight(QTextDocument *parent) + : QSyntaxHighlighter(parent) +{ + HighlightingRule rule; + QStringList patterns; + + // Verse formating + verseFormat.setForeground(Qt::red); + verseFormat.setBackground(Qt::yellow); + patterns << "^Verse[^\n]*" << "^&Verse[^\n]*" + << QString::fromUtf8("^Куплет[^\n]*") << QString::fromUtf8("^&Куплет[^\n]*") + << QString::fromUtf8("^Strophe[^\n]*") << QString::fromUtf8("^&Strophe[^\n]*") + << QString::fromUtf8("^Verš[^\n]*") << QString::fromUtf8("^&Verš[^\n]*"); + foreach (const QString &pattern, patterns) + { + rule.pattern = QRegExp(pattern); + rule.format = verseFormat; + highlightingRules.append(rule); + } + + patterns.clear(); + + // Chorus formating + chorusFormat.setFontItalic(true); + chorusFormat.setForeground(Qt::darkBlue); + chorusFormat.setBackground(QColor(212,240,28,255)); + patterns << "^Chorus[^\n]*" << "^&Chorus[^\n]*" + << QString::fromUtf8("^Sbor[^\n]*") << QString::fromUtf8("^&Sbor[^\n]*") + << "^Refrain[^\n]*" << "^&Refrain[^\n]*" + << QString::fromUtf8("^Припев[^\n]*") << QString::fromUtf8("^&Припев[^\n]*") + << QString::fromUtf8("^Приспів[^\n]*") << QString::fromUtf8("^&Приспів[^\n]*") + << QString::fromUtf8("^Refrén[^\n]*") << QString::fromUtf8("^&Refrén[^\n]*"); + foreach (const QString &pattern, patterns) + { + rule.pattern = QRegExp(pattern); + rule.format = chorusFormat; + highlightingRules.append(rule); + } + + patterns.clear(); + + // Vsavka formating + vstavkaFormat.setForeground(Qt::darkMagenta); + vstavkaFormat.setBackground(QColor(255,140,0,255)); + patterns << "^Slide[^\n]*" << "^Insert[^\n]*" + << "^Intro[^\n]*" << "^Ending[^\n]*" + << QString::fromUtf8("^Слайд[^\n]*") << QString::fromUtf8("^Вставка[^\n]*") + << QString::fromUtf8("^Вступление[^\n]*") << QString::fromUtf8("^Окончание[^\n]*") + << QString::fromUtf8("^Закінчення[^\n]*") + << QString::fromUtf8("^Dia[^\n]*") << QString::fromUtf8("^Einfügung[^\n]*") + << QString::fromUtf8("^Einleitung[^\n]*") << QString::fromUtf8("^Ende[^\n]*") + << QString::fromUtf8("^Snímek[^\n]*") << QString::fromUtf8("^Vložka[^\n]*") + << QString::fromUtf8("^Úvod[^\n]*") << QString::fromUtf8("^Závěr[^\n]*"); + foreach (const QString &pattern, patterns) + { + rule.pattern = QRegExp(pattern); + rule.format = vstavkaFormat; + highlightingRules.append(rule); + } +} + +void Highlight::highlightBlock(const QString &text) +{ + foreach (const HighlightingRule &rule, highlightingRules) + { + QRegExp expression(rule.pattern); + int index = expression.indexIn(text); + while (index >= 0) + { + int length = expression.matchedLength(); + setFormat(index, length, rule.format); + index = expression.indexIn(text, index + length); + } + } + + setCurrentBlockState(0); +} + +// *** Announcement Editor Highlighter + +HighlightAnnounce::HighlightAnnounce(QTextDocument *parent) + : QSyntaxHighlighter(parent) +{ + HighlightingRule rule; + QStringList patterns; + + // Verse formating + announceFormat.setForeground(Qt::red); + announceFormat.setBackground(Qt::yellow); + patterns << "^Announce[^\n]*" << "^Slide[^\n]*" + << QString::fromUtf8("^Объявление[^\n]*") << QString::fromUtf8("^Слайд[^\n]*") + << QString::fromUtf8("^Оголошення[^\n]*") + << QString::fromUtf8("^Ankündigung[^\n]*") << QString::fromUtf8("^Dia[^\n]*") + << QString::fromUtf8("^Oznámení[^\n]*") << QString::fromUtf8("^Snímek[^\n]*"); + foreach (const QString &pattern, patterns) + { + rule.pattern = QRegExp(pattern); + rule.format = announceFormat; + highlightingRules.append(rule); + } +} + +void HighlightAnnounce::highlightBlock(const QString &text) +{ + foreach (const HighlightingRule &rule, highlightingRules) + { + QRegExp expression(rule.pattern); + int index = expression.indexIn(text); + while (index >= 0) + { + int length = expression.matchedLength(); + setFormat(index, length, rule.format); + index = expression.indexIn(text, index + length); + } + } + + setCurrentBlockState(0); +} + +// *** Highligting for search results *** +HighlightSearch::HighlightSearch(QTextDocument *parent) + : QSyntaxHighlighter(parent) +{ +} + +void HighlightSearch::highlightBlock(const QString &text) +{ + foreach (const HighlightingRule &rule, highlightingRules) + { + QRegExp expression(rule.pattern); + int index = expression.indexIn(text); + while (index >= 0) + { + int length = expression.matchedLength(); + setFormat(index, length, rule.format); + index = expression.indexIn(text, index + length); + } + } + + setCurrentBlockState(0); +} + +void HighlightSearch::setHighlightText(QString text) +{ + HighlightingRule rule; + highlightingRules.clear(); + resultFormat.setForeground(Qt::red); + rule.pattern = QRegExp(text,Qt::CaseInsensitive); + rule.format = resultFormat; + highlightingRules.append(rule); +} + +/**********************************************/ +/**** Class for higlighting search results ****/ +/**********************************************/ +HighlighterDelegate::HighlighterDelegate(QObject *parent) + : QItemDelegate(parent) +{ + textDocument = new QTextDocument(this); + highlighter = new HighlightSearch(textDocument); +} + +void HighlighterDelegate::drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QString &text) const +{ + Q_UNUSED(option); + textDocument->setDocumentMargin(0); + textDocument->setPlainText(text); + + QPixmap pixmap(rect.size()); + pixmap.fill(Qt::transparent); + QPainter p(&pixmap); + + textDocument->drawContents(&p); + + painter->drawPixmap(rect, pixmap); +} diff --git a/highlight.h b/highlight.h new file mode 100644 index 0000000..ad224d9 --- /dev/null +++ b/highlight.h @@ -0,0 +1,109 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef HIGHLIGHT_H +#define HIGHLIGHT_H + +#include +#include +#include +#include + +class Highlight : public QSyntaxHighlighter +{ + Q_OBJECT + +public: + Highlight(QTextDocument *parent = 0); + +protected: + void highlightBlock(const QString &text); + +private: + struct HighlightingRule + { + QRegExp pattern; + QTextCharFormat format; + }; + QVector highlightingRules; + + QTextCharFormat verseFormat, chorusFormat, vstavkaFormat; +}; + +// *** Announcement editor highlighter +class HighlightAnnounce : public QSyntaxHighlighter +{ + Q_OBJECT + +public: + HighlightAnnounce(QTextDocument *parent = 0); + +protected: + void highlightBlock(const QString &text); + +private: + struct HighlightingRule + { + QRegExp pattern; + QTextCharFormat format; + }; + QVector highlightingRules; + + QTextCharFormat announceFormat; +}; + +// *** Highligting for search results *** +class HighlightSearch : public QSyntaxHighlighter +{ + Q_OBJECT + +public: + HighlightSearch(QTextDocument *parent = 0); + void setHighlightText(QString text); + +protected: + void highlightBlock(const QString &text); + +private: + struct HighlightingRule + { + QRegExp pattern; + QTextCharFormat format; + }; + QVector highlightingRules; + QTextCharFormat resultFormat; +}; + +class HighlighterDelegate: public QItemDelegate +{ + Q_OBJECT + +public: + HighlighterDelegate(QObject *parent = 0); + HighlightSearch *highlighter; + +protected: + void drawDisplay(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QString &text) const; + +private: + QTextDocument *textDocument; + +}; + +#endif // HIGHLIGHT_H diff --git a/icons/ExpandSmall.png b/icons/ExpandSmall.png new file mode 100644 index 0000000..ec13bed Binary files /dev/null and b/icons/ExpandSmall.png differ diff --git a/icons/FitToScreen.png b/icons/FitToScreen.png new file mode 100644 index 0000000..7a6e0a7 Binary files /dev/null and b/icons/FitToScreen.png differ diff --git a/icons/FitToScreenByExpanding.png b/icons/FitToScreenByExpanding.png new file mode 100644 index 0000000..5e7f2c5 Binary files /dev/null and b/icons/FitToScreenByExpanding.png differ diff --git a/icons/aboveText.png b/icons/aboveText.png new file mode 100644 index 0000000..8c05a3b Binary files /dev/null and b/icons/aboveText.png differ diff --git a/icons/add.png b/icons/add.png new file mode 100644 index 0000000..ba3e0eb Binary files /dev/null and b/icons/add.png differ diff --git a/icons/add_songbook.png b/icons/add_songbook.png new file mode 100644 index 0000000..49badf4 Binary files /dev/null and b/icons/add_songbook.png differ diff --git a/icons/alingBottom.png b/icons/alingBottom.png new file mode 100644 index 0000000..e572b09 Binary files /dev/null and b/icons/alingBottom.png differ diff --git a/icons/alingCenter.png b/icons/alingCenter.png new file mode 100644 index 0000000..ad3fabb Binary files /dev/null and b/icons/alingCenter.png differ diff --git a/icons/alingLeft.png b/icons/alingLeft.png new file mode 100644 index 0000000..43a8760 Binary files /dev/null and b/icons/alingLeft.png differ diff --git a/icons/alingMiddle.png b/icons/alingMiddle.png new file mode 100644 index 0000000..d96a71d Binary files /dev/null and b/icons/alingMiddle.png differ diff --git a/icons/alingRight.png b/icons/alingRight.png new file mode 100644 index 0000000..726c5d0 Binary files /dev/null and b/icons/alingRight.png differ diff --git a/icons/alingTop.png b/icons/alingTop.png new file mode 100644 index 0000000..91854dc Binary files /dev/null and b/icons/alingTop.png differ diff --git a/icons/announce.png b/icons/announce.png new file mode 100644 index 0000000..830f6e8 Binary files /dev/null and b/icons/announce.png differ diff --git a/icons/announce_copy.png b/icons/announce_copy.png new file mode 100644 index 0000000..a071ff3 Binary files /dev/null and b/icons/announce_copy.png differ diff --git a/icons/announce_delete.png b/icons/announce_delete.png new file mode 100644 index 0000000..610f1d4 Binary files /dev/null and b/icons/announce_delete.png differ diff --git a/icons/announce_edit.png b/icons/announce_edit.png new file mode 100644 index 0000000..3fa9edf Binary files /dev/null and b/icons/announce_edit.png differ diff --git a/icons/announce_new.png b/icons/announce_new.png new file mode 100644 index 0000000..00aab52 Binary files /dev/null and b/icons/announce_new.png differ diff --git a/icons/apply_to_all.png b/icons/apply_to_all.png new file mode 100644 index 0000000..a713488 Binary files /dev/null and b/icons/apply_to_all.png differ diff --git a/icons/base-22x22-actions-application-exit.png b/icons/base-22x22-actions-application-exit.png new file mode 100644 index 0000000..ebe3b9c Binary files /dev/null and b/icons/base-22x22-actions-application-exit.png differ diff --git a/icons/belowText.png b/icons/belowText.png new file mode 100644 index 0000000..69fae20 Binary files /dev/null and b/icons/belowText.png differ diff --git a/icons/bibleHistoryDelete.png b/icons/bibleHistoryDelete.png new file mode 100644 index 0000000..c08f45e Binary files /dev/null and b/icons/bibleHistoryDelete.png differ diff --git a/icons/book.png b/icons/book.png new file mode 100644 index 0000000..5471158 Binary files /dev/null and b/icons/book.png differ diff --git a/icons/bottomOfScreen.png b/icons/bottomOfScreen.png new file mode 100644 index 0000000..05ea800 Binary files /dev/null and b/icons/bottomOfScreen.png differ diff --git a/icons/clear.png b/icons/clear.png new file mode 100644 index 0000000..3a1ca63 Binary files /dev/null and b/icons/clear.png differ diff --git a/icons/common.png b/icons/common.png new file mode 100644 index 0000000..a713488 Binary files /dev/null and b/icons/common.png differ diff --git a/icons/controlExit.png b/icons/controlExit.png new file mode 100644 index 0000000..37a9333 Binary files /dev/null and b/icons/controlExit.png differ diff --git a/icons/controlExitHovered.png b/icons/controlExitHovered.png new file mode 100644 index 0000000..04f62c5 Binary files /dev/null and b/icons/controlExitHovered.png differ diff --git a/icons/controlExitPressed.png b/icons/controlExitPressed.png new file mode 100644 index 0000000..49c0a23 Binary files /dev/null and b/icons/controlExitPressed.png differ diff --git a/icons/controlNext.png b/icons/controlNext.png new file mode 100644 index 0000000..af21d5f Binary files /dev/null and b/icons/controlNext.png differ diff --git a/icons/controlNextHovered.png b/icons/controlNextHovered.png new file mode 100644 index 0000000..f819c21 Binary files /dev/null and b/icons/controlNextHovered.png differ diff --git a/icons/controlNextPressed.png b/icons/controlNextPressed.png new file mode 100644 index 0000000..a6a6136 Binary files /dev/null and b/icons/controlNextPressed.png differ diff --git a/icons/controlPrev.png b/icons/controlPrev.png new file mode 100644 index 0000000..7ed7154 Binary files /dev/null and b/icons/controlPrev.png differ diff --git a/icons/controlPrevHovered.png b/icons/controlPrevHovered.png new file mode 100644 index 0000000..f83e9d0 Binary files /dev/null and b/icons/controlPrevHovered.png differ diff --git a/icons/controlPrevPressed.png b/icons/controlPrevPressed.png new file mode 100644 index 0000000..9e967b0 Binary files /dev/null and b/icons/controlPrevPressed.png differ diff --git a/icons/database.png b/icons/database.png new file mode 100644 index 0000000..65d4a92 Binary files /dev/null and b/icons/database.png differ diff --git a/icons/display.png b/icons/display.png new file mode 100644 index 0000000..6d8a071 Binary files /dev/null and b/icons/display.png differ diff --git a/icons/display_off.png b/icons/display_off.png new file mode 100644 index 0000000..d9dc1db Binary files /dev/null and b/icons/display_off.png differ diff --git a/icons/display_on.png b/icons/display_on.png new file mode 100644 index 0000000..616fe4a Binary files /dev/null and b/icons/display_on.png differ diff --git a/icons/down.png b/icons/down.png new file mode 100644 index 0000000..f3113d2 Binary files /dev/null and b/icons/down.png differ diff --git a/icons/edit.png b/icons/edit.png new file mode 100644 index 0000000..3403c4b Binary files /dev/null and b/icons/edit.png differ diff --git a/icons/effectsBlurredShadow.png b/icons/effectsBlurredShadow.png new file mode 100644 index 0000000..9e27f76 Binary files /dev/null and b/icons/effectsBlurredShadow.png differ diff --git a/icons/effectsNone.png b/icons/effectsNone.png new file mode 100644 index 0000000..092d3c2 Binary files /dev/null and b/icons/effectsNone.png differ diff --git a/icons/effectsShadow.png b/icons/effectsShadow.png new file mode 100644 index 0000000..995fbbc Binary files /dev/null and b/icons/effectsShadow.png differ diff --git a/icons/flag_uk.png b/icons/flag_uk.png new file mode 100644 index 0000000..3853f5e Binary files /dev/null and b/icons/flag_uk.png differ diff --git a/icons/go_live.png b/icons/go_live.png new file mode 100644 index 0000000..cdacaa9 Binary files /dev/null and b/icons/go_live.png differ diff --git a/icons/help.png b/icons/help.png new file mode 100644 index 0000000..36e0234 Binary files /dev/null and b/icons/help.png differ diff --git a/icons/hide.png b/icons/hide.png new file mode 100644 index 0000000..d579ffd Binary files /dev/null and b/icons/hide.png differ diff --git a/icons/new.png b/icons/new.png new file mode 100644 index 0000000..f499df5 Binary files /dev/null and b/icons/new.png differ diff --git a/icons/open.png b/icons/open.png new file mode 100644 index 0000000..1458a8e Binary files /dev/null and b/icons/open.png differ diff --git a/icons/pause.png b/icons/pause.png new file mode 100644 index 0000000..50f4939 Binary files /dev/null and b/icons/pause.png differ diff --git a/icons/photo.png b/icons/photo.png new file mode 100644 index 0000000..95a9294 Binary files /dev/null and b/icons/photo.png differ diff --git a/icons/play.png b/icons/play.png new file mode 100644 index 0000000..d40474d Binary files /dev/null and b/icons/play.png differ diff --git a/icons/playerScreen.png b/icons/playerScreen.png new file mode 100644 index 0000000..76a9cd7 Binary files /dev/null and b/icons/playerScreen.png differ diff --git a/icons/print.png b/icons/print.png new file mode 100644 index 0000000..1c0e455 Binary files /dev/null and b/icons/print.png differ diff --git a/icons/remove.png b/icons/remove.png new file mode 100644 index 0000000..ef04f68 Binary files /dev/null and b/icons/remove.png differ diff --git a/icons/remove_all.png b/icons/remove_all.png new file mode 100644 index 0000000..180926d Binary files /dev/null and b/icons/remove_all.png differ diff --git a/icons/save.png b/icons/save.png new file mode 100644 index 0000000..a47e0f0 Binary files /dev/null and b/icons/save.png differ diff --git a/icons/scheduleAdd.png b/icons/scheduleAdd.png new file mode 100644 index 0000000..709dd83 Binary files /dev/null and b/icons/scheduleAdd.png differ diff --git a/icons/scheduleClear.png b/icons/scheduleClear.png new file mode 100644 index 0000000..bca5f5b Binary files /dev/null and b/icons/scheduleClear.png differ diff --git a/icons/scheduleDown.png b/icons/scheduleDown.png new file mode 100644 index 0000000..2dfacf2 Binary files /dev/null and b/icons/scheduleDown.png differ diff --git a/icons/scheduleDownM.png b/icons/scheduleDownM.png new file mode 100644 index 0000000..edb3831 Binary files /dev/null and b/icons/scheduleDownM.png differ diff --git a/icons/scheduleNew.png b/icons/scheduleNew.png new file mode 100644 index 0000000..5688610 Binary files /dev/null and b/icons/scheduleNew.png differ diff --git a/icons/scheduleOpen.png b/icons/scheduleOpen.png new file mode 100644 index 0000000..af6d054 Binary files /dev/null and b/icons/scheduleOpen.png differ diff --git a/icons/scheduleRemove.png b/icons/scheduleRemove.png new file mode 100644 index 0000000..df1b8e2 Binary files /dev/null and b/icons/scheduleRemove.png differ diff --git a/icons/scheduleSave.png b/icons/scheduleSave.png new file mode 100644 index 0000000..ed50290 Binary files /dev/null and b/icons/scheduleSave.png differ diff --git a/icons/scheduleUp.png b/icons/scheduleUp.png new file mode 100644 index 0000000..7d51072 Binary files /dev/null and b/icons/scheduleUp.png differ diff --git a/icons/scheduleUpM.png b/icons/scheduleUpM.png new file mode 100644 index 0000000..9749e81 Binary files /dev/null and b/icons/scheduleUpM.png differ diff --git a/icons/screen.png b/icons/screen.png new file mode 100644 index 0000000..a15df92 Binary files /dev/null and b/icons/screen.png differ diff --git a/icons/search.png b/icons/search.png new file mode 100644 index 0000000..3f73a48 Binary files /dev/null and b/icons/search.png differ diff --git a/icons/settings.png b/icons/settings.png new file mode 100644 index 0000000..ff6aa69 Binary files /dev/null and b/icons/settings.png differ diff --git a/icons/show.png b/icons/show.png new file mode 100644 index 0000000..c8da5e1 Binary files /dev/null and b/icons/show.png differ diff --git a/icons/slideshow_delete.png b/icons/slideshow_delete.png new file mode 100644 index 0000000..7b26512 Binary files /dev/null and b/icons/slideshow_delete.png differ diff --git a/icons/slideshow_edit.png b/icons/slideshow_edit.png new file mode 100644 index 0000000..36c411d Binary files /dev/null and b/icons/slideshow_edit.png differ diff --git a/icons/slideshow_new.png b/icons/slideshow_new.png new file mode 100644 index 0000000..87038d6 Binary files /dev/null and b/icons/slideshow_new.png differ diff --git a/icons/softprojector.png b/icons/softprojector.png new file mode 100644 index 0000000..03b6b7a Binary files /dev/null and b/icons/softprojector.png differ diff --git a/icons/softprojector_cloud.png b/icons/softprojector_cloud.png new file mode 100644 index 0000000..aeb8f45 Binary files /dev/null and b/icons/softprojector_cloud.png differ diff --git a/icons/solidColor.png b/icons/solidColor.png new file mode 100644 index 0000000..c1e1d5e Binary files /dev/null and b/icons/solidColor.png differ diff --git a/icons/song_copy.png b/icons/song_copy.png new file mode 100644 index 0000000..3876e42 Binary files /dev/null and b/icons/song_copy.png differ diff --git a/icons/song_count.png b/icons/song_count.png new file mode 100644 index 0000000..6f7c313 Binary files /dev/null and b/icons/song_count.png differ diff --git a/icons/song_delete.png b/icons/song_delete.png new file mode 100644 index 0000000..c126396 Binary files /dev/null and b/icons/song_delete.png differ diff --git a/icons/song_edit.png b/icons/song_edit.png new file mode 100644 index 0000000..751df48 Binary files /dev/null and b/icons/song_edit.png differ diff --git a/icons/song_new.png b/icons/song_new.png new file mode 100644 index 0000000..eb75ef4 Binary files /dev/null and b/icons/song_new.png differ diff --git a/icons/song_tab.png b/icons/song_tab.png new file mode 100644 index 0000000..86da562 Binary files /dev/null and b/icons/song_tab.png differ diff --git a/icons/splash.png b/icons/splash.png new file mode 100644 index 0000000..06e1dd7 Binary files /dev/null and b/icons/splash.png differ diff --git a/icons/stop.png b/icons/stop.png new file mode 100644 index 0000000..1ec0d1f Binary files /dev/null and b/icons/stop.png differ diff --git a/icons/toBottomOfScreen.png b/icons/toBottomOfScreen.png new file mode 100644 index 0000000..d7058b8 Binary files /dev/null and b/icons/toBottomOfScreen.png differ diff --git a/icons/toTopOfScreen.png b/icons/toTopOfScreen.png new file mode 100644 index 0000000..361ca57 Binary files /dev/null and b/icons/toTopOfScreen.png differ diff --git a/icons/tranFade.png b/icons/tranFade.png new file mode 100644 index 0000000..cde3254 Binary files /dev/null and b/icons/tranFade.png differ diff --git a/icons/tranFadeOutIn.png b/icons/tranFadeOutIn.png new file mode 100644 index 0000000..11c2b76 Binary files /dev/null and b/icons/tranFadeOutIn.png differ diff --git a/icons/tranMoveDown.png b/icons/tranMoveDown.png new file mode 100644 index 0000000..4ac70b4 Binary files /dev/null and b/icons/tranMoveDown.png differ diff --git a/icons/tranMoveLeft.png b/icons/tranMoveLeft.png new file mode 100644 index 0000000..ea02e1c Binary files /dev/null and b/icons/tranMoveLeft.png differ diff --git a/icons/tranMoveRight.png b/icons/tranMoveRight.png new file mode 100644 index 0000000..5f83b0b Binary files /dev/null and b/icons/tranMoveRight.png differ diff --git a/icons/tranMoveUp.png b/icons/tranMoveUp.png new file mode 100644 index 0000000..ab457d8 Binary files /dev/null and b/icons/tranMoveUp.png differ diff --git a/icons/tranNone.png b/icons/tranNone.png new file mode 100644 index 0000000..b0a939a Binary files /dev/null and b/icons/tranNone.png differ diff --git a/icons/up.png b/icons/up.png new file mode 100644 index 0000000..ac2a2d6 Binary files /dev/null and b/icons/up.png differ diff --git a/icons/video.png b/icons/video.png new file mode 100644 index 0000000..929fbc8 Binary files /dev/null and b/icons/video.png differ diff --git a/icons/video_add.png b/icons/video_add.png new file mode 100644 index 0000000..46be590 Binary files /dev/null and b/icons/video_add.png differ diff --git a/icons/video_remove.png b/icons/video_remove.png new file mode 100644 index 0000000..7e3449c Binary files /dev/null and b/icons/video_remove.png differ diff --git a/imagegenerator.cpp b/imagegenerator.cpp new file mode 100644 index 0000000..1988260 --- /dev/null +++ b/imagegenerator.cpp @@ -0,0 +1,775 @@ +#include "imagegenerator.hpp" + + +ImageGenerator::ImageGenerator() +{ + m_type = 0; + m_shadow = m_blurShadow = false; + m_shadowOffset = 3; + m_blurRadius = 5; + m_screenSize = QSize(1280,960); +} + +void ImageGenerator::setScreenSize(QSize size) +{ + m_screenSize = size; +} + +QSize ImageGenerator::getScreenSize() +{ + return m_screenSize; +} + +int ImageGenerator::width() +{ + return m_screenSize.width(); +} + +int ImageGenerator::height() +{ + return m_screenSize.height(); +} + +QPixmap ImageGenerator::generateEmptyImage() +{ + QPixmap pmap(m_screenSize); + pmap.fill(QColor(0,0,0,0)); + return pmap; +} + +QPixmap ImageGenerator::generateColorImage(QColor &color) +{ + QPixmap pmap(m_screenSize); + pmap.fill(color); + return pmap; +} + +QPixmap ImageGenerator::generateBibleImage(Verse verse, BibleSettings &bSets) +{ + m_type = 1; + m_verse = verse; + m_bSets = bSets; + + + m_bSets.textFont.setPointSize(m_bSets.textFont.pointSize() * 3); + m_bSets.captionFont.setPointSize(m_bSets.captionFont.pointSize() * 3); + + // TODO:FIX + m_shadow = (m_bSets.effectsType == 1 || m_bSets.effectsType == 2); + m_blurShadow = (m_bSets.effectsType == 2); + + m_isTextPrepared = false; + return renderText(); +} + +QPixmap ImageGenerator::generateSongImage(Stanza stanza, SongSettings &sSets) +{ + m_type = 2; + m_stanza = stanza; + m_sSets = sSets; + m_sSets.textFont.setPointSize(m_sSets.textFont.pointSize() * 3); + m_sSets.endingFont.setPointSize(m_sSets.endingFont.pointSize() * 3); + m_sSets.infoFont.setPointSize(m_sSets.infoFont.pointSize() * 3); + + // TODO:FIX + m_shadow = (m_sSets.effectsType == 1 || m_sSets.effectsType == 2); + m_blurShadow = (m_sSets.effectsType == 2); + + m_isTextPrepared = false; + return renderText(); +} + +QPixmap ImageGenerator::generateAnnounceImage(AnnounceSlide announce, TextSettings &aSets) +{ + m_type = 3; + m_announce = announce; + m_aSets = aSets; + // TODO:FIX + m_shadow = (m_aSets.effectsType == 1 || m_aSets.effectsType == 2); + m_blurShadow = (m_aSets.effectsType == 2); + + m_isTextPrepared = false; + return renderText(); + +} + +QPixmap ImageGenerator::renderText() +{ + QPixmap textMap(m_screenSize), shadowMap(m_screenSize), outMap(m_screenSize); + //fill with transparent background + textMap.fill(QColor(0,0,0,0)); + shadowMap.fill(QColor(0,0,0,0)); + outMap.fill(QColor(0,0,0,0)); + + QPainter textPaint(&textMap), shadowPaint(&shadowMap), outPaint(&outMap); + //TODO: remove set paint for shadow and make it as an option in settings. + + // int shadowOffset(0); + + // Draw main text + switch (m_type) { + case 1: + // Draw Bible + drawBibleText(&textPaint,false); + if(m_shadow) + { + // prepare and draw bible shadow + //shadowOffset = (m_bdSets.tFont.pointSize() / 15); + drawBibleText(&shadowPaint,true); + } + break; + case 2: + // Braw Song + drawSongText(&textPaint,false); + if(m_shadow) + { + // prepare and draw song shadow + //shadowOffset = (m_sSets.textFont.pointSize() / 15); + drawSongText(&shadowPaint,true); + } + break; + case 3: + // Draw Announse + drawAnnounceText(&textPaint,false); + if(m_shadow) + { + // prepare and draw announcement shadow + //shadowOffset = (m_aSets.textFont.pointSize() / 15); + drawAnnounceText(&shadowPaint,true); + } + break; + default: + break; + } + + textPaint.end(); + shadowPaint.end(); + + + // Set the blured image to the produced text image: + if(m_blurShadow) // Blur the shadow: + { + QGraphicsBlurEffect* beff = new QGraphicsBlurEffect; + beff->setBlurRadius(m_blurRadius); + shadowMap = applyEffectToImage(shadowMap,beff); + } + + // draw shadow onto output pixmap + + if(m_shadow || m_blurShadow) + outPaint.drawPixmap(m_shadowOffset,m_shadowOffset,shadowMap); + + // draw text onto output pixmap + outPaint.drawPixmap(0,0,textMap); + outPaint.end(); + + return outMap; +} + +QRect ImageGenerator::boundRectOrDrawText(QPainter *painter, bool draw, int left, int top, int width, int height, int flags, QString text) +{ + // If draw is false, calculate the rectangle that the specified text would be + // drawn into if it was draw. If draw is true, draw as well. + // Output rect is returned. + + QRect out_rect; + if(draw) + painter->drawText(left, top, width, height, flags, text, &out_rect); + else + out_rect = painter->boundingRect(left, top, width, height, flags, text); + return out_rect; +} + +void ImageGenerator::drawBibleText(QPainter *painter, bool isShadow) +{ + // Margins: + int left = 30; + int top = 20; + + //int right = width - left; + int w = m_screenSize.width() - left - left; + int h = m_screenSize.height() - top - top; + + // set maximum screen size - For primary bibile only + int maxh = h * m_bSets.screenUse/100; // maximun screen height + int maxtop; // top of max screen + if(m_bSets.screenPosition == 0) + maxtop = top; + if(m_bSets.screenPosition == 1) + maxtop = top+h-maxh; + + // apply max screen use settings + h=maxh; + top=maxtop; + + // Keep decreasing the font size until the text fits into the allocated space: + + // Rects for storing the position of the text and caption drawing: + QRect trect1, crect1, trect2, crect2, trect3, crect3; + // Flags to be used for drawing verse text and caption: + int tflags = Qt::TextWordWrap; + tflags = Qt::TextWordWrap; + + if(m_bSets.textAlingmentV==0) + tflags += Qt::AlignTop; + else if(m_bSets.textAlingmentV==1) + tflags += Qt::AlignVCenter; + else if(m_bSets.textAlingmentV==2) + tflags += Qt::AlignBottom; + + if(m_bSets.textAlingmentH==0) + tflags += Qt::AlignLeft; + else if(m_bSets.textAlingmentH==1) + tflags += Qt::AlignHCenter; + else if(m_bSets.textAlingmentH==2) + tflags += Qt::AlignRight; + + int cflags = Qt::AlignTop ; + if(m_bSets.captionAlingment==0) + cflags += Qt::AlignLeft; + else if(m_bSets.captionAlingment==1) + cflags += Qt::AlignHCenter; + else if(m_bSets.captionAlingment==2) + cflags += Qt::AlignRight; + + bool exit = false; + if(!m_isTextPrepared) + { + m_bdSets.clear(); + while( !exit ) + { + if(m_verse.secondary_text.isEmpty() && m_verse.trinary_text.isEmpty()) + { + // Prepare primary version only, 2nd and 3rd do not exist + // Figure out how much space the drawing will take at the current font size: + drawBibleTextToRect(painter,trect1,crect1,m_verse.primary_text,m_verse.primary_caption, + tflags,cflags,top,left,w,h); + + // Make sure that all fits into the screen + int th = trect1.height()+crect1.height(); + exit = (th<=h); + } + else if(!m_verse.secondary_text.isEmpty() && m_verse.trinary_text.isEmpty()) + { + // Prepare primary and secondary versions, trinary does not exist + // Figure out how much space the drawing will take at the current font size for primary: + drawBibleTextToRect(painter,trect1,crect1,m_verse.primary_text,m_verse.primary_caption, + tflags,cflags,top,left,w,h/2); + + // set new top for secondary + int top2 = crect1.bottom(); + if(top2 current_size) + { + curCap_size--; + m_bSets.captionFont.setPointSize(curCap_size); + } + } + } + + m_isTextPrepared = true; + m_bdSets.ptRect = trect1; + m_bdSets.pcRect = crect1; + m_bdSets.stRect = trect2; + m_bdSets.scRect = crect2; + m_bdSets.ttRect = trect3; + m_bdSets.tcRect = crect3; + m_bdSets.tFont = m_bSets.textFont; + m_bdSets.cFont = m_bSets.captionFont; + } + + // Draw the bible text verse(s) at the final size: + + painter->setFont(m_bdSets.tFont); + if(isShadow) + painter->setPen(m_bSets.textShadowColor); + else + painter->setPen(m_bSets.textColor); + painter->drawText(m_bdSets.ptRect, tflags, m_verse.primary_text); + if(!m_verse.secondary_text.isNull()) + painter->drawText(m_bdSets.stRect, tflags, m_verse.secondary_text); + if(!m_verse.trinary_text.isNull()) + painter->drawText(m_bdSets.ttRect, tflags, m_verse.trinary_text); + + // Draw the verse caption(s) at the final size: + painter->setFont(m_bdSets.cFont); + if(isShadow) + painter->setPen(m_bSets.captionShadowColor); + else + painter->setPen(m_bSets.captionColor); + painter->drawText(m_bdSets.pcRect, cflags, m_verse.primary_caption); + if(!m_verse.secondary_text.isNull()) + painter->drawText(m_bdSets.scRect, cflags, m_verse.secondary_caption); + if(!m_verse.trinary_caption.isNull()) + painter->drawText(m_bdSets.tcRect, cflags, m_verse.trinary_caption); +} + +void ImageGenerator::drawBibleTextToRect(QPainter *painter, QRect& trect, QRect& crect, QString ttext, + QString ctext, int tflags, int cflags, int top, int left, + int width, int height) +{ + // prepare caption + painter->setFont(m_bSets.captionFont); + crect = painter->boundingRect(left, top, width, height, cflags, ctext); + + // prepare text + painter->setFont(m_bSets.textFont); + trect = painter->boundingRect(left, top, width, height-crect.height(), tflags, ttext); + + // reset capion location + int ch = crect.height(); + int th = trect.height(); + if(m_bSets.captionPosition == 0) + { + crect.setTop(trect.top()); + crect.setHeight(ch); + trect.setTop(crect.bottom()); + trect.setHeight(th); + } + else if(m_bSets.captionPosition == 1) + { + crect.setTop(trect.bottom()); + crect.setHeight(ch); + } +} + +void ImageGenerator::drawSongText(QPainter *painter, bool isShadow) +{ + // Draw the text of the current song verse to the specified painter; making + // sure that the output rect is narrower than and shorter than . + + QString main_text = m_stanza.stanza; + QString caption_str; + QString song_ending = " "; + + //QStringList lines_list = song_list.at(current_song_verse).split("\n"); + QString song_num_str = QString::number(m_stanza.number); + QString song_key_str = m_stanza.tune; + + // Check whether to display song numbers + if (m_sSets.showSongNumber) + song_num_str = song_num_str; + else + song_num_str = " "; + + // Check whether to display song key + if (m_sSets.showSongKey) + song_num_str = song_key_str + " " + song_num_str; + else + song_num_str = song_num_str; + + // Check wheter to display stanza tiles + if (m_sSets.showStanzaTitle) + caption_str = m_stanza.stanzaTitle; + else + caption_str = " "; + + // If No cation,number or tune, give the space to song text + if(!m_sSets.showSongNumber && !m_sSets.showSongKey && !m_sSets.showStanzaTitle) + { + song_num_str.clear(); + caption_str.clear(); + } + + // Prepare Song ending string + if(m_stanza.isLast) + { + // first check if to show ending + if(m_sSets.showSongEnding) + { + if(m_sSets.endingType == 0) + song_ending = "* * *"; + else if(m_sSets.endingType == 1) + song_ending = "- - -"; + else if(m_sSets.endingType == 2) + song_ending = QString::fromUtf8("° ° °"); + else if(m_sSets.endingType == 3) + song_ending = QString::fromUtf8("• • •"); + else if(m_sSets.endingType == 4) + song_ending = QString::fromUtf8("● ● ●"); + else if(m_sSets.endingType == 5) + song_ending = QString::fromUtf8("▪ ▪ ▪"); + else if(m_sSets.endingType == 6) + song_ending = QString::fromUtf8("■ ■ ■"); + else if(m_sSets.endingType == 7) + { + // First check if copyrigth info exist. If it does show it. + // If some exist, then show what exist. If nothing exist, then show '* * *' + // TODO: Fix translations + // if(!m_stanza.wordsBy.isEmpty() && !m_stanza.musicBy.isEmpty()) + // song_ending = QString(tr("Words by: %1, Music by: %2")).arg(m_stanza.wordsBy).arg(m_stanza.musicBy); + // else if(!m_stanza.wordsBy.isEmpty() && m_stanza.musicBy.isEmpty()) + // song_ending = QString(tr("Words by: %1")).arg(m_stanza.wordsBy); + // else if(m_stanza.wordsBy.isEmpty() && !m_stanza.musicBy.isEmpty()) + // song_ending = QString(tr("Music by: %1")).arg(m_stanza.musicBy); + // else if(m_stanza.wordsBy.isEmpty() && m_stanza.musicBy.isEmpty()) + song_ending = "* * *"; + } + } + } + + int width, height; + // if not to show song ending, return its space to main text + if(!m_sSets.showSongEnding) + song_ending.clear(); + + // Margins: + int left = 30; + int top = 20; + int w = m_screenSize.width() - left - left; + int h = m_screenSize.height() - top - top; + int maxh = h * m_sSets.screenUse/100; + int maxtop; // top of max screen + if(m_sSets.screenPosition == 0) + maxtop = top; + if(m_sSets.screenPosition == 1) + maxtop = top+h-maxh; + + height = maxh; + top = maxtop; + width = w; + + QRect caption_rect, num_rect, main_rect, ending_rect; + int main_flags(0); + + if(m_sSets.textAlingmentV==0) + main_flags += Qt::AlignTop; + else if(m_sSets.textAlingmentV==1) + main_flags += Qt::AlignVCenter; + else if(m_sSets.textAlingmentV==2) + main_flags += Qt::AlignBottom; + if(m_sSets.textAlingmentH==0) + main_flags += Qt::AlignLeft; + else if(m_sSets.textAlingmentH==1) + main_flags += Qt::AlignHCenter; + else if(m_sSets.textAlingmentH==2) + main_flags += Qt::AlignRight; + + QFont main_font = m_sSets.textFont; + + int caph, endh, mainh, mainw, totalh; + + if(!m_isTextPrepared) + { + m_sdSets.clear(); + + // Prepare Caption + painter->setFont(m_sSets.infoFont); + caption_rect = boundRectOrDrawText(painter, false, left, top, width, height, Qt::AlignLeft | Qt::AlignTop, caption_str); + caph = caption_rect.height(); + + // Prepare Ending + 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 + while(ending_rect.width()> width) + { + m_sSets.endingFont.setPointSize(m_sSets.endingFont.pointSize()-1); + painter->setFont(m_sSets.endingFont); + ending_rect = boundRectOrDrawText(painter, false, left, top, width, height, Qt::AlignHCenter | Qt::AlignTop, song_ending); + } + endh = ending_rect.height(); + + // 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; + + // Decrease song text to fit the screen + while(mainw > width || totalh > height) + { + main_font.setPointSize(main_font.pointSize() - 1); + 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; + } + + // Check if main font is less then 4/5 of original. if so, then song preparation again with text wrap + if(main_font.pointSize() <(m_sSets.textFont.pointSize()*4/5)) + { + main_flags += Qt::TextWordWrap; + main_font = m_sSets.textFont; + + // Prepare Main Text + painter->setFont(m_sSets.textFont); + 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; + + // Decrease song text to fit the screen + while(mainw > width || totalh > height) + { + main_font.setPointSize(main_font.pointSize() - 1); + 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; + } + } + m_sSets.textFont = main_font; + m_isTextPrepared = true; + m_sdSets.cRect = caption_rect; + m_sdSets.tRect = main_rect; + m_sdSets.eRect = ending_rect; + m_sdSets.tFlags = main_flags; + } + + // AT This piont, all sizes should be good. + // Set object location and DRAW + caption_rect = m_sdSets.cRect; + main_rect = m_sdSets.tRect; + ending_rect = m_sdSets.eRect; + caph = m_sdSets.cRect.height(); + endh = m_sdSets.eRect.height(); + main_flags = m_sdSets.tFlags; + mainh = height-caph-endh; + if(m_sSets.infoAling == 0 && m_sSets.endingPosition == 0) + { + painter->setFont(m_sSets.infoFont); + if(isShadow) + painter->setPen(m_sSets.infoShadowColor); + else + painter->setPen(m_sSets.infoColor); + caption_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignLeft | Qt::AlignTop, caption_str); + num_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignRight | Qt::AlignTop, song_num_str); + painter->setFont(m_sSets.textFont); + if(isShadow) + painter->setPen(m_sSets.textShadowColor); + else + painter->setPen(m_sSets.textColor); + main_rect = boundRectOrDrawText(painter, true, left, caption_rect.bottom(), width, mainh, main_flags, main_text); + painter->setFont(m_sSets.endingFont); + if(isShadow) + painter->setPen(m_sSets.endingShadowColor); + else + painter->setPen(m_sSets.endingColor); + ending_rect = boundRectOrDrawText(painter, true, left, main_rect.bottom(), width, height, Qt::AlignHCenter | Qt::AlignTop, song_ending); + } + else if(m_sSets.infoAling == 0 && m_sSets.endingPosition == 1) + { + painter->setFont(m_sSets.infoFont); + if(isShadow) + painter->setPen(m_sSets.infoShadowColor); + else + painter->setPen(m_sSets.infoColor); + caption_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignLeft | Qt::AlignTop, caption_str); + num_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignRight | Qt::AlignTop, song_num_str); + painter->setFont(m_sSets.endingFont); + if(isShadow) + painter->setPen(m_sSets.endingShadowColor); + else + painter->setPen(m_sSets.endingColor); + ending_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignHCenter | Qt::AlignBottom, song_ending); + painter->setFont(m_sSets.textFont); + if(isShadow) + painter->setPen(m_sSets.textShadowColor); + else + painter->setPen(m_sSets.textColor); + main_rect = boundRectOrDrawText(painter, true, left, caption_rect.bottom(), width, mainh, main_flags, main_text); + } + else if(m_sSets.infoAling == 1 && m_sSets.endingPosition == 0) + { + painter->setFont(m_sSets.textFont); + if(isShadow) + painter->setPen(m_sSets.textShadowColor); + else + painter->setPen(m_sSets.textColor); + main_rect = boundRectOrDrawText(painter, true, left, top, width, mainh, main_flags, main_text); + painter->setFont(m_sSets.infoFont); + if(isShadow) + painter->setPen(m_sSets.infoShadowColor); + else + painter->setPen(m_sSets.infoColor); + caption_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignLeft | Qt::AlignBottom, caption_str); + num_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignRight | Qt::AlignBottom, song_num_str); + painter->setFont(m_sSets.endingFont); + if(isShadow) + painter->setPen(m_sSets.endingShadowColor); + else + painter->setPen(m_sSets.endingColor); + ending_rect = boundRectOrDrawText(painter, true, left, main_rect.bottom(), width, height, Qt::AlignHCenter | Qt::AlignTop, song_ending); + } + else if(m_sSets.infoAling == 1 && m_sSets.endingPosition == 1) + { + endh = height-caph; + painter->setFont(m_sSets.textFont); + if(isShadow) + painter->setPen(m_sSets.textShadowColor); + else + painter->setPen(m_sSets.textColor); + main_rect = boundRectOrDrawText(painter, true, left, top, width, mainh, main_flags, main_text); + painter->setFont(m_sSets.infoFont); + if(isShadow) + painter->setPen(m_sSets.infoShadowColor); + else + painter->setPen(m_sSets.infoColor); + caption_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignLeft | Qt::AlignBottom, caption_str); + num_rect = boundRectOrDrawText(painter, true, left, top, width, height, Qt::AlignRight | Qt::AlignBottom, song_num_str); + painter->setFont(m_sSets.endingFont); + if(isShadow) + painter->setPen(m_sSets.endingShadowColor); + else + painter->setPen(m_sSets.endingColor); + ending_rect = boundRectOrDrawText(painter, true, left, top, width, endh, Qt::AlignHCenter | Qt::AlignBottom, song_ending); + } +} + +void ImageGenerator::drawAnnounceText(QPainter *painter, bool isShadow) +{ + // Margins: + int left = 30; + int top = 20; + int w = m_screenSize.width() - left - left; + int h = m_screenSize.height() - top - top; + + int flags = Qt::TextWordWrap; + if(m_aSets.textAlingmentV==0) + flags += Qt::AlignTop; + else if(m_aSets.textAlingmentV==1) + flags += Qt::AlignVCenter; + else if(m_aSets.textAlingmentV==2) + flags += Qt::AlignBottom; + if(m_aSets.textAlingmentH==0) + flags += Qt::AlignLeft; + else if(m_aSets.textAlingmentH==1) + flags += Qt::AlignHCenter; + else if(m_aSets.textAlingmentH==2) + flags += Qt::AlignRight; + + QFont font = m_aSets.textFont; + int orig_font_size = font.pointSize(); + + // Keep decreasing the font size until the text fits into the allocated space: + QRect rect; + + if(!m_isTextPrepared) + { + painter->setFont(font); + bool exit = false; + while( !exit ) + { + rect = painter->boundingRect(left, top, w, h, flags, m_announce.text); + exit = ( rect.width() <= w && rect.height() <= h ); + if( !exit ) + { + font.setPointSize( font.pointSize()-1 ); + painter->setFont(font); + } + } + + // Force wrapping of songs that have really wide lines: + // (Do not allow font to be shrinked less than a 4/5 of the desired font) + if( font.pointSize() < (orig_font_size*4/5) ) + { + font.setPointSize(orig_font_size); + painter->setFont(font); + flags = (flags | Qt::TextWordWrap); + exit = false; + while( !exit ) + { + rect = painter->boundingRect(left, top, w, h, flags, m_announce.text); + exit = ( rect.width() <= w && rect.height() <= h ); + if( !exit ) + { + font.setPointSize( font.pointSize()-1 ); + painter->setFont(font); + } + } + } + m_aSets.textFont = font; + m_adSets.tRect = rect; + m_isTextPrepared = true; + } + + painter->setFont(m_aSets.textFont); + if(isShadow) + painter->setPen(QColor(Qt::black)); + else + painter->setPen(m_aSets.textColor); + painter->drawText(m_adSets.tRect, flags, m_announce.text); +} + + +QPixmap ImageGenerator::applyEffectToImage(QPixmap src, QGraphicsEffect *effect) +{ + if(src.isNull()) return QPixmap(); //No need to do anything else! + if(!effect) return src; //No need to do anything else! + QGraphicsScene scene; + QGraphicsPixmapItem item; + item.setPixmap(src); + item.setGraphicsEffect(effect); + scene.addItem(&item); + QPixmap res(src.size()); + res.fill(Qt::transparent); + QPainter ptr(&res); + scene.render(&ptr); + return res; +} diff --git a/imagegenerator.hpp b/imagegenerator.hpp new file mode 100644 index 0000000..3e91c5e --- /dev/null +++ b/imagegenerator.hpp @@ -0,0 +1,62 @@ +#ifndef IMAGEGENERATOR_HPP +#define IMAGEGENERATOR_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class ImageGenerator +{ +public: + ImageGenerator(); + void setScreenSize(QSize size); + QSize getScreenSize(); + + QPixmap generateEmptyImage(); + QPixmap generateColorImage(QColor &color); + QPixmap generateBibleImage(Verse verse, BibleSettings &bSets); + QPixmap generateSongImage(Stanza stanza, SongSettings &sSets); + QPixmap generateAnnounceImage(AnnounceSlide announce, TextSettings &aSets); + + int width(); + int height(); + +private: + QSize m_screenSize; + bool m_shadow, m_blurShadow, m_isTextPrepared; + int m_type; // 0 = empty, 1 = bible, 2 = song, 3 = announce + int m_shadowOffset, m_blurRadius; + + Verse m_verse; + BibleSettings m_bSets; + BibleDisplaySettings m_bdSets; + + Stanza m_stanza; + SongSettings m_sSets; + SongDisplaySettings m_sdSets; + + AnnounceSlide m_announce; + TextSettings m_aSets; + AnnounceDisplaySettings m_adSets; + + + QPixmap renderText(); + + QRect boundRectOrDrawText(QPainter *painter, bool draw, int left, int top, int width, int height, int flags, QString text); + void drawBibleText(QPainter *painter, bool isShadow); + void drawBibleTextToRect(QPainter *painter, QRect& trect, QRect& crect, QString ttext, QString ctext, int tflags, int cflags, int top, int left, int width, int height); + void drawSongText(QPainter *painter, bool isShadow); + void drawAnnounceText(QPainter *painter, bool isShadow); +// void fastbluralpha(QImage &img, int radius); + QPixmap applyEffectToImage(QPixmap src, QGraphicsEffect *effect); + +}; + +#endif // IMAGEGENERATOR_HPP diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..fd1f732 --- /dev/null +++ b/main.cpp @@ -0,0 +1,240 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include +#include +#include +#include "softprojector.h" + +// Definitions for database versions 'dbVer' numbers +// x - Official release. ex: 2 - for SoftProjector 2 +// xxx - Official sub realeas. ex: 201 - for SoftProjector 2.01 +// 990xxx - Development release. ex: 990206 - for SoftProjector 2 Development Build 6 (2db6) +int const dbVer = 2; + +bool connect(QString database_file) +{ + database_file += "spData.sqlite"; + bool database_exists = ( QFile::exists(database_file) ); + + QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); + db.setDatabaseName(database_file); + if (!db.open()) + { + QMessageBox mb; + mb.setText("spData Error" + "Could not connect to the database spData.sqlite!\n\n" + "Following Errors:\n" + + db.lastError().databaseText() + "\n" + + db.lastError().driverText() +"\n" + + db.databaseName() + + "\n\nThis is a Fatal Error. Please make sure that all QtSql libraries are inlcuded." + "\nThe program will terminate"); + mb.setWindowTitle("Database Connection Error"); + mb.setIcon(QMessageBox::Critical); + mb.exec(); + return false; + } + else + { + // If no files exited, then database has been created now we need to fill it + if(!database_exists) + { + QSqlQuery sq; + sq.exec(QString("PRAGMA user_version = %1").arg(dbVer)); + sq.exec("CREATE TABLE 'Announcements' ('id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE , " + "'title' TEXT, 'text' TEXT, 'usePrivate' BOOL, 'useAuto' BOOL, 'loop' BOOL, 'slideTime' INTEGER, " + "'useBackground' BOOL, 'backgoundPath' TEXT, 'font' TEXT, 'color' TEXT, 'alignment' TEXT)"); + sq.exec("CREATE TABLE 'BibleBooks' ('bible_id' INTEGER, 'id' INTEGER, 'book_name' " + "TEXT, 'chapter_count' INTEGER DEFAULT 0)"); + sq.exec("CREATE TABLE 'BibleVerse' ('verse_id' TEXT, 'bible_id' TEXT, 'book' TEXT, " + "'chapter' INTEGER, 'verse' INTEGER, 'verse_text' TEXT)"); + sq.exec("CREATE TABLE 'BibleVersions' ('id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, " + "'bible_name' TEXT, 'abbreviation' TEXT, 'information' TEXT, 'right_to_left' INTEGER DEFAULT 0)"); + sq.exec("CREATE TABLE 'Media' ('long_path' TEXT, 'short_path' TEXT)"); + sq.exec("CREATE TABLE 'Settings' ('type' TEXT, 'sets' TEXT)"); + sq.exec("CREATE TABLE 'SlideShows' ('id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , 'name' TEXT, 'info' TEXT)"); + sq.exec("CREATE TABLE 'Slides' ('id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , " + "'ss_id' INTEGER, 'p_order' INTEGER, 'name' TEXT, 'path' TEXT, " + "'pix' BLOB, 'pix_small' BLOB, 'pix_prev' BLOB)"); + sq.exec("CREATE TABLE 'Songbooks' ('id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , 'name' TEXT, 'info' TEXT)"); + sq.exec("CREATE TABLE 'Songs' ('id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL , " + "'songbook_id' INTEGER, 'number' INTEGER, 'title' TEXT, 'category' INTEGER DEFAULT 0, " + "'tune' TEXT, 'words' TEXT, 'music' TEXT, 'song_text' TEXT, 'notes' TEXT, " + "'use_private' BOOL, 'alignment_v' INTEGER, 'alignment_h' INTEGER, 'color' INTEGER, 'font' TEXT, " + "'info_color' INTEGER, 'info_font' TEXT, 'ending_color' INTEGER, 'ending_font' TEXT, " + "'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)"); + 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)"); + sq.exec("CREATE TABLE 'ThemePassive' ('theme_id' INTEGER, 'disp' INTEGER, 'use_background' BOOL, " + "'background_name' TEXT, 'background' BLOB, 'use_disp_2' 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)"); + //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)"); + } + return true; + } +} + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + a.setApplicationName("SoftProjector"); + + QPixmap pixmap(":icons/icons/splash.png"); + QSplashScreen splash(pixmap); + splash.setMask(pixmap.mask()); + splash.show(); + a.processEvents(); + +// QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8")); + + // Look for the database in all the same places that the QSql module will look, + // and display a friendly error if it was not found: + QString database_dir; +#ifdef Q_WS_WIN + // If running on Windows, check if SoftProjector is Installed. + // If it is installed, then provide proper directory for database. + QDir d; + QString cur_app_path = a.applicationDirPath(); + // if(cur_app_path.contains(QString("C:%1Program Files").arg(d.separator()))) + if(cur_app_path.contains("C:/Program Files") || cur_app_path.contains("C:\\Program Files")) + { + // Check if it is on Windows Vista and Later or before Vista + bool is_vista = (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA); + if(is_vista) + { + d.cd(d.rootPath()); + if(d.cd("ProgramData")) + { + // Check if 'SoftProjector directory exists, if not, create one + if(d.cd("SoftProjector")) + database_dir = d.absolutePath() + d.separator(); + else + { + d.mkdir("SoftProjector"); + if(d.cd("SoftProjector")) + database_dir = d.absolutePath() + d.separator(); + else + database_dir = cur_app_path + d.separator(); + } + } + else if(d.cd("Public")) + { + // Check if 'SoftProjector directory exists, if not, create one + if(d.cd("SoftProjector")) + database_dir = d.absolutePath() + d.separator(); + else + { + d.mkdir("SoftProjector"); + if(d.cd("SoftProjector")) + database_dir = d.absolutePath() + d.separator(); + else + database_dir = cur_app_path + d.separator(); + } + } + else + database_dir = cur_app_path + d.separator(); + } + else + { + d.cd(d.homePath()); + d.cdUp(); + if(d.cd("All Users")) + { + if(d.cd("Application Data")) + { + // Check if 'SoftProjector directory exists, if not, create one + if(d.cd("SoftProjector")) + database_dir = d.absolutePath() + d.separator(); + else + { + d.mkdir("SoftProjector"); + if(d.cd("SoftProjector")) + database_dir = d.absolutePath() + d.separator(); + else + database_dir = cur_app_path + d.separator(); + } + } + else + database_dir = cur_app_path + d.separator(); + } + else + database_dir = cur_app_path + d.separator(); + } + } + else + database_dir = cur_app_path + QDir::separator(); +#else + database_dir = a.applicationDirPath() + QDir::separator(); +#endif + + // Try to connect to database + if( !connect(database_dir) ) + { + QMessageBox mb; + mb.setText("Failed to connect to database 'spData.sqlite'"); + mb.setWindowTitle("Database File Error"); + mb.setIcon(QMessageBox::Critical); + mb.exec(); + return 1; + } + // Connected to the database OK: + + // Make sure that database is of correct version + QSqlQuery sq; + sq.exec("PRAGMA user_version"); + sq.first(); + int dbVersion = sq.value(0).toInt(); + if(dbVer != dbVersion) + { + QString errortxt = QString("SoftProjector requires database vesion # %1\n" + "The database you are trying to open has vesion # %2\n" + "Please use database with current version\n" + "OR rename/remove all the database files\n" + "and let softProjector to create needed database file.\n" + "The program will terminate!" + ).arg(dbVer).arg(dbVersion); + QMessageBox mb; + mb.setText(errortxt); + mb.setWindowTitle("Incorrect Database Version"); + mb.setIcon(QMessageBox::Critical); + mb.exec(); + return 1; + } + // Database is of correct version + + SoftProjector w; + w.setAppDataDir(QDir(database_dir)); + w.show(); + splash.finish(&w); + return a.exec(); +} diff --git a/managedata.cpp b/managedata.cpp new file mode 100644 index 0000000..0b6a005 --- /dev/null +++ b/managedata.cpp @@ -0,0 +1,330 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "managedata.h" + +ManageData::ManageData() +{ +} + + +//*************************************** +//**** Bibles **** +//*************************************** +Bibles::Bibles() +{ +} + +//*************************************** +//**** BiblesModel **** +//*************************************** +BiblesModel::BiblesModel() +{ +} + +void BiblesModel::setBible(QList bibles) +{ + bible_list.clear(); + for (int i(0); i < bibles.size(); i++) + { + Bibles bible = bibles.at(i); + bible_list.append(bible); + } + emit layoutChanged(); +} + +void BiblesModel::addBible(Bibles bible) +{ + beginInsertRows(QModelIndex(), rowCount(), rowCount()); + bible_list.append(bible); + endInsertRows(); +} + +Bibles BiblesModel::getBible(int row) +{ + return bible_list.at(row); +} + +int BiblesModel::rowCount(const QModelIndex &parent) const +{ + return bible_list.count(); +} + +int BiblesModel::columnCount(const QModelIndex &parent) const +{ + return 1; +} + +QVariant BiblesModel::data(const QModelIndex &index, int role) const +{ + if( index.isValid() && role == Qt::DisplayRole ) + { + Bibles bible = bible_list.at(index.row()); + if( index.column() == 0 ) + return QVariant(bible.title); + } + return QVariant(); +} + +QVariant BiblesModel::headerData(int section, + Qt::Orientation orientation, + int role) const +{ + if (role == Qt::DisplayRole && orientation == Qt::Horizontal ) + { + switch(section) { + case 0: + return QVariant(tr("Title")); + } + } + return QVariant(); +} + +bool BiblesModel::removeRows(int row, int count, const QModelIndex &parent) +{ + beginRemoveRows(parent, row, row+count-1); + // Need to remove starting from the end: + for(int i=row+count-1; i>=row; i--) + bible_list.removeAt(i); + endRemoveRows(); + return true; +} + + +//*************************************** +//**** Songbook **** +//*************************************** +Songbook::Songbook() +{ +} + +//*************************************** +//**** Songbooks Model **** +//*************************************** +SongbooksModel::SongbooksModel() +{ +} + +void SongbooksModel::setSongbook(QList songbooks) +{ + songbook_list.clear(); + for (int i(0); i < songbooks.size(); i++) + { + Songbook songbook = songbooks.at(i); + songbook_list.append(songbook); + } + emit layoutChanged(); +} + +void SongbooksModel::addSongbook(Songbook songbook) +{ + beginInsertRows(QModelIndex(), rowCount(), rowCount()); + songbook_list.append(songbook); + endInsertRows(); +} + +Songbook SongbooksModel::getSongbook(int row) +{ + return songbook_list.at(row); +} + +int SongbooksModel::rowCount(const QModelIndex &parent) const +{ + return songbook_list.count(); +} + +int SongbooksModel::columnCount(const QModelIndex &parent) const +{ + return 2; +} + +QVariant SongbooksModel::data(const QModelIndex &index, int role) const +{ + if( index.isValid() && role == Qt::DisplayRole ) + { + Songbook songbook = songbook_list.at(index.row()); + if( index.column() == 0 ) + return QVariant(songbook.title); + else if( index.column() == 1 ) + return QVariant(songbook.info); + } + return QVariant(); +} + +QVariant SongbooksModel::headerData(int section, + Qt::Orientation orientation, + int role) const +{ + if (role == Qt::DisplayRole && orientation == Qt::Horizontal ) + { + switch(section) { + case 0: + return QVariant(tr("Title")); + case 1: + return QVariant(tr("Information")); + } + } + return QVariant(); +} + +bool SongbooksModel::removeRows(int row, int count, const QModelIndex &parent) +{ + beginRemoveRows(parent, row, row+count-1); + // Need to remove starting from the end: + for(int i=row+count-1; i>=row; i--) + songbook_list.removeAt(i); + endRemoveRows(); + return true; +} + +//***************************************/ +//**** Theme Model ****/ +//***************************************/ +ThemeModel::ThemeModel() +{ +} + +void ThemeModel::setThemes(QList themes) +{ + themeList.clear(); + themeList = themes; + emit layoutChanged(); +} + +void ThemeModel::addTheme(ThemeInfo theme) +{ + beginInsertRows(QModelIndex(), rowCount(), rowCount()); + themeList.append(theme); + endInsertRows(); +} + +ThemeInfo ThemeModel::getTheme(int row) +{ + return themeList.at(row); +} + +int ThemeModel::rowCount(const QModelIndex &parent) const +{ + return themeList.count(); +} + +int ThemeModel::columnCount(const QModelIndex &parent) const +{ + return 2; +} + +QVariant ThemeModel::data(const QModelIndex &index, int role) const +{ + if( index.isValid() && role == Qt::DisplayRole ) + { + ThemeInfo theme = themeList.at(index.row()); + if( index.column() == 0 ) + return QVariant(theme.name); + else if( index.column() == 1 ) + return QVariant(theme.comments); + } + return QVariant(); +} + +QVariant ThemeModel::headerData(int section, + Qt::Orientation orientation, + int role) const +{ + if (role == Qt::DisplayRole && orientation == Qt::Horizontal ) + { + switch(section) { + case 0: + return QVariant(tr("Name")); + case 1: + return QVariant(tr("Comments")); + } + } + return QVariant(); +} + +bool ThemeModel::removeRows(int row, int count, const QModelIndex &parent) +{ + beginRemoveRows(parent, row, row+count-1); + // Need to remove starting from the end: + for(int i=row+count-1; i>=row; i--) + themeList.removeAt(i); + endRemoveRows(); + return true; +} + +//***************************************/ +//**** Database ****/ +//***************************************/ +Database::Database() +{ +} + +QList Database::getSongbooks() +{ + QList songbooki; + Songbook songbook; + QSqlQuery sq; + sq.exec("SELECT id, name, info FROM Songbooks"); + while (sq.next()) + { + songbook.songbookId = sq.value(0).toString(); + songbook.title = sq.value(1).toString(); + songbook.info = sq.value(2).toString(); + songbooki.append(songbook); + } + return songbooki; +} + +QList Database::getBibles() +{ + QList bibles; + Bibles bible; + QSqlQuery sq; + sq.exec("SELECT bible_name, id, abbreviation, information, right_to_left FROM BibleVersions"); + while (sq.next()) + { + bible.title = sq.value(0).toString(); + bible.bibleId = sq.value(1).toString(); + bible.abbr = sq.value(2).toString(); + bible.info = sq.value(3).toString(); + int r = sq.value(4).toInt(); + if (r==0) + bible.isRtoL = false; + else if (r==1) + bible.isRtoL = true; + bibles.append(bible); + } + return bibles; +} + +QList Database::getThemes() +{ + QList theme_list; + ThemeInfo theme; + QSqlQuery sq; + sq.exec("SELECT id, name, comment FROM Themes"); + while (sq.next()) + { + theme.themeId = sq.value(0).toInt(); + theme.name = sq.value(1).toString(); + theme.comments = sq.value(2).toString(); + theme_list.append(theme); + } + return theme_list; +} diff --git a/managedata.h b/managedata.h new file mode 100644 index 0000000..6f0db78 --- /dev/null +++ b/managedata.h @@ -0,0 +1,142 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef MANAGEDATA_H +#define MANAGEDATA_H + +#include +#include +#include "theme.h" + +class ManageData +{ +public: + ManageData(); +}; + +/////////////////////// +// Bibles Class +/////////////////////// +class Bibles +{ +public: + Bibles(); + QString bibleId; + QString title; + QString abbr; + QString info; + bool isRtoL; +}; + +/////////////////////// +// Bibles Model Class +/////////////////////// +class BiblesModel : public QAbstractTableModel +{ + Q_OBJECT + Q_DISABLE_COPY(BiblesModel) + +public: + BiblesModel(); + QList bible_list; + + void setBible(QList bibles); + void addBible(Bibles bible); + Bibles getBible(int row); + + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); + +}; + +/////////////////////// +// Songbook Class +/////////////////////// +class Songbook +{ +public: + Songbook(); + QString songbookId; + QString title; + QString info; +}; + +/////////////////////// +// Songbooks Model Class +/////////////////////// +class SongbooksModel : public QAbstractTableModel +// Class for storing data for Songbook Table +{ + Q_OBJECT + Q_DISABLE_COPY(SongbooksModel) + +public: + SongbooksModel(); + QList songbook_list; + + void setSongbook(QList songbooks); + void addSongbook(Songbook songbook); + Songbook getSongbook(int row); + + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); +}; + +//*************************************/ +//*** Theme Model Class ***************/ +//*************************************/ +class ThemeModel : public QAbstractTableModel +{ + Q_OBJECT + Q_DISABLE_COPY(ThemeModel) + +public: + ThemeModel(); + QList themeList; + + void setThemes(QList themes); + void addTheme(ThemeInfo theme); + ThemeInfo getTheme(int row); + + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); +}; + +/////////////////////// +// Database Class +/////////////////////// +class Database +{ +public: + Database(); + QList getSongbooks(); + QList getBibles(); + QList getThemes(); +}; + +#endif // MANAGEDATA_H diff --git a/managedatadialog.cpp b/managedatadialog.cpp new file mode 100644 index 0000000..5663990 --- /dev/null +++ b/managedatadialog.cpp @@ -0,0 +1,2205 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "managedatadialog.h" +#include "ui_managedatadialog.h" + +Module::Module() +{ + +} + +ManageDataDialog::ManageDataDialog(QWidget *parent) : + QDialog(parent), ui(new Ui::ManageDataDialog) +{ + ui->setupUi(this); + + // Set tables + bible_model = new BiblesModel; + songbook_model = new SongbooksModel; + themeModel = new ThemeModel; + + // Set Bible Table + load_bibles(); + ui->bibleTableView->setSelectionMode(QAbstractItemView::SingleSelection); + ui->bibleTableView->setSelectionBehavior(QAbstractItemView::SelectRows); + ui->bibleTableView->verticalHeader()->hide(); + ui->bibleTableView->setColumnWidth(0, 395); + + // Set Songbooks Table + load_songbooks(); + ui->songbookTableView->setSelectionMode(QAbstractItemView::SingleSelection); + ui->songbookTableView->setSelectionBehavior(QAbstractItemView::SelectRows); + ui->songbookTableView->verticalHeader()->hide(); + ui->songbookTableView->setColumnWidth(0, 195); + ui->songbookTableView->setColumnWidth(1, 195); + + // Set Theme Table + loadThemes(); + ui->TableViewTheme->setSelectionMode(QAbstractItemView::SingleSelection); + ui->TableViewTheme->setSelectionBehavior(QAbstractItemView::SelectRows); + ui->TableViewTheme->verticalHeader()->hide(); + ui->TableViewTheme->setColumnWidth(0, 195); + ui->TableViewTheme->setColumnWidth(1, 195); + + //Set reload cariers to false + reload_bible = false; + reload_songbook = false; + reloadThemes = false; + + // Progress Dialog + progressDia = new ModuleProgressDialog(this); + + // Temporary disable "Download & Import" until server will be figured out. +// ui->pushButtonDownBible->setEnabled(false); +// ui->pushButtonDownSong->setEnabled(false); +// ui->pushButtonDownTheme->setEnabled(false); +} + +ManageDataDialog::~ManageDataDialog() +{ + delete bible_model; + delete songbook_model; + delete themeModel; + delete progressDia; + delete ui; +} + +void ManageDataDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void ManageDataDialog::load_songbooks() +{ + Database db; + // Set Songbooks Table + songbook_list = db.getSongbooks(); + songbook_model->setSongbook(songbook_list); + ui->songbookTableView->setModel(songbook_model); + updateSongbookButtons(); +} + +void ManageDataDialog::load_bibles() +{ + Database db; + // Set Bible Table + bible_list = db.getBibles(); + bible_model->setBible(bible_list); + ui->bibleTableView->setModel(bible_model); + updateBibleButtons(); +} + +void ManageDataDialog::loadThemes() +{ + Database db; + // Set Songbooks Table + themeList = db.getThemes(); + themeModel->setThemes(themeList); + ui->TableViewTheme->setModel(themeModel); + updateThemeButtons(); +} + +void ManageDataDialog::updateBibleButtons() +{ + bool enable_edit; + bool enable_export; + bool enable_delete; + + if (ui->bibleTableView->hasFocus()) + { + enable_edit = true; + enable_export = true; + if (bible_model->rowCount()>=2) + enable_delete = true; + else + enable_delete = false; + } + else + { + enable_edit = false; + enable_export = false; + enable_delete = false; + } + + ui->edit_bible_pushButton->setEnabled(enable_edit); + ui->export_bible_pushButton->setEnabled(enable_export); + ui->delete_bible_pushButton->setEnabled(enable_delete); +} + +void ManageDataDialog::updateSongbookButtons() +{ + bool enable_edit; + bool enable_export; + bool enable_delete; + + if (ui->songbookTableView->hasFocus()) + { + enable_edit = true; + enable_export = true; + if (songbook_model->rowCount()>=2) + enable_delete = true; + else + enable_delete = false; + } + else + { + enable_edit = false; + enable_export = false; + enable_delete = false; + } + + ui->edit_songbook_pushButton->setEnabled(enable_edit); + ui->export_songbook_pushButton->setEnabled(enable_export); + ui->delete_songbook_pushButton->setEnabled(enable_delete); +} + +void ManageDataDialog::updateThemeButtons() +{ + bool enable_edit; + bool enable_export; + bool enable_delete; + bool enable_export_all; + + if (ui->TableViewTheme->hasFocus()) + { + enable_edit = true; + enable_export = true; + if (themeModel->rowCount()>=2) + enable_delete = true; + else + enable_delete = false; + } + else + { + enable_edit = false; + enable_export = false; + enable_delete = false; + } + if (themeModel->rowCount()>=1) + enable_export_all = true; + else + enable_export_all = false; + + ui->pushButtonThemeEdit->setEnabled(enable_edit); + ui->pushButtonThemeExport->setEnabled(enable_export); + ui->pushButtonThemeDelete->setEnabled(enable_delete); + ui->pushButtonThemeExportAll->setEnabled(enable_export_all); +} + +void ManageDataDialog::on_import_songbook_pushButton_clicked() +{ + QString file_path = QFileDialog::getOpenFileName(this, + tr("Select a songbook to import"), ".", + tr("SoftProjector songbook file ") + "(*.sps)"); + + importType = "local"; + // if file_path exits or "Open" is clicked, then import a Songbook + if( !file_path.isNull() ) + importSongbook(file_path); +} + +void ManageDataDialog::importSongbook(QString path) +{ + setWaitCursor(); + int row(0), max(0); + QFile file(path), file2(path), fileXml(path); + QString line, code, title, info, num; + QStringList split; + QSqlQuery sq, sq1; + SongDatabase sdb; + + // get max number for progress bar + if (file2.open(QIODevice::ReadOnly)) + { + while (!file2.atEnd()) + { + line = QString::fromUtf8(file2.readLine()); + if(line.startsWith("SQLite")) + break; + ++max; + } + } + file2.close(); + + // Start Importing + QProgressDialog progress(tr("Importing..."), tr("Cancel"), 0, max, this); + if(importType == "down") + { + progress.close(); + progressDia->setCurrentMax(max); + progressDia->setCurrentValue(row); + } + else + progress.setValue(row); + + if (file.open(QIODevice::ReadOnly)) + { + reload_songbook = true; + //Set Songbook Title and Information + line = QString::fromUtf8(file.readLine()); + if (line.startsWith("##")) // Files format before vertion 2.0 + { + // Set Songbook Title + line = QString::fromUtf8(file.readLine()); + line.remove("#"); + title = line.trimmed(); + + // Set Songbook Information + line = QString::fromUtf8(file.readLine()); + line.remove("#"); + info = line.trimmed(); + + // Convert songbook information from single line to multiple line + toMultiLine(info); + + // Create songbook + sdb.addSongbook(title, info.trimmed()); + + // Set Songbook Code + code = "0"; + sq.exec("SELECT seq FROM sqlite_sequence WHERE name = 'Songbooks'"); + while (sq.next()) + code = sq.value(0).toString(); + sq.clear(); + + // Import Songs + QSqlDatabase::database().transaction(); + sq.prepare("INSERT INTO Songs (songbook_id, number, title, category, tune, words, music, " + "song_text, font, background_name, notes)" + "VALUES (?,?,?,?,?,?,?,?,?,?,?)"); + while (!file.atEnd()) + { + if (progress.wasCanceled() && importType == "local") + break; + line = QString::fromUtf8(file.readLine()); + split = line.split("#$#"); + + num = split[0]; + + // Add song to Songs table + sq.addBindValue(code);//songbook id + sq.addBindValue(num);//number + sq.addBindValue(split[1]);//title + sq.addBindValue(split[2]);//cat + sq.addBindValue(split[3]);//tune + sq.addBindValue(split[4]);//words + sq.addBindValue(split[5]);//music + QString st = split[6]; + if(st.contains(QRegExp("@$|@%"))) + st = cleanSongLines(st); + sq.addBindValue(st);//song text + if (split.count() > 7) + { + sq.addBindValue(split[7]);//font + sq.addBindValue(split[9]);//background + if(split.count()>10) + { + QString note = split[10]; + toMultiLine(note); + sq.addBindValue(note);//notes + } + else + sq.addBindValue("");//notes + } + else + { + sq.addBindValue("");//font + sq.addBindValue("");//background + sq.addBindValue("");//notes + } + sq.exec(); + + ++row; + if(importType == "down") + progressDia->setCurrentValue(row); + else + progress.setValue(row); + } + QSqlDatabase::database().commit(); + } + else if(line.startsWith("setCurrentValue(row); + else + progress.setValue(row); + } + // Save songbook + sdb.addSongbook(xtitle,xinfo); + + // Set Songbook Code + code = "0"; + sq1.exec("SELECT seq FROM sqlite_sequence WHERE name = 'Songbooks'"); + sq1.first(); + code = sq1.value(0).toString(); + + xml.readNext(); + } + else if (xml.StartElement && xml.name() == "Song") + { + QString xnum,xtitle,xcat,xtune,xwords,xmusic,xtext,xnotes, + xuse,xalign,xcolor,xfont,xback,xcount,xdate; + // Read song data + xnum = xml.attributes().value("number").toString(); + xml.readNext(); + while(xml.tokenString() != "EndElement") + { + xml.readNext(); + if(xml.StartElement && xml.name() == "title") + { + xtitle = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "category") + { + xcat = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "tune") + { + xtune = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "words") + { + xwords = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "music") + { + xmusic = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "song_text") + { + xtext = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "notes") + { + xnotes = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "use_private") + { + xuse = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "alignment") + { + xalign = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "color") + { + xcolor = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "font") + { + xfont = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "background") + { + xback = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "count") + { + xcount = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "date") + { + xdate = xml.readElementText(); + xml.readNext(); + } + } + // Save song + sq.addBindValue(code); + sq.addBindValue(xnum); + sq.addBindValue(xtitle); + sq.addBindValue(xcat); + sq.addBindValue(xtune); + sq.addBindValue(xwords); + sq.addBindValue(xmusic); + if(xtext.contains(QRegExp("@$|@%"))) + xtext = cleanSongLines(xtext); + sq.addBindValue(xtext); + sq.addBindValue(xnotes); + sq.addBindValue(xuse); + if(xalign.contains(",")) + { + QStringList l = xalign.split(","); + sq.addBindValue(l.at(0)); + sq.addBindValue(l.at(1)); + } + else + { + sq.addBindValue(1); + sq.addBindValue(1); + } + sq.addBindValue(xcolor); + sq.addBindValue(xfont); + sq.addBindValue(xback); + sq.addBindValue(xcount); + sq.addBindValue(xdate); + sq.exec(); + + row += 16; + if(importType == "down") + progressDia->setCurrentValue(row); + else + progress.setValue(row); + xml.readNext(); + } + }// end while xml.tokenString() != "EndElement" && xml.name() != "spSongBook" + QSqlDatabase::database().commit(); + }// end correct version + } // end if xml name is spSongBook + } + } + else if(line.startsWith("SQLite")) // SQLITE database file + { + file.close(); + sq.clear(); + { + QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE","sps"); + db.setDatabaseName(path); + if(db.open()) + { + QSqlQuery q(db); + q.exec("PRAGMA user_version"); + q.first(); + int spsVer = q.value(0).toInt(); + if(spsVer == 2) + { + max = row = 0; + q.exec("SELECT number FROM Songs"); + while(q.next()) + ++max; + if(importType == "down") + { + progressDia->setCurrentMax(max); + progress.close(); + } + else + { + progress.setMaximum(max); + progress.show(); + } + + QSqlDatabase::database().transaction(); + // Prepare and save songbook + q.exec("SELECT title, info from SongBook"); + q.first(); + sq.prepare("INSERT INTO Songbooks (name,info) VALUES(?,?)"); + sq.addBindValue(q.value(0)); + sq.addBindValue(q.value(1)); + sq.exec(); + sq.clear(); + sq.exec("SELECT seq FROM sqlite_sequence WHERE name = 'Songbooks'"); + sq.first(); + int sbookid = sq.value(0).toInt(); + + // Get and insert songs + q.exec("SELECT * FROM Songs"); + sq.prepare("INSERT INTO Songs (songbook_id,number,title,category,tune,words,music,song_text,notes," + "use_private,alignment_v,alignment_h,color,font,info_color,info_font,ending_color," + "ending_font,use_background,background_name,background,count,date) " + "VALUES(:id, :num, :ti, :ca, :tu, :wo, :mu, :st, :no, :up, :av, :ah, :tc, :tf, " + ":ic, :if, :ec, :ef, :ub, :bn, :b, :ct, :d)"); + while(q.next()) + { + sq.bindValue(":id",sbookid); + sq.bindValue(":num",q.record().value("number")); + sq.bindValue(":ti",q.record().value("title")); + sq.bindValue(":ca",q.record().value("category")); + sq.bindValue(":tu",q.record().value("tune")); + sq.bindValue(":wo",q.record().value("words")); + sq.bindValue(":mu",q.record().value("music")); + QString st = q.record().value("song_text").toString(); + if(st.contains(QRegExp("@$|@%"))) + st = cleanSongLines(st); + sq.bindValue(":st",st); + sq.bindValue(":no",q.record().value("notes")); + sq.bindValue(":up",q.record().value("use_private")); + sq.bindValue(":av",q.record().value("alignment_v")); + sq.bindValue(":ah",q.record().value("alignment_h")); + sq.bindValue(":tc",q.record().value("color")); + sq.bindValue(":tf",q.record().value("font")); + sq.bindValue(":ic",q.record().value("info_color")); + sq.bindValue(":if",q.record().value("info_font")); + sq.bindValue(":ec",q.record().value("ending_color")); + sq.bindValue(":ef",q.record().value("ending_font")); + sq.bindValue(":ub",q.record().value("use_background")); + sq.bindValue(":bn",q.record().value("background_name")); + sq.bindValue(":b",q.record().value("background")); + sq.bindValue(":ct",q.record().value("count")); + sq.bindValue(":d",q.record().value("date")); + sq.exec(); + + ++row; + if(importType == "down") + progressDia->setCurrentValue(row); + else + progress.setValue(row); + } + progress.close(); + + QSqlDatabase::database().commit(); + } + else if(spsVer > 2) + { + QString errorm = tr("The SongBook file you are opening, is of a later release and \n" + "is not supported by current version of SoftProjector.\n" + "You are trying to open SongBook version %1.\n" + "Please upgrade to latest version of SoftProjector and try again.").arg(spsVer); + if(importType == "down") + progressDia->appendText(errorm); + else + { + QMessageBox mb(this); + mb.setWindowTitle(tr("Unsupported SongBook version.")); + mb.setText(errorm); + mb.setIcon(QMessageBox::Information); + mb.exec(); + } + } + else + { + QString errorm = tr("The SongBook file you are opening, is not supported \n" + "by current version of SoftProjector.\n"); + if(importType == "down") + progressDia->appendText(errorm); + else + { + QMessageBox mb(this); + mb.setWindowTitle(tr("Unsupported SongBook version.")); + mb.setText(errorm); + mb.setIcon(QMessageBox::Information); + mb.exec(); + } + } + } + } + QSqlDatabase::removeDatabase("sps"); + } + else// too old file format. + { + //User friednly box for incorrect file version + QString errorm = tr("The SongBook file you are opening, is in very old format\n" + "and is no longer supported by current version of SoftProjector.\n" + "You may try to import it with version 1.07 and then export it, and import it again."); + if(importType == "down") + progressDia->appendText(errorm); + else + { + QMessageBox mb(this); + mb.setWindowTitle(tr("Too old SongBook file format")); + mb.setText(errorm); + mb.setIcon(QMessageBox::Information); + mb.exec(); + } + } + } + + if(importType == "local") + load_songbooks(); + setArrowCursor(); + importModules(); +} + +void ManageDataDialog::on_export_songbook_pushButton_clicked() +{ + QString file_path = QFileDialog::getSaveFileName(this,tr("Save the songbook as:"), + ".",tr("SoftProjector songbook file (*.sps)")); + if(!file_path.isEmpty()) + { + if(!file_path.endsWith(".sps")) + file_path = file_path + ".sps"; + exportSongbook(file_path); + } +} + +void ManageDataDialog::exportSongbook(QString path) +{ + setWaitCursor(); + int row = ui->songbookTableView->currentIndex().row(); + QString songbook_id = songbook_model->getSongbook(row).songbookId; + QSqlQuery sq; + QString title; + + // First Delete file if one already exists + if(QFile::exists(path)) + { + if(!QFile::remove(path)) + { + QMessageBox mb(this); + mb.setText(tr("An error has ocured when overwriting existing file.\n" + "Please try again with different file name.")); + mb.setIcon(QMessageBox::Information); + mb.setStandardButtons(QMessageBox::Ok); + mb.exec(); + return; + } + } + + { + // Prepare SQLite songbook database file + QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE","sps"); + db.setDatabaseName(path); + if(db.open()) + { + db.transaction(); + QSqlQuery q(db); + q.exec("PRAGMA user_version = 2"); + q.exec("CREATE TABLE 'SongBook' ('title' TEXT, 'info' TEXT)"); + q.exec("CREATE TABLE 'Songs' ('number' INTEGER, 'title' TEXT, 'category' INTEGER DEFAULT 0, " + "'tune' TEXT, 'words' TEXT, 'music' TEXT, 'song_text' TEXT, 'notes' TEXT, " + "'use_private' BOOL, 'alignment_v' INTEGER, 'alignment_h' INTEGER, 'color' INTEGER, 'font' TEXT, " + "'info_color' INTEGER, 'info_font' TEXT, 'ending_color' INTEGER, 'ending_font' TEXT, " + "'use_background' BOOL, 'background_name' TEXT, 'background' BLOB, 'count' INTEGER DEFAULT 0, 'date' TEXT)"); + + // Get/Write SongBook information + sq.exec("SELECT name, info FROM Songbooks WHERE id = " + songbook_id); + sq.first(); + + q.prepare("INSERT INTO SongBook (title,info) VALUES(?,?)"); + q.addBindValue(sq.value(0)); + q.addBindValue(sq.value(1)); + q.exec(); + q.clear(); + title = sq.value(0).toString(); + sq.clear(); + + // Write Songs + sq.exec("SELECT * FROM Songs WHERE songbook_id = " + songbook_id); + q.prepare("INSERT INTO Songs (number,title,category,tune,words,music,song_text,notes," + "use_private,alignment_v,alignment_h,color,font,info_color,info_font,ending_color,ending_font," + "use_background,background_name,background,count,date) " + "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + while(sq.next()) + { + q.addBindValue(sq.record().value("number")); + q.addBindValue(sq.record().value("title")); + q.addBindValue(sq.record().value("category")); + q.addBindValue(sq.record().value("tune")); + q.addBindValue(sq.record().value("words")); + q.addBindValue(sq.record().value("music")); + q.addBindValue(sq.record().value("song_text")); + q.addBindValue(sq.record().value("notes")); + q.addBindValue(sq.record().value("use_private")); + q.addBindValue(sq.record().value("alignment_v")); + q.addBindValue(sq.record().value("alignment_h")); + q.addBindValue(sq.record().value("color")); + q.addBindValue(sq.record().value("font")); + q.addBindValue(sq.record().value("info_color")); + q.addBindValue(sq.record().value("info_font")); + q.addBindValue(sq.record().value("ending_color")); + q.addBindValue(sq.record().value("ending_font")); + q.addBindValue(sq.record().value("use_background")); + q.addBindValue(sq.record().value("background_name")); + q.addBindValue(sq.record().value("background")); + q.addBindValue(sq.record().value("count")); + q.addBindValue(sq.record().value("date")); + q.exec(); + } + db.commit(); + } + } + QSqlDatabase::removeDatabase("sps"); + + setArrowCursor(); + + QMessageBox mb(this); + mb.setWindowTitle(tr("Export complete")); + mb.setText(tr("The songbook \"") + title + tr("\"\nHas been saved to:\n ") + path); + mb.setIcon(QMessageBox::Information); + mb.exec(); +} + +void ManageDataDialog::on_delete_songbook_pushButton_clicked() +{ + int row = ui->songbookTableView->currentIndex().row(); + Songbook songbook = songbook_model->getSongbook(row); + QString name = songbook.title; + + QMessageBox ms(this); + ms.setWindowTitle(tr("Delete songbook?")); + ms.setText(tr("Are you sure that you want to delete: ")+ name); + ms.setInformativeText(tr("This action will permanentrly delete this songbook")); + ms.setIcon(QMessageBox::Question); + ms.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + ms.setDefaultButton(QMessageBox::Yes); + int ret = ms.exec(); + + switch (ret) { + case QMessageBox::Yes: + // Delete a songbook + deleteSongbook(songbook); + break; + case QMessageBox::No: + // Cancel was clicked + break; + default: + // should never be reached + break; + } +} + +void ManageDataDialog::deleteSongbook(Songbook songbook) +{ + setWaitCursor(); + reload_songbook = true; + QSqlQuery sq; + QString id = songbook.songbookId.trimmed(); + + // Delete from Songbook Table + sq.exec("DELETE FROM Songbooks WHERE id = '" + id + "'"); + sq.clear(); + + // Delete from Songs Table + sq.exec("DELETE FROM Songs WHERE songbook_id = '" + id +"'"); + + load_songbooks(); + updateSongbookButtons(); + setArrowCursor(); +} + +void ManageDataDialog::on_ok_pushButton_clicked() +{ + close(); +} + +void ManageDataDialog::on_import_bible_pushButton_clicked() +{ + QString file_path = QFileDialog::getOpenFileName(this, + tr("Select Bible file to import"), + ".",tr("SoftProjector Bible file ") + "(*.spb)"); + + importType = "local"; + // if file_path exits or "Open" is clicked, then import Bible + if( !file_path.isNull() ) + importBible(file_path); +} + +void ManageDataDialog::importBible(QString path) +{ + setWaitCursor(); + QFile file; + file.setFileName(path); + QString version; + QString line , title, abbr, info, rtol, id; + QStringList split; + QSqlQuery sq; + int row(0); + + if (file.open(QIODevice::ReadOnly)) + { + line = QString::fromUtf8(file.readLine()); // read version + // check file format and version + if (!line.startsWith("##spData")) // Old bible format verison + { + QString errorm = tr("The Bible format you are importing is of an usupported file version.\n" + "Your current SoftProjector version does not support this format."); + if(importType == "down") + progressDia->appendText(errorm); + else + { + QMessageBox mb(this); + mb.setWindowTitle(tr("Unsupported Bible file format")); + mb.setText(errorm); + mb.setIcon(QMessageBox::Critical); + mb.exec(); + } + file.close(); + return; + } + else if (line.startsWith("##spData")) //New bible format version + { + split = line.split("\t"); + version = split.at(1); + if (version.trimmed() != "1") // Version 1 + { + QString errorm = tr("The Bible format you are importing is of an new version.\n" + "Your current SoftProjector does not support this format.\n" + "Please upgrade SoftProjector to latest version."); + if(importType == "down") + progressDia->appendText(errorm); + else + { + QMessageBox mb(this); + mb.setWindowTitle(tr("New Bible file format")); + mb.setText(errorm); + mb.setIcon(QMessageBox::Critical); + mb.exec(); + } + file.close(); + return; + } + } + else + { + file.close(); + return; + } + + line = QString::fromUtf8(file.readLine()); // read title + split = line.split("\t"); + title = split.at(1); + line = QString::fromUtf8(file.readLine()); // read abbreviation + split = line.split("\t"); + abbr = split.at(1); + line = QString::fromUtf8(file.readLine()); // read info + split = line.split("\t"); + info = split.at(1); + // Convert bible information from single line to multiple line + QStringList info_list = info.split("@%"); + info.clear(); + for(int i(0); isetCurrentMax(31200); + progressDia->setCurrentValue(row); + } + else + progress.setValue(row); + + // add Bible Name and information + QSqlDatabase::database().transaction(); + sq.prepare("INSERT INTO BibleVersions (bible_name, abbreviation, information, right_to_left) VALUES (?,?,?,?)"); + sq.addBindValue(title.trimmed()); + sq.addBindValue(abbr.trimmed()); + sq.addBindValue(info.trimmed()); + sq.addBindValue(rtol.trimmed()); + sq.exec(); + QSqlDatabase::database().commit(); + sq.clear(); + + // get Bible id of newly added Bible + sq.exec("SELECT seq FROM sqlite_sequence WHERE name = 'BibleVersions'"); + sq.first() ; + id = sq.value(0).toString(); + sq.clear(); + + // If this bible is the first bible, reload bibles + if (id.trimmed() == "1") + reload_bible = true; + + // add Bible book names + line = QString::fromUtf8(file.readLine()); + QSqlDatabase::database().transaction(); + sq.prepare("INSERT INTO BibleBooks (bible_id, id, book_name, chapter_count) VALUES (?,?,?,?)"); + while (!line.startsWith("---")) + { + QString bk_id, bk_name, ch_count; + split = line.split("\t"); + bk_id = split.at(0); + bk_name = split.at(1); + ch_count = split.at(2); + + sq.addBindValue(id); + sq.addBindValue(bk_id.trimmed()); + sq.addBindValue(bk_name.trimmed()); + sq.addBindValue(ch_count.trimmed()); + sq.exec(); + + line = QString::fromUtf8(file.readLine()); + ++row; + if(importType == "down") + progressDia->setCurrentValue(row); + else + progress.setValue(row); + } + QSqlDatabase::database().commit(); + sq.clear(); + + // add bible verses + QSqlDatabase::database().transaction(); + sq.prepare("INSERT INTO BibleVerse (verse_id, bible_id, book, chapter, verse, verse_text)" + "VALUES (?,?,?,?,?,?)"); + while (!file.atEnd()) + { + if (progress.wasCanceled() && importType == "local") + break; + + line = QString::fromUtf8(file.readLine()); + split = line.split("\t"); + sq.addBindValue(split.at(0)); + sq.addBindValue(id); + sq.addBindValue(split.at(1)); + sq.addBindValue(split.at(2)); + sq.addBindValue(split.at(3)); + sq.addBindValue(split.at(4)); + sq.exec(); + + ++row; + if(importType == "down") + progressDia->setCurrentValue(row); + else + progress.setValue(row); + } + QSqlDatabase::database().commit(); + + file.close(); + } + + if(importType == "local") + load_bibles(); + setArrowCursor(); + importModules(); +} + +void ManageDataDialog::on_export_bible_pushButton_clicked() +{ + int row = ui->bibleTableView->currentIndex().row(); + Bibles bible = bible_model->getBible(row); + + QString file_path = QFileDialog::getSaveFileName(this,tr("Save exported Bible as:"), + clean(bible.title), + tr("SoftProjector Bible file ") + "(*.spb)"); + if(!file_path.isEmpty()) + { + if(!file_path.endsWith(".spb")) + file_path = file_path + ".spb"; + exportBible(file_path,bible); + } +} + +void ManageDataDialog::exportBible(QString path, Bibles bible) +{ + setWaitCursor(); + QProgressDialog progress(tr("Exporting..."), tr("Cancel"), 0, 31000, this); + int p(1); + progress.setValue(p); + + QSqlQuery sq; + QString id = bible.bibleId; + QString to_file = "##spDataVersion:\t1\n"; // SoftProjector bible file version number is 1 as of 2/26/2011 + + QString title, abbr, info, rtol; + + // get Bible version information + sq.exec("SELECT bible_name, abbreviation, information, right_to_left FROM BibleVersions WHERE id = " + id ); + sq.first(); + title = sq.value(0).toString().trimmed(); + abbr = sq.value(1).toString().trimmed(); + info = sq.value(2).toString().trimmed(); + rtol = sq.value(3).toString().trimmed(); + sq.clear(); + + // Convert bible information from multiline to single line + QStringList info_list = info.split("\n"); + info = info_list[0]; + qDebug()<< QString::number(info_list.size()); + for(int i(1); ibibleTableView->currentIndex().row(); + Bibles bible = bible_model->getBible(row); + QString name = bible.title; + + QMessageBox ms(this); + ms.setWindowTitle(tr("Delete Bible?")); + ms.setText(tr("Are you sure that you want to delete: ")+ name); + ms.setInformativeText(tr("This action will permanentrly delete this Bible")); + ms.setIcon(QMessageBox::Question); + ms.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + ms.setDefaultButton(QMessageBox::Yes); + int ret = ms.exec(); + + switch (ret) { + case QMessageBox::Yes: + // Delete a Bible + deleteBible(bible); + break; + case QMessageBox::No: + // Cancel was clicked + break; + default: + // should never be reached + break; + } +} + +void ManageDataDialog::deleteBible(Bibles bible) +{ + setWaitCursor(); + reload_bible = true; + QSqlQuery sq; + QString id = bible.bibleId.trimmed(); + + // Delete from BibleBooks Table + sq.exec("DELETE FROM BibleBooks WHERE bible_id = '" + id + "'"); + sq.clear(); + + // Delete form BibleVerse Table + sq.exec("DELETE FROM BibleVerse WHERE bible_id = '" + id +"'"); + sq.clear(); + + // Delete from BibleVersions Table + sq.clear(); + sq.exec("DELETE FROM BibleVersions WHERE id = '" + id +"'"); + + load_bibles(); + setArrowCursor(); +} + +void ManageDataDialog::on_edit_songbook_pushButton_clicked() +{ + int row = ui->songbookTableView->currentIndex().row(); + Songbook songbook = songbook_model->getSongbook(row); + QSqlTableModel sq; + QSqlRecord sr; + + AddSongbookDialog songbook_dialog; + songbook_dialog.setWindowTitle(tr("Edit Songbook")); + songbook_dialog.setSongbook(songbook.title,songbook.info); + int ret = songbook_dialog.exec(); + switch(ret) + { + case AddSongbookDialog::Accepted: + reload_songbook = true; + sq.setTable("Songbooks"); + sq.setFilter("id = " + songbook.songbookId); + sq.select(); + sr = sq.record(0); + sr.setValue(1,songbook_dialog.title.trimmed()); + sr.setValue(2,songbook_dialog.info.trimmed()); + sq.setRecord(0,sr); + sq.submitAll(); + break; + case AddSongbookDialog::Rejected: + break; + } + + load_songbooks(); +} + +void ManageDataDialog::on_edit_bible_pushButton_clicked() +{ + int row = ui->bibleTableView->currentIndex().row(); + Bibles bible = bible_model->getBible(row); + QSqlTableModel sq; + QSqlRecord sr; + int r(0); + + BibleInformationDialog bible_info; + bible_info.setBibleIformation(bible.title,bible.abbr,bible.info,bible.isRtoL); + + int ret = bible_info.exec(); + switch(ret) + { + case BibleInformationDialog::Accepted: + sq.setTable("BibleVersions"); + sq.setFilter("id = " + bible.bibleId.trimmed()); + sq.select(); + sr = sq.record(0); + sr.setValue(1,bible_info.title.trimmed()); + sr.setValue(2,bible_info.abbr.trimmed()); + sr.setValue(3,bible_info.info.trimmed()); + if(!bible_info.isRtoL) + r = 0; + else if (bible_info.isRtoL) + r = 1; + sr.setValue(4,r); + sq.setRecord(0,sr); + sq.submitAll(); + break; + case BibleInformationDialog::Rejected: + break; + } + + load_bibles(); +} + +void ManageDataDialog::on_bibleTableView_clicked(QModelIndex index) +{ + updateBibleButtons(); +} + +void ManageDataDialog::on_songbookTableView_clicked(QModelIndex index) +{ + updateSongbookButtons(); +} + +void ManageDataDialog::setArrowCursor() +{ + this->setCursor(Qt::ArrowCursor); + emit setMainArrowCursor(); +} + +void ManageDataDialog::setWaitCursor() +{ + this->setCursor(Qt::WaitCursor); + emit setMainWaitCursor(); +} + +QString ManageDataDialog::getVerseId(QString book, QString chapter, QString verse) +{ + QString id; + id = "B" + get3(book.toInt()) + "C" + get3(chapter.toInt()) + "V" + get3(verse.toInt()); + return id; +} + +QString ManageDataDialog::get3(int i) +{ + QString st; + if (i>=100) + { + st = st.number(i); + } + else if (i>=10) + { + st = "0" + st.number(i); + } + else + { + st = "00" + st.number(i); + } + return st; +} + +void ManageDataDialog::toMultiLine(QString &mline) +{ + QStringList line_list = mline.split("@%"); + mline.clear(); + for(int i(0); isetCurrentMax(max); + else + { + progress.setMaximum(max); + progress.setLabelText(tr("Importing Themes...")); + progress.show(); + } + QSqlDatabase::database().transaction(); + // Get Themes + q.exec("SELECT id, name, comment FROM Themes"); + while(q.next()) + { + sq.prepare("INSERT INTO Themes (name,comment) VALUES(?,?)"); + int spitidFrom = q.value(0).toInt(); + sq.addBindValue(q.value(1)); + sq.addBindValue(q.value(2)); + sq.exec(); + sq.clear(); + sq.exec("SELECT seq FROM sqlite_sequence WHERE name = 'Themes'"); + sq.first(); + int sptidTo = sq.value(0).toInt(); + sq.clear(); + + ++row; + if(importType == "down") + progressDia->setCurrentValue(row); + else + progress.setValue(row); + + // Import Announce Theme + q2.exec(QString("SELECT * FROM ThemeAnnounce WHERE theme_id = %1").arg(spitidFrom)); + transferThemeAnnounce(q2,sq,sptidTo); + + ++row; + if(importType == "down") + progressDia->setCurrentValue(row); + else + progress.setValue(row); + + // Import Bible Theme + q2.exec(QString("SELECT * FROM ThemeBible WHERE theme_id = %1").arg(spitidFrom)); + transferThemeBible(q2,sq,sptidTo); + + ++row; + if(importType == "down") + progressDia->setCurrentValue(row); + else + progress.setValue(row); + + // Import Passive Theme + q2.exec(QString("SELECT * FROM ThemePassive WHERE theme_id = %1").arg(spitidFrom)); + transferThemePassive(q2,sq,sptidTo); + + ++row; + if(importType == "down") + progressDia->setCurrentValue(row); + else + progress.setValue(row); + + // Import Songs Theme + q2.exec(QString("SELECT * FROM ThemeSong WHERE theme_id = %1").arg(spitidFrom)); + transferThemeSong(q2,sq,sptidTo); + + ++row; + if(importType == "down") + progressDia->setCurrentValue(row); + else + progress.setValue(row); + } + QSqlDatabase::database().commit(); + } + else if(sptVer > 2) + { + QString errorm = tr("The Theme file you are opening, is of a later release and \n" + "is not supported by current version of SoftProjector.\n" + "You are trying to open Theme version %1.\n" + "Please upgrade to latest version of SoftProjector and try again.").arg(sptVer); + if(importType == "down") + progressDia->appendText(errorm); + else + { + QMessageBox mb(this); + mb.setWindowTitle(tr("Unsupported Theme version.")); + mb.setText(errorm); + mb.setIcon(QMessageBox::Information); + mb.exec(); + } + } + else + { + QString errorm = tr("The Theme file you are opening, is not supported \n" + "by current version of SoftProjector.\n"); + if(importType == "down") + progressDia->appendText(errorm); + else + { + QMessageBox mb(this); + mb.setWindowTitle(tr("Unsupported Theme version.")); + mb.setText(errorm); + mb.setIcon(QMessageBox::Information); + mb.exec(); + } + } + setArrowCursor(); + progress.close(); + } + } + QSqlDatabase::removeDatabase("spt"); + + loadThemes(); + importModules(); +} + +void ManageDataDialog::on_pushButtonThemeEdit_clicked() +{ + int row = ui->TableViewTheme->currentIndex().row(); + ThemeInfo theme = themeModel->getTheme(row); + QSqlQuery sq; + + AddSongbookDialog theme_dia; + theme_dia.setWindowTitle(tr("Edit Theme")); + theme_dia.setWindowText(tr("Theme Name:"),tr("Comments:")); + theme_dia.setSongbook(theme.name,theme.comments); + int ret = theme_dia.exec(); + switch(ret) + { + case AddSongbookDialog::Accepted: + reloadThemes = true; + sq.prepare("UPDATE Themes SET name = ?, comment = ? WHERE id = ?"); + sq.addBindValue(theme_dia.title); + sq.addBindValue(theme_dia.info); + sq.addBindValue(theme.themeId); + sq.exec(); + loadThemes(); + break; + case AddSongbookDialog::Rejected: + break; + } +} + +void ManageDataDialog::on_pushButtonThemeExport_clicked() +{ + int row = ui->TableViewTheme->currentIndex().row(); + ThemeInfo tmInfo = themeModel->getTheme(row); + + QString file_path = QFileDialog::getSaveFileName(this,tr("Export Theme as:"), + clean(tmInfo.name), + tr("SoftProjector Theme file ") + "(*.spt)"); + if(!file_path.isEmpty()) + { + if(!file_path.endsWith(".spt")) + file_path = file_path + ".spt"; + exportTheme(file_path,false); + } +} + +void ManageDataDialog::on_pushButtonThemeExportAll_clicked() +{ + QString file_path = QFileDialog::getSaveFileName(this,tr("Export all theme as:"), + ".", tr("softProjector Theme file ") + "(*.spt)"); + if(!file_path.isEmpty()) + { + if(!file_path.endsWith(".spt")) + file_path = file_path + ".spt"; + exportTheme(file_path,true); + } +} + +void ManageDataDialog::exportTheme(QString path, bool all) +{ + // Delete Existing File + bool db_exist = QFile::exists(path); + if(db_exist) + { + if(!QFile::remove(path)) + { + QMessageBox mb(this); + mb.setText(tr("An error has ocured when overwriting existing file.\n" + "Please try again with different file name.")); + mb.setIcon(QMessageBox::Information); + mb.setStandardButtons(QMessageBox::Ok); + mb.exec(); + return; + } + } + + setWaitCursor(); + QProgressDialog progress; + progress.setMaximum(5); + progress.setLabelText(tr("Exporting Themes...")); + progress.setValue(0); + progress.show(); + + // Create new Theme DB + { + QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE","spt"); + db.setDatabaseName(path); + if(db.open()) + { + db.transaction(); + QSqlQuery sqf; + QSqlQuery sqt(db); + sqt.exec("PRAGMA user_version = 2"); + 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)"); + 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)"); + sqt.exec("CREATE TABLE 'ThemePassive' ('theme_id' INTEGER, 'disp' INTEGER, 'use_background' BOOL, " + "'background_name' TEXT, 'background' BLOB, 'use_disp_2' 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)"); + sqt.exec("CREATE TABLE 'Themes' ('id' INTEGER , 'name' TEXT, 'comment' TEXT)"); + + if(all) + { + // Export Theme + sqf.exec("SELECT * FROM Themes"); + transferTheme(sqf,sqt); + progress.setValue(1); + + // Export Announce Theme + sqf.exec("SELECT * FROM ThemeAnnounce"); + transferThemeAnnounce(sqf,sqt,-1); + progress.setValue(2); + + // Export Bible Theme + sqf.exec("SELECT * FROM ThemeBible"); + transferThemeBible(sqf,sqt,-1); + progress.setValue(3); + + // Export Passive Theme + sqf.exec("SELECT * FROM ThemePassive"); + transferThemePassive(sqf,sqt,-1); + progress.setValue(4); + + // Export Songs Theme + sqf.exec("SELECT * FROM ThemeSong"); + transferThemeSong(sqf,sqt,-1); + progress.setValue(5); + } + else + { + int row = ui->TableViewTheme->currentIndex().row(); + ThemeInfo tmInfo = themeModel->getTheme(row); + + // Export Theme + sqf.exec(QString("SELECT * FROM Themes WHERE id = %1").arg(tmInfo.themeId)); + transferTheme(sqf,sqt); + progress.setValue(1); + + // Export Announce Theme + sqf.exec(QString("SELECT * FROM ThemeAnnounce WHERE theme_id = %1").arg(tmInfo.themeId)); + transferThemeAnnounce(sqf,sqt,-1); + progress.setValue(2); + + // Export Bible Theme + sqf.exec(QString("SELECT * FROM ThemeBible WHERE theme_id = %1").arg(tmInfo.themeId)); + transferThemeBible(sqf,sqt,-1); + progress.setValue(3); + + // Export Passive Theme + sqf.exec(QString("SELECT * FROM ThemePassive WHERE theme_id = %1").arg(tmInfo.themeId)); + transferThemePassive(sqf,sqt,-1); + progress.setValue(4); + + // Export Songs Theme + sqf.exec(QString("SELECT * FROM ThemeSong WHERE theme_id = %1").arg(tmInfo.themeId)); + transferThemeSong(sqf,sqt,-1); + progress.setValue(5); + } + db.commit(); + } + } + QSqlDatabase::removeDatabase("spt"); + setArrowCursor(); +} + +void ManageDataDialog::transferTheme(QSqlQuery &sqf, QSqlQuery &sqt) +{ + sqt.prepare("INSERT INTO Themes (id, name, comment) VALUES(:id, :na, :co)"); + + while(sqf.next()) + { + sqt.bindValue(":id",sqf.record().value("id")); + sqt.bindValue(":na",sqf.record().value("name")); + sqt.bindValue(":co",sqf.record().value("comment")); + sqt.exec(); + } +} + +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) " + "VALUES(:id, :di, :us, :uf, :uu, :ub, :bn, :ba, :tf, :tc, :av, :ah, :ud)"); + + while(sqf.next()) + { + if(tmId > 0) + sqt.bindValue(":id",tmId); + else + sqt.bindValue(":id",sqf.record().value("theme_id")); + sqt.bindValue(":di",sqf.record().value("disp")); + sqt.bindValue(":us",sqf.record().value("use_shadow")); + sqt.bindValue(":uf",sqf.record().value("use_fading")); + sqt.bindValue(":uu",sqf.record().value("use_blur_shadow")); + 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(":tf",sqf.record().value("text_font")); + 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.exec(); + } +} + +void ManageDataDialog::transferThemeBible(QSqlQuery &sqf, QSqlQuery &sqt, int tmId) +{ + 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) " + "VALUES(:id, :di, :us, :uf, :uu, :ub, :bn, :ba, :tf, :tc, :av, :ah, :cf, :cc, :ca, :cp, " + ":ua, :su, :sp, :ud)"); + + while(sqf.next()) + { + if(tmId > 0) + sqt.bindValue(":id",tmId); + else + sqt.bindValue(":id",sqf.record().value("theme_id")); + sqt.bindValue(":di",sqf.record().value("disp")); + sqt.bindValue(":us",sqf.record().value("use_shadow")); + sqt.bindValue(":uf",sqf.record().value("use_fading")); + sqt.bindValue(":uu",sqf.record().value("use_blur_shadow")); + 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(":tf",sqf.record().value("text_font")); + 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(":cf",sqf.record().value("caption_font")); + sqt.bindValue(":cc",sqf.record().value("caption_color")); + sqt.bindValue(":ca",sqf.record().value("caption_align")); + sqt.bindValue(":cp",sqf.record().value("caption_position")); + 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.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) " + "VALUES(:id, :di, :ub, :bn, :ba, :ud)"); + + while(sqf.next()) + { + if(tmId > 0) + sqt.bindValue(":id",tmId); + else + sqt.bindValue(":id",sqf.record().value("theme_id")); + sqt.bindValue(":di",sqf.record().value("disp")); + 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.exec(); + } +} + +void ManageDataDialog::transferThemeSong(QSqlQuery &sqf, QSqlQuery &sqt, int tmId) +{ + 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) " + "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)"); + + while(sqf.next()) + { + if(tmId > 0) + sqt.bindValue(":id",tmId); + else + sqt.bindValue(":id",sqf.record().value("theme_id")); + sqt.bindValue(":di",sqf.record().value("disp")); + sqt.bindValue(":us",sqf.record().value("use_shadow")); + sqt.bindValue(":uf",sqf.record().value("use_fading")); + sqt.bindValue(":uu",sqf.record().value("use_blur_shadow")); + sqt.bindValue(":ss",sqf.record().value("show_stanza_title")); + sqt.bindValue(":sk",sqf.record().value("show_key")); + sqt.bindValue(":sn",sqf.record().value("show_number")); + sqt.bindValue(":ic",sqf.record().value("info_color")); + sqt.bindValue(":if",sqf.record().value("info_font")); + sqt.bindValue(":ia",sqf.record().value("info_align")); + sqt.bindValue(":se",sqf.record().value("show_song_ending")); + sqt.bindValue(":ec",sqf.record().value("ending_color")); + sqt.bindValue(":ef",sqf.record().value("ending_font")); + sqt.bindValue(":et",sqf.record().value("ending_type")); + sqt.bindValue(":ep",sqf.record().value("ending_position")); + 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(":tf",sqf.record().value("text_font")); + 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(":su",sqf.record().value("screen_use")); + sqt.bindValue(":sp",sqf.record().value("screen_position")); + sqt.bindValue(":ud",sqf.record().value("use_disp_2")); + sqt.exec(); + } +} + +void ManageDataDialog::on_pushButtonThemeDelete_clicked() +{ + int row = ui->TableViewTheme->currentIndex().row(); + ThemeInfo tm = themeModel->getTheme(row); + QString name = tm.name; + + QMessageBox ms(this); + ms.setWindowTitle(tr("Delete Theme?")); + ms.setText(tr("Are you sure that you want to delete theme: ")+ name); + ms.setInformativeText(tr("This action will permanentrly delete this theme")); + ms.setIcon(QMessageBox::Question); + ms.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + ms.setDefaultButton(QMessageBox::Yes); + int ret = ms.exec(); + + switch (ret) { + case QMessageBox::Yes: + // Delete a songbook + deleteTheme(tm); + break; + case QMessageBox::No: + // Cancel was clicked + break; + default: + // should never be reached + break; + } +} + +void ManageDataDialog::deleteTheme(ThemeInfo tme) +{ + setWaitCursor(); + QSqlQuery sq; + int id = tme.themeId; + reloadThemes = true; + + // Delete from Themes Table + sq.exec("DELETE FROM Themes WHERE id = " + QString::number(id)); + sq.clear(); + + // Delete from ThemeData Table + sq.exec("DELETE FROM ThemePassive WHERE theme_id = " + QString::number(id)); + sq.exec("DELETE FROM ThemeBible WHERE theme_id = " + QString::number(id)); + sq.exec("DELETE FROM ThemeSong WHERE theme_id = " + QString::number(id)); + sq.exec("DELETE FROM ThemeAnnounce WHERE theme_id = " + QString::number(id)); + + loadThemes(); + updateThemeButtons(); + setArrowCursor(); +} + +void ManageDataDialog::on_TableViewTheme_clicked(const QModelIndex &index) +{ + updateThemeButtons(); +} + +void ManageDataDialog::on_pushButtonDownBible_clicked() +{ + downType = "bible"; + importType = "down"; + downloadModList(QUrl("http://softprojector.org/bibles/bible.xml")); +} + +void ManageDataDialog::on_pushButtonDownSong_clicked() +{ + downType = "song"; + importType = "down"; + downloadModList(QUrl("http://softprojector.org/songbooks/songbooks.xml")); +} + +void ManageDataDialog::on_pushButtonDownTheme_clicked() +{ + downType = "theme"; + importType = "down"; + downloadModList(QUrl("http://softprojector.org/themes/themes.xml")); +} + +void ManageDataDialog::downloadModList(QUrl url) +{ + QString filename = getSaveFileName(url); + outFile.setFileName(filename); + if(!outFile.open(QIODevice::WriteOnly)) + { + //Fixme: need error message + QMessageBox mb(this); + mb.setWindowTitle(tr("Error opening module list.")); + mb.setIcon(QMessageBox::Critical); + mb.setText(tr("Failed to open mod list")); + mb.exec(); + currentDownload->deleteLater(); + return; + } + + QNetworkRequest request(url); + currentDownload = downManager.get(request); + connect(currentDownload,SIGNAL(finished()),this,SLOT(downloadModListCompleted())); + connect(currentDownload,SIGNAL(readyRead()),this,SLOT(saveModFile())); +} + +void ManageDataDialog::downloadNextMod() +{ + if(downQueue.empty()) + { + progressDia->setSpeed(""); + importModules(); + return; + } + Module mod; + mod = downQueue.dequeue(); + progressDia->appendText(tr("\nDownloading: %1\nFrom: %2").arg(mod.name).arg(mod.link.toString())); + progressDia->setCurrentMax(mod.size); + progressDia->setCurrentValue(0); + QString filename = getSaveFileName(mod.link); + outFile.setFileName(filename); + if(!outFile.open(QIODevice::WriteOnly)) + { + progressDia->appendText(tr("Error opening save file %1 for download %2\nError: %3") + .arg(filename).arg(mod.name).arg(outFile.errorString())); + downloadNextMod(); + return; + } + + QNetworkRequest request(mod.link); + currentDownload = downManager.get(request); + connect(currentDownload,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(dowloadProgress(qint64,qint64))); + connect(currentDownload,SIGNAL(finished()),this,SLOT(downloadCompleted())); + connect(currentDownload,SIGNAL(readyRead()),this,SLOT(saveModFile())); + downTime.start(); +} + +QString ManageDataDialog::getSaveFileName(QUrl url) +{ + QString path = url.path(); + QString basename = QFileInfo(path).fileName(); + + if (basename.isEmpty()) + basename = "download"; + + QDir dir = dataDir; + if(downType == "bible") + { + if(!dir.cd("BibleModules")) + { + if(dir.mkdir("BibleModules")) + dir.cd("BibleModules"); + } + path = dir.absolutePath() + dir.separator() + basename; + } + else if(downType == "song") + { + if(!dir.cd("SongModules")) + { + if(dir.mkdir("SongModules")) + dir.cd("SongModules"); + } + path = dir.absolutePath() + dir.separator() + basename; + } + else if(downType == "theme") + { + if(!dir.cd("ThemeModules")) + { + if(dir.mkdir("ThemeModules")) + dir.cd("ThemeModules"); + } + path = dir.absolutePath() + dir.separator() + basename; + } + else + path = dir.absolutePath() + dir.separator() + basename; + + if (QFile::exists(path)) + { + // File already exist, overwrite it + if(!QFile::remove(path)) + { + QRegExp rx("(.sps|.spb|.spt|.xml)"); + rx.indexIn(basename); + basename = basename.remove(rx); + + int i(1); + while(QFile::exists(QString("%1%2%3_%4%5").arg(dir.absolutePath()).arg(dir.separator()) + .arg(basename).arg(i).arg(rx.cap(1)))) + ++i; + + path = QString("%1%2%3_%4%5").arg(dir.absolutePath()).arg(dir.separator()) + .arg(basename).arg(i).arg(rx.cap(1)); + } + } + + return path; +} + +void ManageDataDialog::saveModFile() +{ + outFile.write(currentDownload->readAll()); +} + +void ManageDataDialog::downloadModListCompleted() +{ + outFile.close(); + + if(currentDownload->error()) + { + QMessageBox mb(this); + mb.setWindowTitle(tr("Error downloading module list.")); + mb.setIcon(QMessageBox::Critical); + mb.setText(currentDownload->errorString()); + mb.exec(); + currentDownload->deleteLater(); + return; + } + + currentDownload->deleteLater(); + + QStringList modlist; + modlist = getModList(outFile.fileName()); + if(modlist.count()<=0) + return; + + ModuleDownloadDialog modDia(this); + if(downType == "bible") + modDia.setWindowTitle(tr("Bible Module Download")); + else if(downType == "song") + modDia.setWindowTitle(tr("Songbook Module Download")); + else if(downType == "theme") + modDia.setWindowTitle(tr("Theme Module Download")); + + modDia.setList(modlist); + int ret = modDia.exec(); + QList mods; + switch (ret) + { + case ModuleDownloadDialog::Accepted: + mods = modDia.getSelected(); + if(mods.count()<=0) + break; + foreach(const int &modrow, mods) + downQueue.enqueue(moduleList.at(modrow)); + progressDia->clearAll(); + progressDia->setTotalMax((mods.count()*2) +1); + progressDia->show(); + downloadNextMod(); + break; + case ModuleDownloadDialog::Rejected: + break; + } +} + +void ManageDataDialog::downloadCompleted() +{ + outFile.close(); + + if(currentDownload->error()) + progressDia->appendText(tr("Download Error: %1").arg(currentDownload->errorString())); + else + { + modQueue.enqueue(outFile.fileName()); + progressDia->appendText(tr("Saved to: %1").arg(outFile.fileName())); + progressDia->increaseTotal(); + } + currentDownload->deleteLater(); + downloadNextMod(); +} + +void ManageDataDialog::dowloadProgress(qint64 recBytes, qint64 totBytes) +{ + progressDia->setCurrentValue(recBytes); + + // calculate the download speed + double speed = recBytes * 1000.0 / downTime.elapsed(); + QString unit; + if (speed < 1024) + unit = "bytes/sec"; + else if (speed < 1024*1024) + { + speed /= 1024; + unit = "kB/s"; + } + else + { + speed /= 1024*1024; + unit = "MB/s"; + } + + progressDia->setSpeed(QString("%1 %2").arg(speed, 3, 'f', 1).arg(unit)); +} + +QStringList ManageDataDialog::getModList(QString filepath) +{ + moduleList.clear(); + QStringList modList; + QString name,link; + int size(0); + QFile file(filepath); + Module mod; + if(file.open(QIODevice::ReadOnly)) + { + QXmlStreamReader xml(&file); + while(!xml.atEnd()) + { + xml.readNext(); + if(xml.StartElement && xml.name() == "Modules") + { + xml.readNext(); + while(xml.tokenString() != "EndElement" && xml.name() != "Modules") + { + xml.readNext(); + if(xml.StartElement && xml.name() == "Module") + { + xml.readNext(); + while(xml.tokenString() != "EndElement") + { + // qDebug()<<"loop2"; + xml.readNext(); + if(xml.StartElement && xml.name() == "name") + { + name = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "link") + { + link = xml.readElementText(); + xml.readNext(); + } + else if(xml.StartElement && xml.name() == "size") + { + size = xml.readElementText().toInt(); + xml.readNext(); + } + } + + mod.name = name; + mod.link = QUrl(link); + mod.size = size; + moduleList.append(mod); + modList.append(name); + xml.readNext(); + } + } + xml.readNext(); + } + } + } + return modList; +} + +void ManageDataDialog::importNextModule() +{ + if(modQueue.isEmpty()) + { + progressDia->enableCloseButton(true); + progressDia->setToMax(); + if(downType == "bible") + load_bibles(); + else if(downType == "song") + load_songbooks(); + else if(downType == "theme") + loadThemes(); + return; + } + + QString filePath = modQueue.dequeue(); + progressDia->appendText(tr("\nImporting: %1").arg(filePath)); + if(downType == "bible") + importBible(filePath); + else if(downType == "song") + importSongbook(filePath); + else if(downType == "theme") + importTheme(filePath); +} + +void ManageDataDialog::importModules() +{ + if(importType == "down") + { + progressDia->increaseTotal(); + importNextModule(); + } +} + +QString ManageDataDialog::cleanSongLines(QString songText) +{ + QString text, text2, verselist; + QStringList split, editlist; + int i(0),j(0),k(0); + + editlist = songText.split("@$");// split the text into verses seperated by @$ + + while (i . +// +***************************************************************************/ + +#ifndef MANAGEDATADIALOG_H +#define MANAGEDATADIALOG_H + +#include +#include +#include +#include + +#include "managedata.h" +#include "song.h" +#include "addsongbookdialog.h" +#include "bibleinformationdialog.h" +#include "theme.h" +#include "moduledownloaddialog.h" +#include "moduleprogressdialog.h" + +namespace Ui { +class ManageDataDialog; +} + +class Module +{ +public: + Module(); + QString name; + QUrl link; + int size; +}; + +class ManageDataDialog : public QDialog { + Q_OBJECT + Q_DISABLE_COPY(ManageDataDialog) +public: + explicit ManageDataDialog(QWidget *parent = 0); + virtual ~ManageDataDialog(); + bool reload_bible; + bool reload_songbook; + bool reloadThemes; + +public slots: + void load_songbooks(); + void loadThemes(); + void setDataDir(QDir &d){dataDir = d;} + +protected: + virtual void changeEvent(QEvent *e); + +signals: + void setMainWaitCursor(); + void setMainArrowCursor(); + +private: + QList bible_list; + QList songbook_list; + QList themeList; + BiblesModel *bible_model; + SongbooksModel *songbook_model; + ThemeModel *themeModel; + QNetworkAccessManager downManager; + QNetworkReply *modDownload; + QNetworkReply *currentDownload; + QQueue downQueue; + QQueue modQueue; + QString downType; + QString importType; + QDir dataDir; + QFile outFile; + QList moduleList; + ModuleProgressDialog *progressDia; + QTime downTime; + Ui::ManageDataDialog *ui; + +private slots: + QString get3(int i); + QString getVerseId(QString book, QString chapter, QString verse); + void setWaitCursor(); + void setArrowCursor(); + void on_songbookTableView_clicked(QModelIndex index); + void on_bibleTableView_clicked(QModelIndex index); + void updateBibleButtons(); + void updateSongbookButtons(); + void updateThemeButtons(); + void on_edit_bible_pushButton_clicked(); + void on_edit_songbook_pushButton_clicked(); + void on_delete_bible_pushButton_clicked(); + void on_export_bible_pushButton_clicked(); + void on_import_bible_pushButton_clicked(); + void on_ok_pushButton_clicked(); + void on_delete_songbook_pushButton_clicked(); + void on_export_songbook_pushButton_clicked(); + void on_import_songbook_pushButton_clicked(); + void deleteBible(Bibles bilbe); + void importBible(QString path); + void exportBible(QString path, Bibles bible); + void deleteSongbook(Songbook songbook); + void importSongbook(QString path); + void exportSongbook(QString path); + void load_bibles(); + void toMultiLine(QString& mline); + void toSingleLine(QString& sline); + void on_pushButtonThemeNew_clicked(); + void on_pushButtonThemeImport_clicked(); + void on_pushButtonThemeEdit_clicked(); + void on_pushButtonThemeExport_clicked(); + void on_pushButtonThemeDelete_clicked(); + void on_TableViewTheme_clicked(const QModelIndex &index); + void deleteTheme(ThemeInfo tme); + void on_pushButtonThemeExportAll_clicked(); + void exportTheme(QString path, bool all); + void transferTheme(QSqlQuery &sqf,QSqlQuery &sqt); + void transferThemeAnnounce(QSqlQuery &sqf,QSqlQuery &sqt,int tmId); + void transferThemeBible(QSqlQuery &sqf,QSqlQuery &sqt,int tmId); + void transferThemePassive(QSqlQuery &sqf,QSqlQuery &sqt,int tmId); + void transferThemeSong(QSqlQuery &sqf,QSqlQuery &sqt,int tmId); + void importTheme(QString path); + void on_pushButtonDownBible_clicked(); + void on_pushButtonDownSong_clicked(); + void on_pushButtonDownTheme_clicked(); + + void downloadModList(QUrl url); + void downloadNextMod(); + QString getSaveFileName(QUrl url); + void saveModFile(); + void downloadModListCompleted(); + void downloadCompleted(); + void dowloadProgress(qint64 recBytes,qint64 totBytes); + QStringList getModList(QString filepath); + void importNextModule(); + void importModules(); + QString cleanSongLines(QString songText); +}; + +#endif // MANAGEDATADIALOG_H diff --git a/managedatadialog.ui b/managedatadialog.ui new file mode 100644 index 0000000..2b930c9 --- /dev/null +++ b/managedatadialog.ui @@ -0,0 +1,403 @@ + + + ManageDataDialog + + + + 0 + 0 + 657 + 404 + + + + Manage Database + + + + :/icons/icons/database.png:/icons/icons/database.png + + + true + + + + + + Qt::Horizontal + + + + 216 + 20 + + + + + + + + Close Manage Database Dialog + + + Close + + + Ctrl+Q + + + + + + + 0 + + + + + :/icons/icons/book.png:/icons/icons/book.png + + + Bibles + + + + + + true + + + false + + + + + + + + + true + + + Download +&& Import... + + + + + + + Import a new Bible into your database + + + &Import... + + + Ctrl+I + + + false + + + + + + + Edit Bible title of currently selected Bible. + + + &Edit... + + + Ctrl+E + + + + + + + Export currently selected Bible to share with others. + + + E&xport... + + + Ctrl+X + + + + + + + Delete a Bible that you will no longer want to use in this program. + + + &Delete... + + + Ctrl+D + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + :/icons/icons/song_tab.png:/icons/icons/song_tab.png + + + Songbooks + + + + + + true + + + + + + + + + Download +&& Import... + + + + + + + Import a new Songbook into database. + + + &Import... + + + Ctrl+I + + + + + + + Edit the title and information about the Songbook. + + + &Edit... + + + Ctrl+E + + + + + + + Export currently selected Songbook to be able to share with others and for backup. + + + E&xport... + + + Ctrl+X + + + + + + + Delete currently selected Songbook from database. + + + &Delete... + + + Ctrl+D + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + Themes + + + + + + true + + + + + + + + + Download +&& Import... + + + + + + + Import a new Songbook into database. + + + &Import... + + + Ctrl+I + + + + + + + Import a new Songbook into database. + + + &New... + + + Ctrl+I + + + + + + + Edit the title and information about the Songbook. + + + &Edit... + + + Ctrl+E + + + + + + + Export currently selected Songbook to be able to share with others and for backup. + + + E&xport... + + + Ctrl+X + + + + + + + Export currently selected Songbook to be able to share with others and for backup. + + + Export All... + + + Ctrl+X + + + + + + + Delete currently selected Songbook from database. + + + &Delete... + + + Ctrl+D + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + tabWidget + bibleTableView + pushButtonDownBible + import_bible_pushButton + edit_bible_pushButton + export_bible_pushButton + delete_bible_pushButton + ok_pushButton + songbookTableView + pushButtonDownSong + import_songbook_pushButton + edit_songbook_pushButton + export_songbook_pushButton + delete_songbook_pushButton + TableViewTheme + pushButtonDownTheme + pushButtonThemeImport + pushButtonThemeNew + pushButtonThemeEdit + pushButtonThemeExport + pushButtonThemeExportAll + pushButtonThemeDelete + + + + + + diff --git a/mediawidget.cpp b/mediawidget.cpp new file mode 100644 index 0000000..4c8b76b --- /dev/null +++ b/mediawidget.cpp @@ -0,0 +1,464 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "mediawidget.h" +#include "ui_mediawidget.h" + +MediaWidget::MediaWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::MediaWidget)//, +// m_AudioOutput(Phonon::VideoCategory) +{ + ui->setupUi(this); + videoWidget = new VideoPlayerWidget(this); + +// ui->verticalLayoutMedia->addWidget(videoWidget); +// videoWidget->setVisible(false); + ui->pushButtonGoLive->setEnabled(false); + + playIcon = QIcon(":icons/icons/play.png"); + pauseIcon = QIcon(":icons/icons/pause.png"); + + ui->pushButtonPlayPause->setIcon(playIcon); + ui->comboBoxAspectRatio->setEnabled(false); + +// timeSlider = new Phonon::SeekSlider(this); +// timeSlider->setMediaObject(&mediaPlayer); +// volumeSlider = new Phonon::VolumeSlider(&m_AudioOutput); + + QPalette palette; + palette.setBrush(QPalette::WindowText, Qt::white); + + ui->labelInfo->setStyleSheet("border-image:url(:icons/icons/playerScreen.png)"); + ui->labelInfo->setPalette(palette); + ui->labelInfo->setText(tr("
No media
")); + +// volumeSlider->setSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Preferred); + +// ui->horizontalLayoutControls->addWidget(volumeSlider); + +// ui->horizontalLayoutTime->insertWidget(0,timeSlider); + +// connect(&mediaPlayer, SIGNAL(metaDataChanged()), this, SLOT(updateInfo())); +// connect(&mediaPlayer, SIGNAL(totalTimeChanged(qint64)), this, SLOT(updateTime())); +// connect(&mediaPlayer, SIGNAL(tick(qint64)), this, SLOT(updateTime())); +// connect(&mediaPlayer, SIGNAL(finished()), this, SLOT(finished())); +// connect(&mediaPlayer, SIGNAL(stateChanged(Phonon::State,Phonon::State)), +// this, SLOT(stateChanged(Phonon::State,Phonon::State))); +// connect(&mediaPlayer, SIGNAL(hasVideoChanged(bool)), this, SLOT(hasVideoChanged(bool))); + +// connect(videoWidget, SIGNAL(playPause()), this, SLOT(playPause())); +// connect(videoWidget, SIGNAL(handleDrops(QDropEvent*)), this, SLOT(handleDrop(QDropEvent*))); + + ui->pushButtonPlayPause->setEnabled(false); + setAcceptDrops(true); + +// Phonon::createPath(&mediaPlayer, &m_AudioOutput); +// Phonon::createPath(&mediaPlayer, videoWidget); + + audioExt = "*.mp3 *.acc *.ogg *.oga *.wma *.wav *.asf *.mka"; + videoExt = "*.wmv *.avi *.mkv *.flv *.mp4 *.mpg *.mpeg *.mov *.ogv *.ts"; + loadMediaLibrary(); +} + +MediaWidget::~MediaWidget() +{ + delete videoWidget; +// delete timeSlider; +// delete volumeSlider; + delete ui; +} + +void MediaWidget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void MediaWidget::loadMediaLibrary() +{ + QSqlQuery sq; + sq.exec("SELECT * FROM Media"); + while(sq.next()) + { + mediaFilePaths.append(sq.value(0).toString()); + mediaFileNames.append(sq.value(1).toString()); + ui->listWidgetMediaFiles->clear(); + ui->listWidgetMediaFiles->addItems(mediaFileNames); + } +} + +/* +void MediaWidget::stateChanged(Phonon::State newstate, Phonon::State oldstate) +{ + Q_UNUSED(oldstate); + + switch (newstate) + { + case Phonon::ErrorState: + if (mediaPlayer.errorType() == Phonon::FatalError) + { + ui->pushButtonPlayPause->setEnabled(false); + hasVideoChanged(false); + ui->labelInfo->setText(QString("
%1
").arg(tr("No Media"))); + } + else + mediaPlayer.pause(); + + QMessageBox::warning(this, "softProjector MediaPlayer", mediaPlayer.errorString(), QMessageBox::Close); + break; + + case Phonon::StoppedState: + ui->pushButtonPlayPause->setIcon(playIcon); + ui->pushButtonPlayPause->setEnabled(true); + break; + case Phonon::PausedState: + ui->pushButtonPlayPause->setIcon(playIcon); + if (mediaPlayer.currentSource().type() != Phonon::MediaSource::Invalid) + ui->pushButtonPlayPause->setEnabled(true); + else + ui->pushButtonPlayPause->setEnabled(false); + break; + case Phonon::PlayingState: + ui->pushButtonPlayPause->setEnabled(true); + ui->pushButtonPlayPause->setIcon(pauseIcon); + + break; + case Phonon::BufferingState: + + break; + case Phonon::LoadingState: + + break; + } +} +*/ + +void MediaWidget::handleDrop(QDropEvent *e) +{ + QList urls = e->mimeData()->urls(); + QStringList fileList; + QStringList fileNameList; + + // Make sure that only supported files get to media player + QString fext = audioExt + " " + videoExt; + fext.remove("*"); + fext.replace(" ","$|"); + fext.append("$"); + QRegExp rx(fext); + rx.setCaseSensitivity(Qt::CaseInsensitive); + foreach(const QUrl &url, urls) + { + QString fp = url.toLocalFile(); + if(fp.contains(rx)) + { + QFileInfo fn(fp); + fileList.append(fp); + fileNameList.append(fn.fileName()); + } + } + + // Add files to library + if(fileList.count()>0) + { + int mcount = ui->listWidgetMediaFiles->count(); // get total media count + insertFiles(fileList); + ui->listWidgetMediaFiles->setCurrentRow(mcount); // select first in list of just added and play it + } +} + +void MediaWidget::dropEvent(QDropEvent *e) +{ + if (e->mimeData()->hasUrls() && e->proposedAction() != Qt::LinkAction) { + e->acceptProposedAction(); + handleDrop(e); + } else { + e->ignore(); + } +} + +void MediaWidget::dragEnterEvent(QDragEnterEvent *e) +{ + dragMoveEvent(e); +} + +void MediaWidget::dragMoveEvent(QDragMoveEvent *e) +{ + if (e->mimeData()->hasUrls()) { + if (e->proposedAction() == Qt::CopyAction || e->proposedAction() == Qt::MoveAction){ + e->acceptProposedAction(); + } + } +} + +void MediaWidget::playPause() +{ +// if (mediaPlayer.state() == Phonon::PlayingState) +// mediaPlayer.pause(); +// else +// { +// if (mediaPlayer.currentTime() == mediaPlayer.totalTime()) +// mediaPlayer.seek(0); +// mediaPlayer.play(); +// } +} + +void MediaWidget::playFile(QString filePath) +{ + //mediaPlayer.stop(); +// mediaPlayer.setCurrentSource(Phonon::MediaSource(filePath)); + //mediaPlayer.play(); +} + +void MediaWidget::updateInfo() +{ + int maxLength = 50; + QString font = ""; + + QString fileName;// = mediaPlayer.currentSource().fileName(); + QFileInfo f(fileName); + QString fName = f.fileName(); +/* + QMap metaData = mediaPlayer.metaData(); + QString tAlbum = metaData.value("ALBUM"); + QString tTitle = metaData.value("TITLE"); + QString tArtist = metaData.value("ARTIST"); + int tBitrate = metaData.value("BITRATE").toInt(); + + if (fName.length() > maxLength) + fName = fName.left(maxLength) + "..."; + + if (tAlbum.length() > maxLength) + tAlbum = tAlbum.left(maxLength) + "..."; + + if (tTitle.length() > maxLength) + tTitle = tTitle.left(maxLength) + "..."; + + if (tArtist.length() > maxLength) + tArtist = tArtist.left(maxLength) + "..."; + + QString file; + if(!fName.isEmpty()) + file = "File: " + font + fName + "
"; + + QString album; + if(!tAlbum.isEmpty()) + album = "Album: " + font + tAlbum + "
"; + + QString title; + if(!tTitle.isEmpty()) + { + title = "Title: " + font + tTitle + "
"; + file.clear(); + } + + QString artist; + if (!tArtist.isEmpty()) + artist = "Artist: " + font + tArtist + "
"; + + QString bitrate; + if (tBitrate != 0) + bitrate = "Bitrate: " + font + QString::number(tBitrate/1000) + "kbit"; + + ui->labelInfo->setText(file + album + title + artist + bitrate); + */ +} + +void MediaWidget::insertFiles(QStringList &files) +{ + // Insert filenames and path into appropriate lists and database + QSqlQuery sq; + foreach(const QString &file, files) + { + QFileInfo f(file); + mediaFileNames.append(f.fileName()); + mediaFilePaths.append(file); + sq.exec(QString("INSERT INTO Media (long_Path, short_path) VALUES('%1', '%2')").arg(file).arg(f.fileName())); + ui->listWidgetMediaFiles->addItem(f.fileName()); + } +} + +void MediaWidget::updateTime() +{ + long len = 0;//mediaPlayer.totalTime(); + long pos = 0;//mediaPlayer.currentTime(); + QString timeString; + if (pos || len) + { + int sec = pos/1000; + int min = sec/60; + int hour = min/60; + int msec = pos; + + QTime playTime(hour%60, min%60, sec%60, msec%1000); + sec = len / 1000; + min = sec / 60; + hour = min / 60; + msec = len; + + QTime stopTime(hour%60, min%60, sec%60, msec%1000); + QString timeFormat = "m:ss"; + if (hour > 0) + timeFormat = "h:mm:ss"; + timeString = playTime.toString(timeFormat); + if (len) + timeString += " / " + stopTime.toString(timeFormat); + } + ui->labelTime->setText(timeString); +} + +void MediaWidget::finished() +{ + +} + +void MediaWidget::hasVideoChanged(bool bHasVideo) +{ +// if(!bHasVideo && videoWidget->isFullScreen()) +// videoWidget->setFullScreen(false); +// ui->labelInfo->setVisible(!bHasVideo); +// ui->pushButtonGoLive->setEnabled(bHasVideo); +// videoWidget->setVisible(bHasVideo); +// ui->comboBoxAspectRatio->setEnabled(bHasVideo); +} + +void MediaWidget::prepareForProjection() +{ +// mediaPlayer.pause(); +// QFileInfo fn( mediaPlayer.currentSource().fileName()); +// VideoInfo v; +// v.aspectRatio = ui->comboBoxAspectRatio->currentIndex(); +// v.fileName = fn.fileName(); +// v.filePath = fn.filePath(); +// emit toProjector(v); +} + +void MediaWidget::on_pushButtonOpen_clicked() +{ + QString file = QFileDialog::getOpenFileName(this,tr("Open Music/Video File"),".", + tr("Media Files (%1);;Audio Files (%2);;Video Files (%3)") + .arg(audioExt + " " + videoExt) // media files + .arg(audioExt) // audio files + .arg(videoExt)); // video files + if(!file.isEmpty()) + { + playFile(file); + ui->listWidgetMediaFiles->clearSelection(); + } +} + +void MediaWidget::on_pushButtonPlayPause_clicked() +{ + playPause(); +} + +void MediaWidget::on_pushButtonGoLive_clicked() +{ + prepareForProjection(); +} + +void MediaWidget::addToLibrary() +{ + QStringList mfp = QFileDialog::getOpenFileNames(this,tr("Select Music/Video Files to Open"),".", + tr("Media Files (%1);;Audio Files (%2);;Video Files (%3)") + .arg(audioExt + " " + videoExt) // media files + .arg(audioExt) // audio files + .arg(videoExt)); // video files + + if(mfp.count()>0) + insertFiles(mfp); +} + +void MediaWidget::removeFromLibrary() +{ + int cm = ui->listWidgetMediaFiles->currentRow(); + if(cm>=0) + { + QSqlQuery sq; + sq.exec("DELETE FROM Media WHERE short_path = '" +mediaFileNames.at(cm)+ "'"); + mediaFilePaths.removeAt(cm); + mediaFileNames.removeAt(cm); + + ui->listWidgetMediaFiles->setCurrentRow(-1); + ui->listWidgetMediaFiles->clear(); + if(mediaFileNames.count()>0) + ui->listWidgetMediaFiles->addItems(mediaFileNames); +// mediaPlayer.stop(); + + hasVideoChanged(false); + + ui->labelInfo->setText(tr("
No media
")); + } +} + +void MediaWidget::on_listWidgetMediaFiles_itemSelectionChanged() +{ + int cRow = ui->listWidgetMediaFiles->currentRow(); + if(cRow>=0) + playFile(mediaFilePaths.at(cRow)); +} + +void MediaWidget::on_listWidgetMediaFiles_doubleClicked(const QModelIndex &index) +{ + if(ui->pushButtonGoLive->isEnabled()) + prepareForProjection(); +} + +void MediaWidget::on_comboBoxAspectRatio_currentIndexChanged(int index) +{ +// videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatio(index)); +} + +VideoInfo MediaWidget::getMedia() +{ + VideoInfo v; + int cm = ui->listWidgetMediaFiles->currentRow(); + v.fileName = mediaFileNames.at(cm); + v.filePath = mediaFilePaths.at(cm); + return v; +} + +void MediaWidget::setMediaFromSchedule(VideoInfo &v) +{ + ui->listWidgetMediaFiles->clearSelection(); + playFile(v.filePath); +// mediaPlayer.pause(); +} + +void MediaWidget::goLiveFromSchedule() +{ + if(ui->pushButtonGoLive->isEnabled()) + prepareForProjection(); +// else +// mediaPlayer.play(); +} + +bool MediaWidget::isValidMedia() +{ + if(ui->listWidgetMediaFiles->selectionModel()->selectedRows().count() > 0) + return true; + else + return false; +} diff --git a/mediawidget.h b/mediawidget.h new file mode 100644 index 0000000..0752a66 --- /dev/null +++ b/mediawidget.h @@ -0,0 +1,101 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef MEDIAWIDGET_H +#define MEDIAWIDGET_H + +#include +#include +//#include +//#include +//#include +//#include +//#include +#include "videoplayerwidget.h" +#include "videoinfo.h" + +namespace Ui { +class MediaWidget; +} + +class MediaWidget : public QWidget +{ + Q_OBJECT + +public: + explicit MediaWidget(QWidget *parent = 0); + ~MediaWidget(); + +public slots: + void addToLibrary(); + void removeFromLibrary(); + VideoInfo getMedia(); + void setMediaFromSchedule(VideoInfo &v); + void goLiveFromSchedule(); + bool isValidMedia(); +protected: + void dragEnterEvent(QDragEnterEvent *e); + void dragMoveEvent(QDragMoveEvent *e); + void dropEvent(QDropEvent *e); + void changeEvent(QEvent *e); + +signals: + void toProjector(VideoInfo &vid); + +private slots: + void playFile(QString filePath); + void updateInfo(); + void updateTime(); + void finished(); + void playPause(); + + void handleDrop(QDropEvent *e); + void loadMediaLibrary(); +// void stateChanged(Phonon::State newstate, Phonon::State oldstate); + + void hasVideoChanged(bool); + void insertFiles(QStringList &files); + void prepareForProjection(); + + void on_pushButtonOpen_clicked(); + void on_pushButtonPlayPause_clicked(); + void on_pushButtonGoLive_clicked(); + void on_listWidgetMediaFiles_itemSelectionChanged(); + void on_listWidgetMediaFiles_doubleClicked(const QModelIndex &index); + void on_comboBoxAspectRatio_currentIndexChanged(int index); + +private: + Ui::MediaWidget *ui; + + QIcon playIcon; + QIcon pauseIcon; + +// Phonon::SeekSlider *timeSlider; +// Phonon::VolumeSlider *volumeSlider; +// Phonon::MediaObject mediaPlayer; +// Phonon::AudioOutput m_AudioOutput; + VideoPlayerWidget *videoWidget; + + QString audioExt; + QString videoExt; + QStringList mediaFilePaths; + QStringList mediaFileNames; +}; + +#endif // MEDIAWIDGET_H diff --git a/mediawidget.ui b/mediawidget.ui new file mode 100644 index 0000000..28c969d --- /dev/null +++ b/mediawidget.ui @@ -0,0 +1,188 @@ + + + MediaWidget + + + + 0 + 0 + 712 + 491 + + + + Form + + + + + + Qt::Horizontal + + + + + + + - Media Library - + + + Qt::AlignCenter + + + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Go Live (F5) + + + + :/icons/icons/go_live.png:/icons/icons/go_live.png + + + F5 + + + + + + + + + + + + 0 + 0 + + + + + 0 + 70 + + + + true + + + 10 + + + + + + + + + + + Open + + + + + + + + + + + + + + Aspect Ratio: + + + + + + + + Auto + + + + + Scale + + + + + 4/3 + + + + + 16/9 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + + + + + + + + listWidgetMediaFiles + pushButtonOpen + pushButtonPlayPause + comboBoxAspectRatio + pushButtonGoLive + + + + + + diff --git a/moduledownloaddialog.cpp b/moduledownloaddialog.cpp new file mode 100644 index 0000000..d04197c --- /dev/null +++ b/moduledownloaddialog.cpp @@ -0,0 +1,72 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "moduledownloaddialog.h" +#include "ui_moduledownloaddialog.h" + +ModuleDownloadDialog::ModuleDownloadDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::ModuleDownloadDialog) +{ + ui->setupUi(this); +} + +ModuleDownloadDialog::~ModuleDownloadDialog() +{ + delete ui; +} + +void ModuleDownloadDialog::setList(QStringList &modList) +{ + ui->listWidget->clear(); + foreach(const QString &mod, modList) + ui->listWidget->addItem(mod); + } + +QList ModuleDownloadDialog::getSelected() +{ + QList mods; + int count = ui->listWidget->count(); + for(int i(0);count>i;++i) + { + if(ui->listWidget->item(i)->isSelected()) + mods.append(i); + } + return mods; +} + +void ModuleDownloadDialog::on_buttonBox_accepted() +{ + +} + +void ModuleDownloadDialog::on_buttonBox_rejected() +{ + +} + +void ModuleDownloadDialog::on_pushButtonSelectAll_clicked() +{ + ui->listWidget->selectAll(); +} + +void ModuleDownloadDialog::on_pushButtonDeselectAll_clicked() +{ + ui->listWidget->clearSelection(); +} diff --git a/moduledownloaddialog.h b/moduledownloaddialog.h new file mode 100644 index 0000000..44afadd --- /dev/null +++ b/moduledownloaddialog.h @@ -0,0 +1,51 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef MODULEDOWNLOADDIALOG_H +#define MODULEDOWNLOADDIALOG_H + +#include + +namespace Ui { +class ModuleDownloadDialog; +} + +class ModuleDownloadDialog : public QDialog +{ + Q_OBJECT + +public: + explicit ModuleDownloadDialog(QWidget *parent = 0); + ~ModuleDownloadDialog(); + +public slots: + void setList(QStringList &modList); + QList getSelected(); + +private slots: + void on_buttonBox_accepted(); + void on_buttonBox_rejected(); + void on_pushButtonSelectAll_clicked(); + void on_pushButtonDeselectAll_clicked(); + +private: + Ui::ModuleDownloadDialog *ui; +}; + +#endif // MODULEDOWNLOADDIALOG_H diff --git a/moduledownloaddialog.ui b/moduledownloaddialog.ui new file mode 100644 index 0000000..6b4d10b --- /dev/null +++ b/moduledownloaddialog.ui @@ -0,0 +1,115 @@ + + + ModuleDownloadDialog + + + + 0 + 0 + 400 + 300 + + + + Dialog + + + + + + Select modules you wish to download and import. + + + + + + + QAbstractItemView::MultiSelection + + + + + + + + + Select All + + + + + + + Deselect All + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + listWidget + pushButtonSelectAll + pushButtonDeselectAll + buttonBox + + + + + buttonBox + accepted() + ModuleDownloadDialog + accept() + + + 389 + 289 + + + 157 + 274 + + + + + buttonBox + rejected() + ModuleDownloadDialog + reject() + + + 389 + 289 + + + 286 + 274 + + + + + diff --git a/moduleprogressdialog.cpp b/moduleprogressdialog.cpp new file mode 100644 index 0000000..732bd3a --- /dev/null +++ b/moduleprogressdialog.cpp @@ -0,0 +1,115 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "moduleprogressdialog.h" +#include "ui_moduleprogressdialog.h" + +ModuleProgressDialog::ModuleProgressDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::ModuleProgressDialog) +{ + ui->setupUi(this); + clearAll(); +} + +ModuleProgressDialog::~ModuleProgressDialog() +{ + delete ui; +} + +void ModuleProgressDialog::setCurrentValue(int value) +{ + ui->progressBarCurrent->setValue(value); +} + +void ModuleProgressDialog::setCurrentMax(int max) +{ + ui->progressBarCurrent->setMaximum(max); +} + +void ModuleProgressDialog::setCurrentMin(int min) +{ + ui->progressBarCurrent->setMinimum(min); +} + +void ModuleProgressDialog::setCurrent(int value, int max) +{ + ui->progressBarCurrent->setMaximum(max); + ui->progressBarCurrent->setValue(value); +} + +void ModuleProgressDialog::setTotalValue(int value) +{ + ui->progressBarTotal->setValue(value); +} + +void ModuleProgressDialog::setTotalMax(int max) +{ + ui->progressBarTotal->setMaximum(max); +} + +void ModuleProgressDialog::setTotal(int value, int max) +{ + ui->progressBarTotal->setMaximum(max); + ui->progressBarTotal->setValue(value); +} + +void ModuleProgressDialog::increaseTotal() +{ + int c = ui->progressBarTotal->value(); + ++c; + ui->progressBarTotal->setValue(c); +} + +void ModuleProgressDialog::setSpeed(QString speed) +{ + ui->labelSpeed->setText(speed); +} + +void ModuleProgressDialog::appendText(QString text) +{ + ui->plainTextEdit->appendPlainText(text); +} + +void ModuleProgressDialog::clearAll() +{ + ui->plainTextEdit->clear(); + ui->labelSpeed->clear(); + ui->progressBarCurrent->setValue(0); + ui->progressBarTotal->setValue(0); + ui->pushButton->setEnabled(false); +} + +void ModuleProgressDialog::enableCloseButton(bool enable) +{ + ui->pushButton->setEnabled(enable); +} + +void ModuleProgressDialog::setToMax() +{ + ui->progressBarCurrent->setMaximum(1); + ui->progressBarCurrent->setValue(1); + ui->progressBarTotal->setMaximum(1); + ui->progressBarTotal->setValue(1); +} + +void ModuleProgressDialog::on_pushButton_clicked() +{ + close(); +} diff --git a/moduleprogressdialog.h b/moduleprogressdialog.h new file mode 100644 index 0000000..15a29c2 --- /dev/null +++ b/moduleprogressdialog.h @@ -0,0 +1,59 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef MODULEPROGRESSDIALOG_H +#define MODULEPROGRESSDIALOG_H + +#include + +namespace Ui { +class ModuleProgressDialog; +} + +class ModuleProgressDialog : public QDialog +{ + Q_OBJECT + +public: + explicit ModuleProgressDialog(QWidget *parent = 0); + ~ModuleProgressDialog(); + +public slots: + void setCurrentValue(int value); + void setCurrentMax(int max); + void setCurrentMin(int min); + void setCurrent(int value, int max); + void setTotalValue(int value); + void setTotalMax(int max); + void setTotal(int value, int max); + void increaseTotal(); + void setSpeed(QString speed); + void appendText(QString text); + void clearAll(); + void enableCloseButton(bool enable); + void setToMax(); + +private slots: + void on_pushButton_clicked(); + +private: + Ui::ModuleProgressDialog *ui; +}; + +#endif // MODULEPROGRESSDIALOG_H diff --git a/moduleprogressdialog.ui b/moduleprogressdialog.ui new file mode 100644 index 0000000..6cb352d --- /dev/null +++ b/moduleprogressdialog.ui @@ -0,0 +1,90 @@ + + + ModuleProgressDialog + + + + 0 + 0 + 400 + 300 + + + + Download / Import Progress Dialog + + + + + + false + + + true + + + + + + + + + Current Progress: + + + + + + + + + + + + + + + + + + + + + Total Progress: + + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Close + + + + + + + + + + diff --git a/mpsettings.ui b/mpsettings.ui new file mode 100644 index 0000000..cd85222 --- /dev/null +++ b/mpsettings.ui @@ -0,0 +1,495 @@ + + + settings + + + + 0 + 0 + 175 + 397 + + + + Settings + + + + + + Video options: + + + true + + + + + + QComboBox::AdjustToContentsOnFirstShow + + + + Fit in view + + + + + Scale and crop + + + + + + + + Contrast: + + + + + + + + 0 + 0 + + + + -8 + + + 8 + + + Qt::Horizontal + + + QSlider::TicksBelow + + + 4 + + + + + + + Brightness: + + + + + + + -8 + + + 8 + + + Qt::Horizontal + + + QSlider::TicksBelow + + + 4 + + + + + + + Saturation: + + + + + + + -8 + + + 8 + + + Qt::Horizontal + + + QSlider::TicksBelow + + + 4 + + + + + + + Hue: + + + + + + + -8 + + + 8 + + + Qt::Horizontal + + + QSlider::TicksBelow + + + 4 + + + + + + + Aspect ratio: + + + + + + + QComboBox::AdjustToContentsOnFirstShow + + + + Auto + + + + + Stretch + + + + + 4/3 + + + + + 16/9 + + + + + + + + Scale Mode: + + + + + scalemodeCombo + label_9 + contrastSlider + label_8 + brightnessSlider + label_7 + saturationSlider + label_2 + hueSlider + label_10 + aspectCombo + label_11 + + + + + + Audio options: + + + true + + + + + + + + + 0 + 0 + + + + + 10 + 0 + + + + Audio device: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 0 + 0 + + + + + 10 + 0 + + + + QComboBox::AdjustToMinimumContentsLength + + + + + + + + + + + + 0 + 0 + + + + + 10 + 0 + + + + Audio effect: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + 0 + 0 + + + + + 10 + 0 + + + + QComboBox::AdjustToMinimumContentsLength + + + + + + + false + + + Setup + + + + + + + + + + + + 0 + 0 + + + + + 10 + 0 + + + + Cross fade: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + + + + 0 + 0 + + + + -20 + + + 20 + + + 1 + + + 2 + + + 0 + + + Qt::Horizontal + + + QSlider::TicksBelow + + + + + + + + + + 9 + + + + -10 Sec + + + + + + + Qt::Horizontal + + + + 0 + 20 + + + + + + + + + 9 + + + + 0 + + + + + + + Qt::Horizontal + + + + 0 + 20 + + + + + + + + + 9 + + + + 10 Sec + + + + + + + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + settings + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + settings + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/passivesettingwidget.cpp b/passivesettingwidget.cpp new file mode 100644 index 0000000..f86b8ef --- /dev/null +++ b/passivesettingwidget.cpp @@ -0,0 +1,131 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "passivesettingwidget.h" +#include "ui_passivesettingwidget.h" + +PassiveSettingWidget::PassiveSettingWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::PassiveSettingWidget) +{ + ui->setupUi(this); +} + +PassiveSettingWidget::~PassiveSettingWidget() +{ + delete ui; +} + +void PassiveSettingWidget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch ( e->type() ) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void PassiveSettingWidget::setSetings(TextSettings &settings, TextSettings &settings2) +{ + mySettings = settings; + mySettings2 = settings2; + loadSettings(); +} + +void PassiveSettingWidget::getSettings(TextSettings &settings, TextSettings &settings2) +{ + mySettings.useBackground = ui->groupBoxBackground->isChecked(); + mySettings.backgroundName = ui->lineEditBackgroundPath->text(); + + // Get display two settings + mySettings2.useDisp2settings = ui->groupBoxDisp2Sets->isChecked(); + mySettings2.useBackground = ui->groupBoxBackground2->isChecked(); + mySettings2.backgroundName = ui->lineEditBackgroundPath2->text(); + + settings = mySettings; + settings2 = mySettings2; +} + +void PassiveSettingWidget::loadSettings() +{ + ui->groupBoxBackground->setChecked(mySettings.useBackground); + ui->lineEditBackgroundPath->setText(mySettings.backgroundName); + + // Displpay screen two + ui->groupBoxDisp2Sets->setChecked(mySettings2.useDisp2settings); + ui->groupBoxBackground2->setChecked(mySettings.useBackground); + ui->lineEditBackgroundPath2->setText(mySettings.backgroundName); +} + +void PassiveSettingWidget::setDispScreen2Visible(bool visible) +{ + ui->groupBoxDisp2Sets->setVisible(visible); +} + +void PassiveSettingWidget::on_buttonBrowseBackgound_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for passive wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + if(p.width()>1280 || p.height()>1280) + mySettings.backgroundPix = p.scaled(1280,1280,Qt::KeepAspectRatio); + else + mySettings.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings.backgroundName = filename; + ui->lineEditBackgroundPath->setText(filename); + } +} + +void PassiveSettingWidget::on_groupBoxDisp2Sets_toggled(bool arg1) +{ + ui->groupBoxBackground2->setVisible(arg1); +} + +void PassiveSettingWidget::on_buttonBrowseBackgound2_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for passive wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + if(p.width()>1280 || p.height()>1280) + mySettings2.backgroundPix = p.scaled(1280,1280,Qt::KeepAspectRatio); + else + mySettings2.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings2.backgroundName = filename; + ui->lineEditBackgroundPath2->setText(filename); + } +} + +void PassiveSettingWidget::on_pushButtonDefault_clicked() +{ + TextSettings p; + mySettings = p; + mySettings2 = p; + loadSettings(); +} diff --git a/passivesettingwidget.h b/passivesettingwidget.h new file mode 100644 index 0000000..054cb37 --- /dev/null +++ b/passivesettingwidget.h @@ -0,0 +1,60 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef PASSIVESETTINGWIDGET_H +#define PASSIVESETTINGWIDGET_H + +#include +#include +#include +#include "theme.h" +#include "settings.h" + +namespace Ui { +class PassiveSettingWidget; +} + +class PassiveSettingWidget : public QWidget +{ + Q_OBJECT + +public: + explicit PassiveSettingWidget(QWidget *parent = 0); + ~PassiveSettingWidget(); + +public slots: + void setSetings(TextSettings &settings, TextSettings &settings2); + void getSettings(TextSettings &settings, TextSettings &settings2); + void setDispScreen2Visible(bool visible); + +private slots: + void loadSettings(); + void on_buttonBrowseBackgound_clicked(); + void on_groupBoxDisp2Sets_toggled(bool arg1); + void on_buttonBrowseBackgound2_clicked(); + void on_pushButtonDefault_clicked(); + +private: + Ui::PassiveSettingWidget *ui; + TextSettings mySettings,mySettings2; +protected: + virtual void changeEvent(QEvent *e); +}; + +#endif // PASSIVESETTINGWIDGET_H diff --git a/passivesettingwidget.ui b/passivesettingwidget.ui new file mode 100644 index 0000000..65f03f1 --- /dev/null +++ b/passivesettingwidget.ui @@ -0,0 +1,269 @@ + + + PassiveSettingWidget + + + + 0 + 0 + 441 + 230 + + + + + + + Use Passive Background Image + + + true + + + + + + true + + + + + + + Browse... + + + + + + + + + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + + Use Separate Secondary Display Screen Settings + + + true + + + true + + + + 0 + + + 0 + + + 0 + + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Use Passive Background Image + + + true + + + + + + true + + + + + + + Browse... + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 32 + + + + + + + + + + Reset All To Default + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + groupBoxBackground + buttonBrowseBackgound + lineEditBackgroundPath + groupBoxDisp2Sets + groupBoxBackground2 + buttonBrowseBackgound2 + lineEditBackgroundPath2 + pushButtonDefault + + + + diff --git a/picturesettingwidget.cpp b/picturesettingwidget.cpp new file mode 100644 index 0000000..2103bbb --- /dev/null +++ b/picturesettingwidget.cpp @@ -0,0 +1,137 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "picturesettingwidget.h" +#include "ui_picturesettingwidget.h" + +PictureSettingWidget::PictureSettingWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::PictureSettingWidget) +{ + ui->setupUi(this); +} + +PictureSettingWidget::~PictureSettingWidget() +{ + delete ui; +} + +void PictureSettingWidget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch ( e->type() ) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void PictureSettingWidget::setSettings(SlideShowSettings &settings) +{ + mySettings = settings; + ui->checkBoxExpand->setChecked(mySettings.expandSmall); + + if(mySettings.fitType == 0) + ui->radioButtonFit->setChecked(true); + else if(mySettings.fitType == 1) + ui->radioButtonFitExpand->setChecked(true); + + ui->groupBoxResize->setChecked(mySettings.resize); + ui->comboBoxBoundAmount->setCurrentIndex(mySettings.boundType); + if(mySettings.boundType == 7) + ui->lineEditBound->setText(QString::number(mySettings.boundWidth)); + else + ui->lineEditBound->clear(); +} + +void PictureSettingWidget::getSettings(SlideShowSettings &settings) +{ + mySettings.expandSmall = ui->checkBoxExpand->isChecked(); + + if(ui->radioButtonFit->isChecked()) + mySettings.fitType = 0; + else if(ui->radioButtonFitExpand->isChecked()) + mySettings.fitType = 1; + + mySettings.resize = ui->groupBoxResize->isChecked(); + mySettings.boundType = ui->comboBoxBoundAmount->currentIndex(); + if(mySettings.boundType == 0) + mySettings.boundWidth = 800; + else if(mySettings.boundType == 1) + mySettings.boundWidth = 1024; + else if(mySettings.boundType == 2) + mySettings.boundWidth = 1280; + else if(mySettings.boundType == 3) + mySettings.boundWidth = 1366; + else if(mySettings.boundType == 4) + mySettings.boundWidth = 1440; + else if(mySettings.boundType == 5) + mySettings.boundWidth = 1600; + else if(mySettings.boundType == 6) + mySettings.boundWidth = 1920; + else if(mySettings.boundType == 7) + { + bool ok; + mySettings.boundWidth = ui->lineEditBound->text().toInt(&ok); + if(!ok) + { + mySettings.boundType = 1; + mySettings.boundWidth = 1024; + } + } + + settings = mySettings; +} + +void PictureSettingWidget::on_comboBoxBoundAmount_currentIndexChanged(int index) +{ + if(index == 7) + { + ui->lineEditBound->setEnabled(true); + ui->lineEditBound->setFocus(); + } + else + ui->lineEditBound->setEnabled(false); +} + +void PictureSettingWidget::on_lineEditBound_textChanged(const QString &arg1) +{ + ui->labelBoundBy->setText("x " + arg1); +} + +void PictureSettingWidget::on_lineEditBound_editingFinished() +{ + bool ok; + QString t = ui->lineEditBound->text(); + if(!t.isEmpty()) + { + t.toInt(&ok); + if(!ok) + { + QMessageBox mb(this); + mb.setWindowTitle(tr("Inalid Numeric Value")); + mb.setText(tr("Entered '%1' custom width is not numeric. ").arg(t)); + mb.exec(); + ui->lineEditBound->setFocus(); + ui->lineEditBound->selectAll(); + } + } +} diff --git a/picturesettingwidget.h b/picturesettingwidget.h new file mode 100644 index 0000000..e00847b --- /dev/null +++ b/picturesettingwidget.h @@ -0,0 +1,53 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef PICTURESETTINGWIDGET_H +#define PICTURESETTINGWIDGET_H + +#include +#include +#include "settings.h" + +namespace Ui { +class PictureSettingWidget; +} + +class PictureSettingWidget : public QWidget +{ + Q_OBJECT + +public: + explicit PictureSettingWidget(QWidget *parent = 0); + ~PictureSettingWidget(); + void setSettings(SlideShowSettings &settings); + void getSettings(SlideShowSettings &settings); + +private slots: + void on_comboBoxBoundAmount_currentIndexChanged(int index); + void on_lineEditBound_textChanged(const QString &arg1); + void on_lineEditBound_editingFinished(); + +private: + SlideShowSettings mySettings; + Ui::PictureSettingWidget *ui; +protected: + virtual void changeEvent(QEvent *e); +}; + +#endif // PICTURESETTINGWIDGET_H diff --git a/picturesettingwidget.ui b/picturesettingwidget.ui new file mode 100644 index 0000000..54b0067 --- /dev/null +++ b/picturesettingwidget.ui @@ -0,0 +1,251 @@ + + + PictureSettingWidget + + + + 0 + 0 + 381 + 456 + + + + + + + When Displaying Slideshows: + + + + + + + + + Expand Small Images + + + + + + + :/icons/icons/ExpandSmall.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Fit Images To Screen + + + + + + + :/icons/icons/FitToScreen.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Fit Images To Screen By Expanding + + + + + + + :/icons/icons/FitToScreenByExpanding.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Resize Large Images on Import + + + true + + + + + + It is highly recommended to reduce large images on import. This will improve load, save and display time of slideshows. +We recommend to resize images to display screen size. + + + true + + + + + + + + + Bound Box: + + + + + + + + 800 x 800 + + + + + 1024 x 1024 + + + + + 1280 x 1280 + + + + + 1366 x 1366 + + + + + 1440 x 1440 + + + + + 1600 x 1600 + + + + + 1920 x 1920 + + + + + Custom + + + + + + + + + 0 + 0 + + + + + 100 + 20 + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 90 + + + + + + + + checkBoxExpand + radioButtonFit + radioButtonFitExpand + groupBoxResize + comboBoxBoundAmount + lineEditBound + + + + + + diff --git a/picturewidget.cpp b/picturewidget.cpp new file mode 100644 index 0000000..8f24c12 --- /dev/null +++ b/picturewidget.cpp @@ -0,0 +1,299 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "picturewidget.h" +#include "ui_picturewidget.h" + +PictureWidget::PictureWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::PictureWidget) +{ + ui->setupUi(this); + loadSlideShows(); + ui->pushButtonGoLive->setEnabled(false); +} + +PictureWidget::~PictureWidget() +{ + delete ui; +} + +void PictureWidget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void PictureWidget::loadSlideShows() +{ + QSqlQuery sq; + sq.exec("SELECT * FROM SlideShows"); + QStringList sl; + + slideShows.clear(); + + while(sq.next()) + { + SlideShowInfo ssi; + ssi.slideSwId = sq.value(0).toInt(); + ssi.name = sq.value(1).toString(); + ssi.info = sq.value(2).toString(); + slideShows.append(ssi); + sl.append( sq.value(1).toString()); + } + ui->listWidgetSlideShow->clear(); + ui->listWidgetSlideShow->addItems(sl); +} + +void PictureWidget::on_listWidgetSlides_currentRowChanged(int currentRow) +{ + if(currentRow>=0) + { + int pw,ph; + pw = slides.at(currentRow).imagePreview.width(); + ph = slides.at(currentRow).imagePreview.height(); + if(pw>300 || ph>200) + ui->labelPreview->setPixmap(slides.at(currentRow).imagePreview.scaled(300,200,Qt::KeepAspectRatio)); + else + ui->labelPreview->setPixmap(slides.at(currentRow).imagePreview); + ui->labelPixInfo->setText(tr("Preview slide: ")+slides.at(currentRow).name); + } +} + +void PictureWidget::on_listWidgetSlides_doubleClicked(const QModelIndex &index) +{ + sendToProjector(); +} + +void PictureWidget::on_pushButtonAddImages_clicked() +{ + QStringList imageFilePaths = QFileDialog::getOpenFileNames(this,tr("Select Images to Open"),".", + tr("Images(%1)").arg(getSupportedImageFormats())); + + if(imageFilePaths.count()>0) + { + this->setCursor(Qt::WaitCursor); + int i(0); + QProgressDialog progress(tr("Adding files..."), tr("Cancel"), 0, imageFilePaths.count(), this); + ui->listWidgetSlides->setIconSize(QSize(100,100)); + foreach(const QString &file, imageFilePaths) + { + ++i; + progress.setValue(i); + + QPixmap img; + SlideShowItem sd; + img.load(file); + + // set display image. If to resize, resize them + if(mySettings.resize) + { + if(img.width()>mySettings.boundWidth || img.height()>mySettings.boundWidth ) + sd.image = img.scaled(mySettings.boundWidth ,mySettings.boundWidth , Qt::KeepAspectRatio); + else + sd.image = img; + } + else + sd.image = img; + + // set preview image + if(img.width()>400 || img.height()>400) + sd.imagePreview = img.scaled(400,400, Qt::KeepAspectRatio); + else + sd.imagePreview = img; + + // set list image + if(img.width()>100 || img.height()>100) + sd.imageSmall = img.scaled(100,100, Qt::KeepAspectRatio); + else + sd.imageSmall = img; + + // set file name + QFileInfo f(file); + sd.name = f.fileName(); + sd.path = f.filePath(); + + // add to slideshow + slides.append(sd); + + // add to slide show list + QListWidgetItem *itm = new QListWidgetItem; + QIcon ico(sd.imageSmall); + + itm->setIcon(ico); + ui->listWidgetSlides->addItem(itm); + } + this->setCursor(Qt::ArrowCursor); + ui->pushButtonGoLive->setEnabled(true); + } +} + +void PictureWidget::on_pushButtonRemoveImage_clicked() +{ + int c = ui->listWidgetSlides->currentRow(); + if(c>=0) + { + slides.removeAt(c); + ui->listWidgetSlides->clear(); + foreach(const SlideShowItem &sst, slides) + { + QListWidgetItem *itm = new QListWidgetItem; + QIcon ico(sst.imageSmall); + itm->setIcon(ico); + ui->listWidgetSlides->addItem(itm); + } + ui->listWidgetSlides->setCurrentRow(c); + } +} + +void PictureWidget::on_pushButtonClearImages_clicked() +{ + ui->listWidgetSlideShow->setCurrentRow(-1); + ui->listWidgetSlides->clear(); + slides.clear(); + ui->labelPreviewSlideShow->clear(); + ui->labelPreview->clear(); + ui->labelPreview->setText(tr("Picture Preview")); + ui->labelPixInfo->setText(tr("Preview slide: ")); + ui->pushButtonGoLive->setEnabled(false); + currentSlideShow = SlideShow(); +} + +void PictureWidget::on_pushButtonMoveUp_clicked() +{ + int c = ui->listWidgetSlides->currentRow(); + int u = c-1; + if(u>=0) + { + slides.move(c,u); + ui->listWidgetSlides->clear(); + foreach(const SlideShowItem &sst, slides) + { + QListWidgetItem *itm = new QListWidgetItem; + QIcon ico(sst.imageSmall); + itm->setIcon(ico); + ui->listWidgetSlides->addItem(itm); + } + ui->listWidgetSlides->setCurrentRow(u); + } +} + +void PictureWidget::on_pushButtonMoveDown_clicked() +{ + int c = ui->listWidgetSlides->currentRow(); + int d = c+1; + if(dlistWidgetSlides->clear(); + foreach(const SlideShowItem &sst, slides) + { + QListWidgetItem *itm = new QListWidgetItem; + QIcon ico(sst.imageSmall); + itm->setIcon(ico); + ui->listWidgetSlides->addItem(itm); + } + ui->listWidgetSlides->setCurrentRow(d); + } +} + +void PictureWidget::on_pushButtonGoLive_clicked() +{ + sendToProjector(); +} + +void PictureWidget::sendToProjector() +{ + emit sendSlideShow(slides, ui->listWidgetSlides->currentRow(),currentSlideShow.name); +} + +void PictureWidget::loadSlideShow(int ss_id) +{ + SlideShow ss; + ss.loadSlideShow(ss_id); + sendToPreview(ss); + ui->pushButtonGoLive->setEnabled(true); +} + +void PictureWidget::sendToPreview(SlideShow &sshow) +{ + currentSlideShow = sshow; + slides.clear(); + ui->listWidgetSlides->clear(); + ui->labelPreviewSlideShow->setText(tr("Slide Show: %1").arg(currentSlideShow.name)); + foreach(const SlideShowItem &sst, currentSlideShow.slides) + { + slides.append(sst); + QListWidgetItem *itm = new QListWidgetItem; + QIcon ico(sst.imageSmall); + itm->setIcon(ico); + ui->listWidgetSlides->addItem(itm); + } + ui->listWidgetSlides->setCurrentRow(0); +} + +void PictureWidget::sendToPreviewFromSchedule(SlideShow &sshow) +{ + ui->listWidgetSlideShow->clearSelection(); + sendToPreview(sshow); +} + +SlideShow PictureWidget::getCurrentSlideshow() +{ + currentSlideShow.slides = slides; + return currentSlideShow; +} + +bool PictureWidget::isSlideShowSelected() +{ + int css = ui->listWidgetSlideShow->selectionModel()->selection().count(); + if(css>0) + return true; + else + return false; +} + +void PictureWidget::deleteSlideShow() +{ + QSqlQuery sq; + int ssId = slideShows.at(ui->listWidgetSlideShow->currentRow()).slideSwId; + sq.exec(QString("DELETE FROM SlideShows WHERE id = %1").arg(ssId)); + sq.exec(QString("DELETE FROM Slides WHERE ss_id = %1").arg(ssId)); + loadSlideShows(); + on_pushButtonClearImages_clicked(); +} + +void PictureWidget::on_listWidgetSlideShow_itemSelectionChanged() +{ + int cRow = ui->listWidgetSlideShow->currentRow(); + if(cRow>=0 && ui->listWidgetSlideShow->selectedItems().count()>0) + loadSlideShow(slideShows.at(cRow).slideSwId); +} + +void PictureWidget::on_listWidgetSlideShow_doubleClicked(const QModelIndex &index) +{ + currentSlideShow.slides = slides; + emit sendToSchedule(currentSlideShow); +} diff --git a/picturewidget.h b/picturewidget.h new file mode 100644 index 0000000..5e299d6 --- /dev/null +++ b/picturewidget.h @@ -0,0 +1,82 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef PICTUREWIDGET_H +#define PICTUREWIDGET_H + +#include +#include +#include "slideshow.h" +#include "slideshoweditor.h" +#include "settings.h" +#include "spfunctions.h" + +namespace Ui { +class PictureWidget; +} + +class PictureWidget : public QWidget +{ + Q_OBJECT + +public: + explicit PictureWidget(QWidget *parent = 0); + ~PictureWidget(); + +signals: + void sendSlideShow(QList &slideShow, int row,QString name); + void sendToSchedule(SlideShow &sshow); + +protected: + virtual void changeEvent(QEvent *e); + +public slots: + void loadSlideShows(); + SlideShow getCurrentSlideshow(); + bool isSlideShowSelected(); + void deleteSlideShow(); + void sendToPreviewFromSchedule(SlideShow &sshow); + void setSettings(SlideShowSettings &settings){mySettings = settings;} + +private slots: + void on_listWidgetSlides_doubleClicked(const QModelIndex &index); + void on_pushButtonAddImages_clicked(); + void on_pushButtonRemoveImage_clicked(); + void on_pushButtonMoveUp_clicked(); + void on_pushButtonMoveDown_clicked(); + void on_pushButtonGoLive_clicked(); + void sendToProjector(); + void on_pushButtonClearImages_clicked(); + void on_listWidgetSlideShow_itemSelectionChanged(); + void on_listWidgetSlides_currentRowChanged(int currentRow); + void loadSlideShow(int ss_id); + void sendToPreview(SlideShow &sshow); + void on_listWidgetSlideShow_doubleClicked(const QModelIndex &index); + +private: + Ui::PictureWidget *ui; + QList slideShows; + SlideShow currentSlideShow; + QList slides; + QList imagesPreview; + QList imagesToShow; + SlideShowSettings mySettings; +}; + +#endif // PICTUREWIDGET_H diff --git a/picturewidget.ui b/picturewidget.ui new file mode 100644 index 0000000..c88f783 --- /dev/null +++ b/picturewidget.ui @@ -0,0 +1,298 @@ + + + PictureWidget + + + + 0 + 0 + 873 + 581 + + + + Form + + + + + + Qt::Horizontal + + + + + + + Slide Shows: + + + + + + + + + + + + + + + + + + + + + + 100 + 100 + + + + 1 + + + + + + + + Qt::Vertical + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Go Live (F5) + + + + :/icons/icons/go_live.png:/icons/icons/go_live.png + + + F5 + + + + + + + + + + 0 + 0 + + + + + 300 + 200 + + + + + 300 + 200 + + + + QFrame::WinPanel + + + QFrame::Sunken + + + Picture Preview + + + Qt::AlignCenter + + + + + + + Picture Information + + + true + + + + + + + + + + + Qt::Horizontal + + + + + + + + + Edit Preview Slide Show: + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 0 + 0 + + + + Add + + + + :/icons/icons/add.png:/icons/icons/add.png + + + + + + + Remove + + + + :/icons/icons/remove.png:/icons/icons/remove.png + + + + + + + Clear + + + + :/icons/icons/remove_all.png:/icons/icons/remove_all.png + + + + + + + + + + + :/icons/icons/up.png:/icons/icons/up.png + + + + + + + + + + + :/icons/icons/down.png:/icons/icons/down.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Editing slide show here will not change anything in database. To have save changes, use "New Slide Show" or "Edit Slide Show". + + + true + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + listWidgetSlideShow + listWidgetSlides + pushButtonGoLive + pushButtonAddImages + pushButtonRemoveImage + pushButtonClearImages + pushButtonMoveUp + pushButtonMoveDown + + + + + + diff --git a/printpreviewdialog.cpp b/printpreviewdialog.cpp new file mode 100644 index 0000000..ec4a262 --- /dev/null +++ b/printpreviewdialog.cpp @@ -0,0 +1,275 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "printpreviewdialog.h" +#include "ui_printpreviewdialog.h" + +PrintPreviewDialog::PrintPreviewDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::PrintPreviewDialog) +{ + ui->setupUi(this); + printer = new QPrinter; + ui->fontComboBox->setFont(ui->textEdit->font()); + ui->spinBoxFontSize->setValue(ui->textEdit->font().pointSize()); + + // set default margins + on_comboBox_currentIndexChanged(0); + ui->doubleSpinBoxLeft->setValue(0.5); + ui->doubleSpinBoxTop->setValue(0.5); + ui->doubleSpinBoxRight->setValue(0.5); + ui->doubleSpinBoxBottom->setValue(0.5); + updateMargins(); + + // set default font + QFont f; + f.fromString("Arial,12,-1,5,50,0,0,0,0,0"); + ui->fontComboBox->setCurrentFont(f); +} + +PrintPreviewDialog::~PrintPreviewDialog() +{ + delete ui; +} + +void PrintPreviewDialog::on_fontComboBox_currentFontChanged(const QFont &f) +{ + QFont font = f; + font.setPointSize(ui->spinBoxFontSize->value()); + ui->textEdit->setFont(font); +} + +void PrintPreviewDialog::on_spinBoxFontSize_valueChanged(int arg1) +{ + QFont font = ui->textEdit->font(); + font.setPointSize(arg1); + ui->textEdit->setFont(font); +} + +void PrintPreviewDialog::setText(Song song) +// This will prepare print text edit for current song +{ + QString s; + s = QString("%1 %2\n%3\n").arg(song.songbook_name).arg(song.number).arg(song.title); + // Do not print Tune, WordsBy, and MusicBy if they are empty + if(!song.tune.isEmpty()) + s+= tr("Tune: %1\n").arg(song.tune); + if(!song.wordsBy.isEmpty() && !song.musicBy.isEmpty()) + s+= tr("Words By: %1\tMusic By: %2\n\n").arg(song.wordsBy).arg(song.musicBy); + else if(!song.wordsBy.isEmpty() && song.musicBy.isEmpty()) + s+= tr("Words By: %1\n\n").arg(song.wordsBy); + else if(song.wordsBy.isEmpty() && !song.musicBy.isEmpty()) + s+= tr("Music By: %1\n\n").arg(song.musicBy); + else + s+= "\n"; +// song.songText=song.songText.split("@$").join("\n\n"); +// song.songText=song.songText.split("@%").join("\n"); + s += song.songText; + + //Check for notes + if(!song.notes.isEmpty()) + s += tr("\n\nNotes:\n%1").arg(song.notes); + + ui->textEdit->setText(s); + ui->spinBoxFontSize->setValue(14);// default font size for Songs +} + +void PrintPreviewDialog::setText(QString bible, QString book, int chapter) +// This will prepare print text edit for Current chapter +{ + QString s; + + // get proper bible id if operator bible == "same" + QStringList bb = bible.split(","); + if(bb.at(0) == "same") + bible = bb.at(1); // primary bible + else + bible = bb.at(0); // operator bible + + Bible b; + b.setBiblesId(bible); + b.loadOperatorBible(); + + // get bible name instead of id + bible = b.getBibleName(); + + QStringList clist; + // Get chapter with correct book id + for(int i(0);itextEdit->setText(s); + ui->spinBoxFontSize->setValue(11);// default font size for Bible chapter +} + +void PrintPreviewDialog::setText(Announcement announce) +{ + QString s; + s = tr("Announcements: %1\n\n").arg(announce.title); + s += announce.text; + + ui->textEdit->setText(s); + ui->spinBoxFontSize->setValue(14);// default font size for Announcements +} + +void PrintPreviewDialog::setSchedule(QString scheduleName, const QList &schedule, bool printDetail) +{ + QFileInfo fi(scheduleName); + scheduleName = fi.fileName(); + scheduleName.remove(".spsc"); + QString s; + + // start + if(scheduleName.isEmpty()) + s = ""; + else + s = tr("SoftProject Schedule: ") + scheduleName + "\n\n"; + + if(printDetail) + { + + } + else + { + foreach(const Schedule &si,schedule) + { + s += QString("%1: %2\n").arg(si.stype).arg(si.name); + } + } + + ui->textEdit->setText(s); + ui->spinBoxFontSize->setValue(11); // default font size for spftProjector Schedule +} + +void PrintPreviewDialog::on_pushButtonPDF_clicked() +{ + QString filepath = QFileDialog::getSaveFileName(this,tr("Save PDF as"),".","Portable Document Format(*.pdf)"); + if(filepath.isEmpty()) + return; + printer->setOutputFormat(QPrinter::PdfFormat); + printer->setOutputFileName(filepath); + + ui->textEdit->document()->print(printer); +} + +void PrintPreviewDialog::on_pushButtonPrint_clicked() +{ + printer->setOutputFormat(QPrinter::NativeFormat); + printer->setOutputFileName(""); + + QPrintDialog *dlg = new QPrintDialog(printer, this); + if (dlg->exec() != QDialog::Accepted) + return; + + ui->textEdit->document()->print(printer); +} +void PrintPreviewDialog::on_comboBox_currentIndexChanged(int index) +{ + +//} + +//void PrintPreviewDialog::on_comboBox_currentIndexChanged(const QString &arg1) +//{ + // set margin boxes + double l(0),t(0),r(0),b(0); + + if(index == 0) + printer->getPageMargins(&l,&t,&r,&b,QPrinter::Inch); + else if(index == 1) + printer->getPageMargins(&l,&t,&r,&b,QPrinter::Millimeter); + else if(index == 2) + printer->getPageMargins(&l,&t,&r,&b,QPrinter::DevicePixel); + else if(index == 3) + printer->getPageMargins(&l,&t,&r,&b,QPrinter::Point); + + if(index == 0) + { + ui->doubleSpinBoxLeft->setDecimals(2); + ui->doubleSpinBoxLeft->setSingleStep(0.01); + ui->doubleSpinBoxTop->setDecimals(2); + ui->doubleSpinBoxTop->setSingleStep(0.01); + ui->doubleSpinBoxRight->setDecimals(2); + ui->doubleSpinBoxRight->setSingleStep(0.01); + ui->doubleSpinBoxBottom->setDecimals(2); + ui->doubleSpinBoxBottom->setSingleStep(0.01); + } + else + { + ui->doubleSpinBoxLeft->setDecimals(0); + ui->doubleSpinBoxLeft->setSingleStep(1.0); + ui->doubleSpinBoxTop->setDecimals(0); + ui->doubleSpinBoxTop->setSingleStep(1.0); + ui->doubleSpinBoxRight->setDecimals(0); + ui->doubleSpinBoxRight->setSingleStep(1.0); + ui->doubleSpinBoxBottom->setDecimals(0); + ui->doubleSpinBoxBottom->setSingleStep(1.0); + } + + ui->doubleSpinBoxLeft->setValue(l); + ui->doubleSpinBoxTop->setValue(t); + ui->doubleSpinBoxRight->setValue(r); + ui->doubleSpinBoxBottom->setValue(b); +} + +void PrintPreviewDialog::updateMargins() +{ + double l = ui->doubleSpinBoxLeft->value(); + double t = ui->doubleSpinBoxTop->value(); + double r = ui->doubleSpinBoxRight->value(); + double b = ui->doubleSpinBoxBottom->value(); + + if(ui->comboBox->currentIndex() == 0) + printer->setPageMargins(l,t,r,b,QPrinter::Inch); + else if(ui->comboBox->currentIndex() == 1) + printer->setPageMargins(l,t,r,b,QPrinter::Millimeter); + else if(ui->comboBox->currentIndex() == 2) + printer->setPageMargins(l,t,r,b,QPrinter::DevicePixel); + else if(ui->comboBox->currentIndex() == 3) + printer->setPageMargins(l,t,r,b,QPrinter::Point); +} + +void PrintPreviewDialog::on_doubleSpinBoxLeft_editingFinished() +{ + updateMargins(); +} + +void PrintPreviewDialog::on_doubleSpinBoxTop_editingFinished() +{ + updateMargins(); +} + +void PrintPreviewDialog::on_doubleSpinBoxRight_editingFinished() +{ + updateMargins(); +} + +void PrintPreviewDialog::on_doubleSpinBoxBottom_editingFinished() +{ + updateMargins(); +} + diff --git a/printpreviewdialog.h b/printpreviewdialog.h new file mode 100644 index 0000000..4493898 --- /dev/null +++ b/printpreviewdialog.h @@ -0,0 +1,68 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef PRINTPREVIEWDIALOG_H +#define PRINTPREVIEWDIALOG_H + +#include +#include +#include +#include "song.h" +#include "bible.h" +#include "announcewidget.h" +#include "schedule.h" + +namespace Ui { +class PrintPreviewDialog; +} + +class PrintPreviewDialog : public QDialog +{ + Q_OBJECT + +public: + explicit PrintPreviewDialog(QWidget *parent = 0); + ~PrintPreviewDialog(); + +public slots: + void setText(Song song); + void setText(QString bible,QString book,int chapter); + void setText(Announcement announce); + void setSchedule(QString scheduleName, const QList &schedule, bool printDetail); + +private slots: + void on_fontComboBox_currentFontChanged(const QFont &f); + void on_spinBoxFontSize_valueChanged(int arg1); + void on_pushButtonPDF_clicked(); + void on_pushButtonPrint_clicked(); +// void on_comboBox_currentIndexChanged(const QString &arg1); + void on_comboBox_currentIndexChanged(int index); + + void updateMargins(); + void on_doubleSpinBoxLeft_editingFinished(); + void on_doubleSpinBoxTop_editingFinished(); + void on_doubleSpinBoxRight_editingFinished(); + void on_doubleSpinBoxBottom_editingFinished(); + +private: + QPrinter* printer; + Ui::PrintPreviewDialog *ui; +}; + +#endif // PRINTPREVIEWDIALOG_H diff --git a/printpreviewdialog.ui b/printpreviewdialog.ui new file mode 100644 index 0000000..8d866fe --- /dev/null +++ b/printpreviewdialog.ui @@ -0,0 +1,193 @@ + + + PrintPreviewDialog + + + + 0 + 0 + 493 + 475 + + + + softProjector Print Dialog + + + + :/icons/icons/print.png:/icons/icons/print.png + + + + + + + + Margins: + + + + + + + Left Margin + + + L: + + + + + + + 2 + + + 1000.000000000000000 + + + + + + + Top Margin + + + T: + + + + + + + 1000.000000000000000 + + + + + + + Right Margin + + + R: + + + + + + + 1000.000000000000000 + + + + + + + Bottom Margin + + + B: + + + + + + + 1000.000000000000000 + + + + + + + + Inch + + + + + Millimeter + + + + + Pixel + + + + + Point + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Font: + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + To PDF + + + + + + + Print + + + + + + + + + + + + + + + diff --git a/projectordisplayscreen.cpp b/projectordisplayscreen.cpp new file mode 100644 index 0000000..6506c32 --- /dev/null +++ b/projectordisplayscreen.cpp @@ -0,0 +1,351 @@ +#include "projectordisplayscreen.hpp" +#include "ui_projectordisplayscreen.h" + + +ProjectorDisplayScreen::ProjectorDisplayScreen(QWidget *parent) : + QWidget(parent), + ui(new Ui::ProjectorDisplayScreen) +{ + ui->setupUi(this); + dispView = new QQuickView; + imProvider = new SpImageProvider; + dispView->engine()->addImageProvider(QLatin1String("improvider"),imProvider); + QWidget *w = QWidget::createWindowContainer(dispView,this); + dispView->setSource(QUrl("qrc:/DisplayArea.qml")); +// dispView->setSource(QUrl("../../DisplayArea.qml")); + ui->verticalLayout->addWidget(w); + + backImSwitch1 = backImSwitch2 = textImSwitch1 = textImSwitch2 = false; + back1to2 = text1to2 = isNewBack = true; + m_color.setRgb(0,0,0);// = QColor(QColor::black()); +} + +ProjectorDisplayScreen::~ProjectorDisplayScreen() +{ + delete dispView; + delete ui; +} + +void ProjectorDisplayScreen::resetImGenSize() +{ + imGen.setScreenSize(this->size()); +} + +void ProjectorDisplayScreen::setBackPixmap(QPixmap p, int fillMode) +{ + // fill mode -->> 0 = Strech, 1 = keep aspect, 2 = keep aspect by expanding + + if(back.cacheKey() == p.cacheKey()) + { + isNewBack = false; + return; + } + back = p; + isNewBack = true; + + switch(fillMode) + { + case 0: + p = p.scaled(imGen.getScreenSize(),Qt::IgnoreAspectRatio,Qt::SmoothTransformation); + break; + case 1: + p = p.scaled(imGen.getScreenSize(),Qt::KeepAspectRatio,Qt::SmoothTransformation); + break; + case 2: + p = p.scaled(imGen.getScreenSize(),Qt::KeepAspectRatioByExpanding,Qt::SmoothTransformation); + break; + default: + // Do No Scaling/resizing + break; + } + + imProvider->setPixMap(p); + back1to2 = (!back1to2); + + QObject *item1 = dispView->rootObject()->findChild("backImage1"); + QObject *item2 = dispView->rootObject()->findChild("backImage2"); + if(item1 && item2) + { + if(back1to2) + { + backImSwitch2 = (!backImSwitch2); + if(backImSwitch2) + item2->setProperty("source","image://improvider/imB2a"); + else + item2->setProperty("source","image://improvider/imB2b"); + + if(p.height()setProperty("y",(imGen.height()-p.height())/2); + else + item2->setProperty("y",0); + if(p.width()setProperty("x",(imGen.width()-p.width())/2); + else + item2->setProperty("x",0); + } + else + { + backImSwitch1 = (!backImSwitch1); + if(backImSwitch1) + item1->setProperty("source","image://improvider/imB1a"); + else + item1->setProperty("source","image://improvider/imB1b"); + if(p.height()setProperty("y",(imGen.height()-p.height())/2); + else + item1->setProperty("y",0); + if(p.width()setProperty("x",(imGen.width()-p.width())/2); + else + item1->setProperty("x",0); + } + } +} + +void ProjectorDisplayScreen::setBackPixmap(QPixmap p, QColor c) +{ + if(backType == 0) + setBackPixmap(imGen.generateColorImage(c),0); + else if(backType == 1) + setBackPixmap(p,0); + else if(backType ==2) + setBackPixmap(imGen.generateEmptyImage(),0); +} + +void ProjectorDisplayScreen::setTextPixmap(QPixmap p) +{ + imProvider->setPixMap(p); + text1to2 = (!text1to2); + + QObject *item1 = dispView->rootObject()->findChild("textImage1"); + QObject *item2 = dispView->rootObject()->findChild("textImage2"); + if(item1 && item2) + { + if(text1to2) + { + textImSwitch2 = (!textImSwitch2); + if(textImSwitch2) + item2->setProperty("source","image://improvider/imT2a"); + else + item2->setProperty("source","image://improvider/imT2b"); + } + else + { + textImSwitch1 = (!textImSwitch1); + if(textImSwitch1) + item1->setProperty("source","image://improvider/imT1a"); + else + item1->setProperty("source","image://improvider/imT1b"); + } + } +} + +void ProjectorDisplayScreen::setVideoSource(QString path) +{ + QObject *item = dispView->rootObject()->findChild("player"); + QObject *item2 = dispView->rootObject()->findChild("vidOut"); + + item->setProperty("volume",0.0); + item->setProperty("source",path); + item->setProperty("loops",QMediaPlaylist::Loop); + item2->setProperty("fillMode",Qt::IgnoreAspectRatio); +} + +void ProjectorDisplayScreen::updateScreen() +{ + QObject *root = dispView->rootObject(); + QMetaObject::invokeMethod(root,"stopTransitions"); +// QString tranType = "seq"; + + // if background is a video, play video, else stop it. + if(backType == 2) + QMetaObject::invokeMethod(root,"playVideo"); + else + QMetaObject::invokeMethod(root,"stopVideo"); + + if(text1to2 && back1to2) + { + if(isNewBack) + QMetaObject::invokeMethod(root,"transitionBack1to2",Q_ARG(QVariant,tranType)); + QMetaObject::invokeMethod(root,"transitionText1to2",Q_ARG(QVariant,tranType)); + } + else if(text1to2 && (!back1to2)) + { + if(isNewBack) + QMetaObject::invokeMethod(root,"transitionBack2to1",Q_ARG(QVariant,tranType)); + QMetaObject::invokeMethod(root,"transitionText1to2",Q_ARG(QVariant,tranType)); + } + else if((!text1to2) && back1to2) + { + if(isNewBack) + QMetaObject::invokeMethod(root,"transitionBack1to2",Q_ARG(QVariant,tranType)); + QMetaObject::invokeMethod(root,"transitionText2to1",Q_ARG(QVariant,tranType)); + } + else + { + if(isNewBack) + QMetaObject::invokeMethod(root,"transitionBack2to1",Q_ARG(QVariant,tranType)); + QMetaObject::invokeMethod(root,"transitionText2to1",Q_ARG(QVariant,tranType)); + } +} + + +void ProjectorDisplayScreen::keyReleaseEvent(QKeyEvent *event) +{ + // Will get called when a key is released + int key = event->key(); + if(key == Qt::Key_Left) + emit prevSlide(); + else if(key == Qt::Key_Up) + emit prevSlide(); + else if(key == Qt::Key_PageUp) + emit prevSlide(); + else if(key == Qt::Key_Back) + emit prevSlide(); + else if(key == Qt::Key_Right) + emit nextSlide(); + else if(key == Qt::Key_Down) + emit nextSlide(); + else if(key == Qt::Key_PageDown) + emit nextSlide(); + else if(key == Qt::Key_Forward) + emit nextSlide(); + else if(key == Qt::Key_Enter) + emit nextSlide(); + else if(key == Qt::Key_Return) + emit nextSlide(); + else if(key == Qt::Key_Escape) + emit exitSlide(); + else + QWidget::keyReleaseEvent(event); +} + +void ProjectorDisplayScreen::renderNotText() +{ + setTextPixmap(imGen.generateEmptyImage()); + updateScreen(); +} + +void ProjectorDisplayScreen::renderPassiveText(QPixmap &back, bool useBack) +{ + setTextPixmap(imGen.generateEmptyImage()); + if(useBack) + setBackPixmap(back,0); + else + setBackPixmap(imGen.generateColorImage(m_color),0); + + updateScreen(); +} + +void ProjectorDisplayScreen::renderBibleText(Verse bVerse, BibleSettings &bSets) +{ + tranType = bSets.transitionType; + backType = bSets.backgroundType; + setTextPixmap(imGen.generateBibleImage(bVerse,bSets)); + setBackPixmap(bSets.backgroundPix,bSets.backgroundColor); + if(backType ==2) + setVideoSource(bSets.backgroundVideoPath); +// if(bSets.useBackground) +// setBackPixmap(bSets.background,0); +// else +// setBackPixmap(imGen.generateColorImage(m_color),0); + + + updateScreen(); +} + +void ProjectorDisplayScreen::renderSongText(Stanza stanza, SongSettings &sSets) +{ + setTextPixmap(imGen.generateSongImage(stanza,sSets)); + if(sSets.backgroundType == 1) + setBackPixmap(sSets.backgroundPix,0); + else + setBackPixmap(imGen.generateColorImage(m_color),0); + tranType = sSets.transitionType; + updateScreen(); +} + +void ProjectorDisplayScreen::renderAnnounceText(AnnounceSlide announce, TextSettings &aSets) +{ + setTextPixmap(imGen.generateAnnounceImage(announce,aSets)); + if(aSets.transitionType == 1) + setBackPixmap(aSets.backgroundPix,0); + else + setBackPixmap(imGen.generateColorImage(m_color),0); + tranType = aSets.transitionType; + updateScreen(); +} + +void ProjectorDisplayScreen::renderSlideShow(QPixmap slide, SlideShowSettings &ssSets) +{ + bool expand; + if(slide.width()height()), x(this->width()), margin(20); + + // calculate y position + if(dSettings.alignmentV==0)//top + y = margin; + else if(dSettings.alignmentV==1)//middle + y = (y-buttonSize)/2; + else if(dSettings.alignmentV==2)//buttom + y = y-buttonSize-margin; + else + y = y-buttonSize-margin; + + // calculate x position + int xt((buttonSize*3)+20); //total width of the button group + if(dSettings.alignmentH==0) + x = margin; + else if(dSettings.alignmentH==1) + x = (x-xt)/2; + else if (dSettings.alignmentH==2) + x = x-xt-margin; + else + x = (x-xt)/2; + + QObject *root = dispView->rootObject(); + QMetaObject::invokeMethod(root,"positionControls",Q_ARG(QVariant,x),Q_ARG(QVariant,y),Q_ARG(QVariant,buttonSize),Q_ARG(QVariant,dSettings.opacity)); + +} + +void ProjectorDisplayScreen::setControlsVisible(bool visible) +{ + QObject *root = dispView->rootObject(); + QMetaObject::invokeMethod(root,"setControlsVisible",Q_ARG(QVariant,visible)); +} diff --git a/projectordisplayscreen.hpp b/projectordisplayscreen.hpp new file mode 100644 index 0000000..931760e --- /dev/null +++ b/projectordisplayscreen.hpp @@ -0,0 +1,73 @@ +#ifndef PROJECTORDISPLAYSCREEN_HPP +#define PROJECTORDISPLAYSCREEN_HPP + +#include +#include +#include +#include +#include +#include +#include "spimageprovider.hpp" +#include "imagegenerator.hpp" +#include "settings.h" +#include "bible.h" +#include "song.h" +#include "announcement.h" +//#include "slideshow.h" + +namespace Ui { +class ProjectorDisplayScreen; +} + +class ProjectorDisplayScreen : public QWidget +{ + Q_OBJECT + +public: + explicit ProjectorDisplayScreen(QWidget *parent = 0); + ~ProjectorDisplayScreen(); + +public slots: + void resetImGenSize(); + + void renderNotText(); + void renderPassiveText(QPixmap &back,bool useBack); + void renderBibleText(Verse bVerse, BibleSettings &bSets); + void renderSongText(Stanza stanza, SongSettings &sSets); + void renderAnnounceText(AnnounceSlide announce, TextSettings &aSets); + void renderSlideShow(QPixmap slide,SlideShowSettings &ssSets); +// void renderVideo(); + + void positionControls(DisplayControlsSettings & dSettings); + void setControlsVisible(bool visible); + +private slots: + void setBackPixmap(QPixmap p,int fillMode); // 0 = Strech, 1 = keep aspect, 2 = keep aspect by expanding + void setBackPixmap(QPixmap p, QColor c); + void setTextPixmap(QPixmap p); + void setVideoSource(QString path); + void updateScreen(); + +signals: + void exitSlide(); + void nextSlide(); + void prevSlide(); + +protected: + void keyReleaseEvent(QKeyEvent *event); + +private: + Ui::ProjectorDisplayScreen *ui; + QQuickView *dispView; + SpImageProvider *imProvider; + ImageGenerator imGen; + bool backImSwitch1, textImSwitch1, backImSwitch2, textImSwitch2; + bool isNewBack, back1to2, text1to2; + int tranType,backType; + QColor m_color; + // DisplayControlsSettings mySettings; + + QPixmap back; +}; + +#endif // PROJECTORDISPLAYSCREEN_HPP diff --git a/projectordisplayscreen.ui b/projectordisplayscreen.ui new file mode 100644 index 0000000..ecfe9a7 --- /dev/null +++ b/projectordisplayscreen.ui @@ -0,0 +1,36 @@ + + + ProjectorDisplayScreen + + + + 0 + 0 + 400 + 300 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + diff --git a/schedule.cpp b/schedule.cpp new file mode 100644 index 0000000..80684dc --- /dev/null +++ b/schedule.cpp @@ -0,0 +1,70 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "schedule.h" + +Schedule::Schedule() +{ + scid = -1; +} + +Schedule::Schedule(BibleHistory &b) +{ + scid = -1; + stype = "bible"; + name = b.caption; + icon = QIcon(":/icons/icons/book.png"); + bible = b; +} + +Schedule::Schedule(Song &s) +{ + scid = -1; + stype = "song"; + name = QString("%1 %2").arg(s.number).arg(s.title); + icon = QIcon(":/icons/icons/song_tab.png"); + song = s; +} + +Schedule::Schedule(SlideShow &s) +{ + scid = -1; + stype = "slideshow"; + name = s.name; + icon = QIcon(":/icons/icons/photo.png"); + slideshow = s; +} + +Schedule::Schedule(VideoInfo &m) +{ + scid = -1; + stype = "media"; + name = m.fileName; + icon = QIcon(":/icons/icons/video.png"); + media = m; +} + +Schedule::Schedule(Announcement &a) +{ + scid = -1; + stype = "announce"; + name = a.title; + icon = QIcon(":/icons/icons/announce.png"); + announce = a; +} diff --git a/schedule.h b/schedule.h new file mode 100644 index 0000000..907348c --- /dev/null +++ b/schedule.h @@ -0,0 +1,51 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef SCHEDULE_H +#define SCHEDULE_H + +#include "bible.h" +#include "song.h" +#include "slideshow.h" +#include "videoinfo.h" +#include "announcement.h" + +class Schedule +{ +public: + Schedule(); + Schedule(BibleHistory &b); + Schedule(Song &s); + Schedule(SlideShow &s); + Schedule(VideoInfo &m); + Schedule(Announcement &a); + + QString stype; + QString name; + QIcon icon; + int scid; + + BibleHistory bible; + Song song; + SlideShow slideshow; + VideoInfo media; + Announcement announce; +}; + +#endif // SCHEDULE_H diff --git a/settings.cpp b/settings.cpp new file mode 100644 index 0000000..61ea67f --- /dev/null +++ b/settings.cpp @@ -0,0 +1,972 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "settings.h" + +TextSettingsBase::TextSettingsBase() +{ + id = "-1"; + themeId = -1; + textFont.fromString("Arial,16,-1,5,50,0,0,0,0,0"); + textColor = QColor(Qt::white); + textShadowColor = QColor(Qt::black); + textAlingmentV = 0; + textAlingmentH = 0; + backgroundType = 0; + backgroundColor = QColor(Qt::black); + backgroundName = ""; + backgroundPix = QPixmap(1,1); + backgroundVideoPath = ""; + screenUse = 100; + screenPosition = 0; + transitionType = 0; + effectsType = 1; + useSameForDisp2 = true; + + // older implementation, Use it for now + useShadow = true; + useFading = true; + useBlurShadow = false; + useBackground = false; + useDisp2settings = false; + + setBaseChangeHandles(); +} + +TextSettings::TextSettings() +{ + isNotCommonFont = false; + isNotCommonColor = false; + isNotCommonLayout = false; + transitionType = -1; + effectsType = -1; + backgroundType = -1; + setMainChangeHandles(); +} + +BibleSettings::BibleSettings() +{ + captionFont.fromString("Arial,15,-1,5,50,0,0,0,0,0"); + isNotSameFont = true; + captionColor = QColor(Qt::white); + isNotSameColor = false; + captionShadowColor = QColor(Qt::black); + captionAlingment = 2; + captionPosition = 1; + useAbbriviation = false; + setChangeHandes(); +} + +SongSettings::SongSettings() +{ + textAlingmentV = 1; + textAlingmentH = 1; + showStanzaTitle = false; + showSongKey = false; + showSongNumber = false; + showSongEnding = true; + isNotSameInfoFont = false; + isNotSameInfoColor = false; + infoColor = QColor(Qt::white); + infoShadowColor = QColor(Qt::black); + infoFont.fromString("Arial,15,-1,5,50,0,0,0,0,0"); + infoAling = 0; + isNotSameEndingFont = false; + isNotSameEndingColor = false; + endingColor = QColor(Qt::white); + endingShadowColor = QColor(Qt::black); + endingFont.fromString("Arial,16,-1,5,50,0,0,0,0,0"); + endingType = 0; + endingPosition = 0; + setChangeHandes(); +} + +void saveIndividualSettings(QSqlQuery &sq, QString sId, int tId, QString name, const QVariant &value) +{ + sq.addBindValue(sId); + if(tId!=-2) + sq.addBindValue(tId); + sq.addBindValue(name); + sq.addBindValue(value); + sq.exec(); + qDebug()<<"save:"<. +// +***************************************************************************/ + +#ifndef SETTINGS_H +#define SETTINGS_H + +#include +#include +#include "spfunctions.h" + +void saveIndividualSettings(QSqlQuery &sq, QString sId, int tId, QString name, const QVariant &value); +void updateIndividualSettings(QSqlQuery &sq, QString sId, int tId, QString name, const QVariant &value); + +class TextSettingsBase +{ +public: + TextSettingsBase(); + + QString id; + int themeId; + + // if to update bool handles + bool isChangedTextFont, isChangedTextColor, isChangedTextShadowColor; + bool isChangedAlingV, isChangedAlingH, isChangesTranType, isChangedEffectType; + bool isChangedBackType, isChangedBackColor, isChangedBackPix, isChangedBackVid; + bool isChangedScreenUse, isChangedScreenPos, isChangedSameDisp2; + + //Text + QFont textFont; + QColor textColor; + QColor textShadowColor; + int textAlingmentV; + // 0 - Top, 1 - Middle, 3 - Botton + int textAlingmentH; + // 0 - Left, 1 - Center, 3 - Right + + //Effects + int transitionType; + // -1 - Common, 0 - None, 1 - Fade, 2 - Fade out->in, + // 3 - Move Right, 4 - Move Left, 5 - Move Up, 6 - Move Down + int effectsType; + // -1 - Common, 0 - None, 1 - Shadow, 2 - Blurred Shadow + + //Background + int backgroundType; + // -1 - Common, 0 - Solid Color, 1 - Picture, 2 - Video + QColor backgroundColor; + QString backgroundName; + QPixmap backgroundPix; //TODO: Rename to backgroundPix + QString backgroundVideoPath; + + + // older implementation, Use it for now + bool useShadow; + bool useFading; + bool useBlurShadow; + bool useBackground; + bool useDisp2settings; + + //Layout + int screenUse; + int screenPosition; + // 0 - Top of Screen, 1 - Botton of Screen + + bool useSameForDisp2; + + void saveBase(); + void saveBase(QSqlQuery &sq); + void updateBase(); + void updateBase(QSqlQuery &sq); + void loadBase(); + void loadBase(QSqlQuery &sq); + + void setBaseChangeHandles(); + void resetBaseChangeHandles(); +}; + +class TextSettings : public TextSettingsBase +{ +public: + TextSettings(); + //Text + bool isNotCommonFont; + bool isNotCommonColor; + + //Layout + bool isNotCommonLayout; + + // Change Handles + bool isChangedNotFont, isChangedNotColor, isChangedNotLayout; + + void saveMain(); + void saveMain(QSqlQuery &sq); + void updateMain(); + void updateMain(QSqlQuery &sq); + void loadMain(); + void loadMain(QSqlQuery &sq); + + void setMainChangeHandles(); + void resetMainChangeHandles(); + +}; + +class BibleSettings : public TextSettings +{ +public: + BibleSettings(); + QFont captionFont; + bool isNotSameFont; + QColor captionColor; + bool isNotSameColor; + QColor captionShadowColor; + int captionAlingment; + int captionPosition; + bool useAbbriviation; + + // Change Handles + bool isChangedCapFont, isChangedCapColor, isChangedCapShadColor, isChangedNotSameFont; + bool isChangedNotSameColor, isChangedCapAlign, isChangedCapPos, isChangedUseAbbriv; + + void save(); + void save(QSqlQuery &sq); + void update(); + void update(QSqlQuery &sq); + void load(); + void load(QSqlQuery &sq); + + void setChangeHandes(); + void resetChangeHandles(); +}; + +class SongSettings : public TextSettings +{ +public: + SongSettings(); + // Stanza Details + bool showStanzaTitle; + bool showSongKey; + bool showSongNumber; + bool showSongEnding; + // Info + QFont infoFont; + QColor infoColor; + QColor infoShadowColor; + bool isNotSameInfoFont; + bool isNotSameInfoColor; + int infoAling; // 0 = Top, 1 = Bottom + //Ending + QFont endingFont; + QColor endingColor; + QColor endingShadowColor; + bool isNotSameEndingFont; + bool isNotSameEndingColor; + int endingType; // 0 = ***, 1 = ---, 2 = °°°, 3 = •••, 4 = ●●●, 5 = ▪▪▪, 6 = ■■■, 7 = for song copyright info + int endingPosition; + + // Change Handles + bool isChangedShowTitle, isChangedShowKey, isChangedShowNum, isChangedShowEnding; + bool isChangedInfoFont, isChangedInfoColor, isChangedInfoShadColor, isChangedNotSameInfoFont; + bool isChangedNotSameInfoColor, isChangedInfoAlign, isChangedEndingFont, isChangedEndingColor; + bool isChangedEndingShadColor, isChangedNotSameEndingFont, isChangedNotSameEndingColor; + bool isChangedEndingType, isChangedEndingPosition; + + void save(); + void save(QSqlQuery &sq); + void update(); + void update(QSqlQuery &sq); + void load(); + void load(QSqlQuery &sq); + + void setChangeHandes(); + void resetChangeHandles(); +}; + +class DisplayControlsSettings +{ +public: + DisplayControlsSettings(); + int buttonSize; + int alignmentV; + int alignmentH; + qreal opacity; +}; + +class GeneralSettings +{ // To store General Program Settings +public: + GeneralSettings(); + bool displayIsOnTop; + int displayScreen; // stores primary display screen location + int displayScreen2; // stores secondary display screen location + DisplayControlsSettings displayControls; + int currentThemeId; + bool displayOnStartUp; + bool settingsChangedAll; + bool settingsChangedMulti; + bool settingsChangedSingle; +}; + +class DisplaySettings +{ // to store display settings for concurrent projection +public: + bool useBackground; + QString backgroundPath; + QFont textFont; + QColor textColor; + int textAlingmentV; + int textAlingmentH; +}; + +class SpSettings +{ // stores main window settings, none user modifiable +public: + SpSettings(); + QByteArray spSplitter; + QByteArray bibleHiddenSplitter; + QByteArray bibleShowSplitter; + QByteArray songSplitter; + bool isWindowMaximized; + QString uiTranslation; +}; + +class BibleVersionSettings +{ +public: + BibleVersionSettings(); + QString primaryBible; + QString secondaryBible; + QString trinaryBible; + QString operatorBible; + bool settingsChanged; +}; + +class SlideShowSettings +{ +public: + SlideShowSettings(); + bool expandSmall; + int fitType; + bool resize; + int boundType; + int boundWidth; + bool settingsChanged; + int transitionType; +}; + +class Settings +{ +public: + Settings(); + GeneralSettings general; + SpSettings spMain; + BibleVersionSettings bibleSets; + BibleVersionSettings bibleSets2; + SlideShowSettings slideSets; + + bool isSpClosing; + +public slots: + void loadSettings(); + void saveSettings(); + void saveNewSettings(); + +private slots: + QByteArray textToByt(QString text); +}; + +#endif // SETTINGS_H diff --git a/settingsdialog.cpp b/settingsdialog.cpp new file mode 100644 index 0000000..fb028a6 --- /dev/null +++ b/settingsdialog.cpp @@ -0,0 +1,213 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include +#include "settingsdialog.h" +#include "ui_settingsdialog.h" + +SettingsDialog::SettingsDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::SettingsDialog) +{ + ui->setupUi(this); + generalSettingswidget = new GeneralSettingWidget; + passiveSettingwidget = new PassiveSettingWidget; + bibleSettingswidget = new BibleSettingWidget; + songSettingswidget = new SongSettingWidget; + pictureSettingWidget = new PictureSettingWidget; + announcementSettingswidget = new AnnouncementSettingWidget; + + ui->scrollAreaGeneralSettings->setWidget(generalSettingswidget); + ui->scrollAreaPassiveSettings->setWidget(passiveSettingwidget); + ui->scrollAreaBibleSettings->setWidget(bibleSettingswidget); + ui->scrollAreaSongSettings->setWidget(songSettingswidget); + ui->scrollAreaPicture->setWidget(pictureSettingWidget); + ui->scrollAreaAnnouncementSettings->setWidget(announcementSettingswidget); + + btnOk = new QPushButton(tr("OK")); + btnCancel = new QPushButton(tr("Cancel")); + btnApply = new QPushButton(tr("Apply")); + + ui->buttonBox->addButton(btnOk,QDialogButtonBox::AcceptRole); + ui->buttonBox->addButton(btnCancel,QDialogButtonBox::RejectRole); + ui->buttonBox->addButton(btnApply,QDialogButtonBox::ApplyRole); + + // Connect display screen slot + connect(generalSettingswidget,SIGNAL(setDisp2Use(bool)),this,SLOT(setUseDispScreen2(bool))); + connect(generalSettingswidget,SIGNAL(themeChanged(int)),this,SLOT(changeTheme(int))); + + // Connect Apply to all + connect(bibleSettingswidget,SIGNAL(applyBackToAll(int,QString,QPixmap)),this,SLOT(applyToAllActive(int,QString,QPixmap))); + connect(songSettingswidget,SIGNAL(applyBackToAll(int,QString,QPixmap)),this,SLOT(applyToAllActive(int,QString,QPixmap))); + connect(announcementSettingswidget,SIGNAL(applyBackToAll(int,QString,QPixmap)),this,SLOT(applyToAllActive(int,QString,QPixmap))); + +} + +void SettingsDialog::loadSettings(GeneralSettings &sets, Theme &thm, SlideShowSettings &ssets, + BibleVersionSettings &bsets, BibleVersionSettings &bsets2) +{ + gsettings = sets; + theme = thm; + bsettings = bsets; + bsettings2 = bsets2; + ssettings = ssets; + + // remember main display window setting if they will be changed + is_always_on_top = gsettings.displayIsOnTop; + current_display_screen = gsettings.displayScreen; + currentDisplayScreen2 = gsettings.displayScreen2; + + // Set individual items + generalSettingswidget->setSettings(gsettings); + bibleSettingswidget->setBibleVersions(bsettings,bsettings2); + pictureSettingWidget->setSettings(ssettings); + setThemes(); +} + +SettingsDialog::~SettingsDialog() +{ + delete ui; + + delete generalSettingswidget; + delete passiveSettingwidget; + delete bibleSettingswidget; + delete songSettingswidget; + delete announcementSettingswidget; + + delete btnOk; + delete btnCancel; + delete btnApply; +} + +void SettingsDialog::changeEvent(QEvent *e) +{ + QDialog::changeEvent(e); + switch ( e->type() ) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void SettingsDialog::on_listWidget_currentRowChanged(int currentRow) +{ + ui->stackedWidget->setCurrentIndex(currentRow); +} + +void SettingsDialog::setUseDispScreen2(bool toUse) +{ + passiveSettingwidget->setDispScreen2Visible(toUse); + bibleSettingswidget->setDispScreen2Visible(toUse); + songSettingswidget->setDispScreen2Visible(toUse); + announcementSettingswidget->setDispScreen2Visible(toUse); +} + +void SettingsDialog::on_buttonBox_clicked(QAbstractButton *button) +{ + if(button == btnOk) + { + applySettings(); + close(); + } + else if(button == btnCancel) + close(); + else if(button == btnApply) + applySettings(); +} + +void SettingsDialog::applySettings() +{ + gsettings = generalSettingswidget->getSettings(); + bibleSettingswidget->getBibleVersions(bsettings,bsettings2); + pictureSettingWidget->getSettings(ssettings); + getThemes(); + + // Apply settings + emit updateSettings(gsettings,theme,ssettings,bsettings,bsettings2); + + // 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) + emit positionsDisplayWindow(); + + // Redraw the screen: + emit updateScreen(); + + // Save Settings + theme.saveThemeUpdate(); + + // reset display holders + is_always_on_top = gsettings.displayIsOnTop; + current_display_screen = gsettings.displayScreen; + currentDisplayScreen2 = gsettings.displayScreen2; +} + +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); +} + +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); +} + +void SettingsDialog::changeTheme(int theme_id) +{ + // First save existing changes to the theme + getThemes(); + theme.saveThemeUpdate(); + + // Then load changed theme + theme.setThemeId(theme_id); + theme.loadTheme(); + setThemes(); +} + +void SettingsDialog::applyToAllActive(int t, QString backName, QPixmap background) +{ + switch (t) + { + case 1: + songSettingswidget->setBackgroungds(backName,background); + announcementSettingswidget->setBackgroungds(backName,background); + break; + case 2: + bibleSettingswidget->setBackgroungds(backName,background); + announcementSettingswidget->setBackgroungds(backName,background); + break; + case 3: + bibleSettingswidget->setBackgroungds(backName,background); + songSettingswidget->setBackgroungds(backName,background); + break; + default: + bibleSettingswidget->setBackgroungds(backName,background); + songSettingswidget->setBackgroungds(backName,background); + announcementSettingswidget->setBackgroungds(backName,background); + } +} diff --git a/settingsdialog.h b/settingsdialog.h new file mode 100644 index 0000000..103b2fb --- /dev/null +++ b/settingsdialog.h @@ -0,0 +1,94 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef SETTINGSDIALOG_H +#define SETTINGSDIALOG_H + +#include +#include "settings.h" +#include "theme.h" +#include "generalsettingwidget.h" +#include "passivesettingwidget.h" +#include "biblesettingwidget.h" +#include "songsettingwidget.h" +#include "announcementsettingwidget.h" +#include "picturesettingwidget.h" + +namespace Ui { +class SettingsDialog; +} + +class SettingsDialog : public QDialog { + Q_OBJECT + Q_DISABLE_COPY(SettingsDialog) + +public: + explicit SettingsDialog(QWidget *parent = 0); + virtual ~SettingsDialog(); + void updateSecondaryBibleMenu(); + +public slots: + void loadSettings(GeneralSettings& sets, Theme &thm, SlideShowSettings &ssets, + BibleVersionSettings &bsets, BibleVersionSettings &bsets2); + +signals: + void updateSettings(GeneralSettings& sets, Theme &thm, SlideShowSettings &ssets, + BibleVersionSettings& bsets, BibleVersionSettings& bsets2); + void positionsDisplayWindow(); + void updateScreen(); + +private: + Ui::SettingsDialog *ui; + + int current_display_screen; + int currentDisplayScreen2; + bool is_always_on_top; + + GeneralSettings gsettings; + Theme theme; + BibleVersionSettings bsettings; + BibleVersionSettings bsettings2; + SlideShowSettings ssettings; + + GeneralSettingWidget *generalSettingswidget; + PassiveSettingWidget *passiveSettingwidget; + BibleSettingWidget *bibleSettingswidget; + SongSettingWidget *songSettingswidget; + PictureSettingWidget *pictureSettingWidget; + AnnouncementSettingWidget *announcementSettingswidget; + + QPushButton *btnOk; + QPushButton *btnCancel; + QPushButton *btnApply; + +private slots: + void on_listWidget_currentRowChanged(int currentRow); + void setUseDispScreen2(bool toUse); + void on_buttonBox_clicked(QAbstractButton *button); + void applySettings(); + void changeTheme(int theme_id); + void getThemes(); + void setThemes(); + void applyToAllActive(int t, QString backName, QPixmap background); + +protected: + virtual void changeEvent(QEvent *e); +}; + +#endif // SETTINGSDIALOG_H diff --git a/settingsdialog.ui b/settingsdialog.ui new file mode 100644 index 0000000..7569a4f --- /dev/null +++ b/settingsdialog.ui @@ -0,0 +1,499 @@ + + + SettingsDialog + + + + 0 + 0 + 600 + 575 + + + + softProjector - Settings + + + + :/icons/icons/settings.png:/icons/icons/settings.png + + + + + + + 0 + 0 + + + + + 150 + 0 + + + + + 150 + 16777215 + + + + + 24 + 24 + + + + 1 + + + + General + + + + :/icons/icons/softprojector.png:/icons/icons/softprojector.png + + + + + Passive + + + + :/icons/icons/display.png:/icons/icons/display.png + + + + + Bible + + + + :/icons/icons/book.png:/icons/icons/book.png + + + + + Songs + + + + :/icons/icons/song_tab.png:/icons/icons/song_tab.png + + + + + Picture + + + + :/icons/icons/photo.png:/icons/icons/photo.png + + + + + Media + + + + :/icons/icons/video.png:/icons/icons/video.png + + + + + Announcements + + + + :/icons/icons/announce.png:/icons/icons/announce.png + + + + + + + + true + + + 0 + + + + + 0 + + + + + + 12 + 75 + true + + + + General SoftProjector Settings + + + + + + + Qt::Horizontal + + + + + + + true + + + true + + + + + 0 + 0 + 424 + 484 + + + + + + + + + + + 0 + + + + + + 12 + 75 + true + + + + Passive Settings + + + + + + + This setting are displayed when nothing is to be projected. + + + + + + + Qt::Horizontal + + + + + + + true + + + true + + + + + 0 + 0 + 424 + 465 + + + + + + + + + + + 0 + + + + + + 12 + 75 + true + + + + Bible Settings + + + + + + + Qt::Horizontal + + + + + + + true + + + true + + + + + 0 + 0 + 424 + 484 + + + + + + + + + + + 0 + + + + + + 12 + 75 + true + + + + Song Settings + + + + + + + Qt::Horizontal + + + + + + + true + + + true + + + + + 0 + 0 + 424 + 484 + + + + + + + + + + + 0 + + + + + + 12 + 75 + true + + + + Picture Settings + + + + + + + Qt::Horizontal + + + + + + + true + + + + + 0 + 0 + 424 + 484 + + + + + + + + + + + 0 + + + + + + 12 + 75 + true + + + + Media Settings + + + + + + + Qt::Horizontal + + + + + + + true + + + + + 0 + 0 + 424 + 484 + + + + + + + + + + + 0 + + + + + + 12 + 75 + true + + + + Announcement Settings + + + + + + + Qt::Horizontal + + + + + + + true + + + true + + + + + 0 + 0 + 424 + 484 + + + + + + + + + + + + + Qt::Horizontal + + + + + + + + + Qt::Horizontal + + + + 123 + 20 + + + + + + + + Qt::Horizontal + + + + + + + + + + + + diff --git a/slideshow.cpp b/slideshow.cpp new file mode 100644 index 0000000..4aa669b --- /dev/null +++ b/slideshow.cpp @@ -0,0 +1,198 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "slideshow.h" + +SlideShowItem::SlideShowItem() +{ + slideId = -1; + order = -1; +} + +SlideShowInfo::SlideShowInfo() +{ +} + +SlideShow::SlideShow() +{ + slideShowId = -1; +} + +void SlideShow::loadSlideShow(int id) +{ + slides.clear(); + slideShowId = id; + QSqlQuery sq; + sq.exec(QString("SELECT name, info FROM SlideShows WHERE id = %1").arg(slideShowId)); + sq.first(); + name = sq.value(0).toString(); + info = sq.value(1).toString(); + + QProgressDialog progress; + progress.setMaximum(100); + progress.setValue(1); + sq.exec(QString("SELECT id, p_order, name, path, pix, pix_small, pix_prev FROM Slides WHERE ss_id = %1").arg(slideShowId)); + + int max(0); + while(sq.next()) + ++max; + + sq.first(); + progress.setLabelText("Loading Slides..."); + progress.setMaximum(max+1); + int ct(0); + + QList ss; + do + { + SlideShowItem si; + si.slideId = sq.value(0).toInt(); + si.order = sq.value(1).toInt(); + si.name = sq.value(2).toString(); + si.path = sq.value(3).toString(); + si.image.loadFromData(sq.value(4).toByteArray()); + si.imageSmall.loadFromData(sq.value(5).toByteArray()); + si.imagePreview.loadFromData(sq.value(6).toByteArray()); + + ss.append(si); + ++ct; + progress.setValue(ct); + }while(sq.next()); + + // Sort to proper oder number + for(int i(0);i delList) +{ + QSqlQuery sq; + QSqlDatabase::database().transaction(); + + QProgressDialog prg(savelbl,"Cancel",0,slides.count()+1+delList.count(),ptW); + + int ct(0); + + // Create new slide show in not yet in database + if(slideShowId == -1) + { + sq.prepare("INSERT INTO SlideShows (name, info) VALUES (?,?)"); + sq.addBindValue(name); + sq.addBindValue(info); + sq.exec(); + sq.clear(); + + // get currently added slideShow id + sq.exec("SELECT seq FROM sqlite_sequence WHERE name = 'SlideShows'"); + sq.first(); + slideShowId = sq.value(0).toInt(); + sq.clear(); + + // Insert new slides + sq.prepare("INSERT INTO Slides (ss_id, p_order, name, path, pix, pix_small, pix_prev) VALUES (?,?,?,?,?,?,?)"); + foreach(const SlideShowItem &si, slides) + { + sq.addBindValue(slideShowId); + sq.addBindValue(ct); + sq.addBindValue(si.name); + sq.addBindValue(si.path); + sq.addBindValue(pixToByte(si.image)); + sq.addBindValue(pixToByte(si.imageSmall)); + sq.addBindValue(pixToByte(si.imagePreview)); + sq.exec(); + ++ct; + prg.setValue(ct); + } + QSqlDatabase::database().commit(); + return; + } + else + { + // Update Slide Show + // Update slide show info + sq.prepare("UPDATE SlideShows SET name = ?, info = ? WHERE id = ?"); + sq.addBindValue(name); + sq.addBindValue(info); + sq.addBindValue(slideShowId); + sq.exec(); + sq.clear(); + + // Update slides (order only can be updated) + int c(0); + foreach(const SlideShowItem &si, slides) + { + if(si.slideId != -1) + { + sq.exec(QString("UPDATE Slides SET p_order = %1 WHERE id = %2").arg(c).arg(si.slideId)); + ++ct; + prg.setValue(ct); + } + ++c; + } + sq.clear(); + + // Insert new slides + c = 0; + sq.prepare("INSERT INTO Slides (ss_id, p_order, name, path, pix, pix_small, pix_prev) VALUES (?,?,?,?,?,?,?)"); + foreach(const SlideShowItem &si, slides) + { + if(si.slideId == -1) + { + sq.addBindValue(slideShowId); + sq.addBindValue(c); + sq.addBindValue(si.name); + sq.addBindValue(si.path); + sq.addBindValue(pixToByte(si.image)); + sq.addBindValue(pixToByte(si.imageSmall)); + sq.addBindValue(pixToByte(si.imagePreview)); + sq.exec(); + ++ct; + prg.setValue(ct); + } + ++c; + } + } + sq.clear(); + + // Delete slides + foreach(const int sid, delList) + { + if(sid>=0) + sq.exec(QString("DELETE FROM Slides WHERE id = %1").arg(sid)); + ++ct; + prg.setValue(ct); + } + + prg.setLabelText("Saving Slide Show to Database"); + QSqlDatabase::database().commit(); + ++ct; + prg.setValue(ct); +} diff --git a/slideshow.h b/slideshow.h new file mode 100644 index 0000000..d093f91 --- /dev/null +++ b/slideshow.h @@ -0,0 +1,67 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef SLIDESHOW_H +#define SLIDESHOW_H + +#include +#include +#include +#include +#include + +#include "spfunctions.h" + +class SlideShowItem +{ +public: + SlideShowItem(); + int slideId; + int order; + QString name; + QString path; + QPixmap image; + QPixmap imageSmall; + QPixmap imagePreview; +}; + +class SlideShowInfo +{ +public: + SlideShowInfo(); + int slideSwId; + QString name; + QString info; +}; + +class SlideShow +{ +public: + SlideShow(); + int slideShowId; + QString name; + QString info; + QList slides; + +public slots: + void loadSlideShow(int id); + void saveSideShow(QString savelbl, QWidget *ptW, QList delList); +}; + +#endif // SLIDESHOW_H diff --git a/slideshoweditor.cpp b/slideshoweditor.cpp new file mode 100644 index 0000000..dc66df4 --- /dev/null +++ b/slideshoweditor.cpp @@ -0,0 +1,217 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "slideshoweditor.h" +#include "ui_slideshoweditor.h" + +SlideShowEditor::SlideShowEditor(QWidget *parent) : + // QWidget(parent), + QDialog(parent), + ui(new Ui::SlideShowEditor) +{ + ui->setupUi(this); + updateButtonState(); +} + +SlideShowEditor::~SlideShowEditor() +{ + delete ui; +} + +void SlideShowEditor::setSlideShow(SlideShow ss) +{ + editSS = ss; + deleteList.clear(); + loadSlideShow(); +} + +void SlideShowEditor::loadSlideShow() +{ + ui->lineEditTitle->setText(editSS.name); + ui->plainTextEditInfo->setPlainText(editSS.info); + + reloadSlides(); + ui->listWidgetSlides->setCurrentRow(0); +} + +void SlideShowEditor::reloadSlides() +{ + ui->listWidgetSlides->clear(); + foreach(const SlideShowItem &ssi, editSS.slides) + { + QListWidgetItem *itm = new QListWidgetItem; + QIcon ico(ssi.imageSmall); + itm->setIcon(ico); + ui->listWidgetSlides->addItem(itm); + } +} + +void SlideShowEditor::updateButtonState() +{ + int c = ui->listWidgetSlides->currentRow(); + int ct = editSS.slides.count(); + + ui->pushButtonRemoveImage->setEnabled(c>=0 && cpushButtonMoveUp->setEnabled(c>0 && cpushButtonMoveDown->setEnabled(c>=0 && (c0) + { + this->setCursor(Qt::WaitCursor); + int i(0); + QProgressDialog progress(tr("Adding files..."), tr("Cancel"), 0, imageFilePaths.count(), this); + ui->listWidgetSlides->setIconSize(QSize(100,100)); + foreach(const QString &file, imageFilePaths) + { + ++i; + progress.setValue(i); + + QPixmap img; + SlideShowItem sd; + img.load(file); + // set display image. If to resize, resize them + if(mySettings.resize) + { + if(img.width()>mySettings.boundWidth || img.height()>mySettings.boundWidth ) + sd.image = img.scaled(mySettings.boundWidth ,mySettings.boundWidth , Qt::KeepAspectRatio); + else + sd.image = img; + } + else + sd.image = img; + + // set preview image + if(img.width()>400 || img.height()>400) + sd.imagePreview = img.scaled(400,400, Qt::KeepAspectRatio); + else + sd.imagePreview = img; + + // set list image + if(img.width()>100 || img.height()>100) + sd.imageSmall = img.scaled(100,100, Qt::KeepAspectRatio); + else + sd.imageSmall = img; + + // set file name + QFileInfo f(file); + sd.name = f.fileName(); + sd.path = f.filePath(); + + // add to slideshow + editSS.slides.append(sd); + + // add to slide show list + QListWidgetItem *itm = new QListWidgetItem; + QIcon ico(sd.imageSmall); + + itm->setIcon(ico); + ui->listWidgetSlides->addItem(itm); + } + this->setCursor(Qt::ArrowCursor); + updateButtonState(); + } + +} + +void SlideShowEditor::on_pushButtonRemoveImage_clicked() +{ + int c = ui->listWidgetSlides->currentRow(); + if(c>=0 && clistWidgetSlides->currentRow(); + int u = c-1; + if(u>=0) + { + editSS.slides.move(c,u); + reloadSlides(); + ui->listWidgetSlides->setCurrentRow(u); + updateButtonState(); + } +} + +void SlideShowEditor::on_pushButtonMoveDown_clicked() +{ + int c = ui->listWidgetSlides->currentRow(); + int d = c+1; + if(dlistWidgetSlides->setCurrentRow(d); + updateButtonState(); + } +} + +void SlideShowEditor::on_pushButtonSave_clicked() +{ + // Make sure that slide show is not empty before saving. + if(editSS.slides.count()<=0) + { + //todo: message box saying that title cannot be empty + close(); + return; + } + + editSS.name = ui->lineEditTitle->text().trimmed(); + + // Make sure that slide show Title is not empty before saving. + if(editSS.name.isEmpty()) + { + QMessageBox mb(this); + mb.setText(tr("Slide show title cannot be left empty.\nPlease enter a title.")); + mb.setWindowTitle(tr("Slide show title is missing")); + mb.setIcon(QMessageBox::Warning); + mb.exec(); + ui->lineEditTitle->setFocus(); + return; + } + + editSS.info = ui->plainTextEditInfo->toPlainText(); + editSS.saveSideShow(tr("Saving Slide Show"),this,deleteList); + close(); +} + +void SlideShowEditor::on_pushButtonCancel_clicked() +{ + close(); +} + +void SlideShowEditor::on_listWidgetSlides_currentRowChanged(int currentRow) +{ + if(currentRow>=0) + { + ui->labelPreview->setPixmap(editSS.slides.at(currentRow).imagePreview); + ui->labelPixInfo->setText(tr("Preview slide: %1").arg(editSS.slides.at(currentRow).name)); + updateButtonState(); + } +} diff --git a/slideshoweditor.h b/slideshoweditor.h new file mode 100644 index 0000000..b0b1d17 --- /dev/null +++ b/slideshoweditor.h @@ -0,0 +1,68 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef SLIDESHOWEDITOR_H +#define SLIDESHOWEDITOR_H + +//#include +#include +#include +#include +#include + +#include "slideshow.h" +#include "settings.h" + +namespace Ui { +class SlideShowEditor; +} + +//class SlideShowEditor : public QWidget +class SlideShowEditor : public QDialog +{ + Q_OBJECT + Q_DISABLE_COPY(SlideShowEditor)// for Dialog test +public: + explicit SlideShowEditor(QWidget *parent = 0); + ~SlideShowEditor(); + void setSettings(SlideShowSettings &settings){mySettings = settings;} + void setSlideShow(SlideShow ss); + +private slots: + void loadSlideShow(); + void reloadSlides(); + void updateButtonState(); + + void on_pushButtonAddImages_clicked(); + void on_pushButtonRemoveImage_clicked(); + void on_pushButtonMoveUp_clicked(); + void on_pushButtonMoveDown_clicked(); + void on_pushButtonSave_clicked(); + void on_pushButtonCancel_clicked(); + void on_listWidgetSlides_currentRowChanged(int currentRow); + +private: + Ui::SlideShowEditor *ui; + SlideShow editSS; + QProgressDialog progress; + QList deleteList; + SlideShowSettings mySettings; +}; + +#endif // SLIDESHOWEDITOR_H diff --git a/slideshoweditor.ui b/slideshoweditor.ui new file mode 100644 index 0000000..76c932f --- /dev/null +++ b/slideshoweditor.ui @@ -0,0 +1,234 @@ + + + SlideShowEditor + + + + 0 + 0 + 576 + 567 + + + + Slide Show Editor + + + + :/icons/icons/slideshow_edit.png:/icons/icons/slideshow_edit.png + + + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + Slide Show Title: + + + + + + + + + + Slide Show Info: + + + + + + + + 0 + 0 + + + + + 16777215 + 50 + + + + + + + + + + + 100 + 100 + + + + 1 + + + + + + + + + Add Pictures + + + + :/icons/icons/add.png:/icons/icons/add.png + + + + + + + Remove Picture + + + + :/icons/icons/remove.png:/icons/icons/remove.png + + + + + + + + + + + :/icons/icons/up.png:/icons/icons/up.png + + + + + + + + + + + :/icons/icons/down.png:/icons/icons/down.png + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 400 + 300 + + + + + 400 + 300 + + + + QFrame::WinPanel + + + QFrame::Sunken + + + Picture Preview + + + Qt::AlignCenter + + + + + + + Picture Information + + + true + + + + + + + Qt::Vertical + + + + 20 + 74 + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Save + + + + + + + Cancel + + + + + + + + + lineEditTitle + plainTextEditInfo + listWidgetSlides + pushButtonAddImages + pushButtonRemoveImage + pushButtonMoveUp + pushButtonMoveDown + pushButtonSave + pushButtonCancel + + + + + + diff --git a/softProjector.pro b/softProjector.pro new file mode 100644 index 0000000..557d226 --- /dev/null +++ b/softProjector.pro @@ -0,0 +1,167 @@ +##************************************************************************** +## +## softProjector - an open source media projection software +## Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +## +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation version 3 of the License. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . +## +##************************************************************************** + + +QT += core \ + gui \ + widgets \ + network \ + sql \ + qml \ + quick \ + printsupport \ + multimedia + +TARGET = SoftProjector +TEMPLATE = app +CONFIG += x86 ppc x86_64 ppc64 # Compile a universal build + +RES_DIR = $${PWD}/unknownsys_build +win32: RES_DIR = $${PWD}/win32_build +unix: RES_DIR = $${PWD}/unix_build +macx: RES_DIR = $${PWD}/mac_build + +DESTDIR = $${RES_DIR}/bin +OBJECTS_DIR = $${RES_DIR}/obj +MOC_DIR = $${RES_DIR}/moc +UI_DIR = $${RES_DIR}/ui +RCC_DIR = $${RES_DIR}/rcc +OUT_PWD = $${RES_DIR}/bin + +SOURCES += main.cpp \ + softprojector.cpp \ + songwidget.cpp \ + biblewidget.cpp \ + editwidget.cpp \ + song.cpp \ + bible.cpp \ + settingsdialog.cpp \ + aboutdialog.cpp \ + addsongbookdialog.cpp \ + highlight.cpp \ + managedatadialog.cpp \ + managedata.cpp \ + announcewidget.cpp \ + helpdialog.cpp \ + songcounter.cpp \ + bibleinformationdialog.cpp \ + settings.cpp \ + generalsettingwidget.cpp \ + biblesettingwidget.cpp \ + songsettingwidget.cpp \ + announcementsettingwidget.cpp \ + printpreviewdialog.cpp \ + controlbutton.cpp \ + passivesettingwidget.cpp \ + theme.cpp \ + picturewidget.cpp \ + slideshow.cpp \ + mediawidget.cpp \ + videoplayerwidget.cpp \ + videoinfo.cpp \ + spfunctions.cpp \ + slideshoweditor.cpp \ + editannouncementdialog.cpp \ + announcement.cpp \ + schedule.cpp \ + picturesettingwidget.cpp \ + moduledownloaddialog.cpp \ + moduleprogressdialog.cpp \ + displaysetting.cpp \ + projectordisplayscreen.cpp \ + imagegenerator.cpp \ + spimageprovider.cpp +HEADERS += softprojector.h \ + songwidget.h \ + biblewidget.h \ + editwidget.h \ + song.h \ + bible.h \ + settingsdialog.h \ + aboutdialog.h \ + addsongbookdialog.h \ + highlight.h \ + managedatadialog.h \ + managedata.h \ + announcewidget.h \ + helpdialog.h \ + songcounter.h \ + bibleinformationdialog.h \ + settings.h \ + generalsettingwidget.h \ + biblesettingwidget.h \ + songsettingwidget.h \ + announcementsettingwidget.h \ + printpreviewdialog.h \ + controlbutton.h \ + passivesettingwidget.h \ + theme.h \ + picturewidget.h \ + slideshow.h \ + mediawidget.h \ + videoplayerwidget.h \ + videoinfo.h \ + spfunctions.h \ + slideshoweditor.h \ + editannouncementdialog.h \ + announcement.h \ + schedule.h \ + picturesettingwidget.h \ + moduledownloaddialog.h \ + moduleprogressdialog.h \ + displaysetting.h \ + projectordisplayscreen.hpp \ + imagegenerator.hpp \ + spimageprovider.hpp +FORMS += softprojector.ui \ + songwidget.ui \ + biblewidget.ui \ + editwidget.ui \ + settingsdialog.ui \ + aboutdialog.ui \ + addsongbookdialog.ui \ + managedatadialog.ui \ + announcewidget.ui \ + helpdialog.ui \ + songcounter.ui \ + bibleinformationdialog.ui \ + generalsettingwidget.ui \ + biblesettingwidget.ui \ + songsettingwidget.ui \ + announcementsettingwidget.ui \ + printpreviewdialog.ui \ + passivesettingwidget.ui \ + picturewidget.ui \ + mediawidget.ui \ + slideshoweditor.ui \ + editannouncementdialog.ui \ + picturesettingwidget.ui \ + moduledownloaddialog.ui \ + moduleprogressdialog.ui \ + projectordisplayscreen.ui +TRANSLATIONS += translations/softpro_de.ts\ + translations/softpro_ru.ts\ + translations/softpro_cs.ts\ + translations/softpro_ua.ts +CODECFORTR = UTF-8 +RESOURCES += softprojector.qrc + +win32 { + RC_FILE = softprojector.rc +} diff --git a/softprojector.cpp b/softprojector.cpp new file mode 100644 index 0000000..d63608b --- /dev/null +++ b/softprojector.cpp @@ -0,0 +1,2376 @@ +/*************************************************************************** +// +// SoftProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include +#include "softprojector.h" +#include "ui_softprojector.h" +#include "aboutdialog.h" +#include "editannouncementdialog.h" + +SoftProjector::SoftProjector(QWidget *parent) + : QMainWindow(parent), ui(new Ui::SoftProjectorClass) +{ + // Load settings + mySettings.loadSettings(); + theme.setThemeId(mySettings.general.currentThemeId); + theme.loadTheme(); + // Reset current theme id if initial was 0 + mySettings.general.currentThemeId = theme.getThemeId(); + + //Setting up the Display Screen + desktop = new QDesktopWidget(); + // NOTE: With virtual desktop, desktop->screen() will always return the main screen, + // 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 + // Don't worry, we'll move it later + + bibleWidget = new BibleWidget; + songWidget = new SongWidget; + editWidget = new EditWidget; + announceWidget = new AnnounceWidget; + manageDialog = new ManageDataDialog(this); + settingsDialog = new SettingsDialog(this); + helpDialog = new HelpDialog(); + pictureWidget = new PictureWidget; + mediaPlayer = new MediaWidget; + + ui->setupUi(this); + + // Create action group for language slections + languagePath = qApp->applicationDirPath()+QString(QDir::separator())+"translations"+QString(QDir::separator()); + createLanguageActions(); + + // Always place the "Settings" menu item under the application + // menu, even if the item is translated (Mac OS X): + ui->actionSettings->setMenuRole(QAction::PreferencesRole); + // FIXME Make the Preferences menu appear in the menu bar even for the + // display window (Mac OS X) + + // Apply Settings + applySetting(mySettings.general, theme, mySettings.slideSets, mySettings.bibleSets, mySettings.bibleSets2); + + positionDisplayWindow(); + +// pds1->renderText(false); +// pds2->renderText(false); + + showing = false; + + ui->projectTab->clear(); + ui->projectTab->addTab(bibleWidget,QIcon(":/icons/icons/book.png"), tr("Bible (F6)")); + ui->projectTab->addTab(songWidget,QIcon(":/icons/icons/song_tab.png"), tr("Songs (F7)")); + ui->projectTab->addTab(pictureWidget,QIcon(":/icons/icons/photo.png"),tr("Pictures")); +// ui->projectTab->addTab(mediaPlayer,QIcon(":/icons/icons/video.png"),tr("Media")); + ui->projectTab->addTab(announceWidget,QIcon(":/icons/icons/announce.png"), tr("Announcements (F8)")); + ui->projectTab->setCurrentIndex(0); + + + connect(bibleWidget, SIGNAL(goLive(QStringList, QString, QItemSelection)), + this, SLOT(setChapterList(QStringList, QString, QItemSelection))); + connect(bibleWidget, SIGNAL(setArrowCursor()), this, SLOT(setArrowCursor())); + connect(bibleWidget, SIGNAL(setWaitCursor()), this, SLOT(setWaitCursor())); + connect(songWidget, SIGNAL(sendSong(Song, int)), this, SLOT(setSongList(Song, int))); + connect(songWidget, SIGNAL(setArrowCursor()), this, SLOT(setArrowCursor())); + connect(songWidget, SIGNAL(setWaitCursor()), this, SLOT(setWaitCursor())); + connect(announceWidget,SIGNAL(sendAnnounce(Announcement,int)), this, SLOT(setAnnounceText(Announcement,int))); + connect(pictureWidget, SIGNAL(sendSlideShow(QList&,int,QString)), + this, SLOT(setPictureList(QList&,int,QString))); + connect(pictureWidget, SIGNAL(sendToSchedule(SlideShow&)),this,SLOT(addToShcedule(SlideShow&))); + connect(mediaPlayer, SIGNAL(toProjector(VideoInfo&)), this, SLOT(setVideo(VideoInfo&))); + connect(editWidget, SIGNAL(updateSongFromDatabase(int,int)), songWidget, SLOT(updateSongFromDatabase(int,int))); + connect(editWidget, SIGNAL(addedNew(Song,int)), songWidget,SLOT(addNewSong(Song,int))); + connect(manageDialog, SIGNAL(setMainArrowCursor()), this, SLOT(setArrowCursor())); + connect(manageDialog, SIGNAL(setMainWaitCursor()), this, SLOT(setWaitCursor())); + connect(languageGroup, SIGNAL(triggered(QAction*)), this, SLOT(switchLanguage(QAction*))); + connect(pds1,SIGNAL(exitSlide()),this,SLOT(on_actionHide_triggered())); + connect(pds1,SIGNAL(nextSlide()),this,SLOT(nextSlide())); + connect(pds1,SIGNAL(prevSlide()),this,SLOT(prevSlide())); + connect(settingsDialog,SIGNAL(updateSettings(GeneralSettings&,Theme&,SlideShowSettings&, + BibleVersionSettings&,BibleVersionSettings&)), + this,SLOT(updateSetting(GeneralSettings&,Theme&,SlideShowSettings&, + BibleVersionSettings&,BibleVersionSettings&))); + connect(settingsDialog,SIGNAL(positionsDisplayWindow()),this,SLOT(positionDisplayWindow())); + connect(settingsDialog,SIGNAL(updateScreen()),this,SLOT(updateScreen())); + connect(songWidget,SIGNAL(addToSchedule(Song&)),this,SLOT(addToShcedule(Song&))); + connect(announceWidget,SIGNAL(addToSchedule(Announcement&)),this,SLOT(addToShcedule(Announcement&))); + + // Add tool bar actions + ui->toolBarFile->addAction(ui->actionNewSchedule); + ui->toolBarFile->addAction(ui->actionOpenSchedule); + ui->toolBarFile->addAction(ui->actionSaveSchedule); + ui->toolBarFile->addSeparator(); + ui->toolBarFile->addAction(ui->actionPrint); + + ui->toolBarSchedule->addAction(ui->actionMoveScheduleTop); + ui->toolBarSchedule->addAction(ui->actionMoveScheduleUp); + ui->toolBarSchedule->addAction(ui->actionMoveScheduleDown); + ui->toolBarSchedule->addAction(ui->actionMoveScheduleBottom); + ui->toolBarSchedule->addSeparator(); + ui->toolBarSchedule->addAction(ui->actionScheduleAdd); + ui->toolBarSchedule->addAction(ui->actionScheduleRemove); + ui->toolBarSchedule->addAction(ui->actionScheduleClear); + + ui->toolBarEdit->addAction(ui->actionNew); + ui->toolBarEdit->addAction(ui->actionEdit); + ui->toolBarEdit->addAction(ui->actionCopy); + ui->toolBarEdit->addAction(ui->actionDelete); + ui->toolBarEdit->addSeparator(); + ui->toolBarEdit->addAction(ui->actionSettings); + ui->toolBarEdit->addSeparator(); + ui->toolBarEdit->addAction(ui->actionSong_Counter); + ui->toolBarEdit->addSeparator(); + ui->toolBarEdit->addAction(ui->action_Help); + + ui->toolBarShow->addAction(ui->actionShow); + ui->toolBarShow->addAction(ui->actionClear); + ui->toolBarShow->addAction(ui->actionHide); + ui->toolBarShow->addAction(ui->actionCloseDisplay); + + ui->actionShow->setEnabled(false); + ui->actionHide->setEnabled(false); + ui->actionClear->setEnabled(false); + + // Create and connect shortcuts + shpgUP = new QShortcut(Qt::Key_PageUp,this); + shpgDwn = new QShortcut(Qt::Key_PageDown,this); + shSart1 = new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_B),this); + shSart2 = new QShortcut(QKeySequence(Qt::SHIFT + Qt::Key_F5),this); + connect(shpgUP,SIGNAL(activated()),this,SLOT(prevSlide())); + connect(shpgDwn,SIGNAL(activated()),this,SLOT(nextSlide())); + connect(shSart1,SIGNAL(activated()),this,SLOT(on_actionShow_triggered())); + connect(shSart2,SIGNAL(activated()),this,SLOT(on_actionShow_triggered())); + + // Hide Multi verse selection, only visible to be when showing bible + ui->widgetMultiVerse->setVisible(false); + + // Set up video controls + /* + playerSlider = new Phonon::SeekSlider(this); + playerSlider->setMediaObject(pds1->videoPlayer); + ui->horizontalLayoutPlayBackTime->insertWidget(1,playerSlider); + + playerAudioOutput = new Phonon::AudioOutput(Phonon::VideoCategory); + volumeSlider = new Phonon::VolumeSlider(playerAudioOutput); + Phonon::createPath(pds1->videoPlayer,playerAudioOutput); + ui->horizontalLayoutPlayBackButtons->addWidget(volumeSlider); + + connect(pds1, SIGNAL(sendTimeText(QString)),this, SLOT(setTimeText(QString))); + connect(pds1, SIGNAL(updatePlayButton(bool)),this,SLOT(setButtonPlayIcon(bool))); + */ + ui->widgetPlayBackControls->setVisible(false); + + version_string = "2"; // to be used only for official release + //version_string = "2 Beta"; // to be used between official releases + this->setWindowTitle("SoftProjector " + version_string); +} + +SoftProjector::~SoftProjector() +{ + saveSettings(); + delete songWidget; + delete editWidget; + delete bibleWidget; + delete announceWidget; + delete manageDialog; +// delete playerSlider; +// delete playerAudioOutput; +// delete volumeSlider; + delete mediaPlayer; + delete pds1; + delete pds2; + delete desktop; + delete languageGroup; + delete settingsDialog; + delete shpgUP; + delete shpgDwn; + delete shSart1; + delete shSart2; + delete helpDialog; + delete ui; +} + +void SoftProjector::positionDisplayWindow() +{ + // Position the display window as needed (including setting "always on top" flag, + // showing full screen / normal mode, and positioning it on the right screen) + + if (mySettings.general.displayIsOnTop) + { + pds1->setWindowFlags(Qt::WindowStaysOnTopHint); + pds2->setWindowFlags(Qt::WindowStaysOnTopHint); + } + else + { + pds1->setWindowFlags(0); // Do not show always on top + pds2->setWindowFlags(0); // Do not show always on top + } + + if(desktop->screenCount() > 1) + { + if (desktop->isVirtualDesktop()) + { + // Move the display widget to screen 1 (secondary screen): +// QPoint top_left = desktop->screenGeometry(mySettings.general.displayScreen).topLeft(); +// pds1->move(top_left); + pds1->setGeometry(desktop->screenGeometry(mySettings.general.displayScreen)); + } + +// if(!ui->actionCloseDisplay->isChecked()) +// ui->actionCloseDisplay->trigger(); + + pds1->setCursor(Qt::BlankCursor); //Sets a Blank Mouse to the screen + pds1->resetImGenSize(); + pds1->renderPassiveText(theme.passive.backgroundPix,true); + + + if(mySettings.general.displayOnStartUp) +{ + pds1->showFullScreen(); + + //TODO:FIX +// if(!ui->actionCloseDisplay->isChecked()) +// ui->actionCloseDisplay->trigger(); + ui->actionCloseDisplay->setChecked(true); + updateCloseDisplayButtons(true); + + } + + pds1->setControlsVisible(false); + // check if to display secondary display screen + if(mySettings.general.displayScreen2>=0) + { + hasDisplayScreen2 = true; + if (desktop->isVirtualDesktop()) + { + // Move the display widget to screen 1 (secondary screen): +// QPoint top_left = desktop->screenGeometry(mySettings.general.pds2).topLeft(); +// pds2->move(top_left); + pds2->setGeometry(desktop->screenGeometry(mySettings.general.displayScreen2)); + pds2->resetImGenSize(); + } + pds2->showFullScreen(); + pds2->setCursor(Qt::BlankCursor); //Sets a Blank Mouse to the screen +// pds2->positionOpjects(); + pds2->setControlsVisible(false); + } + else + { + hasDisplayScreen2 = false; + pds2->hide(); + } + + // specify that there is more than one diplay screen(monitor) availbale + isSingleScreen = false; + } + else + { + // Single monitor only: Do not show on strat up. + // Will be shown only when items were sent to the projector. + pds1->setGeometry(desktop->screenGeometry()); + pds1->resetImGenSize(); + showDisplayScreen(false); + isSingleScreen = true; + hasDisplayScreen2 = false; + } +} + +void SoftProjector::showDisplayScreen(bool show) +{ + if(show) + { + pds1->showFullScreen(); +// pds1->positionOpjects(); + } + else + { + pds1->hide(); + ui->actionCloseDisplay->setEnabled(false); + } + pds1->positionControls(mySettings.general.displayControls); + pds1->setControlsVisible(true); +} + +void SoftProjector::saveSettings() +{ + // Save splitter states + mySettings.spMain.spSplitter = ui->splitter->saveState(); + mySettings.spMain.bibleHiddenSplitter = bibleWidget->getHiddenSplitterState(); + mySettings.spMain.bibleShowSplitter = bibleWidget->getShownSplitterState(); + mySettings.spMain.songSplitter = songWidget->getSplitterState(); + + // Save window maximized state + mySettings.spMain.isWindowMaximized = this->isMaximized(); + + // save translation settings + QList languageActions = ui->menuLanguage->actions(); + + for(int i(0);i < languageActions.count();++i) + { + if(languageActions.at(i)->isChecked()) + { + if(i < languageActions.count()) + mySettings.spMain.uiTranslation = languageActions.at(i)->data().toString(); + else + mySettings.spMain.uiTranslation = "en"; + } + } + + // save settings + mySettings.saveSettings(); + theme.saveThemeUpdate(); +} + +void SoftProjector::updateSetting(GeneralSettings &g, Theme &t, SlideShowSettings &ssets, + BibleVersionSettings &bsets, BibleVersionSettings &bsets2) +{ + mySettings.general = g; + mySettings.slideSets = ssets; + mySettings.bibleSets = bsets; + mySettings.bibleSets2 = bsets2; + mySettings.saveSettings(); + theme = t; + bibleWidget->setSettings(mySettings.bibleSets); + pictureWidget->setSettings(mySettings.slideSets); + + // Apply display settings; + pds1->resetImGenSize(); +// pds1->setNewPassiveWallpaper(theme.passive.background,theme.passive.useBackground); +// if(theme.passive2.useDisp2settings) +// pds2->setNewPassiveWallpaper(theme.passive2.background,theme.passive2.useBackground); +// else +// pds2->setNewPassiveWallpaper(theme.passive.background,theme.passive.useBackground); +} + +void SoftProjector::applySetting(GeneralSettings &g, Theme &t, SlideShowSettings &s, + BibleVersionSettings &b1, BibleVersionSettings &b2) +{ + updateSetting(g,t,s,b1,b2); + + // Apply splitter states + ui->splitter->restoreState(mySettings.spMain.spSplitter); + bibleWidget->setHiddenSplitterState(mySettings.spMain.bibleHiddenSplitter); + bibleWidget->setShownSplitterState(mySettings.spMain.bibleShowSplitter); + songWidget->setSplitterState(mySettings.spMain.songSplitter); + + // Apply window maximized + if(mySettings.spMain.isWindowMaximized) + this->setWindowState(Qt::WindowMaximized); + + // Apply current translation + QList la = ui->menuLanguage->actions(); + QString splocale; + for(int i(0);i < la.count(); ++i) + { + if(la.at(i)->data().toString() == mySettings.spMain.uiTranslation) + { + if(i < la.count()) + { + ui->menuLanguage->actions().at(i)->setChecked(true); + splocale = mySettings.spMain.uiTranslation; + } + else + { + ui->menuLanguage->actions().at(0)->setChecked(true);//default + splocale = "en"; + } + } + } + cur_locale = splocale; + retranslateUis(); +} + +void SoftProjector::closeEvent(QCloseEvent *event) +{ + if(is_schedule_saved || schedule_file_path.isEmpty()) + { + QCoreApplication::exit(0); + event->accept(); + } + else + { + QMessageBox mb(this); + mb.setWindowTitle(tr("Schedule not saved")); + mb.setText(tr("Do you want to save current schedule?")); + mb.setIcon(QMessageBox::Question); + mb.setStandardButtons(QMessageBox::Save | QMessageBox::Cancel | QMessageBox::Discard); + mb.setDefaultButton(QMessageBox::Save); + int ret = mb.exec(); + + switch (ret) + { + case QMessageBox::Save: + // Save Schedule and close + on_actionSaveSchedule_triggered(); + QCoreApplication::exit(0); + event->accept(); + break; + case QMessageBox::Cancel: + // Cancel was clicked, do nothing + event->ignore(); + break; + case QMessageBox::Discard: + // Close without saving + QCoreApplication::exit(0); + event->accept(); + break; + default: + // should never be reached + break; + } + } +} + +void SoftProjector::keyPressEvent(QKeyEvent *event) +{ + // Will get called when a key is pressed + int key = event->key(); + if(key == Qt::Key_F6) + ui->projectTab->setCurrentWidget(bibleWidget); + else if(key == Qt::Key_F7) + ui->projectTab->setCurrentWidget(songWidget); + else if(key == Qt::Key_F8) + ui->projectTab->setCurrentWidget(announceWidget); + else if(key == Qt::Key_Left) + prevSlide(); + else if(key == Qt::Key_Back) + prevSlide(); + else if(key == Qt::Key_Right) + nextSlide(); + else if(key == Qt::Key_Forward) + nextSlide(); + else if(key == Qt::Key_Return) + nextSlide(); + else if(key == Qt::Key_Enter) + nextSlide(); + else + QMainWindow::keyPressEvent(event); +} + +void SoftProjector::on_actionClose_triggered() +{ + close(); +} + +void SoftProjector::setAnnounceText(Announcement announce, int row) +{ + currentAnnounce = announce; + type = "announce"; + ui->widgetMultiVerse->setVisible(false); + ui->rbMultiVerse->setChecked(false); + ui->widgetPlayBackControls->setVisible(false); + showing = true; + new_list = true; + ui->labelIcon->setPixmap(QPixmap(":/icons/icons/announce.png").scaled(16,16,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)); + ui->labelShow->setText(currentAnnounce.title); + ui->listShow->clear(); + ui->listShow->setSpacing(5); // ? + ui->listShow->setWordWrap(true); + ui->listShow->addItems(currentAnnounce.getAnnounceList()); + ui->listShow->setCurrentRow(row); + ui->listShow->setFocus(); + new_list = false; + updateScreen(); +} + +void SoftProjector::setSongList(Song song, int row) +{ + QStringList song_list = song.getSongTextList(); + current_song = song; + current_song_verse = row; + + // Display the specified song text in the right-most column of softProjector + type = "song"; + ui->widgetMultiVerse->setVisible(false); + ui->rbMultiVerse->setChecked(false); + ui->widgetPlayBackControls->setVisible(false); + showing = true; + new_list = true; + ui->listShow->clear(); + ui->labelIcon->setPixmap(QPixmap(":/icons/icons/song_tab.png").scaled(16,16,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)); + ui->labelShow->setText(song.title); + ui->listShow->setSpacing(5); + ui->listShow->setWordWrap(false); + ui->listShow->addItems(song_list); + ui->listShow->setCurrentRow(row); + ui->listShow->setFocus(); + new_list = false; + updateScreen(); +} + +void SoftProjector::setChapterList(QStringList chapter_list, QString caption, QItemSelection selectedItems) +{ + // Called to show a bible verse from a chapter in the preview list + type = "bible"; + ui->widgetMultiVerse->setVisible(true); + ui->widgetPlayBackControls->setVisible(false); + showing = true; + new_list = true; + ui->labelIcon->setPixmap(QPixmap(":/icons/icons/book.png").scaled(16,16,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)); + ui->labelShow->setText(caption); + ui->listShow->clear(); + ui->listShow->setSpacing(2); + ui->listShow->setWordWrap(true); + ui->listShow->addItems(chapter_list); + if(selectedItems.indexes().count()>1) + ui->rbMultiVerse->setChecked(true); + else + ui->rbMultiVerse->setChecked(false); + + ui->listShow->setCurrentRow(selectedItems.first().top()); + ui->listShow->selectionModel()->select(selectedItems,QItemSelectionModel::Select); + ui->listShow->setFocus(); + new_list = false; + updateScreen(); +} + +void SoftProjector::setPictureList(QList &image_list,int row,QString name) +{ + // Called to show picture list + type = "pix"; + showing = true; + ui->widgetMultiVerse->setVisible(false); + ui->rbMultiVerse->setChecked(false); + ui->widgetPlayBackControls->setVisible(false); + new_list = true; + pictureShowList = image_list; + ui->labelIcon->setPixmap(QPixmap(":/icons/icons/photo.png").scaled(16,16,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)); + ui->labelShow->setText(name); + ui->listShow->clear(); + ui->listShow->setSpacing(1); + ui->listShow->setIconSize(QSize(100,100)); + + foreach(const SlideShowItem &p, pictureShowList) + { + QListWidgetItem *itm = new QListWidgetItem; + QIcon ico(p.imageSmall); + itm->setIcon(ico); + ui->listShow->addItem(itm); + } + + ui->listShow->setCurrentRow(row); + ui->listShow->setFocus(); + new_list = false; + updateScreen(); +} + +void SoftProjector::setVideo(VideoInfo &video) +{ + // Called when showing video + type = "video"; + currentVideo = video; + showing = true; + ui->widgetMultiVerse->setVisible(false); + ui->rbMultiVerse->setChecked(false); + if(!ui->widgetPlayBackControls->isVisible()) + ui->widgetPlayBackControls->setVisible(true); + new_list = true; + ui->listShow->clear(); + ui->labelIcon->setPixmap(QPixmap(":/icons/icons/video.png").scaled(16,16,Qt::IgnoreAspectRatio,Qt::SmoothTransformation)); + ui->labelShow->setText(currentVideo.fileName); + new_list = false; + updateScreen(); +} + +void SoftProjector::on_listShow_currentRowChanged(int currentRow) +{ + // Called when the user selects a different row in the show (right-most) list. + // updateScreen(); +} + +void SoftProjector::on_listShow_itemSelectionChanged() +{ + // Called when the user selects a different row in the show (right-most) list. + // First check if ratio button "Multi Verse" is check. If so, make button "Show" + // enable and update screen only after show_botton is clicked. + if(ui->rbMultiVerse->isChecked()) + ui->actionShow->setEnabled(true); + else + updateScreen(); +} + +void SoftProjector::updateScreen() +{ + // Display the specified row of the show (rightmost) table to + // the display + int currentRow = ui->listShow->currentRow(); + + if(!showing) + { + // Do not display any text: +// pds1->renderText(false); + + if(isSingleScreen) + showDisplayScreen(false); + +// if(hasDisplayScreen2) +// pds2->renderText(false); + ui->actionShow->setEnabled(true); + ui->actionHide->setEnabled(false); + ui->actionClear->setEnabled(false); + } + else if ((currentRow >=0 && !new_list) || (type == "video" && !new_list)) + { + if(isSingleScreen) + { + if(pds1->isHidden()) + showDisplayScreen(true); + } + else + { + if(pds1->isHidden() || !ui->actionCloseDisplay->isChecked()) +// pds1->showFullScreen(); + + ui->actionCloseDisplay->trigger(); + +// if(hasDisplayScreen2) +// { +// if(pds2->isHidden()) +// pds2->showFullScreen(); +// } +// if(!ui->actionCloseDisplay->isEnabled()) +// ui->actionCloseDisplay->setEnabled(true); + } + + ui->actionShow->setEnabled(false); + ui->actionHide->setEnabled(true); + if(type=="bible" || type=="song" || type=="announce") + ui->actionClear->setEnabled(true); + else + ui->actionClear->setEnabled(false); + + if(type=="bible") + { + int srows(ui->listShow->count()); + QList currentRows; + for(int i(0); ilistShow->item(i)->isSelected()) + currentRows.append(i); + } + pds1->renderBibleText(bibleWidget->bible. + getCurrentVerseAndCaption(currentRows,theme.bible,mySettings.bibleSets) + ,theme.bible); + if(hasDisplayScreen2) + { +// if(theme.bible2.useDisp2settings) +// pds2->renderBibleText(bibleWidget->bible. +// getCurrentVerseAndCaption(currentRows,theme.bible2, +// mySettings.bibleSets2),theme.bible2); +// else + pds2->renderBibleText(bibleWidget->bible. + getCurrentVerseAndCaption(currentRows,theme.bible, + mySettings.bibleSets),theme.bible); + } + } + else if(type=="song") + { + pds1->renderSongText(current_song.getStanza(currentRow),theme.song); + if(hasDisplayScreen2) + { +// if(theme.song2.useDisp2settings) +// pds2->renderSongText(current_song.getStanza(currentRow),theme.song2); +// else + pds2->renderSongText(current_song.getStanza(currentRow),theme.song); + } + } + else if(type == "announce") + { + pds1->renderAnnounceText(currentAnnounce.getAnnounceSlide(currentRow),theme.announce); + if(hasDisplayScreen2) + { +// if(theme.announce2.useDisp2settings) +// pds2->renderAnnounceText(currentAnnounce.getAnnounceSlide(currentRow),theme.announce2); +// else + pds2->renderAnnounceText(currentAnnounce.getAnnounceSlide(currentRow),theme.announce); + } + } + else if(type == "pix") + { + pds1->renderSlideShow(pictureShowList.at(currentRow).image,mySettings.slideSets); + if(hasDisplayScreen2) + pds2->renderSlideShow(pictureShowList.at(currentRow).image,mySettings.slideSets); + } + else if(type == "video") + { +// pds1->renderVideo(currentVideo); +// if(hasDisplayScreen2) +// pds2->renderVideo(currentVideo); + } + } +} + +void SoftProjector::on_actionShow_triggered() +{ + showing = true; + updateScreen(); +} + +void SoftProjector::on_actionHide_triggered() +{ + showing = false; + updateScreen(); +} + +void SoftProjector::on_actionClear_triggered() +{ + pds1->renderNotText(); + if(hasDisplayScreen2) + { + pds2->renderNotText(); + } + ui->actionClear->setEnabled(false); + ui->actionShow->setEnabled(true); +// ui->actionHide->setEnabled(false); +} + +void SoftProjector::on_actionCloseDisplay_triggered() +{ + if(ui->actionCloseDisplay->isChecked()) + { + // If ui->actionCloseDisplay->isChecked() == true, turn it ON + ui->actionCloseDisplay->setIcon(QIcon(":/icons/icons/display_on.png")); + pds1->showFullScreen(); + if(hasDisplayScreen2) + pds2->showFullScreen(); + } + else + { + // If ui->actionCloseDisplay->isChecked() == true, turn it OFF + ui->actionCloseDisplay->setIcon(QIcon(":/icons/icons/display_off.png")); + pds1->hide(); + if(hasDisplayScreen2) + pds2->hide(); + } +} + +void SoftProjector::updateCloseDisplayButtons(bool isOn) +{ + if(isOn) + ui->actionCloseDisplay->setIcon(QIcon(":/icons/icons/display_on.png")); + else + ui->actionCloseDisplay->setIcon(QIcon(":/icons/icons/display_off.png")); +} + +void SoftProjector::on_actionSettings_triggered() +{ + settingsDialog->loadSettings(mySettings.general,theme,mySettings.slideSets, mySettings.bibleSets,mySettings.bibleSets2); + settingsDialog->exec(); +} + +void SoftProjector::on_listShow_doubleClicked(QModelIndex index) +{ + // Called when the user double clicks on a row in the preview table. + showing = true; + updateScreen(); +} + +void SoftProjector::on_projectTab_currentChanged(int index) +{ + updateEditActions(); +} + +void SoftProjector::updateEditActions() +{ + int ctab = ui->projectTab->currentIndex(); + // ctab - 0=bible, 1=songs, 2=pix, 3=media, 4=annouce + if(ctab == 0) + { + ui->actionNew->setText(""); + ui->actionEdit->setText(""); + ui->actionCopy->setText(""); + ui->actionDelete->setText(tr("&Clear Bible History List")); + ui->actionNew->setIcon(QIcon()); + ui->actionEdit->setIcon(QIcon()); + ui->actionCopy->setIcon(QIcon()); + ui->actionDelete->setIcon(QIcon(":/icons/icons/bibleHistoryDelete.png")); + } + else if(ctab == 1) // Song Tab + { + ui->actionNew->setText(tr("&New Song...")); + ui->actionEdit->setText(tr("&Edit Song...")); + ui->actionCopy->setText(tr("&Copy Song...")); + ui->actionDelete->setText(tr("&Delete Song")); + ui->actionNew->setIcon(QIcon(":/icons/icons/song_new.png")); + ui->actionEdit->setIcon(QIcon(":/icons/icons/song_edit.png")); + ui->actionCopy->setIcon(QIcon(":/icons/icons/song_copy.png")); + ui->actionDelete->setIcon(QIcon(":/icons/icons/song_delete.png")); + } + else if (ctab == 2) // Picture Tab + { + ui->actionNew->setText(tr("&New Slide Show...")); + ui->actionEdit->setText(tr("&Edit Slide Show...")); + ui->actionCopy->setText(""); + ui->actionDelete->setText(tr("&Delete Slide Show")); + ui->actionNew->setIcon(QIcon(":/icons/icons/slideshow_new.png")); + ui->actionEdit->setIcon(QIcon(":/icons/icons/slideshow_edit.png")); + ui->actionCopy->setIcon(QIcon()); + ui->actionDelete->setIcon(QIcon(":/icons/icons/slideshow_delete.png")); + } + else if (ctab == 3) // Media Tab + { + ui->actionNew->setText(tr("&Add Media Files...")); + ui->actionEdit->setText(""); + ui->actionCopy->setText(""); + ui->actionDelete->setText(tr("&Remove Media Files")); + ui->actionNew->setIcon(QIcon(":/icons/icons/video_add.png")); + ui->actionEdit->setIcon(QIcon()); + ui->actionCopy->setIcon(QIcon()); + ui->actionDelete->setIcon(QIcon(":/icons/icons/video_remove.png")); + } + else if (ctab == 4) // Announcement Tab + { + ui->actionNew->setText(tr("&New Announcement...")); + ui->actionEdit->setText(tr("&Edit Announcement...")); + ui->actionCopy->setText(tr("&Copy Announcement...")); + ui->actionDelete->setText(tr("&Delete Announcement")); + ui->actionNew->setIcon(QIcon(":/icons/icons/announce_new.png")); + ui->actionEdit->setIcon(QIcon(":/icons/icons/announce_edit.png")); + ui->actionCopy->setIcon(QIcon(":/icons/icons/announce_copy.png")); + ui->actionDelete->setIcon(QIcon(":/icons/icons/announce_delete.png")); + } + else + { + ui->actionNew->setText(""); + ui->actionEdit->setText(""); + ui->actionCopy->setText(""); + ui->actionDelete->setText(""); + ui->actionNew->setIcon(QIcon()); + ui->actionEdit->setIcon(QIcon()); + ui->actionCopy->setIcon(QIcon()); + ui->actionDelete->setIcon(QIcon()); + } + + // Set Edit Action Menu Visibility + ui->actionNew->setVisible(ctab == 1 || ctab == 2 || ctab == 3 || ctab == 4); + ui->actionEdit->setVisible(ctab == 1 || ctab == 2 || ctab == 4); + ui->actionCopy->setVisible(ctab == 1 || ctab == 4); + ui->actionDelete->setVisible(ctab == 0 || ctab == 1 || ctab == 2 || ctab == 3 || ctab == 4); + + // Set Edit Action Menu enabled + ui->actionNew->setEnabled(ctab == 1 || ctab == 2 || ctab == 3 || ctab == 4); + ui->actionEdit->setEnabled(ctab == 1 || ctab == 2 || ctab == 4); + ui->actionCopy->setEnabled(ctab == 1 || ctab == 4); + ui->actionDelete->setEnabled(ctab == 0 || ctab == 1 || ctab == 2 || ctab == 3 || ctab == 4); + + ///////////////////////////////////////// + // Set Print Action Menu enabled + ui->actionPrint->setEnabled(ctab == 0 || ctab == 1 || ctab == 4); +} + +void SoftProjector::on_actionNew_triggered() +{ + int ctab = ui->projectTab->currentIndex(); + if(ctab == 1) + newSong(); + else if(ctab == 2) + newSlideShow(); + else if(ctab == 3) + addMediaToLibrary(); + else if(ctab == 4) + newAnnouncement(); +} + +void SoftProjector::on_actionEdit_triggered() +{ + int ctab = ui->projectTab->currentIndex(); + if(ctab == 1) + editSong(); + else if(ctab == 2) + editSlideShow(); + else if(ctab == 4) + editAnnouncement(); +} + +void SoftProjector::on_actionCopy_triggered() +{ + int ctab = ui->projectTab->currentIndex(); + if(ctab == 1) + copySong(); + else if(ctab == 4) + copyAnnouncement(); +} + +void SoftProjector::on_actionDelete_triggered() +{ + int ctab = ui->projectTab->currentIndex(); + if(ctab == 0) + bibleWidget->clearHistory(); + else if(ctab == 1) + deleteSong(); + else if(ctab == 2) + deleteSlideShow(); + else if(ctab == 3) + removeMediaFromLibrary(); + else if(ctab == 4) + deleteAnnoucement(); +} + +void SoftProjector::on_actionManage_Database_triggered() +{ + QSqlQuery sq; + + manageDialog->loadThemes(); + manageDialog->load_songbooks(); + manageDialog->setDataDir(appDataDir); + manageDialog->exec(); + + // Reload songbooks if Songbook has been added, edited, or deleted + if (manageDialog->reload_songbook) + songWidget->updateSongbooks(); + + // Relaod themes if a theme has been deleted + if (manageDialog->reloadThemes) + { + // Check if current theme has been deleted + sq.exec("SELECT * FROM Themes WHERE id = " + QString::number(theme.getThemeId())); + if(!sq.first()) + { + GeneralSettings g = mySettings.general; + Theme t; + sq.exec("SELECT id FROM Themes"); + sq.first(); + t.setThemeId(sq.value(0).toInt()); + t.loadTheme(); + g.currentThemeId = t.getThemeId(); + updateSetting(g,t,mySettings.slideSets,mySettings.bibleSets,mySettings.bibleSets2); + updateScreen(); + } + } + + // Reload Bibles if Bible has been deleted + if (manageDialog->reload_bible) + { + // check if Primary bible has been removed + sq.exec("SELECT * FROM BibleVersions WHERE id = " + mySettings.bibleSets.primaryBible); + if (!sq.first()) + { + // If original primary bible has been removed, set first bible in the list to be primary + sq.clear(); + sq.exec("SELECT id FROM BibleVersions"); + sq.first(); + mySettings.bibleSets.primaryBible = sq.value(0).toString(); + } + sq.clear(); + + // check if secondary bible has been removed, if yes, set secondary to "none" + sq.exec("SELECT * FROM BibleVersions WHERE id = " + mySettings.bibleSets.secondaryBible); + if (!sq.first()) + mySettings.bibleSets.secondaryBible = "none"; + sq.clear(); + + // check if trinary bible has been removed, if yes, set secondary to "none" + sq.exec("SELECT * FROM BibleVersions WHERE id = " + mySettings.bibleSets.trinaryBible); + if (!sq.first()) + mySettings.bibleSets.trinaryBible = "none"; + sq.clear(); + + // check if operator bible has been removed, if yes, set secondary to "same" + sq.exec("SELECT * FROM BibleVersions WHERE id = " + mySettings.bibleSets.operatorBible); + if (!sq.first()) + mySettings.bibleSets.operatorBible = "same"; + bibleWidget->setSettings(mySettings.bibleSets); + } +} + +void SoftProjector::on_actionDonate_triggered() +{ + QDesktopServices::openUrl(QUrl("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FPCLPXFMH9XP4")); +} + +void SoftProjector::on_actionAbout_triggered() +{ + AboutDialog *aboutDialog; + aboutDialog = new AboutDialog(this, version_string); + aboutDialog->exec(); + delete aboutDialog; +} + +void SoftProjector::on_action_Help_triggered() +{ + //helpDialog->show(); + QDesktopServices::openUrl(QUrl("http://softprojector.org/help/index.html")); +} + +void SoftProjector::newSong() +{ + if (!editWidget->isHidden()) //Prohibits editing a song when a different song already been edited. + { + QMessageBox ms(this); + ms.setWindowTitle(tr("Cannot create a new song")); + ms.setText(tr("Another song is already been edited.")); + ms.setInformativeText(tr("Please save and/or close current edited song before edited a different song.")); + ms.setIcon(QMessageBox::Information); + ms.exec(); + } + else + { + editWidget->show(); + editWidget->setNew(); + editWidget->activateWindow(); + } +} + +void SoftProjector::editSong() +{ + if (songWidget->isSongSelected()) + { + if(!editWidget->isHidden()) //Prohibits editing a song when a different song already been edited. + { + QMessageBox ms(this); + ms.setWindowTitle(tr("Cannot start new edit")); + ms.setText(tr("Another song is already been edited.")); + ms.setInformativeText(tr("Please save and/or close current edited song before edited a different song.")); + ms.setIcon(QMessageBox::Information); + ms.exec(); + } + else + { + editWidget->show(); + editWidget->setEdit(songWidget->getSongToEdit()); + editWidget->activateWindow(); + } + } + else + { + QMessageBox ms(this); + ms.setWindowTitle(tr("No song selected")); + ms.setText(tr("No song has been selected to edit.")); + ms.setInformativeText(tr("Please select a song to edit.")); + ms.setIcon(QMessageBox::Information); + ms.exec(); + } +} + +void SoftProjector::copySong() +{ + if (songWidget->isSongSelected()) + { + if (!editWidget->isHidden()) //Prohibits editing a song when a different song already been edited. + { + QMessageBox ms(this); + ms.setWindowTitle(tr("Cannot copy this song")); + ms.setText(tr("Another song is already been edited.")); + ms.setInformativeText(tr("Please save and/or close current edited song before edited a different song.")); + ms.setIcon(QMessageBox::Information); + ms.exec(); + } + else + { + editWidget->show(); + editWidget->setCopy(songWidget->getSongToEdit()); + editWidget->activateWindow(); + } + } + else + { + QMessageBox ms(this); + ms.setWindowTitle(tr("No song selected")); + ms.setText(tr("No song has been selected to copy")); + ms.setInformativeText(tr("Please select a song to copy")); + ms.setIcon(QMessageBox::Information); + ms.exec(); + } +} + +void SoftProjector::deleteSong() +{ + if (songWidget->isSongSelected()) + { + QString song_title = songWidget->currentSong().title; + QMessageBox ms(this); + ms.setWindowTitle(tr("Delete song?")); + ms.setText(tr("Delete song \"") + song_title + "\"?"); + ms.setInformativeText(tr("This action will permanentrly delete this song")); + ms.setIcon(QMessageBox::Question); + ms.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + ms.setDefaultButton(QMessageBox::Yes); + int ret = ms.exec(); + + switch (ret) + { + case QMessageBox::Yes: + // Delete a song + songWidget->deleteSong(); + break; + case QMessageBox::No: + // Cancel was clicked + break; + default: + // should never be reached + break; + } + } + else + { + QMessageBox ms(this); + ms.setWindowTitle(tr("No song selected")); + ms.setText(tr("No song has been selected to delete")); + ms.setInformativeText(tr("Please select a song to delete")); + ms.setIcon(QMessageBox::Information); + ms.exec(); + } +} + +void SoftProjector::newSlideShow() +{ + SlideShowEditor * sse = new SlideShowEditor; + sse->setSettings(mySettings.slideSets); + sse->exec(); + pictureWidget->loadSlideShows(); + delete sse; +} + +void SoftProjector::editSlideShow() +{ + if(pictureWidget->isSlideShowSelected()) + { + SlideShowEditor * sse = new SlideShowEditor; + sse->setSettings(mySettings.slideSets); + sse->setSlideShow(pictureWidget->getCurrentSlideshow()); + sse->exec(); + pictureWidget->loadSlideShows(); + delete sse; + } + else + { + QMessageBox ms(this); + ms.setWindowTitle(tr("No slideshow selected")); + ms.setText(tr("No slideshow has been selected to edit.")); + ms.setInformativeText(tr("Please select a slideshow to edit.")); + ms.setIcon(QMessageBox::Information); + ms.exec(); + } +} + +void SoftProjector::deleteSlideShow() +{ + if(pictureWidget->isSlideShowSelected()) + { + QString title = pictureWidget->getCurrentSlideshow().name; + QMessageBox ms(this); + ms.setWindowTitle(tr("Delete slideshow?")); + ms.setText(tr("Delete slideshow: \"") + title + "\"?"); + ms.setInformativeText(tr("This action will permanentrly delete this slideshow")); + ms.setIcon(QMessageBox::Question); + ms.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + ms.setDefaultButton(QMessageBox::Yes); + int ret = ms.exec(); + + switch (ret) { + case QMessageBox::Yes: + // Delete a slideshow + pictureWidget->deleteSlideShow(); + break; + case QMessageBox::No: + // Cancel was clicked + break; + default: + // should never be reached + break; + } + } + else + { + QMessageBox ms(this); + ms.setWindowTitle(tr("No slideshow selected")); + ms.setText(tr("No slideshow has been selected to delete.")); + ms.setInformativeText(tr("Please select a slideshow to delete.")); + ms.setIcon(QMessageBox::Information); + ms.exec(); + } +} + +void SoftProjector::addMediaToLibrary() +{ + mediaPlayer->addToLibrary(); +} + +void SoftProjector::removeMediaFromLibrary() +{ + if(mediaPlayer->isValidMedia()) + mediaPlayer->removeFromLibrary(); + else + { + QMessageBox ms(this); + ms.setWindowTitle(tr("No media selected")); + ms.setText(tr("No media item has been selected to delete.")); + ms.setInformativeText(tr("Please select a media item to delete.")); + ms.setIcon(QMessageBox::Information); + ms.exec(); + } +} + +void SoftProjector::newAnnouncement() +{ + announceWidget->newAnnouncement(); +} + +void SoftProjector::editAnnouncement() +{ + if(announceWidget->isAnnounceValid()) + announceWidget->editAnnouncement(); + else + { + QMessageBox ms(this); + ms.setWindowTitle(tr("No Announcement Selected")); + ms.setText(tr("No announcement has been selected to edit")); + ms.setInformativeText(tr("Please select an announcement to edit")); + ms.setIcon(QMessageBox::Information); + ms.exec(); + } +} + +void SoftProjector::copyAnnouncement() +{ + if(announceWidget->isAnnounceValid()) + announceWidget->copyAnnouncement(); + else + { + QMessageBox ms(this); + ms.setWindowTitle(tr("No Announcement Selected")); + ms.setText(tr("No announcement has been selected to copy")); + ms.setInformativeText(tr("Please select an announcement to copy")); + ms.setIcon(QMessageBox::Information); + ms.exec(); + } +} + +void SoftProjector::deleteAnnoucement() +{ + if(announceWidget->isAnnounceValid()) + { + QString title = announceWidget->getAnnouncement().title; + QMessageBox ms(this); + ms.setWindowTitle(tr("Delete Announcement?")); + ms.setText(tr("Delete announcement: \"") + title + "\"?"); + ms.setInformativeText(tr("This action will permanentrly delete this announcement")); + ms.setIcon(QMessageBox::Question); + ms.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + ms.setDefaultButton(QMessageBox::Yes); + int ret = ms.exec(); + + switch (ret) { + case QMessageBox::Yes: + // Delete a announce + announceWidget->deleteAnnouncement(); + break; + case QMessageBox::No: + // Cancel was clicked + break; + default: + // should never be reached + break; + } + } + else + { + QMessageBox ms(this); + ms.setWindowTitle(tr("No Announcement Selected")); + ms.setText(tr("No announcement has been selected to delete")); + ms.setInformativeText(tr("Please select an announcement to delete")); + ms.setIcon(QMessageBox::Information); + ms.exec(); + } +} + +void SoftProjector::setArrowCursor() +{ + this->setCursor(Qt::ArrowCursor); +} + +void SoftProjector::setWaitCursor() +{ + this->setCursor(Qt::WaitCursor); +} + +void SoftProjector::createLanguageActions() +{ + // find all *.qm files at language folder + // and create coresponding action in language menu + + languageGroup = new QActionGroup(this); + //default language and flag + QAction *englishAction = new QAction(QIcon(":/icons/icons/flag_uk.png"), "English", this); + englishAction->setCheckable(true); + englishAction->setChecked(true); + englishAction->setIconVisibleInMenu(true); + languageGroup->addAction(englishAction); + ui->menuLanguage->addAction(englishAction); + + QDir languageDir(languagePath); + //all available languages + QStringList languagesList = languageDir.entryList(QStringList("softpro_*.qm"), QDir::Files); + //all available flags + QStringList flagsList = languageDir.entryList(QStringList("flag_*.png"), QDir::Files); + + foreach(QString agent, languagesList) + { + // local translator for taken original language's name + QTranslator tmpTranslator; + tmpTranslator.load(agent, languageDir.absolutePath()); + // this string are used for detection language' name + // this is one of translated strings + + QString fullLanguageName = tmpTranslator.translate("Native language name", "English","Do not change"); + QAction *tmpAction = new QAction(fullLanguageName, this); + + QString splocale = agent.remove(0, agent.indexOf('_')+1); + splocale.chop(3); + + // flag's file name + QString flagFileName = "flag_"+splocale+".png"; + if(flagsList.contains(flagFileName))// if flag is available + { + tmpAction->setIcon(QIcon(languageDir.absolutePath() + QDir::separator() + flagFileName)); + tmpAction->setIconVisibleInMenu(true); + } + + tmpAction->setData(splocale);// information abount localization + tmpAction->setCheckable(true); + languageGroup->addAction(tmpAction); + ui->menuLanguage->addAction(tmpAction); + } +} + +void SoftProjector::switchLanguage(QAction *action) +{ + cur_locale = action->data().toString(); + retranslateUis(); +} + +void SoftProjector::retranslateUis() +{ + qApp->removeTranslator(&translator); + if(cur_locale != "en") + { + translator.load("softpro_"+cur_locale+".qm", QDir(languagePath).absolutePath()); + // qt libs translator must be add there, + // but where are qt_locale.qm files? + qApp->installTranslator(&translator); + } + + ui->retranslateUi(this); + ui->projectTab->setTabText(0, tr("Bible (F6)")); + ui->projectTab->setTabText(1, tr("Songs (F7)")); + ui->projectTab->setTabText(2, tr("Pictures")); + ui->projectTab->setTabText(3, tr("Media")); + ui->projectTab->setTabText(4, tr("Announcements (F8)")); + updateEditActions(); + songWidget->retranslateUis(); + editWidget->retranslateUis(); +} + +void SoftProjector::on_actionSong_Counter_triggered() +{ + SongCounter *songCounter; + songCounter = new SongCounter(this, cur_locale); + songCounter->exec(); + delete songCounter; +} + +void SoftProjector::updateWindowText() +{ + QFileInfo fi(schedule_file_path); + QString file = fi.fileName(); + + if(!file.isEmpty()) + { + file.remove(".spsc"); + if(is_schedule_saved) + this->setWindowTitle(file + " - SoftProjector " + version_string); + else + this->setWindowTitle(file + "* - SoftProjector " + version_string); + } + else + { + this->setWindowTitle("SoftProjector " + version_string); + } +} + +void SoftProjector::on_rbMultiVerse_toggled(bool checked) +{ + if(checked) + ui->listShow->setSelectionMode(QAbstractItemView::ContiguousSelection); + else + ui->listShow->setSelectionMode(QAbstractItemView::SingleSelection); +} + +void SoftProjector::on_actionPrint_triggered() +{ + PrintPreviewDialog* p; + p = new PrintPreviewDialog(this); + if(ui->projectTab->currentIndex() == 0) + { + p->setText(mySettings.bibleSets.operatorBible + "," + mySettings.bibleSets.primaryBible, + bibleWidget->getCurrentBook(),bibleWidget->getCurrentChapter()); + p->exec(); + } + else if (ui->projectTab->currentIndex() == 1) + { + if (songWidget->isSongSelected()) + { + p->setText(songWidget->getSongToEdit()); + p->exec(); + + } + else + { + QMessageBox ms(this); + ms.setWindowTitle(tr("No song selected")); + ms.setText(tr("No song has been selected to be printed.")); + ms.setInformativeText(tr("Please select a song to be printed.")); + ms.setIcon(QMessageBox::Information); + ms.exec(); + } + } + else if (ui->projectTab->currentIndex() == 4) + { + if(announceWidget->isAnnounceValid()) + { + p->setText(announceWidget->getAnnouncement()); + p->exec(); + } + else + { + QMessageBox ms(this); + ms.setWindowTitle(tr("No announcement selected")); + ms.setText(tr("No announcement has been selected to be printed.")); + ms.setInformativeText(tr("Please select a announcement to be printed.")); + ms.setIcon(QMessageBox::Information); + ms.exec(); + } + } + delete p; +} + +void SoftProjector::on_actionPrintSchedule_triggered() +{ + PrintPreviewDialog* p = new PrintPreviewDialog(this); + p->setSchedule(schedule_file_path,schedule,false); + p->exec(); + delete p; +} + +void SoftProjector::nextSlide() +{ + // selects next item in the show list + int current = ui->listShow->currentRow(); + if(ui->rbMultiVerse->isChecked()) + { + // if multiple is selected, select last one + for (int i(0);ilistShow->count();++i) + { + if(ui->listShow->item(i)->isSelected()) + current = i; + } + if(current < ui->listShow->count()-1) + ui->rbMultiVerse->setChecked(false); + } + if(current < ui->listShow->count()-1) + ui->listShow->setCurrentRow(current+1); +} + +void SoftProjector::prevSlide() +{ + // selects previous item in the show list + int current = ui->listShow->currentRow(); + if(ui->rbMultiVerse->isChecked()) + { + // if multiple is selected, select first one + for (int i(0);ilistShow->count();++i) + { + if(ui->listShow->item(i)->isSelected()) + { + current = i; + break; + } + } + if(current>0) + ui->rbMultiVerse->setChecked(false); + } + if(current>0) + ui->listShow->setCurrentRow(current-1); +} + +void SoftProjector::on_pushButtonPlay_clicked() +{ + /* + * if(pds1->videoPlayer->state() == Phonon::PlayingState) + { + pds1->videoPlayer->pause(); + if(hasDisplayScreen2) + pds2->videoPlayer->pause(); + } + else + { + if(pds1->videoPlayer->currentTime() == pds1->videoPlayer->totalTime()) + { + pds1->videoPlayer->seek(0); + if(hasDisplayScreen2) + pds2->videoPlayer->seek(0); + } + pds1->videoPlayer->play(); + if(hasDisplayScreen2) + pds2->videoPlayer->play(); + }*/ +} + +void SoftProjector::setButtonPlayIcon(bool isPlaying) +{ + if (isPlaying) + ui->pushButtonPlay->setIcon(QIcon(":icons/icons/pause.png")); + else + ui->pushButtonPlay->setIcon(QIcon(":icons/icons/play.png")); +} + +void SoftProjector::setTimeText(QString cTime) +{ + ui->labelTime->setText(cTime); +} + +void SoftProjector::on_actionScheduleAdd_triggered() +{ + int ctab = ui->projectTab->currentIndex(); + if(ctab == 0) // Bible + { + if(bibleWidget->isVerseSelected()) + { + BibleHistory b = bibleWidget->getCurrentVerse(); + addToShcedule(b); + } + } + else if(ctab == 1) // Song + { + if(songWidget->isSongSelected()) + { + Song s = songWidget->getSongToEdit(); + addToShcedule(s); + } + } + else if(ctab == 2) // Slide Show + { + if(pictureWidget->isSlideShowSelected()) + { + SlideShow ssi = pictureWidget->getCurrentSlideshow(); + addToShcedule(ssi); + } + } + else if(ctab == 3) // Multimedia + { + if(mediaPlayer->isValidMedia()) + { + VideoInfo v = mediaPlayer->getMedia(); + addToShcedule(v); + } + } + else if(ctab == 4) + { + if(announceWidget->isAnnounceValid()) + { + Announcement a = announceWidget->getAnnouncement(); + addToShcedule(a); + } + } + int row_count = ui->listWidgetSchedule->count(); + ui->listWidgetSchedule->setCurrentRow(row_count-1); +} + +void SoftProjector::on_actionScheduleRemove_triggered() +{ + int cRow = ui->listWidgetSchedule->currentRow(); + if(cRow >=0) + { + schedule.takeAt(cRow); + reloadShceduleList(); + } +} + +void SoftProjector::on_actionScheduleClear_triggered() +{ + schedule.clear(); + reloadShceduleList(); +} + +void SoftProjector::addToShcedule(BibleHistory &b) +{ + Schedule d(b); + schedule.append(d); + reloadShceduleList(); +} + +void SoftProjector::addToShcedule(Song &s) +{ + Schedule d(s); + schedule.append(d); + reloadShceduleList(); +} + +void SoftProjector::addToShcedule(SlideShow &s) +{ + Schedule d(s); + schedule.append(d); + reloadShceduleList(); +} + +void SoftProjector::addToShcedule(VideoInfo &v) +{ + Schedule d(v); + schedule.append(d); + reloadShceduleList(); +} + +void SoftProjector::addToShcedule(Announcement &a) +{ + Schedule d(a); + schedule.append(d); + reloadShceduleList(); +} + +void SoftProjector::reloadShceduleList() +{ + ui->listWidgetSchedule->setCurrentRow(-1); + ui->listWidgetSchedule->clear(); + foreach (const Schedule &s, schedule) + { + QListWidgetItem *itm = new QListWidgetItem; + itm->setIcon(s.icon); + itm->setText(s.name); + ui->listWidgetSchedule->addItem(itm); + } + is_schedule_saved = false; + updateWindowText(); +} + +void SoftProjector::on_listWidgetSchedule_doubleClicked(const QModelIndex &index) +{ + Schedule s = schedule.at(index.row()); + if(s.stype == "bible") + { + ui->projectTab->setCurrentIndex(0); + bibleWidget->setSelectedHistory(s.bible); + bibleWidget->sendToProjector(true); + } + else if(s.stype == "song") + { + ui->projectTab->setCurrentIndex(1); + songWidget->sendToPreviewFromSchedule(s.song); + setSongList(s.song,0); + songWidget->counter.addSongCount(s.song); + } + else if(s.stype == "slideshow") + { + ui->projectTab->setCurrentIndex(2); + pictureWidget->sendToPreviewFromSchedule(s.slideshow); + setPictureList(s.slideshow.slides,0,s.slideshow.name); + } + else if(s.stype == "media") + { + ui->projectTab->setCurrentIndex(3); + mediaPlayer->setMediaFromSchedule(s.media); + mediaPlayer->goLiveFromSchedule(); + } + else if(s.stype == "announce") + { + ui->projectTab->setCurrentIndex(4); + announceWidget->setAnnouncementFromHistory(s.announce); + setAnnounceText(s.announce,0); + } +} + +void SoftProjector::on_listWidgetSchedule_itemSelectionChanged() +{ + int currentRow = ui->listWidgetSchedule->currentRow(); + if(currentRow>=0) + { + Schedule s = schedule.at(currentRow); + if(s.stype == "bible") + { + ui->projectTab->setCurrentIndex(0); + bibleWidget->setSelectedHistory(s.bible); + } + else if(s.stype == "song") + { + ui->projectTab->setCurrentIndex(1); + songWidget->sendToPreviewFromSchedule(s.song); + } + else if(s.stype == "slideshow") + { + ui->projectTab->setCurrentIndex(2); + pictureWidget->sendToPreviewFromSchedule(s.slideshow); + } + else if(s.stype == "media") + { + ui->projectTab->setCurrentIndex(3); + mediaPlayer->setMediaFromSchedule(s.media); + } + else if(s.stype == "announce") + { + ui->projectTab->setCurrentIndex(4); + announceWidget->setAnnouncementFromHistory(s.announce); + } + } +} + +void SoftProjector::on_actionMoveScheduleTop_triggered() +{ + int cs = ui->listWidgetSchedule->currentRow(); + if(cs>0) + { + schedule.move(cs,0); + reloadShceduleList(); + ui->listWidgetSchedule->setCurrentRow(0); + } +} + +void SoftProjector::on_actionMoveScheduleUp_triggered() +{ + int cs = ui->listWidgetSchedule->currentRow(); + if(cs>0) + { + schedule.move(cs,cs-1); + reloadShceduleList(); + ui->listWidgetSchedule->setCurrentRow(cs-1); + } +} + +void SoftProjector::on_actionMoveScheduleDown_triggered() +{ + int cs = ui->listWidgetSchedule->currentRow(); + int max = schedule.count(); + if(cs>=0 && cslistWidgetSchedule->setCurrentRow(cs+1); + } +} + +void SoftProjector::on_actionMoveScheduleBottom_triggered() +{ + int cs = ui->listWidgetSchedule->currentRow(); + int max = schedule.count(); + if(cs>=0 && cslistWidgetSchedule->setCurrentRow(max-1); + } +} + +void SoftProjector::on_actionNewSchedule_triggered() +{ + if(!is_schedule_saved && !schedule_file_path.isEmpty()) + { + QMessageBox mb(this); + mb.setWindowTitle(tr("Save Schedule?")); + mb.setText(tr("Do you want to save current schedule before creating a new schedule?")); + mb.setIcon(QMessageBox::Question); + mb.setStandardButtons(QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); + mb.setDefaultButton(QMessageBox::Yes); + int ret = mb.exec(); + + switch (ret) + { + case QMessageBox::Yes: + // Yes to save unsaved schedule and contiue creating new schedule + on_actionSaveSchedule_triggered(); + break; + case QMessageBox::No: + // No to save unsaved schedule and continue to create new schedule + break; + case QMessageBox::Cancel: + // Cancel all + return; + default: + // should never be reached + break; + } + } + + schedule_file_path = "untitled.spsc"; + schedule.clear(); + reloadShceduleList(); + is_schedule_saved = false; + updateWindowText(); +} + +void SoftProjector::on_actionOpenSchedule_triggered() +{ + if(!is_schedule_saved && !schedule_file_path.isEmpty()) + { + QMessageBox mb(this); + mb.setWindowTitle(tr("Save Schedule?")); + mb.setText(tr("Do you want to save current schedule before opening a new schedule?")); + mb.setIcon(QMessageBox::Question); + mb.setStandardButtons(QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); + mb.setDefaultButton(QMessageBox::Yes); + int ret = mb.exec(); + + switch (ret) + { + case QMessageBox::Yes: + // Yes to save unsaved schedule and contiue opening new schedule + on_actionSaveSchedule_triggered(); + break; + case QMessageBox::No: + // No to save unsaved schedule and continue opening new schedule + break; + case QMessageBox::Cancel: + // Cancel all + return; + default: + // should never be reached + break; + } + } + + QString path = QFileDialog::getOpenFileName(this,tr("Open SoftProjector schedule:"),".", + tr("SoftProjector schedule file ") + "(*.spsc)"); + if(!path.isEmpty()) + { + schedule_file_path = path; + openSchedule(); + is_schedule_saved = true; + updateWindowText(); + } +} + +void SoftProjector::on_actionSaveSchedule_triggered() +{ + if(schedule_file_path.isEmpty() || schedule_file_path.startsWith("untitled")) + on_actionSaveScheduleAs_triggered(); + else + saveSchedule(false); + updateWindowText(); +} + +void SoftProjector::on_actionSaveScheduleAs_triggered() +{ + QString path = QFileDialog::getSaveFileName(this,tr("Save SoftProjector schedule as:"),".", + tr("SoftProjector schedule file ") + "(*.spsc)"); + if(!path.isEmpty()) + { + if(path.endsWith(".spsc")) + schedule_file_path = path; + else + schedule_file_path = path + ".spsc"; + saveSchedule(true); + } + + updateWindowText(); +} + +void SoftProjector::on_actionCloseSchedule_triggered() +{ + if(!is_schedule_saved && !schedule_file_path.isEmpty()) + { + QMessageBox mb(this); + mb.setWindowTitle(tr("Save Schedule?")); + mb.setText(tr("Do you want to save current schedule before closing it?")); + mb.setIcon(QMessageBox::Question); + mb.setStandardButtons(QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); + mb.setDefaultButton(QMessageBox::Yes); + int ret = mb.exec(); + + switch (ret) + { + case QMessageBox::Yes: + // Yes to save unsaved schedule and contiue creating new schedule + on_actionSaveSchedule_triggered(); + break; + case QMessageBox::No: + // No to save unsaved schedule and continue to create new schedule + break; + case QMessageBox::Cancel: + // Cancel all + return; + default: + // should never be reached + break; + } + } + + schedule_file_path.clear(); + schedule.clear(); + reloadShceduleList(); + is_schedule_saved = true; + updateWindowText(); +} + +void SoftProjector::saveSchedule(bool overWrite) +{ + // Save schedule as s SQLite database file + QProgressDialog progress; + progress.setMaximum(0); + progress.setLabelText(tr("Saving schedule file...")); + progress.show(); + { + bool db_exist = QFile::exists(schedule_file_path); + if(db_exist && overWrite) + { + if(!QFile::remove(schedule_file_path)) + { + QMessageBox mb(this); + mb.setText(tr("An error has ocured when overwriting existing file.\n" + "Please try again with different file name.")); + mb.setIcon(QMessageBox::Information); + mb.setStandardButtons(QMessageBox::Ok); + mb.exec(); + return; + } + else + db_exist = false; + } + QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE","spsc"); + db.setDatabaseName(schedule_file_path); + if(db.open()) + { + QSqlQuery sq(db); + sq.exec("PRAGMA user_version = 2"); + sq.exec("CREATE TABLE IF NOT EXISTS 'schedule' ('id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, " + "'stype' TEXT, 'name' TEXT, 'sorder' INTEGER )"); + sq.exec("CREATE TABLE IF NOT EXISTS 'bible' ('scid' INTEGER, 'verseIds' TEXT, 'caption' TEXT, 'captionLong' TEXT)"); + sq.exec("CREATE TABLE IF NOT EXISTS 'song' ('scid' INTEGER, 'songid' INTEGER, 'sbid' INTEGER, 'sbName' TEXT, " + "'number' INTEGER, 'title' TEXT, 'category' INTEGER, 'tune' TEXT, 'wordsBy' TEXT, 'musicBy' TEXT, " + "'songText' TEXT, 'notes' TEXT, 'usePrivate' BOOL, 'alignV' INTEGER, 'alignH' INTEGER, 'color' INTEGER, " + "'font' TEXT, 'infoColor' INTEGER, 'infoFont' TEXT, 'endingColor' INTEGER, 'endingFont' TEXT, " + "'useBack' BOOL, 'backImage' BLOB, 'backName' TEXT)"); + sq.exec("CREATE TABLE IF NOT EXISTS 'slideshow' ('scid' INTEGER, 'ssid' INTEGER, 'name' TEXT, 'info' TEXT)"); + sq.exec("CREATE TABLE IF NOT EXISTS 'slides' ('scid' INTEGER, 'sid' INTEGER, 'name' TEXT, 'path' TEXT, " + "'porder' INTEGER, 'image' BLOB, 'imageSmall' BLOB, 'imagePreview' BLOB)"); + sq.exec("CREATE TABLE IF NOT EXISTS 'media' ('scid' INTEGER, 'name' TEXT, 'path' TEXT, 'aRatio' INTEGER)"); + sq.exec("CREATE TABLE IF NOT EXISTS 'announce' ('scid' INTEGER, 'aId' INTEGER, 'title' TEXT, 'aText' TEXT, " + "'usePrivate' BOOL, 'useAuto' BOOL, 'loop' BOOL, 'slideTimer' INTEGER, 'font' TEXT, 'color' INTEGER, " + "'useBack' BOOL, 'backImage' BLOB, 'backPath' TEXT, 'alignV' INTEGER, 'alignH' INTEGER)"); + if(db_exist) + saveScheduleUpdate(sq); + else + saveScheduleNew(sq); + } + } + QSqlDatabase::removeDatabase("spsc"); + is_schedule_saved = true; + progress.close(); +} + +void SoftProjector::saveScheduleNew(QSqlQuery &q) +{ + for(int i(0);i < schedule.count();++i) + { + Schedule sc = schedule.at(i); + q.exec(QString("INSERT INTO schedule (stype,name,sorder) VALUES('%1','%2',%3)") + .arg(sc.stype).arg(sc.name).arg(i+1)); + q.exec("SELECT seq FROM sqlite_sequence WHERE name = 'schedule'"); + q.first(); + sc.scid = q.value(0).toInt(); + q.clear(); + if(sc.stype == "bible") + saveScheduleItemNew(q,sc.scid,sc.bible); + else if(sc.stype == "song") + saveScheduleItemNew(q,sc.scid,sc.song); + else if(sc.stype == "slideshow") + saveScheduleItemNew(q,sc.scid,sc.slideshow); + else if(sc.stype == "media") + saveScheduleItemNew(q,sc.scid,sc.media); + else if(sc.stype == "announce") + saveScheduleItemNew(q,sc.scid,sc.announce); + schedule.replace(i,sc); + } +} + +void SoftProjector::saveScheduleItemNew(QSqlQuery &q, int scid, const BibleHistory &b) +{ + q.prepare("INSERT INTO bible (scid,verseIds,caption,captionLong) VALUES(?,?,?,?)"); + q.addBindValue(scid); + q.addBindValue(b.verseIds); + q.addBindValue(b.caption); + q.addBindValue(b.captionLong); + q.exec(); +} + +void SoftProjector::saveScheduleItemNew(QSqlQuery &q, int scid, const Song &s) +{ + q.prepare("INSERT INTO song (scid,songid,sbid,sbName,number,title,category,tune,wordsBy,musicBy," + "songText,notes,usePrivate,alignV,alignH,color,font,infoColor,infoFont,endingColor," + "endingFont,useBack,backImage,backName) " + "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + q.addBindValue(scid); + q.addBindValue(s.songID); + q.addBindValue(s.songbook_id); + q.addBindValue(s.songbook_name); + q.addBindValue(s.number); + q.addBindValue(s.title); + q.addBindValue(s.category); + q.addBindValue(s.tune); + q.addBindValue(s.wordsBy); + q.addBindValue(s.musicBy); + q.addBindValue(s.songText); + q.addBindValue(s.notes); + q.addBindValue(s.usePrivateSettings); + q.addBindValue(s.alignmentV); + q.addBindValue(s.alignmentH); + q.addBindValue((unsigned int)(s.color.rgb())); + q.addBindValue(s.font.toString()); + q.addBindValue((unsigned int)(s.infoColor.rgb())); + q.addBindValue(s.infoFont.toString()); + q.addBindValue((unsigned int)(s.endingColor.rgb())); + q.addBindValue(s.endingFont.toString()); + q.addBindValue(s.useBackground); + q.addBindValue(pixToByte(s.background)); + q.addBindValue(s.backgroundName); + q.exec(); +} + +void SoftProjector::saveScheduleItemNew(QSqlQuery &q, int scid, const SlideShow &s) +{ + q.prepare("INSERT INTO slideshow (scid,ssid,name,info) VALUES (?,?,?,?)"); + q.addBindValue(scid); + q.addBindValue(s.slideShowId); + q.addBindValue(s.name); + q.addBindValue(s.info); + q.exec(); + + foreach(const SlideShowItem & si,s.slides) + { + q.prepare("INSERT INTO slides (scid,sid,name,path,porder,image,imageSmall,imagePreview) VALUES(?,?,?,?,?,?,?,?)"); + q.addBindValue(scid); + q.addBindValue(si.slideId); + q.addBindValue(si.name); + q.addBindValue(si.path); + q.addBindValue(si.order); + q.addBindValue(pixToByte(si.image)); + q.addBindValue(pixToByte(si.imageSmall)); + q.addBindValue(pixToByte(si.imagePreview)); + q.exec(); + } +} + +void SoftProjector::saveScheduleItemNew(QSqlQuery &q, int scid, const VideoInfo &v) +{ + q.prepare("INSERT INTO media (scid,name,path,aRatio) VALUES(?,?,?,?)"); + q.addBindValue(scid); + q.addBindValue(v.fileName); + q.addBindValue(v.filePath); + q.addBindValue(v.aspectRatio); + q.exec(); +} + +void SoftProjector::saveScheduleItemNew(QSqlQuery &q, int scid, const Announcement &a) +{ + q.prepare("INSERT INTO announce (scid,aId,title,aText,usePrivate,useAuto,loop,slideTimer,font," + "color,useBack,backImage,backPath,alignV,alignH) " + "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + q.addBindValue(scid); + q.addBindValue(a.idNum); + q.addBindValue(a.title); + q.addBindValue(a.text); + q.addBindValue(a.usePrivateSettings); + q.addBindValue(a.useAutoNext); + q.addBindValue(a.loop); + q.addBindValue(a.slideTimer); + q.addBindValue(a.font.toString()); + unsigned int tci = (unsigned int)(a.color.rgb()); + q.addBindValue(tci); + q.addBindValue(a.useBackground); + q.addBindValue(pixToByte(QPixmap())); + q.addBindValue(a.backgroundPath); + q.addBindValue(a.alignmentV); + q.addBindValue(a.alignmentH); + q.exec(); +} + +void SoftProjector::saveScheduleUpdate(QSqlQuery &q) +{ + for(int i(0);i < schedule.count();++i) + { + Schedule sc = schedule.at(i); + if(sc.scid == -1) // Save new schedule item that was not saved yet + { + q.exec(QString("INSERT INTO schedule (stype,name,sorder) VALUES('%1','%2',%3)") + .arg(sc.stype).arg(sc.name).arg(i+1)); + q.exec("SELECT seq FROM sqlite_sequence WHERE name = 'schedule'"); + q.first(); + sc.scid = q.value(0).toInt(); + q.clear(); + if(sc.stype == "bible") + saveScheduleItemNew(q,sc.scid,sc.bible); + else if(sc.stype == "song") + saveScheduleItemNew(q,sc.scid,sc.song); + else if(sc.stype == "slideshow") + saveScheduleItemNew(q,sc.scid,sc.slideshow); + else if(sc.stype == "media") + saveScheduleItemNew(q,sc.scid,sc.media); + else if(sc.stype == "announce") + saveScheduleItemNew(q,sc.scid,sc.announce); + schedule.replace(i,sc); + } + else // Update existing schedule item + { + q.exec(QString("UPDATE schedule SET sorder = %1 WHERE id = %2").arg(i+1).arg(sc.scid)); + //if(sc.stype == "bible") + // saveScheduleItemUpdate(q,sc.scid,sc.bible); + //else if(sc.stype == "song") + // saveScheduleItemUpdate(q,sc.scid,sc.song); + //else if(sc.stype == "slideshow") + // saveScheduleItemUpdate(q,sc.scid,sc.slideshow); + //else if(sc.stype == "media") + // saveScheduleItemUpdate(q,sc.scid,sc.media); + //else if(sc.stype == "announce") + // saveScheduleItemUpdate(q,sc.scid,sc.announce); + } + } + + // Delete any shcedule items from file that have removed from schedule + q.exec("SELECT id,stype FROM schedule"); + QSqlQuery sq = q; + while(q.next()) + { + int scid = q.value(0).toInt(); + bool toDelete = false; + QString stype = q.value(1).toString(); + foreach(const Schedule &s,schedule) + { + if(scid == s.scid) + { + toDelete = false; + break; + } + else + toDelete = true; + } + + if(toDelete) + { + sq.exec("DELETE FROM schedule WHERE id = " + QString::number(scid)); + sq.exec("DELETE FROM " + stype + " WHERE scid = " + QString::number(scid)); + if(stype == "slideshow") + sq.exec("DELETE FROM slides WHERE scid = " + QString::number(scid)); + } + } +} + +void SoftProjector::saveScheduleItemUpdate(QSqlQuery &q, int scid, const BibleHistory &b) +{ + +} + +void SoftProjector::saveScheduleItemUpdate(QSqlQuery &q, int scid, const Song &s) +{ + +} + +void SoftProjector::saveScheduleItemUpdate(QSqlQuery &q, int scid, const SlideShow &s) +{ + +} + +void SoftProjector::saveScheduleItemUpdate(QSqlQuery &q, int scid, const VideoInfo &v) +{ + +} + +void SoftProjector::saveScheduleItemUpdate(QSqlQuery &q, int scid, const Announcement &a) +{ + +} + +void SoftProjector::openSchedule() +{ + QProgressDialog progress; + progress.setMaximum(0); + progress.setLabelText(tr("Opening schedule file...")); + progress.show(); + { + QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE","spsc"); + db.setDatabaseName(schedule_file_path); + if(db.open()) + { + QSqlQuery sq(db); + sq.exec("PRAGMA user_version"); + sq.first(); + int scVer = sq.value(0).toInt(); + if(scVer == 2) + { + schedule.clear(); + sq.exec("SELECT id, stype, name FROM schedule ORDER BY sorder"); + QSqlQuery sqsc = sq; + while(sq.next()) + { + int scid = sq.value(0).toInt(); + QString stype = sq.value(1).toString(); + QString name = sq.value(2).toString(); + + if(stype == "bible") + { + BibleHistory bib; + openScheduleItem(sqsc,scid,bib); + Schedule sc(bib); + sc.name = name; + sc.scid = scid; + schedule.append(sc); + } + else if(stype == "song") + { + Song song; + openScheduleItem(sqsc,scid,song); + Schedule sc(song); + sc.name = name; + sc.scid = scid; + schedule.append(sc); + } + else if(stype == "slideshow") + { + SlideShow ss; + openScheduleItem(sqsc,scid,ss); + Schedule sc(ss); + sc.name = name; + sc.scid = scid; + schedule.append(sc); + } + else if(stype == "media") + { + VideoInfo vi; + openScheduleItem(sqsc,scid,vi); + Schedule sc(vi); + sc.name = name; + sc.scid = scid; + schedule.append(sc); + } + else if(stype == "announce") + { + Announcement announce; + openScheduleItem(sqsc,scid,announce); + Schedule sc(announce); + sc.name = name; + sc.scid = scid; + schedule.append(sc); + } + } + reloadShceduleList(); + } + else + { + QMessageBox mb(this); + mb.setText(tr("The schedule file you are trying to open is of uncompatible version.\n" + "Compatible version: 2\n" + "This schedule file version: ") + QString::number(scVer)); + mb.setIcon(QMessageBox::Information); + mb.setStandardButtons(QMessageBox::Ok); + mb.exec(); + schedule_file_path.clear(); + updateWindowText(); + } + } + } + QSqlDatabase::removeDatabase("spsc"); + progress.close(); +} + +void SoftProjector::openScheduleItem(QSqlQuery &q, const int scid, BibleHistory &b) +{ + q.exec("SELECT verseIds, caption, captionLong FROM bible WHERE scid = " + QString::number(scid)); + q.first(); + b.verseIds = q.value(0).toString(); + b.caption = q.value(1).toString(); + b.caption = q.value(2).toString(); +} + +void SoftProjector::openScheduleItem(QSqlQuery &q, const int scid, Song &s) +{ + q.exec("SELECT * FROM song WHERE scid = " + QString::number(scid)); + q.first(); + QSqlRecord r = q.record(); + s.songID = r.field("songid").value().toInt(); + s.songbook_id = r.field("sbid").value().toInt(); + s.songbook_name = r.field("sbName").value().toString(); + s.number = r.field("number").value().toInt(); + s.title = r.field("title").value().toString(); + s.category = r.field("category").value().toInt(); + s.tune = r.field("tune").value().toString(); + s.wordsBy = r.field("wordsBy").value().toString(); + s.musicBy = r.field("musicBy").value().toString(); + s.songText = r.field("songText").value().toString(); + s.notes = r.field("notes").value().toString(); + s.usePrivateSettings = r.field("usePrivate").value().toBool(); + s.alignmentV = r.field("alignV").value().toInt(); + s.alignmentH = r.field("alignH").value().toInt(); + s.color = QColor::fromRgb(r.field("color").value().toUInt()); + s.font.fromString(r.field("font").value().toString()); + s.infoColor = QColor::fromRgb(r.field("infoColor").value().toUInt()); + s.infoFont.fromString(r.field("infoFont").value().toString()); + s.endingColor = QColor::fromRgb(r.field("endingColor").value().toUInt()); + s.endingFont.fromString(r.field("endingFont").value().toString()); + s.useBackground = r.field("useBack").value().toBool(); + s.background.loadFromData(r.field("backImage").value().toByteArray()); + s.backgroundName = r.field("backName").value().toString(); +} + +void SoftProjector::openScheduleItem(QSqlQuery &q, const int scid, SlideShow &s) +{ + q.exec("SELECT ssid, name, info FROM slideshow WHERE scid = " + QString::number(scid)); + q.first(); + s.slideShowId = q.value(0).toInt(); + s.name = q.value(1).toString(); + s.info = q.value(2).toString(); + + q.exec("SELECT sid, name, path, porder, image, imageSmall, imagePreview FROM slides WHERE scid = " + QString::number(scid)); + while(q.next()) + { + SlideShowItem si; + si.slideId = q.value(0).toInt(); + si.name = q.value(1).toString(); + si.path = q.value(2).toString(); + si.order = q.value(3).toInt(); + si.image.loadFromData(q.value(4).toByteArray()); + si.imageSmall.loadFromData(q.value(5).toByteArray()); + si.imagePreview.loadFromData(q.value(6).toByteArray()); + s.slides.append(si); + } +} + +void SoftProjector::openScheduleItem(QSqlQuery &q, const int scid, VideoInfo &v) +{ + q.exec("SELECT name, path, aRatio FROM media WHERE scid = " + QString::number(scid)); + q.first(); + v.fileName = q.value(0).toString(); + v.filePath = q.value(1).toString(); + v.aspectRatio = q.value(2).toInt(); +} + +void SoftProjector::openScheduleItem(QSqlQuery &q, const int scid, Announcement &a) +{ + q.exec("SELECT aId, title, aText, usePrivate, useAuto, loop, slideTimer, font, color, useBack, " + "backImage, backPath, alignV, alignH FROM announce WHERE scid = " + QString::number(scid)); + q.first(); + a.idNum = q.value(0).toInt(); + a.title = q.value(1).toString(); + a.text = q.value(2).toString(); + a.usePrivateSettings = q.value(3).toBool(); + a.useAutoNext = q.value(4).toBool(); + a.loop = q.value(5).toBool(); + a.slideTimer = q.value(6).toInt(); + a.font.fromString(q.value(7).toString()); + a.color = QColor::fromRgb(q.value(8).toUInt()); + a.useBackground = q.value(9).toBool(); +// a.backImage = QPixmap + a.backgroundPath = q.value(11).toString(); + a.alignmentV = q.value(12).toInt(); + a.alignmentH = q.value(13).toInt(); +} diff --git a/softprojector.h b/softprojector.h new file mode 100644 index 0000000..9fa52ca --- /dev/null +++ b/softprojector.h @@ -0,0 +1,239 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef SOFTPROJECTOR_H +#define SOFTPROJECTOR_H + +#include +//#include +#include "songwidget.h" +#include "biblewidget.h" +#include "announcewidget.h" +//#include "displayscreen.h" +#include "projectordisplayscreen.hpp" +#include "editwidget.h" +#include "bible.h" +#include "managedatadialog.h" +#include "settingsdialog.h" +#include "songcounter.h" +#include "settings.h" +#include "printpreviewdialog.h" +#include "helpdialog.h" +#include "picturewidget.h" +#include "slideshow.h" +#include "mediawidget.h" +#include "videoinfo.h" +#include "slideshoweditor.h" +#include "schedule.h" + +class QActionGroup; + +namespace Ui +{ +class SoftProjectorClass; +} + +class SoftProjector : public QMainWindow +{ + Q_OBJECT + +public: + SoftProjector(QWidget *parent = 0); + ~SoftProjector(); + SongWidget *songWidget; + BibleWidget *bibleWidget; + AnnounceWidget *announceWidget; + ManageDataDialog *manageDialog; + QDesktopWidget *desktop; + EditWidget *editWidget; + ProjectorDisplayScreen *pds1; + ProjectorDisplayScreen *pds2; + PictureWidget *pictureWidget; + MediaWidget *mediaPlayer; + + bool showing; // whether we are currently showing to the projector + Song current_song; + int current_song_verse; + Verse current_verse; + Announcement currentAnnounce; + QString version_string; + Theme theme; + Settings mySettings; + + SoftProjector *softProjector; + +public slots: + void updateSetting(GeneralSettings &g,Theme &t, SlideShowSettings &ssets, + BibleVersionSettings &bsets, BibleVersionSettings &bsets2); + void saveSettings(); + void positionDisplayWindow(); + void updateScreen(); + + void setWaitCursor(); + void setArrowCursor(); + void setAppDataDir(QDir d){appDataDir = d;} + +private: + Ui::SoftProjectorClass *ui; + SettingsDialog *settingsDialog; + HelpDialog *helpDialog; + QString type; + bool new_list; + QActionGroup *languageGroup; + QString languagePath; + QTranslator translator; + + //For saving and opening schedule files + //QString project_file_path; + QString schedule_file_path; + bool is_schedule_saved; + QString cur_locale; + bool isSingleScreen; + bool hasDisplayScreen2; + + // shortcuts + QShortcut *shpgUP; + QShortcut *shpgDwn; + QShortcut *shSart1; + QShortcut *shSart2; + + // Pictures + QList pictureShowList; + + // video items +// Phonon::SeekSlider *playerSlider; +// Phonon::VolumeSlider *volumeSlider; + VideoInfo currentVideo; +// Phonon::AudioOutput *playerAudioOutput; + + // Schelude list + QList schedule; + QDir appDataDir; + +private slots: + void showDisplayScreen(bool show); + + void applySetting(GeneralSettings &g, Theme &t, SlideShowSettings &s, + BibleVersionSettings &b1, BibleVersionSettings &b2); + void on_actionSong_Counter_triggered(); + void on_projectTab_currentChanged(int index); + void updateEditActions(); + void on_actionNew_triggered(); + void on_actionEdit_triggered(); + void on_actionCopy_triggered(); + void on_actionDelete_triggered(); + void updateWindowText(); + + void retranslateUis(); + void createLanguageActions(); + void switchLanguage(QAction *action); + void on_actionDonate_triggered(); + void on_action_Help_triggered(); + void on_actionManage_Database_triggered(); + void on_actionAbout_triggered(); + void on_listShow_doubleClicked(QModelIndex index); + void on_actionSettings_triggered(); + void newSong(); + void copySong(); + void editSong(); + void deleteSong(); + void newSlideShow(); + void editSlideShow(); + void deleteSlideShow(); + void addMediaToLibrary(); + void removeMediaFromLibrary(); + void newAnnouncement(); + void editAnnouncement(); + void copyAnnouncement(); + void deleteAnnoucement(); + void on_actionShow_triggered(); + void on_actionHide_triggered(); + void on_listShow_currentRowChanged(int currentRow); + void on_actionClose_triggered(); + void setSongList(Song song, int row); + void setAnnounceText(Announcement announce, int row); + void setChapterList(QStringList chapter_list, QString caption, QItemSelection selectedItems); + void setPictureList(QList &image_list, int row, QString name); + void setVideo(VideoInfo &video); + + void on_listShow_itemSelectionChanged(); + void on_rbMultiVerse_toggled(bool checked); + void on_actionPrint_triggered(); + void on_actionPrintSchedule_triggered(); + + void nextSlide(); + void prevSlide(); + + // video playback functions + void on_pushButtonPlay_clicked(); + void setButtonPlayIcon(bool isPlaying); + void setTimeText(QString cTime); + + // schedule functions + void on_actionScheduleAdd_triggered(); + void on_actionScheduleRemove_triggered(); + void on_actionScheduleClear_triggered(); + void addToShcedule(BibleHistory &b); + void addToShcedule(Song &s); + void addToShcedule(SlideShow &s); + void addToShcedule(VideoInfo &v); + void addToShcedule(Announcement &a); + void reloadShceduleList(); + void on_listWidgetSchedule_doubleClicked(const QModelIndex &index); + void on_listWidgetSchedule_itemSelectionChanged(); + void on_actionMoveScheduleTop_triggered(); + void on_actionMoveScheduleUp_triggered(); + void on_actionMoveScheduleDown_triggered(); + void on_actionMoveScheduleBottom_triggered(); + void on_actionNewSchedule_triggered(); + void on_actionOpenSchedule_triggered(); + void on_actionSaveSchedule_triggered(); + void on_actionSaveScheduleAs_triggered(); + void on_actionCloseSchedule_triggered(); + void openSchedule(); + void saveSchedule(bool overWrite); + void saveScheduleNew(QSqlQuery &q); + void saveScheduleItemNew(QSqlQuery &q, int scid, const BibleHistory &b); + void saveScheduleItemNew(QSqlQuery &q, int scid, const Song &s); + void saveScheduleItemNew(QSqlQuery &q, int scid, const SlideShow &s); + void saveScheduleItemNew(QSqlQuery &q, int scid, const VideoInfo &v); + void saveScheduleItemNew(QSqlQuery &q, int scid, const Announcement &a); + void saveScheduleUpdate(QSqlQuery &q); + void saveScheduleItemUpdate(QSqlQuery &q, int scid, const BibleHistory &b); + void saveScheduleItemUpdate(QSqlQuery &q, int scid, const Song &s); + void saveScheduleItemUpdate(QSqlQuery &q, int scid, const SlideShow &s); + void saveScheduleItemUpdate(QSqlQuery &q, int scid, const VideoInfo &v); + void saveScheduleItemUpdate(QSqlQuery &q, int scid, const Announcement &a); + void openScheduleItem(QSqlQuery &q, const int scid, BibleHistory &b); + void openScheduleItem(QSqlQuery &q, const int scid, Song &s); + void openScheduleItem(QSqlQuery &q, const int scid, SlideShow &s); + void openScheduleItem(QSqlQuery &q, const int scid, VideoInfo &v); + void openScheduleItem(QSqlQuery &q, const int scid, Announcement &a); + + void on_actionClear_triggered(); + + void on_actionCloseDisplay_triggered(); + void updateCloseDisplayButtons(bool isOn); + +protected: + void closeEvent(QCloseEvent *event); + void keyPressEvent(QKeyEvent *event); +}; + +#endif // SOFTPROJECTOR_H diff --git a/softprojector.ico b/softprojector.ico new file mode 100644 index 0000000..2ff03e5 Binary files /dev/null and b/softprojector.ico differ diff --git a/softprojector.qrc b/softprojector.qrc new file mode 100644 index 0000000..d36ed83 --- /dev/null +++ b/softprojector.qrc @@ -0,0 +1,104 @@ + + + icons/effectsBlurredShadow.png + icons/effectsNone.png + icons/effectsShadow.png + icons/add.png + icons/solidColor.png + icons/add_songbook.png + icons/announce.png + icons/announce_copy.png + icons/announce_delete.png + icons/announce_edit.png + icons/announce_new.png + icons/base-22x22-actions-application-exit.png + icons/bibleHistoryDelete.png + icons/book.png + icons/clear.png + icons/controlExit.png + icons/controlExitHovered.png + icons/controlExitPressed.png + icons/controlNext.png + icons/controlNextHovered.png + icons/controlNextPressed.png + icons/controlPrev.png + icons/controlPrevHovered.png + icons/controlPrevPressed.png + icons/database.png + icons/display.png + icons/display_off.png + icons/display_on.png + icons/down.png + icons/edit.png + icons/ExpandSmall.png + icons/FitToScreen.png + icons/FitToScreenByExpanding.png + icons/flag_uk.png + icons/go_live.png + icons/help.png + icons/hide.png + icons/new.png + icons/open.png + icons/pause.png + icons/photo.png + icons/play.png + icons/playerScreen.png + icons/print.png + icons/remove.png + icons/remove_all.png + icons/save.png + icons/scheduleAdd.png + icons/scheduleClear.png + icons/scheduleDown.png + icons/scheduleDownM.png + icons/scheduleNew.png + icons/scheduleOpen.png + icons/scheduleRemove.png + icons/scheduleSave.png + icons/scheduleUp.png + icons/scheduleUpM.png + icons/screen.png + icons/search.png + icons/settings.png + icons/show.png + icons/slideshow_delete.png + icons/slideshow_edit.png + icons/slideshow_new.png + icons/softprojector.png + icons/softprojector_cloud.png + icons/song_copy.png + icons/song_count.png + icons/song_delete.png + icons/song_edit.png + icons/song_new.png + icons/song_tab.png + icons/splash.png + icons/stop.png + icons/up.png + icons/video.png + icons/video_add.png + icons/video_remove.png + icons/alingBottom.png + icons/alingCenter.png + icons/alingLeft.png + icons/alingMiddle.png + icons/alingRight.png + icons/alingTop.png + icons/tranFade.png + icons/tranFadeOutIn.png + icons/tranMoveDown.png + icons/tranMoveLeft.png + icons/aboveText.png + icons/belowText.png + icons/bottomOfScreen.png + icons/toBottomOfScreen.png + icons/toTopOfScreen.png + icons/common.png + icons/tranMoveRight.png + icons/tranMoveUp.png + icons/tranNone.png + + + DisplayArea.qml + + diff --git a/softprojector.rc b/softprojector.rc new file mode 100644 index 0000000..95d7207 --- /dev/null +++ b/softprojector.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "softprojector.ico" \ No newline at end of file diff --git a/softprojector.ui b/softprojector.ui new file mode 100644 index 0000000..362d0d0 --- /dev/null +++ b/softprojector.ui @@ -0,0 +1,691 @@ + + + SoftProjectorClass + + + + 0 + 0 + 1055 + 666 + + + + + 700 + 550 + + + + + + + + :/icons/icons/softprojector.png:/icons/icons/softprojector.png + + + Qt::ToolButtonIconOnly + + + false + + + + + + + Qt::Horizontal + + + + + + + Service Schedule: + + + + + + + + 16 + 16 + + + + 1 + + + + + + + + + 0 + 0 + + + + + Tab + + + + + + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + + + + 0 + 0 + + + + + 0 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + :/icons/icons/play.png:/icons/icons/play.png + + + + + + + + + + + + + + + + + + + + 0 + + + + + If selected, this will allow to select multiple verses at one time. Will need to press "Show" each time. + + + Use Multi Verse + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + 0 + 0 + + + + false + + + + + + + + + + + + + 0 + 0 + 1055 + 21 + + + + + &File + + + + + + + + + + + + + + + &Edit + + + + + + + + + + + + + &Help + + + + + + + + + Select Language + + + Language + + + + + View + + + + + + + Schedule + + + + + + + + + + + + + Display Screen + + + + + + + + + + + + + + + + + File Tool Bar + + + Qt::ToolButtonIconOnly + + + TopToolBarArea + + + false + + + + + Schedule Tool Bar + + + TopToolBarArea + + + false + + + + + Edit Tool Bar + + + TopToolBarArea + + + false + + + + + + 0 + 0 + + + + Display Control Tool Bar + + + Qt::RightToLeft + + + TopToolBarArea + + + false + + + + + &About + + + + + + :/icons/icons/settings.png:/icons/icons/settings.png + + + &Settings... + + + Open settings dialog + + + Ctrl+T + + + + + + :/icons/icons/base-22x22-actions-application-exit.png:/icons/icons/base-22x22-actions-application-exit.png + + + E&xit + + + Exit SoftProjector + + + Ctrl+Q + + + + + + :/icons/icons/database.png:/icons/icons/database.png + + + &Manage Database... + + + Import and export Bibles, songbooks and themes + + + Ctrl+M + + + + + + :/icons/icons/help.png:/icons/icons/help.png + + + &Help + + + Open Help + + + F1 + + + + + + :/icons/icons/song_count.png:/icons/icons/song_count.png + + + Song Counter... + + + + + + :/icons/icons/scheduleOpen.png:/icons/icons/scheduleOpen.png + + + &Open Schedule + + + Ctrl+O + + + + + + :/icons/icons/scheduleSave.png:/icons/icons/scheduleSave.png + + + &Save Schedule + + + Ctrl+S + + + + + Save Schedule &As + + + Save Schedule with different name + + + + + + :/icons/icons/scheduleNew.png:/icons/icons/scheduleNew.png + + + &New Schedule + + + Start new Schedule + + + Ctrl+Shift+N + + + + + Close Schedule + + + Close Schedule + + + + + + :/icons/icons/print.png:/icons/icons/print.png + + + &Print + + + Prints selected Bible chapter, selected song and selected announcement. + + + Ctrl+P + + + + + Print Schedule + + + Print Schedule + + + Ctrl+Shift+P + + + + + + + + Ctrl+N + + + + + + + + Ctrl+E + + + + + + + + Ctrl+C + + + + + + + + Ctrl+Del + + + + + Donate + + + Donate to softProjector development team + + + + + + :/icons/icons/scheduleAdd.png:/icons/icons/scheduleAdd.png + + + Add to Schedule + + + F2 + + + + + + :/icons/icons/scheduleRemove.png:/icons/icons/scheduleRemove.png + + + Remove from Schedule + + + Del + + + + + + :/icons/icons/scheduleClear.png:/icons/icons/scheduleClear.png + + + Clear Schedule + + + + + + :/icons/icons/scheduleUpM.png:/icons/icons/scheduleUpM.png + + + Move Item To Top + + + Move Schedule item to top of the list + + + + + + :/icons/icons/scheduleUp.png:/icons/icons/scheduleUp.png + + + Move Item Up + + + Move Schedule item up + + + + + + :/icons/icons/scheduleDown.png:/icons/icons/scheduleDown.png + + + Mode Item Down + + + Move Schedule item down + + + + + + :/icons/icons/scheduleDownM.png:/icons/icons/scheduleDownM.png + + + Move Item To Bottom + + + Move Schedule item to bottom of the list + + + + + + :/icons/icons/show.png:/icons/icons/show.png + + + Show + + + Dsiplay to the screen (F4) + + + F4 + + + + + + :/icons/icons/hide.png:/icons/icons/hide.png + + + Hide + + + Show Passive Screen (Stop displaying to the screen) (Esc) + + + Esc + + + + + + :/icons/icons/clear.png:/icons/icons/clear.png + + + Clear + + + Clear Display Text (Shift+Esc) + + + Shift+Esc + + + + + true + + + + :/icons/icons/display_off.png:/icons/icons/display_off.png + + + On / Off + + + Turn Display Screen On/Off + + + + + + + + + diff --git a/song.cpp b/song.cpp new file mode 100644 index 0000000..eb76490 --- /dev/null +++ b/song.cpp @@ -0,0 +1,823 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "song.h" +#include +#include "spfunctions.h" + +// for future use or chord import +// to filter out ChorPro chords from within the song text +// Use following QRegExp = "(\\[[\\w]*[\\w]\\]|\\[[\\w]*[#b♭♯][\\w]*\\])" + +QString clean(QString str) +{ + //Removes all none alphanumeric characters from the string + str.replace(QRegExp("[\\W*]")," "); + str = str.simplified(); + return str; +} + +bool isStanzaTitle(QString string) +{ + // Checks if the line is stanza title line + if(isStanzaVerseTitle(string)) + return true; + else if (isStanzaAndVerseTitle(string)) + return true; + else if (isStanzaRefrainTitle(string)) + return true; + else if (isStanzaAndRefrainTitle(string)) + return true; + else if (isStanzaSlideTitle(string)) + return true; + else + return false; +} + +bool isStanzaVerseTitle(QString string) +{ + // Check if the line is verse title line + if(string.startsWith("Verse")) + return true; + else if (string.startsWith(QString::fromUtf8("Куплет"))) + return true; + else if (string.startsWith(QString::fromUtf8("Strophe"))) + return true; + else if (string.startsWith(QString::fromUtf8("Verš"))) + return true; + else + return false; +} + +bool isStanzaAndVerseTitle(QString string) +{ + // Check if the line is additional verse title line + if(string.startsWith("&Verse")) + return true; + else if (string.startsWith(QString::fromUtf8("&Куплет"))) + return true; + else if (string.startsWith(QString::fromUtf8("&Strophe"))) + return true; + else if (string.startsWith(QString::fromUtf8("&Verš"))) + return true; + else + return false; +} + +bool isStanzaRefrainTitle(QString string) +{ + // Check if line is refrain title line + if(string.startsWith("Chorus")) + return true; + else if (string.startsWith(QString::fromUtf8("Sbor"))) + return true; + else if (string.startsWith("Refrain")) + return true; + else if (string.startsWith(QString::fromUtf8("Припев"))) + return true; + else if (string.startsWith(QString::fromUtf8("Приспів"))) + return true; + else if (string.startsWith(QString::fromUtf8("Refrén"))) + return true; + else + return false; +} + +bool isStanzaAndRefrainTitle(QString string) +{ + // Check if line is additional refrain title line + if(string.startsWith("&Chorus")) + return true; + else if (string.startsWith(QString::fromUtf8("&Sbor"))) + return true; + else if (string.startsWith("&Refrain")) + return true; + else if (string.startsWith(QString::fromUtf8("&Припев"))) + return true; + else if (string.startsWith(QString::fromUtf8("&Приспів"))) + return true; + else if (string.startsWith(QString::fromUtf8("&Refrén"))) + return true; + else + return false; +} + +bool isStanzaSlideTitle(QString string) +{ + // Check if line is slide or other stanza title line + if(string.startsWith("Slide")) + return true; + else if (string.startsWith(QString::fromUtf8("Слайд"))) + return true; + else if (string.startsWith(QString::fromUtf8("Dia"))) + return true; + else if (string.startsWith(QString::fromUtf8("Snímek"))) + return true; + else if (string.startsWith("Insert")) + return true; + else if (string.startsWith(QString::fromUtf8("Вставка"))) + return true; + else if (string.startsWith(QString::fromUtf8("Einfügung"))) + return true; + else if (string.startsWith(QString::fromUtf8("Vložka"))) + return true; + else if (string.startsWith("Intro")) + return true; + else if (string.startsWith(QString::fromUtf8("Вступление"))) + return true; + //else if (string.startsWith(QString::fromUtf8("Вступ"))) + // return true; + else if (string.startsWith(QString::fromUtf8("Einleitung"))) + return true; + else if (string.startsWith(QString::fromUtf8("Úvod"))) + return true; + else if (string.startsWith("Ending")) + return true; + else if (string.startsWith(QString::fromUtf8("Окончание"))) + return true; + else if (string.startsWith(QString::fromUtf8("Закінчення"))) + return true; + else if (string.startsWith(QString::fromUtf8("Ende"))) + return true; + else if (string.startsWith(QString::fromUtf8("Závěr"))) + return true; + else + return false; +} + +Song::Song() +{ + // initialize songId to be zero at start; + setDefaults(); + songID = 0; +} + +Song::Song(int id) +{ + setDefaults(); + songID = id; +} + +Song::Song(int song_id, int song_num, QString song_songbook_id, QString song_songbook_name) +{ + setDefaults(); + songID = song_id; + number = song_num; + songbook_id = song_songbook_id; + songbook_name = song_songbook_name; +} + +void Song::setDefaults() +{ + number = 1; + title = ""; + tune = ""; + wordsBy = ""; + musicBy = ""; + songText = ""; + category = 0; + usePrivateSettings = false; + alignmentV = 1; + alignmentH = 1; + color = QColor(Qt::white); + font.fromString("Arial,28,-1,5,50,0,0,0,0,0"); + infoColor = QColor(Qt::white); + infoFont.fromString("Arial,28,-1,5,50,0,0,0,0,0"); + endingColor = QColor(Qt::white); + endingFont.fromString("Arial,28,-1,5,50,0,0,0,0,0"); + useBackground = false; + backgroundName = ""; + background = QPixmap(); + notes = ""; +} + +void Song::readData() +{ + QSqlQuery sq; + // 0 1 2 3 4 5 6 7 8 + // 9 10 11 12 13 14 15 16 17 + // 18 19 20 + sq.exec("SELECT songbook_id, number, title, category, tune, words, music, song_text, notes, " + "use_private, alignment_v, alignment_h, color, font, info_color, info_font, ending_color, ending_font, " + "use_background, background_name, background FROM Songs WHERE id = " + QString::number(songID)); + sq.first(); + songbook_id = sq.value(0).toString(); + number = sq.value(1).toInt(); + title = sq.value(2).toString(); + category = sq.value(3).toInt(); + tune = sq.value(4).toString(); + wordsBy = sq.value(5).toString(); + musicBy = sq.value(6).toString(); + songText = sq.value(7).toString(); + notes = sq.value(8).toString(); + usePrivateSettings = sq.value(9).toBool(); + if(!sq.value(10).isNull()) + alignmentV = sq.value(10).toInt(); + if(!sq.value(11).isNull()) + alignmentH = sq.value(11).toInt(); + if(!sq.value(12).isNull()) + color = QColor::fromRgb(sq.value(12).toUInt()); + if(!sq.value(13).isNull()) + font.fromString(sq.value(13).toString()); + if(!sq.value(14).isNull()) + infoColor = QColor::fromRgb(sq.value(14).toUInt()); + if(!sq.value(15).isNull()) + infoFont.fromString(sq.value(15).toString()); + if(!sq.value(16).isNull()) + endingColor = QColor::fromRgb(sq.value(16).toUInt()); + if(!sq.value(17).isNull()) + endingFont.fromString(sq.value(17).toString()); + useBackground = sq.value(18).toBool(); + backgroundName = sq.value(19).toString(); + background.loadFromData(sq.value(20).toByteArray()); +} + +QStringList Song::getSongTextList() +{ + // This function prepares a song list that will be shown in the song preview and show list. + // It will it will automatically prepare correct sining order of verses and choruses. + QStringList formatedSong; // List container for correctely ordered item. This item will be returned. + QString text, line; + QStringList songlist; + QStringList chorus; + bool has_chorus=false; + bool has_vstavka=false; + int pnum = 0; + int chor = 0; + int listcount(0); + + songlist = songText.split("\n"); + listcount = songlist.count(); + while(pnum < listcount) + { + line = songlist.at(pnum); + if(isStanzaVerseTitle(line)) + { + // Fill Verse + text = getStanzaBlock(pnum,songlist); + formatedSong.append(text); + + if (has_chorus)// add Chorus stansa to the formated list if it exists + formatedSong.append(chorus); + + has_vstavka = false; + } + else if(isStanzaAndVerseTitle(line)) + { + + // Fill Additional parts of the verse + text = getStanzaBlock(pnum,songlist); + // it chorus esits, this means that it was added to the formated list + // and needs to be removed before adding addintion Veres stansas to formated list + if(has_chorus) + removeLastChorus(chorus,formatedSong); + + formatedSong.append(text); + + if (has_chorus)// add Chorus stansa to the formated list if it exists + formatedSong.append(chorus); + + has_vstavka = false; + } + else if (isStanzaSlideTitle(line)) + { + // Fill Insert + text = getStanzaBlock(pnum,songlist); + formatedSong.append(text); + + // Chorus is not added to Insert, if one is needed, + // it should be added when song is edited, otherwise + // there is no difirence between Veres and Insert + has_vstavka = true; + } + else if (isStanzaRefrainTitle(line)) + { + // Fill Chorus + text = getStanzaBlock(pnum,songlist); + QStringList chorusold = chorus; + chorus.clear(); + chorus.append(text); + has_chorus = true; + ++chor; + + if (chor == 1) // if first Chorus, add chorus to formated list + formatedSong.append(chorus); + else if ((chor == 2) && !has_vstavka ) // if second chorus and Insert was not added + { + // remove exising chorus + removeLastChorus(chorusold,formatedSong); + + // and add new chorus to formated list + formatedSong.append(chorus); + chor--; + } + else if ((chor == 2) && has_vstavka ) // if second chorus and Insert was added + { + // and add new chorus to formated list + formatedSong += chorus; + chor-- ; + } + has_vstavka = false; + } + else if(isStanzaAndRefrainTitle(line)) + { + // Fill other chorus parts to Chorus block + text = getStanzaBlock(pnum,songlist); + + removeLastChorus(chorus,formatedSong); + chorus.append(text); + formatedSong.append(chorus);// replace removed chorus parts with complete chorus list + } + ++pnum; + } + + return formatedSong; +} + +QString Song::getStanzaBlock(int &i, QStringList &list) +{ + QString line,block; + int j(i); + + while(i < list.count()) + { + line = list.at(i); + if(line.contains(QRegExp("^&"))) + line.remove("&"); + + if(isStanzaTitle(line) && (i!=j)) + { + i--; + break; + } + block += line + "\n"; + ++i; + } + + return block.trimmed(); +} + +void Song::removeLastChorus(QStringList ct, QStringList &list) +{ + for(int i(0);i songs) +{ + emit layoutAboutToBeChanged(); + song_list.clear(); + song_list = songs; + emit layoutChanged(); +} + +void SongsModel::updateSongFromDatabase(int songid) +{ + emit layoutAboutToBeChanged(); + for( int i=0; i < song_list.size(); ++i) { + Song *song = (Song*)&(song_list.at(i)); + if( song->songID == songid ) + { + song->readData(); + emit layoutChanged(); // To redraw the table + return; + } + } +} + +void SongsModel::updateSongFromDatabase(int newSongId, int oldSongId) +{ + emit layoutAboutToBeChanged(); + for( int i=0; i < song_list.size(); i++) + { + Song *song = (Song*)&(song_list.at(i)); + if( song->songID == oldSongId ) + { + song->songID = newSongId; + // get song number and songbook id + song->readData(); + QSqlQuery sq; + // get songbook name + sq.exec("SELECT name FROM Songbooks WHERE id = " + song->songbook_id ); + sq.first(); + song->songbook_name = sq.value(0).toString(); + + emit layoutChanged(); // To redraw the table + return; + } + } +} + +void SongsModel::addSong(Song song) +{ + beginInsertRows(QModelIndex(), rowCount(), rowCount()); + song_list.append(song); + endInsertRows(); +} + +bool SongsModel::removeRows( int row, int count, const QModelIndex & parent) +{ + beginRemoveRows(parent, row, row+count-1); + // Need to remove starting from the end: + for(int i=row+count-1; i>=row; i--) + song_list.removeAt(i); + endRemoveRows(); + return true; +} + +int SongsModel::rowCount(const QModelIndex &parent) const +{ + return song_list.count(); +} + +int SongsModel::columnCount(const QModelIndex &parent) const +{ + return 5; +} + +QVariant SongsModel::data(const QModelIndex &index, int role) const +{ + if( !index.isValid() ) + return QVariant(); + + if( role == Qt::DisplayRole ) + { + Song song = song_list.at(index.row()); + if( index.column() == 0 ) //Category + return QVariant(song.category); + else if( index.column() == 1 ) //Song Number + return QVariant(song.number); + else if( index.column() == 2) //Song Title + return QVariant(song.title); + else if( index.column() == 3) //Songbook + return QVariant(song.getSongbookName()); + else if( index.column() == 4) //Tune + return QVariant(song.tune); + } + return QVariant(); +} + +QVariant SongsModel::headerData(int section, Qt::Orientation orientation,int role) const +{ + if (role == Qt::DisplayRole && orientation == Qt::Horizontal ) + { + switch(section) { + case 1: + return QVariant(tr("Num")); + case 2: + return QVariant(tr("Title")); + case 3: + return QVariant(tr("Songbook")); + case 4: + return QVariant(tr("Tune")); + } + } + return QVariant(); +} + +void SongsModel::emitLayoutChanged() +{ + emit layoutChanged(); +} + +void SongsModel::emitLayoutAboutToBeChanged() +{ + emit layoutAboutToBeChanged(); +} + +bool SongsModel::isInTable(int songid) +{ + foreach(Song agent, song_list) + if(agent.songID == songid) + return true; + return false; +} + +SongProxyModel::SongProxyModel(QObject *parent) : QSortFilterProxyModel(parent) +{ +} + +void SongProxyModel::setFilterString(QString new_string, bool new_match_beginning, bool new_exact_match) +{ + filter_string = new_string; + match_beginning = new_match_beginning; + exact_match = new_exact_match; +} + +void SongProxyModel::setSongbookFilter(QString new_songbook) +{ + songbook_filter = new_songbook; +} + +void SongProxyModel::setCategoryFilter(int category) +{ + category_filter = QString::number(category); +} + +bool SongProxyModel::filterAcceptsRow(int sourceRow, + const QModelIndex &sourceParent) const +{ + QModelIndex index0 = sourceModel()->index(sourceRow, 0, sourceParent);//Category + QModelIndex index1 = sourceModel()->index(sourceRow, 1, sourceParent);//Song Number + QModelIndex index2 = sourceModel()->index(sourceRow, 2, sourceParent);//Song Title + QModelIndex index3 = sourceModel()->index(sourceRow, 3, sourceParent);//Songbook + + QString str0 = sourceModel()->data(index0).toString();//Category + QString str1 = sourceModel()->data(index1).toString();//Song Number + QString str2 = sourceModel()->data(index2).toString();//Song Title + QString str3 = sourceModel()->data(index3).toString();//Songbook + + + // Exclude rows that are not part of the selected songbook: + if( songbook_filter != "ALL" ) + if( str3 != songbook_filter ) + return false; + + // Exclude rows that are not part of selected category + if(category_filter != "-1") + if( str0 != category_filter) + return false; + + if( filter_string.isEmpty() ) + // No filter specified + return true; + + QRegExp rx; + rx.setCaseSensitivity(Qt::CaseInsensitive); + QString s = filter_string; + s.replace(" ","\\W*"); + if(exact_match) + return ( str1.compare(filter_string, Qt::CaseInsensitive) == 0 + || str2.compare(filter_string, Qt::CaseInsensitive) == 0 ); + else if(match_beginning) + { + rx.setPattern("^"+s); + return (str1.contains(rx) + || str2.contains(rx) ); + } + else + { + rx.setPattern(s); + return (str1.contains(rx) + || str2.contains(rx) ); + } +} + +SongDatabase::SongDatabase() +{ +} + +void Song::saveUpdate() +{ + // Update song information + QSqlQuery sq; + sq.prepare("UPDATE Songs SET songbook_id = ?, number = ?, title = ?, category = ?, tune = ?, words = ?, music = ?, " + "song_text = ?, notes = ?, use_private = ?, alignment_v = ?, alignment_h = ?, color = ?, font = ?, " + "info_color = ?, info_font = ?, ending_color = ?, ending_font = ?, use_background = ?, " + "background_name = ?, background = ? WHERE id = ?"); + sq.addBindValue(songbook_id); + sq.addBindValue(number); + sq.addBindValue(title); + sq.addBindValue(category); + sq.addBindValue(tune); + sq.addBindValue(wordsBy); + sq.addBindValue(musicBy); + sq.addBindValue(songText); + sq.addBindValue(notes); + sq.addBindValue(usePrivateSettings); + sq.addBindValue(alignmentV); + sq.addBindValue(alignmentH); + sq.addBindValue((unsigned int)(color.rgb())); + sq.addBindValue(font.toString()); + sq.addBindValue((unsigned int)(infoColor.rgb())); + sq.addBindValue(infoFont.toString()); + sq.addBindValue((unsigned int)(endingColor.rgb())); + sq.addBindValue(endingFont.toString()); + sq.addBindValue(useBackground); + sq.addBindValue(backgroundName); + sq.addBindValue(pixToByte(background)); + sq.addBindValue(songID); + sq.exec(); +} + +void Song::saveNew() +{ + // Add a new song + QSqlQuery sq; + sq.prepare("INSERT INTO Songs (songbook_id,number,title,category,tune,words,music,song_text,notes," + "use_private,alignment_v,alignment_h,color,font,info_color,info_font,ending_color," + "ending_font,use_background,background_name,background) " + "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + sq.addBindValue(songbook_id); + sq.addBindValue(number); + sq.addBindValue(title); + sq.addBindValue(category); + sq.addBindValue(tune); + sq.addBindValue(wordsBy); + sq.addBindValue(musicBy); + sq.addBindValue(songText); + sq.addBindValue(notes); + sq.addBindValue(usePrivateSettings); + sq.addBindValue(alignmentV); + sq.addBindValue(alignmentH); + sq.addBindValue((unsigned int)(color.rgb())); + sq.addBindValue(font.toString()); + sq.addBindValue((unsigned int)(infoColor.rgb())); + sq.addBindValue(infoFont.toString()); + sq.addBindValue((unsigned int)(endingColor.rgb())); + sq.addBindValue(endingFont.toString()); + sq.addBindValue(useBackground); + sq.addBindValue(backgroundName); + sq.addBindValue(pixToByte(background)); + sq.exec(); +} + +Song SongDatabase::getSong(int id) +{ + Song song(id); + song.readData(); + return song; +} + +QList SongDatabase::getSongs() +{ + QList songs; + + QSqlQuery sq; + QStringList sb_ids, sb_names; + + // get songbook names and ids + sq.exec("SELECT id, name FROM Songbooks"); + while (sq.next()) + { + sb_ids << sq.value(0).toString(); + sb_names << sq.value(1).toString(); + } + sq.clear(); + + // get songs + // 0 1 2 3 4 5 6 7 8 + // 9 10 11 12 13 14 15 16 17 + // 18 19 20 + sq.exec("SELECT id, songbook_id, number, title, category, tune, words, music, song_text, notes, " + "use_private, alignment_v, alignment_h, color, font, info_color, info_font, ending_color, ending_font, " + "use_background, background_name, background FROM Songs"); + while(sq.next()) + { + Song song; + song.songID = sq.value(0).toInt(); + song.songbook_id = sq.value(1).toString(); + song.number = sq.value(2).toInt(); + song.title = sq.value(3).toString(); + song.category = sq.value(4).toInt(); + song.tune = sq.value(5).toString(); + song.wordsBy = sq.value(6).toString(); + song.musicBy = sq.value(7).toString(); + song.songText = sq.value(8).toString(); + song.notes = sq.value(9).toString(); + song.usePrivateSettings = sq.value(10).toBool(); + if(!sq.value(11).isNull()) + song.alignmentV = sq.value(11).toInt(); + if(!sq.value(12).isNull()) + song.alignmentH = sq.value(12).toInt(); + if(!sq.value(13).isNull()) + song.color = QColor::fromRgb(sq.value(13).toUInt()); + if(!sq.value(14).isNull()) + song.font.fromString(sq.value(14).toString()); + if(!sq.value(15).isNull()) + song.infoColor = QColor::fromRgb(sq.value(15).toUInt()); + if(!sq.value(16).isNull()) + song.infoFont.fromString(sq.value(16).toString()); + if(!sq.value(17).isNull()) + song.endingColor = QColor::fromRgb(sq.value(17).toUInt()); + if(!sq.value(18).isNull()) + song.endingFont.fromString(sq.value(18).toString()); + song.useBackground = sq.value(19).toBool(); + song.backgroundName = sq.value(20).toString(); + song.background.loadFromData(sq.value(21).toByteArray()); + song.songbook_name = sb_names.at(sb_ids.indexOf(song.songbook_id)); + + songs.append(song); + } + return songs; +} + +bool Song::isValid() +{ + // Check if song is valid by song id + if(songID>0) + return true; + else + return false; +} + +int SongDatabase::lastUser(QString songbook_id) +{ + int last; + QList lastInt; + QSqlQuery sq; + sq.exec("SELECT number FROM Songs WHERE songbook_id = " +songbook_id); + while (sq.next()) + lastInt << sq.value(0).toInt(); + qSort(lastInt); + if (lastInt.isEmpty()) + last=1; + else + last = lastInt.takeLast() + 1; + return last; +} + +void SongDatabase::deleteSong(int song_id) +{ + QSqlQuery sq; + sq.exec("DELETE FROM Songs WHERE id = " + QString::number(song_id) ); +} + +QString SongDatabase::getSongbookIdStringFromName(QString songbook_name) +{ + QSqlQuery sq; + sq.exec("SELECT id FROM Songbooks WHERE name = '" + songbook_name +"'"); //ilya + sq.first(); + return sq.value(0).toString(); +} + +void SongDatabase::addSongbook(QString name, QString info) +{ + QSqlTableModel sqt; + sqt.setTable("Songbooks"); + sqt.insertRows(0,1); + sqt.setData(sqt.index(0,1),name.trimmed()); + sqt.setData(sqt.index(0,2),info); + sqt.setData(sqt.index(0,3),1); + sqt.submitAll(); +} diff --git a/song.h b/song.h new file mode 100644 index 0000000..dc0ff1a --- /dev/null +++ b/song.h @@ -0,0 +1,162 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef SONG_H +#define SONG_H +#include +#include + +QString clean(QString str); +bool isStanzaTitle(QString string); +bool isStanzaVerseTitle(QString string); +bool isStanzaAndVerseTitle(QString string); +bool isStanzaRefrainTitle(QString string); +bool isStanzaAndRefrainTitle(QString string); +bool isStanzaSlideTitle(QString string); + +class Stanza +{ + // Class to hold current verse text and song info to send to projection +public: + int number; + QString stanza; + QString stanzaTitle; + QString wordsBy; + QString musicBy; + QString tune; + bool isLast; + bool usePrivateSettings; + int alignmentV; + int alignmentH; + QColor color; + QFont font; + QColor infoColor; + QFont infoFont; + QColor endingColor; + QFont endingFont; + bool useBackground; + QString backgroundName; + QPixmap background; +}; + +class Song +{ + // Class for storing song information: number, name, songbook + // The instance of this class is specific to a song & songbook. +public: + //functions + Song(); + Song(int id); + Song(int id, int num, QString songbook_id, QString songbook_name); + void readData(); + void saveUpdate(); + void saveNew(); + QStringList getSongTextList(); + Stanza getStanza(int current); + QString getSongbookName(); + bool isValid(); + + //members + int songID; // Database ID of this song + QString songbook_id; + QString songbook_name; + int number; // Number of the song in the specified songbook + QString title; + int category; + QString tune; + QString wordsBy; + QString musicBy; + QString songText; + QString notes; + bool usePrivateSettings; + int alignmentV; + int alignmentH; + QColor color; + QFont font; + QColor infoColor; + QFont infoFont; + QColor endingColor; + QFont endingFont; + bool useBackground; + QString backgroundName; + QPixmap background; + +private: + void setDefaults(); + QString getStanzaBlock(int &i, QStringList &list); + void removeLastChorus(QStringList ct, QStringList &list); +}; + +class SongsModel : public QAbstractTableModel +{ + // Class for storing the data for the song table + Q_OBJECT + Q_DISABLE_COPY(SongsModel) +public: + SongsModel(); + void setSongs(QList songs); + void addSong(Song song); + Song getSong(int row); + Song getSong(QModelIndex index); + + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + + bool removeRows( int row, int count, const QModelIndex & parent = QModelIndex() ); + QList song_list; + void emitLayoutChanged(); + void emitLayoutAboutToBeChanged(); + void updateSongFromDatabase(int songid); + void updateSongFromDatabase(int newSongId, int oldSongId); + bool isInTable(int songid); +}; + +class SongProxyModel : public QSortFilterProxyModel +{ + Q_OBJECT + +public: + SongProxyModel(QObject *parent = 0); + void setFilterString(QString new_string, bool new_match_beginning, bool new_exact_match); + void setSongbookFilter(QString new_songbook); + void setCategoryFilter(int category); + bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; + +private: + QString filter_string, songbook_filter, category_filter; + bool match_beginning, exact_match; +}; + +class SongDatabase +{ +public: + SongDatabase(); + void addSongbook(QString name, QString info); + void saveUpdate(); + void saveNew(); + void deleteSong(int songId); + QString getSongbookIdStringFromName(QString songbook_name); + Song getSong(int id); + QList getSongs(); + int lastUser(QString songbook_id); +}; + +#endif // SONG_H diff --git a/songcounter.cpp b/songcounter.cpp new file mode 100644 index 0000000..3af00f1 --- /dev/null +++ b/songcounter.cpp @@ -0,0 +1,302 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "songcounter.h" +#include "ui_songcounter.h" + +SongCounter::SongCounter(QWidget *parent, QString loc) : + QDialog(parent), + ui(new Ui::SongCounter) +{ + ui->setupUi(this); + ui->closeButton->setFocus(); + + splocale = loc; + + song_count_list = getSongCounts(); + songCounterModel = new SongCounterModel; + loadCounts(); + + // Modify the column widths: + ui->countTable->setColumnWidth(0, 150);//songbook + ui->countTable->setColumnWidth(1, 65);//number + ui->countTable->setColumnWidth(2, 250);//title + ui->countTable->setColumnWidth(3, 60);////count + ui->countTable->setColumnWidth(4, 100);//date + // Decrease the row height: + ui->countTable->resizeRowsToContents(); +} + +SongCounter::~SongCounter() +{ + delete ui; +} + +void SongCounter::on_closeButton_clicked() +{ + close(); +} + +void SongCounter::on_resetButton_clicked() +{ + // Code to reset counters to 0 + QSqlQuery sq; + sq.exec("UPDATE Songs SET count = 0 , date = '' WHERE count > 0"); + + song_count_list = getSongCounts(); + loadCounts(); +} + + +void SongCounter::on_resetOneButton_clicked() +{ + // reset curently selected to 0 + int row = songCounterProxyModel->mapToSource(ui->countTable->currentIndex()).row(); + + if(row>=0) + { + Counter count_to_remove = songCounterModel->getSongCount(row); + + QSqlQuery sq; + sq.exec("UPDATE Songs SET count = 0, date = '' WHERE id = " + count_to_remove.id); + song_count_list = getSongCounts(); + loadCounts(); + } +} + +void SongCounter::loadCounts() +{ + songCounterProxyModel = new QSortFilterProxyModel; + songCounterProxyModel->setSourceModel(songCounterModel); + songCounterModel->setCounter(song_count_list); + ui->countTable->setModel(songCounterProxyModel); +} + +void SongCounter::addSongCount(Song song) +{ + int id = song.songID; + int current_count(0); + + // get current song count + QSqlQuery sq; + sq.exec("SELECT count FROM Songs WHERE id = '" + QString::number(id) + "' "); + sq.first(); + current_count = sq.value(0).toInt(); + sq.clear(); + + // add one count to song + ++current_count; + + // set todays date + QDate d(QDate::currentDate()); + + sq.exec(QString("UPDATE Songs SET count = %1 , date = '%2' WHERE id = %3").arg(QString::number(current_count)).arg(d.toString("MM:dd:yyyy")).arg(QString::number(id))); + // sq.exec("UPDATE Songs SET count = " + QString::number(current_count) + " WHERE id = " + QString::number(id)); +} + +//*********************************** +//*********************************** + +QList SongCounter::getSongCounts() +{ + QList song_counts; + Counter song_count; + QSqlQuery sq, sq1; + + // Get counts + // 0 1 2 3 4 5 + sq.exec("SELECT id, songbook_id, number, title, count, date FROM Songs WHERE count > 0"); + while (sq.next()) + { + song_count.id = sq.value(0).toString(); + QString sbid = sq.value(1).toString(); + song_count.number = sq.value(2).toInt(); + song_count.title = sq.value(3).toString(); + song_count.count = sq.value(4).toInt(); + song_count.date = sq.value(5).toString(); + updateMonth(song_count.date); + + // get songbook name + sq1.exec("SELECT name FROM Songbooks WHERE id = " + sbid); + sq1.first(); + song_count.songbook = sq1.value(0).toString(); + song_counts.append(song_count); + } + return song_counts; +} + +void SongCounter::updateMonth(QString &date) +{ + // need to use this function because Qt does not provide locale translations for all languages. + QStringList dl = date.split(":"); + + if(splocale == "en" || splocale.isEmpty()) + { + // If current translation is English, use standard English date format + if(dl.at(0)=="01") + date = QString("%1 %2, %3").arg(tr("January")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="02") + date = QString("%1 %2, %3").arg(tr("February")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="03") + date = QString("%1 %2, %3").arg(tr("March")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="04") + date = QString("%1 %2, %3").arg(tr("April")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="05") + date = QString("%1 %2, %3").arg(tr("May")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="06") + date = QString("%1 %2, %3").arg(tr("June")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="07") + date = QString("%1 %2, %3").arg(tr("July")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="08") + date = QString("%1 %2, %3").arg(tr("August")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="09") + date = QString("%1 %2, %3").arg(tr("September")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="10") + date = QString("%1 %2, %3").arg(tr("October")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="11") + date = QString("%1 %2, %3").arg(tr("November")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="12") + date = QString("%1 %2, %3").arg(tr("December")).arg(dl.at(1)).arg(dl.at(2)); + } + else + { + // If current translation is NOT English, then use standart Europe date format + if(dl.at(0)=="01") + date = QString("%2 %1 %3").arg(tr("January")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="02") + date = QString("%2 %1 %3").arg(tr("February")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="03") + date = QString("%2 %1 %3").arg(tr("March")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="04") + date = QString("%2 %1 %3").arg(tr("April")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="05") + date = QString("%2 %1 %3").arg(tr("May")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="06") + date = QString("%2 %1 %3").arg(tr("June")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="07") + date = QString("%2 %1 %3").arg(tr("July")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="08") + date = QString("%2 %1 %3").arg(tr("August")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="09") + date = QString("%2 %1 %3").arg(tr("September")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="10") + date = QString("%2 %1 %3").arg(tr("October")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="11") + date = QString("%2 %1 %3").arg(tr("November")).arg(dl.at(1)).arg(dl.at(2)); + else if(dl.at(0)=="12") + date = QString("%2 %1 %3").arg(tr("December")).arg(dl.at(1)).arg(dl.at(2)); + } + +} + +//*************************************** +//**** Song Use Counter Model **** +//*************************************** +Counter::Counter() +{ +} + +SongCounterModel::SongCounterModel() +{ +} + +void SongCounterModel::setCounter(QList song_counts) +{ + emit layoutAboutToBeChanged(); + song_count_list.clear(); + for (int i(0); i < song_counts.size(); i++) + { + Counter song_count = song_counts.at(i); + song_count_list.append(song_count); + } + emit layoutChanged(); +} + +void SongCounterModel::addCounter(Counter song_count) +{ + beginInsertRows(QModelIndex(), rowCount(), rowCount()); + song_count_list.append(song_count); + endInsertRows(); +} + +Counter SongCounterModel::getSongCount(int row) +{ + return song_count_list.at(row); +} + +int SongCounterModel::rowCount(const QModelIndex &parent) const +{ + return song_count_list.count(); +} + +int SongCounterModel::columnCount(const QModelIndex &parent) const +{ + return 5; +} + +QVariant SongCounterModel::data(const QModelIndex &index, int role) const +{ + if( index.isValid() && role == Qt::DisplayRole ) + { + Counter song_count = song_count_list.at(index.row()); + if( index.column() == 0 ) + return QVariant(song_count.songbook); + else if(index.column() == 1 ) + return QVariant(song_count.number); + else if(index.column() == 2) + return QVariant(song_count.title); + else if(index.column() == 3) + return QVariant(song_count.count); + else if(index.column() == 4) + return QVariant(song_count.date); + } + return QVariant(); +} + +QVariant SongCounterModel::headerData(int section, + Qt::Orientation orientation, + int role) const +{ + if (role == Qt::DisplayRole && orientation == Qt::Horizontal ) + { + switch(section) { + case 0: + return QVariant(tr("Songbook")); + case 1: + return QVariant(tr("Number")); + case 2: + return QVariant(tr("Title")); + case 3: + return QVariant(tr("Count")); + case 4: + return QVariant(tr("Date")); + } + } + return QVariant(); +} + +bool SongCounterModel::removeRows(int row, int count, const QModelIndex &parent) +{ + beginRemoveRows(parent, row, row+count-1); + // Need to remove starting from the end: + for(int i=row+count-1; i>=row; i--) + song_count_list.removeAt(i); + endRemoveRows(); + return true; +} diff --git a/songcounter.h b/songcounter.h new file mode 100644 index 0000000..a0433a6 --- /dev/null +++ b/songcounter.h @@ -0,0 +1,91 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef SONGCOUNTER_H +#define SONGCOUNTER_H + +#include +#include +#include "song.h" + +namespace Ui { +class SongCounter; +} + +class Counter +{ +public: + Counter(); + QString id; + QString title; + QString songbook; + int count; + QString date; + int number; +}; + +class SongCounterModel : public QAbstractTableModel +{ + // Class for storing data for Song Use Counter Table + Q_OBJECT + Q_DISABLE_COPY(SongCounterModel) + +public: + SongCounterModel(); + QList song_count_list; + + void setCounter(QList song_counts); + void addCounter(Counter song_count); + Counter getSongCount(int row); + + int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()); + +}; + +class SongCounter : public QDialog +{ + Q_OBJECT +public: + explicit SongCounter(QWidget *parent = 0,QString loc = "en"); + ~SongCounter(); + +private: + QString splocale; + QList song_count_list; + SongCounterModel *songCounterModel; + QSortFilterProxyModel *songCounterProxyModel; + Ui::SongCounter *ui; + +public slots: + void addSongCount(Song song); + +private slots: + void updateMonth(QString& date); + void loadCounts(); + void on_resetOneButton_clicked(); + void on_resetButton_clicked(); + void on_closeButton_clicked(); + QList getSongCounts(); +}; + +#endif // SONGCOUNTER_H diff --git a/songcounter.ui b/songcounter.ui new file mode 100644 index 0000000..2bdbcbb --- /dev/null +++ b/songcounter.ui @@ -0,0 +1,87 @@ + + + SongCounter + + + + 0 + 0 + 676 + 300 + + + + Song Counter + + + + :/icons/icons/song_count.png:/icons/icons/song_count.png + + + + + + QAbstractItemView::SelectRows + + + true + + + false + + + true + + + false + + + 20 + + + + + + + + + Reset Selected + + + + + + + Reset All + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Close + + + + + + + + + + + + diff --git a/songsettingwidget.cpp b/songsettingwidget.cpp new file mode 100644 index 0000000..4840728 --- /dev/null +++ b/songsettingwidget.cpp @@ -0,0 +1,417 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "songsettingwidget.h" +#include "ui_songsettingwidget.h" + +SongSettingWidget::SongSettingWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::SongSettingWidget) +{ + ui->setupUi(this); +} + +void SongSettingWidget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch ( e->type() ) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +SongSettingWidget::~SongSettingWidget() +{ + delete ui; +} + +void SongSettingWidget::setSettings(SongSettings &settings, SongSettings &settings2) +{ + mySettings = settings; + mySettings2 = settings2; + loadSettings(); +} + +void SongSettingWidget::getSettings(SongSettings &settings, SongSettings &settings2) +{ + // Effects + mySettings.useShadow = ui->checkBoxUseShadow->isChecked(); + mySettings.useFading = ui->checkBoxUseFading->isChecked(); + mySettings.useBlurShadow = ui->checkBoxUseBlurredShadow->isChecked(); + + mySettings2.useShadow = ui->checkBoxUseShadow2->isChecked(); + mySettings2.useFading = ui->checkBoxUseFading2->isChecked(); + mySettings2.useBlurShadow = ui->checkBoxUseBlurredShadow2->isChecked(); + + // Save Song info + mySettings.showStanzaTitle = ui->checkBoxStanzaTitle->isChecked(); + mySettings.showSongKey = ui->checkBoxSongKey->isChecked(); + mySettings.showSongNumber = ui->checkBoxSongNumber->isChecked(); + mySettings.infoAling = ui->comboBoxInfoAlign->currentIndex(); + + mySettings2.showStanzaTitle = ui->checkBoxStanzaTitle2->isChecked(); + mySettings2.showSongKey = ui->checkBoxSongKey2->isChecked(); + mySettings2.showSongNumber = ui->checkBoxSongNumber2->isChecked(); + mySettings2.infoAling = ui->comboBoxInfoAlign2->currentIndex(); + + // Save song ending + mySettings.showSongEnding = ui->groupBoxSongEnding->isChecked(); + mySettings.endingType = ui->comboBoxEndingType->currentIndex(); + mySettings.endingPosition = ui->comboBoxEndingPosition->currentIndex(); + + mySettings2.showSongEnding = ui->groupBoxSongEnding2->isChecked(); + mySettings2.endingType = ui->comboBoxEndingType2->currentIndex(); + mySettings2.endingPosition = ui->comboBoxEndingPosition2->currentIndex(); + + // Save song background + mySettings.useBackground = ui->groupBoxSongBackground->isChecked(); + mySettings.backgroundName = ui->lineEditSongBackground->text(); + + mySettings2.useBackground = ui->groupBoxSongBackground2->isChecked(); + mySettings2.backgroundName = ui->lineEditSongBackground2->text(); + + // Save alingment + mySettings.textAlingmentV = ui->comboBoxVerticalAling->currentIndex(); + mySettings.textAlingmentH = ui->comboBoxHorizontalAling->currentIndex(); + + mySettings2.textAlingmentV = ui->comboBoxVerticalAling2->currentIndex(); + mySettings2.textAlingmentH = ui->comboBoxHorizontalAling2->currentIndex(); + + // Screen use + mySettings.screenUse = ui->spinBoxScreenUse->value(); + mySettings.screenPosition = ui->comboBoxScreenUse->currentIndex(); + + mySettings2.screenUse = ui->spinBoxScreenUse2->value(); + mySettings2.screenPosition = ui->comboBoxScreenUse2->currentIndex(); + + // Use secondary display screen settings + mySettings2.useDisp2settings = ui->groupBoxDisplay2->isChecked(); + + settings = mySettings; + settings2 = mySettings2; +} + +void SongSettingWidget::loadSettings() +{ + QPalette p; + // Set Effects + ui->checkBoxUseShadow->setChecked(mySettings.useShadow); + ui->checkBoxUseFading->setChecked(mySettings.useFading); + ui->checkBoxUseBlurredShadow->setChecked(mySettings.useBlurShadow); + + ui->checkBoxUseShadow2->setChecked(mySettings2.useShadow); + ui->checkBoxUseFading2->setChecked(mySettings2.useFading); + ui->checkBoxUseBlurredShadow2->setChecked(mySettings2.useBlurShadow); + + // Set Song Information + ui->checkBoxStanzaTitle->setChecked(mySettings.showStanzaTitle); + ui->checkBoxSongKey->setChecked(mySettings.showSongKey); + ui->checkBoxSongNumber->setChecked(mySettings.showSongNumber); + p.setColor(QPalette::Base,mySettings.infoColor); + ui->graphicViewInfoColor->setPalette(p); + ui->labelInfoFont->setText(getFontText(mySettings.infoFont)); + ui->comboBoxInfoAlign->setCurrentIndex(mySettings.infoAling); + + ui->checkBoxStanzaTitle2->setChecked(mySettings2.showStanzaTitle); + ui->checkBoxSongKey2->setChecked(mySettings2.showSongKey); + ui->checkBoxSongNumber2->setChecked(mySettings2.showSongNumber); + p.setColor(QPalette::Base,mySettings2.infoColor); + ui->graphicViewInfoColor2->setPalette(p); + ui->labelInfoFont2->setText(getFontText(mySettings2.infoFont)); + ui->comboBoxInfoAlign2->setCurrentIndex(mySettings2.infoAling); + + // Set Song Ending + ui->groupBoxSongEnding->setChecked(mySettings.showSongEnding); + p.setColor(QPalette::Base,mySettings.endingColor); + ui->graphicViewEndingColor->setPalette(p); + ui->labelEndingFont->setText(getFontText(mySettings.endingFont)); + ui->comboBoxEndingType->setCurrentIndex(mySettings.endingType); + ui->comboBoxEndingPosition->setCurrentIndex(mySettings.endingPosition); + + ui->groupBoxSongEnding2->setChecked(mySettings2.showSongEnding); + p.setColor(QPalette::Base,mySettings2.endingColor); + ui->graphicViewEndingColor2->setPalette(p); + ui->labelEndingFont2->setText(getFontText(mySettings2.endingFont)); + ui->comboBoxEndingType2->setCurrentIndex(mySettings2.endingType); + ui->comboBoxEndingPosition2->setCurrentIndex(mySettings2.endingPosition); + + // Set Song Background + ui->groupBoxSongBackground->setChecked(mySettings.useBackground); + ui->lineEditSongBackground->setText(mySettings.backgroundName); + + ui->groupBoxSongBackground2->setChecked(mySettings2.useBackground); + ui->lineEditSongBackground2->setText(mySettings2.backgroundName); + + // Set Text Properties + p.setColor(QPalette::Base,mySettings.textColor); + ui->graphicViewTextColor->setPalette(p); + ui->labelFont->setText(getFontText(mySettings.textFont)); + ui->comboBoxVerticalAling->setCurrentIndex(mySettings.textAlingmentV); + ui->comboBoxHorizontalAling->setCurrentIndex(mySettings.textAlingmentH); + + p.setColor(QPalette::Base,mySettings2.textColor); + ui->graphicViewTextColor2->setPalette(p); + ui->labelFont2->setText(getFontText(mySettings2.textFont)); + ui->comboBoxVerticalAling2->setCurrentIndex(mySettings2.textAlingmentV); + ui->comboBoxHorizontalAling2->setCurrentIndex(mySettings2.textAlingmentH); + + // Set Screen Use + ui->spinBoxScreenUse->setValue(mySettings.screenUse); + ui->comboBoxScreenUse->setCurrentIndex(mySettings.screenPosition); + + ui->spinBoxScreenUse2->setValue(mySettings2.screenUse); + ui->comboBoxScreenUse2->setCurrentIndex(mySettings2.screenPosition); + + // Set secondary screen + ui->groupBoxDisplay2->setChecked(mySettings2.useDisp2settings); + on_groupBoxDisplay2_toggled(mySettings2.useDisp2settings); +} + +void SongSettingWidget::setDispScreen2Visible(bool visible) +{ + ui->groupBoxDisplay2->setVisible(visible); +} + +void SongSettingWidget::on_checkBoxUseShadow_stateChanged(int arg1) +{ + if(arg1==2) + ui->checkBoxUseBlurredShadow->setEnabled(true); + else + { + ui->checkBoxUseBlurredShadow->setChecked(false); + ui->checkBoxUseBlurredShadow->setEnabled(false); + } +} + +void SongSettingWidget::on_checkBoxUseShadow2_stateChanged(int arg1) +{ + if(arg1==2) + ui->checkBoxUseBlurredShadow2->setEnabled(true); + else + { + ui->checkBoxUseBlurredShadow2->setChecked(false); + ui->checkBoxUseBlurredShadow2->setEnabled(false); + } +} +void SongSettingWidget::on_toolButtonInfoColor_clicked() +{ + QColor c(QColorDialog::getColor(mySettings.infoColor,this)); + if(c.isValid()) + mySettings.infoColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings.infoColor); + ui->graphicViewInfoColor->setPalette(p); +} + +void SongSettingWidget::on_toolButtonInfoColor2_clicked() +{ + QColor c(QColorDialog::getColor(mySettings2.infoColor,this)); + if(c.isValid()) + mySettings2.infoColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings2.infoColor); + ui->graphicViewInfoColor2->setPalette(p); +} + +void SongSettingWidget::on_toolButtonInfoFont_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings.infoFont,this); + if(ok) + mySettings.infoFont = font; + + ui->labelInfoFont->setText(getFontText(mySettings.infoFont)); +} + +void SongSettingWidget::on_toolButtonInfoFont2_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings2.infoFont,this); + if(ok) + mySettings2.infoFont = font; + + ui->labelInfoFont2->setText(getFontText(mySettings2.infoFont)); +} + +void SongSettingWidget::on_toolButtonEndingColor_clicked() +{ + QColor c(QColorDialog::getColor(mySettings.endingColor,this)); + if(c.isValid()) + mySettings.endingColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings.endingColor); + ui->graphicViewEndingColor->setPalette(p); +} + +void SongSettingWidget::on_toolButtonEndingColor2_clicked() +{ + QColor c(QColorDialog::getColor(mySettings2.endingColor,this)); + if(c.isValid()) + mySettings2.endingColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings2.endingColor); + ui->graphicViewEndingColor2->setPalette(p); +} + +void SongSettingWidget::on_toolButtonEndingFont_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings.endingFont,this); + if(ok) + mySettings.endingFont = font; + + ui->labelEndingFont->setText(getFontText(mySettings.endingFont)); +} + +void SongSettingWidget::on_toolButtonEndingFont2_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings2.endingFont,this); + if(ok) + mySettings2.endingFont = font; + + ui->labelEndingFont2->setText(getFontText(mySettings2.endingFont)); +} + +void SongSettingWidget::on_buttonSongBackground_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for song wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + if(p.width()>1280 || p.height()>1280) + mySettings.backgroundPix = p.scaled(1280,1280,Qt::KeepAspectRatio); + else + mySettings.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings.backgroundName = filename; + ui->lineEditSongBackground->setText(filename); + } +} + +void SongSettingWidget::on_buttonSongBackground2_clicked() +{ + QString filename = QFileDialog::getOpenFileName(this, tr("Select a image for song wallpaper"), + ".", tr("Images(%1)").arg(getSupportedImageFormats())); + if(!filename.isNull()) + { + QPixmap p(filename); + if(p.width()>1280 || p.height()>1280) + mySettings2.backgroundPix = p.scaled(1280,1280,Qt::KeepAspectRatio); + else + mySettings2.backgroundPix = p; + QFileInfo fi(filename); + filename = fi.fileName(); + mySettings2.backgroundName = filename; + ui->lineEditSongBackground2->setText(filename); + } +} + +void SongSettingWidget::on_toolButtonColor_clicked() +{ + QColor c(QColorDialog::getColor(mySettings.textColor,this)); + if(c.isValid()) + mySettings.textColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings.textColor); + ui->graphicViewTextColor->setPalette(p); +} + +void SongSettingWidget::on_toolButtonColor2_clicked() +{ + QColor c(QColorDialog::getColor(mySettings2.textColor,this)); + if(c.isValid()) + mySettings2.textColor = c; + QPalette p; + p.setColor(QPalette::Base,mySettings2.textColor); + ui->graphicViewTextColor2->setPalette(p); +} + +void SongSettingWidget::on_toolButtonFont_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings.textFont,this); + if(ok) + mySettings.textFont = font; + + ui->labelFont->setText(getFontText(mySettings.textFont)); +} + +void SongSettingWidget::on_toolButtonFont2_clicked() +{ + bool ok; + QFont font = QFontDialog::getFont(&ok,mySettings2.textFont,this); + if(ok) + mySettings2.textFont = font; + + ui->labelFont2->setText(getFontText(mySettings2.textFont)); +} + +void SongSettingWidget::on_groupBoxDisplay2_toggled(bool arg1) +{ + ui->groupBoxEffects2->setVisible(arg1); + ui->groupBoxSongBackground2->setVisible(arg1); + ui->groupBoxSongEnding2->setVisible(arg1); + ui->groupBoxSongInfo2->setVisible(arg1); + ui->groupBoxTextProperties2->setVisible(arg1); + ui->groupBoxScreenUse2->setVisible(arg1); +} + +void SongSettingWidget::on_pushButtonDefault_clicked() +{ + SongSettings s; + mySettings = s; + mySettings2 = s; + loadSettings(); +} + +QString SongSettingWidget::getFontText(QFont font) +{ + QString st(QString("%1: %2").arg(font.rawName()).arg(font.pointSize())); + if(font.bold()) + st += ", " + tr("Bold"); + if(font.italic()) + st += ", " + tr("Italic"); + if(font.strikeOut()) + st += ", " + tr("StrikeOut"); + if(font.underline()) + st += ", " + tr("Underline"); + + return st; +} + +void SongSettingWidget::on_pushButtonApplyToAll_clicked() +{ + emit applyBackToAll(2,mySettings.backgroundName,mySettings.backgroundPix); +} + +void SongSettingWidget::setBackgroungds(QString name, QPixmap back) +{ + mySettings.backgroundName = name; + mySettings.backgroundPix = back; + mySettings2.backgroundName = name; + mySettings2.backgroundPix = back; + ui->lineEditSongBackground->setText(name); + ui->lineEditSongBackground2->setText(name); +} diff --git a/songsettingwidget.h b/songsettingwidget.h new file mode 100644 index 0000000..961743a --- /dev/null +++ b/songsettingwidget.h @@ -0,0 +1,79 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef SONGSETTINGWIDGET_H +#define SONGSETTINGWIDGET_H + +//#include +#include +#include "theme.h" + +namespace Ui { +class SongSettingWidget; +} + +class SongSettingWidget : public QWidget +{ + Q_OBJECT +public: + explicit SongSettingWidget(QWidget *parent = 0); + ~SongSettingWidget(); + +public slots: + void getSettings(SongSettings &settings, SongSettings &settings2); + void setSettings(SongSettings &settings, SongSettings &settings2); + void setDispScreen2Visible(bool visible); + void setBackgroungds(QString name, QPixmap back); + +signals: + void applyBackToAll(int t, QString backName, QPixmap background); + +private slots: + void loadSettings(); + void on_checkBoxUseShadow_stateChanged(int arg1); + void on_checkBoxUseShadow2_stateChanged(int arg1); + void on_toolButtonInfoColor_clicked(); + void on_toolButtonInfoColor2_clicked(); + void on_toolButtonInfoFont_clicked(); + void on_toolButtonInfoFont2_clicked(); + void on_toolButtonEndingColor_clicked(); + void on_toolButtonEndingColor2_clicked(); + void on_toolButtonEndingFont_clicked(); + void on_toolButtonEndingFont2_clicked(); + void on_buttonSongBackground_clicked(); + void on_buttonSongBackground2_clicked(); + void on_toolButtonColor_clicked(); + void on_toolButtonColor2_clicked(); + void on_toolButtonFont_clicked(); + void on_toolButtonFont2_clicked(); + void on_groupBoxDisplay2_toggled(bool arg1); + void on_pushButtonDefault_clicked(); + QString getFontText(QFont font); + void on_pushButtonApplyToAll_clicked(); + +private: + SongSettings mySettings; + SongSettings mySettings2; + + Ui::SongSettingWidget *ui; +protected: + virtual void changeEvent(QEvent *e); +}; + +#endif // SONGSETTINGWIDGET_H diff --git a/songsettingwidget.ui b/songsettingwidget.ui new file mode 100644 index 0000000..d6ccaed --- /dev/null +++ b/songsettingwidget.ui @@ -0,0 +1,1592 @@ + + + SongSettingWidget + + + + 0 + 0 + 417 + 1009 + + + + + + + Effects + + + + + + 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 + + + + + + + + + + Song Information + + + + + + + + Show Stanza Title + + + + + + + Show Song Key + + + + + + + Show Song Number + + + + + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 19 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + + + + + + + + + + + Alignment: + + + + + + + + Above Text + + + + + Below Text + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + Show Song Ending + + + true + + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 19 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + + + + + + + + + + + Type: + + + + + + + + 0 + 0 + + + + + * * * + + + + + - - - + + + + + ° ° ° + + + + + • • • + + + + + ● ● ● + + + + + ▪ ▪ ▪ + + + + + ■ ■ ■ + + + + + Song Copyright Info + + + + + + + + Position: + + + + + + + + Below Song Text + + + + + Bottom of Screen + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + Use Background Image + + + true + + + + + + true + + + + + + + Browse... + + + + + + + Apply this background to all active backgrounds. + + + + :/icons/icons/apply_to_all.png:/icons/icons/apply_to_all.png + + + + + + + + + + Song Text Properties + + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 19 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + 0 + 0 + + + + true + + + + + + + + + + + Alingment: + + + + + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 59 + 20 + + + + + + + + + + + + + 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 + + + + 97 + 20 + + + + + + + + + + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + 170 + 85 + 255 + + + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + 85 + 0 + 127 + + + + + + + 170 + 85 + 255 + + + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 120 + 120 + 120 + + + + + + + 51 + 153 + 255 + + + + + + + + Use Separate Secondary Display Screen Settings + + + true + + + true + + + + 0 + + + 0 + + + 0 + + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Effects + + + + + + 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 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Song Information + + + + + + + + Show Stanza Title + + + + + + + Show Song Key + + + + + + + Show Song Number + + + + + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 19 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + + + + + + + + + + + Alignment: + + + + + + + + Above Text + + + + + Below Text + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Show Song Ending + + + true + + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 19 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + + + + + + + + + + + Type: + + + + + + + + 0 + 0 + + + + + * * * + + + + + - - - + + + + + ° ° ° + + + + + • • • + + + + + ● ● ● + + + + + ▪ ▪ ▪ + + + + + ■ ■ ■ + + + + + Song Copyright Info + + + + + + + + Position: + + + + + + + + Below Song Text + + + + + Bottom of Screen + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Use Background Image + + + true + + + + + + true + + + + + + + Browse... + + + + + + + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 120 + 120 + 120 + + + + + + + + Song Text Properties + + + + + + + + Color... + + + + + + + + 0 + 0 + + + + + 50 + 20 + + + + + 50 + 19 + + + + + + + + Qt::Vertical + + + + + + + Font... + + + + + + + + 0 + 0 + + + + true + + + + + + + + + + + Alignment: + + + + + + + + Top + + + + + Middle + + + + + Bottom + + + + + + + + + Left + + + + + Center + + + + + Right + + + + + + + + Qt::Horizontal + + + + 59 + 20 + + + + + + + + + + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 85 + 0 + 127 + + + + + + + + + 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 + 20 + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 6 + + + + + + + + + + Reset All To Default + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + checkBoxUseFading + checkBoxUseShadow + checkBoxUseBlurredShadow + checkBoxStanzaTitle + checkBoxSongKey + checkBoxSongNumber + toolButtonInfoColor + graphicViewInfoColor + toolButtonInfoFont + comboBoxInfoAlign + groupBoxSongEnding + toolButtonEndingColor + graphicViewEndingColor + toolButtonEndingFont + comboBoxEndingType + comboBoxEndingPosition + groupBoxSongBackground + buttonSongBackground + lineEditSongBackground + toolButtonColor + graphicViewTextColor + toolButtonFont + comboBoxVerticalAling + comboBoxHorizontalAling + spinBoxScreenUse + comboBoxScreenUse + groupBoxDisplay2 + checkBoxUseFading2 + checkBoxUseShadow2 + checkBoxUseBlurredShadow2 + checkBoxStanzaTitle2 + checkBoxSongKey2 + checkBoxSongNumber2 + toolButtonInfoColor2 + graphicViewInfoColor2 + toolButtonInfoFont2 + comboBoxInfoAlign2 + groupBoxSongEnding2 + toolButtonEndingColor2 + graphicViewEndingColor2 + toolButtonEndingFont2 + comboBoxEndingType2 + comboBoxEndingPosition2 + groupBoxSongBackground2 + buttonSongBackground2 + lineEditSongBackground2 + toolButtonColor2 + graphicViewTextColor2 + toolButtonFont2 + comboBoxVerticalAling2 + comboBoxHorizontalAling2 + spinBoxScreenUse2 + comboBoxScreenUse2 + pushButtonDefault + + + + + + diff --git a/songwidget.cpp b/songwidget.cpp new file mode 100644 index 0000000..99b80ff --- /dev/null +++ b/songwidget.cpp @@ -0,0 +1,620 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include +#include "songwidget.h" +#include "ui_songwidget.h" + +SongWidget::SongWidget(QWidget *parent) : + QWidget(parent), + ui(new Ui::SongWidget) +{ + ui->setupUi(this); + + songs_model = new SongsModel; + proxy_model = new SongProxyModel(this); + proxy_model->setSourceModel(songs_model); + proxy_model->setDynamicSortFilter(true); + ui->songs_view->setModel(proxy_model); + connect(ui->songs_view->selectionModel(), SIGNAL(currentRowChanged(const QModelIndex&, const QModelIndex&)), + this, SLOT(songsViewRowChanged(const QModelIndex&, const QModelIndex&))); + + // Decrease the row height: + ui->songs_view->resizeRowsToContents(); + + // Modify the column widths: + ui->songs_view->setColumnWidth(0, 0);//Category + ui->songs_view->setColumnWidth(1, 40);//Song Number + ui->songs_view->setColumnWidth(2, 150);//Song Title + ui->songs_view->setColumnWidth(3, 80);//Songbook + ui->songs_view->setColumnWidth(4, 50);//Tune + + proxy_model->setSongbookFilter("ALL"); + proxy_model->setCategoryFilter(-1); + loadSongbooks(); + loadCategories(false); + + isSpinboxEditing = false; + + // set highligher + highlight = new HighlighterDelegate(ui->listPreview); + ui->listWidgetDummy->setVisible(false); +} + +SongWidget::~SongWidget() +{ + delete ui; + delete songs_model; +} + +void SongWidget::songsViewRowChanged(const QModelIndex ¤t, const QModelIndex &previous) +{ + if( current.isValid() ) + { + // Called when a new song is selected in the songs table + int row = proxy_model->mapToSource(current).row(); + Song song = songs_model->getSong(row); + sendToPreview(song); + isSongFromSchelude = false; + } + updateButtonStates(); +} + +void SongWidget::updateButtonStates() +{ + bool enable_live; + + // focus in songs table + if( proxy_model->rowCount() == 0 ) + enable_live = false; + else + enable_live = ui->songs_view->currentIndex().isValid(); + + ui->btnLive->setEnabled(enable_live); +} + +void SongWidget::changeEvent(QEvent *e) +{ + QWidget::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + ui->retranslateUi(this); + break; + default: + break; + } +} + +void SongWidget::loadSongbooks() +{ + QSqlQuery sq; + QStringList sbor; + sq.exec("SELECT id, name FROM Songbooks"); + while (sq.next()) + { + songbookList << sq.value(0).toString(); + sbor << sq.value(1).toString(); + } + ui->songbook_menu->addItem(tr("All songbooks")); + ui->songbook_menu->addItems(sbor); + allSongs = song_database.getSongs(); + songs_model->setSongs(allSongs); + + // Hide song search items + ui->comboBoxSearchType->setVisible(false); + if(ui->pushButtonClearResults->isVisible()) + ui->listPreview->setItemDelegate(ui->listWidgetDummy->itemDelegate()); + ui->pushButtonClearResults->setVisible(false); + ui->labelSearchType->setText(tr("Filter Type:")); + ui->labelFilter->setText(tr("Filter:")); + + // update the song spin box and redraw the table: + on_songbook_menu_currentIndexChanged( ui->songbook_menu->currentIndex() ); +} + +Song SongWidget::currentSong() +{ + // Returns the selected song + QModelIndex current_index; + int current_row; + current_index = proxy_model->mapToSource(ui->songs_view->currentIndex()); + current_row = current_index.row(); + + Song return_song; + if(current_row>=0) + return_song = songs_model->getSong(current_row); + return return_song; +} + +void SongWidget::selectMatchingSong(QString text) +{ + bool startonly = (ui->comboBoxFilterType->currentIndex() == 1); + // Look for a song matching . Select it and scroll to show it. + for (int i = 0; i < songs_model->song_list.size(); i++) + { + QString s = songs_model->song_list.at(i).title; + bool matches; + if( startonly ) + matches = s.startsWith(text); + else + matches = s.contains(text); + + if( matches ) + { + // Select the row : + ui->songs_view->selectRow(i); + // Scroll the songs table to the row : + ui->songs_view->scrollTo( songs_model->index(i, 0) ); + return; + } + } +} + +void SongWidget::sendToPreview(Song song) +{ + QStringList song_list = song.getSongTextList(); + ui->listPreview->clear(); + ui->listPreview->addItems(song_list); + ui->listPreview->setCurrentRow(0); + ui->preview_label->setText(song.title); + if(song.notes.isEmpty()) + ui->label_notes->setVisible(false); + else + { + ui->label_notes->setText(QString("%1\n%2").arg(tr("Notes:","Notes to songs")).arg(song.notes)); + ui->label_notes->setVisible(true); + } + preview_song = song; +} + +void SongWidget::sendToPreviewFromSchedule(Song &song) +{ + ui->songs_view->clearSelection(); + isSongFromSchelude = true; + sendToPreview(song); +} + +void SongWidget::sendToProjector(Song song, int row) +{ + // Display the specified song text in the right-most column of softProjector: + emit sendSong(song, row); + + // Add a count to a song + counter.addSongCount(song); +} + +void SongWidget::on_songbook_menu_currentIndexChanged(int index) +{ + // Called when a different songbook is selected from the pull-down menu + + songs_model->emitLayoutAboutToBeChanged(); //prepeare to chage layout + if( index == 0 ) + { + proxy_model->setSongbookFilter("ALL"); + ui->song_num_spinbox->setEnabled(false); + } + else + { + QString songbook_name = ui->songbook_menu->currentText(); + proxy_model->setSongbookFilter(songbook_name); + ui->song_num_spinbox->setEnabled(true); + } + + updateButtonStates(); + + songs_model->emitLayoutChanged(); // forces the view to redraw +} + +void SongWidget::on_song_num_spinbox_valueChanged(int value) +{ + // checks if spinbox just got into eding mode, it yes, then it reset searchbox and sorts song table view + if (!isSpinboxEditing) + { + isSpinboxEditing = true; + ui->lineEditSearch->clear(); + on_lineEditSearch_textEdited(""); + ui->songs_view->sortByColumn(0,Qt::AscendingOrder); + } + + //int max_num = 0; + // Look for a song with number . Select it and scroll to show it. + for (int i = 0; i < songs_model->song_list.size(); i++) + { + Song s = songs_model->song_list.at(i); + if( s.number == value && s.songbook_name == ui->songbook_menu->currentText() ) + { + // Found a song with this song number + QModelIndex source_index = songs_model->index(i, 0); + if( proxy_model->filterAcceptsRow(source_index.row(), source_index) ) + { + // If this row is visible + QModelIndex proxy_index = proxy_model->mapFromSource(source_index); + + // Select the row : + ui->songs_view->selectRow(proxy_index.row()); + // Scroll the songs table to the row : + ui->songs_view->scrollTo(proxy_index); + } + else + { + // This song is filtered out using text filter, so can't select + // it in the table. Just show it: + sendToPreview(s); + isSongFromSchelude = false; + } + return; + } + } + + QMessageBox mb(this); + mb.setText(tr("Could not find song with number ") + QString::number(value) ); + mb.setWindowTitle(tr("No such song")); + mb.setIcon(QMessageBox::Warning); + mb.exec(); +} + +void SongWidget::on_song_num_spinbox_editingFinished() +{ + // Called when the user presses enter after editing the song number + // At this point, the song is already selected in the songs table + // Resets spin box to non eding mode + isSpinboxEditing = false; +} + +void SongWidget::on_btnLive_clicked() +{ + sendToProjector(preview_song, ui->listPreview->currentRow()); // Send current selected +} + +void SongWidget::on_lineEditSearch_textEdited(QString text) +{ + // Check if full-text search is in progress + // If no full-text search is in progress, then filter + if(!ui->pushButtonClearResults->isVisible()) + { + // These two options are mutually exclusive: + bool match_beginning = (ui->comboBoxFilterType->currentIndex() == 1); + bool exact_match = (ui->comboBoxFilterType->currentIndex() == 2); + + songs_model->emitLayoutAboutToBeChanged(); // prepares view to be redrawn + proxy_model->setFilterString(text, match_beginning, exact_match); + songs_model->emitLayoutChanged(); // forces the view to redraw + + // Select the first row that matches the new filter: + ui->songs_view->selectRow(0); + ui->songs_view->scrollToTop(); + + // Load Preview on song changes + int row = proxy_model->mapToSource(ui->songs_view->currentIndex()).row(); + if( row>=0) + { + Song song = songs_model->getSong(row); + sendToPreview(song); + isSongFromSchelude = false; + } + } + updateButtonStates(); +} + +Song SongWidget::getSongToEdit() +{ + isScheduleSongEdited = isSongFromSchelude; + return preview_song; +} + +void SongWidget::on_songs_view_doubleClicked(QModelIndex index) +{ + // Called when a song is double-clicked + int row = proxy_model->mapToSource(index).row(); + Song song = songs_model->getSong(row); + + emit addToSchedule(song); + sendToPreview(song); + isSongFromSchelude = false; +} + +void SongWidget::on_songs_view_clicked(QModelIndex index) +{ + // This method is implemented for the case where the use clicks + // in the playlist table without changing the previous selection. + Song song = songs_model->getSong(proxy_model->mapToSource(index)); + sendToPreview(song); + isSongFromSchelude = false; + updateButtonStates(); +} + +void SongWidget::on_listPreview_doubleClicked(QModelIndex index) +{ + sendToProjector(preview_song, index.row()); +} + +void SongWidget::updateSongbooks() +{ + emit setWaitCursor(); + // Reload the songbook and reselect the one that used to be selected + // if it's still available, otherwise show all songbooks + + QString current_songbook = ui->songbook_menu->currentText(); + QString item0 = ui->songbook_menu->itemText(0); + ui->songbook_menu->clear(); + loadSongbooks(); + + int new_index = ui->songbook_menu->findText(current_songbook); + if( new_index == -1 ) + new_index = 0; // All songbooks + + ui->songbook_menu->setCurrentIndex(new_index); + emit setArrowCursor(); +} + +void SongWidget::updateSongFromDatabase(int songid, int initial_sid) +{ + songs_model->updateSongFromDatabase(songid, initial_sid); + + // Update in allSongs list + for(int i(0);ipreview_label->clear(); + ui->listPreview->clear(); + int row = ui->songs_view->currentIndex().row(); + proxy_model->removeRow(row); +} + +void SongWidget::addNewSong(Song song, int initial_sid) +{ + songs_model->addSong(song); + allSongs.append(song); + ui->songs_view->selectRow(songs_model->rowCount()-1); + + sendToPreview(song); +} + +void SongWidget::filterModeChanged() +{ + // Re-apply the filter: + QString new_text = ui->lineEditSearch->text(); + on_lineEditSearch_textEdited(new_text); +} + +void SongWidget::on_comboBoxFilterType_currentIndexChanged(int index) +{ + filterModeChanged(); +} + +QByteArray SongWidget::getSplitterState() +{ + return ui->splitter->saveState(); +} + +void SongWidget::setSplitterState(QByteArray& state) +{ + ui->splitter->restoreState(state); +} + +void SongWidget::retranslateUis() +{ + ui->songbook_menu->setItemText(0,tr("All songbooks")); + loadCategories(true); +} + +bool SongWidget::isSongSelected() +{ + if(ui->songs_view->selectionModel()->selectedRows().count() > 0) + return true; + else + return false; +} + +void SongWidget::loadCategories(bool ui_update) +{ + EditWidget e; + + // retrieve current category id + int cur_cat_id(-1); + int cur_index = ui->comboBoxCategory->currentIndex(); + if(cur_index>0) + cur_cat_id = cat_ids.at(cur_index-1); + + // get categories + QStringList cat_list; + cat_list = e.categories(); + + // create sorting by name and refrance categories id + QMap cmap; + for(int i(0); i< cat_list.count(); ++i) + cmap.insert(cat_list.at(i),i); + cat_ids.clear(); + cat_list.clear(); + cat_ids.append(cmap.values()); + cat_list.append(cmap.keys()); + + if(ui_update) // update categories to retranslate + { + ui->comboBoxCategory->setItemText(0,tr("All song categories")); + for(int i(1); i <= ui->comboBoxCategory->count()-1;++i) + { + ui->comboBoxCategory->setItemText(i,cat_list.at(i-1)); + } + + // reset to selected category + if(cur_cat_id==-1) + cur_index=0; + else + cur_index= cat_ids.indexOf(cur_cat_id)+1; + ui->comboBoxCategory->setCurrentIndex(cur_index); + } + else if(!ui_update) // initialize categories + { + ui->comboBoxCategory->addItem(tr("All song categories")); + ui->comboBoxCategory->addItems(cat_list); + } +} + +void SongWidget::on_comboBoxCategory_currentIndexChanged(int index) +{ + if(index!=-1) + { + songs_model->emitLayoutAboutToBeChanged(); //prepeare to chage layout + if(index==0) + proxy_model->setCategoryFilter(index-1); + else + proxy_model->setCategoryFilter(cat_ids.at(index-1)); + songs_model->emitLayoutChanged(); + } +} + +void SongWidget::on_pushButtonSearch_clicked() +{ + QString search_text = ui->lineEditSearch->text(); + search_text = clean(search_text); // remove all none alphanumeric charecters + QList search_results; + int type = ui->comboBoxSearchType->currentIndex(); + + // Make sure that there is some text to do a search for, if none, then return + if(search_text.count()<1) + { + ui->lineEditSearch->clear(); + ui->lineEditSearch->setPlaceholderText(tr("Please enter search text")); + return; + } + + // set filter + QRegExp rx; + rx.setCaseSensitivity(Qt::CaseInsensitive); + search_text.replace(" ","\\W*"); + if(type == 1 ) + // Search whole word exsact phrase only + rx.setPattern("\\b"+search_text+"\\b"); + else if(type == 2) // contains all words + // Search begining of every line + rx.setPattern("\n"+search_text); + else if(type == 3 || type == 4) + { + // Search for any of the search words + search_text.replace("\\W*","|"); + rx.setPattern("\\b("+search_text+")\\b"); + } + else + // Search text phrase + rx.setPattern(search_text); + + // perform search + for(int i(0);ipushButtonSearch->setText(tr("Search")); + ui->comboBoxFilterType->setVisible(false); + ui->labelSearchType->setText(tr("Search Type:")); + ui->labelFilter->setText(tr("Search:")); + ui->comboBoxSearchType->setVisible(true); + ui->pushButtonClearResults->setVisible(true); + + // set new songs_model with search relusts + songs_model->setSongs(search_results); + + // setup higligher + ui->listPreview->setItemDelegate(highlight); + if(type == 2) + highlight->highlighter->setHighlightText(search_text); + else + highlight->highlighter->setHighlightText(rx.pattern()); + // reset filter on song table to show all results + songs_model->emitLayoutAboutToBeChanged(); // prepares view to be redrawn + proxy_model->setFilterString("", false, false); + songs_model->emitLayoutChanged(); // forces the view to redraw + + ui->songs_view->selectRow(0); + ui->songs_view->scrollToTop(); + + int row = proxy_model->mapToSource(ui->songs_view->currentIndex()).row(); + if( row>=0) + { + sendToPreview(songs_model->getSong(row)); + isSongFromSchelude = false; + } + else + { + Song s; + sendToPreview(s); + } + + updateButtonStates(); +} + +void SongWidget::on_pushButtonClearResults_clicked() +{ + // try to reset highliting settings on preview list + ui->listPreview->setItemDelegate(ui->listWidgetDummy->itemDelegate()); + + ui->lineEditSearch->setPlaceholderText(""); + + // Hide song filter items and show search items + //ui->pushButtonSearch->setText(""); + ui->comboBoxFilterType->setVisible(true); + ui->comboBoxSearchType->setVisible(false); + ui->pushButtonClearResults->setVisible(false); + ui->labelSearchType->setText(tr("Filter Type:")); + ui->labelFilter->setText(tr("Filter:")); + songs_model->setSongs(allSongs); + ui->lineEditSearch->clear(); + Song s; + sendToPreview(s); + updateButtonStates(); +} diff --git a/songwidget.h b/songwidget.h new file mode 100644 index 0000000..971e4ec --- /dev/null +++ b/songwidget.h @@ -0,0 +1,103 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef SONGWIDGET_H +#define SONGWIDGET_H + +#include +#include "song.h" +#include "songcounter.h" +#include "editwidget.h" + +namespace Ui { +class SongWidget; +} + +class SongWidget : public QWidget { + Q_OBJECT + Q_DISABLE_COPY(SongWidget) +public: + explicit SongWidget(QWidget *parent = 0); + virtual ~SongWidget(); + Song currentSong(); + SongsModel *songs_model; + SongCounter counter; + +public slots: + void retranslateUis(); + void deleteSong(); + Song getSongToEdit(); + void updateSongbooks(); + bool isSongSelected(); + void updateSongFromDatabase(int songid, int initial_sid); + void addNewSong(Song song, int initial_sid); + QByteArray getSplitterState(); + void setSplitterState(QByteArray& state); + void sendToPreviewFromSchedule(Song &song); + void sendToProjector(Song song, int row); + void songsViewRowChanged(const QModelIndex ¤t, const QModelIndex &previous); + +protected: + virtual void changeEvent(QEvent *e); + +signals: + void setWaitCursor(); + void setArrowCursor(); + void sendSong(Song song, int currentItem); + void addToSchedule(Song &song); + +private slots: + void on_comboBoxCategory_currentIndexChanged(int index); + void on_listPreview_doubleClicked(QModelIndex index); + void on_songs_view_clicked(QModelIndex index); + void on_song_num_spinbox_editingFinished(); + void on_songs_view_doubleClicked(QModelIndex index); + void on_lineEditSearch_textEdited(QString Text); + void on_btnLive_clicked(); + void on_song_num_spinbox_valueChanged(int value); + void on_songbook_menu_currentIndexChanged(int index); + void selectMatchingSong(QString title); + void sendToPreview(Song song); + void loadSongbooks(); + void updateButtonStates(); + void filterModeChanged(); + void loadCategories(bool ui_update); + void on_pushButtonSearch_clicked(); + void on_pushButtonClearResults_clicked(); + void on_comboBoxFilterType_currentIndexChanged(int index); + +private: + Ui::SongWidget *ui; + QString songbook; + QStringList allTitles; + QStringList songbookList; + int titleType; + SongDatabase song_database; + SongProxyModel *proxy_model; + bool isSpinboxEditing; + bool isSongFromSchelude; + bool isScheduleSongEdited; + Song preview_song; + + QList cat_ids; + QList allSongs; + HighlighterDelegate *highlight; +}; + +#endif // SONGWIDGET_H diff --git a/songwidget.ui b/songwidget.ui new file mode 100644 index 0000000..2579be9 --- /dev/null +++ b/songwidget.ui @@ -0,0 +1,375 @@ + + + SongWidget + + + + 0 + 0 + 575 + 528 + + + + + 0 + 0 + + + + + 400 + 0 + + + + Form + + + + + + Qt::Horizontal + + + false + + + + + + + + + Use this menu to show only songs beloning to a particular Songbook + + + Select Songbook to use + + + QComboBox::AdjustToMinimumContentsLengthWithIcon + + + true + + + + + + + Selects a song by the number in the selected Songbook + + + 1 + + + 2800 + + + 1 + + + + + + + + + + + + + + Filter: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + true + + + + 125 + 0 + + + + Use this field to limit the display of the songs to only the ones that contain the specified text in the song title or song number + + + + + + + + + + + Search Type: + + + + + + + + 0 + 0 + + + + + Contains + + + + + Begins + + + + + Exact Match + + + + + + + + + 0 + 0 + + + + + Contains Phrase + + + + + Contains Word Phrase + + + + + Line Begins + + + + + Contains Any Word + + + + + Contains All Words + + + + + + + + Search + + + + :/icons/icons/search.png:/icons/icons/search.png + + + Return + + + + + + + + + + + + 10 + 10 + + + + true + + + 5 + + + + + + + + + + + + 255 + 0 + 0 + + + + + + + + + 255 + 0 + 0 + + + + + + + + + 120 + 120 + 120 + + + + + + + + + 75 + true + + + + Done Searching? - Clear Search Results + + + + + + + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + true + + + true + + + false + + + 20 + + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Quickly display the selected song on the screen without adding it to playlist first + + + Go Live (F5) + + + + :/icons/icons/go_live.png:/icons/icons/go_live.png + + + F5 + + + + + + + + + + + + + 150 + 0 + + + + true + + + 5 + + + + + + + + + + true + + + + + + + + + + + songbook_menu + song_num_spinbox + comboBoxCategory + lineEditSearch + comboBoxSearchType + pushButtonSearch + listWidgetDummy + pushButtonClearResults + songs_view + listPreview + btnLive + + + + + + diff --git a/spfunctions.cpp b/spfunctions.cpp new file mode 100644 index 0000000..7a8f8cc --- /dev/null +++ b/spfunctions.cpp @@ -0,0 +1,64 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "spfunctions.h" +//spFunctions::spFunctions() +//{ +//} + +QByteArray pixToByte(const QPixmap & pmap) +{ + QByteArray bytes; + QBuffer buffer(&bytes); + buffer.open(QIODevice::WriteOnly); + pmap.save(&buffer, "JPG",90); + return buffer.data(); +} + +bool isAnnounceTitle(QString string) +{ + // Check if the line is verse title line + if(string.startsWith("Announce")) + return true; + else if (string.startsWith("Slide")) + return true; + else if (string.startsWith(QString::fromUtf8("Объявление"))) + return true; + else if (string.startsWith(QString::fromUtf8("Слайд"))) + return true; + else if (string.startsWith(QString::fromUtf8("Оголошення"))) + return true; + else if (string.startsWith(QString::fromUtf8("Ankündigung"))) + return true; + else if (string.startsWith(QString::fromUtf8("Oznámení"))) + return true; + else if (string.startsWith(QString::fromUtf8("Snímek"))) + return true; + else + return false; +} + +QString getSupportedImageFormats() +{ + QList im = QImageReader::supportedImageFormats(); + QString imfor; + foreach (QByteArray f,im) + imfor += " *." + f; + return imfor.trimmed(); +} diff --git a/spfunctions.h b/spfunctions.h new file mode 100644 index 0000000..9499606 --- /dev/null +++ b/spfunctions.h @@ -0,0 +1,39 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef SPFUNCTIONS_H +#define SPFUNCTIONS_H + +#include +#include +#include +#include +#include + + +QByteArray pixToByte(const QPixmap & pmap); +bool isAnnounceTitle(QString string); +QString getSupportedImageFormats(); +//class spFunctions +//{ +//public: +// spFunctions(); +//}; + +#endif // SPFUNCTIONS_H diff --git a/spimageprovider.cpp b/spimageprovider.cpp new file mode 100644 index 0000000..7b21106 --- /dev/null +++ b/spimageprovider.cpp @@ -0,0 +1,16 @@ +#include "spimageprovider.hpp" + +SpImageProvider::SpImageProvider() : + QQuickImageProvider(QQuickImageProvider::Pixmap) +{ +} + +QPixmap SpImageProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) +{ + return m_pixmap; +} + +void SpImageProvider::setPixMap(QPixmap &p) +{ + m_pixmap = p; +} diff --git a/spimageprovider.hpp b/spimageprovider.hpp new file mode 100644 index 0000000..aab69d6 --- /dev/null +++ b/spimageprovider.hpp @@ -0,0 +1,20 @@ +#ifndef SPIMAGEPROVIDER_HPP +#define SPIMAGEPROVIDER_HPP + +#include + +class SpImageProvider : public QQuickImageProvider +{ + +public: + SpImageProvider(); + QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize); + + void setPixMap(QPixmap &p); + +private: + QPixmap m_pixmap; +}; + + +#endif // SPIMAGEPROVIDER_HPP diff --git a/theme.cpp b/theme.cpp new file mode 100644 index 0000000..0e3b333 --- /dev/null +++ b/theme.cpp @@ -0,0 +1,514 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "theme.h" +/* +PassiveSettings::PassiveSettings() +{ + useBackground = false; + backgroundName = ""; + backgroundPix = QPixmap(); + useDisp2settings = false; +} + +BibleSettings::BibleSettings() +{ + // Apply Bible Defaults + useShadow = true; + useFading = true; + useBlurShadow = false; + useBackground = false; + backgroundName = ""; + backgroundPix = QPixmap(); + textFont.fromString("Arial,48,-1,5,50,0,0,0,0,0"); + textColor = QColor(Qt::white); + textAlingmentV = 0; + textAlingmentH = 0; + captionFont.fromString("Arial,36,-1,5,50,0,0,0,0,0"); + captionColor = QColor(Qt::white); + captionAlingment = 2; + captionPosition = 1; + useAbbriviation = false; + screenUse = 100; + screenPosition = 1; + useDisp2settings = false; +} + +SongSettings::SongSettings() +{ + // Apply song defaults + useShadow = true; + useFading = true; + useBlurShadow = false; + showStanzaTitle = false; + showSongKey = false; + showSongNumber = false; + infoColor = QColor(Qt::white); + infoFont.fromString("Arial,36,-1,5,50,0,0,0,0,0"); + infoAling = 0; + showSongEnding = true; + endingColor = QColor(Qt::white); + endingFont.fromString("Arial,48,-1,5,50,0,0,0,0,0"); + endingType = 0; + endingPosition = 1; + useBackground = false; + backgroundName = ""; + backgroundPix = QPixmap(); + textColor = QColor(Qt::white); + textFont.fromString("Arial,48,-1,5,50,0,0,0,0,0"); + textAlingmentV = 1; + textAlingmentH = 1; + screenUse = 100; + screenPositon = 1; + useDisp2settings = false; +} + +AnnounceSettings::AnnounceSettings() +{ + // Apply annouce defaults + useShadow = true; + useFading = true; + useBlurShadow = false; + useBackground = false; + backgroundName = ""; + backgroundPix = QPixmap(); + textFont.fromString("Arial,48,-1,5,50,0,0,0,0,0"); + textColor = QColor(Qt::white); + textAlingmentV = 0; + textAlingmentH = 1; + useDisp2settings = false; +} +*/ +ThemeInfo::ThemeInfo() +{ + themeId = 0; + name = "Default"; + comments = "Default SoftProjector Theme"; +} + +Theme::Theme() +{ + m_info = ThemeInfo(); + // themeId = 0; + // name = "Default"; + // comments = "Default SoftProjector Theme"; +} + +void Theme::saveThemeNew() +{ + QSqlQuery sq; + sq.prepare("INSERT INTO Themes (name, comment) VALUES (?,?)"); + sq.addBindValue(m_info.name); + sq.addBindValue(m_info.comments); + sq.exec(); + + // get new theme id + sq.exec("SELECT seq FROM sqlite_sequence WHERE name = 'Themes'"); + sq.first(); + m_info.themeId = sq.value(0).toInt(); + savePassiveNew(1,passive); + savePassiveNew(2,passive2); + saveBibleNew(1,bible); + saveBibleNew(2,bible2); + saveSongNew(1,song); + saveSongNew(2,song2); + saveAnnounceNew(1,announce); + saveAnnounceNew(2,announce2); +} + +void Theme::savePassiveNew(int screen, TextSettings &settings) +{ + QSqlQuery sq; + sq.prepare("INSERT INTO ThemePassive (theme_id, disp, use_background, background_name, backgroundPix, use_disp_2) " + "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.exec(); +} + +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(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + sq.addBindValue(m_info.themeId); + sq.addBindValue(screen); + sq.addBindValue(settings.useShadow); + sq.addBindValue(settings.useFading); + sq.addBindValue(settings.useBlurShadow); + sq.addBindValue(settings.useBackground); + sq.addBindValue(settings.backgroundName); + sq.addBindValue(pixToByte(settings.backgroundPix)); + sq.addBindValue(settings.textFont.toString()); + sq.addBindValue((unsigned int)(settings.textColor.rgb())); + sq.addBindValue(settings.textAlingmentV); + sq.addBindValue(settings.textAlingmentH); + sq.addBindValue(settings.captionFont.toString()); + sq.addBindValue((unsigned int)(settings.captionColor.rgb())); + sq.addBindValue(settings.captionAlingment); + sq.addBindValue(settings.captionPosition); + sq.addBindValue(settings.useAbbriviation); + sq.addBindValue(settings.screenUse); + sq.addBindValue(settings.screenPosition); + sq.addBindValue(settings.useDisp2settings); + sq.exec(); +} + +void Theme::saveSongNew(int screen, SongSettings &settings) +{ + QSqlQuery sq; + 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, backgroundPix, text_font, text_color, " + "text_align_v, text_align_h, screen_use, screen_position, use_disp_2) " + "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); + sq.addBindValue(m_info.themeId); + sq.addBindValue(screen); + sq.addBindValue(settings.useShadow); + sq.addBindValue(settings.useFading); + sq.addBindValue(settings.useBlurShadow); + sq.addBindValue(settings.showStanzaTitle); + sq.addBindValue(settings.showSongKey); + sq.addBindValue(settings.showSongNumber); + sq.addBindValue((unsigned int)(settings.infoColor.rgb())); + sq.addBindValue(settings.infoFont.toString()); + sq.addBindValue(settings.infoAling); + sq.addBindValue(settings.showSongEnding); + sq.addBindValue((unsigned int)(settings.endingColor.rgb())); + sq.addBindValue(settings.endingFont.toString()); + sq.addBindValue(settings.endingType); + sq.addBindValue(settings.endingPosition); + sq.addBindValue(settings.useBackground); + sq.addBindValue(settings.backgroundName); + sq.addBindValue(pixToByte(settings.backgroundPix)); + sq.addBindValue(settings.textFont); + sq.addBindValue((unsigned int)(settings.textColor.rgb())); + sq.addBindValue(settings.textAlingmentV); + sq.addBindValue(settings.textAlingmentH); + sq.addBindValue(settings.screenUse); + sq.addBindValue(settings.screenPosition); + sq.addBindValue(settings.useDisp2settings); + sq.exec(); +} + +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, backgroundPix, text_font, text_color, text_align_v, text_align_h, use_disp_2) " + "VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)"); + sq.addBindValue(m_info.themeId); + sq.addBindValue(screen); + sq.addBindValue(settings.useShadow); + sq.addBindValue(settings.useFading); + sq.addBindValue(settings.useBlurShadow); + sq.addBindValue(settings.useBackground); + sq.addBindValue(settings.backgroundName); + sq.addBindValue(pixToByte(settings.backgroundPix)); + sq.addBindValue(settings.textFont.toString()); + sq.addBindValue(settings.textColor.rgb()); + sq.addBindValue(settings.textAlingmentV); + sq.addBindValue(settings.textAlingmentH); + sq.addBindValue(settings.useDisp2settings); + sq.exec(); +} + +void Theme::saveThemeUpdate() +{ + QSqlQuery sq; + sq.prepare("UPDATE Themes SET name = ?, comments = ? WHERE id = ?"); + sq.addBindValue(m_info.name); + sq.addBindValue(m_info.comments); + sq.addBindValue(m_info.themeId); + sq.exec(); + + savePassiveUpdate(1,passive); + savePassiveUpdate(2,passive2); + saveBibleUpdate(1,bible); + saveBibleUpdate(2,bible2); + saveSongUpdate(1,song); + saveSongUpdate(2,song2); + saveAnnounceUpdate(1,announce); + saveAnnounceUpdate(2,announce2); +} + +void Theme::savePassiveUpdate(int screen, TextSettings &settings) +{ + QSqlQuery sq; + sq.prepare("UPDATE ThemePassive SET use_background = ?, background_name = ?, background = ?, use_disp_2 = ? " + "WHERE theme_id = ? AND disp = ?"); + sq.addBindValue(settings.useBackground); + sq.addBindValue(settings.backgroundName); + sq.addBindValue(pixToByte(settings.backgroundPix)); + sq.addBindValue(settings.useDisp2settings); + sq.addBindValue(m_info.themeId); + sq.addBindValue(screen); + sq.exec(); +} + +void Theme::saveBibleUpdate(int screen, BibleSettings &settings) +{ + + QSqlQuery sq; + 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 = ? " + "WHERE theme_id = ? AND disp = ?"); + sq.addBindValue(settings.useShadow); + sq.addBindValue(settings.useFading); + sq.addBindValue(settings.useBlurShadow); + sq.addBindValue(settings.useBackground); + sq.addBindValue(settings.backgroundName); + sq.addBindValue(pixToByte(settings.backgroundPix)); + sq.addBindValue(settings.textFont.toString()); + sq.addBindValue((unsigned int)(settings.textColor.rgb())); + sq.addBindValue(settings.textAlingmentV); + sq.addBindValue(settings.textAlingmentH); + sq.addBindValue(settings.captionFont.toString()); + sq.addBindValue((unsigned int)(settings.captionColor.rgb())); + sq.addBindValue(settings.captionAlingment); + sq.addBindValue(settings.captionPosition); + sq.addBindValue(settings.useAbbriviation); + sq.addBindValue(settings.screenUse); + sq.addBindValue(settings.screenPosition); + sq.addBindValue(settings.useDisp2settings); + sq.addBindValue(m_info.themeId); + sq.addBindValue(screen); + sq.exec(); +} + +void Theme::saveSongUpdate(int screen, SongSettings &settings) +{ + QSqlQuery sq; + sq.prepare("UPDATE ThemeSong SET 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 = ? " + "WHERE theme_id = ? AND disp = ?"); + sq.addBindValue(settings.useShadow); + sq.addBindValue(settings.useFading); + sq.addBindValue(settings.useBlurShadow); + sq.addBindValue(settings.showStanzaTitle); + sq.addBindValue(settings.showSongKey); + sq.addBindValue(settings.showSongNumber); + sq.addBindValue((unsigned int)(settings.infoColor.rgb())); + sq.addBindValue(settings.infoFont.toString()); + sq.addBindValue(settings.infoAling); + sq.addBindValue(settings.showSongEnding); + sq.addBindValue((unsigned int)(settings.endingColor.rgb())); + sq.addBindValue(settings.endingFont.toString()); + sq.addBindValue(settings.endingType); + sq.addBindValue(settings.endingPosition); + sq.addBindValue(settings.useBackground); + sq.addBindValue(settings.backgroundName); + sq.addBindValue(pixToByte(settings.backgroundPix)); + sq.addBindValue(settings.textFont); + sq.addBindValue((unsigned int)(settings.textColor.rgb())); + sq.addBindValue(settings.textAlingmentV); + sq.addBindValue(settings.textAlingmentH); + sq.addBindValue(settings.screenUse); + sq.addBindValue(settings.screenPosition); + sq.addBindValue(settings.useDisp2settings); + sq.addBindValue(m_info.themeId); + sq.addBindValue(screen); + sq.exec(); +} + +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 = ? " + "WHERE theme_id = ? AND disp = ?"); + sq.addBindValue(settings.useShadow); + sq.addBindValue(settings.useFading); + sq.addBindValue(settings.useBlurShadow); + sq.addBindValue(settings.useBackground); + sq.addBindValue(settings.backgroundName); + sq.addBindValue(pixToByte(settings.backgroundPix)); + sq.addBindValue(settings.textFont.toString()); + sq.addBindValue(settings.textColor.rgb()); + sq.addBindValue(settings.textAlingmentV); + sq.addBindValue(settings.textAlingmentH); + sq.addBindValue(settings.useDisp2settings); + sq.addBindValue(m_info.themeId); + sq.addBindValue(screen); + sq.exec(); +} + +void Theme::loadTheme() +{ + QSqlQuery sq; + bool ok, allok; + allok = false; + + sq.exec(QString("SELECT name, comment FROM Themes WHERE id = %1").arg(m_info.themeId)); + ok = sq.first(); + if(ok) + { + m_info.name = sq.value(0).toString(); + m_info.comments = sq.value(1).toString(); + allok = true; + } + else + { + sq.exec("SELECT id, name, comment FROM Themes"); + ok = sq.first(); + + // Check at least one theme exitst + if (ok) // If exist, then load it + { + m_info.themeId = sq.value(0).toInt(); + m_info.name = sq.value(1).toString(); + m_info.comments = sq.value(2).toString(); + allok = true; + } + else // No themes exist, creat one and exit + { + saveThemeNew(); + allok = false; + } + } + + if(allok) + { + loadPassive(1,passive); + loadPassive(2,passive2); + loadBible(1,bible); + loadBible(2,bible2); + loadSong(1,song); + loadSong(2,song2); + loadAnnounce(1,announce); + loadAnnounce(2,announce2); + } +} + +void Theme::loadPassive(int screen, TextSettings &settings) +{ + QSqlQuery sq; + QSqlRecord sr; + sq.exec(QString("SELECT * FROM ThemePassive WHERE theme_id = %1 and disp = %2").arg(m_info.themeId).arg(screen)); + sq.first(); + sr = sq.record(); + 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(); +} + +void Theme::loadBible(int screen, BibleSettings &settings) +{ + QSqlQuery sq; + QSqlRecord sr; + sq.exec(QString("SELECT * FROM ThemeBible WHERE theme_id = %1 and disp = %2").arg(m_info.themeId).arg(screen)); + sq.first(); + sr = sq.record(); + settings.useShadow = sr.field("use_shadow").value().toBool(); + settings.useFading = sr.field("use_fading").value().toBool(); + settings.useBlurShadow = sr.field("use_blur_shadow").value().toBool(); + 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.textFont.fromString(sr.field("text_font").value().toString()); + settings.textColor = QColor::fromRgb(sr.field("text_color").value().toUInt()); + settings.textAlingmentV = sr.field("text_align_v").value().toInt(); + settings.textAlingmentH = sr.field("text_align_h").value().toInt(); + settings.captionFont.fromString(sr.field("caption_font").value().toString()); + settings.captionColor = QColor::fromRgb(sr.field("caption_color").value().toUInt()); + settings.captionAlingment = sr.field("caption_align").value().toInt(); + settings.captionPosition = sr.field("caption_position").value().toInt(); + 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(); +} + +void Theme::loadSong(int screen, SongSettings &settings) +{ + QSqlQuery sq; + QSqlRecord sr; + sq.exec(QString("SELECT * FROM ThemeSong WHERE theme_id = %1 and disp = %2").arg(m_info.themeId).arg(screen)); + sq.first(); + sr = sq.record(); + settings.useShadow = sr.field("use_shadow").value().toBool(); + settings.useFading = sr.field("use_fading").value().toBool(); + settings.useBlurShadow = sr.field("use_blur_shadow").value().toBool(); + settings.showStanzaTitle = sr.field("show_stanza_title").value().toBool(); + settings.showSongKey = sr.field("show_key").value().toBool(); + settings.showSongNumber = sr.field("show_number").value().toBool(); + settings.infoColor = QColor::fromRgb(sr.field("info_color").value().toUInt()); + settings.infoFont.fromString(sr.field("info_font").value().toString()); + settings.infoAling = sr.field("info_align").value().toInt(); + settings.showSongEnding = sr.field("show_song_ending").value().toBool(); + settings.endingColor = QColor::fromRgb(sr.field("ending_color").value().toUInt()); + settings.endingFont.fromString(sr.field("ending_font").value().toString()); + settings.endingType = sr.field("ending_type").value().toInt(); + settings.endingPosition = sr.field("ending_position").value().toInt(); + 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.textFont.fromString(sr.field("text_font").value().toString()); + settings.textColor = QColor::fromRgb(sr.field("text_color").value().toUInt()); + settings.textAlingmentV = sr.field("text_align_v").value().toInt(); + settings.textAlingmentH = 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(); +} + +void Theme::loadAnnounce(int screen, TextSettings &settings) +{ + QSqlQuery sq; + QSqlRecord sr; + sq.exec(QString("SELECT * FROM ThemeAnnounce WHERE theme_id = %1 and disp = %2").arg(m_info.themeId).arg(screen)); + sq.first(); + sr = sq.record(); + settings.useShadow = sr.field("use_shadow").value().toBool(); + settings.useFading = sr.field("use_fading").value().toBool(); + settings.useBlurShadow = sr.field("use_blur_shadow").value().toBool(); + 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.textFont.fromString(sr.field("text_font").value().toString()); + settings.textColor = QColor::fromRgb(sr.field("text_color").value().toUInt()); + settings.textAlingmentV = sr.field("text_align_v").value().toInt(); + settings.textAlingmentH = sr.field("text_align_h").value().toInt(); + settings.useDisp2settings = sr.field("use_disp_2").value().toBool(); +} + +void Theme::setThemeInfo(ThemeInfo info) +{ + m_info.themeId = info.themeId; + m_info.name = info.name; + m_info.comments = info.comments; +} + +ThemeInfo Theme::getThemeInfo() +{ + return m_info; +} diff --git a/theme.h b/theme.h new file mode 100644 index 0000000..9bd6db4 --- /dev/null +++ b/theme.h @@ -0,0 +1,166 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef THEME_H +#define THEME_H + +//#include +#include +//#include "spfunctions.h" +#include "settings.h" +/* +class PassiveSettings +{ +public: + PassiveSettings(); + bool useBackground; + QString backgroundName; + QPixmap background; + bool useDisp2settings; +}; + +class BibleSettings +{ + // To store Bible projection related settings +public: + BibleSettings(); + bool useShadow; + bool useFading; + bool useBlurShadow; + bool useBackground; + QString backgroundName; + QPixmap background; + QFont textFont; + QColor textColor; + int textAlingmentV; + int textAlingmentH; + QFont captionFont; + QColor captionColor; + int captionAlingment; + int captionPosition; + bool useAbbriviations; + int screenUse; + int screenPosition; + + bool useDisp2settings; +}; + +class SongSettings +{ + // To store Song related settings +public: + SongSettings(); + bool useFading; + bool useShadow; + bool useBlurShadow; + bool showStanzaTitle; + bool showSongKey; + bool showSongNumber; + QColor infoColor; + QFont infoFont; + int infoAling; // 0 = Top, 1 = Bottom + bool showSongEnding; + QColor endingColor; + QFont endingFont; + int endingType; // 0 = ***, 1 = ---, 2 = °°°, 3 = •••, 4 = ●●●, 5 = ▪▪▪, 6 = ■■■, 7 = for song copyright info + int endingPosition; + bool useBackground; + QString backgroundName; // file path for background image + QPixmap background; + QColor textColor; + QFont textFont; + int textAlingmentV; + int textAlingmentH; + int screenUse; + int screenPositon; // 0 = Top, 1 = Bottom + bool useDisp2settings; +}; + +class AnnounceSettings +{ // To store Announcement related settings +public: + AnnounceSettings(); + bool useShadow; + bool useFading; + bool useBlurShadow; + bool useBackground; + QString backgroundName; // file path for background image + QPixmap background; + QFont textFont; + QColor textColor; + int textAlingmentV; + int textAlingmentH; + + bool useDisp2settings; +}; +*/ + +class ThemeInfo +{ +public: + ThemeInfo(); + int themeId; + QString name; + QString comments; +}; + +class Theme +{ +public: + Theme(); + TextSettingsBase common; + TextSettingsBase common2; // Holds secondary display screen settings + TextSettings passive; + TextSettings passive2; // Holds secondary display screen settings + BibleSettings bible; + BibleSettings bible2; // Holds secondary display screen settings + SongSettings song; + SongSettings song2; // Holds secondary display screen settings + TextSettings announce; + TextSettings announce2; // Holds secondary display screen settings + +public slots: + void saveThemeNew(); + void saveThemeUpdate(); + void loadTheme(); + void setThemeId(int id){m_info.themeId = id;} + int getThemeId(){return m_info.themeId;} + void setThemeInfo(ThemeInfo info); + ThemeInfo getThemeInfo(); + +private: + ThemeInfo m_info; + +private slots: + void savePassiveNew(int screen, TextSettings &settings); + void saveBibleNew(int screen, BibleSettings &settings); + void saveSongNew(int screen, SongSettings &settings); + void saveAnnounceNew(int screen, TextSettings &settings); + void savePassiveUpdate(int screen, TextSettings &settings); + void saveBibleUpdate(int screen, BibleSettings &settings); + void saveSongUpdate(int screen, SongSettings &settings); + void saveAnnounceUpdate(int screen, TextSettings &settings); + void loadPassive(int screen, TextSettings &settings); + void loadBible(int screen, BibleSettings &settings); + void loadSong(int screen, SongSettings &settings); + void loadAnnounce(int screen, TextSettings &settings); + +}; + +#endif // THEME_H diff --git a/translations/flag_cs.png b/translations/flag_cs.png new file mode 100644 index 0000000..31f9ad9 Binary files /dev/null and b/translations/flag_cs.png differ diff --git a/translations/flag_de.png b/translations/flag_de.png new file mode 100644 index 0000000..77e9338 Binary files /dev/null and b/translations/flag_de.png differ diff --git a/translations/flag_ru.png b/translations/flag_ru.png new file mode 100644 index 0000000..a5b9528 Binary files /dev/null and b/translations/flag_ru.png differ diff --git a/translations/flag_ua.png b/translations/flag_ua.png new file mode 100644 index 0000000..78e4945 Binary files /dev/null and b/translations/flag_ua.png differ diff --git a/translations/softpro_cs.qm b/translations/softpro_cs.qm new file mode 100644 index 0000000..c70d98e Binary files /dev/null and b/translations/softpro_cs.qm differ diff --git a/translations/softpro_cs.ts b/translations/softpro_cs.ts new file mode 100644 index 0000000..7e613f1 --- /dev/null +++ b/translations/softpro_cs.ts @@ -0,0 +1,5195 @@ + + + +UTF-8 + + AboutDialog + + + About softProjecor + O softProjectoru + + + + Version: + Verze: + + + + an open souce media projection software + Program s otevřeným zdrojovým kódem pro promítání médií softProjector + + + + Developers: + Vývojáři: + + + + Vladislav Kobzar +------------------- +Ilya Spivakov +Matvey Adzhigirey + Ilya Spivakov +Matvey Adzhigirey +Vladislav Kobzar + Vladislav Kobzar +------------------- +Ilya Spivakov +Matvey Adzhigirey + + + + Mac Build: + Sestavení pro OS X (Mac): + + + + Volodimir Vasuk + + + + + Special Thanks To: + Poděkování: + + + + Vitaliy Zhaborovskyy + Vitaliy Zhaborovskyy + + + + Translators: + Překladatelé: + + + + Russian: +German: +Czech: +Ukranian: + Ruština: +Němčina: +Čeština: +Ukrajinština: + + + + Vladimir Zinchenko +Eduard Schlak +Pavel Fric +Vitaliy Zhaborovskyy + Vladimir Zinchenko +Eduard Schlak +Pavel Fric +Vitaliy Zhaborovskyy + + + + If you would like to help developing this program<br> +or would like to contribute data, please visit:<br> +<a href="http://softprojector.org/">http://softprojector.org/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + V případě že byste chtěli pomoci s vývojem nebo přispět<br> +materiálem, prosím, navštivte:<br> +<a href="http://softprojector.org/">http://softprojector.org/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + + + + <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FPCLPXFMH9XP4">Donate</a> + <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FPCLPXFMH9XP4">Darovat</a> + + + Russian: +German: +Czech: + Ruština: +Němčina: +Čeština: + + + Special thanks to: + Zvláštní poděkování: + + + If you would like to help developing this program<br> +or would like to contribute data, please visit:<br> +<a href="http://softprojector.sourceforge.net/">http://softprojector.sourceforge.net/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + V případě že byste chtěli pomoci s vývojem nebo přispět<br> +materiálem, prosím, navštivte:<br> +<a href="http://softprojector.sourceforge.net/">http://softprojector.sourceforge.net/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">If you would like to help developing this program </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">or would like to contribute data, please visit:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://softprojector.sourceforge.net/"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">http://softprojector.sourceforge.net/</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://sourceforge.net/projects/softprojector/"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">http://sourceforge.net/projects/softprojector/</span></a></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">If you would like to help developing this program </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">or would like to contribute data, please visit:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://softprojector.com/"><span style=" text-decoration: underline; color:#0000ff;">http://softprojector.com/</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://sourceforge.net/projects/softprojector/"><span style=" text-decoration: underline; color:#0000ff;">http://sourceforge.net/projects/softprojector/</span></a></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">V případě že byste chtěli pomoci s vývojem nebo přispět</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">materiálem, prosím, navštivte:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://softprojector.sourceforge.net/"><span style=" text-decoration: underline; color:#0000ff;">http://softprojector.sourceforge.net/</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://sourceforge.net/projects/softprojector/"><span style=" text-decoration: underline; color:#0000ff;">http://sourceforge.net/projects/softprojector/</span></a></p></body></html> + + + + Close + Zavřít + + + + AddSongbookDialog + + + Add songbook + Přidat zpěvník + + + + Songbook Title: + Název zpěvníku: + + + + Description: + Popis: + + + + AnnounceModel + + + Title + Název + + + + AnnounceWidget + + + Form + Formulář + + + Announcement text: + Text oznámení: + + + Quickly display the selected song on the screen without adding it to playlist first + Schnelle Anzeige auf dem Bildschirm, ohne die vorherige Aufnahme in die Wiedergabe-Liste + + + + Announcements: + Oznámení: + + + + Quickly display announcement + Quickly display announcemnt + Rychlé zobrazení oznámení na promítací ploše, bez předchozího nahrání do seznamu pro promítání + + + + Go Live (F5) + Ukázat (F5) + + + + F5 + F5 + + + + Announcement Preview: + Náhled oznámení: + + + Settings + Nastavení + + + Horizontal alignment: + Vodorovné zarovnání: + + + Left + Zarovnat vlevo + + + Center + Zarovnat na střed + + + Right + Zarovnat vpravo + + + Vertical alignment: + Svislé zarovnání: + + + Top + Nahoře + + + Middle + Na střed + + + Bottom + Dole + + + Add this announcement to history list, automatically will be added to the list when "Go Live" button is pressed + add currently selected verse into history list, automatically will be added when "Go Live" button is pressed + Přidat toto oznámení do seznamu s historií. Bude automaticky přidáno do seznamu s historií stisknutím klávesy F5 + + + Add (F2) + Přidat (F2) + + + F2 + F2 + + + F3 + F3 + + + Add to history + Hinzufugen zur Geschichte + + + This list contains verses that were sent to be shown + Tento seznam obsahuje verše, které byly poslány, aby byly ukázány + + + Remove current selected announcement in the history list + Remove current selected verse in the history list + Odstranit v současnosti vybrané oznámení v seznamu s historií + + + Remove (F3) + Remove from history + Odstranit (F3) + + + + AnnouncementSettingWidget + + Form + Formulář + + + + + Effects + Efekty + + + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + Je-li vybráno, při přepínání zobrazovaného textu starý text pozvolna mizí a nový text se zvolna objevuje. + + + + + Use fading effects + Použít prolínací účinek + + + + + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + Užitečné, když používáte obrázek na pozadí. Zobrazuje zvláštní stínový účinek. + + + + + Use shadow + Použít stín + + + + + Use blurred shadow + Použít rozmazaný stín + + + + + Use Background Image + Použít obrázek pozadí + + + + + Browse... + Procházet... + + + Text Alingment + Zarovnání textu + + + Vertical: + Svislé: + + + Horizontal: + Vodorovné: + + + + + Top + Nahoře + + + + + Middle + Uprostřed + + + + + Bottom + Dole + + + + + Left + Vlevo + + + + + Center + Na střed + + + + + Right + Vpravo + + + + + Text Properties + Vlastnosti textu + + + + Apply this background to all active backgrounds. + Použijte tuto zázemí všem aktivním prostředí. + + + + + Color... + Barva... + + + Color: + Barva: + + + Choose Color... + Vybrat barvu... + + + + + Font... + Font + Písmo... + + + + + Alignment: + Zarovnání: + + + + Use Separate Secondary Display Screen Settings + Použít nastavení pro samostatnou vedlejší zobrazovací obrazovku + + + + Reset All To Default + Nastavit vše znovu na výchozí + + + + + Images(%1) + Obrázky (%1) + + + + Bold + Tučné + + + + Italic + Kurzíva + + + + StrikeOut + Přeškrtnutí + + + + Underline + Podtržení + + + + + Select a image for announcement wallpaper + Vyberte obrázek pro obrázek na pozadí s oznámením + + + Images (*.png *.jpg *.jpeg) + Obrázky (*.png *.jpg *.jpeg) + + + + BibleInformationDialog + + + Bible Information + Informace o Bibli + + + + Bible Name: + Název Bible: + + + + Abbreviation: + Zkratka: + + + + Information\ +Copyright: + Informace/ +Autorské právo: + + + + Right to left + Zprava doleva + + + + BibleSettingWidget + + Form + Formulář + + + + + Primary Bible: + Hlavní Bible: + + + + + Secondary Bible: + Vedlejší Bible: + + + + + Trinary Bible: + Třetí Bible: + + + + Operator Screen Bible: + Bible na obrazovce operátora: + + + + This bible version will be used for the operator to select verses and search bible + Tato verze Bible bude použita pro výběr veršů a vyhledávání v Bibli operátorem + + + + + Effects + Efekty + + + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + Je-li vybráno, při přepínání zobrazovaného textu starý text pozvolna mizí a nový text se zvolna objevuje. + + + + + Use fading effects + Použít prolínací účinek + + + + + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + Užitečné, když používáte obrázek na pozadí. Zobrazuje zvláštní stínový účinek. + + + + + Use shadow + Použít stín + + + + + Use blurred shadow + Použít rozmazaný stín + + + + + Use Background Image + Použít obrázek pozadí + + + + + Browse... + Procházet... + + + + Apply this background to all active backgrounds. + Použijte tuto zázemí všem aktivním prostředí. + + + + + Amount of screen to use: + Množství z plochy obrazovky, která se použije: + + + + + Percent of screen to be used. + Procento z plochy obrazovky, která se použije. + + + + + Select to use either top portion of the screen or bottom. + Vyberte, aby se použila buď horní část obrazovky, anebo dolní část obrazovky. + + + + + Top of Screen + Horní část obrazovky + + + + Botton of Screen + Dolní část obrazovky + + + Text Alingment + Zarovnání textu + + + Vertical: + Svislé: + + + + + Top + Nahoře + + + + + Middle + Uprostřed + + + + + Bottom + Dole + + + Horizontal: + Vodorovné: + + + + + + + Left + Vlevo + + + + + + + Center + Na střed + + + + + + + Right + Vpravo + + + + + Text Properties + Vlastnosti textu + + + Color: + Barva: + + + Choose color... + Vybrat barvu... + + + + + + + Font... + Font + Písmo... + + + + + + + Alignment: + Zarovnání: + + + + + Caption Properties + Vlastnosti záhlaví + + + + + + + Position: + Poloha: + + + + + Above Text + Nad textem + + + + + Below Text + Pod textem + + + + + Show Bible Version Abbriviation + Ukázat zkratku verze Bible + + + + + Amount Of Screen To Use + Amount Of Sceen To Use + Množství z plochy obrazovky, která se použije + + + Select "Top" to use top portion of the display screen + Vyberte Nohoře, aby se použila horní část zobrazovací obrazovky + + + Select "Bottom" to use bottom portion of the display screen + Vyberte Dole, aby se použila dolní část zobrazovací obrazovky + + + Use this much of the screen: + Použít tak velkou část obrazovky: + + + + + + + Color... + Barva... + + + Align to: + Aling to: + Zarovnat k: + + + + Use Separate Secondary Display Screen Settings + Použít nastavení pro samostatnou vedlejší zobrazovací obrazovku + + + + Bottom of Screen + Dolní část obrazovky + + + + Reset All To Default + Nastavit vše znovu na výchozí + + + + + + + + + + + None + Žádné + + + + + Same as primary Bible + Stejný jako hlavní Bible + + + + + Images(%1) + Obrázky (%1) + + + + Bold + Tučné + + + + Italic + Kurzíva + + + + StrikeOut + Přeškrtnutí + + + + Underline + Podtržení + + + + + Select a image for Bible wallpaper + Vyberte obrázek pro pozadí Bible + + + Images (*.png *.jpg *.jpeg) + Obrázky (*.png *.jpg *.jpeg) + + + + BibleWidget + + + Form + Formulář + + + + Search: + Hledat: + + + + Search the bible for specified text. Matched verses will appear in the list below. If a bible book is selected, only that book will be searched. + Hledat v Bibli zadaný text. Odpovídající verše se objeví v seznamu dole. Když byla vybrána kniha z Bible, hledá se jen v této knize. + + + If selected, only Bible verses starting with the search string will be searched. + Když je vybráno, hledají se jen biblické verše, které začínají hledaným pojmem. + + + Begins + Začíná + + + If selected, Bible verses that contain the search string will be searched. + Když je vybráno, prohledávají se jen biblické verše, které obsahují hledaný pojem. + + + Contains + Obsahuje + + + + + Quickly display the selected Bible verse on the screen + Rychlé zobrazení vybraného biblického verše na promítací ploše + + + + Search + Hledat + + + + Return + Return + + + Limit search to: + Hledání omezit na: + + + If selected, the entire bible will be searched. + Když je vybráno, prohledává se celá Bible. + + + + Entire Bible + Celá Bible + + + If selected, only the selected Bible book will be searched. + Když je vybráno, prohledává se pouze vybraná kniha Bible. + + + + Current Book + Současná kniha + + + If selected, only the selected chapter of the selected Bible book will be searched. + Když je vybráno, prohledává se pouze vybraná kapitola z vybrané knihy Bible. + + + + Current Chapter + Současná kapitola + + + + Hide +Results + Skrýt +výsledky + + + + Results: + Výsledky: + + + + Select search range + Vybrat rozsah hledání + + + + Select search type + Vybrat typ hledání + + + + Contains Phrase + Obsahuje slovní spojení + + + + Contains Word Phrase + Obsahuje slovní obrat + + + + Verse Begins + Verš začíná + + + + Contains Any Word + Obsahuje jakékoli slovo + + + + Contains All Words + Obsahuje všechna slova + + + + Book: + Kniha: + + + + + + Filter criteria for the bible list. If the first character of the filter is a number, then only books starting with this number are matched. Example filters: "Deuter", "1Thes". + Filtrovat hlediska pro seznam s Biblí. Pokud je prvním znakem ve filtru číslo, potom jsou porovnávány jen knihy začínající tímto číslem. Příklad filtru: "5Mo", "1Thes". + + + + Chapter: + Kapitola: + + + + Verse: + Verš: + + + + Go Live (F5) + Ukázat (F5) + + + + F5 + F5 + + + Add currently selected verse into history list, automatically will be added when "Go Live" button is pressed + add currently selected verse into history list, automatically will be added when "Go Live" button is pressed + V současnosti vybrané verše jsou automaticky přidány do seznamu s historií stisknutím klávesy F5 + + + Add (F2) + Přidat (F2) + + + F2 + F2 + + + F3 + F3 + + + Add to history + Zur Geschichte hinzufugen + + + + This list contains verses that were sent to be shown + Tento seznam obsahuje verše, které byly poslány, aby byly ukázány + + + Remove current selected verse in the history list + Odstranit v současnosti vybrané verše v seznamu s historií + + + Remove (F3) + Remove from history + Odstranit (F3) + + + Clear all history items + Odstranit všechny položky v historii + + + Clear + Clear History + Vyprázdnit + + + Total of + Ukázáno celkem + + + search results returned. + výsledků hledání. + + + Total of 281 or more results. <font color=red>Only 281 results can be returned.</font> + Celkem 281 výsledků hledání nebo více. <font color=red>Lze ukázat jen 281 výsledků hledání.</font> + + + Total + + Celkem + + + + +results + +výsledků + + + No search results have retrieved + Nezískány žádné výsledky hledání + + + No search results + Žádné výsledky hledání + + + + Please enter search text + Zadejte, prosím, hledaný text + + + + Total +resutls: +%1 + Celkem +výsledků: +%1 + + + + No search +results. + Žádné výsledky hledání. + + + Error opening Bible histories + Chyba při otevírání historií Bible + + + Cound not find any or all Bible verses from file withing current primary Bible. +Try changing primary Bible and reopen project file. + Nepodařilo se najít nějaký nebo všechny verše Bible v souboru v současné hlavní Bibli. +Zkuste změnit hlavní Bibli a otevřete soubor s projektem znovu. + + + + BiblesModel + + + Title + Název + + + + DisplayScreen + + Form + Formulář + + + + Video Player Error + Chyba v přehrávači videa + + + + Words by: %1, Music by: %2 + Slova od: %1, Hudba od: %2 + + + + Words by: %1 + Slova od: %1 + + + + Music by: %1 + Hudba od: %1 + + + + Dispaly Screen + Zobrazovací obrazovka + + + + EditAnnouncementDialog + + + Edit Announcement + Upravit oznámení + + + + Title: + Název: + + + + ID: + ID: + + + + Use Private Settings + Použít osobní nastavení + + + + Timed slides: + Časované snímky: + + + + sec + seconds + s + + + + Loop + Smyčka + + + + Save + Uložit + + + + Cancel + Zrušit + + + + Announce + - Text of the announcement goes here + +Slide + - Text of the announcement goes here +You can have both Annouce or Slide as announcement block titles. + Oznámení + - Text oznámení zde + +Snímek + - Text oznámení zde +Můžete mít jak oznámení tak snímek jako názvy bloku oznámení. + + + + Announcement title cannot be left empty. +Please enter announcement title. + Název oznámení nelze nechat prázdný. +Zadejte, prosím, název oznámení. + + + + Announcement title is missing + Název oznámení chybí + + + + EditWidget + + + Edit and/or Add New songs + Upravit a/nebo přidat nové písně + + + + Songbook: + Zpěvník: + + + + Print + Tisk + + + + Title: + Název: + + + + Words by: + Básník: + + + + Music by: + Skladatel: + + + + Key: + Tónina: + + + + Category: + Skupina: + + + + Use Private Song Settings + Použít osobní nastavení písně + + + + Main Text Properties: + Vlastnosti hlavního textu: + + + + + + Color... + Barva... + + + + + + Font... + Písmo... + + + + Main Text Alignment: + Zarovnání hlavního textu: + + + + Song Information Properties: + Vlastnosti informací o písni: + + + + Song Ending Properties: + Vlastnosti zakončení písně: + + + + Use Background: + Použít obrázek pozadí: + + + Align Vertical: + Zarovnat svisle: + + + + Top + Nahoře + + + + Middle + Uprostřed + + + + Bottom + Dole + + + Align Horizontal + Zarovnat vodorovně + + + + Other + Jiné + + + Text Alingment + Zarovnání textu + + + + Left + Vlevo + + + + Center + Na střed + + + + Right + Vpravo + + + Text Color... + Barva textu... + + + Text Font... + Písmo textu... + + + + Browse... + Procházet... + + + Use default + Použít výchozí + + + Text font: + Písmo textu: + + + Background: + Pozadí: + + + + Notes: + Bere na vědomí: + + + Comments: + Poznámky: + + + + Save + Uložit + + + + Ctrl+S + Ctrl+S + + + + Cancel + Zrušit + + + + Ctrl+Q + Ctrl+Q + + + + Add a new Songbook + Přidat nový zpěvník + + + + Select Songbook + Vybrat zpěvník + + + + Select a Songbook to which you want to add a song + Vyberte zpěvník, do kterého chcete přidat píseň + + + + Song title cannot be left empty. +Please enter song title. + Název písně nemůže zůstat nevyplněn. +Zadejte, prosím, název písně. + + + + Song title is missing + Název písně chybí + + + + Cannot find exact match in database + V databázi nelze najít přesnou shodu + + + + The exact match of a song you are editing was not found in database. +In order to edit this song, you need to add it to database. + +Please select a Songbook to which you want to copy this song to: + Přesná shoda písně, kterou upravujete, v databázi nalezena nebyla. +Abyste tuto píseň mohl upravit, musíte ji přidat do databáze. + +Vyberte, prosím, zpěvník, do kterého tuto píseň chcete zkopírovat: + + + + Copy to a new Songbook + Kopírovat do nového zpěvníku + + + + Select a Songbook to which you want to copy this song to + Vybrat zpěvník, do kterého chcete píseň kopírovat + + + Verse 1 + - words of verse go here + +Refrain + - words of Chorus/Refrain +go here + +Verse 2 + - words of verse go here + Verš 1 + - Slova verše zde + +Sbor + - Slova sboru zde + +Verš 2 + - Slova verše zde + + + + Add a Songbook + Přidat zpěvník + + + Select a picture for the wallpaper + Vyberte obrázek pro pozadí + + + + Verse 1 + - words of verse go here + +Refrain +- words of Chorus/Refrain +go here + +Verse 2 + - words of verse go here + Verš 1 + - Slova verše zde + +Sbor + - Slova sboru/refrénu zde + +Verš 2 + - Slova verše zde + + + + Bible Stories + Biblické příběhy + + + + Gospel + Slovo Boží + + + + God, His love and greatness + Bůh, Jeho láska a velikost + + + + The Resurrection of Christ + Zmrtvýchvstání Kristovo + + + + Time + Čas + + + + The second coming of Christ and the judgement + Druhý příchod Krista a soud + + + + Children and Family + Děti a rodina + + + + For new converts + Pro nové konvertity + + + + Spiritual struggle and victory + Duchovní boj a vítězství + + + + Harvest + Žně + + + + Jesus Christ + Ježíš Kristus + + + + Love + Láska + + + + Prayer + Modlitebník + + + + Youth + Mládí + + + + Mother + Matka + + + + Wedding + Svatba + + + + Baptism + Křest + + + + Sunset / Sunrise + Západ/Východ slunce + + + + New Years + Nové roky + + + + Funeral + Pohřeb + + + + At the ordination + Svěcení + + + + On the Lord's Supper + Pánova večeře + + + + Heavenly abode + Nebeský příbytek + + + + Instruction and self-test + Pokyn a zkouška sebe + + + + Holy Ghost + Duch svatý + + + + Church + Kostel + + + + Before church meeting + Před shromáždění věřících v kostele + + + + Last Days + Poslední dny + + + + Practical life with God + Skutečný život s Bohem + + + + At the end of church meeting + Na konci shromáždění věřících v kostele + + + + Welcome and farewell + Uvítání a rozloučení + + + + The call to work + Volání do práce + + + + Call to repentance + Volání k lítosti + + + + Journey of faith, faith and hope + Cesta víry, víra a naděje + + + + Various Christian holidays + Různé křesťanské svátky + + + + Determination and faithfulness + Odhodlání a věrnost + + + + Christmas + Vánoce + + + + Following Christ + Následování Krista + + + + The Word of God + Slovo boží + + + + Salvation + Spása + + + + Suffering and death of Christ + Utrpení a smrt Krista + + + + Consolation and encouragement + Útěcha a povzbuzení + + + + Praise and thanksgiving + Chvála a díkůvzdání + + + + Christian Joy + Křesťanská radost + + + + Select an image for the wallpaper + Vyberte obrázek pro pozadí + + + + Images(%1) + Obrázky (%1) + + + + GeneralSettingWidget + + Form + Formulář + + + + If checked, the screen "window" is always drawn on top of other windows. This prevents the user from accidently drawing a window onto the projector's screen. + Je-li vybráno, je "okno" pro promítací plochu ukazováno vždy v popředí. Tím se zamezuje tomu, aby se na promítací ploše promítacího stroje ukazovala další okna. + + + + Display window always on top + Promítací plochu ukazovat vždy v popředí + + + + Theme: + Motiv: + + + + Add New Theme + Přidat nový motiv + + + + Primary Display Screen: + Hlavní zobrazovací obrazovka: + + + + Secondary Display Screen: + Vedlejší zobrazovací obrazovka: + + + + Primary Display Screen Controls + Ovládací prvky hlavní zobrazovací obrazovky + + + + Button Size: + Velikost tlačítka: + + + + 16x16 + 16 x 16 + + + + 24x24 + 24 x 24 + + + + 32x32 + 32 x 32 + + + + 48x48 + 48 x 48 + + + + 64x64 + 64 x 64 + + + + 96x96 + 96 x 96 + + + + Alignment: + Zarovnání: + + + + Top + Nahoře + + + + Middle + Uprostřed + + + + Bottom + Dole + + + + Left + Vlevo + + + + Center + Na střed + + + + Right + Vpravo + + + + Opacity: + Neprůhlednost: + + + + Transparent + Průhledné + + + + Opaque + Neprůhledné + + + + NOTE: Display screen controls will be visible on the primary display screen only when one monitor is avaliable. + Poznámka: Ovládací prvky zobrazovací obrazovky budou viditelné na hlavní zobrazovací obrazovce, jen když bude toto zobrazovací zařízení dostupné. + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + Užitečné, když používáte obrázek na pozadí. Zobrazuje zvláštní stínový účinek. + + + Use shadow + Použít stín + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + Je-li vybráno, při přepínání zobrazovaného textu starý text pozvolna mizí a nový text se zvolna objevuje. + + + Use fading effects + Použít prolínací účinek + + + Use blurred shadow + Použít rozmazaný stín + + + Use Passive Background Image + Použít nečinný obrázek pozadí + + + Browse... + Procházet... + + + + Display Screen Selection + Volba zobrazovací obrazovky + + + Display Screen: + Zobrazovací obrazovka: + + + + + Select onto which screen to dispaly + Vybrat, na které obrazovce se má zobrazovat + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600; color:#ff0000;">NOTE:</span><span style=" font-size:8pt; color:#ff0000;"> Display screen selection is currenly under development. Changing the screen number, will change on which screen projection will be displayed.<br />On Windows, order is from left-to-right.</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600; color:#ff0000;">NOTE:</span><span style=" font-size:8pt; color:#ff0000;"> Display screen selection is currenly under development. Changing the screen number, will change on which screen projection will be displayed.<br />On Windows, oder is from right-to-left.</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600; color:#ff0000;">POZNÁMKA:</span><span style=" font-size:8pt; color:#ff0000;">Volba zobrazovací obrazovky se v současnosti vyvíjí. Změna čísla obrazovky změní obrazovku, na které se promítání zobrazí.<br />U Windows je pořadí zleva doprava.</span></p></body></html> + + + + Reset All To Default + Nastavit vše znovu na výchozí + + + Select a image for main wallpaper + Vyberte obrázek pro hlavní pozadí + + + Images (*.png *.jpg *.jpeg) + Obrázky (*.png *.jpg *.jpeg) + + + + none + žádné + + + + None + Žádné + + + + Edit Theme + Upravit motiv + + + + Theme Name: + Název motivu: + + + + Comments: + Poznámky: + + + + Default + Výchozí + + + + This theme will contain program default settings. + Tento motiv bude obsahovat výchozí nastavení programu. + + + + HelpDialog + + + softProjector Help + Nápověda k softProjectoru + + + + about:blank + o:prázdný + + + + Close + Zavřít + + + + Ctrl+Q + Ctrl+Q + + + + ManageDataDialog + + + Manage Database + Spravovat databázi + + + + Bibles + Bible + + + + + + Download +&& Import... + Stažení +a zavedení... + + + + Import a new Bible into your database + Zavést novou Bibli do databáze + + + + + + &Import... + &Zavést... + + + + + + + Ctrl+I + Ctrl+I + + + + Edit Bible title of currently selected Bible. + Upravit název Bible u nyní vybrané Bible. + + + + + + &Edit... + &Upravit... + + + + + + Ctrl+E + Ctrl+E + + + + Export currently selected Bible to share with others. + Vyvést nyní vybranou Bibli ke sdílení s ostatními. + + + + + + E&xport... + V&yvést... + + + + + + + Ctrl+X + Ctrl+X + + + + Delete a Bible that you will no longer want to use in this program. + Smazat Bibli, kterou už dále v tomto programu nechcete používat. + + + + + + &Delete... + S&mazat... + + + + + + Ctrl+D + Ctrl+D + + + + Songbooks + Zpěvníky + + + + + + Import a new Songbook into database. + Zavést nový zpěvník do databáze. + + + + + Edit the title and information about the Songbook. + Upravit název a informace o zpěvníku. + + + + + + Export currently selected Songbook to be able to share with others and for backup. + Vyvést nyní vybraný zpěvník ke sdílení s ostatními a kvůli záloze. + + + + + Delete currently selected Songbook from database. + Smazat nyní vybraný zpěvník z databáze. + + + + Themes + Motivy + + + + &New... + &Nový... + + + + Export All... + Vyvést vše... + + + + Close Manage Database Dialog + Zavřít dialog “Spravovat databázi” + + + + Close + Zavřít + + + + Ctrl+Q + Ctrl+Q + + + + Select a songbook to import + Vybrat zpěvník k zavedení + + + softProjector songbook file + Soubor se zpěvníkem pro softProjector + + + + + Importing... + Zavádí se... + + + + + + Cancel + Zrušit + + + User songbook + Uživatelův zpěvník + + + Songbook imported by the user + Zpěvník zavedený uživatelem + + + + Too old SongBook file format + Příliš starý souborový formát zpěvníku + + + The SongBook file you are opening, is in very old format +and is no longer supported by current version of softProjector. +You may try to import it with version 1.07 and then export it, and import it again. + Soubor zpěvníku, jejž otevíráte, je ve velmi starém formátu, +která současnou verzí softProjectoru už není podporována. +Můžete zkusit jeho zavedení s verzí 1.07, a potom jej vyvést a znovu zavést. + + + + Save the songbook as: + Uložit zpěvník jako: + + + softProjector songbook file (*.sps) + Soubor se zpěvníkem pro softProjector (*.sps) + + + + Export complete + Vyvedení dokončeno + + + + The songbook " + Zpěvník " + + + + " +Has been saved to: + + " +Uložen jako: + + + + + Delete songbook? + Smazat zpěvník? + + + + + Are you sure that you want to delete: + Jste si jistý, že chcete smazat: + + + + This action will permanentrly delete this songbook + Tímto krokem bude zpěvník neodvolatelně smazán + + + + Select Bible file to import + Vybrat soubor s Biblí k zavedení + + + + + SoftProjector Bible file + Soubor s Biblí pro softProjector + + + Old Bible file format + Starý formát souboru s Biblí + + + The Bible format you are importing is of an old version. +Your current SoftProjector does not support this format. +Please download lattest Bibles and import them. + The Bible format you are importing is of an old version. +Your current SoftProjector does not support this format. +Please download lattest Bibles and import them + Formát Bible, který zavádíte, je ve staré verzi. +SoftProjector, který používáte nyní, tento formát nepodporuje. +Stáhněte si, prosím, Bible v posledním formátu a zaveďte je. + + + + New Bible file format + Nový formát souboru s Biblí + + + + The Bible format you are importing is of an new version. +Your current SoftProjector does not support this format. +Please upgrade SoftProjector to latest version. + Formát Bible, který zavádíte, je v nové verzi. +SoftProjector, který používáte nyní, tento formát nepodporuje. +Povyšte, prosím, SoftProjector na poslední verzi. + + + + SoftProjector songbook file + Soubor se zpěvníkem pro softProjector + + + + The SongBook file you are opening, is of a later release and +is not supported by current version of SoftProjector. +You are trying to open SongBook version %1. +Please upgrade to latest version of SoftProjector and try again. + Soubor zpěvníku, jejž otevíráte, je ve velmi starém formátu, +který současnou verzí softProjectoru už není podporován. +Pokoušíte se o otevření zpěvníku verze %1. +Povyšte, prosím, na nejnovější verzi SoftProjectoru a zkuste to znovu. + + + + + Unsupported SongBook version. + Nepodporovaná verze zpěvníku. + + + + The SongBook file you are opening, is not supported +by current version of SoftProjector. + + Soubor zpěvníku, který otevíráte, není nynější +verzí SoftProjectoru podporován. + + + + + The SongBook file you are opening, is in very old format +and is no longer supported by current version of SoftProjector. +You may try to import it with version 1.07 and then export it, and import it again. + Soubor zpěvníku, jejž otevíráte, je ve velmi starém formátu, +který současnou verzí softProjectoru už není podporován. +Můžete zkusit jeho zavedení s verzí 1.07, a potom jej vyvést a znovu zavést. + + + + SoftProjector songbook file (*.sps) + Soubor se zpěvníkem pro softProjector (*.sps) + + + + + An error has ocured when overwriting existing file. +Please try again with different file name. + Při přepisování stávajícího souboru se vyskytla chyba. +Zkuste to, prosím, znovu s jiným názvem souboru. + + + + The Bible format you are importing is of an usupported file version. +Your current SoftProjector version does not support this format. + Formát Bible, který zavádíte, je v nepodporované verzi. +SoftProjector, který používáte nyní, tento formát nepodporuje. + + + + Unsupported Bible file format + Nepodporovaný formát souboru s Biblí + + + + + Edit Theme + Upravit motiv + + + + + Theme Name: + Název motivu: + + + + + Comments: + Poznámky: + + + + Default + Výchozí + + + + This theme will contain program default settings. + Tento motiv bude obsahovat výchozí nastavení programu. + + + + Select a Theme to import + Vybrat motiv k zavedení + + + + + SoftProjector Theme file + Soubor se vzhledem pro softProjector + + + + Importing Themes... + Zavádí se témata vzhledu... + + + + The Theme file you are opening, is of a later release and +is not supported by current version of SoftProjector. +You are trying to open Theme version %1. +Please upgrade to latest version of SoftProjector and try again. + Soubor s tématem vzhledu, jejž otevíráte, je ve velmi starém formátu, +který současnou verzí softProjectoru už není podporován. +Pokoušíte se o otevření tématu vzhledu verze %1. +Povyšte, prosím, na nejnovější verzi SoftProjectoru a zkuste to znovu. + + + + + Unsupported Theme version. + Nepodporovaná verze tématu vzhledu. + + + + The Theme file you are opening, is not supported +by current version of SoftProjector. + + Soubor s tématem vzhledu, který otevíráte, není nynější +verzí SoftProjectoru podporován. + + + + + softProjector Theme file + Soubor s motivem pro softProjector + + + + Error opening module list. + Chyba při otevírání seznamu modulů. + + + + Failed to open mod list + Nepodařilo se otevřít seznam modulů + + + + +Downloading: %1 +From: %2 + +Stahuje se: %1 +Z: %2 + + + + Error opening save file %1 for download %2 +Error: %3 + Chyba při otevírání uloženého souboru %1 pro stažení %2 +Chyba: %3 + + + + Error downloading module list. + Chyba při stahování seznamu modulů. + + + + Bible Module Download + Stažení modulu Bible + + + + Songbook Module Download + Stažení modulu zpěvníku + + + + Theme Module Download + Stažení modulu motivu + + + + Download Error: %1 + Chyba při stahování: %1 + + + + Saved to: %1 + Uloženo do: %1 + + + + +Importing: %1 + +Zavádí se: %1 + + + + Export Theme as: + Vyvést motiv jako: + + + + Export all theme as: + Vyvést všechny motivy jako: + + + + Exporting Themes... + Vyvádí se témata vzhledu... + + + + Delete Theme? + Smazat motiv? + + + + Are you sure that you want to delete theme: + Jste si jistý, že chcete smazat motiv: + + + + This action will permanentrly delete this theme + Tímto krokem bude motiv neodvolatelně smazán + + + All supported Bible files + Všechny podporované soubory s Biblemi + + + softProjector Bible file + Soubor s Biblí pro softProjector + + + Unbound Bible file + Soubor s Biblí Unbound + + + + Save exported Bible as: + Uložit vyvedenou Bibli jako: + + + + Exporting... + Vyvádí se... + + + + Bible has been exported + Bibel byla vyvedena + + + + Bible: + + Bible: + + + + + +Has been saved to: + + +Byla uložena jako: + + + + + Delete Bible? + Smazat Bibli? + + + + This action will permanentrly delete this Bible + Tímto krokem bude Bible neodvolatelně smazána + + + + Edit Songbook + Upravit zpěvník + + + Edit Bible name + Upravit název Bible + + + Bible title: + Název Bible: + + + + MediaWidget + + + Form + Formulář + + + + - Media Library - + - Knihovna médií - + + + + Go Live (F5) + Ukázat (F5) + + + + F5 + F5 + + + + Open + Otevřít + + + + Aspect Ratio: + Poměr stran: + + + + Auto + Automaticky + + + + Scale + Měřítko + + + + 4/3 + 4/3 + + + + 16/9 + 16/9 + + + + + <center>No media</center> + <center>Žádná multimédia</center> + + + + No Media + Žádná multimédia + + + + Open Music/Video File + Otevřít soubor s hudbou/obrazovým záznamem + + + + + Media Files (%1);;Audio Files (%2);;Video Files (%3) + Multimediální soubory (%1);;Soubory se zvukem (%2);;Soubory s obrazovým záznamem (%3) + + + + Select Music/Video Files to Open + Vybrat soubory s hudbou/obrazovým záznamem k otevření + + + + ModuleDownloadDialog + + + Dialog + Dialog + + + + Select modules you wish to download and import. + Vyberte moduly, které chcete stáhnout a zavést. + + + + Select All + Vybrat vše + + + + Deselect All + Zrušit výběr všeho + + + + ModuleProgressDialog + + + Download / Import Progress Dialog + Dialog pro stahování/postup + + + + Current Progress: + Nynější postup: + + + + Total Progress: + Celkový postup: + + + + Close + Zavřít + + + + Native language name + + English + Český + + + + English + Do not change + Český + + + + PassiveSettingWidget + + Form + Formulář + + + + + Use Passive Background Image + Použít nehybný obrázek pozadí + + + + + Browse... + Procházet... + + + + Use Separate Secondary Display Screen Settings + Použít nastavení pro samostatnou vedlejší zobrazovací obrazovku + + + + Reset All To Default + Nastavit vše znovu na výchozí + + + + + Select a image for passive wallpaper + Vyberte obrázek pro nehybné pozadí + + + + + Images(%1) + Obrázky (%1) + + + Images (*.png *.jpg *.jpeg) + Obrázky (*.png *.jpg *.jpeg) + + + + PictureSettingWidget + + Picture Settings + Nastavení obrázků + + + + When Displaying Slideshows: + Při zobrazení promítání snímků: + + + + Expand Small Images + Roztáhnout malé obrázky + + + + Fit Images To Screen + Přizpůsobit obrázky obrazovce + + + + Fit Images To Screen By Expanding + Přizpůsobit obrázky obrazovce pomocí roztažení + + + + Resize Large Images on Import + Změnit velikost velkých obrázků při zavádění + + + + It is highly recommended to reduce large images on import. This will improve load, save and display time of slideshows. +We recommend to resize images to display screen size. + Doporučuje se zmenšit velikost velkých obrázků při zavádění. Tím se zrychlí nahrávání, ukládání a zobrazování promítání snímků. +Doporučuje se změna velikosti obrázků na velikost zobrazovací obrazovky. + + + + Bound Box: + Rozlišení: + + + + 800 x 800 + 800 x 800 + + + + 1024 x 1024 + 1024 x 1024 + + + + 1280 x 1280 + 1280 x 1280 + + + + 1366 x 1366 + 1366 x 1366 + + + + 1440 x 1440 + 1440 x 1440 + + + + 1600 x 1600 + 1600 x 1600 + + + + 1920 x 1920 + 1920 x 1920 + + + + Custom + Vlastní + + + + Inalid Numeric Value + Neplatná číselná hodnota + + + + Entered '%1' custom width is not numeric. + Zadaná vlastní šířka '%1' není číselná. + + + + PictureWidget + + + Form + Formulář + + + + Slide Shows: + Promítání snímků: + + + + Go Live (F5) + Ukázat (F5) + + + + F5 + F5 + + + + + Picture Preview + Náhled na obrázek + + + + Picture Information + Informace o obrázku + + + + Edit Preview Slide Show: + Upravit náhled na promítání snímků: + + + + Add + Přidat + + + + Remove + Odstranit + + + Add Pictures + Přidat obrázky + + + Remove Picture + Odstranit obrázek + + + + Clear + Vyprázdnit + + + + Editing slide show here will not change anything in database. To have save changes, use "New Slide Show" or "Edit Slide Show". + Upravením promítání snímků zde se v databázi nic nezmění. Pro uložení změn použijte Nové promítání snímků nebo Upravit promítání snímků. + + + + + Preview slide: + Náhled na snímek: + + + + Select Images to Open + Vybrat obrázky k otevření + + + Images(*.png *.jpg *.jpeg) + Obrázky (*.png *.jpg *.jpeg) + + + + Images(%1) + Obrázky (%1) + + + + Adding files... + Přidávají se soubory... + + + + Cancel + Zrušit + + + + Slide Show: %1 + Promítání snímků: %1 + + + + PrintPreviewDialog + + + softProjector Print Dialog + Tisk dialog softProjectoru + + + + Margins: + Okraje: + + + + Left Margin + Levý okraj + + + + L: + L: + + + + Top Margin + Horní okraj + + + + T: + H: + + + + Right Margin + Pravý okraj + + + + R: + P: + + + + Bottom Margin + Dolní okraj + + + + B: + D: + + + + Inch + Palec + + + + Millimeter + Milimetr + + + + Pixel + Pixel + + + + Point + Bod + + + + Font: + Písmo: + + + + To PDF + Do PDF + + + + Print + Tisk + + + + Tune: %1 + + Vyladit: %1 + + + + + Words By: %1 Music By: %2 + + + Slova od: %1 Hudba od: %2 + + + + + + Words By: %1 + + + Slova od: %1 + + + + + + Music By: %1 + + + Hudba od: %1 + + + + + + + +Notes: +%1 + + +Poznámky: +%1 + + + + Announcements: %1 + + + Oznámení: %1 + + + + + SoftProject Schedule: + Plán SoftProjectoru: + + + + Save PDF as + Uložit PDF jako + + + + SettingsDialog + + + softProjector - Settings + Nastavení softProjectoru + + + + General + Obecné + + + + Passive + Nehybné pozadí + + + + Bible + Bible + + + + Picture + Obrázek + + + + Media + Multimédia + + + + Announcements + Oznámení + + + + General SoftProjector Settings + Obecná nastavení pro softProjector + + + + Passive Settings + Nastavení při nečinnosti + + + + This setting are displayed when nothing is to be projected. + Tato nastavení se zobrazují, když není co promítat. + + + + Bible Settings + Nastavení Bible + + + + Song Settings + Nastavení písně + + + + Picture Settings + Nastavení obrázku + + + + Media Settings + Nastavení multimédií + + + + Announcement Settings + Nastavení oznámení + + + Primary Bible: + Hlavní Bible: + + + Secondary Bible: + Vedlejší Bible: + + + If checked, the screen "window" is always drawn on top of other windows. This prevents the user from accidently drawing a window onto the projector's screen. + Je-li vybráno, je "okno" pro promítací plochu ukazováno vždy v popředí. Tím se zamezuje tomu, aby se na promítací ploše promítacího stroje ukazovala další okna. + + + Display window always on top + Promítací plochu ukazovat vždy v popředí + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + Je-li vybráno, při přepínání zobrazovaného textu starý text pozvolna mizí a nový text se zvolna objevuje. + + + Use fading effects + Použít prolínací účinek + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + Užitečné, když používáte obrázek na pozadí. Zobrazuje zvláštní stínový účinek. + + + Use blurred shadow + Použít rozmazané stíny + + + Change Font... + Změnit písmo... + + + Text color: + Barva textu: + + + Choose color... + Vybrat barvu... + + + Active wallpaper + Činné pozadí + + + Browse... + Procházet... + + + Remove wallpaper + Odstranit pozadí + + + Passive wallpaper + Nečinné pozadí + + + + Songs + Písně + + + Show song number + Ukázat číslo písně + + + Show song key + Ukázat tóninu písně + + + Show stanza title + Ukázat název sloky + + + None + Žádné + + + Select a picture for the wallpaper + Vybrat obrázek pro pozadí + + + Images (*.png *.jpg *.jpeg) + Obrázky (*.png *.jpg *.jpeg) + + + + OK + OK + + + + Cancel + Zrušit + + + + Apply + Použít + + + + SlideShowEditor + + + Slide Show Editor + Editor promítání snímků + + + + Slide Show Title: + Název promítání snímků: + + + + Slide Show Info: + Informace o promítání snímků: + + + + Add Pictures + Přidat obrázky + + + + Remove Picture + Odstranit obrázek + + + + Picture Preview + Náhled na obrázek + + + + Picture Information + Informace o obrázku + + + + Save + Uložit + + + + + Cancel + Zrušit + + + + Select Images to Open + Vybrat obrázky k otevření + + + Images(*.png *.jpg *.jpeg) + Obrázky (*.png *.jpg *.jpeg) + + + + Images(%1) + Obrázky (%1) + + + + Adding files... + Přidávají se soubory... + + + + Slide show title cannot be left empty. +Please enter a title. + Název promítání obrázků nemůže zůstat nevyplněn. +Zadejte, prosím, název promítání obrázků. + + + + Slide show title is missing + Název promítání obrázků chybí + + + + Saving Slide Show + Ukládá se promítání snímků + + + + Preview slide: %1 + Náhled na snímek: %1 + + + + SoftProjector + + This software is free and Open Source. If you can help in improving this program please visit softprojector.sourceforge.net + This software is free and Open Source. If you can help in improving this program please visit sourceforge.net/projects/softprojector/ + Tento program je zdarma a jeho kód je otevřen. Pokud můžete a chcete pomoci při zlepšování tohoto programu, navštivte, prosím, stránky na adrese sourceforge.net/projects/softprojector/ + + + + + Bible (F6) + Bible (F6) + + + + + Songs (F7) + Písně (F7) + + + + + Pictures + Obrázky + + + + + Media + Média + + + + + Announcements (F8) + Oznámení (F8) + + + Project not saved + project as in document file + Projekt neuložen + + + Do you want to save current project? + project as in document file + Chcete uložit nynější projekt? + + + Announcement + Oznámení + + + Words by: %1, Music by: %2 + Slova od: %1, Hudba od: %2 + + + Words by: %1 + Slova od: %1 + + + Music by: %1 + Hudba od: %1 + + + + Cannot start new edit + Nelze začít novou úpravu + + + + + + Another song is already been edited. + Another song is already beeb edited. + Již je upravována jiná píseň. + + + + Schedule not saved + Rozvrh neuložen + + + + Do you want to save current schedule? + Chcete uložit nynější rozvrh? + + + + &Clear Bible History List + &Smazat seznam s historií Bible + + + + &New Song... + &Nová píseň... + + + + &Edit Song... + &Upravit píseň... + + + + &Copy Song... + &Kopírovat píseň... + + + + &Delete Song + &Smazat píseň + + + + &New Slide Show... + &Nové promítání snímků... + + + + &Edit Slide Show... + &Upravit promítání snímků... + + + + &Delete Slide Show + &Smazat promítání snímků + + + + &Add Media Files... + &Přidat multimediální soubory... + + + + &Remove Media Files + &Odstranit multimediální soubory + + + + &New Announcement... + &Nové oznámení... + + + + &Edit Announcement... + &Upravit oznámení... + + + + &Copy Announcement... + &Kopírovat oznámení... + + + + &Delete Announcement + &Smazat oznámení + + + + + + Please save and/or close current edited song before edited a different song. + Uložte, prosím, a/nebo zavřete nyní upravovanou píseň, předtím než začnete upravovat jinou píseň. + + + + + + + No song selected + Nebyla vybrána žádná píseň + + + No song has been selected to be edited. + Nebyla vybrána žádná píseň pro úpravy. + + + Please select a song to be edited. + Vyberte, prosím, píseň pro úpravy. + + + + Cannot create a new song + Nelze vytvořit novou píseň + + + + No song has been selected to edit. + Nebyla vybrána žádná píseň pro úpravy. + + + + Please select a song to edit. + Vyberte, prosím, píseň pro úpravy. + + + + Cannot copy this song + Nelze kopírovat tento píseň + + + + No song has been selected to copy + Nebyla vybrána žádná píseň ke kopírování + + + + Please select a song to copy + Vyberte, prosím, píseň pro kopírování + + + + No song has been selected to delete + Nebyla vybrána žádná píseň ke smazání + + + + Please select a song to delete + Vyberte, prosím, píseň ke smazání + + + + + No slideshow selected + Nebylo vybráno žádné promítání snímků + + + + No slideshow has been selected to edit. + Nebylo vybráno žádné promítání snímků pro úpravy. + + + + Please select a slideshow to edit. + Vyberte, prosím, promítání snímků pro úpravy. + + + + Delete slideshow? + Smazat promítání snímků? + + + + Delete slideshow: " + Smazat promítání snímků: " + + + + This action will permanentrly delete this slideshow + Tímto krokem bude promítání snímků neodvolatelně smazáno + + + + No slideshow has been selected to delete. + Nebylo vybráno žádné promítání snímků ke smazání. + + + + Please select a slideshow to delete. + Vyberte, prosím, promítání snímků ke smazání. + + + + No media selected + Nebyla vybrána žádná multimédia + + + + No media item has been selected to delete. + Nebyla vybrána žádná multimédiální položka ke smazání. + + + + Please select a media item to delete. + Vyberte, prosím, multimédiální položku ke smazání. + + + + + + No Announcement Selected + Nebylo vybráno žádné oznámení + + + + No announcement has been selected to edit + Nebylo vybráno žádné oznámení pro úpravy + + + + Please select an announcement to edit + Vyberte, prosím, oznámení pro úpravy + + + + No announcement has been selected to copy + Nebylo vybráno žádné oznámení ke kopírování + + + + Please select an announcement to copy + Vyberte, prosím, oznámení ke kopírování + + + + Delete Announcement? + Smazat oznámení? + + + + Delete announcement: " + Smazat oznámení: " + + + + This action will permanentrly delete this announcement + Tímto krokem bude oznámení neodvolatelně smazáno + + + + No announcement has been selected to delete + Nebylo vybráno žádné oznámení ke smazání + + + + Please select an announcement to delete + Vyberte, prosím, oznámení ke smazání + + + + No song has been selected to be printed. + Nebyla vybrána žádná píseň k vytištění. + + + + Please select a song to be printed. + Vyberte, prosím, píseň pro tisk. + + + + No announcement selected + Nebylo vybráno žádné oznámení + + + + No announcement has been selected to be printed. + Nebylo vybráno žádné oznámení k vytištění. + + + + Please select a announcement to be printed. + Vyberte, prosím, oznámení pro tisk. + + + + + + Save Schedule? + Uložit rozvrh? + + + + Do you want to save current schedule before creating a new schedule? + Chcete uložit nynější rozvrh před vytvořením nového rozvrhu? + + + + Do you want to save current schedule before opening a new schedule? + Chcete uložit nynější rozvrh před otevřením nového rozvrhu? + + + + Open SoftProjector schedule: + Otevřít rozvrh SoftProjectoru: + + + + + SoftProjector schedule file + Soubor s rozvrhem pro SoftProjector + + + + Save SoftProjector schedule as: + Uložit rozvrh SoftProjectoru jako: + + + Open softProjector schedule: + Otevřít rozvrh softProjectoru: + + + softProjector schedule file + Soubor s rozvrhem pro softProjector + + + Save softProjector schedule as: + Uložit rozvrh softProjectoru jako: + + + + Do you want to save current schedule before closing it? + Chcete uložit nynější rozvrh před jeho zavřením? + + + + Saving schedule file... + Ukládá se soubor s rozvrhem... + + + + An error has ocured when overwriting existing file. +Please try again with different file name. + Při přepisování stávajícího souboru se vyskytla chyba. +Zkuste to, prosím, znovu s jiným názvem souboru. + + + + Opening schedule file... + Otevírá se soubor s rozvrhem... + + + + The schedule file you are trying to open is of uncompatible version. +Compatible version: 2 +This schedule file version: + Soubor s rozvrhem, který se pokoušíte otevřít, je v neslučitelné verzi. +Slučitelná verze: 2 +Verze tohoto souboru s rozvrhem: + + + English + Angličtina + + + Save Project? + project as in document file + Uložit projekt? + + + Do you want to save current project before opening other? + project as in document file + Chcete uložit nynější projekt před otevřením jiného? + + + Open softProjector project + Otevřít projekt softProjectoru + + + softProjector project file + Soubor s projektem pro softProjector + + + Save softProjector project as: + Uložit projekt softProjectoru jako: + + + Save Project? + Uložit projekt? + + + Do you want to save current project before creating a new project? + Chcete uložit nynější projekt před vytvořením nového projektu? + + + Do you want to save current project before closing it? + Chcete uložit nynější projekt před jeho zavřením? + + + Incorrect project file format + Nesprávný formát souboru s projektem + + + The softProjector project file you are opening, +is not supported by your version of softProjector. +You may try upgrading your version of softProjector. + Souboru s projektem pro softProjector, který otevíráte, +není podporován vaší verzí softProjectoru. +Můžete zkusit povýšit svou verzi softProjectoru. + + + No song has been selected to be edited + Nebyla vybrána žádná píseň pro úpravy + + + Please select a song to be edited + Vyberte, prosím, píseň pro úpravy + + + No song has been selected to be copied + No song has been selected to be coppied + Nebyla vybrána žádná píseň pro kopírování + + + Please select a song to be copied + Please select a song to be coppied + Vyberte, prosím, píseň pro kopírování + + + + Delete song? + Smazat píseň? + + + + Delete song " + Smazat píseň " + + + No song has been selected to be deleted + Nebyla vybrána žádná píseň ke smazání + + + Please select a song to be deleted + Vyberte, prosím, píseň ke smazání + + + Are you sure that you want to delete a song? + Sind Sie sich sicher, dass Sie ein Lied loschen mochten? + + + + This action will permanentrly delete this song + Tímto krokem bude tato píseň neodvolatelně smazána + + + + SoftProjectorClass + + + Tab + Karta + + + Stop displaying text to the screen (display black screen or wallpaper). Sortcut for this button is the Escape key. + Zastavit zobrazování textu na promítací ploše (ukazovat černou promítací plochu nebo pozadí). Klávesovou zkratkou pro to je klávesa Esc. + + + Hide (Esc) + Skrýt (Esc) + + + + Esc + Esc + + + If Clear was pressed earlier, this will re-display the text to the screen + Pokud bylo dříve stisknuto Smazat,bude text znovu zobrazen na promítací ploše + + + Show (F4) + Ukázat (F4) + + + + F4 + F4 + + + + Use Multi Verse + Použít více veršů + + + + Service Schedule: + Rozvrh služby: + + + + If selected, this will allow to select multiple verses at one time. Will need to press "Show" each time. + Je-li vybráno, umožní vám to vybrat více veršů najednou. Bude potřeba pokaždé stisknout Ukázat. + + + + &File + &Soubor + + + + &Edit + Úp&ravy + + + + + &Help + &Nápověda + + + + Select Language + Vybrat jazyk + + + + Language + Jazyk + + + + Schedule + Rozvrh + + + + Display Screen + Zobrazovací obrazovka + + + + File Tool Bar + Nástrojový pruh pro soubor + + + + Schedule Tool Bar + Nástrojový pruh pro rozvrh + + + + Edit Tool Bar + Nástrojový pruh pro úpravy + + + + Display Control Tool Bar + Nástrojový pruh pro ovládání zobrazení + + + + Import and export Bibles, songbooks and themes + Zavést a vyvést Bible, zpěvníky a motivy vzhledu + + + + Open Help + Otevřít nápovědu + + + + &Open Schedule + &Otevřít rozvrh + + + + &Save Schedule + &Uložit rozvrh + + + + Save Schedule &As + Uložit rozvrh &jako + + + + Save Schedule with different name + Uložit rozvrh pod jiným názvem + + + + &New Schedule + &Nový rozvrh + + + + Start new Schedule + Začít nový rozvrh + + + + + Close Schedule + Zavřít rozvrh + + + + Prints selected Bible chapter, selected song and selected announcement. + Vytiskne vybranou kapitolu Bible, vybranou píseň a vybrané oznámení. + + + + + Print Schedule + Vytisknout rozvrh + + + + Add to Schedule + Přidat do rozvrhu + + + + F2 + F2 + + + + Remove from Schedule + Odstranit z rozvrhu + + + + Ctrl+Del + + + + F3 + F3 + + + + Clear Schedule + Vyprázdnit rozvrh + + + + Move Item To Top + Posunout položku úplně nahoru + + + + Move Schedule item to top of the list + Posunout položku rozvrhu v seznamu úplně nahoru + + + + Move Item Up + Posunout položku nahoru + + + + Move Schedule item up + Posunout položku rozvrhu nahoru + + + + Mode Item Down + Posunout položku dolů + + + + Move Schedule item down + Posunout položku rozvrhu dolů + + + + Move Item To Bottom + Posunout položku úplně dolů + + + + Move Schedule item to bottom of the list + Posunout položku rozvrhu v seznamu úplně dolů + + + + Show + Ukázat + + + + Dsiplay to the screen (F4) + Zobrazit na obrazovce (F4) + + + + Show Passive Screen (Stop displaying to the screen) (Esc) + Ukázat pasivní obrazovku (Zastavit zobrazení na obrazovce) (Esc) + + + + Clear + Smazat + + + + Clear Display Text (Shift+Esc) + Smazat promítaný text (Shift+Esc) + + + + Shift+Esc + Shift+Esc + + + + On / Off + Zapnuto/Vypnuto + + + + Turn Display Screen On/Off + Zapnout/Vypnout zobrazení obrazovky + + + Close + Zavřít + + + Close Display Window + Zavřít promítací plochu + + + Dsiplay to the screen. + Zobrazit na obrazovce + + + + Hide + Skrýt + + + Stop displaying to the screen. + Zastavit zobrazování na obrazovce. + + + &New Project + &Nový projekt + + + + &Print + &Tisk + + + Print everything but softProjector project + Vytisknout projekt softProjector + + + Print Project + Vytisknout projekt + + + + Ctrl+Shift+P + Ctrl+Shift+P + + + + Del + Delete + + + + Donate + Darovat + + + + Donate to softProjector development team + Dejte dar vývojářům softProjectoru + + + Songs + Písně + + + toolBar + Nástrojový pruh + + + + &About + &O programu + + + + &Settings... + &Nastavení... + + + + Open settings dialog + Otevřít dialog nastavení + + + + Ctrl+T + Ctrl+T + + + + E&xit + &Ukončit + + + + Exit SoftProjector + Ukončit softProjector + + + + Ctrl+Q + Ctrl+Q + + + &Edit Current Song... + &Upravit nynější píseň... + + + + Ctrl+E + Ctrl+E + + + &New Song... + &Nová píseň... + + + + Ctrl+N + Ctrl+N + + + + &Manage Database... + &Spravovat databázi... + + + Import and export song collections and Bibles + Zavést a vyvést sbírky písní a Biblí + + + + Ctrl+M + Ctrl+M + + + &Delete Current Song + &Smazat nynější píseň + + + Ctrl+D + Ctrl+D + + + + F1 + F1 + + + Copy Current Song... + Kopírovat nynější píseň... + + + Copy current song into a new songbook + Kopírovat nynější píseň do nového zpěvníku + + + + Ctrl+C + Ctrl+C + + + + Song Counter... + Song Counter + Počítadlo písní... + + + + View + Pohled + + + &Open Project + &Otevřít projekt + + + + Ctrl+O + Ctrl+O + + + &Save Project + &Uložit projekt + + + + Ctrl+S + Ctrl+S + + + Save Project &As + Uložit projekt &jako + + + New Project + Nový projekt + + + + Ctrl+Shift+N + + + + Close Project + Zavřít projekt + + + + Ctrl+P + Ctrl+P + + + + SongCounter + + + Song Counter + Počítadlo písní + + + + Reset Selected + Nastavit vybrané znovu + + + + Reset All + Nastavit znovu vše + + + + Close + Zavřít + + + + + January + January %1, %2 + ledna + + + + + February + February %1, %2 + února + + + + + March + March %1, %2 + března + + + + + April + April %1, %2 + dubna + + + + + May + května + + + + + June + June %1, %2 + června + + + + + July + July %1, %2 + července + + + + + August + August %1, %2 + srpna + + + + + September + September %1, %2 + září + + + + + October + October %1, %2 + října + + + + + November + November %1, %2 + listopadu + + + + + December + December %1, %2 + prosince + + + + SongCounterModel + + Song Title + Název písně + + + + Number + Číslo + + + + Title + Název + + + + Count + Počet + + + + Date + Datum + + + + Songbook + Zpěvník + + + + SongSettingWidget + + Form + Formulář + + + + + Effects + Efekty + + + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + Je-li vybráno, při přepínání zobrazovaného textu starý text pozvolna mizí a nový text se zvolna objevuje. + + + + + Use fading effects + Použít prolínací účinek + + + + + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + Užitečné, když používáte obrázek na pozadí. Zobrazuje zvláštní stínový účinek. + + + + + Use shadow + Použít stín + + + + + Use blurred shadow + Použít rozmazaný stín + + + + + Song Information + Informace o písni + + + + + Show Stanza Title + Ukázat název sloky + + + + + Show Song Key + Ukázat tóninu písně + + + + + Show Song Number + Ukázat číslo písně + + + Align To: + Zarovnat k: + + + + + Show Song Ending + Ukázat zakončení písně + + + *** + *** + + + This will show WordsBy and MusicBy as song ending + Toto ukáže Slova od a Hudba od jako zakončení písně + + + + + Song Copyright Info + Informace o autorském právu + + + + + Use Background Image + Použít obrázek pozadí + + + + + Browse... + Procházet... + + + Text Alingment + Zarovnání textu + + + Vertical: + Svislé: + + + Horizontal: + Vodorovné: + + + + + + + + + Color... + Barva... + + + + + + Alignment: + Zarovnání: + + + + + Above Text + Nad textem + + + + + Below Text + Pod textem + + + + + Type: + Typ: + + + + + + + Position: + Poloha: + + + + + Below Song Text + Pod textem písně + + + + + + Bottom of Screen + V dolní části obrazovky + + + + + Song Text Properties + Vlastnosti textu písně + + + + Alingment: + Zarovnání: + + + + + Top + Nahoře + + + + + Middle + Uprostřed + + + + + Bottom + Dole + + + + + Left + Vlevo + + + + + Center + Na střed + + + + + Right + Vpravo + + + Text Properties + Vlastnosti textu + + + Color: + Barva: + + + Choose color... + Vybrat barvu... + + + + + + + + + Font... + Font + Písmo... + + + + Apply this background to all active backgrounds. + Použijte tuto zázemí všem aktivním prostředí. + + + + + Amount Of Screen To Use + Množství z plochy obrazovky, která se použije + + + + Vertical Screen Use: + Svislé využití plochy obrazovky: + + + + + Percent of screen to be used. + Procento z plochy obrazovky, která se použije. + + + + + Select to use either top portion of the screen or bottom. + Vyberte, aby se použila buď horní část obrazovky, anebo dolní část obrazovky. + + + + Top of screen + Horní část obrazovky + + + + Bottom of screen + Dolní část obrazovky + + + + Use Separate Secondary Display Screen Settings + Použít nastavení pro samostatnou vedlejší zobrazovací obrazovku + + + + * * * + * * * + + + + - - - + - - - + + + + ° ° ° + ° ° ° + + + + • • • + • • • + + + + ● ● ● + ● ● ● + + + + ▪ ▪ ▪ + ▪ ▪ ▪ + + + + ■ ■ ■ + ■ ■ ■ + + + + Vertical Screen Use + Svislé využití plochy obrazovky + + + + % + % + + + + Top of Screen + Horní část obrazovky + + + + Reset All To Default + Nastavit vše znovu na výchozí + + + + + Images(%1) + Obrázky (%1) + + + + Bold + Tučné + + + + Italic + Kurzíva + + + + StrikeOut + Přeškrtnutí + + + + Underline + Podtržení + + + + + Select a image for song wallpaper + Vyberte obrázek pro pozadí písně + + + Images (*.png *.jpg *.jpeg) + Obrázky (*.png *.jpg *.jpeg) + + + + SongWidget + + + Form + Formulář + + + + Use this menu to show only songs beloning to a particular Songbook + Použijte tuto nabídku, aby se ukazovaly pouze písně z určitého zpěvníku + + + + Select Songbook to use + Vybrat zpěvník k používání + + + + Selects a song by the number in the selected Songbook + Vyberte píseň podle čísla ve vybraném zpěvníku + + + + + + Filter: + Filtr: + + + + Use this field to limit the display of the songs to only the ones that contain the specified text in the song title or song number + Použijte toto pole, abyste omezil zobrazování písní jen na ty, které obsahují určitý text v názvu písně nebo v čísle písně + + + + Return + Vrací + + + Matches only songs the song number or title of which contains the entered string. + Spojí jen písně, jejichž číslo písně nebo název obsahuje zadaný pojem. + + + + Contains + Obsahuje + + + Matches only songs the song number or title of which begins with the entered string. + Spojí jen písně, jejichž číslo písně nebo název začíná zadaným pojmem. + + + + Begins + Začíná + + + Matches only songs the song number or title of which exactly matches the entered string. + Spojí jen písně, jejichž číslo písně nebo název přesně odpovídá zadanému pojmu. + + + Exact match + Přesná shoda + + + + + Search Type: + Typ hledání: + + + + Exact Match + Přesná shoda + + + + Contains Phrase + Obsahuje slovní spojení + + + + Contains Word Phrase + Obsahuje slovní obrat + + + + Line Begins + Řádek začíná + + + + Contains Any Word + Obsahuje jakékoli slovo + + + + Contains All Words + Obsahuje všechna slova + + + + Search + Hledat + + + + Done Searching? - Clear Search Results + Hledání hotovo? - Smazat výsledky hledání + + + Add the selected song to the playlist + Přidat vybranou píseň do seznamu skladeb + + + Add (F2) + Add to playlist (F2) + Přidat (F2) + + + F2 + F2 + + + Remove the selected song from the playlist + Odstranit vybranou píseň ze seznamu skladeb + + + Remove (F3) + Remove from playlist + Odstranit (F3) + + + F3 + F3 + + + Song preview: None + Náhled: Píseň chybí + + + Song preview + Lied-Vorschau + + + + Quickly display the selected song on the screen without adding it to playlist first + Rychlé zobrazení vybrané písně na promítací ploše bez toho, že by byla nejprve přidána do seznamu skladeb + + + + Go Live (F5) + Ukázat (F5) + + + + F5 + F5 + + + + + All songbooks + Všechny zpěvníky + + + Song Preview: + Náhled na píseň: + + + Comments: + Comments to songs + Poznámky: + + + + + Filter Type: + Typ filtru: + + + + Notes: + Notes to songs + Bere na vědomí: + + + + Could not find song with number + Číslo písně se nepodařilo najít + + + + No such song + Není žádná taková píseň + + + + + All song categories + Všechny skupiny písní + + + + Please enter search text + Zadejte, prosím, hledaný text + + + + Search: + Hledat: + + + + SongbooksModel + + + Title + Název + + + + Information + Infomation + Informace + + + + SongsModel + + + Num + Číslo + + + + Title + Název + + + + Songbook + Zpěvník + + + + Tune + Tónina + + + + ThemeModel + + + Name + Název + + + + Comments + Poznámky + + + diff --git a/translations/softpro_de.qm b/translations/softpro_de.qm new file mode 100644 index 0000000..b37f389 Binary files /dev/null and b/translations/softpro_de.qm differ diff --git a/translations/softpro_de.ts b/translations/softpro_de.ts new file mode 100644 index 0000000..fcb8f1f --- /dev/null +++ b/translations/softpro_de.ts @@ -0,0 +1,5107 @@ + + + +UTF-8 + + AboutDialog + + + About softProjecor + Über softProjector + + + + Version: + Version: + + + + an open souce media projection software + Freigegebenes Programm softProjector + + + + Developers: + Entwickler: + + + + Vladislav Kobzar +------------------- +Ilya Spivakov +Matvey Adzhigirey + Ilya Spivakov +Matvey Adzhigirey +Vladislav Kobzar + Vladislav Kobzar +------------------- +Ilya Spivakov +Matvey Adzhigirey + + + + Mac Build: + Mac Aufbau: + + + + Volodimir Vasuk + + + + + Special Thanks To: + Besonderer Dank an: + + + + Vitaliy Zhaborovskyy + Vitaliy Zhaborovskyy + + + + Translators: + Übersetzer: + + + + Russian: +German: +Czech: +Ukranian: + Russisch: +Deutsch: +Tschechisch: +Ukrainisch: + + + + Vladimir Zinchenko +Eduard Schlak +Pavel Fric +Vitaliy Zhaborovskyy + Vladimir Zinchenko +Eduard Schlak +Pavel Fric +Vitaliy Zhaborovskyy + + + + If you would like to help developing this program<br> +or would like to contribute data, please visit:<br> +<a href="http://softprojector.org/">http://softprojector.org/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + Falls Sie bei der Entwicklung mithelfen oder mit Ihrem<br> +Material beitragen möchten, so besuchen Sie bitte:<br> +<a href="http://softprojector.org/">http://softprojector.org/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + + + + <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FPCLPXFMH9XP4">Donate</a> + <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FPCLPXFMH9XP4">Spende</a> + + + Russian: +German: +Czech: + Russisch: +Deutsch: +Tschechisch: + + + Special thanks to: + Ein besonderer Dank für: + + + If you would like to help developing this program<br> +or would like to contribute data, please visit:<br> +<a href="http://softprojector.sourceforge.net/">http://softprojector.sourceforge.net/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + Falls Sie bei der Entwicklung mithelfen oder mit Ihrem<br> +Material beitragen möchten, so besuchen Sie bitte:<br> +<a href="http://softprojector.sourceforge.net/">http://softprojector.sourceforge.net/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">If you would like to help developing this program </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">or would like to contribute data, please visit:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://softprojector.sourceforge.net/"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">http://softprojector.sourceforge.net/</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://sourceforge.net/projects/softprojector/"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">http://sourceforge.net/projects/softprojector/</span></a></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">If you would like to help developing this program </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">or would like to contribute data, please visit:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://softprojector.com/"><span style=" text-decoration: underline; color:#0000ff;">http://softprojector.com/</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://sourceforge.net/projects/softprojector/"><span style=" text-decoration: underline; color:#0000ff;">http://sourceforge.net/projects/softprojector/</span></a></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Falls Sie bei der Entwicklung mithelfen oder mit Ihrem</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Material beitragen möchten, so besuchen Sie bitte:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://softprojector.sourceforge.net/"><span style=" text-decoration: underline; color:#0000ff;">http://softprojector.sourceforge.net/</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://sourceforge.net/projects/softprojector/"><span style=" text-decoration: underline; color:#0000ff;">http://sourceforge.net/projects/softprojector/</span></a></p></body></html> + + + + Close + Schließen + + + + AddSongbookDialog + + + Add songbook + Gesangbuch hinzufügen + + + + Songbook Title: + Gesangbuch-Titel: + + + + Description: + Beschreibung: + + + + AnnounceModel + + + Title + Titel + + + + AnnounceWidget + + + Form + Form + + + Announcement text: + Ankündigungstext: + + + Quickly display the selected song on the screen without adding it to playlist first + Schnelle Anzeige auf dem Bildschirm, ohne die vorherige Aufnahme in die Wiedergabe-Liste + + + + Announcements: + Ankündigungen: + + + + Quickly display announcement + Quickly display announcemnt + Schnelle Ankündigungsanzeige + + + + Go Live (F5) + Zeigen (F5) + + + + F5 + F5 + + + + Announcement Preview: + Ankündigungen-Vorschau: + + + Settings + Einstellungen + + + Horizontal alignment: + Horizontale Ausrichtung: + + + Left + Links + + + Center + Zentriert + + + Right + Rechts + + + Vertical alignment: + Vertikale Ausrichtung: + + + Top + Oben + + + Middle + Zentrieren + + + Bottom + Unten + + + Add this announcement to history list, automatically will be added to the list when "Go Live" button is pressed + add currently selected verse into history list, automatically will be added when "Go Live" button is pressed + Die aktuell ausgewählten Verse werden automatisch in der Geschichte-Liste durch Drücken der F5-Taste hinzugefügt + + + Add (F2) + Fügen (F2) + + + Add to history + Hinzufugen zur Geschichte + + + This list contains verses that were sent to be shown + Diese Liste enthält Verse, die geschickt wurden, um angezeigt zu werden + + + Remove current selected announcement in the history list + Remove current selected verse in the history list + Entfernen Sie aktuell ausgewählte Verse aus der Geschichte-Liste + + + Remove (F3) + Remove from history + Entfernen (F3) + + + + AnnouncementSettingWidget + + Form + Form + + + + + Effects + Effekte + + + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + Wenn aktiviert, beim Umschalten wird der alte Text aus- und der neue eingeblendet. + + + + + Use fading effects + Animationseffekte verwenden + + + + + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + Nützlich, wenn ein Hintergrundbild benutzt wird. Zeigt einen besonderen Schatten-Effekt an. + + + + + Use shadow + Schatten verwenden + + + + + Use blurred shadow + Verschwommene Schatten verwenden + + + + + Use Background Image + Hintergrundbild benutzen + + + + + Browse... + Durchsuchen... + + + + Apply this background to all active backgrounds. + Wenden Sie diesen Hintergrund an alle aktiven Hintergründe. + + + + + Color... + Farbe... + + + Text Alingment + Textausrichtung + + + Vertical: + Vertikal: + + + Horizontal: + Horizontal: + + + + + Top + Oben + + + + + Middle + Zentrieren + + + + + Bottom + Unten + + + + + Left + Links + + + + + Center + Zentriert + + + + + Right + Rechts + + + + + Text Properties + Texteigenschaften + + + Color: + Farbe: + + + Choose Color... + Wählen Sie eine Farbe... + + + + + Font... + Font + Schrift... + + + + + Alignment: + Ausrichtung: + + + + Use Separate Secondary Display Screen Settings + Einstellungen für den 2. Bildschirm + + + + Reset All To Default + Alles zurücksetzen + + + + + Select a image for announcement wallpaper + Wählen Sie ein Hintergrundbild für Ankündigungen + + + + + Images(%1) + Bilder(%1) + + + + Bold + Fett + + + + Italic + Kursiv + + + + StrikeOut + Durchgestrichen + + + + Underline + Unterstreichen + + + Images (*.png *.jpg *.jpeg) + Bilder (*.png *.jpg *.jpeg) + + + + BibleInformationDialog + + + Bible Information + Bibel-Information + + + + Bible Name: + Bibel-Name: + + + + Abbreviation: + Abkürzung: + + + + Information\ +Copyright: + Information\ +Urheberrecht: + + + + Right to left + Von Rechts nach Links + + + + BibleSettingWidget + + Form + Form + + + + + Primary Bible: + Erste Bibel: + + + + + Secondary Bible: + Zweite Bibel: + + + + + Trinary Bible: + Dritte Bibel: + + + + Operator Screen Bible: + Bedienerfenster für Bibel: + + + + This bible version will be used for the operator to select verses and search bible + Diese Bibelversion wird für den Bediener für Verse-Auswahl und Bibel-Suche benutzt + + + + + Effects + Effekte + + + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + Wenn aktiviert, beim Umschalten wird der alte Text aus- und der neue eingeblendet. + + + + + Use fading effects + Animationseffekte verwenden + + + + + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + Nützlich, wenn ein Hintergrundbild benutzt wird. Zeigt einen besonderen Schatten-Effekt an. + + + + + Use shadow + Schatten verwenden + + + + + Use blurred shadow + Verschwommene Schatten verwenden + + + + + Use Background Image + Verwenden Sie ein Hintergrundbild + + + + + Browse... + Durchsuchen... + + + + Apply this background to all active backgrounds. + Wenden Sie diesen Hintergrund an alle aktiven Hintergründe. + + + + + + + Color... + Farbe... + + + + + Amount of screen to use: + Fläche vom Bildschirm benutzen: + + + + + Percent of screen to be used. + Prozentuale Nutzung vom Bildschirm. + + + + + Select to use either top portion of the screen or bottom. + Nutzungswahl zwischen des oberen oder des unteren Teils am Bildschirm. + + + + + Top of Screen + Oben auf dem Bildschirm + + + + Botton of Screen + Unten auf dem Bildschirm + + + + Use Separate Secondary Display Screen Settings + Einstellungen für den 2. Bildschirm + + + + Bottom of Screen + Unten auf dem Bildschirm + + + Text Alingment + Textausrichtung + + + Vertical: + Vertikal: + + + + + Top + Oben + + + + + Middle + Zentrieren + + + + + Bottom + Unten + + + Horizontal: + Horizontal: + + + + + + + Left + Links + + + + + + + Center + Zentrieren + + + + + + + Right + Rechts + + + + + Text Properties + Texteigenschaften + + + Color: + Farbe: + + + Choose color... + Farbe wählen... + + + + + + + Font... + Font + Schrift... + + + + + + + Alignment: + Ausrichtung: + + + + + Caption Properties + Untertitel-Eigenschaften + + + + + + + Position: + Position: + + + + + Above Text + Über dem Text + + + + + Below Text + Unter dem Text + + + + + Show Bible Version Abbriviation + Abkürzung der Bibel-Version anzeigen + + + + + Amount Of Screen To Use + Amount Of Sceen To Use + Fläche vom Bildschirm benutzen + + + Select "Top" to use top portion of the display screen + Wählen Sie "Oben", um den oberen Teil des Bildschirms zu verwenden + + + Select "Bottom" to use bottom portion of the display screen + Wählen Sie "Unten", um den unteren Teil des Bildschirms zu verwenden + + + Use this much of the screen: + Verwenden Sie so viel des Bildschirms: + + + Align to: + Aling to: + Ausrichten: + + + + Reset All To Default + Alles zurücksetzen + + + + + + + + + + + None + Keine + + + + + Same as primary Bible + Gleich wie die erste Bibel + + + + + Select a image for Bible wallpaper + Ein Hintergrundbild für Bibel wählen + + + + + Images(%1) + Bilder(%1) + + + + Bold + Fett + + + + Italic + Kursiv + + + + StrikeOut + Durchgestrichen + + + + Underline + Unterstreichen + + + Images (*.png *.jpg *.jpeg) + Bilder (*.png *.jpg *.jpeg) + + + + BibleWidget + + + Form + Form + + + + Search: + Suche: + + + + Search the bible for specified text. Matched verses will appear in the list below. If a bible book is selected, only that book will be searched. + Suche in der Bibel nach dem speziellen Text. Relevante Verse erscheinen unten in der Liste. Wenn ein Buch aus der Bibel ausgewählt wurde, wird nur in dem Buch gesucht. + + + If selected, only Bible verses starting with the search string will be searched. + Wenn ausgewählt, werden nur Bibelverse gesucht, die mit dem Suchbegriff beginnen. + + + Begins + Beginnt + + + If selected, Bible verses that contain the search string will be searched. + Wenn ausgewählt, werden Bibelverse, die den Suchbegriff enthalten, durchsucht. + + + Contains + Enthält + + + + + Quickly display the selected Bible verse on the screen + Schnelle Anzeige der ausgewählten Bibelverse auf dem Bildschirm + + + + Search + Suche + + + + Return + Zurück + + + Limit search to: + Suche beschränken auf: + + + If selected, the entire bible will be searched. + Wenn ausgewählt, wird die ganze Bibel durchsucht. + + + + Entire Bible + Ganze Bibel + + + If selected, only the selected Bible book will be searched. + Wenn ausgewählt, wird nur das ausgewählte Bibelbuch durchsucht. + + + + Current Book + Aktuelles Buch + + + If selected, only the selected chapter of the selected Bible book will be searched. + Wenn ausgewählt, wird nur das ausgewählte Kapitel des ausgewählten Buches der Bibel durchsucht. + + + + Current Chapter + Aktuelles Kapitel + + + + Hide +Results + Ergebnisse +ausblenden + + + + Results: + Ergebnisse: + + + + Select search range + Suchbereich wählen + + + + Select search type + Such-Art wählen + + + + Contains Phrase + Enthält eine Phrase + + + + Contains Word Phrase + Enthält einen Wort-Satz + + + + Verse Begins + Vers beginnt + + + + Contains Any Word + Enthält jedes Wort + + + + Contains All Words + Enthält alle Worte + + + + Book: + Buch: + + + + + + Filter criteria for the bible list. If the first character of the filter is a number, then only books starting with this number are matched. Example filters: "Deuter", "1Thes". + Kriterien für die Bibel-Liste filtern. Wenn das erste Schriftzeichen des Filters eine Zahl ist, dann werden nur Bücher angepasst, die mit dieser Zahl beginnen. Beispiel Filter: "5Mo", "1Thes". + + + + Chapter: + Kapitel: + + + + Verse: + Vers: + + + + Go Live (F5) + Anzeigen (F5) + + + + F5 + F5 + + + Add currently selected verse into history list, automatically will be added when "Go Live" button is pressed + add currently selected verse into history list, automatically will be added when "Go Live" button is pressed + Die aktuell ausgewählten Verse werden in die Geschichte-Liste automatisch hinzugefügt, wenn "F5"-Taste gedrückt wird + + + Add (F2) + Fügen (F2) + + + Add to history + Zur Geschichte hinzufugen + + + + This list contains verses that were sent to be shown + Diese Liste enthält Verse, die geschickt wurden, um angezeigt zu werden + + + Remove current selected verse in the history list + Entfernen Sie die aktuell ausgewählten Verse in der Geschichte-Liste + + + Remove (F3) + Remove from history + Entfernen (F3) + + + Clear all history items + Entfernen der Geschichte-Liste + + + Clear + Clear History + Entfernen + + + Total of + Gesamt + + + search results returned. + suchergebnisse. + + + Total of 281 or more results. <font color=red>Only 281 results can be returned.</font> + Insgesamt 281 Suchergebnisse oder mehr. <font color=red>Nur 281 Suchergebnisse können angezeigt werden.</font> + + + Total + + Insgesamt + + + + +results + +Ergebnisse + + + No search results have retrieved + Keine Suchergebnisse + + + No search results + Keine Suchergebnisse + + + Error opening Bible histories + Fehler beim öffnen der Bibelgeschichten + + + Cound not find any or all Bible verses from file withing current primary Bible. +Try changing primary Bible and reopen project file. + Kann nicht finden einen oder alle Bibelvers(e) aus einer Datei in der laufenden primären Bibel. +Ändern Sie die primäre Bibel und öffnen Sie die Projekt-Datei wieder. + + + + Please enter search text + Bitte einen Such-Text eingeben + + + + Total +resutls: +%1 + Gesamte +Ergebnisse +%1 + + + + No search +results. + Keine Such-Ergebnisse. + + + + BiblesModel + + + Title + Titel + + + + DisplayScreen + + + Dispaly Screen + Bildschirm + + + + Video Player Error + Video-Player Fehler + + + + Words by: %1, Music by: %2 + Dichter: %1, Komponist: %2 + + + + Words by: %1 + Dichter: %1 + + + + Music by: %1 + Komponist: %1 + + + + EditAnnouncementDialog + + + Edit Announcement + Ankündigungen bearbeiten + + + + Title: + Titel: + + + + ID: + Identifikation: + + + + Use Private Settings + Privat-Einstellungen verwenden + + + + Timed slides: + Zeitgesteuerte Dias: + + + + sec + seconds + Sekunden + sek + + + + Loop + Schleife + + + + Save + Speichern + + + + Cancel + Abbrechen + + + + Announce + - Text of the announcement goes here + +Slide + - Text of the announcement goes here +You can have both Annouce or Slide as announcement block titles. + Ankündigungen + - Text der Ankündigung hier + +Dias + - Text der Ankündigungen hier +Sie können sowohl Ankündigungen oder auch Diashow als Ankündigung Block-Titel haben. + + + + Announcement title cannot be left empty. +Please enter announcement title. + Ankündigungstitel kann nicht leer gelassen werden. +Bitte geben Sie den Ankündigungstitel ein. + + + + Announcement title is missing + Ankündigunstitel fehlt + + + + EditWidget + + + Edit and/or Add New songs + Neue Lieder bearbeiten und/oder hinzufügen + + + + Songbook: + Gesangbuch: + + + + Print + Drucken + + + + Title: + Titel: + + + + Words by: + Dichter: + + + + Music by: + Komponist: + + + + Key: + Tonart: + + + + Category: + Kategorie: + + + + Use Private Song Settings + Private Lied-Einstellungen benutzen + + + + Main Text Properties: + Haupttext-Eigenschaften: + + + + + + Color... + Farbe... + + + + + + Font... + Schrift... + + + + Main Text Alignment: + Haupttext für Ankündigungen: + + + + Song Information Properties: + Liedinformation-Einstellungen: + + + + Song Ending Properties: + Liedendung-Einstellungen: + + + + Use Background: + Hintergrund benutzen: + + + + Top + Oben + + + + Middle + Zentrieren + + + + Bottom + Unten + + + + Other + Andere + + + Text Alingment + Textausrichtung + + + + Left + Links + + + + Center + Zentrieren + + + + Right + Rechts + + + + Browse... + Durchsuchen... + + + Use default + Standard verwenden + + + Text font: + Schriftart: + + + Background: + Hintergrund: + + + + Notes: + Notizen: + + + Comments: + Kommentare: + + + + Save + Speichern + + + + Ctrl+S + Ctrl+S + + + + Cancel + Abbrechen + + + + Ctrl+Q + Ctrl+Q + + + + Add a new Songbook + Ein neues Gesangbuch hinzufügen + + + + Select Songbook + Gesangbuch wählen + + + + Select a Songbook to which you want to add a song + Wählen Sie ein Gesangbuch, zu dem Sie ein Lied hinzufügen möchten + + + + Song title cannot be left empty. +Please enter song title. + Der Name des Liedes kann nicht unausgefüllt bleiben. +Fügen Sie bitte den Namen des Liedes ein. + + + + Song title is missing + Der Name des Liedes fehlt + + + + Cannot find exact match in database + Kann nicht die exakte Übereinstimmung in der Datenbank finden + + + + The exact match of a song you are editing was not found in database. +In order to edit this song, you need to add it to database. + +Please select a Songbook to which you want to copy this song to: + Die exakte Übereinstimmung eines Liedes, das Sie bearbeiten, ist in der Datenbank nicht gefunden worden. +Um dieses Lied zu erstellen, müssen Sie es zur Datenbank hinzuzufügen. + +Wählen Sie bitte ein Gesangbuch, zu dem Sie dieses Lied kopieren möchten: + + + + Copy to a new Songbook + Das Lied in dem neuen Buch speichern + + + + Select a Songbook to which you want to copy this song to + Ein Gesangbuch wählen, in das Sie das Lied hinzufügen möchten + + + Verse 1 + - words of verse go here + +Refrain + - words of Chorus/Refrain +go here + +Verse 2 + - words of verse go here + Strophe 1 + - Worte des Verses hier + +Chorus + - Worte des Chores hier + +Strophe 2 + - Worte des Verses hier + + + + Add a Songbook + Ein Gesangbuch hinzufügen + + + Select a picture for the wallpaper + Wählen Sie ein Bild für den Hintergrund + + + + Verse 1 + - words of verse go here + +Refrain +- words of Chorus/Refrain +go here + +Verse 2 + - words of verse go here + Vers 1 + - Vers-Worte hier + +Refrain +- Refrain-Worte vom Chorus/Refrain +hier + +Vers 2 + - Vers-Worte hier + + + + Bible Stories + Biblische Geschichten + + + + Gospel + Verkündigung + + + + God, His love and greatness + Gott, Seine Liebe und Herrlichkeit + + + + The Resurrection of Christ + Christi Auferstehung + + + + Time + Zeit + + + + The second coming of Christ and the judgement + Die Wiederkunft Christi und das Gericht + + + + Children and Family + Christliche Familie und Kindererziehung + + + + For new converts + Für Neubekehrte + + + + Spiritual struggle and victory + Geistlicher Kampf und Sieg + + + + Harvest + Erntedankfest + + + + Jesus Christ + Jesus Christus + + + + Love + Liebe + + + + Prayer + Gebet + + + + Youth + Jugend + + + + Mother + Mutter + + + + Wedding + Hochzeit + + + + Baptism + Wassertaufe + + + + Sunset / Sunrise + Sonnenauf- und niedergang + + + + New Years + Neujahr + + + + Funeral + Beerdigung + + + + At the ordination + Einsegnung + + + + On the Lord's Supper + Abendmahl + + + + Heavenly abode + Himmlische Heimat + + + + Instruction and self-test + Belehrung und Selbstprüfung + + + + Holy Ghost + Heiliger Geist + + + + Church + Gemeinde + + + + Before church meeting + Vor dem Gottesdienst + + + + Last Days + Letzte Zeit + + + + Practical life with God + Praktisches Leben mit Gott + + + + At the end of church meeting + Schlußlieder + + + + Welcome and farewell + Begrüßung und Abschied + + + + The call to work + Arbeit für den Herrn + + + + Call to repentance + Einladung zum Heil + + + + Journey of faith, faith and hope + Gnadenstand und Heilsgewißheit + + + + Various Christian holidays + Erlösungsfreude in Christus + + + + Determination and faithfulness + Entschlossenheit und Treue + + + + Christmas + Geburt Christi + + + + Following Christ + Christi Nachfolge + + + + The Word of God + Wort Gottes + + + + Salvation + Erlösung + + + + Suffering and death of Christ + Passion und Auferstehung Christi + + + + Consolation and encouragement + Trost und Ermunterung + + + + Praise and thanksgiving + Lob und Danksagung + + + + Christian Joy + Christliche Freude + + + + Select an image for the wallpaper + Ein Bild für Hintergrund wählen + + + + Images(%1) + Bilder(%1) + + + + GeneralSettingWidget + + Form + Form + + + + If checked, the screen "window" is always drawn on top of other windows. This prevents the user from accidently drawing a window onto the projector's screen. + Wenn ausgewählt, wird der Bildschirm "Fenster" immer im Vordergrund angezeigt. Dadurch wird verhindert, dass andere Fenster auf dem Bildschirm des Projektors angezeigt werden. + + + + Display window always on top + Bildschirm immer im Vordergrund anzeigen + + + + Theme: + Thema: + + + + Add New Theme + Neues Thema hinzufügen + + + + Primary Display Screen: + Erster Bildschirm: + + + + Secondary Display Screen: + Zweiter Bildschirm: + + + + Primary Display Screen Controls + Erster Bildschirm Steuerung + + + + Button Size: + Tasten-Größe: + + + + 16x16 + 16x16 + + + + 24x24 + 24x24 + + + + 32x32 + 32x32 + + + + 48x48 + 48x48 + + + + 64x64 + 64x64 + + + + 96x96 + 96x96 + + + + Alignment: + Ausrichtung: + + + + Top + Oben + + + + Middle + Zentrieren + + + + Bottom + Unten + + + + Left + Links + + + + Center + Zentrieren + + + + Right + Rechts + + + + Opacity: + Undurchsichtigkeit: + + + + Transparent + Transparent + + + + Opaque + Undurchsichtig + + + + NOTE: Display screen controls will be visible on the primary display screen only when one monitor is avaliable. + HINWEIS: Bildschirm-Steuerung wird auf dem ersten Bildschirm sichtbar sein, wenn nur ein Monitor vorhanden ist. + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + Nützlich, wenn Sie ein Hintergrundbild benutzen. Zeigt einen besonderen Schatten-Effekt an. + + + Use shadow + Verwenden Sie ein Schatten + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + Animationsübergang von einem Vers zum anderen. + + + Use fading effects + Animationseffekte verwenden + + + Use blurred shadow + Verzerrte Schatten verwenden + + + Use Passive Background Image + Verwenden Sie ein passives Hintergrundbild + + + Browse... + Durchsuchen... + + + + Display Screen Selection + Bildschirm-Auswahl + + + Display Screen: + Bildschirm-Anzeige: + + + + + Select onto which screen to dispaly + Wählen Sie, auf welchem Bildschirm angezeigt werden soll + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600; color:#ff0000;">NOTE:</span><span style=" font-size:8pt; color:#ff0000;"> Display screen selection is currenly under development. Changing the screen number, will change on which screen projection will be displayed.<br />On Windows, order is from left-to-right.</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600; color:#ff0000;">NOTE:</span><span style=" font-size:8pt; color:#ff0000;"> Display screen selection is currenly under development. Changing the screen number, will change on which screen projection will be displayed.<br />On Windows, oder is from right-to-left.</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</syple></head><body style="font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style="margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style="font-size:8pt; font-weight:600; color:#ff0000;">NOTE: </span><span style=" font-size:8pt; color:#ff0000;"> Bildschirm-Anzeige ist momentan in der Entwicklung. Beim Ändern der Bildschirm-Nummer wird auch geändert, auf welchem Bildschirm die Projektion angezeigt werden soll.<br />In Windows, die Reihenfolge von links nach rechts</span></p></body></html> + + + + Reset All To Default + Alles zurücksetzen + + + Select a image for main wallpaper + Wählen Sie ein Haput-Hintergrundbild + + + Images (*.png *.jpg *.jpeg) + Bilder (*.png *.jpg *.jpeg) + + + + none + kein(e) + + + + None + Kein(e) + + + + Edit Theme + Thema bearbeiten + + + + Theme Name: + Thema-Name: + + + + Comments: + Kommentare: + + + + Default + Standart + + + + This theme will contain program default settings. + Dieses Thema wird die Programm-Standardeinstellungen enthalten. + + + + HelpDialog + + + softProjector Help + softProjector Hilfe + + + + about:blank + über:leer + + + + Close + Schließen + + + + Ctrl+Q + Ctrl+Q + + + + ManageDataDialog + + + Manage Database + Datenbank verwalten + + + + Bibles + Bibeln + + + + + + Download +&& Import... + Herunterladen +&& Importieren... + + + + Import a new Bible into your database + Eine neue Bibel in die Datenbank importieren + + + + + + &Import... + &Importieren... + + + + + + + Ctrl+I + Ctrl+I + + + + Edit Bible title of currently selected Bible. + Bearbeiten eines Bibel-Titels der aktuell ausgewählten Bibel. + + + + + + &Edit... + &Bearbeiten... + + + + + + Ctrl+E + Ctrl+E + + + + Export currently selected Bible to share with others. + Die aktuell ausgewählte Bibel exportieren, um mit anderen zu teilen. + + + + + + E&xport... + E&xport... + + + + + + + Ctrl+X + Ctrl+X + + + + Delete a Bible that you will no longer want to use in this program. + Löschen einer Bibel, die Sie in diesem Programm nicht mehr benutzen möchten. + + + + + + &Delete... + &Löschen... + + + + + + Ctrl+D + Ctrl+D + + + + Songbooks + Gesangbücher + + + + + + Import a new Songbook into database. + Importieren eines neuen Gesangbuches in die Datenbank. + + + + + Edit the title and information about the Songbook. + Bearbeiten Sie den Titel und die Informationen von dem Gesangbuch. + + + + + + Export currently selected Songbook to be able to share with others and for backup. + Exportieren des aktuell ausgewählten Gesangbuches, um in der Lage zu sein, mit Anderen zu teilen und für die Datensicherung. + + + + + Delete currently selected Songbook from database. + Das aktuell ausgewählte Gesangbuch aus der Datenbank löschen. + + + + Themes + Themen + + + + &New... + &Neu... + + + + Export All... + Alle exportieren... + + + + Close Manage Database Dialog + “Datenbank verwalten”-Dialogfeld schließen + + + + Close + Schließen + + + + Ctrl+Q + Ctrl+Q + + + + Select a songbook to import + Wählen eines Gesangbuches zum Importieren + + + softProjector songbook file + softProjector Gesangbuch-Datei + + + + + Importing... + Importieren... + + + + + + Cancel + Abbrechen + + + User songbook + Benutzer-Gesangbuch + + + Songbook imported by the user + Gesangbuch durch den Benutzer importiert + + + + Too old SongBook file format + Gesangbuch-Dateiformat ist zu alt + + + + Save the songbook as: + Gesangbuch speichern als: + + + softProjector songbook file (*.sps) + softProjector Gesangbuch-Datei (*.sps) + + + + SoftProjector songbook file + SoftProjector Gesangbuch-Datei + + + + The SongBook file you are opening, is of a later release and +is not supported by current version of SoftProjector. +You are trying to open SongBook version %1. +Please upgrade to latest version of SoftProjector and try again. + Die Gesandbuch-Datei, die Sie öffnen, ist von einem späteren Release und +wird nicht durch aktuelle Version von softProjector unterstützt. +Sie versuchen, Gesangbuch-Version %1 zu öffnen. +Bitte aktualisieren Sie die neueste Version von softProjector und versuchen Sie es erneut. + + + + + Unsupported SongBook version. + Nicht unterstützte Gesangbuch-Version. + + + + The SongBook file you are opening, is not supported +by current version of SoftProjector. + + Die Gesangbuch-Datei, die Sie öffnen, wird nicht +durch aktuelle Version des softProjectors unterstützt. + + + + The SongBook file you are opening, is in very old format +and is no longer supported by current version of SoftProjector. +You may try to import it with version 1.07 and then export it, and import it again. + Die Gesangbuch-Datei, die Sie öffnen, ist in einem sehr alten Format +und wird nicht mehr durch aktuelle Version des softProjector unterstützt. +Sie können versuchen, sie mit der Version 1.07 zu importieren und exportieren und wieder importieren. + + + + SoftProjector songbook file (*.sps) + SoftProjector Gesangbuch-Datei (*.sps) + + + + + An error has ocured when overwriting existing file. +Please try again with different file name. + Ein Fehler ist beim Überschreiben der bestehenden Datei aufgetreten. +Bitte versuchen Sie es mit einem anderen Dateinamen. + + + + Export complete + Exportieren abgeschlossen + + + + The songbook " + Das Gesangbuch " + + + + " +Has been saved to: + + " +Gespeichert als: + + + + + Delete songbook? + Gesangbuch löschen? + + + + + Are you sure that you want to delete: + Sind Sie sicher, dass Sie löschen möchten: + + + + This action will permanentrly delete this songbook + Durch diese Aktion wird das Gesangbuch unwiderruflich gelöscht + + + + Select Bible file to import + Eine Bibel-Datei zum Import auswählen + + + + + SoftProjector Bible file + SoftProjector Bibel-Datei + + + + The Bible format you are importing is of an usupported file version. +Your current SoftProjector version does not support this format. + Das Bibel-Format, das Sie importieren, ist eine nicht unterstützte Dateiversion. +Ihre aktuelle softProjector-Version unterstützt nicht dieses Format. + + + + Unsupported Bible file format + Nicht unterstütztes Bibeldatei-Format + + + + + Edit Theme + Thema bearbeiten + + + + + Theme Name: + Thema-Name: + + + + + Comments: + Kommentare: + + + + Default + Standart + + + + This theme will contain program default settings. + Dieses Thema wird die Programm-Standardeinstellungen enthalten. + + + + Select a Theme to import + Ein Thema zum Importieren wählen + + + + + SoftProjector Theme file + SoftProjector Thema-Datei + + + + Importing Themes... + Themen zum Importieren... + + + + The Theme file you are opening, is of a later release and +is not supported by current version of SoftProjector. +You are trying to open Theme version %1. +Please upgrade to latest version of SoftProjector and try again. + Die Thema-Datei, die Sie öffnen, ist von einem späteren Release und +wird nicht durch aktuelle Version von softProjector unterstützt. +Sie versuchen, Gesangbuch-Version %1 zu öffnen. +Bitte aktualisieren Sie die neueste Version von softProjector und versuchen Sie es erneut. + + + + + Unsupported Theme version. + Nicht unterstützte Thema-Version. + + + + The Theme file you are opening, is not supported +by current version of SoftProjector. + + Die Thema-Datei, die Sie öffnen, wird nicht +durch aktuelle Version des softProjectors unterstützt. + + + + Export Theme as: + Thema exportieren als: + + + + Export all theme as: + Alle Themen exportieren als: + + + + softProjector Theme file + softProjector Thema-Datei + + + + Exporting Themes... + Themen exportieren... + + + + Delete Theme? + Thema löschen? + + + + Are you sure that you want to delete theme: + Sind Sie sicher, dass Sie das Thema löschen möchten?: + + + + This action will permanentrly delete this theme + Durch diese Aktion wird das Thema unwiderruflich gelöscht + + + + Error opening module list. + Fehler beim Öffnen der Modulliste. + + + + Failed to open mod list + Öffnen der Modulliste gescheitert + + + + +Downloading: %1 +From: %2 + Heruntergeladen: %1 +Von: %2 + + + + Error opening save file %1 for download %2 +Error: %3 + Fehler beim Öffnen der "Datei speichern" %1 zum Download %2 +Fehler: %3 + + + + Error downloading module list. + Fehler beim Herunterladen der Modul-Liste. + + + + Bible Module Download + Bibel-Modul herunterladen + + + + Songbook Module Download + Gesangbuch-Modul herunterladen + + + + Theme Module Download + Thema-Modul herunterladen + + + + Download Error: %1 + Herunterladen-Fehler: %1 + + + + Saved to: %1 + Gespeichert in: %1 + + + + +Importing: %1 + Importieren: %1 + + + Old Bible file format + Altes Bibel-Dateiformat + + + The Bible format you are importing is of an old version. +Your current SoftProjector does not support this format. +Please download lattest Bibles and import them. + The Bible format you are importing is of an old version. +Your current SoftProjector does not support this format. +Please download lattest Bibles and import them + Das Bibel-Format, das Sie importieren, ist eine alte Version. +Ihr aktueller SoftProjector unterstützt nicht dieses Format. +Bitte laden Sie die aktuellen Bibeln herunter und importieren sie. + + + + New Bible file format + Neues Bibel-Dateiformat + + + + The Bible format you are importing is of an new version. +Your current SoftProjector does not support this format. +Please upgrade SoftProjector to latest version. + Das Bibel-Format, das Sie importieren aus einer neuen Version. +Ihr aktueller SoftProjector unterstützt nicht dieses Format. +Bitte aktualisieren Sie SoftProjector auf die neueste Version. + + + All supported Bible files + Alle unterstützten Bibel-Dateien + + + softProjector Bible file + softProjector Bibel-Datei + + + Unbound Bible file + Unbound Bibel-Datei + + + + Save exported Bible as: + Exportierte Bibel speichern als: + + + + Exporting... + Exportieren... + + + + Bible has been exported + Bibel wurde exportiert + + + + Bible: + + Bibel: + + + + + +Has been saved to: + + +Gespeichert als: + + + + + Delete Bible? + Bibel löschen? + + + + This action will permanentrly delete this Bible + Diese Aktion löscht die Bibel unwiderruflich + + + + Edit Songbook + Gesangbuch bearbeiten + + + Edit Bible name + Bibel Name bearbeiten + + + Bible title: + Bibel-Titel: + + + + MediaWidget + + + Form + Form + + + + - Media Library - + - Media-Bibliothek - + + + + Go Live (F5) + Anzeigen (F5) + + + + F5 + F5 + + + + Open + Öffnen + + + + Aspect Ratio: + Seitenverhältnis: + + + + Auto + Auto + + + + Scale + Maßstab + + + + 4/3 + 4/3 + + + + 16/9 + 16/9 + + + + + <center>No media</center> + <center>Kein Medium</center> + + + + No Media + Kein Medium + + + + Open Music/Video File + Öffnen Musik-/Video-Datei + + + + + Media Files (%1);;Audio Files (%2);;Video Files (%3) + Media-Dateien (%1);;Audio-Dateien (%2);;Video-Dateien (%3) + + + + Select Music/Video Files to Open + Music-/Videodateien zum Öffnen wählen + + + + ModuleDownloadDialog + + + Dialog + Dialog + + + + Select modules you wish to download and import. + Ein Modul, das Sie herunterladen oder importieren möchten, wählen. + + + + Select All + Alles wählen + + + + Deselect All + Alles deaktivieren + + + + ModuleProgressDialog + + + Download / Import Progress Dialog + Herunterladen / Importieren Fortschritt-Dialog + + + + Current Progress: + Aktueller Fortschritt: + + + + Total Progress: + Gesamt Fortschritt: + + + + Close + Schließen + + + + Native language name + + English + Deutsch + + + + English + Do not change + Deutsch + + + + PassiveSettingWidget + + Form + Form + + + + + Use Passive Background Image + Verwenden Sie ein passives Hintergrundbild + + + + + Browse... + Durchsuchen... + + + + Use Separate Secondary Display Screen Settings + Einstellungen für den 2. Bildschirm + + + + Reset All To Default + Alles zurücksetzen + + + + + Select a image for passive wallpaper + Ein Bild für den passiven Hintergrund wählen + + + + + Images(%1) + Bilder(%1) + + + + PictureSettingWidget + + Picture Settings + Bildeinstellungen + + + + When Displaying Slideshows: + Wenn Dias angezeigt werden: + + + + Expand Small Images + Kleine Bilder erweitern + + + + Fit Images To Screen + Bilder fürs Anzeigen anpassen + + + + Fit Images To Screen By Expanding + Bilder fürs Anzeigen anpassen durch Erweiterung + + + + Resize Large Images on Import + Änderung der großen Bilder zum Importieren + + + + It is highly recommended to reduce large images on import. This will improve load, save and display time of slideshows. +We recommend to resize images to display screen size. + Es wird dringend empfohlen, die großen Bilder zum Importieren zu reduzieren. Dies wird besser, um zu laden, speichern und anzeigen für Slideshow. +Wir empfehlen, die Größe von Bildern auf Bildschirmgröße anzupassen. + + + + Bound Box: + Gebundene Box: + + + + 800 x 800 + 800 x 800 + + + + 1024 x 1024 + 1024 x 1024 + + + + 1280 x 1280 + 1280 x 1280 + + + + 1366 x 1366 + 1366 x 1366 + + + + 1440 x 1440 + 1440 x 1440 + + + + 1600 x 1600 + 1600 x 1600 + + + + 1920 x 1920 + 1920 x 1920 + + + + Custom + Benutzerdefiniert + + + + Inalid Numeric Value + Ungültiger nummerischer Wert + + + + Entered '%1' custom width is not numeric. + Eingegebene %1 benutzerdefinierte Breite ist nicht numerisch. + + + + PictureWidget + + + Form + Form + + + + Slide Shows: + Dia-Shows: + + + + Go Live (F5) + Anzeigen (F5) + + + + F5 + F5 + + + + + Picture Preview + Bild-Vorschau + + + + Picture Information + Bild-Information + + + + Edit Preview Slide Show: + Dias-Show-Vorschau bearbeiten: + + + + Add + Hinzufügen + + + + Remove + Entfernen + + + + Clear + Entfernen + + + + Editing slide show here will not change anything in database. To have save changes, use "New Slide Show" or "Edit Slide Show". + Bearbeiten von Dia-Show hier wird nichts in der Datenbank ändern. Um die Änderungen zu speichern, verwenden Sie "Neue Dia-Show" oder "Dia-Show-Bearbeiten". + + + + + Preview slide: + Dia-Vorschau: + + + + Select Images to Open + Bilder zum Öffnen wählen + + + + Images(%1) + Bilder(%1) + + + + Adding files... + Hinzufügen von Dateien... + + + + Cancel + Abbrechen + + + + Slide Show: %1 + Dia-Show: %1 + + + + PrintPreviewDialog + + + softProjector Print Dialog + softProjector Drucken-Dialog + + + + Margins: + Ränder: + + + + Left Margin + Linker Rand + + + + L: + L: + + + + Top Margin + Oberer Rand + + + + T: + O: + + + + Right Margin + Rechter Rand + + + + R: + R: + + + + Bottom Margin + Unterer Rand + + + + B: + U: + + + + Inch + Zoll + + + + Millimeter + Millimeter + + + + Pixel + Pixel + + + + Point + Punkt + + + + Font: + Schriftart: + + + + To PDF + Zu PDF + + + + Print + Drucken + + + + Tune: %1 + + Melodie: %1 + + + + + Words By: %1 Music By: %2 + + + Dichter: %1 Komponist: %2 + + + + + + Words By: %1 + + + Dichter: %1 + + + + + + Music By: %1 + + + Komponist: %1 + + + + + + + +Notes: +%1 + + +Notizen: +%1 + + + + Announcements: %1 + + + Ankündigungen: %1 + + + + + + SoftProject Schedule: + SoftProjector Plan: + + + + Save PDF as + Speichern als PDF + + + + SettingsDialog + + + softProjector - Settings + softProjector-Einstellungen + + + + General + Allgemein + + + + Passive + Passiv + + + + Bible + Bibel + + + + Picture + Bild + + + + Media + Media + + + + Announcements + Ankündigungen + + + + General SoftProjector Settings + Allgeimene SoftProjector Einstellungen + + + + Passive Settings + Passiv-Einstellungen + + + + This setting are displayed when nothing is to be projected. + Diese Einstellung werden angezeigt, wenn nichts zu projizieren ist. + + + + Bible Settings + Bibel-Einstellungen + + + + Song Settings + Lied-Einstellungen + + + + Picture Settings + Bild-Einstellungen + + + + Media Settings + Media-Einstellungen + + + + Announcement Settings + Ankündigunen-Einstellungen + + + Primary Bible: + Primäre Bibel: + + + Secondary Bible: + Sekundäre Bibel: + + + If checked, the screen "window" is always drawn on top of other windows. This prevents the user from accidently drawing a window onto the projector's screen. + Wenn ausgewählt, wird der Bildschirm "Fenster" immer im Vordergrund angezeigt. Dadurch wird verhindert, dass andere Fenster auf dem Bildschirm des Projektors angezeigt werden. + + + Display window always on top + Bildschirm immer im Vordergrund anzeigen + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + Animationsübergang von einem Vers zum anderen. + + + Use fading effects + Animationseffekte verwenden + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + Nützlich, wenn Sie ein Hintergrundbild benutzen. Zeigt einen besonderen Schatten-Effekt an. + + + Use blurred shadow + Verzerrte Schatten verwenden + + + Change Font... + Schriftart ändern... + + + Text color: + Textfarbe: + + + Choose color... + Farbe wählen... + + + Active wallpaper + Aktiver Hintergrund + + + Browse... + Durchsuchen... + + + Remove wallpaper + Hintergrund entfernen + + + Passive wallpaper + Passiver Hintergrund + + + + Songs + Lieder + + + Show song number + Lied-Nummer anzeigen + + + Show song key + Tonart anzeigen + + + Show stanza title + Strophen-Titel anzeigen + + + None + Keine + + + Select a picture for the wallpaper + Ein Bild für den Hintergrund auswählen + + + Images (*.png *.jpg *.jpeg) + Bilder (*.png *.jpg *.jpeg) + + + + OK + OK + + + + Cancel + Abbrechen + + + + Apply + Übernehmen + + + + SlideShowEditor + + + Slide Show Editor + Diashow-Editor + + + + Slide Show Title: + Diashow-Titel: + + + + Slide Show Info: + Diashow-Info: + + + + Add Pictures + Bilder hinzufügen + + + + Remove Picture + Bild entfernen + + + + Picture Preview + Bild-Vorschau + + + + Picture Information + Bild-Information + + + + Save + Speichern + + + + + Cancel + Abbrechen + + + + Select Images to Open + Bilder zum Öffnen wählen + + + + Images(%1) + Bilder(%1) + + + + Adding files... + Hinzufügen von Dateien... + + + + Slide show title cannot be left empty. +Please enter a title. + Diashow-Titel kann nicht leer gelassen werden. +Bitte geben Sie einen Titel ein. + + + + Slide show title is missing + Diashow-Titel fehlt + + + + Saving Slide Show + Diashow speichern + + + + Preview slide: %1 + Diashow-Vorschau: %1 + + + + SoftProjector + + This software is free and Open Source. If you can help in improving this program please visit softprojector.sourceforge.net + This software is free and Open Source. If you can help in improving this program please visit sourceforge.net/projects/softprojector/ + Diese Software ist kostenlos und ohne Kodierung. Wenn Sie bei der Verbesserung dieses Programms mithelfen möchten, besuchen Sie bitte sourceforge.net/projects/softprojector/ + + + + + Bible (F6) + Bibel (F6) + + + + + Songs (F7) + Lieder (F7) + + + + + Pictures + Bilder + + + + + Media + Media + + + + + Announcements (F8) + Ankündigungen (F8) + + + Project not saved + project as in document file + Projekt nicht gespeichert + + + Do you want to save current project? + project as in document file + Möchten Sie aktuelles Projekt speichern? + + + Announcement + Ankündigung + + + Words by: %1, Music by: %2 + Text: %1, Komponist: %2 + + + Words by: %1 + Text: %1 + + + Music by: %1 + Komponist: %1 + + + + Cannot start new edit + Neue Bearbeitung kann nicht strarten + + + + + + Another song is already been edited. + Another song is already beeb edited. + Ein weiteres Lied ist bereits bearbeitet. + + + + Schedule not saved + Plan nicht gespeichert + + + + Do you want to save current schedule? + Möchten Sie den aktuellen Plan speichern? + + + + &Clear Bible History List + &Bibelhistory-Liste entfernen + + + + &New Song... + &Neues Lied... + + + + &Edit Song... + &Lied bearbeiten... + + + + &Copy Song... + &Lied kopieren... + + + + &Delete Song + &Lied löschen + + + + &New Slide Show... + &Neue Diashow... + + + + &Edit Slide Show... + &Diashow bearbeiten... + + + + &Delete Slide Show + &Diashow löschen + + + + &Add Media Files... + &Hinzufügen der Mediadateien... + + + + &Remove Media Files + &Entfernen der Mediadateien + + + + &New Announcement... + &Neue Ankündigug... + + + + &Edit Announcement... + &Ankündigung bearbeiten... + + + + &Copy Announcement... + &Ankündigung kopieren... + + + + &Delete Announcement + &Ankündigung löschen + + + + + + Please save and/or close current edited song before edited a different song. + Bitte speichern und/oder schließen Sie das aktuell bearbeitete Lied vor einer neuen Liedbearbeitung. + + + + + + + No song selected + Kein Lied gewählt + + + No song has been selected to be edited. + Zum Bearbeiten wurde kein Lied ausgewählt. + + + Please select a song to be edited. + Zum Bearbeiten wählen Sie bitte ein Lied. + + + + Cannot create a new song + Ein neues Lied kann nicht erstellt werden + + + + No song has been selected to edit. + Kein Lied zum Bearbeiten gewählt. + + + + Please select a song to edit. + Bitte ein Lied zum Bearbeiten wählen. + + + + Cannot copy this song + Dieses Lied kann nicht kopiert werden + + + + No song has been selected to copy + Kein Lied zum Kopieren gewählt + + + + Please select a song to copy + Bitte ein Lied zum Kopieren wählen + + + + No song has been selected to delete + Kein Lied zum Löschen gewählt + + + + Please select a song to delete + Bitte ein Lied zum Löschen wählen + + + + + No slideshow selected + Keine Diashow gewählt + + + + No slideshow has been selected to edit. + Keine Diashow zum Bearbeiten gewählt. + + + + Please select a slideshow to edit. + Bitte eine Diashow zum Bearbeiten wählen. + + + + Delete slideshow? + Diashow löschen? + + + + Delete slideshow: " + Löschen der Diashow: " + + + + This action will permanentrly delete this slideshow + Durch diese Aktion wird die Diashow unwiderruflich gelöscht + + + + No slideshow has been selected to delete. + Keine Diashow zum Löschen gewählt. + + + + Please select a slideshow to delete. + Bitte eine Diashow zum Löschen wählen. + + + + No media selected + Kein Media gewählt + + + + No media item has been selected to delete. + Kein Media-Artikel zum Löschen gewählt. + + + + Please select a media item to delete. + Bitte ein Media-Artikel zum Löschen wählen. + + + + + + No Announcement Selected + Keine Ankündigung gewählt + + + + No announcement has been selected to edit + Keine Ankündigung zum Bearbeiten gewählt + + + + Please select an announcement to edit + Bitte eine Ankündigung zum Bearbeiten wählen + + + + No announcement has been selected to copy + Keine Ankündigung zum Kopieren gewählt + + + + Please select an announcement to copy + Bitte eine Ankündigung zum Kopieren wählen + + + + Delete Announcement? + Ankündigung löschen? + + + + Delete announcement: " + Löschen der Ankündigung: " + + + + This action will permanentrly delete this announcement + Durch diese Aktion wird die Ankündigung unwiderruflich gelöscht + + + + No announcement has been selected to delete + Keine Ankündigung zum Löschen gewählt + + + + Please select an announcement to delete + Bitte eine Ankündigung zum Löschen wählen + + + + No song has been selected to be printed. + Kein Lied zum Drucken gewählt. + + + + Please select a song to be printed. + Bitte ein Lied zum Drucken wählen. + + + + No announcement selected + Keine Ankündigung gewählt + + + + No announcement has been selected to be printed. + Keine Ankündigung zum Drucken gewählt. + + + + Please select a announcement to be printed. + Bitte eine Ankündigung zum Drucken wählen. + + + + + + Save Schedule? + Plan speichern? + + + + Do you want to save current schedule before creating a new schedule? + Möchten Sie den aktuellen Plan speichern bevor Sie einen neuen Plan erstellen? + + + + Do you want to save current schedule before opening a new schedule? + Möchten Sie den aktuellen Plan speichern bevor Sie einen neuen Plan öffnen? + + + + Open SoftProjector schedule: + SoftProjector-Plan öffnen: + + + + + SoftProjector schedule file + SoftProjector-Plandatei + + + + Save SoftProjector schedule as: + SoftProjector-Plan speichern als: + + + Open softProjector schedule: + softProjector-Plan öffnen: + + + softProjector schedule file + softProjector-Plandatei + + + Save softProjector schedule as: + softProjector-Plan speichern als: + + + + Do you want to save current schedule before closing it? + Möchten Sie den aktuellen Plan speichern bevor Sie schließen? + + + + Saving schedule file... + Plandatei speichern... + + + + An error has ocured when overwriting existing file. +Please try again with different file name. + Ein Fehler ist beim Überschreiben der bestehenden Datei aufgetreten. +Bitte versuchen Sie es mit einem anderen Dateinamen. + + + + Opening schedule file... + Plandatei öffnen... + + + + The schedule file you are trying to open is of uncompatible version. +Compatible version: 2 +This schedule file version: + Die Plan-Datei, die Sie zu öffnen versuchen, ist nicht kompatible-Version. +Kompatible Version: 2 +Diese Plan-Datei Version: + + + English + Englisch + + + Save Project? + project as in document file + Projekt speichern? + + + Do you want to save current project before opening other? + project as in document file + Bevor Sie ein anderes Projekt öffnen, möchten Sie dieses spreichern? + + + Open softProjector project + softProjector Projekt öffnen + + + softProjector project file + softProjector Projekt-Datei + + + Save softProjector project as: + softProjector Projekt speichern als: + + + Save Project? + Projekt speichern? + + + Do you want to save current project before creating a new project? + Möchten Sie vor dem Erstellen eines neuen Projekts das aktuelle speichern? + + + Do you want to save current project before closing it? + Möchten Sie vor dem Schließen speichern? + + + Incorrect project file format + Falsches Projekt Dateiformat + + + The softProjector project file you are opening, +is not supported by your version of softProjector. +You may try upgrading your version of softProjector. + Die softProjector Projekt-Datei, die Sie öffnen, +wird nicht von Ihrer Version von softProjector unterstützt. +Bitte versuchen Sie, ein Upgrade Ihrer Version von softProjector zu machen. + + + No song has been selected to be edited + Ein Lied zum bearbeiten wurde nicht ausgewählt + + + Please select a song to be edited + Wählen Sie ein Lied zum bearbeiten + + + No song has been selected to be copied + No song has been selected to be coppied + Ein Lied zum speichern wurde nicht ausgewählt + + + Please select a song to be copied + Please select a song to be coppied + Wählen Sie ein Lied zum speichern + + + + Delete song? + Lied löschen? + + + + Delete song " + Löschen des Liedes " + + + No song has been selected to be deleted + Das Lied zum löschen wurde nicht ausgewählt + + + Please select a song to be deleted + Wählen Sie ein Lied zum löschen + + + Are you sure that you want to delete a song? + Sind Sie sich sicher, dass Sie ein Lied loschen mochten? + + + + This action will permanentrly delete this song + Durch diese Aktion wird das Lied unwiderruflich gelöscht + + + + SoftProjectorClass + + + Tab + Tab + + + Stop displaying text to the screen (display black screen or wallpaper). Sortcut for this button is the Escape key. + Den Text auf dem Bildschirm nicht anzeigen (Schwarzer Bildschirm oder Hintergrund anzeigen). Direktlink ist die Esc-Taste. + + + Hide (Esc) + Verstecken (Esc) + + + + Esc + Esc + + + If Clear was pressed earlier, this will re-display the text to the screen + Wenn Löschen gedrückt wurde, wird der Text auf den Bildschirm wieder angezeigt + + + Show (F4) + Anzeigen (F4) + + + + F4 + F4 + + + + Use Multi Verse + Mehrere Verse anzeigen + + + + Service Schedule: + Serviceplan: + + + + If selected, this will allow to select multiple verses at one time. Will need to press "Show" each time. + Wenn aktiviert, ermöglicht es, mehrere Verse auf einmal auswählen. Sie müssen jedes Mal die Taste "Anzeigen" drücken. + + + + &File + &Datei + + + + &Edit + &Bearbeiten + + + + + &Help + &Hilfe + + + + Select Language + Sprache wählen + + + + Language + Sprache + + + + View + Ansicht + + + + Schedule + Plan + + + + Display Screen + Bildschirm + + + + File Tool Bar + Datei-Symbolleiste + + + + Schedule Tool Bar + Plan-Symbolleiste + + + + Edit Tool Bar + Symbolleiste bearbeiten + + + + Display Control Tool Bar + Kontrolsymbolleiste-Anzeige + + + + Import and export Bibles, songbooks and themes + Bibeln, Gesangbücher und Themen importieren und exportieren + + + + Open Help + Hilfe öffnen + + + + &Open Schedule + &Plan öffnen + + + + &Save Schedule + &Plan speichern + + + + Save Schedule &As + Plan speichern &als + + + + Save Schedule with different name + Plan unter einem anderen Namen speichern + + + + &New Schedule + &Neuer Plan + + + + Start new Schedule + Neuen Plan starten + + + + + Close Schedule + Plan schließen + + + + &Print + &Drucken + + + + Prints selected Bible chapter, selected song and selected announcement. + Druckt ausgewählte Bibel-Kapitel, Lieder und Ankündigung. + + + + + Print Schedule + Druckt Plan + + + + Ctrl+Shift+P + Ctrl+Shift+P + + + + Del + Löschen + + + + Donate + Spende + + + + Donate to softProjector development team + Spende für das softProjector-Entwicklungsteam + + + + Add to Schedule + Zum Plan hinzufügen + + + + F2 + F2 + + + + Remove from Schedule + Vom Plan entfernen + + + + Ctrl+Del + + + + F3 + F3 + + + + Clear Schedule + Plan entfernen + + + + Move Item To Top + Nach oben verschieben + + + + Move Schedule item to top of the list + Plan in der Liste nach oben verschieben + + + + Move Item Up + Nach oben verschieben + + + + Move Schedule item up + Plan nach oben verschieben + + + + Mode Item Down + Nach unten verschieben + + + + Move Schedule item down + Plan nach unten verschieben + + + + Move Item To Bottom + Nach unten verschieben + + + + Move Schedule item to bottom of the list + Plan in der Liste nach unten verschieben + + + + Show + Anzeigen + + + + Dsiplay to the screen (F4) + Auf dem Bildschirm anzeigen (F4) + + + + Show Passive Screen (Stop displaying to the screen) (Esc) + Passiven Bildschirm anzeigen (Beenden der Anzeige auf dem Bildschirm) (Esc) + + + + Clear + Entfernen + + + + Clear Display Text (Shift+Esc) + Bildschirm-Text entfernen (Shift+Esc) + + + + Shift+Esc + Shift+Esc + + + + On / Off + Ein / Aus + + + + Turn Display Screen On/Off + Bildschirmanzeige ein- bzw. ausschalten + + + Close + Schließen + + + Close Display Window + Bildschirm-Fenster schließen + + + + Hide + Verstecken + + + Songs + Lieder + + + toolBar + Symbolleiste + + + + &About + &Über + + + + &Settings... + &Einstellungen... + + + + Open settings dialog + Einstellungen-Dialog öffnen + + + + Ctrl+T + Ctrl+T + + + + E&xit + &Beenden + + + + Exit SoftProjector + softProjector beenden + + + + Ctrl+Q + Ctrl+Q + + + &Edit Current Song... + &Aktuelles Lied bearbeiten... + + + + Ctrl+E + Ctrl+E + + + &New Song... + &Neues Lied... + + + + Ctrl+N + Ctrl+N + + + + &Manage Database... + &Datenbank verwalten... + + + Import and export song collections and Bibles + Import und Export von Lieder-Sammlungen und Bibeln + + + + Ctrl+M + Ctrl+M + + + &Delete Current Song + &Aktuelles Lied löschen + + + Ctrl+D + Ctrl+D + + + + F1 + F1 + + + Copy Current Song... + Lied speichern... + + + Copy current song into a new songbook + Lied speichern in das neue Gesangbuch + + + + Ctrl+C + Ctrl+C + + + + Song Counter... + Song Counter + Lied-Zähler... + + + &Open Project + &Öffnen Projekt + + + + Ctrl+O + Ctrl-O + + + &Save Project + &Speichern Projekt + + + + Ctrl+S + Ctrl+S + + + Save Project &As + Speichern Projekt &unter + + + New Project + Neues Projekt + + + + Ctrl+Shift+N + Ctrl+Shift+N + + + Close Project + Schließen Projekt + + + + Ctrl+P + Ctrl+P + + + + SongCounter + + + Song Counter + Lied-Zähler + + + + Reset Selected + Zurücksetzen + + + + Reset All + Alles zurücksetzen + + + + Close + Schließen + + + + + January + January %1, %2 + Januar + + + + + February + February %1, %2 + Februar + + + + + March + March %1, %2 + März + + + + + April + April %1, %2 + April + + + + + May + Mai + + + + + June + June %1, %2 + Juni + + + + + July + July %1, %2 + Juli + + + + + August + August %1, %2 + August + + + + + September + September %1, %2 + September + + + + + October + October %1, %2 + Oktober + + + + + November + November %1, %2 + November + + + + + December + December %1, %2 + Dezember + + + + SongCounterModel + + Song Title + Name des Liedes + + + + Number + Nummer + + + + Title + Titel + + + + Count + Zähler + + + + Date + Datum + + + + Songbook + Gesangbuch + + + + SongSettingWidget + + Form + Form + + + + + Effects + Effekte + + + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + Wenn aktiviert, beim Umschalten wird der alte Text aus- und der neue eingeblendet. + + + + + Use fading effects + Animationseffekte verwenden + + + + + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + Nützlich, wenn ein Hintergrundbild benutzt wird. Zeigt einen besonderen Schatten-Effekt an. + + + + + Use shadow + Schatten verwenden + + + + + Use blurred shadow + Verschwommene Schatten verwenden + + + + + Song Information + Lied-Information + + + + + Show Stanza Title + Strophentitel anzeigen + + + + + Show Song Key + Lied-Tonart anzeigen + + + + + Show Song Number + Lied-Nummer anzeigen + + + + + + + + + Color... + Farbe... + + + + + + Alignment: + Ausrichtung: + + + + + Above Text + Über dem Text + + + + + Below Text + Unter dem Text + + + + + Show Song Ending + Lied-Endung anzeigen + + + *** + *** + + + This will show WordsBy and MusicBy as song ending + Beim Lied-Ende wirden Text und Komponist angezeigt + + + + + Song Copyright Info + Lied Urheberrechte-Info + + + + + + + Position: + Position: + + + + + Below Song Text + Unter dem Liedtext + + + + + + Bottom of Screen + Unten auf dem Bildschirm + + + + + Use Background Image + Ein Hintergrundbild verwenden + + + + + Browse... + Durchsuchen... + + + Text Alingment + Textausrichtung + + + Vertical: + Vertikal: + + + Horizontal: + Horizontal: + + + + + Top + Oben + + + + + Middle + Zentrieren + + + + + Bottom + Unten + + + + + Left + Links + + + + + Center + Zentrieren + + + + + Right + Rechts + + + Text Properties + Texteigenschaften + + + Color: + Farbe: + + + Choose color... + Farbe wählen... + + + + + + + + + Font... + Font + Schrift... + + + + + Type: + Art: + + + + Apply this background to all active backgrounds. + Wenden Sie diesen Hintergrund an alle aktiven Hintergründe. + + + + + Song Text Properties + Liedtext-Eigenschaften + + + + Alingment: + Ausrichtung: + + + + + Amount Of Screen To Use + Fläche vom Bildschirm benutzen + + + + Vertical Screen Use: + Vertikale Bildschirm-Nutzung: + + + + + Percent of screen to be used. + Prozentuale Nutzung vom Bildschirm. + + + + + Select to use either top portion of the screen or bottom. + Nutzungswahl zwischen des oberen oder des unteren Teils am Bildschirm. + + + + Top of screen + Oben auf dem Bildschirm + + + + Bottom of screen + Unten auf dem Bildschirm + + + + Use Separate Secondary Display Screen Settings + Einstellungen für den 2. Bildschirm + + + + * * * + * * * + + + + - - - + - - - + + + + ° ° ° + ° ° ° + + + + • • • + • • • + + + + ● ● ● + ● ● ● + + + + ▪ ▪ ▪ + ▪ ▪ ▪ + + + + ■ ■ ■ + ■ ■ ■ + + + + Vertical Screen Use + Vertikale Bildschirm-Nutzung + + + + % + % + + + + Top of Screen + Oben auf dem Bildschirm + + + + Reset All To Default + Alles zurücksetzen + + + + + Select a image for song wallpaper + Ein Hintergrundbild für Lied wählen + + + + + Images(%1) + Bilder(%1) + + + + Bold + Fett + + + + Italic + Kursiv + + + + StrikeOut + Durchgestrichen + + + + Underline + Unterstreichen + + + Images (*.png *.jpg *.jpeg) + Bilder (*.png *.jpg *.jpeg) + + + + SongWidget + + + Form + Form + + + + Use this menu to show only songs beloning to a particular Songbook + Verwenden Sie dieses Menü, um nur Lieder aus einem bestimmten Gesangbuch anzuzeigen + + + + Select Songbook to use + Gesangbuch wählen, um es zu verwenden + + + + Selects a song by the number in the selected Songbook + Wählt ein Lied nach der Nummer im gewählten Gesangbuch aus + + + + + + Filter: + Filter: + + + + Use this field to limit the display of the songs to only the ones that contain the specified text in the song title or song number + Dieses Feld verwenden, um die Anzeige von Liedern zu limitieren, die bestimmten Text im Lied-Titel oder in der Lied-Nummer enthalten + + + + + Search Type: + Suchart: + + + + Exact Match + Genaue Übereinstimmung + + + + Contains Phrase + Enthält Phrase + + + + Contains Word Phrase + Enthält Wordsatz + + + + Line Begins + Zeile beginnt + + + + Contains Any Word + Enthält jedes Wort + + + + Contains All Words + Enthält alle Worte + + + + Search + Suche + + + + Return + Zurück + + + Matches only songs the song number or title of which contains the entered string. + Verknüpft nur Lieder mit Lied-Nummer oder Titel, welche den eingegebenen Begriff enthalten. + + + + Contains + Enthält + + + Matches only songs the song number or title of which begins with the entered string. + Verknüpft nur Lieder mit Lied-Nummer oder Titel, welche mit dem eingegebenen Begriff beginnen. + + + + Begins + Beginnt + + + Matches only songs the song number or title of which exactly matches the entered string. + Verknüpft nur Lieder mit Lied-Nummer oder Titel, welche genau auf den eingegebenen Begriff zutreffen. + + + Exact match + Genaue Anpassung + + + + Done Searching? - Clear Search Results + Suche abgeschlossen? - Suchergebnisse löschen + + + Add the selected song to the playlist + Ausgewähltes Lied zur Wiedergabeliste hinzufügen + + + Add (F2) + Add to playlist (F2) + Fügen (F2) + + + F2 + F2 + + + Remove the selected song from the playlist + Ausgewähltes Lied aus der Wiedergabeliste entfernen + + + Remove (F3) + Remove from playlist + Entfernen (F3) + + + F3 + F3 + + + Song preview: None + Vorschau: Das Lied fehlt + + + Song preview + Lied-Vorschau + + + + Quickly display the selected song on the screen without adding it to playlist first + Schnelle Anzeige des ausgewählten Liedes auf dem Bildschirm, ohne es zuerst zur Wiedergabeliste hinzuzufügen + + + + Go Live (F5) + Zeigen (F5) + + + + F5 + F5 + + + + + All songbooks + Alle Gesangbücher + + + Song Preview: + Lied-Vorschau: + + + Comments: + Comments to songs + Kommentare zum Lied: + + + + + Filter Type: + Filter-Art: + + + + Notes: + Notes to songs + Notizen für Lieder + Notizen: + + + + Could not find song with number + Die Nummer des Liedes konnte nicht gefunden werden + + + + No such song + Dieses Lied gibt es nicht + + + + + All song categories + Alle Lied-Kategorien + + + + Please enter search text + Bitte Such-Text eingeben + + + + Search: + Suche: + + + + SongbooksModel + + + Title + Titel + + + + Information + Infomation + Information + + + + SongsModel + + + Num + Nr. + + + + Title + Titel + + + + Songbook + Gesangbuch + + + + Tune + Tonart + + + + ThemeModel + + + Name + Name + + + + Comments + Kommentare + + + diff --git a/translations/softpro_ru.qm b/translations/softpro_ru.qm new file mode 100644 index 0000000..c39e69e Binary files /dev/null and b/translations/softpro_ru.qm differ diff --git a/translations/softpro_ru.ts b/translations/softpro_ru.ts new file mode 100644 index 0000000..4c3923d --- /dev/null +++ b/translations/softpro_ru.ts @@ -0,0 +1,5118 @@ + + + +UTF-8 + + AboutDialog + + + About softProjecor + О программе softProjector + + + + Version: + Версия: + + + + an open souce media projection software + Открытая программа Софт Проектор + + + + Developers: + Разработчики: + + + + Vladislav Kobzar +------------------- +Ilya Spivakov +Matvey Adzhigirey + Ilya Spivakov +Matvey Adzhigirey +Vladislav Kobzar + Илия Спиваков +Матфей Аджигирей +Владислав Кобзарь + + + + Mac Build: + Подготовлет для Mac: + + + + Volodimir Vasuk + Володимир Васюк + + + + Special Thanks To: + Особая благодарность: + + + + Vitaliy Zhaborovskyy + + + + + Translators: + Переводчики: + + + + Russian: +German: +Czech: +Ukranian: + + + + + Vladimir Zinchenko +Eduard Schlak +Pavel Fric +Vitaliy Zhaborovskyy + + + + + If you would like to help developing this program<br> +or would like to contribute data, please visit:<br> +<a href="http://softprojector.org/">http://softprojector.org/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + Если вы хотите помочь в разроботке или желаете<br> +внести свой вклад данных, пожалуйста, посетите:<br> +<a href="http://softprojector.org/">http://softprojector.org/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + + + + <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FPCLPXFMH9XP4">Donate</a> + <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FPCLPXFMH9XP4">Пожертвовать</a> + + + Russian: +German: +Czech: + Русский: +Немецкий: +Чешский: + + + Vladimir Zinchenko +Eduard Schlak +Pavel Fric + Владимир Зинченко +Эдуард Шлак +Павел Фрик + + + Special thanks to: + Особая благодарность: + + + If you would like to help developing this program<br> +or would like to contribute data, please visit:<br> +<a href="http://softprojector.sourceforge.net/">http://softprojector.sourceforge.net/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + Если вы хотите помочь в разроботке или желаете<br> +внести свой вклад данных, пожалуйста, посетите:<br> +<a href="http://softprojector.sourceforge.net/">http://softprojector.sourceforge.net/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">If you would like to help developing this program </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">or would like to contribute data, please visit:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://softprojector.sourceforge.net/"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">http://softprojector.sourceforge.net/</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://sourceforge.net/projects/softprojector/"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">http://sourceforge.net/projects/softprojector/</span></a></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">If you would like to help developing this program </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">or would like to contribute data, please visit:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://softprojector.com/"><span style=" text-decoration: underline; color:#0000ff;">http://softprojector.com/</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://sourceforge.net/projects/softprojector/"><span style=" text-decoration: underline; color:#0000ff;">http://sourceforge.net/projects/softprojector/</span></a></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Если вы хотите помочь в разроботке или желаете</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">внести свой вклад данных, пожалуйста, посетите:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://softprojector.sourceforge.net/"><span style=" text-decoration: underline; color:#0000ff;">http://softprojector.sourceforge.net/</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://sourceforge.net/projects/softprojector/"><span style=" text-decoration: underline; color:#0000ff;">http://sourceforge.net/projects/softprojector/</span></a></p></body></html> + + + + Close + Закрыть + + + + AddSongbookDialog + + + Add songbook + Добавить сборник + + + + Songbook Title: + Название сборника: + + + + Description: + Описание: + + + + AnnounceModel + + + Title + Название + + + + AnnounceWidget + + + Form + Форма + + + Announcement text: + Текст объявления: + + + Quickly display the selected song on the screen without adding it to playlist first + Вывод на экран без предварительного включения в список воспроизведения + + + + Announcements: + Обьявление: + + + + Quickly display announcement + Quickly display announcemnt + Быстрый вывод объявлений + Быстрый вывод объявлений + + + + Go Live (F5) + На экран (F5) + + + + F5 + + + + + Announcement Preview: + Предпросмотр: + + + Settings + Настройки + + + Horizontal alignment: + Горизонтальное выравнивание: + + + Left + Лево + + + Center + Центр + + + Right + Право + + + Vertical alignment: + Вертикальное выравнивание: + + + Top + Верх + + + Middle + Середина + + + Bottom + Нижний + + + Add this announcement to history list, automatically will be added to the list when "Go Live" button is pressed + add currently selected verse into history list, automatically will be added when "Go Live" button is pressed + Добавить выбранный текст в список истории (автоматически добавляется при нажатии F5) + + + Add (F2) + Добавить (F2) + + + Add to history + Добавить к истории + + + This list contains verses that were sent to be shown + В списке находятся тексты для вывода на экран + + + Remove current selected announcement in the history list + Remove current selected verse in the history list + Удалить выбранный текст из списка истории + + + Remove (F3) + Remove from history + Удалить (F3) + + + + AnnouncementSettingWidget + + Form + Форма + + + + + Effects + Эфекты + + + + + 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 + Использовать тени + + + + + Use blurred shadow + Размытая тень + + + + + Use Background Image + Использовать рисунок фона + + + + + Browse... + Обзор... + + + + Apply this background to all active backgrounds. + Применить этот фон ко всем активным фоном. + + + + + Color... + Цвет... + + + Text Alingment + Выравнивание текста + + + Vertical: + Вертикальное: + + + Horizontal: + Горизонтальное: + + + + + Top + Верх + + + + + Middle + Середина + + + + + Bottom + Нижний + + + + + Left + Лево + + + + + Center + Центр + + + + + Right + Право + + + + + Text Properties + Свойства текста + + + Color: + Цвет: + + + Choose Color... + Выбрать цвет... + + + + + Font... + Font + Шрифт... + + + + + Alignment: + Выровнять к: + + + + Use Separate Secondary Display Screen Settings + Особые настройки для дополнительного экрана + + + + Reset All To Default + Сбросить на умолчания + + + + + Select a image for announcement wallpaper + Выбор рисунка + + + + + Images(%1) + Файлы изображений (%1) + + + + Bold + Жирный + + + + Italic + Курсив + + + + StrikeOut + Зачеркнутый + + + + Underline + Подчеркнутый + + + Images (*.png *.jpg *.jpeg) + Изображения (*.png *.jpg *.jpeg) + + + + BibleInformationDialog + + + Bible Information + Информация о Библии + + + + Bible Name: + Версия Библии: + + + + Abbreviation: + Аббревиатура: + + + + Information\ +Copyright: + Информация/ +Копирайт: + + + + Right to left + Чтение справа налево + + + + BibleSettingWidget + + Form + Форма + + + + + Primary Bible: + Первая Библия: + + + + + Secondary Bible: + Вторая Библия: + + + + + Trinary Bible: + Третья Библия: + + + + Operator Screen Bible: + Библия оператора: + + + + This bible version will be used for the operator to select verses and search bible + Эта версия Библии используется оператором для выбора и поиска стихов + + + + + Effects + Эфекты + + + + + 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 + Использовать тени + + + + + Use blurred shadow + Размытая тень + + + + + Use Background Image + Использовать рисунок фона + + + + + Browse... + Обзор... + + + + Apply this background to all active backgrounds. + Применить этот фон ко всем активным фоном. + + + + + + + Color... + Цвет... + + + + + Amount of screen to use: + Размер используемого экрана: + + + + + Percent of screen to be used. + Размер используемого экрана. + + + + + Select to use either top portion of the screen or bottom. + а я и дом мой будем... + Выберете ныне себе, какую часть экрана использовать. + + + + + Top of Screen + Вверху экрана + + + + Botton of Screen + Внизу экрана + + + + Use Separate Secondary Display Screen Settings + Особые настройки для дополнительного экрана + + + + Bottom of Screen + Внизу экрана + + + Text Alingment + Выравнивание текста + + + Vertical: + Вертикальное: + + + + + Top + Верх + + + + + Middle + Середина + + + + + Bottom + Нижний + + + Horizontal: + Горизонтальное: + + + + + + + Left + Лево + + + + + + + Center + Центр + + + + + + + Right + Право + + + + + Text Properties + Свойства текста + + + Color: + Цвет: + + + Choose color... + Изменить цвет... + + + + + + + Font... + Font + Шрифт... + + + + + + + Alignment: + Выровнять к: + + + + + Caption Properties + Свойства оглавления + + + + + + + Position: + Положение: + + + + + Above Text + Перед текстом + + + + + Below Text + После текста + + + + + Show Bible Version Abbriviation + Показывать абревиатуру Библии + + + + + Amount Of Screen To Use + Amount Of Sceen To Use + Размер используемого экрана + + + Select "Top" to use top portion of the display screen + Выберете "Верх" для использования верхней части экрана + + + Select "Bottom" to use bottom portion of the display screen + можна и не переводить, смотри украинский перевод, там кеп подписался + Выберете "Нижний" для использования нижний части экрана + + + Amount Of Sceen To Use (Primary Bible Only) + Размер используемого экрана (только для первой Библии) + + + Use this much of the screen: + Использовать экрана: + + + Align to: + Aling to: + Выровнять к: + + + Buttom + По нижнему краю + + + + Reset All To Default + Сбросить на умолчания + + + + + + + + + + + None + Не выбрана + + + + + Same as primary Bible + Такая же, как первая Библия + + + + + Select a image for Bible wallpaper + Выбор рисунка + + + + + Images(%1) + Файлы изображений (%1) + + + + Bold + Жирный + + + + Italic + Курсив + + + + StrikeOut + Зачеркнутый + + + + Underline + Подчеркнутый + + + Images (*.png *.jpg *.jpeg) + Изображения (*.png *.jpg *.jpeg) + + + + BibleWidget + + + Form + Форма + + + + Search: + Поиск: + + + + Search the bible for specified text. Matched verses will appear in the list below. If a bible book is selected, only that book will be searched. + Поиск в Библии по заданному тексту. Найденные стихи появятся в списке ниже. Поиск осуществляется только по выбранной книге. + + + If selected, only Bible verses starting with the search string will be searched. + Стихи Библии которые начинаются словами введенными в строку поиска. + + + Begins + Начинается + + + If selected, Bible verses that contain the search string will be searched. + Стихи Библии содержащие слова введенные в строку поиска. + + + Contains + Содержит + + + + Search + Поиск + + + + Return + + + + Limit search to: + Поиск по: + + + If selected, the entire bible will be searched. + Поиск по всей Библии. + + + + Entire Bible + Всей Библии + + + If selected, only the selected Bible book will be searched. + Поиск по выбранной книге Библии. + + + + Current Book + Выбранной книге + + + If selected, only the selected chapter of the selected Bible book will be searched. + Поиск по выбранной главе. + + + + Current Chapter + Выбранной главе + + + Add (F2) + Добавить (F2) + + + Clear all history items + Очистить список истории + + + Clear + Clear History + Очистить + + + + Results: + Найдено: + + + + Book: + Книга: + + + + + + Filter criteria for the bible list. If the first character of the filter is a number, then only books starting with this number are matched. Example filters: "Deuter", "1Thes". + Критерии поиска по книгам Библии. Если вначале ставится цифра, то подбираются только книги начинающиеся с этой цифры. Примеры задания критериев: "Втор", "1Тим". + + + + + Quickly display the selected Bible verse on the screen + Вывести выбранный текст на экран + + + + Select search range + Диапазон поиска + + + + Select search type + Тип поиска + + + + Contains Phrase + Содержит фразу + + + + Contains Word Phrase + Содержить слово/фразу + + + + Verse Begins + В начале стиха + + + + Contains Any Word + Содержит любое из слов + + + + Contains All Words + Содержит все слова + + + + Hide +Results + Скрыть +найденное + + + + Chapter: + Глава: + + + + Verse: + Стих: + + + + Go Live (F5) + На экран (F5) + + + + F5 + + + + Add currently selected verse into history list, automatically will be added when "Go Live" button is pressed + add currently selected verse into history list, automatically will be added when "Go Live" button is pressed + Добавить выбранный текст к истории. Автоматически добавляется при нажатии F5 + + + Add to history + Добавить к истории + + + + This list contains verses that were sent to be shown + В этом списке находятся стихи для вывода на экран + + + Remove current selected verse in the history list + Удалить данный стих из списка истории + + + Remove (F3) + Remove from history + Удалить (F3) + + + Total of + Всего + + + search results returned. + результаты поиска. + + + Total of 281 or more results. <font color=red>Only 281 results can be returned.</font> + Найдено 281 или больше записей. <font color=red>Выводится только 281 записей.</font> + + + Total + + Всего + + + + +results + +результатов + + + No search results have retrieved + Не найдено ничего + + + No search results + Не найдено ничего + + + Error opening Bible histories + Ошибка при открытии Библейских историй + + + Cound not find any or all Bible verses from file withing current primary Bible. +Try changing primary Bible and reopen project file. + Не найдено ничего в первой версии Библии +Попытайтесь сменить первую версию Библии и снова открыть файл. + + + + Please enter search text + Пожалуйся, введите текст для поиска + + + + Total +resutls: +%1 + Всего: %1 + + + + No search +results. + Ничего не найдено. + + + + BiblesModel + + + Title + Название + + + + DisplayScreen + + + Dispaly Screen + Экран + + + + Video Player Error + Ошибка видеоплеера + + + + Words by: %1, Music by: %2 + Слова: %1, Музыка: %2 + + + + Words by: %1 + Слова: %1 + + + + Music by: %1 + Музыка: %1 + + + + EditAnnouncementDialog + + + Edit Announcement + Редактировать обьявление + + + + Title: + Название: + + + + ID: + + + + + Use Private Settings + Использовать особые настройки + + + + Timed slides: + Время на слайд: + + + + sec + seconds + сек + + + + Loop + Повторять + + + + Save + Сохранить + + + + Cancel + Отмена + + + + Announce + - Text of the announcement goes here + +Slide + - Text of the announcement goes here +You can have both Annouce or Slide as announcement block titles. + Обьявление + - Здесь текст обьявления + +Слайд + - И здесь текст обьявления + Вы можете .создавать блоки обьявлений. + + + + Announcement title cannot be left empty. +Please enter announcement title. + Обьявление не может быть без названия. +Пожалуйста, введите название для этого обьявления. + + + + Announcement title is missing + Отсутствует название обьявления + + + + EditWidget + + + Edit and/or Add New songs + Редактировать или добавить новую песню + + + + Songbook: + Сборник: + + + + Print + Печать + + + + Title: + Название: + + + + Words by: + Слова: + + + + Music by: + Музыка: + + + + Key: + Тональность: + + + + Category: + Категория: + + + + Use Private Song Settings + Использовать особые настройки для этой песни + + + + Main Text Properties: + Свойства основного текста: + + + + + + Color... + Цвет... + + + + + + Font... + Шрифт... + + + + Main Text Alignment: + Выравнивание основного текста: + + + + Song Information Properties: + Отображение информации: + + + + Song Ending Properties: + Свойства футера песни: + + + + Use Background: + Использовать фон: + + + + Top + Верх + + + + Middle + Середина + + + + Bottom + Низ + + + + Other + Дополнительно + + + Text Alingment + Выравнивание текста + + + + Left + По левому краю + + + + Center + По центру + + + + Right + По правому краю + + + + Browse... + Обзор... + + + Use default + По умолчанию + + + Text font: + Шрифт текста: + + + Background: + Фоновый рисунок: + + + + Notes: + Заметки: + + + Comments: + Коментарии: + + + + Save + Сохранить + + + + Ctrl+S + + + + + Cancel + Отмена + + + + Ctrl+Q + + + + + Add a new Songbook + Добавить новый сборник + + + + Select Songbook + Выбрать сборник + + + + Select a Songbook to which you want to add a song + Выбрать сборник в который вы хотите добавить песню + + + + Song title cannot be left empty. +Please enter song title. + Название песни не может остаться незаполненным. +Пожалуйста введите название песни. + + + + Song title is missing + Название песни отсутствует + + + + Cannot find exact match in database + Невозможно найти точное соответствие в базе данных + + + + The exact match of a song you are editing was not found in database. +In order to edit this song, you need to add it to database. + +Please select a Songbook to which you want to copy this song to: + В базе данных не найдено песни точно соответствующей редактируемой. +Для продолжения редактирования, необходимо добавит песню в базу данных. + +Пожалуйста выберите сборник в который вы желаете поместить данную песню: + + + + Copy to a new Songbook + Копировать песню в новый сборник + + + + Select a Songbook to which you want to copy this song to + Выбрать сборник в который вы хотите добавить песню + + + Verse 1 + - words of verse go here + +Refrain + - words of Chorus/Refrain +go here + +Verse 2 + - words of verse go here + Куплет 1 + - слова куплета здесь + +Припев + - слова припева здесь + +Куплет 2 + - слова куплета здесь + + + + Add a Songbook + Добавить сборник + + + Select a picture for the wallpaper + Выбрать фоновый рисунок + + + + Bible Stories + Библейские истории + + + + Gospel + Весть о спасении + + + + God, His love and greatness + Божья любовь и величие + + + + The Resurrection of Christ + Воскресение Христово + + + + Time + Время + + + + The second coming of Christ and the judgement + Второе пришествие Христа и суд + + + + Children and Family + Детские и семейные + + + + For new converts + Для новообращённых + + + + Spiritual struggle and victory + Духовная борьба и победа + + + + Harvest + Жатвенные + + + + Jesus Christ + Иисус Христос + + + + Love + Любовь + + + Mom + Мама + + + + Prayer + Молитвенные + + + + Youth + Молодёжные + + + + Mother + Мама + + + + Wedding + На бракосочетание + + + Sunset / dawn + На закате / рассвете + + + + Verse 1 + - words of verse go here + +Refrain +- words of Chorus/Refrain +go here + +Verse 2 + - words of verse go here + Куплет 1 + - слова куплета здесь + +Припев + - слова припева здесь + +Куплет 2 + - слова куплета здесь + + + + Baptism + На крещение + + + + Sunset / Sunrise + Утренние и вечерние + + + + New Years + На новый год + + + + Funeral + На погребение + + + + At the ordination + На рукоположение + + + + On the Lord's Supper + На хлебопреломление + + + + Heavenly abode + Небесные обители + + + + Instruction and self-test + Наставление и самоиспытание + + + + Holy Ghost + О Духе Святом + + + + Church + О Церкви + + + + Before church meeting + Перед началом собрания + + + + Last Days + Последнее время + + + + Practical life with God + Практическая жизнь с Богом + + + + At the end of church meeting + При заключении собрания + + + + Welcome and farewell + Приветственные и прощальные + + + + The call to work + Призыв к труду + + + + Call to repentance + Призыв к покаянию + + + + Journey of faith, faith and hope + Путь веры, вера и упование + + + + Various Christian holidays + Разные христианские праздники + + + + Determination and faithfulness + Решительность и верность + + + + Christmas + Рождество Христово + + + + Following Christ + Следование за Христом + + + + The Word of God + Слово Божье + + + + Salvation + Спасение + + + + Suffering and death of Christ + Страдание и смерть Христа + + + + Consolation and encouragement + Утешение и ободрение + + + + Praise and thanksgiving + Хвала и благодарение + + + + Christian Joy + Христианская радость + + + + Select an image for the wallpaper + Выберете рисунок для фона + + + + Images(%1) + Файлы изображений (%1) + + + + GeneralSettingWidget + + Form + Форма + + + + If checked, the screen "window" is always drawn on top of other windows. This prevents the user from accidently drawing a window onto the projector's screen. + Окно экрана сверху других окон (требуется перезапуск программы). Эта опция предохраняет от случайного вывода информации на экран. + + + + Display window always on top + Окно экрана всегда сверху + + + + Theme: + Тема: + + + + Add New Theme + Добавить новую тему + + + + Primary Display Screen: + Главный экран: + + + + Secondary Display Screen: + Дополнителный экран: + + + + Primary Display Screen Controls + Клавиши управление основным экраном + + + + Button Size: + Размер клавиш: + + + + 16x16 + + + + + 24x24 + + + + + 32x32 + + + + + 48x48 + + + + + 64x64 + + + + + 96x96 + + + + + Alignment: + Выровнять к: + + + + Top + Верх + + + + Middle + Середина + + + + Bottom + Нижний + + + + Left + По левому краю + + + + Center + По центру + + + + Right + Право + + + + Opacity: + Прозрачность: + + + + Transparent + Прозрачный + + + + Opaque + темный + + + + NOTE: Display screen controls will be visible on the primary display screen only when one monitor is avaliable. + Обратите внимание, что клавиши управления экраном будуть видимы на основном экране только если один монитор используеться. + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + Полезно при использовании фоновых рисунков. Получаются интересные теневые эффекты. + + + Use shadow + Использовать тени + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + Плавное затухание при переходе с одного стиха на другой. + + + Use fading effects + Эффект затухания + + + Use blurred shadow + Размытая тень + + + Use Passive Background Image + Использовать пасивный фон + + + Browse... + Обзор... + + + + Display Screen Selection + Выбрать экран + + + Display Screen: + Экран: + + + + + Select onto which screen to dispaly + Выбор экрана для отображения + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600; color:#ff0000;">NOTE:</span><span style=" font-size:8pt; color:#ff0000;"> Display screen selection is currenly under development. Changing the screen number, will change on which screen projection will be displayed.<br />On Windows, order is from left-to-right.</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600; color:#ff0000;">NOTE:</span><span style=" font-size:8pt; color:#ff0000;"> Display screen selection is currenly under development. Changing the screen number, will change on which screen projection will be displayed.<br />On Windows, oder is from right-to-left.</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600; color:#ff0000;">ОБРАТИТЕ ВНИМАНИЕ:</span><span style=" font-size:8pt; color:#ff0000;">Опция выбора экрана в разработке.<br />Смена номер экрана позволяет задать рабочий стол,<br />на который будет выводиться изображение<br />В Windows рабочие столы в порядке слева направо</span></p></body></html> + + + + Reset All To Default + Сбросить все на умолчания + + + Select a image for main wallpaper + Выбрать фоновый рисунок + + + Images (*.png *.jpg *.jpeg) + Изображения (*.png *.jpg *.jpeg) + + + + none + Не выбрана + + + + None + Не выбрана + + + + Edit Theme + Редактировать тему + + + + Theme Name: + Название темы: + + + + Comments: + Коментарии: + + + + Default + По умолчанию + + + + This theme will contain program default settings. + Эта тема содержить установки по умолчанию. + + + + HelpDialog + + + softProjector Help + softProject Help + Справка по Софт Проектору + + + + about:blank + + + + + Close + Закрыть + + + + Ctrl+Q + + + + + ManageDataDialog + + + Manage Database + Управление базой данных + + + + Bibles + Библии + + + + + + Download +&& Import... + Загрузка +&& Импорт... + + + + Import a new Bible into your database + Import a new Bible into your database/ + Добавить в базу данных новый модуль Библии + + + + + + &Import... + Импортирование модуля Библии + &Импорт... + + + + + + + Ctrl+I + + + + + Edit Bible title of currently selected Bible. + Редактировать название выбранного модуля Библии. + + + + + + &Edit... + &Правка... + + + + + + Ctrl+E + + + + + Export currently selected Bible to share with others. + Экспортировать выбранный модуль Библии. + + + + + + E&xport... + &Экспорт... + + + + + + + Ctrl+X + + + + + Delete a Bible that you will no longer want to use in this program. + Удалить модуль Библии который вы больше не будет использовать в этой программе. + + + + + + &Delete... + &Удаление... + + + + + + Ctrl+D + + + + + Songbooks + Сборники + + + + + + Import a new Songbook into database. + Добавить в базу данных новый сборник. + + + + + Edit the title and information about the Songbook. + Редактировать название сборника и информацию о нем. + + + + + + Export currently selected Songbook to be able to share with others and for backup. + Экспортировать выбранный сборник для других пользователей и для резервной копии. + + + + + Delete currently selected Songbook from database. + Удалить выбранный сборник из базы данных. + + + + Themes + Темы + + + + &New... + &Новая... + + + + Export All... + Экспортировать все... + + + + Close Manage Database Dialog + Закрыть диалоговое окно управления базой данных + + + + Close + Закрыть + + + + Ctrl+Q + + + + + Select a songbook to import + Выбрать сборник для импортирования + + + softProjector songbook file + Файл сборника в формате Софт Проектор + + + + + Importing... + Импортируется... + + + + + + Cancel + Отмена + + + User songbook + Пользовательский сборник + + + Songbook imported by the user + Сборник добавленный пользователем + + + + Too old SongBook file format + Формат файла старой версии SoftProjector + + + + Save the songbook as: + Сохранить сборник как: + + + softProjector songbook file (*.sps) + Файл сборника в формате Софт Проектор (*.sps) + + + + SoftProjector songbook file + Файлы песенников SoftProjector + + + + The SongBook file you are opening, is of a later release and +is not supported by current version of SoftProjector. +You are trying to open SongBook version %1. +Please upgrade to latest version of SoftProjector and try again. + Этот песенник создан более позней версией SoftProjector +и не может быть открыт. Нужен SoftProjector хотя бы версии %1. + Пожалуйста, обновите SoftProjector до последний версии и +попробуйте опять. + + + + + Unsupported SongBook version. + Неподдерживаемый формат файла песенника. + + + + The SongBook file you are opening, is not supported +by current version of SoftProjector. + + Песенник не поддерживается. + + + + The SongBook file you are opening, is in very old format +and is no longer supported by current version of SoftProjector. +You may try to import it with version 1.07 and then export it, and import it again. + Песенник, который вы пытаетесь открыт, имеет очень старый формат, +который уже не поддерживается этой версией SoftProjector. +Вы можете попробовать експортировать его предідущей версией, +потом экспортировать, и уже получений результат открыть в этой версии SoftProjector. + + + + + SoftProjector songbook file (*.sps) + Файл сборника в формате SoftProjector (*.sps) + + + + + An error has ocured when overwriting existing file. +Please try again with different file name. + Ошибка переименования файла. +Пожалуйста, укажите другое имя. + + + + Export complete + Экспорт завершен + + + + The songbook " + Сборник " + + + + " +Has been saved to: + + " +Сохранён как: + + + + + Delete songbook? + Удалить сборник? + + + + + Are you sure that you want to delete: + Вы уверены, что хотите удалить: + + + + This action will permanentrly delete this songbook + Сборник будет удален навсегда + + + + Select Bible file to import + Выбор модуля Библии для импортирования + + + + + SoftProjector Bible file + Библия в формате Софт Проектора + + + + The Bible format you are importing is of an usupported file version. +Your current SoftProjector version does not support this format. + Формат импортируемого файла Библии +не поддерживается этой версией SoftProjector. + + + + Unsupported Bible file format + Неподдерживаемый формат файла Библии + + + + + Edit Theme + Редактировать тему + + + + + Theme Name: + Название темы: + + + + + Comments: + Коментарии: + + + + Default + По умолчанию + + + + This theme will contain program default settings. + Эта тема содержить установки по умолчанию. + + + + Select a Theme to import + Выберете тему для импорта + + + + + SoftProjector Theme file + Файлы тем SoftProjector + + + + Importing Themes... + Импортирование тем... + + + + The Theme file you are opening, is of a later release and +is not supported by current version of SoftProjector. +You are trying to open Theme version %1. +Please upgrade to latest version of SoftProjector and try again. + Эта тема создана более позней версией SoftProjector +и не может быть открыта. Нужен SoftProjector хотя бы версии %1. + Пожалуйста, обновите SoftProjector до последний версии и +попробуйте опять. + + + + + Unsupported Theme version. + Неподдерживаемая версия темы. + + + + The Theme file you are opening, is not supported +by current version of SoftProjector. + + Тема, которую вы пытаетесь открыть не поддерживается. + + + + Export Theme as: + Экспортировать тему, как: + + + + Export all theme as: + Экспортировать все темы, как: + + + + softProjector Theme file + Файл темы SoftProjector + + + + Exporting Themes... + Экспортирование тем... + + + + Delete Theme? + Удалить тему? + + + + Are you sure that you want to delete theme: + Вы действительно хотите удалить тему: + + + + This action will permanentrly delete this theme + Это действие удалит тему навсегда + + + + Error opening module list. + Ошибка открытия список модулей. + + + + Failed to open mod list + Не удалось открыть список модулей + + + + +Downloading: %1 +From: %2 + Загружается: %1 +с: %2 + + + + Error opening save file %1 for download %2 +Error: %3 + Ошибка при открытии сохраненного файла %1 при загрузке %2. +Ошибка: %3 + + + + Error downloading module list. + Ошибка загрузки списка модулей. + + + + Bible Module Download + Скачать библейский модуль + + + + Songbook Module Download + Скачать модуль песенника + + + + Theme Module Download + Скачать модуль темы + + + + Download Error: %1 + + + + + Saved to: %1 + Сохранено в: %1 + + + + +Importing: %1 + Импортирование: %1 + + + Old Bible file format + Библия в старом формате Софт Проектора + + + The Bible format you are importing is of an old version. +Your current SoftProjector does not support this format. +Please download lattest Bibles and import them. + The Bible format you are importing is of an old version. +Your current SoftProjector does not support this format. +Please download lattest Bibles and import them + Вы пытаетесь импортировать Библию в старом формате. +Данная версия Софт Проектора не поддерживает этот формат. +Пожалуйста загрузите и импортируйте новую версию Библии. + + + + New Bible file format + Новый формат Библии + + + + The Bible format you are importing is of an new version. +Your current SoftProjector does not support this format. +Please upgrade SoftProjector to latest version. + Вы импортируете Библию в новом формате. +Ваша версия Софт Проектора не поддерживает этот формат. +Пожалуйста установите новейшую версию Софт Проектора. + + + All supported Bible files + Все поддерживаемые модули Библий + + + softProjector Bible file + Библия в формате Софт Проектора + + + Unbound Bible file + Библия в формате Unbound Bible + + + + Save exported Bible as: + Сохранить экспортируемую Библию как: + + + + Exporting... + Экспорт... + + + + Bible has been exported + Экспорт Библии завершен + + + + Bible: + + Библия: + + + + + +Has been saved to: + + +Сохранена как: + + + + + Delete Bible? + Удалить Библию? + + + + This action will permanentrly delete this Bible + Библия будет удалена навсегда + + + + Edit Songbook + Редактировать сборник + + + Edit Bible name + Редактировать название Библии + + + Bible title: + Название Библии: + + + + MediaWidget + + + Form + Форма + + + + - Media Library - + -- Медиа библиотека -- + + + + Go Live (F5) + На экран (F5) + + + + F5 + + + + + Open + Открыть + + + + Aspect Ratio: + Соотношение сторон: + + + + Auto + Авто + + + + Scale + Масштаб + + + + 4/3 + + + + + 16/9 + + + + + + <center>No media</center> + <center>Нет медиа</center> + + + + No Media + Нет медиа + + + + Open Music/Video File + Открыть файл с видео/музыкой + + + + + Media Files (%1);;Audio Files (%2);;Video Files (%3) + Медиа файлы (%1);; файлы аудио (%2);; видео файлы (%3) + + + + Select Music/Video Files to Open + Выбор файлов музыки/видео + + + + ModuleDownloadDialog + + + Dialog + + + + + Select modules you wish to download and import. + Выберете модули, которые желаете загрузить и импортировать. + + + + Select All + Выбрать все + + + + Deselect All + Отменить выбор + + + + ModuleProgressDialog + + + Download / Import Progress Dialog + Загрузить / Импортировать диалог прогреса + + + + Current Progress: + Текущий прогрес: + + + + Total Progress: + Общий прогрес: + + + + Close + Закрыть + + + + Native language name + + English + Русский + + + + English + Do not change + Русский + + + + PassiveSettingWidget + + Form + Форма + + + + + Use Passive Background Image + Использовать пасивный фон + + + + + Browse... + Обзор... + + + + Use Separate Secondary Display Screen Settings + Особо для дополнительного экрана + + + + Reset All To Default + Сбросить на умолчания + + + + + Select a image for passive wallpaper + Выбрать фоновый рисунок + + + + + Images(%1) + Изображения (%1) + + + + PictureSettingWidget + + Picture Settings + НАстройка изображений + + + + When Displaying Slideshows: + Для слайдшоу: + + + + Expand Small Images + Розтягивать маленькие изображения + + + + Fit Images To Screen + Фитировать изображения + + + + Fit Images To Screen By Expanding + Фитировать по наименшей стороне + + + + Resize Large Images on Import + Масштабировать большие изображения перед импортом + + + + It is highly recommended to reduce large images on import. This will improve load, save and display time of slideshows. +We recommend to resize images to display screen size. + Для оптимизации показа и смены слайдов очень рекомендуется перед импортом +изменять размеры изображений соответствено размерам экрана. + + + + Bound Box: + Граничные размеры: + + + + 800 x 800 + + + + + 1024 x 1024 + + + + + 1280 x 1280 + + + + + 1366 x 1366 + + + + + 1440 x 1440 + + + + + 1600 x 1600 + + + + + 1920 x 1920 + + + + + Custom + Другие + + + + Inalid Numeric Value + Некоректное число + + + + Entered '%1' custom width is not numeric. + %1 не есть число. + + + + PictureWidget + + + Form + Форма + + + + Slide Shows: + Слайд шоу: + + + + Go Live (F5) + На экран (F5) + + + + F5 + + + + + + Picture Preview + Предпросмотр изображения + + + + Picture Information + Информация о изображении + + + + Edit Preview Slide Show: + Редактирование предпросмотра: + + + + Add + Добавить + + + + Remove + Удалить + + + + Clear + Очистить + + + + Editing slide show here will not change anything in database. To have save changes, use "New Slide Show" or "Edit Slide Show". + Изменения, проведенные здесь, изменяют только предпросмотр слайдшоу и не влияют больше ни на что. + + + + + Preview slide: + Предпросмотр слайда: + + + + Select Images to Open + Открыть изображение + + + + Images(%1) + Файлы изображений (%1) + + + + Adding files... + Добавить файлы... + + + + Cancel + Отмена + + + + Slide Show: %1 + Слайд шоу: %1 + + + + PrintPreviewDialog + + + softProjector Print Dialog + Диалог печати softProjector + + + + Margins: + Поля: + + + + Left Margin + Левое + + + + L: + Л: + + + + Top Margin + Верхнее + + + + T: + В: + + + + Right Margin + Правоє + + + + R: + П: + + + + Bottom Margin + Нижнее + + + + B: + Н: + + + + Inch + дюймы + + + + Millimeter + миллиметры + + + + Pixel + пиксели + + + + Point + точки + + + + Font: + Шрифт: + + + + To PDF + в PDF + + + + Print + Печать + + + + Tune: %1 + + Тональьность: %1 + + + + + Words By: %1 Music By: %2 + + + Слова: %1, Музыка: %2 + + + + + + Words By: %1 + + + + + Слова: %1 + + + + + Music By: %1 + + + Музыка: %1 + + + + + + + +Notes: +%1 + + +Заметки: +%1 + + + + Announcements: %1 + + + Обьявлений: %1 + + + + + + SoftProject Schedule: + Программа SoftProjector: + + + + Save PDF as + Зберегти PDF як + + + + SettingsDialog + + + softProjector - Settings + Настройки программы + + + + General + Общие + + + + Passive + Пасив + + + + Bible + Библия + + + + Picture + Изображения + + + + Media + + + + + Announcements + Объявление + + + + General SoftProjector Settings + Общие настройки SoftProjector + + + + Passive Settings + Настройки пасивного режима + + + + This setting are displayed when nothing is to be projected. + Эти настроки используются, когла ничего не отображается. + + + + Bible Settings + Настройки отображения Библии + + + + Song Settings + Настройки отображения песен + + + + Picture Settings + Настройки пасивного режима + + + + Media Settings + Настройки media + + + + Announcement Settings + Настройки отображения объявлений + + + Primary Bible: + Первая Библия: + + + Secondary Bible: + Вторая Библия: + + + If checked, the screen "window" is always drawn on top of other windows. This prevents the user from accidently drawing a window onto the projector's screen. + Окно экрана сверху других окон (требуется перезапуск программы). Эта опция предохраняет от случайного вывода информации на экран. + + + Display window always on top + Окно экрана всегда сверху + + + 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. + Полезно при использовании фоновых рисунков. Получаются интересные теневые эффекты. + + + Change Font... + Изменить шрифт... + + + Text color: + Цвет шрифта: + + + Choose color... + Изменить цвет... + + + Browse... + Обзор... + + + Remove wallpaper + Удалить рисунок + + + + Songs + Песни + + + Show stanza title + Показывать номер куплета + + + Show song number + Показывать номер песни + + + Use blurred shadow + Размытая тень + + + Active wallpaper + Фоновый рисунок + + + Passive wallpaper + Заставка + + + Show song key + Показывать тональность песни + + + None + Не выбрана + + + Select a picture for the wallpaper + Выберите изображение для фонового рисунка + + + Images (*.png *.jpg *.jpeg) + Изображения (*.png *.jpg *.jpeg) + + + + OK + + + + + Cancel + Отмена + + + + Apply + Применить + + + + SlideShowEditor + + + Slide Show Editor + Редактор слайдшоу + + + + Slide Show Title: + Название: + + + + Slide Show Info: + Информация: + + + + Add Pictures + Добавить изображения + + + + Remove Picture + Удалить изображение + + + + Picture Preview + Предпросмотр изображения + + + + Picture Information + Информация о изображении + + + + Save + Сохранить + + + + + Cancel + Отмена + + + + Select Images to Open + Открыть изображение + + + + Images(%1) + Файлы изображений (%1) + + + + Adding files... + Добавить файлы... + + + + Slide show title cannot be left empty. +Please enter a title. + Пропущено название слайдшоу. +Пожалуйста, введите имя слайдшоу. + + + + Slide show title is missing + Нет имени слайдшоу + + + + Saving Slide Show + Сохранить слайдшоу + + + + Preview slide: %1 + Предпросмотр слайда %1 + + + + SoftProjector + + This software is free and Open Source. If you can help in improving this program please visit softprojector.sourceforge.net + This software is free and Open Source. If you can help in improving this program please visit sourceforge.net/projects/softprojector/ + Эта программа бесплатная, с открытым исходным кодом. Если вы можете помочь в улучшении этой программы посетите sourceforge.net/projects/softprojector/ + + + + + Bible (F6) + Библия (F6) + + + + + Songs (F7) + Песни (F7) + + + + + Pictures + Изображения + + + + + Media + Медия + + + + + Announcements (F8) + Объявления (F8) + + + Project not saved + project as in document file + Проект не сохранен + + + Do you want to save current project? + project as in document file + Вы желаете сохранить данный проект? + + + Announcement + Объявление + + + Words by: %1, Music by: %2 + Слова: %1, Музыка: %2 + + + Words by: %1 + Слова: %1 + + + Music by: %1 + Музыка: %1 + + + + Cannot start new edit + Невозможно начать новое редактирование + + + + + + Another song is already been edited. + Another song is already beeb edited. + Уже редактируется другая песня. + + + + Schedule not saved + Програма не сохранена + + + + Do you want to save current schedule? + Вы хотите сохранить програму служения? + + + + &Clear Bible History List + &Очистить список истории Библии + + + + &New Song... + &Новая песня... + + + + &Edit Song... + Редактировать &песню... + + + + &Copy Song... + &Копировать песню... + + + + &Delete Song + &Удалить песню + + + + &New Slide Show... + &Новое слайдшоу... + + + + &Edit Slide Show... + Редактировать &слайдшоу... + + + + &Delete Slide Show + &Удалить слайдшоу + + + + &Add Media Files... + &Добавить файлы медиа... + + + + &Remove Media Files + &Удалить медиа файлы + + + + &New Announcement... + &Новое обьявление... + + + + &Edit Announcement... + &Редактировать обьявление... + + + + &Copy Announcement... + &Копировать обьявление... + + + + &Delete Announcement + &Удалить обьявление + + + + + + Please save and/or close current edited song before edited a different song. + Пожалуйста сохраните и (или) закройте данную песню прежде чем редактировать другую. + + + + + + + No song selected + Ни одна песня не выбрана + + + No song has been selected to be edited. + Ни одна песня не выбрана для редактирования. + + + Please select a song to be edited. + Пожалуйста выберите песню для редактирования. + + + + Cannot create a new song + Невозможно создать новую песню + + + + No song has been selected to edit. + Песня для редактирования не выбрана. + + + + Please select a song to edit. + Выберите песню для редактирования. + + + + Cannot copy this song + Невозможно скопировать песню + + + + No song has been selected to copy + Песня не выбрана --- нечего копировать + + + + Please select a song to copy + Выберете, пожалуйста, песню + + + + No song has been selected to delete + Песня для удаления не выбрана + + + + Please select a song to delete + Выберите песню для удаления + + + + + No slideshow selected + Слайдшоу не выбрано + + + + No slideshow has been selected to edit. + Не выбрано слайдшову для редактирования. + + + + Please select a slideshow to edit. + Пожалуйста выберите слайдшоу для редактирования. + + + + Delete slideshow? + Удалить слайдшоу? + + + + Delete slideshow: " + Удалить слайдшоу: " + + + + This action will permanentrly delete this slideshow + Слайдшоу будет удалено навсегда + + + + No slideshow has been selected to delete. + Не выбрано слайдшову для удаления. + + + + Please select a slideshow to delete. + Пожалуйста выберите слайдшоу для удаления. + + + + No media selected + Медиа не выбрано + + + + No media item has been selected to delete. + Не выбрано медиа для удаления. + + + + Please select a media item to delete. + Пожалуйста выберите медиа для удаления. + + + + + + No Announcement Selected + Обьявление не выбрано + + + + No announcement has been selected to edit + Обьявление для редактирования не выбрано + + + + Please select an announcement to edit + Пожалуйста выберите обьявление для редактирования + + + + No announcement has been selected to copy + Обьявление для копирования не выбрано + + + + Please select an announcement to copy + Пожалуйста выберите обьявление для копирования + + + + Delete Announcement? + Удалить обьявление? + + + + Delete announcement: " + Удалить обьявление: " + + + + This action will permanentrly delete this announcement + Обьявление будет удалено навсегда + + + + No announcement has been selected to delete + Обьявление для удаления не выбрано + + + + Please select an announcement to delete + Пожалуйста выберите обьявление для удаления + + + + No song has been selected to be printed. + Ни одна песня не выбрана для печати. + + + + Please select a song to be printed. + Пожалуйста выберите песню для печати. + + + + No announcement selected + Обьявление не выбрано + + + + No announcement has been selected to be printed. + Обьявление для печати не выбрано. + + + + Please select a announcement to be printed. + Пожалуйста выберите обьявление для печати. + + + + + + Save Schedule? + Сохранить програму? + + + + Do you want to save current schedule before creating a new schedule? + Вы хотите сохранить текущую програму перед созданием новой? + + + + Do you want to save current schedule before opening a new schedule? + Вы хотите сохранить текущую програму перед открытием новой? + + + + Open SoftProjector schedule: + Открыть прораму SoftProjector: + + + + + SoftProjector schedule file + Файлы програм SoftProjector + + + + Save SoftProjector schedule as: + Сохранить програму SoftProjector как: + + + Open softProjector schedule: + Открыть прораму softProjector: + + + softProjector schedule file + Файлы програм softProjector + + + Save softProjector schedule as: + Сохранить програму softProjector как: + + + + Do you want to save current schedule before closing it? + Вы желаете сохранить текущую програму прежде чем закрыть его? + + + + Saving schedule file... + Сохранение програмы в файл... + + + + An error has ocured when overwriting existing file. +Please try again with different file name. + Ошибка переименования файла. +Пожалуйста, укажите другое имя. + + + + Opening schedule file... + Открытие файла програмы softProjector... + + + + The schedule file you are trying to open is of uncompatible version. +Compatible version: 2 +This schedule file version: + Вы пытаетесь открыть програму, которая несовместима с Вашей версией softProjector. +Совместимая версия: 2 +Версия програмы: + + + English + Русский + + + Save Project? + project as in document file + Сохранить проект? + + + Do you want to save current project before opening other? + project as in document file + Вы желаете сохранить данный проект? + + + Open softProjector project + Открыть проект + + + softProjector project file + Файл проекта + + + Save softProjector project as: + Сохранить проект как: + + + Save Project? + Сохранить проект? + + + Do you want to save current project before creating a new project? + Вы желаете сохранить текущий проект прежде чем создать новый? + + + Do you want to save current project before closing it? + Вы желаете сохранить текущий проект прежде чем закрыть его? + + + Incorrect project file format + Неправильный формат файла проекта + + + The softProjector project file you are opening, +is not supported by your version of softProjector. +You may try upgrading your version of softProjector. + Файл проекта, который вы открываете, +не поддерживается данной версией Софт Проектора. +Вам следует обновить версию Софт Проектора. + + + No song has been selected to be edited + Песня для редактирования не выбрана + + + Please select a song to be edited + Выберите песню для редактирования + + + No song has been selected to be copied + No song has been selected to be coppied + Песня для копирования не выбрана + + + Please select a song to be copied + Please select a song to be coppied + Выберите песню для копирования + + + + Delete song? + Удалить песню? + + + + Delete song " + Удаление песни " + + + No song has been selected to be deleted + Песня для удаления не выбрана + + + Please select a song to be deleted + Выберите песню для удаления + + + Are you sure that you want to delete a song? + Вы уверены что хотите удалить песню? + + + + This action will permanentrly delete this song + Песня будет удалена навсегда + + + + SoftProjectorClass + + + Tab + Закладка + + + Stop displaying text to the screen (display black screen or wallpaper). Sortcut for this button is the Escape key. + Убрать текст с экрана (останется черный экран или заставка). Клавиша - Escape. + + + Hide (Esc) + Скрыть (Esc) + + + + Esc + + + + If Clear was pressed earlier, this will re-display the text to the screen + Вернуть на экран скрытый текст + + + Show (F4) + Показать (F4) + + + + F4 + + + + + Use Multi Verse + Показать несколько стихов + + + + Service Schedule: + Програма служения: + + + + If selected, this will allow to select multiple verses at one time. Will need to press "Show" each time. + Позволяет показывать несколько стихов за раз. При смене стихов нужно нажимать "Показать". + + + + &File + &Файл + + + + &Edit + &Правка + + + + + &Help + &Справка + + + + Select Language + Выберите язык + + + + Language + Язык + + + + View + Вид + + + + Schedule + Програма + + + + Display Screen + Экран + + + + File Tool Bar + Файловая панель инструментов + + + + Schedule Tool Bar + Панель управления програмы + + + + Edit Tool Bar + Панельинструментов для редактирования + + + + Display Control Tool Bar + Панель управления инструментов контроля экрана + + + + Import and export Bibles, songbooks and themes + Импорт и экспорт Библий, песенников и тем + + + + Open Help + + + + + &Open Schedule + &Открыть програму + + + + &Save Schedule + &Сохранить програму + + + + Save Schedule &As + Сохранить програму &как + + + + Save Schedule with different name + Сохранить програму с другим именем + + + + &New Schedule + &Новая програма + + + + Start new Schedule + Создать новую програму + + + + + Close Schedule + Закрыть програму + + + + &Print + &Печать + + + + Prints selected Bible chapter, selected song and selected announcement. + Печатать выбраную главу Библии, песню и обьявление. + + + + + Print Schedule + Печатать програму + + + + Ctrl+Shift+P + + + + + Del + + + + + Donate + Пожертвовать + + + + Donate to softProjector development team + Пожертвовать команде softProjector + + + + Add to Schedule + Добавить в програму + + + + F2 + + + + + Remove from Schedule + Удалить с програмы + + + + Ctrl+Del + + + + + Clear Schedule + Очистить програму + + + + Move Item To Top + Переместить вверх + + + + Move Schedule item to top of the list + Переместить элемент на верх списка + + + + Move Item Up + Переместить вверх + + + + Move Schedule item up + Перемещать элемент програмы вверх + + + + Mode Item Down + Перемещать вниз + + + + Move Schedule item down + Перемещает элемент програмы вниз + + + + Move Item To Bottom + Переместить элемент вниз + + + + Move Schedule item to bottom of the list + Перемещает элемент програмы вниз списка + + + + Show + Показать + + + + Dsiplay to the screen (F4) + Показать на экране (F4) + + + + Show Passive Screen (Stop displaying to the screen) (Esc) + Показать пасивный экран (остановить презентацию) (Esc) + + + + Clear + Очистить + + + + Clear Display Text (Shift+Esc) + Очистить текст на дисплее (Shift+Esc) + + + + Shift+Esc + + + + + On / Off + Вкл. / Выкл. + + + + Turn Display Screen On/Off + Включить / Выключить экран дисплея + + + Close + Закрыть + + + Close Display Window + Закрыть окно экрана + + + + Hide + Спрятать + + + Songs + Песни + + + toolBar + Панель инструментов + + + + &About + &О программе + + + + &Settings... + &Настройки... + + + + Open settings dialog + Открыть диалог настроек + + + + Ctrl+T + + + + + E&xit + &Выход + + + + Exit SoftProjector + Выйти с softProjector + + + + Ctrl+Q + + + + &Edit Current Song... + &Редактировать песню... + + + + Ctrl+E + + + + &New Song... + &Новая песня... + + + + Ctrl+N + + + + + &Manage Database... + &Управление базой данных... + + + Import and export song collections and Bibles + Импортирование и экспортирование сборников и Библий + + + + Ctrl+M + + + + &Delete Current Song + &Удалить песню + + + + F1 + + + + Copy Current Song... + Копировать песню... + + + Copy current song into a new songbook + Копировать песню в новый сборник + + + + Ctrl+C + + + + + Song Counter... + Song Counter + Счетчик Песен... + + + &Open Project + &Открыть проект + + + + Ctrl+O + + + + &Save Project + &Сохранить проект + + + + Ctrl+S + + + + Save Project &As + Сохранить проект &как + + + New Project + Новый проект + + + + Ctrl+Shift+N + + + + Close Project + Закрыть проект + + + + Ctrl+P + + + + Russian + Русский + + + English + Английский + + + + SongCounter + + + Song Counter + Счетчик Песен + + + + Reset Selected + Сбросить выбранное + + + + Reset All + Сбросить все + + + + Close + Закрыть + + + + + January + January %1, %2 + января + + + + + February + February %1, %2 + февраля + + + + + March + March %1, %2 + марта + + + + + April + April %1, %2 + апреля + + + + + May + мая + + + + + June + June %1, %2 + июня + + + + + July + July %1, %2 + июля + + + + + August + August %1, %2 + августа + + + + + September + September %1, %2 + сентября + + + + + October + October %1, %2 + октября + + + + + November + November %1, %2 + ноября + + + + + December + December %1, %2 + декабря + + + + SongCounterModel + + Song Title + Название песни + + + + Number + Номер + + + + Title + Название + + + + Count + Счет + + + + Date + Дата + + + + Songbook + Сборник + + + + SongSettingWidget + + Form + Форма + + + + + Effects + Эфекты + + + + + 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 + Использовать тени + + + + + Use blurred shadow + Размытая тень + + + + + Song Information + Информация о песне + + + + + Show Stanza Title + Показывать номер куплета + + + + + Show Song Key + Показывать тональность песни + + + + + Show Song Number + Показывать номер песни + + + + + + + + + Color... + Цвет... + + + + + + Alignment: + Выровнять к: + + + + + Above Text + Перед текстом + + + + + Below Text + После текста + + + + + Show Song Ending + Показывать конец песни + + + *** + *** + + + This will show WordsBy and MusicBy as song ending + Будет отображаться информация о авторах слов и музыки + + + + + Song Copyright Info + Копирайт песни + + + + + + + Position: + Положение: + + + + + Below Song Text + После текста песни + + + + + + Bottom of Screen + Внизу экрана + + + + + Use Background Image + Использовать рисунок фона + + + + + Browse... + Обзор... + + + Text Alingment + Выравнивание текста + + + Vertical: + Вертикальное: + + + Horizontal: + Горизонтальное: + + + + + Top + Верх + + + + + Middle + Середина + + + + + Bottom + Нижний + + + + + Left + Лево + + + + + Center + Центр + + + + + Right + Право + + + Text Properties + Свойства текста + + + Color: + Цвет: + + + Choose color... + Изменить цвет... + + + + + + + + + Font... + Font + Шрифт... + + + + + Type: + Тип: + + + + Apply this background to all active backgrounds. + Применить этот фон ко всем активным фоном. + + + + + Song Text Properties + Свойства текста песни + + + + Alingment: + Выровнять к: + + + + + Amount Of Screen To Use + Размер используемого экрана + + + + Vertical Screen Use: + Использувать по-вертикали экрана: + + + + + Percent of screen to be used. + Размер используемого экрана. + + + + + Select to use either top portion of the screen or bottom. + Выберете, какую часть экрана использовать. + + + + Top of screen + Вверху экрана + + + + Bottom of screen + Внизу экрана + + + + Use Separate Secondary Display Screen Settings + Особые настройки для дополнительного экрана + + + + * * * + + + + + - - - + + + + + ° ° ° + + + + + • • • + + + + + ● ● ● + + + + + ▪ ▪ ▪ + + + + + ■ ■ ■ + + + + + Vertical Screen Use + Использувать по-вертикали экрана + + + + % + + + + + Top of Screen + Вверху экрана + + + + Reset All To Default + Сбросить все на умолчания + + + + + Select a image for song wallpaper + Выбор рисунка + + + + + Images(%1) + Файлы изображений (%1) + + + + Bold + Жирный + + + + Italic + Курсив + + + + StrikeOut + Зачеркнутый + + + + Underline + Подчеркнутый + + + Images (*.png *.jpg *.jpeg) + Изображения (*.png *.jpg *.jpeg) + + + + SongWidget + + + Form + Форма + + + + Use this menu to show only songs beloning to a particular Songbook + Отображаются только песни из выбранного сборника + + + + Select Songbook to use + Выбрать рабочий сборник + + + + + All songbooks + Все сборники + + + + Selects a song by the number in the selected Songbook + Выбор песни из данного сборника по номеру + + + + + + Filter: + Фильтр: + + + + Use this field to limit the display of the songs to only the ones that contain the specified text in the song title or song number + Выбор песен по критериям + + + + + Search Type: + Тип поиска: + + + + Exact Match + Точное соответствие + + + + Contains Phrase + Содержит фразу + + + + Contains Word Phrase + Содержить слово/фразу + + + + Line Begins + В начале строки + + + + Contains Any Word + Содержит любое слово + + + + Contains All Words + Содержит все слова + + + + Search + Поиск + + + + Return + Вернутся + + + Matches only songs the song number or title of which contains the entered string. + Выбираются песни по номеру или названию. + + + + Contains + Содержит + + + Matches only songs the song number or title of which begins with the entered string. + Выбираются песни по номеру или по первой строчке. + + + + Begins + Начинается + + + Matches only songs the song number or title of which exactly matches the entered string. + Выбираются песни в точном соответствии с заданными критериями. + + + Exact match + Точное соответствие + + + + Done Searching? - Clear Search Results + Закончить поиск и очистить результаты + + + Add the selected song to the playlist + Добавить песню в список воспроизведения + + + Add (F2) + Add to playlist (F2) + Добавить (F2) + + + Remove the selected song from the playlist + Удалить песню из списка воспроизведения + + + Remove (F3) + Remove from playlist + Удалить (F3) + + + Song preview: None + Предосмотр: Песня отсутствует + + + Song preview + Предварительный просмотр + + + + Quickly display the selected song on the screen without adding it to playlist first + Вывод на экран без занесения в список воспроизведения + + + + Go Live (F5) + На экран (F5) + + + + F5 + + + + Song Preview: + Предосмотр песни: + + + Comments: + Comments to songs + Коментарии: + + + + + Filter Type: + Тип филтрации: + + + + Notes: + Notes to songs + Заметки: + + + + Could not find song with number + Песня с указанным номером не найдена + + + + No such song + Песня отсутствует + + + + + All song categories + Все категории + + + + Please enter search text + Пожалуйся, введите текст для поиска + + + + Search: + Поиск: + + + + SongbooksModel + + + Title + Название + + + + Information + Infomation + Информация + + + + SongsModel + + + Num + Номер + + + + Title + Название + + + + Songbook + Сборник + + + + Tune + Тональьность + + + + ThemeModel + + + Name + Название + + + + Comments + Коментарий + + + diff --git a/translations/softpro_ua.qm b/translations/softpro_ua.qm new file mode 100644 index 0000000..cd0182e Binary files /dev/null and b/translations/softpro_ua.qm differ diff --git a/translations/softpro_ua.ts b/translations/softpro_ua.ts new file mode 100644 index 0000000..b45ace8 --- /dev/null +++ b/translations/softpro_ua.ts @@ -0,0 +1,4984 @@ + + + +UTF-8 + + AboutDialog + + + About softProjecor + Довідкова інформація + + + + Version: + Версія: + + + + an open souce media projection software + відкрите програмне забезпечення для медіапрезентацій + + + + Developers: + Розробники: + + + + Vladislav Kobzar +------------------- +Ilya Spivakov +Matvey Adzhigirey + Ilya Spivakov +Matvey Adzhigirey +Vladislav Kobzar + + + + + Mac Build: + Збірка для Mac: + + + + Volodimir Vasuk + Володимир Васюк + + + + Special Thanks To: + Особлива подяка: + + + + Vitaliy Zhaborovskyy + + + + + Translators: + Перекладачі: + + + + Russian: +German: +Czech: +Ukranian: + + + + + Vladimir Zinchenko +Eduard Schlak +Pavel Fric +Vitaliy Zhaborovskyy + + + + + If you would like to help developing this program<br> +or would like to contribute data, please visit:<br> +<a href="http://softprojector.org/">http://softprojector.org/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + Якщо у Вас виникло бажання допомогти у розробці або якимось <br> +іншим чином внести свій вклад, будь ласка, відвідайте:<br> +<a href="http://softprojector.org/">http://softprojector.org/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + + + If you would like to help developing this program<br> +or would like to contribute data, please visit:<br> +<a href="http://softprojector.sourceforge.net/">http://softprojector.sourceforge.net/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + Якщо у Вас виникло бажання допомогти у розробці або якимось <br> +іншим чином внести свій вклад, будь ласка, відвідайте:<br> +<a href="http://softprojector.sourceforge.net/">http://softprojector.sourceforge.net/</a> +<br> +<a href="http://sourceforge.net/projects/softprojector/">http://sourceforge.net/projects/softprojector/</a> + + + + <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FPCLPXFMH9XP4">Donate</a> + <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FPCLPXFMH9XP4">Пожертвування</a> + + + + Close + Закрити + + + + AddSongbookDialog + + + Add songbook + Додати збірник + + + + Songbook Title: + Назва: + + + + Description: + Опис: + + + + AnnounceModel + + + Title + Заголовок + + + + AnnounceWidget + + + Form + + + + Announcement text: + Текст оголошення: + + + + Announcements: + Оголошення: + + + + Quickly display announcement + Швидке відображення оголошень + + + + Go Live (F5) + Показати (F5) + + + + F5 + + + + + Announcement Preview: + Попередній перегляд: + + + Settings + Налаштування + + + Horizontal alignment: + Горизонтальне вирівнювання: + + + Left + Ліворуч + + + Center + Центр + + + Right + Праворуч + + + Vertical alignment: + Вертикальне вирівнювання: + + + Top + Зверху + + + Middle + Середина + + + Bottom + Внизу + + + Add this announcement to history list, automatically will be added to the list when "Go Live" button is pressed + Додати це оголошення в історію, буде додано автоматично при натисненні кнопки "Показати" + + + Add (F2) + Додати (F2) + + + This list contains verses that were sent to be shown + Вірші, які слід показати + + + Remove current selected announcement in the history list + Видалити виділені оголошення з історії + + + Remove (F3) + Видалити (F3) + + + + AnnouncementSettingWidget + + Form + Форма + + + + + Effects + Ефекти + + + + + 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 + Використовувати тіні + + + + + Use blurred shadow + Використовувати розмиту тінь + + + + + Use Background Image + Використовувати малюнок тла + + + + + Browse... + Огляд... + + + + Apply this background to all active backgrounds. + Застосувати цей фон до всіх активних фоном. + + + + + Color... + Колір... + + + Text Alingment + Вирівнювання тексту + + + Vertical: + вертикальне: + + + Horizontal: + Горизонтальне: + + + + + Top + Зверху + + + + + Middle + Середина + + + + + Bottom + Внизу + + + + + Left + Ліворуч + + + + + Center + Центр + + + + + Right + Праворуч + + + + + Text Properties + Текст + + + Color: + Колір: + + + Choose Color... + Обрати... + + + + + Font... + Font + Шрифт... + + + + + Alignment: + Вирівнювання: + + + + Use Separate Secondary Display Screen Settings + Використовувати власні налаштування для другого дисплею + + + + Reset All To Default + Скинути усі налаштування + + + + + Select a image for announcement wallpaper + Обрати зображення тла + + + + + Images(%1) + файли малюнків (%1) + + + + Bold + Жирний + + + + Italic + Курсив + + + + StrikeOut + Закреслений + + + + Underline + Підкреслений + + + Images (*.png *.jpg *.jpeg) + Файли зображень (*.png *.jpg *.jpeg) + + + + BibleInformationDialog + + + Bible Information + Інформація про Біблію + + + + Bible Name: + Ідентифікатор: + + + + Abbreviation: + Аббревіатура: + + + + Information\ +Copyright: + Інформація, копірайт: + + + + Right to left + Читання зправа на ліво + + + + BibleSettingWidget + + Form + Форма + + + + + Primary Bible: + Перша Біблія: + + + + + Secondary Bible: + Друга Біблія: + + + + + Trinary Bible: + Третя Біблія: + + + + Operator Screen Bible: + Біблія Оператора: + + + + This bible version will be used for the operator to select verses and search bible + Ця версія Бібії використовується оператором для пошуку та вибору віршів + + + + + Effects + Ефекти + + + + + 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 + Використовувати тінь + + + + + Use blurred shadow + Використовувати розмиту тінь + + + + + Use Background Image + Використовувати малюнок тла + + + + + Browse... + Огляд... + + + + Apply this background to all active backgrounds. + Застосувати цей фон до всіх активних фоном. + + + + + + + Color... + Колір... + + + + + Amount of screen to use: + Частина екрана, що використовується: + + + + + Percent of screen to be used. + Частина екрана, яка використовуватиметься, у відсотках. + + + + + Select to use either top portion of the screen or bottom. + Оберіть, яку частину (верхню чи нижню) дисплею використовувати. + + + + + Top of Screen + Вверху екрана + + + + Botton of Screen + Внизу екрана + + + + Use Separate Secondary Display Screen Settings + Використовувати власні налаштування для другого дисплею + + + + Bottom of Screen + Внизу екрану + + + Text Alingment + Вирівнювання тексту + + + Vertical: + Вертикальне: + + + + + Top + Зверху + + + + + Middle + Середина + + + + + Bottom + Внизу + + + Horizontal: + Горизонтальне: + + + + + + + Left + Ліворуч + + + + + + + Center + Центр + + + + + + + Right + Праворуч + + + + + Text Properties + Текст + + + Color: + Колір: + + + Choose color... + Обрати... + + + + + + + Font... + Font + Шрифт... + + + + + + + Alignment: + Вирівнювання: + + + + + Caption Properties + Властивості заголовку + + + + + + + Position: + Положення: + + + + + Above Text + Перед текстом + + + + + Below Text + Після тексту + + + + + Show Bible Version Abbriviation + Показувати абревіатуру Біблії + + + + + Amount Of Screen To Use + Amount Of Sceen To Use + Частина екрана, який використовується + + + Select "Top" to use top portion of the display screen + Оберіть "Зверху" для відображення тексту зверху екрана + + + Select "Bottom" to use bottom portion of the display screen + Оберіть "Внизу" для відображення тексту внизу екрана + + + Amount Of Sceen To Use (Primary Bible Only) + При використанні першої Біблії можна задати область, на якій буде текст + + + Use this much of the screen: + Використовувати екрана: + + + Align to: + Aling to: + Вирівняти: + + + Buttom + Знизу + + + + Reset All To Default + Скинути усі налаштування + + + + + + + + + + + None + Не обрано + + + + + Same as primary Bible + Така ж, як Перша Біблія + + + + + Select a image for Bible wallpaper + Обрати зображення фону + + + + + Images(%1) + файли малюнків (%1) + + + + Bold + Жирний + + + + Italic + Курсив + + + + StrikeOut + Закреслений + + + + Underline + Підкреслений + + + Images (*.png *.jpg *.jpeg) + Файли зображень (*.png *.jpg *.jpeg) + + + + BibleWidget + + + Form + + + + + Search: + Пошук: + + + + Search the bible for specified text. Matched verses will appear in the list below. If a bible book is selected, only that book will be searched. + Пошук в Біблії заданого тексту. Знайдені вірші подаються в список нижче. Якщо обрана конкретна книга, то пошук здійснюється лише по ній. + + + If selected, only Bible verses starting with the search string will be searched. + Лише вірші, які починаються на слова пошуку. + + + Begins + Починається + + + If selected, Bible verses that contain the search string will be searched. + Вірші, в яких присутні слова пошуку. + + + Contains + Включають + + + + + Quickly display the selected Bible verse on the screen + Вивести текст на екран + + + + Search + Пошук + + + + Return + Повернутися + + + Limit search to: + Пошук в: + + + If selected, the entire bible will be searched. + Пошук по усій Біблій. + + + + Entire Bible + в усій Біблії + + + If selected, only the selected Bible book will be searched. + Пошук по обраній книзі Біблії. + + + + Current Book + в поточній книзі + + + If selected, only the selected chapter of the selected Bible book will be searched. + Пошук по обраному розділі. + + + + Select search range + Вибір діапазону пошуку + + + + Current Chapter + поточному розділі + + + + Select search type + Вибір типу пошуку + + + + Contains Phrase + Містить фразу + + + + Contains Word Phrase + Містить слово/фразу + + + + Verse Begins + На початку вірша + + + + Contains Any Word + Містить хоча б одне з слів + + + + Contains All Words + Містить усі слова + + + + Results: + Результат: + + + + Hide +Results + Приховати +результат + + + + Book: + Книга: + + + + + + Filter criteria for the bible list. If the first character of the filter is a number, then only books starting with this number are matched. Example filters: "Deuter", "1Thes". + Якщо перший символ фільтру число, до уваги приймаються лише книги, які починаються з цього числа. + Фільтр книг, по яким здійснюється пошук. Наприклад: "1Тим.", "ПЗак.". + + + + Chapter: + Розділ: + + + + Verse: + Вірш: + + + + Go Live (F5) + Показати (F5) + + + + F5 + + + + Add currently selected verse into history list, automatically will be added when "Go Live" button is pressed + Додати обраний вірш в історію. Автоматично додається при натисненні кнопки "Показати" + + + Add (F2) + Додати (F2) + + + + This list contains verses that were sent to be shown + Вірші, які потрібно показати + + + Remove current selected verse in the history list + Видалити обраний вірш з історії + + + Remove (F3) + Видалити (F3) + + + Clear all history items + Очистити усю історію + + + Clear + Очистити + + + Total + + Усього + + + +results + +результатів + + + No search results have retrieved + Нічого не знайдено + + + No search results + Нічого не знайдено + + + Error opening Bible histories + Помилка відкриття історії використання Біблії + + + Cound not find any or all Bible verses from file withing current primary Bible. +Try changing primary Bible and reopen project file. + Не вдається знайти жодного вірша з поточної Біблії. +Спробуйте змінити поточну Біблію і перевідкрити файл проекту. + + + + Please enter search text + Будь ласка, введіт ьтекст для пошуку + + + + Total +resutls: +%1 + Усього знайдено: %1 + + + + No search +results. + Нічого не знайдено. + + + + BiblesModel + + + Title + Назва + + + + DisplayScreen + + + Dispaly Screen + Екран + + + + Video Player Error + Помилка відеоплеєра + + + + Words by: %1, Music by: %2 + Лірика: %1, Музика: %2 + + + + Words by: %1 + Лірика: %1 + + + + Music by: %1 + Музика: %1 + + + + EditAnnouncementDialog + + + Edit Announcement + Редагування оголошення + + + + Title: + Заголовок: + + + + ID: + + + + + Use Private Settings + і що б це означало? + Використовувати особливі налаштування + + + + Timed slides: + Час на слайд: + + + + sec + seconds + сек + + + + Loop + Цикл + + + + Save + Зберегти + + + + Cancel + Скасувати + + + + Announce + - Text of the announcement goes here + +Slide + - Text of the announcement goes here +You can have both Annouce or Slide as announcement block titles. + Оголошенн + --Тут має міститися текст оголошення + +Слайд + -- Тут теж може міститися текст оголошення + Ви можете створювати .блоки слайдів, або прочитати англійський варіант, +який я не зміг толком перекласти: +"You can have both Annouce or Slide as announcement block titles.". + + + + Announcement title cannot be left empty. +Please enter announcement title. + Не можна залишати оголошення без заголовку, +будьте такі ласкаві, введіть заголовок для цього оголошення. + + + + Announcement title is missing + Ви забули про заголовок для оголошення + + + + EditWidget + + + Edit and/or Add New songs + Редагування і/або додання нової пісні + + + + Songbook: + Збірник: + + + + Print + Надрукувати + + + + Title: + Назва: + + + + Words by: + Слова: + + + + Music by: + Музика: + + + + Key: + Тональність: + + + + Category: + Категорія: + + + + Use Private Song Settings + Використовувати власні налаштування для пісні + + + + Main Text Properties: + Основний текст: + + + + + + Color... + Колір... + + + + + + Font... + Шрифт... + + + + Main Text Alignment: + Вирівнювання основного тексту: + + + + Song Information Properties: + Інформаційний текст: + + + + Song Ending Properties: + Властивості фоотера пісні: + + + + Use Background: + Використовувати тло: + + + + Top + Зверху + + + + Middle + Середина + + + + Bottom + Внизу + + + Text Alingment + Вирівнювання тексту + + + + Left + Ліворуч + + + + Center + Центр + + + + Right + Праворуч + + + + Browse... + Огляд... + + + Use default + Стандартний + + + Text font: + Шрифт тексту: + + + Background: + Тло: + + + + Notes: + Замітки: + + + Comments: + Коментарі: + + + + Save + Зберегти + + + + Ctrl+S + + + + + Cancel + Скасувати + + + + Ctrl+Q + + + + + Song title cannot be left empty. +Please enter song title. + Схаменіться, пісня не може бути без назви. +Будь ласка, додайте назву. + + + + Song title is missing + Пропущена назва пісні + + + + Cannot find exact match in database + Неможливо знайти точний відповідник у базі даних + + + + The exact match of a song you are editing was not found in database. +In order to edit this song, you need to add it to database. + +Please select a Songbook to which you want to copy this song to: + В базі відсутній точний відповідник для редагованої пісні. +Для продовження необхідно додати пісню в базу. + +Будь ласка, виберіть Збірник, у який слід додати пісню: + + + + Copy to a new Songbook + Скопіювати до нового Збірника + + + + Select a Songbook to which you want to copy this song to + Оберіть Збірник в який бажаєте скопіювати цю пісню + + + Verse 1 + - words of verse go here + +Refrain + - words of Chorus/Refrain +go here + +Verse 2 + - words of verse go here + Куплет 1 + + -- тут слова першого куплету + +Приспів + --тут слова приспіву + +Куплет 2 + + --тут слова другого куплету + + + + Add a new Songbook + Додати новий Збірник + + + + Select a Songbook to which you want to add a song + Оберіть Зібрник, у який бажаєте додати пісню + + + + Select Songbook + Оберіть збірник + + + + Add a Songbook + Додати збірник + + + Select a picture for the wallpaper + Обрати малюнок тла + + + + Verse 1 + - words of verse go here + +Refrain +- words of Chorus/Refrain +go here + +Verse 2 + - words of verse go here + чесно зплагіачено з ліни костенко + Куплет 1 + + -- тут слова першого куплету + +Приспів + --тут слова приспіву + +Куплет 2 + + --тут слова другого куплету + +і в тому ж стилі далі, бо хто зна, +чи ще прийдеться коли + + + + Other + Інше + + + + Bible Stories + Біблійні історії + + + + Gospel + Блага звістка + + + + God, His love and greatness + Божа любов та величність + + + + The Resurrection of Christ + Воскресіння Христа + + + + Time + Час + + + + The second coming of Christ and the judgement + Другий прихід Христа + + + + Children and Family + Дитячі та сімейні + + + + For new converts + Для новонавернених + + + + Spiritual struggle and victory + Духовна бородьба та перемога + + + + Harvest + На день Подяки + + + + Jesus Christ + Ісус Христос + + + + Love + Любов + + + + Mother + Мама + + + + Prayer + Молитовні + + + + Youth + Молодіжні + + + + Wedding + На весілля + + + + Sunset / Sunrise + Ранкові та вечірні + + + + Baptism + Хрещення + + + + New Years + Новорічні + + + + Funeral + Похоронні + + + + At the ordination + На рукопокладення + + + + On the Lord's Supper + На хліболамання + + + + Heavenly abode + Небесні оселі + + + + Instruction and self-test + Настанови та самовипробування + + + + Holy Ghost + Дух Святий + + + + Church + Церква + + + + Before church meeting + Перед початком служіння + + + + Last Days + Останній час + + + + Practical life with God + Практичне життя з Богом + + + + At the end of church meeting + На закінчення зібрання + + + + Welcome and farewell + Привітальні та прощальні + + + + The call to work + Заклик до роботи + + + + Call to repentance + Заклик до покаяння + + + + Journey of faith, faith and hope + Віра та надія + + + + Various Christian holidays + Різноманітні християнські свята + + + + Determination and faithfulness + Рішучість та вірність + + + + Christmas + Різдв'яні + + + + Following Christ + Йдучи за Христом + + + + The Word of God + Слово Боже + + + + Salvation + Спасіння + + + + Suffering and death of Christ + Страждання та смерть Христа + + + + Consolation and encouragement + Потішення та підбадьорення + + + + Praise and thanksgiving + Хвала та подяка + + + + Christian Joy + Християнська радість + + + + Select an image for the wallpaper + Оберіть малюнок тла + + + + Images(%1) + Файли малюнків (%1) + + + + GeneralSettingWidget + + Form + Форма + + + + If checked, the screen "window" is always drawn on top of other windows. This prevents the user from accidently drawing a window onto the projector's screen. + Вікно екрану завжди над іншими вікнами (потрібне перезавантаження програми). Ця опція перестраховує від випадкової видачі невалідної інфи. + + + + Display window always on top + Вікно завжди зверху + + + + Theme: + Тема: + + + + Add New Theme + Додати нову тему + + + + Primary Display Screen: + Головний дисплей: + + + + Secondary Display Screen: + Додатковий дисплей: + + + + Primary Display Screen Controls + Засоби керування основним дисплеем + + + + Button Size: + Розмір кнопок: + + + + 16x16 + + + + + 24x24 + + + + + 32x32 + + + + + 48x48 + + + + + 64x64 + + + + + 96x96 + + + + + Alignment: + Вирівнювання: + + + + Top + Зверху + + + + Middle + Середина + + + + Bottom + Внизу + + + + Left + Ліворуч + + + + Center + Центр + + + + Right + Праворуч + + + + Opacity: + Прозорість: + + + + Transparent + Прозорий + + + + Opaque + непрозорий + + + + NOTE: Display screen controls will be visible on the primary display screen only when one monitor is avaliable. + Зауважте, засоби контролю дисплею видимі на основному дисплеї лише за умови наявності одного монітору. + + + Useful when using a wallpaper image. Displays a fancy shadow effect. + При використанні фонових малюнків утворюються цікаві штуки. Спробуйте. + + + Use shadow + Використовувати тіні + + + If checked, when switching displayed text, fades the old text out and fades the new text in . + Плавне затухання при зміні кадрів. + + + Use fading effects + Використовувати ефект затухання + + + Use blurred shadow + Використовувати розмиту тінь + + + Use Passive Background Image + і шо сіє означає? + Використовувати пасивне зображення тла + + + Browse... + Огляд... + + + + Display Screen Selection + Обрати екран + + + Display Screen: + Екран: + + + + + Select onto which screen to dispaly + Оберіть екран, на якому буде будуватися зображення + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600; color:#ff0000;">NOTE:</span><span style=" font-size:8pt; color:#ff0000;"> Display screen selection is currenly under development. Changing the screen number, will change on which screen projection will be displayed.<br />On Windows, order is from left-to-right.</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600; color:#ff0000;">NOTE:</span><span style=" font-size:8pt; color:#ff0000;"> Display screen selection is currenly under development. Changing the screen number, will change on which screen projection will be displayed.<br />On Windows, oder is from right-to-left.</span></p></body></html> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600; color:#ff0000;">ЗАУВАЖТЕ:</span><span style=" font-size:8pt; color:#ff0000;"> Опція вибору екрану наразі розробляється. <br />Зміна номеру екрану дозволяє виставити стільницю, <br />на якій він буде відображатися. <br />У Вінді стільниць порядок зліва направо. </span></p></body></html> + + + + Reset All To Default + Скинути усі налаштування + + + Select a image for main wallpaper + Обрати малюнок тла + + + Images (*.png *.jpg *.jpeg) + Файли зображень (*.png *.jpg *.jpeg) + + + + none + Не обрано + + + + None + Не обрано + + + + Edit Theme + Редагувати тему + + + + Theme Name: + Назва теми: + + + + Comments: + Коментарі: + + + + Default + Стандартний + + + + This theme will contain program default settings. + Ця тема містить налаштування програми за замовчуванням. + + + + HelpDialog + + + softProjector Help + Довідка по softProjector + + + + about:blank + + + + + Close + Закрити + + + + Ctrl+Q + + + + + ManageDataDialog + + + Manage Database + Керування базами + + + + Bibles + Біблії + + + + + + Download +&& Import... + Завантаження +&& Імпорт... + + + + Import a new Bible into your database + Додати нову Біблію в базу + + + + + + &Import... + &Імпорт... + + + + + + + Ctrl+I + + + + + Edit Bible title of currently selected Bible. + Редагувати назву обраного біблійного модуля. + + + + + + &Edit... + &Редагувати... + + + + + + Ctrl+E + + + + + Export currently selected Bible to share with others. + Експортувати обраний біблійний модуль. + + + + + + E&xport... + &Експорт... + + + + + + + Ctrl+X + + + + + Delete a Bible that you will no longer want to use in this program. + Видалити обраний біблійний модуль. + + + + + + &Delete... + &Видалити... + + + + + + Ctrl+D + + + + + Songbooks + Збірники + + + + + + Import a new Songbook into database. + Додати новий збірник до бази. + + + + + Edit the title and information about the Songbook. + Редагувати назву збірника та додаткову інформацію. + + + + + + Export currently selected Songbook to be able to share with others and for backup. + Експортувати обраний збірник для інших юзерів та для бекапа. + + + + + Delete currently selected Songbook from database. + Вилучити обраний збірник із бази. + + + + Themes + Теми + + + + &New... + &Нова... + + + + Export All... + Експортувати усе... + + + + Close Manage Database Dialog + Закрити діалог менеджера баз + + + + Close + Закрити + + + + Ctrl+Q + + + + + Select a songbook to import + Оберіть збірник для імпорту + + + softProjector songbook file + файли збірників softProjector + + + + + Importing... + Імпортується... + + + + + + Cancel + Скасувати + + + User songbook + Збірник користувача + + + Songbook imported by the user + Збірник імортовано користувачем + + + + Too old SongBook file format + Формат файлу старої версії SoftProjector + + + + Save the songbook as: + Зберегти Збірник як: + + + softProjector songbook file (*.sps) + Файли збірників softProjector (*.sps) + + + + Export complete + Експорт завершено + + + + The songbook " + Збірник " + + + + " +Has been saved to: + + " +було збережено до: + + + + Delete songbook? + Вилучити збірник? + + + + + Are you sure that you want to delete: + Ви таки впевнені в тому, що бажаєте вилучити: + + + + This action will permanentrly delete this songbook + Це діло видалить збірник з кінцями. Для відновлення прийдеться попотіти + + + + Select Bible file to import + Оберіть Біблію для імпорту + + + + + SoftProjector Bible file + Файли біблійних модулів softProjector + + + Old Bible file format + Біблія в старому форматі softProjector + + + The Bible format you are importing is of an old version. +Your current SoftProjector does not support this format. +Please download lattest Bibles and import them. + Ви намагаєтеся імпортувати біблійний модуль в древньому форматі. +На превеликий жаль, Ваш softProjector непідтримує таке щастя. +Оптимальним вирішенням даної проблеми буде завантаження нової версії модуля. + + + + New Bible file format + Новий формат біблійного модуля + + + + The Bible format you are importing is of an new version. +Your current SoftProjector does not support this format. +Please upgrade SoftProjector to latest version. + Ви намагаєтеся імпортувати біблійний модуль в новітньому форматі. +На превеликий жаль, Ваш softProjector непідтримує таке щастя. +Оптимальним вирішенням даної проблеми буде завантаження нової версії softProjector. + + + + SoftProjector songbook file + Файли пісенників SoftProjector + + + + The SongBook file you are opening, is of a later release and +is not supported by current version of SoftProjector. +You are trying to open SongBook version %1. +Please upgrade to latest version of SoftProjector and try again. + Пісенник, що Ви намагаетеся його відкрити, створений більш пізньою +версією SoftProjector і не підтримується поточною. +Спробуйте відкрити його за допомогою SoftProjector версії %1. +Будьте такі ласкаві, оновіть SoftProjector до останньої версії та спробуйте знову. + + + + + Unsupported SongBook version. + Непідтримуваний формат файлу пісенника. + + + + The SongBook file you are opening, is not supported +by current version of SoftProjector. + + Пісенник не підтримується. + + + + The SongBook file you are opening, is in very old format +and is no longer supported by current version of SoftProjector. +You may try to import it with version 1.07 and then export it, and import it again. + Пісенник, що Ви намагаєтеся його відкрити, має ну дуже старий форма +та уже не підтримується даною версією SoftProjector. +Ви можете спробувати імпортувати його попередньою версією, потім експортувати +і після цього імпортувати отриманий файл цією версією SoftProjector. + + + + SoftProjector songbook file (*.sps) + Файли пісенників SoftProjector (*.sps) + + + + + An error has ocured when overwriting existing file. +Please try again with different file name. + Виникла помилка перезапису фалу. +Будь ласка, спробуйте інше ім’я для цього фалу. + + + + The Bible format you are importing is of an usupported file version. +Your current SoftProjector version does not support this format. + Формат файлу Біблії, що його Ви намагаєтеся імпортувати, на великий жаль, +відповідає непідтримуваній Вашим SoftProjector-ом версії. + + + + Unsupported Bible file format + Непідтримуваний формат файлу Біблії + + + + Save exported Bible as: + Зберегти експортований біблійний модуль як: + + + + + Edit Theme + Редагувати тему + + + + + Theme Name: + Темине ім’я ;) + Назва теми: + + + + + Comments: + Коментарі: + + + + Default + Замовчування + + + + This theme will contain program default settings. + Ця тема містить налаштування програми за замовчуванням. + + + + Select a Theme to import + Оберіть тему для імпорту + + + + + SoftProjector Theme file + Фали тем SoftProjector + + + + Importing Themes... + Імпортування тем... + + + + The Theme file you are opening, is of a later release and +is not supported by current version of SoftProjector. +You are trying to open Theme version %1. +Please upgrade to latest version of SoftProjector and try again. + Тема, що Ви намагаетеся її відкрити, створена більш пізньою +версією SoftProjector і не підтримується поточною. +Спробуйте відкрити її за допомогою SoftProjector версії %1. +Будьте такі ласкаві, оновіть SoftProjector до останньої версії та спробуйте знову. + + + + + Unsupported Theme version. + Непідтримквана версія теми. + + + + The Theme file you are opening, is not supported +by current version of SoftProjector. + + Тема, що її Ви намагаетеся відкрити є такою, що не підтримується. + + + + Export Theme as: + Експортувати тему як: + + + + Export all theme as: + Експортувати усі теми як: + + + + softProjector Theme file + Файл теми SoftProjector + + + + Exporting Themes... + Експортування тем... + + + + Delete Theme? + Такі видалити тему? + + + + Are you sure that you want to delete theme: + Ви такі точно бажаєте видалити тему, що називається: + + + + This action will permanentrly delete this theme + Дійсно продовжити? Ця дія ж бо приведе до видалення теми + + + + Error opening module list. + Помилка відкриття списку модулів. + + + + Failed to open mod list + Не вдалося відкрити сисок модулів + + + + +Downloading: %1 +From: %2 + Завантажується: %1 +з %2 + + + + Error opening save file %1 for download %2 +Error: %3 + Помилка відкриття збереженого файлу %1 при завантаженні %2. +Власне, сталося таке: %3 + + + + Error downloading module list. + Помилка при завантаженні спису модулів. + + + + Bible Module Download + вибачте мене, якщо я спутав часи і не вірно переклав. Я не розумію суті цієї дії. + Завантажити біблійний модуль + + + + Songbook Module Download + та сама пертушка + Завантажити модуль пісенника + + + + Theme Module Download + Завантажити модуль теми + + + + Download Error: %1 + Ошибка загрузки: %1 + Помилка завантаження: %1 + + + + Saved to: %1 + Збережено до: %1 + + + + +Importing: %1 + Імпортування: %1 + + + softProjector Bible file + файли біблійних модулів softProjector + + + + Exporting... + Експорт... + + + + Bible has been exported + Біблійний модуль експортовано + + + + Bible: + + Біблія: + + + + + +Has been saved to: + + Збережена до: + + + + + Delete Bible? + Видалити біблійний модуль? + + + + This action will permanentrly delete this Bible + Це діло повністю видалить модуль. Для відновлення прийдеться попотіти + + + + Edit Songbook + Редагування збірника + + + + MediaWidget + + + Form + Форма + + + + - Media Library - + -- Медіа бібліотека -- + + + + Go Live (F5) + Показати (F5) + + + + F5 + + + + + Open + Відкрити + + + + Aspect Ratio: + Пропорції сторін: + + + + Auto + Авто + + + + Scale + Масштаб + + + + 4/3 + + + + + 16/9 + + + + + + <center>No media</center> + <center>Тут наразі нічого немає</center> + + + + No Media + Немає медіа + + + + Open Music/Video File + Відкрити файл музики/відео + + + + + Media Files (%1);;Audio Files (%2);;Video Files (%3) + Медіа файли (%1);; файли аудіо (%2);; відео файли (%3) + + + + Select Music/Video Files to Open + Вибір файлів музики/відео + + + + ModuleDownloadDialog + + + Dialog + + + + + Select modules you wish to download and import. + Оберіть модулі, які бажаєте завантажити та імпортувати. + + + + Select All + Обрати усе + + + + Deselect All + Скасувати весь вибір + + + + ModuleProgressDialog + + + Download / Import Progress Dialog + незрозуміло, що це таке. викликати в програмі не вдалося + Завантажити / Зберегти діалог прогресу + + + + Current Progress: + Наразі: + + + + Total Progress: + Загалом: + + + + Close + Закрити + + + + Native language name + + English + Українська + + + + English + Do not change + Українська + + + + PassiveSettingWidget + + Form + Форма + + + + + Use Passive Background Image + Використовувати пасивне зображення тла + + + + + Browse... + Огляд... + + + + Use Separate Secondary Display Screen Settings + Додатковий дисплей + + + + Reset All To Default + Скинути усі налаштування + + + + + Select a image for passive wallpaper + Обрати зображення фону + + + + + Images(%1) + Файли зображень (%1) + + + + PictureSettingWidget + + Picture Settings + Налаштування зображень + + + + When Displaying Slideshows: + При показі слайдшоу: + + + + Expand Small Images + Розтягувати маленькі зображення + + + + Fit Images To Screen + Підганяти зображення під дисплей + + + + Fit Images To Screen By Expanding + Підганяти по найменшій стороні + + + + Resize Large Images on Import + Масштабувати великі зображення при імпорті + + + + It is highly recommended to reduce large images on import. This will improve load, save and display time of slideshows. +We recommend to resize images to display screen size. + Для прискорення процесу відображення та зміни слайдів дуже рекомендується перед імпортом +конфертувати зображення до розмірів дисплею. + + + + Bound Box: + Граничні розміри: + + + + 800 x 800 + + + + + 1024 x 1024 + + + + + 1280 x 1280 + + + + + 1366 x 1366 + + + + + 1440 x 1440 + + + + + 1600 x 1600 + + + + + 1920 x 1920 + + + + + Custom + Інші + + + + Inalid Numeric Value + Некоректне числове значення + + + + Entered '%1' custom width is not numeric. + Введене значення %1 не є числом. + + + + PictureWidget + + + Form + Форма + + + + Slide Shows: + Слайд шоу: + + + + Go Live (F5) + Показати (F5) + + + + F5 + + + + + + Picture Preview + Попередній перегляд + + + + Picture Information + Інформація про зображення + + + + Edit Preview Slide Show: + Модифікація слай шоу: + + + + Add + Додати + + + + Remove + Видалити + + + + Clear + Очистити + + + + Editing slide show here will not change anything in database. To have save changes, use "New Slide Show" or "Edit Slide Show". + Тут виконуються лише зміни для передперегляду слайдшову, які не впливають більш ні на що. + + + + + Preview slide: + Перегляд слайду: + + + + Select Images to Open + Відкрити зображення + + + + Images(%1) + Файли малюнків (%1) + + + + Adding files... + Додати файли... + + + + Cancel + Скасувати + + + + Slide Show: %1 + Слайд шоу: %1 + + + + PrintPreviewDialog + + + softProjector Print Dialog + Діалог друку softProjector + + + + Margins: + Поля: + + + + Left Margin + Ліве + + + + L: + Л: + + + + Top Margin + Верхнє + + + + T: + В: + + + + Right Margin + Праве + + + + R: + П: + + + + Bottom Margin + Нижнє + + + + B: + Н: + + + + Inch + дюймів + + + + Millimeter + міліметрів + + + + Pixel + пікселів + + + + Point + точок + + + + Font: + Шрифт: + + + + To PDF + в PDF + + + + Print + Друк + + + + Tune: %1 + + Тональність: %1 + + + + + Words By: %1 Music By: %2 + + + Лірика: %1, Музика: %2 + + + + + + Words By: %1 + + + Лірика: %1 + + + + + + Music By: %1 + + + Музика: %1 + + + + + + + +Notes: +%1 + + +Помітки: +%1 + + + + Announcements: %1 + + + Оголошень: %1 + + + + + + SoftProject Schedule: + Програма служіння SoftProjector: + + + + Save PDF as + Зберегти PDF як + + + + SettingsDialog + + + softProjector - Settings + Налаштування softProjectorа + + + + General + Загальні + + + + Passive + Пасив + + + + Bible + Біблія + + + + Picture + Зображення + + + + Media + + + + + Announcements + Оголошення + + + + General SoftProjector Settings + Загальні налаштування SoftProjector + + + + Passive Settings + Налаштування пасивного режиму + + + + This setting are displayed when nothing is to be projected. + Ці налаштування використовуються коли нічого не відображається. + + + + Bible Settings + Налаштування відображення Біблій + + + + Song Settings + Налаштування відображення пісень + + + + Picture Settings + Налаштування пасивного режиму + + + + Media Settings + Налаштування media + + + + Announcement Settings + Налаштування відображення оголошень + + + Primary Bible: + Перша Біблія: + + + Secondary Bible: + Друга Біблія: + + + If checked, the screen "window" is always drawn on top of other windows. This prevents the user from accidently drawing a window onto the projector's screen. + Вікно екрану завжди над іншими вікнами (потрібне перезавантаження програми). Ця опція перестраховує від випадкової видачі лівої інфи. + + + Display window always on top + Вікно завжди зверху + + + 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 blurred shadow + Використовувати розмиту тінь + + + Change Font... + Змінити шрифт... + + + Text color: + Колір тексту: + + + Choose color... + Змінити колір... + + + Active wallpaper + Малюнок тла + + + Browse... + Огляд... + + + Remove wallpaper + Вилучити малюнок + + + Passive wallpaper + Заставка + + + + Songs + Пісні + + + Show song number + Показувати номер пісні + + + Show song key + Показувати тональність + + + Show stanza title + Показувати номер куплету + + + None + Не обрано + + + Select a picture for the wallpaper + Оберіть малюнок для тла + + + Images (*.png *.jpg *.jpeg) + Файли зображень (*.png *.jpg *.jpeg) + + + + OK + + + + + Cancel + Скасувати + + + + Apply + Застосувати + + + + SlideShowEditor + + + Slide Show Editor + Редактор слайдшоу + + + + Slide Show Title: + Заголовок: + + + + Slide Show Info: + Інформація: + + + + Add Pictures + Додати зображення + + + + Remove Picture + Вилучити зображення + + + + Picture Preview + Перегляд зображення + + + + Picture Information + Інформація про зображення + + + + Save + Зберегти + + + + + Cancel + Скасувати + + + + Select Images to Open + Відкрити зображення + + + + Images(%1) + Файли малюнків (%1) + + + + Adding files... + Додати файли... + + + + Slide show title cannot be left empty. +Please enter a title. + Заголовок слайдшову не може бути порожнім. +Будьте такі ласкаві, вкажіть заголовок для слайшоу. + + + + Slide show title is missing + Провтик - відсутній заголовок + + + + Saving Slide Show + Зберегти слайдшоу + + + + Preview slide: %1 + Перегляд слайду: %1 + + + + SoftProjector + + + + Bible (F6) + Біблія (F6) + + + + + Songs (F7) + Пісні (F7) + + + + + Pictures + Зображення + + + + + Media + Медіа + + + + + Announcements (F8) + Оголошення (F8) + + + Project not saved + project as in document file + Проект не збережений + + + Do you want to save current project? + project as in document file + Ви бажаєте зберегти поточний проект? + + + Announcement + Оголошення + + + Words by: %1, Music by: %2 + Слова: %1, Музика: %2 + + + Words by: %1 + Слова: %1 + + + Music by: %1 + Музика: %1 + + + + Cannot start new edit + Відсутня можливість розпочати нове редагування + + + + + + Another song is already been edited. + О-о, інша пісня уже редагується. + + + + Schedule not saved + Прорама не збережена + + + + Do you want to save current schedule? + Ви бажаєте зберегти поточну прораму? + + + + &Clear Bible History List + &Очистити исторію показу Біблії + + + + &New Song... + Нова &пісня... + + + + &Edit Song... + Редагувати &пісню... + + + + &Copy Song... + &Копіювати пісню... + + + + &Delete Song + &Видалити пісню + + + + &New Slide Show... + &Нове слайдшоу... + + + + &Edit Slide Show... + Редагувати &слайдшоу... + + + + &Delete Slide Show + &Видалити слайдшоу + + + + &Add Media Files... + &Додати файли медіа... + + + + &Remove Media Files + &Видалити медіа файли + + + + &New Announcement... + &Нове оголошення... + + + + &Edit Announcement... + &Редагувати оголошення... + + + + &Copy Announcement... + &Копіювати оголошення... + + + + &Delete Announcement + &Видалити оголошення + + + + + + Please save and/or close current edited song before edited a different song. + Будьте ласкаві, збережіть і(або) закрийте поточну пісню перед тим, як братися редагувати іншу. + + + + + + + No song selected + Не обрано жодної пісні + + + + No song has been selected to copy + Не обрано жодної пісні для копіювання + + + + Please select a song to copy + Будьте такі ласкаві, оберіть пісню + + + + No song has been selected to delete + Не обрано жодної пісні для вилучення + + + + Please select a song to delete + Будьте такі ласкаві, оберіть пісню для вилучення + + + + + No slideshow selected + Не обрано слайдшоу + + + + No slideshow has been selected to edit. + Жодне слайдшоу не обрано для редагування. + + + + Please select a slideshow to edit. + Будьте ласкаві, оберіть слайдшоу для редагування. + + + + Delete slideshow? + Дійсно видалити слайдшоу? + + + + Delete slideshow: " + Видалити слайдшоу: " + + + + This action will permanentrly delete this slideshow + Слфйдшоу буде вилучено аж до закінчення Вічості + + + + No slideshow has been selected to delete. + Жодне слайдшоу не обрано для видалення. + + + + Please select a slideshow to delete. + Будьте такі ласкаві, оберіть слайдшоу для видалення. + + + + No media selected + Не обрано медіа + + + + No media item has been selected to delete. + Жодного медіа не обрано для видалення. + + + + Please select a media item to delete. + Будьте такі ласкаві, оберіть медиа для видалення. + + + + + + No Announcement Selected + Не обрано оголошення + + + + No announcement has been selected to edit + Жодного оголошення не обрано для редагування + + + + Please select an announcement to edit + Будьте такі ласкаві, оберіть оголошення для редагування + + + + No announcement has been selected to copy + Жодного оголошення не обрано для копіювання + + + + Please select an announcement to copy + Будьте такі ласкаві, оберіть оголошення для копіювання + + + + Delete Announcement? + Дійсно видалити оголошення? + + + + Delete announcement: " + Видалити оголошення: " + + + + This action will permanentrly delete this announcement + Оголошення буде вилучено аж до закінчення Вічості + + + + No announcement has been selected to delete + Жодного оголошення не обрано для видалення + + + + Please select an announcement to delete + Будьте такі ласкаві, оберіть оголошення для видалення + + + + No announcement selected + Не обрано оголошення + + + + No announcement has been selected to be printed. + Жодного оголошення не обрано для друку. + + + + Please select a announcement to be printed. + Будьте такі ласкаві, оберіть оголошення для друку. + + + + + + Save Schedule? + Зберегти прораму? + + + + Do you want to save current schedule before creating a new schedule? + Ви бажаєте збереги поточну програму перед створенням нової? + + + + Do you want to save current schedule before opening a new schedule? + Ви бажаєте збереги поточну програму перед тим, як відккрити іншу? + + + + Open SoftProjector schedule: + Відкрити програму SoftProjector: + + + + + SoftProjector schedule file + Файли прорам SoftProjector + + + + Save SoftProjector schedule as: + Зберегти програму SoftProjector як: + + + Open softProjector schedule: + Відкрити програму softProjector: + + + softProjector schedule file + Файли прорам softProjector + + + Save softProjector schedule as: + Зберегти програму softProjector як: + + + + Do you want to save current schedule before closing it? + Стоп, можливо було б доцільно зберегти цю програму перед тим як її закрити? + + + + Saving schedule file... + Зберегти програму у файл... + + + + An error has ocured when overwriting existing file. +Please try again with different file name. + Виникла помилка перезапису фалу. +Будь ласка, спробуйте інше ім’я для цього фалу. + + + + Opening schedule file... + Відкрити файл програми... + + + + The schedule file you are trying to open is of uncompatible version. +Compatible version: 2 +This schedule file version: + Програма, яку ви намагаєтеся відкрити, не відповідає Вашій версії softProjector. +Сумісна версія: 2 +Версія програми: + + + No song has been selected to be edited. + Не обрано жодної пісні для редагування. + + + Please select a song to be edited. + Будьте ласкаві, оберіть пісню для редагування. + + + + Cannot create a new song + Відсутня можливість створити нову пісню + + + + No song has been selected to edit. + Не обрано жодної пісні для редагування. + + + + Please select a song to edit. + Будьте такі ласкаві, оберіть пісню для редагування. + + + + Cannot copy this song + Відсутня можливість скопіювати цю пісню + + + No song has been selected to be copied + Не обрано жодної пісні для копіювання + + + Please select a song to be copied + Будьте ласкаві, оберіть пісню для копіювання + + + + Delete song? + А якщо подумати? + + + + Delete song " + Вилучення пісні " + + + + This action will permanentrly delete this song + Пісня буде вилучена аж до закінчення Вічості + + + No song has been selected to be deleted + Не обрано жодної пісні для вилучення + + + Please select a song to be deleted + Будьте ласкаві, оберіть пісню для вилучення + + + Save Project? + project as in document file + Зберегти проект, а? + + + Do you want to save current project before opening other? + project as in document file + Стоп, можливо було б доцільно зберегти поточний проект перед тим як відкрити інший? + + + Open softProjector project + Відкрити проект softProjectorа + + + softProjector project file + Файли проектів softProjector + + + Save softProjector project as: + Зберегти проект softProjectorа як: + + + Save Project? + Зберегти проект, а? + + + Do you want to save current project before creating a new project? + Стоп, можливо було б доцільно зберегти поточний проект перед тим як створити новий? + + + Do you want to save current project before closing it? + Стоп, можливо було б доцільно зберегти цей проект перед тим як його закрити? + + + Incorrect project file format + О-о, некоректний формат файлу пректа :( + + + The softProjector project file you are opening, +is not supported by your version of softProjector. +You may try upgrading your version of softProjector. + Опа, на превеликий жаль, файл проекту, який +Ви намагаєтеся відкрити, не підтримується даною +версією softProjector. +Рекомендується оновити програму. + + + + No song has been selected to be printed. + Не обрано жодної пісні для лруку. + + + + Please select a song to be printed. + Будьте ласкаві, оберіть пісню для друку. + + + English + Українська + + + + SoftProjectorClass + + + Tab + Закладка + + + Stop displaying text to the screen (display black screen or wallpaper). Sortcut for this button is the Escape key. + Припинити показувати текст на екрні (тло лишається) (Esc). + + + Hide (Esc) + Приховати (Esc) + + + + Esc + + + + If Clear was pressed earlier, this will re-display the text to the screen + Показати раніше прихований текст + + + Show (F4) + Показати (F4) + + + + F4 + + + + + Use Multi Verse + Використовувати декілька віршів + + + + Service Schedule: + ПРограма служіння: + + + + If selected, this will allow to select multiple verses at one time. Will need to press "Show" each time. + Дозволяє показувати декільька віршів за раз. Потребує натискання "Показати" кожного разу при зміні віршів. + + + + &File + &Файл + + + + &Edit + &Редагувати + + + + + &Help + &Допомога + + + + Select Language + Оберіть мову + + + + Language + Мови + + + + View + Вигляд + + + + Schedule + Програма + + + + Display Screen + Дислей + + + + File Tool Bar + Файлова панель інструментів + + + + Schedule Tool Bar + Панель інструментів програми + + + + Edit Tool Bar + Панель інструментів для редагування + + + + Display Control Tool Bar + Панель інструментів контролю дисплею + + + + Import and export Bibles, songbooks and themes + Імпорт та експорт Біблій, пісенників та тем + + + + Open Help + Открыть справку + Відкрити довідку + + + + &Open Schedule + &Відкрити програму + + + + &Save Schedule + &Зберегти програму + + + + Save Schedule &As + Зберегти програму &як + + + + Save Schedule with different name + Зберегти програму з іншим ім’ям + + + + &New Schedule + &Нова програма + + + + Start new Schedule + Створити нову програму + + + + + Close Schedule + Зкрити програму + + + + &Print + &Надрукувати + + + + Prints selected Bible chapter, selected song and selected announcement. + Друкувати обраний розділ Біблії, обрану піснб та оголошення. + + + + + Print Schedule + Друкувати програму + + + + Ctrl+Shift+P + + + + + Del + + + + + Donate + Пожертвувати + + + + Donate to softProjector development team + Пожертвувати для команди softProjector + + + + Add to Schedule + Додати в програму + + + + F2 + + + + + Remove from Schedule + Видалити з програми + + + + Ctrl+Del + + + + + Clear Schedule + Очистити програму + + + + Move Item To Top + Рухати наверх + + + + Move Schedule item to top of the list + Перемістити елемент на верх списку + + + + Move Item Up + Рухати догори + + + + Move Schedule item up + Рухати елемент програми догори + + + + Mode Item Down + Рухати вниз + + + + Move Schedule item down + Рухає елемент програми вних + + + + Move Item To Bottom + Перемістити елемент в низ + + + + Move Schedule item to bottom of the list + Переміщає елемент програми вниз списку + + + + Show + Показати + + + + Dsiplay to the screen (F4) + Показати на дисплеї (F4) + + + + Show Passive Screen (Stop displaying to the screen) (Esc) + Показати пасивний дисплей (припинити показувати) (Esc) + + + + Clear + Очистити + + + + Clear Display Text (Shift+Esc) + Очистити текст на дисплеї (Shift+Esc) + + + + Shift+Esc + + + + + On / Off + Увмкн. / Вмкн. + + + + Turn Display Screen On/Off + Увімкнути / Вимкнути дисплей + + + Close + Закрити + + + Close Display Window + Закрити вікно дисплею + + + + Hide + Сховати + + + Songs + Пісні + + + toolBar + Панель інструментів + + + + &About + Про &програму + + + + &Settings... + &Налаштування... + + + + Open settings dialog + Відкрити вікно налаштувань + + + + Ctrl+T + + + + + E&xit + Ви&хід + + + + Exit SoftProjector + Вийти з softProjector + + + + Ctrl+Q + + + + &Edit Current Song... + &Редагувати поточну пісню... + + + + Ctrl+E + + + + &New Song... + Нова &пісня... + + + + Ctrl+N + + + + + &Manage Database... + Керування &базами... + + + Import and export song collections and Bibles + Іпортування та експортування збірниками пісень та Біблій + + + + Ctrl+M + + + + &Delete Current Song + &Вилучити поточну пісню + + + + F1 + + + + Copy Current Song... + Копіювати поточну пісню... + + + Copy current song into a new songbook + Копіювати поточну пісню до нового збірника + + + + Ctrl+C + + + + + Song Counter... + Лічильник пісень... + + + &Open Project + &Відкрити проект + + + + Ctrl+O + + + + &Save Project + &Зберегти проект + + + + Ctrl+S + + + + Save Project &As + Зберегти проект &як + + + New Project + Новий проект + + + + Ctrl+Shift+N + + + + Close Project + Зачинити проект + + + + Ctrl+P + + + + + SongCounter + + + Song Counter + Лічильник пісень + + + + Reset Selected + Скинути обране + + + + Reset All + Скинути усе + + + + Close + Закрити + + + + + January + January %1, %2 + січня + + + + + February + February %1, %2 + лютого + + + + + March + March %1, %2 + березня + + + + + April + April %1, %2 + квітня + + + + + May + травня + + + + + June + June %1, %2 + червня + + + + + July + July %1, %2 + липня + + + + + August + August %1, %2 + серпня + + + + + September + September %1, %2 + вересня + + + + + October + October %1, %2 + жовтня + + + + + November + November %1, %2 + листопада + + + + + December + December %1, %2 + грудня + + + + SongCounterModel + + Song Title + Назва + + + + Number + Номер + + + + Title + Назва + + + + Count + Штук + + + + Date + Дата + + + + Songbook + Збірник + + + + SongSettingWidget + + Form + Форма + + + + + Effects + Ефекти + + + + + 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 + Використовувати тіні + + + + + Use blurred shadow + Використовувати розмиту тінь + + + + + Song Information + Інформація про пісню + + + + + Show Stanza Title + Показувати номер куплету + + + + + Show Song Key + Показувати тональність + + + + + Show Song Number + Показувати номер + + + + + + + + + Color... + Колір... + + + + + + Alignment: + Вирівнювання: + + + + + Above Text + Перед текстом + + + + + Below Text + Після тексту + + + + + Show Song Ending + Показувати закінчення + + + *** + *** + + + This will show WordsBy and MusicBy as song ending + Інформація про авторів слів та музики відображатиметься + + + + + Song Copyright Info + Інформація про копірайт + + + + + + + Position: + Положення: + + + + + Below Song Text + Після тексту + + + + + + Bottom of Screen + Внизу екрану + + + + + Use Background Image + Використовувати малюнок тла + + + + + Browse... + Огляд... + + + Text Alingment + Вирівнювання тексту + + + Vertical: + вертикальне: + + + Horizontal: + Горизонтальне: + + + + + Top + Зверху + + + + + Middle + Середина + + + + + Bottom + Внизу + + + + + Left + Ліворуч + + + + + Center + Центр + + + + + Right + Праворуч + + + Text Properties + Текст + + + Color: + Колір: + + + Choose color... + Обрати... + + + + + + + + + Font... + Font + Шрифт... + + + + + Type: + Тип: + + + + Apply this background to all active backgrounds. + Застосувати цей фон до всіх активних фоном. + + + + + Song Text Properties + Властивості тексту пісні + + + + Alingment: + Вирівнювання: + + + + + Amount Of Screen To Use + Частина екрана, яка використовується + + + + Vertical Screen Use: + Висота дисплея, що використовується: + + + + + Percent of screen to be used. + Частина екрана, яка використовуватиметься, у відсотках. + + + + + Select to use either top portion of the screen or bottom. + Оберіть, яку частину (верхню чи нижню) дисплею використовувати. + + + + Top of screen + Вверху екрана + + + + Bottom of screen + Внизу екрану + + + + Use Separate Secondary Display Screen Settings + Використовувати власні налаштування для другого дисплею + + + + * * * + + + + + - - - + + + + + ° ° ° + + + + + • • • + + + + + ● ● ● + + + + + ▪ ▪ ▪ + + + + + ■ ■ ■ + + + + + Vertical Screen Use + Висота дисплея, що використовується + + + + % + + + + + Top of Screen + Вверху екрана + + + + Reset All To Default + Скинути усі налаштування + + + + + Select a image for song wallpaper + Обрати малюнок тла + + + + + Images(%1) + файли малюнків (%1) + + + + Bold + Жирний + + + + Italic + Курсив + + + + StrikeOut + Закреслений + + + + Underline + Підкреслений + + + Images (*.png *.jpg *.jpeg) + Файли зображень (*.png *.jpg *.jpeg) + + + + SongWidget + + + Form + Форма + + + + Use this menu to show only songs beloning to a particular Songbook + Відображають лише пісні зі вказаного збірника + + + + Select Songbook to use + Обрати робочий збірник + + + + Selects a song by the number in the selected Songbook + Обрати пісню із поточного зібрника за номером + + + + + + Filter: + Фільтр: + + + + Use this field to limit the display of the songs to only the ones that contain the specified text in the song title or song number + Використовується для задання критеріїв відповідності тексту пісень або їхніх номерів + + + + + Search Type: + Тип пошуку: + + + + Exact Match + Точна відповідність + + + + Contains Phrase + Містить фразу + + + + Contains Word Phrase + Містить слово/фразу + + + + Line Begins + На початку рядочка + + + + Contains Any Word + Містить хоча б одне з слів + + + + Contains All Words + Містить усі слова + + + + Search + Пошук + + + + Return + Повернутися + + + Matches only songs the song number or title of which contains the entered string. + Обераються пісні по номеру або назві. + + + + Contains + Містить + + + Matches only songs the song number or title of which begins with the entered string. + Обераються пісні по номеру або по першій стрічці. + + + + Begins + Розпочинається + + + Matches only songs the song number or title of which exactly matches the entered string. + Обераються пісні, які точно відповідають заданим критеріям. + + + Exact match + Точна відповідність + + + + Done Searching? - Clear Search Results + Завершити пошук та очистити результати + + + Add the selected song to the playlist + Додати обрану пісню до списку відтворення + + + Add (F2) + Додати (F2) + + + Remove the selected song from the playlist + Вилучити обрану пісню із списка відстворення + + + Remove (F3) + Вилучити (F3) + + + + Quickly display the selected song on the screen without adding it to playlist first + Швидкий показ без занесення до списку відтворення + + + + Go Live (F5) + Показати (F5) + + + + F5 + + + + Song preview: None + Попередній перегляд: нічого немає + + + + + All songbooks + Усі збірники + + + Song Preview: + Попередній перегляд пісні: + + + Comments: + Comments to songs + Коментарі: + + + + + Filter Type: + Тип фільтру: + + + + Notes: + Notes to songs + Замітки: + + + + Could not find song with number + О-о, пісня з таким номером відсутня + + + + No such song + Опа, така пісня відсутня + + + + + All song categories + Усі категорії + + + + Please enter search text + Будьте ласкаві, введіть текст, що бажаєте його віднайти + + + + Search: + Пошук: + + + + SongbooksModel + + + Title + Назва + + + + Information + Інформація + + + + SongsModel + + + Num + Номер + + + + Title + Назва + + + + Songbook + Збірник + + + + Tune + Тональність + + + + ThemeModel + + + Name + Назва + + + + Comments + Коментар + + + diff --git a/videoinfo.cpp b/videoinfo.cpp new file mode 100644 index 0000000..4e51a5f --- /dev/null +++ b/videoinfo.cpp @@ -0,0 +1,25 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "videoinfo.h" + +VideoInfo::VideoInfo() +{ + aspectRatio = 0; +} diff --git a/videoinfo.h b/videoinfo.h new file mode 100644 index 0000000..2fd07bf --- /dev/null +++ b/videoinfo.h @@ -0,0 +1,35 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef VIDEOINFO_H +#define VIDEOINFO_H + +#include + +class VideoInfo +{ +public: + VideoInfo(); +public: + QString filePath; + QString fileName; + int aspectRatio; +}; + +#endif // VIDEOINFO_H diff --git a/videoplayerwidget.cpp b/videoplayerwidget.cpp new file mode 100644 index 0000000..be14e8e --- /dev/null +++ b/videoplayerwidget.cpp @@ -0,0 +1,103 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#include "videoplayerwidget.h" + +VideoPlayerWidget::VideoPlayerWidget(QWidget *parent): QMediaPlayer(parent)/*: + Phonon::VideoWidget(parent)*/ + +{ + +} + +void VideoPlayerWidget::setFullScreen(bool enabled) +{ +// Phonon::VideoWidget::setFullScreen(enabled); +} + +void VideoPlayerWidget::mouseDoubleClickEvent(QMouseEvent *e) +{ +// Phonon::VideoWidget::mouseDoubleClickEvent(e); +// setFullScreen(!isFullScreen()); +} + +void VideoPlayerWidget::keyPressEvent(QKeyEvent *e) +{ + int key = e->key(); + if (key == Qt::Key_Space) + { + emit playPause(); + e->accept(); + return; + } + else if (key == Qt::Key_Escape) + { + setFullScreen(false); + e->accept(); + return; + } +// Phonon::VideoWidget::keyPressEvent(e); +} + +bool VideoPlayerWidget::event(QEvent *e) +{ + switch(e->type()) + { + case QEvent::Close: + //we just ignore the cose events on the video widget + //this prevents ALT+F4 from having an effect in fullscreen mode + e->ignore(); + return true; + case QEvent::MouseMove: +//#ifndef QT_NO_CURSOR +//// unsetCursor(); +//#endif +// //fall through +// case QEvent::WindowStateChange: +// { +// if (windowState() & Qt::WindowFullScreen) +// m_timer.start(1000, this); +// else +// { +// m_timer.stop(); +//#ifndef QT_NO_CURSOR +// unsetCursor(); +//#endif +// } +// } + break; + default: + break; + } + +// return Phonon::VideoWidget::event(e); + return false; +} + +void VideoPlayerWidget::timerEvent(QTimerEvent *e) +{ +// if (e->timerId() == m_timer.timerId()) +// { + ///let's store the cursor shape +//#ifndef QT_NO_CURSOR +// setCursor(Qt::BlankCursor); +//#endif +// } +// Phonon::VideoWidget::timerEvent(e); +} diff --git a/videoplayerwidget.h b/videoplayerwidget.h new file mode 100644 index 0000000..cc3f4dd --- /dev/null +++ b/videoplayerwidget.h @@ -0,0 +1,51 @@ +/*************************************************************************** +// +// softProjector - an open source media projection software +// Copyright (C) 2014 Vladislav Kobzar, Matvey Adzhigirey and Ilya Spivakov +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +***************************************************************************/ + +#ifndef VIDEOPLAYERWIDGET_H +#define VIDEOPLAYERWIDGET_H + +#include +#include +//#include +//#include + +class VideoPlayerWidget :QMediaPlayer//: public Phonon::VideoWidget +{ + Q_OBJECT +public: + VideoPlayerWidget(QWidget *parent = 0); +public slots: + + void setFullScreen(bool); + +signals: + void playPause(); + void handleDrops(QDropEvent *e); + +protected: + void mouseDoubleClickEvent(QMouseEvent *e); + void keyPressEvent(QKeyEvent *e); + bool event(QEvent *e); + void timerEvent(QTimerEvent *e); + +private: + QBasicTimer m_timer; +}; + +#endif // VIDEOPLAYERWIDGET_H