22
22
#include < QSet>
23
23
#include < QList>
24
24
#include < QStringList>
25
+ #include < QVector>
25
26
26
27
#include " qgis.h"
27
28
#include " qgsmaplayer.h"
@@ -712,16 +713,29 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
712
713
* @param msgError
713
714
* @return the number of styles related to current layer
714
715
*/
715
- virtual int listStylesInDatabase ( QStringList &ids, QStringList &names,
716
- QStringList &descriptions, QString &msgError );
716
+ virtual int listStylesInDatabase ( QVector<QString> &ids, QVector<QString> &names,
717
+ QVector<QString> &descriptions, QString &msgError );
717
718
718
719
/* *
719
720
* Will return the named style corresponding to style id provided
720
721
*/
721
722
virtual QString getStyleFromDatabase ( QString styleId, QString &msgError );
722
723
723
- virtual QString loadNamedStyle ( const QString theURI, bool &theResultFlag, bool loadFromLocalDb = false );
724
- virtual bool applyNamedStyle ( QString namedStyle , QString errorMsg );
724
+ /* *
725
+ * Load a named style from file/local db/datasource db
726
+ * @param theURI the URI of the style or the URI of the layer
727
+ * @param theResultFlag will be set to true if a named style is correctly loaded
728
+ * @param loadFromLocalDb if true forces to load from local db instead of datasource one
729
+ */
730
+ virtual QString loadNamedStyle ( const QString theURI, bool &theResultFlag, bool loadFromLocalDb );
731
+
732
+ /* *
733
+ * Calls loadNamedStyle( theURI, theResultFlag, false );
734
+ * Retained for backward compatibility
735
+ */
736
+ virtual QString loadNamedStyle ( const QString theURI, bool &theResultFlag );
737
+
738
+ virtual bool applyNamedStyle (QString namedStyle , QString errorMsg);
725
739
726
740
/* * convert a saved attribute editor element into a AttributeEditor structure as it's used internally.
727
741
* @param elem the DOM element
@@ -1267,15 +1281,15 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
1267
1281
signals:
1268
1282
1269
1283
/* *
1270
- * This signal is emitted when selection was changed
1284
+ * This signal is emited when selection was changed
1271
1285
*
1272
1286
* @param selected Newly selected feature ids
1273
1287
* @param deselected Ids of all features which have previously been selected but are not any more
1274
1288
* @param clearAndSelect In case this is set to true, the old selection was dismissed and the new selection corresponds to selected
1275
1289
*/
1276
1290
void selectionChanged ( const QgsFeatureIds selected, const QgsFeatureIds deselected, const bool clearAndSelect );
1277
1291
1278
- /* * This signal is emitted when selection was changed */
1292
+ /* * This signal is emited when selection was changed */
1279
1293
void selectionChanged ();
1280
1294
1281
1295
/* * This signal is emitted when modifications has been done on layer */
@@ -1284,7 +1298,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
1284
1298
/* * Is emitted, when editing on this layer has started*/
1285
1299
void editingStarted ();
1286
1300
1287
- /* * Is emitted, when edited changes successfully have been written to the data provider */
1301
+ /* * Is emitted, when edited changes succesfully have been written to the data provider */
1288
1302
void editingStopped ();
1289
1303
1290
1304
/* * Is emitted, before changes are commited to the data provider */
0 commit comments