This commit is contained in:
2025-07-28 16:23:25 +02:00
parent 94cac31fbb
commit 1cd816c706
7 changed files with 225 additions and 455 deletions
+19 -15
View File
@@ -1,9 +1,4 @@
import os
plugin_dir = os.path.dirname(__file__)
end_find = plugin_dir.rfind('\\')+1
NAME = plugin_dir[end_find:]
from qgis.gui import *
from qgis.core import (
@@ -34,21 +29,25 @@ from qgis.utils import iface
from .tools.resources import (
load_ui,
resources_path,
# resources_path,
send_issues,
)
plugin_dir = os.path.dirname(__file__)
end_find = plugin_dir.rfind('\\') + 1
NAME = plugin_dir[end_find:]
EDITOR_CLASS = load_ui('CenRa_IssuesSend.ui')
class CenRa_Issues(QDialog, EDITOR_CLASS):
class CenRa_Issues(QDialog, EDITOR_CLASS):
def __init__(self, parent=None):
_ = parent
super().__init__()
self.setupUi(self)
self.settings = QgsSettings()
#place connect here
# place connect here
self.annuler_button.clicked.connect(self.close)
self.ok_button.clicked.connect(self.run_sendissues)
@@ -62,17 +61,22 @@ class CenRa_Issues(QDialog, EDITOR_CLASS):
statu_autre = self.check_autre.isChecked()
statu = []
if statu_bug == True : statu = statu + [1]
if statu_aide == True : statu = statu + [3]
if statu_question == True : statu = statu + [5]
if statu_amelioration == True : statu = statu + [2]
if statu_autre == True : statu = statu + [6]
if statu_bug is True:
statu = statu + [1]
if statu_aide is True:
statu = statu + [3]
if statu_question is True:
statu = statu + [5]
if statu_amelioration is True:
statu = statu + [2]
if statu_autre is True:
statu = statu + [6]
if len(statu) >= 1:
import qgis
url = qgis.utils.pluginMetadata(NAME,'tracker')
url = qgis.utils.pluginMetadata(NAME, 'tracker')
print(text_message)
send_info = send_issues(url,text_titre,text_message,statu)
send_info = send_issues(url, text_titre, text_message, statu)
code = send_info.status_code
print(code)
else: