added namespaces
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#ifndef REALSETTING_H
|
||||
#define REALSETTING_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
namespace chatterino {
|
||||
namespace settings {
|
||||
|
||||
class RealSetting : public Setting
|
||||
{
|
||||
public:
|
||||
RealSetting(const QString &name, qreal defaultValue,
|
||||
qreal minValue = std::numeric_limits<qreal>::min(),
|
||||
qreal maxValue = std::numeric_limits<qreal>::max())
|
||||
: Setting(name)
|
||||
, value(defaultValue)
|
||||
, defaultValue(defaultValue)
|
||||
, minValue(minValue)
|
||||
, maxValue(maxValue)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
qreal value;
|
||||
qreal defaultValue;
|
||||
qreal minValue;
|
||||
qreal maxValue;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // REALSETTING_H
|
||||
@@ -0,0 +1,30 @@
|
||||
#ifndef SETTING_H
|
||||
#define SETTING_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
namespace chatterino {
|
||||
namespace settings {
|
||||
|
||||
class Setting
|
||||
{
|
||||
public:
|
||||
explicit Setting(const QString &name)
|
||||
: name(name)
|
||||
{
|
||||
}
|
||||
|
||||
const QString &
|
||||
getName() const
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
virtual QString toString() = 0;
|
||||
|
||||
private:
|
||||
QString name;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // SETTING_H
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "settings/settings.h"
|
||||
|
||||
namespace chatterino {
|
||||
namespace settings {
|
||||
|
||||
messages::Word::Type Settings::wordTypeMask = messages::Word::Default;
|
||||
|
||||
Settings::Settings()
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
Settings::isIgnoredEmote(const QString &emote)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
#ifndef APPSETTINGS_H
|
||||
#define APPSETTINGS_H
|
||||
|
||||
#include "messages/word.h"
|
||||
|
||||
namespace chatterino {
|
||||
namespace settings {
|
||||
|
||||
class Settings
|
||||
{
|
||||
public:
|
||||
static messages::Word::Type
|
||||
getWordTypeMask()
|
||||
{
|
||||
return wordTypeMask;
|
||||
}
|
||||
|
||||
static bool isIgnoredEmote(const QString &emote);
|
||||
|
||||
static qreal
|
||||
getEmoteScale()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static qreal
|
||||
getBadgeScale()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static bool
|
||||
getScaleEmotesByLineHeight()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
Settings();
|
||||
static messages::Word::Type wordTypeMask;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // APPSETTINGS_H
|
||||
Reference in New Issue
Block a user