mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-17 19:37:09 +02:00
Merge pull request #126 from chrisjgell/master
THR-27: Select All Checkbox for Spotify Config Dialog
This commit is contained in:
@@ -52,6 +52,7 @@ SpotifyAccountConfig::SpotifyAccountConfig( SpotifyAccount *account )
|
|||||||
|
|
||||||
connect( m_ui->usernameEdit, SIGNAL( textEdited( QString ) ), this, SLOT( resetLoginButton() ) );
|
connect( m_ui->usernameEdit, SIGNAL( textEdited( QString ) ), this, SLOT( resetLoginButton() ) );
|
||||||
connect( m_ui->passwordEdit, 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();
|
loadFromConfig();
|
||||||
|
|
||||||
m_playlistsLoading = new AnimatedSpinner( m_ui->playlistList );
|
m_playlistsLoading = new AnimatedSpinner( m_ui->playlistList );
|
||||||
@@ -202,6 +203,15 @@ SpotifyAccountConfig::loginResponse( bool success, const QString& msg, const QSt
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
SpotifyAccountConfig::selectAllPlaylists()
|
||||||
|
{
|
||||||
|
for( int i = 0; i < m_ui->playlistList->count(); i++ )
|
||||||
|
{
|
||||||
|
QListWidgetItem* item = m_ui->playlistList->item( i );
|
||||||
|
item->setCheckState( m_ui->selectAllCheckbox->checkState() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SpotifyAccountConfig::showLoggedIn()
|
SpotifyAccountConfig::showLoggedIn()
|
||||||
|
@@ -70,6 +70,7 @@ protected:
|
|||||||
private slots:
|
private slots:
|
||||||
void doLogin();
|
void doLogin();
|
||||||
void resetLoginButton();
|
void resetLoginButton();
|
||||||
|
void selectAllPlaylists();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void showLoggedIn();
|
void showLoggedIn();
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>375</width>
|
<width>375</width>
|
||||||
<height>417</height>
|
<height>487</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -135,6 +135,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="selectAllCheckbox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Select All</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="playlistList"/>
|
<widget class="QListWidget" name="playlistList"/>
|
||||||
</item>
|
</item>
|
||||||
|
Reference in New Issue
Block a user