Implement custom rate limits
[quassel.git] / src / qtui / settingspages / networkssettingspage.ui
index e2c106c..5b93160 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>515</width>
-    <height>503</height>
+    <width>510</width>
+    <height>553</height>
    </rect>
   </property>
   <property name="windowTitle">
          <string/>
         </property>
         <property name="currentIndex">
-         <number>3</number>
+         <number>0</number>
         </property>
         <widget class="QWidget" name="serversTab">
          <property name="enabled">
               </property>
               <property name="icon">
                <iconset>
-                <normaloff/>
-               </iconset>
+                <normaloff>.</normaloff>.</iconset>
               </property>
              </widget>
             </item>
@@ -373,7 +372,7 @@ Note that Quassel IRC automatically rejoins channels, so /join will rarely be ne
          <attribute name="title">
           <string>Connection</string>
          </attribute>
-         <layout class="QVBoxLayout" name="verticalLayout_8">
+         <layout class="QVBoxLayout" name="verticalLayout_9">
           <item>
            <widget class="QGroupBox" name="autoReconnect">
             <property name="enabled">
@@ -496,6 +495,154 @@ Note that Quassel IRC automatically rejoins channels, so /join will rarely be ne
             </layout>
            </widget>
           </item>
+          <item>
+           <widget class="QGroupBox" name="useCustomMessageRate">
+            <property name="enabled">
+             <bool>true</bool>
+            </property>
+            <property name="toolTip">
+             <string notr="true">Tooltip not yet loaded - to modify tooltip, edit NetworksSettingsPage::load()</string>
+            </property>
+            <property name="title">
+             <string>Use Custom Rate Limits</string>
+            </property>
+            <property name="checkable">
+             <bool>true</bool>
+            </property>
+            <property name="checked">
+             <bool>false</bool>
+            </property>
+            <layout class="QVBoxLayout" name="verticalLayout_8">
+             <item>
+              <layout class="QHBoxLayout" name="horizontalLayout_6">
+               <item>
+                <widget class="QLabel" name="label_11">
+                 <property name="text">
+                  <string>Max. messages at once:</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QSpinBox" name="messageRateBurstSize">
+                 <property name="toolTip">
+                  <string>Maximum number of messages to send without any delays</string>
+                 </property>
+                 <property name="minimum">
+                  <number>1</number>
+                 </property>
+                 <property name="maximum">
+                  <number>999</number>
+                 </property>
+                 <property name="value">
+                  <number>5</number>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <widget class="QCheckBox" name="unlimitedMessageRate">
+                 <property name="toolTip">
+                  <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Disable all rate limiting, e.g. for IRC bridges.&lt;/p&gt;&lt;p&gt;Don't use with most normal networks.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                 </property>
+                 <property name="text">
+                  <string>Unlimited</string>
+                 </property>
+                </widget>
+               </item>
+               <item>
+                <spacer name="horizontalSpacer_5">
+                 <property name="orientation">
+                  <enum>Qt::Horizontal</enum>
+                 </property>
+                 <property name="sizeHint" stdset="0">
+                  <size>
+                   <width>40</width>
+                   <height>20</height>
+                  </size>
+                 </property>
+                </spacer>
+               </item>
+              </layout>
+             </item>
+             <item>
+              <widget class="QFrame" name="messageRateDelayFrame">
+               <property name="frameShape">
+                <enum>QFrame::NoFrame</enum>
+               </property>
+               <property name="frameShadow">
+                <enum>QFrame::Plain</enum>
+               </property>
+               <property name="lineWidth">
+                <number>1</number>
+               </property>
+               <layout class="QVBoxLayout" name="verticalLayout_10">
+                <property name="leftMargin">
+                 <number>0</number>
+                </property>
+                <property name="topMargin">
+                 <number>0</number>
+                </property>
+                <property name="rightMargin">
+                 <number>0</number>
+                </property>
+                <property name="bottomMargin">
+                 <number>0</number>
+                </property>
+                <item>
+                 <layout class="QHBoxLayout" name="horizontalLayout_5">
+                  <item>
+                   <widget class="QLabel" name="label_10">
+                    <property name="text">
+                     <string>Wait</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <widget class="QDoubleSpinBox" name="messageRateDelay">
+                    <property name="toolTip">
+                     <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Delay between messages after the maximum number of undelayed messages have been sent.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+                    </property>
+                    <property name="suffix">
+                     <string> s</string>
+                    </property>
+                    <property name="minimum">
+                     <double>0.010000000000000</double>
+                    </property>
+                    <property name="singleStep">
+                     <double>0.100000000000000</double>
+                    </property>
+                    <property name="value">
+                     <double>2.200000000000000</double>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <widget class="QLabel" name="label_13">
+                    <property name="text">
+                     <string>between future messages</string>
+                    </property>
+                   </widget>
+                  </item>
+                  <item>
+                   <spacer name="horizontalSpacer_4">
+                    <property name="orientation">
+                     <enum>Qt::Horizontal</enum>
+                    </property>
+                    <property name="sizeHint" stdset="0">
+                     <size>
+                      <width>40</width>
+                      <height>20</height>
+                     </size>
+                    </property>
+                   </spacer>
+                  </item>
+                 </layout>
+                </item>
+               </layout>
+              </widget>
+             </item>
+            </layout>
+           </widget>
+          </item>
           <item>
            <spacer name="verticalSpacer_3">
             <property name="orientation">
