-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustomWidgets.py
More file actions
46 lines (35 loc) · 1.17 KB
/
customWidgets.py
File metadata and controls
46 lines (35 loc) · 1.17 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python
#
# Created by Aaron Beckett July 9, 2013
# Editted by:
# Aaron Beckett
#
#
'''Chamview Gui used by CLIWrapper to get user inputted options for Chamview.'''
from PyQt4.QtGui import *
from PyQt4.QtCore import SIGNAL, SLOT
class CollapsibleFrame( QWidget ):
def __init__(self, toggle_widget, parent=None):
QWidget.__init__(self, parent)
self.__setup()
self.connect(toggle_widget, SIGNAL("toggled(bool)"),
self.frame, SLOT("setVisible(bool)"))
def __setup(self):
layout = QVBoxLayout()
self.frame = QFrame()
self.frame.setFrameStyle(QFrame.StyledPanel|QFrame.Sunken)
self.frame.hide()
layout.addWidget(self.frame)
QWidget.setLayout(self, layout)
def setLayout(self, layout):
self.frame.setLayout(layout)
class WindowStream(QDialog):
def __init__(self, parent=None):
QDialog.__init__(self,parent)
layout = QVBoxLayout()
self.setWindowTitle('Grab Frames')
self.textedit = QTextEdit()
layout.addWidget(self.textedit)
self.setLayout(layout)
def write(self, text):
self.textedit.append(text)