2010-03-08 19:05:41 +01:00
|
|
|
#ifndef PLAYLISTSEQUENCE_H
|
|
|
|
#define PLAYLISTSEQUENCE_H
|
2010-03-08 15:08:54 +01:00
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
2010-03-08 19:05:41 +01:00
|
|
|
#include "ui_playlistsequence.h"
|
2010-03-08 15:08:54 +01:00
|
|
|
|
2010-03-08 18:55:40 +01:00
|
|
|
class QMenu;
|
|
|
|
|
2010-03-08 19:05:41 +01:00
|
|
|
class PlaylistSequence : public QWidget {
|
2010-03-08 15:08:54 +01:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2010-03-08 19:05:41 +01:00
|
|
|
PlaylistSequence(QWidget *parent = 0);
|
2010-03-08 15:08:54 +01:00
|
|
|
|
|
|
|
enum RepeatMode {
|
|
|
|
Repeat_Off = 0,
|
|
|
|
Repeat_Track = 1,
|
|
|
|
Repeat_Album = 2,
|
|
|
|
Repeat_Playlist = 3,
|
|
|
|
};
|
|
|
|
enum ShuffleMode {
|
|
|
|
Shuffle_Off = 0,
|
|
|
|
Shuffle_All = 1,
|
|
|
|
Shuffle_Album = 2,
|
|
|
|
};
|
|
|
|
|
|
|
|
static const char* kSettingsGroup;
|
|
|
|
|
2010-03-08 18:55:40 +01:00
|
|
|
RepeatMode repeat_mode() const { return repeat_mode_; }
|
|
|
|
ShuffleMode shuffle_mode() const { return shuffle_mode_; }
|
2010-03-08 15:08:54 +01:00
|
|
|
|
2010-03-12 02:03:43 +01:00
|
|
|
QMenu* repeat_menu() const { return repeat_menu_; }
|
|
|
|
QMenu* shuffle_menu() const { return shuffle_menu_; }
|
|
|
|
|
2010-03-08 15:08:54 +01:00
|
|
|
public slots:
|
2010-03-08 19:05:41 +01:00
|
|
|
void SetRepeatMode(PlaylistSequence::RepeatMode mode);
|
|
|
|
void SetShuffleMode(PlaylistSequence::ShuffleMode mode);
|
2010-03-08 15:08:54 +01:00
|
|
|
|
|
|
|
signals:
|
2010-03-08 19:05:41 +01:00
|
|
|
void RepeatModeChanged(PlaylistSequence::RepeatMode mode);
|
|
|
|
void ShuffleModeChanged(PlaylistSequence::ShuffleMode mode);
|
2010-03-08 15:08:54 +01:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void RepeatActionTriggered(QAction*);
|
|
|
|
void ShuffleActionTriggered(QAction*);
|
|
|
|
|
2010-03-08 18:55:40 +01:00
|
|
|
private:
|
|
|
|
void Load();
|
|
|
|
void Save();
|
|
|
|
|
2010-03-08 15:08:54 +01:00
|
|
|
private:
|
2010-03-08 19:05:41 +01:00
|
|
|
Ui::PlaylistSequence ui_;
|
2010-03-08 15:08:54 +01:00
|
|
|
|
|
|
|
QMenu* repeat_menu_;
|
|
|
|
QMenu* shuffle_menu_;
|
|
|
|
|
|
|
|
bool loading_;
|
|
|
|
RepeatMode repeat_mode_;
|
|
|
|
ShuffleMode shuffle_mode_;
|
|
|
|
};
|
|
|
|
|
2010-03-08 19:05:41 +01:00
|
|
|
#endif // PLAYLISTSEQUENCE_H
|