[QGIS Commit] r15098 - trunk/qgis/src/plugins/roadgraph
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Jan 28 11:59:17 EST 2011
Author: jef
Date: 2011-01-28 08:59:17 -0800 (Fri, 28 Jan 2011)
New Revision: 15098
Modified:
trunk/qgis/src/plugins/roadgraph/exportdlg.cpp
trunk/qgis/src/plugins/roadgraph/linevectorlayerdirector.cpp
trunk/qgis/src/plugins/roadgraph/linevectorlayerdirector.h
trunk/qgis/src/plugins/roadgraph/linevectorlayerwidget.cpp
trunk/qgis/src/plugins/roadgraph/roadgraphplugin.cpp
trunk/qgis/src/plugins/roadgraph/settingsdlg.cpp
trunk/qgis/src/plugins/roadgraph/shortestpathwidget.cpp
Log:
some translation string fixes in road graph plugin
Modified: trunk/qgis/src/plugins/roadgraph/exportdlg.cpp
===================================================================
--- trunk/qgis/src/plugins/roadgraph/exportdlg.cpp 2011-01-28 16:59:08 UTC (rev 15097)
+++ trunk/qgis/src/plugins/roadgraph/exportdlg.cpp 2011-01-28 16:59:17 UTC (rev 15098)
@@ -35,7 +35,7 @@
QVBoxLayout *v = new QVBoxLayout( this );
QHBoxLayout *h = new QHBoxLayout();
- QLabel *l = new QLabel( tr( "Select destination layer:" ), this );
+ QLabel *l = new QLabel( tr( "Select destination layer" ), this );
h->addWidget( l );
mcbLayers = new QComboBox( this );
h->addWidget( mcbLayers );
@@ -47,7 +47,7 @@
v->addWidget( bb );
//fill list of layers
- mcbLayers->insertItem( 0, tr( "new temporary layer" ), QVariant( "-1" ) );
+ mcbLayers->insertItem( 0, tr( "New temporary layer" ), QVariant( "-1" ) );
QMap<QString, QgsMapLayer*> mapLayers = QgsMapLayerRegistry::instance()->mapLayers();
QMap<QString, QgsMapLayer*>::iterator layer_it = mapLayers.begin();
Modified: trunk/qgis/src/plugins/roadgraph/linevectorlayerdirector.cpp
===================================================================
--- trunk/qgis/src/plugins/roadgraph/linevectorlayerdirector.cpp 2011-01-28 16:59:08 UTC (rev 15097)
+++ trunk/qgis/src/plugins/roadgraph/linevectorlayerdirector.cpp 2011-01-28 16:59:17 UTC (rev 15098)
@@ -32,14 +32,14 @@
#include <iostream>
RgLineVectorLayerDirector::RgLineVectorLayerDirector( const QString& layerId,
- int directionFieldId,
- const QString& directDirectionValue,
- const QString& reverseDirectionValue,
- const QString& bothDirectionValue,
- int defaultDirection,
- const QString& speedUnitName,
- int speedFieldId,
- double defaultSpeed)
+ int directionFieldId,
+ const QString& directDirectionValue,
+ const QString& reverseDirectionValue,
+ const QString& bothDirectionValue,
+ int defaultDirection,
+ const QString& speedUnitName,
+ int speedFieldId,
+ double defaultSpeed )
{
mLayerId = layerId;
mDirectionFieldId = directionFieldId;
Modified: trunk/qgis/src/plugins/roadgraph/linevectorlayerdirector.h
===================================================================
--- trunk/qgis/src/plugins/roadgraph/linevectorlayerdirector.h 2011-01-28 16:59:08 UTC (rev 15097)
+++ trunk/qgis/src/plugins/roadgraph/linevectorlayerdirector.h 2011-01-28 16:59:17 UTC (rev 15098)
@@ -33,13 +33,13 @@
class RgLineVectorLayerDirector : public RgGraphDirector
{
public:
- RgLineVectorLayerDirector( const QString& layerId,
+ RgLineVectorLayerDirector( const QString& layerId,
int directionFiledId,
const QString& directDirectionValue,
const QString& reverseDirectionValue,
const QString& bothDirectionValue,
- int defaultDirection,
- const QString& speedValueUnit = QString("m/s"),
+ int defaultDirection,
+ const QString& speedValueUnit = QString( "m/s" ),
int speedFieldId = -1,
double defaultSpeed = 1.0 );
@@ -51,19 +51,19 @@
void makeGraph( RgGraphBuilder * ) const;
QString name() const;
-
+
private:
QgsVectorLayer* myLayer() const;
private:
-
+
QString mLayerId;
int mSpeedFieldId;
double mDefaultSpeed;
-
+
QString mSpeedUnitName;
int mDirectionFieldId;
@@ -73,7 +73,7 @@
QString mReverseDirectionValue;
QString mBothDirectionValue;
-
+
//FIXME: need enum
int mDefaultDirection;
};
Modified: trunk/qgis/src/plugins/roadgraph/linevectorlayerwidget.cpp
===================================================================
--- trunk/qgis/src/plugins/roadgraph/linevectorlayerwidget.cpp 2011-01-28 16:59:08 UTC (rev 15097)
+++ trunk/qgis/src/plugins/roadgraph/linevectorlayerwidget.cpp 2011-01-28 16:59:17 UTC (rev 15098)
@@ -103,7 +103,7 @@
h = new QHBoxLayout( frame );
l = new QLabel( tr( "Cost" ), frame );
h->addWidget( l );
- l = new QLabel( tr( "lines length" ), frame );
+ l = new QLabel( tr( "Line lengths" ), frame );
h->addWidget( l );
v->addLayout( h );
Modified: trunk/qgis/src/plugins/roadgraph/roadgraphplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/roadgraph/roadgraphplugin.cpp 2011-01-28 16:59:08 UTC (rev 15097)
+++ trunk/qgis/src/plugins/roadgraph/roadgraphplugin.cpp 2011-01-28 16:59:17 UTC (rev 15098)
@@ -53,7 +53,7 @@
static const char * const sIdent = "$Id: roadgraphplugin.cpp 9327 2009-04-20 10:09:44Z YEKST $";
static const QString sName = QObject::tr( "Road graph plugin" );
-static const QString sDescription = QObject::tr( "It solve shortest path poblem." );
+static const QString sDescription = QObject::tr( "It solves the shortest path problem." );
static const QString sPluginVersion = QObject::tr( "Version 0.1" );
static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI;
@@ -96,7 +96,7 @@
// Create the action for tool
mQSettingsAction = new QAction( QIcon( ":/roadgraph/road.png" ), tr( "Road graph settings" ), this );
- mQShowDirectionAction = new QAction( QIcon( ":/roadgraph/showdirect.png" ), tr( "Show roads direction" ), this );
+ mQShowDirectionAction = new QAction( QIcon( ":/roadgraph/showdirect.png" ), tr( "Show road's direction" ), this );
mInfoAction = new QAction( QIcon( ":/roadgraph/about.png" ), tr( "About" ), this );
// Set the what's this text
@@ -201,7 +201,7 @@
version->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
lines->addWidget( title );
lines->addWidget( version );
- lines->addWidget( new QLabel( tr( "Find shortest path on roads graph" ) ) );
+ lines->addWidget( new QLabel( tr( "Find shortest path on road's graph" ) ) );
lines->addWidget( new QLabel( tr( "<b>Developers:</b>" ) ) );
lines->addWidget( new QLabel( " Sergey Yakushev" ) );
lines->addWidget( new QLabel( tr( "<b>Homepage:</b>" ) ) );
@@ -269,21 +269,21 @@
if ( layer == NULL )
return NULL;
- QgsVectorDataProvider *provider = dynamic_cast< QgsVectorDataProvider* > ( layer->dataProvider() );
+ QgsVectorDataProvider *provider = dynamic_cast< QgsVectorDataProvider* >( layer->dataProvider() );
if ( provider == NULL )
return NULL;
- RgLineVectorLayerDirector * director =
- new RgLineVectorLayerDirector( layerId,
- provider->fieldNameIndex( mSettings->mDirection ),
- mSettings->mFirstPointToLastPointDirectionVal,
- mSettings->mLastPointToFirstPointDirectionVal,
- mSettings->mBothDirectionVal,
- mSettings->mDefaultDirection,
- mSettings->mSpeedUnitName,
- provider->fieldNameIndex( mSettings->mSpeed ),
- mSettings->mDefaultSpeed );
-
+ RgLineVectorLayerDirector * director =
+ new RgLineVectorLayerDirector( layerId,
+ provider->fieldNameIndex( mSettings->mDirection ),
+ mSettings->mFirstPointToLastPointDirectionVal,
+ mSettings->mLastPointToFirstPointDirectionVal,
+ mSettings->mBothDirectionVal,
+ mSettings->mDefaultDirection,
+ mSettings->mSpeedUnitName,
+ provider->fieldNameIndex( mSettings->mSpeed ),
+ mSettings->mDefaultSpeed );
+
return director;
}
void RoadGraphPlugin::render( QPainter *painter )
@@ -292,7 +292,7 @@
return;
const RgGraphDirector *graphDirector = director();
-
+
if ( graphDirector == NULL )
return;
Modified: trunk/qgis/src/plugins/roadgraph/settingsdlg.cpp
===================================================================
--- trunk/qgis/src/plugins/roadgraph/settingsdlg.cpp 2011-01-28 16:59:08 UTC (rev 15097)
+++ trunk/qgis/src/plugins/roadgraph/settingsdlg.cpp 2011-01-28 16:59:17 UTC (rev 15098)
@@ -29,18 +29,18 @@
: mSettings( settings ), QDialog( parent, fl )
{
// create base widgets;
- setWindowTitle( tr( "Road graph plugins settings" ) );
+ setWindowTitle( tr( "Road graph plugin settings" ) );
QVBoxLayout *v = new QVBoxLayout( this );
QHBoxLayout *h = new QHBoxLayout();
- QLabel *l = new QLabel( tr( "Plugins time unit:" ), this );
+ QLabel *l = new QLabel( tr( "Time unit" ), this );
h->addWidget( l );
mcbPluginsTimeUnit = new QComboBox( this );
h->addWidget( mcbPluginsTimeUnit );
v->addLayout( h );
h = new QHBoxLayout();
- l = new QLabel( tr( "Plugins distance unit:" ), this );
+ l = new QLabel( tr( "Distance unit" ), this );
h->addWidget( l );
mcbPluginsDistanceUnit = new QComboBox( this );
h->addWidget( mcbPluginsDistanceUnit );
Modified: trunk/qgis/src/plugins/roadgraph/shortestpathwidget.cpp
===================================================================
--- trunk/qgis/src/plugins/roadgraph/shortestpathwidget.cpp 2011-01-28 16:59:08 UTC (rev 15097)
+++ trunk/qgis/src/plugins/roadgraph/shortestpathwidget.cpp 2011-01-28 16:59:17 UTC (rev 15098)
@@ -62,7 +62,7 @@
QHBoxLayout *h = NULL;
QLabel *l = NULL;
- l = new QLabel( tr( "Start:" ), myWidget );
+ l = new QLabel( tr( "Start" ), myWidget );
v->addWidget( l );
h = new QHBoxLayout();
mFrontPointLineEdit = new QLineEdit( myWidget );
@@ -74,7 +74,7 @@
h->addWidget( selectFrontPoint );
v->addLayout( h );
- l = new QLabel( tr( "Stop:" ), myWidget );
+ l = new QLabel( tr( "Stop" ), myWidget );
v->addWidget( l );
h = new QHBoxLayout();
mBackPointLineEdit = new QLineEdit( myWidget );
@@ -87,7 +87,7 @@
v->addLayout( h );
h = new QHBoxLayout( this );
- l = new QLabel( tr( "Criterion:" ), myWidget );
+ l = new QLabel( tr( "Criterion" ), myWidget );
mCriterionName = new QComboBox( myWidget );
mCriterionName->insertItem( 0, tr( "Length" ) );
mCriterionName->insertItem( 1, tr( "Time" ) );
@@ -96,7 +96,7 @@
v->addLayout( h );
h = new QHBoxLayout( myWidget );
- l = new QLabel( tr( "Length:" ), myWidget );
+ l = new QLabel( tr( "Length" ), myWidget );
mPathCostLineEdit = new QLineEdit( myWidget );
mPathCostLineEdit->setReadOnly( true );
h->addWidget( l );
@@ -104,7 +104,7 @@
v->addLayout( h );
h = new QHBoxLayout( myWidget );
- l = new QLabel( tr( "Time:" ), myWidget );
+ l = new QLabel( tr( "Time" ), myWidget );
mPathTimeLineEdit = new QLineEdit( myWidget );
mPathTimeLineEdit->setReadOnly( true );
h->addWidget( l );
@@ -228,7 +228,7 @@
{
const RgGraphDirector *director = mPlugin->director();
director->makeGraph( &builder );
-
+
// not need
delete director;
}
@@ -238,13 +238,13 @@
p1 = builder.tiePoint( mFrontPoint, ok );
if ( !ok )
{
- QMessageBox::critical (this, tr("Tie point failed"), tr("Start point don't tie to the road!") );
+ QMessageBox::critical( this, tr( "Tie point failed" ), tr( "Start point doesn't tie to the road!" ) );
return false;
}
p2 = builder.tiePoint( mBackPoint, ok );
if ( !ok )
{
- QMessageBox::critical (this, tr("Tie point failed"), tr("Stop point don't tie to the road!") );
+ QMessageBox::critical( this, tr( "Tie point failed" ), tr( "Stop point doesn't tie to the road!" ) );
return false;
}
AdjacencyMatrix m = builder.adjacencyMatrix();
More information about the QGIS-commit
mailing list