File indexing completed on 2024-12-01 04:36:38
0001 /* 0002 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "removeaccountwidget.h" 0008 #include <KLocalizedString> 0009 #include <QCheckBox> 0010 #include <QLabel> 0011 #include <QVBoxLayout> 0012 0013 RemoveAccountWidget::RemoveAccountWidget(QWidget *parent) 0014 : QWidget{parent} 0015 , mRemoveLogs(new QCheckBox(i18n("Remove logs stored on disk"), this)) 0016 , mInfo(new QLabel(this)) 0017 { 0018 auto mainLayout = new QVBoxLayout(this); 0019 mainLayout->setObjectName(QStringLiteral("mainLayout")); 0020 mainLayout->setContentsMargins({}); 0021 0022 mInfo->setObjectName(QStringLiteral("mInfo")); 0023 mainLayout->addWidget(mInfo); 0024 0025 mRemoveLogs->setObjectName(QStringLiteral("mRemoveLogs")); 0026 mainLayout->addWidget(mRemoveLogs); 0027 } 0028 0029 RemoveAccountWidget::~RemoveAccountWidget() = default; 0030 0031 bool RemoveAccountWidget::removeLogs() const 0032 { 0033 return mRemoveLogs->isChecked(); 0034 } 0035 0036 void RemoveAccountWidget::setAccountName(const QString &accountName) 0037 { 0038 mInfo->setText(i18n("Do you want to remove this account \'%1\'?", accountName)); 0039 } 0040 0041 #include "moc_removeaccountwidget.cpp"