mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-09-03 20:52:57 -05:00
Major refactoring of the runtime code, Specifically: - Move the bulk of the core code from main() into a new Runtime class. - Break up the mass of code that was main() into a number of relatively simple functions. - Make the Configuration dialog synchronous so the Log dialog can be properly viewed. - Enable/disable menu options at the right time. - Remove support for Qt < 5.0. - Remove the application name constant and hardcode the name to simplify the code. - Improve log messages. - Replace the sdbm hashing with Qt's MD5 hashing.
47 lines
1008 B
C++
47 lines
1008 B
C++
//////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
//
|
|
// Copyright (C) 2013 - 2020, The pgAdmin Development Team
|
|
// This software is released under the PostgreSQL Licence
|
|
//
|
|
// MenuActions.h - Common file for menu actions.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef MENUACTIONS_H
|
|
#define MENUACTIONS_H
|
|
|
|
#include "LogWindow.h"
|
|
#include "ConfigWindow.h"
|
|
|
|
class MenuActions: public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
MenuActions();
|
|
|
|
void setAppServerUrl(QString appServerUrl);
|
|
QString getAppServerUrl() { return m_appServerUrl; }
|
|
|
|
private:
|
|
QString m_appServerUrl = "";
|
|
LogWindow *m_logWindow = Q_NULLPTR;
|
|
ConfigWindow *m_configWindow = Q_NULLPTR;
|
|
|
|
public slots:
|
|
void onConfigDone(bool needRestart);
|
|
|
|
protected slots:
|
|
void onNew();
|
|
void onCopyUrl();
|
|
void onConfig();
|
|
void onLog();
|
|
void onQuit();
|
|
|
|
signals:
|
|
void shutdownSignal(QUrl);
|
|
};
|
|
|
|
#endif // MENUACTIONS_H
|