From 15465e82a3929d5e3ef1f01a78eecf9533137a37 Mon Sep 17 00:00:00 2001 From: Manjeet Dahiya Date: Sat, 16 Oct 2010 18:02:04 +0000 Subject: add action for showing/hiding offline contacts --- examples/GuiClient/mainDialog.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'examples/GuiClient/mainDialog.cpp') diff --git a/examples/GuiClient/mainDialog.cpp b/examples/GuiClient/mainDialog.cpp index 5965c575..d71c269b 100644 --- a/examples/GuiClient/mainDialog.cpp +++ b/examples/GuiClient/mainDialog.cpp @@ -222,6 +222,7 @@ void mainDialog::presenceChanged(const QString& bareJid, const QString& resource QMap presences = m_xmppClient.rosterManager(). getAllPresencesForBareJid(bareJid); m_rosterItemModel.updatePresence(bareJid, presences); +// m_rosterItemSortFilterModel.invalidate(); QXmppPresence& pre = presences[resource]; @@ -675,6 +676,13 @@ void mainDialog::createSettingsMenu() QAction* showXml = new QAction("Show XML Console...", ui->pushButton_settings); connect(showXml, SIGNAL(triggered()), SLOT(action_showXml())); settingsMenu->addAction(showXml); + + QAction* showOfflineContacts = new QAction("Show offline contacts", ui->pushButton_settings); + showOfflineContacts->setCheckable(true); + showOfflineContacts->setChecked(true); + connect(showOfflineContacts, SIGNAL(triggered(bool)), + &m_rosterItemSortFilterModel, SLOT(setShowOfflineContacts(bool))); + settingsMenu->addAction(showOfflineContacts); } void mainDialog::closeEvent(QCloseEvent *event) -- cgit v1.2.3