def quickMenuAction(self, objName, title, tip, icon, menuObj):
self.uiList[objName] = QtWidgets.QAction(QtGui.QIcon(icon), title, self)
self.uiList[objName].setStatusTip(tip)
menuObj.addAction(self.uiList[objName])
python类QIcon()的实例源码
universal_tool_template_v7.3.py 文件源码
项目:universal_tool_template.py
作者: shiningdesign
项目源码
文件源码
阅读 23
收藏 0
点赞 0
评论 0
def quickMenuAction(self, objName, title, tip, icon, menuObj):
self.uiList[objName] = QtGui.QAction(QtGui.QIcon(icon), title, self)
self.uiList[objName].setStatusTip(tip)
menuObj.addAction(self.uiList[objName])
UITranslator_v1.0.py 文件源码
项目:universal_tool_template.py
作者: shiningdesign
项目源码
文件源码
阅读 28
收藏 0
点赞 0
评论 0
def quickMenuAction(self, objName, title, tip, icon, menuObj):
self.uiList[objName] = QtGui.QAction(QtGui.QIcon(icon), title, self)
self.uiList[objName].setStatusTip(tip)
menuObj.addAction(self.uiList[objName])
universal_tool_template_1000.py 文件源码
项目:universal_tool_template.py
作者: shiningdesign
项目源码
文件源码
阅读 17
收藏 0
点赞 0
评论 0
def quickMenuAction(self, objName, title, tip, icon, menuObj):
self.uiList[objName] = QtWidgets.QAction(QtGui.QIcon(icon), title, self)
self.uiList[objName].setStatusTip(tip)
menuObj.addAction(self.uiList[objName])
universal_tool_template_0803.py 文件源码
项目:universal_tool_template.py
作者: shiningdesign
项目源码
文件源码
阅读 23
收藏 0
点赞 0
评论 0
def __init__(self, parent=None, mode=0):
super_class.__init__(self, parent)
#------------------------------
# class variables
#------------------------------
self.version="0.1"
self.help = "How to Use:\n1. Put source info in\n2. Click Process button\n3. Check result output\n4. Save memory info into a file."
self.uiList={} # for ui obj storage
self.memoData = {} # key based variable data storage
self.location = ""
if getattr(sys, 'frozen', False):
# frozen - cx_freeze
self.location = sys.executable
else:
# unfrozen
self.location = os.path.realpath(__file__) # location: ref: sys.modules[__name__].__file__
self.name = self.__class__.__name__
self.iconPath = os.path.join(os.path.dirname(self.location),'icons',self.name+'.png')
self.iconPix = QtGui.QPixmap(self.iconPath)
self.icon = QtGui.QIcon(self.iconPath)
self.fileType='.{0}_EXT'.format(self.name)
# Custom user variable
#------------------------------
# initial data
#------------------------------
self.memoData['data']=[]
self.setupStyle()
if isinstance(self, QtWidgets.QMainWindow):
self.setupMenu()
self.setupWin()
self.setupUI()
self.Establish_Connections()
self.loadData()
self.loadLang()
universal_tool_template_0803.py 文件源码
项目:universal_tool_template.py
作者: shiningdesign
项目源码
文件源码
阅读 25
收藏 0
点赞 0
评论 0
def quickMenuAction(self, objName, title, tip, icon, menuObj):
self.uiList[objName] = QtWidgets.QAction(QtGui.QIcon(icon), title, self)
self.uiList[objName].setStatusTip(tip)
menuObj.addAction(self.uiList[objName])
universal_tool_template_v8.1.py 文件源码
项目:universal_tool_template.py
作者: shiningdesign
项目源码
文件源码
阅读 24
收藏 0
点赞 0
评论 0
def quickMenuAction(self, objName, title, tip, icon, menuObj):
self.uiList[objName] = QtWidgets.QAction(QtGui.QIcon(icon), title, self)
self.uiList[objName].setStatusTip(tip)
menuObj.addAction(self.uiList[objName])
universal_tool_template_1010.py 文件源码
项目:universal_tool_template.py
作者: shiningdesign
项目源码
文件源码
阅读 23
收藏 0
点赞 0
评论 0
def quickMenuAction(self, objName, title, tip, icon, menuObj):
self.uiList[objName] = QtWidgets.QAction(QtGui.QIcon(icon), title, self)
self.uiList[objName].setStatusTip(tip)
menuObj.addAction(self.uiList[objName])
def __init__(self, parent=None):
super(InstructionDialog, self).__init__(parent)
self.setupUi(self)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":img/icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.setWindowIcon(icon)
self.setWindowFlags(QtCore.Qt.WindowSystemMenuHint | QtCore.Qt.WindowTitleHint)
self.pushButton_OK.clicked.connect(self.close)
def main():
app = QtGui.QApplication(sys.argv)
w = QtGui.QWidget()
trayIcon = SystemTrayIcon(QtGui.QIcon("C:\Python34\C.png"), w)
trayIcon.show()
sys.exit(app.exec_())
def __init__(self, mssg=''):
super(Notification, self).__init__()
MSSG = mssg
self.desktop = QtGui.QDesktopWidget()
self.setWindowFlags(QtCore.Qt.FramelessWindowHint | QtCore.Qt.WindowStaysOnTopHint | QtCore.Qt.SubWindow)
self.setupUi(self)
self.app_dir = os.path.dirname(__file__)
self.f = 1.0
self.x = self.desktop.availableGeometry().width()
self.workThread = WorkThread()
self.set_transparency(True)
self.label_icon.setIcon(QtGui.QIcon(self.add_icon('push-notification.png')))
self.createNotification(MSSG)
def __init__(self,winTitle='Title',btn1Text='Button1',btn2Text='Button2',initVal='someVal',units='someUnit', icon='flamingo.svg'):
super(prototypeForm,self).__init__()
self.setWindowFlags(Qt.WindowStaysOnTopHint)
self.setWindowTitle(winTitle)
iconPath=join(dirname(abspath(__file__)),"icons",icon)
from PySide.QtGui import QIcon
Icon=QIcon()
Icon.addFile(iconPath)
self.setWindowIcon(Icon)
self.move(QPoint(100,250))
self.mainVL=QVBoxLayout()
self.setLayout(self.mainVL)
self.inputs=QWidget()
self.inputs.setLayout(QFormLayout())
self.edit1=QLineEdit(initVal)
self.edit1.setMinimumWidth(40)
self.edit1.setAlignment(Qt.AlignHCenter)
self.edit1.setMaximumWidth(60)
self.inputs.layout().addRow(units,self.edit1)
self.mainVL.addWidget(self.inputs)
self.radio1=QRadioButton()
self.radio1.setChecked(True)
self.radio2=QRadioButton()
self.radios=QWidget()
self.radios.setLayout(QFormLayout())
self.radios.layout().setAlignment(Qt.AlignHCenter)
self.radios.layout().addRow('move',self.radio1)
self.radios.layout().addRow('copy',self.radio2)
self.mainVL.addWidget(self.radios)
self.btn1=QPushButton(btn1Text)
self.btn1.setDefault(True)
self.btn1.setFocus()
self.btn2=QPushButton(btn2Text)
self.buttons=QWidget()
self.buttons.setLayout(QHBoxLayout())
self.buttons.layout().addWidget(self.btn1)
self.buttons.layout().addWidget(self.btn2)
self.mainVL.addWidget(self.buttons)
def __init__(self,winTitle='Rotate WP', icon='rotWP.svg'):
super(rotWPForm,self).__init__()
self.move(QPoint(100,250))
self.setWindowFlags(Qt.WindowStaysOnTopHint)
self.setWindowTitle(winTitle)
iconPath=join(dirname(abspath(__file__)),"icons",icon)
from PySide.QtGui import QIcon
Icon=QIcon()
Icon.addFile(iconPath)
self.setWindowIcon(Icon)
self.grid=QGridLayout()
self.setLayout(self.grid)
self.radioX=QRadioButton('X')
self.radioX.setChecked(True)
self.radioY=QRadioButton('Y')
self.radioZ=QRadioButton('Z')
self.lab1=QLabel('Angle:')
self.edit1=QLineEdit('45')
self.edit1.setAlignment(Qt.AlignCenter)
self.edit1.setValidator(QDoubleValidator())
self.btn1=QPushButton('Rotate working plane')
self.btn1.clicked.connect(self.rotate)
self.grid.addWidget(self.radioX,0,0,1,1,Qt.AlignCenter)
self.grid.addWidget(self.radioY,0,1,1,1,Qt.AlignCenter)
self.grid.addWidget(self.radioZ,0,2,1,1,Qt.AlignCenter)
self.grid.addWidget(self.lab1,1,0,1,1)
self.grid.addWidget(self.edit1,1,1,1,2)
self.grid.addWidget(self.btn1,2,0,1,3,Qt.AlignCenter)
self.show()
self.sg=FreeCADGui.ActiveDocument.ActiveView.getSceneGraph()
s=FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft").GetInt("gridSize")
sc=[float(x*s) for x in [1,1,.2]]
from polarUtilsCmd import arrow
self.arrow =arrow(FreeCAD.DraftWorkingPlane.getPlacement(),scale=sc,offset=s)
def setupUi(self):
"""Bruh"""
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
self.setGeometry(50, 50, 850, 425)
self.setWindowTitle("ZeZe's TWTools - Coord Extractor")
self.setWindowIcon(QtGui.QIcon(resource_path("images/icon.png")))
"""Background color"""
self.backgroundPalette = QtGui.QPalette()
self.backgroundColor = QtGui.QColor(217, 204, 170)
self.backgroundPalette.setColor(QtGui.QPalette.Background, self.backgroundColor)
self.setPalette(self.backgroundPalette)
"""Main layout & return to main menu button"""
self.verticalLayout = QtGui.QVBoxLayout(self)
self.buttonLayout = QtGui.QHBoxLayout(self)
self.verticalLayout.addLayout(self.buttonLayout)
self.returnButton = QtGui.QPushButton(" Return to the Main Menu ", self)
self.returnButton.clicked.connect(self.return_function)
self.buttonLayout.addWidget(self.returnButton)
self.buttonSpacer = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.buttonLayout.addItem(self.buttonSpacer)
"""Line Spacer and line"""
self.lineSpacer = QtGui.QSpacerItem(40, 5, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.verticalLayout.addItem(self.lineSpacer)
self.line = QtGui.QFrame(self)
self.line.setFrameShape(QtGui.QFrame.HLine)
self.line.setFrameShadow(QtGui.QFrame.Sunken)
self.verticalLayout.addWidget(self.line)
"""Text input label and edit"""
self.Spacer = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.verticalLayout.addItem(self.Spacer)
self.inputLabel = QtGui.QLabel("Input text with coordinates here:")
self.verticalLayout.addWidget(self.inputLabel)
self.plainTextEdit = QtGui.QPlainTextEdit(self)
self.verticalLayout.addWidget(self.plainTextEdit)
"""Coordinates output label and edit"""
self.Spacer1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.verticalLayout.addItem(self.Spacer1)
self.outputLabel = QtGui.QLabel("Output coordinates magically appear here:")
self.verticalLayout.addWidget(self.outputLabel)
self.plainTextEdit_2 = QtGui.QPlainTextEdit(self)
self.verticalLayout.addWidget(self.plainTextEdit_2)
"""Extract coordinates button"""
self.horizontalLayout = QtGui.QHBoxLayout()
self.verticalLayout.addLayout(self.horizontalLayout)
self.Spacer2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout.addItem(self.Spacer2)
self.extractButton = QtGui.QPushButton(" Extract Coordinates ", self)
self.extractButton.clicked.connect(self.extract_function)
self.horizontalLayout.addWidget(self.extractButton)
def setupUi(self):
"""Bruh"""
self.setGeometry(50, 50, 300, 150)
self.setWindowTitle("ZeZe's TWTools - Input Speeds")
self.setWindowIcon(QtGui.QIcon(resource_path("images/icon.png")))
"""Background color"""
self.backgroundPalette = QtGui.QPalette()
self.backgroundColor = QtGui.QColor(217, 204, 170)
self.backgroundPalette.setColor(QtGui.QPalette.Background, self.backgroundColor)
self.setPalette(self.backgroundPalette)
"""Form layout"""
self.formLayout = QtGui.QFormLayout(self)
self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
"""World speed label & input box"""
self.world_speedLabel = QtGui.QLabel("World Speed:", self)
self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.world_speedLabel)
self.world_speedBox = QtGui.QDoubleSpinBox(self)
self.world_speedBox.setDecimals(1)
self.world_speedBox.setMaximum(1000.0)
self.world_speedBox.setSingleStep(0.5)
self.world_speedBox.setProperty("value", 1.0)
self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.world_speedBox)
"""Unit speed label & input box"""
self.unit_speedLabel = QtGui.QLabel("Unit Speed:", self)
self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.unit_speedLabel)
self.unit_speedBox = QtGui.QDoubleSpinBox(self)
self.unit_speedBox.setDecimals(1)
self.unit_speedBox.setMaximum(1000.0)
self.unit_speedBox.setSingleStep(0.5)
self.unit_speedBox.setProperty("value", 1.0)
self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.unit_speedBox)
"""Spacer"""
self.Spacer = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.formLayout.setItem(2, QtGui.QFormLayout.FieldRole, self.Spacer)
"""Ok button"""
self.okButton = QtGui.QPushButton("Ok", self)
self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.okButton)
self.okButton.clicked.connect(self.get_data)
def tabCategories(self):
tab = QtGui.QWidget()
# buttons
selectAll = QtGui.QPushButton()
selectAll.setFlat(True)
selectAll.setToolTip('Select all')
selectAll.setIcon(QtGui.QIcon(":/data/img/checkbox_checked_16x16.png"))
selectAll.setStyleSheet('''border:1px solid rgb(237, 237, 237);''')
self.connect(selectAll, QtCore.SIGNAL("clicked()"), self.selectAllCategories)
unselectAll = QtGui.QPushButton()
unselectAll.setFlat(True)
unselectAll.setToolTip('Deselect all')
unselectAll.setIcon(QtGui.QIcon(":/data/img/checkbox_unchecked_16x16.PNG"))
unselectAll.setStyleSheet('''border:1px solid rgb(237, 237, 237);''')
self.connect(unselectAll, QtCore.SIGNAL("clicked()"), self.unselectAllCategories)
# table
self.categoriesTable = QtGui.QTableWidget()
self.categoriesTable.setStyleSheet('''border:0px solid red;''')
self.categoriesTable.setColumnCount(5)
self.categoriesTable.setGridStyle(QtCore.Qt.DashDotLine)
self.categoriesTable.setHorizontalHeaderLabels([' Active ', 'ID', 'Name', 'Description', 'Action'])
self.categoriesTable.verticalHeader().hide()
self.categoriesTable.horizontalHeader().setResizeMode(0, QtGui.QHeaderView.ResizeToContents)
self.categoriesTable.horizontalHeader().setStretchLastSection(True)
self.categoriesTable.hideColumn(1)
# main lay
layTableButtons = QtGui.QHBoxLayout()
layTableButtons.addWidget(selectAll)
layTableButtons.addWidget(unselectAll)
layTableButtons.addStretch(10)
lay = QtGui.QGridLayout(tab)
lay.addLayout(layTableButtons, 0, 0, 1, 1)
lay.addWidget(self.categoriesTable, 1, 0, 1, 1)
lay.setRowStretch(1, 10)
lay.setColumnStretch(0, 10)
lay.setContentsMargins(5, 5, 5, 5)
return tab
def tabModels(self):
tab = QtGui.QWidget()
# table
self.modelsTable = QtGui.QTreeWidget()
#self.modelsTable.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
self.modelsTable.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
self.modelsTable.setHeaderLabels([u'Name', u'Description', u'Paths', u'Softwares'])
self.modelsTable.setStyleSheet('''
QTreeWidget {border:0px solid #FFF;}
''')
self.connect(self.modelsTable, QtCore.SIGNAL("itemPressed (QTreeWidgetItem*,int)"), self.showInfoF)
# buttons
selectAll = QtGui.QPushButton()
selectAll.setFlat(True)
selectAll.setToolTip('Select all')
selectAll.setIcon(QtGui.QIcon(":/data/img/checkbox_checked_16x16.png"))
selectAll.setStyleSheet('''border:1px solid rgb(237, 237, 237);''')
self.connect(selectAll, QtCore.SIGNAL("clicked()"), self.selectAllModels)
unselectAll = QtGui.QPushButton()
unselectAll.setFlat(True)
unselectAll.setToolTip('Deselect all')
unselectAll.setIcon(QtGui.QIcon(":/data/img/checkbox_unchecked_16x16.PNG"))
unselectAll.setStyleSheet('''border:1px solid rgb(237, 237, 237);''')
self.connect(unselectAll, QtCore.SIGNAL("clicked()"), self.unselectAllModels)
collapseAll = QtGui.QPushButton()
collapseAll.setFlat(True)
collapseAll.setToolTip('Collapse all')
collapseAll.setIcon(QtGui.QIcon(":/data/img/collapse.png"))
collapseAll.setStyleSheet('''border:1px solid rgb(237, 237, 237);''')
self.connect(collapseAll, QtCore.SIGNAL("clicked()"), self.modelsTable.collapseAll)
expandAll = QtGui.QPushButton()
expandAll.setFlat(True)
expandAll.setToolTip('Expand all')
expandAll.setIcon(QtGui.QIcon(":/data/img/expand.png"))
expandAll.setStyleSheet('''border:1px solid rgb(237, 237, 237);''')
self.connect(expandAll, QtCore.SIGNAL("clicked()"), self.modelsTable.expandAll)
# info
self.showInfo = QtGui.QLabel('')
self.showInfo.setStyleSheet('border:1px solid rgb(237, 237, 237); padding:5px 2px;')
# main lay
layTableButtons = QtGui.QHBoxLayout()
layTableButtons.addWidget(selectAll)
layTableButtons.addWidget(unselectAll)
layTableButtons.addWidget(collapseAll)
layTableButtons.addWidget(expandAll)
layTableButtons.addStretch(10)
lay = QtGui.QGridLayout(tab)
lay.addLayout(layTableButtons, 0, 0, 1, 1)
lay.addWidget(self.modelsTable, 1, 0, 1, 1)
lay.addWidget(self.showInfo, 2, 0, 1, 1)
lay.setRowStretch(1, 10)
lay.setColumnStretch(0, 10)
lay.setContentsMargins(5, 5, 5, 5)
return tab
def __init__(self, parent=None):
reload(PCBconf)
QtGui.QWidget.__init__(self, parent)
freecadSettings = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/PCB")
self.form = self
self.form.setWindowTitle(u"Create PCB")
self.form.setWindowIcon(QtGui.QIcon(":/data/img/board.png"))
#
self.gruboscPlytki = QtGui.QDoubleSpinBox(self)
self.gruboscPlytki.setSingleStep(0.1)
self.gruboscPlytki.setValue(freecadSettings.GetFloat("boardThickness", 1.5))
self.gruboscPlytki.setSuffix(u" mm")
#
self.pcbBorder = QtGui.QLineEdit('')
self.pcbBorder.setReadOnly(True)
pickPcbBorder = pickSketch(self.pcbBorder)
#
self.pcbHoles = QtGui.QLineEdit('')
self.pcbHoles.setReadOnly(True)
pickPcbHoles = pickSketch(self.pcbHoles)
#
self.pcbColor = kolorWarstwy()
self.pcbColor.setColor(self.pcbColor.PcbColorToRGB(PCBconf.PCB_COLOR))
self.pcbColor.setToolTip(u"Click to change color")
#
lay = QtGui.QGridLayout()
lay.addWidget(QtGui.QLabel(u'Border:'), 0, 0, 1, 1)
lay.addWidget(self.pcbBorder, 0, 1, 1, 1)
lay.addWidget(pickPcbBorder, 0, 2, 1, 1)
lay.addWidget(QtGui.QLabel(u'Holes:'), 1, 0, 1, 1)
lay.addWidget(self.pcbHoles, 1, 1, 1, 1)
lay.addWidget(pickPcbHoles, 1, 2, 1, 1)
lay.addWidget(QtGui.QLabel(u'Thickness:'), 2, 0, 1, 1)
lay.addWidget(self.gruboscPlytki, 2, 1, 1, 2)
lay.addWidget(QtGui.QLabel(u'Color:'), 3, 0, 1, 1)
lay.addWidget(self.pcbColor, 3, 1, 1, 2)
#
self.setLayout(lay)
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
freecadSettings = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/PCB")
#
self.listaBibliotek = QtGui.QComboBox()
libraryFrame = QtGui.QGroupBox(u'Library:')
libraryFrameLay = QtGui.QHBoxLayout(libraryFrame)
libraryFrameLay.addWidget(self.listaBibliotek)
#
self.listaElementow = updateObjectTable()
przSelectAllT = QtGui.QPushButton('')
przSelectAllT.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
przSelectAllT.setFlat(True)
przSelectAllT.setIcon(QtGui.QIcon(":/data/img/checkbox_checked_16x16.png"))
przSelectAllT.setToolTip('Select all')
self.connect(przSelectAllT, QtCore.SIGNAL('pressed ()'), self.selectAllObj)
przSelectAllTF = QtGui.QPushButton('')
przSelectAllTF.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
przSelectAllTF.setFlat(True)
przSelectAllTF.setIcon(QtGui.QIcon(":/data/img/checkbox_unchecked_16x16.PNG"))
przSelectAllTF.setToolTip('Deselect all')
self.connect(przSelectAllTF, QtCore.SIGNAL('pressed ()'), self.unselectAllObj)
self.adjustParts = QtGui.QCheckBox(u'Adjust part name/value')
self.adjustParts.setChecked(freecadSettings.GetBool("adjustNameValue", False))
self.groupParts = QtGui.QCheckBox(u'Group parts')
self.groupParts.setChecked(freecadSettings.GetBool("groupParts", False))
self.plytkaPCB_elementyKolory = QtGui.QCheckBox(u"Colorize elements")
self.plytkaPCB_elementyKolory.setChecked(freecadSettings.GetBool("partsColorize", True))
packagesFrame = QtGui.QGroupBox(u'Packages:')
packagesFrameLay = QtGui.QGridLayout(packagesFrame)
packagesFrameLay.addWidget(przSelectAllT, 0, 0, 1, 1)
packagesFrameLay.addWidget(przSelectAllTF, 1, 0, 1, 1)
packagesFrameLay.addWidget(self.listaElementow, 0, 1, 3, 1)
#
lay = QtGui.QVBoxLayout()
lay.addWidget(libraryFrame)
lay.addWidget(packagesFrame)
lay.addWidget(self.adjustParts)
lay.addWidget(self.groupParts)
lay.addWidget(self.plytkaPCB_elementyKolory)
lay.setStretch(1, 10)
self.setLayout(lay)
#
self.readLibs()
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.form = self
self.form.setWindowTitle(u"Layers settings")
self.form.setWindowIcon(QtGui.QIcon(":/data/img/layers.png"))
#
nr = 0
lay = QtGui.QGridLayout()
PCBlayers["Parts"] = [2, [0, 0, 0], None, 'PCBpart', "Parts"]
PCBlayers["Parts Name"] = [2, [0, 0, 0], None, ['PCBannotation', 'anno_name'], "Parts Name"]
PCBlayers["Parts Value"] = [2, [0, 0, 0], None, ['PCBannotation', 'anno_value'], "Parts Value"]
#
for i, j in PCBconstraintAreas.items():
PCBlayers[j[0]] = [2, [0, 0, 0], None, j[1], j[4]]
for i, j in OrderedDict(sorted(PCBlayers.items(), key=lambda t: t[0])).items():
infoPrz = przycisk()
infoPrz.setToolTip(u"Info")
infoPrz.setIcon(QtGui.QIcon(":/data/img/info_16x16.png"))
par = partial(self.showInfo, j[4])
self.connect(infoPrz, QtCore.SIGNAL("clicked ()"), par)
showAll = przycisk()
showAll.setToolTip(u"Show All")
showAll.setIcon(QtGui.QIcon(":/data/img/show.png"))
par = partial(self.showAll, j[3])
self.connect(showAll, QtCore.SIGNAL("clicked ()"), par)
hideAll = przycisk()
hideAll.setToolTip(u"Hide All")
hideAll.setIcon(QtGui.QIcon(":/data/img/hide.png"))
par = partial(self.hideAll, j[3])
self.connect(hideAll, QtCore.SIGNAL("clicked ()"), par)
#
lay.addWidget(QtGui.QLabel(i), nr, 0, 1, 1)
lay.addWidget(showAll, nr, 1, 1, 1)
lay.addWidget(hideAll, nr, 2, 1, 1)
lay.addWidget(infoPrz, nr, 3, 1, 1)
#
nr += 1
#
lay.setColumnStretch(0, 10)
self.setLayout(lay)