18#ifndef BROWSERWINDOW_H
19#define BROWSERWINDOW_H
66 int virtualDesktop = -1;
68 QVector<WebTab::SavedTab>
tabs;
83 void setStartTab(
WebTab* tab);
84 void setStartPage(
WebPage* page);
88 bool fullScreenNavigationVisible()
const;
89 void showNavigationWithFullScreen();
90 void hideNavigationWithFullScreen();
92 void currentTabChanged();
93 void updateLoadingActions();
95 void addBookmark(
const QUrl &url,
const QString &title);
96 void addDeleteOnCloseWidget(QWidget* widget);
98 void createToolbarsMenu(QMenu* menu);
99 void createSidebarsMenu(QMenu* menu);
100 void createEncodingMenu(QMenu* menu);
102 void removeActions(
const QList<QAction*> &actions);
105 void saveSideBarSettings();
107 int tabCount()
const;
118 QLabel* ipLabel()
const;
119 QMenu* superMenu()
const;
121 QUrl homepageUrl()
const;
123 QAction* action(
const QString &name)
const;
136 void goHomeInNewTab();
141 void reloadBypassCache();
143 void setWindowTitle(
const QString &
t);
145 void showWebInspector();
146 void toggleWebInspector();
147 void showHistoryManager();
149 void toggleShowMenubar();
150 void toggleShowStatusBar();
151 void toggleShowBookmarksToolbar();
152 void toggleShowNavigationToolbar();
153 void toggleTabsOnTop(
bool enable);
155 void toggleFullScreen();
156 void requestHtmlFullScreen(
TabbedWebView *view,
bool enable);
158 void loadActionUrl(QObject* obj =
nullptr);
159 void loadActionUrlInNewTab(QObject* obj =
nullptr);
162 void bookmarkAllTabs();
163 void loadAddress(
const QUrl &url);
164 void showSource(
WebView *view =
nullptr);
176 void changeEncoding();
180 void hideNavigationSlot();
183 bool event(QEvent* event)
override;
184 void resizeEvent(QResizeEvent* event)
override;
185 void keyPressEvent(QKeyEvent* event)
override;
186 void keyReleaseEvent(QKeyEvent* event)
override;
187 void closeEvent(QCloseEvent* event)
override;
191 void updateStartupFocus();
193 QAction *createEncodingAction(
const QString &codecName,
const QString &activeCodecName, QMenu *menu);
194 void createEncodingSubMenu(
const QString &name, QStringList &codecNames, QMenu *menu);
196 QHash<QString, QVariant> saveUiState();
197 void restoreUiState(
const QHash<QString, QVariant> &
state);
205 QVBoxLayout* m_mainLayout;
206 QSplitter* m_mainSplitter;
209 QPointer<SideBar> m_sideBar;
230 bool m_useTabNumberShortcuts;
231 bool m_useSpeedDialNumberShortcuts;
232 bool m_useSingleKeyShortcuts;
235 bool m_menuBarVisible;
236 bool m_statusBarVisible;
237 QPointer<TabbedWebView> m_htmlFullScreenView;
238 QTimer* m_hideNavigationTimer;
240 QList<QPointer<QWidget> > m_deleteOnCloseWidgets;
244 int getCurrentVirtualDesktop()
const;
245 void moveToVirtualDesktop(
int desktopId);
QDataStream & operator>>(QDataStream &stream, BrowserWindow::SavedWindow &window)
QDataStream & operator<<(QDataStream &stream, const BrowserWindow::SavedWindow &window)
QByteArray windowGeometry
QVector< WebTab::SavedTab > tabs
QHash< QString, QVariant > windowUiState