mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-10-14 17:11:59 -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.
55 lines
1.2 KiB
C++
55 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
|
|
//
|
|
// FloatingWindow.h - For GNOME 3.26 and above floating window will be used.
|
|
//
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef FLOATINGWINDOW_H
|
|
#define FLOATINGWINDOW_H
|
|
|
|
#include "MenuActions.h"
|
|
|
|
#include <QMainWindow>
|
|
|
|
namespace Ui {
|
|
class FloatingWindow;
|
|
}
|
|
|
|
class FloatingWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit FloatingWindow(QWidget *parent = Q_NULLPTR);
|
|
|
|
bool Init();
|
|
void enablePostStartOptions();
|
|
void setMenuActions(MenuActions * menuActions);
|
|
|
|
private:
|
|
Ui::FloatingWindow *ui;
|
|
|
|
void createMenu();
|
|
void createActions();
|
|
void closeEvent(QCloseEvent * event);
|
|
|
|
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;
|
|
|
|
QMenu *m_floatingWindowMenu = Q_NULLPTR;
|
|
MenuActions *m_menuActions = Q_NULLPTR;
|
|
|
|
signals:
|
|
void shutdownSignal(QUrl);
|
|
};
|
|
|
|
#endif // FLOATINGWINDOW_H
|