mirror-chatterino2/widgets/accountpopup.cpp
Bur0k b6d0776917 Make runnable again (#40)
* Compile before push DansGame

* Initialize them when they are needed, not on startup. This is THREAD-SAFE since C++11

* Changed user to account
2017-04-19 15:25:05 +02:00

42 lines
909 B
C++

#include "widgets/accountpopup.h"
#include "channel.h"
#include "ui_accountpopupform.h"
#include <QDebug>
namespace chatterino {
namespace widgets {
AccountPopupWidget::AccountPopupWidget(std::shared_ptr<Channel> &&channel)
: QWidget(nullptr)
, _ui(new Ui::AccountPopup)
, _channel(std::move(channel))
{
_ui->setupUi(this);
resize(0, 0);
setWindowFlags(Qt::FramelessWindowHint);
// Close button
connect(_ui->btnClose, &QPushButton::clicked, [=]() {
hide(); //
});
connect(_ui->btnPurge, &QPushButton::clicked, [=]() {
qDebug() << "xD: " << _channel->getName();
/*
_channel->sendMessage(
QString(".timeout %1 0").arg(_ui->lblUsername->text()));
*/
});
}
void AccountPopupWidget::setName(const QString &name)
{
_ui->lblUsername->setText(name);
}
} // namespace widgets
} // namespace chatterino