Template
forked from CEN-RA/Plugin_QGIS
fix visuel pour les utilisateurs incompétent.
This commit is contained in:
@@ -289,6 +289,8 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||
p = []
|
||||
|
||||
for row in range(0, self.tableWidget_2.rowCount()):
|
||||
color_rgba = 855030089
|
||||
if self.tableWidget_2.item(row, 0).background().color().rgba() != 855030089:
|
||||
## supression de la partie de l'url après le point d'interrogation
|
||||
if dbtype == sigdb:
|
||||
code = self.tableWidget_2.item(row,0).text()
|
||||
@@ -338,7 +340,8 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||
layer = QgsVectorLayer(uri.uri(), table, "postgres")
|
||||
# Ajout de la couche au canevas QGIS
|
||||
QgsProject.instance().addMapLayer(layer)
|
||||
|
||||
else:
|
||||
self.QMBquestion = QMessageBox.question(iface.mainWindow(), u"Attention !","La couche «" + str(self.tableWidget_2.item(row,1).text()) +' '+ str(self.tableWidget_2.item(row,2).text()) + "» ne ce trouve pas dans cette BD !",QMessageBox.Yes)
|
||||
def combobox_custom(self):
|
||||
if dbtype == sigdb:
|
||||
self.toolButton.setEnabled(1)
|
||||
@@ -402,6 +405,9 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||
row_count = 0
|
||||
self.tableWidget.setRowCount(0)
|
||||
for e in TableHaveGeom:
|
||||
cur.execute("""SELECT DISTINCT count(*) FROM pg_catalog.pg_tables WHERE schemaname LIKE '"""+e[0]+"""' AND tablename LIKE '"""+e[1]+"""';""")
|
||||
TableSomme = cur.fetchall()[0][0]
|
||||
|
||||
if e[0][1:3] != 'fo':
|
||||
DepName = QTableWidgetItem(e[0][1:3])
|
||||
SchemaName = QTableWidgetItem(e[0][4:])
|
||||
@@ -413,6 +419,10 @@ class Flux_Editor(QDialog, EDITOR_CLASS):
|
||||
self.tableWidget.setItem(row_count,0,DepName)
|
||||
self.tableWidget.setItem(row_count,1,SchemaName)
|
||||
self.tableWidget.setItem(row_count,2,TableName)
|
||||
if TableSomme == 0:
|
||||
for j in range(self.tableWidget.columnCount()):
|
||||
self.tableWidget.item(row_count, j).setBackground(QtGui.QColor(246, 185, 73,50))
|
||||
self.tableWidget.item(row_count,j).setToolTip('Couche dans une autre BD !')
|
||||
row_count = row_count+1
|
||||
if self.lineEdit.text() != 'Recherche par mots-clés':
|
||||
self.filtre_dynamique(self.lineEdit.text())
|
||||
|
||||
Reference in New Issue
Block a user