|
|
@ -1,6 +1,7 @@ |
|
|
from PyQt6.QtCore import Qt, QTimer, QThreadPool |
|
|
from PyQt6.QtCore import Qt, QTimer, QThreadPool |
|
|
from PyQt6.QtWidgets import QMenu |
|
|
from PyQt6.QtWidgets import QMenu |
|
|
from PyQt6.QtGui import QAction |
|
|
from PyQt6.QtGui import QAction |
|
|
|
|
|
import os |
|
|
|
|
|
|
|
|
from ui.workers import GatherPokemonFormsWorker |
|
|
from ui.workers import GatherPokemonFormsWorker |
|
|
|
|
|
|
|
|
@ -124,3 +125,27 @@ class MainWindowController: |
|
|
|
|
|
|
|
|
def add_encounter_to_set(self): |
|
|
def add_encounter_to_set(self): |
|
|
pass |
|
|
pass |
|
|
|
|
|
|
|
|
|
|
|
def refresh_pokemon_details_panel(self, pfic): |
|
|
|
|
|
details = db.get_pokemon_details(pfic) |
|
|
|
|
|
if details: |
|
|
|
|
|
self.view.name_label.setText(details["name"]) |
|
|
|
|
|
self.view.form_name_label.setText(details["form_name"] if details["form_name"] else "") |
|
|
|
|
|
self.view.national_dex_label.setText(str(details["national_dex"])) |
|
|
|
|
|
self.view.generation_label.setText(str(details["generation"])) |
|
|
|
|
|
self.view.home_checkbox.setChecked(bool(details["storable_in_home"])) |
|
|
|
|
|
#self.view.home_checkbox.stateChanged.connect(self.update_home_storable) |
|
|
|
|
|
self.view.is_baby_form_checkbox.setChecked(bool(details["is_baby_form"])) |
|
|
|
|
|
|
|
|
|
|
|
image_path = f"images-new/{pfic}.png" |
|
|
|
|
|
if os.path.exists(image_path): |
|
|
|
|
|
pixmap = QPixmap(image_path) |
|
|
|
|
|
self.view.image_label.setPixmap(pixmap.scaled(150, 150, Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.SmoothTransformation)) |
|
|
|
|
|
else: |
|
|
|
|
|
self.view.image_label.setText("Image not found") |
|
|
|
|
|
|
|
|
|
|
|
#self.load_evolution_chain(pfic) |
|
|
|
|
|
#self.load_encounter_locations(pfic) |
|
|
|
|
|
self.current_pfic = pfic |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|