45
|
1 /****************************************************************************
|
|
2 **
|
|
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
4 ** Contact: Qt Software Information (qt-info@nokia.com)
|
|
5 **
|
|
6 ** This file is part of the demonstration applications of the Qt Toolkit.
|
|
7 **
|
|
8 ** $QT_BEGIN_LICENSE:LGPL$
|
|
9 ** Commercial Usage
|
|
10 ** Licensees holding valid Qt Commercial licenses may use this file in
|
|
11 ** accordance with the Qt Commercial License Agreement provided with the
|
|
12 ** Software or, alternatively, in accordance with the terms contained in
|
|
13 ** a written agreement between you and Nokia.
|
|
14 **
|
|
15 ** GNU Lesser General Public License Usage
|
|
16 ** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
17 ** General Public License version 2.1 as published by the Free Software
|
|
18 ** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
19 ** packaging of this file. Please review the following information to
|
|
20 ** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
21 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
22 **
|
|
23 ** In addition, as a special exception, Nokia gives you certain
|
|
24 ** additional rights. These rights are described in the Nokia Qt LGPL
|
|
25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
|
|
26 ** package.
|
|
27 **
|
|
28 ** GNU General Public License Usage
|
|
29 ** Alternatively, this file may be used under the terms of the GNU
|
|
30 ** General Public License version 3.0 as published by the Free Software
|
|
31 ** Foundation and appearing in the file LICENSE.GPL included in the
|
|
32 ** packaging of this file. Please review the following information to
|
|
33 ** ensure the GNU General Public License version 3.0 requirements will be
|
|
34 ** met: http://www.gnu.org/copyleft/gpl.html.
|
|
35 **
|
|
36 ** If you are unsure which license is appropriate for your use, please
|
|
37 ** contact the sales department at qt-sales@nokia.com.
|
|
38 ** $QT_END_LICENSE$
|
|
39 **
|
|
40 ****************************************************************************/
|
74
|
41 module browsermainwindow;
|
45
|
42
|
|
43
|
73
|
44 import qt.core.QUrl;
|
|
45 import qt.core.QSettings;
|
|
46 import qt.gui.QMainWindow;
|
|
47 import qt.gui.QIcon;
|
|
48 import qt.gui.QDesktopWidget;
|
|
49 import qt.gui.QFileDialog;
|
|
50 import qt.gui.QPlainTextEdit;
|
|
51 import qt.gui.QPrintDialog;
|
|
52 import qt.gui.QPrintPreviewDialog;
|
|
53 import qt.gui.QPrinter;
|
|
54 import qt.gui.QMenuBar;
|
|
55 import qt.gui.QMessageBox;
|
|
56 import qt.gui.QStatusBar;
|
|
57 import qt.gui.QToolBar;
|
|
58 import qt.gui.QInputDialog;
|
|
59
|
94
|
60 //import qt.core.QDebug;
|
73
|
61
|
|
62 import qt.webkit.QWebFrame;
|
|
63 import qt.webkit.QWebHistory;
|
45
|
64
|
|
65 import autosaver;
|
|
66 import bookmarks;
|
|
67 import browserapplication;
|
|
68 import chasewidget;
|
|
69 import downloadmanager;
|
|
70 import history;
|
|
71 import settings;
|
|
72 import tabwidget;
|
|
73 import toolbarsearch;
|
73
|
74 import webview;
|
45
|
75 import ui_passworddialog;
|
|
76
|
|
77
|
73
|
78 /*!
|
|
79 The MainWindow of the Browser Application.
|
45
|
80
|
73
|
81 Handles the tab widget and all the actions
|
|
82 */
|
|
83 class BrowserMainWindow : public QMainWindow
|
45
|
84 {
|
|
85
|
77
|
86 static const int BrowserMainWindowMagic = 0xba;
|
73
|
87
|
|
88 public:
|
45
|
89
|
94
|
90 this(QWidget parent = null, int flags = 0) //Qt.WindowFlags flags
|
73
|
91 {
|
|
92 super(parent, flags);
|
|
93 m_tabWidget = new TabWidget(this);
|
|
94 m_autoSaver = new AutoSaver(this);
|
|
95 m_historyBack = 0;
|
|
96 m_historyForward = 0;
|
|
97 m_stop = 0;
|
|
98 m_reload = 0;
|
45
|
99
|
94
|
100 setAttribute(Qt_WidgetAttribute.WA_DeleteOnClose, true);
|
73
|
101 statusBar().setSizeGripEnabled(true);
|
|
102 setupMenu();
|
|
103 setupToolBar();
|
|
104
|
|
105 QWidget centralWidget = new QWidget(this);
|
|
106 BookmarksModel boomarksModel = BrowserApplication.bookmarksManager().bookmarksModel();
|
|
107 m_bookmarksToolbar = new BookmarksToolBar(boomarksModel, this);
|
|
108 m_bookmarksToolba.openUrl.connect(&m_tabWidget.loadUrlInCurrentTab);
|
|
109 m_bookmarksToolbar.toggleViewAction.toggled.connect(&thisupdateBookmarksToolbarActionText);
|
45
|
110
|
73
|
111 QVBoxLayout layout = new QVBoxLayout;
|
|
112 layout.setSpacing(0);
|
|
113 layout.setMargin(0);
|
|
114 version(Q_WS_MAC)
|
|
115 {
|
|
116 layout.addWidget(m_bookmarksToolbar);
|
|
117 layout.addWidget(new QWidget); // <- OS X tab widget style bug
|
|
118 } else {
|
|
119 addToolBarBreak();
|
|
120 addToolBar(m_bookmarksToolbar);
|
|
121 }
|
|
122 layout.addWidget(m_tabWidget);
|
|
123 centralWidget.setLayout(layout);
|
|
124 setCentralWidget(centralWidget);
|
45
|
125
|
73
|
126 m_tabWidget.loadPage.connect(&thisloadPage);
|
|
127 m_tabWidget.setCurrentTitle.connect(&this.slotUpdateWindowTitle);
|
|
128 m_tabWidget.showStatusBarMessage.connect(&statusBar().showMessage);
|
|
129 m_tabWidget.linkHovered.connect(&statusBar().showMessage);
|
|
130 m_tabWidget.loadProgress.connect(&this.slotLoadProgress);
|
|
131 m_tabWidget.tabsChanged.connect(&m_autoSaver.changeOccurred);
|
|
132 m_tabWidget.geometryChangeRequested.connect(&this.geometryChangeRequested);
|
|
133 m_tabWidget.printRequested.connect(&this.printRequested);
|
|
134 m_tabWidget.menuBarVisibilityChangeRequested.connect(&menuBar().setVisible);
|
|
135 m_tabWidget.statusBarVisibilityChangeRequested.connect(&statusBar().setVisible);
|
|
136 m_tabWidget.toolBarVisibilityChangeRequested.connect(&m_navigationBar.setVisible);
|
|
137 m_tabWidget.toolBarVisibilityChangeRequested.connect(&m_bookmarksToolbar.setVisible);
|
|
138 version(Q_WS_MAC) {
|
|
139 m_tabWidget.lastTabClosed().connect(&thisclose);
|
|
140 } else {
|
|
141 m_tabWidget.lastTabClosed().connect(&m_tabWidget.newTab);
|
|
142 }
|
45
|
143
|
73
|
144 slotUpdateWindowTitle();
|
|
145 loadDefaultState();
|
|
146 m_tabWidget.newTab();
|
45
|
147
|
73
|
148 int size = m_tabWidget.lineEditStack().sizeHint().height();
|
|
149 m_navigationBar.setIconSize(QSize(size, size));
|
|
150 }
|
45
|
151
|
73
|
152 ~this()
|
|
153 {
|
|
154 m_autoSaver.changeOccurred();
|
|
155 m_autoSaver.saveIfNeccessary();
|
|
156 }
|
45
|
157
|
|
158
|
73
|
159 QSize sizeHint()
|
|
160 {
|
|
161 QRect desktopRect = QApplication.desktop().screenGeometry();
|
|
162 QSize size = desktopRect.size() * qreal(0.9);
|
|
163 return size;
|
|
164 }
|
45
|
165
|
|
166 public:
|
73
|
167
|
77
|
168 static QUrl guessUrlFromString(string string)
|
73
|
169 {
|
77
|
170 string urlStr = string.trimmed();
|
80
|
171 auto test = new QRegExp("^[a-zA-Z]+\\:.*");
|
73
|
172
|
|
173 // Check if it looks like a qualified URL. Try parsing it and see.
|
|
174 bool hasSchema = test.exactMatch(urlStr);
|
|
175 if (hasSchema) {
|
|
176 QUrl url = QUrl.fromEncoded(urlStr.toUtf8(), QUrl.TolerantMode);
|
|
177 if (url.isValid())
|
|
178 return url;
|
|
179 }
|
45
|
180
|
73
|
181 // Might be a file.
|
|
182 if (QFile.exists(urlStr)) {
|
|
183 QFileInfo info(urlStr);
|
|
184 return QUrl.fromLocalFile(info.absoluteFilePath());
|
|
185 }
|
45
|
186
|
73
|
187 // Might be a shorturl - try to detect the schema.
|
|
188 if (!hasSchema) {
|
|
189 int dotIndex = urlStr.indexOf(QLatin1Char('.'));
|
|
190 if (dotIndex != -1) {
|
77
|
191 string prefix = urlStr.left(dotIndex).toLower();
|
80
|
192 QByteArray schema = (prefix == "ftp") ? prefix.toLatin1() : "http";
|
73
|
193 QUrl url =
|
|
194 QUrl.fromEncoded(schema + "://" + urlStr.toUtf8(), QUrl.TolerantMode);
|
|
195 if (url.isValid())
|
|
196 return url;
|
|
197 }
|
|
198 }
|
|
199
|
|
200 // Fall back to QUrl's own tolerant parser.
|
|
201 QUrl url = QUrl.fromEncoded(string.toUtf8(), QUrl.TolerantMode);
|
45
|
202
|
73
|
203 // finally for cases where the user just types in a hostname add http
|
|
204 if (url.scheme().isEmpty())
|
|
205 url = QUrl.fromEncoded("http://" + string.toUtf8(), QUrl.TolerantMode);
|
|
206 return url;
|
|
207 }
|
|
208
|
|
209 TabWidget tabWidget()
|
|
210 {
|
|
211 return m_tabWidget;
|
|
212 }
|
|
213
|
|
214 WebView currentTab()
|
|
215 {
|
|
216 return m_tabWidget.currentWebView();
|
|
217 }
|
45
|
218
|
73
|
219 QByteArray saveState(bool withTabs)
|
|
220 {
|
74
|
221 int version_ = 2;
|
94
|
222 auto data = new QByteArray;
|
74
|
223 auto stream = new QDataStream(&data, QIODevice.WriteOnly);
|
73
|
224
|
77
|
225 stream << cast(int) BrowserMainWindowMagic;
|
|
226 stream << cast(int) version_;
|
45
|
227
|
73
|
228 stream << size();
|
|
229 stream << !m_navigationBar.isHidden();
|
|
230 stream << !m_bookmarksToolbar.isHidden();
|
|
231 stream << !statusBar().isHidden();
|
|
232 if (withTabs)
|
|
233 stream << tabWidget().saveState();
|
|
234 else
|
77
|
235 stream << new QByteArray();
|
73
|
236 return data;
|
|
237 }
|
45
|
238
|
|
239
|
73
|
240 bool restoreState(QByteArray state)
|
|
241 {
|
|
242 int version_ = 2;
|
|
243 QByteArray sd = state;
|
74
|
244 auto stream = new QDataStream(&sd, QIODevice.ReadOnly);
|
73
|
245 if (stream.atEnd())
|
|
246 return false;
|
45
|
247
|
77
|
248 int marker;
|
|
249 int v;
|
73
|
250 stream >> marker;
|
|
251 stream >> v;
|
|
252 if (marker != BrowserMainWindowMagic || v != version_)
|
|
253 return false;
|
45
|
254
|
73
|
255 QSize size;
|
|
256 bool showToolbar;
|
|
257 bool showBookmarksBar;
|
|
258 bool showStatusbar;
|
|
259 QByteArray tabState;
|
45
|
260
|
73
|
261 stream >> size;
|
|
262 stream >> showToolbar;
|
|
263 stream >> showBookmarksBar;
|
|
264 stream >> showStatusbar;
|
|
265 stream >> tabState;
|
45
|
266
|
73
|
267 resize(size);
|
|
268
|
|
269 m_navigationBar.setVisible(showToolbar);
|
|
270 updateToolbarActionText(showToolbar);
|
|
271
|
|
272 m_bookmarksToolbar.setVisible(showBookmarksBar);
|
|
273 updateBookmarksToolbarActionText(showBookmarksBar);
|
45
|
274
|
73
|
275 statusBar().setVisible(showStatusbar);
|
|
276 updateStatusbarActionText(showStatusbar);
|
|
277
|
|
278 if (!tabWidget().restoreState(tabState))
|
|
279 return false;
|
|
280
|
|
281 return true;
|
|
282 }
|
|
283
|
|
284 public:
|
|
285
|
77
|
286 void loadPage(string page)
|
73
|
287 {
|
|
288 QUrl url = guessUrlFromString(page);
|
|
289 loadUrl(url);
|
|
290 }
|
45
|
291
|
73
|
292 void slotHome()
|
|
293 {
|
94
|
294 auto settings = new QSettings;
|
80
|
295 settings.beginGroup("MainWindow");
|
|
296 string home = settings.value("home", "http://qtsoftware.com/").toString();
|
73
|
297 loadPage(home);
|
|
298 }
|
45
|
299
|
|
300 protected:
|
73
|
301
|
74
|
302 void closeEvent(QCloseEvent event)
|
73
|
303 {
|
|
304 if (m_tabWidget.count() > 1) {
|
77
|
305 int ret = QMessageBox.warning(this, null,
|
73
|
306 tr("Are you sure you want to close the window?"
|
|
307 " There are %1 tab open").arg(m_tabWidget.count()),
|
|
308 QMessageBox.Yes | QMessageBox.No,
|
|
309 QMessageBox.No);
|
|
310 if (ret == QMessageBox.No) {
|
|
311 event.ignore();
|
|
312 return;
|
|
313 }
|
|
314 }
|
|
315 event.accept();
|
|
316 deleteLater();
|
|
317 }
|
|
318
|
|
319 private:
|
|
320
|
|
321 void save()
|
|
322 {
|
|
323 BrowserApplication.instance().saveSession();
|
|
324
|
94
|
325 auto settings = new QSettings;
|
80
|
326 settings.beginGroup("BrowserMainWindow");
|
73
|
327 QByteArray data = saveState(false);
|
80
|
328 settings.setValue("defaultState", data);
|
73
|
329 settings.endGroup();
|
|
330 }
|
45
|
331
|
73
|
332 void slotLoadProgress(int progress)
|
|
333 {
|
|
334 if (progress < 100 && progress > 0) {
|
|
335 m_chaseWidget.setAnimated(true);
|
|
336 m_stopReload.triggered.disconnect(&m_reload.trigger);
|
|
337 if (m_stopIcon.isNull())
|
|
338 m_stopIcon = style().standardIcon(QStyle.SP_BrowserStop);
|
|
339 m_stopReload.setIcon(m_stopIcon);
|
|
340 m_stopReload.triggered.connect(&m_stop.trigger);
|
|
341 m_stopReload.setToolTip(tr("Stop loading the current page"));
|
|
342 } else {
|
|
343 m_chaseWidget.setAnimated(false);
|
|
344 m_stopReload.triggered.disconnect(m_stop.trigger);
|
|
345 m_stopReload.setIcon(m_reloadIcon);
|
|
346 m_stopReload.triggered.connect(&m_reload.trigger);
|
|
347 m_stopReload.setToolTip(tr("Reload the current page"));
|
|
348 }
|
|
349 }
|
|
350
|
77
|
351 void slotUpdateStatusbar(string string)
|
73
|
352 {
|
|
353 statusBar().showMessage(string, 2000);
|
|
354 }
|
|
355
|
77
|
356 void slotUpdateWindowTitle(string title = null)
|
73
|
357 {
|
|
358 if (title.isEmpty()) {
|
|
359 setWindowTitle(tr("Qt Demo Browser"));
|
|
360 } else {
|
|
361 version(Q_WS_MAC)
|
|
362 {
|
|
363 setWindowTitle(title);
|
|
364 } else {
|
|
365 setWindowTitle(tr("%1 - Qt Demo Browser", "Page title and Browser name").arg(title));
|
|
366 }
|
|
367 }
|
|
368 }
|
|
369
|
74
|
370 void loadUrl(QUrl url)
|
73
|
371 {
|
|
372 if (!currentTab() || !url.isValid())
|
|
373 return;
|
|
374
|
|
375 m_tabWidget.currentLineEdit().setText(QString.fromUtf8(url.toEncoded()));
|
|
376 m_tabWidget.loadUrlInCurrentTab(url);
|
|
377 }
|
|
378
|
|
379 void slotPreferences()
|
|
380 {
|
|
381 SettingsDialog s = new SettingsDialog(this);
|
|
382 s.show();
|
|
383 }
|
|
384
|
|
385 void slotFileNew()
|
|
386 {
|
|
387 BrowserApplication.instance().newMainWindow();
|
|
388 BrowserMainWindow mw = BrowserApplication.instance().mainWindow();
|
|
389 mw.slotHome();
|
|
390 }
|
45
|
391
|
73
|
392 void slotFileOpen()
|
|
393 {
|
77
|
394 string file = QFileDialog.getOpenFileName(this, tr("Open Web Resource"), null,
|
73
|
395 tr("Web Resources (*.html *.htm *.svg *.png *.gif *.svgz);;All files (*.*)"));
|
|
396
|
|
397 if (file.isEmpty())
|
|
398 return;
|
|
399
|
|
400 loadPage(file);
|
|
401 }
|
|
402
|
74
|
403 void slotFilePrintPreview()
|
73
|
404 {
|
|
405 version(QT_NO_PRINTER)
|
|
406 {
|
|
407 if (!currentTab())
|
|
408 return;
|
|
409 QPrintPreviewDialog dialog = new QPrintPreviewDialog(this);
|
|
410 dialog.paintRequested.connect(¤tTab.print);
|
|
411 dialog.exec();
|
|
412 }
|
|
413 }
|
|
414
|
|
415 void slotFilePrint()
|
|
416 {
|
|
417 if (!currentTab())
|
|
418 return;
|
|
419 printRequested(currentTab().page().mainFrame());
|
|
420 }
|
|
421
|
|
422 void slotPrivateBrowsing()
|
|
423 {
|
|
424 QWebSettings settings = QWebSettings.globalSettings();
|
|
425 bool pb = settings.testAttribute(QWebSettings.PrivateBrowsingEnabled);
|
|
426 if (!pb) {
|
77
|
427 string title = tr("Are you sure you want to turn on private browsing?");
|
|
428 string text = tr("<b>%1</b><br><br>When private browsing in turned on,"
|
73
|
429 " webpages are not added to the history,"
|
74
|
430 " items are automatically removed from the Downloads window,"
|
|
431 " new cookies are not stored, current cookies can't be accessed,"
|
|
432 " site icons wont be stored, session wont be saved, "
|
|
433 " and searches are not addded to the pop-up menu in the Google search box."
|
|
434 " Until you close the window, you can still click the Back and Forward buttons"
|
73
|
435 " to return to the webpages you have opened.").arg(title);
|
45
|
436
|
77
|
437 QMessageBox.StandardButton button = QMessageBox.question(this, null, text,
|
73
|
438 QMessageBox.Ok | QMessageBox.Cancel,
|
|
439 QMessageBox.Ok);
|
|
440 if (button == QMessageBox.Ok) {
|
|
441 settings.setAttribute(QWebSettings.PrivateBrowsingEnabled, true);
|
|
442 }
|
|
443 } else {
|
|
444 settings.setAttribute(QWebSettings.PrivateBrowsingEnabled, false);
|
|
445
|
74
|
446 BrowserMainWindow[] windows = BrowserApplication.instance().mainWindows();
|
77
|
447 for (int i = 0; i < windows.length; ++i) {
|
|
448 BrowserMainWindow window = windows[i];
|
74
|
449 window.m_lastSearch = null; //QString::null
|
94
|
450 window.tabWidget().clearTabs();
|
73
|
451 }
|
|
452 }
|
|
453 }
|
|
454
|
|
455 void slotFileSaveAs()
|
|
456 {
|
|
457 BrowserApplication.downloadManager().download(currentTab().url(), true);
|
|
458 }
|
45
|
459
|
73
|
460 void slotEditFind()
|
|
461 {
|
|
462 if (!currentTab())
|
|
463 return;
|
|
464 bool ok;
|
77
|
465 string search = QInputDialog.getText(this, tr("Find"), tr("Text:"), QLineEdit.Normal, m_lastSearch, &ok);
|
73
|
466 if (ok && !search.isEmpty()) {
|
|
467 m_lastSearch = search;
|
|
468 if (!currentTab().findText(m_lastSearch))
|
|
469 slotUpdateStatusbar(tr("\"%1\" not found.").arg(m_lastSearch));
|
|
470 }
|
|
471 }
|
|
472
|
|
473 void slotEditFindNext()
|
|
474 {
|
|
475 if (!currentTab() && !m_lastSearch.isEmpty())
|
|
476 return;
|
|
477 currentTab().findText(m_lastSearch);
|
|
478 }
|
|
479
|
|
480 void slotEditFindPrevious()
|
|
481 {
|
|
482 if (!currentTab() && !m_lastSearch.isEmpty())
|
|
483 return;
|
|
484 currentTab().findText(m_lastSearch, QWebPage.FindBackward);
|
|
485 }
|
45
|
486
|
74
|
487 void slotShowBookmarksDialog()
|
73
|
488 {
|
|
489 BookmarksDialog dialog = new BookmarksDialog(this);
|
|
490 dialog.openUrl.connect(&m_tabWidget.loadUrlInCurrentTab);
|
|
491 dialog.show();
|
|
492 }
|
45
|
493
|
73
|
494 void slotAddBookmark()
|
|
495 {
|
|
496 WebView webView = currentTab();
|
94
|
497 string url = webView.getUrl().toString();
|
77
|
498 string title = webView.title();
|
73
|
499 AddBookmarkDialog dialog(url, title);
|
|
500 dialog.exec();
|
|
501 }
|
45
|
502
|
73
|
503 void slotViewZoomIn()
|
45
|
504 {
|
73
|
505 if (!currentTab())
|
|
506 return;
|
|
507 currentTab().setZoomFactor(currentTab().zoomFactor() + 0.1);
|
|
508 }
|
45
|
509
|
73
|
510 void BslotViewZoomOut()
|
|
511 {
|
|
512 if (!currentTab())
|
|
513 return;
|
|
514 currentTab().setZoomFactor(currentTab().zoomFactor() - 0.1);
|
|
515 }
|
45
|
516
|
73
|
517 void slotViewResetZoom()
|
|
518 {
|
|
519 if (!currentTab())
|
|
520 return;
|
|
521 currentTab().setZoomFactor(1.0);
|
|
522 }
|
45
|
523
|
73
|
524 void slotViewZoomTextOnly(bool enable)
|
|
525 {
|
|
526 if (!currentTab())
|
|
527 return;
|
|
528 currentTab().page().settings().setAttribute(QWebSettings.ZoomTextOnly, enable);
|
|
529 }
|
45
|
530
|
73
|
531 void slotViewToolbar()
|
|
532 {
|
|
533 if (m_navigationBar.isVisible()) {
|
|
534 updateToolbarActionText(false);
|
|
535 m_navigationBar.close();
|
|
536 } else {
|
|
537 updateToolbarActionText(true);
|
|
538 m_navigationBar.show();
|
|
539 }
|
|
540 m_autoSaver.changeOccurred();
|
|
541 }
|
45
|
542
|
|
543
|
73
|
544 void slotViewBookmarksBar()
|
|
545 {
|
|
546 if (m_bookmarksToolbar.isVisible()) {
|
|
547 updateBookmarksToolbarActionText(false);
|
|
548 m_bookmarksToolbar.close();
|
|
549 } else {
|
|
550 updateBookmarksToolbarActionText(true);
|
|
551 m_bookmarksToolbar.show();
|
|
552 }
|
|
553 m_autoSaver.changeOccurred();
|
|
554 }
|
45
|
555
|
73
|
556 void slotViewStatusbar()
|
|
557 {
|
|
558 if (statusBar().isVisible()) {
|
|
559 updateStatusbarActionText(false);
|
|
560 statusBar().close();
|
|
561 } else {
|
|
562 updateStatusbarActionText(true);
|
|
563 statusBar().show();
|
|
564 }
|
|
565 m_autoSaver.changeOccurred();
|
|
566 }
|
45
|
567
|
73
|
568 void slotViewPageSource()
|
|
569 {
|
|
570 if (!currentTab())
|
|
571 return;
|
45
|
572
|
77
|
573 string markup = currentTab().page().mainFrame().toHtml();
|
73
|
574 QPlainTextEdit view = new QPlainTextEdit(markup);
|
|
575 view.setWindowTitle(tr("Page Source of %1").arg(currentTab().title()));
|
|
576 view.setMinimumWidth(640);
|
|
577 view.setAttribute(Qt.WA_DeleteOnClose);
|
|
578 view.show();
|
|
579 }
|
45
|
580
|
|
581
|
73
|
582 void slotViewFullScreen(bool makeFullScreen)
|
|
583 {
|
|
584 if (makeFullScreen) {
|
|
585 showFullScreen();
|
|
586 } else {
|
|
587 if (isMinimized())
|
|
588 showMinimized();
|
|
589 else if (isMaximized())
|
|
590 showMaximized();
|
|
591 else showNormal();
|
|
592 }
|
|
593 }
|
45
|
594
|
73
|
595 void slotWebSearch()
|
|
596 {
|
|
597 m_toolbarSearch.lineEdit().selectAll();
|
|
598 m_toolbarSearch.lineEdit().setFocus();
|
|
599 }
|
|
600
|
74
|
601 void slotToggleInspector(bool enable)
|
73
|
602 {
|
|
603 QWebSettings.globalSettings().setAttribute(QWebSettings.DeveloperExtrasEnabled, enable);
|
|
604 if (enable) {
|
|
605 int result = QMessageBox.question(this, tr("Web Inspector"),
|
|
606 tr("The web inspector will only work correctly for pages that were loaded after enabling.\n"
|
|
607 "Do you want to reload all pages?"),
|
|
608 QMessageBox.Yes | QMessageBox.No);
|
|
609 if (result == QMessageBox.Yes) {
|
|
610 m_tabWidget.reloadAllTabs();
|
|
611 }
|
|
612 }
|
|
613 }
|
45
|
614
|
73
|
615 void slotAboutApplication()
|
|
616 {
|
|
617 QMessageBox.about(this, tr("About"), tr(
|
|
618 "Version %1"
|
|
619 "<p>This demo demonstrates Qt's "
|
|
620 "webkit facilities in action, providing an example "
|
|
621 "browser for you to experiment with.<p>"
|
|
622 "<p>QtWebKit is based on the Open Source WebKit Project developed at <a href=\"http://webkit.org/\">http://webkit.org/</a>."
|
|
623 ).arg(QCoreApplication.applicationVersion()));
|
|
624 }
|
|
625
|
|
626 void slotDownloadManager()
|
|
627 {
|
|
628 BrowserApplication.downloadManager().show();
|
|
629 }
|
45
|
630
|
74
|
631 void slotSelectLineEdit()
|
73
|
632 {
|
|
633 m_tabWidget.currentLineEdit().selectAll();
|
|
634 m_tabWidget.currentLineEdit().setFocus();
|
|
635 }
|
|
636
|
74
|
637 void slotAboutToShowBackMenu()
|
73
|
638 {
|
|
639 m_historyBackMenu.clear();
|
|
640 if (!currentTab())
|
|
641 return;
|
|
642 QWebHistory history = currentTab().history();
|
|
643 int historyCount = history.count();
|
|
644 for (int i = history.backItems(historyCount).count() - 1; i >= 0; --i) {
|
77
|
645 QWebHistoryItem item = history.backItems(history.count())[i];
|
73
|
646 QAction action = new QAction(this);
|
|
647 action.setData(-1*(historyCount-i-1));
|
|
648 QIcon icon = BrowserApplication.instance().icon(item.url());
|
|
649 action.setIcon(icon);
|
|
650 action.setText(item.title());
|
|
651 m_historyBackMenu.addAction(action);
|
|
652 }
|
|
653 }
|
45
|
654
|
74
|
655 void slotAboutToShowForwardMenu()
|
73
|
656 {
|
|
657 m_historyForwardMenu.clear();
|
|
658 if (!currentTab())
|
|
659 return;
|
|
660 QWebHistory history = currentTab().history();
|
|
661 int historyCount = history.count();
|
|
662 for (int i = 0; i < history.forwardItems(history.count()).count(); ++i) {
|
77
|
663 QWebHistoryItem item = history.forwardItems(historyCount)[i];
|
73
|
664 QAction action = new QAction(this);
|
|
665 action.setData(historyCount-i);
|
|
666 QIcon icon = BrowserApplication.instance().icon(item.url());
|
|
667 action.setIcon(icon);
|
|
668 action.setText(item.title());
|
|
669 m_historyForwardMenu.addAction(action);
|
|
670 }
|
|
671 }
|
45
|
672
|
73
|
673 void slotAboutToShowWindowMenu()
|
|
674 {
|
|
675 m_windowMenu.clear();
|
|
676 m_windowMenu.addAction(m_tabWidget.nextTabAction());
|
|
677 m_windowMenu.addAction(m_tabWidget.previousTabAction());
|
|
678 m_windowMenu.addSeparator();
|
|
679 m_windowMenu.addAction(tr("Downloads"), this, SLOT(slotDownloadManager()), QKeySequence(tr("Alt+Ctrl+L", "Download Manager")));
|
45
|
680
|
73
|
681 m_windowMenu.addSeparator();
|
74
|
682 BrowserMainWindow[] windows = BrowserApplication.instance().mainWindows();
|
77
|
683 for (int i = 0; i < windows.length; ++i) {
|
|
684 BrowserMainWindow window = windows[i];
|
73
|
685 QAction action = m_windowMenu.addAction(window.windowTitle(), this, SLOT(slotShowWindow()));
|
|
686 action.setData(i);
|
|
687 action.setCheckable(true);
|
|
688 if (window == this)
|
|
689 action.setChecked(true);
|
|
690 }
|
|
691 }
|
45
|
692
|
73
|
693 void slotOpenActionUrl(QAction action)
|
|
694 {
|
|
695 int offset = action.data().toInt();
|
|
696 QWebHistory history = currentTab().history();
|
|
697 if (offset < 0)
|
|
698 history.goToItem(history.backItems(-1*offset).first()); // back
|
|
699 else if (offset > 0)
|
|
700 history.goToItem(history.forwardItems(history.count() - offset + 1).back()); // forward
|
|
701 }
|
|
702
|
|
703 void slotShowWindow()
|
|
704 {
|
77
|
705 if (QAction action = cast(QAction) signalSender()) {
|
73
|
706 QVariant v = action.data();
|
74
|
707 if (v.canConvert!(int)()) {
|
|
708 int offset = cast(int) v;
|
|
709 BrowserMainWindow[] windows = BrowserApplication.instance().mainWindows();
|
77
|
710 windows[offset].activateWindow();
|
|
711 windows[offset].currentTab().setFocus();
|
73
|
712 }
|
|
713 }
|
|
714 }
|
45
|
715
|
73
|
716 void slotSwapFocus()
|
|
717 {
|
|
718 if (currentTab().hasFocus())
|
|
719 m_tabWidget.currentLineEdit().setFocus();
|
|
720 else
|
|
721 currentTab().setFocus();
|
|
722 }
|
45
|
723
|
73
|
724 void printRequested(QWebFrame frame)
|
45
|
725 {
|
73
|
726 version(QT_NO_PRINTER)
|
|
727 {
|
|
728 QPrinter printer;
|
|
729 QPrintDialog dialog = new QPrintDialog(&printer, this);
|
|
730 dialog.setWindowTitle(tr("Print Document"));
|
|
731 if (dialog.exec() != QDialog.Accepted)
|
|
732 return;
|
|
733 frame.print(&printer);
|
|
734 }
|
45
|
735 }
|
|
736
|
74
|
737 void geometryChangeRequested(QRect geometry)
|
73
|
738 {
|
|
739 setGeometry(geometry);
|
|
740 }
|
45
|
741
|
73
|
742 void updateToolbarActionText(bool visible)
|
|
743 {
|
|
744 m_viewToolbar.setText(!visible ? tr("Show Toolbar") : tr("Hide Toolbar"));
|
|
745 }
|
45
|
746
|
73
|
747 void updateBookmarksToolbarActionText(bool visible)
|
|
748 {
|
|
749 m_viewBookmarkBar.setText(!visible ? tr("Show Bookmarks bar") : tr("Hide Bookmarks bar"));
|
|
750 }
|
45
|
751
|
|
752 private:
|
|
753
|
73
|
754 void loadDefaultState()
|
|
755 {
|
|
756 QSettings settings;
|
80
|
757 settings.beginGroup("BrowserMainWindow");
|
|
758 QByteArray data = settings.value("defaultState").toByteArray();
|
73
|
759 restoreState(data);
|
|
760 settings.endGroup();
|
|
761 }
|
45
|
762
|
74
|
763 void setupMenu()
|
73
|
764 {
|
|
765 new QShortcut(QKeySequence(Qt.Key_F6), this, SLOT(slotSwapFocus()));
|
45
|
766
|
73
|
767 // File
|
|
768 QMenu fileMenu = menuBar().addMenu(tr("&File"));
|
45
|
769
|
73
|
770 fileMenu.addAction(tr("&New Window"), this, SLOT(slotFileNew()), QKeySequence.New);
|
|
771 fileMenu.addAction(m_tabWidget.newTabAction());
|
|
772 fileMenu.addAction(tr("&Open File..."), this, SLOT(slotFileOpen()), QKeySequence.Open);
|
|
773 fileMenu.addAction(tr("Open &Location..."), this, SLOT(slotSelectLineEdit()), QKeySequence(Qt.ControlModifier + Qt.Key_L));
|
|
774 fileMenu.addSeparator();
|
|
775 fileMenu.addAction(m_tabWidget.closeTabAction());
|
|
776 fileMenu.addSeparator();
|
|
777 fileMenu.addAction(tr("&Save As..."), this, SLOT(slotFileSaveAs()), QKeySequence(QKeySequence.Save));
|
|
778 fileMenu.addSeparator();
|
|
779 BookmarksManager bookmarksManager = BrowserApplication.bookmarksManager();
|
|
780 fileMenu.addAction(tr("&Import Bookmarks..."), bookmarksManager, SLOT(importBookmarks()));
|
|
781 fileMenu.addAction(tr("&Export Bookmarks..."), bookmarksManager, SLOT(exportBookmarks()));
|
|
782 fileMenu.addSeparator();
|
|
783 fileMenu.addAction(tr("P&rint Preview..."), this, SLOT(slotFilePrintPreview()));
|
|
784 fileMenu.addAction(tr("&Print..."), this, SLOT(slotFilePrint()), QKeySequence.Print);
|
|
785 fileMenu.addSeparator();
|
|
786 QAction action = fileMenu.addAction(tr("Private &Browsing..."), this, SLOT(slotPrivateBrowsing()));
|
|
787 action.setCheckable(true);
|
|
788 fileMenu.addSeparator();
|
45
|
789
|
73
|
790 version(Q_WS_MAC) {
|
|
791 fileMenu.addAction(tr("&Quit"), BrowserApplication.instance(), SLOT(quitBrowser()), QKeySequence(Qt.CTRL | Qt.Key_Q));
|
|
792 } else {
|
|
793 fileMenu.addAction(tr("&Quit"), this, SLOT(close()), QKeySequence(Qt.CTRL | Qt.Key_Q));
|
|
794 }
|
45
|
795
|
73
|
796 // Edit
|
|
797 QMenu editMenu = menuBar().addMenu(tr("&Edit"));
|
|
798 QAction m_undo = editMenu.addAction(tr("&Undo"));
|
|
799 m_undo.setShortcuts(QKeySequence.Undo);
|
|
800 m_tabWidget.addWebAction(m_undo, QWebPage.Undo);
|
|
801 QAction m_redo = editMenu.addAction(tr("&Redo"));
|
|
802 m_redo.setShortcuts(QKeySequence.Redo);
|
|
803 m_tabWidget.addWebAction(m_redo, QWebPage.Redo);
|
|
804 editMenu.addSeparator();
|
|
805 QAction m_cut = editMenu.addAction(tr("Cu&t"));
|
|
806 m_cut.setShortcuts(QKeySequence.Cut);
|
|
807 m_tabWidget.addWebAction(m_cut, QWebPage.Cut);
|
|
808 QAction m_copy = editMenu.addAction(tr("&Copy"));
|
|
809 m_copy.setShortcuts(QKeySequence.Copy);
|
|
810 m_tabWidget.addWebAction(m_copy, QWebPage.Copy);
|
|
811 QAction m_paste = editMenu.addAction(tr("&Paste"));
|
|
812 m_paste.setShortcuts(QKeySequence.Paste);
|
|
813 m_tabWidget.addWebAction(m_paste, QWebPage.Paste);
|
|
814 editMenu.addSeparator();
|
45
|
815
|
73
|
816 QAction m_find = editMenu.addAction(tr("&Find"));
|
|
817 m_find.setShortcuts(QKeySequence.Find);
|
|
818 m_find.triggered().connect(&this.slotEditFind);
|
|
819 new QShortcut(QKeySequence(Qt.Key_Slash), this, SLOT(slotEditFind()));
|
45
|
820
|
73
|
821 QAction m_findNext = editMenu.addAction(tr("&Find Next"));
|
|
822 m_findNext.setShortcuts(QKeySequence.FindNext);
|
|
823 m_findNext.triggered().connect(&this.slotEditFindNext);
|
45
|
824
|
73
|
825 QAction m_findPrevious = editMenu.addAction(tr("&Find Previous"));
|
|
826 m_findPrevious.setShortcuts(QKeySequence.FindPrevious);
|
|
827 m_findPrevious.triggered().connect(&this.slotEditFindPrevious);
|
45
|
828
|
73
|
829 editMenu.addSeparator();
|
|
830 editMenu.addAction(tr("&Preferences"), this, SLOT(slotPreferences()), tr("Ctrl+,"));
|
|
831
|
|
832 // View
|
|
833 QMenu viewMenu = menuBar().addMenu(tr("&View"));
|
45
|
834
|
73
|
835 m_viewBookmarkBar = new QAction(this);
|
|
836 updateBookmarksToolbarActionText(true);
|
|
837 m_viewBookmarkBar.setShortcut(tr("Shift+Ctrl+B"));
|
|
838 m_viewBookmarkBar.triggered().connect(&this.slotViewBookmarksBar);
|
|
839 viewMenu.addAction(m_viewBookmarkBar);
|
45
|
840
|
73
|
841 m_viewToolbar = new QAction(this);
|
|
842 updateToolbarActionText(true);
|
|
843 m_viewToolbar.setShortcut(tr("Ctrl+|"));
|
|
844 m_viewToolbar.triggered().connect(&this.slotViewToolbar);
|
|
845 viewMenu.addAction(m_viewToolbar);
|
45
|
846
|
73
|
847 m_viewStatusbar = new QAction(this);
|
|
848 updateStatusbarActionText(true);
|
|
849 m_viewStatusbar.setShortcut(tr("Ctrl+/"));
|
|
850 m_viewStatusbar.triggered().connect(&this.slotViewStatusbar);
|
|
851 viewMenu.addAction(m_viewStatusbar);
|
45
|
852
|
73
|
853 viewMenu.addSeparator();
|
45
|
854
|
73
|
855 m_stop = viewMenu.addAction(tr("&Stop"));
|
74
|
856 QKeySequence[] shortcuts;
|
73
|
857 shortcuts.append(QKeySequence(Qt.CTRL | Qt.Key_Period));
|
|
858 shortcuts.append(Qt.Key_Escape);
|
|
859 m_stop.setShortcuts(shortcuts);
|
|
860 m_tabWidget.addWebAction(m_stop, QWebPage.Stop);
|
45
|
861
|
73
|
862 m_reload = viewMenu.addAction(tr("Reload Page"));
|
|
863 m_reload.setShortcuts(QKeySequence.Refresh);
|
|
864 m_tabWidget.addWebAction(m_reload, QWebPage.Reload);
|
45
|
865
|
73
|
866 viewMenu.addAction(tr("Zoom &In"), this, SLOT(slotViewZoomIn()), QKeySequence(Qt.CTRL | Qt.Key_Plus));
|
|
867 viewMenu.addAction(tr("Zoom &Out"), this, SLOT(slotViewZoomOut()), QKeySequence(Qt.CTRL | Qt.Key_Minus));
|
|
868 viewMenu.addAction(tr("Reset &Zoom"), this, SLOT(slotViewResetZoom()), QKeySequence(Qt.CTRL | Qt.Key_0));
|
|
869 QAction zoomTextOnlyAction = viewMenu.addAction(tr("Zoom &Text Only"));
|
|
870 zoomTextOnlyAction.toggled().connect(&this.slotViewZoomTextOnly);
|
|
871 zoomTextOnlyAction.setCheckable(true);
|
|
872 zoomTextOnlyAction.setChecked(false);
|
|
873
|
|
874 viewMenu.addSeparator();
|
|
875 viewMenu.addAction(tr("Page S&ource"), this, SLOT(slotViewPageSource()), tr("Ctrl+Alt+U"));
|
74
|
876 QAction a = viewMenu.addAction(tr("&Full Screen"), this, SLOT(slotViewFullScreen), Qt.Key_F11);
|
73
|
877 a.setCheckable(true);
|
45
|
878
|
73
|
879 // History
|
|
880 HistoryMenu historyMenu = new HistoryMenu(this);
|
|
881 historyMenu.openUrl.connect(&m_tabWidget.loadUrlInCurrentTab);
|
|
882 historyMenu.hovered.connect(&this.slotUpdateStatusbar);
|
|
883 historyMenu.setTitle(tr("Hi&story"));
|
|
884 menuBar().addMenu(historyMenu);
|
74
|
885 QAction[] historyActions;
|
45
|
886
|
73
|
887 m_historyBack = new QAction(tr("Back"), this);
|
|
888 m_tabWidget.addWebAction(m_historyBack, QWebPage.Back);
|
|
889 m_historyBack.setShortcuts(QKeySequence.Back);
|
|
890 m_historyBack.setIconVisibleInMenu(false);
|
45
|
891
|
73
|
892 m_historyForward = new QAction(tr("Forward"), this);
|
|
893 m_tabWidget.addWebAction(m_historyForward, QWebPage.Forward);
|
|
894 m_historyForward.setShortcuts(QKeySequence.Forward);
|
|
895 m_historyForward.setIconVisibleInMenu(false);
|
45
|
896
|
73
|
897 QAction m_historyHome = new QAction(tr("Home"), this);
|
|
898 m_historyHome.triggered().connect(&this.slotHome);
|
|
899 m_historyHome.setShortcut(QKeySequence(Qt.CTRL | Qt.SHIFT | Qt.Key_H));
|
45
|
900
|
73
|
901 m_restoreLastSession = new QAction(tr("Restore Last Session"), this);
|
|
902 m_restoreLastSession.triggered().connect(BrowserApplication.instance().restoreLastSession);
|
|
903 m_restoreLastSession.setEnabled(BrowserApplication.instance().canRestoreSession());
|
|
904
|
|
905 historyActions.append(m_historyBack);
|
|
906 historyActions.append(m_historyForward);
|
|
907 historyActions.append(m_historyHome);
|
|
908 historyActions.append(m_tabWidget.recentlyClosedTabsAction());
|
|
909 historyActions.append(m_restoreLastSession);
|
|
910 historyMenu.setInitialActions(historyActions);
|
45
|
911
|
73
|
912 // Bookmarks
|
|
913 BookmarksMenu bookmarksMenu = new BookmarksMenu(this);
|
|
914 bookmarksMenu.openUrl.connect(&m_tabWidget.loadUrlInCurrentTab);
|
|
915 bookmarksMenu.hovered.connect(&this.slotUpdateStatusbar);
|
|
916 bookmarksMenu.setTitle(tr("&Bookmarks"));
|
|
917 menuBar().addMenu(bookmarksMenu);
|
45
|
918
|
74
|
919 QAction[] bookmarksActions;
|
45
|
920
|
73
|
921 QAction showAllBookmarksAction = new QAction(tr("Show All Bookmarks"), this);
|
|
922 showAllBookmarksAction.triggered().connect(&this.slotShowBookmarksDialog);
|
80
|
923 m_addBookmark = new QAction(new QIcon(":addbookmark.png"), tr("Add Bookmark..."), this);
|
73
|
924 m_addBookmark.setIconVisibleInMenu(false);
|
45
|
925
|
73
|
926 m_addBookmark.triggered().connect(&this.slotAddBookmark);
|
|
927 m_addBookmark.setShortcut(QKeySequence(Qt.CTRL | Qt.Key_D));
|
45
|
928
|
73
|
929 bookmarksActions.append(showAllBookmarksAction);
|
|
930 bookmarksActions.append(m_addBookmark);
|
|
931 bookmarksMenu.setInitialActions(bookmarksActions);
|
45
|
932
|
73
|
933 // Window
|
|
934 m_windowMenu = menuBar().addMenu(tr("&Window"));
|
|
935 m_windowMenu.aboutToShow().connect(&this.slotAboutToShowWindowMenu);
|
|
936 slotAboutToShowWindowMenu();
|
45
|
937
|
73
|
938 QMenu toolsMenu = menuBar().addMenu(tr("&Tools"));
|
|
939 toolsMenu.addAction(tr("Web &Search"), this, SLOT(slotWebSearch()), QKeySequence(tr("Ctrl+K", "Web Search")));
|
|
940 version(Q_CC_MINGW)
|
|
941 {
|
74
|
942 a = toolsMenu.addAction(tr("Enable Web &Inspector"), this, SLOT(slotToggleInspector));
|
73
|
943 a.setCheckable(true);
|
|
944 }
|
45
|
945
|
73
|
946 QMenu helpMenu = menuBar().addMenu(tr("&Help"));
|
|
947 helpMenu.addAction(tr("About &Qt"), qApp, SLOT(aboutQt()));
|
|
948 helpMenu.addAction(tr("About &Demo Browser"), this, SLOT(slotAboutApplication()));
|
|
949 }
|
|
950
|
|
951 void setupToolBar()
|
|
952 {
|
|
953 setUnifiedTitleAndToolBarOnMac(true);
|
|
954 m_navigationBar = addToolBar(tr("Navigation"));
|
|
955 m_navigationBar.toggleViewAction().toggled.connect(&this.updateToolbarActionText);
|
45
|
956
|
73
|
957 m_historyBack.setIcon(style().standardIcon(QStyle.SP_ArrowBack, 0, this));
|
|
958 m_historyBackMenu = new QMenu(this);
|
|
959 m_historyBack.setMenu(m_historyBackMenu);
|
|
960 m_historyBackMenu.aboutToShow().connect(&this.slotAboutToShowBackMenu);
|
|
961 m_historyBackMenu.triggered.connect(&this.slotOpenActionUrl);
|
|
962 m_navigationBar.addAction(m_historyBack);
|
45
|
963
|
73
|
964 m_historyForward.setIcon(style().standardIcon(QStyle.SP_ArrowForward, 0, this));
|
|
965 m_historyForwardMenu = new QMenu(this);
|
|
966 m_historyForwardMenu.aboutToShow.connect(&this.slotAboutToShowForwardMenu);
|
|
967 m_historyForwardMenu.triggered.connect(&this.slotOpenActionUrl);
|
|
968 m_historyForward.setMenu(m_historyForwardMenu);
|
|
969 m_navigationBar.addAction(m_historyForward);
|
45
|
970
|
73
|
971 m_stopReload = new QAction(this);
|
|
972 m_reloadIcon = style().standardIcon(QStyle.SP_BrowserReload);
|
|
973 m_stopReload.setIcon(m_reloadIcon);
|
45
|
974
|
73
|
975 m_navigationBar.addAction(m_stopReload);
|
45
|
976
|
73
|
977 m_navigationBar.addWidget(m_tabWidget.lineEditStack());
|
45
|
978
|
73
|
979 m_toolbarSearch = new ToolbarSearch(m_navigationBar);
|
|
980 m_navigationBar.addWidget(m_toolbarSearch);
|
|
981 m_toolbarSearch.search.connect(&loadUrl);
|
45
|
982
|
73
|
983 m_chaseWidget = new ChaseWidget(this);
|
|
984 m_navigationBar.addWidget(m_chaseWidget);
|
|
985 }
|
45
|
986
|
73
|
987 void updateStatusbarActionText(bool visible)
|
|
988 {
|
|
989 m_viewStatusbar.setText(!visible ? tr("Show Status Bar") : tr("Hide Status Bar"));
|
|
990 }
|
45
|
991
|
|
992 private:
|
|
993
|
73
|
994 QToolBar m_navigationBar;
|
|
995 ToolbarSearch m_toolbarSearch;
|
|
996 BookmarksToolBar m_bookmarksToolbar;
|
|
997 ChaseWidget m_chaseWidget;
|
|
998 TabWidget m_tabWidget;
|
|
999 AutoSaver m_autoSaver;
|
|
1000
|
|
1001 QAction m_historyBack;
|
|
1002 QMenu m_historyBackMenu;
|
|
1003 QAction m_historyForward;
|
|
1004 QMenu m_historyForwardMenu;
|
|
1005 QMenu m_windowMenu;
|
45
|
1006
|
73
|
1007 QAction m_stop;
|
|
1008 QAction m_reload;
|
|
1009 QAction m_stopReload;
|
|
1010 QAction m_viewToolbar;
|
|
1011 QAction m_viewBookmarkBar;
|
|
1012 QAction m_viewStatusbar;
|
|
1013 QAction m_restoreLastSession;
|
|
1014 QAction m_addBookmark;
|
45
|
1015
|
73
|
1016 QIcon m_reloadIcon;
|
|
1017 QIcon m_stopIcon;
|
45
|
1018
|
77
|
1019 string m_lastSearch;
|
45
|
1020 }
|