File indexing completed on 2024-12-01 04:37:05
0001 /* 0002 SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "teamconverttochannelwidget.h" 0008 #include "teamselectdeletedroomwidget.h" 0009 #include <KLocalizedString> 0010 #include <QLabel> 0011 #include <QVBoxLayout> 0012 0013 TeamConvertToChannelWidget::TeamConvertToChannelWidget(QWidget *parent) 0014 : QWidget(parent) 0015 , mTeamSelectDeletedRoomWidget(new TeamSelectDeletedRoomWidget(this)) 0016 { 0017 auto mainLayout = new QVBoxLayout(this); 0018 mainLayout->setObjectName(QStringLiteral("mainLayout")); 0019 mainLayout->setContentsMargins({}); 0020 0021 auto deleteLabel = new QLabel(i18n("Select the Team’s Channels you would like to delete, the ones you do not select will be moved to the Workspace. Notice " 0022 "that public Channels will be public and visible to everyone."), 0023 this); 0024 deleteLabel->setObjectName(QStringLiteral("deleteLabel")); 0025 deleteLabel->setWordWrap(true); 0026 mainLayout->addWidget(deleteLabel); 0027 0028 mTeamSelectDeletedRoomWidget->setObjectName(QStringLiteral("mTeamSelectDeletedRoomWidget")); 0029 mainLayout->addWidget(mTeamSelectDeletedRoomWidget); 0030 } 0031 0032 TeamConvertToChannelWidget::~TeamConvertToChannelWidget() = default; 0033 0034 QStringList TeamConvertToChannelWidget::roomIdsToDelete() const 0035 { 0036 return mTeamSelectDeletedRoomWidget->roomsId(); 0037 } 0038 0039 void TeamConvertToChannelWidget::setTeamRooms(const QVector<TeamRoom> &rooms) 0040 { 0041 mTeamSelectDeletedRoomWidget->setTeamRooms(rooms); 0042 } 0043 0044 #include "moc_teamconverttochannelwidget.cpp"