File indexing completed on 2024-05-12 16:27:13

0001 /*
0002    SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "configurenotificationdialog.h"
0008 #include "configurenotificationwidget.h"
0009 #include <KLocalizedString>
0010 #include <QDialogButtonBox>
0011 #include <QVBoxLayout>
0012 
0013 ConfigureNotificationDialog::ConfigureNotificationDialog(RocketChatAccount *account, QWidget *parent)
0014     : QDialog(parent)
0015     , mConfigureNoticationWidget(new ConfigureNotificationWidget(account, this))
0016 {
0017     setWindowTitle(i18nc("@title:window", "Configure Notification"));
0018     auto mainLayout = new QVBoxLayout(this);
0019     mainLayout->setObjectName(QStringLiteral("mainLayout"));
0020 
0021     mConfigureNoticationWidget->setObjectName(QStringLiteral("mConfigureNoticationWidget"));
0022     mainLayout->addWidget(mConfigureNoticationWidget);
0023 
0024     auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Close, this);
0025     buttonBox->setObjectName(QStringLiteral("buttonBox"));
0026     connect(buttonBox, &QDialogButtonBox::rejected, this, &ConfigureNotificationDialog::reject);
0027     mainLayout->addWidget(buttonBox);
0028     resize(300, 400);
0029 }
0030 
0031 ConfigureNotificationDialog::~ConfigureNotificationDialog() = default;
0032 
0033 void ConfigureNotificationDialog::setRoom(Room *room)
0034 {
0035     mConfigureNoticationWidget->setRoom(room);
0036 }
0037 
0038 #include "moc_configurenotificationdialog.cpp"