2018-02-05 09:32:14 -06:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
|
|
//
|
2019-01-02 04:24:12 -06:00
|
|
|
// Copyright (C) 2013 - 2019, The pgAdmin Development Team
|
2018-02-05 09:32:14 -06:00
|
|
|
// This software is released under the PostgreSQL Licence
|
|
|
|
//
|
|
|
|
// TrayIcon.h - Manages the tray icon
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef TRAYICON_H
|
|
|
|
#define TRAYICON_H
|
|
|
|
|
|
|
|
#include "pgAdmin4.h"
|
|
|
|
|
|
|
|
// QT headers
|
|
|
|
#include <QWidget>
|
2018-07-17 06:10:35 -05:00
|
|
|
#include "MenuActions.h"
|
2018-02-05 09:32:14 -06:00
|
|
|
|
|
|
|
class TrayIcon : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2018-07-17 06:10:35 -05:00
|
|
|
TrayIcon();
|
2018-02-05 09:32:14 -06:00
|
|
|
~TrayIcon();
|
|
|
|
|
2018-07-17 06:10:35 -05:00
|
|
|
void Init();
|
2018-03-15 02:56:24 -05:00
|
|
|
void enableShutdownMenu();
|
2018-07-17 06:10:35 -05:00
|
|
|
void setMenuActions(MenuActions * menuActions);
|
2018-02-05 09:32:14 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
void createTrayIcon();
|
|
|
|
void createActions();
|
|
|
|
|
|
|
|
QAction *m_newAction;
|
2018-07-19 05:32:40 -05:00
|
|
|
QAction *m_copyUrlAction;
|
2018-02-05 09:32:14 -06:00
|
|
|
QAction *m_configAction;
|
|
|
|
QAction *m_logAction;
|
|
|
|
QAction *m_quitAction;
|
|
|
|
|
|
|
|
QSystemTrayIcon *m_trayIcon;
|
|
|
|
QMenu *m_trayIconMenu;
|
|
|
|
|
2018-07-17 06:10:35 -05:00
|
|
|
MenuActions *m_menuActions;
|
2018-02-05 09:32:14 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TRAYICON_H
|