def __init__(self,parent): QDialog.__init__(self,parent) #add control to the dialog self.label = QLabel() self.label.setText("Select Geometry Type") self.comboField = QComboBox() self.sridButton = QPushButton() self.sridButton.setText("Select Coordinate System ") self.textField = QLineEdit() geometryCollections = {'Point': 'POINT','Line': 'LINESTRING','Polygon': 'POLYGON', 'Multipolygon': 'MULTIPOLYGON'} setCollectiontypes(geometryCollections,self.comboField) self.buttons=QDialogButtonBox() self.buttons.addButton(QDialogButtonBox.Ok) self.buttons.addButton(QDialogButtonBox.Cancel) self.sridButton.clicked.connect(self.projectionsSettings) layout = QGridLayout() layout.addWidget(self.label) layout.addWidget(self.comboField) layout.addWidget(self.sridButton) layout.addWidget(self.textField) layout.addWidget(self.buttons) self.setLayout(layout) self.setWindowTitle("Geometry Column Property") self.buttons.accepted.connect(self.setGeometrySetting) self.buttons.rejected.connect(self.cancel)
def __init__(self,parent): QDialog.__init__(self,parent) #add control to the dialog self.label = QLabel() self.label.setText(QApplication.translate("GeometryProperty","Select Geometry Type")) self.comboField = QComboBox() self.sridButton = QPushButton() self.sridButton.setText(QApplication.translate("GeometryProperty","Select Coordinate System ")) self.textField = QLineEdit() setCollectiontypes(geometry_collections, self.comboField) self.buttons=QDialogButtonBox() self.buttons.addButton(QDialogButtonBox.Ok) self.buttons.addButton(QDialogButtonBox.Cancel) self.sridButton.clicked.connect(self.projectionsSettings) layout = QGridLayout() layout.addWidget(self.label) layout.addWidget(self.comboField) layout.addWidget(self.sridButton) layout.addWidget(self.textField) layout.addWidget(self.buttons) self.setLayout(layout) self.setWindowTitle(QApplication.translate("GeometryProperty","Geometry Column Property")) self.buttons.accepted.connect(self.setGeometrySetting) self.buttons.rejected.connect(self.cancel)
def initControls(self): '''Initialize defualt dialog properties''' self.tableList(self.cboTable) setCollectiontypes(actions,self.cboDelAct) setCollectiontypes(actions,self.cboUpAct) self.table_column_model(self.cboColumn,self.cboTable.currentText()) self.table_column_model(self.cboRefCol,self.tableName) self.table_column_model(self.cboType, self.cboTable.currentText())
def initControls(self): self.defaults = ['integer','date','boolean','time with time zone','serial','geometry','double precision','text'] tableHandler = ConfigTableReader() model = tableHandler.fulltableList() self.cboTabList.insertItems(0,model) index=self.cboTabList.findText(self.tableName,Qt.MatchExactly) if index!=-1: self.cboTabList.setCurrentIndex(index) setCollectiontypes(datatypes, self.cboDatatype) setCollectiontypes(nullable, self.cboNull) dIndex=self.cboDatatype.findText('Short text',Qt.MatchExactly) if dIndex!=-1: self.cboDatatype.setCurrentIndex(dIndex) self.cboNull.setCurrentIndex(1) self.reloadColumnValues() self.initializeValidator()
def __init__(self,parent,profile, table, args= None): QDialog.__init__(self,parent) self.profile = profile self.tableName = table self.geom_data = args self.oldText = self.geom_data[0] #add control to the dialog self.label = QLabel() self.labelName = QLabel() self.label.setText(QApplication .translate("GeometryEditor","Select Geometry Type")) self.comboField = QComboBox() self.labelName.setText(QApplication .translate("GeometryEditor","Edit Type Name")) self.textFieldName = QLineEdit() self.sridButton = QPushButton() self.sridButton.setText(QApplication .translate("GeometryEditor","Select Coordinate System ")) self.textField = QLineEdit() setCollectiontypes(geometry_collections, self.comboField) self.buttons = QDialogButtonBox() self.buttons.addButton(QDialogButtonBox.Ok) self.buttons.addButton(QDialogButtonBox.Cancel) self.sridButton.clicked.connect(self.projectionsSettings) layout = QGridLayout() layout.addWidget(self.label) layout.addWidget(self.comboField) layout.addWidget(self.labelName) layout.addWidget(self.textFieldName) layout.addWidget(self.sridButton) layout.addWidget(self.textField) layout.addWidget(self.buttons) self.setLayout(layout) self.setWindowTitle(QApplication .translate("GeometryEditor","Geometry Column Property")) self.on_edit_session() self.buttons.accepted.connect(self.setGeometrySetting) self.buttons.rejected.connect(self.cancel)
def initControls(self): '''Initialize defualt dialog properties''' self.rbRelation.setChecked(True) self.gpConstraint.setVisible(False) self.tableList(self.cboTable) setCollectiontypes(actions,self.cboDelAct) setCollectiontypes(actions,self.cboUpAct) setCollectiontypes(constraints,self.cboType) self.cboColumn.insertItems(0,tableCols(self.cboTable.currentText())) self.cboColumn_2.insertItems(0,tableCols(self.cboTable.currentText())) self.cboRefCol.insertItems(0,tableCols(self.tableName))