@@ -504,7 +651,7 @@ Note that Quassel IRC automatically rejoins channels, so /join will rarely be ne
             <property name="sizeHint" stdset="0">
              <size>
               <width>20</width>
-              <height>79</height>
+              <height>1</height>
              </size>
             </property>
            </spacer>
@@ -607,7 +754,7 @@ Note that Quassel IRC automatically rejoins channels, so /join will rarely be ne
               </widget>
              </item>
              <item row="1" column="0">
-              <widget class="QLabel" name="label_11">
+              <widget class="QLabel" name="saslPasswordLabel">
                <property name="enabled">
                 <bool>true</bool>
                </property>
@@ -617,7 +764,7 @@ Note that Quassel IRC automatically rejoins channels, so /join will rarely be ne
               </widget>
              </item>
              <item row="0" column="0">
-              <widget class="QLabel" name="label_10">
+              <widget class="QLabel" name="saslAccountLabel">
                <property name="enabled">
                 <bool>true</bool>
                </property>
@@ -630,7 +777,7 @@ Note that Quassel IRC automatically rejoins channels, so /join will rarely be ne
            </widget>
           </item>
           <item>
-           <widget class="QLabel" name="label_saslext">
+           <widget class="QLabel" name="saslExtInfo">
             <property name="text">
              <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Note:&lt;/span&gt; because the identity has an ssl certificate set, SASL EXTERNAL will be used.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
             </property>
@@ -713,8 +860,8 @@ UTF-8 should be a sane choice for most networks.</string>
                <item row="1" column="0">
                 <widget class="QLabel" name="label_5">
                  <property name="toolTip">
-                  <string>Incoming messages encoded in Utf8 will always be treated as such.
-This setting defines the encoding for messages that are not Utf8.</string>
+                  <string>Incoming messages encoded in UTF-8 will always be treated as such.
+This setting defines the encoding for messages that are not UTF-8.</string>
                  </property>
                  <property name="text">
                   <string>Receive fallback:</string>
@@ -733,8 +880,8 @@ This setting defines the encoding for messages that are not Utf8.</string>
                   </sizepolicy>
                  </property>
                  <property name="toolTip">
-                  <string>Incoming messages encoded in Utf8 will always be treated as such.
-This setting defines the encoding for messages that are not Utf8.</string>
+                  <string>Incoming messages encoded in UTF-8 will always be treated as such.
+This setting defines the encoding for messages that are not UTF-8.</string>
                  </property>
                  <property name="insertPolicy">
                   <enum>QComboBox::InsertAlphabetically</enum>
@@ -810,8 +957,16 @@ Unless you *really* know what you do, leave this as ISO-8859-1!</string>
   <tabstop>reconnectRetries</tabstop>
   <tabstop>unlimitedRetries</tabstop>
   <tabstop>rejoinOnReconnect</tabstop>
+  <tabstop>useCustomMessageRate</tabstop>
+  <tabstop>messageRateBurstSize</tabstop>
+  <tabstop>unlimitedMessageRate</tabstop>
+  <tabstop>messageRateDelay</tabstop>
+  <tabstop>autoIdentify</tabstop>
   <tabstop>autoIdentifyService</tabstop>
   <tabstop>autoIdentifyPassword</tabstop>
+  <tabstop>sasl</tabstop>
+  <tabstop>saslAccount</tabstop>
+  <tabstop>saslPassword</tabstop>
   <tabstop>useCustomEncodings</tabstop>
   <tabstop>sendEncoding</tabstop>
   <tabstop>recvEncoding</tabstop>
@@ -835,5 +990,37 @@ Unless you *really* know what you do, leave this as ISO-8859-1!</string>
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>unlimitedMessageRate</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>messageRateBurstSize</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>332</x>
+     <y>392</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>249</x>
+     <y>393</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>unlimitedMessageRate</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>messageRateDelayFrame</receiver>
+   <slot>setDisabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>332</x>
+     <y>392</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>262</x>
+     <y>428</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
 </ui>