Esempio n. 1
0
void BrowserWindow::keyReleaseEvent(QKeyEvent *event)
{
    QWidget::keyReleaseEvent(event);

    if (event->key() == Qt::Key_F3) {
        if (m_homeView->isVisible())
            showBrowserView();
        else
            showHomeView();
    }
}
Esempio n. 2
0
void BrowserWindow::keyReleaseEvent(QKeyEvent *event)
{
    QWidget::keyReleaseEvent(event);

    if (event->key() == Qt::Key_F3) {
        if (m_animation->state() == QAbstractAnimation::Running) {
            const QAbstractAnimation::Direction direction =  m_animation->direction() == QAbstractAnimation::Forward
                    ? QAbstractAnimation::Forward
                    : QAbstractAnimation::Backward;
            m_animation->setDirection(direction);
        } else if (qFuzzyCompare(slideValue(), static_cast<qreal>(1.0f)))
            showHomeView();
        else
            showBrowserView();
        event->accept();
    }
}
Esempio n. 3
0
void BrowserWindow::navigate(const QUrl &url)
{
    m_browserView->navigate(url);
    showBrowserView();
}
Esempio n. 4
0
void BrowserWindow::gotoAddress(const QString &address)
{
    m_browserView->navigate(QUrl::fromUserInput(address));
    showBrowserView();
}
Esempio n. 5
0
void BrowserWindow::gotoAddress(const QString &address)
{
    m_browserView->navigate(guessUrlFromString(address));
    showBrowserView();
}