summary refs log tree commit diff
path: root/src/InviteeItem.cpp
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2021-06-10 20:11:49 -0400
committerLoren Burkholder <computersemiexpert@outlook.com>2021-07-20 21:47:22 -0400
commit6c57fa6c5b491e981958e417458edac40e9000b4 (patch)
treedc4dd84f0ff913866eda5a386e5c367bad685086 /src/InviteeItem.cpp
parentQML the room member list (diff)
downloadnheko-6c57fa6c5b491e981958e417458edac40e9000b4.tar.xz
QML the invite dialog
This also adds a property `roomId` to TimelineModel.
Diffstat (limited to 'src/InviteeItem.cpp')
-rw-r--r--src/InviteeItem.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/InviteeItem.cpp b/src/InviteeItem.cpp
deleted file mode 100644

index 27f02560..00000000 --- a/src/InviteeItem.cpp +++ /dev/null
@@ -1,28 +0,0 @@ -// SPDX-FileCopyrightText: 2021 Nheko Contributors -// -// SPDX-License-Identifier: GPL-3.0-or-later - -#include <QHBoxLayout> -#include <QLabel> -#include <QPushButton> - -#include "InviteeItem.h" - -constexpr int SidePadding = 10; - -InviteeItem::InviteeItem(mtx::identifiers::User user, QWidget *parent) - : QWidget{parent} - , user_{QString::fromStdString(user.to_string())} -{ - auto topLayout_ = new QHBoxLayout(this); - topLayout_->setSpacing(0); - topLayout_->setContentsMargins(SidePadding, 0, 3 * SidePadding, 0); - - name_ = new QLabel(user_, this); - removeUserBtn_ = new QPushButton(tr("Remove"), this); - - topLayout_->addWidget(name_); - topLayout_->addWidget(removeUserBtn_, 0, Qt::AlignRight); - - connect(removeUserBtn_, &QPushButton::clicked, this, &InviteeItem::removeItem); -}