~ubuntu-branches/debian/sid/deepin-music/sid

« back to all changes in this revision

Viewing changes to music-player/core/musicsettings.h

  • Committer: Package Import Robot
  • Author(s): Yanhao Mo
  • Date: 2018-04-05 10:21:16 UTC
  • Revision ID: package-import@ubuntu.com-20180405102116-bhwn31gtf51wkvi8
Tags: upstream-3.1.8+ds
ImportĀ upstreamĀ versionĀ 3.1.8+ds

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2016 ~ 2018 Wuhan Deepin Technology Co., Ltd.
 
3
 *
 
4
 * Author:     Iceyer <me@iceyer.net>
 
5
 *
 
6
 * Maintainer: Iceyer <me@iceyer.net>
 
7
 *
 
8
 * This program is free software: you can redistribute it and/or modify
 
9
 * it under the terms of the GNU General Public License as published by
 
10
 * the Free Software Foundation, either version 3 of the License, or
 
11
 * any later version.
 
12
 *
 
13
 * This program is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 * GNU General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU General Public License
 
19
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
20
 */
 
21
 
 
22
#pragma once
 
23
 
 
24
#include <util/singleton.h>
 
25
#include <DSettings>
 
26
 
 
27
class MusicSettings : public QObject, public DMusic::DSingleton<MusicSettings>
 
28
{
 
29
    Q_OBJECT
 
30
public:
 
31
    explicit MusicSettings(QObject *parent = 0);
 
32
    ~MusicSettings();
 
33
 
 
34
    static void init();
 
35
    static QPointer<Dtk::Core::DSettings> settings();
 
36
 
 
37
    static void sync();
 
38
    static QVariant value(const QString &key);
 
39
    static void setOption(const QString &key, const QVariant &value);
 
40
 
 
41
private:
 
42
    static QPointer<Dtk::Core::DSettings> m_settings;
 
43
    friend class DMusic::DSingleton<MusicSettings>;
 
44
};