コード例 #1
0
 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)
コード例 #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)
コード例 #3
0
 def editConnection(self, explorer):
     dlg = NewPgConnectionDialog(explorer, self.element)
     dlg.exec_()
     if dlg.conn is not None:
         self.parent().refreshContent(explorer)
コード例 #4
0
 def editConnection(self, explorer):
     dlg = NewPgConnectionDialog(explorer, self.element)
     dlg.exec_()
     if dlg.conn is not None:
         self.parent().refreshContent(explorer)