Build with Qt 4.4 again
authorSebastian Goth <seezer@roath.org>
Tue, 25 Aug 2009 21:42:29 +0000 (23:42 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 25 Aug 2009 21:51:03 +0000 (23:51 +0200)
src/qtui/settingspages/ignorelisteditdlg.ui
src/qtui/settingspages/ignorelistsettingspage.cpp
src/qtui/settingspages/ignorelistsettingspage.h

index 98cae6e..db2f994 100644 (file)
@@ -47,9 +47,6 @@ p, li { white-space: pre-wrap; }
           <property name="text">
            <string>Dynamic</string>
           </property>
           <property name="text">
            <string>Dynamic</string>
           </property>
-          <attribute name="buttonGroup">
-           <string>strictnessButtonGroup</string>
-          </attribute>
          </widget>
         </item>
         <item>
          </widget>
         </item>
         <item>
@@ -57,9 +54,6 @@ p, li { white-space: pre-wrap; }
           <property name="text">
            <string>Permanent</string>
           </property>
           <property name="text">
            <string>Permanent</string>
           </property>
-          <attribute name="buttonGroup">
-           <string>strictnessButtonGroup</string>
-          </attribute>
          </widget>
         </item>
        </layout>
          </widget>
         </item>
        </layout>
@@ -91,9 +85,6 @@ p, li { white-space: pre-wrap; }
           <property name="text">
            <string>Sender</string>
           </property>
           <property name="text">
            <string>Sender</string>
           </property>
-          <attribute name="buttonGroup">
-           <string>typeButtonGroup</string>
-          </attribute>
          </widget>
         </item>
         <item>
          </widget>
         </item>
         <item>
@@ -101,9 +92,6 @@ p, li { white-space: pre-wrap; }
           <property name="text">
            <string>Message</string>
           </property>
           <property name="text">
            <string>Message</string>
           </property>
-          <attribute name="buttonGroup">
-           <string>typeButtonGroup</string>
-          </attribute>
          </widget>
         </item>
        </layout>
          </widget>
         </item>
        </layout>
@@ -215,9 +203,6 @@ p, li { white-space: pre-wrap; }
           <property name="text">
            <string>Global</string>
           </property>
           <property name="text">
            <string>Global</string>
           </property>
-          <attribute name="buttonGroup">
-           <string>scopeButtonGroup</string>
-          </attribute>
          </widget>
         </item>
         <item>
          </widget>
         </item>
         <item>
@@ -225,9 +210,6 @@ p, li { white-space: pre-wrap; }
           <property name="text">
            <string>Network</string>
           </property>
           <property name="text">
            <string>Network</string>
           </property>
-          <attribute name="buttonGroup">
-           <string>scopeButtonGroup</string>
-          </attribute>
          </widget>
         </item>
         <item>
          </widget>
         </item>
         <item>
@@ -235,9 +217,6 @@ p, li { white-space: pre-wrap; }
           <property name="text">
            <string>Channel</string>
           </property>
           <property name="text">
            <string>Channel</string>
           </property>
-          <attribute name="buttonGroup">
-           <string>scopeButtonGroup</string>
-          </attribute>
          </widget>
         </item>
        </layout>
          </widget>
         </item>
        </layout>
@@ -312,9 +291,4 @@ p, li { white-space: pre-wrap; }
    </hints>
   </connection>
  </connections>
    </hints>
   </connection>
  </connections>
- <buttongroups>
-  <buttongroup name="typeButtonGroup"/>
-  <buttongroup name="strictnessButtonGroup"/>
-  <buttongroup name="scopeButtonGroup"/>
- </buttongroups>
 </ui>
 </ui>
index 62dfc88..8ee11d4 100644 (file)
@@ -82,6 +82,7 @@ void IgnoreListSettingsPage::save() {
   if(_ignoreListModel.configChanged()) {
     _ignoreListModel.commit();
   }
   if(_ignoreListModel.configChanged()) {
     _ignoreListModel.commit();
   }
+  ui.ignoreListView->selectionModel()->reset();
 }
 
 void IgnoreListSettingsPage::enableDialog(bool enabled) {
 }
 
 void IgnoreListSettingsPage::enableDialog(bool enabled) {
@@ -161,6 +162,16 @@ IgnoreListEditDlg::IgnoreListEditDlg(int row, const IgnoreListManager::IgnoreLis
   setAttribute(Qt::WA_DeleteOnClose, false);
   setModal(true);
 
   setAttribute(Qt::WA_DeleteOnClose, false);
   setModal(true);
 
+  // setup buttongroups
+  // this could be moved to .ui file with qt4.5
+  _typeButtonGroup.addButton(ui.senderTypeButton, 0);
+  _typeButtonGroup.addButton(ui.messageTypeButton, 1);
+  _strictnessButtonGroup.addButton(ui.dynamicStrictnessButton, 0);
+  _strictnessButtonGroup.addButton(ui.permanentStrictnessButton, 1);
+  _scopeButtonGroup.addButton(ui.globalScopeButton, 0);
+  _scopeButtonGroup.addButton(ui.networkScopeButton, 1);
+  _scopeButtonGroup.addButton(ui.channelScopeButton, 2);
+
   ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
 
   ui.ignoreRuleLineEdit->setText(item.ignoreRule);
   ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
 
   ui.ignoreRuleLineEdit->setText(item.ignoreRule);
@@ -199,11 +210,9 @@ IgnoreListEditDlg::IgnoreListEditDlg(int row, const IgnoreListManager::IgnoreLis
 
   connect(ui.ignoreRuleLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(widgetHasChanged()));
   connect(ui.scopeRuleTextEdit, SIGNAL(textChanged()), this, SLOT(widgetHasChanged()));
 
   connect(ui.ignoreRuleLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(widgetHasChanged()));
   connect(ui.scopeRuleTextEdit, SIGNAL(textChanged()), this, SLOT(widgetHasChanged()));
-  connect(ui.typeButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(widgetHasChanged()));
-  connect(ui.strictnessButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(widgetHasChanged()));
-  connect(ui.scopeButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(widgetHasChanged()));
-  connect(ui.typeButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(widgetHasChanged()));
-  connect(ui.isRegExCheckBox, SIGNAL(stateChanged(int)), this, SLOT(widgetHasChanged()));
+  connect(&_typeButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(widgetHasChanged()));
+  connect(&_strictnessButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(widgetHasChanged()));
+  connect(&_scopeButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(widgetHasChanged()));
   connect(ui.isRegExCheckBox, SIGNAL(stateChanged(int)), this, SLOT(widgetHasChanged()));
   connect(ui.isActiveCheckBox, SIGNAL(stateChanged(int)), this, SLOT(widgetHasChanged()));
 
   connect(ui.isRegExCheckBox, SIGNAL(stateChanged(int)), this, SLOT(widgetHasChanged()));
   connect(ui.isActiveCheckBox, SIGNAL(stateChanged(int)), this, SLOT(widgetHasChanged()));
 
index 646b95b..4e2e85c 100644 (file)
@@ -22,6 +22,7 @@
 #define IGNORELISTSETTINGSPAGE_H
 
 #include <QStyledItemDelegate>
 #define IGNORELISTSETTINGSPAGE_H
 
 #include <QStyledItemDelegate>
+#include <QButtonGroup>
 
 #include "settingspage.h"
 #include "ui_ignorelistsettingspage.h"
 
 #include "settingspage.h"
 #include "ui_ignorelistsettingspage.h"
@@ -61,6 +62,9 @@ private:
   IgnoreListManager::IgnoreListItem _clonedIgnoreListItem;
   bool _hasChanged;
   Ui::IgnoreListEditDlg ui;
   IgnoreListManager::IgnoreListItem _clonedIgnoreListItem;
   bool _hasChanged;
   Ui::IgnoreListEditDlg ui;
+  QButtonGroup _typeButtonGroup;
+  QButtonGroup _strictnessButtonGroup;
+  QButtonGroup _scopeButtonGroup;
 };
 
 class IgnoreListSettingsPage : public SettingsPage {
 };
 
 class IgnoreListSettingsPage : public SettingsPage {