gui: get rid of pyqtgraph.LayoutWidget

This commit is contained in:
Sebastien Bourdeauducq 2016-02-15 00:05:30 +01:00
parent df16a1da73
commit 3ab35f7f8d
9 changed files with 20 additions and 11 deletions

View File

@ -7,6 +7,7 @@ import os
import PyQt5 import PyQt5
from quamash import QEventLoop, QtGui, QtCore, QtWidgets from quamash import QEventLoop, QtGui, QtCore, QtWidgets
import pyqtgraph
from artiq import __artiq_dir__ as artiq_dir from artiq import __artiq_dir__ as artiq_dir
from artiq.tools import * from artiq.tools import *

View File

@ -4,9 +4,9 @@ from functools import partial
import logging import logging
from quamash import QtGui, QtCore, QtWidgets from quamash import QtGui, QtCore, QtWidgets
from pyqtgraph import LayoutWidget
from artiq.tools import short_format from artiq.tools import short_format
from artiq.gui.tools import LayoutWidget
from artiq.gui.models import DictSyncTreeSepModel from artiq.gui.models import DictSyncTreeSepModel

View File

@ -2,9 +2,8 @@ import logging
from collections import OrderedDict from collections import OrderedDict
from quamash import QtGui, QtCore 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__) logger = logging.getLogger(__name__)

View File

@ -5,9 +5,8 @@ from collections import OrderedDict
from quamash import QtGui, QtCore, QtWidgets from quamash import QtGui, QtCore, QtWidgets
from pyqtgraph import LayoutWidget from artiq.gui.tools import (LayoutWidget, log_level_to_name,
QDockWidgetCloseDetect)
from artiq.gui.tools import log_level_to_name, QDockWidgetCloseDetect
from artiq.gui.entries import argty_to_entry from artiq.gui.entries import argty_to_entry

View File

@ -3,8 +3,8 @@ import logging
from functools import partial from functools import partial
from quamash import QtGui, QtCore, QtWidgets from quamash import QtGui, QtCore, QtWidgets
from pyqtgraph import LayoutWidget
from artiq.gui.tools import LayoutWidget
from artiq.gui.models import DictSyncTreeSepModel from artiq.gui.models import DictSyncTreeSepModel

View File

@ -5,9 +5,9 @@ import re
from functools import partial from functools import partial
from quamash import QtGui, QtCore, QtWidgets 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): def _make_wrappable(row, width=30):

View File

@ -3,7 +3,6 @@ import time
from functools import partial from functools import partial
from quamash import QtGui, QtCore, QtWidgets from quamash import QtGui, QtCore, QtWidgets
from pyqtgraph import dockarea
from artiq.gui.models import DictSyncModel from artiq.gui.models import DictSyncModel
from artiq.tools import elide from artiq.tools import elide

View File

@ -2,7 +2,8 @@ import logging
from functools import partial from functools import partial
from quamash import QtGui, QtCore, QtWidgets from quamash import QtGui, QtCore, QtWidgets
from pyqtgraph import LayoutWidget
from artiq.gui.tools import LayoutWidget
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@ -35,3 +35,13 @@ class QDockWidgetCloseDetect(QtWidgets.QDockWidget):
def closeEvent(self, event): def closeEvent(self, event):
self.sigClosed.emit() self.sigClosed.emit()
QtWidgets.QDockWidget.closeEvent(self, event) 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)