-
-
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.
Export QgsOptional<QgsExpression> to dll/so
- Loading branch information
Showing
6 changed files
with
108 additions
and
20 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -130,8 +130,8 @@ class CORE_EXPORT QgsOptional | |
} | ||
|
||
private: | ||
T mData; | ||
bool mEnabled; | ||
T mData; | ||
}; | ||
|
||
#endif // QGSOPTIONAL_H |
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,48 @@ | ||
/*************************************************************************** | ||
qgsoptionalexpression - QgsOptionalExpression | ||
--------------------- | ||
begin : 14.9.2016 | ||
copyright : (C) 2016 by Matthias Kuhn | ||
email : matthias@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. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgsoptionalexpression.h" | ||
|
||
QgsOptionalExpression::QgsOptionalExpression() | ||
: QgsOptional<QgsExpression>() | ||
{ | ||
|
||
} | ||
|
||
QgsOptionalExpression::QgsOptionalExpression( const QgsExpression& expression ) | ||
: QgsOptional<QgsExpression>( expression ) | ||
{ | ||
|
||
} | ||
|
||
QgsOptionalExpression::QgsOptionalExpression( const QgsExpression& expression, bool enabled ) | ||
: QgsOptional<QgsExpression>( expression, enabled ) | ||
{ | ||
|
||
} | ||
|
||
void QgsOptionalExpression::writeXml( QDomElement& element ) | ||
{ | ||
QDomText exp = element.ownerDocument().createTextNode( data().expression() ); | ||
element.setAttribute( "enabled", enabled() ); | ||
element.appendChild( exp ); | ||
} | ||
|
||
void QgsOptionalExpression::readXml( const QDomElement& element ) | ||
{ | ||
setEnabled( element.attribute( "enabled" ).toInt() ); | ||
setData( element.text() ); | ||
} |
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
632da63
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @m-kuhn for this commit!