-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathGridGraphWindow.py
More file actions
26 lines (23 loc) · 958 Bytes
/
GridGraphWindow.py
File metadata and controls
26 lines (23 loc) · 958 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
'''
Window containing a grid of graphs
'''
import sys
from PyQt4 import QtGui
from GraphWidgetPyQtGraph import Graph_PyQtGraph as Graph
from ScrollingGraphWidgetPyQtGraph import ScrollingGraph_PyQtGraph as ScrollingGraph
import GUIConfig
from twisted.internet.defer import Deferred, inlineCallbacks, returnValue
from twisted.internet.task import LoopingCall
from twisted.internet.threads import blockingCallFromThread
class GridGraphWindow(QtGui.QWidget):
def __init__(self, g_list, row_list, column_list, reactor, parent=None):
super(GridGraphWindow, self).__init__(parent)
self.reactor = reactor
self.initUI(g_list, row_list, column_list)
self.show()
def initUI(self, g_list, row_list, column_list):
reactor = self.reactor
layout = QtGui.QGridLayout()
for k in range(len(g_list)):
layout.addWidget(g_list[k], row_list[k], column_list[k])
self.setLayout(layout)