SoundCloudPlaylistWindow::SoundCloudPlaylistWindow(const QString &id, StackedWindow *parent) :
    StackedWindow(parent),
    m_playlist(new SoundCloudPlaylist(this)),
    m_artist(new SoundCloudArtist(this)),
    m_model(new SoundCloudTrackModel(this)),
    m_cache(new ImageCache),
    m_thumbnail(new Image(this)),
    m_avatar(new Image(this)),
    m_nowPlayingAction(new NowPlayingAction(this)),
    m_view(new ListView(this)),
    m_delegate(new TrackDelegate(m_cache, SoundCloudTrackModel::ArtistRole, SoundCloudTrackModel::DateRole,
                                 SoundCloudTrackModel::DurationStringRole, SoundCloudTrackModel::ThumbnailUrlRole,
                                 SoundCloudTrackModel::TitleRole, this)),
    m_scrollArea(new QScrollArea(this)),
    m_titleLabel(new QLabel(this)),
    m_descriptionLabel(new TextBrowser(this)),
    m_dateLabel(new QLabel(this)),
    m_artistLabel(new QLabel(this)),
    m_noTracksLabel(new QLabel(QString("<p align='center'; style='font-size: 40px; color: %1'>%2</p>")
                                      .arg(palette().color(QPalette::Mid).name()).arg(tr("No tracks found")), this)),
    m_reloadAction(new QAction(tr("Reload"), this)),
    m_queuePlaylistAction(new QAction(tr("Queue"), this)),
    m_contextMenu(new QMenu(this)),
    m_queueAction(new QAction(tr("Queue"), this)),
    m_downloadAction(new QAction(tr("Download"), this)),
    m_shareAction(new QAction(tr("Copy URL"), this)),
    m_favouriteAction(0)
{
    loadBaseUi();
    connect(m_playlist, SIGNAL(statusChanged(QSoundCloud::ResourcesRequest::Status)),
            this, SLOT(onPlaylistStatusChanged(QSoundCloud::ResourcesRequest::Status)));
            
    m_playlist->loadPlaylist(id);
}
예제 #2
0
PluginArtistWindow::PluginArtistWindow(PluginArtist *artist, StackedWindow *parent) :
    StackedWindow(parent),
    m_artist(new PluginArtist(artist, this)),
    m_model(new QStringListModel(QStringList() << tr("Tracks") << tr("Playlists"), this)),
    m_avatar(new Image(this)),
    m_nowPlayingAction(new NowPlayingAction(this)),
    m_view(new ListView(this)),
    m_scrollArea(new QScrollArea(this)),
    m_titleLabel(new QLabel(this)),
    m_descriptionLabel(new TextBrowser(this))
{
    loadBaseUi();
    loadArtistUi();
}
예제 #3
0
PluginArtistWindow::PluginArtistWindow(const QString &service, const QString &id, StackedWindow *parent) :
    StackedWindow(parent),
    m_artist(new PluginArtist(this)),
    m_model(new QStringListModel(QStringList() << tr("Tracks") << tr("Playlists"), this)),
    m_avatar(new Image(this)),
    m_nowPlayingAction(new NowPlayingAction(this)),
    m_view(new ListView(this)),
    m_scrollArea(new QScrollArea(this)),
    m_titleLabel(new QLabel(this)),
    m_descriptionLabel(new TextBrowser(this))
{
    loadBaseUi();
    connect(m_artist, SIGNAL(statusChanged(ResourcesRequest::Status)),
            this, SLOT(onArtistStatusChanged(ResourcesRequest::Status)));
            
    m_artist->loadArtist(service, id);
}
예제 #4
0
VimeoUserWindow::VimeoUserWindow(const QString &id, StackedWindow *parent) :
    StackedWindow(parent),
    m_user(new VimeoUser(this)),
    m_model(new QStringListModel(QStringList() << tr("Videos") << tr("Likes") << tr("Albums")
                                               << tr("Subscriptions"), this)),
    m_avatar(new Image(this)),
    m_view(new ListView(this)),
    m_scrollArea(new QScrollArea(this)),
    m_titleLabel(new QLabel(this)),
    m_statsLabel(new QLabel(this)),
    m_descriptionLabel(new TextBrowser(this)),
    m_subscribeButton(new QPushButton(tr("Subscribe"), this))
{
    loadBaseUi();
    connect(m_user, SIGNAL(statusChanged(QVimeo::ResourcesRequest::Status)),
            this, SLOT(onUserStatusChanged(QVimeo::ResourcesRequest::Status)));
            
    m_user->loadUser(id);
}
예제 #5
0
VimeoUserWindow::VimeoUserWindow(const VimeoUser *user, StackedWindow *parent) :
    StackedWindow(parent),
    m_user(new VimeoUser(user, this)),
    m_model(new QStringListModel(QStringList() << tr("Videos") << tr("Likes") << tr("Albums")
                                               << tr("Subscriptions"), this)),
    m_avatar(new Image(this)),
    m_view(new ListView(this)),
    m_scrollArea(new QScrollArea(this)),
    m_titleLabel(new QLabel(this)),
    m_statsLabel(new QLabel(this)),
    m_descriptionLabel(new TextBrowser(this)),
    m_subscribeButton(new QPushButton(this))
{
    loadBaseUi();
    loadUserUi();
    connect(m_user, SIGNAL(statusChanged(QVimeo::ResourcesRequest::Status)),
            this, SLOT(onUserUpdateStatusChanged(QVimeo::ResourcesRequest::Status)));
    connect(m_user, SIGNAL(subscribedChanged()), this, SLOT(onUserSubscribedChanged())); 
    
    if ((!m_user->isSubscribed()) && (!Vimeo::instance()->userId().isEmpty())) {
        m_user->checkIfSubscribed();
    }
}