aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpplistwindow.hpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-08-05 00:19:31 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-08-05 00:19:31 +0800
commita3b10c29c5041a4706bd2e4badf25c3269909aa6 (patch)
treec81039121419cda080aa2aee700a49ced6694421 /qmidiplayer-desktop/qmpplistwindow.hpp
parentdb54b5d51d5269c2e17964e0e9842f4a2f210673 (diff)
downloadQMidiPlayer-a3b10c29c5041a4706bd2e4badf25c3269909aa6.tar.xz
I can still code!
Next / Prev track is now selected based on the current track being played rather than the selected track in the playlist window. Also fixed stupid a mistype.
Diffstat (limited to 'qmidiplayer-desktop/qmpplistwindow.hpp')
-rw-r--r--qmidiplayer-desktop/qmpplistwindow.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/qmidiplayer-desktop/qmpplistwindow.hpp b/qmidiplayer-desktop/qmpplistwindow.hpp
index 7d93345..3525f91 100644
--- a/qmidiplayer-desktop/qmpplistwindow.hpp
+++ b/qmidiplayer-desktop/qmpplistwindow.hpp
@@ -44,7 +44,9 @@ public:
QString getLastItem(bool a = false);
QString getNextItem();
QString getPrevItem();
- QString getSelectedItem();
+ QString getCurrentItem();
+ void setCurrentItem(QString item);
+ void setCurrentItem(QListWidgetItem *item);
void emptyList();
void insertItem(QString i);
void insertItems(QStringList il);
@@ -59,7 +61,7 @@ private slots:
void on_pbClear_clicked();
void on_pbRepeat_clicked();
void on_pbShuffle_clicked();
- void on_lwFiles_itemDoubleClicked();
+ void on_lwFiles_itemDoubleClicked(QListWidgetItem *item);
void on_pbSave_clicked();
void on_pbLoad_clicked();
@@ -68,6 +70,8 @@ private:
Ui::qmpPlistWindow *ui;
int shuffle, repeat; //rep 0=off 1=one 2=all
qmpSettings *settings;
+
+ int getCurrentItemIndex();
};
#endif // QMPPLISTWINDOW_H