added select channel dialog

This commit is contained in:
fourtf
2018-04-18 09:12:29 +02:00
parent 043823120f
commit 3446a623f5
29 changed files with 1295 additions and 69 deletions
+14 -3
View File
@@ -18,8 +18,9 @@ using namespace chatterino::messages;
namespace chatterino {
Channel::Channel(const QString &_name)
: name(_name)
Channel::Channel(const QString &_name, Type _type)
: type(_type)
, name(_name)
, completionModel(this->name)
{
this->clearCompletionModelTimer = new QTimer;
@@ -37,6 +38,11 @@ Channel::~Channel()
this->clearCompletionModelTimer->deleteLater();
}
Channel::Type Channel::getType() const
{
return this->type;
}
bool Channel::isEmpty() const
{
return this->name.isEmpty();
@@ -99,9 +105,14 @@ void Channel::sendMessage(const QString &message)
{
}
bool Channel::isMod() const
{
return false;
}
std::shared_ptr<Channel> Channel::getEmpty()
{
static std::shared_ptr<Channel> channel(new Channel(""));
static std::shared_ptr<Channel> channel(new Channel("", None));
return channel;
}