diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-08-20 02:29:36 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-08-20 02:29:36 +0200 |
commit | bbc47cb8bdaea8fd9855e3e06b7607a7d15f3ef2 (patch) | |
tree | dbcb9dc6e2858b9e6b59f3a11098e38b3092ff75 /gui/browserdialog.cpp | |
parent | c92ad7dcf86f2e5e71d71a68e24e79fbdeceb56d (diff) | |
download | MultiMC-bbc47cb8bdaea8fd9855e3e06b7607a7d15f3ef2.tar MultiMC-bbc47cb8bdaea8fd9855e3e06b7607a7d15f3ef2.tar.gz MultiMC-bbc47cb8bdaea8fd9855e3e06b7607a7d15f3ef2.tar.lz MultiMC-bbc47cb8bdaea8fd9855e3e06b7607a7d15f3ef2.tar.xz MultiMC-bbc47cb8bdaea8fd9855e3e06b7607a7d15f3ef2.zip |
Sync, removal of webkit as a dependency, removal of the web windows.
Diffstat (limited to 'gui/browserdialog.cpp')
-rw-r--r-- | gui/browserdialog.cpp | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/gui/browserdialog.cpp b/gui/browserdialog.cpp deleted file mode 100644 index 40c50c3f..00000000 --- a/gui/browserdialog.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include "browserdialog.h" -#include "ui_browserdialog.h" - -#include <QtWebKit/QWebHistory> - -BrowserDialog::BrowserDialog(QWidget *parent) : - QDialog(parent), - ui(new Ui::BrowserDialog), - m_pageTitleInWindowTitle(true), - m_windowTitleFormat("%1") -{ - ui->setupUi(this); - ui->webView->setPage(new QWebPage()); - refreshWindowTitle(); - resize(800, 600); -} - -BrowserDialog::~BrowserDialog() -{ - delete ui; -} - -// Navigation Buttons -void BrowserDialog::on_btnBack_clicked() -{ - ui->webView->back(); -} - -void BrowserDialog::on_btnForward_clicked() -{ - ui->webView->forward(); -} - -void BrowserDialog::on_webView_urlChanged(const QUrl &url) -{ - Q_UNUSED(url); - //qDebug("urlChanged"); - ui->btnBack->setEnabled(ui->webView->history()->canGoBack()); - ui->btnForward->setEnabled(ui->webView->history()->canGoForward()); -} - -// Window Title Magic -void BrowserDialog::refreshWindowTitle() -{ - //qDebug("refreshTitle"); - if (m_pageTitleInWindowTitle) - setWindowTitle(m_windowTitleFormat.arg(ui->webView->title())); - else - setWindowTitle(m_windowTitleFormat); -} - -void BrowserDialog::setPageTitleInWindowTitle(bool enable) -{ - m_pageTitleInWindowTitle = enable; - refreshWindowTitle(); -} - -void BrowserDialog::setWindowTitleFormat(QString format) -{ - m_windowTitleFormat = format; - refreshWindowTitle(); -} - -void BrowserDialog::on_webView_titleChanged(const QString &title) -{ - //qDebug("titleChanged"); - if (m_pageTitleInWindowTitle) - setWindowTitle(m_windowTitleFormat.arg(title)); -} - -// Public access Methods -void BrowserDialog::load(const QUrl &url) -{ - //qDebug("load"); - ui->webView->setUrl(url); -} |