mashiros
2 years ago
16 changed files with 3457 additions and 1908 deletions
Binary file not shown.
@ -0,0 +1,756 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<!DOCTYPE TS> |
||||||
|
<TS version="2.1" language="zh_CN"> |
||||||
|
<context> |
||||||
|
<name>Common</name> |
||||||
|
<message> |
||||||
|
<location filename="qml/Common.qml" line="8"/> |
||||||
|
<source>Light</source> |
||||||
|
<translation>细体</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/Common.qml" line="8"/> |
||||||
|
<source>Normal</source> |
||||||
|
<translation>普通</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/Common.qml" line="8"/> |
||||||
|
<source>Bold</source> |
||||||
|
<translation>加粗</translation> |
||||||
|
</message> |
||||||
|
</context> |
||||||
|
<context> |
||||||
|
<name>ReflectionClock</name> |
||||||
|
<message> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="16"/> |
||||||
|
<source>Reflection Clock</source> |
||||||
|
<translation>倒影时钟</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="292"/> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="318"/> |
||||||
|
<source>Settings</source> |
||||||
|
<translation>设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="302"/> |
||||||
|
<source>Clock Settings</source> |
||||||
|
<translation>时钟设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="357"/> |
||||||
|
<source>Configuration</source> |
||||||
|
<translation>配置项</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="365"/> |
||||||
|
<source>Hour Settings</source> |
||||||
|
<translation>时设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="371"/> |
||||||
|
<source>24 Hour Clock</source> |
||||||
|
<translation>24时制</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="379"/> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="414"/> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="458"/> |
||||||
|
<source>Clock Background Color</source> |
||||||
|
<translation>时钟背景颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="385"/> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="420"/> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="465"/> |
||||||
|
<source>Clock Font Color</source> |
||||||
|
<translation>时钟字体颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="393"/> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="428"/> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="474"/> |
||||||
|
<source>Panel Background Color</source> |
||||||
|
<translation>面板背景颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="399"/> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="434"/> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="481"/> |
||||||
|
<source>Panel Font Color</source> |
||||||
|
<translation>面板字体颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="408"/> |
||||||
|
<source>Minute Settings</source> |
||||||
|
<translation>分设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="443"/> |
||||||
|
<source>Second Settings</source> |
||||||
|
<translation>秒设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/ReflectionClock.qml" line="450"/> |
||||||
|
<source>Show</source> |
||||||
|
<translation>显示</translation> |
||||||
|
</message> |
||||||
|
</context> |
||||||
|
<context> |
||||||
|
<name>RoundClock</name> |
||||||
|
<message> |
||||||
|
<location filename="qml/RoundClock.qml" line="15"/> |
||||||
|
<location filename="qml/RoundClock.qml" line="346"/> |
||||||
|
<source>Round Clock</source> |
||||||
|
<translation>圆盘时钟</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/RoundClock.qml" line="320"/> |
||||||
|
<source>Settings</source> |
||||||
|
<translation>设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/RoundClock.qml" line="330"/> |
||||||
|
<source>Clock Settings</source> |
||||||
|
<translation>时钟设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/RoundClock.qml" line="385"/> |
||||||
|
<source>Configuration</source> |
||||||
|
<translation>配置项</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/RoundClock.qml" line="393"/> |
||||||
|
<source>Continuous Second Hand</source> |
||||||
|
<translation>秒针连续</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/RoundClock.qml" line="401"/> |
||||||
|
<source>Background Color</source> |
||||||
|
<translation>背景颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/RoundClock.qml" line="407"/> |
||||||
|
<source>Background transparency</source> |
||||||
|
<translation>背景透明度</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/RoundClock.qml" line="419"/> |
||||||
|
<source>Hour Scale Color</source> |
||||||
|
<translation>时刻度颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/RoundClock.qml" line="425"/> |
||||||
|
<source>Minute Scale Color</source> |
||||||
|
<translation>分刻度颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/RoundClock.qml" line="433"/> |
||||||
|
<source>Hour Hand Color</source> |
||||||
|
<translation>时针颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/RoundClock.qml" line="439"/> |
||||||
|
<source>Minute Hand Color</source> |
||||||
|
<translation>分针颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/RoundClock.qml" line="445"/> |
||||||
|
<source>Second Hand Color</source> |
||||||
|
<translation>秒针颜色</translation> |
||||||
|
</message> |
||||||
|
</context> |
||||||
|
<context> |
||||||
|
<name>SolarsClock</name> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="15"/> |
||||||
|
<location filename="qml/SolarsClock.qml" line="430"/> |
||||||
|
<source>Solar Clock</source> |
||||||
|
<translation>太阳系时钟</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="404"/> |
||||||
|
<source>Settings</source> |
||||||
|
<translation>设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="414"/> |
||||||
|
<source>Clock Settings</source> |
||||||
|
<translation>时钟设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="469"/> |
||||||
|
<source>Configuration</source> |
||||||
|
<translation>配置项</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="477"/> |
||||||
|
<source>Background Settings</source> |
||||||
|
<translation>背景设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="483"/> |
||||||
|
<source>Color</source> |
||||||
|
<translation>颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="489"/> |
||||||
|
<source>Transparency</source> |
||||||
|
<translation>透明度</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="502"/> |
||||||
|
<source>Show Scale</source> |
||||||
|
<translation>显示刻度</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="508"/> |
||||||
|
<source>Scale Color</source> |
||||||
|
<translation>刻度颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="518"/> |
||||||
|
<source>Show Center</source> |
||||||
|
<translation>中心显示</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="524"/> |
||||||
|
<source>Center Color</source> |
||||||
|
<translation>中心颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="531"/> |
||||||
|
<source>Center Radius</source> |
||||||
|
<translation>中心半径</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="545"/> |
||||||
|
<source>Display Time</source> |
||||||
|
<translation>显示时间</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="551"/> |
||||||
|
<source>Font Color</source> |
||||||
|
<translation>字体颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="558"/> |
||||||
|
<source>Font Style</source> |
||||||
|
<translation>字体样式</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="566"/> |
||||||
|
<source>Font Weight</source> |
||||||
|
<translation>字体粗细</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="574"/> |
||||||
|
<source>Font Size</source> |
||||||
|
<translation>字体大小</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="588"/> |
||||||
|
<source>Hour Settings</source> |
||||||
|
<translation>时设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="594"/> |
||||||
|
<location filename="qml/SolarsClock.qml" line="623"/> |
||||||
|
<location filename="qml/SolarsClock.qml" line="652"/> |
||||||
|
<location filename="qml/SolarsClock.qml" line="681"/> |
||||||
|
<source>Star Color</source> |
||||||
|
<translation>星球颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="603"/> |
||||||
|
<location filename="qml/SolarsClock.qml" line="632"/> |
||||||
|
<location filename="qml/SolarsClock.qml" line="661"/> |
||||||
|
<location filename="qml/SolarsClock.qml" line="690"/> |
||||||
|
<source>Show Orbit</source> |
||||||
|
<translation>显示轨道</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="609"/> |
||||||
|
<location filename="qml/SolarsClock.qml" line="638"/> |
||||||
|
<location filename="qml/SolarsClock.qml" line="667"/> |
||||||
|
<location filename="qml/SolarsClock.qml" line="696"/> |
||||||
|
<source>Orbit Color</source> |
||||||
|
<translation>轨道颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="617"/> |
||||||
|
<source>Minute Settings</source> |
||||||
|
<translation>分设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="646"/> |
||||||
|
<source>Second Settings</source> |
||||||
|
<translation>秒设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/SolarsClock.qml" line="675"/> |
||||||
|
<source>Millisecond Settings</source> |
||||||
|
<translation>毫秒设置</translation> |
||||||
|
</message> |
||||||
|
</context> |
||||||
|
<context> |
||||||
|
<name>TextClock</name> |
||||||
|
<message> |
||||||
|
<location filename="qml/TextClock.qml" line="15"/> |
||||||
|
<location filename="qml/TextClock.qml" line="186"/> |
||||||
|
<source>Text Clock</source> |
||||||
|
<translation>文字时钟挂件</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/TextClock.qml" line="160"/> |
||||||
|
<source>Settings</source> |
||||||
|
<translation>设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/TextClock.qml" line="170"/> |
||||||
|
<source>Clock Settings</source> |
||||||
|
<translation>时钟设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/TextClock.qml" line="225"/> |
||||||
|
<source>Configuration</source> |
||||||
|
<translation>配置项</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/TextClock.qml" line="233"/> |
||||||
|
<source>Font Style</source> |
||||||
|
<translation>字体样式</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/TextClock.qml" line="241"/> |
||||||
|
<source>Font Weight</source> |
||||||
|
<translation>字体粗细</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/TextClock.qml" line="249"/> |
||||||
|
<source>HighLight Color</source> |
||||||
|
<translation>高亮颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/TextClock.qml" line="255"/> |
||||||
|
<source>Normal Color</source> |
||||||
|
<translation>普通颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/TextClock.qml" line="261"/> |
||||||
|
<source>Font Size</source> |
||||||
|
<translation>字体大小</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/TextClock.qml" line="271"/> |
||||||
|
<source>Letter Space</source> |
||||||
|
<translation>文字间隔</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/TextClock.qml" line="281"/> |
||||||
|
<source>Line Spacing</source> |
||||||
|
<translation>行距</translation> |
||||||
|
</message> |
||||||
|
</context> |
||||||
|
<context> |
||||||
|
<name>VectoClock</name> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="17"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="303"/> |
||||||
|
<source>Vecto Clock</source> |
||||||
|
<translation>Vecto时钟</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="63"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="287"/> |
||||||
|
<source>Settings</source> |
||||||
|
<translation>设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="342"/> |
||||||
|
<source>Configuration</source> |
||||||
|
<translation>配置项</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="350"/> |
||||||
|
<source>Weekday Settings</source> |
||||||
|
<translation>星期设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="356"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="423"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="553"/> |
||||||
|
<source>Color</source> |
||||||
|
<translation>颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="362"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="482"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="559"/> |
||||||
|
<source>Font Size</source> |
||||||
|
<translation>字体大小</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="372"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="492"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="569"/> |
||||||
|
<source>Font Style</source> |
||||||
|
<translation>字体样式</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="379"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="499"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="576"/> |
||||||
|
<source>Font Weight</source> |
||||||
|
<translation>字体粗细</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="386"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="506"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="583"/> |
||||||
|
<source>Letter Spacing</source> |
||||||
|
<translation>文字间隔</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="396"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="526"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="603"/> |
||||||
|
<source>Y Offset</source> |
||||||
|
<translation>Y偏移量</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="406"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="536"/> |
||||||
|
<source>Gap</source> |
||||||
|
<translation>间距</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="417"/> |
||||||
|
<source>Line Settings</source> |
||||||
|
<translation>线设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="429"/> |
||||||
|
<source>Width</source> |
||||||
|
<translation>宽度</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="439"/> |
||||||
|
<source>Position</source> |
||||||
|
<translation>位置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="450"/> |
||||||
|
<source>Clock Settings</source> |
||||||
|
<translatorcomment>时钟设置</translatorcomment> |
||||||
|
<translation>时钟设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="456"/> |
||||||
|
<source>24 Hour Clock</source> |
||||||
|
<translation>24时制</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="462"/> |
||||||
|
<source>Text Color</source> |
||||||
|
<translation>文字颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="469"/> |
||||||
|
<source>Background Visible</source> |
||||||
|
<translation>背景可见</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="475"/> |
||||||
|
<source>Background Color</source> |
||||||
|
<translation>背景颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="516"/> |
||||||
|
<location filename="qml/VectoClock.qml" line="593"/> |
||||||
|
<source>X Offset</source> |
||||||
|
<translation>X偏移量</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<location filename="qml/VectoClock.qml" line="547"/> |
||||||
|
<source>Date Settings</source> |
||||||
|
<translation>日期设置</translation> |
||||||
|
</message> |
||||||
|
</context> |
||||||
|
<context> |
||||||
|
<name>reflection_clock</name> |
||||||
|
<message> |
||||||
|
<source>Save</source> |
||||||
|
<translation type="vanished">保存</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Show</source> |
||||||
|
<translation type="vanished">显示</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Reset</source> |
||||||
|
<translation type="vanished">重置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>24 Hour Clock</source> |
||||||
|
<translation type="vanished">24时制</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Reflection Clock</source> |
||||||
|
<translation type="vanished">倒影时钟</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Hour Settings</source> |
||||||
|
<translation type="vanished">时设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Second Settings</source> |
||||||
|
<translation type="vanished">秒设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Configuration</source> |
||||||
|
<translation type="vanished">配置项</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Minute Settings</source> |
||||||
|
<translation type="vanished">分设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Panel Background Color</source> |
||||||
|
<translation type="vanished">面板背景颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Settings</source> |
||||||
|
<translation type="vanished">设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Panel Font Color</source> |
||||||
|
<translation type="vanished">面板字体颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Clock Background Color</source> |
||||||
|
<translation type="vanished">时钟背景颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Clock Font Color</source> |
||||||
|
<translation type="vanished">时钟字体颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Clock Settings</source> |
||||||
|
<translation type="vanished">时钟设置</translation> |
||||||
|
</message> |
||||||
|
</context> |
||||||
|
<context> |
||||||
|
<name>round_clock</name> |
||||||
|
<message> |
||||||
|
<source>Save</source> |
||||||
|
<translation type="vanished">保存</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Reset</source> |
||||||
|
<translation type="vanished">重置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Second Hand Color</source> |
||||||
|
<translation type="vanished">秒针颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Hour Scale Color</source> |
||||||
|
<translation type="vanished">时刻度颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Minute Scale Color</source> |
||||||
|
<translation type="vanished">分刻度颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Round Clock</source> |
||||||
|
<translation type="vanished">圆盘时钟</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Configuration</source> |
||||||
|
<translation type="vanished">配置项</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Background Color</source> |
||||||
|
<translation type="vanished">背景颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Hour Hand Color</source> |
||||||
|
<translation type="vanished">时针颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Continuous Second Hand</source> |
||||||
|
<translation type="vanished">秒针连续</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Minute Hand Color</source> |
||||||
|
<translation type="vanished">分针颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Settings</source> |
||||||
|
<translation type="vanished">设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Clock Settings</source> |
||||||
|
<translation type="vanished">时钟设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Background transparency</source> |
||||||
|
<translation type="vanished">背景透明度</translation> |
||||||
|
</message> |
||||||
|
</context> |
||||||
|
<context> |
||||||
|
<name>solars_clock</name> |
||||||
|
<message> |
||||||
|
<source>Save</source> |
||||||
|
<translation type="vanished">保存</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Color</source> |
||||||
|
<translation type="vanished">颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Reset</source> |
||||||
|
<translation type="vanished">重置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Center Color</source> |
||||||
|
<translation type="vanished">中心颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Background Settings</source> |
||||||
|
<translation type="vanished">背景设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Transparency</source> |
||||||
|
<translation type="vanished">透明度</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Hour Settings</source> |
||||||
|
<translation type="vanished">时设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Solar Clock</source> |
||||||
|
<translation type="vanished">太阳系时钟</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Star Color</source> |
||||||
|
<translation type="vanished">星球颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Show Center</source> |
||||||
|
<translation type="vanished">中心显示</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Font Size</source> |
||||||
|
<translation type="vanished">字体大小</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Orbit Color</source> |
||||||
|
<translation type="vanished">轨道颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Font Color</source> |
||||||
|
<translation type="vanished">字体颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Millisecond Settings</source> |
||||||
|
<translation type="vanished">毫秒设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Second Settings</source> |
||||||
|
<translation type="vanished">秒设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Configuration</source> |
||||||
|
<translation type="vanished">配置项</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Scale Color</source> |
||||||
|
<translation type="vanished">刻度颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Show Orbit</source> |
||||||
|
<translation type="vanished">显示轨道</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Show Scale</source> |
||||||
|
<translation type="vanished">显示刻度</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Minute Settings</source> |
||||||
|
<translation type="vanished">分设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Display Time</source> |
||||||
|
<translation type="vanished">显示时间</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Center Radius</source> |
||||||
|
<translation type="vanished">中心半径</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Settings</source> |
||||||
|
<translation type="vanished">设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Clock Settings</source> |
||||||
|
<translation type="vanished">时钟设置</translation> |
||||||
|
</message> |
||||||
|
</context> |
||||||
|
<context> |
||||||
|
<name>text_clock</name> |
||||||
|
<message> |
||||||
|
<source>Save</source> |
||||||
|
<translation type="vanished">保存</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Reset</source> |
||||||
|
<translation type="vanished">重置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Letter Space</source> |
||||||
|
<translation type="vanished">文字间隔</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Font Size</source> |
||||||
|
<translation type="vanished">字体大小</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Font Weight</source> |
||||||
|
<translation type="vanished">字体粗细</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Text Clock</source> |
||||||
|
<translation type="vanished">文字时钟挂件</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Font Style</source> |
||||||
|
<translation type="vanished">字体样式</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Configuration</source> |
||||||
|
<translation type="vanished">配置项</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Normal Color</source> |
||||||
|
<translation type="vanished">普通颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>HighLight Color</source> |
||||||
|
<translation type="vanished">高亮颜色</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Settings</source> |
||||||
|
<translation type="vanished">设置</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Line Spacing</source> |
||||||
|
<translation type="vanished">行距</translation> |
||||||
|
</message> |
||||||
|
<message> |
||||||
|
<source>Clock Settings</source> |
||||||
|
<translation type="vanished">时钟设置</translation> |
||||||
|
</message> |
||||||
|
</context> |
||||||
|
</TS> |
After Width: | Height: | Size: 17 KiB |
@ -0,0 +1,9 @@ |
|||||||
|
pragma Singleton |
||||||
|
|
||||||
|
import QtQuick 2.12 |
||||||
|
|
||||||
|
QtObject { |
||||||
|
readonly property var fonts: Qt.fontFamilies() |
||||||
|
readonly property var fontweight: [Font.Light, Font.Normal, Font.Bold] |
||||||
|
readonly property var sfontweight: [qsTr("Light"), qsTr("Normal"), qsTr("Bold")] |
||||||
|
} |
@ -0,0 +1,628 @@ |
|||||||
|
import QtQuick 2.12 |
||||||
|
|
||||||
|
import QtQuick.Controls 2.12 |
||||||
|
import QtQuick.Layouts 1.12 |
||||||
|
import QtGraphicalEffects 1.0 |
||||||
|
import QtQuick.Shapes 1.1 |
||||||
|
|
||||||
|
import NERvGear 1.0 as NVG |
||||||
|
import NERvGear.Controls 1.0 |
||||||
|
import NERvGear.Templates 1.0 as T |
||||||
|
import NERvGear.Preferences 1.0 as P |
||||||
|
|
||||||
|
import "." |
||||||
|
|
||||||
|
WidgetTemplate { |
||||||
|
id: widget |
||||||
|
title: qsTr("Vecto Clock") |
||||||
|
editing: styleDialog.active |
||||||
|
resizable: true |
||||||
|
|
||||||
|
version: "1.0.0" |
||||||
|
defaultValues: { |
||||||
|
"Weekday Settings": { |
||||||
|
"Color": "#ffffff", |
||||||
|
"Font Size": 43, |
||||||
|
"Font Name": Common.fonts.length - 1, |
||||||
|
"Font Weight": 2, |
||||||
|
"Letter Spacing": 4, |
||||||
|
"Y Offset": 50, |
||||||
|
"Gap": 12 |
||||||
|
}, |
||||||
|
"Line Settings": { |
||||||
|
"Color": "#ffffff", |
||||||
|
"Width": 30, |
||||||
|
"Position": -8 |
||||||
|
}, |
||||||
|
"Clock Settings": { |
||||||
|
"Full Clock": false, |
||||||
|
"Text Color": "#554e49", |
||||||
|
"Background Visible": true, |
||||||
|
"Background Color": "#ffffff", |
||||||
|
"Font Size": 33, |
||||||
|
"Font Name": Common.fonts.length - 1, |
||||||
|
"Font Weight": 1, |
||||||
|
"Letter Spacing": 0, |
||||||
|
"X Offset": 0, |
||||||
|
"Y Offset": 24, |
||||||
|
"Gap": 9 |
||||||
|
}, |
||||||
|
"Date Settings": { |
||||||
|
"Color": "#ffffff", |
||||||
|
"Font Size": 10, |
||||||
|
"Font Name": Common.fonts.length - 1, |
||||||
|
"Font Weight": 1, |
||||||
|
"Letter Spacing": 25, |
||||||
|
"X Offset": 29, |
||||||
|
"Y Offset": 12 |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
menu: Menu { |
||||||
|
Action { |
||||||
|
text: qsTr("Settings") + "..." |
||||||
|
onTriggered: styleDialog.active = true |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
readonly property var configs: widget.settings.styles |
||||||
|
|
||||||
|
onConfigsChanged: { |
||||||
|
weekday_mask_source.requestPaint(); |
||||||
|
divline.requestPaint(); |
||||||
|
clockbg.requestPaint(); |
||||||
|
configsFlag = true; |
||||||
|
} |
||||||
|
|
||||||
|
property bool configsFlag: false |
||||||
|
|
||||||
|
property real thour: 0 |
||||||
|
property real t12hour: 0 |
||||||
|
property real tmin: -1 |
||||||
|
|
||||||
|
readonly property var weekdays: ["SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY"] |
||||||
|
property int weekday: -1 |
||||||
|
readonly property var months: ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"] |
||||||
|
property string dateString: "" |
||||||
|
|
||||||
|
readonly property real whRatio: width/height |
||||||
|
readonly property real fixWHRatio: 2.1 |
||||||
|
|
||||||
|
property real clock_width: main.height*fixWHRatio * (0.5-0.005*configs["Line Settings"]["Position"]) |
||||||
|
property real left_gap_ratio: configs["Weekday Settings"]["Gap"]/100 |
||||||
|
property real right_gap_ratio: configs["Clock Settings"]["Gap"]/100 |
||||||
|
property real clock_text_size: weekday_mask.height*configs["Clock Settings"]["Font Size"]/100 |
||||||
|
property real right_topMargin: (timeinfo.height-clock_text_size)*configs["Clock Settings"]["Y Offset"]/100 |
||||||
|
|
||||||
|
Item { |
||||||
|
id: main |
||||||
|
anchors.centerIn: parent |
||||||
|
width: widget.width |
||||||
|
height: whRatio > fixWHRatio ? widget.height : widget.width/fixWHRatio |
||||||
|
|
||||||
|
Item { |
||||||
|
id: weekday_mask |
||||||
|
width: main.width - clock_width |
||||||
|
height: main.height |
||||||
|
anchors.left: parent.left |
||||||
|
anchors.verticalCenter: parent.verticalCenter |
||||||
|
layer.enabled: true |
||||||
|
layer.effect: OpacityMask{ |
||||||
|
maskSource: weekday_mask_source |
||||||
|
} |
||||||
|
|
||||||
|
Canvas { |
||||||
|
id: weekday_mask_source |
||||||
|
visible: false |
||||||
|
anchors.fill: parent |
||||||
|
renderStrategy: Canvas.Cooperative |
||||||
|
contextType: "2d" |
||||||
|
onPaint: { |
||||||
|
context.reset(); |
||||||
|
context.clearRect(0,0,width,height); |
||||||
|
context.beginPath(); |
||||||
|
context.lineTo(weekday_mask.width-weekday_mask.height*left_gap_ratio, 0); |
||||||
|
context.lineTo(weekday_mask.width-0.45*weekday_mask.height-weekday_mask.height*left_gap_ratio, weekday_mask.height); |
||||||
|
context.lineTo(0, weekday_mask.height); |
||||||
|
context.lineTo(0, 0); |
||||||
|
context.closePath(); |
||||||
|
context.fill(); |
||||||
|
} |
||||||
|
onHeightChanged: { |
||||||
|
requestPaint(); |
||||||
|
} |
||||||
|
onWidthChanged: { |
||||||
|
requestPaint(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
Text { |
||||||
|
id: weekday_text |
||||||
|
text: weekday>-1 ? weekdays[weekday] : "" |
||||||
|
color: configs["Weekday Settings"]["Color"] |
||||||
|
anchors.left: parent.left |
||||||
|
anchors.top: parent.top |
||||||
|
anchors.topMargin: (weekday_mask.height-height*0.75)*configs["Weekday Settings"]["Y Offset"]/100 |
||||||
|
|
||||||
|
style: Text.Outline |
||||||
|
styleColor: "transparent" |
||||||
|
|
||||||
|
font.pixelSize: weekday_mask.height*configs["Weekday Settings"]["Font Size"]/100 |
||||||
|
font.letterSpacing: weekday_mask.width/text.length*configs["Weekday Settings"]["Letter Spacing"]/100 |
||||||
|
font.family: Common.fonts[configs["Weekday Settings"]["Font Name"]] |
||||||
|
font.weight: Common.fontweight[configs["Weekday Settings"]["Font Weight"]] |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
Item { |
||||||
|
id: timeinfo |
||||||
|
width: clock_width+0.45*timeinfo.height |
||||||
|
height: main.height |
||||||
|
anchors.right: parent.right |
||||||
|
anchors.top: parent.top |
||||||
|
|
||||||
|
Canvas { |
||||||
|
id: divline |
||||||
|
anchors.fill: parent |
||||||
|
renderTarget: Canvas.FramebufferObject |
||||||
|
renderStrategy: Canvas.Cooperative |
||||||
|
contextType: "2d" |
||||||
|
onPaint: { |
||||||
|
context.reset(); |
||||||
|
context.clearRect(0,0,width,height); |
||||||
|
context.lineWidth = 6*configs["Line Settings"]["Width"]/100; |
||||||
|
context.strokeStyle = configs["Line Settings"]["Color"]; |
||||||
|
context.beginPath(); |
||||||
|
context.moveTo(0, timeinfo.height); |
||||||
|
context.lineTo(0.45*timeinfo.height, 0); |
||||||
|
context.closePath(); |
||||||
|
context.stroke(); |
||||||
|
} |
||||||
|
onHeightChanged: { |
||||||
|
requestPaint(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
Canvas { |
||||||
|
id: clockbg |
||||||
|
width: timeinfo.width |
||||||
|
height: clock_text_size |
||||||
|
visible: configs["Clock Settings"]["Background Visible"] |
||||||
|
anchors.right: parent.right |
||||||
|
anchors.top: parent.top |
||||||
|
anchors.topMargin: right_topMargin |
||||||
|
renderStrategy: Canvas.Cooperative |
||||||
|
contextType: "2d" |
||||||
|
onPaint: { |
||||||
|
context.reset(); |
||||||
|
context.clearRect(0,0,width,height); |
||||||
|
context.fillStyle = configs["Clock Settings"]["Background Color"]; |
||||||
|
context.beginPath(); |
||||||
|
context.moveTo(timeinfo.width, 0); |
||||||
|
context.lineTo(0.45*(timeinfo.height-right_topMargin)+timeinfo.height*right_gap_ratio, 0); |
||||||
|
context.lineTo(timeinfo.height*right_gap_ratio, timeinfo.height-right_topMargin); |
||||||
|
context.lineTo(timeinfo.width, timeinfo.height); |
||||||
|
context.closePath(); |
||||||
|
context.fill(); |
||||||
|
} |
||||||
|
onHeightChanged: { |
||||||
|
requestPaint(); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
Text { |
||||||
|
id: clock_text |
||||||
|
anchors.horizontalCenter: clockbg.horizontalCenter |
||||||
|
anchors.horizontalCenterOffset: -right_topMargin*0.225 + timeinfo.width*(0.225*configs["Clock Settings"]["X Offset"]+12.5)/100 + timeinfo.height*right_gap_ratio/2 |
||||||
|
anchors.verticalCenterOffset: height/100 |
||||||
|
anchors.verticalCenter: clockbg.verticalCenter |
||||||
|
text: "" |
||||||
|
color: configs["Clock Settings"]["Text Color"] |
||||||
|
|
||||||
|
style: Text.Outline |
||||||
|
styleColor: "transparent" |
||||||
|
|
||||||
|
font.pixelSize: clock_text_size/1.7 |
||||||
|
font.letterSpacing: clock_width/text.length*configs["Clock Settings"]["Letter Spacing"]/100 |
||||||
|
font.family: Common.fonts[configs["Clock Settings"]["Font Name"]] |
||||||
|
font.weight: Common.fontweight[configs["Clock Settings"]["Font Weight"]] |
||||||
|
} |
||||||
|
|
||||||
|
Text { |
||||||
|
id: date_text |
||||||
|
anchors.top: clockbg.bottom |
||||||
|
anchors.topMargin: (configs["Date Settings"]["Y Offset"]>0 ? (main.height-right_topMargin-clock_text_size-height) : right_topMargin+clock_text_size)*configs["Date Settings"]["Y Offset"]/100 |
||||||
|
anchors.left: clockbg.left |
||||||
|
anchors.leftMargin: (configs["Date Settings"]["X Offset"]>0 ? clock_width : main.width-timeinfo.width)*configs["Date Settings"]["X Offset"]/100 |
||||||
|
|
||||||
|
text: dateString |
||||||
|
color: configs["Date Settings"]["Color"] |
||||||
|
|
||||||
|
style: Text.Outline |
||||||
|
styleColor: "transparent" |
||||||
|
|
||||||
|
font.pixelSize: timeinfo.height*configs["Date Settings"]["Font Size"]/100 |
||||||
|
font.letterSpacing: clock_width/text.length*configs["Date Settings"]["Letter Spacing"]/100 |
||||||
|
font.family: Common.fonts[configs["Date Settings"]["Font Name"]] |
||||||
|
font.weight: Common.fontweight[configs["Date Settings"]["Font Weight"]] |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
Timer { |
||||||
|
interval: 250 |
||||||
|
|
||||||
|
running: true |
||||||
|
repeat: true |
||||||
|
onTriggered: { |
||||||
|
var now = new Date(); |
||||||
|
if (tmin !== now.getMinutes() || configsFlag) { |
||||||
|
configsFlag = false; |
||||||
|
tmin = now.getMinutes(); |
||||||
|
thour = now.getHours(); |
||||||
|
if (configs["Clock Settings"]["Full Clock"]) { |
||||||
|
clock_text.text = [("0"+thour).slice(-2), ("0"+tmin).slice(-2)].join(":"); |
||||||
|
} else { |
||||||
|
t12hour = thour > 12 ? thour - 12 : thour; |
||||||
|
clock_text.text = [t12hour,("0"+tmin).slice(-2)].join(":") + (thour > 11 ? "PM" : "AM"); |
||||||
|
} |
||||||
|
|
||||||
|
if (weekday !== now.getDay()) { |
||||||
|
weekday = now.getDay(); |
||||||
|
dateString = [months[now.getMonth()], now.getDate(), now.getFullYear()].join(" "); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loader { |
||||||
|
id: styleDialog |
||||||
|
active: false |
||||||
|
sourceComponent: NVG.Window { |
||||||
|
id: window |
||||||
|
title: qsTr("Settings") |
||||||
|
visible: true |
||||||
|
minimumWidth: 500 |
||||||
|
minimumHeight: 600 |
||||||
|
width: minimumWidth |
||||||
|
height: minimumHeight |
||||||
|
|
||||||
|
transientParent: widget.NVG.View.window |
||||||
|
|
||||||
|
property var configuration |
||||||
|
|
||||||
|
Page { |
||||||
|
id: cfg_page |
||||||
|
anchors.fill: parent |
||||||
|
|
||||||
|
header: TitleBar { |
||||||
|
text: qsTr("Vecto Clock") |
||||||
|
|
||||||
|
standardButtons: Dialog.Save | Dialog.Reset |
||||||
|
|
||||||
|
onAccepted: { |
||||||
|
configuration = rootPreference.save(); |
||||||
|
widget.settings.styles = configuration; |
||||||
|
styleDialog.active = false; |
||||||
|
} |
||||||
|
|
||||||
|
onReset: { |
||||||
|
rootPreference.load(); |
||||||
|
let cfg = rootPreference.save(); |
||||||
|
widget.settings.styles = cfg; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
ColumnLayout { |
||||||
|
id: root |
||||||
|
anchors.fill: parent |
||||||
|
anchors.margins: 16 |
||||||
|
anchors.topMargin: 16 |
||||||
|
|
||||||
|
Flickable { |
||||||
|
Layout.fillWidth: true |
||||||
|
Layout.fillHeight: true |
||||||
|
|
||||||
|
clip: true |
||||||
|
contentWidth: preferenceLayout.implicitWidth |
||||||
|
contentHeight: preferenceLayout.implicitHeight |
||||||
|
|
||||||
|
ColumnLayout { |
||||||
|
id: preferenceLayout |
||||||
|
width: root.width |
||||||
|
|
||||||
|
P.PreferenceGroup { |
||||||
|
id: rootPreference |
||||||
|
Layout.fillWidth: true |
||||||
|
|
||||||
|
label: qsTr("Configuration") |
||||||
|
|
||||||
|
onPreferenceEdited: { |
||||||
|
widget.settings.styles = rootPreference.save(); |
||||||
|
} |
||||||
|
|
||||||
|
P.DialogPreference { |
||||||
|
name: "Weekday Settings" |
||||||
|
label: qsTr("Weekday Settings") |
||||||
|
live: true |
||||||
|
icon.name: "regular:\uf1de" |
||||||
|
|
||||||
|
P.ColorPreference { |
||||||
|
name: "Color" |
||||||
|
label: qsTr("Color") |
||||||
|
defaultValue: defaultValues["Weekday Settings"]["Color"] |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "Font Size" |
||||||
|
label: qsTr("Font Size") |
||||||
|
from: 1 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Weekday Settings"]["Font Size"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
|
||||||
|
P.SelectPreference { |
||||||
|
name: "Font Name" |
||||||
|
label: qsTr("Font Style") |
||||||
|
defaultValue: defaultValues["Weekday Settings"]["Font Name"] |
||||||
|
model: Common.fonts |
||||||
|
} |
||||||
|
|
||||||
|
P.SelectPreference { |
||||||
|
name: "Font Weight" |
||||||
|
label: qsTr("Font Weight") |
||||||
|
defaultValue: defaultValues["Weekday Settings"]["Font Weight"] |
||||||
|
model: Common.sfontweight |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "Letter Spacing" |
||||||
|
label: qsTr("Letter Spacing") |
||||||
|
from: 0 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Weekday Settings"]["Letter Spacing"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "Y Offset" |
||||||
|
label: qsTr("Y Offset") |
||||||
|
from: 0 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Weekday Settings"]["Y Offset"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "Gap" |
||||||
|
label: qsTr("Gap") |
||||||
|
from: 0 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Weekday Settings"]["Gap"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
P.DialogPreference { |
||||||
|
name: "Line Settings" |
||||||
|
label: qsTr("Line Settings") |
||||||
|
live: true |
||||||
|
icon.name: "regular:\uf1de" |
||||||
|
|
||||||
|
P.ColorPreference { |
||||||
|
name: "Color" |
||||||
|
label: qsTr("Color") |
||||||
|
defaultValue: defaultValues["Line Settings"]["Color"] |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "Width" |
||||||
|
label: qsTr("Width") |
||||||
|
from: 1 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Line Settings"]["Width"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "Position" |
||||||
|
label: qsTr("Position") |
||||||
|
from: -100 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Line Settings"]["Position"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
P.DialogPreference { |
||||||
|
name: "Clock Settings" |
||||||
|
label: qsTr("Clock Settings") |
||||||
|
live: true |
||||||
|
icon.name: "regular:\uf1de" |
||||||
|
|
||||||
|
P.SwitchPreference { |
||||||
|
name: "Full Clock" |
||||||
|
label: qsTr("24 Hour Clock") |
||||||
|
defaultValue: defaultValues["Clock Settings"]["Full Clock"] |
||||||
|
} |
||||||
|
|
||||||
|
P.ColorPreference { |
||||||
|
name: "Text Color" |
||||||
|
label: qsTr("Text Color") |
||||||
|
defaultValue: defaultValues["Clock Settings"]["Text Color"] |
||||||
|
} |
||||||
|
|
||||||
|
P.SwitchPreference { |
||||||
|
id: _cfg_clock_background_visible |
||||||
|
name:"Background Visible" |
||||||
|
label: qsTr("Background Visible") |
||||||
|
defaultValue: defaultValues["Clock Settings"]["Background Visible"] |
||||||
|
} |
||||||
|
|
||||||
|
P.ColorPreference { |
||||||
|
name: "Background Color" |
||||||
|
label: qsTr("Background Color") |
||||||
|
enabled: _cfg_clock_background_visible.value |
||||||
|
defaultValue: defaultValues["Clock Settings"]["Background Color"] |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "Font Size" |
||||||
|
label: qsTr("Font Size") |
||||||
|
from: 1 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Clock Settings"]["Font Size"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
|
||||||
|
P.SelectPreference { |
||||||
|
name: "Font Name" |
||||||
|
label: qsTr("Font Style") |
||||||
|
defaultValue: defaultValues["Clock Settings"]["Font Name"] |
||||||
|
model: Common.fonts |
||||||
|
} |
||||||
|
|
||||||
|
P.SelectPreference { |
||||||
|
name: "Font Weight" |
||||||
|
label: qsTr("Font Weight") |
||||||
|
defaultValue: defaultValues["Clock Settings"]["Font Weight"] |
||||||
|
model: Common.sfontweight |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "Letter Spacing" |
||||||
|
label: qsTr("Letter Spacing") |
||||||
|
from: 0 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Clock Settings"]["Letter Spacing"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "X Offset" |
||||||
|
label: qsTr("X Offset") |
||||||
|
from: -100 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Clock Settings"]["X Offset"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "Y Offset" |
||||||
|
label: qsTr("Y Offset") |
||||||
|
from: 0 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Clock Settings"]["Y Offset"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "Gap" |
||||||
|
label: qsTr("Gap") |
||||||
|
from: 0 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Clock Settings"]["Gap"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
P.DialogPreference { |
||||||
|
name: "Date Settings" |
||||||
|
label: qsTr("Date Settings") |
||||||
|
live: true |
||||||
|
icon.name: "regular:\uf1de" |
||||||
|
|
||||||
|
P.ColorPreference { |
||||||
|
name: "Color" |
||||||
|
label: qsTr("Color") |
||||||
|
defaultValue: defaultValues["Date Settings"]["Color"] |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "Font Size" |
||||||
|
label: qsTr("Font Size") |
||||||
|
from: 1 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Date Settings"]["Font Size"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
|
||||||
|
P.SelectPreference { |
||||||
|
name: "Font Name" |
||||||
|
label: qsTr("Font Style") |
||||||
|
defaultValue: defaultValues["Date Settings"]["Font Name"] |
||||||
|
model: Common.fonts |
||||||
|
} |
||||||
|
|
||||||
|
P.SelectPreference { |
||||||
|
name: "Font Weight" |
||||||
|
label: qsTr("Font Weight") |
||||||
|
defaultValue: defaultValues["Date Settings"]["Font Weight"] |
||||||
|
model: Common.sfontweight |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "Letter Spacing" |
||||||
|
label: qsTr("Letter Spacing") |
||||||
|
from: 0 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Date Settings"]["Letter Spacing"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "X Offset" |
||||||
|
label: qsTr("X Offset") |
||||||
|
from: -100 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Date Settings"]["X Offset"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
|
||||||
|
P.SliderPreference { |
||||||
|
name: "Y Offset" |
||||||
|
label: qsTr("Y Offset") |
||||||
|
from: -100 |
||||||
|
to: 100 |
||||||
|
stepSize: 1 |
||||||
|
defaultValue: defaultValues["Date Settings"]["Y Offset"] |
||||||
|
displayValue: value + "%" |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
Component.onCompleted: { |
||||||
|
rootPreference.load(widget.settings.styles); |
||||||
|
configuration = widget.settings.styles; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
onClosing: { |
||||||
|
widget.settings.styles = configuration; |
||||||
|
styleDialog.active = false; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,44 @@ |
|||||||
|
import QtQuick 2.12 |
||||||
|
import QtQuick.Controls 2.12 |
||||||
|
|
||||||
|
import NERvGear 1.0 as NVG |
||||||
|
import NERvGear.Templates 1.0 as T |
||||||
|
|
||||||
|
|
||||||
|
T.Widget { |
||||||
|
solid: true |
||||||
|
visible: true |
||||||
|
|
||||||
|
property string version: "" |
||||||
|
property var defaultValues: {} |
||||||
|
signal completed() |
||||||
|
signal updated() |
||||||
|
|
||||||
|
function updateObject(targetObj, sourceObj) { |
||||||
|
for (let prop in sourceObj) { |
||||||
|
if (sourceObj.hasOwnProperty(prop) && sourceObj[prop] !== undefined) { |
||||||
|
if (typeof sourceObj[prop] === 'object') { |
||||||
|
Object.assign(targetObj[prop], sourceObj[prop]); |
||||||
|
} else { |
||||||
|
targetObj[prop] = sourceObj[prop]; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
return targetObj; |
||||||
|
} |
||||||
|
|
||||||
|
onUpdated: { |
||||||
|
widget.settings.styles = updateObject(JSON.parse(JSON.stringify(defaultValues)), widget.settings.styles); |
||||||
|
} |
||||||
|
|
||||||
|
Component.onCompleted: { |
||||||
|
if (!widget.settings.styles) { |
||||||
|
widget.settings.styles = defaultValues; |
||||||
|
widget.settings.version = version; |
||||||
|
} else if (widget.settings.version !== version) { |
||||||
|
updated(); |
||||||
|
widget.settings.version = version; |
||||||
|
} |
||||||
|
completed(); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue