def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) cp.setIcons() self.instr_dir = cp.instr_dir self.instr_name = cp.instr_name self.exp_name = cp.exp_name self.det_name = cp.det_name self.calib_dir = cp.calib_dir self.setGeometry(100, 50, 700, 30) self.setWindowTitle('Select calibration directory') self.setFrame() self.list_of_exp = None self.titIns = QtGui.QLabel('Ins:') self.titExp = QtGui.QLabel('Exp:') self.titDet = QtGui.QLabel('Det:') self.butIns = QtGui.QPushButton(self.instr_name.value() + self.char_expand) self.butExp = QtGui.QPushButton(self.exp_name.value() + self.char_expand) self.butDet = QtGui.QPushButton('Select' + self.char_expand) self.butBro = QtGui.QPushButton('Browse') self.ediDir = QtGui.QLineEdit(self.calib_dir.value()) self.ediDir.setReadOnly(True) self.hbox = QtGui.QHBoxLayout() self.hbox.addWidget(self.titIns) self.hbox.addWidget(self.butIns) self.hbox.addWidget(self.titExp) self.hbox.addWidget(self.butExp) self.hbox.addWidget(self.ediDir) self.hbox.addWidget(self.butBro) self.hbox.addStretch(1) self.hbox.addWidget(self.titDet) self.hbox.addWidget(self.butDet) self.hbox.addStretch(1) self.setLayout(self.hbox) #self.connect( self.ediExp, QtCore.SIGNAL('editingFinished ()'), self.processEdiExp ) self.connect(self.butIns, QtCore.SIGNAL('clicked()'), self.onButIns) self.connect(self.butExp, QtCore.SIGNAL('clicked()'), self.onButExp) self.connect(self.butBro, QtCore.SIGNAL('clicked()'), self.onButBro) self.connect(self.butDet, QtCore.SIGNAL('clicked()'), self.onButDet) #self.connect( self.ediDir, QtCore.SIGNAL('editingFinished()'), self.onEdiDir ) self.showToolTips() self.setStyle() #self.setStatusMessage() if cp.guistatus is not None: cp.guistatus.updateStatusInfo() cp.guiinsexpdirdet = self
def __init__(self, parent=None, app=None): self.name = 'GUIMaskEditor' self.myapp = app QtGui.QWidget.__init__(self, parent) self.fname_prefix = cp.fname_prefix self.path_mask_img = cp.path_mask_img self.img_arr = None cp.setIcons() self.setGeometry(10, 25, 650, 30) self.setWindowTitle('Mask Editor Control') #self.setWindowIcon(cp.icon_monitor) self.palette = QtGui.QPalette() self.resetColorIsSet = False self.setFrame() self.titFile = QtGui.QLabel('File:') self.ediFile = QtGui.QLineEdit(self.path_mask_img.value()) self.ediFile.setReadOnly(True) self.butMaskEditor = QtGui.QPushButton('Open Mask Editor') self.butMaskEditor.setIcon(cp.icon_monitor) self.butBrowse = QtGui.QPushButton('Browse') self.hboxB = QtGui.QHBoxLayout() self.hboxB.addStretch(1) self.hboxB.addWidget(self.titFile) self.hboxB.addWidget(self.ediFile) self.hboxB.addWidget(self.butBrowse) self.hboxB.addStretch(1) self.hboxE = QtGui.QHBoxLayout() self.hboxE.addStretch(1) self.hboxE.addWidget(self.butMaskEditor) self.hboxE.addStretch(1) self.vboxW = QtGui.QVBoxLayout() self.vboxW.addStretch(1) self.vboxW.addLayout(self.hboxB) self.vboxW.addLayout(self.hboxE) self.vboxW.addStretch(1) self.setLayout(self.vboxW) self.connect(self.butMaskEditor, QtCore.SIGNAL('clicked()'), self.onButMaskEditor) self.connect(self.butBrowse, QtCore.SIGNAL('clicked()'), self.onButBrowse) self.showToolTips() self.setStyle() cp.guimaskeditor = self self.move(10, 25)
def __init__(self, parent=None, list_in_out=[], win_title='Set check boxes'): QtGui.QDialog.__init__(self,parent) #self.setGeometry(20, 40, 500, 200) self.setWindowTitle(win_title) self.setFrame() #self.setModal(True) self.list_in_out = list_in_out self.vbox = QtGui.QVBoxLayout() self.make_gui_checkbox() self.but_cancel = QtGui.QPushButton('&Cancel') self.but_apply = QtGui.QPushButton('&Apply') cp.setIcons() self.but_cancel.setIcon(cp.icon_button_cancel) self.but_apply .setIcon(cp.icon_button_ok) self.connect( self.but_cancel, QtCore.SIGNAL('clicked()'), self.onCancel ) self.connect( self.but_apply, QtCore.SIGNAL('clicked()'), self.onApply ) self.hbox = QtGui.QHBoxLayout() self.hbox.addWidget(self.but_cancel) self.hbox.addWidget(self.but_apply) self.hbox.addStretch(1) self.vbox.addLayout(self.hbox) self.setLayout(self.vbox) self.but_cancel.setFocusPolicy(QtCore.Qt.NoFocus) self.setStyle() self.showToolTips()
def __init__ ( self, parent=None ) : QtGui.QWidget.__init__(self, parent) cp.setIcons() self.instr_dir = cp.instr_dir self.instr_name = cp.instr_name self.exp_name = cp.exp_name self.det_name = cp.det_name self.calib_dir = cp.calib_dir self.det_but_title = cp.det_but_title self.but_current = None self.setGeometry(100, 50, 700, 30) self.setWindowTitle('Select calibration directory') self.setFrame() self.list_of_exp = None self.titIns = QtGui.QLabel('Ins:') self.titExp = QtGui.QLabel('Exp:') self.titDet = QtGui.QLabel('Det:') self.butIns = QtGui.QPushButton( self.instr_name.value() + self.char_expand ) self.butExp = QtGui.QPushButton( self.exp_name.value() + self.char_expand ) self.butDet = QtGui.QPushButton( self.det_but_title.value() + self.char_expand ) self.butBro = QtGui.QPushButton( 'Browse' ) self.ediDir = QtGui.QLineEdit ( self.calib_dir.value() ) self.ediDir.setReadOnly(True) self.hbox = QtGui.QHBoxLayout() self.hbox.addWidget(self.titIns) self.hbox.addWidget(self.butIns) self.hbox.addWidget(self.titExp) self.hbox.addWidget(self.butExp) self.hbox.addWidget(self.ediDir) self.hbox.addWidget(self.butBro) self.hbox.addStretch(1) self.hbox.addWidget(self.titDet) self.hbox.addWidget(self.butDet) self.hbox.addStretch(1) self.setLayout(self.hbox) #self.connect( self.ediExp, QtCore.SIGNAL('editingFinished ()'), self.processEdiExp ) self.connect( self.butIns, QtCore.SIGNAL('clicked()'), self.onButIns ) self.connect( self.butExp, QtCore.SIGNAL('clicked()'), self.onButExp ) self.connect( self.butBro, QtCore.SIGNAL('clicked()'), self.onButBro ) self.connect( self.butDet, QtCore.SIGNAL('clicked()'), self.onButDet ) #self.connect( self.ediDir, QtCore.SIGNAL('editingFinished()'), self.onEdiDir ) self.showToolTips() self.setStyle() #self.setStatusMessage() #if cp.guistatus is not None : cp.guistatus.updateStatusInfo() cp.guiinsexpdirdet = self
def __init__(self, parent=None, dict_of_pars={}, win_title='Load action', do_confirm=True): QtGui.QDialog.__init__(self,parent) #self.setGeometry(20, 40, 500, 200) self.setWindowTitle(win_title) self.setFrame() #self.setModal(True) self.dict_of_pars = dict_of_pars self.do_confirm = do_confirm self.vbox = QtGui.QVBoxLayout() self.make_radio_buttons() self.but_cancel = QtGui.QPushButton('&Cancel') self.but_apply = QtGui.QPushButton('&Apply') cp.setIcons() self.but_cancel.setIcon(cp.icon_button_cancel) self.but_apply .setIcon(cp.icon_button_ok) self.connect( self.but_cancel, QtCore.SIGNAL('clicked()'), self.onCancel ) self.connect( self.but_apply, QtCore.SIGNAL('clicked()'), self.onApply ) self.hbox = QtGui.QHBoxLayout() self.hbox.addWidget(self.but_cancel) self.hbox.addWidget(self.but_apply) self.hbox.addStretch(1) self.vbox.addLayout(self.hbox) self.setLayout(self.vbox) self.but_cancel.setFocusPolicy(QtCore.Qt.NoFocus) self.setStyle() self.showToolTips()
def setIcons(self) : cp.setIcons() self.but_elog .setIcon(cp.icon_mail_forward) self.but_load .setIcon(cp.icon_browser) # icon_contents) self.but_save .setIcon(cp.icon_save) self.but_quit .setIcon(cp.icon_exit) self.but_help .setIcon(cp.icon_help) self.but_reset.setIcon(cp.icon_reset)
def setIcons(self): cp.setIcons() self.but_elog.setIcon(cp.icon_mail_forward) self.but_load.setIcon(cp.icon_browser) # icon_contents) self.but_save.setIcon(cp.icon_save) self.but_quit.setIcon(cp.icon_exit) self.but_help.setIcon(cp.icon_help) self.but_reset.setIcon(cp.icon_reset)
def __init__ (self, parent=None, app=None) : self.name = 'GUIButtonBar' self.myapp = app QtGui.QWidget.__init__(self, parent) cp.setIcons() self.setGeometry(10, 25, 650, 30) self.setWindowTitle('Calibration Manager') self.setWindowIcon(cp.icon_monitor) self.palette = QtGui.QPalette() self.resetColorIsSet = False self.setFrame() self.butSave = QtGui.QPushButton('Save') self.butExit = QtGui.QPushButton('Exit') self.butFile = QtGui.QPushButton(u'GUI \u2192 &File') self.butELog = QtGui.QPushButton(u'GUI \u2192 &ELog') self.butLogger = QtGui.QPushButton('Logger') self.butFBrowser = QtGui.QPushButton('File Browser') self.butELog .setIcon(cp.icon_mail_forward) self.butFile .setIcon(cp.icon_save) self.butExit .setIcon(cp.icon_exit) self.butLogger .setIcon(cp.icon_logger) self.butFBrowser.setIcon(cp.icon_browser) self.butSave .setIcon(cp.icon_save_cfg) #self.butStop .setIcon(cp.icon_stop) self.hboxB = QtGui.QHBoxLayout() self.hboxB.addWidget(self.butLogger ) self.hboxB.addWidget(self.butFBrowser ) self.hboxB.addWidget(self.butFile ) self.hboxB.addWidget(self.butELog ) self.hboxB.addStretch(1) self.hboxB.addWidget(self.butSave ) self.hboxB.addWidget(self.butExit ) self.setLayout(self.hboxB) self.connect(self.butExit , QtCore.SIGNAL('clicked()'), self.onExit ) self.connect(self.butLogger , QtCore.SIGNAL('clicked()'), self.onLogger ) self.connect(self.butSave , QtCore.SIGNAL('clicked()'), self.onSave ) self.connect(self.butFile , QtCore.SIGNAL('clicked()'), self.onFile ) #self.connect(self.butELog , QtCore.SIGNAL('clicked()'), self.onELog ) #self.connect(self.butFBrowser , QtCore.SIGNAL('clicked()'), self.onFBrowser ) self.showToolTips() self.setStyle() self.printStyleInfo() #self.onLogger() self.butFBrowser.setStyleSheet(cp.styleButtonBad) cp.guibuttonbar = self self.move(10,25)
def __init__ (self, parent=None, app=None) : self.name = 'GUIMaskEditor' self.myapp = app QtGui.QWidget.__init__(self, parent) self.fname_prefix = cp.fname_prefix self.path_mask_img = cp.path_mask_img self.img_arr = None cp.setIcons() self.setGeometry(10, 25, 650, 30) self.setWindowTitle('Mask Editor Control') #self.setWindowIcon(cp.icon_monitor) self.palette = QtGui.QPalette() self.resetColorIsSet = False self.setFrame() self.titFile = QtGui.QLabel('File:') self.ediFile = QtGui.QLineEdit ( self.path_mask_img.value() ) self.ediFile.setReadOnly(True) self.butMaskEditor = QtGui.QPushButton('Open Mask Editor') self.butMaskEditor .setIcon(cp.icon_monitor) self.butBrowse = QtGui.QPushButton( 'Browse' ) self.hboxB = QtGui.QHBoxLayout() self.hboxB.addStretch(1) self.hboxB.addWidget( self.titFile ) self.hboxB.addWidget( self.ediFile ) self.hboxB.addWidget( self.butBrowse ) self.hboxB.addStretch(1) self.hboxE = QtGui.QHBoxLayout() self.hboxE.addStretch(1) self.hboxE.addWidget( self.butMaskEditor ) self.hboxE.addStretch(1) self.vboxW = QtGui.QVBoxLayout() self.vboxW.addStretch(1) self.vboxW.addLayout( self.hboxB ) self.vboxW.addLayout( self.hboxE ) self.vboxW.addStretch(1) self.setLayout(self.vboxW) self.connect( self.butMaskEditor, QtCore.SIGNAL('clicked()'), self.onButMaskEditor ) self.connect( self.butBrowse, QtCore.SIGNAL('clicked()'), self.onButBrowse ) self.showToolTips() self.setStyle() cp.guimaskeditor = self self.move(10,25)
def __init__(self, parent=None, app=None): self.name = 'GUIButtonBar' self.myapp = app QtGui.QWidget.__init__(self, parent) cp.setIcons() self.setGeometry(10, 25, 650, 30) self.setWindowTitle('Calibration Manager') self.setWindowIcon(cp.icon_monitor) self.palette = QtGui.QPalette() self.resetColorIsSet = False self.setFrame() self.butSave = QtGui.QPushButton('Save') self.butExit = QtGui.QPushButton('Exit') self.butFile = QtGui.QPushButton(u'GUI \u2192 &File') self.butELog = QtGui.QPushButton(u'GUI \u2192 &ELog') self.butLogger = QtGui.QPushButton('Logger') self.butFBrowser = QtGui.QPushButton('File Browser') self.butELog.setIcon(cp.icon_mail_forward) self.butFile.setIcon(cp.icon_save) self.butExit.setIcon(cp.icon_exit) self.butLogger.setIcon(cp.icon_logger) self.butFBrowser.setIcon(cp.icon_browser) self.butSave.setIcon(cp.icon_save_cfg) #self.butStop .setIcon(cp.icon_stop) self.hboxB = QtGui.QHBoxLayout() self.hboxB.addWidget(self.butLogger) self.hboxB.addWidget(self.butFBrowser) self.hboxB.addWidget(self.butFile) self.hboxB.addWidget(self.butELog) self.hboxB.addStretch(1) self.hboxB.addWidget(self.butSave) self.hboxB.addWidget(self.butExit) self.setLayout(self.hboxB) self.connect(self.butExit, QtCore.SIGNAL('clicked()'), self.onExit) self.connect(self.butLogger, QtCore.SIGNAL('clicked()'), self.onLogger) self.connect(self.butSave, QtCore.SIGNAL('clicked()'), self.onSave) self.connect(self.butFile, QtCore.SIGNAL('clicked()'), self.onFile) #self.connect(self.butELog , QtCore.SIGNAL('clicked()'), self.onELog ) #self.connect(self.butFBrowser , QtCore.SIGNAL('clicked()'), self.onFBrowser ) self.showToolTips() self.setStyle() self.printStyleInfo() #self.onLogger() self.butFBrowser.setStyleSheet(cp.styleButtonBad) cp.guibuttonbar = self self.move(10, 25)
def __init__ (self, parent=None, app=None) : self.name = 'GUITabs' self.myapp = app QtGui.QWidget.__init__(self, parent) cp.setIcons() self.setGeometry(10, 25, 750, 670) self.setWindowTitle('Calibration Manager') self.setWindowIcon(cp.icon_monitor) self.palette = QtGui.QPalette() self.resetColorIsSet = False self.setFrame() #self.butELog .setIcon(cp.icon_mail_forward) #self.butFile .setIcon(cp.icon_save) #self.butExit .setIcon(cp.icon_exit) #self.butLogger .setIcon(cp.icon_logger) #self.butFBrowser.setIcon(cp.icon_browser) #self.butSave .setIcon(cp.icon_save_cfg) #self.butStop .setIcon(cp.icon_stop) self.gui_win = None self.hboxW = QtGui.QHBoxLayout() self.vboxW = QtGui.QVBoxLayout() self.vboxW.addStretch(1) self.vboxW.addLayout(self.hboxW) self.vboxW.addStretch(1) self.hboxWW= QtGui.QHBoxLayout() #self.hboxWW.addStretch(1) self.hboxWW.addLayout(self.vboxW) self.hboxWW.addStretch(1) self.makeTabBar() self.guiSelector() if self.orientation == 'H' : self.box = QtGui.QVBoxLayout() else : self.box = QtGui.QHBoxLayout() self.box.addWidget(self.tab_bar) self.box.addLayout(self.hboxWW) self.box.addStretch(1) self.setLayout(self.box) self.showToolTips() self.setStyle() gu.printStyleInfo(self) cp.guitabs = self self.move(10,25)
def __init__(self, parent=None, app=None): self.name = 'GUITabs' self.myapp = app QtGui.QWidget.__init__(self, parent) cp.setIcons() self.setGeometry(10, 25, 400, 600) self.setWindowTitle('Calibration Manager') self.setWindowIcon(cp.icon_monitor) self.palette = QtGui.QPalette() self.resetColorIsSet = False self.setFrame() #self.butELog .setIcon(cp.icon_mail_forward) #self.butFile .setIcon(cp.icon_save) #self.butExit .setIcon(cp.icon_exit) #self.butLogger .setIcon(cp.icon_logger) #self.butFBrowser.setIcon(cp.icon_browser) #self.butSave .setIcon(cp.icon_save_cfg) #self.butStop .setIcon(cp.icon_stop) self.gui_win = None self.hboxW = QtGui.QHBoxLayout() #self) self.vboxW = QtGui.QVBoxLayout() self.vboxW.addStretch(1) self.vboxW.addLayout(self.hboxW) self.vboxW.addStretch(1) self.hboxWW = QtGui.QHBoxLayout() #self.hboxWW.addStretch(1) self.hboxWW.addLayout(self.vboxW) self.hboxWW.addStretch(1) self.makeTabBar() self.guiSelector() if self.orientation == 'H': self.box = QtGui.QVBoxLayout() else: self.box = QtGui.QHBoxLayout() self.box.addWidget(self.tab_bar) self.box.addLayout(self.hboxWW) self.box.addStretch(1) self.setLayout(self.box) self.showToolTips() self.setStyle() gu.printStyleInfo(self) cp.guitabs = self self.move(10, 25)
def __init__ (self, parent=None, app=None) : self.name = 'GUIMain' self.myapp = app QtGui.QWidget.__init__(self, parent) cp.setIcons() cp.package_versions = PackageVersions() self.main_win_width = cp.main_win_width self.main_win_height = cp.main_win_height self.main_win_pos_x = cp.main_win_pos_x self.main_win_pos_y = cp.main_win_pos_y self.setGeometry(self.main_win_pos_x .value(), \ self.main_win_pos_y .value(), \ self.main_win_width .value(), \ self.main_win_height.value()) self.setWindowTitle('Calibration Manager') self.setWindowIcon(cp.icon_monitor) self.palette = QtGui.QPalette() self.resetColorIsSet = False self.setFrame() #self.guitree = GUICalibDirTree() self.guitabs = GUITabs(self) # QtGui.QTextEdit() self.guilogger = GUILogger(show_buttons=False) self.guiinsexpdirdet = GUIInsExpDirDet(self) self.vsplit = QtGui.QSplitter(QtCore.Qt.Vertical) self.vsplit.addWidget(self.guitabs) self.vsplit.addWidget(self.guilogger) #self.vsplit.moveSplitter(0,200) self.vbox = QtGui.QVBoxLayout() #self.vbox.addWidget(self.guibuttonbar) self.vbox.addWidget(self.guiinsexpdirdet) #self.vbox.addLayout(self.hboxB) #self.vbox.addStretch(1) self.vbox.addWidget(self.vsplit) self.setLayout(self.vbox) self.showToolTips() self.setStyle() gu.create_directory(cp.dir_work.value()) #self.move(10,25) self.move(self.main_win_pos_x.value(), self.main_win_pos_y.value()) cp.guimain = self
def __init__(self, parent=None, app=None): self.name = 'GUIMain' self.myapp = app QtGui.QWidget.__init__(self, parent) cp.setIcons() cp.package_versions = PackageVersions() self.main_win_width = cp.main_win_width self.main_win_height = cp.main_win_height self.main_win_pos_x = cp.main_win_pos_x self.main_win_pos_y = cp.main_win_pos_y self.setGeometry(self.main_win_pos_x .value(), \ self.main_win_pos_y .value(), \ self.main_win_width .value(), \ self.main_win_height.value()) self.setWindowTitle('Calibration Manager') self.setWindowIcon(cp.icon_monitor) self.palette = QtGui.QPalette() self.resetColorIsSet = False self.setFrame() #self.guitree = GUICalibDirTree() self.guitabs = GUITabs(self) # QtGui.QTextEdit() self.guilogger = GUILogger(show_buttons=False) self.guiinsexpdirdet = GUIInsExpDirDet(self) self.vsplit = QtGui.QSplitter(QtCore.Qt.Vertical) self.vsplit.addWidget(self.guitabs) self.vsplit.addWidget(self.guilogger) #self.vsplit.moveSplitter(0,200) self.vbox = QtGui.QVBoxLayout() #self.vbox.addWidget(self.guibuttonbar) self.vbox.addWidget(self.guiinsexpdirdet) #self.vbox.addLayout(self.hboxB) #self.vbox.addStretch(1) self.vbox.addWidget(self.vsplit) self.setLayout(self.vbox) self.showToolTips() self.setStyle() gu.create_directory(cp.dir_work.value()) #self.move(10,25) self.move(self.main_win_pos_x.value(), self.main_win_pos_y.value()) cp.guimain = self
def __init__ (self, parent=None, app=None) : self.name = 'GUIMain' self.myapp = app QtGui.QWidget.__init__(self, parent) cp.setIcons() self.setGeometry(10, 25, 800, 700) self.setWindowTitle('Calibration Manager') self.setWindowIcon(cp.icon_monitor) self.palette = QtGui.QPalette() self.resetColorIsSet = False self.setFrame() #self.guitree = GUICalibDirTree() self.guitabs = GUITabs(self) # QtGui.QTextEdit() self.guilogger = GUILogger(show_buttons=False) self.guiinsexpdirdet = GUIInsExpDirDet(self) #self.hboxB = QtGui.QHBoxLayout() #self.hboxB.addWidget(self.guitree) #self.hboxB.addWidget(self.guitabs) #self.splitterV = QtGui.QSplitter(QtCore.Qt.Vertical) self.vsplit = QtGui.QSplitter(QtCore.Qt.Vertical) self.vsplit.addWidget(self.guitabs) self.vsplit.addWidget(self.guilogger) #self.vsplit.moveSplitter(0,200) #self.hsplit = QtGui.QSplitter(QtCore.Qt.Horizontal) #self.hsplit.addWidget(self.guitree) #self.hsplit.addWidget(self.vsplit) self.vbox = QtGui.QVBoxLayout() #self.vbox.addWidget(self.guibuttonbar) self.vbox.addWidget(self.guiinsexpdirdet) #self.vbox.addLayout(self.hboxB) #self.vbox.addStretch(1) self.vbox.addWidget(self.vsplit) self.setLayout(self.vbox) self.showToolTips() self.setStyle() self.move(10,25) cp.guimain = self
def __init__(self, parent=None, app=None): self.name = 'GUIMain' self.myapp = app QtGui.QWidget.__init__(self, parent) cp.setIcons() self.setGeometry(10, 25, 800, 700) self.setWindowTitle('Calibration Manager') self.setWindowIcon(cp.icon_monitor) self.palette = QtGui.QPalette() self.resetColorIsSet = False self.setFrame() #self.guitree = GUICalibDirTree() self.guitabs = GUITabs(self) # QtGui.QTextEdit() self.guilogger = GUILogger(show_buttons=False) self.guiinsexpdirdet = GUIInsExpDirDet(self) #self.hboxB = QtGui.QHBoxLayout() #self.hboxB.addWidget(self.guitree) #self.hboxB.addWidget(self.guitabs) #self.splitterV = QtGui.QSplitter(QtCore.Qt.Vertical) self.vsplit = QtGui.QSplitter(QtCore.Qt.Vertical) self.vsplit.addWidget(self.guitabs) self.vsplit.addWidget(self.guilogger) #self.vsplit.moveSplitter(0,200) #self.hsplit = QtGui.QSplitter(QtCore.Qt.Horizontal) #self.hsplit.addWidget(self.guitree) #self.hsplit.addWidget(self.vsplit) self.vbox = QtGui.QVBoxLayout() #self.vbox.addWidget(self.guibuttonbar) self.vbox.addWidget(self.guiinsexpdirdet) #self.vbox.addLayout(self.hboxB) #self.vbox.addStretch(1) self.vbox.addWidget(self.vsplit) self.setLayout(self.vbox) self.showToolTips() self.setStyle() self.move(10, 25) cp.guimain = self
def __init__(self, parent=None, dir_top='.'): #super(GUIQTreeView, self).__init__(parent) QtGui.QWidget.__init__(self, parent) self.dir_top = dir_top self.setGeometry(100, 100, 200, 300) self.setWindowTitle('Item selection tree') self.setFrame() cp.setIcons() #self.icon_folder_open = QtGui.QIcon("icons/folder_open.gif") #self.icon_folder_closed = QtGui.QIcon("icons/folder_closed.gif") #self.icon_table = QtGui.QIcon("icons/table.gif") #self.view = QtGui.QListView() #self.view = QtGui.QTableView() self.view = QtGui.QTreeView() self.make_model() # defines self.model self.view.setModel(self.model) #self.view.setDragDropMode(QtGui.QAbstractItemView.InternalMove) #self.view.expandAll() self.view.setAnimated(True) vbox = QtGui.QVBoxLayout() vbox.addWidget(self.view) if parent == None: self.setLayout(vbox) self.connect(self.view.selectionModel(), QtCore.SIGNAL('currentChanged(QModelIndex, QModelIndex)'), self.itemSelected) #self.view.clicked.connect(self.someMethod1) # This works #self.view.doubleClicked.connect(self.someMethod2) # This works self.model.itemChanged.connect(self.itemChanged) self.view.expanded.connect(self.itemExpanded) self.view.collapsed.connect(self.itemCollapsed) #self.view.expandToDepth(2) self.view.expandAll() self.setStyle() cp.guidirtree = self
def __init__(self, parent=None, dir_top='.') : #super(GUIQTreeView, self).__init__(parent) QtGui.QWidget.__init__(self, parent) self.dir_top = dir_top self.setGeometry(100, 100, 200, 300) self.setWindowTitle('Item selection tree') self.setFrame() cp.setIcons() #self.icon_folder_open = QtGui.QIcon("icons/folder_open.gif") #self.icon_folder_closed = QtGui.QIcon("icons/folder_closed.gif") #self.icon_table = QtGui.QIcon("icons/table.gif") #self.view = QtGui.QListView() #self.view = QtGui.QTableView() self.view = QtGui.QTreeView() self.make_model() # defines self.model self.view.setModel(self.model) #self.view.setDragDropMode(QtGui.QAbstractItemView.InternalMove) #self.view.expandAll() self.view.setAnimated(True) vbox = QtGui.QVBoxLayout() vbox.addWidget(self.view) if parent == None : self.setLayout(vbox) self.connect(self.view.selectionModel(), QtCore.SIGNAL('currentChanged(QModelIndex, QModelIndex)'), self.itemSelected) #self.view.clicked.connect(self.someMethod1) # This works #self.view.doubleClicked.connect(self.someMethod2) # This works self.model.itemChanged.connect(self.itemChanged) self.view.expanded.connect(self.itemExpanded) self.view.collapsed.connect(self.itemCollapsed) #self.view.expandToDepth(2) self.view.expandAll() self.setStyle() cp.guidirtree = self
def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent) cp.setIcons() self.instr_dir = cp.instr_dir self.instr_name = cp.instr_name self.exp_name_src = cp.exp_name_src self.calib_dir_src = cp.calib_dir_src self.but_current = None self.list_of_exp = None self.setGeometry(100, 50, 500, 30) self.setWindowTitle('Select source calibration directory') self.setFrame() self.titExp = QtGui.QLabel('Source of files:') self.butExp = QtGui.QPushButton(self.exp_name_src.value() + self.char_expand) self.butBro = QtGui.QPushButton('Browse') self.ediDir = QtGui.QLineEdit(self.calib_dir_src.value()) self.ediDir.setReadOnly(True) self.hbox = QtGui.QHBoxLayout() self.hbox.addWidget(self.titExp) self.hbox.addWidget(self.butExp) self.hbox.addWidget(self.ediDir) self.hbox.addWidget(self.butBro) self.hbox.addStretch(1) self.setLayout(self.hbox) self.connect(self.butExp, QtCore.SIGNAL('clicked()'), self.onButExp) self.connect(self.butBro, QtCore.SIGNAL('clicked()'), self.onButBro) self.showToolTips() self.setStyle() #self.setStatusMessage() #if cp.guistatus is not None : cp.guistatus.updateStatusInfo() cp.guiexpcalibdir = self
def __init__ ( self, parent=None ) : QtGui.QWidget.__init__(self, parent) cp.setIcons() self.instr_dir = cp.instr_dir self.instr_name = cp.instr_name self.exp_name_src = cp.exp_name_src self.calib_dir_src = cp.calib_dir_src self.but_current = None self.list_of_exp = None self.setGeometry(100, 50, 500, 30) self.setWindowTitle('Select source calibration directory') self.setFrame() self.titExp = QtGui.QLabel('Source of files:') self.butExp = QtGui.QPushButton( self.exp_name_src.value() + self.char_expand ) self.butBro = QtGui.QPushButton( 'Browse' ) self.ediDir = QtGui.QLineEdit( self.calib_dir_src.value() ) self.ediDir.setReadOnly(True) self.hbox = QtGui.QHBoxLayout() self.hbox.addWidget(self.titExp) self.hbox.addWidget(self.butExp) self.hbox.addWidget(self.ediDir) self.hbox.addWidget(self.butBro) self.hbox.addStretch(1) self.setLayout(self.hbox) self.connect( self.butExp, QtCore.SIGNAL('clicked()'), self.onButExp ) self.connect( self.butBro, QtCore.SIGNAL('clicked()'), self.onButBro ) self.showToolTips() self.setStyle() #self.setStatusMessage() #if cp.guistatus is not None : cp.guistatus.updateStatusInfo() cp.guiexpcalibdir = self
def __init__(self, parent=None, dir_top='.'): #super(GUIQTreeView, self).__init__(parent) QtGui.QWidget.__init__(self, parent) self.dir_top = dir_top cp.setIcons() #self.view = QtGui.QListView() #self.view = QtGui.QTableView() self.view = QtGui.QTreeView() self.make_model() # defines self.model self.view.setModel(self.model) #self.view.setDragDropMode(QtGui.QAbstractItemView.InternalMove) #self.view.expandAll() self.view.setAnimated(True) vbox = QtGui.QVBoxLayout() vbox.addWidget(self.view) if parent is None: self.setLayout(vbox) self.connect_item_selected_to(self.itemSelected) #self.view.clicked.connect(self.someMethod1) # This works #self.view.doubleClicked.connect(self.someMethod2) # This works self.connect_item_changed_to(self.itemChanged) self.view.expanded.connect(self.itemExpanded) self.view.collapsed.connect(self.itemCollapsed) #self.view.expandToDepth(2) self.view.expandAll() self.setStyle() cp.guidirtree = self
def __init__(self, parent=None, dict_of_pars={}, win_title='Load action', do_confirm=True): QtGui.QDialog.__init__(self, parent) #self.setGeometry(20, 40, 500, 200) self.setWindowTitle(win_title) self.setFrame() #self.setModal(True) self.dict_of_pars = dict_of_pars self.do_confirm = do_confirm self.vbox = QtGui.QVBoxLayout() self.make_radio_buttons() self.but_cancel = QtGui.QPushButton('&Cancel') self.but_apply = QtGui.QPushButton('&Apply') cp.setIcons() self.but_cancel.setIcon(cp.icon_button_cancel) self.but_apply.setIcon(cp.icon_button_ok) self.connect(self.but_cancel, QtCore.SIGNAL('clicked()'), self.onCancel) self.connect(self.but_apply, QtCore.SIGNAL('clicked()'), self.onApply) self.hbox = QtGui.QHBoxLayout() self.hbox.addWidget(self.but_cancel) self.hbox.addWidget(self.but_apply) self.hbox.addStretch(1) self.vbox.addLayout(self.hbox) self.setLayout(self.vbox) self.but_cancel.setFocusPolicy(QtCore.Qt.NoFocus) self.setStyle() self.showToolTips()
def __init__(self, parent=None, app=None): self.name = 'GUIMaskEditor' self.myapp = app QtGui.QWidget.__init__(self, parent) cp.setIcons() self.setGeometry(10, 25, 650, 30) self.setWindowTitle('Mask Editor Control') #self.setWindowIcon(cp.icon_monitor) self.palette = QtGui.QPalette() self.resetColorIsSet = False self.setFrame() self.butMaskEditor = QtGui.QPushButton('Open Mask Editor') self.butMaskEditor.setIcon(cp.icon_monitor) self.hboxB = QtGui.QHBoxLayout() self.hboxB.addStretch(1) self.hboxB.addWidget(self.butMaskEditor) self.hboxB.addStretch(1) self.vboxW = QtGui.QHBoxLayout() self.vboxW.addStretch(1) self.vboxW.addLayout(self.hboxB) self.vboxW.addStretch(1) self.setLayout(self.vboxW) self.connect(self.butMaskEditor, QtCore.SIGNAL('clicked()'), self.onButMaskEditor) self.showToolTips() self.setStyle() cp.guimaskeditor = self self.move(10, 25)
def __init__ (self, parent=None, app=None) : self.name = 'GUIMetrology' self.myapp = app QtGui.QWidget.__init__(self, parent) self.fname_prefix = cp.fname_prefix self.fname_metrology_xlsx = cp.fname_metrology_xlsx self.fname_metrology_text = cp.fname_metrology_text self.img_arr = None cp.setIcons() self.setGeometry(10, 25, 650, 30) self.setWindowTitle('Metrology') #self.setWindowIcon(cp.icon_monitor) self.palette = QtGui.QPalette() self.resetColorIsSet = False self.setFrame() #self.titFileXlsx = QtGui.QLabel('File xlsx:') self.ediFileXlsx = QtGui.QLineEdit ( fnm.path_metrology_xlsx() ) self.ediFileXlsx.setReadOnly(True) self.ediFileText = QtGui.QLineEdit ( fnm.path_metrology_text() ) self.ediFileText.setReadOnly(True) self.butFileXlsx = QtGui.QPushButton(' 1. Select xlsx file:') self.butConvert = QtGui.QPushButton(' 2. Convert xlsx to text file(s)') self.butFileText = QtGui.QPushButton(' 3. Select text file:') self.butEvaluate = QtGui.QPushButton(' 4. Evaluate') self.butDeploy = QtGui.QPushButton(' 5. Deploy') self.butList = QtGui.QPushButton('List') self.butRemove = QtGui.QPushButton('Remove') self.butViewOffice= QtGui.QPushButton('View xlsx') self.butViewText = QtGui.QPushButton('View text') self.butViewOffice .setIcon(cp.icon_monitor) self.butViewText .setIcon(cp.icon_monitor) #self.butConvert .setIcon(cp.icon_convert) self.grid = QtGui.QGridLayout() self.grid_row = 0 self.grid.addWidget(self.butFileXlsx, self.grid_row, 0) self.grid.addWidget(self.ediFileXlsx, self.grid_row, 1, 1, 8) self.grid.addWidget(self.butViewOffice, self.grid_row, 8) self.grid.addWidget(self.butConvert, self.grid_row+1, 0) self.grid.addWidget(self.butList, self.grid_row+1, 1, 1, 1) self.grid.addWidget(self.butRemove, self.grid_row+1, 2, 1, 1) self.grid.addWidget(self.butFileText, self.grid_row+2, 0) self.grid.addWidget(self.ediFileText, self.grid_row+2, 1, 1, 8) self.grid.addWidget(self.butViewText, self.grid_row+2, 8) self.grid.addWidget(self.butEvaluate, self.grid_row+3, 0) self.grid.addWidget(self.butDeploy, self.grid_row+4, 0) #self.setLayout(self.grid) self.vbox = QtGui.QVBoxLayout() self.vbox.addLayout(self.grid) self.vbox.addStretch(1) self.setLayout(self.vbox) self.connect( self.butFileXlsx, QtCore.SIGNAL('clicked()'), self.onButFileXlsx ) self.connect( self.butFileText, QtCore.SIGNAL('clicked()'), self.onButFileText ) self.connect( self.butViewOffice, QtCore.SIGNAL('clicked()'), self.onButViewOffice ) self.connect( self.butViewText, QtCore.SIGNAL('clicked()'), self.onButViewText ) self.connect( self.butConvert, QtCore.SIGNAL('clicked()'), self.onButConvert ) self.connect( self.butRemove, QtCore.SIGNAL('clicked()'), self.onButRemove ) self.connect( self.butList, QtCore.SIGNAL('clicked()'), self.onButList ) self.connect( self.butEvaluate, QtCore.SIGNAL('clicked()'), self.onButEvaluate ) self.connect( self.butDeploy, QtCore.SIGNAL('clicked()'), self.onButDeploy ) self.showToolTips() self.setStyle() cp.guimetrology = self
def __init__(self, parent=None, app=None): self.name = 'GUIMetrology' self.myapp = app QtGui.QWidget.__init__(self, parent) self.fname_prefix = cp.fname_prefix self.fname_metrology_xlsx = cp.fname_metrology_xlsx self.fname_metrology_text = cp.fname_metrology_text self.img_arr = None self.list_of_calib_types = ['center', 'tilt', 'geometry'] cp.setIcons() self.setGeometry(10, 25, 650, 30) self.setWindowTitle('Metrology') #self.setWindowIcon(cp.icon_monitor) self.palette = QtGui.QPalette() self.resetColorIsSet = False self.setFrame() self.setParams() #self.titFileXlsx = QtGui.QLabel('File xlsx:') self.ediFileXlsx = QtGui.QLineEdit(fnm.path_metrology_xlsx()) self.ediFileXlsx.setReadOnly(True) self.ediFileText = QtGui.QLineEdit(fnm.path_metrology_text()) self.ediFileText.setReadOnly(True) self.butFileXlsx = QtGui.QPushButton(' 1. Select xlsx file:') self.butConvert = QtGui.QPushButton(' 2. Convert xlsx to text file(s)') self.butFileText = QtGui.QPushButton(' 3. Select text file:') self.butEvaluate = QtGui.QPushButton(' 4. Evaluate') self.butDeploy = QtGui.QPushButton(' 5. Deploy') self.butList = QtGui.QPushButton('List') self.butRemove = QtGui.QPushButton('Remove') self.butViewOffice = QtGui.QPushButton('View xlsx') self.butViewText = QtGui.QPushButton('View text') self.butScript = QtGui.QPushButton(self.script + cp.char_expand) self.butSrc = QtGui.QPushButton(self.source_name + cp.char_expand) self.labSrc = QtGui.QLabel('for detector') self.labScript = QtGui.QLabel('using script') self.guirunrange = GUIRunRange() self.butViewOffice.setIcon(cp.icon_monitor) self.butViewText.setIcon(cp.icon_monitor) #self.butConvert .setIcon(cp.icon_convert) self.grid = QtGui.QGridLayout() self.grid_row = 0 self.grid.addWidget(self.butFileXlsx, self.grid_row, 0) self.grid.addWidget(self.ediFileXlsx, self.grid_row, 1, 1, 8) self.grid.addWidget(self.butViewOffice, self.grid_row, 8) self.grid.addWidget(self.butConvert, self.grid_row + 1, 0) self.grid.addWidget(self.butList, self.grid_row + 1, 1, 1, 1) self.grid.addWidget(self.butRemove, self.grid_row + 1, 2, 1, 1) self.grid.addWidget(self.butFileText, self.grid_row + 2, 0) self.grid.addWidget(self.ediFileText, self.grid_row + 2, 1, 1, 8) self.grid.addWidget(self.butViewText, self.grid_row + 2, 8) self.grid.addWidget(self.butEvaluate, self.grid_row + 3, 0) self.grid.addWidget(self.labScript, self.grid_row + 3, 1) self.grid.addWidget(self.butScript, self.grid_row + 3, 2) self.grid.addWidget(self.butDeploy, self.grid_row + 4, 0) self.grid.addWidget(self.labSrc, self.grid_row + 4, 1) self.grid.addWidget(self.butSrc, self.grid_row + 4, 2) self.grid.addWidget(self.guirunrange, self.grid_row + 4, 3, 1, 5) #self.setLayout(self.grid) self.vbox = QtGui.QVBoxLayout() self.vbox.addLayout(self.grid) self.vbox.addStretch(1) self.setLayout(self.vbox) self.connect(self.butFileXlsx, QtCore.SIGNAL('clicked()'), self.onButFileXlsx) self.connect(self.butFileText, QtCore.SIGNAL('clicked()'), self.onButFileText) self.connect(self.butViewOffice, QtCore.SIGNAL('clicked()'), self.onButViewOffice) self.connect(self.butViewText, QtCore.SIGNAL('clicked()'), self.onButViewText) self.connect(self.butConvert, QtCore.SIGNAL('clicked()'), self.onButConvert) self.connect(self.butRemove, QtCore.SIGNAL('clicked()'), self.onButRemove) self.connect(self.butList, QtCore.SIGNAL('clicked()'), self.onButList) self.connect(self.butEvaluate, QtCore.SIGNAL('clicked()'), self.onButEvaluate) self.connect(self.butDeploy, QtCore.SIGNAL('clicked()'), self.onButDeploy) self.connect(self.butScript, QtCore.SIGNAL('clicked()'), self.onButScript) self.connect(self.butSrc, QtCore.SIGNAL('clicked()'), self.onButSrc) self.showToolTips() self.setStyle() cp.guimetrology = self
def __init__ (self, parent=None, app=None) : self.name = 'GUIMetrology' self.myapp = app QtGui.QWidget.__init__(self, parent) self.fname_prefix = cp.fname_prefix self.fname_metrology_xlsx = cp.fname_metrology_xlsx self.fname_metrology_text = cp.fname_metrology_text self.img_arr = None self.list_of_calib_types = ['center', 'tilt', 'geometry'] cp.setIcons() self.setGeometry(10, 25, 725, 200) self.setWindowTitle('Metrology') #self.setWindowIcon(cp.icon_monitor) self.palette = QtGui.QPalette() self.resetColorIsSet = False self.setFrame() self.setParams() #self.titFileXlsx = QtGui.QLabel('File xlsx:') self.ediFileXlsx = QtGui.QLineEdit ( fnm.path_metrology_xlsx() ) self.ediFileXlsx.setReadOnly(True) self.ediFileText = QtGui.QLineEdit ( fnm.path_metrology_text() ) self.ediFileText.setReadOnly(True) self.butFileXlsx = QtGui.QPushButton(' 1. Select xlsx file:') self.butConvert = QtGui.QPushButton(' 2. Convert xlsx to text file(s)') self.butFileText = QtGui.QPushButton(' 3. Select text file:') self.butEvaluate = QtGui.QPushButton(' 4. Evaluate') self.butDeploy = QtGui.QPushButton(' 5. Deploy') self.butList = QtGui.QPushButton('List') self.butRemove = QtGui.QPushButton('Remove') self.butViewOffice= QtGui.QPushButton('View xlsx') self.butViewText = QtGui.QPushButton('View text') self.butScript = QtGui.QPushButton(self.script + cp.char_expand ) self.butSrc = QtGui.QPushButton(self.source_name + cp.char_expand ) self.labSrc = QtGui.QLabel('for detector') self.labScript = QtGui.QLabel('using script') self.guirange = GUIRange() self.butViewOffice .setIcon(cp.icon_monitor) self.butViewText .setIcon(cp.icon_monitor) #self.butConvert .setIcon(cp.icon_convert) self.grid = QtGui.QGridLayout() self.grid_row = 0 self.grid.addWidget(self.butFileXlsx, self.grid_row, 0) self.grid.addWidget(self.ediFileXlsx, self.grid_row, 1, 1, 8) self.grid.addWidget(self.butViewOffice, self.grid_row, 8) self.grid.addWidget(self.butConvert, self.grid_row+1, 0) self.grid.addWidget(self.butList, self.grid_row+1, 1, 1, 1) self.grid.addWidget(self.butRemove, self.grid_row+1, 2, 1, 1) self.grid.addWidget(self.butFileText, self.grid_row+2, 0) self.grid.addWidget(self.ediFileText, self.grid_row+2, 1, 1, 8) self.grid.addWidget(self.butViewText, self.grid_row+2, 8) self.grid.addWidget(self.butEvaluate, self.grid_row+3, 0) self.grid.addWidget(self.labScript, self.grid_row+3, 1) self.grid.addWidget(self.butScript, self.grid_row+3, 2) self.grid.addWidget(self.butDeploy, self.grid_row+4, 0) self.grid.addWidget(self.labSrc, self.grid_row+4, 1) self.grid.addWidget(self.butSrc, self.grid_row+4, 2) self.grid.addWidget(self.guirange, self.grid_row+4, 3, 1, 5) #self.setLayout(self.grid) self.vbox = QtGui.QVBoxLayout() self.vbox.addLayout(self.grid) self.vbox.addStretch(1) self.setLayout(self.vbox) self.connect( self.butFileXlsx, QtCore.SIGNAL('clicked()'), self.onButFileXlsx ) self.connect( self.butFileText, QtCore.SIGNAL('clicked()'), self.onButFileText ) self.connect( self.butViewOffice, QtCore.SIGNAL('clicked()'), self.onButViewOffice ) self.connect( self.butViewText, QtCore.SIGNAL('clicked()'), self.onButViewText ) self.connect( self.butConvert, QtCore.SIGNAL('clicked()'), self.onButConvert ) self.connect( self.butRemove, QtCore.SIGNAL('clicked()'), self.onButRemove ) self.connect( self.butList, QtCore.SIGNAL('clicked()'), self.onButList ) self.connect( self.butEvaluate, QtCore.SIGNAL('clicked()'), self.onButEvaluate ) self.connect( self.butDeploy, QtCore.SIGNAL('clicked()'), self.onButDeploy ) self.connect( self.butScript, QtCore.SIGNAL('clicked()'), self.onButScript ) self.connect( self.butSrc, QtCore.SIGNAL('clicked()'), self.onButSrc ) self.showToolTips() self.setStyle() cp.guimetrology = self