5#ifndef DPLATFORMTHEME_H
6#define DPLATFORMTHEME_H
8#include <DNativeSettings>
15class DPlatformThemePrivate;
21 Q_PROPERTY(
int cursorBlinkTime READ cursorBlinkTime WRITE setCursorBlinkTime NOTIFY cursorBlinkTimeChanged)
22 Q_PROPERTY(
int cursorBlinkTimeout READ cursorBlinkTimeout WRITE setCursorBlinkTimeout NOTIFY cursorBlinkTimeoutChanged)
23 Q_PROPERTY(
bool cursorBlink READ cursorBlink WRITE setCursorBlink NOTIFY cursorBlinkChanged)
24 Q_PROPERTY(
int doubleClickDistance READ doubleClickDistance WRITE setDoubleClickDistance NOTIFY doubleClickDistanceChanged)
25 Q_PROPERTY(
int doubleClickTime READ doubleClickTime WRITE setDoubleClickTime NOTIFY doubleClickTimeChanged)
26 Q_PROPERTY(
int dndDragThreshold READ dndDragThreshold WRITE setDndDragThreshold NOTIFY dndDragThresholdChanged)
27 Q_PROPERTY(
int windowRadius READ windowRadius WRITE setWindowRadius NOTIFY windowRadiusChanged)
28 Q_PROPERTY(
QByteArray themeName READ themeName WRITE setThemeName NOTIFY themeNameChanged)
29 Q_PROPERTY(
QByteArray iconThemeName READ iconThemeName WRITE setIconThemeName NOTIFY iconThemeNameChanged)
30 Q_PROPERTY(
QByteArray soundThemeName READ soundThemeName WRITE setSoundThemeName NOTIFY soundThemeNameChanged)
32 Q_PROPERTY(
QByteArray fontName READ fontName WRITE setFontName NOTIFY fontNameChanged)
33 Q_PROPERTY(
QByteArray monoFontName READ monoFontName WRITE setMonoFontName NOTIFY monoFontNameChanged)
34 Q_PROPERTY(qreal fontPointSize READ fontPointSize WRITE setFontPointSize NOTIFY fontPointSizeChanged)
35 Q_PROPERTY(
QByteArray gtkFontName READ gtkFontName WRITE setGtkFontName NOTIFY gtkFontNameChanged)
37 Q_PROPERTY(QColor activeColor READ activeColor WRITE setActiveColor NOTIFY activeColorChanged)
39 Q_PROPERTY(QColor window READ window WRITE setWindow NOTIFY windowChanged)
40 Q_PROPERTY(QColor windowText READ windowText WRITE setWindowText NOTIFY windowTextChanged)
41 Q_PROPERTY(QColor base READ base WRITE setBase NOTIFY baseChanged)
42 Q_PROPERTY(QColor alternateBase READ alternateBase WRITE setAlternateBase NOTIFY alternateBaseChanged)
43 Q_PROPERTY(QColor toolTipBase READ toolTipBase WRITE setToolTipBase NOTIFY toolTipBaseChanged)
44 Q_PROPERTY(QColor toolTipText READ toolTipText WRITE setToolTipText NOTIFY toolTipTextChanged)
45 Q_PROPERTY(QColor text READ text WRITE setText NOTIFY textChanged)
46 Q_PROPERTY(QColor button READ button WRITE setButton NOTIFY buttonChanged)
47 Q_PROPERTY(QColor buttonText READ buttonText WRITE setButtonText NOTIFY buttonTextChanged)
48 Q_PROPERTY(QColor brightText READ brightText WRITE setBrightText NOTIFY brightTextChanged)
49 Q_PROPERTY(QColor light READ light WRITE setLight NOTIFY lightChanged)
50 Q_PROPERTY(QColor midlight READ midlight WRITE setMidlight NOTIFY midlightChanged)
51 Q_PROPERTY(QColor dark READ dark WRITE setDark NOTIFY darkChanged)
52 Q_PROPERTY(QColor mid READ mid WRITE setMid NOTIFY midChanged)
53 Q_PROPERTY(QColor shadow READ shadow WRITE setShadow NOTIFY shadowChanged)
54 Q_PROPERTY(QColor highlight READ highlight WRITE setHighlight NOTIFY highlightChanged)
55 Q_PROPERTY(QColor highlightedText READ highlightedText WRITE setHighlightedText NOTIFY highlightedTextChanged)
56 Q_PROPERTY(QColor link READ link WRITE setLink NOTIFY linkChanged)
57 Q_PROPERTY(QColor linkVisited READ linkVisited WRITE setLinkVisited NOTIFY linkVisitedChanged)
59 Q_PROPERTY(QColor itemBackground READ itemBackground WRITE setItemBackground NOTIFY itemBackgroundChanged)
60 Q_PROPERTY(QColor textTitle READ textTitle WRITE setTextTitle NOTIFY textTitleChanged)
61 Q_PROPERTY(QColor textTips READ textTips WRITE setTextTips NOTIFY textTipsChanged)
62 Q_PROPERTY(QColor textWarning READ textWarning WRITE setTextWarning NOTIFY textWarningChanged)
63 Q_PROPERTY(QColor textLively READ textLively WRITE setTextLively NOTIFY textLivelyChanged)
64 Q_PROPERTY(QColor lightLively READ lightLively WRITE setLightLively NOTIFY lightLivelyChanged)
65 Q_PROPERTY(QColor darkLively READ darkLively WRITE setDarkLively NOTIFY darkLivelyChanged)
66 Q_PROPERTY(QColor frameBorder READ frameBorder WRITE setFrameBorder NOTIFY frameBorderChanged)
75 void setFallbackProperty(
bool fallback);
79 void setPalette(
const DPalette &palette);
81 int cursorBlinkTime()
const;
82 int cursorBlinkTimeout()
const;
83 bool cursorBlink()
const;
84 int doubleClickDistance()
const;
85 int doubleClickTime()
const;
86 int dndDragThreshold()
const;
87 int windowRadius()
const;
88 int windowRadius(
int defaultValue)
const;
95 qreal fontPointSize()
const;
98 QColor activeColor()
const;
100 bool isValidPalette()
const;
102 QColor window()
const;
103 QColor windowText()
const;
105 QColor alternateBase()
const;
106 QColor toolTipBase()
const;
107 QColor toolTipText()
const;
109 QColor button()
const;
110 QColor buttonText()
const;
111 QColor brightText()
const;
112 QColor light()
const;
113 QColor midlight()
const;
116 QColor shadow()
const;
117 QColor highlight()
const;
118 QColor highlightedText()
const;
120 QColor linkVisited()
const;
121 QColor itemBackground()
const;
122 QColor textTitle()
const;
123 QColor textTips()
const;
124 QColor textWarning()
const;
125 QColor textLively()
const;
126 QColor lightLively()
const;
127 QColor darkLively()
const;
128 QColor frameBorder()
const;
133 void setCursorBlinkTime(
int cursorBlinkTime);
134 void setCursorBlinkTimeout(
int cursorBlinkTimeout);
135 void setCursorBlink(
bool cursorBlink);
136 void setDoubleClickDistance(
int doubleClickDistance);
137 void setDoubleClickTime(
int doubleClickTime);
138 void setDndDragThreshold(
int dndDragThreshold);
139 void setThemeName(
const QByteArray &themeName);
140 void setIconThemeName(
const QByteArray &iconThemeName);
141 void setSoundThemeName(
const QByteArray &soundThemeName);
143 void setMonoFontName(
const QByteArray &monoFontName);
144 void setFontPointSize(qreal fontPointSize);
145 void setGtkFontName(
const QByteArray &fontName);
146 void setActiveColor(
const QColor activeColor);
147 void setWindow(
const QColor &window);
148 void setWindowText(
const QColor &windowText);
149 void setBase(
const QColor &base);
150 void setAlternateBase(
const QColor &alternateBase);
151 void setToolTipBase(
const QColor &toolTipBase);
152 void setToolTipText(
const QColor &toolTipText);
153 void setText(
const QColor &text);
154 void setButton(
const QColor &button);
155 void setButtonText(
const QColor &buttonText);
156 void setBrightText(
const QColor &brightText);
157 void setLight(
const QColor &light);
158 void setMidlight(
const QColor &midlight);
159 void setDark(
const QColor &dark);
160 void setMid(
const QColor &mid);
161 void setShadow(
const QColor &shadow);
162 void setHighlight(
const QColor &highlight);
163 void setHighlightedText(
const QColor &highlightedText);
164 void setLink(
const QColor &link);
165 void setLinkVisited(
const QColor &linkVisited);
166 void setItemBackground(
const QColor &itemBackground);
167 void setTextTitle(
const QColor &textTitle);
168 void setTextTips(
const QColor &textTips);
169 void setTextWarning(
const QColor &textWarning);
170 void setTextLively(
const QColor &textLively);
171 void setLightLively(
const QColor &lightLively);
172 void setDarkLively(
const QColor &darkLively);
173 void setFrameBorder(
const QColor &frameBorder);
175 void setDotsPerInch(
const QString &screenName,
int dpi);
176 void setWindowRadius(
int windowRadius);
179 void cursorBlinkTimeChanged(
int cursorBlinkTime);
180 void cursorBlinkTimeoutChanged(
int cursorBlinkTimeout);
181 void cursorBlinkChanged(
bool cursorBlink);
182 void doubleClickDistanceChanged(
int doubleClickDistance);
183 void doubleClickTimeChanged(
int doubleClickTime);
184 void dndDragThresholdChanged(
int dndDragThreshold);
186 void iconThemeNameChanged(
QByteArray iconThemeName);
187 void soundThemeNameChanged(
QByteArray soundThemeName);
189 void monoFontNameChanged(
QByteArray monoFontName);
190 void fontPointSizeChanged(qreal fontPointSize);
192 void activeColorChanged(QColor activeColor);
193 void paletteChanged(
DPalette palette);
194 void windowChanged(QColor window);
195 void windowTextChanged(QColor windowText);
196 void baseChanged(QColor base);
197 void alternateBaseChanged(QColor alternateBase);
198 void toolTipBaseChanged(QColor toolTipBase);
199 void toolTipTextChanged(QColor toolTipText);
200 void textChanged(QColor text);
201 void buttonChanged(QColor button);
202 void buttonTextChanged(QColor buttonText);
203 void brightTextChanged(QColor brightText);
204 void lightChanged(QColor light);
205 void midlightChanged(QColor midlight);
206 void darkChanged(QColor dark);
207 void midChanged(QColor mid);
208 void shadowChanged(QColor shadow);
209 void highlightChanged(QColor highlight);
210 void highlightedTextChanged(QColor highlightedText);
211 void linkChanged(QColor link);
212 void linkVisitedChanged(QColor linkVisited);
213 void itemBackgroundChanged(QColor itemBackground);
214 void textTitleChanged(QColor textTitle);
215 void textTipsChanged(QColor textTips);
216 void textWarningChanged(QColor textWarning);
217 void textLivelyChanged(QColor textLively);
218 void lightLivelyChanged(QColor lightLively);
219 void darkLivelyChanged(QColor darkLively);
220 void frameBorderChanged(QColor frameBorder);
221 void dotsPerInchChanged(
const QString &screen,
int dpi);
222 void windowRadiusChanged(
int r);
228 D_PRIVATE_SLOT(
void _q_onThemePropertyChanged(
const QByteArray &name,
const QVariant &value))
一个用于本地设置的类.
Definition: dnativesettings.h:17
DPalette提供了修改的 QPalette 类.
Definition: dpalette.h:17