Changeset 55956 in webkit


Ignore:
Timestamp:
Mar 13, 2010 1:38:05 AM (14 years ago)
Author:
eric@webkit.org
Message:

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):
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r55951 r55956  
     12010-03-13  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        Add "Show FPS" menu option to QtLauncher.
     6
     7        [Qt] QtLauncher need a menu option to show/hide FPS
     8        https://bugs.webkit.org/show_bug.cgi?id=35794
     9
     10        * QtLauncher/main.cpp:
     11        (LauncherWindow::showFPS):
     12        (LauncherWindow::createChrome):
     13
    1142010-03-13  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
    215
  • trunk/WebKitTools/QtLauncher/main.cpp

    r55951 r55956  
    122122    void toggleSpatialNavigation(bool b);
    123123    void toggleFullScreenMode(bool enable);
     124    void showFPS(bool enable);
    124125
    125126public slots:
     
    584585}
    585586
     587void LauncherWindow::showFPS(bool enable)
     588{
     589    if (!isGraphicsBased())
     590        return;
     591
     592    gShowFrameRate = enable;
     593    WebViewGraphicsBased* view = static_cast<WebViewGraphicsBased*>(m_view);
     594    view->setFrameRateMeasurementEnabled(enable);
     595}
     596
    586597void LauncherWindow::newWindow()
    587598{
     
    711722    cloneWindow->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
    712723    cloneWindow->setEnabled(isGraphicsBased());
     724
     725    QAction* showFPS = graphicsViewMenu->addAction("Show FPS", this, SLOT(showFPS(bool)));
     726    showFPS->setCheckable(true);
     727    showFPS->setEnabled(isGraphicsBased());
     728    showFPS->connect(toggleGraphicsView, SIGNAL(toggled(bool)), SLOT(setEnabled(bool)));
     729    showFPS->setChecked(gShowFrameRate);
    713730}
    714731
Note: See TracChangeset for help on using the changeset viewer.