1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-13 18:42:11 +01:00
falkonOfficial/src/webview/webtab.h
nowrep d1c80b826c [Fix] Fixed crash in QWebInspector when using QtWebKit 2.2
- somehow it is no longer safe to delete QWebInspector ...
2011-12-18 16:57:14 +01:00

62 lines
1.7 KiB
C++

/* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2010-2011 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 WEBTAB_H
#define WEBTAB_H
#include <QWidget>
#include <QLayout>
#include <QWeakPointer>
#include "webview.h"
#include "locationbar.h"
class QupZilla;
class LocationBar;
class WebTab : public QWidget
{
Q_OBJECT
public:
explicit WebTab(QupZilla* mainClass, LocationBar* locationBar);
~WebTab();
WebView* view();
bool isPinned();
void pinTab(int index);
void setPinned(bool state);
void setLocationBar(LocationBar* bar);
LocationBar* locationBar();
bool inspectorVisible();
void setInspectorVisible(bool v);
private slots:
void showNotification(QWidget* notif);
private:
int tabIndex();
QupZilla* p_QupZilla;
QWeakPointer<WebView> m_view;
QVBoxLayout* m_layout;
QWeakPointer<LocationBar> m_locationBar;
bool m_pinned;
bool m_inspectorVisible;
};
#endif // WEBTAB_H