def getUserPassword(user=None, passwd=None):
    updlg = UserPasswdDialog(user=user, passwd=passwd)

    QApplication.setOverrideCursor(QCursor(Qt.ArrowCursor))
    updlg.exec_()
    QApplication.restoreOverrideCursor()

    return updlg.user, updlg.passwd
Example #2
0
def getUserPassword(user=None, passwd=None):
    updlg = UserPasswdDialog(user=user, passwd=passwd)

    QApplication.setOverrideCursor(QCursor(Qt.ArrowCursor))
    updlg.exec_()
    QApplication.restoreOverrideCursor()

    return updlg.user, updlg.passwd
    def refreshContent(self):
        if self.connection is None:
            return        
        if not self.connection.isValid:            
            dlg = UserPasswdDialog()
            dlg.exec_()
            if dlg.user is None:
                return
            self.connection.reconnect(dlg.user, dlg.passwd)            
            if not self.connection.isValid:
                QtGui.QMessageBox.warning(None, "Error connecting to DB", "Cannot connect to the database")
                return 

        self.tree.clear()        
        schemas = self.connection.schemas()
        for schema in schemas:
            schemItem = PgSchemaItem(schema)
            schemItem.populate()
            self.tree.addTopLevelItem(schemItem)
Example #4
0
    def refreshContent(self):
        if self.connection is None:
            return        
        if not self.connection.isValid:            
            dlg = UserPasswdDialog()
            dlg.exec_()
            if dlg.user is None:
                return
            self.connection.reconnect(dlg.user, dlg.passwd)            
            if not self.connection.isValid:
                QtGui.QMessageBox.warning(None, "Error connecting to DB", "Cannot connect to the database")
                return 

        self.tree.clear()        
        schemas = self.connection.schemas()
        for schema in schemas:
            schemItem = PgSchemaItem(schema)
            schemItem.populate()
            self.tree.addTopLevelItem(schemItem)