2017-01-15 16:38:30 +01:00
|
|
|
#ifndef WINDOWS_H
|
|
|
|
#define WINDOWS_H
|
|
|
|
|
|
|
|
#include "mainwindow.h"
|
|
|
|
|
|
|
|
#include <QMutex>
|
|
|
|
|
|
|
|
class Windows
|
|
|
|
{
|
|
|
|
public:
|
2017-01-16 15:06:12 +01:00
|
|
|
static void layoutVisibleChatWidgets(Channel *channel = NULL);
|
|
|
|
static void repaintVisibleChatWidgets(Channel *channel = NULL);
|
2017-01-15 16:38:30 +01:00
|
|
|
|
|
|
|
static MainWindow &
|
2017-01-18 04:33:30 +01:00
|
|
|
getMainWindow()
|
2017-01-15 16:38:30 +01:00
|
|
|
{
|
2017-01-18 04:33:30 +01:00
|
|
|
windowMutex.lock();
|
|
|
|
if (mainWindow == NULL) {
|
|
|
|
mainWindow = new MainWindow();
|
2017-01-15 16:38:30 +01:00
|
|
|
}
|
2017-01-18 04:33:30 +01:00
|
|
|
windowMutex.unlock();
|
2017-01-15 16:38:30 +01:00
|
|
|
|
2017-01-18 04:33:30 +01:00
|
|
|
return *mainWindow;
|
2017-01-15 16:38:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
Windows()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2017-01-18 04:33:30 +01:00
|
|
|
static QMutex windowMutex;
|
2017-01-15 16:38:30 +01:00
|
|
|
|
2017-01-18 04:33:30 +01:00
|
|
|
static MainWindow *mainWindow;
|
2017-01-15 16:38:30 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // WINDOWS_H
|