diff options
author | Kevin Wu Won <kevin.wu-won@nokia.com> | 2010-03-31 13:52:36 +1000 |
---|---|---|
committer | Kevin Wu Won <kevin.wu-won@nokia.com> | 2010-03-31 14:43:29 +1000 |
commit | 9ed2f8552f265f49e43697287e5f97a32c0cbfe8 (patch) | |
tree | f44859f23ade24063848698d3b4e1a3cf9cb1534 /examples/samplephonebook | |
parent | e652f11d519ee65a3cbbd43a89167d5286d32991 (diff) |
Made "Filter active" label invisible when there is no filter in samplephonebook.
Relates to MOBILITY-146
Diffstat (limited to 'examples/samplephonebook')
-rw-r--r-- | examples/samplephonebook/contactlistpage.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/examples/samplephonebook/contactlistpage.cpp b/examples/samplephonebook/contactlistpage.cpp index 55a507e8d1..236f26444d 100644 --- a/examples/samplephonebook/contactlistpage.cpp +++ b/examples/samplephonebook/contactlistpage.cpp @@ -91,7 +91,7 @@ ContactListPage::ContactListPage(QMainWindow *mainWindow, QWidget *parent) } m_backendsCombo->addItems(availableManagers); connect(m_backendsCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(backendSelected())); - m_filterActiveLabel = new QLabel(tr("Inactive")); + m_filterActiveLabel = new QLabel(tr("Filter active")); m_filterActiveLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); @@ -99,7 +99,7 @@ ContactListPage::ContactListPage(QMainWindow *mainWindow, QWidget *parent) QVBoxLayout *bookLayout = new QVBoxLayout; QFormLayout *backendLayout = new QFormLayout; backendLayout->addRow(tr("Store:"), m_backendsCombo); - backendLayout->addRow(tr("Filter:"), m_filterActiveLabel); + backendLayout->addRow(m_filterActiveLabel); bookLayout->addLayout(backendLayout); m_contactsList = new QListWidget(this); @@ -208,11 +208,7 @@ void ContactListPage::backendSelected() void ContactListPage::rebuildList(const QContactFilter& filter) { - // first, check to see whether the filter does anything - if (filter == QContactFilter()) - m_filterActiveLabel->setText(tr("Inactive")); - else - m_filterActiveLabel->setText(tr("Active")); + m_filterActiveLabel->setVisible(filter != QContactFilter()); QContact currContact; m_currentFilter = filter; |