Browse Source

Added switching dialog

curiousmuch 7 years ago
parent
commit
81d8615c26
7 changed files with 211 additions and 71 deletions
  1. 32 16
      IdeasXWSCBackend.py
  2. 58 27
      IdeasXWSCView.py
  3. 72 0
      Qt/about.ui
  4. 18 11
      Qt/encoderconfigurationdialog.ui
  5. 14 7
      Qt/ideasxdevice.ui
  6. BIN
      icon/logo/ideasx.png
  7. 17 10
      ideasxdevice.py

+ 32 - 16
IdeasXWSCBackend.py

@@ -52,7 +52,8 @@ class IdeasXWSCNetworkThread(QObject):
     
     # define Qt signals (I don't understand why this is here) 
     encoderUpdate = pyqtSignal([dict], name='encoderUpdate')
-    
+    networkStatus = pyqtSignal([str], name='networkStatus')
+    networkUpdate = pyqtSignal([str], name='networkUpdate')
     
     def __init__(self, settingFile=None, clientID = None, debug=True, mqttdebug=True):
         super(IdeasXWSCNetworkThread, self).__init__()
@@ -105,8 +106,10 @@ class IdeasXWSCNetworkThread(QObject):
     def mqtt_on_connect(self, mqttc, backend_data, flags, rc): 
         if rc == 0: 
             self.printInfo('Connected to %s: %s' % (mqttc._host, mqttc._port))
+            self.networkStatus.emit("Connected to %s: %s" % (mqttc._host, mqttc._port))
         else: 
             self.printInfo('rc: ' + str(rc))
+            self.networkStatus.emit('Connection Failure (rc: ' +str(rc))
         self.printLine()
 
     def mqtt_on_disconnect(self, mqttc, backend_data, rc):
@@ -127,13 +130,18 @@ class IdeasXWSCNetworkThread(QObject):
         try: 
             self._dataParser.ParseFromString(msg.payload)
             print("GPIO States: " + bin(self._dataParser.button))
-            #self.__keyEmulator.emulateKey( self._parserTools.getModuleIDfromTopic(msg.topic),self._dataParser.button)
-        except: 
+            self.keyEmulator.emulateKey( self._parserTools.getModuleIDfromTopic(msg.topic),self._dataParser.button)
+        except Exception as ex: 
             self.printError("Failure to parse message")
             if self.__debug:
                 print("Raw Message: %s" %msg.payload)
+            template = "An exception of type {0} occured. Arguments:\n{1!r}"
+            message = template.format(type(ex).__name__, ex.args)
+            print(message)
+            
             self.printLine()
             
+            
     def mqtt_on_health(self, mqttc, backend_data, msg):
         self.printInfo("Health Message")
         self.printLine()
@@ -222,9 +230,6 @@ class IdeasXWSCNetworkThread(QObject):
         self._mqttc.loop_stop()
         self.printInfo("Murdered MQTT thread.")
         
-    def attachRefreshCallback(self, cb):
-        self.__refreshCb = cb
-        
     def getDevices(self):
         return self.encoders
             
@@ -278,6 +283,7 @@ class IdeasXWSCNetworkThread(QObject):
                             self._commandParser.SerializeToString().decode('utf-8') ,
                             qos=1,
                             retain=False)
+        self.networkUpdate.emit("Send shutdown command to Encoder " + deviceMACAddress)
         self.printInfo("Send Shutdown Command to Encoder " + deviceMACAddress)
         
     def printLine(self):
@@ -301,9 +307,9 @@ class IdeasXKeyEmulator():
         self.switchOne = 0
         self.switchTwo = 1
         self.switchAdaptive = 2
-        self.__assignedKeys = {'default': {self.switchOne: ["1", True], 
-                                           self.switchTwo: ["2", True], 
-                                           self.switchAdaptive: ["3", True]}}
+        self.__assignedKeys = {'default': {self.switchOne: ["1", True, 0], 
+                                           self.switchTwo: ["2", True, 0], 
+                                           self.switchAdaptive: ["3", False, 0]}}
         self.__activeEncoders = []
         
     def activateEncoder(self, encoder):
@@ -317,13 +323,21 @@ class IdeasXKeyEmulator():
     def assignKey(self, encoder, switch, key, active=True):
         if switch not in [self.switchOne, self.switchTwo, self.switchAdaptive]:  
             raise ValueError("Must be IdeasXKeyEmulator() provided switch")
-                        
-        if encoder not in self.__assignedKeys.keys(): 
-            self.__assignedKeys[encoder] = self.__assignedKeys['default']
+        
+        if encoder not in list(self.__assignedKeys.keys()): 
+            self.__assignedKeys[encoder] = self.__assignedKeys['default'].copy()
+        
+        print(self.__assignedKeys)
+            
         self.__assignedKeys[encoder][switch] = [key, active]
         if active == False: 
             self.__k.release_key(key)
-        
+            
+    def getAssignedKeys(self, encoder):
+        if encoder not in self.__assignedKeys.keys(): 
+            encoder = 'default'
+        return self.__assignedKeys[encoder]
+            
     def getAssignedKey(self, encoder, switch):
         if encoder not in self.__assignedKeys.keys(): 
             encoder = 'default'
@@ -340,9 +354,10 @@ class IdeasXKeyEmulator():
             
             for switch in [self.switchOne, self.switchTwo, self.switchAdaptive]:  
                 if (buttonPayload&(1<<switch)!=0):
-                    self.__k.press_key(assignedKeys[switch][0])
-                else: 
-                    self.__k.release_key(assignedKeys[switch][0])
+                    if assignedKeys[switch][1]:
+                        self.__k.tap_key(assignedKeys[switch][0])
+                #else: 
+                    #self.__k.release_key(assignedKeys[switch][0])
 
             
     def printInfo(self, msg):
@@ -383,6 +398,7 @@ if __name__ == "__main__":
     time.sleep(0.1)
     km.emulateKey(encodeId, 0)
     
+
     
 #     wsc = WorkstationClientClass()
 #         

+ 58 - 27
IdeasXWSCView.py

@@ -39,7 +39,7 @@ class IdeasXDeviceManager():
         self.__wsc = wsc
           
     def refreshDevices(self, devices):
-        for deviceMAC in devices.keys(): 
+        for deviceMAC in list(devices.keys()): 
             if deviceMAC in self.__devices.keys(): 
                 print("Updating Device")
                 self.__devices[deviceMAC].updateDevice(devices[deviceMAC])
@@ -95,7 +95,7 @@ class IdeasXEncoder(QtWidgets.QWidget):
                                    'switch-one-disabled.png', 
                                    'switch-two-enabled.png', 
                                    'switch-two-disabled.png', 
-                                   'switch-adpative-enabled.png', 
+                                   'switch-adaptive-enabled.png', 
                                    'switch-adaptive-disabled.png']
                        }
         self.__deviceType = 'encoder'
@@ -106,7 +106,10 @@ class IdeasXEncoder(QtWidgets.QWidget):
         self.__ui.setupUi(self)
         self._parserTools = ParsingTools()
         self.updateDevice(encoder)        
+        self.updateSwitchIcons()
+        
 
+        # Setup Signals
         self.setupMenu()
         self.__ui.buttonActivate.clicked.connect(self.activateEncoder)
         self.__ui.buttonSwitchOne.clicked.connect(lambda: self.openSwitchDialog(self.__wsc.keyEmulator.switchOne,
@@ -117,29 +120,9 @@ class IdeasXEncoder(QtWidgets.QWidget):
     def openSwitchDialog(self, switch, assignedKey):
         dialog = IdeasXSwitchDialog(switch, assignedKey)
         if dialog.exec_():                
-            if dialog.key != None or len(dialog.key) == 1: 
+            if dialog.key != None and len(dialog.key) == 1: 
                 self.__wsc.keyEmulator.assignKey(self.__strModuleID, dialog.switch, dialog.key, dialog.enable)
-                
-                # Think of a better way to do this
-                if dialog.enable: 
-                    if switch == self.__wsc.keyEmulator.switchOne: 
-                        self.__ui.buttonSwitchOne.setIcon(self.setupSwitchIcon(self.__icon['switch'][0]))
-                        
-                    if switch == self.__wsc.keyEmulator.switchTwo:
-                        self.__ui.buttonSwitchTwo.setIcon(self.setupSwitchIcon(self.__icon['switch'][2]))
-                        
-                    if switch == self.__wsc.keyEmulator.switchAdaptive:
-                        self.__ui.buttonSwitchAdaptive.setIcon(self.setupSwitchIcon(self.__icon['switch'][4]))
-                        
-                if dialog.enable == False: 
-                    if switch == self.__wsc.keyEmulator.switchOne: 
-                        self.__ui.buttonSwitchOne.setIcon(self.setupSwitchIcon(self.__icon['switch'][1]))
-                        
-                    if switch == self.__wsc.keyEmulator.switchTwo:
-                        self.__ui.buttonSwitchTwo.setIcon(self.setupSwitchIcon(self.__icon['switch'][3]))
-                        
-                    if switch == self.__wsc.keyEmulator.switchAdaptive:
-                        self.__ui.buttonSwitchAdaptive.setIcon(self.setupSwitchIcon(self.__icon['switch'][5]))
+                self.updateSwitchIcons()
                         
     def setupSwitchIcon(self, path):
         icon = QtGui.QIcon()
@@ -151,6 +134,9 @@ class IdeasXEncoder(QtWidgets.QWidget):
     def setupMenu(self):
         shutdownAction = QtWidgets.QAction('Shutdown Encoder', self)
         shutdownAction.triggered.connect(lambda: self.__wsc.shutdownDevice(self.__strModuleID, None))
+        testKeysAction = QtWidgets.QAction("Test Keys", self)
+        testKeysAction.triggered.connect(self.testKeys)
+        
         
         deviceMenu = QtWidgets.QMenu()
         #deviceMenu.addSection("General Actions")
@@ -160,7 +146,9 @@ class IdeasXEncoder(QtWidgets.QWidget):
         deviceMenu.addSection("Encoder Commands")
         deviceMenu.addAction(shutdownAction)
         #deviceMenu.addAction("Restart Encoder")
-       # deviceMenu.addAction("Update Firmware")
+        #deviceMenu.addAction("Update Firmware")
+        deviceMenu.addSection("Engineering Tools")
+        deviceMenu.addAction(testKeysAction)
         
         self.__ui.buttonMenu.setPopupMode(2)
         self.__ui.buttonMenu.setMenu(deviceMenu)
@@ -173,7 +161,6 @@ class IdeasXEncoder(QtWidgets.QWidget):
         else: 
             print("Deactivating Encoder: " + self.__ui.labelModuleID.text())
             self.__ui.buttonActivate.setText("Activate")
-            self.sendCommand.emit(self.__ui.labelModuleID.text())
         
     def updateDevice(self, encoder):      
         self.__rssi = encoder['rssi']
@@ -228,8 +215,37 @@ class IdeasXEncoder(QtWidgets.QWidget):
         rssiIcon = self.__pathToIcon['network'] + self.__icon['network'][rssiIcon]  
         self.__ui.labelSignal.setPixmap(QtGui.QPixmap(rssiIcon))
         self.__ui.labelSignal.setToolTip(str(rssi) + " dBm")
+        
+    def updateSwitchIcons(self):
+        keys = self.__wsc.keyEmulator.getAssignedKeys(self.__strModuleID)
+        if keys[self.__wsc.keyEmulator.switchOne][1]:
+            iconPath = self.__icon['switch'][0]
+        else: 
+            iconPath = self.__icon['switch'][1]
+        
+        self.__ui.buttonSwitchOne.setIcon(self.setupSwitchIcon(iconPath))
+            
+        if keys[self.__wsc.keyEmulator.switchTwo][1]:
+            iconPath = self.__icon['switch'][2]
+        else: 
+            iconPath =  self.__icon['switch'][3]
+        
+        self.__ui.buttonSwitchTwo.setIcon(self.setupSwitchIcon(iconPath))
+        
+        if keys[self.__wsc.keyEmulator.switchAdaptive][1]:
+            iconPath = self.__icon['switch'][4]
+        else:
+            iconPath = self.__icon['switch'][5]
             
+        self.__ui.buttonSwitchAdaptive.setIcon(self.setupSwitchIcon(iconPath))
 
+    def testKeys(self):
+        time.sleep(3)
+        for payload in [1, 0, 2, 0, 4, 0]:
+            self.__wsc.keyEmulator.emulateKey(self.__strModuleID, payload)
+            time.sleep(0.1)
+
+    
 
 class IdeasXMainWindow(QtWidgets.QMainWindow):
     def __init__(self):
@@ -243,7 +259,17 @@ class IdeasXMainWindow(QtWidgets.QMainWindow):
 
     def setEncoderLayout(self, layout):
         self.__ui.contentEncoder.setLayout(layout)
-    
+        
+    def setStatusBarMessage(self, msg):
+        status = QtWidgets.QLabel()
+        status.setText(msg)
+        status.setAlignment(QtCore.Qt.AlignLeft)
+        #status.setAlignment(QtCore.Qt.AlignLeft)
+        self.__ui.statusbar.addWidget(status, 1) # IDK what the 1 does...I need to look it up
+        
+    def setStatusBarUpdate(self, msg):
+        self.__ui.statusbar.showMessage(msg)
+
         
 if __name__ == "__main__":
     app = QtWidgets.QApplication(sys.argv)
@@ -252,9 +278,14 @@ if __name__ == "__main__":
     wsc = IdeasXWSCNetworkThread()
     encoderManager = IdeasXDeviceManager(IdeasXEncoder, wsc)
     mainWindow.setEncoderLayout(encoderManager.returnLayout())
+    
     wsc.encoderUpdate.connect(encoderManager.refreshDevices)
+    wsc.networkStatus.connect(mainWindow.setStatusBarMessage)
+    wsc.networkUpdate.connect(mainWindow.setStatusBarUpdate)
     wsc.guiStartWorkstationClient('ideasx.duckdns.org')
     
+    
+    
     #timer = QtCore.QTimer()
     #timer.timeout.connect(mainWindow.hideEncoder)
     #timer.start(1000)

+ 72 - 0
Qt/about.ui

@@ -0,0 +1,72 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Dialog</string>
+  </property>
+  <widget class="QDialogButtonBox" name="buttonBox" >
+   <property name="geometry" >
+    <rect>
+     <x>30</x>
+     <y>240</y>
+     <width>341</width>
+     <height>32</height>
+    </rect>
+   </property>
+   <property name="orientation" >
+    <enum>Qt::Horizontal</enum>
+   </property>
+   <property name="standardButtons" >
+    <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+   </property>
+  </widget>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>Dialog</receiver>
+   <slot>accept()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>248</x>
+     <y>254</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>157</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>rejected()</signal>
+   <receiver>Dialog</receiver>
+   <slot>reject()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>316</x>
+     <y>260</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>286</x>
+     <y>274</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
+

+ 18 - 11
Qt/encoderconfigurationdialog.ui

@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>217</width>
+    <width>222</width>
     <height>190</height>
    </rect>
   </property>
@@ -20,7 +20,14 @@
       <string>Switch Configuration:</string>
      </property>
      <layout class="QGridLayout" name="gridLayout">
-      <item row="1" column="0" colspan="2">
+      <item row="0" column="1">
+       <widget class="QCheckBox" name="checkBox">
+        <property name="text">
+         <string>Latching</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="0" colspan="2">
        <widget class="QLineEdit" name="lineSwitchKey">
         <property name="text">
          <string/>
@@ -33,28 +40,28 @@
         </property>
        </widget>
       </item>
-      <item row="2" column="0">
-       <widget class="QLabel" name="labelLatch">
+      <item row="9" column="1">
+       <widget class="QPushButton" name="buttonApply">
         <property name="text">
-         <string>Latching Delay:</string>
+         <string>Apply</string>
         </property>
        </widget>
       </item>
-      <item row="4" column="1">
-       <widget class="QPushButton" name="buttonApply">
+      <item row="7" column="0">
+       <widget class="QLabel" name="labelLatch">
         <property name="text">
-         <string>Apply</string>
+         <string>Delay:</string>
         </property>
        </widget>
       </item>
-      <item row="0" column="0" colspan="2">
+      <item row="0" column="0">
        <widget class="QCheckBox" name="checkSwitchEnable">
         <property name="text">
-         <string>Enable Switch</string>
+         <string>Enable </string>
         </property>
        </widget>
       </item>
-      <item row="3" column="0" colspan="2">
+      <item row="8" column="0" colspan="2">
        <widget class="QSpinBox" name="spinLatchTime">
         <property name="suffix">
          <string> seconds</string>

+ 14 - 7
Qt/ideasxdevice.ui

@@ -242,6 +242,13 @@
        <bool>true</bool>
       </property>
      </widget>
+     <zorder>labelDeviceType</zorder>
+     <zorder>labelSignal</zorder>
+     <zorder>labelBattery</zorder>
+     <zorder>buttonSwitchOne</zorder>
+     <zorder>buttonSwitchTwo</zorder>
+     <zorder>buttonSwitchAdaptive</zorder>
+     <zorder>labelModuleID</zorder>
     </widget>
    </item>
    <item>
@@ -254,8 +261,8 @@
      </property>
      <property name="minimumSize">
       <size>
-       <width>120</width>
-       <height>66</height>
+       <width>160</width>
+       <height>75</height>
       </size>
      </property>
      <property name="maximumSize">
@@ -267,15 +274,15 @@
      <widget class="QLabel" name="labelStatus">
       <property name="geometry">
        <rect>
-        <x>-70</x>
-        <y>47</y>
+        <x>-26</x>
+        <y>44</y>
         <width>181</width>
         <height>31</height>
        </rect>
       </property>
       <property name="font">
        <font>
-        <pointsize>6</pointsize>
+        <pointsize>10</pointsize>
         <italic>true</italic>
        </font>
       </property>
@@ -289,7 +296,7 @@
      <widget class="QToolButton" name="buttonMenu">
       <property name="geometry">
        <rect>
-        <x>95</x>
+        <x>131</x>
         <y>10</y>
         <width>21</width>
         <height>36</height>
@@ -308,7 +315,7 @@
      <widget class="QToolButton" name="buttonActivate">
       <property name="geometry">
        <rect>
-        <x>5</x>
+        <x>41</x>
         <y>10</y>
         <width>91</width>
         <height>36</height>

BIN
icon/logo/ideasx.png


+ 17 - 10
ideasxdevice.py

@@ -60,20 +60,20 @@ class Ui_IdeasXDevice(object):
         self.labelSignal = QtWidgets.QLabel(self.widgetInfo)
         self.labelSignal.setGeometry(QtCore.QRect(117, 43, 31, 31))
         self.labelSignal.setToolTip("")
-        self.labelSignal.setPixmap(QtGui.QPixmap("./icon/network/network-wireless-signal-ok-symbolic.png"))
+        self.labelSignal.setPixmap(QtGui.QPixmap("../icon/network/network-wireless-signal-ok-symbolic.png"))
         self.labelSignal.setScaledContents(False)
         self.labelSignal.setObjectName("labelSignal")
         self.labelBattery = QtWidgets.QLabel(self.widgetInfo)
         self.labelBattery.setGeometry(QtCore.QRect(157, 43, 31, 31))
         self.labelBattery.setToolTip("")
         self.labelBattery.setStatusTip("")
-        self.labelBattery.setPixmap(QtGui.QPixmap("./icon/battery/battery-good-charging-symbolic.png"))
+        self.labelBattery.setPixmap(QtGui.QPixmap("../icon/battery/battery-good-charging-symbolic.png"))
         self.labelBattery.setScaledContents(False)
         self.labelBattery.setObjectName("labelBattery")
         self.buttonSwitchOne = QtWidgets.QToolButton(self.widgetInfo)
         self.buttonSwitchOne.setGeometry(QtCore.QRect(197, 43, 25, 31))
         icon = QtGui.QIcon()
-        icon.addPixmap(QtGui.QPixmap("./icon/switch/switch-one-disabled.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        icon.addPixmap(QtGui.QPixmap("../icon/switch/switch-one-enabled.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
         self.buttonSwitchOne.setIcon(icon)
         self.buttonSwitchOne.setIconSize(QtCore.QSize(30, 30))
         self.buttonSwitchOne.setAutoRaise(True)
@@ -81,7 +81,7 @@ class Ui_IdeasXDevice(object):
         self.buttonSwitchTwo = QtWidgets.QToolButton(self.widgetInfo)
         self.buttonSwitchTwo.setGeometry(QtCore.QRect(219, 43, 21, 31))
         icon1 = QtGui.QIcon()
-        icon1.addPixmap(QtGui.QPixmap("./icon/switch/switch-two-disabled.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        icon1.addPixmap(QtGui.QPixmap("../icon/switch/switch-two-enabled.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
         self.buttonSwitchTwo.setIcon(icon1)
         self.buttonSwitchTwo.setIconSize(QtCore.QSize(30, 30))
         self.buttonSwitchTwo.setAutoRaise(True)
@@ -89,11 +89,18 @@ class Ui_IdeasXDevice(object):
         self.buttonSwitchAdaptive = QtWidgets.QToolButton(self.widgetInfo)
         self.buttonSwitchAdaptive.setGeometry(QtCore.QRect(238, 43, 25, 31))
         icon2 = QtGui.QIcon()
-        icon2.addPixmap(QtGui.QPixmap("./icon/switch/switch-adaptive-disabled.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        icon2.addPixmap(QtGui.QPixmap("../icon/switch/switch-adaptive-disabled.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
         self.buttonSwitchAdaptive.setIcon(icon2)
         self.buttonSwitchAdaptive.setIconSize(QtCore.QSize(30, 30))
         self.buttonSwitchAdaptive.setAutoRaise(True)
         self.buttonSwitchAdaptive.setObjectName("buttonSwitchAdaptive")
+        self.labelDeviceType.raise_()
+        self.labelSignal.raise_()
+        self.labelBattery.raise_()
+        self.buttonSwitchOne.raise_()
+        self.buttonSwitchTwo.raise_()
+        self.buttonSwitchAdaptive.raise_()
+        self.labelModuleID.raise_()
         self.horizontalLayout.addWidget(self.widgetInfo)
         self.widgetControls = QtWidgets.QWidget(IdeasXDevice)
         sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
@@ -101,24 +108,24 @@ class Ui_IdeasXDevice(object):
         sizePolicy.setVerticalStretch(0)
         sizePolicy.setHeightForWidth(self.widgetControls.sizePolicy().hasHeightForWidth())
         self.widgetControls.setSizePolicy(sizePolicy)
-        self.widgetControls.setMinimumSize(QtCore.QSize(120, 66))
+        self.widgetControls.setMinimumSize(QtCore.QSize(160, 75))
         self.widgetControls.setMaximumSize(QtCore.QSize(120, 66))
         self.widgetControls.setObjectName("widgetControls")
         self.labelStatus = QtWidgets.QLabel(self.widgetControls)
-        self.labelStatus.setGeometry(QtCore.QRect(-70, 47, 181, 31))
+        self.labelStatus.setGeometry(QtCore.QRect(-26, 44, 181, 31))
         font = QtGui.QFont()
-        font.setPointSize(6)
+        font.setPointSize(10)
         font.setItalic(True)
         self.labelStatus.setFont(font)
         self.labelStatus.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
         self.labelStatus.setObjectName("labelStatus")
         self.buttonMenu = QtWidgets.QToolButton(self.widgetControls)
-        self.buttonMenu.setGeometry(QtCore.QRect(95, 10, 21, 36))
+        self.buttonMenu.setGeometry(QtCore.QRect(131, 10, 21, 36))
         self.buttonMenu.setAutoRaise(False)
         self.buttonMenu.setArrowType(QtCore.Qt.DownArrow)
         self.buttonMenu.setObjectName("buttonMenu")
         self.buttonActivate = QtWidgets.QToolButton(self.widgetControls)
-        self.buttonActivate.setGeometry(QtCore.QRect(5, 10, 91, 36))
+        self.buttonActivate.setGeometry(QtCore.QRect(41, 10, 91, 36))
         self.buttonActivate.setCheckable(True)
         self.buttonActivate.setPopupMode(QtWidgets.QToolButton.DelayedPopup)
         self.buttonActivate.setToolButtonStyle(QtCore.Qt.ToolButtonTextOnly)