Qmmp
/usr/src/RPM/BUILD/qmmp-0.7-svn/src/qmmpui/qmmpuisettings.h
00001 /***************************************************************************
00002  *   Copyright (C) 2012 by Ilya Kotov                                      *
00003  *   forkotov02@hotmail.ru                                                 *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
00019  ***************************************************************************/
00020 
00021 #ifndef QMMPUISETTINGS_H
00022 #define QMMPUISETTINGS_H
00023 
00024 #include <QObject>
00025 #include <QStringList>
00026 
00030 class QmmpUiSettings : public QObject
00031 {
00032     Q_OBJECT
00033 public:
00039     explicit QmmpUiSettings(QObject *parent = 0);
00043     virtual ~QmmpUiSettings();
00047     bool convertUnderscore() const;
00051     bool convertTwenty() const;
00055     bool useMetadata() const;
00059     const QString format() const;
00064     void setConvertUnderscore(bool enabled);
00069     void setConvertTwenty(bool enabled);
00074     void setFormat(const QString &format);
00079     void setUseMetadata(bool enabled);
00083     bool resumeOnStartup() const;
00088     void setResumeOnStartup(bool enabled);
00092     QStringList restrictFilters() const;
00096     void setRestrictFilters(const QString &filters);
00100     QStringList excludeFilters() const;
00105     void setExcludeFilters(const QString &filters);
00110     bool useDefaultPlayList() const;
00114     QString defaultPlayListName() const;
00120     void setDefaultPlayList(const QString &name, bool enabled = true);
00124     static QmmpUiSettings* instance();
00125 
00126 public slots:
00130     void sync();
00131 
00132 private:
00133     static QmmpUiSettings* m_instance;
00134     //playlist
00135     bool m_convertUnderscore, m_convertTwenty;
00136     bool m_useMetadata;
00137     QString m_format;
00138     //general
00139     bool m_resume_on_startup;
00140     QStringList m_exclude_filters, m_restrict_filters;
00141     //default playlist
00142     bool m_use_default_pl;
00143     QString m_default_pl_name;
00144 
00145 
00146 };
00147 
00148 #endif // QMMPUISETTINGS_H
 All Classes Functions Variables Enumerations Enumerator