mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Migrate to PySide6
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""Combo box for selecting aircraft types."""
|
||||
from PySide2.QtWidgets import QComboBox
|
||||
from PySide6.QtWidgets import QComboBox
|
||||
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
|
||||
@@ -11,7 +11,7 @@ class QAircraftTypeSelector(QComboBox):
|
||||
super().__init__()
|
||||
|
||||
self.model().sort(0)
|
||||
self.setSizeAdjustPolicy(self.AdjustToContents)
|
||||
self.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToContents)
|
||||
self.update_items(aircraft_types)
|
||||
|
||||
def update_items(self, aircraft_types: list[AircraftType]):
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""Combo box for selecting a departure airfield."""
|
||||
from typing import Iterable, Optional
|
||||
|
||||
from PySide2.QtWidgets import QComboBox
|
||||
from PySide6.QtWidgets import QComboBox
|
||||
from dcs.unittype import FlyingType
|
||||
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from PySide2.QtCore import QSortFilterProxyModel, Qt
|
||||
from PySide2.QtWidgets import QComboBox, QCompleter
|
||||
from PySide6.QtCore import QSortFilterProxyModel, Qt
|
||||
from PySide6.QtWidgets import QComboBox, QCompleter
|
||||
|
||||
|
||||
class QFilteredComboBox(QComboBox):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Combo box for selecting a flight's task type."""
|
||||
|
||||
from PySide2.QtWidgets import QComboBox
|
||||
from PySide6.QtWidgets import QComboBox
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.settings.settings import Settings
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from PySide2.QtGui import QStandardItem, QStandardItemModel
|
||||
from PySide6.QtGui import QStandardItem, QStandardItemModel
|
||||
|
||||
from game import Game
|
||||
from game.ato.flightwaypoint import FlightWaypoint
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import logging
|
||||
|
||||
from PySide2.QtWidgets import QComboBox
|
||||
from PySide6.QtWidgets import QComboBox
|
||||
|
||||
from game.squadrons import Squadron
|
||||
|
||||
@@ -13,7 +13,7 @@ class SquadronLiverySelector(QComboBox):
|
||||
|
||||
def __init__(self, squadron: Squadron) -> None:
|
||||
super().__init__()
|
||||
self.setSizeAdjustPolicy(self.AdjustToContents)
|
||||
self.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToContents)
|
||||
|
||||
self.aircraft_type = squadron.aircraft
|
||||
selected_livery = squadron.livery
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from PySide2.QtWidgets import QComboBox
|
||||
from PySide6.QtWidgets import QComboBox
|
||||
|
||||
from game.ato import FlightType
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
|
||||
Reference in New Issue
Block a user