aboutsummaryrefslogtreecommitdiff
path: root/demos/widgetsgallery
diff options
context:
space:
mode:
authorStanislav Ionascu <stanislav.ionascu@nokia.com>2010-07-08 15:34:31 +0300
committerSergiy Dubovik <sergiy.dubovik@nokia.com>2010-07-09 10:40:55 +0300
commita82221835d4bd33457e1a4f4e66e2b10a166ee61 (patch)
tree3889e3b9cd7f19b3948e2cd22a623c897dc737d8 /demos/widgetsgallery
parentc86e394e70f080d7acf74109d298b40171710edf (diff)
Changes: Added relationship of options Group Header Mode and List Index with List Mode.
RevBy: Sergiy Dubovik Details: In case a list index is enabled or group header mode is changed, then the list mode is switched to grouped.
Diffstat (limited to 'demos/widgetsgallery')
-rw-r--r--demos/widgetsgallery/mlistpage.cpp12
-rw-r--r--demos/widgetsgallery/mlistpage.h2
2 files changed, 12 insertions, 2 deletions
diff --git a/demos/widgetsgallery/mlistpage.cpp b/demos/widgetsgallery/mlistpage.cpp
index a578c2a2..478cf571 100644
--- a/demos/widgetsgallery/mlistpage.cpp
+++ b/demos/widgetsgallery/mlistpage.cpp
@@ -66,6 +66,7 @@ MListPage::MListPage()
proxyModel(NULL),
#endif //HAVE_N900
imageLoader(NULL),
+ comboListMode(NULL),
actionAdvancedConfiguration(NULL),
dialogAdvancedConfiguration(NULL),
list(NULL),
@@ -355,8 +356,8 @@ void MListPage::createActions()
QStringList listModeList;
listModeList << "Plain" << "Grouped";
- combo = createComboBoxAction("List mode", listModeList);
- connect(combo, SIGNAL(currentIndexChanged(int)), this, SLOT(changeListMode(int)));
+ comboListMode = createComboBoxAction("List mode", listModeList);
+ connect(comboListMode, SIGNAL(currentIndexChanged(int)), this, SLOT(changeListMode(int)));
QStringList amountOfColumnList;
amountOfColumnList << "1 column" << "2 columns" << "3 columns" << "4 columns";
@@ -493,6 +494,10 @@ void MListPage::changeListIndexVisibility(int index)
bool indexVisible = (index == 1);
list->setIndexVisible(indexVisible);
+
+ if (indexVisible)
+ comboListMode->setCurrentIndex(Grouped);
+
}
void MListPage::changeLiveFilteringMode(int index)
@@ -531,6 +536,9 @@ void MListPage::changeGroupHeadersMode(int index)
list->setHeaderCreator(NULL);
break;
};
+
+ if (index > 0)
+ comboListMode->setCurrentIndex(Grouped);
}
void MListPage::itemClick(const QModelIndex &index)
diff --git a/demos/widgetsgallery/mlistpage.h b/demos/widgetsgallery/mlistpage.h
index 41727868..76fbd1db 100644
--- a/demos/widgetsgallery/mlistpage.h
+++ b/demos/widgetsgallery/mlistpage.h
@@ -119,6 +119,8 @@ private:
PhoneBookImageLoader *imageLoader;
#endif
+ MComboBox *comboListMode;
+
MAction *actionAdvancedConfiguration;
QPointer<MDialog> dialogAdvancedConfiguration;