#ifndef _VIDCAPREG_H
#define _VIDCAPREG_H
#include <configfile.h>

using namespace Registry;

static const std::string Module = "QtVidcap";

inline int RI(const std::string& name, int def)
{
    return ReadInt(Module, name, def);
}

inline std::string RS(const std::string& name, const std::string& def)
{
    return ReadString(Module, name, def);
}

inline float RF(const std::string& name, float def)
{
    return ReadFloat(Module, name, def);
}

inline void WI(const std::string& name, int def)
{
    WriteInt(Module, name, def);
}
inline void WS(const std::string& name, const std::string& def)
{
    WriteString(Module, name, def);
}

inline void WF(const std::string& name, float def)
{
    WriteFloat(Module, name, def);
}
#ifdef QSTRING_H
inline void WI(const std::string& name, const QString& def)
{
    WriteInt(Module, name, atoi(def.ascii()));
}

inline void WS(const std::string& name, const QString& def)
{
    WriteString(Module, name, def.ascii());
}

inline void WF(const std::string& name, const QString& def)
{
    WriteFloat(Module, name, atof(def.ascii()));
}
#endif

#endif
