Mercurial > projects > qtd
diff examples/itemviews/customsortfiltermodel/window.d @ 323:7a3c43424dca signals
make all examples compile with new signals/slots
author | eldar_ins@eldar-laptop |
---|---|
date | Mon, 28 Dec 2009 16:28:55 +0500 |
parents | 256ab6cb8e85 |
children |
line wrap: on
line diff
--- a/examples/itemviews/customsortfiltermodel/window.d Sun Dec 27 21:13:38 2009 +0500 +++ b/examples/itemviews/customsortfiltermodel/window.d Mon Dec 28 16:28:55 2009 +0500 @@ -102,11 +102,11 @@ toLabel = new QLabel(tr("&To:")); toLabel.setBuddy(toDateEdit); - connect!("textChanged")(filterPatternLineEdit, &this.textFilterChanged); - connect!("currentIndexChanged")(filterSyntaxComboBox, &this.textFilterChanged); - connect!("toggled")(filterCaseSensitivityCheckBox, &this.textFilterChanged); - connect!("dateChanged")(fromDateEdit, &this.dateFilterChanged); - connect!("dateChanged")(toDateEdit, &this.dateFilterChanged); + connect(filterPatternLineEdit, "textChanged", this, "textFilterChanged"); + connect(filterSyntaxComboBox, "currentIndexChanged", this, "textFilterChanged"); + connect(filterCaseSensitivityCheckBox, "toggled", this, "textFilterChanged"); + connect(fromDateEdit, "dateChanged", this, "dateFilterChanged"); + connect(toDateEdit, "dateChanged", this, "dateFilterChanged"); proxyView = new QTreeView; proxyView.setRootIsDecorated(false); @@ -144,9 +144,9 @@ sourceView.setModel(model); } -private: +private: // slots - void textFilterChanged() + void slot_textFilterChanged() { QRegExp.PatternSyntax syntax = cast(QRegExp.PatternSyntax) filterSyntaxComboBox.itemData( filterSyntaxComboBox.currentIndex()).toInt(); @@ -158,11 +158,13 @@ proxyModel.setFilterRegExp(regExp); } - void dateFilterChanged() + void slot_dateFilterChanged() { proxyModel.setFilterMinimumDate(fromDateEdit.date()); proxyModel.setFilterMaximumDate(toDateEdit.date()); } + + mixin Q_OBJECT; private: