mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
indentation update [ci skip]
This commit is contained in:
parent
4d4fa44605
commit
e48a6f642f
@ -37,7 +37,7 @@ class QgsHeatmapRenderer : QgsFeatureRendererV2
|
||||
* @see colorRamp
|
||||
*/
|
||||
void setColorRamp( QgsVectorColorRampV2* ramp /Transfer/ );
|
||||
|
||||
|
||||
/**Returns whether the ramp is inverted
|
||||
* @returns true if color ramp is inverted
|
||||
* @see setInvertRamp
|
||||
@ -121,7 +121,7 @@ class QgsHeatmapRenderer : QgsFeatureRendererV2
|
||||
* @see renderQuality
|
||||
*/
|
||||
void setRenderQuality( const int quality );
|
||||
|
||||
|
||||
/**Returns the expression used for weighting points when generating the heatmap.
|
||||
* @returns point weight expression. If empty, all points are equally weighted.
|
||||
* @see setWeightExpression
|
||||
|
@ -54,7 +54,7 @@ class QgsSymbolV2
|
||||
SymbolType type() const;
|
||||
|
||||
// symbol layers handling
|
||||
|
||||
|
||||
/**Returns list of symbol layers contained in the symbol.
|
||||
* @returns symbol layers list
|
||||
* @note added in QGIS 2.7
|
||||
|
@ -17,7 +17,7 @@ class QgsHeatmapRendererWidget : QgsRendererV2Widget
|
||||
* @param renderer the mask renderer (will take ownership)
|
||||
*/
|
||||
QgsHeatmapRendererWidget( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer );
|
||||
|
||||
|
||||
/** @returns the current feature renderer */
|
||||
virtual QgsFeatureRendererV2* renderer();
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ class buildvrt(GdalAlgorithm):
|
||||
RESOLUTION = 'RESOLUTION'
|
||||
SEPARATE = 'SEPARATE'
|
||||
PROJ_DIFFERENCE = 'PROJ_DIFFERENCE'
|
||||
|
||||
|
||||
RESOLUTION_OPTIONS = ['average', 'highest', 'lowest']
|
||||
|
||||
def defineCharacteristics(self):
|
||||
|
@ -73,9 +73,9 @@ class Ogr2OgrToPostGis(OgrAlgorithm):
|
||||
ADDFIELDS = 'ADDFIELDS'
|
||||
LAUNDER = 'LAUNDER'
|
||||
INDEX = 'INDEX'
|
||||
SKIPFAILURES = 'SKIPFAILURES'
|
||||
SKIPFAILURES = 'SKIPFAILURES'
|
||||
OPTIONS = 'OPTIONS'
|
||||
|
||||
|
||||
def defineCharacteristics(self):
|
||||
self.name = 'Import Vector into PostGIS database (new connection)'
|
||||
self.group = '[OGR] Miscellaneous'
|
||||
@ -89,7 +89,7 @@ class Ogr2OgrToPostGis(OgrAlgorithm):
|
||||
self.addParameter(ParameterString(self.HOST, 'Host',
|
||||
'localhost', optional=False))
|
||||
self.addParameter(ParameterString(self.PORT, 'Port',
|
||||
'5432', optional=False))
|
||||
'5432', optional=False))
|
||||
self.addParameter(ParameterString(self.USER, 'Username',
|
||||
'', optional=False))
|
||||
self.addParameter(ParameterString(self.DBNAME, 'Database Name',
|
||||
@ -114,15 +114,15 @@ class Ogr2OgrToPostGis(OgrAlgorithm):
|
||||
self.addParameter(ParameterBoolean(self.CLIP,
|
||||
'Clip the input layer using the above (rectangle) extent', False))
|
||||
self.addParameter(ParameterString(self.WHERE, 'Select features using a SQL "WHERE" statement (Ex: column="value")',
|
||||
'', optional=True))
|
||||
'', optional=True))
|
||||
self.addParameter(ParameterString(self.GT, 'Group "n" features per transaction (Default: 20000)',
|
||||
'', optional=True))
|
||||
self.addParameter(ParameterBoolean(self.OVERWRITE,
|
||||
'Overwrite existing table?', True))
|
||||
'Overwrite existing table?', True))
|
||||
self.addParameter(ParameterBoolean(self.APPEND,
|
||||
'Append to existing table?', False))
|
||||
'Append to existing table?', False))
|
||||
self.addParameter(ParameterBoolean(self.ADDFIELDS,
|
||||
'Append and add new fields to existing table?', False))
|
||||
'Append and add new fields to existing table?', False))
|
||||
self.addParameter(ParameterBoolean(self.LAUNDER,
|
||||
'Do not launder columns/table name/s?', False))
|
||||
self.addParameter(ParameterBoolean(self.INDEX,
|
||||
@ -142,9 +142,9 @@ class Ogr2OgrToPostGis(OgrAlgorithm):
|
||||
user = unicode(self.getParameterValue(self.USER))
|
||||
dbname = unicode(self.getParameterValue(self.DBNAME))
|
||||
password = unicode(self.getParameterValue(self.PASSWORD))
|
||||
schema = unicode(self.getParameterValue(self.SCHEMA))
|
||||
schema = unicode(self.getParameterValue(self.SCHEMA))
|
||||
schemastring = "-lco SCHEMA="+schema
|
||||
table = unicode(self.getParameterValue(self.TABLE))
|
||||
table = unicode(self.getParameterValue(self.TABLE))
|
||||
pk = unicode(self.getParameterValue(self.PK))
|
||||
pkstring = "-lco FID="+pk
|
||||
geocolumn = unicode(self.getParameterValue(self.GEOCOLUMN))
|
||||
@ -152,13 +152,13 @@ class Ogr2OgrToPostGis(OgrAlgorithm):
|
||||
dim = self.DIMLIST[self.getParameterValue(self.DIM)]
|
||||
dimstring = "-lco DIM="+dim
|
||||
simplify = unicode(self.getParameterValue(self.SIMPLIFY))
|
||||
segmentize = unicode(self.getParameterValue(self.SEGMENTIZE))
|
||||
segmentize = unicode(self.getParameterValue(self.SEGMENTIZE))
|
||||
spat = self.getParameterValue(self.SPAT)
|
||||
ogrspat = self.ogrConnectionString(spat)
|
||||
clip = self.getParameterValue(self.CLIP)
|
||||
clip = self.getParameterValue(self.CLIP)
|
||||
where = unicode(self.getParameterValue(self.WHERE))
|
||||
wherestring = "-where '"+where+"'"
|
||||
gt = unicode(self.getParameterValue(self.GT))
|
||||
gt = unicode(self.getParameterValue(self.GT))
|
||||
overwrite = self.getParameterValue(self.OVERWRITE)
|
||||
append = self.getParameterValue(self.APPEND)
|
||||
addfields = self.getParameterValue(self.ADDFIELDS)
|
||||
@ -171,7 +171,7 @@ class Ogr2OgrToPostGis(OgrAlgorithm):
|
||||
|
||||
arguments = []
|
||||
arguments.append('-progress')
|
||||
arguments.append('--config PG_USE_COPY YES')
|
||||
arguments.append('--config PG_USE_COPY YES')
|
||||
arguments.append('-f')
|
||||
arguments.append('PostgreSQL')
|
||||
arguments.append('PG:"host=')
|
||||
@ -185,7 +185,7 @@ class Ogr2OgrToPostGis(OgrAlgorithm):
|
||||
arguments.append('password=')
|
||||
arguments.append(password)
|
||||
arguments.append('"')
|
||||
arguments.append(dimstring)
|
||||
arguments.append(dimstring)
|
||||
arguments.append(ogrLayer)
|
||||
if index:
|
||||
arguments.append(indexstring)
|
||||
@ -208,13 +208,13 @@ class Ogr2OgrToPostGis(OgrAlgorithm):
|
||||
arguments.append(pkstring)
|
||||
if len(table) > 0:
|
||||
arguments.append('-nln')
|
||||
arguments.append(table)
|
||||
arguments.append(table)
|
||||
if len(ssrs) > 0:
|
||||
arguments.append('-s_srs')
|
||||
arguments.append(ssrs)
|
||||
arguments.append(ssrs)
|
||||
if len(tsrs) > 0:
|
||||
arguments.append('-t_srs')
|
||||
arguments.append(tsrs)
|
||||
arguments.append(tsrs)
|
||||
if len(spat) > 0:
|
||||
regionCoords = ogrspat.split(',')
|
||||
arguments.append('-spat')
|
||||
@ -227,7 +227,7 @@ class Ogr2OgrToPostGis(OgrAlgorithm):
|
||||
if skipfailures:
|
||||
arguments.append('-skipfailures')
|
||||
if where:
|
||||
arguments.append(wherestring)
|
||||
arguments.append(wherestring)
|
||||
if len(simplify) > 0:
|
||||
arguments.append('-simplify')
|
||||
arguments.append(simplify)
|
||||
|
@ -76,14 +76,14 @@ class Ogr2OgrToPostGisList(OgrAlgorithm):
|
||||
ADDFIELDS = 'ADDFIELDS'
|
||||
LAUNDER = 'LAUNDER'
|
||||
INDEX = 'INDEX'
|
||||
SKIPFAILURES = 'SKIPFAILURES'
|
||||
SKIPFAILURES = 'SKIPFAILURES'
|
||||
OPTIONS = 'OPTIONS'
|
||||
|
||||
def dbConnectionNames(self):
|
||||
settings = QSettings()
|
||||
settings.beginGroup('/PostgreSQL/connections/')
|
||||
return settings.childGroups()
|
||||
|
||||
|
||||
def defineCharacteristics(self):
|
||||
self.name = 'Import Vector into PostGIS database (available connections)'
|
||||
self.group = '[OGR] Miscellaneous'
|
||||
@ -115,15 +115,15 @@ class Ogr2OgrToPostGisList(OgrAlgorithm):
|
||||
self.addParameter(ParameterBoolean(self.CLIP,
|
||||
'Clip the input layer using the above (rectangle) extent', False))
|
||||
self.addParameter(ParameterString(self.WHERE, 'Select features using a SQL "WHERE" statement (Ex: column="value")',
|
||||
'', optional=True))
|
||||
'', optional=True))
|
||||
self.addParameter(ParameterString(self.GT, 'Group "n" features per transaction (Default: 20000)',
|
||||
'', optional=True))
|
||||
self.addParameter(ParameterBoolean(self.OVERWRITE,
|
||||
'Overwrite existing table?', True))
|
||||
'Overwrite existing table?', True))
|
||||
self.addParameter(ParameterBoolean(self.APPEND,
|
||||
'Append to existing table?', False))
|
||||
'Append to existing table?', False))
|
||||
self.addParameter(ParameterBoolean(self.ADDFIELDS,
|
||||
'Append and add new fields to existing table?', False))
|
||||
'Append and add new fields to existing table?', False))
|
||||
self.addParameter(ParameterBoolean(self.LAUNDER,
|
||||
'Do not launder columns/table name/s?', False))
|
||||
self.addParameter(ParameterBoolean(self.INDEX,
|
||||
@ -146,9 +146,9 @@ class Ogr2OgrToPostGisList(OgrAlgorithm):
|
||||
ogrLayer = self.ogrConnectionString(inLayer)
|
||||
ssrs = unicode(self.getParameterValue(self.S_SRS))
|
||||
tsrs = unicode(self.getParameterValue(self.T_SRS))
|
||||
schema = unicode(self.getParameterValue(self.SCHEMA))
|
||||
schema = unicode(self.getParameterValue(self.SCHEMA))
|
||||
schemastring = "-lco SCHEMA="+schema
|
||||
table = unicode(self.getParameterValue(self.TABLE))
|
||||
table = unicode(self.getParameterValue(self.TABLE))
|
||||
pk = unicode(self.getParameterValue(self.PK))
|
||||
pkstring = "-lco FID="+pk
|
||||
geocolumn = unicode(self.getParameterValue(self.GEOCOLUMN))
|
||||
@ -156,13 +156,13 @@ class Ogr2OgrToPostGisList(OgrAlgorithm):
|
||||
dim = self.DIMLIST[self.getParameterValue(self.DIM)]
|
||||
dimstring = "-lco DIM="+dim
|
||||
simplify = unicode(self.getParameterValue(self.SIMPLIFY))
|
||||
segmentize = unicode(self.getParameterValue(self.SEGMENTIZE))
|
||||
segmentize = unicode(self.getParameterValue(self.SEGMENTIZE))
|
||||
spat = self.getParameterValue(self.SPAT)
|
||||
ogrspat = self.ogrConnectionString(spat)
|
||||
clip = self.getParameterValue(self.CLIP)
|
||||
clip = self.getParameterValue(self.CLIP)
|
||||
where = unicode(self.getParameterValue(self.WHERE))
|
||||
wherestring = "-where '"+where+"'"
|
||||
gt = unicode(self.getParameterValue(self.GT))
|
||||
gt = unicode(self.getParameterValue(self.GT))
|
||||
overwrite = self.getParameterValue(self.OVERWRITE)
|
||||
append = self.getParameterValue(self.APPEND)
|
||||
addfields = self.getParameterValue(self.ADDFIELDS)
|
||||
@ -175,7 +175,7 @@ class Ogr2OgrToPostGisList(OgrAlgorithm):
|
||||
|
||||
arguments = []
|
||||
arguments.append('-progress')
|
||||
arguments.append('--config PG_USE_COPY YES')
|
||||
arguments.append('--config PG_USE_COPY YES')
|
||||
arguments.append('-f')
|
||||
arguments.append('PostgreSQL')
|
||||
arguments.append('PG:"host=')
|
||||
@ -189,7 +189,7 @@ class Ogr2OgrToPostGisList(OgrAlgorithm):
|
||||
arguments.append('password=')
|
||||
arguments.append(password)
|
||||
arguments.append('"')
|
||||
arguments.append(dimstring)
|
||||
arguments.append(dimstring)
|
||||
arguments.append(ogrLayer)
|
||||
if index:
|
||||
arguments.append(indexstring)
|
||||
@ -212,13 +212,13 @@ class Ogr2OgrToPostGisList(OgrAlgorithm):
|
||||
arguments.append(pkstring)
|
||||
if len(table) > 0:
|
||||
arguments.append('-nln')
|
||||
arguments.append(table)
|
||||
arguments.append(table)
|
||||
if len(ssrs) > 0:
|
||||
arguments.append('-s_srs')
|
||||
arguments.append(ssrs)
|
||||
arguments.append(ssrs)
|
||||
if len(tsrs) > 0:
|
||||
arguments.append('-t_srs')
|
||||
arguments.append(tsrs)
|
||||
arguments.append(tsrs)
|
||||
if len(spat) > 0:
|
||||
regionCoords = ogrspat.split(',')
|
||||
arguments.append('-spat')
|
||||
@ -231,7 +231,7 @@ class Ogr2OgrToPostGisList(OgrAlgorithm):
|
||||
if skipfailures:
|
||||
arguments.append('-skipfailures')
|
||||
if where:
|
||||
arguments.append(wherestring)
|
||||
arguments.append(wherestring)
|
||||
if len(simplify) > 0:
|
||||
arguments.append('-simplify')
|
||||
arguments.append(simplify)
|
||||
|
@ -151,10 +151,10 @@ class Processing:
|
||||
ProcessingConfig.readSettings()
|
||||
RenderingStyles.loadStyles()
|
||||
Processing.loadFromProviders()
|
||||
|
||||
|
||||
# Inform registered listeners that all providers' algorithms have been loaded
|
||||
Processing.fireAlgsListHasChanged()
|
||||
|
||||
|
||||
@staticmethod
|
||||
def updateAlgsList():
|
||||
"""Call this method when there has been any change that
|
||||
@ -185,7 +185,7 @@ class Processing:
|
||||
called for all registered listeners.
|
||||
"""
|
||||
Processing.listeners.append(listener)
|
||||
|
||||
|
||||
@staticmethod
|
||||
def removeAlgListListener(listener):
|
||||
try:
|
||||
|
@ -1,4 +1,4 @@
|
||||
##Iterate over the features of a layer.
|
||||
##Iterate over the features of a layer.
|
||||
feats = processing.features(layer)
|
||||
n = len(feats)
|
||||
for i, feat in enumerate(feats):
|
||||
@ -9,7 +9,7 @@ for i, feat in enumerate(feats):
|
||||
fields = processing.fields(layer)
|
||||
# int, float and bool can be used as well as types
|
||||
fields.append(('NEW_FIELD', str))
|
||||
writer = processing.VectorWriter(output_file, None, fields,
|
||||
writer = processing.VectorWriter(output_file, None, fields,
|
||||
processing.geomtype(layer), layer.crs())
|
||||
|
||||
##Create a new table
|
||||
|
@ -307,13 +307,13 @@ void QgsAttributeTableDialog::updateFieldFromExpression()
|
||||
|
||||
bool filtered = mMainView->filterMode() != QgsAttributeTableFilterModel::ShowAll;
|
||||
QgsFeatureIds filteredIds = filtered ? mMainView->filteredFeatures() : QgsFeatureIds();
|
||||
this->runFieldCalculation(mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds);
|
||||
this->runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds );
|
||||
}
|
||||
|
||||
void QgsAttributeTableDialog::updateFieldFromExpressionSelected()
|
||||
{
|
||||
QgsFeatureIds filteredIds = mLayer->selectedFeaturesIds();
|
||||
this->runFieldCalculation(mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds);
|
||||
this->runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds );
|
||||
}
|
||||
|
||||
void QgsAttributeTableDialog::runFieldCalculation( QgsVectorLayer* layer, QString fieldName, QString expression, QgsFeatureIds filteredIds )
|
||||
@ -345,7 +345,7 @@ void QgsAttributeTableDialog::runFieldCalculation( QgsVectorLayer* layer, QStrin
|
||||
{
|
||||
if ( !filteredIds.isEmpty() && !filteredIds.contains( feature.id() ) )
|
||||
{
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
|
||||
exp.setCurrentRowNumber( rownum );
|
||||
|
@ -185,7 +185,7 @@ class APP_EXPORT QgsAttributeTableDialog : public QDialog, private Ui::QgsAttrib
|
||||
*/
|
||||
void columnBoxInit();
|
||||
|
||||
void runFieldCalculation( QgsVectorLayer* layer, QString fieldName, QString expression, QgsFeatureIds filteredIds = QgsFeatureIds());
|
||||
void runFieldCalculation( QgsVectorLayer* layer, QString fieldName, QString expression, QgsFeatureIds filteredIds = QgsFeatureIds() );
|
||||
void updateFieldFromExpression();
|
||||
void updateFieldFromExpressionSelected();
|
||||
|
||||
|
@ -67,7 +67,7 @@ class QgsGuiVectorLayerTools : public QgsVectorLayerTools, public QObject
|
||||
* @param layer The layer to commit
|
||||
* @return True if successful
|
||||
*/
|
||||
bool saveEdits( QgsVectorLayer* layer) const;
|
||||
bool saveEdits( QgsVectorLayer* layer ) const;
|
||||
|
||||
private:
|
||||
void commitError( QgsVectorLayer* vlayer ) const;
|
||||
|
@ -296,7 +296,7 @@ class CORE_EXPORT QGis
|
||||
// It's assumed that this works on all systems supporting
|
||||
// QLibrary
|
||||
#if QT_VERSION >= 0x050000
|
||||
#define cast_to_fptr(f) f
|
||||
#define cast_to_fptr(f) f
|
||||
#else
|
||||
inline void ( *cast_to_fptr( void *p ) )()
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ bool QgsMultiRenderChecker::runTest( const QString& theTestName, unsigned int th
|
||||
|
||||
QVector<QgsDartMeasurement> dartMeasurements;
|
||||
|
||||
Q_FOREACH( const QString& suffix, subDirs )
|
||||
Q_FOREACH ( const QString& suffix, subDirs )
|
||||
{
|
||||
qDebug() << "Checking subdir " << suffix;
|
||||
bool result;
|
||||
@ -83,8 +83,8 @@ bool QgsMultiRenderChecker::runTest( const QString& theTestName, unsigned int th
|
||||
|
||||
if ( !successful )
|
||||
{
|
||||
Q_FOREACH( const QgsDartMeasurement& measurement, dartMeasurements )
|
||||
measurement.send();
|
||||
Q_FOREACH ( const QgsDartMeasurement& measurement, dartMeasurements )
|
||||
measurement.send();
|
||||
|
||||
QgsDartMeasurement msg( "Image not accepted by test", QgsDartMeasurement::Text, "This may be caused because the test is supposed to fail or rendering inconsistencies."
|
||||
"If this is a rendering inconsistency, please add another control image folder, add an anomaly image or increase the color tolerance." );
|
||||
|
@ -121,7 +121,7 @@ void QgsDualView::columnBoxInit()
|
||||
// ... If there are primary key(s) defined
|
||||
QStringList pkFields;
|
||||
|
||||
Q_FOREACH( int attr, pkAttrs )
|
||||
Q_FOREACH ( int attr, pkAttrs )
|
||||
{
|
||||
pkFields.append( "COALESCE(\"" + fields[attr].name() + "\", '<NULL>')" );
|
||||
}
|
||||
@ -152,7 +152,7 @@ void QgsDualView::columnBoxInit()
|
||||
mFeatureListPreviewButton->addAction( mActionExpressionPreview );
|
||||
mFeatureListPreviewButton->addAction( mActionPreviewColumnsMenu );
|
||||
|
||||
Q_FOREACH( const QgsField& field, fields )
|
||||
Q_FOREACH ( const QgsField& field, fields )
|
||||
{
|
||||
if ( mLayerCache->layer()->editorWidgetV2( mLayerCache->layer()->fieldNameIndex( field.name() ) ) != "Hidden" )
|
||||
{
|
||||
|
@ -115,9 +115,9 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
|
||||
txtExpressionString->setFoldingVisible( false );
|
||||
customFunctionBotton->setVisible( QgsPythonRunner::isValid() );
|
||||
txtPython->setVisible( false );
|
||||
txtPython->setText("@qgsfunction(args=-1, group='Custom')\n"
|
||||
"def func(values, feature, parent):\n"
|
||||
" return str(values)");
|
||||
txtPython->setText( "@qgsfunction(args=-1, group='Custom')\n"
|
||||
"def func(values, feature, parent):\n"
|
||||
" return str(values)" );
|
||||
}
|
||||
|
||||
|
||||
@ -298,9 +298,10 @@ void QgsExpressionBuilderWidget::setGeomCalculator( const QgsDistanceArea & da )
|
||||
|
||||
QString QgsExpressionBuilderWidget::expressionText()
|
||||
{
|
||||
if ( QgsPythonRunner::isValid() ) {
|
||||
QString pythontext = txtPython->text();
|
||||
QgsPythonRunner::run( pythontext );
|
||||
if ( QgsPythonRunner::isValid() )
|
||||
{
|
||||
QString pythontext = txtPython->text();
|
||||
QgsPythonRunner::run( pythontext );
|
||||
}
|
||||
return txtExpressionString->text();
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ void QgsRelationEditorWidget::toggleEditing( bool state )
|
||||
|
||||
void QgsRelationEditorWidget::saveEdits()
|
||||
{
|
||||
mEditorContext.vectorLayerTools()->saveEdits(mRelation.referencingLayer() );
|
||||
mEditorContext.vectorLayerTools()->saveEdits( mRelation.referencingLayer() );
|
||||
}
|
||||
|
||||
void QgsRelationEditorWidget::onCollapsedStateChanged( bool collapsed )
|
||||
|
@ -71,12 +71,12 @@ class GUI_EXPORT QgsVectorLayerTools
|
||||
*/
|
||||
virtual bool stopEditing( QgsVectorLayer* layer, bool allowCancel = true ) const = 0;
|
||||
|
||||
/**
|
||||
* Should be called, when the features should be commited but the editing session is not ended.
|
||||
*
|
||||
* @param layer The layer to commit
|
||||
* @return True if successful
|
||||
*/
|
||||
/**
|
||||
* Should be called, when the features should be commited but the editing session is not ended.
|
||||
*
|
||||
* @param layer The layer to commit
|
||||
* @return True if successful
|
||||
*/
|
||||
virtual bool saveEdits( QgsVectorLayer* layer ) const = 0;
|
||||
|
||||
};
|
||||
|
@ -48,7 +48,7 @@ QgsBrushStyleComboBox::QgsBrushStyleComboBox( QWidget* parent )
|
||||
{
|
||||
Qt::BrushStyle style = styles.at( i ).first;
|
||||
QString name = styles.at( i ).second;
|
||||
addItem( iconForBrush( style ), name, QVariant( (int)style ) );
|
||||
addItem( iconForBrush( style ), name, QVariant(( int )style ) );
|
||||
}
|
||||
|
||||
setCurrentIndex( 1 );
|
||||
@ -63,7 +63,7 @@ Qt::BrushStyle QgsBrushStyleComboBox::brushStyle() const
|
||||
|
||||
void QgsBrushStyleComboBox::setBrushStyle( Qt::BrushStyle style )
|
||||
{
|
||||
int idx = findData( QVariant( (int)style ) );
|
||||
int idx = findData( QVariant(( int )style ) );
|
||||
setCurrentIndex( idx == -1 ? 0 : idx );
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ QgsPenStyleComboBox::QgsPenStyleComboBox( QWidget* parent )
|
||||
{
|
||||
Qt::PenStyle style = styles.at( i ).first;
|
||||
QString name = styles.at( i ).second;
|
||||
addItem( iconForPen( style ), name, QVariant( (int) style ) );
|
||||
addItem( iconForPen( style ), name, QVariant(( int ) style ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ Qt::PenStyle QgsPenStyleComboBox::penStyle() const
|
||||
|
||||
void QgsPenStyleComboBox::setPenStyle( Qt::PenStyle style )
|
||||
{
|
||||
int idx = findData( QVariant( (int) style ) );
|
||||
int idx = findData( QVariant(( int ) style ) );
|
||||
setCurrentIndex( idx == -1 ? 0 : idx );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user