File indexing completed on 2024-05-12 04:58:18

0001 /* ============================================================
0002 * Falkon - Qt web browser
0003 * Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
0004 *
0005 * This program is free software: you can redistribute it and/or modify
0006 * it under the terms of the GNU General Public License as published by
0007 * the Free Software Foundation, either version 3 of the License, or
0008 * (at your option) any later version.
0009 *
0010 * This program is distributed in the hope that it will be useful,
0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013 * GNU General Public License for more details.
0014 *
0015 * You should have received a copy of the GNU General Public License
0016 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0017 * ============================================================ */
0018 #ifndef POPUPWINDOW_H
0019 #define POPUPWINDOW_H
0020 
0021 #include <QWidget>
0022 #include <QPointer>
0023 
0024 #include "qzcommon.h"
0025 
0026 class QVBoxLayout;
0027 class QStatusBar;
0028 class QMenuBar;
0029 class QMenu;
0030 
0031 class WebPage;
0032 class PopupWebView;
0033 class PopupStatusBarMessage;
0034 class PopupLocationBar;
0035 class ProgressBar;
0036 class SearchToolBar;
0037 
0038 class FALKON_EXPORT PopupWindow : public QWidget
0039 {
0040     Q_OBJECT
0041 public:
0042     explicit PopupWindow(PopupWebView* view);
0043 
0044     QStatusBar* statusBar();
0045     PopupWebView* webView();
0046 
0047 public Q_SLOTS:
0048     void setWindowGeometry(QRect newRect);
0049 
0050 private Q_SLOTS:
0051     void titleChanged();
0052     void showNotification(QWidget* notif);
0053     void showStatusBarMessage(const QString &message);
0054 
0055     void loadStarted();
0056     void loadProgress(int value);
0057     void loadFinished();
0058 
0059     void searchOnPage();
0060 
0061 private:
0062     void closeEvent(QCloseEvent *event) override;
0063     void resizeEvent(QResizeEvent *event) override;
0064 
0065     PopupWebView* m_view;
0066     PopupLocationBar* m_locationBar;
0067     PopupStatusBarMessage* m_statusBarMessage;
0068     ProgressBar* m_progressBar;
0069 
0070     QVBoxLayout* m_layout;
0071     QStatusBar* m_statusBar;
0072     QMenuBar* m_menuBar;
0073     QMenu* m_menuEdit;
0074     QMenu* m_menuView;
0075     QAction* m_actionReload;
0076     QAction* m_actionStop;
0077     QPointer<SearchToolBar> m_search;
0078     QWidget *m_notificationWidget;
0079 };
0080 
0081 #endif // POPUPWINDOW_H