mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
fix cppcheck issues
This commit is contained in:
parent
205b1367d8
commit
dc93261ce5
@ -251,6 +251,8 @@ static void dumpBacktrace( unsigned int depth )
|
||||
}
|
||||
|
||||
qgsFree( symbol );
|
||||
#else
|
||||
Q_UNUSED( depth );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -48,9 +48,11 @@ static const QString sPluginIcon = ":/compass.svn";
|
||||
QgsCompassPlugin::QgsCompassPlugin( QgisInterface *themQGisIface )
|
||||
: QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType )
|
||||
, mQGisIface( themQGisIface )
|
||||
, mActionRunCompass( 0 )
|
||||
, mActionAboutCompass( 0 )
|
||||
, mQgsCompassPluginGui( 0 )
|
||||
, mDock( 0 )
|
||||
{
|
||||
/** Initialize the plugin */
|
||||
mDock = NULL;
|
||||
}
|
||||
|
||||
QgsCompassPlugin::~QgsCompassPlugin()
|
||||
|
@ -85,8 +85,6 @@ class QgsCompassPlugin: public QObject, public QgisPlugin, private Ui::QgsCompas
|
||||
QString pluginDescriptionQString;
|
||||
//! Category of the plugin
|
||||
QString pluginCategoryQString;
|
||||
//! Plugin type as defined in Plugin::PLUGINTYPE
|
||||
int pluginType;
|
||||
//! Pointer to the QGIS interface object
|
||||
QgisInterface *mQGisIface;
|
||||
//! Pointer to the QAction object used in the menu and toolbar
|
||||
|
@ -75,6 +75,7 @@ CoordinateCapture::CoordinateCapture( QgisInterface * theQgisInterface )
|
||||
, mypCRSLabel( NULL )
|
||||
, mCanvasDisplayPrecision( 5 )
|
||||
, mQGisIface( theQgisInterface )
|
||||
, mUserCrsDisplayPrecision( 5 )
|
||||
, mQActionPointer( NULL )
|
||||
{
|
||||
}
|
||||
|
@ -43,7 +43,12 @@ Builder::Builder( std::string theFname,
|
||||
, fetchedprims( 0 )
|
||||
, fetchedtexts( 0 )
|
||||
, ignoringBlock( false )
|
||||
, current_polyline_willclose( false )
|
||||
, store_next_vertex_for_polyline_close( false )
|
||||
, current_polyline_pointcount( 0 )
|
||||
, closePolyX( 0.0 )
|
||||
, closePolyY( 0.0 )
|
||||
, closePolyZ( 0.0 )
|
||||
, currentBlockX( 0.0 )
|
||||
, currentBlockY( 0.0 )
|
||||
{
|
||||
|
@ -73,7 +73,6 @@ class dxf2shpConverter: public QObject, public QgisPlugin
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
int mPluginType;
|
||||
//! Pointer to the QGIS interface object
|
||||
QgisInterface *mQGisIface;
|
||||
//!pointer to the qaction for this plugin
|
||||
|
@ -103,7 +103,6 @@ class QgsGeorefPlugin: public QObject, public QgisPlugin
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
int mPluginType;
|
||||
//! Pointer to the QGIS interface object
|
||||
QgisInterface *mQGisIface;
|
||||
//!pointer to the qaction for this plugin
|
||||
|
@ -35,7 +35,7 @@ using std::pow;
|
||||
class QgsLinearGeorefTransform : public QgsGeorefTransformInterface
|
||||
{
|
||||
public:
|
||||
QgsLinearGeorefTransform() {}
|
||||
QgsLinearGeorefTransform() : mParameters() {}
|
||||
~QgsLinearGeorefTransform() {}
|
||||
|
||||
bool getOriginScale( QgsPoint &origin, double &scaleX, double &scaleY ) const;
|
||||
@ -62,7 +62,7 @@ class QgsLinearGeorefTransform : public QgsGeorefTransformInterface
|
||||
class QgsHelmertGeorefTransform : public QgsGeorefTransformInterface
|
||||
{
|
||||
public:
|
||||
QgsHelmertGeorefTransform() {}
|
||||
QgsHelmertGeorefTransform() : mHelmertParameters() {}
|
||||
struct HelmertParameters
|
||||
{
|
||||
QgsPoint origin;
|
||||
@ -115,7 +115,7 @@ class QgsGDALGeorefTransform : public QgsGeorefTransformInterface
|
||||
class QgsProjectiveGeorefTransform : public QgsGeorefTransformInterface
|
||||
{
|
||||
public:
|
||||
QgsProjectiveGeorefTransform() {}
|
||||
QgsProjectiveGeorefTransform() : mParameters() {}
|
||||
~QgsProjectiveGeorefTransform() {}
|
||||
|
||||
bool updateParametersFromGCPs( const std::vector<QgsPoint> &mapCoords, const std::vector<QgsPoint> &pixelCoords ) override;
|
||||
|
@ -27,8 +27,12 @@
|
||||
#endif
|
||||
|
||||
QgsRasterChangeCoords::QgsRasterChangeCoords()
|
||||
: mHasCrs( false )
|
||||
, mUL_X( 0. )
|
||||
, mUL_Y( 0. )
|
||||
, mResX( 1. )
|
||||
, mResY( 1. )
|
||||
{
|
||||
mHasCrs = false;
|
||||
}
|
||||
|
||||
void QgsRasterChangeCoords::setRaster( const QString &fileRaster )
|
||||
|
@ -128,6 +128,11 @@ GlobePlugin::GlobePlugin( QgisInterface* theQgisInterface )
|
||||
, mTileSource( 0 )
|
||||
, mElevationManager( 0 )
|
||||
, mObjectPlacer( 0 )
|
||||
, mControlCanvas( 0 )
|
||||
, mSelectedLat( 0. )
|
||||
, mSelectedLon( 0. )
|
||||
, mSelectedElevation( 0. )
|
||||
, mRootNode( 0 )
|
||||
{
|
||||
mIsGlobeRunning = false;
|
||||
//needed to be "seen" by other plugins by doing
|
||||
|
@ -135,7 +135,6 @@ class GlobePlugin : public QObject, public QgisPlugin
|
||||
void setupControls();
|
||||
|
||||
private://! Checks if the globe is open
|
||||
int mPluginType;
|
||||
//! Pointer to the QGIS interface object
|
||||
QgisInterface *mQGisIface;
|
||||
//!pointer to the qaction for this plugin
|
||||
|
@ -64,17 +64,17 @@ QgsGrassMapcalc::QgsGrassMapcalc(
|
||||
QGridLayout *layout = new QGridLayout( mViewFrame );
|
||||
layout->addWidget( mView, 0, 0 );
|
||||
|
||||
mCanvas = new QGraphicsScene( 0, 0, 400, 300 );
|
||||
mCanvas->setBackgroundBrush( QColor( 180, 180, 180 ) );
|
||||
mCanvasScene = new QGraphicsScene( 0, 0, 400, 300 );
|
||||
mCanvasScene->setBackgroundBrush( QColor( 180, 180, 180 ) );
|
||||
|
||||
mPaper = new QGraphicsRectItem();
|
||||
mCanvas->addItem( mPaper );
|
||||
mCanvasScene->addItem( mPaper );
|
||||
mPaper->setBrush( QBrush( QColor( 255, 255, 255 ) ) );
|
||||
mPaper->show();
|
||||
|
||||
resizeCanvas( 400, 300 );
|
||||
|
||||
mView->setScene( mCanvas );
|
||||
mView->setScene( mCanvasScene );
|
||||
|
||||
|
||||
QActionGroup *ag = new QActionGroup( this );
|
||||
@ -211,9 +211,9 @@ QgsGrassMapcalc::QgsGrassMapcalc(
|
||||
mOutput = new QgsGrassMapcalcObject( QgsGrassMapcalcObject::Output );
|
||||
mOutput->setId( nextId() );
|
||||
mOutput->setValue( tr( "Output" ) );
|
||||
mCanvas->addItem( mOutput );
|
||||
mOutput->setCenter(( int )( mCanvas->width() - mOutput->rect().width() ), ( int )( mCanvas->height() / 2 ) );
|
||||
mCanvas->update();
|
||||
mCanvasScene->addItem( mOutput );
|
||||
mOutput->setCenter(( int )( mCanvasScene->width() - mOutput->rect().width() ), ( int )( mCanvasScene->height() / 2 ) );
|
||||
mCanvasScene->update();
|
||||
mOutput->QGraphicsRectItem::show();
|
||||
|
||||
// Set default tool
|
||||
@ -272,7 +272,7 @@ void QgsGrassMapcalc::mousePressEvent( QMouseEvent* e )
|
||||
showOptions( Select );
|
||||
|
||||
QRectF r( p.x() - 5, p.y() - 5, 10, 10 );
|
||||
QList<QGraphicsItem *> l = mCanvas->items( r );
|
||||
QList<QGraphicsItem *> l = mCanvasScene->items( r );
|
||||
|
||||
// Connector precedence (reverse order - connectors are under objects)
|
||||
QList<QGraphicsItem *>::const_iterator it = l.constEnd();
|
||||
@ -331,7 +331,7 @@ void QgsGrassMapcalc::mousePressEvent( QMouseEvent* e )
|
||||
setOption();
|
||||
break;
|
||||
}
|
||||
mCanvas->update();
|
||||
mCanvasScene->update();
|
||||
mLastPoint = p;
|
||||
mStartMovePoint = p;
|
||||
}
|
||||
@ -396,7 +396,7 @@ void QgsGrassMapcalc::mouseMoveEvent( QMouseEvent* e )
|
||||
break;
|
||||
}
|
||||
|
||||
mCanvas->update();
|
||||
mCanvasScene->update();
|
||||
mLastPoint = p;
|
||||
}
|
||||
|
||||
@ -431,7 +431,7 @@ void QgsGrassMapcalc::mouseReleaseEvent( QMouseEvent* e )
|
||||
break;
|
||||
}
|
||||
autoGrow();
|
||||
mCanvas->update();
|
||||
mCanvasScene->update();
|
||||
mLastPoint = p;
|
||||
}
|
||||
|
||||
@ -479,7 +479,7 @@ QStringList QgsGrassMapcalc::checkRegion()
|
||||
QgsDebugMsg( "entered." );
|
||||
QStringList list;
|
||||
|
||||
QList<QGraphicsItem *> l = mCanvas->items();
|
||||
QList<QGraphicsItem *> l = mCanvasScene->items();
|
||||
|
||||
struct Cell_head currentWindow;
|
||||
if ( !QgsGrass::region( QgsGrass::getDefaultGisdbase(),
|
||||
@ -545,7 +545,7 @@ bool QgsGrassMapcalc::inputRegion( struct Cell_head *window, QgsCoordinateRefere
|
||||
return false;
|
||||
}
|
||||
|
||||
QList<QGraphicsItem *> l = mCanvas->items();
|
||||
QList<QGraphicsItem *> l = mCanvasScene->items();
|
||||
|
||||
int count = 0;
|
||||
QList<QGraphicsItem *>::const_iterator it = l.constEnd();
|
||||
@ -706,7 +706,7 @@ void QgsGrassMapcalc::setTool( int tool )
|
||||
delete mObject;
|
||||
if ( mConnector )
|
||||
delete mConnector;
|
||||
mCanvas->update();
|
||||
mCanvasScene->update();
|
||||
}
|
||||
mObject = 0;
|
||||
mConnector = 0;
|
||||
@ -727,7 +727,7 @@ void QgsGrassMapcalc::setTool( int tool )
|
||||
mMapComboBox->currentText() );
|
||||
|
||||
mObject->setCenter( mLastPoint.x(), mLastPoint.y() );
|
||||
mCanvas->addItem( mObject );
|
||||
mCanvasScene->addItem( mObject );
|
||||
mObject->QGraphicsRectItem::show();
|
||||
mActionAddMap->setChecked( true );
|
||||
mView->viewport()->setMouseTracking( true );
|
||||
@ -739,7 +739,7 @@ void QgsGrassMapcalc::setTool( int tool )
|
||||
mObject->setId( nextId() );
|
||||
mObject->setValue( mConstantLineEdit->text() );
|
||||
mObject->setCenter( mLastPoint.x(), mLastPoint.y() );
|
||||
mCanvas->addItem( mObject );
|
||||
mCanvasScene->addItem( mObject );
|
||||
mObject->QGraphicsRectItem::show();
|
||||
mActionAddConstant->setChecked( true );
|
||||
mView->viewport()->setMouseTracking( true );
|
||||
@ -752,7 +752,7 @@ void QgsGrassMapcalc::setTool( int tool )
|
||||
//mObject->setValue ( mFunctionComboBox->currentText() );
|
||||
mObject->setFunction( mFunctions[ mFunctionComboBox->currentIndex()] );
|
||||
mObject->setCenter( mLastPoint.x(), mLastPoint.y() );
|
||||
mCanvas->addItem( mObject );
|
||||
mCanvasScene->addItem( mObject );
|
||||
mObject->QGraphicsRectItem::show();
|
||||
mActionAddFunction->setChecked( true );
|
||||
mView->viewport()->setMouseTracking( true );
|
||||
@ -760,9 +760,9 @@ void QgsGrassMapcalc::setTool( int tool )
|
||||
break;
|
||||
|
||||
case AddConnector:
|
||||
mConnector = new QgsGrassMapcalcConnector( mCanvas );
|
||||
mConnector = new QgsGrassMapcalcConnector( mCanvasScene );
|
||||
mConnector->setId( nextId() );
|
||||
mCanvas->addItem( mConnector );
|
||||
mCanvasScene->addItem( mConnector );
|
||||
mConnector->QGraphicsLineItem::show();
|
||||
mActionAddConnection->setChecked( true );
|
||||
mView->setCursor( QCursor( Qt::CrossCursor ) );
|
||||
@ -772,7 +772,7 @@ void QgsGrassMapcalc::setTool( int tool )
|
||||
showOptions( mTool );
|
||||
setToolActionsOff();
|
||||
mActionDeleteItem->setEnabled( false );
|
||||
mCanvas->update();
|
||||
mCanvasScene->update();
|
||||
}
|
||||
|
||||
void QgsGrassMapcalc::addMap()
|
||||
@ -824,7 +824,7 @@ void QgsGrassMapcalc::deleteItem()
|
||||
mObject = 0;
|
||||
}
|
||||
mActionDeleteItem->setEnabled( false );
|
||||
mCanvas->update();
|
||||
mCanvasScene->update();
|
||||
}
|
||||
|
||||
void QgsGrassMapcalc::keyPressEvent( QKeyEvent * e )
|
||||
@ -927,7 +927,7 @@ void QgsGrassMapcalc::mapChanged()
|
||||
|
||||
mObject->setValue( mMaps[mMapComboBox->currentIndex()],
|
||||
mMapComboBox->currentText() );
|
||||
mCanvas->update();
|
||||
mCanvasScene->update();
|
||||
}
|
||||
|
||||
void QgsGrassMapcalc::constantChanged()
|
||||
@ -940,7 +940,7 @@ void QgsGrassMapcalc::constantChanged()
|
||||
return;
|
||||
|
||||
mObject->setValue( mConstantLineEdit->text() );
|
||||
mCanvas->update();
|
||||
mCanvasScene->update();
|
||||
}
|
||||
|
||||
void QgsGrassMapcalc::functionChanged()
|
||||
@ -953,7 +953,7 @@ void QgsGrassMapcalc::functionChanged()
|
||||
return;
|
||||
|
||||
mObject->setFunction( mFunctions[ mFunctionComboBox->currentIndex()] );
|
||||
mCanvas->update();
|
||||
mCanvasScene->update();
|
||||
}
|
||||
|
||||
void QgsGrassMapcalc::limit( QPoint *point )
|
||||
@ -962,17 +962,17 @@ void QgsGrassMapcalc::limit( QPoint *point )
|
||||
point->setX( 0 );
|
||||
if ( point->y() < 0 )
|
||||
point->setY( 0 );
|
||||
if ( point->x() > mCanvas->width() )
|
||||
point->setX( mCanvas->width() );
|
||||
if ( point->y() > mCanvas->height() )
|
||||
point->setY( mCanvas->height() );
|
||||
if ( point->x() > mCanvasScene->width() )
|
||||
point->setX( mCanvasScene->width() );
|
||||
if ( point->y() > mCanvasScene->height() )
|
||||
point->setY( mCanvasScene->height() );
|
||||
}
|
||||
|
||||
void QgsGrassMapcalc::resizeCanvas( int width, int height )
|
||||
{
|
||||
mCanvas->setSceneRect( 0, 0, width, height );
|
||||
mCanvasScene->setSceneRect( 0, 0, width, height );
|
||||
mPaper->setRect( 0, 0, width, height );
|
||||
mCanvas->update();
|
||||
mCanvasScene->update();
|
||||
}
|
||||
|
||||
void QgsGrassMapcalc::growCanvas( int left, int right, int top, int bottom )
|
||||
@ -980,11 +980,11 @@ void QgsGrassMapcalc::growCanvas( int left, int right, int top, int bottom )
|
||||
QgsDebugMsg( "entered." );
|
||||
QgsDebugMsg( QString( "left = %1 right = %2 top = %3 bottom = %4" ).arg( left ).arg( right ).arg( top ).arg( bottom ) );
|
||||
|
||||
int width = mCanvas->width() + left + right;
|
||||
int height = mCanvas->height() + top + bottom;
|
||||
int width = mCanvasScene->width() + left + right;
|
||||
int height = mCanvasScene->height() + top + bottom;
|
||||
resizeCanvas( width, height );
|
||||
|
||||
QList<QGraphicsItem *> l = mCanvas->items();
|
||||
QList<QGraphicsItem *> l = mCanvasScene->items();
|
||||
|
||||
QList<QGraphicsItem *>::const_iterator it = l.constEnd();
|
||||
while ( it != l.constBegin() )
|
||||
@ -1012,7 +1012,7 @@ void QgsGrassMapcalc::growCanvas( int left, int right, int top, int bottom )
|
||||
}
|
||||
}
|
||||
|
||||
mCanvas->update();
|
||||
mCanvasScene->update();
|
||||
}
|
||||
|
||||
void QgsGrassMapcalc::autoGrow()
|
||||
@ -1022,12 +1022,12 @@ void QgsGrassMapcalc::autoGrow()
|
||||
int thresh = 15;
|
||||
|
||||
int left = 0;
|
||||
int right = mCanvas->width();
|
||||
int right = mCanvasScene->width();
|
||||
int top = 0;
|
||||
int bottom = mCanvas->height();
|
||||
int bottom = mCanvasScene->height();
|
||||
QgsDebugMsg( QString( "left = %1 right = %2 top = %3 bottom = %4" ).arg( left ).arg( right ).arg( top ).arg( bottom ) );
|
||||
|
||||
QList<QGraphicsItem *> l = mCanvas->items();
|
||||
QList<QGraphicsItem *> l = mCanvasScene->items();
|
||||
|
||||
QList<QGraphicsItem *>::const_iterator it = l.constEnd();
|
||||
while ( it != l.constBegin() )
|
||||
@ -1056,9 +1056,9 @@ void QgsGrassMapcalc::autoGrow()
|
||||
QgsDebugMsg( QString( "left = %1 right = %2 top = %3 bottom = %4" ).arg( left ).arg( right ).arg( top ).arg( bottom ) );
|
||||
}
|
||||
left = -left;
|
||||
right = right - mCanvas->width();
|
||||
right = right - mCanvasScene->width();
|
||||
top = -top;
|
||||
bottom = bottom - mCanvas->height();
|
||||
bottom = bottom - mCanvasScene->height();
|
||||
|
||||
growCanvas( left, right, top, bottom );
|
||||
}
|
||||
@ -1151,11 +1151,11 @@ void QgsGrassMapcalc::save()
|
||||
QTextStream stream( &out );
|
||||
|
||||
stream << "<mapcalc>\n";
|
||||
stream << " <canvas width=\"" + QString::number( mCanvas->width() )
|
||||
+ "\" height=\"" + QString::number( mCanvas->height() )
|
||||
stream << " <canvas width=\"" + QString::number( mCanvasScene->width() )
|
||||
+ "\" height=\"" + QString::number( mCanvasScene->height() )
|
||||
+ "\"/>\n";
|
||||
|
||||
QList<QGraphicsItem *> l = mCanvas->items();
|
||||
QList<QGraphicsItem *> l = mCanvasScene->items();
|
||||
|
||||
QList<QGraphicsItem *>::const_iterator it = l.constEnd();
|
||||
while ( it != l.constBegin() )
|
||||
@ -1352,7 +1352,7 @@ void QgsGrassMapcalc::load()
|
||||
obj->setId( id );
|
||||
obj->setValue( value );
|
||||
obj->setCenter( x, y );
|
||||
mCanvas->addItem( obj );
|
||||
mCanvasScene->addItem( obj );
|
||||
obj->show();
|
||||
|
||||
switch ( type )
|
||||
@ -1406,10 +1406,10 @@ void QgsGrassMapcalc::load()
|
||||
if ( id >= mNextId )
|
||||
mNextId = id + 1;
|
||||
|
||||
QgsGrassMapcalcConnector *con = new QgsGrassMapcalcConnector( mCanvas );
|
||||
QgsGrassMapcalcConnector *con = new QgsGrassMapcalcConnector( mCanvasScene );
|
||||
|
||||
con->setId( id );
|
||||
mCanvas->addItem( con );
|
||||
mCanvasScene->addItem( con );
|
||||
con->show();
|
||||
|
||||
QDomNodeList endNodes = e.elementsByTagName( "end" );
|
||||
@ -1455,7 +1455,7 @@ void QgsGrassMapcalc::load()
|
||||
|
||||
mFileName = sel->map;
|
||||
mActionSave->setEnabled( true );
|
||||
mCanvas->update();
|
||||
mCanvasScene->update();
|
||||
}
|
||||
|
||||
void QgsGrassMapcalc::clear()
|
||||
@ -1464,7 +1464,7 @@ void QgsGrassMapcalc::clear()
|
||||
|
||||
setTool( Select );
|
||||
|
||||
QList<QGraphicsItem *> l = mCanvas->items();
|
||||
QList<QGraphicsItem *> l = mCanvasScene->items();
|
||||
|
||||
QList<QGraphicsItem *>::const_iterator it = l.constEnd();
|
||||
while ( it != l.constBegin() )
|
||||
@ -1479,7 +1479,9 @@ void QgsGrassMapcalc::clear()
|
||||
}
|
||||
|
||||
/******************** CANVAS ITEMS ******************************/
|
||||
QgsGrassMapcalcItem::QgsGrassMapcalcItem() : mSelected( false )
|
||||
QgsGrassMapcalcItem::QgsGrassMapcalcItem()
|
||||
: mSelected( false )
|
||||
, mId( -1 )
|
||||
{
|
||||
QgsDebugMsg( "entered." );
|
||||
}
|
||||
@ -1488,16 +1490,6 @@ QgsGrassMapcalcItem::~QgsGrassMapcalcItem()
|
||||
{
|
||||
}
|
||||
|
||||
void QgsGrassMapcalcItem::setSelected( bool s )
|
||||
{
|
||||
mSelected = s;
|
||||
}
|
||||
|
||||
bool QgsGrassMapcalcItem::selected()
|
||||
{
|
||||
return mSelected;
|
||||
}
|
||||
|
||||
/**************************** OBJECT ************************/
|
||||
QgsGrassMapcalcObject::QgsGrassMapcalcObject( int type )
|
||||
: QGraphicsRectItem( -1000, -1000, 50, 20, 0 )
|
||||
@ -1661,10 +1653,10 @@ void QgsGrassMapcalcObject::resetSize()
|
||||
{
|
||||
for ( int i = 0; i < mFunction.inputLabels().size(); i++ )
|
||||
{
|
||||
/*
|
||||
QStringList::Iterator it = mFunction.inputLabels().at(i);
|
||||
#if 0
|
||||
QStringList::Iterator it = mFunction.inputLabels().at( i );
|
||||
QString l = *it;
|
||||
*/
|
||||
#endif
|
||||
QString l = mFunction.inputLabels().at( i );
|
||||
int len = metrics.width( l );
|
||||
if ( len > mInputTextWidth )
|
||||
|
@ -152,7 +152,7 @@ class QgsGrassMapcalc: public QMainWindow, private Ui::QgsGrassMapcalcBase,
|
||||
QgsGrassMapcalcView *mView;
|
||||
|
||||
// Canvas
|
||||
QGraphicsScene *mCanvas;
|
||||
QGraphicsScene *mCanvasScene;
|
||||
|
||||
// Tool
|
||||
int mTool;
|
||||
@ -269,8 +269,8 @@ class QgsGrassMapcalcItem
|
||||
QgsGrassMapcalcItem();
|
||||
virtual ~QgsGrassMapcalcItem();
|
||||
|
||||
virtual void setSelected( bool s );
|
||||
bool selected( void );
|
||||
virtual void setSelected( bool s ) { mSelected = s; }
|
||||
bool selected( void ) { return mSelected; }
|
||||
// virtual void paint ( QPainter * painter,
|
||||
// const QStyleOptionGraphicsItem * option, QWidget * widget );
|
||||
//
|
||||
|
@ -77,6 +77,7 @@ QgsGrassModelItem::QgsGrassModelItem()
|
||||
: mParent( 0 )
|
||||
, mType( QgsGrassModel::None )
|
||||
, mPopulated( false )
|
||||
, mModel( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -287,6 +287,8 @@ QgsGrassModuleOptions::QgsGrassModuleOptions(
|
||||
, mTools( tools )
|
||||
, mModule( module )
|
||||
, mDirect( direct )
|
||||
, mParent( 0 )
|
||||
, mRegionModeComboBox( 0 )
|
||||
{
|
||||
QgsDebugMsg( "called." );
|
||||
|
||||
@ -309,8 +311,8 @@ QgsGrassModuleStandardOptions::QgsGrassModuleStandardOptions(
|
||||
QgisInterface *iface,
|
||||
QString xname, QDomElement qDocElem,
|
||||
bool direct, QWidget * parent, Qt::WindowFlags f )
|
||||
: QWidget( parent, f ),
|
||||
QgsGrassModuleOptions( tools, module, iface, direct )
|
||||
: QWidget( parent, f )
|
||||
, QgsGrassModuleOptions( tools, module, iface, direct )
|
||||
{
|
||||
//QgsDebugMsg( "called." );
|
||||
QgsDebugMsg( QString( "PATH = %1" ).arg( getenv( "PATH" ) ) );
|
||||
|
@ -62,9 +62,24 @@ QgsGrassPlugin::QgsGrassPlugin( QgisInterface * theQgisInterFace )
|
||||
, pluginVersionQString( tr( "0.1" ) )
|
||||
, pluginDescriptionQString( tr( "GRASS layer" ) )
|
||||
, pluginCategoryQString( tr( "Plugins" ) )
|
||||
, mToolBarPointer( 0 )
|
||||
, qGisInterface( theQgisInterFace )
|
||||
, mCanvas( 0 )
|
||||
, mRegionAction( 0 )
|
||||
, mRegion( 0 )
|
||||
, mRegionBand( 0 )
|
||||
, mTools( 0 )
|
||||
, mNewMapset( 0 )
|
||||
, mEdit( 0 )
|
||||
, mOpenMapsetAction( 0 )
|
||||
, mNewMapsetAction( 0 )
|
||||
, mCloseMapsetAction( 0 )
|
||||
, mAddVectorAction( 0 )
|
||||
, mAddRasterAction( 0 )
|
||||
, mOpenToolsAction( 0 )
|
||||
, mEditRegionAction( 0 )
|
||||
, mEditAction( 0 )
|
||||
, mNewVectorAction( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
@ -113,7 +128,7 @@ int QgsGrassPlugin::type()
|
||||
*/
|
||||
void QgsGrassPlugin::initGui()
|
||||
{
|
||||
toolBarPointer = 0;
|
||||
mToolBarPointer = 0;
|
||||
mTools = 0;
|
||||
mNewMapset = 0;
|
||||
mRegion = 0;
|
||||
@ -190,21 +205,21 @@ void QgsGrassPlugin::initGui()
|
||||
qGisInterface->addPluginToMenu( tr( "&GRASS" ), mEditRegionAction );
|
||||
|
||||
// Add the toolbar to the main window
|
||||
toolBarPointer = qGisInterface->addToolBar( tr( "GRASS" ) );
|
||||
toolBarPointer->setObjectName( "GRASS" );
|
||||
mToolBarPointer = qGisInterface->addToolBar( tr( "GRASS" ) );
|
||||
mToolBarPointer->setObjectName( "GRASS" );
|
||||
|
||||
// Add to the toolbar
|
||||
toolBarPointer->addAction( mOpenMapsetAction );
|
||||
toolBarPointer->addAction( mNewMapsetAction );
|
||||
toolBarPointer->addAction( mCloseMapsetAction );
|
||||
toolBarPointer->addSeparator();
|
||||
toolBarPointer->addAction( mAddVectorAction );
|
||||
toolBarPointer->addAction( mAddRasterAction );
|
||||
toolBarPointer->addAction( mNewVectorAction );
|
||||
toolBarPointer->addAction( mEditAction );
|
||||
toolBarPointer->addAction( mOpenToolsAction );
|
||||
toolBarPointer->addAction( mRegionAction );
|
||||
toolBarPointer->addAction( mEditRegionAction );
|
||||
mToolBarPointer->addAction( mOpenMapsetAction );
|
||||
mToolBarPointer->addAction( mNewMapsetAction );
|
||||
mToolBarPointer->addAction( mCloseMapsetAction );
|
||||
mToolBarPointer->addSeparator();
|
||||
mToolBarPointer->addAction( mAddVectorAction );
|
||||
mToolBarPointer->addAction( mAddRasterAction );
|
||||
mToolBarPointer->addAction( mNewVectorAction );
|
||||
mToolBarPointer->addAction( mEditAction );
|
||||
mToolBarPointer->addAction( mOpenToolsAction );
|
||||
mToolBarPointer->addAction( mRegionAction );
|
||||
mToolBarPointer->addAction( mEditRegionAction );
|
||||
|
||||
// Set icons to current theme
|
||||
setCurrentTheme( "" );
|
||||
@ -867,10 +882,10 @@ void QgsGrassPlugin::unload()
|
||||
delete mEditAction;
|
||||
delete mNewVectorAction;
|
||||
|
||||
if ( toolBarPointer )
|
||||
if ( mToolBarPointer )
|
||||
{
|
||||
delete toolBarPointer;
|
||||
toolBarPointer = 0;
|
||||
delete mToolBarPointer;
|
||||
mToolBarPointer = 0;
|
||||
}
|
||||
|
||||
// disconnect slots of QgsGrassPlugin so they're not fired also after unload
|
||||
@ -887,7 +902,7 @@ void QgsGrassPlugin::unload()
|
||||
void QgsGrassPlugin::setCurrentTheme( QString theThemeName )
|
||||
{
|
||||
Q_UNUSED( theThemeName );
|
||||
if ( toolBarPointer )
|
||||
if ( mToolBarPointer )
|
||||
{
|
||||
mOpenMapsetAction->setIcon( getThemeIcon( "grass_open_mapset.png" ) );
|
||||
mNewMapsetAction->setIcon( getThemeIcon( "grass_new_mapset.png" ) );
|
||||
|
@ -144,10 +144,8 @@ class QgsGrassPlugin : public QObject, public QgisPlugin
|
||||
QString pluginDescriptionQString;
|
||||
//! Category of the plugin
|
||||
QString pluginCategoryQString;
|
||||
//! Plugin type as defined in QgisPlugin::PLUGINTYPE
|
||||
int pluginType;
|
||||
//! Pointer to our toolbar
|
||||
QToolBar *toolBarPointer;
|
||||
QToolBar *mToolBarPointer;
|
||||
//! Pointer to the QGIS interface object
|
||||
QgisInterface *qGisInterface;
|
||||
//! Pointer to canvas
|
||||
|
@ -65,7 +65,15 @@ bool QgsGrassUtils::itemExists( QString element, QString item )
|
||||
return fi.exists();
|
||||
}
|
||||
|
||||
QgsGrassElementDialog::QgsGrassElementDialog( QWidget *parent ) : QObject(), mParent( parent )
|
||||
QgsGrassElementDialog::QgsGrassElementDialog( QWidget *parent )
|
||||
: QObject()
|
||||
, mParent( parent )
|
||||
, mDialog( 0 )
|
||||
, mLineEdit( 0 )
|
||||
, mLabel( 0 )
|
||||
, mErrorLabel( 0 )
|
||||
, mOkButton( 0 )
|
||||
, mCancelButton( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -69,6 +69,7 @@ static const QString sPluginIcon = ":/heatmap/heatmap.png";
|
||||
Heatmap::Heatmap( QgisInterface * theQgisInterface )
|
||||
: QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType )
|
||||
, mQGisIface( theQgisInterface )
|
||||
, mDecay( 1. )
|
||||
, mQActionPointer( 0 )
|
||||
{
|
||||
}
|
||||
|
@ -121,7 +121,6 @@ class Heatmap: public QObject, public QgisPlugin
|
||||
|
||||
// MANDATORY PLUGIN PROPERTY DECLARATIONS .....
|
||||
|
||||
int mPluginType;
|
||||
//! Pointer to the QGIS interface object
|
||||
QgisInterface *mQGisIface;
|
||||
//!pointer to the qaction for this plugin
|
||||
|
@ -37,8 +37,8 @@
|
||||
//standard includes
|
||||
|
||||
HeatmapGui::HeatmapGui( QWidget* parent, Qt::WindowFlags fl, QMap<QString, QVariant>* temporarySettings )
|
||||
: QDialog( parent, fl ),
|
||||
mRows( 500 )
|
||||
: QDialog( parent, fl )
|
||||
, mRows( 500 )
|
||||
{
|
||||
setupUi( this );
|
||||
|
||||
|
@ -47,7 +47,6 @@ class QgsOfflineEditingPlugin : public QObject, public QgisPlugin
|
||||
void help();
|
||||
|
||||
private:
|
||||
int mPluginType;
|
||||
//! Pointer to the QGIS interface object
|
||||
QgisInterface* mQGisIface;
|
||||
//!pointer to the qaction for this plugin
|
||||
|
@ -77,9 +77,9 @@ static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI;
|
||||
RoadGraphPlugin::RoadGraphPlugin( QgisInterface * theQgisInterface )
|
||||
: QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType )
|
||||
, mQGisIface( theQgisInterface )
|
||||
, mQSettingsAction( 0 )
|
||||
, mQShortestPathDock( 0 )
|
||||
{
|
||||
|
||||
mQShortestPathDock = NULL;
|
||||
mSettings = new RgLineVectorLayerSettings();
|
||||
mTimeUnitName = "h";
|
||||
mDistanceUnitName = "km";
|
||||
|
@ -114,7 +114,6 @@ class RoadGraphPlugin: public QObject, public QgisPlugin
|
||||
// MANDATORY PLUGIN PROPERTY DECLARATIONS .....
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
int mPluginType;
|
||||
|
||||
//! Pointer to the QGIS interface object
|
||||
QgisInterface *mQGisIface;
|
||||
|
@ -145,7 +145,6 @@ class ShapefileTableDelegate : public QItemDelegate
|
||||
|
||||
private:
|
||||
QStringList mSchemaList;
|
||||
int mCurrentIndex;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -62,8 +62,6 @@ class QgsSpitPlugin: public QObject, public QgisPlugin
|
||||
QString pDescription;
|
||||
//! Category of the plugin
|
||||
QString pCategory;
|
||||
//! Plugin type as defined in QgisPlugin::PLUGINTYPE
|
||||
int ptype;
|
||||
//! Pionter to QGIS main application object
|
||||
QWidget *qgisMainWindow;
|
||||
//! Pointer to the QGIS interface object
|
||||
|
@ -94,7 +94,6 @@ class Topol: public QObject, public QgisPlugin
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
int mPluginType;
|
||||
//! Pointer to the QGIS interface object
|
||||
QgisInterface *mQGisIface;
|
||||
//!pointer to the qaction for this plugin
|
||||
|
@ -60,6 +60,8 @@ void QgsGPSObject::writeXML( QTextStream& stream )
|
||||
|
||||
|
||||
QgsGPSPoint::QgsGPSPoint()
|
||||
: lat( 0. )
|
||||
, lon( 0. )
|
||||
{
|
||||
ele = -std::numeric_limits<double>::max();
|
||||
}
|
||||
|
@ -65,8 +65,17 @@ class GRASS_LIB_EXPORT QgsGrassGisLib
|
||||
QgsRasterInterface *input;
|
||||
int band;
|
||||
int row; // next row to be written
|
||||
Raster() : provider( 0 ), projector( 0 ), input( 0 ), band( 1 ), row( 0 ) {}
|
||||
double noDataValue; // output no data value
|
||||
|
||||
Raster()
|
||||
: provider( 0 )
|
||||
, projector( 0 )
|
||||
, input( 0 )
|
||||
, band( 1 )
|
||||
, row( 0 )
|
||||
, fd( -1 )
|
||||
, noDataValue( -1 )
|
||||
{}
|
||||
};
|
||||
|
||||
static QgsGrassGisLib* instance();
|
||||
|
@ -35,6 +35,9 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
QgsMssqlConnectionItem::QgsMssqlConnectionItem( QgsDataItem* parent, QString name, QString path )
|
||||
: QgsDataCollectionItem( parent, name, path )
|
||||
, mUseGeometryColumns( false )
|
||||
, mUseEstimatedMetadata( false )
|
||||
, mAllowGeometrylessTables( true )
|
||||
{
|
||||
mCapabilities |= Fast;
|
||||
mIconName = "mIconConnect.png";
|
||||
|
@ -2896,6 +2896,8 @@ QOCISpatialResultPrivate::QOCISpatialResultPrivate( QOCISpatialResult *result, c
|
||||
, err( 0 )
|
||||
, svc( const_cast<OCISvcCtx*&>( driver->svc ) )
|
||||
, sql( 0 )
|
||||
, sdoobj( 0 )
|
||||
, sdoind( 0 )
|
||||
, transaction( driver->transaction )
|
||||
, serverVersion( driver->serverVersion )
|
||||
, prefetchRows( driver->prefetchRows )
|
||||
|
@ -27,6 +27,7 @@ QgsGeomColumnTypeThread::QgsGeomColumnTypeThread( QString name, bool useEstimate
|
||||
, mName( name )
|
||||
, mUseEstimatedMetadata( useEstimatedMetaData )
|
||||
, mAllowGeometrylessTables( allowGeometrylessTables )
|
||||
, mStopped( false )
|
||||
{
|
||||
qRegisterMetaType<QgsPostgresLayerProperty>( "QgsPostgresLayerProperty" );
|
||||
}
|
||||
|
@ -76,7 +76,8 @@ QgsWcsCapabilities::QgsWcsCapabilities( QgsDataSourceURI const &theUri )
|
||||
}
|
||||
|
||||
QgsWcsCapabilities::QgsWcsCapabilities()
|
||||
: mCapabilitiesReply( NULL )
|
||||
: mCapabilities()
|
||||
, mCapabilitiesReply( NULL )
|
||||
, mCoverageCount( 0 )
|
||||
{
|
||||
}
|
||||
|
@ -108,6 +108,7 @@ bool QgsWmsSettings::parseUri( QString uriString )
|
||||
QgsWmsCapabilities::QgsWmsCapabilities()
|
||||
: mValid( false )
|
||||
, mLayerCount( -1 )
|
||||
, mCapabilities()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,10 @@ class QgsRequestHandler
|
||||
|
||||
public:
|
||||
|
||||
QgsRequestHandler() {}
|
||||
QgsRequestHandler()
|
||||
: mHeadersSent( false )
|
||||
, mException( 0 )
|
||||
{}
|
||||
virtual ~QgsRequestHandler() {}
|
||||
/**Parses the input and creates a request neutral Parameter/Value map*/
|
||||
virtual void parseInput() = 0;
|
||||
|
@ -65,7 +65,10 @@ static const QString OGC_NAMESPACE = "http://www.opengis.net/ogc";
|
||||
static const QString QGS_NAMESPACE = "http://www.qgis.org/gml";
|
||||
|
||||
QgsWFSServer::QgsWFSServer( const QString& configFilePath, QMap<QString, QString> ¶meters, QgsWFSProjectParser* cp,
|
||||
QgsRequestHandler* rh ): QgsOWSServer( configFilePath, parameters, rh ), mConfigParser( cp )
|
||||
QgsRequestHandler* rh )
|
||||
: QgsOWSServer( configFilePath, parameters, rh )
|
||||
, mWithGeom( true )
|
||||
, mConfigParser( cp )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -68,6 +68,8 @@ QgsWMSServer::QgsWMSServer( const QString& configFilePath, QMap<QString, QString
|
||||
, mCapabilitiesCache( capCache )
|
||||
, mConfigParser( cp )
|
||||
, mOwnsConfigParser( false )
|
||||
, mDrawLegendLayerLabel( true )
|
||||
, mDrawLegendItemLabel( true )
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user