Python PySide.QtGui.QGridLayout() Examples
The following are 30
code examples of PySide.QtGui.QGridLayout().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
PySide.QtGui
, or try the search function
.
Example #1
Source File: universal_tool_template_1100.py From universal_tool_template.py with MIT License | 7 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #2
Source File: universal_tool_template_1000.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #3
Source File: xrefwindow.py From TimeMachine with GNU Lesser General Public License v3.0 | 6 votes |
def __init__(self, parent=None, win=None, xrefs_list=None, method=""): super(XrefDialog, self).__init__(parent) if not isinstance(xrefs_list, list) or len(xrefs_list) == 0: androconf.warning("Bad XrefDialog creation") return if not method: title = "Xrefs to %s" % path.split("/")[-1] else: title = "Xrefs to %s -> %s" % (path.split("/")[-1], method) self.setWindowTitle(title) layout = QtGui.QGridLayout() xrefwin = XrefListView(self, win=win, xrefs=xrefs_list) layout.addWidget(xrefwin, 0, 0) self.setLayout(layout)
Example #4
Source File: a2p_importpart.py From A2plus with GNU Lesser General Public License v2.1 | 6 votes |
def initUI(self): self.resize(400,100) self.setWindowTitle('select a shape to be imported') self.mainLayout = QtGui.QGridLayout() # a VBoxLayout for the whole form self.shapeCombo = QtGui.QComboBox(self) l = sorted(self.labelList) self.shapeCombo.addItems(l) self.buttons = QtGui.QDialogButtonBox(self) self.buttons.setOrientation(QtCore.Qt.Horizontal) self.buttons.addButton("Cancel", QtGui.QDialogButtonBox.RejectRole) self.buttons.addButton("Choose", QtGui.QDialogButtonBox.AcceptRole) self.connect(self.buttons, QtCore.SIGNAL("accepted()"), self, QtCore.SLOT("accept()")) self.connect(self.buttons, QtCore.SIGNAL("rejected()"), self, QtCore.SLOT("reject()")) self.mainLayout.addWidget(self.shapeCombo,0,0,1,1) self.mainLayout.addWidget(self.buttons,1,0,1,1) self.setLayout(self.mainLayout)
Example #5
Source File: animplacement.py From Animation with GNU General Public License v2.0 | 6 votes |
def __init__(self, obj,*args): QtGui.QWidget.__init__(self, *args) obj.widget=self self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) self.vollabel = QtGui.QLabel(obj.Object.Label) self.pushButton02 = QtGui.QPushButton() self.pushButton02.setText("close") self.pushButton02.clicked.connect(self.hide) dial = QDial() dial.setNotchesVisible(True) self.dial=dial dial.setMaximum(100) dial.valueChanged.connect(obj.dreher); layout = QHBoxLayout() layout = QtGui.QGridLayout() layout.addWidget(self.vollabel, 0, 0) layout.addWidget(self.pushButton02, 15, 0,1,4) layout.addWidget(dial,3,0) self.setLayout(layout) self.setWindowTitle(obj.Object.target.Label)
Example #6
Source File: ScatterPlotSpeedTestTemplate_pyside.py From qgisSpaceSyntaxToolkit with GNU General Public License v3.0 | 6 votes |
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(400, 300) self.gridLayout = QtGui.QGridLayout(Form) self.gridLayout.setObjectName("gridLayout") self.sizeSpin = QtGui.QSpinBox(Form) self.sizeSpin.setProperty("value", 10) self.sizeSpin.setObjectName("sizeSpin") self.gridLayout.addWidget(self.sizeSpin, 1, 1, 1, 1) self.pixelModeCheck = QtGui.QCheckBox(Form) self.pixelModeCheck.setObjectName("pixelModeCheck") self.gridLayout.addWidget(self.pixelModeCheck, 1, 3, 1, 1) self.label = QtGui.QLabel(Form) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 1, 0, 1, 1) self.plot = PlotWidget(Form) self.plot.setObjectName("plot") self.gridLayout.addWidget(self.plot, 0, 0, 1, 4) self.randCheck = QtGui.QCheckBox(Form) self.randCheck.setObjectName("randCheck") self.gridLayout.addWidget(self.randCheck, 1, 2, 1, 1) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
Example #7
Source File: xrefwindow.py From AndroBugs_Framework with GNU General Public License v3.0 | 6 votes |
def __init__(self, parent=None, win=None, xrefs_list=None, method=""): super(XrefDialog, self).__init__(parent) if not isinstance(xrefs_list, list) or len(xrefs_list) == 0: androconf.warning("Bad XrefDialog creation") return if not method: title = "Xrefs to %s" % path.split("/")[-1] else: title = "Xrefs to %s -> %s" % (path.split("/")[-1], method) self.setWindowTitle(title) layout = QtGui.QGridLayout() xrefwin = XrefListView(self, win=win, xrefs=xrefs_list) layout.addWidget(xrefwin, 0, 0) self.setLayout(layout)
Example #8
Source File: ScatterPlotSpeedTestTemplate_pyside.py From tf-pose with Apache License 2.0 | 6 votes |
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(400, 300) self.gridLayout = QtGui.QGridLayout(Form) self.gridLayout.setObjectName("gridLayout") self.sizeSpin = QtGui.QSpinBox(Form) self.sizeSpin.setProperty("value", 10) self.sizeSpin.setObjectName("sizeSpin") self.gridLayout.addWidget(self.sizeSpin, 1, 1, 1, 1) self.pixelModeCheck = QtGui.QCheckBox(Form) self.pixelModeCheck.setObjectName("pixelModeCheck") self.gridLayout.addWidget(self.pixelModeCheck, 1, 3, 1, 1) self.label = QtGui.QLabel(Form) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 1, 0, 1, 1) self.plot = PlotWidget(Form) self.plot.setObjectName("plot") self.gridLayout.addWidget(self.plot, 0, 0, 1, 4) self.randCheck = QtGui.QCheckBox(Form) self.randCheck.setObjectName("randCheck") self.gridLayout.addWidget(self.randCheck, 1, 2, 1, 1) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
Example #9
Source File: gui.py From autopilot with Mozilla Public License 2.0 | 6 votes |
def __init__(self, pilot=None, subject_list=None, start_fn=None, create_fn=None): """ Args: pilot (str): The name of the pilot this panel controls subject_list (:py:class:`.Subject_List`): The :py:class:`.Subject_List` we control start_fn (:py:meth:`~autopilot.core.terminal.Terminal.toggle_start`): Passed by :class:`Control_Panel` create_fn (:py:meth:`Control_Panel.create_subject`): Passed by :class:`Control_Panel` """ super(Pilot_Panel, self).__init__() self.layout = QtGui.QGridLayout() self.layout.setContentsMargins(0,0,0,0) self.layout.setSpacing(0) self.setLayout(self.layout) self.pilot = pilot self.subject_list = subject_list self.start_fn = start_fn self.create_fn = create_fn self.button = None self.init_ui()
Example #10
Source File: terminal.py From autopilot with Mozilla Public License 2.0 | 6 votes |
def reset_ui(self): """ Clear Layout and call :meth:`~.Terminal.initUI` again """ # type: () -> None self.layout = QtGui.QGridLayout() self.layout.setSpacing(0) self.layout.setContentsMargins(0,0,0,0) self.widget.setLayout(self.layout) self.setCentralWidget(self.widget) self.initUI() ##########################3 # Listens & inter-object methods
Example #11
Source File: xrefwindow.py From MARA_Framework with GNU Lesser General Public License v3.0 | 6 votes |
def __init__(self, parent=None, win=None, xrefs_list=None, method=""): super(XrefDialog, self).__init__(parent) if not isinstance(xrefs_list, list) or len(xrefs_list) == 0: androconf.warning("Bad XrefDialog creation") return if not method: title = "Xrefs to %s" % path.split("/")[-1] else: title = "Xrefs to %s -> %s" % (path.split("/")[-1], method) self.setWindowTitle(title) layout = QtGui.QGridLayout() xrefwin = XrefListView(self, win=win, xrefs=xrefs_list) layout.addWidget(xrefwin, 0, 0) self.setLayout(layout)
Example #12
Source File: universal_tool_template_1116.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #13
Source File: GearBox_template_1010.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #14
Source File: customWidgets.py From pcloudpy with BSD 3-Clause "New" or "Revised" License | 6 votes |
def __init__(self, parent=None): super(Extent, self).__init__(parent) self.xmin_lineedit = LineEdit() self.xmax_lineedit = LineEdit() self.ymin_lineedit = LineEdit() self.ymax_lineedit = LineEdit() self.zmin_lineedit = LineEdit() self.zmax_lineedit = LineEdit() grid = QtGui.QGridLayout() grid.addWidget(QtGui.QLabel("xmin"), 0,0) grid.addWidget(self.xmin_lineedit, 0,1) grid.addWidget(QtGui.QLabel("xmax"), 0,2) grid.addWidget(self.xmax_lineedit, 0,3) grid.addWidget(QtGui.QLabel("ymin"), 1,0) grid.addWidget(self.ymin_lineedit, 1,1) grid.addWidget(QtGui.QLabel("ymax"), 1,2) grid.addWidget(self.ymax_lineedit, 1,3) grid.addWidget(QtGui.QLabel("zmin"), 2,0) grid.addWidget(self.zmin_lineedit, 2,1) grid.addWidget(QtGui.QLabel("zmax"),2,2 ) grid.addWidget(self.zmax_lineedit, 2,3) self.setLayout(grid)
Example #15
Source File: universal_tool_template_0803.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #16
Source File: universal_tool_template_0903.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #17
Source File: universal_tool_template_v7.3.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtGui.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtGui.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtGui.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtGui.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #18
Source File: universal_tool_template_1110.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #19
Source File: universal_tool_template_1010.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #20
Source File: universal_tool_template_1112.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #21
Source File: universal_tool_template_1115.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #22
Source File: UITranslator.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #23
Source File: universal_tool_template_1020.py From universal_tool_template.py with MIT License | 6 votes |
def quickLayout(self, type, ui_name=""): the_layout = '' if type in ("form", "QFormLayout"): the_layout = QtWidgets.QFormLayout() the_layout.setLabelAlignment(QtCore.Qt.AlignLeft) the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow) elif type in ("grid", "QGridLayout"): the_layout = QtWidgets.QGridLayout() elif type in ("hbox", "QHBoxLayout"): the_layout = QtWidgets.QHBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) else: the_layout = QtWidgets.QVBoxLayout() the_layout.setAlignment(QtCore.Qt.AlignTop) if ui_name != "": self.uiList[ui_name] = the_layout return the_layout
Example #24
Source File: SheetMetalRelief.py From FreeCAD_SheetMetal with GNU General Public License v3.0 | 5 votes |
def __init__(self): self.obj = None self.form = QtGui.QWidget() self.form.setObjectName("SMReliefTaskPanel") self.form.setWindowTitle("Binded vertexes list") self.grid = QtGui.QGridLayout(self.form) self.grid.setObjectName("grid") self.title = QtGui.QLabel(self.form) self.grid.addWidget(self.title, 0, 0, 1, 2) self.title.setText("Select new vertex(es) and press Update") # tree self.tree = QtGui.QTreeWidget(self.form) self.grid.addWidget(self.tree, 1, 0, 1, 2) self.tree.setColumnCount(2) self.tree.setHeaderLabels(["Name","Subelement"]) # buttons self.addButton = QtGui.QPushButton(self.form) self.addButton.setObjectName("addButton") self.addButton.setIcon(QtGui.QIcon(os.path.join( iconPath , 'SMUpdate.svg'))) self.grid.addWidget(self.addButton, 3, 0, 1, 2) QtCore.QObject.connect(self.addButton, QtCore.SIGNAL("clicked()"), self.updateElement) self.update()
Example #25
Source File: SheetMetalCmd.py From FreeCAD_SheetMetal with GNU General Public License v3.0 | 5 votes |
def __init__(self): self.obj = None self.form = QtGui.QWidget() self.form.setObjectName("SMBendWallTaskPanel") self.form.setWindowTitle("Binded faces/edges list") self.grid = QtGui.QGridLayout(self.form) self.grid.setObjectName("grid") self.title = QtGui.QLabel(self.form) self.grid.addWidget(self.title, 0, 0, 1, 2) self.title.setText("Select new face(s)/Edge(s) and press Update") # tree self.tree = QtGui.QTreeWidget(self.form) self.grid.addWidget(self.tree, 1, 0, 1, 2) self.tree.setColumnCount(2) self.tree.setHeaderLabels(["Name","Subelement"]) # buttons self.addButton = QtGui.QPushButton(self.form) self.addButton.setObjectName("addButton") self.addButton.setIcon(QtGui.QIcon(os.path.join( iconPath , 'SMUpdate.svg'))) self.grid.addWidget(self.addButton, 3, 0, 1, 2) QtCore.QObject.connect(self.addButton, QtCore.SIGNAL("clicked()"), self.updateElement) self.update()
Example #26
Source File: transform.py From Animation with GNU General Public License v2.0 | 5 votes |
def __init__(self, obj,*args): QtGui.QWidget.__init__(self, *args) self.obj2=obj FreeCAD.obj2=obj self.vollabel = QtGui.QLabel(obj.Object.Label) self.pushButton02 = QtGui.QPushButton() self.pushButton02.clicked.connect(self.on_pushButton02_clicked) self.pushButton02.setText("close") self.listWidget = QListWidget() for tn in self.obj2.Object._targets: n=tn.Label item = QListWidgetItem(n) self.listWidget.addItem(item) self.listWidget.setSelectionMode(QtGui.QAbstractItemView.MultiSelection) self.combo = QtGui.QComboBox(self) for i in FreeCAD.ActiveDocument.Objects: self.combo.addItem(str(i.Label)+ " ") self.pushButton03 = QtGui.QPushButton() self.pushButton03.clicked.connect(self.on_pushButton03_clicked) self.pushButton03.setText("add target") self.pushButton04 = QtGui.QPushButton() self.pushButton04.clicked.connect(self.on_pushButton04_clicked) self.pushButton04.setText("remove selected targets") layout = QtGui.QGridLayout() layout.addWidget(self.vollabel, 0, 0) layout.addWidget(self.pushButton02, 15, 0,1,4) layout.addWidget(self.listWidget, 3, 0,1,4) layout.addWidget(self.pushButton04, 4, 0,1,4) layout.addWidget(self.combo, 5, 0,1,4) layout.addWidget(self.pushButton03, 6, 0,1,4) self.setLayout(layout) self.setWindowTitle("Edit Coordinate System")
Example #27
Source File: transform.py From Animation with GNU General Public License v2.0 | 5 votes |
def __init__(self, obj,*args): QtGui.QWidget.__init__(self, *args) self.Object=obj layout = QtGui.QGridLayout() # self.vollabel = QtGui.QLabel("Telescopic boom") # layout.addWidget(self.vollabel, 0, 0) self.slider = QtGui.QSlider(QtCore.Qt.Horizontal, self) self.slider.setMaximum(100) self.slider.valueChanged.connect(self.paramValueCanged); layout.addWidget(self.slider, 12, 0,1,4) self.setLayout(layout) self.setWindowTitle("Telecopic Boom")
Example #28
Source File: exportDialogTemplate_pyside.py From qgisSpaceSyntaxToolkit with GNU General Public License v3.0 | 5 votes |
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(241, 367) self.gridLayout = QtGui.QGridLayout(Form) self.gridLayout.setSpacing(0) self.gridLayout.setObjectName("gridLayout") self.label = QtGui.QLabel(Form) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 0, 0, 1, 3) self.itemTree = QtGui.QTreeWidget(Form) self.itemTree.setObjectName("itemTree") self.itemTree.headerItem().setText(0, "1") self.itemTree.header().setVisible(False) self.gridLayout.addWidget(self.itemTree, 1, 0, 1, 3) self.label_2 = QtGui.QLabel(Form) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 2, 0, 1, 3) self.formatList = QtGui.QListWidget(Form) self.formatList.setObjectName("formatList") self.gridLayout.addWidget(self.formatList, 3, 0, 1, 3) self.exportBtn = QtGui.QPushButton(Form) self.exportBtn.setObjectName("exportBtn") self.gridLayout.addWidget(self.exportBtn, 6, 1, 1, 1) self.closeBtn = QtGui.QPushButton(Form) self.closeBtn.setObjectName("closeBtn") self.gridLayout.addWidget(self.closeBtn, 6, 2, 1, 1) self.paramTree = ParameterTree(Form) self.paramTree.setObjectName("paramTree") self.paramTree.headerItem().setText(0, "1") self.paramTree.header().setVisible(False) self.gridLayout.addWidget(self.paramTree, 5, 0, 1, 3) self.label_3 = QtGui.QLabel(Form) self.label_3.setObjectName("label_3") self.gridLayout.addWidget(self.label_3, 4, 0, 1, 3) self.copyBtn = QtGui.QPushButton(Form) self.copyBtn.setObjectName("copyBtn") self.gridLayout.addWidget(self.copyBtn, 6, 0, 1, 1) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
Example #29
Source File: universal_tool_template_v7.3.py From universal_tool_template.py with MIT License | 5 votes |
def qui(self, ui_list_string, parentObject_string='', opt=''): # pre-defined user short name syntax type_dict = { 'vbox': 'QVBoxLayout','hbox':'QHBoxLayout','grid':'QGridLayout', 'form':'QFormLayout', 'split': 'QSplitter', 'grp':'QGroupBox', 'tab':'QTabWidget', 'btn':'QPushButton', 'btnMsg':'QPushButton', 'label':'QLabel', 'input':'QLineEdit', 'check':'QCheckBox', 'choice':'QComboBox', 'txtEdit': 'LNTextEdit', 'txt': 'QTextEdit', 'tree': 'QTreeWidget', 'space': 'QSpacerItem', } # get ui_list, creation or existing ui object ui_list = [x.strip() for x in ui_list_string.split('|')] for i in range(len(ui_list)): if ui_list[i] in self.uiList: # - exisiting object ui_list[i] = self.uiList[ui_list[i]] else: # - string creation: # get part info partInfo = ui_list[i].split(';',1) uiName = partInfo[0].split('@')[0] uiType = uiName.rsplit('_',1)[-1] if uiType in type_dict: uiType = type_dict[uiType] # set quickUI string format ui_list[i] = partInfo[0]+';'+uiType if len(partInfo)==1: # give empty button and label a place holder name if uiType in ('btn', 'btnMsg', 'QPushButton','label', 'QLabel'): ui_list[i] = partInfo[0]+';'+uiType + ';'+uiName elif len(partInfo)==2: ui_list[i]=ui_list[i]+";"+partInfo[1] # get parentObject or exisiting object parentObject = parentObject_string if parentObject in self.uiList: parentObject = self.uiList[parentObject] # process quickUI self.quickUI(ui_list, parentObject, opt)
Example #30
Source File: universal_tool_template_v8.1.py From universal_tool_template.py with MIT License | 5 votes |
def qui(self, ui_list_string, parentObject_string='', opt=''): # pre-defined user short name syntax type_dict = { 'vbox': 'QVBoxLayout','hbox':'QHBoxLayout','grid':'QGridLayout', 'form':'QFormLayout', 'split': 'QSplitter', 'grp':'QGroupBox', 'tab':'QTabWidget', 'btn':'QPushButton', 'btnMsg':'QPushButton', 'label':'QLabel', 'input':'QLineEdit', 'check':'QCheckBox', 'choice':'QComboBox', 'txtEdit': 'LNTextEdit', 'txt': 'QTextEdit', 'tree': 'QTreeWidget', 'table': 'QTableWidget', 'space': 'QSpacerItem', } # get ui_list, creation or existing ui object ui_list = [x.strip() for x in ui_list_string.split('|')] for i in range(len(ui_list)): if ui_list[i] in self.uiList: # - exisiting object ui_list[i] = self.uiList[ui_list[i]] else: # - string creation: # get part info partInfo = ui_list[i].split(';',1) uiName = partInfo[0].split('@')[0] uiType = uiName.rsplit('_',1)[-1] if uiType in type_dict: uiType = type_dict[uiType] # set quickUI string format ui_list[i] = partInfo[0]+';'+uiType if len(partInfo)==1: # give empty button and label a place holder name if uiType in ('btn', 'btnMsg', 'QPushButton','label', 'QLabel'): ui_list[i] = partInfo[0]+';'+uiType + ';'+uiName elif len(partInfo)==2: ui_list[i]=ui_list[i]+";"+partInfo[1] # get parentObject or exisiting object parentObject = parentObject_string if parentObject in self.uiList: parentObject = self.uiList[parentObject] # process quickUI self.quickUI(ui_list, parentObject, opt)