mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-14 08:50:08 -05:00
Store remember last opened files setting.
This commit is contained in:
parent
6f48983efe
commit
f18db06471
@ -139,6 +139,7 @@ set(keepassx_FORMS
|
||||
gui/EditWidgetIcons.ui
|
||||
gui/MainWindow.ui
|
||||
gui/SearchWidget.ui
|
||||
gui/SettingsWidgetGeneral.ui
|
||||
gui/SettingsWidgetSecurity.ui
|
||||
gui/WelcomeWidget.ui
|
||||
gui/entry/EditEntryWidgetAdvanced.ui
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "SettingsWidget.h"
|
||||
#include "ui_SettingsWidgetGeneral.h"
|
||||
#include "ui_SettingsWidgetSecurity.h"
|
||||
|
||||
#include "core/Config.h"
|
||||
@ -23,11 +24,15 @@
|
||||
SettingsWidget::SettingsWidget(QWidget* parent)
|
||||
: EditWidget(parent)
|
||||
, m_secWidget(new QWidget())
|
||||
, m_generalWidget(new QWidget())
|
||||
, m_secUi(new Ui::SettingsWidgetSecurity())
|
||||
, m_generalUi(new Ui::SettingsWidgetGeneral())
|
||||
{
|
||||
setHeadline(tr("Application Settings"));
|
||||
|
||||
m_secUi->setupUi(m_secWidget);
|
||||
m_generalUi->setupUi(m_generalWidget);
|
||||
add(tr("General"), m_generalWidget);
|
||||
add(tr("Security"), m_secWidget);
|
||||
|
||||
connect(this, SIGNAL(accepted()), SLOT(saveSettings()));
|
||||
@ -43,6 +48,7 @@ SettingsWidget::~SettingsWidget()
|
||||
|
||||
void SettingsWidget::loadSettings()
|
||||
{
|
||||
m_generalUi->rememberLastDatabasesCheckBox->setChecked(config()->get("RememberLastDatabases").toBool());
|
||||
m_secUi->clearClipboardCheckBox->setChecked(config()->get("security/clearclipboard").toBool());
|
||||
m_secUi->clearClipboardSpinBox->setValue(config()->get("security/clearclipboardtimeout").toInt());
|
||||
|
||||
@ -51,6 +57,7 @@ void SettingsWidget::loadSettings()
|
||||
|
||||
void SettingsWidget::saveSettings()
|
||||
{
|
||||
config()->set("RememberLastDatabases", m_generalUi->rememberLastDatabasesCheckBox->isChecked());
|
||||
config()->set("security/clearclipboard", m_secUi->clearClipboardCheckBox->isChecked());
|
||||
config()->set("security/clearclipboardtimeout", m_secUi->clearClipboardSpinBox->value());
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "gui/EditWidget.h"
|
||||
|
||||
namespace Ui {
|
||||
class SettingsWidgetGeneral;
|
||||
class SettingsWidgetSecurity;
|
||||
}
|
||||
|
||||
@ -42,7 +43,9 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
QWidget* const m_secWidget;
|
||||
QWidget* const m_generalWidget;
|
||||
const QScopedPointer<Ui::SettingsWidgetSecurity> m_secUi;
|
||||
const QScopedPointer<Ui::SettingsWidgetGeneral> m_generalUi;
|
||||
};
|
||||
|
||||
#endif // KEEPASSX_SETTINGSWIDGET_H
|
||||
|
Loading…
Reference in New Issue
Block a user