Implement a XSettings Class as interface to xmms2d's serverside config
This commit is contained in:
parent
778d828db8
commit
cbb6ed1d15
6 changed files with 127 additions and 10 deletions
51
lib/xsettings.h
Normal file
51
lib/xsettings.h
Normal file
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* This file is a part of Promoe, an XMMS2 Client
|
||||
*
|
||||
* Copyright (C) 2007 Thomas Frauendorfer
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef __XSETTINGS__
|
||||
#define __XSETTINGS__
|
||||
|
||||
class XSettings;
|
||||
|
||||
#include "xclient.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QHash>
|
||||
#include <QString>
|
||||
|
||||
class XSettings : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
XSettings (QObject *parent, XClient *client);
|
||||
|
||||
QString valueGet (QString key);
|
||||
void valueSet (QString key, QString value);
|
||||
void valueRegister (QString key, QString defval);
|
||||
|
||||
signals:
|
||||
void configChanged(QString key, QString value);
|
||||
|
||||
public slots:
|
||||
void got_connection(XClient *);
|
||||
|
||||
private:
|
||||
bool handle_config_value_changed (const Xmms::Dict &value);
|
||||
|
||||
QHash < QString, QString > m_config_cache;
|
||||
XClient *m_client;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue