mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -08:00
Started work to open book file from search in Reader
This commit is contained in:
parent
8e53fab157
commit
1e6e6ede6b
4 changed files with 10 additions and 1 deletions
|
@ -253,7 +253,7 @@ void generalDialog::on_okBtn_clicked()
|
|||
}
|
||||
if(keyboardDialog == true) {
|
||||
if(global::keyboard::searchDialog == true) {
|
||||
if(global::keyboard::keyboardText != "") {
|
||||
if(!global::keyboard::keyboardText.isEmpty()) {
|
||||
if(ui->searchComboBox->currentText() == "Dictionary") {
|
||||
string_writeconfig("/inkbox/searchComboBoxFunction", "Dictionary");
|
||||
for(int i = ui->mainStackedWidget->count(); i >= 0; i--) {
|
||||
|
|
|
@ -1856,6 +1856,8 @@ void reader::setupSearchDialog() {
|
|||
generalDialogWindow->setAttribute(Qt::WA_DeleteOnClose);
|
||||
connect(generalDialogWindow, SIGNAL(refreshScreen()), SLOT(searchRefreshScreen()));
|
||||
connect(generalDialogWindow, SIGNAL(destroyed(QObject*)), SLOT(setupSearchDialog()));
|
||||
connect(generalDialogWindow, SIGNAL(openBookFile(QString, bool)), SLOT(openBookFile(QString, bool)));
|
||||
connect(generalDialogWindow, SIGNAL(showToast(QString)), SLOT(showToast(QString)));
|
||||
generalDialogWindow->show();
|
||||
}
|
||||
else {
|
||||
|
@ -2059,3 +2061,7 @@ void reader::on_increaseScaleBtn_clicked()
|
|||
ui->pdfScaleSlider->setValue(sliderWantedValue);
|
||||
}
|
||||
}
|
||||
|
||||
void reader::openBookFile(QString book, bool relativePath) {
|
||||
qDebug() << "Open book:" << book;
|
||||
}
|
||||
|
|
1
reader.h
1
reader.h
|
@ -156,6 +156,7 @@ private slots:
|
|||
void on_pdfScaleSlider_valueChanged(int value);
|
||||
void on_decreaseScaleBtn_clicked();
|
||||
void on_increaseScaleBtn_clicked();
|
||||
void openBookFile(QString book, bool relativePath);
|
||||
|
||||
private:
|
||||
Ui::reader * ui;
|
||||
|
|
|
@ -33,6 +33,8 @@ void searchResultsWidget::on_openBtn_clicked()
|
|||
itemText = index.data(Qt::DisplayRole).toString();
|
||||
if(!itemText.isEmpty()) {
|
||||
emit openBookFile(itemText, true);
|
||||
global::keyboard::searchDialog = false;
|
||||
global::keyboard::keyboardDialog = false;
|
||||
searchResultsWidget::close();
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue