MqttMonitor/MqttMonitorWidget.ui

Tue, 28 Aug 2018 18:54:48 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 28 Aug 2018 18:54:48 +0200
changeset 4
991db89bda9c
parent 3
82845c0fd550
child 5
7162c838cfc9
permissions
-rw-r--r--

MqttMonitorWidget: added functionality to subscribe to and unsubscribe from topics.

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>MqttMonitorWidget</class>
 <widget class="QWidget" name="MqttMonitorWidget">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>400</width>
    <height>600</height>
   </rect>
  </property>
  <layout class="QVBoxLayout" name="verticalLayout">
   <item>
    <layout class="QHBoxLayout" name="horizontalLayout">
     <item>
      <widget class="QLabel" name="pixmapLabel"/>
     </item>
     <item>
      <widget class="QLabel" name="label_2">
       <property name="sizePolicy">
        <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
         <horstretch>0</horstretch>
         <verstretch>0</verstretch>
        </sizepolicy>
       </property>
       <property name="text">
        <string>&lt;b&gt;MQTT Monitor&lt;/b&gt;</string>
       </property>
       <property name="alignment">
        <set>Qt::AlignCenter</set>
       </property>
      </widget>
     </item>
    </layout>
   </item>
   <item>
    <widget class="QGroupBox" name="groupBox">
     <property name="title">
      <string>Broker</string>
     </property>
     <layout class="QGridLayout" name="gridLayout">
      <item row="0" column="0">
       <widget class="QComboBox" name="brokerComboBox">
        <property name="sizePolicy">
         <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
        <property name="toolTip">
         <string>Enter the host name of the broker</string>
        </property>
        <property name="editable">
         <bool>true</bool>
        </property>
       </widget>
      </item>
      <item row="0" column="1">
       <widget class="QToolButton" name="connectButton">
        <property name="toolTip">
         <string>Press to connect to/disconnect from the broker</string>
        </property>
        <property name="text">
         <string/>
        </property>
       </widget>
      </item>
      <item row="1" column="0" colspan="2">
       <widget class="QLabel" name="brokerStatusLabel">
        <property name="wordWrap">
         <bool>true</bool>
        </property>
       </widget>
      </item>
     </layout>
    </widget>
   </item>
   <item>
    <widget class="QTabWidget" name="brokerWidget">
     <property name="currentIndex">
      <number>0</number>
     </property>
     <widget class="QWidget" name="pubSubTab">
      <attribute name="title">
       <string>Pub/Sub</string>
      </attribute>
      <layout class="QVBoxLayout" name="verticalLayout_2">
       <item>
        <widget class="QGroupBox" name="subscribeGroup">
         <property name="enabled">
          <bool>false</bool>
         </property>
         <property name="title">
          <string>Subscribe</string>
         </property>
         <layout class="QHBoxLayout" name="horizontalLayout_2">
          <item>
           <widget class="QLabel" name="label">
            <property name="text">
             <string>Topic:</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="E5ClearableLineEdit" name="subscribeTopicEdit">
            <property name="toolTip">
             <string>Enter the topic</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QLabel" name="label_3">
            <property name="text">
             <string>QoS:</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QSpinBox" name="subscribeQosSpinBox">
            <property name="toolTip">
             <string>Enter the desired QoS value</string>
            </property>
            <property name="alignment">
             <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
            </property>
            <property name="maximum">
             <number>2</number>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QToolButton" name="subscribeButton">
            <property name="toolTip">
             <string>Press to subscribe to the given topic</string>
            </property>
           </widget>
          </item>
         </layout>
        </widget>
       </item>
       <item>
        <widget class="QGroupBox" name="unsubscribeGroup">
         <property name="enabled">
          <bool>false</bool>
         </property>
         <property name="title">
          <string>Unsubscribe</string>
         </property>
         <layout class="QHBoxLayout" name="horizontalLayout_3">
          <item>
           <widget class="QLabel" name="label_4">
            <property name="text">
             <string>Topic:</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QComboBox" name="unsubscribeTopicComboBox">
            <property name="sizePolicy">
             <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
            </property>
            <property name="toolTip">
             <string>Select the topic to unsubscribe</string>
            </property>
           </widget>
          </item>
          <item>
           <widget class="QToolButton" name="unsubscribeButton">
            <property name="toolTip">
             <string>Press to unsubscribe the selected topic</string>
            </property>
           </widget>
          </item>
         </layout>
        </widget>
       </item>
       <item>
        <spacer name="verticalSpacer">
         <property name="orientation">
          <enum>Qt::Vertical</enum>
         </property>
         <property name="sizeHint" stdset="0">
          <size>
           <width>20</width>
           <height>312</height>
          </size>
         </property>
        </spacer>
       </item>
      </layout>
     </widget>
     <widget class="QWidget" name="messagesTab">
      <attribute name="title">
       <string>Messages</string>
      </attribute>
     </widget>
     <widget class="QWidget" name="statusTab">
      <attribute name="title">
       <string>Status</string>
      </attribute>
     </widget>
    </widget>
   </item>
  </layout>
 </widget>
 <customwidgets>
  <customwidget>
   <class>E5ClearableLineEdit</class>
   <extends>QLineEdit</extends>
   <header>E5Gui/E5LineEdit.h</header>
  </customwidget>
 </customwidgets>
 <tabstops>
  <tabstop>brokerComboBox</tabstop>
  <tabstop>connectButton</tabstop>
  <tabstop>brokerWidget</tabstop>
  <tabstop>subscribeTopicEdit</tabstop>
  <tabstop>subscribeQosSpinBox</tabstop>
  <tabstop>subscribeButton</tabstop>
  <tabstop>unsubscribeTopicComboBox</tabstop>
  <tabstop>unsubscribeButton</tabstop>
 </tabstops>
 <resources/>
 <connections/>
</ui>

eric ide

mercurial