def newConnection(self, explorer):
     dlg = NewPgConnectionDialog(explorer)
     dlg.exec_()
     if dlg.conn is not None:
         item = PgConnectionItem(dlg.conn)
         if dlg.conn.isValid:                              
             item.populate()                
         else:                    
             wrongConnectionIcon = QtGui.QIcon(os.path.dirname(__file__) + "/../images/wrong.gif")                 
             item.setIcon(0, wrongConnectionIcon)                
         self.addChild(item)
Beispiel #2
0
 def newConnection(self, explorer):
     dlg = NewPgConnectionDialog(explorer)
     dlg.exec_()
     if dlg.conn is not None:
         self.databases.append(dlg.conn)
         item = PgConnectionItem(dlg.conn)
         if dlg.conn.isValid:
             item.populate()
         else:
             wrongConnectionIcon = QtGui.QIcon(
                 os.path.dirname(__file__) + "/../images/wrong.gif")
             item.setIcon(0, wrongConnectionIcon)
         self.addChild(item)
Beispiel #3
0
 def editConnection(self, explorer):
     dlg = NewPgConnectionDialog(explorer, self.element)
     dlg.exec_()
     if dlg.conn is not None:
         self.parent().refreshContent(explorer)
 def editConnection(self, explorer):
     dlg = NewPgConnectionDialog(explorer, self.element)
     dlg.exec_()
     if dlg.conn is not None:
         self.parent().refreshContent(explorer)