2015-06-16 13:04:34 +00:00
|
|
|
#include "windowtitleupdate.h"
|
|
|
|
|
|
|
|
WindowTitleUpdate *WindowTitleUpdate::m_instance = NULL;
|
|
|
|
|
|
|
|
WindowTitleUpdate::WindowTitleUpdate(QObject *parent) : QObject(parent)
|
|
|
|
{
|
2015-06-17 08:11:32 +00:00
|
|
|
Q_ASSERT_X(m_instance == NULL, "WindowTitleUpdate", "WindowTitleUpdate recreated!");
|
2015-06-16 13:04:34 +00:00
|
|
|
|
|
|
|
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();
|
2015-11-07 17:53:17 +00:00
|
|
|
if (wt)
|
|
|
|
wt->emitSignal();
|
2015-06-16 13:04:34 +00:00
|
|
|
}
|