diff --git a/mainwindow.cpp b/mainwindow.cpp index 6e3a32c..c771265 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -328,10 +328,7 @@ if(Debug) qDebug() << "on_pushButton_abspielen_clicked"; #ifdef __WIN32__ explorer->start("explorer", {ui->pushButton_pfad->text().replace(QString("/"), QString("\\"))}); #elif __linux__ - if(QFileInfo::exists("/usr/bin/celluloid")) explorer->start("celluloid", {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()}); + explorer->start("xdg-open", {ui->pushButton_pfad->text()}); #endif } ui->statusbar->showMessage("Video abspielen"); @@ -617,25 +614,22 @@ if(Debug) qDebug() << "on_pushButton_PDF_speichern_clicked"; \
\![]() | ||
![]() | ||
Pfad : | " + ui->pushButton_pfad->text() + " | |
Titel : | " + ui->lineEdit_titel->text() + " | |
Format : | " + ui->comboBox_bildformat->currentText() + " | |
Typ : | " + ui->comboBox_filmtyp->currentText() + " | |
Teil : | " + ui->lineEdit_teil->text() + " | |
Genre : | " + ui->comboBox_genre->currentText() + " | |
Länge : | " + ui->lineEdit_laenge->text() + " | |
Jahr : | " + ui->lineEdit_jahr->text() + " | |
FSK : | " + ui->comboBox_fsk->currentText() + " | |
Titel | : " + ui->lineEdit_titel->text() + " | |
Format | : " + ui->comboBox_bildformat->currentText() + " | |
Typ | : " + ui->comboBox_filmtyp->currentText() + " | |
Teil | : " + ui->lineEdit_teil->text() + " | |
Genre | : " + ui->comboBox_genre->currentText() + " | |
Länge | : " + ui->lineEdit_laenge->text() + " | |
Jahr | : " + ui->lineEdit_jahr->text() + " | |
FSK | : " + ui->comboBox_fsk->currentText() + " |
" + ui->plainTextEdit_handlung->document()->toRawText() + "
\
\
@@ -652,6 +646,7 @@ if(Debug) qDebug() << "on_pushButton_PDF_speichern_clicked";
printer.setOutputFileName(".Video-Datenbank/pdf/" + Dateiname + ".pdf");
#endif
printer.setOutputFormat(QPrinter::PdfFormat);
+ doc.setPageSize(printer.pageLayout().paintRect().size());
doc.print(&printer);
printer.newPage();
@@ -720,3 +715,55 @@ 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";
+}
+
diff --git a/mainwindow.h b/mainwindow.h
index ce863c0..67d2706 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -18,6 +18,8 @@
#include