27
27
from qgis .PyQt .QtGui import QKeySequence , QIcon
28
28
29
29
from qgis .gui import QgsMessageBar
30
- from qgis .core import QgsSettings
30
+ from qgis .core import Qgis , QgsSettings
31
31
from ..db_plugins import createDbPlugin
32
32
33
33
@@ -357,7 +357,7 @@ def deleteActionSlot(self, item, action, parent):
357
357
else :
358
358
QApplication .restoreOverrideCursor ()
359
359
parent .infoBar .pushMessage (QApplication .translate ("DBManagerPlugin" , "Cannot delete the selected item." ),
360
- QgsMessageBar . INFO , parent .iface .messageTimeout ())
360
+ Qgis . Info , parent .iface .messageTimeout ())
361
361
QApplication .setOverrideCursor (Qt .WaitCursor )
362
362
363
363
def createSchemaActionSlot (self , item , action , parent ):
@@ -366,7 +366,7 @@ def createSchemaActionSlot(self, item, action, parent):
366
366
if not isinstance (item , (DBPlugin , Schema , Table )) or item .database () is None :
367
367
parent .infoBar .pushMessage (
368
368
QApplication .translate ("DBManagerPlugin" , "No database selected or you are not connected to it." ),
369
- QgsMessageBar . INFO , parent .iface .messageTimeout ())
369
+ Qgis . Info , parent .iface .messageTimeout ())
370
370
return
371
371
(schema , ok ) = QInputDialog .getText (parent , QApplication .translate ("DBManagerPlugin" , "New schema" ),
372
372
QApplication .translate ("DBManagerPlugin" , "Enter new schema name" ))
@@ -383,7 +383,7 @@ def deleteSchemaActionSlot(self, item, action, parent):
383
383
if not isinstance (item , Schema ):
384
384
parent .infoBar .pushMessage (
385
385
QApplication .translate ("DBManagerPlugin" , "Select an empty schema for deletion." ),
386
- QgsMessageBar . INFO , parent .iface .messageTimeout ())
386
+ Qgis . Info , parent .iface .messageTimeout ())
387
387
return
388
388
res = QMessageBox .question (parent , QApplication .translate ("DBManagerPlugin" , "hey!" ),
389
389
QApplication .translate ("DBManagerPlugin" ,
@@ -414,7 +414,7 @@ def createTableActionSlot(self, item, action, parent):
414
414
if not hasattr (item , 'database' ) or item .database () is None :
415
415
parent .infoBar .pushMessage (
416
416
QApplication .translate ("DBManagerPlugin" , "No database selected or you are not connected to it." ),
417
- QgsMessageBar . INFO , parent .iface .messageTimeout ())
417
+ Qgis . Info , parent .iface .messageTimeout ())
418
418
return
419
419
from ..dlg_create_table import DlgCreateTable
420
420
@@ -426,7 +426,7 @@ def editTableActionSlot(self, item, action, parent):
426
426
try :
427
427
if not isinstance (item , Table ) or item .isView :
428
428
parent .infoBar .pushMessage (QApplication .translate ("DBManagerPlugin" , "Select a table to edit." ),
429
- QgsMessageBar . INFO , parent .iface .messageTimeout ())
429
+ Qgis . Info , parent .iface .messageTimeout ())
430
430
return
431
431
from ..dlg_table_properties import DlgTableProperties
432
432
@@ -440,7 +440,7 @@ def deleteTableActionSlot(self, item, action, parent):
440
440
if not isinstance (item , Table ):
441
441
parent .infoBar .pushMessage (
442
442
QApplication .translate ("DBManagerPlugin" , "Select a table/view for deletion." ),
443
- QgsMessageBar . INFO , parent .iface .messageTimeout ())
443
+ Qgis . Info , parent .iface .messageTimeout ())
444
444
return
445
445
res = QMessageBox .question (parent , QApplication .translate ("DBManagerPlugin" , "hey!" ),
446
446
QApplication .translate ("DBManagerPlugin" ,
@@ -458,7 +458,7 @@ def emptyTableActionSlot(self, item, action, parent):
458
458
try :
459
459
if not isinstance (item , Table ) or item .isView :
460
460
parent .infoBar .pushMessage (QApplication .translate ("DBManagerPlugin" , "Select a table to empty it." ),
461
- QgsMessageBar . INFO , parent .iface .messageTimeout ())
461
+ Qgis . Info , parent .iface .messageTimeout ())
462
462
return
463
463
res = QMessageBox .question (parent , QApplication .translate ("DBManagerPlugin" , "hey!" ),
464
464
QApplication .translate ("DBManagerPlugin" ,
@@ -485,7 +485,7 @@ def moveTableToSchemaActionSlot(self, item, action, parent, new_schema):
485
485
try :
486
486
if not isinstance (item , Table ):
487
487
parent .infoBar .pushMessage (QApplication .translate ("DBManagerPlugin" , "Select a table/view." ),
488
- QgsMessageBar . INFO , parent .iface .messageTimeout ())
488
+ Qgis . Info , parent .iface .messageTimeout ())
489
489
return
490
490
finally :
491
491
QApplication .setOverrideCursor (Qt .WaitCursor )
0 commit comments