mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-11 16:06:02 -06:00
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
52 lines
1.2 KiB
C++
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
|