Commit 6c644496 authored by eric@webkit.org's avatar eric@webkit.org
Browse files

2010-03-13 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>

        Reviewed by Kenneth Rohde Christiansen.

        Add "Show FPS" menu option to QtLauncher.

        [Qt] QtLauncher need a menu option to show/hide FPS
        https://bugs.webkit.org/show_bug.cgi?id=35794

        * QtLauncher/main.cpp:
        (LauncherWindow::showFPS):
        (LauncherWindow::createChrome):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 42fb8c82
2010-03-13 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Reviewed by Kenneth Rohde Christiansen.
Add "Show FPS" menu option to QtLauncher.
[Qt] QtLauncher need a menu option to show/hide FPS
https://bugs.webkit.org/show_bug.cgi?id=35794
* QtLauncher/main.cpp:
(LauncherWindow::showFPS):
(LauncherWindow::createChrome):
2010-03-13 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
 
Reviewed by Kenneth Rohde Christiansen.
......
......@@ -121,6 +121,7 @@ protected slots:
void initializeView(bool useGraphicsView = false);
void toggleSpatialNavigation(bool b);
void toggleFullScreenMode(bool enable);
void showFPS(bool enable);
public slots:
void newWindow();
......@@ -583,6 +584,16 @@ void LauncherWindow::toggleFullScreenMode(bool enable)
}
}
void LauncherWindow::showFPS(bool enable)
{
if (!isGraphicsBased())
return;
gShowFrameRate = enable;
WebViewGraphicsBased* view = static_cast<WebViewGraphicsBased*>(m_view);
view->setFrameRateMeasurementEnabled(enable);
}
void LauncherWindow::newWindow()
{
LauncherWindow* mw = new LauncherWindow(this, false);
......@@ -710,6 +721,12 @@ void LauncherWindow::createChrome()
QAction* cloneWindow = graphicsViewMenu->addAction("Clone Window", this, SLOT(cloneWindow()));
cloneWindow->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
cloneWindow->setEnabled(isGraphicsBased());
QAction* showFPS = graphicsViewMenu->addAction("Show FPS", this, SLOT(showFPS(bool)));
showFPS->setCheckable(true);
showFPS->setEnabled(isGraphicsBased());
showFPS->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
showFPS->setChecked(gShowFrameRate);
}
QWebPage* WebPage::createWindow(QWebPage::WebWindowType type)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment