Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Port editor widgets to new API
- Loading branch information
Showing
147 changed files
with
8,066 additions
and
4,923 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
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 |
---|---|---|
|
@@ -61,5 +61,4 @@ class QgsAttributeDialog : QObject | |
int exec(); | ||
void show(); | ||
|
||
void dialogDestroyed(); | ||
}; |
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,47 @@ | ||
/*************************************************************************** | ||
qgsattributeform.h | ||
-------------------------------------- | ||
Date : 3.5.2014 | ||
Copyright : (C) 2014 Matthias Kuhn | ||
Email : matthias dot kuhn at gmx dot 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 QgsAttributeForm : QWidget | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsattributeform.h> | ||
%End | ||
|
||
public: | ||
explicit QgsAttributeForm( QgsVectorLayer* vl, const QgsFeature feature = QgsFeature(), QgsAttributeEditorContext context = QgsAttributeEditorContext(), QWidget *parent = 0 ); | ||
~QgsAttributeForm(); | ||
|
||
const QgsFeature& feature(); | ||
|
||
void hideButtonBox(); | ||
|
||
void showButtonBox(); | ||
|
||
signals: | ||
/** | ||
* Notifies about changes of attributes | ||
* | ||
* @param attribute The name of the attribute that changed. | ||
* @param value The new value of the attribute. | ||
*/ | ||
void attributeChanged( QString attribute, const QVariant& value ); | ||
|
||
public slots: | ||
void changeAttribute( const QString& field, const QVariant& value ); | ||
void setFeature( const QgsFeature& feature ); | ||
bool save(); | ||
void accept(); | ||
void resetValues(); | ||
}; |
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,33 @@ | ||
/*************************************************************************** | ||
qgsattributeforminterface.sip | ||
-------------------------------------- | ||
Date : 12.5.2014 | ||
Copyright : (C) 2014 Matthias Kuhn | ||
Email : matthias dot kuhn at gmx dot 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 QgsAttributeFormInterface | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsattributeforminterface.h> | ||
%End | ||
public: | ||
explicit QgsAttributeFormInterface( QgsAttributeForm* form ); | ||
|
||
virtual bool acceptChanges( const QgsFeature& feat ); | ||
|
||
virtual void initForm(); | ||
|
||
virtual void featureChanged(); | ||
|
||
QgsAttributeForm* form(); | ||
|
||
const QgsFeature& feature(); | ||
}; |
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.
ea91b6f
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.
@m-kuhn could this have caused the following regression: http://hub.qgis.org/issues/10337 ?
ea91b6f
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.
ea91b6f
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.