bool JabberSearch::execDiscoFeature(const Jid &AStreamJid, const QString &AFeature, const IDiscoInfo &ADiscoInfo) { if (AFeature == NS_JABBER_SEARCH) { showSearchDialog(AStreamJid,ADiscoInfo.contactJid,NULL); return true; } return false; }
void JabberSearch::onSearchActionTriggered(bool) { Action *action = qobject_cast<Action *>(sender()); if (action) { Jid streamJid = action->data(ADR_StreamJid).toString(); Jid serviceJid = action->data(ADR_ServiceJid).toString(); showSearchDialog(streamJid,serviceJid,NULL); } }
void PluginView::onItemActivated(const QModelIndex &index) { const QVariantMap type = index.data(PluginNavModel::ValueRole).toMap(); if (type.isEmpty()) { showSearchDialog(); } else if (type.value("type") == Resources::CATEGORY) { showCategories(index.data(PluginNavModel::NameRole).toString(), type.value("id").toString()); } else if (type.value("type") == Resources::PLAYLIST) { showPlaylists(index.data(PluginNavModel::NameRole).toString(), type.value("id").toString()); } else if (type.value("type") == Resources::ARTIST) { showArtists(index.data(PluginNavModel::NameRole).toString(), type.value("id").toString()); } else { showTracks(index.data(PluginNavModel::NameRole).toString(), type.value("id").toString()); } }
MainWindow::MainWindow() : serviceProvider(0), markerManager(0), positionSource(0), lastNavigator(0), tracking(true), firstUpdate(true) { // our actual maps widget is the centre of the mainwindow mapsWidget = new MapsWidget; setCentralWidget(mapsWidget); // set up the menus QMenuBar *mbar = new QMenuBar(this); mbar->addAction("Quit", qApp, SLOT(quit())); mbar->addAction("My Location", this, SLOT(goToMyLocation())); QMenu *searchMenu = new QMenu("Search"); mbar->addMenu(searchMenu); searchMenu->addAction("For address or name", this, SLOT(showSearchDialog())); QMenu *navigateMenu = new QMenu("Directions"); mbar->addMenu(navigateMenu); navigateMenu->addAction("From here to address", this, SLOT(showNavigateDialog())); setMenuBar(mbar); setWindowTitle("Maps Demo"); // now begin the process of opening the network link netConfigManager = new QNetworkConfigurationManager; connect(netConfigManager, SIGNAL(updateCompleted()), this, SLOT(openNetworkSession())); netConfigManager->updateConfigurations(); }
void SoundCloudView::onItemActivated(const QModelIndex &index) { switch (index.row()) { case 0: showAccounts(); break; case 1: showSearchDialog(); break; case 2: showTracks(); break; case 3: showFavourites(); break; case 4: showPlaylists(); break; case 5: showFollowings(); break; default: break; } }