File indexing completed on 2024-12-08 04:34:11
0001 /* 0002 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "conferencecalldialog.h" 0008 #include "rocketchataccount.h" 0009 #include <KLocalizedString> 0010 #include <QDialogButtonBox> 0011 #include <QPushButton> 0012 #include <QVBoxLayout> 0013 0014 ConferenceCallDialog::ConferenceCallDialog(RocketChatAccount *account, QWidget *parent) 0015 : QDialog(parent) 0016 , mConferenceCallWidget(new ConferenceCallWidget(account, this)) 0017 { 0018 setWindowTitle(i18nc("@title:window", "Start a Call")); 0019 auto mainLayout = new QVBoxLayout(this); 0020 mainLayout->setObjectName(QStringLiteral("mainLayout")); 0021 0022 mConferenceCallWidget->setObjectName(QStringLiteral("mConferenceCallWidget")); 0023 mainLayout->addWidget(mConferenceCallWidget); 0024 0025 auto button = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this); 0026 button->setObjectName(QStringLiteral("button")); 0027 button->button(QDialogButtonBox::Ok)->setText(i18n("Start")); 0028 mainLayout->addWidget(button); 0029 connect(button, &QDialogButtonBox::rejected, this, &ConferenceCallDialog::reject); 0030 connect(button, &QDialogButtonBox::accepted, this, &ConferenceCallDialog::accept); 0031 } 0032 0033 ConferenceCallDialog::~ConferenceCallDialog() = default; 0034 0035 ConferenceCallWidget::ConferenceCallStart ConferenceCallDialog::conferenceCallInfo() const 0036 { 0037 return mConferenceCallWidget->conferenceCallInfo(); 0038 } 0039 0040 void ConferenceCallDialog::setConferenceCallInfo(const ConferenceCallWidget::ConferenceCallStart &infoCallStart) 0041 { 0042 mConferenceCallWidget->setConferenceCallInfo(infoCallStart); 0043 } 0044 0045 #include "moc_conferencecalldialog.cpp"