parameters: (self)
docstring: Deletes currently selected index
docstring_summary: Deletes currently selected index
docstring_tokens: Deletes currently selected index
function: def deleteIndex(self):
          """Deletes currently selected index """
          index = self.currentIndex()
          if index == -1:
              return
  
          m = self.viewIndexes.model()
          idx = m.getObject(index)
  
          res = QMessageBox.question(self, self.tr("Delete Index"),
                                     self.tr("Are you sure you want to delete index '{0}'?").format(idx.name),
                                     QMessageBox.Yes | QMessageBox.No)
          if res != QMessageBox.Yes:
              return
  
          with OverrideCursor(Qt.WaitCursor):
              self.aboutToChangeTable.emit()
              try:
                  idx.delete()
                  self.refresh()
              except BaseError as e:
                  DlgDbError.showError(e, self)
function_tokens: def deleteIndex ( self ) : index = self . currentIndex ( ) if index == - 1 : return m = self . viewIndexes . model ( ) idx = m . getObject ( index ) res = QMessageBox . question ( self , self . tr ( "Delete Index" ) , self . tr ( "Are you sure you want to delete index '{0}'?" ) . format ( idx . name ) , QMessageBox . Yes | QMessageBox . No ) if res != QMessageBox . Yes : return with OverrideCursor ( Qt . WaitCursor ) : self . aboutToChangeTable . emit ( ) try : idx . delete ( ) self . refresh ( ) except BaseError as e : DlgDbError . showError ( e , self )