forked from len0rd/rockbox
rbutil: rework rbsettings to have less code dublication.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17244 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
35f41e666d
commit
7449751cff
2 changed files with 72 additions and 130 deletions
|
|
@ -101,6 +101,7 @@ class RbSettings : public QObject
|
|||
QString curResolution();
|
||||
int curTargetId();
|
||||
|
||||
//! Set Fucntions
|
||||
void setOfPath(QString path);
|
||||
void setCachePath(QString path);
|
||||
void setBuild(QString build);
|
||||
|
|
@ -130,6 +131,20 @@ class RbSettings : public QObject
|
|||
void setEncoderNarrowband(QString enc,bool nb);
|
||||
|
||||
private:
|
||||
|
||||
//! helper function to get an entry in the current platform section
|
||||
QVariant deviceSettingCurGet(QString entry,QString def="");
|
||||
//! helper function to get an entry out of a group in the userSettings
|
||||
QVariant userSettingsGroupGet(QString group,QString entry,QVariant def="");
|
||||
//! helper function to set an entry in a group in the userSettings
|
||||
void userSettingsGroupSet(QString group,QString entry,QVariant value);
|
||||
|
||||
|
||||
//! private copy constructors to prvent copying
|
||||
RbSettings& operator= (const RbSettings& other) {return *this; }
|
||||
RbSettings(const RbSettings& other) {}
|
||||
|
||||
//! pointers to our setting objects
|
||||
QSettings *devices;
|
||||
QSettings *userSettings;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue