2013-06-16 08:17:46 -05:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
|
|
//
|
|
|
|
// Copyright (C) 2013, The pgAdmin Development Team
|
|
|
|
// This software is released under the PostgreSQL Licence
|
|
|
|
//
|
|
|
|
// BrowserWindow.h - Declaration of the main window class
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef BROWSERWINDOW_H
|
|
|
|
#define BROWSERWINDOW_H
|
|
|
|
|
2013-06-21 17:21:11 -05:00
|
|
|
#include "pgAdmin4.h"
|
|
|
|
|
2013-06-16 08:17:46 -05:00
|
|
|
#include <QtGlobal>
|
|
|
|
|
|
|
|
#if QT_VERSION >= 0x050000
|
|
|
|
#include <QtWidgets>
|
|
|
|
#include <QtWebKitWidgets>
|
|
|
|
#else
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QWebView>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
class QAction;
|
|
|
|
class QMenu;
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
class BrowserWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2013-10-04 12:16:31 -05:00
|
|
|
BrowserWindow(QString url);
|
2013-06-16 08:17:46 -05:00
|
|
|
|
2013-10-04 09:08:18 -05:00
|
|
|
protected:
|
|
|
|
void closeEvent(QCloseEvent *event);
|
|
|
|
|
2013-06-21 18:49:40 -05:00
|
|
|
protected slots:
|
|
|
|
void finishLoading(bool);
|
|
|
|
|
2013-06-16 08:17:46 -05:00
|
|
|
private slots:
|
|
|
|
void openUrl();
|
2014-12-16 06:53:09 -06:00
|
|
|
void pythonPath();
|
2013-06-16 08:17:46 -05:00
|
|
|
void about();
|
|
|
|
|
|
|
|
private:
|
2013-10-04 11:12:10 -05:00
|
|
|
QString m_appServerUrl;
|
2013-06-16 08:17:46 -05:00
|
|
|
QWebView *webView;
|
|
|
|
QMenu *fileMenu;
|
|
|
|
QMenu *helpMenu;
|
|
|
|
QAction *openUrlAction;
|
2014-12-16 06:53:09 -06:00
|
|
|
QAction *pythonPathAction;
|
2013-06-16 08:17:46 -05:00
|
|
|
QAction *exitAction;
|
|
|
|
QAction *aboutAction;
|
|
|
|
|
2013-10-04 11:12:10 -05:00
|
|
|
bool m_initialLoad;
|
|
|
|
int m_loadAttempt;
|
2013-06-21 18:49:40 -05:00
|
|
|
|
2013-06-16 08:17:46 -05:00
|
|
|
void createActions();
|
|
|
|
void createMenus();
|
2013-06-21 18:49:40 -05:00
|
|
|
void pause(int seconds = 1);
|
2013-06-16 08:17:46 -05:00
|
|
|
};
|
|
|
|
|
2013-06-21 17:21:11 -05:00
|
|
|
#endif // BROWSERWINDOW_H
|