projects
/
jenirok
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Architecture changed to allow easier addition of new phone books. Norwegian phonebook...
[jenirok]
/
src
/
gui
/
buttonselector.cpp
diff --git
a/src/gui/buttonselector.cpp
b/src/gui/buttonselector.cpp
index
6ba49da
..
9c7ff39
100644
(file)
--- a/
src/gui/buttonselector.cpp
+++ b/
src/gui/buttonselector.cpp
@@
-24,6
+24,7
@@
QMaemo5ValueButton(text, parent), selector_(0), model_(0)
{
setValueLayout(QMaemo5ValueButton::ValueBesideText);
selector_ = new QMaemo5ListPickSelector(this);
{
setValueLayout(QMaemo5ValueButton::ValueBesideText);
selector_ = new QMaemo5ListPickSelector(this);
+ connect(selector_, SIGNAL(selected(QString const&)), this, SLOT(onSelected(QString const&)));
model_ = new QStandardItemModel(0, 1);
selector_->setModel(model_);
setPickSelector(selector_);
model_ = new QStandardItemModel(0, 1);
selector_->setModel(model_);
setPickSelector(selector_);
@@
-114,7
+115,7
@@
QVariant ButtonSelector::value() const
bool ButtonSelector::changeItem(unsigned int index,
QString const& text)
{
bool ButtonSelector::changeItem(unsigned int index,
QString const& text)
{
- changeItem(index, text, QVariant(text));
+ return changeItem(index, text, QVariant(text));
}
bool ButtonSelector::changeItem(unsigned int index,
}
bool ButtonSelector::changeItem(unsigned int index,
@@
-138,3
+139,8
@@
bool ButtonSelector::removeItem(unsigned int index)
{
return model_->removeRow(index);
}
{
return model_->removeRow(index);
}
+
+void ButtonSelector::onSelected(QString const& text)
+{
+ emit selected(currentIndex(), text, value());
+}