aboutsummaryrefslogtreecommitdiffstats
path: root/windowtitleupdate.cpp
blob: eec324c68f978b691a3a64240c031516454d2a59 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "windowtitleupdate.h"

WindowTitleUpdate *WindowTitleUpdate::m_instance = NULL;

WindowTitleUpdate::WindowTitleUpdate(QObject *parent) : QObject(parent)
{
	Q_ASSERT_X(m_instance == NULL, "WindowTitleUpdate", "WindowTitleUpdate recreated!");

	m_instance = this;
}

WindowTitleUpdate *WindowTitleUpdate::instance()
{
	return m_instance;
}

WindowTitleUpdate::~WindowTitleUpdate()
{
	m_instance = NULL;
}

void WindowTitleUpdate::emitSignal()
{
	emit updateTitle();
}

extern "C" void updateWindowTitle()
{
	WindowTitleUpdate *wt = WindowTitleUpdate::instance();
	wt->emitSignal();
}