Clear playlist
This commit is contained in:
parent
9a638e377e
commit
4ab13c03de
4
TODO
4
TODO
|
@ -7,6 +7,10 @@
|
|||
- Global shortcut keys
|
||||
- Make QSortFilterProxyModel on the library obey hasChildren()
|
||||
- Database versioning
|
||||
- Delete on playlist focuses next item
|
||||
- Enter on playlist plays
|
||||
- Clicking play plays selected item
|
||||
- More actions in playlist context menu
|
||||
|
||||
Long-term:
|
||||
- iPod
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -48,5 +48,6 @@
|
|||
<file>last.fm/my_neighbours.png</file>
|
||||
<file>last.fm/user_purple.png</file>
|
||||
<file>list-remove.png</file>
|
||||
<file>clear-list.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -80,6 +80,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
connect(ui_.library_filter, SIGNAL(textChanged(QString)), library_, SLOT(SetFilterText(QString)));
|
||||
connect(ui_.action_ban, SIGNAL(triggered()), radio_model_->GetLastFMService(), SLOT(Ban()));
|
||||
connect(ui_.action_love, SIGNAL(triggered()), SLOT(Love()));
|
||||
connect(ui_.action_clear_playlist, SIGNAL(triggered()), playlist_, SLOT(Clear()));
|
||||
|
||||
// Give actions to buttons
|
||||
ui_.forward_button->setDefaultAction(ui_.action_next_track);
|
||||
|
@ -88,6 +89,7 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
ui_.stop_button->setDefaultAction(ui_.action_stop);
|
||||
ui_.love_button->setDefaultAction(ui_.action_love);
|
||||
ui_.ban_button->setDefaultAction(ui_.action_ban);
|
||||
ui_.clear_playlist_button->setDefaultAction(ui_.action_clear_playlist);
|
||||
|
||||
// Stop actions
|
||||
QMenu* stop_menu = new QMenu(this);
|
||||
|
@ -193,7 +195,6 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
connect(stop, SIGNAL(activated()), ui_.action_stop, SLOT(trigger()));
|
||||
connect(next, SIGNAL(activated()), ui_.action_next_track, SLOT(trigger()));
|
||||
connect(prev, SIGNAL(activated()), ui_.action_previous_track, SLOT(trigger()));
|
||||
connect(play_pause, SIGNAL(activated()), this, SLOT(close()));
|
||||
|
||||
// Analyzer
|
||||
ui_.analyzer->set_engine(player_->GetEngine());
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<string>Clementine</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset>
|
||||
<iconset resource="../data/data.qrc">
|
||||
<normaloff>:/icon.png</normaloff>:/icon.png</iconset>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
|
@ -78,6 +78,26 @@
|
|||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QToolButton" name="clear_playlist_button">
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>22</width>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="back_button">
|
||||
<property name="iconSize">
|
||||
|
@ -274,7 +294,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="library_filter_clear">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="../data/data.qrc">
|
||||
<normaloff>:/clear.png</normaloff>:/clear.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
|
@ -294,7 +314,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="library_options">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="../data/data.qrc">
|
||||
<normaloff>:/configure.png</normaloff>:/configure.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
|
@ -410,7 +430,7 @@
|
|||
</widget>
|
||||
<action name="action_previous_track">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="../data/data.qrc">
|
||||
<normaloff>:/media-skip-backward.png</normaloff>:/media-skip-backward.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -419,7 +439,7 @@
|
|||
</action>
|
||||
<action name="action_play_pause">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="../data/data.qrc">
|
||||
<normaloff>:/media-playback-start.png</normaloff>:/media-playback-start.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -431,7 +451,7 @@
|
|||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="../data/data.qrc">
|
||||
<normaloff>:/media-playback-stop.png</normaloff>:/media-playback-stop.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -440,7 +460,7 @@
|
|||
</action>
|
||||
<action name="action_next_track">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="../data/data.qrc">
|
||||
<normaloff>:/media-skip-forward.png</normaloff>:/media-skip-forward.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -449,7 +469,7 @@
|
|||
</action>
|
||||
<action name="action_quit">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="../data/data.qrc">
|
||||
<normaloff>:/exit.png</normaloff>:/exit.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -461,7 +481,7 @@
|
|||
</action>
|
||||
<action name="action_stop_after_this_track">
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="../data/data.qrc">
|
||||
<normaloff>:/media-playback-stop.png</normaloff>:/media-playback-stop.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -527,7 +547,7 @@
|
|||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="../data/data.qrc">
|
||||
<normaloff>:/last.fm/love.png</normaloff>:/last.fm/love.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
|
@ -539,13 +559,25 @@
|
|||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset>
|
||||
<iconset resource="../data/data.qrc">
|
||||
<normaloff>:/last.fm/ban.png</normaloff>:/last.fm/ban.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ban</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_clear_playlist">
|
||||
<property name="icon">
|
||||
<iconset resource="../data/data.qrc">
|
||||
<normaloff>:/clear-list.png</normaloff>:/clear-list.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Clear playlist</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Clear playlist</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
@ -582,6 +614,8 @@
|
|||
<header>radioview.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../data/data.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -496,3 +496,9 @@ void Playlist::UpdateScrobblePoint() {
|
|||
scrobble_point_ = point;
|
||||
has_scrobbled_ = false;
|
||||
}
|
||||
|
||||
void Playlist::Clear() {
|
||||
qDeleteAll(items_);
|
||||
items_.clear();
|
||||
reset();
|
||||
}
|
||||
|
|
|
@ -99,6 +99,8 @@ class Playlist : public QAbstractListModel {
|
|||
void ClearStreamMetadata();
|
||||
void SetStreamMetadata(const QUrl& url, const Song& song);
|
||||
|
||||
void Clear();
|
||||
|
||||
signals:
|
||||
void CurrentSongChanged(const Song& metadata);
|
||||
|
||||
|
|
Loading…
Reference in New Issue