429
429
this, SLOT(webViewUrlChanged(const QUrl &)));
430
430
connect(webView->page(), SIGNAL(windowCloseRequested()),
431
431
this, SLOT(windowCloseRequested()));
432
connect(webView->page(), SIGNAL(geometryChangeRequested(const QRect &)),
433
this, SIGNAL(geometryChangeRequested(const QRect &)));
434
432
connect(webView->page(), SIGNAL(printRequested(QWebFrame *)),
435
433
this, SIGNAL(printRequested(QWebFrame *)));
434
connect(webView->page(), SIGNAL(geometryChangeRequested(const QRect &)),
435
this, SLOT(geometryChangeRequestedCheck(const QRect &)));
436
436
connect(webView->page(), SIGNAL(menuBarVisibilityChangeRequested(bool)),
437
this, SIGNAL(menuBarVisibilityChangeRequested(bool)));
437
this, SLOT(menuBarVisibilityChangeRequestedCheck(bool)));
438
438
connect(webView->page(), SIGNAL(statusBarVisibilityChangeRequested(bool)),
439
this, SIGNAL(statusBarVisibilityChangeRequested(bool)));
439
this, SLOT(statusBarVisibilityChangeRequestedCheck(bool)));
440
440
connect(webView->page(), SIGNAL(toolBarVisibilityChangeRequested(bool)),
441
this, SIGNAL(toolBarVisibilityChangeRequested(bool)));
441
this, SLOT(toolBarVisibilityChangeRequestedCheck(bool)));
443
443
WebViewWithSearch *webViewWithSearch = new WebViewWithSearch(webView, this);
444
444
addTab(webViewWithSearch, tr("(Untitled)"));
462
void TabWidget::geometryChangeRequestedCheck(const QRect &geometry)
465
emit geometryChangeRequested(geometry);
468
void TabWidget::menuBarVisibilityChangeRequestedCheck(bool visible)
471
emit menuBarVisibilityChangeRequested(visible);
474
void TabWidget::statusBarVisibilityChangeRequestedCheck(bool visible)
477
emit statusBarVisibilityChangeRequested(visible);
480
void TabWidget::toolBarVisibilityChangeRequestedCheck(bool visible)
483
emit toolBarVisibilityChangeRequested(visible);
462
486
void TabWidget::reloadAllTabs()
464
488
for (int i = 0; i < count(); ++i) {
509
533
if (index < 0 || index >= count())
511
535
WebView *tab = makeNewTab();
512
tab->setUrl(webView(index)->url());
536
tab->loadUrl(webView(index)->url());
515
539
// When index is -1 index chooses the current tab
561
585
QLabel *TabWidget::animationLabel(int index, bool addMovie)
563
#if QT_VERSION >= 0x040500
587
#if QT_VERSION < 0x040500
566
594
QTabBar::ButtonPosition side = m_tabBar->freeSide();
634
662
WebView *webView = qobject_cast<WebView*>(sender());
635
663
int index = webViewIndex(webView);
636
664
if (-1 != index) {
665
QString tabTitle = title;
637
666
if (title.isEmpty())
638
setTabText(index, webView->url().toString());
640
setTabText(index, title);
667
tabTitle = webView->url().toString();
668
tabTitle.replace(QLatin1Char('&'), QLatin1String("&&"));
669
setTabText(index, tabTitle);
642
671
if (currentIndex() == index)
643
672
emit setCurrentTitle(title);