Initial Testa commit

This commit is contained in:
David Kaya
2017-02-03 00:49:10 +01:00
parent 26e441c1d7
commit 7ec51f7da7
13 changed files with 378 additions and 0 deletions

19
notification.cpp Normal file
View File

@@ -0,0 +1,19 @@
#include <QSystemTrayIcon>
#include "notification.h"
static QSystemTrayIcon* sharedSystemTrayIcon;
void Notification::show(const std::string& title, const std::string& message)
{
if (sharedSystemTrayIcon == nullptr)
sharedSystemTrayIcon = new QSystemTrayIcon();
sharedSystemTrayIcon->show();
sharedSystemTrayIcon->showMessage(QString::fromStdString(title), QString::fromStdString(message));
}
void Notification::hide()
{
sharedSystemTrayIcon->hide();
delete sharedSystemTrayIcon;
}