This commit is contained in:
2025-07-28 16:45:44 +02:00
parent 1cd816c706
commit 7a3814a429
3 changed files with 181 additions and 172 deletions
+22 -17
View File
@@ -1,10 +1,4 @@
import os
plugin_dir = os.path.dirname(__file__)
end_find = plugin_dir.rfind('\\')+1
NAME = plugin_dir[end_find:]
#print(NAME)
from qgis.gui import *
from qgis.core import (
@@ -27,7 +21,7 @@ from qgis.PyQt.QtWidgets import (
QInputDialog,
QMenu,
QToolButton,
QTableWidget,
QTableWidget,
QTableWidgetItem,
)
from qgis.utils import iface
@@ -35,21 +29,27 @@ 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:]
# print(NAME)
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)
@@ -63,17 +63,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: