本文整理汇总了Python中PyQt4.QtGui.QGroupBox.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python QGroupBox.__init__方法的具体用法?Python QGroupBox.__init__怎么用?Python QGroupBox.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtGui.QGroupBox
的用法示例。
在下文中一共展示了QGroupBox.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__(self,parent):
QGroupBox.__init__(self,parent)
self.parent = parent
self.setMaximumHeight(100)
self.setMaximumWidth(300)
self.layout = QHBoxLayout(self)
self.layout.setMargin(10)
self.setTitle("Map")
lab1 = QLabel("Size: ")
lab2 = QLabel("Orientation: ")
btn1 = QComboBox()
btn1.addItem("320x240")
btn1.addItem("480x320")
btn1.addItem("640x480")
btn1.addItem("720x480")
btn1.addItem("800x480")
btn1.addItem("852x480")
btn1.addItem("960x540")
btn2 = QComboBox()
btn2.addItem("Portrait")
btn2.addItem("Landscape")
self.layout.addWidget(lab1)
self.layout.addWidget(btn1)
self.layout.addWidget(lab2)
self.layout.addWidget(btn2)
示例2: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__(self, id, logscale=False, style=True):
QGroupBox.__init__(self)
self.setTitle("Control Axes")
self.setToolTip("<p>Control if/how axes are drawn</p>")
self.xAxisCheckBox = QCheckBox("Show X axis")
self.xAxisCheckBox.setChecked(True)
self.yAxisCheckBox = QCheckBox("Show Y axis")
self.yAxisCheckBox.setChecked(True)
self.id = id
hbox = HBoxLayout()
hbox.addWidget(self.xAxisCheckBox)
hbox.addWidget(self.yAxisCheckBox)
vbox = VBoxLayout()
vbox.addLayout(hbox)
if logscale:
self.xLogCheckBox = QCheckBox("Logarithmic X axis")
self.yLogCheckBox = QCheckBox("Logarithmic Y axis")
hbox = HBoxLayout()
hbox.addWidget(self.xLogCheckBox)
hbox.addWidget(self.yLogCheckBox)
vbox.addLayout(hbox)
if style:
self.directionComboBox = QComboBox()
self.directionComboBox.addItems(["Parallel to axis",
"Horizontal",
"Perpendicualr to axis",
"Vertical"])
directionLabel = QLabel("Axis label style:")
directionLabel.setBuddy(self.directionComboBox)
hbox = HBoxLayout()
hbox.addWidget(directionLabel)
hbox.addWidget(self.directionComboBox)
vbox.addLayout(hbox)
self.setLayout(vbox)
示例3: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__(self, attribute, values, parent=None):
QGroupBox.__init__(self, attribute, parent)
self._attribute = attribute
self._current_items = []
self._defaults = {}
self._inputField = None
self._inputFieldType = None
self._insertIndex = -1
self._insertAtEnd = False
self._shortcuts = {}
# Setup GUI
self._layout = FloatingLayout()
self.setLayout(self._layout)
self._buttons = {}
self._labels = {}
#Abhishek : Add Label Dropdown
self.ann_input_combo = ExtendedCombo(self)
self._layout.insertWidget(0,self.ann_input_combo)
self.ann_input_combo.show()
self.modelItem = QStandardItemModel()
self.ann_input_combo.setModel(self.modelItem)
self.ann_input_combo.setModelColumn(0)
self.ann_input_combo.currentIndexChanged.connect(self.onAnnotationValueSelected)
# Add interface elements
self.updateValues(values)
示例4: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__( self, accordion, title, widget ):
QGroupBox.__init__(self, accordion)
# create the layout
layout = QVBoxLayout()
layout.setContentsMargins(6, 6, 6, 6)
layout.setSpacing(0)
layout.addWidget(widget)
self._accordianWidget = accordion
self._rolloutStyle = 2
self._dragDropMode = 0
self.setAcceptDrops(True)
self.setLayout(layout)
self.setContextMenuPolicy(Qt.CustomContextMenu)
self.customContextMenuRequested.connect(self.showMenu)
# create custom properties
self._widget = widget
self._collapsed = False
self._collapsible = True
self._clicked = False
self._customData = {}
# set common properties
self.setTitle(title)
示例5: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__(self, tree, dataset, master, parent=None):
QGroupBox.__init__(self, parent)
Control.__init__(self, tree, dataset, master)
self.setLayout(QVBoxLayout())
if tree:
self.setGroup(tree)
示例6: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__(self, parent = None, name = 'Block Group'):
QGroupBox.__init__(self, name, parent)
self.parent = parent
self.setStyleSheet(SHARED)
self.layout = QVBoxLayout(self)
self._disks = []
self.hide()
示例7: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__(self, title, page):
""" page is a SettingsPage """
QGroupBox.__init__(self, title, page)
page.layout().addWidget(self)
page.layout().addStretch(1)
page.groups.append(self)
self.changed = page.changed # quick connect :-)
self.page = page
示例8: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__(self, parent=None):
QGroupBox.__init__(self, tr("Active Directory membership status"), parent)
self._setup_gui()
self.deleted = False
self._set_unknown(None)
self.connect(self, SIGNAL('destroyed()'), self._deactivate)
示例9: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__(self):
QGroupBox.__init__(self, None)
self.timer = QTimer()
self._selectedDrive = None
self.setupUi(self)
self._updateDriveList()
self.timer.start(5000)
self.connect(self.timer, SIGNAL('timeout()'), self.timerTimeout)
self.connect(self.driveList, SIGNAL('currentRowChanged(int)'), self.driveListRowChanged)
示例10: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__(self, widget, parent, graph, auto_send=False, buttons=DefaultButtons, name="Zoom / Select"):
widget.settingsHandler.initialize(self)
QGroupBox.__init__(self, name, parent)
self.widget_toolbars = self.register_toolbar(widget)
self.widget = widget
self.graph = graph
self.auto_send = auto_send
self.setup_toolbar(parent)
self.buttons = self.add_buttons(buttons)
self.action(self.selected_button)
示例11: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__(self, parent, name, size, layout = HORIZONTAL):
QGroupBox.__init__(self, '%s - %s MB' % (name, size), parent)
if layout == HORIZONTAL:
self.layout = QHBoxLayout(self)
else:
self.layout = QVBoxLayout(self)
self._name = name
self._layout = layout
self._size = size
self._used_size = 0
self._partitions = []
self._accepted_blocks = []
示例12: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__(self, attribute, values, parent=None):
QGroupBox.__init__(self, attribute, parent)
self._attribute = attribute
self._current_items = []
self._defaults = {}
self._inputField = None
self._inputFieldType = None
self._insertIndex = -1
self._insertAtEnd = False
self._shortcuts = {}
# Setup GUI
self._layout = FloatingLayout()
self.setLayout(self._layout)
self._buttons = {}
# Add interface elements
self.updateValues(values)
示例13: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__(self, values, parent=None):
QGroupBox.__init__(self, parent)
self.setTitle(tr("Device information"))
hbox = QHBoxLayout(self)
edenwall_image = QPixmap(':/images/edenwall_small')
label = QLabel()
label.setPixmap(edenwall_image)
hbox.addWidget(label)
self.form = QFormLayout()
hbox.addLayout(self.form)
self.form.addRow(tr("Device type:"), QLabel(strong(values['type'])))
self.form.addRow(tr("Property of:"), QLabel(strong(values['client'])))
self.form.addRow(tr("Hardware version:"), QLabel(strong(values['hw_version'])))
self.form.addRow(tr("Serial number:"), QLabel(strong(values['serial'])))
示例14: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__(self, parent=None):
QGroupBox.__init__(self, parent)
self.ICONS = {
self.INFO: QPixmap(":icons-32/info"),
self.WARNING: QPixmap(":icons-32/warning"),
self.CRITICAL: QPixmap(":icons-32/off_line"),
}
self.box = QHBoxLayout(self)
self.icon = QLabel()
self.message = QLabel()
self.message.setTextFormat(Qt.RichText)
self.message.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
self.display_items = self.message, self.icon
self.box.addWidget(self.icon)
self.box.addWidget(self.message)
# self.box.addStretch()
self.setNoMessage()
示例15: __init__
# 需要导入模块: from PyQt4.QtGui import QGroupBox [as 别名]
# 或者: from PyQt4.QtGui.QGroupBox import __init__ [as 别名]
def __init__(self,
from_min_date=None, from_min_time=None,
from_max_date=None, from_max_time=None,
to_min_date=None, to_min_time=None,
to_max_date=None, to_max_time=None,
title='Define time range',
from_label='From',
to_label='To',
object_name='', parent=None, flags=0):
QGroupBox.__init__(self)
#members
self.from_time = None # QTime
self.from_date = None # QDate
self.to_time = None # QTime
self.to_date = None # QDate
self.from_min_date = from_min_date # QDate
self.from_min_time = from_min_time # QTime
self.from_max_date = from_max_date # QDate
self.from_max_time = from_max_time # QTime
self.to_min_date = to_min_date # QDate
self.to_min_time = to_min_time # QTime
self.to_max_date = to_max_date # QDate
self.to_max_time = to_max_time # QTime
#private gui elements
self._from_label = QLabel(from_label)
self._from_date_le = QLineEdit()
self._from_date_cw = self._make_cw()
self._from_date_cw_btn = self._make_cw_button()
self._from_time_te = QTimeEdit()
self._to_label = QLabel(to_label)
self._to_date_le = QLineEdit()
self._to_date_cw = self._make_cw()
self._to_date_cw_btn = self._make_cw_button()
self._to_time_te = QTimeEdit()
self.setTitle(title)
self._setup_ui()
# from time ranges and default
if self.from_min_time is None or not self.from_min_time.isValid():
self.from_min_time = QTime(0, 0, 0, 0)
if self.from_max_time is None or not self.from_max_time.isValid():
self.from_max_time = QTime(23, 59, 59, 999)
self.from_time = self.from_min_time
# to time ranges and default
if self.to_min_time is None or not self.to_min_time.isValid():
self.to_min_time = QTime(0, 0, 0, 0)
if self.to_max_time is None or not self.to_max_time.isValid():
self.to_max_time = QTime(23, 59, 59, 999)
self.to_time = self.to_max_time
# from date ranges and default
if self.from_min_date is None or not self.from_min_date.isValid():
self.from_min_date = QDate.fromJulianDay(1)
if self.from_max_date is None or not self.from_max_date.isValid():
self.from_max_date = QDate.fromJulianDay(sys.maxint)
self.from_date = self.from_min_date
# to date ranges and default
if self.to_min_date is None or not self.to_min_date.isValid():
self.to_min_date = QDate.fromJulianDay(1)
if self.to_max_date is None or not self.to_max_date.isValid():
self.to_max_date = QDate.fromJulianDay(sys.maxint)
self.to_date = self.to_max_date
#setup the connections
self._from_date_cw.clicked.connect(self.set_from_date)
self._to_date_cw.clicked.connect(self.set_to_date)
self._from_time_te.timeChanged.connect(self.set_from_time)
self._to_time_te.timeChanged.connect(self.set_to_time)
self._update_state()