mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-08 10:02:29 +02:00
Added Select All facility to Spotify Account Config Diaglog to allow easy sync of all playlists.
This commit is contained in:
parent
15f6a60e9d
commit
499ab3c458
@ -52,6 +52,7 @@ SpotifyAccountConfig::SpotifyAccountConfig( SpotifyAccount *account )
|
||||
|
||||
connect( m_ui->usernameEdit, SIGNAL( textEdited( QString ) ), this, SLOT( resetLoginButton() ) );
|
||||
connect( m_ui->passwordEdit, SIGNAL( textEdited( QString ) ), this, SLOT( resetLoginButton() ) );
|
||||
connect( m_ui->selectAllCheckbox, SIGNAL( stateChanged( int ) ), this, SLOT( selectAllPlaylists()));
|
||||
loadFromConfig();
|
||||
|
||||
m_playlistsLoading = new AnimatedSpinner( m_ui->playlistList );
|
||||
@ -203,6 +204,19 @@ SpotifyAccountConfig::loginResponse( bool success, const QString& msg, const QSt
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
SpotifyAccountConfig::selectAllPlaylists()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << "Setting playlists to sync";
|
||||
|
||||
for(int i = 0; i < m_ui->playlistList->count(); i++)
|
||||
{
|
||||
QListWidgetItem* item = m_ui->playlistList->item( i );
|
||||
item->setCheckState(m_ui->selectAllCheckbox->checkState());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SpotifyAccountConfig::showLoggedIn()
|
||||
{
|
||||
|
@ -70,6 +70,7 @@ protected:
|
||||
private slots:
|
||||
void doLogin();
|
||||
void resetLoginButton();
|
||||
void selectAllPlaylists();
|
||||
|
||||
private:
|
||||
void showLoggedIn();
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>375</width>
|
||||
<height>417</height>
|
||||
<width>435</width>
|
||||
<height>487</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -34,7 +34,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../../resources.qrc">:/data/images/spotify-logo.png</pixmap>
|
||||
<pixmap resource="../../../../resources.qrc">:/data/images/spotify-logo.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
@ -135,6 +135,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="selectAllCheckbox">
|
||||
<property name="text">
|
||||
<string>Select All</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="playlistList"/>
|
||||
</item>
|
||||
@ -161,7 +168,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../../resources.qrc"/>
|
||||
<include location="../../../../resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
Loading…
x
Reference in New Issue
Block a user