Skip to content

Commit 04059eb

Browse files
authoredAug 4, 2017
Merge pull request #4962 from boundlessgeo/unified-layer-dialog-mods
Unified layer dialog mods
2 parents 5e2b17a + fef3bc0 commit 04059eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+195
-239
lines changed
 

‎python/gui/qgsabstractdatasourcewidget.sip

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,19 @@ Destructor
4646
The default implementation does nothing
4747
%End
4848

49+
virtual void addButtonClicked();
50+
%Docstring
51+
Triggered when the add button is clicked, the add layer signal is emitted
52+
Concrete classes should implement the right behavior depending on the layer
53+
being added.
54+
%End
55+
56+
virtual void okButtonClicked();
57+
%Docstring
58+
Triggered when the dialog is accepted, call addButtonClicked() and
59+
emit the accepted() signal
60+
%End
61+
4962
signals:
5063

5164
void connectionsChanged();
@@ -79,6 +92,12 @@ Emitted when a progress dialog is shown by the provider dialog
7992
Emitted when a progress dialog is shown by the provider dialog
8093
%End
8194

95+
void enableButtons( bool enable );
96+
%Docstring
97+
Emitted when the ok/add buttons should be enabled/disabled
98+
%End
99+
100+
82101
protected:
83102

84103
QgsAbstractDataSourceWidget( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags, QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::None );
@@ -94,10 +113,21 @@ Return the widget mode
94113

95114
const QgsMapCanvas *mapCanvas() const;
96115
%Docstring
97-
Return the map canvas (can be null)
116+
Return the map canvas (can be null)
98117
:rtype: QgsMapCanvas
99118
%End
100119

120+
void setupButtons( QDialogButtonBox *buttonBox );
121+
%Docstring
122+
Connect the ok and apply/add buttons to the slots
123+
%End
124+
125+
QPushButton *addButton( ) const;
126+
%Docstring
127+
Return the add Button
128+
:rtype: QPushButton
129+
%End
130+
101131
};
102132

103133
/************************************************************************

‎python/gui/qgsowssourceselect.sip

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ Loads connections from the file
7575
Once connected, available layers are displayed.
7676
%End
7777

78-
virtual void addClicked();
79-
%Docstring
80-
Determines the layers the user selected
81-
%End
82-
8378
void searchFinished();
8479

8580
void on_mChangeCRSButton_clicked();
@@ -214,7 +209,6 @@ Returns a textual description for the authority id
214209

215210

216211

217-
218212
void addWmsListRow( const QDomElement &item, int row );
219213
%Docstring
220214
layer name derived from latest layer selection (updated as long it's not edited manually)

0 commit comments

Comments
 (0)
Please sign in to comment.