2017-06-11 09:31:45 +02:00
|
|
|
#include "widgets/accountpopup.hpp"
|
|
|
|
#include "channel.hpp"
|
2017-04-19 15:25:05 +02:00
|
|
|
#include "ui_accountpopupform.h"
|
2017-04-12 17:46:44 +02:00
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
namespace chatterino {
|
|
|
|
namespace widgets {
|
2017-04-12 17:46:44 +02:00
|
|
|
|
2017-05-27 17:45:40 +02:00
|
|
|
AccountPopupWidget::AccountPopupWidget(SharedChannel &channel)
|
2017-04-12 17:46:44 +02:00
|
|
|
: QWidget(nullptr)
|
2017-04-19 15:24:19 +02:00
|
|
|
, _ui(new Ui::AccountPopup)
|
2017-05-27 17:45:40 +02:00
|
|
|
, _channel(channel)
|
2017-04-12 17:46:44 +02:00
|
|
|
{
|
|
|
|
_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();
|
2017-05-27 17:45:40 +02:00
|
|
|
printf("Channel pointer in dialog: %p\n", _channel.get());
|
|
|
|
|
|
|
|
//_channel->sendMessage(QString(".timeout %1 0").arg(_ui->lblUsername->text()));
|
|
|
|
_channel->sendMessage("xD");
|
2017-04-12 17:46:44 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2017-04-19 15:24:19 +02:00
|
|
|
void AccountPopupWidget::setName(const QString &name)
|
2017-04-12 17:46:44 +02:00
|
|
|
{
|
|
|
|
_ui->lblUsername->setText(name);
|
|
|
|
}
|
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
} // namespace widgets
|
|
|
|
} // namespace chatterino
|