示例#1
0
 def __init__(self, creator):
     super(tlLogging, self).__init__()
     tlLogging._iface = creator.iface
     tlLogging._logDock = tlLogging._iface.mainWindow().findChild(
         QDockWidget, 'MessageLog')
     tlLogging.HEADER = Settings.getMeta('name', 'general')
     tlLogging._logStates = int(
         Settings.get("logStates", tlLogging._logStates))
示例#2
0
 def critical(msg,duration = 00):
     if not tlLogging._logStates & tlLogging.CRITICAL:
         return
     msg  = Settings.getMeta("name")+ ": " + str(msg)
     QgsMessageLog.logMessage(str(msg),tlLogging.HEADER,QgsMessageLog.CRITICAL)
     if tlLogging._iface != None:
             widget  = QtGui.QLabel(str(msg))
             widget.setStyleSheet("QLabel {padding-left:40px;background-image:url(':/plugins/telemetrylayer/icons/icon.png');background-repeat:no-repeat; background-origin:left}")         
             return tlLogging._iface.messageBar().pushWidget(widget,QgsMessageBar.CRITICAL,duration)
示例#3
0
 def critical(msg, duration=00):
     if not tlLogging._logStates & tlLogging.CRITICAL:
         return
     msg = Settings.getMeta("name") + ": " + str(msg)
     QgsMessageLog.logMessage(str(msg), tlLogging.HEADER,
                              QgsMessageLog.CRITICAL)
     if tlLogging._iface != None:
         widget = QtGui.QLabel(str(msg))
         widget.setStyleSheet(
             "QLabel {padding-left:40px;background-image:url(':/plugins/telemetrylayer/icons/icon.png');background-repeat:no-repeat; background-origin:left}"
         )
         return tlLogging._iface.messageBar().pushWidget(
             widget, QgsMessageBar.CRITICAL, duration)
示例#4
0
 def __init__(self,creator):
     super(tlLogging,self).__init__()
     tlLogging._iface = creator.iface
     tlLogging._logDock = tlLogging._iface.mainWindow().findChild(QDockWidget, 'MessageLog')
     tlLogging.HEADER = Settings.getMeta('name','general')
     tlLogging._logStates = int(Settings.get("logStates",tlLogging._logStates))