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:
parent
93b83f2bc8
commit
c4be00d11b
@ -34,7 +34,7 @@ app.include_router(waypoints.router)
|
|||||||
app.include_router(iadsnetwork.router)
|
app.include_router(iadsnetwork.router)
|
||||||
|
|
||||||
|
|
||||||
origins = []
|
origins = ["file://"]
|
||||||
if ServerSettings.get().cors_allow_debug_server:
|
if ServerSettings.get().cors_allow_debug_server:
|
||||||
origins.append("http://localhost:3000")
|
origins.append("http://localhost:3000")
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from collections.abc import Iterator
|
from collections.abc import Iterator
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
|
||||||
from PySide2.QtWidgets import QWidget
|
from PySide6.QtWidgets import QWidget
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from typing import ContextManager, Optional
|
from typing import ContextManager, Optional
|
||||||
|
|
||||||
from PySide2.QtCore import QModelIndex, Qt, QSize
|
from PySide6.QtCore import QModelIndex, Qt, QSize
|
||||||
from PySide2.QtGui import QPainter, QFont, QFontMetrics, QIcon
|
from PySide6.QtGui import QPainter, QFont, QFontMetrics, QIcon
|
||||||
from PySide2.QtWidgets import QStyledItemDelegate, QStyleOptionViewItem, QStyle
|
from PySide6.QtWidgets import QStyledItemDelegate, QStyleOptionViewItem, QStyle
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
|
|||||||
@ -3,7 +3,7 @@ from collections.abc import Iterator
|
|||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from typing import Type
|
from typing import Type
|
||||||
|
|
||||||
from PySide2.QtWidgets import QDialog, QMessageBox
|
from PySide6.QtWidgets import QDialog, QMessageBox
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
|
|||||||
@ -8,10 +8,10 @@ from pathlib import Path
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
from PySide2 import QtWidgets
|
from PySide6 import QtWidgets
|
||||||
from PySide2.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PySide2.QtGui import QPixmap
|
from PySide6.QtGui import QPixmap
|
||||||
from PySide2.QtWidgets import QApplication, QCheckBox, QSplashScreen
|
from PySide6.QtWidgets import QApplication, QCheckBox, QSplashScreen
|
||||||
from dcs.liveries.liverycache import LiveryCache
|
from dcs.liveries.liverycache import LiveryCache
|
||||||
from dcs.payloads import PayloadDirectories
|
from dcs.payloads import PayloadDirectories
|
||||||
|
|
||||||
@ -87,10 +87,6 @@ def run_ui(game: Optional[Game], ui_flags: UiFlags) -> None:
|
|||||||
|
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
|
|
||||||
app.setAttribute(Qt.AA_DisableWindowContextHelpButton)
|
|
||||||
app.setAttribute(Qt.AA_EnableHighDpiScaling, True) # enable highdpi scaling
|
|
||||||
app.setAttribute(Qt.AA_UseHighDpiPixmaps, True) # use highdpi icons
|
|
||||||
|
|
||||||
# init the theme and load the stylesheet based on the theme index
|
# init the theme and load the stylesheet based on the theme index
|
||||||
liberation_theme.init()
|
liberation_theme.init()
|
||||||
with open(
|
with open(
|
||||||
@ -162,7 +158,7 @@ def run_ui(game: Optional[Game], ui_flags: UiFlags) -> None:
|
|||||||
"Unable to modify Mission Scripting file. Possible issues with rights. "
|
"Unable to modify Mission Scripting file. Possible issues with rights. "
|
||||||
"Try running as admin, or please perform the modification of the MissionScripting file manually."
|
"Try running as admin, or please perform the modification of the MissionScripting file manually."
|
||||||
)
|
)
|
||||||
error_dialog.exec_()
|
error_dialog.exec()
|
||||||
|
|
||||||
# Apply CSS (need works)
|
# Apply CSS (need works)
|
||||||
GameUpdateSignal()
|
GameUpdateSignal()
|
||||||
|
|||||||
@ -4,13 +4,13 @@ from __future__ import annotations
|
|||||||
import datetime
|
import datetime
|
||||||
from typing import Any, Callable, Iterator, Optional, TypeVar
|
from typing import Any, Callable, Iterator, Optional, TypeVar
|
||||||
|
|
||||||
from PySide2.QtCore import (
|
from PySide6.QtCore import (
|
||||||
QAbstractListModel,
|
QAbstractListModel,
|
||||||
QModelIndex,
|
QModelIndex,
|
||||||
Qt,
|
Qt,
|
||||||
Signal,
|
Signal,
|
||||||
)
|
)
|
||||||
from PySide2.QtGui import QIcon
|
from PySide6.QtGui import QIcon
|
||||||
|
|
||||||
from game.ato.airtaaskingorder import AirTaskingOrder
|
from game.ato.airtaaskingorder import AirTaskingOrder
|
||||||
from game.ato.flight import Flight
|
from game.ato.flight import Flight
|
||||||
|
|||||||
@ -5,7 +5,7 @@ from datetime import datetime, timedelta
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Callable, Optional, TYPE_CHECKING
|
from typing import Callable, Optional, TYPE_CHECKING
|
||||||
|
|
||||||
from PySide2.QtCore import QObject, Signal
|
from PySide6.QtCore import QObject, Signal
|
||||||
|
|
||||||
from game.polldebriefingfilethread import PollDebriefingFileThread
|
from game.polldebriefingfilethread import PollDebriefingFileThread
|
||||||
from game.sim.gameloop import GameLoop
|
from game.sim.gameloop import GameLoop
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
from PySide2.QtGui import QPixmap
|
from PySide6.QtGui import QPixmap
|
||||||
|
|
||||||
from .liberation_theme import get_theme_icons
|
from .liberation_theme import get_theme_icons
|
||||||
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@ import logging
|
|||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from PySide2.QtCore import Signal, QObject
|
from PySide6.QtCore import Signal, QObject
|
||||||
from PySide2.QtWidgets import QMessageBox, QApplication
|
from PySide6.QtWidgets import QMessageBox, QApplication
|
||||||
|
|
||||||
|
|
||||||
class UncaughtExceptionHandler(QObject):
|
class UncaughtExceptionHandler(QObject):
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QHBoxLayout, QGroupBox, QPushButton
|
from PySide6.QtWidgets import QHBoxLayout, QGroupBox, QPushButton
|
||||||
|
|
||||||
import qt_ui.uiconstants as CONST
|
import qt_ui.uiconstants as CONST
|
||||||
from game import Game
|
from game import Game
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from PySide2.QtGui import QPixmap
|
from PySide6.QtGui import QPixmap
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QFrame,
|
QFrame,
|
||||||
QGridLayout,
|
QGridLayout,
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QFrame
|
from PySide6.QtWidgets import QFrame
|
||||||
|
|
||||||
|
|
||||||
class QDebriefingInformation(QFrame):
|
class QDebriefingInformation(QFrame):
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QLabel, QGroupBox, QGridLayout
|
from PySide6.QtWidgets import QLabel, QGroupBox, QGridLayout
|
||||||
|
|
||||||
from game import Game
|
from game import Game
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
"""Spin box for selecting the number of aircraft in a flight."""
|
"""Spin box for selecting the number of aircraft in a flight."""
|
||||||
from PySide2.QtWidgets import QSpinBox
|
from PySide6.QtWidgets import QSpinBox
|
||||||
|
|
||||||
|
|
||||||
class QFlightSizeSpinner(QSpinBox):
|
class QFlightSizeSpinner(QSpinBox):
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
from PySide2.QtCore import Signal
|
from PySide6.QtCore import Signal
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QLabel,
|
QLabel,
|
||||||
QPushButton,
|
QPushButton,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QLabel,
|
QLabel,
|
||||||
QPushButton,
|
QPushButton,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QGridLayout,
|
QGridLayout,
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
"""A layout containing a widget with an associated label."""
|
"""A layout containing a widget with an associated label."""
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PySide2.QtWidgets import QHBoxLayout, QLabel, QWidget
|
from PySide6.QtWidgets import QHBoxLayout, QLabel, QWidget
|
||||||
|
|
||||||
|
|
||||||
class QLabeledWidget(QHBoxLayout):
|
class QLabeledWidget(QHBoxLayout):
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
from PySide2 import QtCore, QtGui
|
from PySide6 import QtCore, QtGui
|
||||||
from PySide2.QtWidgets import QCalendarWidget
|
from PySide6.QtWidgets import QCalendarWidget
|
||||||
|
|
||||||
|
|
||||||
class QLiberationCalendar(QCalendarWidget):
|
class QLiberationCalendar(QCalendarWidget):
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
from PySide2.QtCore import Signal
|
from PySide6.QtCore import Signal
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QLabel,
|
QLabel,
|
||||||
QPushButton,
|
QPushButton,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QLabel,
|
QLabel,
|
||||||
QPushButton,
|
QPushButton,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QFrame,
|
QFrame,
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
|
|||||||
@ -2,18 +2,17 @@
|
|||||||
import logging
|
import logging
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtCore import (
|
from PySide6.QtCore import (
|
||||||
QItemSelectionModel,
|
QItemSelectionModel,
|
||||||
QModelIndex,
|
QModelIndex,
|
||||||
QSize,
|
QSize,
|
||||||
Qt,
|
Qt,
|
||||||
)
|
)
|
||||||
from PySide2.QtGui import (
|
from PySide6.QtGui import (
|
||||||
QContextMenuEvent,
|
QContextMenuEvent, QAction,
|
||||||
)
|
)
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QAbstractItemView,
|
QAbstractItemView,
|
||||||
QAction,
|
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QLabel,
|
QLabel,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
"""Widgets for displaying client slots."""
|
"""Widgets for displaying client slots."""
|
||||||
from PySide2.QtWidgets import QLabel
|
from PySide6.QtWidgets import QLabel
|
||||||
|
|
||||||
from qt_ui.models import AtoModel
|
from qt_ui.models import AtoModel
|
||||||
from qt_ui.widgets.QLabeledWidget import QLabeledWidget
|
from qt_ui.widgets.QLabeledWidget import QLabeledWidget
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
"""Combo box for selecting aircraft types."""
|
"""Combo box for selecting aircraft types."""
|
||||||
from PySide2.QtWidgets import QComboBox
|
from PySide6.QtWidgets import QComboBox
|
||||||
|
|
||||||
from game.dcs.aircrafttype import AircraftType
|
from game.dcs.aircrafttype import AircraftType
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ class QAircraftTypeSelector(QComboBox):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
self.model().sort(0)
|
self.model().sort(0)
|
||||||
self.setSizeAdjustPolicy(self.AdjustToContents)
|
self.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToContents)
|
||||||
self.update_items(aircraft_types)
|
self.update_items(aircraft_types)
|
||||||
|
|
||||||
def update_items(self, aircraft_types: list[AircraftType]):
|
def update_items(self, aircraft_types: list[AircraftType]):
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
"""Combo box for selecting a departure airfield."""
|
"""Combo box for selecting a departure airfield."""
|
||||||
from typing import Iterable, Optional
|
from typing import Iterable, Optional
|
||||||
|
|
||||||
from PySide2.QtWidgets import QComboBox
|
from PySide6.QtWidgets import QComboBox
|
||||||
from dcs.unittype import FlyingType
|
from dcs.unittype import FlyingType
|
||||||
|
|
||||||
from game.dcs.aircrafttype import AircraftType
|
from game.dcs.aircrafttype import AircraftType
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
from PySide2.QtCore import QSortFilterProxyModel, Qt
|
from PySide6.QtCore import QSortFilterProxyModel, Qt
|
||||||
from PySide2.QtWidgets import QComboBox, QCompleter
|
from PySide6.QtWidgets import QComboBox, QCompleter
|
||||||
|
|
||||||
|
|
||||||
class QFilteredComboBox(QComboBox):
|
class QFilteredComboBox(QComboBox):
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
"""Combo box for selecting a flight's task type."""
|
"""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.ato.flighttype import FlightType
|
||||||
from game.settings.settings import Settings
|
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 import Game
|
||||||
from game.ato.flightwaypoint import FlightWaypoint
|
from game.ato.flightwaypoint import FlightWaypoint
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PySide2.QtWidgets import QComboBox
|
from PySide6.QtWidgets import QComboBox
|
||||||
|
|
||||||
from game.squadrons import Squadron
|
from game.squadrons import Squadron
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ class SquadronLiverySelector(QComboBox):
|
|||||||
|
|
||||||
def __init__(self, squadron: Squadron) -> None:
|
def __init__(self, squadron: Squadron) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.setSizeAdjustPolicy(self.AdjustToContents)
|
self.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToContents)
|
||||||
|
|
||||||
self.aircraft_type = squadron.aircraft
|
self.aircraft_type = squadron.aircraft
|
||||||
selected_livery = squadron.livery
|
selected_livery = squadron.livery
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from PySide2.QtWidgets import QComboBox
|
from PySide6.QtWidgets import QComboBox
|
||||||
|
|
||||||
from game.ato import FlightType
|
from game.ato import FlightType
|
||||||
from game.dcs.aircrafttype import AircraftType
|
from game.dcs.aircrafttype import AircraftType
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtWidgets import QSpinBox
|
from PySide6.QtWidgets import QSpinBox
|
||||||
|
|
||||||
|
|
||||||
class FloatSpinner(QSpinBox):
|
class FloatSpinner(QSpinBox):
|
||||||
|
|||||||
@ -3,10 +3,9 @@ from __future__ import annotations
|
|||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from PySide2.QtCore import QUrl
|
from PySide6.QtCore import QUrl
|
||||||
from PySide2.QtWebEngineWidgets import (
|
from PySide6.QtWebEngineCore import QWebEnginePage, QWebEngineSettings
|
||||||
QWebEnginePage,
|
from PySide6.QtWebEngineWidgets import (
|
||||||
QWebEngineSettings,
|
|
||||||
QWebEngineView,
|
QWebEngineView,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtWidgets import QButtonGroup, QHBoxLayout, QPushButton, QWidget
|
from PySide6.QtWidgets import QButtonGroup, QHBoxLayout, QPushButton, QWidget
|
||||||
|
|
||||||
from game.sim.simspeedsetting import SimSpeedSetting
|
from game.sim.simspeedsetting import SimSpeedSetting
|
||||||
from qt_ui.simcontroller import SimController
|
from qt_ui.simcontroller import SimController
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2 import QtWidgets
|
from PySide6 import QtWidgets
|
||||||
from PySide2.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PySide2.QtWidgets import QSlider, QHBoxLayout
|
from PySide6.QtWidgets import QSlider, QHBoxLayout
|
||||||
|
|
||||||
from qt_ui.widgets.floatspinners import FloatSpinner
|
from qt_ui.widgets.floatspinners import FloatSpinner
|
||||||
|
|
||||||
|
|||||||
@ -1,15 +1,15 @@
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from typing import Iterable, Iterator, Optional
|
from typing import Iterable, Iterator, Optional
|
||||||
|
|
||||||
from PySide2.QtCore import (
|
from PySide6.QtCore import (
|
||||||
QItemSelection,
|
QItemSelection,
|
||||||
QItemSelectionModel,
|
QItemSelectionModel,
|
||||||
QSize,
|
QSize,
|
||||||
Qt,
|
Qt,
|
||||||
Signal,
|
Signal,
|
||||||
)
|
)
|
||||||
from PySide2.QtGui import QIcon, QStandardItem, QStandardItemModel
|
from PySide6.QtGui import QIcon, QStandardItem, QStandardItemModel
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QComboBox,
|
QComboBox,
|
||||||
QDialog,
|
QDialog,
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
@ -109,7 +109,7 @@ class SquadronBaseSelector(QComboBox):
|
|||||||
aircraft_type: Optional[AircraftType],
|
aircraft_type: Optional[AircraftType],
|
||||||
) -> None:
|
) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.setSizeAdjustPolicy(self.AdjustToContents)
|
self.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToContents)
|
||||||
self.bases = list(bases)
|
self.bases = list(bases)
|
||||||
self.set_aircraft_type(aircraft_type)
|
self.set_aircraft_type(aircraft_type)
|
||||||
|
|
||||||
@ -812,7 +812,7 @@ class SquadronAircraftTypeSelector(QComboBox):
|
|||||||
self, types: set[AircraftType], selected_aircraft: Optional[str]
|
self, types: set[AircraftType], selected_aircraft: Optional[str]
|
||||||
) -> None:
|
) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.setSizeAdjustPolicy(self.AdjustToContents)
|
self.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToContents)
|
||||||
|
|
||||||
for type in sorted(types, key=lambda type: type.display_name):
|
for type in sorted(types, key=lambda type: type.display_name):
|
||||||
self.addItem(type.display_name, type)
|
self.addItem(type.display_name, type)
|
||||||
@ -829,7 +829,7 @@ class SquadronDefSelector(QComboBox):
|
|||||||
allow_random: bool = True,
|
allow_random: bool = True,
|
||||||
) -> None:
|
) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.setSizeAdjustPolicy(self.AdjustToContents)
|
self.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToContents)
|
||||||
self.squadron_defs = squadron_defs
|
self.squadron_defs = squadron_defs
|
||||||
self.allow_random = allow_random
|
self.allow_random = allow_random
|
||||||
self.set_aircraft_type(aircraft)
|
self.set_aircraft_type(aircraft)
|
||||||
|
|||||||
@ -3,8 +3,8 @@ from __future__ import annotations
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Iterator, Optional
|
from typing import Iterator, Optional
|
||||||
|
|
||||||
from PySide2.QtCore import QItemSelectionModel, QModelIndex, QSize
|
from PySide6.QtCore import QItemSelectionModel, QModelIndex, QSize
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QAbstractItemView,
|
QAbstractItemView,
|
||||||
QCheckBox,
|
QCheckBox,
|
||||||
QDialog,
|
QDialog,
|
||||||
|
|||||||
@ -2,7 +2,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtCore import QObject, Signal
|
from PySide6.QtCore import QObject, Signal
|
||||||
|
|
||||||
from game import Game
|
from game import Game
|
||||||
from game.debriefing import Debriefing
|
from game.debriefing import Debriefing
|
||||||
|
|||||||
@ -1,13 +1,12 @@
|
|||||||
from PySide2.QtCore import (
|
from PySide6.QtCore import (
|
||||||
QItemSelection,
|
QItemSelection,
|
||||||
QItemSelectionModel,
|
QItemSelectionModel,
|
||||||
QModelIndex,
|
QModelIndex,
|
||||||
Qt,
|
Qt,
|
||||||
)
|
)
|
||||||
from PySide2.QtGui import QContextMenuEvent
|
from PySide6.QtGui import QContextMenuEvent, QAction
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QAbstractItemView,
|
QAbstractItemView,
|
||||||
QAction,
|
|
||||||
QDialog,
|
QDialog,
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QListView,
|
QListView,
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import logging
|
import logging
|
||||||
from typing import Callable, Dict, TypeVar
|
from typing import Callable, Dict, TypeVar
|
||||||
|
|
||||||
from PySide2.QtGui import QIcon, QPixmap, QCloseEvent
|
from PySide6.QtGui import QIcon, QPixmap, QCloseEvent
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QGridLayout,
|
QGridLayout,
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QPushButton,
|
QPushButton,
|
||||||
QLabel,
|
QLabel,
|
||||||
|
|||||||
@ -4,13 +4,10 @@ import webbrowser
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtCore import QSettings, Qt, Signal
|
from PySide6.QtCore import QSettings, Qt, Signal
|
||||||
from PySide2.QtGui import QCloseEvent, QIcon
|
from PySide6.QtGui import QCloseEvent, QIcon, QAction, QGuiApplication, QActionGroup
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QAction,
|
|
||||||
QActionGroup,
|
|
||||||
QApplication,
|
QApplication,
|
||||||
QDesktopWidget,
|
|
||||||
QFileDialog,
|
QFileDialog,
|
||||||
QMainWindow,
|
QMainWindow,
|
||||||
QMessageBox,
|
QMessageBox,
|
||||||
@ -99,7 +96,7 @@ class QLiberationWindow(QMainWindow):
|
|||||||
|
|
||||||
# Default to maximized on the main display if we don't have any persistent
|
# Default to maximized on the main display if we don't have any persistent
|
||||||
# configuration.
|
# configuration.
|
||||||
screen = QDesktopWidget().screenGeometry()
|
screen = QGuiApplication.primaryScreen().availableSize()
|
||||||
self.setGeometry(0, 0, screen.width(), screen.height())
|
self.setGeometry(0, 0, screen.width(), screen.height())
|
||||||
self.setWindowState(Qt.WindowMaximized)
|
self.setWindowState(Qt.WindowMaximized)
|
||||||
|
|
||||||
@ -134,7 +131,7 @@ class QLiberationWindow(QMainWindow):
|
|||||||
|
|
||||||
self.top_panel = QTopPanel(self.game_model, self.sim_controller, ui_flags)
|
self.top_panel = QTopPanel(self.game_model, self.sim_controller, ui_flags)
|
||||||
vbox = QVBoxLayout()
|
vbox = QVBoxLayout()
|
||||||
vbox.setMargin(0)
|
vbox.setContentsMargins(0, 0, 0, 0)
|
||||||
vbox.addWidget(self.top_panel)
|
vbox.addWidget(self.top_panel)
|
||||||
vbox.addWidget(hbox)
|
vbox.addWidget(hbox)
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
from typing import Optional, Iterable
|
from typing import Optional, Iterable
|
||||||
|
|
||||||
from PySide2.QtCore import Qt, QLocale
|
from PySide6.QtCore import Qt, QLocale
|
||||||
from PySide2.QtGui import QIcon
|
from PySide6.QtGui import QIcon
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QPushButton,
|
QPushButton,
|
||||||
QLabel,
|
QLabel,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QPushButton,
|
QPushButton,
|
||||||
QLabel,
|
QLabel,
|
||||||
|
|||||||
@ -2,9 +2,9 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from PySide2.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PySide2.QtGui import QIcon, QPixmap
|
from PySide6.QtGui import QIcon, QPixmap
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QGridLayout,
|
QGridLayout,
|
||||||
QLabel,
|
QLabel,
|
||||||
@ -90,7 +90,7 @@ class QUnitInfoWindow(QDialog):
|
|||||||
# Build the topmost details grid.
|
# Build the topmost details grid.
|
||||||
self.details_grid = QFrame()
|
self.details_grid = QFrame()
|
||||||
self.details_grid_layout = QGridLayout()
|
self.details_grid_layout = QGridLayout()
|
||||||
self.details_grid_layout.setMargin(0)
|
self.details_grid_layout.setContentsMargins(0, 0, 0, 0)
|
||||||
|
|
||||||
self.name_box = QLabel(
|
self.name_box = QLabel(
|
||||||
f"<b>Name:</b> {unit_type.manufacturer} {unit_type.display_name}"
|
f"<b>Name:</b> {unit_type.manufacturer} {unit_type.display_name}"
|
||||||
|
|||||||
@ -4,10 +4,10 @@ import logging
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2 import QtCore
|
from PySide6 import QtCore
|
||||||
from PySide2.QtCore import QObject, Signal
|
from PySide6.QtCore import QObject, Signal
|
||||||
from PySide2.QtGui import QIcon, QMovie, QPixmap
|
from PySide6.QtGui import QIcon, QMovie, QPixmap
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QFileDialog,
|
QFileDialog,
|
||||||
QGridLayout,
|
QGridLayout,
|
||||||
|
|||||||
@ -2,8 +2,8 @@ import logging
|
|||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from typing import Callable, Iterator, Optional, Type
|
from typing import Callable, Iterator, Optional, Type
|
||||||
|
|
||||||
from PySide2.QtCore import QItemSelection, QItemSelectionModel, QModelIndex, Qt
|
from PySide6.QtCore import QItemSelection, QItemSelectionModel, QModelIndex, Qt
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QAbstractItemView,
|
QAbstractItemView,
|
||||||
QCheckBox,
|
QCheckBox,
|
||||||
QComboBox,
|
QComboBox,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
from PySide2.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QFrame,
|
QFrame,
|
||||||
QGridLayout,
|
QGridLayout,
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import logging
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from typing import Callable, Dict, Type
|
from typing import Callable, Dict, Type
|
||||||
|
|
||||||
from PySide2.QtCore import Qt, Signal
|
from PySide6.QtCore import Qt, Signal
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QComboBox,
|
QComboBox,
|
||||||
QDialog,
|
QDialog,
|
||||||
QFrame,
|
QFrame,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from PySide2.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PySide2.QtGui import QCloseEvent, QPixmap
|
from PySide6.QtGui import QCloseEvent, QPixmap
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QLabel,
|
QLabel,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QTabWidget
|
from PySide6.QtWidgets import QTabWidget
|
||||||
|
|
||||||
from game.theater import ControlPoint, Fob
|
from game.theater import ControlPoint, Fob
|
||||||
from qt_ui.models import GameModel
|
from qt_ui.models import GameModel
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import logging
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Generic, TypeVar
|
from typing import Generic, TypeVar
|
||||||
|
|
||||||
from PySide2.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QApplication,
|
QApplication,
|
||||||
QFrame,
|
QFrame,
|
||||||
QGridLayout,
|
QGridLayout,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from typing import Set
|
from typing import Set
|
||||||
|
|
||||||
from PySide2.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QGridLayout,
|
QGridLayout,
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QLabel,
|
QLabel,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QFrame, QGroupBox, QHBoxLayout, QLabel, QVBoxLayout
|
from PySide6.QtWidgets import QFrame, QGroupBox, QHBoxLayout, QLabel, QVBoxLayout
|
||||||
|
|
||||||
from game.theater import ControlPoint
|
from game.theater import ControlPoint
|
||||||
from qt_ui.models import GameModel
|
from qt_ui.models import GameModel
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
from PySide2.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PySide2.QtWidgets import QGridLayout, QScrollArea, QVBoxLayout, QWidget
|
from PySide6.QtWidgets import QGridLayout, QScrollArea, QVBoxLayout, QWidget
|
||||||
|
|
||||||
from game.dcs.groundunittype import GroundUnitType
|
from game.dcs.groundunittype import GroundUnitType
|
||||||
from game.purchaseadapter import GroundUnitPurchaseAdapter
|
from game.purchaseadapter import GroundUnitPurchaseAdapter
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QFrame, QGridLayout
|
from PySide6.QtWidgets import QFrame, QGridLayout
|
||||||
|
|
||||||
from game.theater import ControlPoint
|
from game.theater import ControlPoint
|
||||||
from qt_ui.models import GameModel
|
from qt_ui.models import GameModel
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
|
|
||||||
from PySide2.QtWidgets import QGroupBox, QLabel, QPushButton, QVBoxLayout
|
from PySide6.QtWidgets import QGroupBox, QLabel, QPushButton, QVBoxLayout
|
||||||
|
|
||||||
from game import Game
|
from game import Game
|
||||||
from game.server import EventStream
|
from game.server import EventStream
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QComboBox
|
from PySide6.QtWidgets import QComboBox
|
||||||
|
|
||||||
from game.theater import CombatStance, ControlPoint
|
from game.theater import CombatStance, ControlPoint
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
from PySide2.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QFrame,
|
QFrame,
|
||||||
QGridLayout,
|
QGridLayout,
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import itertools
|
import itertools
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QFrame,
|
QFrame,
|
||||||
QGridLayout,
|
QGridLayout,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from PySide2.QtGui import QPixmap
|
from PySide6.QtGui import QPixmap
|
||||||
from PySide2.QtWidgets import QGroupBox, QHBoxLayout, QLabel, QVBoxLayout
|
from PySide6.QtWidgets import QGroupBox, QHBoxLayout, QLabel, QVBoxLayout
|
||||||
|
|
||||||
from game.config import REWARDS
|
from game.config import REWARDS
|
||||||
from game.theater import TheaterUnit
|
from game.theater import TheaterUnit
|
||||||
|
|||||||
@ -3,9 +3,9 @@ from collections import defaultdict
|
|||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from typing import Type
|
from typing import Type
|
||||||
|
|
||||||
from PySide2.QtCore import Signal
|
from PySide6.QtCore import Signal
|
||||||
from PySide2.QtGui import Qt
|
from PySide6.QtGui import Qt
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QCheckBox,
|
QCheckBox,
|
||||||
QComboBox,
|
QComboBox,
|
||||||
QDialog,
|
QDialog,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PySide2.QtGui import QTransform
|
from PySide6.QtGui import QTransform
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QGridLayout,
|
QGridLayout,
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtGui import QStandardItem
|
from PySide6.QtGui import QStandardItem
|
||||||
|
|
||||||
from game.infos.information import Information
|
from game.infos.information import Information
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from PySide2.QtCore import QItemSelectionModel, QPoint
|
from PySide6.QtCore import QItemSelectionModel, QPoint
|
||||||
from PySide2.QtGui import QStandardItemModel
|
from PySide6.QtGui import QStandardItemModel
|
||||||
from PySide2.QtWidgets import QListView
|
from PySide6.QtWidgets import QListView
|
||||||
|
|
||||||
from game import Game
|
from game import Game
|
||||||
from qt_ui.windows.infos.QInfoItem import QInfoItem
|
from qt_ui.windows.infos.QInfoItem import QInfoItem
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QVBoxLayout, QGroupBox
|
from PySide6.QtWidgets import QVBoxLayout, QGroupBox
|
||||||
|
|
||||||
from game import Game
|
from game import Game
|
||||||
from qt_ui.windows.infos.QInfoList import QInfoList
|
from qt_ui.windows.infos.QInfoList import QInfoList
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QFrame, QLabel, QGridLayout
|
from PySide6.QtWidgets import QFrame, QLabel, QGridLayout
|
||||||
|
|
||||||
from game.infos.information import Information
|
from game.infos.information import Information
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import itertools
|
import itertools
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QCheckBox,
|
QCheckBox,
|
||||||
QDialog,
|
QDialog,
|
||||||
QFrame,
|
QFrame,
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import logging
|
import logging
|
||||||
import typing
|
import typing
|
||||||
|
|
||||||
from PySide2.QtCore import Signal
|
from PySide6.QtCore import Signal
|
||||||
from PySide2.QtGui import QTextCursor, QIcon
|
from PySide6.QtGui import QTextCursor, QIcon
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QPlainTextEdit,
|
QPlainTextEdit,
|
||||||
QVBoxLayout,
|
QVBoxLayout,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QVBoxLayout,
|
QVBoxLayout,
|
||||||
QComboBox,
|
QComboBox,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
"""Dialog window for editing flights."""
|
"""Dialog window for editing flights."""
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QDialog,
|
QDialog,
|
||||||
QVBoxLayout,
|
QVBoxLayout,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtGui import QIcon, QStandardItem
|
from PySide6.QtGui import QIcon, QStandardItem
|
||||||
|
|
||||||
from game.ato.flight import Flight
|
from game.ato.flight import Flight
|
||||||
from game.ato.package import Package
|
from game.ato.package import Package
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
import logging
|
import logging
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtCore import QItemSelection, QTime, Qt, Signal
|
from PySide6.QtCore import QItemSelection, QTime, Qt, Signal
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QCheckBox,
|
QCheckBox,
|
||||||
QDialog,
|
QDialog,
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from PySide2.QtCore import QItemSelectionModel, QSize
|
from PySide6.QtCore import QItemSelectionModel, QSize
|
||||||
from PySide2.QtGui import QStandardItemModel
|
from PySide6.QtGui import QStandardItemModel
|
||||||
from PySide2.QtWidgets import QAbstractItemView, QListView
|
from PySide6.QtWidgets import QAbstractItemView, QListView
|
||||||
|
|
||||||
from game.theater.controlpoint import ControlPoint
|
from game.theater.controlpoint import ControlPoint
|
||||||
from qt_ui.models import GameModel
|
from qt_ui.models import GameModel
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from typing import Optional, Type
|
from typing import Optional, Type
|
||||||
|
|
||||||
from PySide2.QtCore import Qt, Signal
|
from PySide6.QtCore import Qt, Signal
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QComboBox,
|
QComboBox,
|
||||||
QDialog,
|
QDialog,
|
||||||
QLabel,
|
QLabel,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QTabWidget
|
from PySide6.QtWidgets import QTabWidget
|
||||||
|
|
||||||
from game.ato.flight import Flight
|
from game.ato.flight import Flight
|
||||||
from qt_ui.models import PackageModel, GameModel
|
from qt_ui.models import PackageModel, GameModel
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
"""Combo box for selecting squadrons."""
|
"""Combo box for selecting squadrons."""
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtWidgets import QComboBox
|
from PySide6.QtWidgets import QComboBox
|
||||||
|
|
||||||
from game.ato.flighttype import FlightType
|
from game.ato.flighttype import FlightType
|
||||||
from game.dcs.aircrafttype import AircraftType
|
from game.dcs.aircrafttype import AircraftType
|
||||||
@ -21,7 +21,7 @@ class SquadronSelector(QComboBox):
|
|||||||
self.air_wing = air_wing
|
self.air_wing = air_wing
|
||||||
|
|
||||||
self.model().sort(0)
|
self.model().sort(0)
|
||||||
self.setSizeAdjustPolicy(self.AdjustToContents)
|
self.setSizeAdjustPolicy(QComboBox.SizeAdjustPolicy.AdjustToContents)
|
||||||
self.update_items(task, aircraft)
|
self.update_items(task, aircraft)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
from PySide2.QtCore import Qt
|
from PySide6.QtCore import Qt
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QComboBox,
|
QComboBox,
|
||||||
QFrame,
|
QFrame,
|
||||||
QLabel,
|
QLabel,
|
||||||
|
|||||||
@ -3,8 +3,8 @@ from dataclasses import dataclass
|
|||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
from typing import Dict, Union
|
from typing import Dict, Union
|
||||||
|
|
||||||
from PySide2.QtCore import Signal
|
from PySide6.QtCore import Signal
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QGridLayout,
|
QGridLayout,
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
QLabel,
|
QLabel,
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import logging
|
|||||||
import operator
|
import operator
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtWidgets import QComboBox
|
from PySide6.QtWidgets import QComboBox
|
||||||
|
|
||||||
from game import Game
|
from game import Game
|
||||||
from game.ato.flight import Flight
|
from game.ato.flight import Flight
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtCore import Signal
|
from PySide6.QtCore import Signal
|
||||||
from PySide2.QtWidgets import QWidget, QHBoxLayout, QLabel, QPushButton
|
from PySide6.QtWidgets import QWidget, QHBoxLayout, QLabel, QPushButton
|
||||||
|
|
||||||
from game import Game
|
from game import Game
|
||||||
from game.ato.flightmember import FlightMember
|
from game.ato.flightmember import FlightMember
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QCheckBox
|
from PySide6.QtWidgets import QCheckBox
|
||||||
from dcs.unitpropertydescription import UnitPropertyDescription
|
from dcs.unitpropertydescription import UnitPropertyDescription
|
||||||
|
|
||||||
from game.ato.flightmember import FlightMember
|
from game.ato.flightmember import FlightMember
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QComboBox
|
from PySide6.QtWidgets import QComboBox
|
||||||
from dcs.unitpropertydescription import UnitPropertyDescription
|
from dcs.unitpropertydescription import UnitPropertyDescription
|
||||||
|
|
||||||
from game.ato.flightmember import FlightMember
|
from game.ato.flightmember import FlightMember
|
||||||
|
|||||||
@ -2,8 +2,8 @@ import itertools
|
|||||||
import logging
|
import logging
|
||||||
from typing import Callable, Optional
|
from typing import Callable, Optional
|
||||||
|
|
||||||
from PySide2.QtCore import QRect
|
from PySide6.QtCore import QRect
|
||||||
from PySide2.QtWidgets import QGridLayout, QLabel, QWidget
|
from PySide6.QtWidgets import QGridLayout, QLabel, QWidget
|
||||||
from dcs.unitpropertydescription import UnitPropertyDescription
|
from dcs.unitpropertydescription import UnitPropertyDescription
|
||||||
|
|
||||||
from game.ato import Flight
|
from game.ato import Flight
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QComboBox
|
from PySide6.QtWidgets import QComboBox
|
||||||
|
|
||||||
from game.ato import Flight
|
from game.ato import Flight
|
||||||
from game.dcs.unitproperty import UnitProperty
|
from game.dcs.unitproperty import UnitProperty
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QSpinBox
|
from PySide6.QtWidgets import QSpinBox
|
||||||
from dcs.unitpropertydescription import UnitPropertyDescription
|
from dcs.unitpropertydescription import UnitPropertyDescription
|
||||||
|
|
||||||
from game.ato.flightmember import FlightMember
|
from game.ato.flightmember import FlightMember
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QComboBox, QWidget
|
from PySide6.QtWidgets import QComboBox, QWidget
|
||||||
|
|
||||||
from game import Game
|
from game import Game
|
||||||
from game.ato.flightmember import FlightMember
|
from game.ato.flightmember import FlightMember
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import logging
|
import logging
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
from PySide2.QtCore import QTime
|
from PySide6.QtCore import QTime
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
QLabel,
|
QLabel,
|
||||||
QMessageBox,
|
QMessageBox,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QGroupBox, QVBoxLayout
|
from PySide6.QtWidgets import QGroupBox, QVBoxLayout
|
||||||
|
|
||||||
from game.ato import Flight, FlightType
|
from game.ato import Flight, FlightType
|
||||||
from qt_ui.models import GameModel
|
from qt_ui.models import GameModel
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from PySide2.QtWidgets import QGroupBox, QHBoxLayout, QLineEdit, QLabel, QMessageBox
|
from PySide6.QtWidgets import QGroupBox, QHBoxLayout, QLineEdit, QLabel, QMessageBox
|
||||||
|
|
||||||
from game.ato.flight import Flight
|
from game.ato.flight import Flight
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import logging
|
import logging
|
||||||
from typing import Optional, Callable
|
from typing import Optional, Callable
|
||||||
|
|
||||||
from PySide2.QtCore import Signal, QModelIndex
|
from PySide6.QtCore import Signal, QModelIndex
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QLabel,
|
QLabel,
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
QSpinBox,
|
QSpinBox,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QComboBox,
|
QComboBox,
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QLabel, QGroupBox, QGridLayout
|
from PySide6.QtWidgets import QLabel, QGroupBox, QGridLayout
|
||||||
|
|
||||||
from qt_ui.uiconstants import AIRCRAFT_ICONS
|
from qt_ui.uiconstants import AIRCRAFT_ICONS
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
from PySide2.QtCore import Signal
|
from PySide6.QtCore import Signal
|
||||||
from PySide2.QtWidgets import QFrame, QGridLayout, QVBoxLayout
|
from PySide6.QtWidgets import QFrame, QGridLayout, QVBoxLayout
|
||||||
|
|
||||||
from game.ato.flight import Flight
|
from game.ato.flight import Flight
|
||||||
from qt_ui.models import PackageModel, GameModel
|
from qt_ui.models import PackageModel, GameModel
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtWidgets import QGroupBox, QHBoxLayout, QLabel, QVBoxLayout
|
from PySide6.QtWidgets import QGroupBox, QHBoxLayout, QLabel, QVBoxLayout
|
||||||
|
|
||||||
from game.ato.flightwaypoint import FlightWaypoint
|
from game.ato.flightwaypoint import FlightWaypoint
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from PySide2.QtGui import QStandardItem, Qt
|
from PySide6.QtGui import QStandardItem, Qt
|
||||||
|
|
||||||
from game.ato.flightwaypoint import FlightWaypoint
|
from game.ato.flightwaypoint import FlightWaypoint
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
from PySide2.QtCore import QItemSelectionModel, QPoint, QModelIndex
|
from PySide6.QtCore import QItemSelectionModel, QPoint, QModelIndex
|
||||||
from PySide2.QtGui import QStandardItem, QStandardItemModel
|
from PySide6.QtGui import QStandardItem, QStandardItemModel
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QHeaderView,
|
QHeaderView,
|
||||||
QTableView,
|
QTableView,
|
||||||
QStyledItemDelegate,
|
QStyledItemDelegate,
|
||||||
@ -76,7 +76,7 @@ class QFlightWaypointList(QTableView):
|
|||||||
finally:
|
finally:
|
||||||
# stop ignoring signals
|
# stop ignoring signals
|
||||||
self.model.blockSignals(False)
|
self.model.blockSignals(False)
|
||||||
self.update()
|
self.update(self.currentIndex())
|
||||||
|
|
||||||
def _add_waypoint_row(
|
def _add_waypoint_row(
|
||||||
self, row: int, flight: Flight, waypoint: FlightWaypoint
|
self, row: int, flight: Flight, waypoint: FlightWaypoint
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import logging
|
import logging
|
||||||
from typing import Iterable, List, Optional
|
from typing import Iterable, List, Optional
|
||||||
|
|
||||||
from PySide2.QtCore import Signal, Qt, QModelIndex
|
from PySide6.QtCore import Signal, Qt, QModelIndex
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QFrame,
|
QFrame,
|
||||||
QGridLayout,
|
QGridLayout,
|
||||||
QLabel,
|
QLabel,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
from PySide2.QtCore import Qt, Signal
|
from PySide6.QtCore import Qt, Signal
|
||||||
from PySide2.QtWidgets import (
|
from PySide6.QtWidgets import (
|
||||||
QCheckBox,
|
QCheckBox,
|
||||||
QDialog,
|
QDialog,
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
|
|||||||
@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from PySide2 import QtGui, QtWidgets
|
from PySide6 import QtGui, QtWidgets
|
||||||
|
|
||||||
from game.campaignloader.campaign import Campaign
|
from game.campaignloader.campaign import Campaign
|
||||||
from game.dcs.aircrafttype import AircraftType
|
from game.dcs.aircrafttype import AircraftType
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user