Skip to content
Snippets Groups Projects
Commit da50656e authored by Jacob Wahlman's avatar Jacob Wahlman :ok_hand:
Browse files

changed to pyside2

parent 449cae5e
No related branches found
No related tags found
3 merge requests!67WIP: B-ASIC version 1.0.0 hotfix,!65B-ASIC version 1.0.0,!50Changed from PyQt5 to PySide2
Pipeline #15399 passed
......@@ -18,7 +18,7 @@ The following packages are required in order to build the library:
* setuptools
* pybind11
* numpy
* pyside2/pyqt5
* pyside2
To build a binary distribution, the following additional packages are required:
* Python:
......
from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow, QLabel, QAction,\
from PySide2.QtWidgets import QApplication, QWidget, QMainWindow, QLabel, QAction,\
QStatusBar, QMenuBar, QLineEdit, QPushButton, QSlider, QScrollArea, QVBoxLayout,\
QHBoxLayout, QDockWidget, QToolBar, QMenu, QLayout, QSizePolicy, QListWidget, QListWidgetItem,\
QGraphicsLineItem, QGraphicsWidget
from PyQt5.QtCore import Qt, QSize, QLineF, QPoint, QRectF
from PyQt5.QtGui import QIcon, QFont, QPainter, QPen
from PySide2.QtCore import Qt, QSize, QLineF, QPoint, QRectF
from PySide2.QtGui import QIcon, QFont, QPainter, QPen
class Arrow(QGraphicsLineItem):
......
......@@ -7,17 +7,17 @@ import os.path
from properties_window import PropertiesWindow
from PyQt5.QtWidgets import QPushButton, QMenu, QAction
from PyQt5.QtCore import Qt, QSize, pyqtSignal
from PyQt5.QtGui import QIcon
from PySide2.QtWidgets import QPushButton, QMenu, QAction
from PySide2.QtCore import Qt, QSize, Signal
from PySide2.QtGui import QIcon
from utils import decorate_class, handle_error
@decorate_class(handle_error)
class DragButton(QPushButton):
connectionRequested = pyqtSignal(QPushButton)
moved = pyqtSignal()
connectionRequested = Signal(QPushButton)
moved = Signal()
def __init__(self, name, operation, operation_path_name, is_show_name, window, parent = None):
self.name = name
self.is_show_name = is_show_name
......
......@@ -7,7 +7,7 @@
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from PySide2 import QtCore, QtGui, QtWidgets
class Ui_main_window(object):
......
......@@ -18,13 +18,13 @@ from utils import decorate_class, handle_error
from numpy import linspace
from PyQt5.QtWidgets import QApplication, QWidget, QMainWindow, QLabel, QAction,\
from PySide2.QtWidgets import QApplication, QWidget, QMainWindow, QLabel, QAction,\
QStatusBar, QMenuBar, QLineEdit, QPushButton, QSlider, QScrollArea, QVBoxLayout,\
QHBoxLayout, QDockWidget, QToolBar, QMenu, QLayout, QSizePolicy, QListWidget,\
QListWidgetItem, QGraphicsView, QGraphicsScene, QShortcut, QGraphicsTextItem,\
QGraphicsProxyWidget
from PyQt5.QtCore import Qt, QSize
from PyQt5.QtGui import QIcon, QFont, QPainter, QPen, QBrush, QKeySequence
from PySide2.QtCore import Qt, QSize
from PySide2.QtGui import QIcon, QFont, QPainter, QPen, QBrush, QKeySequence
MIN_WIDTH_SCENE = 600
......
import sys
from PyQt5.QtWidgets import QPushButton, QMenu
from PyQt5.QtCore import Qt, pyqtSignal
from PySide2.QtWidgets import QPushButton, QMenu
from PySide2.QtCore import Qt, Signal
class PortButton(QPushButton):
connectionRequested = pyqtSignal(QPushButton)
moved = pyqtSignal()
connectionRequested = Signal(QPushButton)
moved = Signal()
def __init__(self, name, operation, window, parent=None):
self.pressed = False
self.window = window
......
from PyQt5.QtWidgets import QDialog, QLineEdit, QPushButton, QVBoxLayout, QHBoxLayout,\
from PySide2.QtWidgets import QDialog, QLineEdit, QPushButton, QVBoxLayout, QHBoxLayout,\
QLabel, QCheckBox
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QIntValidator
from PySide2.QtCore import Qt
from PySide2.QtGui import QIntValidator
class PropertiesWindow(QDialog):
def __init__(self, operation, main_window):
......@@ -10,7 +10,7 @@ class PropertiesWindow(QDialog):
self.main_window = main_window
self.setWindowFlags(Qt.WindowTitleHint | Qt.WindowCloseButtonHint)
self.setWindowTitle("Properties")
self.name_layout = QHBoxLayout()
self.name_layout.setSpacing(50)
self.name_label = QLabel("Name:")
......
from PyQt5.QtWidgets import QErrorMessage
from PySide2.QtWidgets import QErrorMessage
from traceback import format_exc
def handle_error(fn):
......
......@@ -36,9 +36,9 @@ class CMakeBuild(build_ext):
if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)
env = os.environ.copy()
print(f"=== Configuring {ext.name} ===")
print(f"Temp dir: {self.build_temp}")
print(f"Output dir: {cmake_output_dir}")
......@@ -71,7 +71,7 @@ setuptools.setup(
install_requires = [
"pybind11>=2.3.0",
"numpy",
"install_qt_binding",
"pyside2",
"graphviz"
],
packages = ["b_asic"],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment