PodcatcherUI::PodcatcherUI() { view = SailfishApp::createView(); m_channelsModel = m_pManager.podcastChannelsModel(); view->rootContext()->setContextProperty("channelsModel", m_channelsModel); view->rootContext()->setContextProperty("ui", this); view->setSource(SailfishApp::pathTo("qml/Podcatcher.qml")); modelFactory = PodcastEpisodesModelFactory::episodesFactory(); connect(&m_pManager, SIGNAL(showInfoBanner(QString)), this, SIGNAL(showInfoBanner(QString))); connect(&m_pManager, SIGNAL(downloadingPodcasts(bool)), this, SIGNAL(downloadingPodcasts(bool))); connect(&m_pManager, SIGNAL(downloadingPodcasts(bool)), this, SLOT(onDownloadingPodcast(bool))); QObject *rootDeclarativeItem = view->rootObject(); connect(rootDeclarativeItem, SIGNAL(showChannel(QString)), this, SLOT(onShowChannel(QString))); connect(rootDeclarativeItem, SIGNAL(deleteChannel(QString)), this, SLOT(onDeleteChannel(QString))); connect(rootDeclarativeItem, SIGNAL(downloadPodcast(int, int)), this, SLOT(onDownloadPodcast(int, int))); connect(rootDeclarativeItem, SIGNAL(playPodcast(int, int)), this, SLOT(onPlayPodcast(int, int))); connect(rootDeclarativeItem, SIGNAL(cancelDownload(int, int)), this, SLOT(onCancelDownload(int, int))); connect(rootDeclarativeItem, SIGNAL(cancelQueue(int, int)), this, SLOT(onCancelQueueing(int, int))); connect(rootDeclarativeItem, SIGNAL(allListened(QString)), this, SLOT(onAllListened(QString))); connect(rootDeclarativeItem, SIGNAL(deleteDownloaded(int, int)), this, SLOT(onDeletePodcast(int, int))); connect(rootDeclarativeItem, SIGNAL(startStreaming(int, int)), this, SLOT(onStartStreaming(int, int))); m_pManager.refreshAllChannels(); // Refresh all feeds and download new episodes. QTimer::singleShot(10000, &m_pManager, SLOT(cleanupEpisodes())); connect(rootDeclarativeItem, SIGNAL(autoDownloadChanged(int, bool)), this, SLOT(onAutoDownloadChanged(int, bool))); view->show(); qDebug() << "Paths:\n" << PODCATCHER_PATH <<"\n" << PODCATCHER_PODCAST_DLDIR; }
void arnStringPacketVisualizer::mouseDoubleClickEvent(QMouseEvent */*e*/) { int i; for ( i = 0; i < int(ChannelList->count()); ++i ) { showChannel(i); } // QFrame::mouseDoubleClickEvent(e); }
void arnSliderGroup::mouseDoubleClickEvent(QMouseEvent */*e*/) { for (int i = 0; i < int(SliderList->count()); ++i ) {showChannel(i);} // if (e->button () == Qt::RightButton) { // for (int i = 0; i < int(SliderList->count()); ++i ) {showChannel(i);} // } // else QFrame::mouseDoubleClickEvent(e); }