mirror-chatterino2/src/controllers/accounts/AccountController.hpp

35 lines
700 B
C++
Raw Normal View History

2018-05-06 12:52:47 +02:00
#pragma once
#include <QObject>
#include "common/SignalVector.hpp"
#include "common/Singleton.hpp"
2018-06-26 14:09:39 +02:00
#include "providers/twitch/TwitchAccountManager.hpp"
#include "util/SharedPtrElementLess.hpp"
2018-05-06 12:52:47 +02:00
namespace chatterino {
class Account;
2018-08-02 14:23:27 +02:00
class Settings;
class Paths;
2018-05-06 12:52:47 +02:00
class AccountModel;
2018-08-02 14:23:27 +02:00
class AccountController final : public Singleton
2018-05-06 12:52:47 +02:00
{
public:
AccountController();
AccountModel *createModel(QObject *parent);
2018-08-02 14:23:27 +02:00
virtual void initialize(Settings &settings, Paths &paths) override;
2018-06-26 17:06:17 +02:00
TwitchAccountManager twitch;
2018-05-06 12:52:47 +02:00
private:
2018-08-06 21:17:03 +02:00
SortedSignalVector<std::shared_ptr<Account>, SharedPtrElementLess<Account>>
accounts_;
2018-05-06 12:52:47 +02:00
};
} // namespace chatterino