2018-05-06 12:52:47 +02:00
|
|
|
#pragma once
|
|
|
|
|
2018-07-07 11:41:01 +02:00
|
|
|
#include "common/Singleton.hpp"
|
|
|
|
|
2018-05-06 12:52:47 +02:00
|
|
|
#include <QObject>
|
|
|
|
|
2018-06-28 20:25:37 +02:00
|
|
|
#include "common/SignalVector.hpp"
|
2018-06-26 14:09:39 +02:00
|
|
|
#include "controllers/accounts/Account.hpp"
|
|
|
|
#include "providers/twitch/TwitchAccountManager.hpp"
|
|
|
|
#include "util/SharedPtrElementLess.hpp"
|
2018-05-06 12:52:47 +02:00
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
|
|
|
class AccountModel;
|
|
|
|
|
2018-07-07 11:41:01 +02:00
|
|
|
class AccountController : public Singleton
|
2018-05-06 12:52:47 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
AccountController();
|
|
|
|
|
|
|
|
AccountModel *createModel(QObject *parent);
|
|
|
|
|
2018-07-07 11:41:01 +02:00
|
|
|
virtual void initialize(Application &app) override;
|
2018-05-26 20:25:00 +02:00
|
|
|
|
2018-06-26 17:06:17 +02:00
|
|
|
TwitchAccountManager twitch;
|
2018-05-26 20:25:00 +02:00
|
|
|
|
2018-05-06 12:52:47 +02:00
|
|
|
private:
|
2018-07-06 18:10:21 +02:00
|
|
|
SortedSignalVector<std::shared_ptr<Account>, SharedPtrElementLess<Account>> accounts_;
|
2018-05-06 12:52:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace chatterino
|