mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 13:04:28 -04:00
Add setting to setup third party readers to work with YACReaderLibrary
This commit is contained in:
@ -85,6 +85,14 @@ void OptionsDialog::restoreOptions(QSettings *settings)
|
||||
updateLibrariesTimeEdit->setTime(settings->value(UPDATE_LIBRARIES_AT_CERTAIN_TIME_TIME, "00:00").toTime());
|
||||
|
||||
compareModifiedDateWhenUpdatingLibrariesCheck->setChecked(settings->value(COMPARE_MODIFIED_DATE_ON_LIBRARY_UPDATES, false).toBool());
|
||||
|
||||
thirdPartyReaderEdit->setText(settings->value(THIRD_PARTY_READER_COMMAND, "").toString());
|
||||
}
|
||||
|
||||
void OptionsDialog::saveOptions()
|
||||
{
|
||||
settings->setValue(THIRD_PARTY_READER_COMMAND, thirdPartyReaderEdit->text());
|
||||
YACReaderOptionsDialog::saveOptions();
|
||||
}
|
||||
|
||||
void OptionsDialog::useBackgroundImageCheckClicked(bool checked)
|
||||
@ -198,12 +206,23 @@ QWidget *OptionsDialog::createGeneralTab()
|
||||
|
||||
connect(recentIntervalSlider, &QAbstractSlider::valueChanged, this, &OptionsDialog::numDaysToConsiderRecentChanged);
|
||||
|
||||
auto thirdPartyReaderBox = new QGroupBox(tr("Third party reader"));
|
||||
thirdPartyReaderEdit = new QLineEdit();
|
||||
thirdPartyReaderEdit->setPlaceholderText(tr("Write {comic_file_path} where the path should go in the command"));
|
||||
auto clearButton = new QPushButton(tr("Clear"));
|
||||
auto thirdPartyReaderLayout = new QHBoxLayout();
|
||||
thirdPartyReaderLayout->addWidget(thirdPartyReaderEdit, 1);
|
||||
thirdPartyReaderLayout->addWidget(clearButton);
|
||||
thirdPartyReaderBox->setLayout(thirdPartyReaderLayout);
|
||||
connect(clearButton, &QPushButton::clicked, thirdPartyReaderEdit, &QLineEdit::clear);
|
||||
|
||||
auto generalLayout = new QVBoxLayout();
|
||||
generalLayout->addWidget(trayIconBox);
|
||||
generalLayout->addWidget(shortcutsBox);
|
||||
generalLayout->addWidget(apiKeyBox);
|
||||
generalLayout->addWidget(comicInfoXMLBox);
|
||||
generalLayout->addWidget(recentlyAddedBox);
|
||||
generalLayout->addWidget(thirdPartyReaderBox);
|
||||
generalLayout->addStretch();
|
||||
|
||||
auto generalW = new QWidget;
|
||||
|
Reference in New Issue
Block a user