-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter by resources type using checkbox #29
Conversation
style_checked = self.checkBoxStyle.isChecked() | ||
model_checked = self.checkBoxModel.isChecked() | ||
|
||
filtered_resources = [ |
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.
Actually, I prefer to use qsortfilterproxymodel
for filtering (and search also sorting in the future). Could you try to use qsortfilterproxymodel
? It's more challenging to use of course :)
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.
I have implemented the qsortfilterproxymodel
for filtering in the new commit.
@@ -50,6 +51,16 @@ def __init__(self, parent=None, iface=None): | |||
|
|||
self.pushButtonDownload.clicked.connect(self.download_resource) | |||
|
|||
self.checkBoxGeopackage.stateChanged.connect( |
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.
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.
I checked the API URL used, it only returns three types of resources.
Is there any other API I can use, or can you direct me to the place where I can find the API's.
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.
It's not really documented, but it's from this https://github.com/qgis/QGIS-Django/blob/master/qgis-app/api/urls.py
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.
I will create an issue in that repo to include the other resource type also.
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.
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.
LGTM, thanks @ronitjadhav
#13