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 16:13:05 +05:30
|
|
|
#include "MenuActions.h"
|
2018-02-05 15:32:14 +00:00
|
|
|
|
|
|
|
|
#include <QWidget>
|
2020-07-28 16:13:05 +05:30
|
|
|
#include <QSystemTrayIcon>
|
2018-02-05 15:32:14 +00:00
|
|
|
|
|
|
|
|
class TrayIcon : public QWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2018-07-17 12:10:35 +01:00
|
|
|
TrayIcon();
|
2018-02-05 15:32:14 +00:00
|
|
|
|
2018-07-17 12:10:35 +01:00
|
|
|
void Init();
|
2020-07-28 16:13:05 +05:30
|
|
|
void enablePostStartOptions();
|
2020-07-29 15:31:38 +05:30
|
|
|
void enableViewLogOption();
|
|
|
|
|
void disableViewLogOption();
|
2020-08-25 18:01:27 +05:30
|
|
|
void enableConfigOption();
|
|
|
|
|
void disableConfigOption();
|
2018-07-17 12:10:35 +01:00
|
|
|
void setMenuActions(MenuActions * menuActions);
|
2018-02-05 15:32:14 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void createTrayIcon();
|
|
|
|
|
void createActions();
|
|
|
|
|
|
2020-06-16 14:53:40 +05:30
|
|
|
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 14:23:28 +05:30
|
|
|
QSystemTrayIcon *m_trayIcon = Q_NULLPTR;
|
|
|
|
|
QMenu *m_trayIconMenu = Q_NULLPTR;
|
2018-02-05 15:32:14 +00:00
|
|
|
|
2020-06-23 14:23:28 +05:30
|
|
|
MenuActions *m_menuActions = Q_NULLPTR;
|
2018-02-05 15:32:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // TRAYICON_H
|