Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

QDeepLandia v1.0.0 #1

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*~
*~
config.ini
data
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ endif

SOURCES=__init__.py \
metadata.txt \
qdeeplandia.py
qdeeplandia.py \
config.ini \
inferenceTask.py \
feedback.py \
gui \
img \
processing_provider

ZIP_FILE=$(PLUGIN_NAME)-$(VERSION).zip

Expand Down
12 changes: 12 additions & 0 deletions config.ini.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[status]
status = dev

[running]
processes = 1

[symlink]
aerial = /path/to/aerial/dataset/
tanzania = /path/to/tanzania/dataset/

[folder]
project_folder = /path/to/static/files/
20 changes: 20 additions & 0 deletions feedback.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from qgis.core import Qgis, QgsProcessingFeedback, QgsMessageLog

class Feedback(QgsProcessingFeedback):
"""To provide feedback to the message bar from the express tools"""

def __init__(self, iface):
super().__init__()
self.iface = iface
self.fatal_errors = []

def reportError(self, error, fatalError=False):
QgsMessageLog.logMessage(str(error), "QDeeplandia")
if fatalError:
self.fatal_errors.append(error)

def pushToUser(self, exception):
QgsMessageLog.logMessage(str(exception), "QDeeplandia")
self.iface.messageBar().pushMessage(
"Error", ", ".join(self.fatal_errors), level=Qgis.Critical, duration=0
)
23 changes: 23 additions & 0 deletions gui/NbLabelDialog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from qgis.PyQt.QtWidgets import QDialog, QWidget, QHBoxLayout, QVBoxLayout, QLabel, QSpinBox, QDialogButtonBox

class NbLabelDialog(QDialog):
def __init__(self,parent):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

White space after ,.

super(NbLabelDialog, self).__init__()

self.VL = QVBoxLayout(self)
self.HL = QHBoxLayout()
self.VL.addLayout(self.HL)

self.label = QLabel(self.tr('Number of label : '))
self.HL.addWidget(self.label)

self.spinbox = QSpinBox()
self.HL.addWidget(self.spinbox)

self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.reject)
self.VL.addWidget(self.buttonBox)

def param(self):
return self.spinbox.value()
Empty file added gui/__init__.py
Empty file.
70 changes: 70 additions & 0 deletions img/load.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading