<commit_before>//
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2006-2007 <NAME> <<EMAIL>>
// Copyright 2007      <NAME>  <<EMAIL>>
//

#include "MarbleTest.h"

#include <QtCore/QCoreApplication>
#include <QtCore/QTime>
#include <QtGui/QMessageBox>
#include <QtGui/QFileDialog>

#include <global.h>
#include <MarbleDebug.h>
#include <MarbleWidget.h>
#include <MarbleModel.h>

using namespace Marble;

MarbleTest::MarbleTest( MarbleWidget* marbleWidget )
    : m_marbleWidget(marbleWidget)
{
}

void MarbleTest::timeDemo()
{
    m_marbleWidget->zoomView( 1500 );
    m_marbleWidget->setMapThemeId( "earth/srtm/srtm.dgml" );
    m_marbleWidget->setMapQuality( Marble::NormalQuality );
//    m_marbleWidget->resize( 800, 600 );
    m_marbleWidget->centerOn( 9.4, 54.8 );

    QMessageBox::information(m_marbleWidget, QString( "Marble Speed Test" ), QString( "Press Ok to start test" ) );

    QTime t;
    //m_marbleWidget->setMapTheme( "plain/plain.dgml" );
    //m_marbleWidget->setMapTheme( "bluemarble/bluemarble.dgml" );

/*
    m_marbleWidget->setShowGrid( false );
    m_marbleWidget->setShowPlaces( false );
    m_marbleWidget->setShowBorders( false );
    m_marbleWidget->setShowRivers( false );
    m_marbleWidget->setShowLakes( false );
*/

        for ( int k = 0; k < 10; ++k ) {
            m_marbleWidget->moveRight( Instant );
            QCoreApplication::flush();
        }
        for ( int k = 0; k < 10; ++k ) {
            m_marbleWidget->moveLeft( Instant );
            QCoreApplication::flush();
        }
<commit_msg>timedemo test: support different map themes, map qualities, zoom values, and center points by not hardcoding them<commit_after>//
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2006-2007 <NAME> <<EMAIL>>
// Copyright 2007      <NAME>  <<EMAIL>>
//

#include "MarbleTest.h"

#include <QtCore/QCoreApplication>
#include <QtCore/QTime>
#include <QtGui/QMessageBox>
#include <QtGui/QFileDialog>

#include <global.h>
#include <MarbleDebug.h>
#include <MarbleWidget.h>
#include <MarbleModel.h>

using namespace Marble;

MarbleTest::MarbleTest( MarbleWidget* marbleWidget )
    : m_marbleWidget(marbleWidget)
{
}

void MarbleTest::timeDemo()
{
    QMessageBox::information(m_marbleWidget, QString( "Marble Speed Test" ), QString( "Press Ok to start test" ) );

    QTime t;

        for ( int k = 0; k < 10; ++k ) {
            m_marbleWidget->moveRight( Instant );
            QCoreApplication::flush();
        }
        for ( int k = 0; k < 10; ++k ) {
            m_marbleWidget->moveLeft( Instant );
            QCoreApplication::flush();
        }

{'fraction_non_alphanumeric': 0.13177506775067752, 'fraction_numerical': 0.017276422764227643, 'mean_word_length': 3.255043227665706, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3261541', 'n_tokens_mistral': 1042, 'n_tokens_neox': 973, 'n_words': 254}