mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
49 lines
1 KiB
C++
49 lines
1 KiB
C++
#pragma once
|
|
|
|
#include "widgets/window.hpp"
|
|
|
|
namespace chatterino {
|
|
namespace singletons {
|
|
|
|
class ThemeManager;
|
|
|
|
class WindowManager
|
|
{
|
|
explicit WindowManager(ThemeManager &_themeManager);
|
|
|
|
public:
|
|
static WindowManager &getInstance();
|
|
|
|
void showSettingsDialog();
|
|
void showAccountSelectPopup(QPoint point);
|
|
|
|
void initMainWindow();
|
|
void layoutVisibleChatWidgets(Channel *channel = nullptr);
|
|
void repaintVisibleChatWidgets(Channel *channel = nullptr);
|
|
void repaintGifEmotes();
|
|
// void updateAll();
|
|
|
|
widgets::Window &getMainWindow();
|
|
widgets::Window &getSelectedWindow();
|
|
widgets::Window &createWindow();
|
|
|
|
int windowCount();
|
|
widgets::Window *windowAt(int index);
|
|
|
|
void save();
|
|
|
|
boost::signals2::signal<void()> repaintGifs;
|
|
boost::signals2::signal<void(Channel *)> layout;
|
|
|
|
private:
|
|
ThemeManager &themeManager;
|
|
|
|
std::vector<widgets::Window *> windows;
|
|
|
|
widgets::Window *mainWindow = nullptr;
|
|
widgets::Window *selectedWindow = nullptr;
|
|
};
|
|
|
|
} // namespace singletons
|
|
} // namespace chatterino
|