def __init__(self, parent=None): super(MappingDialog, self).__init__(parent) self.setWindowTitle("Maak een mapping t.b.v. het importeren") self.qlayout = PQtW.QGridLayout(self) self.setWindowFlag(PQtC.Qt.WindowCloseButtonHint, False) self.buttons = PQtW.QDialogButtonBox( PQtW.QDialogButtonBox.Ok | PQtW.QDialogButtonBox.Cancel, PQtC.Qt.Horizontal, self) self.buttons.accepted.connect(self.accept) self.buttons.rejected.connect(self.reject) self.nextButton = PQtW.QPushButton() self.nextButton.setText("Volgende") self.prevButton = PQtW.QPushButton() self.prevButton.setText("Vorige") self.label_laag = PQtW.QLabel(self) self.label_laag.setText("Importeer in laag") self.label_types = PQtW.QLabel(self) self.label_types.setText("Import types in bestand") self.label_conversie = PQtW.QLabel(self) self.label_conversie.setText("Conversie naar type laag") self.label_target = PQtW.QLabel(self) self.label_target.setText("Converteer naar type") self.qlayout.addWidget(self.label_types, 0, 0) self.qlayout.addWidget(self.label_conversie, 0, 1) self.qlayout.addWidget(self.label_laag, 0, 2) self.qlayout.addWidget(self.label_target, 0, 3) self.load_types()
def setup_ui(self): self.dock_widget_content = QtWidgets.QWidget(self) self.setObjectName("graphqlDockWidget") self.dock_widget_content.setObjectName("graphqlMainWidget") self.main_vlayout = QtWidgets.QVBoxLayout(self.dock_widget_content) self.dock_widget_content.setLayout(self.main_vlayout) #self.web_view = QtWebEngineWidgets.QWebEngineView(self.dock_widget_content) self.web_view = QtWebKitWidgets.QWebView(self.dock_widget_content) self.main_vlayout.addWidget(self.web_view) self.button_bar = QtWidgets.QHBoxLayout(self.dock_widget_content) self.load_button = QtWidgets.QPushButton(self.dock_widget_content) self.refresh_button = QtWidgets.QPushButton(self.dock_widget_content) spacer = QtWidgets.QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum) self.button_bar.addWidget(self.load_button) self.button_bar.addSpacerItem(spacer) self.button_bar.addWidget(self.refresh_button) self.main_vlayout.addLayout(self.button_bar) self.setWidget(self.dock_widget_content) self.setWindowTitle("GeoGraphQL") self.load_button.setText("Laad data") self.refresh_button.setText("Refresh")
def loadModule(self, module): if module: # can happen if it gets filtered away form = QtWidgets.QVBoxLayout() self.moduleparamBox.setTitle("Parameters for " + module.text()) helpBtn = QtWidgets.QPushButton("Module help") helpBtn.clicked.connect(self.showHelp) parameterform = module.paramClass.getParamUi(parent=self) form.addLayout(parameterform, stretch=1) # reset / run / add to list / add to view resetbar = QtWidgets.QHBoxLayout() resetbtn = QtWidgets.QPushButton("Reset") resetbtn.clicked.connect(lambda: self.resetModule(module)) runbtn = QtWidgets.QPushButton("Run now") runbtn.clicked.connect(lambda: self.runModuleAsync(module)) addbtn = QtWidgets.QPushButton("Add to run list >") addbtn.clicked.connect(self.addToRunList) if "opals" in module.text(): self.viewbox = QtWidgets.QCheckBox("Add result to canvas") self.viewbox.clicked.connect(self.viewboxChanged) self.commonbtn = QtWidgets.QPushButton( "Common and Global parameters") self.commonwin = module.paramClass.getGlobalCommonParamsWindow( parent=self) self.commonbtn.clicked.connect(self.commonwin.show) form.addWidget(self.commonbtn) #viewbox.stateChanged.connect(module.paramClass.view = viewbox.isChecked()) resetbar.addStretch(1) resetbar.addWidget(helpBtn) resetbar.addWidget(resetbtn) resetbar.addWidget(runbtn) resetbar.addWidget(addbtn) if "opals" in module.text(): resetbar.addWidget(self.viewbox) #resetbar.addWidget(commonbtn) #resetbar.addWidget(globalbtn) form.addLayout(resetbar) module.paramClass.revalidate = True module.paramClass.validate() self.curmodule = module else: form = QtWidgets.QHBoxLayout() l1 = QtWidgets.QLabel("No module selected...") form.addWidget(l1) self.moduleparamBox.setTitle("Module Parameters") self.clearLayout(self.moduleparamLayout) self.moduleparamLayout.addLayout(form)
def update_jobs_table(self): if self.jobs: table_model = JobsTableModel(self.jobs, self) self.proxy_model = QSortFilterProxyModel() self.proxy_model.setSourceModel(table_model) self.jobs_view.setModel(self.proxy_model) # Add "Details" buttons in cell for row in range(0, len(self.jobs)): btn = QtWidgets.QPushButton(self.tr("Details")) btn.clicked.connect(self.btn_details) self.jobs_view.setIndexWidget(self.proxy_model.index(row, 6), btn) self.jobs_view.horizontalHeader().setSectionResizeMode( 0, QtWidgets.QHeaderView.Stretch) self.jobs_view.horizontalHeader().setSectionResizeMode( 1, QtWidgets.QHeaderView.Stretch) self.jobs_view.horizontalHeader().setSectionResizeMode( 2, QtWidgets.QHeaderView.ResizeToContents) self.jobs_view.horizontalHeader().setSectionResizeMode( 3, QtWidgets.QHeaderView.ResizeToContents) self.jobs_view.horizontalHeader().setSectionResizeMode( 4, QtWidgets.QHeaderView.Fixed) self.jobs_view.horizontalHeader().setSectionResizeMode( 5, QtWidgets.QHeaderView.ResizeToContents) self.jobs_view.horizontalHeader().setSectionResizeMode( 6, QtWidgets.QHeaderView.ResizeToContents) self.jobs_view.selectionModel().selectionChanged.connect( self.selection_changed)
def createGroupBox(cls, module_name, box_header, project, params, param_show_list): box = QtWidgets.QGroupBox(box_header) scroll = QtWidgets.QScrollArea() scroll.setWidget(box) scroll.setFrameShape(QtWidgets.QFrame.NoFrame) scroll.setWidgetResizable(True) status = QtWidgets.QListWidgetItem("hidden status") mod = cls(execName=os.path.join(project.opalspath, module_name + ".exe"), QpalsProject=project) mod.listitem = status mod.load() for p in mod.params: if p.name in params: p.val = params[p.name] p.changed = True ui = mod.getFilteredParamUi(filter=param_show_list) advancedBox = QCollapsibleGroupBox.QCollapsibleGroupBox("Advanced options") advancedBox.setChecked(False) ui.addRow(advancedBox) advancedLa = mod.getFilteredParamUi(notfilter=param_show_list) advancedBox.setLayout(advancedLa) runbar = QtWidgets.QHBoxLayout() runprogress = QtWidgets.QProgressBar() mod.progressbar = runprogress mod.runbtn = QtWidgets.QPushButton("Run module") mod.runbtn.clicked.connect(mod.run_async_self) runbar.addWidget(runprogress) runbar.addWidget(mod.runbtn) ui.addRow(runbar) box.setLayout(ui) height = box.minimumSizeHint().height() scroll.setFixedHeight(height + 10) return mod, scroll
def update_jobs_table(self): if self.jobs: table_model = JobsTableModel(self.jobs, self) proxy_model = QSortFilterProxyModel() proxy_model.setSourceModel(table_model) self.jobs_view.setModel(proxy_model) # Add "Details" buttons in cell for row in range(0, len(self.jobs)): btn = QtWidgets.QPushButton(self.tr("Details")) btn.clicked.connect(self.btn_details) btn.setMinimumSize(QSize(75, 0)) btn.setMaximumSize(QSize(150, 16777215)) self.jobs_view.setIndexWidget(proxy_model.index(row, 5), btn) #self.jobs_view.widget(proxy_model.index(row, 2)).setTextAlignment(Qt.AlignCenter) # self.jobs_view.setMinimumSize(QSize(0, 100)) # self.jobs_view.setColumnWidth(1, 400) # self.jobs_view.setColumnWidth(2, 200) # self.jobs_view.setColumnWidth(3, 200) # self.jobs_view.setColumnWidth(4, 200) # self.jobs_view.setColumnWidth(5, 200) self.jobs_view.selectionModel().selectionChanged.connect( self.selection_changed)
def setupUi(self, BulkVectorExportDialog): BulkVectorExportDialog.setObjectName( _fromUtf8("BulkVectorExportDialog")) BulkVectorExportDialog.resize(392, 141) self.buttonBox = QtWidgets.QDialogButtonBox(BulkVectorExportDialog) self.buttonBox.setGeometry(QtCore.QRect(220, 100, 161, 32)) self.buttonBox.setWhatsThis(_fromUtf8("")) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok) self.buttonBox.setCenterButtons(True) self.buttonBox.setObjectName(_fromUtf8("buttonBox")) self.dirEdit = QtWidgets.QLineEdit(BulkVectorExportDialog) self.dirEdit.setGeometry(QtCore.QRect(120, 40, 231, 20)) self.dirEdit.setObjectName(_fromUtf8("dirEdit")) self.label = QtWidgets.QLabel(BulkVectorExportDialog) self.label.setGeometry(QtCore.QRect(10, 40, 71, 16)) self.label.setObjectName(_fromUtf8("label")) self.dirButton = QtWidgets.QPushButton(BulkVectorExportDialog) self.dirButton.setGeometry(QtCore.QRect(360, 40, 31, 21)) self.dirButton.setObjectName(_fromUtf8("dirButton")) self.retranslateUi(BulkVectorExportDialog) self.buttonBox.accepted.connect(BulkVectorExportDialog.accept) self.buttonBox.rejected.connect(BulkVectorExportDialog.reject) QtCore.QMetaObject.connectSlotsByName(BulkVectorExportDialog)
def setupUi(self, changeDataSourceDialog): changeDataSourceDialog.setObjectName( _fromUtf8("changeDataSourceDialog")) changeDataSourceDialog.resize(297, 305) self.verticalLayout = QtWidgets.QVBoxLayout(changeDataSourceDialog) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.label_2 = QtWidgets.QLabel(changeDataSourceDialog) self.label_2.setObjectName(_fromUtf8("label_2")) self.verticalLayout.addWidget(self.label_2) self.selectDatasourceCombo = QtWidgets.QComboBox( changeDataSourceDialog) self.selectDatasourceCombo.setObjectName( _fromUtf8("selectDatasourceCombo")) self.verticalLayout.addWidget(self.selectDatasourceCombo) self.label = QtWidgets.QLabel(changeDataSourceDialog) self.label.setObjectName(_fromUtf8("label")) self.verticalLayout.addWidget(self.label) self.lineEdit = QtWidgets.QPlainTextEdit(changeDataSourceDialog) self.lineEdit.setObjectName(_fromUtf8("lineEdit")) self.verticalLayout.addWidget(self.lineEdit) self.openBrowser = QtWidgets.QPushButton(changeDataSourceDialog) self.openBrowser.setObjectName(_fromUtf8("openBrowser")) self.verticalLayout.addWidget(self.openBrowser) self.buttonBox = QtWidgets.QDialogButtonBox(changeDataSourceDialog) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok) self.buttonBox.setObjectName(_fromUtf8("buttonBox")) self.verticalLayout.addWidget(self.buttonBox) self.retranslateUi(changeDataSourceDialog) QtCore.QMetaObject.connectSlotsByName(changeDataSourceDialog)
def getGlobalCommonParamsWindow(self, parent=None): window = QtWidgets.QDialog() window.setWindowTitle("Global and common parameters") scrollarea = QtWidgets.QScrollArea() form = QtWidgets.QFormLayout() form.addRow(QtWidgets.QLabel("Common Parameters:")) for param in self.common: (l1, l2) = self.getUIOneliner(param, global_common=True) form.addRow(l1, l2) form.addRow(QtWidgets.QLabel("Global Parameters:")) for param in self.globals: (l1, l2) = self.getUIOneliner(param, global_common=True) form.addRow(l1, l2) closebtn = QtWidgets.QPushButton("Close") closebtn.clicked.connect(lambda: self.closeGlobalCommonParamsWindow(window)) groupbox = QtWidgets.QGroupBox() groupbox.setLayout(form) scrollarea.setWidget(groupbox) window.setFixedHeight(600) window.setFixedWidth(600) scrollbox = QtWidgets.QVBoxLayout() scrollbox.addWidget(scrollarea) scrollbox.addWidget(closebtn) window.setLayout(scrollbox) return window
def setupUi(self): layout = QtWidgets.QVBoxLayout() layout.setSpacing(2) layout.setMargin(0) self.tree = QtWidgets.QTreeWidget() self.tree.setAlternatingRowColors(True) self.tree.headerItem().setText(0, "Setting") self.tree.headerItem().setText(1, "Value") self.tree.setColumnWidth(0, 150) layout.addWidget(self.tree) for section in self.parameters: params = self.parameters[section] paramsItem = QtWidgets.QTreeWidgetItem() paramsItem.setText(0, section) for name, value in params: item = QtWidgets.QTreeWidgetItem() item.setText(0, name) item.setText(1, value) item.setFlags(item.flags() | QtCore.Qt.ItemIsEditable) paramsItem.addChild(item) self.tree.addTopLevelItem(paramsItem) button = QtWidgets.QPushButton() button.setText("Save") button.clicked.connect(self.saveSettings) buttonBox = QtWidgets.QDialogButtonBox() buttonBox.setOrientation(QtCore.Qt.Horizontal) buttonBox.addButton(button, QtWidgets.QDialogButtonBox.ActionRole) layout.addWidget(buttonBox) self.setLayout(layout)
def getUI(self): self.ui = QtWidgets.QDialog() self.ui.resize(720, 300) self.ui.setWindowTitle("qpals AttributeManager") lo = QtWidgets.QFormLayout() vb = QtWidgets.QVBoxLayout() hb = QtWidgets.QHBoxLayout() self.pointcloud = QpalsDropTextbox.QpalsDropTextbox(layerlist=self.layerlist) hb.addWidget(self.pointcloud,1) lo.addRow("ODM File", hb) vb.addLayout(lo,0) self.attable = QtWidgets.QTableView() self.newnamebox = QtWidgets.QComboBox() self.newnamebox.setEditable(True) for attr in odm_predef_attributes: self.newnamebox.addItem(attr) self.newnamebox.lineEdit().setPlaceholderText("_Name") self.typedropdown = QtWidgets.QComboBox() for type in odm_data_types: self.typedropdown.addItem(type) self.formulabox = QtWidgets.QLineEdit("") self.formulabox.setPlaceholderText("opalsAddInfo formula") self.helpbtn = QtWidgets.QPushButton('?') self.helpbtn.setMaximumWidth(self.helpbtn.fontMetrics().boundingRect("?").width() + 7) self.addchangebtn = QtWidgets.QPushButton('Add/Change attribute') self.closebtn = QtWidgets.QPushButton('Close') hb2 = QtWidgets.QHBoxLayout() hb2.addWidget(self.newnamebox) hb2.addWidget(QtWidgets.QLabel("(")) hb2.addWidget(self.typedropdown) hb2.addWidget(QtWidgets.QLabel(")")) hb2.addWidget(QtWidgets.QLabel("=")) hb2.addWidget(self.formulabox) hb2.addWidget(self.addchangebtn) hb2.addWidget(self.helpbtn) hb2.addStretch() hb2.addWidget(self.closebtn) vb.addWidget(self.attable, 1) vb.addLayout(hb2) self.ui.setLayout(vb) self.pointcloud.editingFinished.connect(self.pcChanged) self.newnamebox.editTextChanged.connect(self.newnameChanged) self.closebtn.clicked.connect(self.close) self.helpbtn.clicked.connect(self.addinfoHelp) self.addchangebtn.clicked.connect(self.fieldcalc) self.newnamebox.lineEdit().setText("_") return self.ui
def initUI(self): self.ui = QtWidgets.QDialog() lo = QtWidgets.QFormLayout() self.ui.setSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum) lo.addRow(QtWidgets.QLabel("Load ALS file(s):")) self.dropspace = QpalsDropTextbox.QpalsDropTextbox( layerlist=self.layerlist) self.dropspace.setMinimumContentsLength(20) self.dropspace.setSizeAdjustPolicy( QtWidgets.QComboBox.AdjustToMinimumContentsLength) self.dropspace.editingFinished.connect(self.inFileUpdated) lo.addRow(self.dropspace) self.visMethod = QtWidgets.QComboBox() self.visMethod.addItem(VISUALISATION_METHODS[0]) self.visMethod.addItem(VISUALISATION_METHODS[1]) self.visMethod.addItem(VISUALISATION_METHODS[2]) self.visMethod.addItem(VISUALISATION_METHODS[3]) self.visMethod.addItem(VISUALISATION_METHODS[4]) self.visMethod.addItem(VISUALISATION_METHODS[5]) self.visMethod.addItem(VISUALISATION_METHODS[6]) self.visMethod.addItem(VISUALISATION_METHODS[7]) self.visMethod.addItem(VISUALISATION_METHODS[8]) self.visMethod.addItem(VISUALISATION_METHODS[9]) self.visMethod.currentIndexChanged.connect(self.updatevisMethod) self.cellSizeLbl = QtWidgets.QLabel("Set cell size:") self.cellSizeBox = QtWidgets.QLineEdit() self.cellFeatLbl = QtWidgets.QLabel("Set feature:") self.cellFeatCmb = QtWidgets.QComboBox() self.cellAttrLbl = QtWidgets.QLabel("Select attribute:") self.cellAttrCmb = QtWidgets.QComboBox() self.cellAttrCmb.addItem("Z") self.cellAttrCmb.setSizeAdjustPolicy( QtWidgets.QComboBox.AdjustToContents) self.isoInteLbl = QtWidgets.QLabel("Set isoline interval:") self.isoInteBox = QtWidgets.QLineEdit() self.isoInteBox.setText("10") cellInst = QpalsModuleBase.QpalsModuleBase( os.path.join(self.project.opalspath, "opalsCell.exe"), self.project) cellInst.load() for param in cellInst.params: if param.name.lower() == "cellsize": self.cellSizeBox.setText(param.val) break self.cellFeatCmb.addItems(self.features) self.cellFeatCmb.setCurrentIndex(4) lo.addRow(self.cellAttrLbl, self.cellAttrCmb) lo.addRow(self.cellSizeLbl, self.cellSizeBox) lo.addRow(self.cellFeatLbl, self.cellFeatCmb) lo.addRow(self.isoInteLbl, self.isoInteBox) lo.addRow(self.visMethod) self.okBtn = QtWidgets.QPushButton("Load") self.okBtn.clicked.connect(self.loadHelper) lo.addRow(self.okBtn) self.ui.setLayout(lo) self.ui.setWindowTitle("Open ALS file") self.visMethod.setCurrentIndex(1)
def __addRowToGridLayout(self): if len(self.__vfkLineEdits) >= 5: self.__maximumLineEditsReached() return # update label self.label.setText('VFK soubory:') # new layout horizontalLayout = QtWidgets.QHBoxLayout() # create new objects self.__browseButtons['browseButton_{}'.format( len(self.__vfkLineEdits) + 1)] = QtWidgets.QPushButton(u"Procházet") self.__vfkLineEdits['vfkLineEdit_{}'.format( len(self.__vfkLineEdits) + 1)] = QtWidgets.QLineEdit() horizontalLayout.addWidget(self.__vfkLineEdits['vfkLineEdit_{}'.format( len(self.__vfkLineEdits))]) horizontalLayout.addWidget( self.__browseButtons['browseButton_{}'.format( len(self.__vfkLineEdits))]) # number of lines in gridLayout rows_count = self.gridLayout_12.rowCount( ) # count of rows in gridLayout # export objects from gridLayout item_label = self.gridLayout_12.itemAtPosition(rows_count - 3, 0) item_par = self.gridLayout_12.itemAtPosition(rows_count - 3, 1) item_bud = self.gridLayout_12.itemAtPosition(rows_count - 2, 1) item_settings = self.gridLayout_12.itemAtPosition(rows_count - 1, 0) item_rewrite_db = self.gridLayout_12.itemAtPosition(rows_count - 1, 1) # remove objects from gridLayout self.gridLayout_12.removeItem( self.gridLayout_12.itemAtPosition(rows_count - 3, 0)) self.gridLayout_12.removeItem( self.gridLayout_12.itemAtPosition(rows_count - 3, 1)) self.gridLayout_12.removeItem( self.gridLayout_12.itemAtPosition(rows_count - 2, 1)) self.gridLayout_12.removeItem( self.gridLayout_12.itemAtPosition(rows_count - 1, 0)) self.gridLayout_12.removeItem( self.gridLayout_12.itemAtPosition(rows_count - 1, 1)) # re-build gridLayout self.gridLayout_12.addLayout(horizontalLayout, rows_count - 3, 1) self.gridLayout_12.addItem(item_label, rows_count - 2, 0) self.gridLayout_12.addItem(item_par, rows_count - 2, 1) self.gridLayout_12.addItem(item_bud, rows_count - 1, 1) self.gridLayout_12.addItem(item_settings, rows_count, 0) self.gridLayout_12.addItem(item_rewrite_db, rows_count, 1) self.__browseButtons['browseButton_{}'.format(len(self.__vfkLineEdits))].clicked.\ connect(lambda: self.browseButton_clicked( int('{}'.format(len(self.__vfkLineEdits)))))
def afegirBoto(self, item): boto = qgWdg.QPushButton(item.nom()) boto.setCheckable(True) boto.setChecked(item.esVisible()) self.layout().addWidget(boto) i = self.layout().indexOf(boto) self.items[i] = item self.botons[i] = boto boto.clicked.connect(self.clickBoto) return boto
def _add_loadable_button(self, geonode_service: models.GeonodeService): url = self.brief_dataset.service_urls.get(geonode_service) if url is not None: icon = QtGui.QIcon( f":/plugins/qgis_geonode/icon_{geonode_service.value}.svg") button = QtWidgets.QPushButton() button.setObjectName(f"{geonode_service.value.lower()}_btn") button.setIcon(icon) button.setToolTip(tr(f"Load layer via {geonode_service.value}")) button.clicked.connect(partial(self.load_dataset, geonode_service)) order = 1 if geonode_service == models.GeonodeService.OGC_WMS else 2 self.action_buttons_layout.insertWidget(order, button)
def updatePublishedStyle(layer): global _currentMessageBarLayer track = pluginSetting("TrackLayers", "geoserverexplorer") if track and isTrackedLayer(layer): if iface.messageBar().currentItem() is None: _resetCurrentMessageBarLayer() if _currentMessageBarLayer != layer: _currentMessageBarLayer = layer widget = iface.messageBar().createMessage( "", "This layer was uploaded to a geoserver catalog. Do you want to update the published style?" ) updateButton = QtWidgets.QPushButton(widget) updateButton.setText("Update") def updateStyle(): url = getTrackingInfo(layer) catalog = Catalog(url) wrapper = CatalogWrapper(catalog) wrapper.publishStyle(layer) iface.messageBar().popWidget() _resetCurrentMessageBarLayer() updateButton.pressed.connect(updateStyle) widget.layout().addWidget(updateButton) stopTrackingButton = QtWidgets.QPushButton(widget) stopTrackingButton.setText("Stop tracking this layer") def stopTracking(): removeTrackedLayer(layer) iface.messageBar().popWidget() _resetCurrentMessageBarLayer() stopTrackingButton.pressed.connect(stopTracking) widget.layout().addWidget(stopTrackingButton) iface.messageBar().pushWidget(widget, Qgis.Info) iface.messageBar().currentItem().geoserverLayer = layer
def setupUi(self): self.resize(400, 400) self.setWindowTitle('Upload layer to Shogun') title = QtGui.QLabel(self) title.setGeometry(50,30,300,70) title.setText('Please select the layer you wish to upload to the \n Shogun Server') self.layerBox = QgsMapLayerComboBox(self) self.layerBox.setGeometry(QRect(50, 100, 300, 30)) self.uploadButton = QtGui.QPushButton(self) self.uploadButton.setGeometry(QRect(250, 160, 100, 35)) self.uploadButton.setText('Upload Layer') self.cancelButton = QtGui.QPushButton(self) self.cancelButton.setGeometry(QRect(140, 160, 100, 35)) self.cancelButton.setText('Cancel') self.cancelButton.clicked.connect(self.hide) self.logWindow = QtGui.QTextEdit(self) self.logWindow.setGeometry(QRect(50, 200, 300, 180)) self.logWindow.setReadOnly(True) self.logWindow.setText('Upload Log:')
def createUi(self): self.selectedChkBox = QtWidgets.QCheckBox("Use selected lines only") self.selectedChkBox.setCheckState(2) self.cmbLineLayer = QgsMapLayerComboBox() self.cmbLineLayer.setFilters(QgsMapLayerProxyModel.LineLayer) self.cmbOdmPath = QpalsDropTextbox.QpalsDropTextbox( layerlist=self.layerlist, filterrex=".*\.odm$") self.runBtn = QtWidgets.QPushButton("Run") self.runBtn.clicked.connect(self.runLM) self.ui = QtWidgets.QWidget() self.fl = QtWidgets.QFormLayout() self.ui.setLayout(self.fl) self.fl.addRow(QtWidgets.QLabel("Line layer:"), self.cmbLineLayer) self.fl.addRow(QtWidgets.QLabel("Point cloud:"), self.cmbOdmPath) self.fl.addRow(self.selectedChkBox) self.fl.addRow(self.runBtn)
def update_data_table(self): table_model = DataTableModel(self.datasets, self) proxy_model = QSortFilterProxyModel() proxy_model.setSourceModel(table_model) self.data_view.setModel(proxy_model) # Add "Notes" buttons in cell for row in range(0, len(self.datasets)): btn = QtWidgets.QPushButton(self.tr("Details")) btn.clicked.connect(self.btn_details) self.data_view.setIndexWidget(proxy_model.index(row, 7), btn) self.data_view.horizontalHeader().setResizeMode( QtWidgets.QHeaderView.ResizeToContents) self.data_view.setSelectionBehavior( QtWidgets.QAbstractItemView.SelectRows)
def fillOutDsInfoRow(self, row): """ Fills out row with output info for each output column. In here, ouput SRC and EDGV are filled. :param row: (int) row index to have its output columns populated. :return: (list-of-object) return a list containing (str) output EDGV version and (QPushButton) output SRC. """ # clear current content, if any try: self.clearOutDsInforRow(row=row) except: pass # get only outDs widget outDs = self.getRowContents(row=row)[DatasourceConversion.OutDs] # widget dict keys are defined as group title, which is part of outDs current text if outDs: groupTitle = outDs.currentText().split(':')[0] crsIcon = QIcon( os.path.join(os.path.dirname(__file__), '..', '..', '..', 'icons', 'CRS_qgis.svg')) else: return [] if groupTitle in self.outDs: containerWidget = self.outDs[groupTitle] # only fills line if dictionary is a controlled widget # new push button for SRC outCrs = QtWidgets.QPushButton() outCrs.setIcon(crsIcon) # get new text item to add output datasource edgvOut = containerWidget.connectionWidget.getDatasourceEdgvVersion( ) edgvOut = edgvOut[5:] if 'EDGV' in edgvOut else edgvOut itemEdgvOut = QtWidgets.QTableWidgetItem() itemEdgvOut.setText(edgvOut) itemEdgvOut.setFlags(Qt.ItemIsEditable) # not editable # add both to table self.tableWidget.setCellWidget(row, DatasourceConversion.outCrs, outCrs) self.tableWidget.setItem(row, DatasourceConversion.OutEdgv, itemEdgvOut) return [edgvOut, outCrs] else: # if is not controlled, clear line return []
def create_pushbutton(typeBtn, content, layout, size=None, row=None, column=None): """create QPushButton with Icon or Text and add it to layout""" tempBtn = PQtW.QPushButton() if typeBtn == "Icon": tempBtn.setIcon(QIcon(content)) else: tempBtn.setText(content) if size: tempBtn.setFixedSize(QSize(size, size)) if isinstance(layout, PQtW.QGridLayout): layout.addWidget(tempBtn, row, column) else: layout.addWidget(tempBtn) return tempBtn
def startProgressBar(title, totalSteps, messageBar=None): global _progress global _progressMessageBar global _messageBar global _progressActive closeProgressBar() _progressActive = True _messageBar = messageBar or iface.messageBar() _progressMessageBar = _messageBar.createMessage(title) _progress = QtWidgets.QProgressBar() _progress.setRange(0, totalSteps) #_progress.setValue(0) _progress.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) _progressMessageBar.layout().addWidget(_progress) cancelButton = QtWidgets.QPushButton("Cancel") cancelButton.clicked.connect(closeProgressBar) _progressMessageBar.layout().addWidget(cancelButton) _messageBar.pushWidget(_progressMessageBar, Qgis.Info) QtCore.QCoreApplication.processEvents()
def getUI(self): ui = QtWidgets.QWidget() self.figure = plt.figure() self.mpl_canvas = FigureCanvas(self.figure) self.attrsel = QtWidgets.QComboBox() self.attrsel.addItems(sorted([m for m in self.data])) self.attrsel.currentIndexChanged.connect(self.draw_new_plot) self.scale_min = QtWidgets.QLineEdit("0") self.scale_min.setMinimumWidth(5) self.scale_min.editingFinished.connect(self.draw_new_plot) self.scale_max = QtWidgets.QLineEdit("10") self.scale_max.setMinimumWidth(5) self.scale_max.editingFinished.connect(self.draw_new_plot) self.colormap = QtWidgets.QComboBox() self.colormap.addItems(sorted(m for m in cm.datad)) self.colormap.setCurrentIndex(self.colormap.findText("gist_earth")) self.colormap.currentIndexChanged.connect(self.draw_new_plot) self.marker = QtWidgets.QComboBox() self.marker.addItems(['.', ',', 'o', 'v', '^', '<', '>', '1', '2', '3', '4', '8', 's', 'p', 'P', '*', 'h', 'H', '+', 'x', 'X', 'D', 'd', '|', '_']) self.marker.setCurrentIndex(2) self.marker.currentIndexChanged.connect(self.draw_new_plot) self.markerSize = QtWidgets.QDoubleSpinBox() self.markerSize.setValue(0.5) self.markerSize.setRange(0.1, 200) self.markerSize.setSingleStep(0.1) self.markerSize.valueChanged.connect(self.draw_new_plot) self.lineSize = QtWidgets.QDoubleSpinBox() self.lineSize.setValue(1) self.lineSize.setRange(0.1, 20) self.lineSize.setSingleStep(0.1) self.lineSize.valueChanged.connect(self.draw_new_plot) self.zex = QtWidgets.QDoubleSpinBox() self.zex.setValue(1) self.zex.setRange(0.1, 50) self.zex.setSingleStep(0.1) self.zex.setDecimals(1) self.zex.valueChanged.connect(self.draw_new_plot) self.linecolor = QtWidgets.QPushButton("#FF0000") self.linecolor.setStyleSheet('color: #FF0000') self.linecolor.clicked.connect(self.colorpicker) self.hb = QtWidgets.QHBoxLayout() self.hb2 = QtWidgets.QHBoxLayout() self.hb.addWidget(QtWidgets.QLabel("Select attribute:")) self.hb.addWidget(self.attrsel) self.hb.addWidget(QtWidgets.QLabel("Scale from:")) self.hb.addWidget(self.scale_min) self.hb.addWidget(QtWidgets.QLabel("Scale to:")) self.hb.addWidget(self.scale_max) self.hb.addStretch() self.hb2.addWidget(QtWidgets.QLabel("Colormap:")) self.hb2.addWidget(self.colormap) self.hb2.addWidget(QtWidgets.QLabel("Marker:")) self.hb2.addWidget(self.marker) self.hb2.addWidget(QtWidgets.QLabel("Marker size:")) self.hb2.addWidget(self.markerSize) self.hb2.addWidget(QtWidgets.QLabel("Line color:")) self.hb2.addWidget(self.linecolor) self.hb2.addWidget(QtWidgets.QLabel("Line width:")) self.hb2.addWidget(self.lineSize) self.hb2.addWidget(QtWidgets.QLabel("Z exagg.:")) self.hb2.addWidget(self.zex) self.hb2.addStretch() self.vb = QtWidgets.QVBoxLayout() self.vb.addWidget(self.mpl_canvas, 1) self.vb.addWidget(NavigationToolbar(self.mpl_canvas, ui)) self.vb.addLayout(self.hb) self.vb.addLayout(self.hb2) ui.setLayout(self.vb) ui.setMinimumSize(500,500) return ui
def setupUi(self, StereoDockWidget): StereoDockWidget.setObjectName("StereoDockWidget") StereoDockWidget.resize(434, 342) StereoDockWidget.setMinimumSize(QtCore.QSize(165, 200)) self.dockWidgetContents = QtWidgets.QWidget() self.dockWidgetContents.setObjectName("dockWidgetContents") self.groupBoxMainPath = dropedit(self.dockWidgetContents) self.groupBoxMainPath.setGeometry(QtCore.QRect(20, 10, 401, 45)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.groupBoxMainPath.setFont(font) self.groupBoxMainPath.setObjectName("groupBoxMainPath") self.importLineProject = QtWidgets.QLineEdit(self.groupBoxMainPath) self.importLineProject.setGeometry(QtCore.QRect(40, 20, 311, 20)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.importLineProject.setFont(font) self.importLineProject.setText("") self.importLineProject.setReadOnly(True) self.importLineProject.setObjectName("importLineProject") self.importToolProject = QtWidgets.QToolButton(self.groupBoxMainPath) self.importToolProject.setGeometry(QtCore.QRect(350, 20, 25, 19)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.importToolProject.setFont(font) self.importToolProject.setObjectName("importToolProject") self.toolButtonEst = QtWidgets.QToolButton(self.dockWidgetContents) self.toolButtonEst.setEnabled(False) self.toolButtonEst.setGeometry(QtCore.QRect(350, 90, 66, 23)) self.toolButtonEst.setToolButtonStyle( QtCore.Qt.ToolButtonTextBesideIcon) self.toolButtonEst.setAutoRaise(False) self.toolButtonEst.setArrowType(QtCore.Qt.RightArrow) self.toolButtonEst.setObjectName("toolButtonEst") self.toolButtonOuest = QtWidgets.QToolButton(self.dockWidgetContents) self.toolButtonOuest.setEnabled(False) self.toolButtonOuest.setGeometry(QtCore.QRect(260, 90, 81, 23)) self.toolButtonOuest.setToolButtonStyle( QtCore.Qt.ToolButtonTextBesideIcon) self.toolButtonOuest.setAutoRaise(False) self.toolButtonOuest.setArrowType(QtCore.Qt.LeftArrow) self.toolButtonOuest.setObjectName("toolButtonOuest") self.toolButtonSud = QtWidgets.QToolButton(self.dockWidgetContents) self.toolButtonSud.setEnabled(False) self.toolButtonSud.setGeometry(QtCore.QRect(310, 120, 71, 23)) self.toolButtonSud.setToolButtonStyle( QtCore.Qt.ToolButtonTextBesideIcon) self.toolButtonSud.setAutoRaise(False) self.toolButtonSud.setArrowType(QtCore.Qt.DownArrow) self.toolButtonSud.setObjectName("toolButtonSud") self.toolButtonNord = QtWidgets.QToolButton(self.dockWidgetContents) self.toolButtonNord.setEnabled(False) self.toolButtonNord.setGeometry(QtCore.QRect(300, 60, 81, 23)) self.toolButtonNord.setToolButtonStyle( QtCore.Qt.ToolButtonTextBesideIcon) self.toolButtonNord.setAutoRaise(False) self.toolButtonNord.setArrowType(QtCore.Qt.UpArrow) self.toolButtonNord.setObjectName("toolButtonNord") self.label_10 = QtWidgets.QLabel(self.dockWidgetContents) self.label_10.setGeometry(QtCore.QRect(10, 190, 111, 16)) self.label_10.setObjectName("label_10") self.pushButtonShowIDList = QtWidgets.QPushButton( self.dockWidgetContents) self.pushButtonShowIDList.setEnabled(False) self.pushButtonShowIDList.setGeometry(QtCore.QRect(290, 150, 101, 23)) self.pushButtonShowIDList.setObjectName("pushButtonShowIDList") self.enhanceButton = QtWidgets.QPushButton(self.dockWidgetContents) self.enhanceButton.setEnabled(False) self.enhanceButton.setGeometry(QtCore.QRect(30, 230, 71, 23)) self.enhanceButton.setCheckable(False) self.enhanceButton.setObjectName("enhanceButton") self.pushButtonShowPicture = QtWidgets.QPushButton( self.dockWidgetContents) self.pushButtonShowPicture.setEnabled(False) self.pushButtonShowPicture.setGeometry(QtCore.QRect(60, 270, 81, 23)) font = QtGui.QFont() font.setPointSize(8) font.setBold(False) font.setWeight(50) self.pushButtonShowPicture.setFont(font) self.pushButtonShowPicture.setObjectName("pushButtonShowPicture") self.spinBoxRecouvrementH = QtWidgets.QSpinBox(self.dockWidgetContents) self.spinBoxRecouvrementH.setGeometry(QtCore.QRect(140, 190, 51, 22)) self.spinBoxRecouvrementH.setMaximum(100) self.spinBoxRecouvrementH.setProperty("value", 40) self.spinBoxRecouvrementH.setObjectName("spinBoxRecouvrementH") self.importLineVectorLayer = QtWidgets.QLineEdit( self.dockWidgetContents) self.importLineVectorLayer.setEnabled(True) self.importLineVectorLayer.setGeometry(QtCore.QRect(70, 130, 141, 20)) font = QtGui.QFont() font.setPointSize(8) font.setBold(False) font.setWeight(50) self.importLineVectorLayer.setFont(font) self.importLineVectorLayer.setText("") self.importLineVectorLayer.setReadOnly(True) self.importLineVectorLayer.setObjectName("importLineVectorLayer") self.importToolVectorLayer = QtWidgets.QToolButton( self.dockWidgetContents) self.importToolVectorLayer.setGeometry(QtCore.QRect(210, 130, 25, 19)) font = QtGui.QFont() font.setPointSize(8) font.setBold(False) font.setWeight(50) self.importToolVectorLayer.setFont(font) self.importToolVectorLayer.setObjectName("importToolVectorLayer") self.pushButtonRemoveShape = QtWidgets.QPushButton( self.dockWidgetContents) self.pushButtonRemoveShape.setEnabled(False) self.pushButtonRemoveShape.setGeometry(QtCore.QRect(10, 160, 91, 23)) font = QtGui.QFont() font.setPointSize(8) font.setBold(False) font.setWeight(50) self.pushButtonRemoveShape.setFont(font) self.pushButtonRemoveShape.setObjectName("pushButtonRemoveShape") self.label_11 = QtWidgets.QLabel(self.dockWidgetContents) self.label_11.setGeometry(QtCore.QRect(10, 130, 71, 16)) self.label_11.setObjectName("label_11") self.groupBoxMNT = dropEventMNT(self.dockWidgetContents) self.groupBoxMNT.setGeometry(QtCore.QRect(210, 190, 201, 91)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.groupBoxMNT.setFont(font) self.groupBoxMNT.setObjectName("groupBox") self.radioButtonDraw = QtWidgets.QRadioButton(self.groupBoxMNT) self.radioButtonDraw.setEnabled(False) self.radioButtonDraw.setGeometry(QtCore.QRect(20, 60, 71, 17)) font = QtGui.QFont() font.setPointSize(8) font.setBold(False) font.setWeight(50) self.radioButtonDraw.setFont(font) self.radioButtonDraw.setChecked(True) self.radioButtonDraw.setEnabled(False) self.radioButtonDraw.setObjectName("radioButtonDraw") self.radioButtonCut = QtWidgets.QRadioButton(self.groupBoxMNT) self.radioButtonCut.setGeometry(QtCore.QRect(90, 60, 81, 17)) font = QtGui.QFont() font.setPointSize(8) font.setBold(False) font.setWeight(50) self.radioButtonCut.setFont(font) self.radioButtonCut.setEnabled(False) self.radioButtonCut.setObjectName("radioButtonCut") self.importToolMNT = QtWidgets.QToolButton(self.groupBoxMNT) self.importToolMNT.setGeometry(QtCore.QRect(170, 20, 25, 19)) font = QtGui.QFont() font.setPointSize(8) font.setBold(False) font.setWeight(50) self.importToolMNT.setFont(font) self.importToolMNT.setObjectName("importToolMNT") self.importLineMNT = QtWidgets.QLineEdit(self.groupBoxMNT) self.importLineMNT.setGeometry(QtCore.QRect(10, 20, 161, 20)) font = QtGui.QFont() font.setPointSize(8) font.setBold(False) font.setWeight(50) self.importLineMNT.setFont(font) self.importLineMNT.setText("") self.importLineMNT.setReadOnly(True) self.importLineMNT.setObjectName("importLineMNT") self.pushButtonOpenParam = QtWidgets.QPushButton( self.dockWidgetContents) self.pushButtonOpenParam.setGeometry(QtCore.QRect(110, 230, 75, 23)) self.pushButtonOpenParam.setObjectName("pushButtonOpenParam") self.labelRightName = QtWidgets.QLabel(self.dockWidgetContents) self.labelRightName.setGeometry(QtCore.QRect(110, 100, 141, 16)) self.labelRightName.setText("") self.labelRightName.setObjectName("labelRightName") self.labelLeftName = QtWidgets.QLabel(self.dockWidgetContents) self.labelLeftName.setGeometry(QtCore.QRect(110, 70, 141, 20)) self.labelLeftName.setText("") self.labelLeftName.setObjectName("labelLeftName") self.label = QtWidgets.QLabel(self.dockWidgetContents) self.label.setGeometry(QtCore.QRect(10, 70, 101, 16)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setObjectName("label") self.label_2 = QtWidgets.QLabel(self.dockWidgetContents) self.label_2.setGeometry(QtCore.QRect(10, 100, 101, 16)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_2.setFont(font) self.label_2.setObjectName("label_2") StereoDockWidget.setWidget(self.dockWidgetContents) self.retranslateUi(StereoDockWidget) QtCore.QMetaObject.connectSlotsByName(StereoDockWidget)
def setupUi(self, MainApp): MainApp.setObjectName(_fromUtf8("MainApp")) MainApp.resize(918, 332) MainApp.setLayoutDirection(QtCore.Qt.LeftToRight) self.centralWidget = QtWidgets.QWidget(MainApp) self.centralWidget.setObjectName(_fromUtf8("centralWidget")) self.gridLayout_4 = QtWidgets.QGridLayout(self.centralWidget) self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4")) self.splitter = QtWidgets.QSplitter(self.centralWidget) self.splitter.setOrientation(QtCore.Qt.Horizontal) self.splitter.setObjectName(_fromUtf8("splitter")) self.stackedWidget = QtWidgets.QStackedWidget(self.splitter) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(2) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.stackedWidget.sizePolicy().hasHeightForWidth()) self.stackedWidget.setSizePolicy(sizePolicy) self.stackedWidget.setObjectName(_fromUtf8("stackedWidget")) self.importPage = QtWidgets.QWidget() self.importPage.setObjectName(_fromUtf8("importPage")) self.gridLayout_10 = QtWidgets.QGridLayout(self.importPage) self.gridLayout_10.setObjectName(_fromUtf8("gridLayout_10")) self.scrollArea_5 = QtWidgets.QScrollArea(self.importPage) self.scrollArea_5.setWidgetResizable(True) self.scrollArea_5.setObjectName(_fromUtf8("scrollArea_5")) self.scrollAreaWidgetContents_5 = QtWidgets.QWidget() self.scrollAreaWidgetContents_5.setGeometry(QtCore.QRect(0, 0, 409, 294)) self.scrollAreaWidgetContents_5.setObjectName(_fromUtf8("scrollAreaWidgetContents_5")) self.gridLayout_11 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_5) self.gridLayout_11.setObjectName(_fromUtf8("gridLayout_11")) self.widget = QtWidgets.QWidget(self.scrollAreaWidgetContents_5) self.widget.setObjectName(_fromUtf8("widget")) self.gridLayout_17 = QtWidgets.QGridLayout(self.widget) self.gridLayout_17.setMargin(0) self.gridLayout_17.setObjectName(_fromUtf8("gridLayout_17")) self.groupBox = QtWidgets.QGroupBox(self.widget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth()) self.groupBox.setSizePolicy(sizePolicy) self.groupBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) self.groupBox.setFlat(False) self.groupBox.setCheckable(False) self.groupBox.setObjectName(_fromUtf8("groupBox")) self.horizontalLayout_6 = QtWidgets.QHBoxLayout(self.groupBox) self.horizontalLayout_6.setSpacing(6) self.horizontalLayout_6.setContentsMargins(9, 7, -1, 0) self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6")) self.rb_file = QtWidgets.QRadioButton(self.groupBox) self.rb_file.setChecked(True) self.rb_file.setObjectName(_fromUtf8("rb_file")) self.horizontalLayout_6.addWidget(self.rb_file) self.rb_directory = QtWidgets.QRadioButton(self.groupBox) self.rb_directory.setObjectName(_fromUtf8("rb_directory")) self.horizontalLayout_6.addWidget(self.rb_directory) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem) self.gridLayout_17.addWidget(self.groupBox, 0, 0, 1, 1) spacerItem1 = QtWidgets.QSpacerItem(20, 13, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_17.addItem(spacerItem1, 2, 0, 1, 1) self.gridLayout_12 = QtWidgets.QGridLayout() self.gridLayout_12.setObjectName(_fromUtf8("gridLayout_12")) self.pb_nextFile = QtWidgets.QPushButton(self.widget) self.pb_nextFile.setMinimumSize(QtCore.QSize(0, 0)) self.pb_nextFile.setMaximumSize(QtCore.QSize(27, 27)) font = QtGui.QFont() font.setPointSize(9) font.setBold(True) font.setUnderline(False) font.setWeight(75) font.setStrikeOut(False) font.setKerning(False) self.pb_nextFile.setFont(font) self.pb_nextFile.setStyleSheet(_fromUtf8("")) self.pb_nextFile.setAutoRepeat(False) self.pb_nextFile.setAutoDefault(False) self.pb_nextFile.setDefault(False) self.pb_nextFile.setFlat(False) self.pb_nextFile.setObjectName(_fromUtf8("pb_nextFile")) self.gridLayout_12.addWidget(self.pb_nextFile, 0, 2, 1, 1) self.label_2 = QtWidgets.QLabel(self.widget) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_2.setFont(font) self.label_2.setObjectName(_fromUtf8("label_2")) self.gridLayout_12.addWidget(self.label_2, 1, 0, 1, 1) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) self.vfkFileLineEdit = QtWidgets.QLineEdit(self.widget) self.vfkFileLineEdit.setObjectName(_fromUtf8("vfkFileLineEdit")) self.horizontalLayout_3.addWidget(self.vfkFileLineEdit) self.browseButton = QtWidgets.QPushButton(self.widget) self.browseButton.setObjectName(_fromUtf8("browseButton")) self.horizontalLayout_3.addWidget(self.browseButton) self.gridLayout_12.addLayout(self.horizontalLayout_3, 0, 1, 1, 1) self.budCheckBox = QtWidgets.QCheckBox(self.widget) self.budCheckBox.setChecked(True) self.budCheckBox.setObjectName(_fromUtf8("budCheckBox")) self.gridLayout_12.addWidget(self.budCheckBox, 2, 1, 1, 1) self.label = QtWidgets.QLabel(self.widget) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setObjectName(_fromUtf8("label")) self.gridLayout_12.addWidget(self.label, 0, 0, 1, 1) self.parCheckBox = QtWidgets.QCheckBox(self.widget) self.parCheckBox.setChecked(True) self.parCheckBox.setObjectName(_fromUtf8("parCheckBox")) self.gridLayout_12.addWidget(self.parCheckBox, 1, 1, 1, 1) self.l_settings = QtWidgets.QLabel(self.widget) self.l_settings.setMinimumSize(QtCore.QSize(69, 0)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.l_settings.setFont(font) self.l_settings.setObjectName(_fromUtf8("l_settings")) self.gridLayout_12.addWidget(self.l_settings, 3, 0, 1, 1) self.overwriteCheckBox = QtWidgets.QCheckBox(self.widget) self.overwriteCheckBox.setChecked(False) self.overwriteCheckBox.setObjectName(_fromUtf8("overwriteCheckBox")) self.gridLayout_12.addWidget(self.overwriteCheckBox, 3, 1, 1, 1) self.gridLayout_17.addLayout(self.gridLayout_12, 1, 0, 1, 1) self.labelLoading = QtWidgets.QLabel(self.widget) self.labelLoading.setText(_fromUtf8("")) self.labelLoading.setObjectName(_fromUtf8("labelLoading")) self.gridLayout_17.addWidget(self.labelLoading, 3, 0, 1, 1) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.progressBar = QtWidgets.QProgressBar(self.widget) self.progressBar.setProperty("value", 0) self.progressBar.setObjectName(_fromUtf8("progressBar")) self.horizontalLayout_2.addWidget(self.progressBar) self.loadVfkButton = QtWidgets.QPushButton(self.widget) self.loadVfkButton.setObjectName(_fromUtf8("loadVfkButton")) self.horizontalLayout_2.addWidget(self.loadVfkButton) self.gridLayout_17.addLayout(self.horizontalLayout_2, 4, 0, 1, 1) self.gridLayout_11.addWidget(self.widget, 1, 0, 1, 1) self.scrollArea_5.setWidget(self.scrollAreaWidgetContents_5) self.gridLayout_10.addWidget(self.scrollArea_5, 0, 0, 1, 1) self.stackedWidget.addWidget(self.importPage) self.changesPage = QtWidgets.QWidget() self.changesPage.setObjectName(_fromUtf8("changesPage")) self.gridLayout_15 = QtWidgets.QGridLayout(self.changesPage) self.gridLayout_15.setObjectName(_fromUtf8("gridLayout_15")) self.scrollArea_6 = QtWidgets.QScrollArea(self.changesPage) self.scrollArea_6.setWidgetResizable(True) self.scrollArea_6.setObjectName(_fromUtf8("scrollArea_6")) self.scrollAreaWidgetContents_6 = QtWidgets.QWidget() self.scrollAreaWidgetContents_6.setGeometry(QtCore.QRect(0, 0, 269, 194)) self.scrollAreaWidgetContents_6.setObjectName(_fromUtf8("scrollAreaWidgetContents_6")) self.gridLayout_16 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_6) self.gridLayout_16.setObjectName(_fromUtf8("gridLayout_16")) self.widget_3 = QtWidgets.QWidget(self.scrollAreaWidgetContents_6) self.widget_3.setObjectName(_fromUtf8("widget_3")) self.gridLayout_14 = QtWidgets.QGridLayout(self.widget_3) self.gridLayout_14.setMargin(0) self.gridLayout_14.setObjectName(_fromUtf8("gridLayout_14")) self.gridLayout_13 = QtWidgets.QGridLayout() self.gridLayout_13.setObjectName(_fromUtf8("gridLayout_13")) self.label_4 = QtWidgets.QLabel(self.widget_3) self.label_4.setObjectName(_fromUtf8("label_4")) self.gridLayout_13.addWidget(self.label_4, 0, 0, 1, 1) self.le_mainDb = QtWidgets.QLineEdit(self.widget_3) self.le_mainDb.setObjectName(_fromUtf8("le_mainDb")) self.gridLayout_13.addWidget(self.le_mainDb, 0, 1, 1, 1) self.pb_mainDb = QtWidgets.QPushButton(self.widget_3) self.pb_mainDb.setObjectName(_fromUtf8("pb_mainDb")) self.gridLayout_13.addWidget(self.pb_mainDb, 0, 2, 1, 1) self.label_5 = QtWidgets.QLabel(self.widget_3) self.label_5.setObjectName(_fromUtf8("label_5")) self.gridLayout_13.addWidget(self.label_5, 1, 0, 1, 1) self.le_amendmentDb = QtWidgets.QLineEdit(self.widget_3) self.le_amendmentDb.setObjectName(_fromUtf8("le_amendmentDb")) self.gridLayout_13.addWidget(self.le_amendmentDb, 1, 1, 1, 1) self.pb_amendmentDb = QtWidgets.QPushButton(self.widget_3) self.pb_amendmentDb.setObjectName(_fromUtf8("pb_amendmentDb")) self.gridLayout_13.addWidget(self.pb_amendmentDb, 1, 2, 1, 1) self.label_6 = QtWidgets.QLabel(self.widget_3) self.label_6.setObjectName(_fromUtf8("label_6")) self.gridLayout_13.addWidget(self.label_6, 2, 0, 1, 1) self.le_exportDb = QtWidgets.QLineEdit(self.widget_3) self.le_exportDb.setObjectName(_fromUtf8("le_exportDb")) self.gridLayout_13.addWidget(self.le_exportDb, 2, 1, 1, 1) self.pb_exportDb = QtWidgets.QPushButton(self.widget_3) self.pb_exportDb.setObjectName(_fromUtf8("pb_exportDb")) self.gridLayout_13.addWidget(self.pb_exportDb, 2, 2, 1, 1) self.gridLayout_14.addLayout(self.gridLayout_13, 0, 0, 1, 1) spacerItem2 = QtWidgets.QSpacerItem(20, 38, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_14.addItem(spacerItem2, 1, 0, 1, 1) self.l_status = QtWidgets.QLabel(self.widget_3) self.l_status.setText(_fromUtf8("")) self.l_status.setObjectName(_fromUtf8("l_status")) self.gridLayout_14.addWidget(self.l_status, 2, 0, 1, 1) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5")) self.progressBar_Changes = QtWidgets.QProgressBar(self.widget_3) self.progressBar_Changes.setProperty("value", 0) self.progressBar_Changes.setObjectName(_fromUtf8("progressBar_Changes")) self.horizontalLayout_5.addWidget(self.progressBar_Changes) self.pb_applyChanges = QtWidgets.QPushButton(self.widget_3) self.pb_applyChanges.setObjectName(_fromUtf8("pb_applyChanges")) self.horizontalLayout_5.addWidget(self.pb_applyChanges) self.gridLayout_14.addLayout(self.horizontalLayout_5, 3, 0, 1, 1) self.gridLayout_16.addWidget(self.widget_3, 0, 0, 1, 1) self.scrollArea_6.setWidget(self.scrollAreaWidgetContents_6) self.gridLayout_15.addWidget(self.scrollArea_6, 0, 0, 1, 1) self.stackedWidget.addWidget(self.changesPage) self.searchPage = QtWidgets.QWidget() sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.searchPage.sizePolicy().hasHeightForWidth()) self.searchPage.setSizePolicy(sizePolicy) self.searchPage.setObjectName(_fromUtf8("searchPage")) self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.searchPage) self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) self.label_3 = QtWidgets.QLabel(self.searchPage) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth()) self.label_3.setSizePolicy(sizePolicy) self.label_3.setObjectName(_fromUtf8("label_3")) self.horizontalLayout_4.addWidget(self.label_3) self.searchCombo = QtWidgets.QComboBox(self.searchPage) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.searchCombo.sizePolicy().hasHeightForWidth()) self.searchCombo.setSizePolicy(sizePolicy) self.searchCombo.setObjectName(_fromUtf8("searchCombo")) self.horizontalLayout_4.addWidget(self.searchCombo) self.verticalLayout_3.addLayout(self.horizontalLayout_4) self.searchForms = QtWidgets.QStackedWidget(self.searchPage) self.searchForms.setObjectName(_fromUtf8("searchForms")) self.page = QtWidgets.QWidget() self.page.setObjectName(_fromUtf8("page")) self.gridLayout = QtWidgets.QGridLayout(self.page) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.scrollArea = QtWidgets.QScrollArea(self.page) self.scrollArea.setWidgetResizable(True) self.scrollArea.setObjectName(_fromUtf8("scrollArea")) self.scrollAreaWidgetContents = QtWidgets.QWidget() self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 48, 28)) self.scrollAreaWidgetContents.setObjectName(_fromUtf8("scrollAreaWidgetContents")) self.gridLayout_5 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents) self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5")) self.vlastniciSearchForm = VlastniciSearchForm(self.scrollAreaWidgetContents) self.vlastniciSearchForm.setObjectName(_fromUtf8("vlastniciSearchForm")) self.gridLayout_5.addWidget(self.vlastniciSearchForm, 0, 0, 1, 1) self.scrollArea.setWidget(self.scrollAreaWidgetContents) self.gridLayout.addWidget(self.scrollArea, 0, 0, 1, 1) self.searchForms.addWidget(self.page) self.page_2 = QtWidgets.QWidget() self.page_2.setObjectName(_fromUtf8("page_2")) self.gridLayout_6 = QtWidgets.QGridLayout(self.page_2) self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6")) self.scrollArea_3 = QtWidgets.QScrollArea(self.page_2) self.scrollArea_3.setWidgetResizable(True) self.scrollArea_3.setObjectName(_fromUtf8("scrollArea_3")) self.scrollAreaWidgetContents_2 = QtWidgets.QWidget() self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, 0, 66, 28)) self.scrollAreaWidgetContents_2.setObjectName(_fromUtf8("scrollAreaWidgetContents_2")) self.gridLayout_7 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_2) self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7")) self.parcelySearchForm = ParcelySearchForm(self.scrollAreaWidgetContents_2) self.parcelySearchForm.setObjectName(_fromUtf8("parcelySearchForm")) self.gridLayout_7.addWidget(self.parcelySearchForm, 0, 0, 1, 1) self.scrollArea_3.setWidget(self.scrollAreaWidgetContents_2) self.gridLayout_6.addWidget(self.scrollArea_3, 0, 0, 1, 1) self.searchForms.addWidget(self.page_2) self.page_3 = QtWidgets.QWidget() self.page_3.setObjectName(_fromUtf8("page_3")) self.gridLayout_2 = QtWidgets.QGridLayout(self.page_3) self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) self.scrollArea_2 = QtWidgets.QScrollArea(self.page_3) self.scrollArea_2.setWidgetResizable(True) self.scrollArea_2.setObjectName(_fromUtf8("scrollArea_2")) self.scrollAreaWidgetContents_3 = QtWidgets.QWidget() self.scrollAreaWidgetContents_3.setGeometry(QtCore.QRect(0, 0, 66, 28)) self.scrollAreaWidgetContents_3.setObjectName(_fromUtf8("scrollAreaWidgetContents_3")) self.gridLayout_3 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_3) self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3")) self.budovySearchForm = BudovySearchForm(self.scrollAreaWidgetContents_3) self.budovySearchForm.setObjectName(_fromUtf8("budovySearchForm")) self.gridLayout_3.addWidget(self.budovySearchForm, 0, 0, 1, 1) self.scrollArea_2.setWidget(self.scrollAreaWidgetContents_3) self.gridLayout_2.addWidget(self.scrollArea_2, 0, 0, 1, 1) self.searchForms.addWidget(self.page_3) self.page_4 = QtWidgets.QWidget() self.page_4.setObjectName(_fromUtf8("page_4")) self.gridLayout_8 = QtWidgets.QGridLayout(self.page_4) self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8")) self.scrollArea_4 = QtWidgets.QScrollArea(self.page_4) self.scrollArea_4.setWidgetResizable(True) self.scrollArea_4.setObjectName(_fromUtf8("scrollArea_4")) self.scrollAreaWidgetContents_4 = QtWidgets.QWidget() self.scrollAreaWidgetContents_4.setGeometry(QtCore.QRect(0, 0, 66, 28)) self.scrollAreaWidgetContents_4.setObjectName(_fromUtf8("scrollAreaWidgetContents_4")) self.gridLayout_9 = QtWidgets.QGridLayout(self.scrollAreaWidgetContents_4) self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9")) self.jednotkySearchForm = JednotkySearchForm(self.scrollAreaWidgetContents_4) self.jednotkySearchForm.setObjectName(_fromUtf8("jednotkySearchForm")) self.gridLayout_9.addWidget(self.jednotkySearchForm, 0, 0, 1, 1) self.scrollArea_4.setWidget(self.scrollAreaWidgetContents_4) self.gridLayout_8.addWidget(self.scrollArea_4, 0, 0, 1, 1) self.searchForms.addWidget(self.page_4) self.verticalLayout_3.addWidget(self.searchForms) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem3) self.searchButton = QtWidgets.QPushButton(self.searchPage) self.searchButton.setObjectName(_fromUtf8("searchButton")) self.horizontalLayout.addWidget(self.searchButton) self.verticalLayout_3.addLayout(self.horizontalLayout) self.stackedWidget.addWidget(self.searchPage) self.widget_2 = QtWidgets.QWidget(self.splitter) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(3) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.widget_2.sizePolicy().hasHeightForWidth()) self.widget_2.setSizePolicy(sizePolicy) self.widget_2.setObjectName(_fromUtf8("widget_2")) self.rightWidgetLayout = QtWidgets.QVBoxLayout(self.widget_2) self.rightWidgetLayout.setMargin(0) self.rightWidgetLayout.setObjectName(_fromUtf8("rightWidgetLayout")) self.vfkBrowser = VfkTextBrowser(self.widget_2) self.vfkBrowser.setObjectName(_fromUtf8("vfkBrowser")) self.rightWidgetLayout.addWidget(self.vfkBrowser) self.gridLayout_4.addWidget(self.splitter, 0, 1, 1, 1) MainApp.setWidget(self.centralWidget) self.actionVyhledavani = QtWidgets.QAction(MainApp) self.actionVyhledavani.setCheckable(True) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/search.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.actionVyhledavani.setIcon(icon) self.actionVyhledavani.setObjectName(_fromUtf8("actionVyhledavani")) self.actionImport = QtWidgets.QAction(MainApp) self.actionImport.setCheckable(True) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/db-add.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.actionImport.setIcon(icon1) self.actionImport.setObjectName(_fromUtf8("actionImport")) self.actionBack = QtWidgets.QAction(MainApp) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/arrowBack.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.actionBack.setIcon(icon2) self.actionBack.setObjectName(_fromUtf8("actionBack")) self.actionForward = QtWidgets.QAction(MainApp) self.actionForward.setEnabled(True) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/arrowForward.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.actionForward.setIcon(icon3) self.actionForward.setObjectName(_fromUtf8("actionForward")) self.actionExportLatex = QtWidgets.QAction(MainApp) self.actionExportLatex.setObjectName(_fromUtf8("actionExportLatex")) self.actionExportHtml = QtWidgets.QAction(MainApp) self.actionExportHtml.setObjectName(_fromUtf8("actionExportHtml")) self.actionSelectParInMap = QtWidgets.QAction(MainApp) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/selectPar.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.actionSelectParInMap.setIcon(icon4) self.actionSelectParInMap.setObjectName(_fromUtf8("actionSelectParInMap")) self.actionSelectBudInMap = QtWidgets.QAction(MainApp) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(_fromUtf8(":/selectBud.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.actionSelectBudInMap.setIcon(icon5) self.actionSelectBudInMap.setObjectName(_fromUtf8("actionSelectBudInMap")) self.actionCuzkPage = QtWidgets.QAction(MainApp) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(_fromUtf8(":/cuzk.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.actionCuzkPage.setIcon(icon6) self.actionCuzkPage.setObjectName(_fromUtf8("actionCuzkPage")) self.actionShowInfoaboutSelection = QtWidgets.QAction(MainApp) self.actionShowInfoaboutSelection.setCheckable(True) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(_fromUtf8(":/showInfo.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.actionShowInfoaboutSelection.setIcon(icon7) self.actionShowInfoaboutSelection.setObjectName(_fromUtf8("actionShowInfoaboutSelection")) self.actionShowHelpPage = QtWidgets.QAction(MainApp) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap(_fromUtf8(":/vfkPlugin.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.actionShowHelpPage.setIcon(icon8) self.actionShowHelpPage.setObjectName(_fromUtf8("actionShowHelpPage")) self.actionZpracujZmeny = QtWidgets.QAction(MainApp) self.actionZpracujZmeny.setCheckable(True) icon9 = QtGui.QIcon() icon9.addPixmap(QtGui.QPixmap(_fromUtf8(":/applyChanges.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.actionZpracujZmeny.setIcon(icon9) self.actionZpracujZmeny.setObjectName(_fromUtf8("actionZpracujZmeny")) self.retranslateUi(MainApp) self.stackedWidget.setCurrentIndex(0) self.searchForms.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainApp)
def setupUi(self): self.resize(550, 550) self.setWindowTitle('Settings') #create tabWidget that holds the tabs self.tabWidget = QtGui.QTabWidget(self) self.tabWidget.setGeometry(QRect(10, 20, 500, 480)) self.tabWidget.setObjectName('tabWidget') tab0labels = [['Name', (50, 50, 56, 17)],['Layer Opacity',(50,100,80,25)], ['Hover Template', (50, 150, 120, 17)]] tab1labels = [['Until now "Metadata" has to be edited in the shogun2-webapp', (50, 50, 300, 17)]] tab2labels = [['explanation', (50, 50, 400, 200)]] tab3labels = [['Users', (100, 10, 50, 20)], ['Groups', (320, 10, 50, 20)]] tabwidgets = [['General', tab0labels], ['Metadata', tab1labels], ['Style', tab2labels], ['Permissions', tab3labels]] expl = 'To edit the style of layer in shogun, first add the layer to QGIS.\n' expl += 'Then style the layer via the QGIS layer properties.\nWhen finished, ' expl += 'you can upload the current layer style \nto this layer in Shogun by ' expl += 'right-clicking it in \nthe Shogun Editor menu' #first set the labes for all tabwwidgets in a loop: for tab in tabwidgets: t = QtGui.QWidget() t.setObjectName(tab[0]) self.tabs.append(t) self.tabWidget.addTab(t, tab[0]) for label in tab[1]: l = QtGui.QLabel(t) l.setGeometry(QRect(label[1][0],label[1][1],label[1][2],label[1][3])) if label[0] == 'explanation': l.setText(expl) l.setAlignment(Qt.AlignTop) else: l.setText(label[0]) self.tabWidget.setCurrentIndex(0) #then populate the specific tabwidgets with other QObjects: #tab 0 = 'General': self.nameEdit = QtGui.QLineEdit(self.tabs[0]) self.nameEdit.setGeometry(QRect(180, 40, 113, 27)) self.tabedits.append(self.nameEdit) self.sliderEdit = QtGui.QLineEdit(self.tabs[0]) self.sliderEdit.setGeometry(QRect(400, 90, 30, 23)) self.sliderEdit.setInputMask('9.99') if sys.version_info[0] >= 3: validator = QDoubleValidator(-0.01, 1.01, 2) else: validator = QtGui.QDoubleValidator(-0.01, 1.01, 2) self.sliderEdit.setValidator(validator) self.tabedits.append(self.sliderEdit) self.hoverEdit = QtGui.QLineEdit(self.tabs[0]) self.hoverEdit.setGeometry(QRect(180, 140, 113,27)) self.tabedits.append(self.hoverEdit) self.hoverBox = QtGui.QComboBox(self.tabs[0]) self.hoverBox.setGeometry(QRect(320, 140, 80, 27)) self.tabedits.append(self.hoverBox) self.hoverAddButton = QtGui.QPushButton(self.tabs[0]) self.hoverAddButton.setGeometry(QRect(410, 140, 30, 27)) self.hoverAddButton.setText('Add') self.tabedits.append(self.hoverAddButton) self.slider = QtGui.QSlider(self.tabs[0]) self.slider.setGeometry(QRect(180, 90, 160, 18)) self.slider.setOrientation(Qt.Horizontal) self.slider.setMaximum(100) self.slider.setMinimum(-1) self.slider.setEnabled(False) self.moreObjects.append(self.slider) self.slider.valueChanged.connect(lambda: self.sliderEdit.setText(str(float(self.slider.value())/100))) self.sliderEdit.textEdited.connect(lambda: self.slider.setValue(int(float(self.sliderEdit.text())*100))) self.hoverAddButton.clicked.connect(self.addHoverAttribute) #tab 3 = 'Permissions': self.usertabel = QtGui.QTableWidget(self.tabs[3]) self.usertabel.setGeometry(QRect(10, 30, 230, 300)) self.usertabel.setColumnCount(3) self.usertabel.setHorizontalHeaderLabels(['Read', 'Update', 'Delete']) self.moreObjects.append(self.usertabel) self.groupstabel = QtGui.QTableWidget(self.tabs[3]) self.groupstabel.setGeometry(QRect(250, 30, 230, 300)) self.groupstabel.setColumnCount(3) self.groupstabel.setHorizontalHeaderLabels(['Read', 'Update', 'Delete']) self.moreObjects.append(self.groupstabel) #create Gui surrounding the tabs self.editCheckBox = QtGui.QCheckBox(self) self.editCheckBox.setGeometry(QRect(420, 10, 50, 17)) self.editCheckBox.setText('Edit') self.pushButtonOk = QtGui.QPushButton(self) self.pushButtonOk.setGeometry(QRect(420, 500, 85, 27)) self.pushButtonCancel = QtGui.QPushButton(self) self.pushButtonCancel.setGeometry(QRect(320, 500, 85, 27)) self.pushButtonCancel.setText('Cancel')
def setupUi(self, editParamWindow): editParamWindow.setObjectName("editParamWindow") editParamWindow.resize(428, 492) self.centralwidget = QtWidgets.QWidget(editParamWindow) self.centralwidget.setObjectName("centralwidget") self.groupBoxPen = QtWidgets.QGroupBox(self.centralwidget) self.groupBoxPen.setGeometry(QtCore.QRect(210, 50, 181, 161)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.groupBoxPen.setFont(font) self.groupBoxPen.setObjectName("groupBoxPen") self.comboBoxColor = QtWidgets.QComboBox(self.groupBoxPen) self.comboBoxColor.setGeometry(QtCore.QRect(100, 20, 69, 22)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.comboBoxColor.setFont(font) self.comboBoxColor.setObjectName("comboBoxColor") self.comboBoxColor.addItem("") self.comboBoxColor.addItem("") self.comboBoxColor.addItem("") self.comboBoxColor.addItem("") self.comboBoxColor.addItem("") self.comboBoxColor.addItem("") self.spinBoxPenWidth = QtWidgets.QSpinBox(self.groupBoxPen) self.spinBoxPenWidth.setGeometry(QtCore.QRect(130, 50, 42, 22)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.spinBoxPenWidth.setFont(font) self.spinBoxPenWidth.setMinimum(1) self.spinBoxPenWidth.setMaximum(15) self.spinBoxPenWidth.setProperty("value", 4) self.spinBoxPenWidth.setObjectName("spinBoxPenWidth") self.label_3 = QtWidgets.QLabel(self.groupBoxPen) self.label_3.setGeometry(QtCore.QRect(20, 20, 51, 16)) self.label_3.setObjectName("label_3") self.label_5 = QtWidgets.QLabel(self.groupBoxPen) self.label_5.setGeometry(QtCore.QRect(20, 50, 101, 16)) self.label_5.setObjectName("label_5") self.label = QtWidgets.QLabel(self.groupBoxPen) self.label.setGeometry(QtCore.QRect(20, 80, 101, 16)) self.label.setObjectName("label") self.spinBoxAltitude = QtWidgets.QSpinBox(self.groupBoxPen) self.spinBoxAltitude.setGeometry(QtCore.QRect(130, 80, 42, 22)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.spinBoxAltitude.setFont(font) self.spinBoxAltitude.setObjectName("spinBoxAltitude") self.spinBoxAltitude.setSingleStep(5) self.radioButtonMerge = QtWidgets.QRadioButton(self.groupBoxPen) self.radioButtonMerge.setEnabled(True) self.radioButtonMerge.setGeometry(QtCore.QRect(20, 110, 121, 17)) font = QtGui.QFont() font.setPointSize(8) font.setBold(True) font.setWeight(75) self.radioButtonMerge.setFont(font) self.radioButtonMerge.setChecked(True) self.radioButtonMerge.setObjectName("radioButtonMerge") self.radioButtonAuto = QtWidgets.QRadioButton(self.groupBoxPen) self.radioButtonAuto.setGeometry(QtCore.QRect(20, 130, 131, 17)) font = QtGui.QFont() font.setPointSize(8) font.setBold(True) font.setWeight(75) self.radioButtonAuto.setFont(font) self.radioButtonAuto.setObjectName("radioButtonAuto") self.groupBoxScreen = QtWidgets.QGroupBox(self.centralwidget) self.groupBoxScreen.setGeometry(QtCore.QRect(30, 20, 171, 81)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.groupBoxScreen.setFont(font) self.groupBoxScreen.setObjectName("groupBoxScreen") self.label_8 = QtWidgets.QLabel(self.groupBoxScreen) self.label_8.setGeometry(QtCore.QRect(20, 20, 51, 16)) self.label_8.setObjectName("label_8") self.label_9 = QtWidgets.QLabel(self.groupBoxScreen) self.label_9.setGeometry(QtCore.QRect(20, 50, 47, 13)) self.label_9.setObjectName("label_9") self.spinBoxScreenLeft = QtWidgets.QSpinBox(self.groupBoxScreen) self.spinBoxScreenLeft.setGeometry(QtCore.QRect(120, 20, 42, 22)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.spinBoxScreenLeft.setFont(font) self.spinBoxScreenLeft.setMaximum(10) self.spinBoxScreenLeft.setObjectName("spinBoxScreenLeft") self.spinBoxScreenRight = QtWidgets.QSpinBox(self.groupBoxScreen) self.spinBoxScreenRight.setGeometry(QtCore.QRect(120, 50, 42, 22)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.spinBoxScreenRight.setFont(font) self.spinBoxScreenRight.setMaximum(10) self.spinBoxScreenRight.setObjectName("spinBoxScreenRight") self.groupBox = QtWidgets.QGroupBox(self.centralwidget) self.groupBox.setGeometry(QtCore.QRect(30, 250, 341, 151)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.groupBox.setFont(font) self.groupBox.setObjectName("groupBox") self.lineEditZoom = QtWidgets.QLineEdit(self.groupBox) self.lineEditZoom.setGeometry(QtCore.QRect(180, 20, 61, 20)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.lineEditZoom.setFont(font) self.lineEditZoom.setReadOnly(True) self.lineEditZoom.setObjectName("lineEditZoom") self.lineEditMoveLong = QtWidgets.QLineEdit(self.groupBox) self.lineEditMoveLong.setGeometry(QtCore.QRect(180, 50, 61, 20)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.lineEditMoveLong.setFont(font) self.lineEditMoveLong.setReadOnly(True) self.lineEditMoveLong.setObjectName("lineEditMoveLong") self.lineEditMovePoly = QtWidgets.QLineEdit(self.groupBox) self.lineEditMovePoly.setGeometry(QtCore.QRect(180, 80, 61, 20)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.lineEditMovePoly.setFont(font) self.lineEditMovePoly.setReadOnly(True) self.lineEditMovePoly.setObjectName("lineEditMovePoly") self.lineEditDrawCut = QtWidgets.QLineEdit(self.groupBox) self.lineEditDrawCut.setGeometry(QtCore.QRect(180, 110, 61, 20)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.lineEditDrawCut.setFont(font) self.lineEditDrawCut.setReadOnly(True) self.lineEditDrawCut.setObjectName("lineEditDrawCut") self.label_2 = QtWidgets.QLabel(self.groupBox) self.label_2.setGeometry(QtCore.QRect(10, 20, 47, 13)) self.label_2.setObjectName("label_2") self.label_4 = QtWidgets.QLabel(self.groupBox) self.label_4.setGeometry(QtCore.QRect(10, 50, 151, 16)) self.label_4.setObjectName("label_4") self.label_10 = QtWidgets.QLabel(self.groupBox) self.label_10.setGeometry(QtCore.QRect(10, 80, 151, 16)) self.label_10.setObjectName("label_10") self.label_11 = QtWidgets.QLabel(self.groupBox) self.label_11.setGeometry(QtCore.QRect(10, 110, 171, 16)) self.label_11.setObjectName("label_11") self.toolButtonEditZoom = QtWidgets.QToolButton(self.groupBox) self.toolButtonEditZoom.setGeometry(QtCore.QRect(260, 20, 51, 19)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.toolButtonEditZoom.setFont(font) self.toolButtonEditZoom.setCheckable(True) self.toolButtonEditZoom.setObjectName("toolButtonEditZoom") self.toolButtonEditLong = QtWidgets.QToolButton(self.groupBox) self.toolButtonEditLong.setGeometry(QtCore.QRect(260, 50, 51, 19)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.toolButtonEditLong.setFont(font) self.toolButtonEditLong.setCheckable(True) self.toolButtonEditLong.setObjectName("toolButtonEditLong") self.toolButtonEditPoly = QtWidgets.QToolButton(self.groupBox) self.toolButtonEditPoly.setGeometry(QtCore.QRect(260, 80, 51, 19)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.toolButtonEditPoly.setFont(font) self.toolButtonEditPoly.setCheckable(True) self.toolButtonEditPoly.setObjectName("toolButtonEditPoly") self.toolButtonDrawCut = QtWidgets.QToolButton(self.groupBox) self.toolButtonDrawCut.setGeometry(QtCore.QRect(260, 110, 51, 19)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.toolButtonDrawCut.setFont(font) self.toolButtonDrawCut.setCheckable(True) self.toolButtonDrawCut.setObjectName("toolButtonDrawCut") self.groupBoxMoveLine = QtWidgets.QGroupBox(self.centralwidget) self.groupBoxMoveLine.setGeometry(QtCore.QRect(30, 110, 171, 121)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.groupBoxMoveLine.setFont(font) self.groupBoxMoveLine.setObjectName("groupBoxMoveLine") self.spinBoxMoveInY = QtWidgets.QSpinBox(self.groupBoxMoveLine) self.spinBoxMoveInY.setGeometry(QtCore.QRect(90, 90, 51, 22)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.spinBoxMoveInY.setFont(font) self.spinBoxMoveInY.setObjectName("spinBoxMoveInY") self.spinBoxMoveInX = QtWidgets.QSpinBox(self.groupBoxMoveLine) self.spinBoxMoveInX.setGeometry(QtCore.QRect(90, 60, 51, 22)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.spinBoxMoveInX.setFont(font) self.spinBoxMoveInX.setProperty("value", 5) self.spinBoxMoveInX.setObjectName("spinBoxMoveInX") self.checkBoxMoveLeft = QtWidgets.QCheckBox(self.groupBoxMoveLine) self.checkBoxMoveLeft.setGeometry(QtCore.QRect(10, 30, 61, 18)) self.checkBoxMoveLeft.setChecked(True) self.checkBoxMoveLeft.setObjectName("checkBoxMoveLeft") self.checkBoxMoveRight = QtWidgets.QCheckBox(self.groupBoxMoveLine) self.checkBoxMoveRight.setGeometry(QtCore.QRect(80, 30, 61, 18)) self.checkBoxMoveRight.setChecked(True) self.checkBoxMoveRight.setObjectName("checkBoxMoveRight") self.label_16 = QtWidgets.QLabel(self.groupBoxMoveLine) self.label_16.setGeometry(QtCore.QRect(5, 60, 81, 16)) self.label_16.setObjectName("label_16") self.label_17 = QtWidgets.QLabel(self.groupBoxMoveLine) self.label_17.setGeometry(QtCore.QRect(10, 90, 71, 16)) self.label_17.setObjectName("label_17") self.pushButtonCancel = QtWidgets.QPushButton(self.centralwidget) self.pushButtonCancel.setGeometry(QtCore.QRect(320, 420, 75, 23)) self.pushButtonCancel.setObjectName("pushButtonCancel") self.pushButtonAccept = QtWidgets.QPushButton(self.centralwidget) self.pushButtonAccept.setGeometry(QtCore.QRect(240, 420, 75, 23)) self.pushButtonAccept.setObjectName("pushButtonAccept") editParamWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(editParamWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 428, 21)) self.menubar.setObjectName("menubar") editParamWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(editParamWindow) self.statusbar.setObjectName("statusbar") editParamWindow.setStatusBar(self.statusbar) self.retranslateUi(editParamWindow) QtCore.QMetaObject.connectSlotsByName(editParamWindow)
def setupUi(self, Refresh): Refresh.setObjectName(_fromUtf8("Refresh")) Refresh.resize(493, 249) self.gridLayout = QtWidgets.QGridLayout(Refresh) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.buttonBox = QtWidgets.QDialogButtonBox(Refresh) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close) self.buttonBox.setObjectName(_fromUtf8("buttonBox")) self.gridLayout.addWidget(self.buttonBox, 11, 0, 1, 1) spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout.addItem(spacerItem, 10, 0, 1, 1) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.unevaluatedCheckBox = QtWidgets.QCheckBox(Refresh) self.unevaluatedCheckBox.setObjectName( _fromUtf8("unevaluatedCheckBox")) self.horizontalLayout.addWidget(self.unevaluatedCheckBox) self.unevalutedDaysSpinBox = QtWidgets.QSpinBox(Refresh) self.unevalutedDaysSpinBox.setMinimum(1) self.unevalutedDaysSpinBox.setMaximum(9999) self.unevalutedDaysSpinBox.setProperty("value", 10) self.unevalutedDaysSpinBox.setObjectName( _fromUtf8("unevalutedDaysSpinBox")) self.horizontalLayout.addWidget(self.unevalutedDaysSpinBox) self.label_2 = QtWidgets.QLabel(Refresh) self.label_2.setObjectName(_fromUtf8("label_2")) self.horizontalLayout.addWidget(self.label_2) self.gridLayout.addLayout(self.horizontalLayout, 4, 0, 1, 1) self.deletedLayersCheckBox = QtWidgets.QCheckBox(Refresh) self.deletedLayersCheckBox.setChecked(True) self.deletedLayersCheckBox.setObjectName( _fromUtf8("deletedLayersCheckBox")) self.gridLayout.addWidget(self.deletedLayersCheckBox, 5, 0, 1, 1) self.unrecordedCheckBox = QtWidgets.QCheckBox(Refresh) self.unrecordedCheckBox.setObjectName(_fromUtf8("unrecordedCheckBox")) self.gridLayout.addWidget(self.unrecordedCheckBox, 2, 0, 1, 1) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem1) self.cancelButton = QtWidgets.QPushButton(Refresh) self.cancelButton.setObjectName(_fromUtf8("cancelButton")) self.horizontalLayout_3.addWidget(self.cancelButton) self.refreshButton = QtWidgets.QPushButton(Refresh) self.refreshButton.setObjectName(_fromUtf8("refreshButton")) self.horizontalLayout_3.addWidget(self.refreshButton) spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem2) self.gridLayout.addLayout(self.horizontalLayout_3, 7, 0, 1, 1) self.progressBar = QtWidgets.QProgressBar(Refresh) self.progressBar.setProperty("value", 24) self.progressBar.setObjectName(_fromUtf8("progressBar")) self.gridLayout.addWidget(self.progressBar, 9, 0, 1, 1) spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout.addItem(spacerItem3, 6, 0, 1, 1) self.selectionWidget = QtWidgets.QWidget(Refresh) self.selectionWidget.setObjectName(_fromUtf8("selectionWidget")) self.selectionLayout = QtWidgets.QHBoxLayout(self.selectionWidget) self.selectionLayout.setMargin(0) self.selectionLayout.setObjectName(_fromUtf8("selectionLayout")) self.label = QtWidgets.QLabel(self.selectionWidget) self.label.setObjectName(_fromUtf8("label")) self.selectionLayout.addWidget(self.label) self.selectionComboBox = QtWidgets.QComboBox(self.selectionWidget) self.selectionComboBox.setSizeAdjustPolicy( QtWidgets.QComboBox.AdjustToContents) self.selectionComboBox.setObjectName(_fromUtf8("selectionComboBox")) self.selectionComboBox.addItem(_fromUtf8("")) self.selectionComboBox.addItem(_fromUtf8("")) self.selectionLayout.addWidget(self.selectionComboBox) spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.selectionLayout.addItem(spacerItem4) self.gridLayout.addWidget(self.selectionWidget, 1, 0, 1, 1) self.retranslateUi(Refresh) # QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Refresh.accept) # QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Refresh.reject) self.buttonBox.accepted.connect(Refresh.accept) self.buttonBox.rejected.connect(Refresh.reject) QtCore.QMetaObject.connectSlotsByName(Refresh)
def setupUi(self, Dialog): Dialog.setObjectName(_fromUtf8("Dialog")) Dialog.setEnabled(True) Dialog.resize(627, 490) Dialog.setFocusPolicy(QtCore.Qt.NoFocus) Dialog.setContextMenuPolicy(QtCore.Qt.NoContextMenu) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/tableManager/icons/tableManagerIcon.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) Dialog.setWindowIcon(icon) Dialog.setSizeGripEnabled(True) self.verticalLayout = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.tabWidget = QtWidgets.QTabWidget(Dialog) self.tabWidget.setMinimumSize(QtCore.QSize(0, 0)) self.tabWidget.setAutoFillBackground(True) self.tabWidget.setTabShape(QtWidgets.QTabWidget.Rounded) self.tabWidget.setElideMode(QtCore.Qt.ElideNone) self.tabWidget.setUsesScrollButtons(False) self.tabWidget.setObjectName(_fromUtf8("tabWidget")) self.tab_1 = QtWidgets.QWidget() self.tab_1.setObjectName(_fromUtf8("tab_1")) self.gridlayout = QtWidgets.QGridLayout(self.tab_1) self.gridlayout.setObjectName(_fromUtf8("gridlayout")) self.fieldsTable = QtWidgets.QTableWidget(self.tab_1) self.fieldsTable.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.fieldsTable.sizePolicy().hasHeightForWidth()) self.fieldsTable.setSizePolicy(sizePolicy) self.fieldsTable.setMinimumSize(QtCore.QSize(0, 280)) self.fieldsTable.setFocusPolicy(QtCore.Qt.WheelFocus) self.fieldsTable.setEditTriggers(QtWidgets.QAbstractItemView.AnyKeyPressed|QtWidgets.QAbstractItemView.DoubleClicked|QtWidgets.QAbstractItemView.EditKeyPressed) self.fieldsTable.setDragDropMode(QtWidgets.QAbstractItemView.NoDragDrop) self.fieldsTable.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection) self.fieldsTable.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows) self.fieldsTable.setGridStyle(QtCore.Qt.DotLine) self.fieldsTable.setWordWrap(False) self.fieldsTable.setCornerButtonEnabled(False) self.fieldsTable.setRowCount(0) self.fieldsTable.setColumnCount(2) self.fieldsTable.setObjectName(_fromUtf8("fieldsTable")) item = QtWidgets.QTableWidgetItem() self.fieldsTable.setHorizontalHeaderItem(0, item) item = QtWidgets.QTableWidgetItem() self.fieldsTable.setHorizontalHeaderItem(1, item) self.gridlayout.addWidget(self.fieldsTable, 0, 0, 1, 1) self.vboxlayout = QtWidgets.QVBoxLayout() self.vboxlayout.setObjectName(_fromUtf8("vboxlayout")) self.butUp = QtWidgets.QToolButton(self.tab_1) self.butUp.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.butUp.sizePolicy().hasHeightForWidth()) self.butUp.setSizePolicy(sizePolicy) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/tableManager/dialog/icons/crystalsvg_1uparrow.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.butUp.setIcon(icon1) self.butUp.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) self.butUp.setObjectName(_fromUtf8("butUp")) self.vboxlayout.addWidget(self.butUp) self.butDown = QtWidgets.QToolButton(self.tab_1) self.butDown.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.butDown.sizePolicy().hasHeightForWidth()) self.butDown.setSizePolicy(sizePolicy) self.butDown.setMinimumSize(QtCore.QSize(120, 0)) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/tableManager/dialog/icons/crystalsvg_1downarrow.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.butDown.setIcon(icon2) self.butDown.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) self.butDown.setObjectName(_fromUtf8("butDown")) self.vboxlayout.addWidget(self.butDown) self.butRename = QtWidgets.QToolButton(self.tab_1) self.butRename.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.butRename.sizePolicy().hasHeightForWidth()) self.butRename.setSizePolicy(sizePolicy) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/tableManager/dialog/icons/tableManagerIcon3.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.butRename.setIcon(icon3) self.butRename.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) self.butRename.setObjectName(_fromUtf8("butRename")) self.vboxlayout.addWidget(self.butRename) self.butIns = QtWidgets.QToolButton(self.tab_1) self.butIns.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.butIns.sizePolicy().hasHeightForWidth()) self.butIns.setSizePolicy(sizePolicy) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/tableManager/dialog/icons/mActionNewAttribute.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.butIns.setIcon(icon4) self.butIns.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) self.butIns.setObjectName(_fromUtf8("butIns")) self.vboxlayout.addWidget(self.butIns) self.butClone = QtWidgets.QToolButton(self.tab_1) self.butClone.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.butClone.sizePolicy().hasHeightForWidth()) self.butClone.setSizePolicy(sizePolicy) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/tableManager/dialog/icons/mActionCopySelected.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.butClone.setIcon(icon5) self.butClone.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) self.butClone.setObjectName(_fromUtf8("butClone")) self.vboxlayout.addWidget(self.butClone) spacerItem = QtWidgets.QSpacerItem(20, 24, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.vboxlayout.addItem(spacerItem) self.butDel = QtWidgets.QToolButton(self.tab_1) self.butDel.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.butDel.sizePolicy().hasHeightForWidth()) self.butDel.setSizePolicy(sizePolicy) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(255, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(255, 0, 0)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush) brush = QtGui.QBrush(QtGui.QColor(150, 147, 145)) brush.setStyle(QtCore.Qt.SolidPattern) palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush) self.butDel.setPalette(palette) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/tableManager/dialog/icons/mActionDeleteAttribute.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.butDel.setIcon(icon6) self.butDel.setToolButtonStyle(QtCore.Qt.ToolButtonTextBesideIcon) self.butDel.setObjectName(_fromUtf8("butDel")) self.vboxlayout.addWidget(self.butDel) spacerItem1 = QtWidgets.QSpacerItem(120, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.vboxlayout.addItem(spacerItem1) self.gridlayout.addLayout(self.vboxlayout, 0, 1, 1, 1) self.tabWidget.addTab(self.tab_1, _fromUtf8("")) self.tab_2 = QtWidgets.QWidget() self.tab_2.setObjectName(_fromUtf8("tab_2")) self.gridlayout1 = QtWidgets.QGridLayout(self.tab_2) self.gridlayout1.setObjectName(_fromUtf8("gridlayout1")) self.dataTable = QtWidgets.QTableWidget(self.tab_2) self.dataTable.setEnabled(True) self.dataTable.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection) self.dataTable.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectColumns) self.dataTable.setGridStyle(QtCore.Qt.DotLine) self.dataTable.setWordWrap(False) self.dataTable.setCornerButtonEnabled(False) self.dataTable.setObjectName(_fromUtf8("dataTable")) self.dataTable.setColumnCount(0) self.dataTable.setRowCount(0) self.gridlayout1.addWidget(self.dataTable, 0, 0, 1, 1) self.tabWidget.addTab(self.tab_2, _fromUtf8("")) self.tab_3 = QtWidgets.QWidget() self.tab_3.setObjectName(_fromUtf8("tab_3")) self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.tab_3) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) spacerItem2 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.verticalLayout_2.addItem(spacerItem2) self.label = QtWidgets.QLabel(self.tab_3) self.label.setWordWrap(True) self.label.setObjectName(_fromUtf8("label")) self.verticalLayout_2.addWidget(self.label) spacerItem3 = QtWidgets.QSpacerItem(20, 10, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.verticalLayout_2.addItem(spacerItem3) self.label_2 = QtWidgets.QLabel(self.tab_3) self.label_2.setWordWrap(True) self.label_2.setObjectName(_fromUtf8("label_2")) self.verticalLayout_2.addWidget(self.label_2) spacerItem4 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed) self.verticalLayout_2.addItem(spacerItem4) self.cbWarning = QtWidgets.QCheckBox(self.tab_3) self.cbWarning.setChecked(True) self.cbWarning.setObjectName(_fromUtf8("cbWarning")) self.verticalLayout_2.addWidget(self.cbWarning) spacerItem5 = QtWidgets.QSpacerItem(20, 272, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem5) self.tabWidget.addTab(self.tab_3, _fromUtf8("")) self.verticalLayout.addWidget(self.tabWidget) self.hboxlayout = QtWidgets.QHBoxLayout() self.hboxlayout.setObjectName(_fromUtf8("hboxlayout")) spacerItem6 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.hboxlayout.addItem(spacerItem6) self.progressBar = QtWidgets.QProgressBar(Dialog) self.progressBar.setEnabled(True) self.progressBar.setAlignment(QtCore.Qt.AlignHCenter) self.progressBar.setTextVisible(True) self.progressBar.setOrientation(QtCore.Qt.Horizontal) self.progressBar.setInvertedAppearance(False) self.progressBar.setTextDirection(QtWidgets.QProgressBar.TopToBottom) self.progressBar.setFormat(_fromUtf8("")) self.progressBar.setObjectName(_fromUtf8("progressBar")) self.hboxlayout.addWidget(self.progressBar) spacerItem7 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.hboxlayout.addItem(spacerItem7) self.butSave = QtWidgets.QPushButton(Dialog) self.butSave.setEnabled(False) self.butSave.setMinimumSize(QtCore.QSize(0, 32)) palette = QtGui.QPalette() self.butSave.setPalette(palette) self.butSave.setStatusTip(_fromUtf8("")) self.butSave.setWhatsThis(_fromUtf8("")) self.butSave.setAccessibleDescription(_fromUtf8("")) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/tableManager/dialog/icons/mActionFileSave.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.butSave.setIcon(icon7) self.butSave.setObjectName(_fromUtf8("butSave")) self.hboxlayout.addWidget(self.butSave) self.butSaveAs = QtWidgets.QPushButton(Dialog) self.butSaveAs.setEnabled(False) self.butSaveAs.setMinimumSize(QtCore.QSize(0, 32)) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/tableManager/dialog/icons/mActionFileSaveAs.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.butSaveAs.setIcon(icon8) self.butSaveAs.setObjectName(_fromUtf8("butSaveAs")) self.hboxlayout.addWidget(self.butSaveAs) spacerItem8 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.hboxlayout.addItem(spacerItem8) self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) self.buttonBox.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.buttonBox.sizePolicy().hasHeightForWidth()) self.buttonBox.setSizePolicy(sizePolicy) self.buttonBox.setMinimumSize(QtCore.QSize(0, 32)) self.buttonBox.setLayoutDirection(QtCore.Qt.LeftToRight) self.buttonBox.setAutoFillBackground(False) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close) self.buttonBox.setCenterButtons(False) self.buttonBox.setObjectName(_fromUtf8("buttonBox")) self.hboxlayout.addWidget(self.buttonBox) spacerItem9 = QtWidgets.QSpacerItem(10, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum) self.hboxlayout.addItem(spacerItem9) self.verticalLayout.addLayout(self.hboxlayout) self.retranslateUi(Dialog) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(Dialog) Dialog.setTabOrder(self.buttonBox, self.tabWidget) Dialog.setTabOrder(self.tabWidget, self.fieldsTable) Dialog.setTabOrder(self.fieldsTable, self.butUp) Dialog.setTabOrder(self.butUp, self.butDown) Dialog.setTabOrder(self.butDown, self.butRename) Dialog.setTabOrder(self.butRename, self.butIns) Dialog.setTabOrder(self.butIns, self.butClone) Dialog.setTabOrder(self.butClone, self.butDel) Dialog.setTabOrder(self.butDel, self.dataTable) Dialog.setTabOrder(self.dataTable, self.butSaveAs) Dialog.setTabOrder(self.butSaveAs, self.butSave)
def setupUi(self, DsgRasterInfoTool): DsgRasterInfoTool.setObjectName(_fromUtf8("DsgRasterInfoTool")) DsgRasterInfoTool.resize(309, 49) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(DsgRasterInfoTool.sizePolicy().hasHeightForWidth()) DsgRasterInfoTool.setSizePolicy(sizePolicy) DsgRasterInfoTool.setMinimumSize(QtCore.QSize(0, 20)) DsgRasterInfoTool.setMaximumSize(QtCore.QSize(468, 50)) DsgRasterInfoTool.setToolTip(_fromUtf8("")) self.gridLayout = QtWidgets.QGridLayout(DsgRasterInfoTool) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.rasterInfoPushButton = QtWidgets.QPushButton(DsgRasterInfoTool) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.rasterInfoPushButton.sizePolicy().hasHeightForWidth()) self.rasterInfoPushButton.setSizePolicy(sizePolicy) self.rasterInfoPushButton.setMinimumSize(QtCore.QSize(16, 16)) self.rasterInfoPushButton.setMaximumSize(QtCore.QSize(24, 24)) self.rasterInfoPushButton.setText(_fromUtf8("")) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/DsgTools/icons/rasterToolTip.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.rasterInfoPushButton.setIcon(icon) self.rasterInfoPushButton.setIconSize(QtCore.QSize(16, 16)) self.rasterInfoPushButton.setCheckable(True) self.rasterInfoPushButton.setObjectName(_fromUtf8("rasterInfoPushButton")) self.gridLayout.addWidget(self.rasterInfoPushButton, 0, 0, 1, 1) self.splitter = QtWidgets.QSplitter(DsgRasterInfoTool) self.splitter.setOrientation(QtCore.Qt.Horizontal) self.splitter.setObjectName(_fromUtf8("splitter")) self.rasterComboBox = QgsMapLayerComboBox(self.splitter) self.rasterComboBox.setFilters(QgsMapLayerProxyModel.RasterLayer) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.rasterComboBox.sizePolicy().hasHeightForWidth()) self.rasterComboBox.setSizePolicy(sizePolicy) self.rasterComboBox.setMinimumSize(QtCore.QSize(0, 20)) self.rasterComboBox.setMaximumSize(QtCore.QSize(16777215, 24)) self.rasterComboBox.setObjectName(_fromUtf8("rasterComboBox")) self.bandTooltipButton = QtWidgets.QPushButton(self.splitter) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.bandTooltipButton.sizePolicy().hasHeightForWidth()) self.bandTooltipButton.setSizePolicy(sizePolicy) self.bandTooltipButton.setMinimumSize(QtCore.QSize(16, 16)) self.bandTooltipButton.setMaximumSize(QtCore.QSize(24, 24)) self.bandTooltipButton.setToolTip(_fromUtf8("Show raster tooltip")) self.bandTooltipButton.setText(_fromUtf8("")) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/DsgTools/icons/band_tooltip.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.bandTooltipButton.setIcon(icon1) self.bandTooltipButton.setIconSize(QtCore.QSize(16, 16)) self.bandTooltipButton.setCheckable(True) self.bandTooltipButton.setObjectName(_fromUtf8("bandTooltipButton")) self.dynamicHistogramButton = QtWidgets.QPushButton(self.splitter) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.dynamicHistogramButton.sizePolicy().hasHeightForWidth()) self.dynamicHistogramButton.setSizePolicy(sizePolicy) self.dynamicHistogramButton.setMinimumSize(QtCore.QSize(16, 16)) self.dynamicHistogramButton.setMaximumSize(QtCore.QSize(24, 24)) self.dynamicHistogramButton.setToolTip(_fromUtf8("Dynamic histogram view")) self.dynamicHistogramButton.setText(_fromUtf8("")) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/DsgTools/icons/dynamic_histogram_viewer.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.dynamicHistogramButton.setIcon(icon2) self.dynamicHistogramButton.setIconSize(QtCore.QSize(16,16)) self.dynamicHistogramButton.setCheckable(True) self.dynamicHistogramButton.setObjectName(_fromUtf8("dynamicHistogramButton")) self.gridLayout.addWidget(self.splitter, 0, 1, 1, 1) self.valueSetterButton = QtWidgets.QPushButton(self.splitter) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.valueSetterButton.sizePolicy().hasHeightForWidth()) self.valueSetterButton.setSizePolicy(sizePolicy) self.valueSetterButton.setMinimumSize(QtCore.QSize(16, 16)) self.valueSetterButton.setMaximumSize(QtCore.QSize(24, 24)) self.valueSetterButton.setToolTip(_fromUtf8("Set Value From Raster")) self.valueSetterButton.setText(_fromUtf8("")) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/DsgTools/icons/valueSetter.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.valueSetterButton.setIcon(icon2) self.valueSetterButton.setIconSize(QtCore.QSize(40, 40)) self.valueSetterButton.setCheckable(True) self.valueSetterButton.setObjectName(_fromUtf8("valueSetterButton")) self.gridLayout.addWidget(self.splitter, 0, 2, 1, 1) self.retranslateUi(DsgRasterInfoTool) QtCore.QMetaObject.connectSlotsByName(DsgRasterInfoTool)