remove duplicated import lines

This commit is contained in:
Luke Hubmayer-Werner 2023-07-19 17:51:03 +09:30
parent 31daf29228
commit e87942c731
1 changed files with 0 additions and 53 deletions

View File

@ -38,64 +38,11 @@ import includes.const as const
import includes.ff4 as ff4 import includes.ff4 as ff4
import includes.ff6 as ff6 import includes.ff6 as ff6
pyqt_version = 0
skip_pyqt5 = 'PYQT4' in os.environ
filename_en = 'Final Fantasy V (Japan) [En by RPGe v1.1].sfc' filename_en = 'Final Fantasy V (Japan) [En by RPGe v1.1].sfc'
filename_jp = 'Final Fantasy V (Japan).sfc' filename_jp = 'Final Fantasy V (Japan).sfc'
filename_jp_ff4 = 'Final Fantasy IV (Japan) (Rev A).sfc' filename_jp_ff4 = 'Final Fantasy IV (Japan) (Rev A).sfc'
filename_jp_ff6 = 'Final Fantasy VI (Japan).sfc' filename_jp_ff6 = 'Final Fantasy VI (Japan).sfc'
if not skip_pyqt5:
try:
from PyQt5 import QtGui, QtCore
from PyQt5.QtGui import QIcon, QPalette, QColor, QFont, QFontInfo, QImage, QPixmap
from PyQt5.QtWidgets import (
QApplication, QMainWindow, QFormLayout,
QGridLayout, QHBoxLayout, QVBoxLayout,
QAbstractItemView, QHeaderView, QListWidget,
QListWidgetItem, QTabWidget, QTableWidget,
QTableWidgetItem, QFrame, QScrollArea,
QStackedWidget, QWidget, QCheckBox, QComboBox,
QDoubleSpinBox, QGroupBox, QLineEdit,
QPushButton, QRadioButton, QSpinBox,
QStyleOptionButton, QToolButton, QProgressBar,
QDialog, QColorDialog, QDialogButtonBox,
QFileDialog, QInputDialog, QMessageBox,
QAction, QActionGroup, QLabel, QMenu, QStyle,
QSystemTrayIcon, QStyleOptionProgressBar
)
pyqt_version = 5
except ImportError:
print("Couldn't import Qt5 dependencies. "
'Make sure you installed the PyQt5 package.')
if pyqt_version == 0:
try:
import sip
sip.setapi('QVariant', 2)
from PyQt4 import QtGui, QtCore
from PyQt4.QtGui import (
QApplication, QMainWindow, QFormLayout,
QGridLayout, QHBoxLayout, QVBoxLayout,
QAbstractItemView, QHeaderView, QListWidget,
QListWidgetItem, QTabWidget, QTableWidget,
QTableWidgetItem, QFrame, QScrollArea,
QStackedWidget, QWidget, QCheckBox,
QComboBox, QDoubleSpinBox, QGroupBox,
QLineEdit, QPushButton, QRadioButton,
QSpinBox, QStyleOptionButton, QToolButton,
QProgressBar, QDialog, QColorDialog,
QDialogButtonBox, QFileDialog, QInputDialog,
QMessageBox, QAction, QActionGroup,
QLabel, QMenu, QStyle,
QSystemTrayIcon, QIcon, QPalette, QColor,
QValidator, QFont, QFontInfo, QImage, QPixmap
)
from PyQt4.QtGui import QStyleOptionProgressBarV2 as QStyleOptionProgressBar
pyqt_version = 4
except ImportError:
print("Couldn't import Qt dependencies. "
'Make sure you installed the PyQt4 package.')
sys.exit(-1)
class FF5Reader(QMainWindow): class FF5Reader(QMainWindow):