mirror of https://github.com/m-labs/artiq.git
gui: get rid of pyqtgraph.LayoutWidget
This commit is contained in:
parent
df16a1da73
commit
3ab35f7f8d
|
@ -7,6 +7,7 @@ import os
|
|||
|
||||
import PyQt5
|
||||
from quamash import QEventLoop, QtGui, QtCore, QtWidgets
|
||||
import pyqtgraph
|
||||
|
||||
from artiq import __artiq_dir__ as artiq_dir
|
||||
from artiq.tools import *
|
||||
|
|
|
@ -4,9 +4,9 @@ from functools import partial
|
|||
import logging
|
||||
|
||||
from quamash import QtGui, QtCore, QtWidgets
|
||||
from pyqtgraph import LayoutWidget
|
||||
|
||||
from artiq.tools import short_format
|
||||
from artiq.gui.tools import LayoutWidget
|
||||
from artiq.gui.models import DictSyncTreeSepModel
|
||||
|
||||
|
||||
|
|
|
@ -2,9 +2,8 @@ import logging
|
|||
from collections import OrderedDict
|
||||
|
||||
from quamash import QtGui, QtCore
|
||||
from pyqtgraph import LayoutWidget
|
||||
|
||||
from artiq.gui.tools import disable_scroll_wheel
|
||||
from artiq.gui.tools import LayoutWidget, disable_scroll_wheel
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
|
@ -5,9 +5,8 @@ from collections import OrderedDict
|
|||
|
||||
from quamash import QtGui, QtCore, QtWidgets
|
||||
|
||||
from pyqtgraph import LayoutWidget
|
||||
|
||||
from artiq.gui.tools import log_level_to_name, QDockWidgetCloseDetect
|
||||
from artiq.gui.tools import (LayoutWidget, log_level_to_name,
|
||||
QDockWidgetCloseDetect)
|
||||
from artiq.gui.entries import argty_to_entry
|
||||
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ import logging
|
|||
from functools import partial
|
||||
|
||||
from quamash import QtGui, QtCore, QtWidgets
|
||||
from pyqtgraph import LayoutWidget
|
||||
|
||||
from artiq.gui.tools import LayoutWidget
|
||||
from artiq.gui.models import DictSyncTreeSepModel
|
||||
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ import re
|
|||
from functools import partial
|
||||
|
||||
from quamash import QtGui, QtCore, QtWidgets
|
||||
from pyqtgraph import LayoutWidget
|
||||
|
||||
from artiq.gui.tools import log_level_to_name, QDockWidgetCloseDetect
|
||||
from artiq.gui.tools import (LayoutWidget, log_level_to_name,
|
||||
QDockWidgetCloseDetect)
|
||||
|
||||
|
||||
def _make_wrappable(row, width=30):
|
||||
|
|
|
@ -3,7 +3,6 @@ import time
|
|||
from functools import partial
|
||||
|
||||
from quamash import QtGui, QtCore, QtWidgets
|
||||
from pyqtgraph import dockarea
|
||||
|
||||
from artiq.gui.models import DictSyncModel
|
||||
from artiq.tools import elide
|
||||
|
|
|
@ -2,7 +2,8 @@ import logging
|
|||
from functools import partial
|
||||
|
||||
from quamash import QtGui, QtCore, QtWidgets
|
||||
from pyqtgraph import LayoutWidget
|
||||
|
||||
from artiq.gui.tools import LayoutWidget
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
|
@ -35,3 +35,13 @@ class QDockWidgetCloseDetect(QtWidgets.QDockWidget):
|
|||
def closeEvent(self, event):
|
||||
self.sigClosed.emit()
|
||||
QtWidgets.QDockWidget.closeEvent(self, event)
|
||||
|
||||
|
||||
class LayoutWidget(QtWidgets.QWidget):
|
||||
def __init__(self, parent=None):
|
||||
QtGui.QWidget.__init__(self, parent)
|
||||
self.layout = QtGui.QGridLayout()
|
||||
self.setLayout(self.layout)
|
||||
|
||||
def addWidget(self, item, row=None, col=None, rowspan=1, colspan=1):
|
||||
self.layout.addWidget(item, row, col, rowspan, colspan)
|
||||
|
|
Loading…
Reference in New Issue