1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Add QupZilla* pointer to PopupWindow class

This commit is contained in:
nowrep 2013-01-13 00:53:48 +01:00
parent 68b03d6db5
commit 71724d6ff4
3 changed files with 8 additions and 4 deletions

View File

@ -112,7 +112,7 @@ void PopupWebPage::checkBehaviour()
PopupWebView* view = new PopupWebView;
view->setWebPage(this);
PopupWindow* popup = new PopupWindow(view, p_QupZilla->statusBar()->isVisible());
PopupWindow* popup = new PopupWindow(view, p_QupZilla);
popup->setWindowGeometry(m_geometry);
popup->setMenuBarVisibility(m_menuBarVisible);
popup->setStatusBarVisibility(m_statusBarVisible);

View File

@ -20,6 +20,7 @@
#include "popupwebpage.h"
#include "popupstatusbarmessage.h"
#include "progressbar.h"
#include "qupzilla.h"
#include "popuplocationbar.h"
#include "globalfunctions.h"
@ -28,8 +29,9 @@
#include <QWebFrame>
#include <QCloseEvent>
PopupWindow::PopupWindow(PopupWebView* view, bool showStatusBar)
PopupWindow::PopupWindow(PopupWebView* view, QupZilla *mainClass)
: QWidget()
, p_QupZilla(mainClass)
, m_view(view)
, m_page(qobject_cast<PopupWebPage*>(view->page()))
{
@ -42,7 +44,7 @@ PopupWindow::PopupWindow(PopupWebView* view, bool showStatusBar)
m_statusBar = new QStatusBar(this);
m_statusBar->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
m_statusBar->setVisible(showStatusBar);
m_statusBar->setVisible(p_QupZilla->statusBar()->isVisible());
m_progressBar = new ProgressBar(m_statusBar);
m_statusBar->addPermanentWidget(m_progressBar);

View File

@ -25,6 +25,7 @@
class QVBoxLayout;
class QStatusBar;
class QupZilla;
class PopupWebView;
class PopupWebPage;
class PopupStatusBarMessage;
@ -35,7 +36,7 @@ class QT_QUPZILLA_EXPORT PopupWindow : public QWidget
{
Q_OBJECT
public:
explicit PopupWindow(PopupWebView* view, bool showStatusBar);
explicit PopupWindow(PopupWebView* view, QupZilla* mainClass);
QStatusBar* statusBar();
PopupWebView* webView();
@ -60,6 +61,7 @@ private slots:
private:
void closeEvent(QCloseEvent* event);
QupZilla* p_QupZilla;
PopupWebView* m_view;
PopupWebPage* m_page;
PopupLocationBar* m_locationBar;