[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeedu/marble/src/lib
From: Henry de Valence <hdevalence () gmail ! com>
Date: 2008-09-05 2:19:58
Message-ID: 1220581198.108930.7042.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 857237 by hdevalence:
Make the runners use GeoDataVisualCategory
M +6 -6 MarbleRunnerManager.cpp
M +1 -1 MarbleRunnerManager.h
M +4 -3 runners/LatLonRunner.cpp
M +1 -1 runners/LatLonRunner.h
M +3 -4 runners/MarbleAbstractRunner.cpp
M +7 -7 runners/MarbleAbstractRunner.h
M +3 -3 runners/OnfRunner.cpp
M +1 -1 runners/OnfRunner.h
--- trunk/KDE/kdeedu/marble/src/lib/MarbleRunnerManager.cpp #857236:857237
@@ -50,8 +50,8 @@
m_latlonRunner = new LatLonRunner(0);
m_latlonRunner->start();
m_latlonRunner->moveToThread(m_latlonRunner);
- connect( m_latlonRunner, SIGNAL( runnerStarted(QString) ),
- this, SLOT( slotRunnerStarted(QString) ));
+ connect( m_latlonRunner, SIGNAL( runnerStarted() ),
+ this, SLOT( slotRunnerStarted() ));
connect( m_latlonRunner, SIGNAL( runnerFinished( QVector<GeoDataPlacemark*> ) ),
this, SLOT( slotRunnerFinished( QVector<GeoDataPlacemark*> ) ));
connect( this, SIGNAL( engage(QString) ),
@@ -60,8 +60,8 @@
m_onfRunner = new OnfRunner(0);
m_onfRunner->start();
m_onfRunner->moveToThread(m_onfRunner);
- connect( m_onfRunner, SIGNAL( runnerStarted(QString) ),
- this, SLOT( slotRunnerStarted(QString) ));
+ connect( m_onfRunner, SIGNAL( runnerStarted() ),
+ this, SLOT( slotRunnerStarted() ));
connect( m_onfRunner, SIGNAL( runnerFinished( QVector<GeoDataPlacemark*> ) ),
this, SLOT( slotRunnerFinished( QVector<GeoDataPlacemark*> ) ));
connect( this, SIGNAL( engage(QString) ),
@@ -105,10 +105,10 @@
emit modelChanged( m_model );
}
-void MarbleRunnerManager::slotRunnerStarted(QString runnerName)
+void MarbleRunnerManager::slotRunnerStarted()
{
m_activeRunners++;
- qDebug() << runnerName << "starting, active runners: " << m_activeRunners;
+ qDebug() << "Runner starting, active runners: " << m_activeRunners;
}
MarblePlacemarkModel* MarbleRunnerManager::model()
--- trunk/KDE/kdeedu/marble/src/lib/MarbleRunnerManager.h #857236:857237
@@ -52,7 +52,7 @@
void engage(QString text);
private slots:
void slotRunnerFinished(QVector<GeoDataPlacemark*> result);
- void slotRunnerStarted(QString runnerName);
+ void slotRunnerStarted();
private:
int m_activeRunners;
QString m_lastString;
--- trunk/KDE/kdeedu/marble/src/lib/runners/LatLonRunner.cpp #857236:857237
@@ -21,6 +21,7 @@
#include "LatLonRunner.h"
#include "MarbleAbstractRunner.h"
+#include "GeoDataFeature.h"
#include "GeoDataPlacemark.h"
#include "GeoDataCoordinates.h"
@@ -38,9 +39,9 @@
}
-QString LatLonRunner::name() const
+GeoDataFeature::GeoDataVisualCategory LatLonRunner::category() const
{
- return "FIXME";
+ return GeoDataFeature::Default;
}
LatLonRunner::~LatLonRunner()
@@ -49,7 +50,7 @@
void LatLonRunner::parse(const QString &input)
{
- emit runnerStarted( name() );
+ emit runnerStarted();
bool successful = false;
GeoDataCoordinates coord = GeoDataCoordinates::fromString( input, successful );
--- trunk/KDE/kdeedu/marble/src/lib/runners/LatLonRunner.h #857236:857237
@@ -32,7 +32,7 @@
public:
LatLonRunner(QObject *parent = 0);
~LatLonRunner();
- QString name() const;
+ GeoDataFeature::GeoDataVisualCategory category() const;
public slots:
void parse(const QString &input);
--- trunk/KDE/kdeedu/marble/src/lib/runners/MarbleAbstractRunner.cpp #857236:857237
@@ -28,20 +28,19 @@
MarbleAbstractRunner::MarbleAbstractRunner(QObject *parent) : QThread(parent)
{
-// moveToThread(this);
}
MarbleAbstractRunner::~MarbleAbstractRunner()
{
}
-void MarbleAbstractRunner::parse( const QString& /*input*/ )
+GeoDataFeature::GeoDataVisualCategory MarbleAbstractRunner::category() const
{
+ return GeoDataFeature::Default;
}
-QString MarbleAbstractRunner::name() const
+void MarbleAbstractRunner::parse(const QString& /*input*/)
{
- return "FIXME";
}
void MarbleAbstractRunner::run()
--- trunk/KDE/kdeedu/marble/src/lib/runners/MarbleAbstractRunner.h #857236:857237
@@ -21,6 +21,7 @@
#ifndef MARBLEABSTRACTRUNNER_H
#define MARBLEABSTRACTRUNNER_H
+#include "GeoDataFeature.h"
#include <QThread>
#include <QVector>
@@ -40,7 +41,8 @@
Q_OBJECT
public:
/**
- * Constructor; note that @p parent should be 0
+ * Constructor; note that @p parent should be 0 in order to move the
+ * thread object into its own thread.
*/
MarbleAbstractRunner(QObject *parent = 0);
/**
@@ -48,10 +50,10 @@
*/
~MarbleAbstractRunner();
/**
- * This function gives the name of the icon for this runner
- * @return the name of the icon of the runner
+ * This function gives the icon for this runner
+ * @return the icon of the runner
*/
- virtual QString name() const;
+ virtual GeoDataFeature::GeoDataVisualCategory category() const;
void run();
@@ -68,11 +70,9 @@
signals:
/**
* This is emitted to indicate that the runner has started to work.
- * @param runnerName the name of the icon for the runner.
* @see parse()
- * @see name()
*/
- void runnerStarted(QString runnerName);
+ void runnerStarted();
/**
* This is emitted to indicate that the runner has finished.
* @param result the result of the parsing.
--- trunk/KDE/kdeedu/marble/src/lib/runners/OnfRunner.cpp #857236:857237
@@ -54,9 +54,9 @@
delete m_buffer;
}
-QString OnfRunner::name() const
+GeoDataFeature::GeoDataVisualCategory OnfRunner::category() const
{
- return tr("OpenStreetMap Name Finder Runner");
+ return GeoDataFeature::Default;
}
void OnfRunner::fail()
@@ -71,7 +71,7 @@
void OnfRunner::parse(const QString &input)
{
- emit runnerStarted( name() );
+ emit runnerStarted();
if( input.isEmpty() ) {
return;
}
--- trunk/KDE/kdeedu/marble/src/lib/runners/OnfRunner.h #857236:857237
@@ -36,7 +36,7 @@
public:
OnfRunner(QObject *parent = 0);
~OnfRunner();
- QString name() const;
+ GeoDataFeature::GeoDataVisualCategory category() const;
public slots:
void parse(const QString &input);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic