File indexing completed on 2024-05-26 05:05:44

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 "serverinfodialog.h"
0008 #include "serverinfowidget.h"
0009 #include <KLocalizedString>
0010 #include <QDialogButtonBox>
0011 #include <QVBoxLayout>
0012 
0013 ServerInfoDialog::ServerInfoDialog(RocketChatAccount *account, QWidget *parent)
0014     : QDialog(parent)
0015     , mServerInfoWidget(new ServerInfoWidget(account, this))
0016 {
0017     setWindowTitle(i18nc("@title:window", "Server Info"));
0018     auto mainLayout = new QVBoxLayout(this);
0019     mainLayout->setObjectName(QStringLiteral("mainLayout"));
0020 
0021     mServerInfoWidget->setObjectName(QStringLiteral("mServerInfoWidget"));
0022     mainLayout->addWidget(mServerInfoWidget);
0023 
0024     auto button = new QDialogButtonBox(QDialogButtonBox::Close, this);
0025     button->setObjectName(QStringLiteral("button"));
0026     mainLayout->addWidget(button);
0027     connect(button, &QDialogButtonBox::rejected, this, &ServerInfoDialog::close);
0028 }
0029 
0030 ServerInfoDialog::~ServerInfoDialog() = default;
0031 
0032 #include "moc_serverinfodialog.cpp"