2012-01-21 20:27:45 +01:00
|
|
|
/* ============================================================
|
|
|
|
* QupZilla - WebKit based browser
|
|
|
|
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
* ============================================================ */
|
|
|
|
#ifndef TABBEDWEBVIEW_H
|
|
|
|
#define TABBEDWEBVIEW_H
|
|
|
|
|
2012-02-29 18:33:50 +01:00
|
|
|
#include "qz_namespace.h"
|
2012-01-21 20:27:45 +01:00
|
|
|
#include "webview.h"
|
|
|
|
|
2012-02-29 18:33:50 +01:00
|
|
|
class QLabel;
|
|
|
|
class QHostInfo;
|
|
|
|
|
2012-01-21 20:27:45 +01:00
|
|
|
class QupZilla;
|
|
|
|
class TabWidget;
|
|
|
|
class WebPage;
|
|
|
|
class WebTab;
|
2012-01-24 23:28:18 +01:00
|
|
|
class Menu;
|
2012-02-29 18:33:50 +01:00
|
|
|
|
|
|
|
class QT_QUPZILLA_EXPORT TabbedWebView : public WebView
|
2012-01-21 20:27:45 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit TabbedWebView(QupZilla* mainClass, WebTab* webTab);
|
|
|
|
~TabbedWebView();
|
|
|
|
|
2012-04-03 20:23:15 +02:00
|
|
|
void setWebPage(WebPage* pag);
|
2012-01-21 20:27:45 +01:00
|
|
|
|
|
|
|
WebTab* webTab() const;
|
2012-02-24 21:03:44 +01:00
|
|
|
TabWidget* tabWidget() const;
|
2012-01-21 20:27:45 +01:00
|
|
|
|
|
|
|
QString getIp() const;
|
|
|
|
|
|
|
|
int tabIndex() const;
|
|
|
|
bool hasRss() { return m_hasRss; }
|
|
|
|
|
|
|
|
QWidget* overlayForJsAlert();
|
|
|
|
void disconnectObjects();
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void wantsCloseTab(int);
|
|
|
|
void ipChanged(QString);
|
|
|
|
void rssChanged(bool);
|
|
|
|
void changed();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void titleChanged();
|
|
|
|
|
|
|
|
void stop();
|
|
|
|
void showIcon();
|
|
|
|
|
|
|
|
void slotLoadStarted();
|
2012-06-27 18:29:00 +02:00
|
|
|
void loadProgress(int prog);
|
2012-01-21 20:27:45 +01:00
|
|
|
|
|
|
|
void closeView();
|
2012-03-10 13:57:50 +01:00
|
|
|
void openUrlInNewTab(const QUrl &urla, Qz::NewTabPositionFlag position);
|
2012-02-24 21:03:44 +01:00
|
|
|
void openNewTab();
|
2012-01-21 20:27:45 +01:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void trackMouse(bool state) { m_mouseTrack = state; }
|
|
|
|
void slotLoadFinished();
|
|
|
|
void urlChanged(const QUrl &url);
|
|
|
|
void linkHovered(const QString &link, const QString &title, const QString &content);
|
|
|
|
void getFocus(const QUrl &urla);
|
|
|
|
void setIp(const QHostInfo &info);
|
|
|
|
void checkRss();
|
|
|
|
void slotIconChanged();
|
|
|
|
|
2012-01-22 11:49:58 +01:00
|
|
|
void inspectElement();
|
2012-01-21 20:27:45 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
void contextMenuEvent(QContextMenuEvent* event);
|
|
|
|
void mouseMoveEvent(QMouseEvent* event);
|
|
|
|
|
|
|
|
bool isCurrent();
|
|
|
|
|
|
|
|
QupZilla* p_QupZilla;
|
|
|
|
TabWidget* m_tabWidget;
|
|
|
|
|
|
|
|
QString m_currentIp;
|
|
|
|
|
|
|
|
WebTab* m_webTab;
|
2012-01-24 23:28:18 +01:00
|
|
|
Menu* m_menu;
|
2012-01-21 20:27:45 +01:00
|
|
|
|
|
|
|
bool m_mouseTrack;
|
|
|
|
bool m_navigationVisible;
|
|
|
|
|
|
|
|
bool m_hasRss;
|
|
|
|
bool m_rssChecked;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TABBEDWEBVIEW_H
|