2018-02-05 15:32:14 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
|
|
//
|
2020-01-02 14:43:50 +00:00
|
|
|
// Copyright (C) 2013 - 2020, The pgAdmin Development Team
|
2018-02-05 15:32:14 +00:00
|
|
|
// This software is released under the PostgreSQL Licence
|
|
|
|
//
|
|
|
|
// TrayIcon.h - Manages the tray icon
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef TRAYICON_H
|
|
|
|
#define TRAYICON_H
|
|
|
|
|
2020-07-28 10:43:05 +00:00
|
|
|
#include "MenuActions.h"
|
2018-02-05 15:32:14 +00:00
|
|
|
|
|
|
|
#include <QWidget>
|
2020-07-28 10:43:05 +00:00
|
|
|
#include <QSystemTrayIcon>
|
2018-02-05 15:32:14 +00:00
|
|
|
|
|
|
|
class TrayIcon : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2018-07-17 11:10:35 +00:00
|
|
|
TrayIcon();
|
2018-02-05 15:32:14 +00:00
|
|
|
|
2018-07-17 11:10:35 +00:00
|
|
|
void Init();
|
2020-07-28 10:43:05 +00:00
|
|
|
void enablePostStartOptions();
|
2020-07-29 10:01:38 +00:00
|
|
|
void enableViewLogOption();
|
|
|
|
void disableViewLogOption();
|
2020-08-25 12:31:27 +00:00
|
|
|
void enableConfigOption();
|
|
|
|
void disableConfigOption();
|
2018-07-17 11:10:35 +00:00
|
|
|
void setMenuActions(MenuActions * menuActions);
|
2018-02-05 15:32:14 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void createTrayIcon();
|
|
|
|
void createActions();
|
|
|
|
|
2020-06-16 09:23:40 +00:00
|
|
|
QAction *m_newAction = Q_NULLPTR;
|
|
|
|
QAction *m_copyUrlAction = Q_NULLPTR;
|
|
|
|
QAction *m_configAction = Q_NULLPTR;
|
|
|
|
QAction *m_logAction = Q_NULLPTR;
|
|
|
|
QAction *m_quitAction = Q_NULLPTR;
|
2018-02-05 15:32:14 +00:00
|
|
|
|
2020-06-23 08:53:28 +00:00
|
|
|
QSystemTrayIcon *m_trayIcon = Q_NULLPTR;
|
|
|
|
QMenu *m_trayIconMenu = Q_NULLPTR;
|
2018-02-05 15:32:14 +00:00
|
|
|
|
2020-06-23 08:53:28 +00:00
|
|
|
MenuActions *m_menuActions = Q_NULLPTR;
|
2018-02-05 15:32:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TRAYICON_H
|