parent
83db051b82
commit
60bf9af208
4 changed files with 25 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ ListItem {
|
|||
textFormat: Text.StyledText
|
||||
font.weight: Font.Light
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
visible: text != ""
|
||||
visible: settings.teaseContent && text != ""
|
||||
}
|
||||
Grid {
|
||||
spacing: Theme.paddingSmall
|
||||
|
|
|
|||
|
|
@ -110,6 +110,12 @@ Dialog {
|
|||
checked: settings.autoMarkRead
|
||||
}
|
||||
|
||||
TextSwitch {
|
||||
id: teaseContentSetting
|
||||
text: qsTr("Tease Content")
|
||||
checked: settings.teaseContent
|
||||
}
|
||||
|
||||
TextSwitch {
|
||||
id: displayLabelsSetting
|
||||
text: qsTr('Display Labels in Item List')
|
||||
|
|
@ -210,6 +216,7 @@ Dialog {
|
|||
|
||||
settings.feeditemsOrder = orderSetting.currentIndex
|
||||
settings.autoMarkRead = autoMarkReadSetting.checked
|
||||
settings.teaseContent = teaseContentSetting.checked
|
||||
settings.displayLabels = displayLabelsSetting.checked
|
||||
|
||||
settings.displayIcons = showIconsSetting.checked
|
||||
|
|
|
|||
|
|
@ -184,6 +184,14 @@ void Settings::setDisplayLabels(bool displayLabels) {
|
|||
}
|
||||
}
|
||||
|
||||
void Settings::setTeaseContent(bool teaseContent) {
|
||||
if (_teaseContent != teaseContent) {
|
||||
_teaseContent = teaseContent;
|
||||
m_settings->setValue("teaseContent", _teaseContent);
|
||||
emit teaseContentChanged();
|
||||
}
|
||||
}
|
||||
|
||||
Settings::Settings(QObject *parent) : QObject(parent), m_settings(new QSettings(this)) {
|
||||
_servername = m_settings->value("servername", "http://").toString();
|
||||
_username = m_settings->value("username", "").toString();
|
||||
|
|
@ -206,4 +214,5 @@ Settings::Settings(QObject *parent) : QObject(parent), m_settings(new QSettings(
|
|||
_displayImages = m_settings->value("displayImages", true).toBool();
|
||||
_stripInvisibleImg = m_settings->value("stripInvisibleImg", false).toBool();
|
||||
_displayLabels = m_settings->value("displayLabels", true).toBool();
|
||||
_teaseContent = m_settings->value("teaseContent", true).toBool();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ class Settings : public QObject
|
|||
Q_PROPERTY(bool displayImages READ displayImages WRITE setDisplayImages NOTIFY displayImagesChanged)
|
||||
Q_PROPERTY(bool stripInvisibleImg READ stripInvisibleImg WRITE setStripInvisibleImg NOTIFY stripInvisibleImgChanged)
|
||||
Q_PROPERTY(bool displayLabels READ displayLabels WRITE setDisplayLabels NOTIFY displayLabelsChanged)
|
||||
Q_PROPERTY(bool teaseContent READ teaseContent WRITE setTeaseContent NOTIFY teaseContentChanged)
|
||||
public:
|
||||
static Settings *instance();
|
||||
|
||||
|
|
@ -151,6 +152,11 @@ public:
|
|||
}
|
||||
void setDisplayLabels(bool displayLabels);
|
||||
|
||||
bool teaseContent() const {
|
||||
return this->_teaseContent;
|
||||
}
|
||||
void setTeaseContent(bool teaseContent);
|
||||
|
||||
signals:
|
||||
void servernameChanged();
|
||||
void usernameChanged();
|
||||
|
|
@ -173,6 +179,7 @@ signals:
|
|||
void displayImagesChanged();
|
||||
void stripInvisibleImgChanged();
|
||||
void displayLabelsChanged();
|
||||
void teaseContentChanged();
|
||||
|
||||
private:
|
||||
static QScopedPointer<Settings> m_instance;
|
||||
|
|
@ -203,5 +210,6 @@ private:
|
|||
bool _displayImages;
|
||||
bool _stripInvisibleImg;
|
||||
bool _displayLabels;
|
||||
bool _teaseContent;
|
||||
};
|
||||
#endif // SETTINGS_HH
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue