aboutsummaryrefslogtreecommitdiff
path: root/src/qmmpui/mediaplayer.h
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-03-12 15:45:54 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-03-12 15:45:54 +0000
commit657434a5ec73229ba4211127dce4eef6ff1a8bc9 (patch)
treecb5883539633f6b99dc926bdd563d18e34ab44fd /src/qmmpui/mediaplayer.h
parent765b3a9ba1a59ec3248c8948d4cf5a53f92b40d5 (diff)
downloadqmmp-657434a5ec73229ba4211127dce4eef6ff1a8bc9.tar.gz
qmmp-657434a5ec73229ba4211127dce4eef6ff1a8bc9.tar.bz2
qmmp-657434a5ec73229ba4211127dce4eef6ff1a8bc9.zip
general plugin api documentation
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@842 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/qmmpui/mediaplayer.h')
-rw-r--r--src/qmmpui/mediaplayer.h58
1 files changed, 48 insertions, 10 deletions
diff --git a/src/qmmpui/mediaplayer.h b/src/qmmpui/mediaplayer.h
index cb52ffa37..a595b8453 100644
--- a/src/qmmpui/mediaplayer.h
+++ b/src/qmmpui/mediaplayer.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2008 by Ilya Kotov *
+ * Copyright (C) 2008-2009 by Ilya Kotov *
* forkotov02@hotmail.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -25,32 +25,70 @@
class PlayListModel;
class SoundCore;
-/**
- @author Ilya Kotov <forkotov02@hotmail.ru>
-*/
+/*! @brief The MediaPlayer class provides a simple way to use SoundCore and PlayListModel together.
+ * @author Ilya Kotov <forkotov02@hotmail.ru>
+ */
class MediaPlayer : public QObject
{
-Q_OBJECT
+ Q_OBJECT
public:
+ /*!
+ * Object constructor,
+ * @param parent Parent object
+ */
MediaPlayer(QObject *parent = 0);
-
+ /*!
+ * Destructor
+ */
~MediaPlayer();
-
+ /*!
+ * Returns a pointer to the object's instance.
+ */
static MediaPlayer* instance();
-
+ /*!
+ * Prepares object for usage.
+ * @param core Pointer to the SoundCore object.
+ * @param model Playlist model
+ */
void initialize(SoundCore *core, PlayListModel *model);
+ /*!
+ * Returns playlist model pointer
+ */
PlayListModel *playListModel();
+ /*!
+ * Returns \b true if "Repeate Track" option is enabled, otherwise \b false
+ */
bool isRepeatable() const;
public slots:
+ /*!
+ * Starts playback.
+ */
void play();
+ /*!
+ * Stops playback.
+ */
void stop();
+ /*!
+ * Sets next playlist item for playing.
+ */
void next();
+ /*!
+ * Sets previous playlist item for playing.
+ */
void previous();
- void setRepeatable(bool);
+ /*!
+ * Toggles the current track repeat.
+ * @param enable Repeate state of the current track (\b true - to repeat, \b false - to stop repeating)
+ */
+ void setRepeatable(bool enable);
signals:
- void repeatableChanged(bool);
+ /*!
+ * Tracks current track repeat state;
+ * @param enabled New repeate state of the current track (\b true - enabled, \b false - disabled)
+ */
+ void repeatableChanged(bool enabled);
private:
PlayListModel *m_model;