[Marble-commits] KDE/kdeedu/marble/src/plugins
Jens-Michael Hoffmann
jensmh at gmx.de
Mon Aug 17 21:52:57 CEST 2009
SVN commit 1012531 by jmhoffmann:
Coding style: opening braces of structs, classes, functions and namespaces should be on their own line.
M +13 -6 positionprovider/geoclue/GeoCluePositionProviderPlugin.cpp
M +12 -5 positionprovider/geoclue/GeoCute/MasterClient.cpp
M +11 -5 positionprovider/geoclue/GeoCute/PositionProvider.cpp
M +11 -5 positionprovider/geoclue/GeoCute/Provider.cpp
M +11 -5 positionprovider/geoclue/GeoCute/SimpleDBusInterface.cpp
M +9 -4 positionprovider/geoclue/GeoCute/VelocityProvider.cpp
M +2 -1 positionprovider/gpsd/GpsdConnection.cpp
M +11 -5 positionprovider/gpsd/GpsdPositionProviderPlugin.cpp
M +2 -1 render/dataview/GeoDataDebugModel.cpp
M +2 -1 render/fileview/FileViewFloatItem.cpp
M +2 -1 render/osmannotate/AreaAnnotation.cpp
M +2 -1 render/osmannotate/GeoWidgetBubble.cpp
M +2 -2 render/osmannotate/OsmAnnotatePlugin.cpp
M +2 -1 render/osmannotate/TextAnnotation.cpp
M +2 -1 render/osmannotate/TextEditor.cpp
M +2 -1 render/osmannotate/TmpGraphicsItem.cpp
M +2 -1 render/osmannotate/osm/OsmBoundsGraphicsItem.cpp
M +2 -1 render/osmannotate/osm/OsmElementDictionary.cpp
M +10 -5 render/panoramio/PanoramioPlugin.cpp
M +12 -6 render/panoramio/PanoramioWidget.cpp
M +12 -6 render/panoramio/imagewidget.cpp
M +4 -2 render/twitter/jsonparser.h
M +2 -1 render/twitter/twitterPlugin.h
M +4 -3 render/weather/AbstractWeatherService.cpp
M +2 -1 render/weather/BBCParser.h
--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/geoclue/GeoCluePositionProviderPlugin.cpp #1012530:1012531
@@ -62,26 +62,32 @@
return new GeoCluePositionProviderPlugin;
}
-PositionProviderStatus GeoCluePositionProviderPlugin::status() const {
+PositionProviderStatus GeoCluePositionProviderPlugin::status() const
+{
return m_status;
}
-GeoDataCoordinates GeoCluePositionProviderPlugin::position() const {
+GeoDataCoordinates GeoCluePositionProviderPlugin::position() const
+{
return m_position;
}
-GeoDataAccuracy GeoCluePositionProviderPlugin::accuracy() const {
+GeoDataAccuracy GeoCluePositionProviderPlugin::accuracy() const
+{
return m_accuracy;
}
-GeoCluePositionProviderPlugin::GeoCluePositionProviderPlugin() : m_positionProvider(0) {}
+GeoCluePositionProviderPlugin::GeoCluePositionProviderPlugin() : m_positionProvider(0)
+{
+}
GeoCluePositionProviderPlugin::~GeoCluePositionProviderPlugin()
{
delete m_positionProvider;
}
-void GeoCluePositionProviderPlugin::updatePosition(GeoCute::Position newPosition) {
+void GeoCluePositionProviderPlugin::updatePosition(GeoCute::Position newPosition)
+{
m_position = GeoDataCoordinates(newPosition.longitude, newPosition.latitude,
newPosition.altitude, GeoDataCoordinates::Degree);
m_accuracy.level = static_cast<GeoDataAccuracy::Level>(newPosition.accuracy.level);
@@ -91,7 +97,8 @@
emit positionChanged(m_position, m_accuracy);
}
-void GeoCluePositionProviderPlugin::updateStatus(GeoCute::Status newStatus) {
+void GeoCluePositionProviderPlugin::updateStatus(GeoCute::Status newStatus)
+{
m_status = static_cast<PositionProviderStatus>(newStatus);
emit statusChanged(m_status);
--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/geoclue/GeoCute/MasterClient.cpp #1012530:1012531
@@ -11,7 +11,8 @@
using namespace GeoCute;
-static QString createClientPath() {
+static QString createClientPath()
+{
SimpleDBusInterface masterInterface(serviceName, masterPathName,
masterInterfaceName);
QDBusReply<QDBusObjectPath> reply = masterInterface.call("Create");
@@ -22,12 +23,17 @@
}
MasterClient::Private::Private()
- : interface(serviceName, createClientPath(), interfaceName) { }
+ : interface(serviceName, createClientPath(), interfaceName)
+{
+}
MasterClient::MasterClient(QObject* parent)
- : QObject(parent), d(new Private) { }
+ : QObject(parent), d(new Private)
+{
+}
-MasterClient::~MasterClient() {
+MasterClient::~MasterClient()
+{
delete d;
}
@@ -40,7 +46,8 @@
}
}
-PositionProvider* MasterClient::positionProvider() {
+PositionProvider* MasterClient::positionProvider()
+{
if (!d->interface.path().isEmpty()) {
d->interface.call("PositionStart");
return new PositionProvider(d->interface.service(), d->interface.path());
--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/geoclue/GeoCute/PositionProvider.cpp #1012530:1012531
@@ -22,7 +22,8 @@
SLOT(positionChangedCall(QDBusMessage)));
}
-void PositionProvider::Private::positionChangedCall(QDBusMessage message) {
+void PositionProvider::Private::positionChangedCall(QDBusMessage message)
+{
// FIXME: Check the number of arguments
// FIXME: Make sure all result members are actually filled
Position result;
@@ -41,13 +42,17 @@
PositionProvider::PositionProvider(const QString& service, const QString& path,
QObject* parent)
- : Provider(service, path, parent), d(new Private(*this, service, path)) { }
+ : Provider(service, path, parent), d(new Private(*this, service, path))
+{
+}
-PositionProvider::~PositionProvider() {
+PositionProvider::~PositionProvider()
+{
delete d;
}
-PositionProvider* PositionProvider::detailed() {
+PositionProvider* PositionProvider::detailed()
+{
// FIXME: The following code has been replaced for the moment
// because it leads to a crash in geoclue-master
MasterClient mc;
@@ -58,7 +63,8 @@
// return new PositionProvider("example.provider.hostip", "/");
}
-Position PositionProvider::position() const {
+Position PositionProvider::position() const
+{
return d->currentPosition;
}
--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/geoclue/GeoCute/Provider.cpp #1012530:1012531
@@ -20,11 +20,13 @@
interface.connect("StatusChanged", &parent, SLOT(statusChangedCall(int)));
}
-Provider::Private::~Private() {
+Provider::Private::~Private()
+{
interface.asyncCall("RemoveReference");
}
-void Provider::Private::statusChangedCall(int status) {
+void Provider::Private::statusChangedCall(int status)
+{
const Status newStatus = static_cast<Status>(status);
if (newStatus != currentStatus) {
currentStatus = newStatus;
@@ -37,13 +39,17 @@
Provider::Provider(const QString& service, const QString& path,
QObject* parent)
- : QObject(parent), d(new Private(*this, service, path)) { }
+ : QObject(parent), d(new Private(*this, service, path))
+{
+}
-Provider::~Provider() {
+Provider::~Provider()
+{
delete d;
}
-Status Provider::status() const {
+Status Provider::status() const
+{
return d->currentStatus;
}
--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/geoclue/GeoCute/SimpleDBusInterface.cpp #1012530:1012531
@@ -8,9 +8,12 @@
const QString& path, const QString& interface,
const QDBusConnection& connection, QObject* parent)
: QObject(parent), p_connection(connection), p_interface(interface),
- p_path(path), p_service(service) { }
+ p_path(path), p_service(service)
+{
+}
-QDBusPendingCall SimpleDBusInterface::asyncCall(const QString& method) const {
+QDBusPendingCall SimpleDBusInterface::asyncCall(const QString& method) const
+{
const QDBusMessage message
= QDBusMessage::createMethodCall(p_service, p_path, p_interface, method);
return p_connection.asyncCall(message);
@@ -60,15 +63,18 @@
p_connection.connect(p_service, p_path, p_interface, name, receiver, slot);
}
-QString SimpleDBusInterface::interface() const {
+QString SimpleDBusInterface::interface() const
+{
return p_interface;
}
-QString SimpleDBusInterface::path() const {
+QString SimpleDBusInterface::path() const
+{
return p_path;
}
-QString SimpleDBusInterface::service() const {
+QString SimpleDBusInterface::service() const
+{
return p_service;
}
--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/geoclue/GeoCute/VelocityProvider.cpp #1012530:1012531
@@ -18,7 +18,8 @@
SLOT(velocityChangedCall(QDBusMessage)));
}
-void VelocityProvider::Private::velocityChangedCall(QDBusMessage message) {
+void VelocityProvider::Private::velocityChangedCall(QDBusMessage message)
+{
Velocity newVelocity;
newVelocity.fields
= static_cast<VelocityFields>(message.arguments()[0].toInt());
@@ -35,13 +36,17 @@
VelocityProvider::VelocityProvider(const QString& service, const QString& path,
QObject* parent)
: Provider(service, path, parent),
- d(new Private(*this, service, path)) { }
+ d(new Private(*this, service, path))
+{
+}
-VelocityProvider::~VelocityProvider() {
+VelocityProvider::~VelocityProvider()
+{
delete d;
}
-Velocity VelocityProvider::velocity() {
+Velocity VelocityProvider::velocity()
+{
return d->currentVelocity;
}
--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdConnection.cpp #1012530:1012531
@@ -28,7 +28,8 @@
qDebug() << "Connection to gpsd failed, no position info available.";
}
-void GpsdConnection::update() {
+void GpsdConnection::update()
+{
gps_data_t* data = m_gpsd.query( "o" );
if ( data )
emit gpsdInfo( *data );
--- trunk/KDE/kdeedu/marble/src/plugins/positionprovider/gpsd/GpsdPositionProviderPlugin.cpp #1012530:1012531
@@ -49,7 +49,8 @@
m_thread->start();
}
-void GpsdPositionProviderPlugin::update(gps_data_t data) {
+void GpsdPositionProviderPlugin::update(gps_data_t data)
+{
PositionProviderStatus oldStatus = m_status;
GeoDataCoordinates oldPosition = m_position;
if (data.status == STATUS_NO_FIX)
@@ -80,19 +81,24 @@
return new GpsdPositionProviderPlugin;
}
-PositionProviderStatus GpsdPositionProviderPlugin::status() const {
+PositionProviderStatus GpsdPositionProviderPlugin::status() const
+{
return m_status;
}
-GeoDataCoordinates GpsdPositionProviderPlugin::position() const {
+GeoDataCoordinates GpsdPositionProviderPlugin::position() const
+{
return m_position;
}
-GeoDataAccuracy GpsdPositionProviderPlugin::accuracy() const {
+GeoDataAccuracy GpsdPositionProviderPlugin::accuracy() const
+{
return m_accuracy;
}
-GpsdPositionProviderPlugin::GpsdPositionProviderPlugin() : m_thread( 0 ) {}
+GpsdPositionProviderPlugin::GpsdPositionProviderPlugin() : m_thread( 0 )
+{
+}
GpsdPositionProviderPlugin::~GpsdPositionProviderPlugin()
{
--- trunk/KDE/kdeedu/marble/src/plugins/render/dataview/GeoDataDebugModel.cpp #1012530:1012531
@@ -27,7 +27,8 @@
using namespace Marble;
-class GeoDataDebugModel::Private {
+class GeoDataDebugModel::Private
+{
public:
Private(GeoDataDocument* rootDocument) : m_rootDocument( rootDocument ) {};
GeoDataDocument* m_rootDocument;
--- trunk/KDE/kdeedu/marble/src/plugins/render/fileview/FileViewFloatItem.cpp #1012530:1012531
@@ -101,7 +101,8 @@
return path;
}
-void FileViewFloatItem::changeViewport( ViewportParams *viewport ) {
+void FileViewFloatItem::changeViewport( ViewportParams *viewport )
+{
Q_UNUSED( viewport );
update();
}
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/AreaAnnotation.cpp #1012530:1012531
@@ -11,7 +11,8 @@
#include "GeoPainter.h"
-namespace Marble {
+namespace Marble
+{
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/GeoWidgetBubble.cpp #1012530:1012531
@@ -14,7 +14,8 @@
#include <QtGui/QWidget>
-namespace Marble{
+namespace Marble
+{
GeoWidgetBubble::GeoWidgetBubble()
{
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/OsmAnnotatePlugin.cpp #1012530:1012531
@@ -630,8 +630,8 @@
emit actionGroupsChanged();
}
-void OsmAnnotatePlugin::readOsmFile( QIODevice *device, bool flyToFile ) {
-
+void OsmAnnotatePlugin::readOsmFile( QIODevice *device, bool flyToFile )
+{
GeoDataParser parser( GeoData_OSM );
if ( !parser.read( device ) ) {
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/TextAnnotation.cpp #1012530:1012531
@@ -15,7 +15,8 @@
#include <QtCore/QDebug>
-namespace Marble{
+namespace Marble
+{
TextAnnotation::TextAnnotation()
{
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/TextEditor.cpp #1012530:1012531
@@ -19,7 +19,8 @@
#include <QtGui/QHBoxLayout>
-namespace Marble {
+namespace Marble
+{
TextEditor::TextEditor() : QWidget()
{
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/TmpGraphicsItem.cpp #1012530:1012531
@@ -12,7 +12,8 @@
#include <QtCore/QVariant>
-namespace Marble{
+namespace Marble
+{
TmpGraphicsItem::TmpGraphicsItem()
{
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/osm/OsmBoundsGraphicsItem.cpp #1012530:1012531
@@ -15,7 +15,8 @@
#include <QtCore/QDebug>
-namespace Marble{
+namespace Marble
+{
OsmBoundsGraphicsItem::OsmBoundsGraphicsItem()
: GeoGraphicsItem()
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/osm/OsmElementDictionary.cpp #1012530:1012531
@@ -13,7 +13,8 @@
namespace Marble
{
-namespace osm {
+namespace osm
+{
const char* osmTag_osm = "osm";
--- trunk/KDE/kdeedu/marble/src/plugins/render/panoramio/PanoramioPlugin.cpp #1012530:1012531
@@ -20,24 +20,29 @@
setNameId( "panoramio" );
}
-void PanoramioPlugin::initialize() {
+void PanoramioPlugin::initialize()
+{
setModel( new PanoramioModel( this ) );
setNumberOfWidgets( numberOfImagesPerFetch );
}
-QString PanoramioPlugin::name() const {
+QString PanoramioPlugin::name() const
+{
return tr( "Panoramio Photos" );
}
-QString PanoramioPlugin::guiString() const {
+QString PanoramioPlugin::guiString() const
+{
return tr( "&Panoramio" );
}
-QString PanoramioPlugin::description() const {
+QString PanoramioPlugin::description() const
+{
return tr( "Automatically downloads images from around the world in preference to their popularity" );
}
-QIcon PanoramioPlugin::icon() const {
+QIcon PanoramioPlugin::icon() const
+{
return QIcon();
}
Q_EXPORT_PLUGIN2(PanoramioPlugin, Marble::PanoramioPlugin)
--- trunk/KDE/kdeedu/marble/src/plugins/render/panoramio/PanoramioWidget.cpp #1012530:1012531
@@ -26,15 +26,18 @@
{
}
-QString PanoramioWidget::widgetType() const {
+QString PanoramioWidget::widgetType() const
+{
return "panoramioWidget";
}
-bool PanoramioWidget::initialized() {
+bool PanoramioWidget::initialized()
+{
return !smallImage.isNull();
}
-void PanoramioWidget::addDownloadedFile( QString url, QString type ) {
+void PanoramioWidget::addDownloadedFile( QString url, QString type )
+{
if( standardImageSize == type ) {
// Loading original image
QImage largeImage;
@@ -50,15 +53,18 @@
}
}
-QDate PanoramioWidget::uploadDate() const {
+QDate PanoramioWidget::uploadDate() const
+{
return m_uploadDate;
}
-void PanoramioWidget::setUploadDate( QDate uploadDate ) {
+void PanoramioWidget::setUploadDate( QDate uploadDate )
+{
m_uploadDate = uploadDate;
}
-bool PanoramioWidget::operator<( const AbstractDataPluginWidget *other ) const {
+bool PanoramioWidget::operator<( const AbstractDataPluginWidget *other ) const
+{
if( other->widgetType() == widgetType() ) {
return uploadDate() > ((PanoramioWidget *) other)->uploadDate();
}
--- trunk/KDE/kdeedu/marble/src/plugins/render/panoramio/imagewidget.cpp #1012530:1012531
@@ -1,24 +1,30 @@
#include "imagewidget.h"
-imageWidget::imageWidget() {
+imageWidget::imageWidget()
+{
}
-imageWidget:: ~imageWidget() {
+imageWidget::~imageWidget()
+{
}
-void imageWidget::addImage(QPixmap temp) {
+void imageWidget::addImage(QPixmap temp)
+{
image=temp;
}
-void imageWidget::paintEvent(QPaintEvent * event ) {
+void imageWidget::paintEvent(QPaintEvent * event )
+{
qDebug()<<__func__<<"painevent";
}
-void imageWidget::mousePressEvent ( QMouseEvent * event ) {
+void imageWidget::mousePressEvent ( QMouseEvent * event )
+{
qDebug()<<__func__<<"mouseevent";
}
-QPixmap * imageWidget::returnPointerToImage(){
+QPixmap * imageWidget::returnPointerToImage()
+{
return ℑ
}
#include "imagewidget.moc"
--- trunk/KDE/kdeedu/marble/src/plugins/render/twitter/jsonparser.h #1012530:1012531
@@ -27,14 +27,16 @@
(3)some other plan that i have yet not thought upon :)
@author Shashank Singh
*/
-struct twitterDataStructure {
+struct twitterDataStructure
+{
//defining the only parts that are required ,, all oher fields are hence left
QString user;
QString location;
QString text;
};
-struct googleMapDataStructure {
+struct googleMapDataStructure
+{
qreal lat;
qreal lon;
};
--- trunk/KDE/kdeedu/marble/src/plugins/render/twitter/twitterPlugin.h #1012530:1012531
@@ -34,7 +34,8 @@
* @short The class that specifies the a simple panormaio plugin
*
*/
-struct twitterStructure {
+struct twitterStructure
+{
QString twit ;
GeoDataCoordinates location;
};
--- trunk/KDE/kdeedu/marble/src/plugins/render/weather/AbstractWeatherService.cpp #1012530:1012531
@@ -11,15 +11,16 @@
// Self
#include "AbstractWeatherService.h"
-namespace Marble {
+namespace Marble
+{
AbstractWeatherService::AbstractWeatherService( QObject *parent )
: QObject( parent )
{
}
-AbstractWeatherService::~AbstractWeatherService() {
-
+AbstractWeatherService::~AbstractWeatherService()
+{
}
} // namespace Marble
--- trunk/KDE/kdeedu/marble/src/plugins/render/weather/BBCParser.h #1012530:1012531
@@ -31,7 +31,8 @@
class BBCWeatherItem;
-struct ScheduleEntry {
+struct ScheduleEntry
+{
QString path;
QPointer<BBCWeatherItem> item;
QString type;
More information about the Marble-commits
mailing list