pgadmin4/runtime/TrayIcon.h
Akshay Joshi 59649ca42c 1) Enable the 'Configure' and 'View log' menu option when the server taking longer than usual time to start.
2) When an error occurs from the backend, the configure window opens and if the user has changed the setting
   of the port, it won't take any effect as we have retrieved the value of the port at the start of the runtime.
3) Added logic to identify the specified fixed port is already in use. Throw the error before starting the pgAdmin server.

Fixes #5751
2020-08-25 18:01:27 +05:30

52 lines
1.2 KiB
C++

//////////////////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
// Copyright (C) 2013 - 2020, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
// TrayIcon.h - Manages the tray icon
//
//////////////////////////////////////////////////////////////////////////
#ifndef TRAYICON_H
#define TRAYICON_H
#include "MenuActions.h"
#include <QWidget>
#include <QSystemTrayIcon>
class TrayIcon : public QWidget
{
Q_OBJECT
public:
TrayIcon();
void Init();
void enablePostStartOptions();
void enableViewLogOption();
void disableViewLogOption();
void enableConfigOption();
void disableConfigOption();
void setMenuActions(MenuActions * menuActions);
private:
void createTrayIcon();
void createActions();
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;
QSystemTrayIcon *m_trayIcon = Q_NULLPTR;
QMenu *m_trayIconMenu = Q_NULLPTR;
MenuActions *m_menuActions = Q_NULLPTR;
};
#endif // TRAYICON_H