mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Revert upgrade to pyside6.
This appears to be incompatible with pyinstaller. I get the following when trying to run the executable generated with pyside6: ``` Traceback (most recent call last): File "qt_ui\main.py", line 29, in <module> File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module File "qt_ui\windows\QLiberationWindow.py", line 28, in <module> File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module File "qt_ui\widgets\map\QLiberationMap.py", line 11, in <module> ImportError: could not import module 'PySide6.QtPrintSupport' ```
This commit is contained in:
parent
f3bf9c0c3c
commit
2a75d14e0e
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -24,8 +24,8 @@ jobs:
|
||||
run: |
|
||||
./venv/scripts/activate
|
||||
python -m pip install -r requirements.txt
|
||||
# For some reason the shiboken6.abi3.dll is not found properly, so I copy it instead
|
||||
Copy-Item .\venv\Lib\site-packages\shiboken6\shiboken6.abi3.dll .\venv\Lib\site-packages\PySide6\ -Force
|
||||
# For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead
|
||||
Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force
|
||||
|
||||
- name: mypy game
|
||||
run: |
|
||||
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -26,8 +26,8 @@ jobs:
|
||||
run: |
|
||||
./venv/scripts/activate
|
||||
python -m pip install -r requirements.txt
|
||||
# For some reason the shiboken6.abi3.dll is not found properly, so I copy it instead
|
||||
Copy-Item .\venv\Lib\site-packages\shiboken6\shiboken6.abi3.dll .\venv\Lib\site-packages\PySide6\ -Force
|
||||
# For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead
|
||||
Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force
|
||||
|
||||
- name: Finalize version
|
||||
run: |
|
||||
|
||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@ -24,8 +24,8 @@ jobs:
|
||||
run: |
|
||||
./venv/scripts/activate
|
||||
python -m pip install -r requirements.txt
|
||||
# For some reason the shiboken6.abi3.dll is not found properly, so I copy it instead
|
||||
Copy-Item .\venv\Lib\site-packages\shiboken6\shiboken6.abi3.dll .\venv\Lib\site-packages\PySide6\ -Force
|
||||
# For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead
|
||||
Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force
|
||||
|
||||
- name: run tests
|
||||
run: |
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
from contextlib import contextmanager
|
||||
from typing import ContextManager, Optional
|
||||
|
||||
from PySide6.QtCore import QModelIndex, Qt, QSize
|
||||
from PySide6.QtGui import QPainter, QFont, QFontMetrics, QIcon
|
||||
from PySide6.QtWidgets import QStyledItemDelegate, QStyleOptionViewItem, QStyle
|
||||
from PySide2.QtCore import QModelIndex, Qt, QSize
|
||||
from PySide2.QtGui import QPainter, QFont, QFontMetrics, QIcon
|
||||
from PySide2.QtWidgets import QStyledItemDelegate, QStyleOptionViewItem, QStyle
|
||||
|
||||
|
||||
@contextmanager
|
||||
|
||||
@ -3,7 +3,7 @@ from collections.abc import Iterator
|
||||
from contextlib import contextmanager
|
||||
from typing import Type
|
||||
|
||||
from PySide6.QtWidgets import QDialog, QMessageBox
|
||||
from PySide2.QtWidgets import QDialog, QMessageBox
|
||||
|
||||
|
||||
@contextmanager
|
||||
|
||||
@ -6,9 +6,10 @@ from datetime import datetime
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from PySide6 import QtWidgets
|
||||
from PySide6.QtGui import QPixmap
|
||||
from PySide6.QtWidgets import QApplication, QSplashScreen
|
||||
from PySide2 import QtWidgets
|
||||
from PySide2.QtCore import Qt
|
||||
from PySide2.QtGui import QPixmap
|
||||
from PySide2.QtWidgets import QApplication, QSplashScreen
|
||||
from dcs.payloads import PayloadDirectories
|
||||
|
||||
from game import Game, VERSION, persistency
|
||||
@ -58,6 +59,8 @@ def run_ui(game: Optional[Game]) -> None:
|
||||
os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1" # Potential fix for 4K screens
|
||||
app = QApplication(sys.argv)
|
||||
|
||||
app.setAttribute(Qt.AA_DisableWindowContextHelpButton)
|
||||
|
||||
# init the theme and load the stylesheet based on the theme index
|
||||
liberation_theme.init()
|
||||
with open(
|
||||
@ -128,7 +131,7 @@ def run_ui(game: Optional[Game]) -> None:
|
||||
window = QLiberationWindow(game)
|
||||
window.showMaximized()
|
||||
splash.finish(window)
|
||||
qt_execution_code = app.exec()
|
||||
qt_execution_code = app.exec_()
|
||||
|
||||
# Restore Mission Scripting file
|
||||
logging.info("QT App terminated with status code : " + str(qt_execution_code))
|
||||
|
||||
@ -4,13 +4,13 @@ from __future__ import annotations
|
||||
import datetime
|
||||
from typing import Any, Callable, Iterator, Optional, TypeVar
|
||||
|
||||
from PySide6.QtCore import (
|
||||
from PySide2.QtCore import (
|
||||
QAbstractListModel,
|
||||
QModelIndex,
|
||||
Qt,
|
||||
Signal,
|
||||
)
|
||||
from PySide6.QtGui import QIcon
|
||||
from PySide2.QtGui import QIcon
|
||||
|
||||
from game.ato.airtaaskingorder import AirTaskingOrder
|
||||
from game.ato.flight import Flight
|
||||
|
||||
@ -5,7 +5,7 @@ from datetime import datetime, timedelta
|
||||
from pathlib import Path
|
||||
from typing import Callable, Optional, TYPE_CHECKING
|
||||
|
||||
from PySide6.QtCore import QObject, Signal
|
||||
from PySide2.QtCore import QObject, Signal
|
||||
|
||||
from game.polldebriefingfilethread import PollDebriefingFileThread
|
||||
from game.sim.gameloop import GameLoop
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import os
|
||||
from typing import Dict
|
||||
|
||||
from PySide6.QtGui import QPixmap
|
||||
from PySide2.QtGui import QPixmap
|
||||
|
||||
from game.theater.theatergroundobject import NAME_BY_CATEGORY
|
||||
from .liberation_theme import get_theme_icons
|
||||
|
||||
@ -3,8 +3,8 @@ import logging
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from PySide6.QtCore import Signal, QObject
|
||||
from PySide6.QtWidgets import QMessageBox, QApplication
|
||||
from PySide2.QtCore import Signal, QObject
|
||||
from PySide2.QtWidgets import QMessageBox, QApplication
|
||||
|
||||
|
||||
class UncaughtExceptionHandler(QObject):
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import QLabel, QHBoxLayout, QGroupBox, QPushButton
|
||||
from PySide2.QtWidgets import QLabel, QHBoxLayout, QGroupBox, QPushButton
|
||||
|
||||
import qt_ui.uiconstants as CONST
|
||||
from game import Game
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
from datetime import datetime
|
||||
|
||||
from PySide6.QtGui import QPixmap
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtGui import QPixmap
|
||||
from PySide2.QtWidgets import (
|
||||
QFrame,
|
||||
QGridLayout,
|
||||
QGroupBox,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import QFrame
|
||||
from PySide2.QtWidgets import QFrame
|
||||
|
||||
|
||||
class QDebriefingInformation(QFrame):
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import QLabel, QGroupBox, QGridLayout
|
||||
from PySide2.QtWidgets import QLabel, QGroupBox, QGridLayout
|
||||
from game import Game
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
"""Spin box for selecting the number of aircraft in a flight."""
|
||||
from PySide6.QtWidgets import QSpinBox
|
||||
from PySide2.QtWidgets import QSpinBox
|
||||
|
||||
|
||||
class QFlightSizeSpinner(QSpinBox):
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
from typing import Optional
|
||||
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtWidgets import (
|
||||
QGridLayout,
|
||||
QGroupBox,
|
||||
QHBoxLayout,
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
"""A layout containing a widget with an associated label."""
|
||||
from typing import Optional
|
||||
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtWidgets import QHBoxLayout, QLabel, QWidget
|
||||
from PySide2.QtCore import Qt
|
||||
from PySide2.QtWidgets import QHBoxLayout, QLabel, QWidget
|
||||
|
||||
|
||||
class QLabeledWidget(QHBoxLayout):
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from PySide6 import QtCore, QtGui
|
||||
from PySide6.QtWidgets import QCalendarWidget
|
||||
from PySide2 import QtCore, QtGui
|
||||
from PySide2.QtWidgets import QCalendarWidget
|
||||
|
||||
|
||||
class QLiberationCalendar(QCalendarWidget):
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtWidgets import (
|
||||
QDialog,
|
||||
QFrame,
|
||||
QGroupBox,
|
||||
|
||||
@ -3,18 +3,18 @@ import logging
|
||||
from datetime import timedelta
|
||||
from typing import Optional
|
||||
|
||||
from PySide6.QtCore import (
|
||||
from PySide2.QtCore import (
|
||||
QItemSelectionModel,
|
||||
QModelIndex,
|
||||
QSize,
|
||||
Qt,
|
||||
)
|
||||
from PySide6.QtGui import (
|
||||
QAction,
|
||||
from PySide2.QtGui import (
|
||||
QContextMenuEvent,
|
||||
)
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtWidgets import (
|
||||
QAbstractItemView,
|
||||
QAction,
|
||||
QGroupBox,
|
||||
QHBoxLayout,
|
||||
QLabel,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
"""Widgets for displaying client slots."""
|
||||
from PySide6.QtWidgets import QLabel
|
||||
from PySide2.QtWidgets import QLabel
|
||||
|
||||
from qt_ui.models import AtoModel
|
||||
from qt_ui.widgets.QLabeledWidget import QLabeledWidget
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
"""Combo box for selecting aircraft types."""
|
||||
from typing import Iterable, Type
|
||||
|
||||
from PySide6.QtWidgets import QComboBox
|
||||
from PySide2.QtWidgets import QComboBox
|
||||
from dcs.unittype import FlyingType
|
||||
|
||||
from gen.flights.ai_flight_planner_db import aircraft_for_task
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
"""Combo box for selecting a departure airfield."""
|
||||
from typing import Iterable, Optional
|
||||
|
||||
from PySide6.QtWidgets import QComboBox
|
||||
from PySide2.QtWidgets import QComboBox
|
||||
from dcs.unittype import FlyingType
|
||||
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from PySide6.QtCore import QSortFilterProxyModel, Qt
|
||||
from PySide6.QtWidgets import QComboBox, QCompleter
|
||||
from PySide2.QtCore import QSortFilterProxyModel, Qt
|
||||
from PySide2.QtWidgets import QComboBox, QCompleter
|
||||
|
||||
|
||||
class QFilteredComboBox(QComboBox):
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
"""Combo box for selecting a flight's task type."""
|
||||
|
||||
from PySide6.QtWidgets import QComboBox
|
||||
from PySide2.QtWidgets import QComboBox
|
||||
|
||||
from game.theater import ConflictTheater, MissionTarget
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtGui import QStandardItem, QStandardItemModel
|
||||
from PySide2.QtGui import QStandardItem, QStandardItemModel
|
||||
|
||||
from game import Game
|
||||
from game.theater import ControlPointType, BuildingGroundObject
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtGui import QStandardItem, QStandardItemModel
|
||||
from PySide2.QtGui import QStandardItem, QStandardItemModel
|
||||
|
||||
from game import Game
|
||||
from qt_ui.widgets.combos.QFilteredComboBox import QFilteredComboBox
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
from typing import Optional
|
||||
|
||||
from PySide6.QtWidgets import QSpinBox
|
||||
from PySide2.QtWidgets import QSpinBox
|
||||
|
||||
|
||||
class FloatSpinner(QSpinBox):
|
||||
|
||||
@ -6,10 +6,10 @@ from typing import (
|
||||
Optional,
|
||||
)
|
||||
|
||||
from PySide6.QtCore import QUrl
|
||||
from PySide6.QtWebChannel import QWebChannel
|
||||
from PySide6.QtWebEngineCore import QWebEnginePage
|
||||
from PySide6.QtWebEngineWidgets import (
|
||||
from PySide2.QtCore import QUrl
|
||||
from PySide2.QtWebChannel import QWebChannel
|
||||
from PySide2.QtWebEngineWidgets import (
|
||||
QWebEnginePage,
|
||||
QWebEngineView,
|
||||
)
|
||||
|
||||
@ -27,7 +27,6 @@ class LoggingWebPage(QWebEnginePage):
|
||||
line_number: int,
|
||||
source: str,
|
||||
) -> None:
|
||||
super().javaScriptConsoleMessage(level, message, line_number, source)
|
||||
if level == QWebEnginePage.JavaScriptConsoleMessageLevel.ErrorMessageLevel:
|
||||
logging.error(message)
|
||||
elif level == QWebEnginePage.JavaScriptConsoleMessageLevel.WarningMessageLevel:
|
||||
@ -49,11 +48,11 @@ class QLiberationMap(QWebEngineView):
|
||||
self.channel.registerObject("game", self.map_model)
|
||||
|
||||
self.page = LoggingWebPage(self)
|
||||
self.setPage(self.page)
|
||||
self.page.setWebChannel(self.channel)
|
||||
self.page.load(
|
||||
QUrl.fromLocalFile(str(Path("resources/ui/map/canvas.html").resolve()))
|
||||
)
|
||||
self.setPage(self.page)
|
||||
|
||||
def set_game(self, game: Optional[Game]) -> None:
|
||||
if game is None:
|
||||
|
||||
@ -4,7 +4,7 @@ import logging
|
||||
from datetime import timedelta
|
||||
from typing import Iterator, List, Optional, Tuple, Union
|
||||
|
||||
from PySide6.QtCore import Property, QObject, Signal, Slot
|
||||
from PySide2.QtCore import Property, QObject, Signal, Slot
|
||||
from dcs import Point
|
||||
from dcs.unit import Unit
|
||||
from dcs.vehicles import vehicle_map
|
||||
@ -59,7 +59,7 @@ ENABLE_EXPENSIVE_DEBUG_TOOLS = False
|
||||
#
|
||||
# https://bugreports.qt.io/browse/PYSIDE-1426
|
||||
#
|
||||
# PySide6 5.15.2 released 6 days before the fix for this was merged, but presumably we
|
||||
# PySide2 5.15.2 released 6 days before the fix for this was merged, but presumably we
|
||||
# can clean up after 5.15.3 (or a future version) is released.
|
||||
#
|
||||
# Until then, all properties must use a notify signal. For some reason the error doesn't
|
||||
|
||||
@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from PySide6.QtWidgets import QButtonGroup, QHBoxLayout, QPushButton, QWidget
|
||||
from PySide2.QtWidgets import QButtonGroup, QHBoxLayout, QPushButton, QWidget
|
||||
|
||||
from game.sim.simspeedsetting import SimSpeedSetting
|
||||
from qt_ui.simcontroller import SimController
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
from datetime import timedelta
|
||||
from typing import Optional
|
||||
|
||||
from PySide6 import QtWidgets
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtWidgets import QSlider, QHBoxLayout
|
||||
from PySide2 import QtWidgets
|
||||
from PySide2.QtCore import Qt
|
||||
from PySide2.QtWidgets import QSlider, QHBoxLayout
|
||||
|
||||
from qt_ui.widgets.floatspinners import FloatSpinner
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import random
|
||||
|
||||
from PySide6.QtGui import QStandardItemModel, QStandardItem
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtGui import QStandardItemModel, QStandardItem
|
||||
from PySide2.QtWidgets import (
|
||||
QGroupBox,
|
||||
QLabel,
|
||||
QWidget,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
from typing import Callable, Iterable, Optional
|
||||
|
||||
from PySide6.QtCore import (
|
||||
from PySide2.QtCore import (
|
||||
QItemSelection,
|
||||
QItemSelectionModel,
|
||||
QModelIndex,
|
||||
@ -8,9 +8,8 @@ from PySide6.QtCore import (
|
||||
Qt,
|
||||
Signal,
|
||||
)
|
||||
from PySide6.QtGui import QIcon, QStandardItem, QStandardItemModel
|
||||
from PySide6.QtWidgets import (
|
||||
QCheckBox,
|
||||
from PySide2.QtGui import QIcon, QStandardItem, QStandardItemModel
|
||||
from PySide2.QtWidgets import (
|
||||
QComboBox,
|
||||
QDialog,
|
||||
QGroupBox,
|
||||
|
||||
@ -3,8 +3,8 @@ from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional, Iterator
|
||||
|
||||
from PySide6.QtCore import QItemSelectionModel, QModelIndex, QSize
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import QItemSelectionModel, QModelIndex, QSize
|
||||
from PySide2.QtWidgets import (
|
||||
QAbstractItemView,
|
||||
QCheckBox,
|
||||
QDialog,
|
||||
|
||||
@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from PySide6.QtCore import QObject, Signal
|
||||
from PySide2.QtCore import QObject, Signal
|
||||
|
||||
from game import Game
|
||||
from game.debriefing import Debriefing
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
from PySide6.QtCore import (
|
||||
from PySide2.QtCore import (
|
||||
QItemSelection,
|
||||
QItemSelectionModel,
|
||||
QModelIndex,
|
||||
Qt,
|
||||
)
|
||||
from PySide6.QtGui import QAction, QContextMenuEvent
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtGui import QContextMenuEvent
|
||||
from PySide2.QtWidgets import (
|
||||
QAbstractItemView,
|
||||
QAction,
|
||||
QDialog,
|
||||
QHBoxLayout,
|
||||
QListView,
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import logging
|
||||
from typing import Callable, Dict, TypeVar
|
||||
|
||||
from PySide6.QtGui import QIcon, QPixmap
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtGui import QIcon, QPixmap
|
||||
from PySide2.QtWidgets import (
|
||||
QDialog,
|
||||
QGridLayout,
|
||||
QGroupBox,
|
||||
|
||||
@ -3,9 +3,12 @@ import traceback
|
||||
import webbrowser
|
||||
from typing import Optional
|
||||
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtGui import QAction, QActionGroup, QCloseEvent, QGuiApplication, QIcon
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import Qt
|
||||
from PySide2.QtGui import QCloseEvent, QIcon
|
||||
from PySide2.QtWidgets import (
|
||||
QAction,
|
||||
QActionGroup,
|
||||
QDesktopWidget,
|
||||
QFileDialog,
|
||||
QMainWindow,
|
||||
QMessageBox,
|
||||
@ -64,7 +67,7 @@ class QLiberationWindow(QMainWindow):
|
||||
self.initMenuBar()
|
||||
self.connectSignals()
|
||||
|
||||
screen = QGuiApplication.primaryScreen().availableSize()
|
||||
screen = QDesktopWidget().screenGeometry()
|
||||
self.setGeometry(0, 0, screen.width(), screen.height())
|
||||
self.setWindowState(Qt.WindowMaximized)
|
||||
|
||||
@ -97,7 +100,7 @@ class QLiberationWindow(QMainWindow):
|
||||
vbox.setSizes([600, 100])
|
||||
|
||||
vbox = QVBoxLayout()
|
||||
vbox.setContentsMargins(0, 0, 0, 0)
|
||||
vbox.setMargin(0)
|
||||
vbox.addWidget(QTopPanel(self.game_model, self.sim_controller))
|
||||
vbox.addWidget(hbox)
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtGui import QIcon
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import Qt
|
||||
from PySide2.QtGui import QIcon
|
||||
from PySide2.QtWidgets import (
|
||||
QDialog,
|
||||
QGridLayout,
|
||||
QLabel,
|
||||
|
||||
@ -5,10 +5,10 @@ import os
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from PySide6 import QtCore
|
||||
from PySide6.QtCore import QObject, Signal
|
||||
from PySide6.QtGui import QIcon, QMovie, QPixmap
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2 import QtCore
|
||||
from PySide2.QtCore import QObject, Signal
|
||||
from PySide2.QtGui import QIcon, QMovie, QPixmap
|
||||
from PySide2.QtWidgets import (
|
||||
QDialog,
|
||||
QFileDialog,
|
||||
QGridLayout,
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import logging
|
||||
from typing import Callable, Iterator, Optional
|
||||
|
||||
from PySide6.QtCore import (
|
||||
from PySide2.QtCore import (
|
||||
QItemSelectionModel,
|
||||
QModelIndex,
|
||||
Qt,
|
||||
QItemSelection,
|
||||
)
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtWidgets import (
|
||||
QAbstractItemView,
|
||||
QDialog,
|
||||
QListView,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import Qt
|
||||
from PySide2.QtWidgets import (
|
||||
QFrame,
|
||||
QGridLayout,
|
||||
QGroupBox,
|
||||
|
||||
@ -4,8 +4,8 @@ import logging
|
||||
from collections import defaultdict
|
||||
from typing import Callable, Dict, Type
|
||||
|
||||
from PySide6.QtCore import Qt, Signal
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import Qt, Signal
|
||||
from PySide2.QtWidgets import (
|
||||
QComboBox,
|
||||
QDialog,
|
||||
QFrame,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtGui import QCloseEvent, QPixmap
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import Qt
|
||||
from PySide2.QtGui import QCloseEvent, QPixmap
|
||||
from PySide2.QtWidgets import (
|
||||
QDialog,
|
||||
QHBoxLayout,
|
||||
QLabel,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import QTabWidget
|
||||
from PySide2.QtWidgets import QTabWidget
|
||||
|
||||
from game.theater import ControlPoint, Fob
|
||||
from qt_ui.models import GameModel
|
||||
|
||||
@ -4,8 +4,8 @@ import logging
|
||||
from enum import Enum
|
||||
from typing import Generic, TypeVar
|
||||
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import Qt
|
||||
from PySide2.QtWidgets import (
|
||||
QApplication,
|
||||
QFrame,
|
||||
QGridLayout,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
from typing import Set
|
||||
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import Qt
|
||||
from PySide2.QtWidgets import (
|
||||
QGridLayout,
|
||||
QHBoxLayout,
|
||||
QLabel,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import QFrame, QGroupBox, QHBoxLayout, QVBoxLayout
|
||||
from PySide2.QtWidgets import QFrame, QGroupBox, QHBoxLayout, QVBoxLayout
|
||||
|
||||
from game.theater import ControlPoint
|
||||
from qt_ui.models import GameModel
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtWidgets import QGridLayout, QScrollArea, QVBoxLayout, QWidget
|
||||
from PySide2.QtCore import Qt
|
||||
from PySide2.QtWidgets import QGridLayout, QScrollArea, QVBoxLayout, QWidget
|
||||
|
||||
from game.dcs.groundunittype import GroundUnitType
|
||||
from game.theater import ControlPoint
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import QFrame, QGridLayout
|
||||
from PySide2.QtWidgets import QFrame, QGridLayout
|
||||
|
||||
from game.theater import ControlPoint
|
||||
from qt_ui.models import GameModel
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
from collections.abc import Callable
|
||||
|
||||
from PySide6.QtWidgets import QGroupBox, QLabel, QPushButton, QVBoxLayout
|
||||
from PySide2.QtWidgets import QGroupBox, QLabel, QPushButton, QVBoxLayout
|
||||
|
||||
from game import Game
|
||||
from game.theater import ControlPoint
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import QComboBox
|
||||
from PySide2.QtWidgets import QComboBox
|
||||
|
||||
from game.theater import CombatStance, ControlPoint
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
from collections import defaultdict
|
||||
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import Qt
|
||||
from PySide2.QtWidgets import (
|
||||
QFrame,
|
||||
QGridLayout,
|
||||
QGroupBox,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import itertools
|
||||
from typing import Optional
|
||||
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtWidgets import (
|
||||
QDialog,
|
||||
QFrame,
|
||||
QGridLayout,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import os
|
||||
|
||||
from PySide6.QtGui import QPixmap
|
||||
from PySide6.QtWidgets import QGroupBox, QHBoxLayout, QVBoxLayout, QLabel
|
||||
from PySide2.QtGui import QPixmap
|
||||
from PySide2.QtWidgets import QGroupBox, QHBoxLayout, QVBoxLayout, QLabel
|
||||
from game.db import REWARDS
|
||||
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import logging
|
||||
from typing import List, Optional
|
||||
|
||||
from PySide6.QtGui import Qt
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtGui import Qt
|
||||
from PySide2.QtWidgets import (
|
||||
QComboBox,
|
||||
QDialog,
|
||||
QGridLayout,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtGui import QStandardItem
|
||||
from PySide2.QtGui import QStandardItem
|
||||
|
||||
from game.infos.information import Information
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
from PySide6.QtCore import QItemSelectionModel, QPoint
|
||||
from PySide6.QtGui import QStandardItemModel
|
||||
from PySide6.QtWidgets import QListView
|
||||
from PySide2.QtCore import QItemSelectionModel, QPoint
|
||||
from PySide2.QtGui import QStandardItemModel
|
||||
from PySide2.QtWidgets import QListView
|
||||
|
||||
from game import Game, game
|
||||
from qt_ui.windows.infos.QInfoItem import QInfoItem
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import QFrame, QVBoxLayout, QLabel, QGroupBox
|
||||
from PySide2.QtWidgets import QFrame, QVBoxLayout, QLabel, QGroupBox
|
||||
|
||||
from game import Game
|
||||
from qt_ui.windows.infos.QInfoList import QInfoList
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import QFrame, QLabel, QGridLayout
|
||||
from PySide2.QtWidgets import QFrame, QLabel, QGridLayout
|
||||
|
||||
from game.infos.information import Information
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import itertools
|
||||
from typing import Optional
|
||||
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtWidgets import (
|
||||
QCheckBox,
|
||||
QDialog,
|
||||
QFrame,
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
import logging
|
||||
import typing
|
||||
|
||||
from PySide6.QtCore import Signal
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import Signal
|
||||
from PySide2.QtWidgets import (
|
||||
QDialog,
|
||||
QPlainTextEdit,
|
||||
QVBoxLayout,
|
||||
QPushButton,
|
||||
)
|
||||
from PySide6.QtGui import QTextCursor, QIcon
|
||||
from PySide2.QtGui import QTextCursor, QIcon
|
||||
|
||||
from qt_ui.logging_handler import HookableInMemoryHandler
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
"""Dialog window for editing flights."""
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtWidgets import (
|
||||
QDialog,
|
||||
QVBoxLayout,
|
||||
)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtGui import QStandardItem, QIcon
|
||||
from PySide2.QtGui import QStandardItem, QIcon
|
||||
|
||||
from game.ato.package import Package
|
||||
from game.ato.flight import Flight
|
||||
|
||||
@ -3,8 +3,8 @@ import logging
|
||||
from datetime import timedelta
|
||||
from typing import Optional
|
||||
|
||||
from PySide6.QtCore import QItemSelection, QTime, Qt, Signal
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import QItemSelection, QTime, Qt, Signal
|
||||
from PySide2.QtWidgets import (
|
||||
QCheckBox,
|
||||
QDialog,
|
||||
QHBoxLayout,
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
from datetime import timedelta
|
||||
|
||||
from PySide6.QtCore import QItemSelectionModel, QSize
|
||||
from PySide6.QtGui import QStandardItemModel
|
||||
from PySide6.QtWidgets import QAbstractItemView, QListView
|
||||
from PySide2.QtCore import QItemSelectionModel, QSize
|
||||
from PySide2.QtGui import QStandardItemModel
|
||||
from PySide2.QtWidgets import QAbstractItemView, QListView
|
||||
|
||||
from qt_ui.models import GameModel
|
||||
from qt_ui.windows.mission.QFlightItem import QFlightItem
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
from typing import Optional, Type
|
||||
|
||||
from PySide6.QtCore import Qt, Signal
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import Qt, Signal
|
||||
from PySide2.QtWidgets import (
|
||||
QComboBox,
|
||||
QDialog,
|
||||
QLabel,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import QTabWidget
|
||||
from PySide2.QtWidgets import QTabWidget
|
||||
|
||||
from game import Game
|
||||
from game.ato.flight import Flight
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
"""Combo box for selecting squadrons."""
|
||||
from typing import Optional
|
||||
|
||||
from PySide6.QtWidgets import QComboBox
|
||||
from PySide2.QtWidgets import QComboBox
|
||||
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.squadrons.airwing import AirWing
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtWidgets import QFrame, QLabel, QComboBox, QVBoxLayout
|
||||
from PySide2.QtCore import Qt
|
||||
from PySide2.QtWidgets import QFrame, QLabel, QComboBox, QVBoxLayout
|
||||
|
||||
from game import Game
|
||||
from game.ato.flight import Flight
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtWidgets import (
|
||||
QGridLayout,
|
||||
QGroupBox,
|
||||
QLabel,
|
||||
|
||||
@ -2,7 +2,7 @@ import logging
|
||||
import operator
|
||||
from typing import Optional
|
||||
|
||||
from PySide6.QtWidgets import QComboBox
|
||||
from PySide2.QtWidgets import QComboBox
|
||||
|
||||
from game import Game
|
||||
from game.data.weapons import Pylon, Weapon
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import logging
|
||||
|
||||
from PySide6.QtWidgets import QGroupBox, QLabel, QMessageBox, QVBoxLayout
|
||||
from PySide2.QtWidgets import QGroupBox, QLabel, QMessageBox, QVBoxLayout
|
||||
|
||||
from game import Game
|
||||
from game.ato.flight import Flight
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import QGroupBox, QHBoxLayout, QLabel
|
||||
from PySide2.QtWidgets import QGroupBox, QHBoxLayout, QLabel
|
||||
|
||||
from game.ato.flight import Flight
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import logging
|
||||
from typing import Optional, Callable
|
||||
|
||||
from PySide6.QtCore import Signal, QModelIndex
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import Signal, QModelIndex
|
||||
from PySide2.QtWidgets import (
|
||||
QLabel,
|
||||
QGroupBox,
|
||||
QSpinBox,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtWidgets import (
|
||||
QComboBox,
|
||||
QGroupBox,
|
||||
QHBoxLayout,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import QLabel, QGroupBox, QGridLayout
|
||||
from PySide2.QtWidgets import QLabel, QGroupBox, QGridLayout
|
||||
|
||||
from qt_ui.uiconstants import AIRCRAFT_ICONS
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from PySide6.QtCore import Signal
|
||||
from PySide6.QtWidgets import QFrame, QGridLayout, QVBoxLayout
|
||||
from PySide2.QtCore import Signal
|
||||
from PySide2.QtWidgets import QFrame, QGridLayout, QVBoxLayout
|
||||
|
||||
from game import Game
|
||||
from game.ato.flight import Flight
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import QGroupBox, QHBoxLayout, QLabel, QVBoxLayout
|
||||
from PySide2.QtWidgets import QGroupBox, QHBoxLayout, QLabel, QVBoxLayout
|
||||
|
||||
from game.ato.flightwaypoint import FlightWaypoint
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
from typing import List
|
||||
|
||||
from PySide6.QtGui import QStandardItem
|
||||
from PySide2.QtGui import QStandardItem
|
||||
|
||||
from game.ato.flightwaypoint import FlightWaypoint
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
from datetime import timedelta
|
||||
|
||||
from PySide6.QtCore import QItemSelectionModel, QPoint
|
||||
from PySide6.QtGui import QStandardItem, QStandardItemModel
|
||||
from PySide6.QtWidgets import QHeaderView, QTableView
|
||||
from PySide2.QtCore import QItemSelectionModel, QPoint
|
||||
from PySide2.QtGui import QStandardItem, QStandardItemModel
|
||||
from PySide2.QtWidgets import QHeaderView, QTableView
|
||||
|
||||
from game.ato.package import Package
|
||||
from game.ato.flightwaypointtype import FlightWaypointType
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import logging
|
||||
from typing import Iterable, List, Optional
|
||||
|
||||
from PySide6.QtCore import Signal
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import Signal
|
||||
from PySide2.QtWidgets import (
|
||||
QFrame,
|
||||
QGridLayout,
|
||||
QLabel,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from PySide6.QtCore import Qt, Signal
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import Qt, Signal
|
||||
from PySide2.QtWidgets import (
|
||||
QCheckBox,
|
||||
QDialog,
|
||||
QHBoxLayout,
|
||||
|
||||
@ -2,10 +2,10 @@ from __future__ import annotations
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from PySide6 import QtGui
|
||||
from PySide6.QtCore import QItemSelectionModel, QModelIndex, Qt
|
||||
from PySide6.QtGui import QStandardItem, QStandardItemModel
|
||||
from PySide6.QtWidgets import QAbstractItemView, QListView
|
||||
from PySide2 import QtGui
|
||||
from PySide2.QtCore import QItemSelectionModel, QModelIndex, Qt
|
||||
from PySide2.QtGui import QStandardItem, QStandardItemModel
|
||||
from PySide2.QtWidgets import QAbstractItemView, QListView
|
||||
|
||||
import qt_ui.uiconstants as CONST
|
||||
from game.campaignloader.campaign import Campaign
|
||||
|
||||
@ -4,9 +4,9 @@ import logging
|
||||
from datetime import timedelta
|
||||
from typing import List
|
||||
|
||||
from PySide6 import QtGui, QtWidgets
|
||||
from PySide6.QtCore import QDate, QItemSelectionModel, QPoint, Qt
|
||||
from PySide6.QtWidgets import QCheckBox, QLabel, QTextEdit, QVBoxLayout
|
||||
from PySide2 import QtGui, QtWidgets
|
||||
from PySide2.QtCore import QDate, QItemSelectionModel, QPoint, Qt
|
||||
from PySide2.QtWidgets import QCheckBox, QLabel, QTextEdit, QVBoxLayout
|
||||
from jinja2 import Environment, FileSystemLoader, select_autoescape
|
||||
|
||||
from game import db
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtWidgets import (
|
||||
QDialog,
|
||||
QPlainTextEdit,
|
||||
QVBoxLayout,
|
||||
@ -6,8 +6,8 @@ from PySide6.QtWidgets import (
|
||||
QPushButton,
|
||||
QLabel,
|
||||
)
|
||||
from PySide6.QtGui import QTextCursor
|
||||
from PySide6.QtCore import QTimer
|
||||
from PySide2.QtGui import QTextCursor
|
||||
from PySide2.QtCore import QTimer
|
||||
|
||||
import qt_ui.uiconstants as CONST
|
||||
from game.game import Game
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from PySide6.QtGui import QIcon, Qt
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtGui import QIcon, Qt
|
||||
from PySide2.QtWidgets import (
|
||||
QDialog,
|
||||
QVBoxLayout,
|
||||
QPushButton,
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import os
|
||||
|
||||
from PySide6.QtGui import Qt
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtGui import Qt
|
||||
from PySide2.QtWidgets import (
|
||||
QComboBox,
|
||||
QFileDialog,
|
||||
QFrame,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from PySide6.QtGui import QIcon, Qt
|
||||
from PySide6.QtWidgets import QDialog, QVBoxLayout, QPushButton, QHBoxLayout
|
||||
from PySide2.QtGui import QIcon, Qt
|
||||
from PySide2.QtWidgets import QDialog, QVBoxLayout, QPushButton, QHBoxLayout
|
||||
|
||||
from qt_ui.windows.preferences.QLiberationPreferences import QLiberationPreferences
|
||||
|
||||
|
||||
@ -2,9 +2,9 @@ import logging
|
||||
import textwrap
|
||||
from typing import Callable
|
||||
|
||||
from PySide6.QtCore import QItemSelectionModel, QPoint, QSize, Qt
|
||||
from PySide6.QtGui import QStandardItem, QStandardItemModel
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import QItemSelectionModel, QPoint, QSize, Qt
|
||||
from PySide2.QtGui import QStandardItem, QStandardItemModel
|
||||
from PySide2.QtWidgets import (
|
||||
QAbstractItemView,
|
||||
QCheckBox,
|
||||
QComboBox,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtWidgets import (
|
||||
from PySide2.QtCore import Qt
|
||||
from PySide2.QtWidgets import (
|
||||
QCheckBox,
|
||||
QGridLayout,
|
||||
QGroupBox,
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
from PySide6 import QtCharts
|
||||
from PySide6.QtCore import QPoint, Qt
|
||||
from PySide6.QtGui import QPainter
|
||||
from PySide6.QtWidgets import QFrame, QGridLayout
|
||||
|
||||
from PySide2.QtCharts import QtCharts
|
||||
from PySide2.QtCore import QPoint, Qt
|
||||
from PySide2.QtGui import QPainter
|
||||
from PySide2.QtWidgets import QFrame, QGridLayout
|
||||
from game import Game
|
||||
|
||||
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
from PySide6 import QtCharts
|
||||
from PySide6.QtCore import QPoint, Qt
|
||||
from PySide6.QtGui import QPainter
|
||||
from PySide6.QtWidgets import QFrame, QGridLayout
|
||||
|
||||
from PySide2.QtCharts import QtCharts
|
||||
from PySide2.QtCore import QPoint, Qt
|
||||
from PySide2.QtGui import QPainter
|
||||
from PySide2.QtWidgets import QFrame, QGridLayout
|
||||
from game import Game
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from PySide6.QtWidgets import QDialog, QGridLayout, QTabWidget
|
||||
from PySide2.QtWidgets import QDialog, QGridLayout, QTabWidget
|
||||
|
||||
import qt_ui.uiconstants as CONST
|
||||
from game.game import Game
|
||||
|
||||
@ -33,14 +33,14 @@ pyinstaller==4.7
|
||||
pyinstaller-hooks-contrib==2021.3
|
||||
pyparsing==3.0.6
|
||||
pyproj==3.3.0
|
||||
PySide6==6.2.1
|
||||
PySide2==5.15.2
|
||||
pytest==6.2.5
|
||||
python-dateutil==2.8.2
|
||||
pywin32-ctypes==0.2.0
|
||||
PyYAML==6.0
|
||||
regex==2021.11.10
|
||||
Shapely==1.8.0
|
||||
shiboken6==6.2.1
|
||||
shiboken2==5.15.2
|
||||
six==1.16.0
|
||||
tabulate==0.8.9
|
||||
text-unidecode==1.3
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user