From 3ebdce1f072195860c0bbea202a57789f9a960c8 Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Tue, 28 Dec 2021 19:08:14 -0500 Subject: [PATCH] bookInfoDialog successfully bridged with search dialog --- bookinfodialog.cpp | 24 ++++++++++++++++++++++++ eink.qrc | 1 + generaldialog.cpp | 3 ++- resources/cover_unavailable.png | Bin 0 -> 23187 bytes searchresultswidget.cpp | 24 ++++++++++++++++++++---- 5 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 resources/cover_unavailable.png diff --git a/bookinfodialog.cpp b/bookinfodialog.cpp index c3dcfc4..e0cc8b6 100644 --- a/bookinfodialog.cpp +++ b/bookinfodialog.cpp @@ -45,7 +45,31 @@ bookInfoDialog::bookInfoDialog(QWidget *parent) : global::library::bookTitle = ""; } else { + ui->bookTitleLabel->setText(global::library::bookTitle); + global::library::bookTitle = ""; + QDir dictdir; + dictdir.mkpath("/inkbox/gutenberg"); + string_writeconfig("/inkbox/gutenberg/bookid", QString::number(global::library::bookId).toStdString()); + string_writeconfig("/opt/ibxd", "gutenberg_get_cover\n"); + while(true) { + if(QFile::exists("/inkbox/gutenberg/getCoverDone")) { + if(checkconfig("/inkbox/gutenberg/getCoverDone") == true) { + QPixmap coverPixmap("/inkbox/gutenberg/book_cover.jpg"); + QPixmap scaledCoverPixmap = coverPixmap.scaled(stdIconWidth, stdIconHeight, Qt::KeepAspectRatio); + ui->bookCoverLabel->setPixmap(scaledCoverPixmap); + QFile::remove("/inkbox/gutenberg/getCoverDone"); + break; + } + else { + QPixmap coverPixmap(":/resources/cover_unavailable.png"); + QPixmap scaledCoverPixmap = coverPixmap.scaled(stdIconWidth, stdIconHeight, Qt::KeepAspectRatio); + ui->bookCoverLabel->setPixmap(scaledCoverPixmap); + QFile::remove("/inkbox/gutenberg/getCoverDone"); + break; + } + } + } } // Centering dialog diff --git a/eink.qrc b/eink.qrc index aa1f896..7057e82 100644 --- a/eink.qrc +++ b/eink.qrc @@ -70,5 +70,6 @@ resources/alert-triangle.png resources/online-library.png resources/online-library-inverted.png + resources/cover_unavailable.png diff --git a/generaldialog.cpp b/generaldialog.cpp index 516b883..84a34bb 100644 --- a/generaldialog.cpp +++ b/generaldialog.cpp @@ -367,6 +367,7 @@ void generalDialog::on_okBtn_clicked() connect(searchResultsWidgetWindow, SIGNAL(destroyed(QObject*)), SLOT(restartSearchDialog())); searchResultsWidgetWindow->setListViewContents(searchResults); ui->mainStackedWidget->insertWidget(1, searchResultsWidgetWindow); + QFile::remove("/inkbox/gutenberg-search/search_done"); break; } else { @@ -374,9 +375,9 @@ void generalDialog::on_okBtn_clicked() emit showToast("No results found"); keyboardWidget->clearLineEdit(); global::keyboard::keyboardText = ""; + QFile::remove("/inkbox/gutenberg-search/search_done"); break; } - QFile::remove("/inkbox/gutenberg-search/search_done"); } } } diff --git a/resources/cover_unavailable.png b/resources/cover_unavailable.png new file mode 100644 index 0000000000000000000000000000000000000000..392fe4ac51e76ae8cab3c80470f5a85015a08f8b GIT binary patch literal 23187 zcmeIa2UL{lx;6MAwsf0qMFd66D5x|lAR@swA__{Btdc=Mvc#g>R!|8FB9d(okSsY< zZ2$xWB$g7DC|Po@n*Dn2J!@wEJO4U8Ywnr(*BaNN#isb`P0#b}XYc*iy-V_ES1spR zPEph<*>k59DT*E6E~S24hQCzzNa4S1f0&#+c}e!<$!#~SEe%a>7*N#SN3M?~&%Ke^ zQmm^Py@Qiu#m2see;&)+CeZOhW$&+dE(vDzU$ySzI%0B8QEST&jNfnbJy7A`GScSN z`r*Vk_P3RlvNfmAFX$>7uj_neCEeEQ+)~KCP${5P8Ez%huz#oj`Q^C_@oQa9|9E-j z&fjz1UT~G)Q1@+%?)10O$%C)b3#u2zmp%TyjEaysUSa!YN87gWwhY^<`M1|ppKR!` z>Bu?3wacw5Z*XjLuiqQDaBk7GAjghhQZMyi&wZf&>C(MePrdu`my4u((_TA1NY_Y8 zpOTziaqB?ykTK$;&s1Z@hGS zdD-Y~)~gYV%8sr-LN=UVQYe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apOnd~Q^9a1%dsUQ`pF?zbJ~_aMg`N}(v=j?ldMv^}obD^5 zq}_Lf4%2@ufojO$qGt2BVJJuBGR!nnHAEa9)FwO6qnu0R&H90D{!7T7pLJ%?>Nafcd4GiIEw_Xtfp3q zPv*If))N*g!cLit>M4K*C)P@G=@XyrBPcaj<9jCXp!SX(k$?oa2D=^sbPwqZcNh!S zp~dLpOnKvzTg;QIfv!pz_ejZwXEakgrAF^5ye*ZQO5Ka`45ZMdaDjg-NF8l*#S*e& z-ix@nd-%|m?)WT8Tw5of+HxH*Z8T27Re&f?#G>x&(zVkHddwMfb90gm@KFn#xZCP> z1Eq@?WpOns<4(|@=tJHj2N6#O`3wVsLJ94N2GiON9rQt9`Y0rd{{DVcqV=hk?L{9m z&D4nFkYH38NbUC|$wNPv;kQoG{tqpkd|;J3zNn@6+D5)%!x#AkIvIR@m)rmOlK<udQ98M>;D%Y)4w=XcQRG78vpgi{6D)+ z|J`HypO5yRQ{9H?{&Rc(zc!}7aZJBY=x-j=?_uzF*Xh4`OyB46H^wAGef)ulistView->currentIndex().row(); // So that row 0 becomes row 1 - selectedRow = selectedRow++; + selectedRow = selectedRow + 1; + QString selectedRowQstr = QString::number(selectedRow); - // TODO: Find book ID and pass it on to bookInfoDialog, then retrieve cover.jpg for display + QString prog ("sed"); + QStringList args; + args << "-n" << selectedRowQstr + "p" << "/inkbox/gutenberg-search/search_results_ids"; + QProcess *proc = new QProcess(); + proc->start(prog, args); + proc->waitForFinished(); + QString bookIdQstr = proc->readAllStandardOutput(); + proc->deleteLater(); - global::keyboard::searchDialog = false; - global::keyboard::keyboardDialog = false; + unsigned long bookId = bookIdQstr.toULong(); + global::library::bookId = bookId; + + index = ui->listView->currentIndex(); + itemText = index.data(Qt::DisplayRole).toString(); + global::library::bookTitle = itemText; bookInfoDialog * bookInfoDialogWindow = new bookInfoDialog(); bookInfoDialogWindow->setAttribute(Qt::WA_DeleteOnClose); bookInfoDialogWindow->show(); + + global::keyboard::searchDialog = false; + global::keyboard::keyboardDialog = false; + searchResultsWidget::close(); } else { index = ui->listView->currentIndex();