aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2013-08-19 19:14:19 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2013-08-19 19:14:19 +0000
commitc3853fb6d5669090d5da21eb8f31ea57526f3456 (patch)
tree3bff3e662514affd084f6c037d4f5522c8bb4dbb /src
parent51f31d588dc227b06bd94b9a109592bcb0d3d239 (diff)
downloadqmmp-c3853fb6d5669090d5da21eb8f31ea57526f3456.tar.gz
qmmp-c3853fb6d5669090d5da21eb8f31ea57526f3456.tar.bz2
qmmp-c3853fb6d5669090d5da21eb8f31ea57526f3456.zip
fixed title format updating bug, added group format option
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@3624 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
-rw-r--r--src/qmmpui/qmmpuisettings.cpp21
-rw-r--r--src/qmmpui/qmmpuisettings.h16
2 files changed, 22 insertions, 15 deletions
diff --git a/src/qmmpui/qmmpuisettings.cpp b/src/qmmpui/qmmpuisettings.cpp
index cab477ad7..581266242 100644
--- a/src/qmmpui/qmmpuisettings.cpp
+++ b/src/qmmpui/qmmpuisettings.cpp
@@ -85,12 +85,11 @@ void QmmpUiSettings::setConvertTwenty(bool yes)
m_convertTwenty = yes;
}
-void QmmpUiSettings::setTitleFormat(const QString &format)
+void QmmpUiSettings::setTitleFormat(const QString &titleFormat)
{
- m_title_format = format;
- if(format != m_title_format)
+ if(titleFormat != m_title_format)
{
- m_title_format = format;
+ m_title_format = titleFormat;
foreach(PlayListModel *model, PlayListManager::instance()->playLists())
{
model->doCurrentVisibleRequest();
@@ -98,6 +97,20 @@ void QmmpUiSettings::setTitleFormat(const QString &format)
}
}
+void QmmpUiSettings::setGroupFormat(const QString &groupFormat)
+{
+ if(groupFormat != m_group_format)
+ {
+ m_group_format = groupFormat;
+ if(!PlayListManager::instance()->isGroupsEnabled())
+ return;
+ foreach(PlayListModel *model, PlayListManager::instance()->playLists())
+ {
+ model->prepareGroups(true);
+ }
+ }
+}
+
void QmmpUiSettings::setUseMetadata(bool yes)
{
m_useMetadata = yes;
diff --git a/src/qmmpui/qmmpuisettings.h b/src/qmmpui/qmmpuisettings.h
index 1e87e6702..1c8915224 100644
--- a/src/qmmpui/qmmpuisettings.h
+++ b/src/qmmpui/qmmpuisettings.h
@@ -42,17 +42,6 @@ public:
*/
virtual ~QmmpUiSettings();
/*!
- * Enum of the available group formats
- */
- enum GroupFormat
- {
- NONE = 0, /*!< disable groups */
- ARTIST_ALBUM, /*!< by artist/album */
- ARTIST_DATE_ALBUM, /*!< by artist/date/album */
- ARTIST, /*!< by artist */
- CUSTOM /*!< by user defined formar */
- };
- /*!
* Returns state of the "Convert underscores to blanks" option (\b true - enabled, \b false - disabled).
*/
bool convertUnderscore() const;
@@ -88,6 +77,11 @@ public:
*/
void setTitleFormat(const QString &titleFormat);
/*!
+ * Sets group format.
+ * \param groupFormat group format. \sa MetaDataFormatter
+ */
+ void setGroupFormat(const QString &groupFormat);
+ /*!
* Sets metadata usage option state to \b enabled
* @param enabled Option state (\b true - enabled, \b false - disabled)
*/