2 Copyright (c) 2014-2015 Montel Laurent <montel@kde.org>
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 #include "storageserviceconfiguredialog.h"
22 #include "PimCommon/ConfigureImmutableWidgetUtils"
23 #include "PimCommon/StorageServiceConfigureWidget"
24 #include "storageservicemanagerglobalconfig.h"
26 #include <KLocalizedString>
27 #include <KSharedConfig>
32 StorageServiceConfigureDialog::StorageServiceConfigureDialog(QWidget
*parent
)
33 : PimCommon::StorageServiceConfigureDialog(parent
)
35 mCloseWallet
= new QCheckBox(i18n("Close wallet when close application"));
36 mCloseWallet
->setObjectName(QStringLiteral("closewallet"));
37 addExtraWidget(mCloseWallet
);
41 StorageServiceConfigureDialog::~StorageServiceConfigureDialog()
45 void StorageServiceConfigureDialog::loadSettings()
47 PimCommon::ConfigureImmutableWidgetUtils::loadWidget(mStorageServiceConfigureWidget
->downloadFolder(), StorageServiceManagerGlobalConfig::self()->downloadDirectoryItem());
48 PimCommon::ConfigureImmutableWidgetUtils::loadWidget(mCloseWallet
, StorageServiceManagerGlobalConfig::self()->closeWalletItem());
51 void StorageServiceConfigureDialog::writeSettings()
53 PimCommon::ConfigureImmutableWidgetUtils::saveUrlRequester(mStorageServiceConfigureWidget
->downloadFolder(), StorageServiceManagerGlobalConfig::self()->downloadDirectoryItem());
54 PimCommon::ConfigureImmutableWidgetUtils::saveCheckBox(mCloseWallet
, StorageServiceManagerGlobalConfig::self()->closeWalletItem());
56 StorageServiceManagerGlobalConfig::self()->save();