1
/* NitroShare - A simple network file sharing tool.
2
Copyright (C) 2012 Nathan Osman
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program. If not, see <http://www.gnu.org/licenses/>. */
17
#include <QCoreApplication>
20
#include <CSettingsDialog.h>
21
#include <CTrayIcon.h>
23
CTrayIcon::CTrayIcon()
24
: QSystemTrayIcon(NULL), m_pc_menu("Send File To")
26
// Initialize the icon
27
setIcon(QIcon(":/icons/light.png"));
34
void CTrayIcon::OnSettings()
36
CSettingsDialog().exec();
39
void CTrayIcon::CreateMenu()
41
QMenu * menu = new QMenu;
43
menu->addMenu(&m_pc_menu);
45
menu->addAction("Settings", this, SLOT(OnSettings()));
46
menu->addAction("About");
48
menu->addAction("Exit", QCoreApplication::instance(), SLOT(quit()));