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 "removeaccountdialog.h" 0008 #include "removeaccountwidget.h" 0009 #include <KLocalizedString> 0010 #include <QDialogButtonBox> 0011 #include <QVBoxLayout> 0012 0013 RemoveAccountDialog::RemoveAccountDialog(QWidget *parent) 0014 : QDialog(parent) 0015 , mRemoveAccountWidget(new RemoveAccountWidget(this)) 0016 { 0017 setWindowTitle(i18nc("@title:window", "Remove Account")); 0018 auto mainLayout = new QVBoxLayout(this); 0019 mainLayout->setObjectName(QStringLiteral("mainLayout")); 0020 0021 mRemoveAccountWidget->setObjectName(QStringLiteral("mRemoveAccountWidget")); 0022 mainLayout->addWidget(mRemoveAccountWidget); 0023 0024 auto button = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this); 0025 button->setObjectName(QStringLiteral("button")); 0026 mainLayout->addWidget(button); 0027 connect(button, &QDialogButtonBox::rejected, this, &RemoveAccountDialog::reject); 0028 connect(button, &QDialogButtonBox::accepted, this, &RemoveAccountDialog::accept); 0029 } 0030 0031 RemoveAccountDialog::~RemoveAccountDialog() = default; 0032 0033 bool RemoveAccountDialog::removeLogs() const 0034 { 0035 return mRemoveAccountWidget->removeLogs(); 0036 } 0037 0038 void RemoveAccountDialog::setAccountName(const QString &accountName) 0039 { 0040 mRemoveAccountWidget->setAccountName(accountName); 0041 } 0042 0043 #include "moc_removeaccountdialog.cpp"