Changeset View
Changeset View
Standalone View
Standalone View
src/lib/format.cpp
Show All 14 Lines | 1 | /* | |||
---|---|---|---|---|---|
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | 16 | */ | ||
17 | 17 | | |||
18 | #include "format.h" | 18 | #include "format.h" | ||
19 | #include "format_p.h" | 19 | #include "format_p.h" | ||
20 | #include "definition.h" | 20 | #include "definition.h" | ||
21 | #include "definitionref_p.h" | 21 | #include "definitionref_p.h" | ||
22 | #include "textstyledata_p.h" | 22 | #include "textstyledata_p.h" | ||
23 | #include "theme.h" | | |||
24 | #include "themedata_p.h" | 23 | #include "themedata_p.h" | ||
25 | #include "xml_p.h" | 24 | #include "xml_p.h" | ||
26 | 25 | | |||
27 | #include <QColor> | 26 | #include <QColor> | ||
28 | #include <QDebug> | 27 | #include <QDebug> | ||
29 | #include <QMetaEnum> | 28 | #include <QMetaEnum> | ||
30 | #include <QXmlStreamReader> | 29 | #include <QXmlStreamReader> | ||
31 | 30 | | |||
▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | 94 | { | |||
96 | return d->name; | 95 | return d->name; | ||
97 | } | 96 | } | ||
98 | 97 | | |||
99 | quint16 Format::id() const | 98 | quint16 Format::id() const | ||
100 | { | 99 | { | ||
101 | return d->id; | 100 | return d->id; | ||
102 | } | 101 | } | ||
103 | 102 | | |||
103 | Theme::TextStyle Format::textStyle() const | ||||
104 | { | ||||
105 | return d->defaultStyle; | ||||
106 | } | ||||
107 | | ||||
104 | bool Format::isDefaultTextStyle(const Theme &theme) const | 108 | bool Format::isDefaultTextStyle(const Theme &theme) const | ||
105 | { | 109 | { | ||
106 | return (!hasTextColor(theme)) | 110 | return (!hasTextColor(theme)) | ||
107 | && (!hasBackgroundColor(theme)) | 111 | && (!hasBackgroundColor(theme)) | ||
108 | && (selectedTextColor(theme) == theme.selectedTextColor(Theme::Normal)) | 112 | && (selectedTextColor(theme) == theme.selectedTextColor(Theme::Normal)) | ||
109 | && (selectedBackgroundColor(theme) == theme.selectedBackgroundColor(Theme::Normal)) | 113 | && (selectedBackgroundColor(theme) == theme.selectedBackgroundColor(Theme::Normal)) | ||
110 | && (isBold(theme) == theme.isBold(Theme::Normal)) | 114 | && (isBold(theme) == theme.isBold(Theme::Normal)) | ||
111 | && (isItalic(theme) == theme.isItalic(Theme::Normal)) | 115 | && (isItalic(theme) == theme.isItalic(Theme::Normal)) | ||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |