-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2678 from m-kuhn/transaction-group
[FEATURE] Autotransaction mode and transaction groups
- Loading branch information
Showing
16 changed files
with
685 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/*************************************************************************** | ||
qgstransactiongroup.h - QgsTransactionGroup | ||
|
||
--------------------- | ||
begin : 15.1.2016 | ||
copyright : (C) 2016 by Matthias Kuhn | ||
email : mmatthias@opengis.ch | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
class QgsTransactionGroup : QObject | ||
{ | ||
%TypeHeaderCode | ||
#include "qgstransactiongroup.h" | ||
%End | ||
public: | ||
explicit QgsTransactionGroup( QObject *parent = 0 ); | ||
|
||
~QgsTransactionGroup(); | ||
|
||
/** | ||
* Add a layer to this transaction group. | ||
* | ||
* Will return true if it is compatible and has been added. | ||
*/ | ||
bool addLayer( QgsVectorLayer* layer ); | ||
|
||
/** | ||
* Return the connection string used by this transaction group. | ||
* Layers need be compatible when added. | ||
*/ | ||
QString connString() const; | ||
|
||
/** | ||
* Return the provider key used by this transaction group. | ||
* Layers need be compatible when added. | ||
*/ | ||
QString providerKey() const; | ||
|
||
/** | ||
* Returns true if there are no layers in this transaction group. | ||
*/ | ||
bool isEmpty() const; | ||
|
||
signals: | ||
/** | ||
* Will be emitted whenever there is a commit error | ||
*/ | ||
void commitError( const QString& msg ); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.