本文整理汇总了Python中BlissFramework.Qt4_Icons.load方法的典型用法代码示例。如果您正苦于以下问题:Python Qt4_Icons.load方法的具体用法?Python Qt4_Icons.load怎么用?Python Qt4_Icons.load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlissFramework.Qt4_Icons
的用法示例。
在下文中一共展示了Qt4_Icons.load方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: propertyChanged
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def propertyChanged(self, property_name, old_value, new_value):
"""
Descript. :
"""
if property_name == 'ldapServer':
self.ldap_connection_hwobj = self.getHardwareObject(new_value)
elif property_name == 'codes':
self.setCodes(new_value)
elif property_name == 'localLogin':
self.local_login_hwobj = self.getHardwareObject(new_value)
elif property_name == 'dbConnection':
self.lims_hwobj = self.getHardwareObject(new_value)
elif property_name == 'instanceServer':
if self.instanceServer is not None:
self.disconnect(self.instanceServer, QtCore.SIGNAL('passControl'), self.passControl)
self.disconnect(self.instanceServer, QtCore.SIGNAL('haveControl'), self.haveControl)
self.instanceServer = self.getHardwareObject(new_value)
if self.instanceServer is not None:
self.connect(self.instanceServer, QtCore.SIGNAL('passControl'), self.passControl)
self.connect(self.instanceServer, QtCore.SIGNAL('haveControl'), self.haveControl)
elif property_name == 'icons':
icons_list = new_value.split()
try:
self.login_button.setIcon(QtGui.QIcon(Qt4_Icons.load(icons_list[0])))
except IndexError:
pass
try:
self.logout_button.setIcon(QtGui.QIcon(Qt4_Icons.load(icons_list[1])))
except IndexError:
pass
elif property_name == 'session':
self.session_hwobj = self.getHardwareObject(new_value)
else:
BlissWidget.propertyChanged(self, property_name, old_value, new_value)
示例2: __init__
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def __init__(self, parent, caption = ''):
"""Constructor
parent -- the parent QObject
caption -- a caption string (default: no caption)"""
ProcedureEntryField.__init__(self, parent, caption)
box = QWidget(self)
self.savedValue = None
self.textbox = QLineEdit('', box)
okCancelBox = QHBox(box)
okCancelBox.setSpacing(0)
okCancelBox.setMargin(0)
self.cmdOK = QPushButton(okCancelBox)
self.cmdOK.setFixedSize(20, 20)
self.cmdCancel = QPushButton(okCancelBox)
self.cmdCancel.setFixedSize(20, 20)
self.cmdOK.setPixmap(Qt4_Icons.load('button_ok_small')) #QPixmap(Icons.okXPM))
self.cmdCancel.setPixmap(Qt4_Icons.load('button_cancel_small')) #QPixmap(Icons.cancelXPM))
QObject.connect(self.textbox, SIGNAL('textChanged( const QString & )'), self.valueChanging)
QObject.connect(self.textbox, SIGNAL('returnPressed()'), self.valueChanged)
QObject.connect(self.cmdOK, SIGNAL('clicked()'), self.valueChanged)
QObject.connect(self.cmdCancel, SIGNAL('clicked()'), self.cancelClicked)
self.cmdCancel.setEnabled(False)
self.cmdOK.setEnabled(True)
QHBoxLayout(box, 0, 5)
box.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.MinimumExpanding)
box.layout().addWidget(self.textbox, 0, Qt.AlignLeft)
box.layout().addWidget(okCancelBox, 0, Qt.AlignLeft)
box.layout().addItem(QSpacerItem(0, 0, QSizePolicy.Expanding, QSizePolicy.Fixed))
示例3: addConnection
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def addConnection(senderWindow, sender, connection):
newItem = QtGui.QTreeWidgetItem(self.connections_treewidget)
windowName = senderWindow["name"]
newItem.setText(1, windowName)
if sender != senderWindow:
# object-*
newItem.setText(2, sender["name"])
newItem.setText(4, connection["receiverWindow"])
try:
receiverWindow = self.configuration.windows[connection["receiverWindow"]]
except KeyError:
receiverWindow = {}
ok = False
else:
ok = True
if len(connection["receiver"]):
# *-object
newItem.setText(5, connection["receiver"])
ok = ok and receiverInWindow(connection["receiver"], receiverWindow)
if ok:
newItem.setIcon(0, QtGui.QIcon(Qt4_Icons.load('button_ok_small')))
else:
newItem.setIcon(0, QtGui.QIcon(Qt4_Icons.load('button_cancel_small')))
newItem.setText(3, connection['signal'])
newItem.setText(6, connection['slot'])
示例4: __init__
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def __init__(self, parent=None):
"""
Descript. : parent (QTreeWidget) : Item's QTreeWidget parent.
"""
QtGui.QWidget.__init__(self, parent)
self.OK = QtGui.QToolButton(parent)
self.OK.setAutoRaise(True)
self.OK.setIcon(QtGui.QIcon(Qt4_Icons.load('button_ok_small'))) #QPixmap(Icons.tinyOK)))
self.Cancel = QtGui.QToolButton(parent)
self.Cancel.setAutoRaise(True)
self.Cancel.setIcon(QtGui.QIcon(Qt4_Icons.load('button_cancel_small'))) #QPixmap(Icons.tinyCancel)))
self.Reset = QtGui.QToolButton(parent)
self.Reset.setIcon(QtGui.QIcon(Qt4_Icons.load('button_default_small'))) #QPixmap(Icons.defaultXPM)))
self.Reset.setAutoRaise(True)
self.setEnabled(False)
main_layout = QtGui.QHBoxLayout()
main_layout.addWidget(self.OK)
main_layout.addWidget(self.Cancel)
main_layout.addWidget(self.Reset)
main_layout.setSpacing(0)
main_layout.setContentsMargins(0,0,0,0)
self.setLayout(main_layout)
示例5: __init__
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def __init__(self, parent, caption = '', minValue = 0, maxValue = 32768, step = 1, unit = ''):
"""Constructor
parent -- the parent QObject
caption -- a caption string (default: no caption)
minValue -- minimal accepted value (default: 0)
maxValue -- maximal accepted value (default: 32768)
step -- step (default: 1)
unit -- unit string is appended to the end of the displayed value (default: no string)"""
ProcedureEntryField.__init__(self, parent, caption)
box = QWidget(self)
self.spinbox = QSpinBox(minValue, maxValue, step, box)
self.spinbox.setSuffix(' ' + str(unit))
okCancelBox = QHBox(box)
okCancelBox.setSpacing(0)
okCancelBox.setMargin(0)
self.cmdOK = QPushButton(okCancelBox)
self.cmdCancel = QPushButton(okCancelBox)
self.cmdOK.setPixmap(Qt4_Icons.load('button_ok_small')) #QPixmap(Icons.okXPM))
self.cmdOK.setFixedSize(20, 20)
self.cmdCancel.setPixmap(Qt4_Icons.load('button_cancel_small')) #QPixmap(Icons.cancelXPM))
self.cmdCancel.setFixedSize(20, 20)
QObject.connect(self.cmdOK, SIGNAL('clicked()'), self.valueChanged)
QObject.connect(self.cmdCancel, SIGNAL('clicked()'), self.cancelClicked)
QObject.connect(self.spinbox, SIGNAL('valueChanged(int)'), self.valueChanging)
QHBoxLayout(box, 0, 5)
box.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.MinimumExpanding)
box.layout().addWidget(self.spinbox, 0, Qt.AlignLeft)
box.layout().addWidget(okCancelBox, 0, Qt.AlignLeft)
box.layout().addItem(QSpacerItem(0, 0, QSizePolicy.Expanding, QSizePolicy.Fixed))
self.setIsOk(False)
示例6: set_Icons
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def set_Icons(self, icon_run, icon_stop):
"""
Descript. :
Args. :
Return :
"""
self.run_icon = QtGui.QIcon(Qt4_Icons.load(icon_run))
self.stop_icon = QtGui.QIcon(Qt4_Icons.load(icon_stop))
if self.executing:
self.setIcon(self.stop_icon)
else:
self.setIcon(self.run_icon)
示例7: propertyChanged
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def propertyChanged(self, property_name, old_value, new_value):
"""
Descript. :
"""
if property_name == "loginAsUser":
self.login_as_user = new_value
if self.login_as_user:
self.login_as_user_widget.show()
self.login_as_proposal_widget.hide()
else:
self.login_as_user_widget.hide()
self.login_as_proposal_widget.show()
elif property_name == "ldapServer":
self.ldap_connection_hwobj = self.getHardwareObject(new_value)
elif property_name == "codes":
self.setCodes(new_value)
elif property_name == "localLogin":
self.local_login_hwobj = self.getHardwareObject(new_value)
elif property_name == "dbConnection":
self.lims_hwobj = self.getHardwareObject(new_value)
elif property_name == "instanceServer":
if self.instanceServer is not None:
self.disconnect(self.instanceServer, QtCore.SIGNAL("passControl"), self.passControl)
self.disconnect(self.instanceServer, QtCore.SIGNAL("haveControl"), self.haveControl)
self.instanceServer = self.getHardwareObject(new_value)
if self.instanceServer is not None:
self.connect(self.instanceServer, QtCore.SIGNAL("passControl"), self.passControl)
self.connect(self.instanceServer, QtCore.SIGNAL("haveControl"), self.haveControl)
elif property_name == "icons":
icons_list = new_value.split()
try:
self.login_button.setIcon(QtGui.QIcon(Qt4_Icons.load(icons_list[0])))
except IndexError:
pass
try:
self.logout_button.setIcon(QtGui.QIcon(Qt4_Icons.load(icons_list[1])))
except IndexError:
pass
elif property_name == "session":
self.session_hwobj = self.getHardwareObject(new_value)
else:
BlissWidget.propertyChanged(self, property_name, old_value, new_value)
示例8: add_pending_connection
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def add_pending_connection(self, connection_dict):
"""
Descript. :
"""
new_item = QtGui.QTreeWidgetItem(self.connections_treewidget,
QtCore.QStringList([
'',
connection_dict['senderWindow'],
connection_dict['senderObject'],
connection_dict['signal'],
connection_dict['receiverWindow'],
connection_dict['receiverObject'],
connection_dict['slot']]))
new_item.setIcon(0, QtGui.QIcon(Qt4_Icons.load('button_ok_small')))
self.connections_treewidget.addTopLevelItem(new_item)
示例9: tab_slot
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def tab_slot(self, hide=True, page = {"widget" : scroll_area, \
"label": self.tabText(self.indexOf(scroll_area)),
"index" : self.indexOf(scroll_area),
"icon": icon, "hidden" : False}):
if hide:
if not page["hidden"]:
self.removeTab(self.indexOf(page["widget"]))
self.repaint()
page["hidden"] = True
else:
if page["hidden"]:
if icon:
pixmap = Qt4_Icons.load(icon)
self.insertTab(page["widget"], QtGui.QIcon(pixmap,pixmap), label, page["index"])
else:
self.insertTab(page["index"], page["widget"], page["label"])
self.showPage(page["widget"])
page["hidden"] = False
else:
self.showPage(page["widget"])
示例10: propertyChanged
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def propertyChanged(self, property_name, old_value, new_value):
"""
Descript. :
Args. :
Return :
"""
if property_name == 'mnemonic':
if self.instance_server_hwobj is not None:
self.disconnect(self.instance_server_hwobj, QtCore.SIGNAL('chatMessageReceived'), self.message_arrived)
self.disconnect(self.instance_server_hwobj, QtCore.SIGNAL('newClient'), self.new_client)
self.disconnect(self.instance_server_hwobj, QtCore.SIGNAL('serverInitialized'),self.server_initialized)
self.disconnect(self.instance_server_hwobj, QtCore.SIGNAL('clientInitialized'),self.client_initialized)
self.disconnect(self.instance_server_hwobj, QtCore.SIGNAL('serverClosed'), self.client_closed)
self.disconnect(self.instance_server_hwobj, QtCore.SIGNAL('wantsControl'), self.wants_control)
self.disconnect(self.instance_server_hwobj, QtCore.SIGNAL('haveControl'), self.have_control)
self.disconnect(self.instance_server_hwobj, QtCore.SIGNAL('passControl'), self.pass_control)
self.disconnect(self.instance_server_hwobj, QtCore.SIGNAL('clientClosed'), self.client_closed)
self.disconnect(self.instance_server_hwobj, QtCore.SIGNAL('clientChanged'), self.client_changed)
self.instance_server_hwobj = self.getHardwareObject(new_value)
if self.instance_server_hwobj is not None:
self.connect(self.instance_server_hwobj, QtCore.SIGNAL('chatMessageReceived'), self.message_arrived)
self.connect(self.instance_server_hwobj, QtCore.SIGNAL('newClient'), self.new_client)
self.connect(self.instance_server_hwobj, QtCore.SIGNAL('serverInitialized'),self.server_initialized)
self.connect(self.instance_server_hwobj, QtCore.SIGNAL('clientInitialized'),self.client_initialized)
self.connect(self.instance_server_hwobj, QtCore.SIGNAL('serverClosed'), self.client_closed)
self.connect(self.instance_server_hwobj, QtCore.SIGNAL('wantsControl'), self.wants_control)
self.connect(self.instance_server_hwobj, QtCore.SIGNAL('haveControl'), self.have_control)
self.connect(self.instance_server_hwobj, QtCore.SIGNAL('passControl'), self.pass_control)
self.connect(self.instance_server_hwobj, QtCore.SIGNAL('clientClosed'), self.client_closed)
self.connect(self.instance_server_hwobj, QtCore.SIGNAL('clientChanged'), self.client_changed)
elif property_name == 'icons':
icons_list = new_value.split()
try:
self.send_button.setIcon(QtGui.QIcon(Qt4_Icons.load(icons_list[0])))
except IndexError:
pass
else:
BlissWidget.propertyChanged(self,property_name, old_value, new_value)
示例11: set_icons
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def set_icons(self, icons):
"""
Descript. :
Args. :
Return :
"""
icons_list = icons.split()
try:
self.button_centre.set_Icons(icons_list[0], icons_list[1])
self.button_accept.setIcon(QtGui.QIcon(Qt4_Icons.load(icons_list[2])))
self.button_snapshot.setIcon(QtGui.QIcon(Qt4_Icons.load(icons_list[3])))
self.button_reject.setIcon(QtGui.QIcon(Qt4_Icons.load(icons_list[4])))
self.button_toogle_phase.setIcon(QtGui.QIcon(Qt4_Icons.load(icons_list[5])))
self.button_refresh_camera.setIcon(QtGui.QIcon(Qt4_Icons.load(icons_list[6])))
self.button_visual_align.setIcon(QtGui.QIcon(Qt4_Icons.load(icons_list[7])))
except IndexError:
logging.getLogger().error("HutchMenuBrick: Unable to set icons")
示例12: __init__
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def __init__(self, parent = None, name = "task_toolbox"):
QtGui.QWidget.__init__(self, parent)
self.setObjectName = name
# Hardware objects ----------------------------------------------------
self.graphics_manager_hwobj = None
# Internal variables --------------------------------------------------
self.tree_brick = None
self.previous_page_index = 0
# Graphic elements ----------------------------------------------------
self.method_group_box = QtGui.QGroupBox(" Collection method", self)
font = self.method_group_box.font()
font.setPointSize(10)
self.method_group_box.setFont(font)
self.tool_box = QtGui.QToolBox(self.method_group_box)
self.tool_box.setObjectName("tool_box")
self.tool_box.setFixedWidth(475)
self.tool_box.setFont(font)
self.discrete_page = CreateDiscreteWidget(self.tool_box, "Discrete",)
self.char_page = CreateCharWidget(self.tool_box, "Characterise")
self.helical_page = CreateHelicalWidget(self.tool_box, "helical_page")
self.energy_scan_page = CreateEnergyScanWidget(self.tool_box, "energy_scan")
self.xrf_spectrum_page = CreateXRFSpectrumWidget(self.tool_box, "xrf_spectrum")
self.advanced_page = CreateAdvancedWidget(self.tool_box, "advanced_scan")
self.tool_box.addItem(self.discrete_page, "Standard Collection")
self.tool_box.addItem(self.char_page, "Characterisation")
self.tool_box.addItem(self.helical_page, "Helical Collection")
self.tool_box.addItem(self.energy_scan_page, "Energy Scan")
self.tool_box.addItem(self.xrf_spectrum_page, "XRF Spectrum")
self.tool_box.addItem(self.advanced_page, "Advanced")
self.button_box = QtGui.QWidget(self)
self.create_task_button = QtGui.QPushButton(" Add to queue", self.button_box)
self.create_task_button.setIcon(QtGui.QIcon(Qt4_Icons.load("add_row.png")))
msg = "Add the collection method to the selected sample"
self.create_task_button.setToolTip(msg)
# Layout --------------------------------------------------------------
_method_group_box_vlayout = QtGui.QVBoxLayout(self.method_group_box)
_method_group_box_vlayout.addWidget(self.tool_box)
_method_group_box_vlayout.setSpacing(0)
_method_group_box_vlayout.setContentsMargins(0, 0, 0, 0)
_button_box_hlayout = QtGui.QHBoxLayout(self.button_box)
_button_box_hlayout.addStretch(0)
_button_box_hlayout.addWidget(self.create_task_button)
_button_box_hlayout.setSpacing(0)
_button_box_hlayout.setContentsMargins(0, 0, 0, 0)
_main_vlayout = QtGui.QVBoxLayout(self)
_main_vlayout.addWidget(self.method_group_box)
#_main_vlayout.addStretch(0)
_main_vlayout.addWidget(self.button_box)
_main_vlayout.setSpacing(0)
_main_vlayout.setContentsMargins(0, 0, 0, 0)
# SizePolicies --------------------------------------------------------
self.setSizePolicy(QtGui.QSizePolicy.Expanding,
QtGui.QSizePolicy.Expanding)
# Qt signal/slot connections ------------------------------------------
self.create_task_button.clicked.connect(self.create_task_button_click)
self.tool_box.currentChanged.connect(self.current_page_changed)
示例13: setIcons
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def setIcons(self,scan_one_icon):
self.scan_basket_button.setIcon(Qt4_Icons.load(scan_one_icon))
示例14: __init__
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def __init__(self, *args):
"""
Descript. :
"""
BlissWidget.__init__(self, *args)
# Hardware objects ----------------------------------------------------
self.beamline_config_hwobj = None
self.lims_hwobj = None
self.sample_changer_hwobj = None
self.queue_hwobj = None
# Internal variables --------------------------------------------------
self.current_cpos = None
self.__collection_stopped = False
self.current_view = None
# Properties ----------------------------------------------------------
self.addProperty("holderLengthMotor", "string", "")
self.addProperty("queue", "string", "/Qt4_queue")
self.addProperty("queue_model", "string", "/Qt4_queue-model")
self.addProperty("beamline_setup", "string", "/Qt4_beamline-setup-break")
self.addProperty("xml_rpc_server", "string", "/Qt4_xml_rpc_server")
# Signals ------------------------------------------------------------
self.defineSignal("enable_hutch_menu", ())
self.defineSignal("enable_command_menu", ())
self.defineSignal("enable_task_toolbox", ())
# Hiding and showing the tabs
self.defineSignal("hide_sample_tab", ())
self.defineSignal("hide_dc_parameters_tab", ())
self.defineSignal("hide_sample_centring_tab", ())
self.defineSignal("hide_dcg_tab", ())
self.defineSignal("hide_sample_changer_tab", ())
self.defineSignal("hide_char_parameters_tab", ())
self.defineSignal("hide_energy_scan_tab",())
self.defineSignal("hide_xrf_scan_tab",())
self.defineSignal("hide_workflow_tab", ())
self.defineSignal("hide_advanced_scan_tab", ())
# Populating the tabs with data
self.defineSignal("populate_dc_parameter_widget", ())
self.defineSignal("populate_char_parameter_widget",())
self.defineSignal("populate_sample_details",())
self.defineSignal("populate_energy_scan_widget", ())
self.defineSignal("populate_xrf_scan_widget", ())
self.defineSignal("populate_workflow_tab", ())
self.defineSignal("populate_advanced_scan_tab", ())
# Handle selection
self.defineSignal("selection_changed",())
self.defineSignal("set_directory", ())
self.defineSignal("set_prefix", ())
self.defineSignal("set_sample", ())
# Slots ---------------------------------------------------------------
self.defineSlot("logged_in", ())
self.defineSlot("status_msg_changed", ())
self.defineSlot("sample_load_state_changed", ())
self.defineSlot("set_session", ())
self.defineSlot("get_tree_brick",())
self.defineSlot("get_selected_samples", ())
#self.defineSlot("get_mounted_sample", ())
#self.defineSlot("new_centred_position", ())
#self.defineSlot("add_dcg", ())
#self.defineSlot("add_data_collection", ())
#self.defineSlot("set_session", ())
# Graphic elements ----------------------------------------------------
self.sample_changer_widget = uic.loadUi(os.path.join(os.path.dirname(__file__),
"widgets/ui_files/Qt4_sample_changer_widget_layout.ui"))
self.refresh_pixmap = Qt4_Icons.load("Refresh2.png")
self.sample_changer_widget.synch_button.setIcon(QtGui.QIcon(self.refresh_pixmap))
self.sample_changer_widget.synch_button.setText("Synch ISPyB")
self.dc_tree_widget = DataCollectTree(self)
self.dc_tree_widget.selection_changed_cb = self.selection_changed
self.dc_tree_widget.run_cb = self.run
#self.dc_tree_widget.clear_centred_positions_cb = \
# self.clear_centred_positions
# Layout --------------------------------------------------------------
main_layout = QtGui.QVBoxLayout(self)
main_layout.addWidget(self.sample_changer_widget)
main_layout.addWidget(self.dc_tree_widget)
main_layout.setSpacing(0)
main_layout.setContentsMargins(0, 0, 0, 0)
self.setLayout(main_layout)
# SizePolicies --------------------------------------------------------
self.sample_changer_widget.setSizePolicy(QtGui.QSizePolicy.MinimumExpanding,
QtGui.QSizePolicy.Fixed)
# Qt signal/slot connections ------------------------------------------
self.sample_changer_widget.details_button.clicked.\
#.........这里部分代码省略.........
示例15: __init__
# 需要导入模块: from BlissFramework import Qt4_Icons [as 别名]
# 或者: from BlissFramework.Qt4_Icons import load [as 别名]
def __init__(self, parent = None, name = "parameter_widget"):
QtGui.QWidget.__init__(self, parent)
if name is not None:
self.setObjectName(name)
# Properties ----------------------------------------------------------
# Signals ------------------------------------------------------------
# Slots ---------------------------------------------------------------
# Hardware objects ----------------------------------------------------
self._beamline_setup_hwobj = None
# Internal variables --------------------------------------------------
self._data_collection = None
self.add_dc_cb = None
self._tree_view_item = None
# Graphic elements ----------------------------------------------------
_dc_parameters_widget = QtGui.QWidget(self)
self.caution_pixmap = Qt4_Icons.load("Caution2.png")
self.path_widget = DataPathWidget(_dc_parameters_widget)
self.acq_widget = AcquisitionWidget(_dc_parameters_widget,
layout = 'horizontal')
#self.acq_widget.setFixedHeight(170)
self.processing_widget = ProcessingWidget(_dc_parameters_widget)
self.position_widget = uic.loadUi(os.path.join(os.path.dirname(__file__),
'ui_files/Qt4_snapshot_widget_layout.ui'))
#self.position_widget.setMinimumSize(310, 210)
# Layout --------------------------------------------------------------
_dc_parameters_widget_layout = QtGui.QVBoxLayout(self)
_dc_parameters_widget_layout.addWidget(self.path_widget)
_dc_parameters_widget_layout.addWidget(self.acq_widget)
_dc_parameters_widget_layout.addWidget(self.processing_widget)
_dc_parameters_widget_layout.setSpacing(2)
_dc_parameters_widget_layout.addStretch(0)
_dc_parameters_widget_layout.setContentsMargins(0, 0, 0, 0)
_dc_parameters_widget.setLayout(_dc_parameters_widget_layout)
_main_hlayout = QtGui.QHBoxLayout(self)
_main_hlayout.addWidget(_dc_parameters_widget)
_main_hlayout.addWidget(self.position_widget)
_main_hlayout.setSpacing(2)
_main_hlayout.setContentsMargins(0, 0, 0, 0)
_main_hlayout.addStretch(0)
self.setLayout(_main_hlayout)
# SizePolicies --------------------------------------------------------
# Qt signal/slot connections ------------------------------------------
self.path_widget.data_path_layout.prefix_ledit.textChanged.connect(
self._prefix_ledit_change)
self.path_widget.data_path_layout.run_number_ledit.textChanged.connect(
self._run_number_ledit_change)
self.connect(self.acq_widget, QtCore.SIGNAL('mad_energy_selected'),
self.mad_energy_selected)
self.connect(self.acq_widget,
QtCore.SIGNAL("path_template_changed"),
self.handle_path_conflict)
#QtCore.QObject.connect(QtGui.QApplication, QtCore.SIGNAL('tab_changed'),
# self.tab_changed)
# Other ---------------------------------------------------------------
Qt4_widget_colors.set_widget_color(self.path_widget,
Qt4_widget_colors.GROUP_BOX_GRAY)
Qt4_widget_colors.set_widget_color(self.acq_widget,
Qt4_widget_colors.GROUP_BOX_GRAY)
Qt4_widget_colors.set_widget_color(self.processing_widget,
Qt4_widget_colors.GROUP_BOX_GRAY)
Qt4_widget_colors.set_widget_color(self.position_widget,
Qt4_widget_colors.GROUP_BOX_GRAY)