PluginMqttMonitor.py

branch
eric7
changeset 113
63ecd9658c6c
parent 112
b287c1d2cc78
child 114
8c0e9e602124
equal deleted inserted replaced
112:b287c1d2cc78 113:63ecd9658c6c
24 # Start-Of-Header 24 # Start-Of-Header
25 name = "MQTT Monitor Plugin" 25 name = "MQTT Monitor Plugin"
26 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 26 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
27 autoactivate = True 27 autoactivate = True
28 deactivateable = True 28 deactivateable = True
29 version = "1.1.2" 29 version = "1.2.0"
30 className = "MqttMonitorPlugin" 30 className = "MqttMonitorPlugin"
31 packageName = "MqttMonitor" 31 packageName = "MqttMonitor"
32 shortDescription = "Plug-in implementing a tool to connect to a MQTT broker" 32 shortDescription = "Plug-in implementing a tool to connect to a MQTT broker"
33 longDescription = ( 33 longDescription = (
34 """Plug-in implementing a tool to connect to a MQTT broker, subscribe""" 34 """Plug-in implementing a tool to connect to a MQTT broker, subscribe"""
176 176
177 usesDarkPalette = ericApp().usesDarkPalette() 177 usesDarkPalette = ericApp().usesDarkPalette()
178 iconSuffix = "dark" if usesDarkPalette else "light" 178 iconSuffix = "dark" if usesDarkPalette else "light"
179 179
180 self.__widget = MqttMonitorWidget(self, usesDarkPalette) 180 self.__widget = MqttMonitorWidget(self, usesDarkPalette)
181 if self.__ui.getLayoutType() == "Sidebars": 181 iconName = (
182 iconName = "sbMqttMonitor96" 182 "sbMqttMonitor96"
183 else: 183 if self.__ui.getLayoutType() == "Sidebars" else
184 iconName = "mqtt22-{0}".format(iconSuffix) 184 "mqtt22-{0}".format(iconSuffix)
185 )
185 self.__ui.addSideWidget( 186 self.__ui.addSideWidget(
186 self.__ui.RightSide, self.__widget, 187 self.__ui.RightSide, self.__widget,
187 UI.PixmapCache.getIcon( 188 UI.PixmapCache.getIcon(
188 os.path.join("MqttMonitor", "icons", iconName)), 189 os.path.join("MqttMonitor", "icons", iconName)),
189 self.tr("MQTT Monitor")) 190 self.tr("MQTT Monitor"))

eric ide

mercurial