3.6
This commit is contained in:
parent
8a0452e969
commit
d71fc587b0
3 changed files with 153 additions and 83 deletions
|
@ -328,10 +328,7 @@ if(Debug) qDebug() << "on_pushButton_abspielen_clicked";
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
explorer->start("explorer", {ui->pushButton_pfad->text().replace(QString("/"), QString("\\"))});
|
explorer->start("explorer", {ui->pushButton_pfad->text().replace(QString("/"), QString("\\"))});
|
||||||
#elif __linux__
|
#elif __linux__
|
||||||
if(QFileInfo::exists("/usr/bin/celluloid")) explorer->start("celluloid", {ui->pushButton_pfad->text()});
|
explorer->start("xdg-open", {ui->pushButton_pfad->text()});
|
||||||
else if(QFileInfo::exists("/usr/bin/mpv")) explorer->start("mpv", {ui->pushButton_pfad->text()});
|
|
||||||
else if(QFileInfo::exists("/usr/bin/ffplay")) explorer->start("ffplay", {ui->pushButton_pfad->text()});
|
|
||||||
else if(QFileInfo::exists("/usr/bin/vlc")) explorer->start("vlc", {ui->pushButton_pfad->text()});
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
ui->statusbar->showMessage("Video abspielen");
|
ui->statusbar->showMessage("Video abspielen");
|
||||||
|
@ -617,25 +614,22 @@ if(Debug) qDebug() << "on_pushButton_PDF_speichern_clicked";
|
||||||
</head> \
|
</head> \
|
||||||
<body> \
|
<body> \
|
||||||
<table border='0'> \
|
<table border='0'> \
|
||||||
<tr><td width=10%> </td><td width=55%> </td><td width=35% align='right' rowspan=19><img src='.Video-Datenbank/png/" + Dateiname + ".png'></td></tr> \
|
<tr><td width=7%> </td><td width=58%> </td><td width=35% align='right' rowspan=16><img src='.Video-Datenbank/png/" + Dateiname + ".png'></td></tr> \
|
||||||
<tr><td> </td><td> </td></tr> \
|
<tr><td> </td><td> </td></tr> \
|
||||||
<tr><td> </td><td> </td></tr> \
|
<tr><td> </td><td> </td></tr> \
|
||||||
<tr><td> </td><td> </td></tr> \
|
<tr><td> </td><td> </td></tr> \
|
||||||
<tr><td> </td><td> </td></tr> \
|
<tr><td> </td><td> </td></tr> \
|
||||||
<tr><td> </td><td> </td></tr> \
|
<tr><td> </td><td> </td></tr> \
|
||||||
<tr><td> </td><td> </td></tr> \
|
<tr><td> </td><td> </td></tr> \
|
||||||
<tr><td> </td><td> </td></tr> \
|
<tr><td align=left> </td><td> </td></tr> \
|
||||||
<tr><td> </td><td> </td></tr> \
|
<tr><td align=left>Titel</td><td> : " + ui->lineEdit_titel->text() + "</td></tr> \
|
||||||
<tr><td> </td><td> </td></tr> \
|
<tr><td align=leftt>Format</td><td> : " + ui->comboBox_bildformat->currentText() + "</td></tr> \
|
||||||
<tr><td align=right>Pfad :</td><td>" + ui->pushButton_pfad->text() + "</td></tr> \
|
<tr><td align=left>Typ</td><td> : " + ui->comboBox_filmtyp->currentText() + "</td></tr> \
|
||||||
<tr><td align=right>Titel :</td><td>" + ui->lineEdit_titel->text() + "</td></tr> \
|
<tr><td align=left>Teil</td><td> : " + ui->lineEdit_teil->text() + "</td></tr> \
|
||||||
<tr><td align=right>Format :</td><td>" + ui->comboBox_bildformat->currentText() + "</td></tr> \
|
<tr><td align=left>Genre</td><td> : " + ui->comboBox_genre->currentText() + "</td></tr> \
|
||||||
<tr><td align=right>Typ :</td><td>" + ui->comboBox_filmtyp->currentText() + "</td></tr> \
|
<tr><td align=left>Länge</td><td> : " + ui->lineEdit_laenge->text() + "</td></tr> \
|
||||||
<tr><td align=right>Teil :</td><td>" + ui->lineEdit_teil->text() + "</td></tr> \
|
<tr><td align=left>Jahr</td><td> : " + ui->lineEdit_jahr->text() + "</td></tr> \
|
||||||
<tr><td align=right>Genre :</td><td>" + ui->comboBox_genre->currentText() + "</td></tr> \
|
<tr><td align=left>FSK</td><td> : " + ui->comboBox_fsk->currentText() + "</td></tr> \
|
||||||
<tr><td align=right>Länge :</td><td>" + ui->lineEdit_laenge->text() + "</td></tr> \
|
|
||||||
<tr><td align=right>Jahr :</td><td>" + ui->lineEdit_jahr->text() + "</td></tr> \
|
|
||||||
<tr><td align=right>FSK :</td><td>" + ui->comboBox_fsk->currentText() + "</td></tr> \
|
|
||||||
</table> \
|
</table> \
|
||||||
<br><br><code>" + ui->plainTextEdit_handlung->document()->toRawText() + " </code> \
|
<br><br><code>" + ui->plainTextEdit_handlung->document()->toRawText() + " </code> \
|
||||||
</body> \
|
</body> \
|
||||||
|
@ -652,6 +646,7 @@ if(Debug) qDebug() << "on_pushButton_PDF_speichern_clicked";
|
||||||
printer.setOutputFileName(".Video-Datenbank/pdf/" + Dateiname + ".pdf");
|
printer.setOutputFileName(".Video-Datenbank/pdf/" + Dateiname + ".pdf");
|
||||||
#endif
|
#endif
|
||||||
printer.setOutputFormat(QPrinter::PdfFormat);
|
printer.setOutputFormat(QPrinter::PdfFormat);
|
||||||
|
doc.setPageSize(printer.pageLayout().paintRect().size());
|
||||||
doc.print(&printer);
|
doc.print(&printer);
|
||||||
printer.newPage();
|
printer.newPage();
|
||||||
|
|
||||||
|
@ -720,3 +715,55 @@ if(Debug) qDebug() << "on_pushButton_Wikipedia_clicked-Ende";
|
||||||
if(Debug) qDebug() << "on_pushButton_Wikipedia_clicked-Ende";
|
if(Debug) qDebug() << "on_pushButton_Wikipedia_clicked-Ende";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_google_clicked(){
|
||||||
|
if(Debug) qDebug() << "on_pushButton_google_clicked";
|
||||||
|
if(ui->lineEdit_titel->text()==""){
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setText("Kein Titel zum Suchen!");
|
||||||
|
msgBox.exec();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QProcess *explorer = new QProcess;
|
||||||
|
QString suchen = ui->lineEdit_titel->text().replace(" ", "+");
|
||||||
|
QString url = "https://www.google.de/search?q=" + suchen + "&tbm=isch";
|
||||||
|
#ifdef __WIN32__
|
||||||
|
QDesktopServices::openUrl(QUrl(url));
|
||||||
|
#elif __linux__
|
||||||
|
explorer->start("xdg-open", {url});
|
||||||
|
#endif
|
||||||
|
ui->statusbar->showMessage("Bilder suchen");
|
||||||
|
if(Debug) qDebug() << "on_pushButton_google_clicked-Ende";
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_imdb_clicked(){
|
||||||
|
if(Debug) qDebug() << "on_pushButton_imdb_clicked";
|
||||||
|
if(ui->lineEdit_titel->text()==""){
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setText("Kein Titel zum Suchen!");
|
||||||
|
msgBox.exec();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QProcess *explorer = new QProcess;
|
||||||
|
QString suchen = ui->lineEdit_titel->text().replace(" ", "+");
|
||||||
|
QString url = "https://www.imdb.com/find?q=" + suchen;
|
||||||
|
#ifdef __WIN32__
|
||||||
|
QDesktopServices::openUrl(QUrl(url));
|
||||||
|
#elif __linux__
|
||||||
|
explorer->start("xdg-open", {url});
|
||||||
|
#endif
|
||||||
|
ui->statusbar->showMessage("IMDb suchen");
|
||||||
|
if(Debug) qDebug() << "on_pushButton_imdb_clicked-Ende";
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_pushButton_ordner_clicked(){
|
||||||
|
if(Debug) qDebug() << "on_pushButton_on_pushButton_ordner_clicked";
|
||||||
|
QProcess *explorer = new QProcess;
|
||||||
|
#ifdef __WIN32__
|
||||||
|
explorer->start("explorer", {"."});
|
||||||
|
#elif __linux__
|
||||||
|
explorer->start("xdg-open", {".Video-Datenbank"});
|
||||||
|
#endif
|
||||||
|
ui->statusbar->showMessage("Ordner öffnen");
|
||||||
|
if(Debug) qDebug() << "on_pushButton_on_pushButton_ordner_clicked-Ende";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
12
mainwindow.h
12
mainwindow.h
|
@ -18,6 +18,8 @@
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
|
#include <QDesktopServices>
|
||||||
|
#include <QUrl>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
namespace Ui { class MainWindow; }
|
namespace Ui { class MainWindow; }
|
||||||
|
@ -45,17 +47,17 @@ private slots:
|
||||||
void on_pushButton_bild_clicked();
|
void on_pushButton_bild_clicked();
|
||||||
// Suchen
|
// Suchen
|
||||||
void on_lineEdit_suchen_textChanged();
|
void on_lineEdit_suchen_textChanged();
|
||||||
|
void on_pushButton_Wikipedia_clicked();
|
||||||
|
void on_pushButton_google_clicked();
|
||||||
|
void on_pushButton_imdb_clicked();
|
||||||
// Löschen
|
// Löschen
|
||||||
void on_pushButton_daten_loeschen_clicked();
|
void on_pushButton_daten_loeschen_clicked();
|
||||||
// Andere
|
// Andere
|
||||||
void on_tableWidget_Datenbank_ausgabe_cellClicked(int row, int column);
|
void on_tableWidget_Datenbank_ausgabe_cellClicked(int row, int column);
|
||||||
//
|
|
||||||
|
|
||||||
void on_pushButton_pfad_clicked();
|
void on_pushButton_pfad_clicked();
|
||||||
|
|
||||||
void on_pushButton_PDF_speichern_clicked();
|
void on_pushButton_PDF_speichern_clicked();
|
||||||
|
void on_pushButton_ordner_clicked();
|
||||||
void on_pushButton_Wikipedia_clicked();
|
//
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void oeffneDatenbank();
|
void oeffneDatenbank();
|
||||||
|
|
143
mainwindow.ui
143
mainwindow.ui
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>956</width>
|
<width>956</width>
|
||||||
<height>616</height>
|
<height>646</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -192,41 +192,6 @@
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<item row="2" column="2" colspan="4">
|
|
||||||
<widget class="QPushButton" name="pushButton_abspielen">
|
|
||||||
<property name="text">
|
|
||||||
<string>Abspielen</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0" colspan="2">
|
|
||||||
<widget class="QPushButton" name="pushButton_PDF_Status">
|
|
||||||
<property name="text">
|
|
||||||
<string>PDF</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="2" colspan="4">
|
|
||||||
<widget class="QPushButton" name="pushButton_daten_loeschen">
|
|
||||||
<property name="text">
|
|
||||||
<string>Daten löschen</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" colspan="2">
|
|
||||||
<widget class="QPushButton" name="pushButton_speichern">
|
|
||||||
<property name="text">
|
|
||||||
<string>Speichern</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="2" colspan="4">
|
|
||||||
<widget class="QPushButton" name="pushButton_PDF_speichern">
|
|
||||||
<property name="text">
|
|
||||||
<string>PDF speichern</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QPushButton" name="pushButton_minus">
|
<widget class="QPushButton" name="pushButton_minus">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
|
@ -265,25 +230,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QPushButton" name="pushButton_id">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>42</width>
|
|
||||||
<height>23</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>70</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="4">
|
<item row="1" column="4">
|
||||||
<widget class="QPushButton" name="pushButton_plus">
|
<widget class="QPushButton" name="pushButton_plus">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
|
@ -303,6 +249,34 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="0" colspan="2">
|
||||||
|
<widget class="QPushButton" name="pushButton_Wikipedia">
|
||||||
|
<property name="text">
|
||||||
|
<string>Wikipedia</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2" colspan="4">
|
||||||
|
<widget class="QPushButton" name="pushButton_abspielen">
|
||||||
|
<property name="text">
|
||||||
|
<string>Abspielen</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="2">
|
||||||
|
<widget class="QPushButton" name="pushButton_status">
|
||||||
|
<property name="text">
|
||||||
|
<string>Film</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0" colspan="2">
|
||||||
|
<widget class="QPushButton" name="pushButton_PDF_Status">
|
||||||
|
<property name="text">
|
||||||
|
<string>PDF</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="2">
|
||||||
<widget class="QLabel" name="label_9">
|
<widget class="QLabel" name="label_9">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -317,17 +291,64 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="2">
|
<item row="5" column="2" colspan="4">
|
||||||
<widget class="QPushButton" name="pushButton_status">
|
<widget class="QPushButton" name="pushButton_google">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Film</string>
|
<string>Google Bilder</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0" colspan="6">
|
<item row="4" column="2" colspan="4">
|
||||||
<widget class="QPushButton" name="pushButton_Wikipedia">
|
<widget class="QPushButton" name="pushButton_PDF_speichern">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Wikipedia</string>
|
<string>PDF speichern</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="2" colspan="4">
|
||||||
|
<widget class="QPushButton" name="pushButton_daten_loeschen">
|
||||||
|
<property name="text">
|
||||||
|
<string>Daten löschen</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="2">
|
||||||
|
<widget class="QPushButton" name="pushButton_speichern">
|
||||||
|
<property name="text">
|
||||||
|
<string>Speichern</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QPushButton" name="pushButton_id">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>42</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>70</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0" colspan="2">
|
||||||
|
<widget class="QPushButton" name="pushButton_imdb">
|
||||||
|
<property name="text">
|
||||||
|
<string>IMDb</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="2" colspan="4">
|
||||||
|
<widget class="QPushButton" name="pushButton_ordner">
|
||||||
|
<property name="text">
|
||||||
|
<string>Datenordner</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Add table
Reference in a new issue