mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-02 11:33:55 -07:00
Add settings interface for ignoring unreg pm
This commit is contained in:
parent
6d4716b38f
commit
32c6635137
2 changed files with 11 additions and 0 deletions
|
|
@ -57,6 +57,7 @@ SettingsCache::SettingsCache()
|
||||||
priceTagSource = settings->value("deckeditor/pricetagsource", 0).toInt();
|
priceTagSource = settings->value("deckeditor/pricetagsource", 0).toInt();
|
||||||
|
|
||||||
ignoreUnregisteredUsers = settings->value("chat/ignore_unregistered", false).toBool();
|
ignoreUnregisteredUsers = settings->value("chat/ignore_unregistered", false).toBool();
|
||||||
|
ignoreUnregisteredUserMessages = settings->value("chat/ignore_unregistered_messages", false).toBool();
|
||||||
|
|
||||||
attemptAutoConnect = settings->value("server/auto_connect", 0).toBool();
|
attemptAutoConnect = settings->value("server/auto_connect", 0).toBool();
|
||||||
}
|
}
|
||||||
|
|
@ -293,6 +294,12 @@ void SettingsCache::setIgnoreUnregisteredUsers(int _ignoreUnregisteredUsers)
|
||||||
settings->setValue("chat/ignore_unregistered", ignoreUnregisteredUsers);
|
settings->setValue("chat/ignore_unregistered", ignoreUnregisteredUsers);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SettingsCache::setIgnoreUnregisteredUserMessages(int _ignoreUnregisteredUserMessages)
|
||||||
|
{
|
||||||
|
ignoreUnregisteredUserMessages = _ignoreUnregisteredUserMessages;
|
||||||
|
settings->setValue("chat/ignore_unregistered_messages", ignoreUnregisteredUserMessages);
|
||||||
|
}
|
||||||
|
|
||||||
void SettingsCache::setMainWindowGeometry(const QByteArray &_mainWindowGeometry)
|
void SettingsCache::setMainWindowGeometry(const QByteArray &_mainWindowGeometry)
|
||||||
{
|
{
|
||||||
mainWindowGeometry = _mainWindowGeometry;
|
mainWindowGeometry = _mainWindowGeometry;
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ signals:
|
||||||
void soundPathChanged();
|
void soundPathChanged();
|
||||||
void priceTagFeatureChanged(int enabled);
|
void priceTagFeatureChanged(int enabled);
|
||||||
void ignoreUnregisteredUsersChanged();
|
void ignoreUnregisteredUsersChanged();
|
||||||
|
void ignoreUnregisteredUserMessagesChanged();
|
||||||
void pixmapCacheSizeChanged(int newSizeInMBs);
|
void pixmapCacheSizeChanged(int newSizeInMBs);
|
||||||
private:
|
private:
|
||||||
QSettings *settings;
|
QSettings *settings;
|
||||||
|
|
@ -63,6 +64,7 @@ private:
|
||||||
bool priceTagFeature;
|
bool priceTagFeature;
|
||||||
int priceTagSource;
|
int priceTagSource;
|
||||||
bool ignoreUnregisteredUsers;
|
bool ignoreUnregisteredUsers;
|
||||||
|
bool ignoreUnregisteredUserMessages;
|
||||||
QString picUrl;
|
QString picUrl;
|
||||||
QString picUrlHq;
|
QString picUrlHq;
|
||||||
QString picUrlFallback;
|
QString picUrlFallback;
|
||||||
|
|
@ -108,6 +110,7 @@ public:
|
||||||
bool getPriceTagFeature() const { return priceTagFeature; }
|
bool getPriceTagFeature() const { return priceTagFeature; }
|
||||||
int getPriceTagSource() const { return priceTagSource; }
|
int getPriceTagSource() const { return priceTagSource; }
|
||||||
bool getIgnoreUnregisteredUsers() const { return ignoreUnregisteredUsers; }
|
bool getIgnoreUnregisteredUsers() const { return ignoreUnregisteredUsers; }
|
||||||
|
bool getIgnoreUnregisteredUserMessages() const { return ignoreUnregisteredUserMessages; }
|
||||||
QString getPicUrl() const { return picUrl; }
|
QString getPicUrl() const { return picUrl; }
|
||||||
QString getPicUrlHq() const { return picUrlHq; }
|
QString getPicUrlHq() const { return picUrlHq; }
|
||||||
QString getPicUrlFallback() const { return picUrlFallback; }
|
QString getPicUrlFallback() const { return picUrlFallback; }
|
||||||
|
|
@ -149,6 +152,7 @@ public slots:
|
||||||
void setPriceTagFeature(int _priceTagFeature);
|
void setPriceTagFeature(int _priceTagFeature);
|
||||||
void setPriceTagSource(int _priceTagSource);
|
void setPriceTagSource(int _priceTagSource);
|
||||||
void setIgnoreUnregisteredUsers(int _ignoreUnregisteredUsers);
|
void setIgnoreUnregisteredUsers(int _ignoreUnregisteredUsers);
|
||||||
|
void setIgnoreUnregisteredUserMessages(int _ignoreUnregisteredUserMessages);
|
||||||
void setPicUrl(const QString &_picUrl);
|
void setPicUrl(const QString &_picUrl);
|
||||||
void setPicUrlHq(const QString &_picUrlHq);
|
void setPicUrlHq(const QString &_picUrlHq);
|
||||||
void setPicUrlFallback(const QString &_picUrlFallback);
|
void setPicUrlFallback(const QString &_picUrlFallback);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue