<property name="text">
<string>Dynamic</string>
</property>
- <attribute name="buttonGroup">
- <string>strictnessButtonGroup</string>
- </attribute>
</widget>
</item>
<item>
<property name="text">
<string>Permanent</string>
</property>
- <attribute name="buttonGroup">
- <string>strictnessButtonGroup</string>
- </attribute>
</widget>
</item>
</layout>
<property name="text">
<string>Sender</string>
</property>
- <attribute name="buttonGroup">
- <string>typeButtonGroup</string>
- </attribute>
</widget>
</item>
<item>
<property name="text">
<string>Message</string>
</property>
- <attribute name="buttonGroup">
- <string>typeButtonGroup</string>
- </attribute>
</widget>
</item>
</layout>
<property name="text">
<string>Global</string>
</property>
- <attribute name="buttonGroup">
- <string>scopeButtonGroup</string>
- </attribute>
</widget>
</item>
<item>
<property name="text">
<string>Network</string>
</property>
- <attribute name="buttonGroup">
- <string>scopeButtonGroup</string>
- </attribute>
</widget>
</item>
<item>
<property name="text">
<string>Channel</string>
</property>
- <attribute name="buttonGroup">
- <string>scopeButtonGroup</string>
- </attribute>
</widget>
</item>
</layout>
</hints>
</connection>
</connections>
- <buttongroups>
- <buttongroup name="typeButtonGroup"/>
- <buttongroup name="strictnessButtonGroup"/>
- <buttongroup name="scopeButtonGroup"/>
- </buttongroups>
</ui>
if(_ignoreListModel.configChanged()) {
_ignoreListModel.commit();
}
+ ui.ignoreListView->selectionModel()->reset();
}
void IgnoreListSettingsPage::enableDialog(bool enabled) {
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);
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()));
#define IGNORELISTSETTINGSPAGE_H
#include <QStyledItemDelegate>
+#include <QButtonGroup>
#include "settingspage.h"
#include "ui_ignorelistsettingspage.h"
IgnoreListManager::IgnoreListItem _clonedIgnoreListItem;
bool _hasChanged;
Ui::IgnoreListEditDlg ui;
+ QButtonGroup _typeButtonGroup;
+ QButtonGroup _strictnessButtonGroup;
+ QButtonGroup _scopeButtonGroup;
};
class IgnoreListSettingsPage : public SettingsPage {