Skip to content

Commit

Permalink
some updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariosmsk committed Sep 25, 2024
1 parent ceb6556 commit d5712d4
Show file tree
Hide file tree
Showing 14 changed files with 66,892 additions and 901 deletions.
3 changes: 3 additions & 0 deletions MouseClick.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def canvasReleaseEvent(self, event):

self.drawSelf.user_choice = ''
self.drawSelf.user_score = 0

if self.drawSelf.level_clicks > 0:
for layer in layers:
if layer.type():
Expand Down Expand Up @@ -160,6 +161,8 @@ def canvasReleaseEvent(self, event):
except:
pass
return
# else:
# self.drawSelf.next_level_go()

def score_function(self, level_weight=2, level_points=0, time_weight=0.25, time_remaining=0,
proximity_weight=10, proximity_factor=0):
Expand Down
190 changes: 0 additions & 190 deletions dataset/template_legend.qpt

This file was deleted.

Binary file added icons/Pathocert-PNG.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/legend2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/legend3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/pathocert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/pathocert_l.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 16 additions & 6 deletions pathoGAME.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def next_station(self):
# f' Live Level Score 0/{str(self.level_percentage[self.level_index - 1])}')
self.dockwidget.heart1_btn.setEnabled(True)
# Level clicks to find the location of contamination
self.level_clicks = 2
self.level_clicks = 2 # use in mouseclick

self.sensors_bydetection = []
self.detect_time = QTimer()
Expand Down Expand Up @@ -900,11 +900,21 @@ def run(self):
self.dockwidget = pathoGAMEDockWidget()
self.dockwidget_score_list = pathoGAMEDockWidgetScoreList()

legend = QPixmap(os.path.join(self.plugin_dir, 'icons/legend.png'))
scaledImage = legend.scaled(250, 180, Qt.KeepAspectRatio)
self.dockwidget.legend_label.setPixmap(scaledImage)
self.dockwidget.kios_logo.setPixmap(QPixmap(os.path.join(self.plugin_dir, 'icons/kios.png')))
self.dockwidget.pathocert_logo.setPixmap(QPixmap(os.path.join(self.plugin_dir, 'icons/pathocert_logo.png')))
# legend = QPixmap(os.path.join(self.plugin_dir, 'icons/legend.png'))
# scaledImage = legend.scaled(250, 119, Qt.KeepAspectRatio, Qt.SmoothTransformation)
# self.dockwidget.legend_label.setPixmap(scaledImage)

# self.dockwidget.kios_logo.setPixmap(QPixmap(os.path.join(self.plugin_dir, 'icons/kios_l.png')))
# self.dockwidget.pathocert_logo.setPixmap(QPixmap(os.path.join(self.plugin_dir, 'icons/pathocert_l.png')))
# Load and scale PathoCERT logo with high-quality scaling
pathocert_pixmap = QPixmap(os.path.join(self.plugin_dir, 'icons/pathocert_l.png'))
scaled_pathocert_pixmap = pathocert_pixmap.scaled(150, 55, Qt.KeepAspectRatio, Qt.SmoothTransformation)
self.dockwidget.pathocert_logo.setPixmap(scaled_pathocert_pixmap)

# Load and scale KIOS logo with high-quality scaling
kios_pixmap = QPixmap(os.path.join(self.plugin_dir, 'icons/kios_l.png'))
scaled_kios_pixmap = kios_pixmap.scaled(150, 55, Qt.KeepAspectRatio, Qt.SmoothTransformation)
self.dockwidget.kios_logo.setPixmap(scaled_kios_pixmap)

# add hearts
heart_path_btn = os.path.join(self.plugin_dir, 'icons/heart.png')
Expand Down
9 changes: 9 additions & 0 deletions pathoGAME_dockwidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@
"""

import os
import os
import sys

# Add the plugin path to the Python sys.path if it isn't already present
plugin_path = os.path.dirname(__file__)
if plugin_path not in sys.path:
sys.path.append(plugin_path)

import resources_rc

from qgis.PyQt import QtGui, QtWidgets, uic
from qgis.PyQt.QtCore import pyqtSignal
Expand Down
Loading

0 comments on commit d5712d4

Please sign in to comment.