├── PenTool_一个基于Qt的仿真软件Demo.md
├── README.md
├── config.ini
├── dataFiles
├── TXT
│ ├── test.txt
│ └── test2.txt
└── XLSX
│ ├── test.xlsx
│ └── test2.xlsx
├── doc
├── PenTool.html
└── README.html
├── logo.ico
├── logo.rc
├── main.cpp
├── main.qml
├── map
├── Cesium_Air.glb
├── bigemap-gl.js
├── newmbmap.html
├── qwebchannel.js
└── widgets.css
├── msvc_make.bat
├── myapp-T2d.pro
├── myapp-T2d.pro.user.22
├── myapp-T2d.rc
├── myapp-T2d.sln
├── myapp-T2d.vcxproj
├── myapp-T2d.vcxproj.filters
├── pentool.db
├── qml.qrc
├── qml
├── common
│ ├── ChoiceSlidingBarMb.qml
│ ├── ChoiceSlidingBarProject.qml
│ ├── ChoiceSlidingBarSate.qml
│ ├── Loading.qml
│ ├── Menubar.qml
│ ├── Msgconsole.qml
│ ├── PenComboBox.qml
│ ├── SearchTimeAtt.qml
│ └── Topbar.qml
└── view
│ ├── awesome
│ └── index.qml
│ ├── config
│ └── Index.qml
│ ├── data
│ ├── Index.qml
│ ├── mbView
│ │ ├── EditMbDia.qml
│ │ ├── Index.qml
│ │ ├── MbTable.qml
│ │ └── NewMbDia.qml
│ ├── projectView
│ │ ├── EditProjectDia.qml
│ │ ├── Index.qml
│ │ ├── NewProjectDia.qml
│ │ └── ProjectTable.qml
│ └── sateView
│ │ ├── EditSateDia.qml
│ │ ├── Index.qml
│ │ ├── NewSateDia.qml
│ │ └── SateTable.qml
│ ├── help
│ └── Index.qml
│ ├── home
│ ├── CardLogin.qml
│ ├── CardProject.qml
│ ├── Index.qml
│ ├── NewProjectDia.qml
│ └── TopbarHome.qml
│ └── play
│ ├── Index.qml
│ └── NoProjectErrorIndex.qml
├── qml_qmlcache.qrc
├── qtquickcontrols2.conf
├── res
├── gif
│ ├── PenTool.gif
│ └── homeVideo.gif
├── jpg
│ └── earth.jpg
├── png
│ ├── mb(1).png
│ ├── mb.png
│ ├── progressbar.png
│ ├── progressbg.png
│ ├── project(1).png
│ ├── project.png
│ ├── sate(1).png
│ └── sate.png
└── svg
│ ├── close.svg
│ ├── hide.svg
│ ├── max.svg
│ ├── min.svg
│ ├── s0.svg
│ ├── s1.svg
│ ├── s2.svg
│ ├── s3.svg
│ ├── s4.svg
│ ├── s5.svg
│ ├── svg0.svg
│ ├── svg1.svg
│ ├── svg10.svg
│ ├── svg11.svg
│ ├── svg2.svg
│ ├── svg3.svg
│ ├── svg4.svg
│ ├── svg5.svg
│ ├── svg6.svg
│ ├── svg7.svg
│ ├── svg8.svg
│ └── svg9.svg
├── resource.h
├── src
├── comfution.h
├── lincesecreator.h
├── mat
│ ├── fft1.cpp
│ ├── fft1.h
│ ├── rtGetInf.cpp
│ ├── rtGetInf.h
│ ├── rtGetNaN.cpp
│ ├── rtGetNaN.h
│ ├── rt_nonfinite.cpp
│ ├── rt_nonfinite.h
│ ├── rtwtypes.h
│ ├── test.cpp
│ ├── test.h
│ ├── test_emxAPI.cpp
│ ├── test_emxAPI.h
│ ├── test_emxutil.cpp
│ ├── test_emxutil.h
│ ├── test_initialize.cpp
│ ├── test_initialize.h
│ ├── test_terminate.cpp
│ ├── test_terminate.h
│ ├── test_types.h
│ └── tmwtypes.h
├── mathfution.h
├── pentooldatatype.h
├── pentoolsever.cpp
├── pentoolsever.h
├── pentoolsql.cpp
├── pentoolsql.h
├── pentoolwork.cpp
├── pentoolwork.h
├── qcustomplot
│ ├── qcustomplot.cpp
│ └── qcustomplot.h
├── qmlplot.cpp
├── qmlplot.h
├── sever-sql.cpp
├── sever-ui.cpp
├── sever-work.cpp
├── sql-mb.cpp
├── sql-project.cpp
├── sql-sates.cpp
├── t2d
│ ├── Toou2D.h
│ ├── Toou2D.pro
│ ├── build-preset
│ │ ├── plugin.qmltypes
│ │ └── qmldir
│ ├── build_macos.pri
│ ├── build_windows.pri
│ ├── controls
│ │ ├── TAvatar.qml
│ │ ├── TAwesomeIcon.qml
│ │ ├── TBadge.qml
│ │ ├── TBusyIndicator.qml
│ │ ├── TButton.qml
│ │ ├── TCarousel.qml
│ │ ├── TCarouselElement.qml
│ │ ├── TCheckBox.qml
│ │ ├── TDialog.qml
│ │ ├── TDialogBasic.qml
│ │ ├── TDialogButton.qml
│ │ ├── TDividerLine.qml
│ │ ├── TFlickable.qml
│ │ ├── TFpsMonitor.qml
│ │ ├── TIcon.qml
│ │ ├── TIconButton.qml
│ │ ├── TImage.qml
│ │ ├── TImageButton.qml
│ │ ├── TInputField.qml
│ │ ├── TLabel.qml
│ │ ├── TMask.qml
│ │ ├── TMouseArea.qml
│ │ ├── TNavigationBar.qml
│ │ ├── TNavigationElement.qml
│ │ ├── TObject.qml
│ │ ├── TPagination.qml
│ │ ├── TPopover.qml
│ │ ├── TPopoverElement.qml
│ │ ├── TPopoverMenu.qml
│ │ ├── TPopup.qml
│ │ ├── TProgressBar.qml
│ │ ├── TRadioBox.qml
│ │ ├── TRadioBoxGroup.qml
│ │ ├── TRectangle.qml
│ │ ├── TSVGIcon.qml
│ │ ├── TScrollbarH.qml
│ │ ├── TScrollbarV.qml
│ │ ├── TSwitch.qml
│ │ ├── TTag.qml
│ │ ├── TToast.qml
│ │ ├── gadget
│ │ │ ├── tcolor.cpp
│ │ │ ├── tcolor.h
│ │ │ ├── tgadgetbackground.cpp
│ │ │ ├── tgadgetbackground.h
│ │ │ ├── tgadgetborder.cpp
│ │ │ ├── tgadgetborder.h
│ │ │ ├── tgadgeticon.cpp
│ │ │ ├── tgadgeticon.h
│ │ │ ├── tgadgetitem.cpp
│ │ │ ├── tgadgetitem.h
│ │ │ ├── tgadgetlabel.cpp
│ │ │ ├── tgadgetlabel.h
│ │ │ ├── tgadgetscrollbar.cpp
│ │ │ └── tgadgetscrollbar.h
│ │ └── interface
│ │ │ ├── tdialogitem.cpp
│ │ │ ├── tdialogitem.h
│ │ │ ├── ttoastitem.cpp
│ │ │ └── ttoastitem.h
│ ├── def.cpp
│ ├── def.h
│ ├── macos_install.sh
│ ├── qml_plugin.cpp
│ ├── qml_plugin.h
│ ├── resource
│ │ ├── font
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ ├── mask.cso
│ │ │ └── svg.cso
│ │ └── svg
│ │ │ ├── close-px.svg
│ │ │ ├── close.svg
│ │ │ ├── error.svg
│ │ │ ├── info.svg
│ │ │ ├── success.svg
│ │ │ └── warning.svg
│ ├── t2d.cpp
│ ├── t2d.h
│ ├── t2d_res.qrc
│ ├── theme
│ │ ├── ThemeManager.cpp
│ │ ├── ThemeManager.h
│ │ ├── theme_binder.cpp
│ │ ├── theme_binder.h
│ │ ├── theme_handler.cpp
│ │ └── theme_handler.h
│ ├── toou2d.cpp
│ ├── win_install.bat
│ ├── world.cpp
│ └── world.h
├── websockettransport.h
├── work-creMb.cpp
├── work-creSate.cpp
├── work-task1.cpp
├── work-task2.cpp
├── work-task3.cpp
└── work-task4.cpp
└── themes
├── .DS_Store
├── Dark
├── .DS_Store
├── TAvatar.ini
├── TAwesomeIcon.ini
├── TBadge.ini
├── TBusyIndicator.ini
├── TButton.ini
├── TCarousel.ini
├── TCheckBox.ini
├── TDialog.ini
├── TDividerLine.ini
├── TIcon.ini
├── TIconButton.ini
├── TImage.ini
├── TImageButton.ini
├── TInputField.ini
├── TLabel.ini
├── TNavigationBar.ini
├── TPagination.ini
├── TPopover.ini
├── TPopoverMenu.ini
├── TProgressBar.ini
├── TRadioBox.ini
├── TRectangle.ini
├── TSVGIcon.ini
├── TSwitch.ini
├── TTag.ini
├── TToast.ini
└── main.ini
└── Solarized
├── .DS_Store
├── TAvatar.ini
├── TAwesomeIcon.ini
├── TBadge.ini
├── TBusyIndicator.ini
├── TButton.ini
├── TCarousel.ini
├── TCheckBox.ini
├── TDialog.ini
├── TDividerLine.ini
├── TIcon.ini
├── TIconButton.ini
├── TImage.ini
├── TImageButton.ini
├── TInputField.ini
├── TLabel.ini
├── TNavigationBar.ini
├── TPagination.ini
├── TPopover.ini
├── TPopoverMenu.ini
├── TProgressBar.ini
├── TRadioBox.ini
├── TRectangle.ini
├── TSVGIcon.ini
├── TSwitch.ini
├── TTag.ini
├── TToast.ini
└── main.ini
/config.ini:
--------------------------------------------------------------------------------
1 | [Common]
2 | about=Make your software work.
3 | version=1.0
4 | author=penpen
5 |
6 | [FilesConfig]
7 | txtDir=E:/VsProject/penTool/dataFiles/TXT
8 | xlsxDir=E:/VsProject/penTool/dataFiles/XLSX20
9 | temporaryFilesDir=E:/VsProject/penTool/dataFiles/temporaryFiles
10 | rcDir=E:/VsProject/penTool/dataFiles/temporaryFiles
11 | logDir=E:/VsProject/penTool/dataFiles/temporaryFiles
12 |
13 | [FunctionConfig]
14 | tuflag=true
15 |
16 | [themeConfig]
17 | theme=black
18 |
19 | [languageConfig]
20 | language=english
21 |
22 | [safeConfig]
23 | lincese="\n
\nQkZFQkZCRkYwMDA5MDZBM1BQVEdMMDI4SkdEMUdZiqMjAyMi0wNy0yMQ==
"
24 |
--------------------------------------------------------------------------------
/dataFiles/TXT/test.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/dataFiles/TXT/test.txt
--------------------------------------------------------------------------------
/dataFiles/TXT/test2.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/dataFiles/TXT/test2.txt
--------------------------------------------------------------------------------
/dataFiles/XLSX/test.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/dataFiles/XLSX/test.xlsx
--------------------------------------------------------------------------------
/dataFiles/XLSX/test2.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/dataFiles/XLSX/test2.xlsx
--------------------------------------------------------------------------------
/logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/logo.ico
--------------------------------------------------------------------------------
/logo.rc:
--------------------------------------------------------------------------------
1 | IDI_ICON1 ICON DISCARDABLE "logo.ico"
2 |
--------------------------------------------------------------------------------
/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include "./src/pentoolsever.h"
8 | #include "./src/qmlplot.h"
9 | #include "./src/websockettransport.h"
10 | #include "./src/t2d/Toou2D.h"
11 |
12 | int main(int argc, char* argv[])
13 | {
14 | qputenv("QSG_RENDER_LOOP", "basic");
15 | QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
16 | QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
17 | //QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
18 |
19 | QApplication app(argc, argv);
20 | QtWebView::initialize();
21 |
22 | app.setApplicationName("PenTool");
23 | app.setWindowIcon(QIcon(":/res/png/sate(1).png"));
24 |
25 | QQmlApplicationEngine engine;
26 | qmlRegisterType("an.qml.PenToolSever", 1, 0, "PenToolSever");
27 | qmlRegisterType("an.qml.PenToolSever", 1, 0, "CustomPlotItem");
28 | qmlRegisterType("an.qml.PenToolSever", 1, 0, "WebSocketTransport");
29 | #if defined(STATICLIB)
30 | Toou2D::create(&engine);
31 | #endif
32 |
33 | engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
34 | if (engine.rootObjects().isEmpty())
35 | return -1;
36 |
37 | return app.exec();
38 | }
39 |
--------------------------------------------------------------------------------
/map/Cesium_Air.glb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/map/Cesium_Air.glb
--------------------------------------------------------------------------------
/msvc_make.bat:
--------------------------------------------------------------------------------
1 | chcp 65001
2 | "F:\software\Qt\Qt5.12.7\Tools\QtCreator\bin\jom.exe" %*
--------------------------------------------------------------------------------
/myapp-T2d.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/myapp-T2d.rc
--------------------------------------------------------------------------------
/myapp-T2d.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.1.32421.90
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myapp-T2d", "myapp-T2d.vcxproj", "{8E70B053-8577-3BCA-AEDE-EB588E85BC38}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Release|x64 = Release|x64
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {8E70B053-8577-3BCA-AEDE-EB588E85BC38}.Debug|x64.ActiveCfg = Debug|x64
15 | {8E70B053-8577-3BCA-AEDE-EB588E85BC38}.Debug|x64.Build.0 = Debug|x64
16 | {8E70B053-8577-3BCA-AEDE-EB588E85BC38}.Release|x64.ActiveCfg = Release|x64
17 | {8E70B053-8577-3BCA-AEDE-EB588E85BC38}.Release|x64.Build.0 = Release|x64
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {219F5485-911C-48E5-A2F0-7EC8888426F7}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/pentool.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/pentool.db
--------------------------------------------------------------------------------
/qml/common/ChoiceSlidingBarProject.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.7
2 | import QtQuick.Controls 2.1
3 | import QtQuick.Layouts 1.3
4 | import Toou2D 1.0
5 |
6 | Item {
7 | property ListModel mode;
8 |
9 | property var labelColor: "#9BB3C7";
10 | property var iconColor: "#9BB3C7";
11 | property var heardColor: "#0075FF";
12 |
13 | signal sureProject(string projectName);
14 | signal deleteProject(string projectId);
15 |
16 | ListView {
17 | id: attform1
18 | height: parent.height
19 | width: parent.width
20 | model: mode
21 |
22 | delegate: Row {
23 | width: parent.width
24 | TIconButton{
25 | id: projectButton
26 | label.text: name;
27 | label.font.pixelSize: 18;
28 | label.color: labelColor
29 | icon.source: TAwesomeType.FA_tv;
30 | icon.color: iconColor
31 | spacing: parent.width * 0.05
32 | backgroundComponent: null;
33 | onClicked: sureProject(name);
34 | }
35 | Item {
36 | height: 1
37 | width: parent.width - projectButton.width - deleteButton.width - 10
38 | }
39 | TIconButton{
40 | id: deleteButton
41 | icon.position: TPosition.Only;
42 | icon.source: TAwesomeType.FA_close;
43 | icon.color: iconColor
44 | backgroundComponent: null;
45 | onClicked: {
46 | deleteProject(projectId);
47 | penToolSever.getProjectList();
48 | }
49 | }
50 | }
51 | section.property: "editTime"
52 | section.criteria: ViewSection.FullString
53 | section.delegate: sectionHeading1
54 | clip: true
55 |
56 | //分类高亮
57 | Component {
58 | id: sectionHeading1
59 | Text {
60 | height: 30
61 | text: section;
62 | color: heardColor
63 | font.pixelSize: 20
64 | }
65 | }
66 |
67 | //滚动条
68 | ScrollBar.vertical: ScrollBar {
69 | anchors.right: attform1.right
70 | width: parent.width * 0.02
71 | active: true
72 | background: Item { //滚动条的背景样式
73 | Rectangle {
74 | anchors.centerIn: parent
75 | height: parent.height
76 | width: parent.width * 0.1
77 | color: '#606266'
78 | radius: width/2
79 | }
80 | }
81 |
82 | contentItem: Rectangle {
83 | radius: width/4 //bar的圆角
84 | color: '#9BB3C7'
85 | }
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/qml/common/ChoiceSlidingBarSate.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.7
2 | import QtQuick.Controls 2.1
3 | import QtQuick.Layouts 1.3
4 | import Toou2D 1.0
5 |
6 | Item {
7 | signal suresate(var name, var index);
8 | signal canclesate(var name, var index);
9 |
10 | property ListModel mode;
11 |
12 | property var labelColor: "#9BB3C7";
13 | property var iconColor: "#9BB3C7";
14 | property var heardColor: "#0075FF";
15 | property var backgroundColor: "#21222C";
16 |
17 | ListView {
18 | id: satechoiceBar
19 | height: parent.height;
20 | width: parent.width;
21 | model: mode;
22 |
23 | delegate: Row {
24 | spacing: 20
25 | TCheckBox {
26 | id: satechecked
27 | label.text: ""
28 | checked: _checked;
29 | onCheckedChanged: {
30 | if(satechecked.checked) {
31 | mode.setProperty(index, "_checked", true);
32 | suresate(name, index);
33 | }else {
34 | mode.setProperty(index, "_checked", false);
35 | canclesate(name, index);
36 | }
37 | }
38 | }
39 | TButton{
40 | id:a2
41 | backgroundComponent: null;
42 | label.text: name
43 | label.font_size: 18
44 | label.color: "#9BB3C7"
45 | anchors.verticalCenter: satechecked.verticalCenter
46 | onClicked: sateAtt.openToGlobal(a2,0,a2.height)
47 | }
48 | TPopoverMenu {
49 | id:sateAtt
50 | TPopoverElement{
51 | text: "目标名称:" + name;
52 | }
53 | TPopoverElement{
54 | text: "轨道高度(km):" + _height;
55 | }
56 | TPopoverElement{
57 | text: "时间步进(s/次):" + timeStep;
58 | }
59 | TPopoverElement{
60 | text: "次数:" + times;
61 | }
62 | TPopoverElement{
63 | text: "距离(km):" + distance;
64 | }
65 | }
66 | }
67 | ScrollBar.vertical: ScrollBar {
68 | anchors.right: satechoiceBar.right
69 | width: 6
70 | active: true
71 | clip: true
72 | background: Item {
73 | Rectangle {
74 | anchors.centerIn: parent
75 | height: parent.height
76 | width: parent.width * 0.1
77 | color: '#606266'
78 | radius: 3
79 | }
80 | }
81 | contentItem: Rectangle {
82 | radius: 2
83 | color: '#9BB3C7'
84 | }
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/qml/common/Loading.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.0
2 | import Toou2D 1.0
3 |
4 | Item{
5 | TLabel{
6 | wrapMode :Text.WordWrap;
7 | anchors.fill: parent;
8 | text:"With Toou2D becoming more popular every day, there is the constant need to be different. There are millions of users. If Toou2D layouts are chosen well, then you can enhance your profile a great deal.\n
9 | With Toou2D becoming more popular every day, there is the constant need to be different. There are millions of users. If Toou2D layouts are chosen well, then you can enhance your profile a great deal."
10 | }
11 |
12 | TRectangle{
13 | anchors.fill: parent;
14 | opacity: 0.9
15 | }
16 |
17 | TBusyIndicator{
18 | id:tbi
19 | anchors.centerIn: parent;
20 | contentComponent: defaultIconAnimator;
21 | }
22 |
23 | // Row{
24 | // spacing: 50;
25 | // anchors.horizontalCenter: parent.horizontalCenter;
26 | // anchors.bottom: parent.bottom;
27 | // TButton{
28 | // theme.groupName: "demo-popdialog"
29 | // backgroundComponent: null;
30 | // label.text: "Change in circles"
31 | // onClicked: tbi.contentComponent = tbi.defaultDotAnimator;
32 | // }
33 |
34 | // TButton{
35 | // theme.groupName: "demo-popdialog"
36 | // backgroundComponent: null;
37 | // label.text: "Change in dot"
38 | // onClicked: tbi.contentComponent = tbi.defaultIconAnimator;
39 | // }
40 | // }
41 | }
42 |
--------------------------------------------------------------------------------
/qml/common/Msgconsole.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 | import QtGraphicalEffects 1.0
4 | import QtQuick.Controls 2.1
5 |
6 | Item {
7 | id: consoleMsg
8 | property ListModel mode
9 | property var color: Qt.rgba(40/255,40/255,40/255, 0.6);
10 | property var borderColor: "#304156"
11 | property var borderWidth: 1
12 | property var radius: 10
13 | Rectangle {
14 | height: parent.height;
15 | width: parent.width;
16 | color: parent.color;
17 | border.color: consoleMsg.borderColor
18 | border.width: consoleMsg.borderWidth
19 | radius: consoleMsg.radius
20 |
21 | Rectangle {
22 | height: parent.height * 0.12;
23 | width: parent.width * 0.14;
24 | color: Qt.rgba(0/255,0/255,0/255, 0.6);
25 | anchors.horizontalCenter: parent.horizontalCenter
26 | radius: 5
27 | Label {
28 | z:2
29 | text: qsTr("系统消息")
30 | color: "#9BB3C7"
31 | font.pixelSize: 14
32 | font.family: "微软雅黑"
33 | anchors.horizontalCenter: parent.horizontalCenter
34 | anchors.verticalCenter: parent.verticalCenter
35 | }
36 | TIconButton{
37 | icon.position: TPosition.Only;
38 | icon.source: TAwesomeType.FA_train;
39 | icon.color: "#9BB3C7"
40 | anchors.verticalCenter: parent.verticalCenter
41 | backgroundComponent: null;
42 | anchors.right: parent.right;
43 | anchors.rightMargin: 10
44 | onClicked: mode.clear();
45 | }
46 | }
47 |
48 | ListView {
49 | id: msgconsole
50 | height: parent.height * 0.75
51 | width: parent.width * 0.95
52 | anchors.centerIn: parent;
53 | model: mode
54 | delegate: Row {
55 | z:1
56 | spacing: 10
57 | Label {
58 | text: msg
59 | color: "#9BB3C7"
60 | font.pixelSize: 14
61 | font.family: "微软雅黑"
62 |
63 | }
64 | }
65 | //滚动条
66 | ScrollBar.vertical: ScrollBar {
67 | anchors.right: msgconsole.right
68 | width: 6
69 | active: true
70 | clip: true
71 | background: Item { //滚动条的背景样式
72 | Rectangle {
73 | anchors.centerIn: parent
74 | height: parent.height
75 | width: parent.width * 0.1
76 | color: '#606266'
77 | radius: 3
78 | }
79 | }
80 |
81 | contentItem: Rectangle {
82 | radius: 2 //bar的圆角
83 | color: '#9BB3C7'
84 | }
85 | }
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/qml/common/SearchTimeAtt.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.7
2 | import QtQuick.Controls 2.1
3 | import QtQuick.Layouts 1.3
4 | import Toou2D 1.0
5 |
6 | Item {
7 | property ListModel mode
8 |
9 | ListView {
10 | id: searchTimeAtt
11 | height: parent.height
12 | width: parent.width
13 | model: mode
14 | Rectangle {
15 | color: Qt.rgba(0/255,0/255,0/255, 0)
16 | anchors.fill: parent
17 | border.color: "#304156"
18 | border.width: 0
19 | }
20 | delegate: Row{
21 | height: 20
22 | width: parent.width
23 | TLabel {
24 | width: parent.width * 0.5
25 | text: attribute
26 | color: '#9BB3C7'
27 | }
28 | TLabel {
29 | text: value
30 | color: '#9BB3C7'
31 | }
32 | }
33 |
34 | section.property: "team"
35 | section.criteria: ViewSection.FullString
36 | section.delegate: sectionHeading1
37 | clip: true
38 | //分类高亮
39 | Component {
40 | id: sectionHeading1
41 | Item {
42 | height: 30
43 | Rectangle {
44 | radius: 3
45 | width: searchTimeAtt.width
46 | height: 20
47 | color: '#9BB3C7'
48 | Text {
49 | text: section;
50 | anchors.horizontalCenter: parent.horizontalCenter
51 | anchors.verticalCenter: parent.verticalCenter
52 | color: "#303133"
53 | font.pixelSize: 12
54 | }
55 | }
56 | }
57 | }
58 | //滚动条
59 | ScrollBar.vertical: ScrollBar {
60 | anchors.right: searchTimeAtt.right
61 | width: 6
62 | active: true
63 | background: Item { //滚动条的背景样式
64 | Rectangle {
65 | anchors.centerIn: parent
66 | height: parent.height
67 | width: parent.width * 0.1
68 | color: '#606266'
69 | radius: 3
70 | }
71 | }
72 |
73 | contentItem: Rectangle {
74 | radius: 2 //bar的圆角
75 | color: '#9BB3C7'
76 | }
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/qml/view/awesome/index.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.0
2 | import Toou2D 1.0
3 |
4 | Item{
5 | id:page
6 | GridView{
7 | id:gview
8 | clip: true;
9 | anchors.horizontalCenter: parent.horizontalCenter;
10 | anchors.fill: parent;
11 | cellWidth: 120;
12 | cellHeight: 60
13 |
14 | model: T2D.awesomelist();
15 |
16 | delegate: Item{
17 | clip: true;
18 | width: 110;
19 | height: 60;
20 | TAwesomeIcon{
21 | source: modelData;
22 | width: 20;
23 | height: 20;
24 | anchors.centerIn: parent;
25 | }
26 |
27 | TLabel{
28 | text: modelData;
29 | font.pixelSize: 10;
30 | anchors.bottom: parent.bottom;
31 | anchors.horizontalCenter: parent.horizontalCenter;
32 | onContentWidthChanged: {
33 | if(contentWidth > parent.width){
34 | text = text.slice(0,10) + "..";
35 | }
36 | }
37 | }
38 | }
39 | }
40 |
41 | TScrollbarV{
42 | target: gview
43 | anchors.right: parent.right;
44 | height: parent.height;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/qml/view/help/Index.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 | import QtQuick.Controls 1.4
4 | import QtQuick.Controls 2.1
5 | import QtWebView 1.1
6 | import QtWebEngine 1.4
7 |
8 | Item {
9 | Rectangle {
10 | height: parent.height * 0.94
11 | width: parent.width * 0.98
12 | radius: 10
13 | color: "#282A36"
14 | anchors.centerIn: parent;
15 |
16 | Rectangle {
17 | id: configtitle
18 | height: parent.height * 0.12
19 | width: parent.width - 40
20 | color: "#303240"
21 | anchors.horizontalCenter: parent.horizontalCenter;
22 | anchors.top: parent.top;
23 | anchors.topMargin: 20
24 | TLabel {
25 | text: "帮助文档"
26 | color: "#9BB3C7"
27 | font.pixelSize: 28
28 | anchors.verticalCenter: parent.verticalCenter;
29 | anchors.left: parent.left;
30 | anchors.leftMargin: 20
31 | }
32 |
33 | TButton{
34 | width: 90;
35 | height: 36;
36 | label.text: "返回"
37 | label.font.family: "微软雅黑"
38 | label.color: "white"
39 | anchors.verticalCenter: parent.verticalCenter;
40 | anchors.right: parent.right;
41 | anchors.rightMargin: 20
42 | visible: helpView.url == "qrc:/doc/PenTool.html"||helpView.url == "qrc:/doc/README.html" ? false:true
43 | backgroundComponent: Rectangle{
44 | anchors.fill: parent
45 | color: "#0075FF"
46 | radius: 10
47 | }
48 | onClicked: {
49 | if(global.language == "english"){
50 | helpView.url = "qrc:/doc/README.html"
51 | }else{
52 | helpView.url = "qrc:/doc/PenTool.html"
53 | }
54 | }
55 | }
56 | }
57 |
58 | TBusyIndicator{
59 | id:bi;
60 | anchors.centerIn: parent;
61 | }
62 |
63 | WebEngineView {
64 | id: helpView
65 | anchors{
66 | left: parent.left;
67 | leftMargin: 20;
68 | right: parent.right;
69 | rightMargin: 20;
70 | top: configtitle.bottom;
71 | topMargin: 20;
72 | bottom: parent.bottom;
73 | bottomMargin: 20;
74 | }
75 | url: global.language == "english" ? "qrc:/doc/README.html":"qrc:/doc/PenTool.html"
76 | }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/qml/view/play/NoProjectErrorIndex.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.0
2 |
3 | Item {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/qtquickcontrols2.conf:
--------------------------------------------------------------------------------
1 | ; This file can be edited to change the style of the application
2 | ; See Styling Qt Quick Controls 2 in the documentation for details:
3 | ; http://doc.qt.io/qt-5/qtquickcontrols2-styles.html
4 |
5 | [Controls]
6 | Style=Default
7 |
8 | [Universal]
9 | Theme=Light
10 | ;Accent=Steel
11 |
12 | [Material]
13 | Theme=Light
14 | ;Accent=BlueGrey
15 | ;Primary=BlueGray
16 |
--------------------------------------------------------------------------------
/res/gif/PenTool.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/res/gif/PenTool.gif
--------------------------------------------------------------------------------
/res/gif/homeVideo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/res/gif/homeVideo.gif
--------------------------------------------------------------------------------
/res/jpg/earth.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/res/jpg/earth.jpg
--------------------------------------------------------------------------------
/res/png/mb(1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/res/png/mb(1).png
--------------------------------------------------------------------------------
/res/png/mb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/res/png/mb.png
--------------------------------------------------------------------------------
/res/png/progressbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/res/png/progressbar.png
--------------------------------------------------------------------------------
/res/png/progressbg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/res/png/progressbg.png
--------------------------------------------------------------------------------
/res/png/project(1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/res/png/project(1).png
--------------------------------------------------------------------------------
/res/png/project.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/res/png/project.png
--------------------------------------------------------------------------------
/res/png/sate(1).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/res/png/sate(1).png
--------------------------------------------------------------------------------
/res/png/sate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/res/png/sate.png
--------------------------------------------------------------------------------
/res/svg/close.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/hide.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/max.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/min.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/s0.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/s1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/s2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/s3.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/s4.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/s5.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/svg0.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/svg1.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/svg10.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/svg11.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/svg2.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/svg3.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/svg4.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/svg5.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/svg6.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/svg7.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/svg8.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/res/svg/svg9.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/resource.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/resource.h
--------------------------------------------------------------------------------
/src/comfution.h:
--------------------------------------------------------------------------------
1 | #ifndef COMFUTION_H
2 | #define COMFUTION_H
3 | #include "./pentooldatatype.h"
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | class comFuntions {
12 |
13 | public:
14 | template
15 | T ReverseBytes(T oldValue)
16 | {
17 | T newValue;
18 | int size = sizeof(T);
19 | memset(&newValue, 0, size);
20 | for (int i = 0; i < size; i++) {
21 | //挨个取字节
22 | char value = (oldValue >> (i * 8)) & 0xFF;
23 | memset((char*)&newValue + size - i - 1, value, 1);
24 | }
25 | return newValue;
26 | }
27 |
28 | QVariantMap readPro() {
29 | QSettings* sIniSetting = new QSettings("config.ini", QSettings::IniFormat);
30 | sIniSetting->setIniCodec("UTF-8");
31 |
32 | QVariantMap proMap;
33 | proMap.insert("about", sIniSetting->value("Common/about", QString("NULL")).toString());
34 | proMap.insert("version", sIniSetting->value("Common/version", QString("NULL")).toString());
35 | proMap.insert("author", sIniSetting->value("Common/author", QString("NULL")).toString());
36 | proMap.insert("rootDir", QDir::currentPath());
37 | proMap.insert("txtDir", sIniSetting->value("FilesConfig/txtDir", QString("NULL")).toString());
38 | proMap.insert("xlsxDir", sIniSetting->value("FilesConfig/xlsxDir", QString("NULL")).toString());
39 | proMap.insert("logDir", sIniSetting->value("FilesConfig/logDir", QString("NULL")).toString());
40 | proMap.insert("temporaryFilesDir", sIniSetting->value("FilesConfig/temporaryFilesDir", QString("NULL")).toString());
41 |
42 | proMap.insert("theme", sIniSetting->value("themeConfig/theme", QString("NULL")).toString());
43 | proMap.insert("language", sIniSetting->value("languageConfig/language", QString("NULL")).toString());
44 | proMap.insert("tuflag", sIniSetting->value("FunctionConfig/tuflag", QString("NULL")).toBool());
45 | proMap.insert("lincese", sIniSetting->value("safeConfig/lincese", QString("NULL")).toString());
46 | delete sIniSetting;
47 | return proMap;
48 | }
49 |
50 | bool setPro(QVariantMap data) {
51 | QSettings* sIniSetting = new QSettings("config.ini", QSettings::IniFormat);
52 | sIniSetting->setIniCodec("UTF-8");
53 |
54 | sIniSetting->setValue("FilesConfig/logDir", data["logDir"].toString());
55 | sIniSetting->setValue("FilesConfig/txtDir", data["txtDir"].toString());
56 | sIniSetting->setValue("FilesConfig/xlsxDir", data["xlsxDir"].toString());
57 | sIniSetting->setValue("FilesConfig/temporaryFilesDir", data["temporaryFilesDir"].toString());
58 |
59 | sIniSetting->setValue("themeConfig/theme", data["theme"].toString());
60 | sIniSetting->setValue("languageConfig/language", data["language"].toString());
61 | sIniSetting->setValue("FunctionConfig/tuflag", data["tuflag"].toBool());
62 | sIniSetting->setValue("safeConfig/lincese", data["lincese"].toString());
63 | delete sIniSetting;
64 | return true;
65 | }
66 | };
67 |
68 |
69 | #endif // COMFUTION_H
70 |
--------------------------------------------------------------------------------
/src/lincesecreator.h:
--------------------------------------------------------------------------------
1 | #ifndef LINCESECREATOR_H
2 | #define LINCESECREATOR_H
3 | #pragma execution_character_set("utf-8")
4 | #include
5 | #pragma once
6 | #include
7 |
8 | class LinceseCreator
9 | {
10 | public:
11 | LinceseCreator();
12 | ~LinceseCreator();
13 |
14 | char base64char[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
15 | int num_strchr(const char* str, char c);
16 | void decode(const char* base64, unsigned char* dedata);
17 | private:
18 | };
19 |
20 | LinceseCreator::LinceseCreator()
21 | {
22 | }
23 |
24 | LinceseCreator::~LinceseCreator()
25 | {
26 | }
27 |
28 | /* 在字符串中查询特定字符位置索引
29 | * const char *str ,字符串
30 | * char c,要查找的字符
31 | */
32 | int LinceseCreator::num_strchr(const char* str, char c)
33 | {
34 | const char* pindex = strchr(str, c);
35 | if (NULL == pindex) {
36 | return -1;
37 | }
38 | return pindex - str;
39 | }
40 |
41 | /* 解码
42 | * const char * base64 码字
43 | * unsigned char * dedata, 解码恢复的数据
44 | */
45 | void LinceseCreator::decode(const char* base64, unsigned char* dedata) {
46 | int i = 0, j = 0;
47 | int trans[4] = { 0,0,0,0 };
48 | for (; base64[i] != '\0'; i += 4) {
49 | // 每四个一组,译码成三个字符
50 | trans[0] = num_strchr(base64char, base64[i]);
51 | trans[1] = num_strchr(base64char, base64[i + 1]);
52 | // 1/3
53 | dedata[j++] = ((trans[0] << 2) & 0xfc) | ((trans[1] >> 4) & 0x03);
54 |
55 | if (base64[i + 2] == '=') {
56 | continue;
57 | }
58 | else {
59 | trans[2] = num_strchr(base64char, base64[i + 2]);
60 | }
61 | // 2/3
62 | dedata[j++] = ((trans[1] << 4) & 0xf0) | ((trans[2] >> 2) & 0x0f);
63 |
64 | if (base64[i + 3] == '=') {
65 | continue;
66 | }
67 | else {
68 | trans[3] = num_strchr(base64char, base64[i + 3]);
69 | }
70 |
71 | // 3/3
72 | dedata[j++] = ((trans[2] << 6) & 0xc0) | (trans[3] & 0x3f);
73 | }
74 | dedata[j] = '\0';
75 | }
76 |
77 | #endif // LINCESECREATOR_H
78 |
--------------------------------------------------------------------------------
/src/mat/fft1.h:
--------------------------------------------------------------------------------
1 | //
2 | // File: fft1.h
3 | //
4 | // MATLAB Coder version : 4.0
5 | // C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | //
7 | #ifndef FFT1_H
8 | #define FFT1_H
9 |
10 | // Include Files
11 | #include
12 | #include
13 | #include "rtwtypes.h"
14 | #include "test_types.h"
15 |
16 | // Function Declarations
17 | extern void dobluesteinfft(const emxArray_creal_T *x, int N2, int n1, const
18 | emxArray_real_T *costab, const emxArray_real_T *sintab, const emxArray_real_T *
19 | sintabinv, emxArray_creal_T *y);
20 | extern void r2br_r2dit_trig_impl(const emxArray_creal_T *x, int unsigned_nRows,
21 | const emxArray_real_T *costab, const emxArray_real_T *sintab, emxArray_creal_T
22 | *y);
23 |
24 | #endif
25 |
26 | //
27 | // File trailer for fft1.h
28 | //
29 | // [EOF]
30 | //
31 |
--------------------------------------------------------------------------------
/src/mat/rtGetInf.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * File: rtGetInf.cpp
3 | *
4 | * MATLAB Coder version : 4.0
5 | * C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | */
7 |
8 | /*
9 | * Abstract:
10 | * MATLAB for code generation function to initialize non-finite, Inf and MinusInf
11 | */
12 | #include "rtGetInf.h"
13 |
14 | /* Function: rtGetInf ==================================================
15 | * Abstract:
16 | * Initialize rtInf needed by the generated code.
17 | */
18 | real_T rtGetInf(void)
19 | {
20 | return rtInf;
21 | }
22 |
23 | /* Function: rtGetInfF ==================================================
24 | * Abstract:
25 | * Initialize rtInfF needed by the generated code.
26 | */
27 | real32_T rtGetInfF(void)
28 | {
29 | return rtInfF;
30 | }
31 |
32 | /* Function: rtGetMinusInf ==================================================
33 | * Abstract:
34 | * Initialize rtMinusInf needed by the generated code.
35 | */
36 | real_T rtGetMinusInf(void)
37 | {
38 | return rtMinusInf;
39 | }
40 |
41 | /* Function: rtGetMinusInfF ==================================================
42 | * Abstract:
43 | * Initialize rtMinusInfF needed by the generated code.
44 | */
45 | real32_T rtGetMinusInfF(void)
46 | {
47 | return rtMinusInfF;
48 | }
49 |
50 | /*
51 | * File trailer for rtGetInf.cpp
52 | *
53 | * [EOF]
54 | */
55 |
--------------------------------------------------------------------------------
/src/mat/rtGetInf.h:
--------------------------------------------------------------------------------
1 | /*
2 | * File: rtGetInf.h
3 | *
4 | * MATLAB Coder version : 4.0
5 | * C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | */
7 |
8 | #ifndef RTGETINF_H
9 | #define RTGETINF_H
10 | #include
11 | #include "rtwtypes.h"
12 | #include "rt_nonfinite.h"
13 |
14 | extern real_T rtGetInf(void);
15 | extern real32_T rtGetInfF(void);
16 | extern real_T rtGetMinusInf(void);
17 | extern real32_T rtGetMinusInfF(void);
18 |
19 | #endif
20 |
21 | /*
22 | * File trailer for rtGetInf.h
23 | *
24 | * [EOF]
25 | */
26 |
--------------------------------------------------------------------------------
/src/mat/rtGetNaN.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * File: rtGetNaN.cpp
3 | *
4 | * MATLAB Coder version : 4.0
5 | * C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | */
7 |
8 | /*
9 | * Abstract:
10 | * MATLAB for code generation function to initialize non-finite, NaN
11 | */
12 | #include "rtGetNaN.h"
13 |
14 | /* Function: rtGetNaN ==================================================
15 | * Abstract:
16 | * Initialize rtNaN needed by the generated code.
17 | * NaN is initialized as non-signaling. Assumes IEEE.
18 | */
19 | real_T rtGetNaN(void)
20 | {
21 | return rtNaN;
22 | }
23 |
24 | /* Function: rtGetNaNF ==================================================
25 | * Abstract:
26 | * Initialize rtNaNF needed by the generated code.
27 | * NaN is initialized as non-signaling. Assumes IEEE.
28 | */
29 | real32_T rtGetNaNF(void)
30 | {
31 | return rtNaNF;
32 | }
33 |
34 | /*
35 | * File trailer for rtGetNaN.cpp
36 | *
37 | * [EOF]
38 | */
39 |
--------------------------------------------------------------------------------
/src/mat/rtGetNaN.h:
--------------------------------------------------------------------------------
1 | /*
2 | * File: rtGetNaN.h
3 | *
4 | * MATLAB Coder version : 4.0
5 | * C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | */
7 |
8 | #ifndef RTGETNAN_H
9 | #define RTGETNAN_H
10 | #include
11 | #include "rtwtypes.h"
12 | #include "rt_nonfinite.h"
13 |
14 | extern real_T rtGetNaN(void);
15 | extern real32_T rtGetNaNF(void);
16 |
17 | #endif
18 |
19 | /*
20 | * File trailer for rtGetNaN.h
21 | *
22 | * [EOF]
23 | */
24 |
--------------------------------------------------------------------------------
/src/mat/rt_nonfinite.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * File: rt_nonfinite.cpp
3 | *
4 | * MATLAB Coder version : 4.0
5 | * C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | */
7 |
8 | /*
9 | * Abstract:
10 | * MATLAB for code generation function to initialize non-finites,
11 | * (Inf, NaN and -Inf).
12 | */
13 | #include "rt_nonfinite.h"
14 | #include
15 | #include
16 |
17 | real_T rtInf;
18 | real_T rtMinusInf;
19 | real_T rtNaN;
20 | real32_T rtInfF;
21 | real32_T rtMinusInfF;
22 | real32_T rtNaNF;
23 |
24 | /* Function: rt_InitInfAndNaN ==================================================
25 | * Abstract:
26 | * Initialize the rtInf, rtMinusInf, and rtNaN needed by the
27 | * generated code. NaN is initialized as non-signaling. Assumes IEEE.
28 | */
29 | void rt_InitInfAndNaN(size_t realSize)
30 | {
31 | (void)realSize;
32 | rtNaN = std::numeric_limits::quiet_NaN();
33 | rtNaNF = std::numeric_limits::quiet_NaN();
34 | rtInf = std::numeric_limits::infinity();
35 | rtInfF = std::numeric_limits::infinity();
36 | rtMinusInf = -std::numeric_limits::infinity();
37 | rtMinusInfF = -std::numeric_limits::infinity();
38 | }
39 |
40 | /* Function: rtIsInf ==================================================
41 | * Abstract:
42 | * Test if value is infinite
43 | */
44 | boolean_T rtIsInf(real_T value)
45 | {
46 | return ((value==rtInf || value==rtMinusInf) ? 1U : 0U);
47 | }
48 |
49 | /* Function: rtIsInfF =================================================
50 | * Abstract:
51 | * Test if single-precision value is infinite
52 | */
53 | boolean_T rtIsInfF(real32_T value)
54 | {
55 | return(((value)==rtInfF || (value)==rtMinusInfF) ? 1U : 0U);
56 | }
57 |
58 | /* Function: rtIsNaN ==================================================
59 | * Abstract:
60 | * Test if value is not a number
61 | */
62 | boolean_T rtIsNaN(real_T value)
63 | {
64 | return (value!=value)? 1U:0U;
65 | }
66 |
67 | /* Function: rtIsNaNF =================================================
68 | * Abstract:
69 | * Test if single-precision value is not a number
70 | */
71 | boolean_T rtIsNaNF(real32_T value)
72 | {
73 | return (value!=value)? 1U:0U;
74 | }
75 |
76 | /*
77 | * File trailer for rt_nonfinite.cpp
78 | *
79 | * [EOF]
80 | */
81 |
--------------------------------------------------------------------------------
/src/mat/rt_nonfinite.h:
--------------------------------------------------------------------------------
1 | /*
2 | * File: rt_nonfinite.h
3 | *
4 | * MATLAB Coder version : 4.0
5 | * C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | */
7 |
8 | #ifndef RT_NONFINITE_H
9 | #define RT_NONFINITE_H
10 | #include
11 | #include "rtwtypes.h"
12 |
13 | extern real_T rtInf;
14 | extern real_T rtMinusInf;
15 | extern real_T rtNaN;
16 | extern real32_T rtInfF;
17 | extern real32_T rtMinusInfF;
18 | extern real32_T rtNaNF;
19 | extern void rt_InitInfAndNaN(size_t realSize);
20 | extern boolean_T rtIsInf(real_T value);
21 | extern boolean_T rtIsInfF(real32_T value);
22 | extern boolean_T rtIsNaN(real_T value);
23 | extern boolean_T rtIsNaNF(real32_T value);
24 |
25 | #endif
26 |
27 | /*
28 | * File trailer for rt_nonfinite.h
29 | *
30 | * [EOF]
31 | */
32 |
--------------------------------------------------------------------------------
/src/mat/rtwtypes.h:
--------------------------------------------------------------------------------
1 | /*
2 | * File: rtwtypes.h
3 | *
4 | * MATLAB Coder version : 4.0
5 | * C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | */
7 |
8 | #ifndef RTWTYPES_H
9 | #define RTWTYPES_H
10 |
11 | /*=======================================================================*
12 | * Fixed width word size data types: *
13 | * int64_T - signed 64 bit integers *
14 | * uint64_T - unsigned 64 bit integers *
15 | *=======================================================================*/
16 | #if defined(__APPLE__)
17 | # ifndef INT64_T
18 | # define INT64_T long
19 | # define FMT64 "l"
20 | # if defined(__LP64__) && !defined(INT_TYPE_64_IS_LONG)
21 | # define INT_TYPE_64_IS_LONG
22 | # endif
23 | # endif
24 | #endif
25 |
26 | #if defined(__APPLE__)
27 | # ifndef UINT64_T
28 | # define UINT64_T unsigned long
29 | # define FMT64 "l"
30 | # if defined(__LP64__) && !defined(INT_TYPE_64_IS_LONG)
31 | # define INT_TYPE_64_IS_LONG
32 | # endif
33 | # endif
34 | #endif
35 |
36 | #include "tmwtypes.h"
37 | #endif
38 |
39 | /*
40 | * File trailer for rtwtypes.h
41 | *
42 | * [EOF]
43 | */
44 |
--------------------------------------------------------------------------------
/src/mat/test.h:
--------------------------------------------------------------------------------
1 | //
2 | // File: test.h
3 | //
4 | // MATLAB Coder version : 4.0
5 | // C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | //
7 | #ifndef TEST_H
8 | #define TEST_H
9 |
10 | // Include Files
11 | #include
12 | #include
13 | #include "rtwtypes.h"
14 | #include "test_types.h"
15 |
16 | // Function Declarations
17 | extern void test(const emxArray_real_T *Id1, const emxArray_real_T *Qd1,
18 | emxArray_creal_T *fp);
19 |
20 | #endif
21 |
22 | //
23 | // File trailer for test.h
24 | //
25 | // [EOF]
26 | //
27 |
--------------------------------------------------------------------------------
/src/mat/test_emxAPI.h:
--------------------------------------------------------------------------------
1 | //
2 | // File: test_emxAPI.h
3 | //
4 | // MATLAB Coder version : 4.0
5 | // C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | //
7 | #ifndef TEST_EMXAPI_H
8 | #define TEST_EMXAPI_H
9 |
10 | // Include Files
11 | #include
12 | #include
13 | #include "rtwtypes.h"
14 | #include "test_types.h"
15 |
16 | // Function Declarations
17 | extern emxArray_creal_T *emxCreateND_creal_T(int numDimensions, int *size);
18 | extern emxArray_real_T *emxCreateND_real_T(int numDimensions, int size[]);
19 | extern emxArray_creal_T *emxCreateWrapperND_creal_T(creal_T *data, int
20 | numDimensions, int *size);
21 | extern emxArray_real_T *emxCreateWrapperND_real_T(double *data, int
22 | numDimensions, int *size);
23 | extern emxArray_creal_T *emxCreateWrapper_creal_T(creal_T *data, int rows, int
24 | cols);
25 | extern emxArray_real_T *emxCreateWrapper_real_T(double *data, int rows, int cols);
26 | extern emxArray_creal_T *emxCreate_creal_T(int rows, int cols);
27 | extern emxArray_real_T *emxCreate_real_T(int rows, int cols);
28 | extern void emxDestroyArray_creal_T(emxArray_creal_T *emxArray);
29 | extern void emxDestroyArray_real_T(emxArray_real_T *emxArray);
30 | extern void emxInitArray_creal_T(emxArray_creal_T **pEmxArray, int numDimensions);
31 | extern void emxInitArray_real_T(emxArray_real_T **pEmxArray, int numDimensions);
32 |
33 | #endif
34 |
35 | //
36 | // File trailer for test_emxAPI.h
37 | //
38 | // [EOF]
39 | //
40 |
--------------------------------------------------------------------------------
/src/mat/test_emxutil.h:
--------------------------------------------------------------------------------
1 | //
2 | // File: test_emxutil.h
3 | //
4 | // MATLAB Coder version : 4.0
5 | // C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | //
7 | #ifndef TEST_EMXUTIL_H
8 | #define TEST_EMXUTIL_H
9 |
10 | // Include Files
11 | #include
12 | #include
13 | #include "rtwtypes.h"
14 | #include "test_types.h"
15 |
16 | // Function Declarations
17 | extern void emxEnsureCapacity_creal_T(emxArray_creal_T *emxArray, int oldNumel);
18 | extern void emxEnsureCapacity_creal_T1(emxArray_creal_T *emxArray, int oldNumel);
19 | extern void emxEnsureCapacity_real_T(emxArray_real_T *emxArray, int oldNumel);
20 | extern void emxFree_creal_T(emxArray_creal_T **pEmxArray);
21 | extern void emxFree_real_T(emxArray_real_T **pEmxArray);
22 | extern void emxInit_creal_T(emxArray_creal_T **pEmxArray, int numDimensions);
23 | extern void emxInit_creal_T1(emxArray_creal_T **pEmxArray, int numDimensions);
24 | extern void emxInit_real_T(emxArray_real_T **pEmxArray, int numDimensions);
25 |
26 | #endif
27 |
28 | //
29 | // File trailer for test_emxutil.h
30 | //
31 | // [EOF]
32 | //
33 |
--------------------------------------------------------------------------------
/src/mat/test_initialize.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // File: test_initialize.cpp
3 | //
4 | // MATLAB Coder version : 4.0
5 | // C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | //
7 |
8 | // Include Files
9 | #include "rt_nonfinite.h"
10 | #include "test.h"
11 | #include "test_initialize.h"
12 |
13 | // Function Definitions
14 |
15 | //
16 | // Arguments : void
17 | // Return Type : void
18 | //
19 | void test_initialize()
20 | {
21 | rt_InitInfAndNaN(8U);
22 | }
23 |
24 | //
25 | // File trailer for test_initialize.cpp
26 | //
27 | // [EOF]
28 | //
29 |
--------------------------------------------------------------------------------
/src/mat/test_initialize.h:
--------------------------------------------------------------------------------
1 | //
2 | // File: test_initialize.h
3 | //
4 | // MATLAB Coder version : 4.0
5 | // C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | //
7 | #ifndef TEST_INITIALIZE_H
8 | #define TEST_INITIALIZE_H
9 |
10 | // Include Files
11 | #include
12 | #include
13 | #include "rtwtypes.h"
14 | #include "test_types.h"
15 |
16 | // Function Declarations
17 | extern void test_initialize();
18 |
19 | #endif
20 |
21 | //
22 | // File trailer for test_initialize.h
23 | //
24 | // [EOF]
25 | //
26 |
--------------------------------------------------------------------------------
/src/mat/test_terminate.cpp:
--------------------------------------------------------------------------------
1 | //
2 | // File: test_terminate.cpp
3 | //
4 | // MATLAB Coder version : 4.0
5 | // C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | //
7 |
8 | // Include Files
9 | #include "rt_nonfinite.h"
10 | #include "test.h"
11 | #include "test_terminate.h"
12 |
13 | // Function Definitions
14 |
15 | //
16 | // Arguments : void
17 | // Return Type : void
18 | //
19 | void test_terminate()
20 | {
21 | // (no terminate code required)
22 | }
23 |
24 | //
25 | // File trailer for test_terminate.cpp
26 | //
27 | // [EOF]
28 | //
29 |
--------------------------------------------------------------------------------
/src/mat/test_terminate.h:
--------------------------------------------------------------------------------
1 | //
2 | // File: test_terminate.h
3 | //
4 | // MATLAB Coder version : 4.0
5 | // C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | //
7 | #ifndef TEST_TERMINATE_H
8 | #define TEST_TERMINATE_H
9 |
10 | // Include Files
11 | #include
12 | #include
13 | #include "rtwtypes.h"
14 | #include "test_types.h"
15 |
16 | // Function Declarations
17 | extern void test_terminate();
18 |
19 | #endif
20 |
21 | //
22 | // File trailer for test_terminate.h
23 | //
24 | // [EOF]
25 | //
26 |
--------------------------------------------------------------------------------
/src/mat/test_types.h:
--------------------------------------------------------------------------------
1 | //
2 | // File: test_types.h
3 | //
4 | // MATLAB Coder version : 4.0
5 | // C/C++ source code generated on : 03-Apr-2022 17:54:13
6 | //
7 | #ifndef TEST_TYPES_H
8 | #define TEST_TYPES_H
9 |
10 | // Include Files
11 | #include "rtwtypes.h"
12 |
13 | // Type Definitions
14 | typedef struct {
15 | creal_T *data;
16 | int *size;
17 | int allocatedSize;
18 | int numDimensions;
19 | boolean_T canFreeData;
20 | } emxArray_creal_T;
21 |
22 | #ifndef struct_emxArray_real_T
23 | #define struct_emxArray_real_T
24 |
25 | struct emxArray_real_T
26 | {
27 | double *data;
28 | int *size;
29 | int allocatedSize;
30 | int numDimensions;
31 | boolean_T canFreeData;
32 | };
33 |
34 | #endif //struct_emxArray_real_T
35 | #endif
36 |
37 | //
38 | // File trailer for test_types.h
39 | //
40 | // [EOF]
41 | //
42 |
--------------------------------------------------------------------------------
/src/pentooldatatype.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/pentooldatatype.h
--------------------------------------------------------------------------------
/src/pentoolsever.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/pentoolsever.cpp
--------------------------------------------------------------------------------
/src/pentoolsever.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/pentoolsever.h
--------------------------------------------------------------------------------
/src/pentoolsql.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/pentoolsql.h
--------------------------------------------------------------------------------
/src/pentoolwork.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/pentoolwork.cpp
--------------------------------------------------------------------------------
/src/pentoolwork.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/pentoolwork.h
--------------------------------------------------------------------------------
/src/qmlplot.h:
--------------------------------------------------------------------------------
1 | #ifndef QMLPLOT_H
2 | #define QMLPLOT_H
3 | #pragma execution_character_set("utf-8")
4 |
5 | #include
6 | #include
7 | #include
8 | class QCustomPlot;
9 | class QCPAbstractPlottable;
10 | class QCPTextElement;
11 |
12 | class DDuiBasePlotItem : public QQuickPaintedItem
13 | {
14 | Q_OBJECT
15 | public:
16 | DDuiBasePlotItem( QQuickItem* parent = 0 );
17 | virtual ~DDuiBasePlotItem();
18 |
19 | void paint( QPainter* painter );
20 | virtual void initCustomPlotUI(){}
21 |
22 | QCustomPlot *getPlot();
23 | protected:
24 | virtual void hoverMoveEvent(QHoverEvent *event);
25 | virtual void mousePressEvent( QMouseEvent* event );
26 | virtual void mouseReleaseEvent( QMouseEvent* event );
27 | virtual void mouseMoveEvent( QMouseEvent* event );
28 | virtual void mouseDoubleClickEvent( QMouseEvent* event );
29 | virtual void wheelEvent( QWheelEvent *event );
30 |
31 | void routeMouseEvents( QMouseEvent* event );
32 | void routeWheelEvents( QWheelEvent* event );
33 |
34 | public slots:
35 | void graphClicked( QCPAbstractPlottable* plottable );
36 | void onCustomReplot();
37 | void updateCustomPlotSize();
38 |
39 | private:
40 | QCustomPlot* m_CustomPlot;
41 | QThread* plotThread;
42 | };
43 |
44 |
45 |
46 | class CustomPlotItem : public DDuiBasePlotItem
47 | {
48 | Q_OBJECT
49 | public:
50 | CustomPlotItem( QQuickItem* parent = 0 );
51 | virtual ~CustomPlotItem();
52 |
53 | Q_INVOKABLE void initIQCustomPlot();
54 | Q_INVOKABLE void initBXCustomPlot();
55 | Q_INVOKABLE void iqPlay(QVariantMap data);
56 | Q_INVOKABLE void bxPlay(QVariantMap data);
57 |
58 | private:
59 | QCPTextElement *m_title;
60 | };
61 | #endif // QMLPLOT_H
62 |
--------------------------------------------------------------------------------
/src/sever-sql.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/sever-sql.cpp
--------------------------------------------------------------------------------
/src/sever-ui.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/sever-ui.cpp
--------------------------------------------------------------------------------
/src/sever-work.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/sever-work.cpp
--------------------------------------------------------------------------------
/src/sql-mb.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/sql-mb.cpp
--------------------------------------------------------------------------------
/src/sql-project.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/sql-project.cpp
--------------------------------------------------------------------------------
/src/sql-sates.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/sql-sates.cpp
--------------------------------------------------------------------------------
/src/t2d/Toou2D.h:
--------------------------------------------------------------------------------
1 | #ifndef TOOU2D_H
2 | #define TOOU2D_H
3 |
4 | #include
5 |
6 | class Toou2D
7 | {
8 | public:
9 | static void create(QQmlEngine* engine);
10 | static QString version();
11 | };
12 |
13 | #endif // TOOU2D_H
14 |
--------------------------------------------------------------------------------
/src/t2d/Toou2D.pro:
--------------------------------------------------------------------------------
1 | QT += qml quick svg
2 | CONFIG += c++11
3 |
4 | RESOURCES += \
5 | t2d_res.qrc
6 |
7 | # Input
8 | HEADERS += \
9 | qml_plugin.h \
10 | Toou2D.h \
11 | t2d.h \
12 | def.h \
13 | world.h \
14 | theme/theme_binder.h \
15 | theme/theme_handler.h \
16 | theme/ThemeManager.h \
17 | controls/interface/ttoastitem.h \
18 | controls/interface/tdialogitem.h \
19 | controls/gadget/tgadgetlabel.h \
20 | controls/gadget/tgadgetborder.h \
21 | controls/gadget/tgadgetbackground.h \
22 | controls/gadget/tgadgeticon.h \
23 | controls/gadget/tgadgetscrollbar.h \
24 | controls/gadget/tgadgetitem.h \
25 | controls/gadget/tcolor.h
26 |
27 |
28 | SOURCES += \
29 | qml_plugin.cpp \
30 | toou2d.cpp \
31 | t2d.cpp \
32 | def.cpp \
33 | world.cpp \
34 | theme/theme_binder.cpp \
35 | theme/theme_handler.cpp \
36 | theme/ThemeManager.cpp \
37 | controls/interface/ttoastitem.cpp \
38 | controls/interface/tdialogitem.cpp \
39 | controls/gadget/tgadgetlabel.cpp \
40 | controls/gadget/tgadgetborder.cpp \
41 | controls/gadget/tgadgetbackground.cpp \
42 | controls/gadget/tgadgeticon.cpp \
43 | controls/gadget/tgadgetscrollbar.cpp \
44 | controls/gadget/tgadgetitem.cpp \
45 | controls/gadget/tcolor.cpp
46 |
--------------------------------------------------------------------------------
/src/t2d/build-preset/qmldir:
--------------------------------------------------------------------------------
1 | module Toou2D
2 | plugin Toou2D
3 | classname Toou2DQmlPlugin
4 | typeinfo plugin.qmltypes
5 |
--------------------------------------------------------------------------------
/src/t2d/build_macos.pri:
--------------------------------------------------------------------------------
1 | OUTP = $$OUT_PWD/../bin/Toou2D/
2 |
3 | DESTDIR += $$OUTP
4 |
5 | QMAKE_MOC_OPTIONS += -Muri=$$uri
6 | QMAKE_PRE_LINK += chmod -R 777 $$PWD/macos_install.sh;
7 | QMAKE_PRE_LINK += $$PWD/macos_install.sh PRESET $$PWD/ $$OUTP;
8 |
9 | CONFIG(sharedlib){
10 | INST_QMLPATH = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
11 |
12 | QMAKE_POST_LINK += $$PWD/macos_install.sh INSTALL $$PWD/ $$OUTP $$INST_QMLPATH;
13 |
14 | exists($$PWD/../../dev.pri){
15 | include($$PWD/../../dev.pri)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/t2d/build_windows.pri:
--------------------------------------------------------------------------------
1 | OUTP = $$OUT_PWD/../bin/Toou2D
2 | BUILDBIN_PATH = $$replace(OUTP, src-toou2d/../bin, bin)
3 | QTQMLT2D_PATH = $$[QT_INSTALL_QML]/Toou2D
4 | PRESET_PATH = $$PWD/build-preset
5 | SOLIBFILE_PATH = $$OUT_PWD/libToou2D.so
6 | ANDROID = NO
7 |
8 | android{
9 | ANDROID=YES
10 | QMAKE_PRE_LINK *= md $$replace(OUTP, /, \\)
11 | }else{
12 | DESTDIR += $$OUTP
13 | }
14 |
15 | SHAREDSCRIPT = "$$PWD\win_install.bat" SHARED "$$PWD" "$$PRESET_PATH" "$$BUILDBIN_PATH" "$$QTQMLT2D_PATH" $$ANDROID "$$SOLIBFILE_PATH"
16 | STATICSCRIPT = "$$PWD\win_install.bat" STATIC "$$PWD" "$$PRESET_PATH" "$$BUILDBIN_PATH" "$$QTQMLT2D_PATH" $$ANDROID "$$SOLIBFILE_PATH"
17 |
18 | CONFIG(sharedlib){
19 | QMAKE_POST_LINK *= $$replace(SHAREDSCRIPT, /, \\)
20 | }
21 | else{
22 | QMAKE_POST_LINK *= $$replace(STATICSCRIPT, /, \\)
23 | }
24 |
--------------------------------------------------------------------------------
/src/t2d/controls/TAvatar.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 | /*!
4 | \qmltype TAvatar
5 | \inqmlmodule QtQuick 2.6
6 | \brief Picture with rounded corners
7 | \since 5.9.x
8 | \ingroup qtquicktest
9 |
10 | Display user or object information in the form of ICONS, pictures, or characters.
11 |
12 | \code
13 | TAvatar {
14 | id: avatar
15 |
16 | }
17 | \endcode
18 |
19 | When the display type is picture
20 |
21 | \sa {QtTest::TestCase}{TestCase}, {Qt Quick Test Reference Documentation}
22 | */
23 | Item {
24 | id:toou2d_avatar
25 | width: sourceImage.sourceSize.width;
26 | height: sourceImage.sourceSize.height;
27 |
28 | property int radius;
29 |
30 | /*! A border
31 | \sa TGadgetBorder */
32 | property alias border: mborder;
33 |
34 | property alias source : sourceImage.source;
35 |
36 | property alias fillMode:sourceImage.fillMode;
37 |
38 | property bool asynchronous: true;
39 |
40 | property bool smooth: true
41 |
42 | /*! Binding tool, which changes the style of the current control.
43 | \sa TThemeBinder */
44 | property alias theme: mtheme;
45 |
46 | TGadgetBorder{
47 | id:mborder;
48 | width: 0
49 | color: "#8D8D8D";
50 | }
51 |
52 | Image {
53 | id: sourceImage
54 | visible: false;
55 | enabled: false;
56 | anchors.fill: parent;
57 | antialiasing: toou2d_avatar.smooth;
58 | smooth: toou2d_avatar.smooth;
59 | asynchronous: toou2d_avatar.asynchronous;
60 | }
61 |
62 | Rectangle {
63 | id: mask
64 | color: "black"
65 | anchors.fill: parent;
66 | radius: toou2d_avatar.radius;
67 | visible: false
68 | antialiasing: true
69 | smooth: true
70 | enabled: false;
71 | }
72 |
73 | TMask{
74 | anchors.fill: parent;
75 | sourceItem: sourceImage;
76 | maskItem: mask;
77 | }
78 |
79 | TRectangle{
80 | color: "transparent"
81 | radius: toou2d_avatar.radius;
82 | border.width: mborder.width;
83 | border.color: mborder.color;
84 | anchors.fill: parent;
85 | theme.parent: mtheme;
86 | }
87 |
88 | TThemeBinder{
89 | id:mtheme;
90 | className: "TAvatar"
91 | property alias radius: toou2d_avatar.radius;
92 |
93 | Component.onCompleted: initialize();
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/src/t2d/controls/TAwesomeIcon.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 | /*!
5 | \qmltype TAwesomeIcon
6 | \inqmlmodule QtQuick 2.6
7 | \brief Font Icon
8 | \since 5.9.x
9 | \ingroup qtquicktest
10 |
11 | has been supported to the latest version
12 |
13 | \code
14 | TAwesomeIcon{
15 | source:T2D.FA_apple
16 | }
17 | \endcode
18 |
19 | Theme ini file is configured to 'FA_apple'.
20 | */
21 | Item {
22 | id:toou2d_awesomeicon
23 | width: 16;
24 | height: 16;
25 |
26 | property color color;
27 |
28 | /*! \sa TAwesomeType */
29 | property string source;
30 |
31 | property alias theme: mtheme;
32 |
33 | Text {
34 | id:content_text
35 | anchors.fill: parent;
36 | enabled: false;
37 | color: toou2d_awesomeicon.color;
38 | font.family: "fontawesome"
39 | font.pixelSize: Math.max(toou2d_awesomeicon.width,toou2d_awesomeicon.height);
40 | horizontalAlignment: Text.AlignHCenter;
41 | verticalAlignment: Text.AlignVCenter;
42 | }
43 |
44 | TThemeBinder{
45 | id:mtheme
46 | className: "TAwesomeIcon";
47 | state:toou2d_awesomeicon.state;
48 |
49 | property alias color: toou2d_awesomeicon.color;
50 | property alias source: toou2d_awesomeicon.source;
51 | property alias width: toou2d_awesomeicon.width;
52 | property alias height: toou2d_awesomeicon.height;
53 |
54 | Component.onCompleted: initialize();
55 | }
56 |
57 | TObject{
58 | id:wrapper;
59 | property alias source: toou2d_awesomeicon.source;
60 | onSourceChanged: {
61 | if(source.indexOf("FA") === 0){
62 | content_text.text = T2D.awesomeFromKey(source);
63 | }else if(source.charAt(0) !== "\\"){
64 | content_text.text = T2D.awesomeFromValue(source);
65 | }else{
66 | content_text.text = source;
67 | }
68 | }
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/src/t2d/controls/TBadge.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 | //! 徽标/角标
5 | // 出现在按钮、图标旁的数字或状态标记。
6 | // 必须携带value ,label不可以隐藏
7 |
8 | // TBadge{
9 | // value : 8
10 | // }
11 | /*! TODO */
12 | TRectangle {
13 | id:toou2d_badge;
14 | theme.className: "TBadge"
15 |
16 | property int padding: 6;
17 |
18 | property int value : 0;
19 |
20 | property int max: 0;
21 |
22 | property alias label: gadget_label;
23 |
24 | radius: height / 2;
25 |
26 | color: "#F56C6C"
27 |
28 | border.width: 0;
29 |
30 | border.color: "#CB4C4C";
31 |
32 | width: {
33 | if(content_label.contentWidth + padding < height){
34 | return height;
35 | }
36 | return content_label.contentWidth + padding * 1.6;
37 | }
38 |
39 | height: {
40 | return padding + content_label.contentHeight;
41 | }
42 |
43 | TLabel{
44 | id:content_label;
45 | theme.childName: "label"
46 | theme.className: toou2d_badge.theme.className;
47 | theme.state: toou2d_badge.state;
48 |
49 | text: gadget_label.text;
50 | color: gadget_label.color;
51 | font: gadget_label.font;
52 |
53 | anchors.centerIn: parent;
54 | }
55 |
56 | TGadgetLabel{
57 | id:gadget_label;
58 | color: "#FFFFFF"
59 | text: {
60 | if(max > 0 && value > max)
61 | return max + "+";
62 |
63 | return value;
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/src/t2d/controls/TBusyIndicator.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 | //! 加载数据时显示动效。
5 | // 在容器中加载数据时显示。
6 | // 避免ui线程卡顿请使用Animator动画处理
7 | /*! TODO */
8 | Item {
9 | id:toou2d_busyindicatior;
10 | width: contentWidth + padding;
11 | height: contentWidth + padding;
12 |
13 | readonly property int contentWidth: loader.width;
14 |
15 | readonly property int contentHeight: loader.height;
16 |
17 | property int padding: 5;
18 |
19 | property int duration: 500;
20 |
21 | property alias icon: micon;
22 |
23 | property alias color: micon.color;
24 |
25 | property alias theme: mtheme;
26 |
27 | property alias running: toou2d_busyindicatior.visible;
28 |
29 | property Component contentComponent : defaultIconAnimator;
30 |
31 | TGadgetIcon{
32 | id:micon
33 | source: TAwesomeType.FA_circle_o_notch;
34 | color: "#5D5D5D"
35 | }
36 |
37 | Loader{
38 | id:loader;
39 | anchors.centerIn: parent;
40 | sourceComponent: contentComponent;
41 | }
42 |
43 | TThemeBinder{
44 | id:mtheme
45 | className: "TBusyIndicator"
46 |
47 | property alias source: micon.source;
48 | property alias color: micon.color;
49 | property alias size: toou2d_busyindicatior.width;
50 |
51 | Component.onCompleted: initialize();
52 | }
53 |
54 |
55 | readonly property Component defaultIconAnimator: TAwesomeIcon{
56 | source: icon.source;
57 | color: icon.color;
58 | theme.enabled: false;
59 | width: 26;
60 | height: 26;
61 | RotationAnimator on rotation {
62 | from: 0;
63 | to: 360;
64 | duration:toou2d_busyindicatior.duration;
65 | running: toou2d_busyindicatior.visible;
66 | loops: Animation.Infinite;
67 | }
68 | }
69 |
70 | readonly property Component defaultDotAnimator:Row{
71 | id:contentLayout;
72 | spacing: 5;
73 | Repeater{
74 | model: 3;
75 | delegate: TRectangle{
76 | width: 12;
77 | height: 12;
78 | radius: 6;
79 | color: toou2d_busyindicatior.color;
80 | theme.enabled: false;
81 | property bool animrun: false;
82 | SequentialAnimation on scale {
83 | running: animrun;
84 | loops: Animation.Infinite;
85 | ScaleAnimator {from: 1;to: 0.2;duration:600;}
86 | ScaleAnimator {from: 0.2;to: 1;duration:600;}
87 | }
88 | }
89 | }
90 |
91 | Timer {
92 | id:delay;
93 | interval: 200;
94 | repeat: true
95 | property int count: contentLayout.children.length;
96 | property int i: 0;
97 | onTriggered: {
98 | if(contentLayout.children[i].animrun !== "undefined"){
99 | contentLayout.children[i].animrun = true;
100 | }
101 | if(++i >= count - 1)stop();
102 | }
103 | }
104 |
105 | Component.onCompleted: delay.start();
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/src/t2d/controls/TCarouselElement.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 | /*! TODO */
5 | TObject {
6 |
7 | property string imageSource;
8 |
9 | property var otherData;
10 | }
11 |
--------------------------------------------------------------------------------
/src/t2d/controls/TDialogButton.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.0
2 | import Toou2D 1.0
3 |
4 | /*! TODO */
5 | TObject {
6 |
7 | property bool lighter: false;
8 |
9 | property var otherData;
10 |
11 | property alias icon: micon;
12 |
13 | property alias label: mlabel;
14 |
15 | TGadgetIcon{ id:micon }
16 |
17 | TGadgetLabel{ id:mlabel }
18 | }
19 |
--------------------------------------------------------------------------------
/src/t2d/controls/TDividerLine.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 | // 区隔内容的分割线。*/
5 | /*! TODO */
6 | Rectangle {
7 | id:toou2d_line
8 |
9 | property alias theme: theme;
10 |
11 | color: "#DCDFE6"
12 |
13 | TThemeBinder{
14 | id:theme;
15 | state: toou2d_line.state;
16 | className: "TDividerLine";
17 |
18 | property alias color: toou2d_line.color;
19 |
20 | Component.onCompleted: initialize();
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/src/t2d/controls/TFlickable.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 | //! 一个可操控的滚动区域,并带有滚动条。
5 | /*! TODO */
6 | Flickable{
7 | id:toou2d_flickable;
8 |
9 | /*! set default property*/
10 | flickableDirection: Flickable.AutoFlickDirection;
11 |
12 | /*! set default property*/
13 | boundsBehavior: Flickable.StopAtBounds
14 |
15 | /*! 配置滚动条相关属性*/
16 | property alias scrollBar: scrollBar
17 |
18 | TGadgetScrollbar{
19 | id:scrollBar;
20 | vertical: true;
21 | horizontal: true;
22 | }
23 |
24 | children: [
25 | TScrollbarV{
26 | id:scrllbarv
27 | target: toou2d_flickable
28 | height: parent.height;
29 | anchors.right: toou2d_flickable.right;
30 | visible: scrollBar.vertical;
31 | },
32 | TScrollbarH{
33 | id:scrllbarh
34 | target: toou2d_flickable;
35 | width: parent.width;
36 | anchors.bottom: toou2d_flickable.bottom;
37 | visible: scrollBar.horizontal;
38 | }
39 | ]
40 | }
41 |
--------------------------------------------------------------------------------
/src/t2d/controls/TFpsMonitor.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 |
5 | /*! TODO */
6 | Item {
7 | id: toou2d_fps
8 | width: contentItemLoader.width + 5;
9 | height: contentItemLoader.height + 5;
10 |
11 | readonly property alias fps: _private.fps;
12 | readonly property alias fpsAvg: _private.fpsAvg;
13 |
14 | property color color: "#C0C0C0"
15 | property Component contentItem: contentComponent;
16 |
17 | Component{
18 | id:contentComponent
19 | TLabel{
20 | font.pixelSize: 10
21 | font.bold: true;
22 | text: " Avg " + fpsAvg + " | " + fps + " Fps";
23 | }
24 | }
25 |
26 | TObject{
27 | id:_private;
28 | property int frameCounter: 0
29 | property int frameCounterAvg: 0
30 | property int counter: 0
31 | property int fps: 0
32 | property int fpsAvg: 0
33 | }
34 |
35 | Rectangle {
36 | id: monitor
37 | radius: 3
38 | width: 6
39 | height: width
40 | opacity: 0;
41 |
42 | NumberAnimation on rotation {
43 | from:0
44 | to: 360
45 | duration: 800
46 | loops: Animation.Infinite
47 | }
48 | onRotationChanged: _private.frameCounter++;
49 | }
50 |
51 | Loader{
52 | id:contentItemLoader
53 | sourceComponent: contentItem
54 | }
55 |
56 | Timer {
57 | interval: 2000
58 | repeat: true
59 | running: visible
60 | onTriggered: {
61 | _private.frameCounterAvg += _private.frameCounter;
62 | _private.fps = _private.frameCounter/2;
63 | _private.counter++;
64 | _private.frameCounter = 0;
65 | if (_private.counter >= 3) {
66 | _private.fpsAvg = _private.frameCounterAvg/(2 * _private.counter)
67 | _private.frameCounterAvg = 0;
68 | _private.counter = 0;
69 | }
70 | }
71 | }
72 | }
73 |
74 |
--------------------------------------------------------------------------------
/src/t2d/controls/TIcon.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.0
2 | import Toou2D 1.0
3 |
4 | //只能iocn,根据source来判断选择使用TAwesomelIcon 或者 TSVGIcon*/
5 | /*! TODO */
6 | Item {
7 | id:toou2d_icon
8 | property alias theme: mtheme;
9 |
10 | property string source;
11 | property color color;
12 |
13 | Loader{
14 | anchors.fill: parent;
15 | sourceComponent: {
16 | if(toou2d_icon.source.toLowerCase().indexOf(".svg") !== -1){
17 | return svgComponent;
18 | }
19 | return awesomeiconComponent;
20 | }
21 | }
22 |
23 | Component{
24 | id:awesomeiconComponent
25 | TAwesomeIcon{
26 | enabled: false;
27 | theme.enabled: false;
28 |
29 | source: toou2d_icon.source;
30 | color: toou2d_icon.color;
31 | }
32 | }
33 |
34 | Component{
35 | id:svgComponent
36 | TSVGIcon{
37 | enabled: false;
38 | theme.enabled: false;
39 |
40 | source: toou2d_icon.source;
41 | color: toou2d_icon.color;
42 | }
43 | }
44 |
45 | TThemeBinder{
46 | id:mtheme;
47 | className: "TIcon";
48 | state: toou2d_icon.state;
49 | property alias source: toou2d_icon.source;
50 | property alias color: toou2d_icon.color;
51 | property alias width: toou2d_icon.width;
52 | property alias height: toou2d_icon.height;
53 |
54 | Component.onCompleted: initialize();
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/t2d/controls/TImage.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 | // 图片容器,保留了Qt原生img的特性*/
5 | /*! TODO */
6 | Image {
7 | id:toou2d_image
8 |
9 | property alias theme: theme;
10 |
11 | TThemeBinder{
12 | id:theme
13 | className: "TImage"
14 | state: toou2d_image.state;
15 |
16 | property alias source: toou2d_image.source;
17 | property alias width: toou2d_image.width;
18 | property alias height: toou2d_image.height;
19 |
20 | Component.onCompleted: initialize();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/t2d/controls/TImageButton.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 | //图片按钮根据按钮状态的不同切换预设图片源。
5 | /*! TODO */
6 | TMouseArea{
7 | id:toou2d_imgbutton
8 |
9 | property alias theme: mtheme;
10 |
11 | property string source;
12 |
13 | property string pressSource;
14 |
15 | property double pressScale: 0.9;
16 |
17 | states: TThemeManager.appThemeInvalid ? defstates : [];
18 |
19 | Image {
20 | id:image
21 | anchors.fill: parent;
22 | source: toou2d_imgbutton.source;
23 | }
24 |
25 | property list defstates: [
26 | State {
27 | name: statetoString(TStateType.Pressed)
28 | PropertyChanges {
29 | target: image
30 | scale: pressScale
31 | source:{
32 | if(pressSource) return pressSource;
33 | return toou2d_imgbutton.source;
34 | }
35 | }
36 | }
37 | ]
38 |
39 | TThemeBinder{
40 | id:mtheme;
41 | className: "TImageButton"
42 | state:toou2d_imgbutton.state
43 | target: image;
44 |
45 | property string source: image.source;
46 | property double scale: image.scale;
47 |
48 | Component.onCompleted: initialize();
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/src/t2d/controls/TLabel.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import QtQml 2.2
3 | import Toou2D 1.0
4 |
5 | /*! TODO */
6 | Text {
7 | id: toou2d_label
8 |
9 | property alias theme: mtheme;
10 |
11 | color: "#303133"
12 |
13 | TThemeBinder{
14 | id:mtheme
15 | className: "TLabel"
16 | state: toou2d_label.state;
17 |
18 | property alias color: toou2d_label.color;
19 | property alias text: toou2d_label.text;
20 |
21 | property alias bold: toou2d_wrapper_font.bold;
22 | property alias family: toou2d_wrapper_font.family;
23 | property alias pixelSize:toou2d_wrapper_font.pixelSize;
24 |
25 | Component.onCompleted: initialize();
26 | }
27 |
28 | TObject{
29 | id:toou2d_wrapper_font;
30 |
31 | property alias bold: toou2d_label.font.bold;
32 | property alias family: toou2d_label.font.family;
33 | property alias pixelSize: toou2d_label.font.pixelSize;
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/src/t2d/controls/TMask.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.0
2 | import Toou2D 1.0
3 |
4 | Item {
5 | id:toou_mask;
6 |
7 | property alias sourceItem : msource.sourceItem;
8 |
9 | property alias maskItem : mmask.sourceItem;
10 |
11 | property bool smooth: true;
12 |
13 | property bool hideSource: true;
14 |
15 | property bool live: true;
16 |
17 | ShaderEffectSource {
18 | id: msource
19 | live: toou_mask.live;
20 | visible: false
21 | hideSource: toou_mask.hideSource;
22 | smooth: toou_mask.smooth;
23 | sourceItem: sourceItem
24 | }
25 |
26 | ShaderEffectSource {
27 | id: mmask
28 | live: toou_mask.live;
29 | visible: false
30 | hideSource: toou_mask.hideSource;
31 | smooth: toou_mask.smooth;
32 | sourceItem: maskItem
33 | }
34 |
35 | ShaderEffect {
36 | id: shaderItem
37 | anchors.fill: parent;
38 | property variant source: msource
39 | property variant maskSource: mmask
40 | fragmentShader: "qrc:/net.toou.2d/resource/font/mask.cso"
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/src/t2d/controls/TMouseArea.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 | // T2D 基础控件*/
5 | /*! TODO */
6 | MouseArea{
7 | id:toou2d_mousearea;
8 |
9 | cursorShape: enabled ? T2D.mouseAreaCursorShape() : Qt.ArrowCursor;
10 |
11 | property bool stateEnabled:true;
12 |
13 | property bool checkable: false;
14 |
15 | property bool checked: false;
16 |
17 | property bool takeFocus: true;
18 |
19 | property int stateenum: 0;
20 |
21 | state: {
22 | if(checkable && checked){
23 | setState(TStateType.Hovering);
24 | }
25 |
26 | return setState(TStateType.Normal);
27 | }
28 |
29 | onEntered: {
30 | if(hoverEnabled){
31 | setState(containsPress ? TStateType.Pressed : TStateType.Hovering);
32 | }
33 | }
34 |
35 | onExited: {
36 | if(checkable && checked){
37 | setState(TStateType.Checked);
38 | }else{
39 | setState(TStateType.Normal);
40 | }
41 | }
42 |
43 | onPressed: {
44 | setState(TStateType.Pressed);
45 | if(takeFocus) focus = true;
46 | }
47 |
48 | onReleased: {
49 | if(checkable){
50 | checked = !checked;
51 | setState(checked ? TStateType.Checked : TStateType.Normal);
52 | }else{
53 | setState(hoverEnabled && containsMouse ? TStateType.Hovering : TStateType.Normal);
54 | }
55 | }
56 |
57 | function setState(val){
58 | if(!stateEnabled )return;
59 | stateenum = val;
60 | state = statetoString(val);
61 | }
62 |
63 | function statetoString(value){
64 | switch(value){
65 | case TStateType.Normal : return "normal";
66 | case TStateType.Hovering: return "hovering";
67 | case TStateType.Checked : return "checked";
68 | case TStateType.Pressed : return "pressed";
69 | }
70 | return "none";
71 | }
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/src/t2d/controls/TNavigationElement.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.0
2 | import Toou2D 1.0
3 |
4 | /*! TODO */
5 | TObject{
6 |
7 | property string text;
8 |
9 | property string iconSource;
10 |
11 | property var otherData;
12 | }
13 |
--------------------------------------------------------------------------------
/src/t2d/controls/TObject.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 |
3 | /*! TODO */
4 | QtObject {
5 | id:toou2d_object;
6 |
7 | default property list children;
8 | }
9 |
--------------------------------------------------------------------------------
/src/t2d/controls/TPopoverElement.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.0
2 | import Toou2D 1.0
3 |
4 | /*!todo*/
5 | TObject {
6 |
7 | property string type: "item" // item or group
8 |
9 | property string text;
10 |
11 | property string iconSource;
12 |
13 | property var otherData;
14 | }
15 |
--------------------------------------------------------------------------------
/src/t2d/controls/TPopup.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 | //带有遮挡的图层
5 | // 注意:他会覆盖整个屏幕
6 |
7 | // TPopup{
8 | // id:popup
9 |
10 | // Rectangle{
11 | // width: 100;
12 | // height: 100;
13 | // anchors.centerIn: parent;
14 | // }
15 |
16 | // onTriggeredBackground:{
17 | // close();
18 | // }
19 | // }
20 | /*! TODO */
21 | TObject{
22 | id:toou2d_popup
23 |
24 | signal closeed();
25 |
26 | signal opened();
27 |
28 | signal hided(var autoclose);
29 |
30 | signal triggeredBackground();
31 |
32 | property Component backgroundComponent;
33 |
34 | property alias privatec: _private;
35 |
36 | default property alias childitem: _private.childs;
37 |
38 | function open(){
39 | _private.create();
40 | opened();
41 | }
42 |
43 | function hide(autoclose){
44 | _private.hide(autoclose);
45 | hided(autoclose);
46 | }
47 |
48 | function close(){
49 | _private.close();
50 | closeed();
51 | }
52 |
53 | backgroundComponent: Rectangle{
54 | color: "BLACK"; z:-1;
55 | opacity: 0
56 | Behavior on opacity {
57 | NumberAnimation {
58 | duration: 200;
59 | }
60 | }
61 | }
62 |
63 | TObject{
64 | id:_private;
65 |
66 | property list childs;
67 | property var layout;
68 | function create(){
69 | if(!layout){
70 | layout = layoutComponent.createObject(_root_window_);
71 | layout.z = 99999;
72 | layout.show();
73 | }
74 |
75 | for(var i in childs){
76 | if((typeof childs[i].parent) !== "undefined" && (typeof childs[i].className) === "undefined"){
77 | childs[i].parent = layout;
78 | }
79 | }
80 | }
81 |
82 | function hide(autoclose){
83 | layout.hide(autoclose);
84 | }
85 |
86 | function close(){
87 | if(layout) layout.destroy();
88 | }
89 | }
90 |
91 | Component{
92 | id:layoutComponent;
93 |
94 | Item{
95 | id:item
96 | anchors.fill: parent;
97 |
98 | function show(){
99 | if(bgloader.item)
100 | bgloader.item.opacity = 0.5
101 | }
102 |
103 | function hide(autoclose){
104 | if(autoclose) item.destroy(300);
105 | if(bgloader.item)
106 | bgloader.item.opacity = 0;
107 | }
108 |
109 | //black bg
110 | Loader{
111 | id:bgloader;
112 | anchors.fill: parent;
113 | sourceComponent: backgroundComponent;
114 | }
115 |
116 | MouseArea{
117 | anchors.fill: parent;
118 | onClicked: triggeredBackground();
119 | onWheel: {}
120 | }
121 |
122 | //push other item
123 | }
124 | }
125 | }
126 |
--------------------------------------------------------------------------------
/src/t2d/controls/TRadioBoxGroup.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 | /* 单选按钮组
5 | 在组内的单选按钮选择是唯一的
6 | */
7 | /*! TODO */
8 | TObject {
9 | id:toou2d_radioboxgroup
10 |
11 | property Item parent;
12 |
13 | readonly property alias currentIndex: _private.currentIndex;
14 |
15 | readonly property Item currentItem: {
16 | if(currentIndex !== -1){
17 | return children[currentIndex];
18 | }
19 | return null;
20 | }
21 |
22 | readonly property TObject _: TObject{
23 | id:_private;
24 | property int currentIndex: -1;
25 | }
26 |
27 | default property alias children: toou2d_radioboxgroup.mchilds;
28 |
29 | property list mchilds;
30 |
31 | onChildrenChanged: {
32 | var i = children.length - 1;
33 | var trb = children[i];
34 | trb.parent = parent;
35 | trb.groupIndex = i;
36 |
37 | if(_private.currentIndex !== -1)
38 | trb.checked = false;
39 | else if(trb.checked)
40 | _private.currentIndex = i;
41 |
42 | trb.checkedChanged.connect(function(){
43 | if(trb.checked)
44 | _private.currentIndex = trb.groupIndex;
45 | });
46 | }
47 |
48 | onCurrentIndexChanged: {
49 | for(var child in children){
50 | var cobj = children[child] ;
51 | if( cobj.groupIndex !== _private.currentIndex)
52 | cobj.checked = false;
53 | }
54 | }
55 |
56 | Component.onCompleted: {
57 | if(_private.currentIndex == -1){
58 | var cobj = children[0];
59 | if(cobj)cobj.checked = true;
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/t2d/controls/TRectangle.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 | /* 矩形实体颜色区域 */
5 | /*! TODO */
6 | Rectangle {
7 | id:toou2d_rect
8 |
9 | property alias theme: mtheme;
10 |
11 | color: "#FAFAFA";
12 |
13 | border.width: 0;
14 |
15 | border.color: Qt.darker(color,1.1)
16 |
17 | TThemeBinder{
18 | id:mtheme;
19 | state: toou2d_rect.state;
20 | className: "TRectangle";
21 |
22 | property alias color: toou2d_rect.color;
23 | property alias width: toou2d_rect.width;
24 | property alias height: toou2d_rect.height;
25 | property alias radius: toou2d_rect.radius;
26 | property alias opacity: toou2d_rect.opacity;
27 |
28 | TThemeBinder{
29 | target: toou2d_rect.border;
30 | childName: "border";
31 |
32 | property int width: toou2d_rect.border.width;
33 | property color color: toou2d_rect.border.color;
34 | }
35 |
36 | Component.onCompleted: {
37 | initialize();
38 | }
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/t2d/controls/TSVGIcon.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 | /* https://www.iconfont.cn
5 | svg 是一种比较流行的icon 源。
6 | 默认是异步加载的,可提高性能。
7 | 因为需要寻找svg资源,这点没有AwesomeIcon 方便。
8 | */
9 | /*! TODO */
10 | Item {
11 | id:toou2d_svgicon
12 | width: 16; height: 16;
13 |
14 | property bool asynchronous : true;
15 |
16 | property bool smooth: true;
17 |
18 | property color color;
19 |
20 | property string source;
21 |
22 | property alias theme: toou2d_svgicon_theme;
23 |
24 | property alias status: image.status;
25 |
26 | Image {
27 | id:image
28 | asynchronous: toou2d_svgicon.asynchronous;
29 | anchors.fill: toou2d_svgicon;
30 | source: toou2d_svgicon.source;
31 | smooth: toou2d_svgicon.smooth
32 | visible: false;
33 | enabled: false;
34 | }
35 |
36 | ShaderEffect {
37 | id: shaderItem
38 | property variant source: image
39 | property color color: toou2d_svgicon.color
40 | enabled: false;
41 | fragmentShader: "qrc:/net.toou.2d/resource/font/svg.cso"
42 | anchors.fill: parent;
43 | visible: toou2d_svgicon.status === Image.Ready;
44 | }
45 |
46 | TThemeBinder{
47 | id:toou2d_svgicon_theme
48 | className: "TSVGIcon";
49 | state:toou2d_svgicon.state;
50 |
51 | property alias color: toou2d_svgicon.color;
52 | property alias source: toou2d_svgicon.source;
53 | property alias width: toou2d_svgicon.width;
54 | property alias height: toou2d_svgicon.height;
55 |
56 | Component.onCompleted: initialize();
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/t2d/controls/TTag.qml:
--------------------------------------------------------------------------------
1 | import QtQuick 2.6
2 | import Toou2D 1.0
3 |
4 | /* 一个flags文本标签
5 | 用于标记和选择。
6 | TTag{
7 | label.text: "TTag"
8 | }
9 | */
10 | /*! TODO */
11 | TMouseArea{
12 | id:toou2d_tag;
13 |
14 | /*! 关闭 Tag 时触发的事件 */
15 | signal closed();
16 |
17 | /*! 内边距 设置内容与外边框的间距*/
18 | property int padding: 14;
19 |
20 | /*! 文本与关闭按钮间隔距离 */
21 | property int spacing: 8;
22 |
23 | /*! 是否可关闭 */
24 | property bool closable: false;
25 |
26 | /*! 是否可点击的 */
27 | property alias clickable: toou2d_tag.enabled;
28 |
29 | property alias label: mlabel;
30 |
31 | property alias border: mborder;
32 |
33 | property alias background: mbackground;
34 |
35 | property alias theme: mtheme;
36 |
37 | cursorShape: Qt.ArrowCursor;
38 |
39 | width: contentLayout.width + padding;
40 |
41 | height: contentLayout.height + padding;
42 |
43 | TGadgetLabel{
44 | id:mlabel;
45 | text: "Hi TTag"
46 | color: "#409EFF"
47 | }
48 |
49 | TGadgetBorder{
50 | id:mborder;
51 | width: 1;
52 | color: Qt.darker(mlabel.color,1.1)
53 | }
54 |
55 | TGadgetBackground{
56 | id:mbackground;
57 | radius: 2;
58 | color: "#ECF5FF"
59 | }
60 |
61 | TGadgetIcon{
62 | id:gicon;
63 | onSourceChanged: console.log("Warning: TTag The icon source cannot be set.")
64 |
65 | color: mlabel.color;
66 | }
67 |
68 | TRectangle{
69 | id:bgItem;
70 | anchors.fill: parent;
71 | theme.parent: mtheme;
72 |
73 | color: mbackground.color;
74 |
75 | radius: mbackground.radius;
76 | border.width: mborder.width;
77 | border.color: mborder.color;
78 | }
79 |
80 | Row{
81 | id:contentLayout;
82 | anchors.centerIn: toou2d_tag;
83 | spacing: toou2d_tag.spacing;
84 |
85 | TLabel{
86 | id:content_label;
87 | anchors.verticalCenter: parent.verticalCenter;
88 | theme.childName: "label"
89 | theme.parent: mtheme;
90 |
91 | text: mlabel.text;
92 | color: mlabel.color;
93 | font: mlabel.font;
94 | }
95 |
96 | TIconButton{
97 | anchors.verticalCenter: parent.verticalCenter;
98 | theme.childName: "closebtn"
99 | theme.parent: mtheme;
100 |
101 | padding: 2
102 | visible: toou2d_tag.closable;
103 | icon.width: 15;
104 | icon.height: 15;
105 | icon.color: gicon.color;
106 | icon.type: TIconType.SVG;
107 | icon.position: TPosition.Only;
108 | icon.source: "qrc:/net.toou.2d/resource/svg/close-px.svg"
109 | backgroundComponent: null;
110 |
111 | onClicked: toou2d_tag.closed();
112 | }
113 | }
114 |
115 | TThemeBinder{
116 | id:mtheme;
117 | className: "TTag"
118 |
119 | Component.onCompleted: initialize();
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/src/t2d/controls/gadget/tcolor.cpp:
--------------------------------------------------------------------------------
1 | #include "tcolor.h"
2 |
3 | TColor* TColor::m_instance = nullptr;
4 |
5 | QColor TColor::random() const
6 | {
7 | return QColor (crandom(1,255),crandom(1,255),crandom(1,255),crandom(1,255));
8 | }
9 |
10 | QColor TColor::primary() const
11 | {
12 | return QColor("#409EFF");
13 | }
14 |
15 | QColor TColor::primaryLight() const
16 | {
17 | return QColor("#DAECFE");
18 | }
19 |
20 | QColor TColor::success() const
21 | {
22 | return QColor("#67C23A");
23 | }
24 |
25 | QColor TColor::successLight() const
26 | {
27 | return QColor("#E1F2D9");
28 | }
29 |
30 | QColor TColor::warning() const
31 | {
32 | return QColor("#E6A23C");
33 | }
34 |
35 | QColor TColor::warningLight() const
36 | {
37 | return QColor("#FAECD9");
38 | }
39 |
40 | QColor TColor::danger() const
41 | {
42 | return QColor("#F56C6C");
43 | }
44 |
45 | QColor TColor::dangerLight() const
46 | {
47 | return QColor("#FCE2E2");
48 | }
49 |
50 | QColor TColor::info() const
51 | {
52 | return QColor("#909399");
53 | }
54 |
55 | QColor TColor::infoLight() const
56 | {
57 | return QColor("#E9E9EB");
58 | }
59 |
60 | /*!
61 | \class TColor
62 | \brief The qml singleton
63 |
64 | \sa TColor
65 | */
66 | QObject *TColor::exampleQmlSingletonType(QQmlEngine *engine, QJSEngine *scriptEngine)
67 | {
68 | Q_UNUSED(engine)
69 | Q_UNUSED(scriptEngine)
70 |
71 | if(TColor::m_instance == nullptr){
72 | TColor::m_instance = new TColor;
73 | }
74 |
75 | return TColor::m_instance;
76 | }
77 |
--------------------------------------------------------------------------------
/src/t2d/controls/gadget/tcolor.h:
--------------------------------------------------------------------------------
1 | #ifndef TCOLOR_H
2 | #define TCOLOR_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #define crandom(a,b) (rand()%(b-a+1)+a)
9 | class TColor : public QObject
10 | {
11 | Q_OBJECT
12 | QColor m_random;
13 |
14 | public:
15 | static QObject *exampleQmlSingletonType(QQmlEngine *engine, QJSEngine *scriptEngine);
16 | Q_PROPERTY(QColor random READ random NOTIFY randomChanged)
17 | Q_PROPERTY(QColor primary READ primary NOTIFY primaryChanged)
18 | Q_PROPERTY(QColor primaryLight READ primaryLight NOTIFY primaryLightChanged)
19 | Q_PROPERTY(QColor success READ success NOTIFY successChanged)
20 | Q_PROPERTY(QColor successLight READ successLight NOTIFY lightChanged)
21 | Q_PROPERTY(QColor warning READ warning NOTIFY warningChanged)
22 | Q_PROPERTY(QColor warningLight READ warningLight NOTIFY warningLightChanged)
23 | Q_PROPERTY(QColor danger READ danger NOTIFY dangerChanged)
24 | Q_PROPERTY(QColor dangerLight READ dangerLight NOTIFY dangerLightChanged)
25 | Q_PROPERTY(QColor info READ info NOTIFY infoChanged)
26 | Q_PROPERTY(QColor infoLight READ infoLight NOTIFY infoLightChanged)
27 |
28 | private:
29 | QColor random() const;
30 | QColor primary() const;
31 | QColor primaryLight() const;
32 | QColor success() const;
33 | QColor successLight() const;
34 | QColor warning() const;
35 | QColor warningLight() const;
36 | QColor danger() const;
37 | QColor dangerLight() const;
38 | QColor info() const;
39 | QColor infoLight() const;
40 |
41 | signals:
42 | void randomChanged();
43 | void primaryChanged();
44 | void primaryLightChanged();
45 | void successChanged();
46 | void lightChanged();
47 | void warningChanged();
48 | void warningLightChanged();
49 | void dangerChanged();
50 | void dangerLightChanged();
51 | void infoChanged();
52 | void infoLightChanged();
53 |
54 | private:
55 | static TColor* m_instance;
56 | };
57 |
58 |
59 | #endif // TCOLOR_H
60 |
--------------------------------------------------------------------------------
/src/t2d/controls/gadget/tgadgetbackground.cpp:
--------------------------------------------------------------------------------
1 | #include "tgadgetbackground.h"
2 |
3 | /*!
4 | \class TGadgetBackground
5 |
6 | \brief
7 |
8 | \sa TGadgetBackground
9 | */
10 | TGadgetBackground::TGadgetBackground(QObject *parent) : QObject(parent)
11 | ,m_color("#FFF")
12 | ,m_opacity(1)
13 |
14 | {
15 |
16 | }
17 |
18 | float TGadgetBackground::scale() const
19 | {
20 | return m_scale;
21 | }
22 |
23 | int TGadgetBackground::radius() const
24 | {
25 | return m_radius;
26 | }
27 |
28 | QColor TGadgetBackground::color() const
29 | {
30 | return m_color;
31 | }
32 |
33 | bool TGadgetBackground::visible() const
34 | {
35 | return m_visible;
36 | }
37 |
38 | int TGadgetBackground::width() const
39 | {
40 | return m_width;
41 | }
42 |
43 | int TGadgetBackground::height() const
44 | {
45 | return m_height;
46 | }
47 |
48 | float TGadgetBackground::opacity() const
49 | {
50 | return m_opacity;
51 | }
52 |
53 | void TGadgetBackground::setWidth(int width)
54 | {
55 | if (m_width == width)
56 | return;
57 |
58 | m_width = width;
59 | emit widthChanged();
60 | }
61 |
62 | void TGadgetBackground::setHeight(int height)
63 | {
64 | if (m_height == height)
65 | return;
66 |
67 | m_height = height;
68 | emit heightChanged();
69 | }
70 |
71 | void TGadgetBackground::setOpacity(float opacity)
72 | {
73 | if (qFuzzyCompare(m_opacity, opacity))
74 | return;
75 |
76 | m_opacity = opacity;
77 | emit opacityChanged();
78 | }
79 |
80 | void TGadgetBackground::setScale(float scale)
81 | {
82 | if (qFuzzyCompare(m_scale, scale))
83 | return;
84 |
85 | m_scale = scale;
86 | emit scaleChanged();
87 | }
88 |
89 | void TGadgetBackground::setRadius(int radius)
90 | {
91 | if (m_radius == radius)
92 | return;
93 |
94 | m_radius = radius;
95 | emit radiusChanged();
96 | }
97 |
98 | void TGadgetBackground::setColor(QColor color)
99 | {
100 | if (m_color == color)
101 | return;
102 |
103 | m_color = color;
104 | emit colorChanged();
105 | }
106 |
107 | void TGadgetBackground::setVisible(bool visible)
108 | {
109 | if (m_visible == visible)
110 | return;
111 |
112 | m_visible = visible;
113 | emit visibleChanged();
114 | }
115 |
--------------------------------------------------------------------------------
/src/t2d/controls/gadget/tgadgetbackground.h:
--------------------------------------------------------------------------------
1 | #ifndef TGADGETBACKGROUND_H
2 | #define TGADGETBACKGROUND_H
3 |
4 | #include
5 | #include
6 |
7 | class TGadgetBackground : public QObject
8 | {
9 | Q_OBJECT
10 |
11 | public:
12 | explicit TGadgetBackground(QObject *parent = nullptr);
13 |
14 | Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged)
15 | Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged)
16 | Q_PROPERTY(float scale READ scale WRITE setScale NOTIFY scaleChanged)
17 | Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
18 | Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged)
19 | Q_PROPERTY(float opacity READ opacity WRITE setOpacity NOTIFY opacityChanged)
20 | Q_PROPERTY(bool visible READ visible WRITE setVisible NOTIFY visibleChanged)
21 |
22 |
23 | QColor color() const;
24 | float scale() const;
25 | float opacity() const;
26 | bool visible() const;
27 | int radius() const;
28 | int width() const;
29 | int height() const;
30 |
31 | signals:
32 | void scaleChanged();
33 | void radiusChanged();
34 | void colorChanged();
35 | void visibleChanged();
36 | void widthChanged();
37 | void heightChanged();
38 | void opacityChanged();
39 |
40 | private slots:
41 | void setWidth(int width);
42 | void setHeight(int height);
43 | void setOpacity(float opacity);
44 | void setScale(float scale);
45 | void setRadius(int radius);
46 | void setColor(QColor color);
47 | void setVisible(bool visible);
48 |
49 | private:
50 |
51 | QColor m_color;
52 | int m_radius = 0;
53 | int m_width;
54 | int m_height;
55 | float m_opacity = 1;
56 | float m_scale = 1;
57 | bool m_visible = true;
58 | };
59 |
60 | #endif // TGADGETBACKGROUND_H
61 |
--------------------------------------------------------------------------------
/src/t2d/controls/gadget/tgadgetborder.cpp:
--------------------------------------------------------------------------------
1 | #include "tgadgetborder.h"
2 |
3 | /*!
4 | \class TGadgetBorder
5 |
6 | \brief
7 |
8 | \sa TGadgetBorder
9 | */
10 | TGadgetBorder::TGadgetBorder(QObject *parent) : QObject(parent)
11 | ,m_color("#5D5D5D")
12 | ,m_width(0)
13 | ,m_leftWidth(0)
14 | ,m_rightWidth(0)
15 | ,m_topWidth(0)
16 | ,m_bottomWidth(0)
17 | {
18 |
19 | }
20 |
21 | QColor TGadgetBorder::color() const
22 | {
23 | return m_color;
24 | }
25 |
26 | int TGadgetBorder::width() const
27 | {
28 | return m_width;
29 | }
30 |
31 | int TGadgetBorder::leftWidth() const
32 | {
33 | return m_leftWidth;
34 | }
35 |
36 | int TGadgetBorder::rightWidth() const
37 | {
38 | return m_rightWidth;
39 | }
40 |
41 | int TGadgetBorder::topWidth() const
42 | {
43 | return m_topWidth;
44 | }
45 |
46 | int TGadgetBorder::bottomWidth() const
47 | {
48 | return m_bottomWidth;
49 | }
50 |
51 | bool TGadgetBorder::isValid() const
52 | {
53 | return m_isValid;
54 | }
55 |
56 | void TGadgetBorder::setLeftWidth(int leftWidth)
57 | {
58 | if (m_leftWidth == leftWidth)
59 | return;
60 |
61 | m_leftWidth = leftWidth;
62 | emit leftWidthChanged();
63 | hasValid();
64 | }
65 |
66 | void TGadgetBorder::setRightWidth(int rightWidth)
67 | {
68 | if (m_rightWidth == rightWidth)
69 | return;
70 |
71 | m_rightWidth = rightWidth;
72 | emit rightWidthChanged();
73 | hasValid();
74 | }
75 |
76 | void TGadgetBorder::setTopWidth(int topWidth)
77 | {
78 | if (m_topWidth == topWidth)
79 | return;
80 |
81 | m_topWidth = topWidth;
82 | emit topWidthChanged();
83 | hasValid();
84 | }
85 |
86 | void TGadgetBorder::setBottomWidth(int bottomWidth)
87 | {
88 | if (m_bottomWidth == bottomWidth)
89 | return;
90 |
91 | m_bottomWidth = bottomWidth;
92 | emit bottomWidthChanged();
93 | hasValid();
94 | }
95 |
96 | bool TGadgetBorder::hasValid()
97 | {
98 | bool v = m_width > 0 || m_bottomWidth > 0 || m_topWidth > 0 || m_leftWidth > 0 || m_rightWidth > 0;
99 | if(v != m_isValid){
100 | m_isValid = v;
101 | emit isValidChanged();
102 | }
103 | return v;
104 | }
105 |
106 | void TGadgetBorder::setColor(QColor color)
107 | {
108 | if (m_color == color)
109 | return;
110 |
111 | m_color = color;
112 | emit colorChanged();
113 | }
114 |
115 | void TGadgetBorder::setWidth(int width)
116 | {
117 | if (m_width == width)
118 | return;
119 |
120 | m_width = width;
121 | emit widthChanged();
122 | hasValid();
123 | }
124 |
--------------------------------------------------------------------------------
/src/t2d/controls/gadget/tgadgetborder.h:
--------------------------------------------------------------------------------
1 | #ifndef TGADGETBORDER_H
2 | #define TGADGETBORDER_H
3 |
4 | #include
5 | #include
6 |
7 | class TGadgetBorder : public QObject
8 | {
9 | Q_OBJECT
10 |
11 | public:
12 | explicit TGadgetBorder(QObject *parent = nullptr);
13 |
14 | Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged)
15 | Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
16 | Q_PROPERTY(int leftWidth READ leftWidth WRITE setLeftWidth NOTIFY leftWidthChanged)
17 | Q_PROPERTY(int rightWidth READ rightWidth WRITE setRightWidth NOTIFY rightWidthChanged)
18 | Q_PROPERTY(int topWidth READ topWidth WRITE setTopWidth NOTIFY topWidthChanged)
19 | Q_PROPERTY(int bottomWidth READ bottomWidth WRITE setBottomWidth NOTIFY bottomWidthChanged)
20 | Q_PROPERTY(bool isValid READ isValid NOTIFY isValidChanged)
21 |
22 | QColor color() const;
23 | int width() const;
24 | int leftWidth() const;
25 | int rightWidth() const;
26 | int topWidth() const;
27 | int bottomWidth() const;
28 | bool isValid() const;
29 |
30 | public slots:
31 |
32 |
33 | signals:
34 | void colorChanged();
35 | void widthChanged();
36 | void leftWidthChanged();
37 | void rightWidthChanged();
38 | void topWidthChanged();
39 | void bottomWidthChanged();
40 | void isValidChanged();
41 |
42 | private slots:
43 | void setColor(QColor color);
44 | void setWidth(int width);
45 | void setLeftWidth(int leftWidth);
46 | void setRightWidth(int rightWidth);
47 | void setTopWidth(int topWidth);
48 | void setBottomWidth(int bottomWidth);
49 |
50 | private:
51 | QColor m_color;
52 | int m_width;
53 | int m_leftWidth;
54 | int m_rightWidth;
55 | int m_topWidth;
56 | int m_bottomWidth;
57 | bool m_isValid = false;
58 | inline bool hasValid();
59 | };
60 |
61 | #endif // TGADGETBORDER_H
62 |
--------------------------------------------------------------------------------
/src/t2d/controls/gadget/tgadgeticon.cpp:
--------------------------------------------------------------------------------
1 | #include "tgadgeticon.h"
2 |
3 | /*!
4 | \class TGadgetIcon
5 |
6 | \brief
7 |
8 | \sa TGadgetIcon
9 | */
10 | TGadgetIcon::TGadgetIcon(QObject *parent) : QObject(parent),m_width(18),m_height(18)
11 | {
12 |
13 | }
14 |
15 | int TGadgetIcon::width() const
16 | {
17 | return m_width;
18 | }
19 |
20 | int TGadgetIcon::height() const
21 | {
22 | return m_height;
23 | }
24 |
25 | QColor TGadgetIcon::color() const
26 | {
27 | return m_color;
28 | }
29 |
30 | float TGadgetIcon::scale() const
31 | {
32 | return m_scale;
33 | }
34 |
35 | QString TGadgetIcon::source() const
36 | {
37 | return m_source;
38 | }
39 |
40 | int TGadgetIcon::type() const
41 | {
42 | return m_type;
43 | }
44 |
45 | int TGadgetIcon::position() const
46 | {
47 | return m_position;
48 | }
49 |
50 | void TGadgetIcon::setPosition(int position)
51 | {
52 | if (m_position == position)
53 | return;
54 |
55 | m_position = position;
56 | emit positionChanged(m_position);
57 | }
58 |
59 | void TGadgetIcon::setWidth(int width)
60 | {
61 | if (m_width == width)
62 | return;
63 |
64 | m_width = width;
65 | emit widthChanged();
66 | }
67 |
68 | void TGadgetIcon::setHeight(int height)
69 | {
70 | if (m_height == height)
71 | return;
72 |
73 | m_height = height;
74 | emit heightChanged();
75 | }
76 |
77 | void TGadgetIcon::setColor(QColor color)
78 | {
79 | if (m_color == color)
80 | return;
81 |
82 | m_color = color;
83 | emit colorChanged();
84 | }
85 |
86 | void TGadgetIcon::setScale(float scale)
87 | {
88 | if (qFuzzyCompare(m_scale, scale))
89 | return;
90 |
91 | m_scale = scale;
92 | emit scaleChanged();
93 | }
94 |
95 | void TGadgetIcon::setSource(QString source)
96 | {
97 | if (m_source == source)
98 | return;
99 |
100 | m_source = source;
101 | emit sourceChanged();
102 | }
103 |
104 | void TGadgetIcon::setType(int type)
105 | {
106 | if (m_type == type)
107 | return;
108 |
109 | m_type = type;
110 | emit typeChanged(m_type);
111 | }
112 |
--------------------------------------------------------------------------------
/src/t2d/controls/gadget/tgadgeticon.h:
--------------------------------------------------------------------------------
1 | #ifndef TGADGETICON_H
2 | #define TGADGETICON_H
3 |
4 | #include
5 | #include
6 |
7 | class TGadgetIcon : public QObject
8 | {
9 | Q_OBJECT
10 | public:
11 | explicit TGadgetIcon(QObject *parent = nullptr);
12 |
13 | Q_PROPERTY(int type READ type WRITE setType NOTIFY typeChanged)
14 | Q_PROPERTY(QString source READ source WRITE setSource NOTIFY sourceChanged)
15 | Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged)
16 | Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged)
17 | Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
18 | Q_PROPERTY(float scale READ scale WRITE setScale NOTIFY scaleChanged)
19 | Q_PROPERTY(int position READ position WRITE setPosition NOTIFY positionChanged)
20 |
21 | int width() const;
22 | int height() const;
23 | QColor color() const;
24 | float scale() const;
25 | QString source() const;
26 | int type() const;
27 | int position() const;
28 |
29 | signals:
30 | void widthChanged();
31 | void heightChanged();
32 | void colorChanged();
33 | void scaleChanged();
34 | void sourceChanged();
35 |
36 | void typeChanged(int type);
37 |
38 | void positionChanged(int position);
39 |
40 | private slots:
41 | void setWidth(int width);
42 | void setHeight(int height);
43 | void setColor(QColor color);
44 | void setScale(float scale);
45 | void setSource(QString source);
46 | void setType(int type);
47 | void setPosition(int position);
48 |
49 | private:
50 | int m_width;
51 | int m_height;
52 | int m_type = 0;
53 | int m_position = 0;
54 |
55 | float m_scale;
56 | QColor m_color;
57 | QString m_source;
58 | };
59 |
60 | #endif // TGADGETICON_H
61 |
--------------------------------------------------------------------------------
/src/t2d/controls/gadget/tgadgetitem.cpp:
--------------------------------------------------------------------------------
1 | #include "tgadgetitem.h"
2 |
3 |
4 | /*!
5 | \class TGadgetItem
6 |
7 | \brief
8 |
9 | \sa TGadgetItem
10 | */
11 | TGadgetItem::TGadgetItem(QObject *parent) : QObject(parent)
12 | {
13 |
14 | }
15 |
16 | int TGadgetItem::width() const
17 | {
18 | return m_width;
19 | }
20 |
21 | int TGadgetItem::height() const
22 | {
23 | return m_height;
24 | }
25 |
26 | void TGadgetItem::setWidth(int width)
27 | {
28 | if (m_width == width)
29 | return;
30 |
31 | m_width = width;
32 | emit widthChanged(m_width);
33 | }
34 |
35 | void TGadgetItem::setHeight(int height)
36 | {
37 | if (m_height == height)
38 | return;
39 |
40 | m_height = height;
41 | emit heightChanged(m_height);
42 | }
43 |
--------------------------------------------------------------------------------
/src/t2d/controls/gadget/tgadgetitem.h:
--------------------------------------------------------------------------------
1 | #ifndef TGADGETITEM_H
2 | #define TGADGETITEM_H
3 |
4 | #include
5 |
6 | class TGadgetItem : public QObject
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | explicit TGadgetItem(QObject *parent = nullptr);
12 |
13 | Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged)
14 | Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged)
15 |
16 | int width() const;
17 | int height() const;
18 | signals:
19 |
20 | void widthChanged(int width);
21 | void heightChanged(int height);
22 |
23 | private slots:
24 | void setWidth(int width);
25 | void setHeight(int height);
26 |
27 | private:
28 | int m_width;
29 | int m_height;
30 | };
31 |
32 | #endif // TGADGETITEM_H
33 |
--------------------------------------------------------------------------------
/src/t2d/controls/gadget/tgadgetlabel.cpp:
--------------------------------------------------------------------------------
1 | #include "tgadgetlabel.h"
2 |
3 | /*!
4 | \class TGadgetLabel
5 |
6 | \brief
7 |
8 | \sa TGadgetLabel
9 | */
10 | TGadgetLabel::TGadgetLabel(QObject *parent) : QObject(parent)
11 | {
12 |
13 | }
14 |
15 | QString TGadgetLabel::text() const
16 | {
17 | return m_text;
18 | }
19 |
20 | QColor TGadgetLabel::color() const
21 | {
22 | return m_color;
23 | }
24 |
25 | float TGadgetLabel::scale() const
26 | {
27 | return m_scale;
28 | }
29 |
30 | QFont TGadgetLabel::font() const
31 | {
32 | return m_font;
33 | }
34 |
35 | void TGadgetLabel::setText(QString text)
36 | {
37 | if (m_text == text)
38 | return;
39 |
40 | m_text = text;
41 | emit textChanged();
42 | }
43 |
44 | void TGadgetLabel::setColor(QColor color)
45 | {
46 | if (m_color == color)
47 | return;
48 |
49 | m_color = color;
50 | emit colorChanged();
51 | }
52 |
53 | void TGadgetLabel::setScale(float scale)
54 | {
55 | if (qFuzzyCompare(m_scale, scale))
56 | return;
57 |
58 | m_scale = scale;
59 | emit scaleChanged();
60 |
61 | }
62 |
63 | void TGadgetLabel::setFont(QFont font)
64 | {
65 | if (m_font == font)
66 | return;
67 |
68 | m_font = font;
69 | emit fontChanged();
70 | }
71 |
--------------------------------------------------------------------------------
/src/t2d/controls/gadget/tgadgetlabel.h:
--------------------------------------------------------------------------------
1 | #ifndef TGADGETLABEL_H
2 | #define TGADGETLABEL_H
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | class TGadgetLabel : public QObject
9 | {
10 | Q_OBJECT
11 |
12 | public:
13 | explicit TGadgetLabel(QObject *parent = nullptr);
14 |
15 | Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
16 | Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
17 | Q_PROPERTY(float scale READ scale WRITE setScale NOTIFY scaleChanged)
18 | Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
19 | Q_PROPERTY(int font_size READ font_size WRITE setFont_size NOTIFY font_sizeChanged)
20 |
21 | QString text() const;
22 | QColor color() const;
23 | float scale() const;
24 | QFont font() const;
25 |
26 | int font_size() const
27 | {
28 | return m_font_size;
29 | }
30 |
31 | public slots:
32 | void setFont_size(int font_size)
33 | {
34 | if (m_font_size == font_size)
35 | return;
36 |
37 | m_font_size = font_size;
38 | emit font_sizeChanged(m_font_size);
39 | }
40 |
41 | signals:
42 | void textChanged();
43 | void colorChanged();
44 | void scaleChanged();
45 | void fontChanged();
46 |
47 | void font_sizeChanged(int font_size);
48 |
49 | private slots:
50 | void setText(QString text);
51 | void setColor(QColor color);
52 | void setScale(float scale);
53 | void setFont(QFont font);
54 |
55 | private:
56 | QString m_text;
57 | QColor m_color;
58 | float m_scale;
59 | QFont m_font;
60 |
61 | int m_font_size;
62 | };
63 |
64 | #endif // TGADGETLABEL_H
65 |
--------------------------------------------------------------------------------
/src/t2d/controls/gadget/tgadgetscrollbar.cpp:
--------------------------------------------------------------------------------
1 | #include "tgadgetscrollbar.h"
2 |
3 | /*!
4 | \class TGadgetScrollbar
5 |
6 | \brief
7 |
8 | \sa TGadgetScrollbar
9 | */
10 | TGadgetScrollbar::TGadgetScrollbar(QObject *parent) : QObject(parent)
11 | {
12 |
13 | }
14 |
15 | bool TGadgetScrollbar::horizontal() const
16 | {
17 | return m_horizontal;
18 | }
19 |
20 | bool TGadgetScrollbar::vertical() const
21 | {
22 | return m_vertical;
23 | }
24 |
25 | bool TGadgetScrollbar::autoHide() const
26 | {
27 | return m_autoHide;
28 | }
29 |
30 | void TGadgetScrollbar::setHorizontal(bool horizontal)
31 | {
32 | if (m_horizontal == horizontal)
33 | return;
34 |
35 | m_horizontal = horizontal;
36 | emit horizontalChanged();
37 | }
38 |
39 | void TGadgetScrollbar::setVertical(bool vertical)
40 | {
41 | if (m_vertical == vertical)
42 | return;
43 |
44 | m_vertical = vertical;
45 | emit verticalChanged();
46 | }
47 |
48 | void TGadgetScrollbar::setAutoHide(bool autoHide)
49 | {
50 | if (m_autoHide == autoHide)
51 | return;
52 |
53 | m_autoHide = autoHide;
54 | emit autoHideChanged();
55 | }
56 |
--------------------------------------------------------------------------------
/src/t2d/controls/gadget/tgadgetscrollbar.h:
--------------------------------------------------------------------------------
1 | #ifndef TGADGETSCROLLBAR_H
2 | #define TGADGETSCROLLBAR_H
3 |
4 | #include
5 |
6 | class TGadgetScrollbar : public QObject
7 | {
8 | Q_OBJECT
9 | public:
10 | explicit TGadgetScrollbar(QObject *parent = nullptr);
11 |
12 | Q_PROPERTY(bool horizontal READ horizontal WRITE setHorizontal NOTIFY horizontalChanged)
13 | Q_PROPERTY(bool vertical READ vertical WRITE setVertical NOTIFY verticalChanged)
14 | Q_PROPERTY(bool autoHide READ autoHide WRITE setAutoHide NOTIFY autoHideChanged)
15 |
16 | bool horizontal() const;
17 | bool vertical() const;
18 | bool autoHide() const;
19 |
20 | signals:
21 | void horizontalChanged();
22 | void verticalChanged();
23 | void autoHideChanged();
24 |
25 | private slots:
26 | void setHorizontal(bool horizontal);
27 | void setVertical(bool vertical);
28 | void setAutoHide(bool autoHide);
29 |
30 | private:
31 | bool m_horizontal = true;
32 | bool m_vertical = true;
33 | bool m_autoHide = true;
34 |
35 | };
36 |
37 | #endif // TGADGETSCROLLBAR_H
38 |
--------------------------------------------------------------------------------
/src/t2d/controls/interface/tdialogitem.cpp:
--------------------------------------------------------------------------------
1 | #include "tdialogitem.h"
2 |
3 | TDialogItem::TDialogItem(QQuickItem *parent) :QQuickItem(parent)
4 | {
5 |
6 | }
7 |
8 | QVariant TDialogItem::parameter() const
9 | {
10 | return m_parameter;
11 | }
12 |
13 | void TDialogItem::setParameter(QVariant parameter)
14 | {
15 | if (m_parameter == parameter)
16 | return;
17 |
18 | m_parameter = parameter;
19 | emit parameterChanged(m_parameter);
20 | }
21 |
--------------------------------------------------------------------------------
/src/t2d/controls/interface/tdialogitem.h:
--------------------------------------------------------------------------------
1 | #ifndef TDIALOGITEM_H
2 | #define TDIALOGITEM_H
3 |
4 | #include
5 | #include
6 |
7 | class TDialogItem : public QQuickItem
8 | {
9 | Q_OBJECT
10 | QVariant m_parameter;
11 | public:
12 | TDialogItem(QQuickItem* parent = nullptr);
13 |
14 | Q_PROPERTY(QVariant parameter READ parameter WRITE setParameter NOTIFY parameterChanged)
15 |
16 | QVariant parameter() const;
17 |
18 | signals:
19 | void parameterChanged(QVariant parameter);
20 |
21 | public slots:
22 | void setParameter(QVariant parameter);
23 | };
24 |
25 | #endif // TDIALOGITEM_H
26 |
--------------------------------------------------------------------------------
/src/t2d/controls/interface/ttoastitem.cpp:
--------------------------------------------------------------------------------
1 | #include "ttoastitem.h"
2 | #include
3 |
4 | TToastItem::TToastItem(QQuickItem *parent) : QQuickItem(parent)
5 | {
6 |
7 | }
8 |
9 | QString TToastItem::message() const
10 | {
11 | return m_message;
12 | }
13 |
14 | int TToastItem::type() const
15 | {
16 | return m_type;
17 | }
18 |
19 | void TToastItem::setMessage(QString message)
20 | {
21 |
22 | if (m_message == message)
23 | return;
24 |
25 | m_message = message;
26 | emit messageChanged(m_message);
27 | }
28 |
29 | void TToastItem::setType(int type)
30 | {
31 | if (m_type == type)
32 | return;
33 |
34 | m_type = type;
35 | emit typeChanged(m_type);
36 | }
37 |
--------------------------------------------------------------------------------
/src/t2d/controls/interface/ttoastitem.h:
--------------------------------------------------------------------------------
1 | #ifndef TTOASTITEM_H
2 | #define TTOASTITEM_H
3 |
4 | #include
5 | #include
6 |
7 | class TToastItem : public QQuickItem
8 | {
9 | Q_OBJECT
10 | Q_ENUMS(Type)
11 |
12 | public:
13 | enum Type{
14 | Message,
15 | Error,
16 | Warning,
17 | Custom,
18 | };
19 |
20 | TToastItem(QQuickItem* parent = nullptr);
21 |
22 | Q_PROPERTY(QString message READ message WRITE setMessage NOTIFY messageChanged)
23 |
24 | Q_PROPERTY(int type READ type WRITE setType NOTIFY typeChanged)
25 |
26 | QString message() const;
27 |
28 | int type() const;
29 |
30 | signals:
31 | void messageChanged(QString message);
32 | void typeChanged(int type);
33 |
34 | public slots:
35 | void setMessage(QString message);
36 | void setType(int type);
37 |
38 | private:
39 | QString m_message = "";
40 | int m_type;
41 |
42 | };
43 |
44 | #endif // TG_TOASTITEM_H
45 |
--------------------------------------------------------------------------------
/src/t2d/def.cpp:
--------------------------------------------------------------------------------
1 | #include "def.h"
2 |
3 |
4 | /*!
5 | \qmltype TStateType
6 | \brief QML enumeration
7 |
8 |
9 | \value Normal
10 | No details are available.
11 | \value Hovering
12 | No details are available.
13 | \value Pressed
14 | No details are available.
15 | \value Checked
16 | No details are available.
17 | */
18 |
19 |
20 | /*!
21 | \qmltype TIconType
22 | \brief QML enumeration
23 |
24 | \value Awesome
25 | No details are available.
26 | \value SVG
27 | No details are available.
28 | */
29 |
30 |
31 | /*!
32 | \qmltype TAwesomeType
33 | \brief QML enumeration
34 |
35 | \value Many,many,many :)
36 | */
37 |
38 |
39 | /*!
40 | \qmltype TTimePreset
41 | \brief QML enumeration
42 |
43 | \value DevilTime3600s
44 | No details are available.
45 | \value T1s
46 | No details are available.
47 | \value T2s
48 | No details are available.
49 | \value T3s
50 | No details are available.
51 | \value T4s
52 | No details are available.
53 | \value T5s
54 | No details are available.
55 | \value T6s
56 | No details are available.
57 | \value T7s
58 | No details are available.
59 | \value T8s
60 | No details are available.
61 | \value T9s
62 | No details are available.
63 | \value ShortTime2s
64 | No details are available.
65 | \value LongTime4s
66 | No details are available.
67 | */
68 |
69 | /*!
70 | \qmltype TPixelSizePreset
71 | \brief QML enumeration
72 |
73 | \value PH1
74 | No details are available.
75 | \value PH2
76 | No details are available.
77 | \value PH3
78 | No details are available.
79 | \value PH4
80 | No details are available.
81 | \value PH5
82 | No details are available.
83 | \value PH6
84 | No details are available.
85 | \value PH7
86 | No details are available.
87 | \value PH8
88 | No details are available.
89 | */
90 |
91 | /*!
92 | \qmltype TPosition
93 | \brief QML enumeration
94 |
95 | \value Left
96 | No details are available.
97 | \value Reght
98 | No details are available.
99 | \value Top
100 | No details are available.
101 | \value Bottom
102 | No details are available.
103 | \value Center
104 | No details are available.
105 | \value Only
106 | No details are available.
107 | */
108 |
--------------------------------------------------------------------------------
/src/t2d/macos_install.sh:
--------------------------------------------------------------------------------
1 | RUN_TYPE=$1
2 | PRESET_PATH=$2
3 | BUILDER_BIN_PATH=$3
4 | QT_QML_T2D_PATH=$4
5 |
6 | echo ${RUN_TYPE}
7 | if [ ${RUN_TYPE} = "PRESET" ]; then
8 | cp -r ${PRESET_PATH}/Toou2D.h ${BUILDER_BIN_PATH}
9 | cp -r ${PRESET_PATH}/build-preset/* ${BUILDER_BIN_PATH}
10 | else
11 | rm -rf ${QT_QML_T2D_PATH}
12 | mkdir -pv ${QT_QML_T2D_PATH}
13 | cp -r ${BUILDER_BIN_PATH}/* ${QT_QML_T2D_PATH}
14 | fi
15 |
--------------------------------------------------------------------------------
/src/t2d/qml_plugin.cpp:
--------------------------------------------------------------------------------
1 | #include "qml_plugin.h"
2 | #include "t2d.h"
3 |
4 | /*!
5 | \class Toou2DQmlPlugin
6 |
7 | \brief
8 |
9 | \sa Toou2DQmlPlugin
10 | */
11 | void Toou2DQmlPlugin::registerTypes(const char *uri)
12 | {
13 | // @uri Toou2D
14 | T2D::getInstance()->registerTypes(uri);
15 | }
16 |
17 | void Toou2DQmlPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
18 | {
19 | T2D::getInstance()->initializeEngine(engine,uri);
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/src/t2d/qml_plugin.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | class Toou2DQmlPlugin : public QQmlExtensionPlugin
6 | {
7 | Q_OBJECT
8 | Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
9 |
10 | public:
11 | // QQmlExtensionInterface interface
12 | void registerTypes(const char *uri);
13 |
14 | void initializeEngine(QQmlEngine *engine, const char *uri);
15 | };
16 |
--------------------------------------------------------------------------------
/src/t2d/resource/font/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/t2d/resource/font/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/src/t2d/resource/font/mask.cso:
--------------------------------------------------------------------------------
1 | varying highp vec2 qt_TexCoord0;
2 | uniform highp float qt_Opacity;
3 | uniform lowp sampler2D source;
4 | uniform lowp sampler2D maskSource;
5 | void main(void) {
6 | gl_FragColor = texture2D(source, qt_TexCoord0.st) * (texture2D(maskSource, qt_TexCoord0.st).a) * qt_Opacity;
7 | }
8 |
--------------------------------------------------------------------------------
/src/t2d/resource/font/svg.cso:
--------------------------------------------------------------------------------
1 | varying mediump vec2 qt_TexCoord0;
2 | uniform highp float qt_Opacity;
3 | uniform highp vec4 color;
4 | uniform lowp sampler2D source;
5 |
6 | void main() {
7 | highp vec4 toou2d_svg_color = texture2D(source, qt_TexCoord0);
8 | gl_FragColor = vec4(mix(toou2d_svg_color.rgb/max(toou2d_svg_color.a, 0.00390625), color.rgb/max(color.a, 0.00390625), color.a) * toou2d_svg_color.a, toou2d_svg_color.a) * qt_Opacity;
9 | }
10 |
--------------------------------------------------------------------------------
/src/t2d/resource/svg/close-px.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/t2d/resource/svg/close.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/t2d/resource/svg/error.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/t2d/resource/svg/info.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/t2d/resource/svg/success.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/t2d/resource/svg/warning.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/t2d/t2d.h:
--------------------------------------------------------------------------------
1 | #ifndef T2D_H
2 | #define T2D_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include "world.h"
8 | #include "def.h"
9 |
10 | class T2D : public QObject
11 | {
12 | Q_OBJECT
13 |
14 | public:
15 | static QObject *exampleQmlSingletonType(QQmlEngine *engine, QJSEngine *scriptEngine);
16 | static T2D *getInstance();
17 |
18 | Q_INVOKABLE QString version() const;
19 | Q_INVOKABLE QString awesomeFromKey(const QString& key);
20 | Q_INVOKABLE QString awesomeFromValue(int type);
21 | Q_INVOKABLE QStringList awesomelist();
22 |
23 | void registerTypes(const char *uri);
24 | void initializeEngine(QQmlEngine *engine, const char *uri);
25 |
26 | void initWorld(T2DWorld* world);
27 | void initQuickRoot(QQuickWindow* root);
28 |
29 | void setAppStartupTheme(const QString& themeName);
30 | void addAppThemePath(const QString& path);
31 |
32 | Q_INVOKABLE int mouseAreaCursorShape();
33 | void setMouseAreaCursorShape(Qt::CursorShape cursor);
34 | signals:
35 |
36 | private:
37 | static T2D* m_instance;
38 |
39 | QQmlEngine* m_engine = nullptr;
40 | QQuickWindow* m_root = nullptr;
41 | T2DWorld* m_world = nullptr;
42 |
43 | Qt::CursorShape m_mouseAreaCurrsor = Qt::ArrowCursor;
44 | };
45 |
46 | #endif // T2D_H
47 |
--------------------------------------------------------------------------------
/src/t2d/t2d_res.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | resource/font/fontawesome-webfont.ttf
4 | resource/font/svg.cso
5 | resource/font/mask.cso
6 | resource/svg/error.svg
7 | resource/svg/info.svg
8 | resource/svg/success.svg
9 | resource/svg/warning.svg
10 | resource/svg/close-px.svg
11 | resource/svg/close.svg
12 | controls/TRectangle.qml
13 | controls/TFpsMonitor.qml
14 | controls/TButton.qml
15 | controls/TAwesomeIcon.qml
16 | controls/TIconButton.qml
17 | controls/TImageButton.qml
18 | controls/TImage.qml
19 | controls/TMouseArea.qml
20 | controls/TDialog.qml
21 | controls/TLabel.qml
22 | controls/TPopoverMenu.qml
23 | controls/TBadge.qml
24 | controls/TPopup.qml
25 | controls/TObject.qml
26 | controls/TPopoverElement.qml
27 | controls/TInputField.qml
28 | controls/TNavigationBar.qml
29 | controls/TNavigationElement.qml
30 | controls/TSVGIcon.qml
31 | controls/TCarousel.qml
32 | controls/TFlickable.qml
33 | controls/TScrollbarV.qml
34 | controls/TScrollbarH.qml
35 | controls/TCarouselElement.qml
36 | controls/TDividerLine.qml
37 | controls/TTag.qml
38 | controls/TToast.qml
39 | controls/TAvatar.qml
40 | controls/TPagination.qml
41 | controls/TBusyIndicator.qml
42 | controls/TRadioBox.qml
43 | controls/TCheckBox.qml
44 | controls/TRadioBoxGroup.qml
45 | controls/TSwitch.qml
46 | controls/TProgressBar.qml
47 | controls/TDialogButton.qml
48 | controls/TIcon.qml
49 | controls/TPopover.qml
50 | controls/TDialogBasic.qml
51 | controls/TMask.qml
52 |
53 |
54 |
--------------------------------------------------------------------------------
/src/t2d/theme/ThemeManager.cpp:
--------------------------------------------------------------------------------
1 | #include "ThemeManager.h"
2 | #include
3 | #include
4 | #include
5 |
6 | /*!
7 | \class ThemeManager
8 |
9 | \brief
10 |
11 | \sa ThemeManager
12 | */
13 | ThemeManager* ThemeManager::m_instance = nullptr;
14 | QObject *ThemeManager::exampleQmlSingletonType(QQmlEngine *engine, QJSEngine *scriptEngine)
15 | {
16 | Q_UNUSED(engine)
17 | Q_UNUSED(scriptEngine)
18 |
19 | return ThemeManager::getInstance();
20 | }
21 |
22 | ThemeManager *ThemeManager::getInstance()
23 | {
24 | if(ThemeManager::m_instance == nullptr){
25 | ThemeManager::m_instance = new ThemeManager;
26 | }
27 | return ThemeManager::m_instance;
28 | }
29 |
30 | void ThemeManager::addAppThemePath(const QString &path)
31 | {
32 | QString dirpath(path);
33 | QRegExp rx("^qrc:");
34 | QDir dir(dirpath.replace(rx,":"));
35 |
36 | if(!dir.exists()){
37 | qDebug() << "Warning: not directory." << path;
38 | return;
39 | }
40 |
41 | QFileInfoList files = dir.entryInfoList(QDir::Dirs);
42 | foreach (QFileInfo f, files) {
43 | addAppTheme(f.fileName(),f.absoluteFilePath());
44 | }
45 |
46 | if(!this->m_startupThemeName.isEmpty() && m_themes.contains(m_startupThemeName)){
47 | this->setAppTheme(m_startupThemeName);
48 | }
49 | }
50 |
51 | void ThemeManager::addAppTheme(const QString &name, const QString &qrc_path)
52 | {
53 | ThemeHandler* theme = new ThemeHandler(name,qrc_path);
54 | if(!theme->isValid()){
55 | theme->deleteLater();
56 | return;
57 | }
58 |
59 | m_themes.insert(name,theme);
60 | emit themeListChanged();
61 | }
62 |
63 | void ThemeManager::appStartupTheme(const QString &name)
64 | {
65 | m_startupThemeName = name;
66 | if(m_themes.contains(name)){
67 | this->setAppTheme(name);
68 | }
69 | }
70 |
71 | bool ThemeManager::getPropertyData(const QString &className, const QString &groupName, const QString &tpName ,const QString &state,const QString &property, QVariant &result)
72 | {
73 | if(appThemeInvalid()) return false;
74 |
75 | ThemeHandler* theme = m_themes.value(m_themeName);
76 | if(theme){
77 | theme->findPropertyValue(className,groupName,tpName,state,property,result);
78 | }
79 |
80 | return theme != nullptr;
81 | }
82 |
83 | QString ThemeManager::appTheme() const
84 | {
85 | return m_themeName;
86 | }
87 |
88 | QVariantList ThemeManager::themeList() const
89 | {
90 | QVariantList list;
91 | foreach (ThemeHandler* theme, this->m_themes) {
92 | list.append(theme->toQVariantMap());
93 | }
94 | return list;
95 | }
96 |
97 | bool ThemeManager::appThemeInvalid() const
98 | {
99 | return appTheme().isEmpty();
100 | }
101 |
102 | void ThemeManager::setAppTheme(const QString& themeName)
103 | {
104 | if (m_themeName == themeName)
105 | return;
106 |
107 | if(themeName.isEmpty() || themeName == ""){
108 | m_themeName.clear();
109 | emit appThemeChanged();
110 | }else{
111 | ThemeHandler* t = m_themes.value(themeName);
112 | if(t && (t->isLoad() || t->load())){
113 | bool sendemit = !themeName.isEmpty();
114 | m_themeName = themeName;
115 | if(sendemit) emit appThemeChanged();
116 | }
117 | }
118 | emit appThemeInvalidChanged();
119 | }
120 |
--------------------------------------------------------------------------------
/src/t2d/theme/ThemeManager.h:
--------------------------------------------------------------------------------
1 | #ifndef THEMEMANAGER_H
2 | #define THEMEMANAGER_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include "theme_handler.h"
9 |
10 | class ThemeManager : public QObject
11 | {
12 | Q_OBJECT
13 | public:
14 | static ThemeManager* getInstance();
15 |
16 | static QObject* exampleQmlSingletonType(QQmlEngine* engine, QJSEngine* scriptEngine);
17 |
18 | // qml ListView model
19 | Q_PROPERTY(QVariantList themeList READ themeList /*WRITE setThemelist*/ NOTIFY themeListChanged)
20 |
21 | Q_PROPERTY(QString appTheme READ appTheme WRITE setAppTheme NOTIFY appThemeChanged)
22 |
23 | Q_PROPERTY(bool appThemeInvalid READ appThemeInvalid NOTIFY appThemeInvalidChanged)
24 |
25 | void addAppThemePath(const QString& path);
26 |
27 | void addAppTheme(const QString& name, const QString& qrc_path);
28 |
29 | void appStartupTheme(const QString& name);
30 |
31 | bool getPropertyData(const QString& className, const QString& groupName, const QString& tpName, const QString& state, const QString& property, QVariant& result);
32 |
33 | QString appTheme() const;
34 |
35 | QVariantList themeList() const;
36 |
37 | bool appThemeInvalid() const;
38 |
39 | signals:
40 | void appThemeChanged();
41 | void themeListChanged();
42 | void appThemeInvalidChanged();
43 |
44 | private slots:
45 | void setAppTheme(const QString& themeName);
46 |
47 | private:
48 | static ThemeManager* m_instance;
49 | QMap m_themes;
50 | QString m_startupThemeName;
51 | QString m_themeName;
52 | QVariantList m_themelist;
53 | bool m_appThemeInvalid;
54 | };
55 |
56 | #endif // THEMEMANAGER_H
57 |
--------------------------------------------------------------------------------
/src/t2d/theme/theme_handler.h:
--------------------------------------------------------------------------------
1 | #ifndef THEMEHANDLER_H
2 | #define THEMEHANDLER_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | #define INI_GENERAL_STR "GENERAL"
11 | #define INI_CONFIG_STR "CONFIG"
12 | #define INI_CONTROLS_STR "CONTROLS"
13 |
14 | class ThemeHandler : public QObject
15 | {
16 | Q_OBJECT
17 | public:
18 | ThemeHandler(const QString &name, const QString& rec_path);
19 |
20 | QString name();
21 | bool isValid();
22 | bool load();
23 | bool isLoad();
24 |
25 | void findPropertyValue(const QString &className, const QString& groupName, const QString &tpName, const QString& state, const QString& property, QVariant& result);
26 | const QMap &data();
27 | const QVariantMap &toQVariantMap();
28 |
29 | private:
30 | void parseMain();
31 | void parseINI(const QString &filename, QVariantMap &varmap);
32 | private:
33 | QString m_name;
34 | QString m_path;
35 | QVariantMap m_information;
36 | QMap m_inifiles;
37 | QMap m_data;
38 |
39 | bool m_valid = false;
40 | };
41 |
42 | #endif // THEMEHANDLER_H
43 |
--------------------------------------------------------------------------------
/src/t2d/toou2d.cpp:
--------------------------------------------------------------------------------
1 | #include "Toou2D.h"
2 | #include "t2d.h"
3 |
4 | /*!
5 | \page index.html
6 | \title Toou2D 1.0
7 |
8 |
9 | \section1 \b Description
10 | 基于Qt Quick(Qml) 跨平台技术打造的2D框架
11 |
12 | \module QtQuick 2.6
13 |
14 | \section1 \b Core Class
15 | \table 100%
16 | \row
17 | \o \l Toou2D
18 | \o \l T2DWorld
19 | \o \l T2D
20 | \row
21 | \o \l Toou2DQmlPlugin
22 | \o \l ThemeManager
23 | \o \l ThemeHandler
24 | \row
25 | \o \l ThemeBinder
26 | \o \l TGadgetScrollbar
27 | \o \l TGadgetLabel
28 | \row
29 | \o \l TGadgetItem
30 | \o \l TGadgetIcon
31 | \o \l TGadgetBorder
32 | \row
33 | \o \l TGadgetBackground
34 | \o \l TColor
35 | \o
36 | \endtable
37 |
38 |
39 | \section1 \b Controls
40 | \table 100 %
41 | \row
42 | \o \l TAvatar
43 | \o \l TAwesomeIcon
44 | \o \l TBadge
45 | \row
46 | \o \l TBusyIndicator
47 | \o \l TButton
48 | \o \l TCarousel
49 | \row
50 | \o \l TCarouselElement
51 | \o \l TCheckBox
52 | \o \l TDialog
53 | \row
54 | \o \l TDialogButton
55 | \o \l TDividerLine
56 | \o \l TFlickable
57 | \row
58 | \o \l TFpsMonitor
59 | \o \l TIcon
60 | \o \l TIconButton
61 | \row
62 | \o \l TImage
63 | \o \l TImageButton
64 | \o \l TInputField
65 | \row
66 | \o \l TLabel
67 | \o \l TToast
68 | \o \l TMouseArea
69 | \row
70 | \o \l TNavigationBar
71 | \o \l TNavigationElement
72 | \o \l TObject
73 | \row
74 | \o \l TPagination
75 | \o \l TPopoverMenu
76 | \o \l TPopoverElement
77 | \row
78 | \o \l TPopup
79 | \o \l TProgressBar
80 | \o \l TRadioBox
81 | \row
82 | \o \l TRadioBoxGroup
83 | \o \l TRectangle
84 | \o \l TScrollbarH
85 | \row
86 | \o \l TScrollbarV
87 | \o \l TSVGIcon
88 | \o \l TSwitch
89 | \row
90 | \o \l TTag
91 | \o \l TDialogBasic
92 | \o \l TPopover
93 | \endtable
94 |
95 |
96 | \section1 \b Enum Define
97 | \table 100 %
98 | \row
99 | \o \l TStateType
100 | \o \l TIconType
101 | \o \l TAwesomeType
102 | \row
103 |
104 | \o \l TTimePreset
105 | \o \l TPixelSizePreset
106 | \o \l TPosition
107 | \endtable
108 |
109 |
110 | */
111 |
112 |
113 | /*!
114 | \class Toou2D
115 |
116 | \brief
117 |
118 | \sa Toou2D
119 | */
120 | void Toou2D::create(QQmlEngine *engine)
121 | {
122 | T2D::getInstance()->registerTypes("Toou2D");
123 | T2D::getInstance()->initializeEngine(engine,"Toou2D");
124 | }
125 |
126 | QString Toou2D::version()
127 | {
128 | return T2D::getInstance()->version();
129 | }
130 |
--------------------------------------------------------------------------------
/src/t2d/win_install.bat:
--------------------------------------------------------------------------------
1 |
2 | SET PWD_PATH=%2
3 | SET PRESET_PATH=%3
4 | SET BUILDER_BIN_PATH=%4
5 | SET QT_QML_T2D_PATH=%5
6 | SET ANDROID=%6
7 | SET LIBFILE_PATH=%7
8 |
9 | echo %RUN_TYPE%
10 | echo %PWD_PATH%
11 | echo %PRESET_PATH%
12 | echo %BUILDER_BIN_PATH%
13 | echo %QT_QML_T2D_PATH%
14 |
15 | copy /y %PWD_PATH%\Toou2D.h %BUILDER_BIN_PATH% & copy /y %PRESET_PATH%\* %BUILDER_BIN_PATH%\
16 |
17 | if %ANDROID% == YES copy /y %LIBFILE_PATH% %BUILDER_BIN_PATH%
18 |
19 | if %1 == SHARED (
20 | echo running install to qtqml folder
21 | rmdir /s /q %QT_QML_T2D_PATH% & md %QT_QML_T2D_PATH%
22 | copy /y %BUILDER_BIN_PATH% %QT_QML_T2D_PATH%
23 | )
24 |
--------------------------------------------------------------------------------
/src/t2d/world.cpp:
--------------------------------------------------------------------------------
1 | #include "world.h"
2 | #include "t2d.h"
3 |
4 | bool __t2dworld_inited = false;
5 | /*!
6 | \class T2DWorld
7 |
8 | \brief
9 |
10 | \sa T2DWorld
11 | */
12 | T2DWorld::T2DWorld(QQuickItem* parent) : QQuickItem(parent)
13 | {
14 | if(__t2dworld_inited){
15 | qErrnoWarning("Error:There is only one world :)");
16 | throw;
17 | }
18 |
19 | __t2dworld_inited = true;
20 | setVisible(false);
21 | setEnabled(false);
22 | connect(this,&T2DWorld::parentChanged,this,&T2DWorld::onParentChanged);
23 | }
24 |
25 | QStringList T2DWorld::getAppThemePaths() const
26 | {
27 | qWarning() << "Please call: TThemeManager.themeList";
28 | return QStringList();
29 | }
30 |
31 | QString T2DWorld::getAppStartupTheme() const
32 | {
33 | qWarning() << "Please call: TThemeManager.appTheme";
34 | return QString();
35 | }
36 |
37 | int T2DWorld::mouseAreaCursorShape() const
38 | {
39 | return T2D::getInstance()->mouseAreaCursorShape();
40 | }
41 |
42 | void T2DWorld::setMouseAreaCursorShape(int mouseAreaCursorShape)
43 | {
44 | T2D::getInstance()->setMouseAreaCursorShape((Qt::CursorShape)mouseAreaCursorShape);
45 | }
46 |
47 | void T2DWorld::onParentChanged()
48 | {
49 | disconnect(this,&T2DWorld::parentChanged,this,&T2DWorld::onParentChanged);
50 | T2D::getInstance()->initQuickRoot((QQuickWindow*)parent());
51 | T2D::getInstance()->initWorld(this);
52 | }
53 |
54 | void T2DWorld::setAppStartupTheme(QString appTheme)
55 | {
56 | T2D::getInstance()->setAppStartupTheme(appTheme);
57 | }
58 |
59 | void T2DWorld::setAppThemePaths(QStringList appThemePaths)
60 | {
61 | foreach (QString path, appThemePaths) {
62 | T2D::getInstance()->addAppThemePath(path);
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/src/t2d/world.h:
--------------------------------------------------------------------------------
1 | #ifndef T2DWORLD_H
2 | #define T2DWORLD_H
3 |
4 | #include
5 | #include
6 |
7 | /***
8 | * 整个Toou 2D框架中非常重要的一个类。
9 | * 除了可以初始化皮肤路径及设置启动皮肤外
10 | * T2D还对整个应用系统进行了初始化设置。
11 | * 并且他必须要创建在App ApplicationWindow 下面。
12 | *
13 | * QML:
14 | * T2DWorld{
15 | * appStartupTheme: "dark"
16 | * appThemePaths:[
17 | * "qrc:/themes/"
18 | * ]
19 | * }
20 | * */
21 | class T2DWorld : public QQuickItem
22 | {
23 | Q_OBJECT
24 |
25 | bool m_mouseAreaCursorShape;
26 |
27 | public:
28 | T2DWorld(QQuickItem* parent = nullptr);
29 |
30 | /*!
31 | * 设置App启动时默认加载皮肤。
32 | * 此属性只能设置一次。App启动再设置将无效。
33 | * APP启动后,可以通过TThemeManager 来进行皮肤样式切换。
34 | * */
35 | Q_PROPERTY(QString appStartupTheme READ getAppStartupTheme WRITE setAppStartupTheme)
36 |
37 | /*!
38 | * 导入皮肤的路径
39 | * 可以设置多个不同的路径。满足各种设计需求。可以是QRC内部,APP外部等。
40 | * */
41 | Q_PROPERTY(QStringList appThemePaths READ getAppThemePaths WRITE setAppThemePaths)
42 |
43 | /*!
44 | 此属性全局,保存鼠标区域的光标形状。
45 | */
46 | Q_PROPERTY(int mouseAreaCursorShape READ mouseAreaCursorShape WRITE setMouseAreaCursorShape)
47 |
48 | QStringList getAppThemePaths() const;
49 | QString getAppStartupTheme() const;
50 |
51 | int mouseAreaCursorShape() const;
52 |
53 | public slots:
54 | void setMouseAreaCursorShape(int mouseAreaCursorShape);
55 |
56 | private slots:
57 | void onParentChanged();
58 | void setAppStartupTheme(QString themeName);
59 | void setAppThemePaths(QStringList appThemePaths);
60 |
61 | };
62 |
63 | #endif // T2DWORLD_H
64 |
--------------------------------------------------------------------------------
/src/websockettransport.h:
--------------------------------------------------------------------------------
1 | #ifndef WEBSOCKETTRANSPORT_H
2 | #define WEBSOCKETTRANSPORT_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | class WebSocketTransport : public QWebChannelAbstractTransport
10 | {
11 | Q_OBJECT
12 |
13 | public:
14 | Q_INVOKABLE void sendMessage(const QJsonObject &message) override
15 | {
16 | QJsonDocument doc(message);
17 | emit messageChanged(QString::fromUtf8(doc.toJson(QJsonDocument::Compact)));
18 | }
19 |
20 | Q_INVOKABLE void textMessageReceive(const QString &messageData)
21 | {
22 | QJsonParseError error;
23 | QJsonDocument message = QJsonDocument::fromJson(messageData.toUtf8(), &error);
24 | if (error.error)
25 | {
26 | qWarning() << "Failed to parse text message as JSON object:" << messageData
27 | << "Error is:" << error.errorString();
28 | return;
29 | } else if (!message.isObject())
30 | {
31 | qWarning() << "Received JSON message that is not an object: " << messageData;
32 | return;
33 | }
34 | emit messageReceived(message.object(), this);
35 | }
36 |
37 | signals:
38 | void messageChanged(const QString & message);
39 | };
40 |
41 | #endif // WEBSOCKETTRANSPORT_H
42 |
--------------------------------------------------------------------------------
/src/work-creMb.cpp:
--------------------------------------------------------------------------------
1 | #include "pentoolwork.h"
2 |
3 | //生成目标轨迹保存文件
4 | void Work::createMbGJ()
5 | {
6 | QVariantMap outTip;
7 | outTip.insert("time", QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"));
8 | outTip.insert("sateName", nowMb.name);
9 | outTip.insert("info", "开始生成轨迹数据");
10 | emit sendMsg(outTip);
11 |
12 | QVariantList timeMap, fangweijiao, fuyangjiao, shicha, pincha, pinyi;
13 | QVariantList mb_L, mb_B;
14 | QVariantMap sateNameMap;
15 | for (int i = 0; i < nowSateList.size(); i++) {
16 |
17 | }
18 | for (int i = 0; i <= nowMb.numberTimes; i++) {
19 | timeMap.append(i * 10);
20 | mb_L.append(QVariant::fromValue(nowMb.longitude + i * 0.1));
21 | mb_B.append(QVariant::fromValue(nowMb.latitude + i * 0.1));
22 |
23 | for (int j = 0; j < nowSateList.size(); j++) {
24 | QVariantMap sateConfigMap;
25 | sateConfigMap.insert("fangweijiao", 0);
26 | sateConfigMap.insert("fuyangjiao", 0);
27 | sateConfigMap.insert("shicha", 0);
28 | sateConfigMap.insert("pincha", 0);
29 | sateConfigMap.insert("pinyi", 0);
30 | sateNameMap.insert(nowSateList[j].name, sateConfigMap);
31 | }
32 | }
33 | QVariantMap map;
34 | map.insert("name", nowMb.name);
35 | map.insert("mbId", nowMb.mbId);
36 | map.insert("height", nowMb.height);
37 | map.insert("longitude", mb_L);
38 | map.insert("dimension", mb_B);
39 | map.insert("time", timeMap);
40 |
41 | map.insert("sateName", sateNameMap);
42 | emit sendMbTrail(map);
43 |
44 | outTip["time"] = QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss");
45 | outTip["sateName"] = nowMb.name;
46 | outTip["info"] = "轨迹数据生成完毕";
47 | emit sendMsg(outTip);
48 | }
--------------------------------------------------------------------------------
/src/work-creSate.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/work-creSate.cpp
--------------------------------------------------------------------------------
/src/work-task1.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/src/work-task1.cpp
--------------------------------------------------------------------------------
/src/work-task2.cpp:
--------------------------------------------------------------------------------
1 | #include "pentoolwork.h"
2 |
3 | void Work::task2(mbClass mb)
4 | {
5 | QVariantMap progressMap;
6 | progressMap["progress"] = 10;
7 | emit sendProgress(progressMap);
8 | }
--------------------------------------------------------------------------------
/src/work-task3.cpp:
--------------------------------------------------------------------------------
1 | #include "pentoolwork.h"
2 |
3 | void Work::task3(mbClass mb)
4 | {
5 | QVariantMap progressMap;
6 | progressMap["progress"] = 50;
7 | emit sendProgress(progressMap);
8 | }
--------------------------------------------------------------------------------
/src/work-task4.cpp:
--------------------------------------------------------------------------------
1 | #include "pentoolwork.h"
2 |
3 | void Work::task4()
4 | {
5 | QVariantMap progressMap;
6 | progressMap["progress"] = 100;
7 | emit sendProgress(progressMap);
8 | }
--------------------------------------------------------------------------------
/themes/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/themes/.DS_Store
--------------------------------------------------------------------------------
/themes/Dark/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/themes/Dark/.DS_Store
--------------------------------------------------------------------------------
/themes/Dark/TAvatar.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; INT radius
3 | ; INT border.width
4 | ; COLOR border.color
5 |
6 | [GENERAL]
7 |
8 |
9 | [cdbg]
10 | border.color = #202020
11 |
--------------------------------------------------------------------------------
/themes/Dark/TAwesomeIcon.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR color
3 | ; STRING source
4 | ; INT width
5 | ; INT height
6 |
7 |
8 | [GENERAL]
9 | color = #FAFAFA
--------------------------------------------------------------------------------
/themes/Dark/TBadge.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR color
3 | ; INT border.width
4 | ; COLOR border.color
5 | ; INT label.color
6 | ; BOOL label.bold
7 | ; INT label.pixelSize
8 |
9 |
10 | [GENERAL]
11 | color = #F56C6C
12 | border.width = 1
13 | border.color = #CB4C4C
14 | label.color = #FDFDFD
--------------------------------------------------------------------------------
/themes/Dark/TBusyIndicator.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; STRING source
3 | ; INT size
4 | ; COLOR color
5 |
6 | [GENERAL]
7 | color = #EDEDED
--------------------------------------------------------------------------------
/themes/Dark/TButton.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; DOUBLE scale
3 | ; COLOR bg.color
4 | ; INT bg.radius
5 | ; BOOL bg.visible
6 | ; DOUBLE bg.opacity
7 | ; INT bg.border.width
8 | ; COLOR bg.border.color
9 | ; COLOR label.color
10 | ; STRING label.text
11 | ; BOOL label.bold
12 | ; INT label.pixelSize
13 |
14 | [GENERAL]
15 | scale = 1
16 | bg.color = #2F2F2F
17 | bg.border.color = #3A3A3A
18 | label.color = #FAFAFA
19 |
20 | [:pressed]
21 | scale = 0.95
22 |
23 | ;-----------------------------------
24 | [primary]
25 | bg.color = #46A0FC
26 | bg.border.color = #3b87d5
27 |
28 | ;-----------------------------------
29 | [success]
30 | bg.color = #6AC044
31 | bg.border.color = #519434
32 |
33 | ;-----------------------------------
34 | [warning]
35 | bg.color = #E4A147
36 | bg.border.color = #C4A147
37 |
38 | ;-----------------------------------
39 | [danger]
40 | bg.color = #F36D6F
41 | bg.border.color = #BB5455
42 |
--------------------------------------------------------------------------------
/themes/Dark/TCarousel.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; INT radius
3 | ; INT itemWidth
4 | ; INT itemHeight
5 |
6 | ; INT border.width
7 | ; COLOR border.color
8 |
9 |
10 | [GENERAL]
11 |
--------------------------------------------------------------------------------
/themes/Dark/TCheckBox.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR bg.color
3 | ; BOOL bg.visible
4 | ; INT bg.radius
5 | ; INT bg.border.width
6 | ; COLOR bg.border.color
7 | ; COLOR icon.color
8 | ; INT icon.width
9 | ; INT icon.height
10 | ; COLOR icon.checked.color
11 | ; INT icon.checked.width
12 | ; INT icon.checked.height
13 | ; COLOR label.color
14 | ; STRING label.text
15 | ; BOOL label.bold
16 | ; INT label.pixelSize
17 | ; STRING label.family
18 |
19 | ; [:disabled]
20 | ; 控件被禁用用显示效果
21 |
22 | [GENERAL]
23 | bg.color = red
24 | bg.visible = false
25 | icon.color = #007acc
26 | icon.checked.color = #007acc
27 | label.color = #FDFDFD
28 |
29 | [:disabled]
30 | icon.color = #9D9D9D
31 | icon.checked.color = #9D9D9D
32 | label.color = #9D9D9D
33 |
34 | ;-----------
35 | [cboxa]
36 | bg.color = #409EFF
37 | bg.visible = true
38 | icon.color = #FFF
39 | icon.checked.color = #FFF
40 | label.bold = false
41 | bg.border.width = 0
42 | bg.border.color = #DAECFE
43 |
44 | [cboxa:checked]
45 | bg.border.width = 1
46 |
47 | ;-----------
48 | [cboxb]
49 | bg.color = #67C23A
50 | bg.visible = true
51 | icon.color = #FFF
52 | icon.checked.color = #FFF
53 | label.bold = false
54 | bg.border.width = 0
55 | bg.border.color = #E1F2D9
56 |
57 | [cboxb:checked]
58 | bg.border.width = 1
59 |
60 |
61 | ;-----------
62 | [cboxc]
63 | bg.color = #E6A23C
64 | bg.visible = true
65 | icon.color = #FFF
66 | icon.checked.color = #FFF
67 | label.bold = false
68 | bg.border.width = 0
69 | bg.border.color = #FCE2E2
70 |
71 | [cboxc:checked]
72 | bg.border.width = 1
73 |
74 |
75 | ;-----------
76 | [cboxd]
77 | bg.color = #F56C6C
78 | bg.visible = true
79 | icon.color = #FFF
80 | icon.checked.color = #FFF
81 | label.bold = false
82 | bg.border.width = 0
83 | bg.border.color = #FCE2E2
84 |
85 | [cboxd:checked]
86 | bg.border.width = 1
87 |
88 | ;-----------
89 | [cboxe]
90 | bg.color = #F56C6C
91 | bg.visible = true
92 | icon.color = #FFF
93 | icon.checked.color = #FFF
94 | label.bold = false
95 | bg.border.width = 0
96 | bg.border.color = #FCE2E2
97 |
98 | [cboxe:checked]
99 | bg.border.width = 1
--------------------------------------------------------------------------------
/themes/Dark/TDialog.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR color
3 | ; INT radius
4 | ; INT border.width
5 | ; COLOR border.color
6 | ; COLOR line.color
7 | ; COLOR titlabel.color
8 | ; BOOL titlabel.bold
9 | ; INT titlabel.pixelSize
10 | ; COLOR closebtn.icon.color
11 | ; COLOR btn.label.color
12 |
13 | ; [:btnlighter]
14 | ; Dialog 按钮重点突出设置
15 |
16 |
17 | [GENERAL]
18 | color = #3D3D3D
19 | radius = 5
20 | border.width = 1
21 | border.color = #4D4D4D
22 | line.color = #494949
23 | titlabel.color = #FDFDFD
24 | closebtn.icon.color = #EDEDED
25 | btn.label.color = #C0C4CC
26 |
27 | [:btnlighter]
28 | btn.label.color = #67C23A
--------------------------------------------------------------------------------
/themes/Dark/TDividerLine.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; color color
3 |
4 | [GENERAL]
5 | color = #37313E
6 |
--------------------------------------------------------------------------------
/themes/Dark/TIcon.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; STRING source
3 | ; COLOR color
4 | ; INT width
5 | ; INT height
6 |
7 | [GENERAL]
8 | source = FA_apple
9 | color = red
10 | width = 50
11 | height = 50
--------------------------------------------------------------------------------
/themes/Dark/TIconButton.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; DOUBLE scale
3 | ; COLOR bg.color
4 | ; INT bg.radius
5 | ; BOOL bg.visible
6 | ; DOUBLE bg.opacity
7 | ; INT bg.border.width
8 | ; COLOR bg.border.color
9 | ; COLOR label.color
10 | ; STRING label.text
11 | ; BOOL label.bold
12 | ; INT label.pixelSize
13 | ; COLOR icon.color
14 | ; STRING icon.source
15 | ; INT icon.width
16 | ; INT icon.height
17 |
18 | [GENERAL]
19 | scale = 1
20 | bg.color = #2D2D2D
21 | bg.border.color = #5D5D5D
22 | label.color = #D3D3D3
23 | icon.color = #D3D3D3
24 | label.bole = false
25 |
26 | [:pressed]
27 | scale = 0.95
28 |
29 | ;------------------------------------------
30 | [leftbutton]
31 | bg.color = #1A1A1A
32 | bg.border.color = #2A2A2A
33 | label.bold = false
34 |
35 | [leftbutton:active]
36 | label.color = #D13C37
37 | icon.color = #D13C37
38 | label.bold = true
39 |
40 | ;------------------------------------------
41 | [logo]
42 | label.color = #D13C37
43 | icon.color = #D13C37
44 |
45 | ;------------------------------------------
46 | [topicon]
47 | bg.color = #404040
48 | bg.border.color = #5A5A5A
--------------------------------------------------------------------------------
/themes/Dark/TImage.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; STRING source
3 | ; INT width
4 | ; INT height
5 |
6 | [GENERAL]
7 |
8 |
--------------------------------------------------------------------------------
/themes/Dark/TImageButton.ini:
--------------------------------------------------------------------------------
1 | ; string source
2 | ; double scale
3 |
4 | [GENERAL]
5 | source = file:///Users/toou.net/Desktop/MUSIC/portrait/100.jpg
6 | scale = 2
7 |
8 | [:pressed]
9 | source = file:///Users/toou.net/Desktop/MUSIC/portrait/62.jpg
--------------------------------------------------------------------------------
/themes/Dark/TInputField.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR inputTextColor
3 | ; INT width
4 | ; INT height
5 | ; COLOR cursor.color
6 | ; COLOR bg.color
7 | ; INT bg.radius
8 | ; INT bg.border.width
9 | ; INT bg.border.color
10 | ; COLOR placeholder.label.color
11 | ; COLOR placeholder.label.bold
12 | ; INT placeholder.label.pixelSize
13 | ; STRING placeholder.label.text
14 | ; INT placeholder.icon.width
15 | ; INT placeholder.icon.height
16 | ; COLOR placeholder.icon.color
17 | ; COLOR btn.clear.icon.color
18 | ; INT btn.clear.icon.width
19 | ; INT btn.clear.icon.height
20 |
21 | [GENERAL]
22 | inputTextColor = #FDFDFD
23 | cursor.color = #D30102
24 | bg.color = #383838
25 | bg.radius = 2
26 | bg.border.width = 1
27 | bg.border.color = #626262
28 | placeholder.label.color = #909399
29 | placeholder.icon.color = #909399
30 | btn.clear.icon.color = #909399
31 |
--------------------------------------------------------------------------------
/themes/Dark/TLabel.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR color
3 | ; STRING text
4 | ; BOOL bold
5 | ; INT pixelSize
6 | ; STRING family
7 |
8 | [GENERAL]
9 | color = #D3D3D3
10 |
11 | [lyrics:hold]
12 | bold = true
13 | color = #FDFDFD
14 |
15 | [lyrics:none]
16 | bold = false
17 | color = #D3D3D3
18 |
--------------------------------------------------------------------------------
/themes/Dark/TNavigationBar.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR label.color
3 | ; BOOL label.bold
4 | ; INT label.pixelSize
5 | ; COLOR active.label.color
6 | ; BOOL active.label.bold
7 | ; INT active.label.pixelSize
8 | ; COLOR icon.color
9 | ; INT icon.width
10 | ; INT icon.height
11 | ; COLOR active.icon.color
12 | ; INT active.icon.width
13 | ; INT active.icon.height
14 |
15 |
16 | [GENERAL]
17 | label.color = #D2D2D2
18 | label.bold = false
19 | label.pixelSize = 12
20 |
21 | active.label.color = #D2D2D2
22 | active.label.bold = true
23 | active.label.pixelSize = 22
24 |
25 | icon.color = #ADADAD
26 | icon.width = 16
27 | icon.height = 16
28 |
29 | active.icon.color = #D13C37
30 | active.icon.width = 25
31 | active.icon.height = 25
--------------------------------------------------------------------------------
/themes/Dark/TPagination.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; INT spacing
3 | ; DOUBLE item.opacity
4 | ; INT item.width
5 | ; INT item.height
6 | ; INT item.radius
7 | ; COLOR item.color
8 | ; DOUBLE item.active.opacity
9 | ; INT item.active.width
10 | ; INT item.active.height
11 | ; INT item.active.radius
12 | ; COLOR item.active.color
13 | ; INT item.border.width
14 | ; COLOR item.border.color
15 | ; INT item.active.border.width
16 | ; INT item.active.border.color
17 |
18 |
19 | [GENERAL]
20 |
21 | [first]
22 | item.width = 10
23 | item.height = 10
24 | item.radius = 5
25 | item.color = #3D3D3D
26 | item.active.width = 10
27 | item.active.height = 10
28 | item.active.radius = 5
29 | item.active.color = #67C23A
30 |
31 | [second]
32 | spacing = 5
33 | item.width = 20
34 | item.height = 4
35 | item.radius = 2
36 | item.color = #3D3D3D
37 | item.active.width = 40
38 | item.active.height = 4
39 | item.active.radius = 2
40 | item.active.color = #409EFF
41 |
42 |
43 | [third]
44 | spacing = 12
45 | item.width = 25
46 | item.height = 25
47 | item.radius = 2
48 | item.color = #3D3D3D
49 | item.active.width = 40
50 | item.active.height = 4
51 | item.active.radius = 2
52 | item.active.color = #F56C6C
53 | item.border.color = RED
54 | item.active.border.color = #3A3A3A
--------------------------------------------------------------------------------
/themes/Dark/TPopover.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; INT padding
3 | ; INT bodyWidth
4 |
5 | ; COLOR body.color
6 | ; COLOR body.border.color
7 | ; INT body.border.width
8 | ; INT body.radius
9 |
10 | [GENERAL]
11 | padding = 4
12 | bodyWidth = 120
13 | body.color = #333333
14 | body.border.color = #5D5D5D
15 | body.border.width = 1
16 | body.radius = 4
17 |
--------------------------------------------------------------------------------
/themes/Dark/TPopoverMenu.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; padding = 4
3 | ; bodyWidth = 100
4 |
5 | ; body.color = #383838
6 | ; body.border.width = 1
7 | ; body.border.color = #4D4D4D
8 | ; body.radius = 5
9 |
10 | ; group.bg.color = green
11 | ; group.bg.visible = true
12 | ; group.bg.radius = 30
13 | ; group.label.color = blue
14 | ; group.label.bold = true
15 | ; group.label.pixelSize = 22
16 |
17 | ; item.bg.color = green
18 | ; item.bg.visible = false
19 | ; item.bg.radius = 30
20 |
21 | ; item.label.color = yellow
22 | ; item.label.bold = false
23 | ; item.label.pixelSize = 20
24 | ; item.icon.color = yellow
25 | ; item.icon.width = 5
26 | ; item.icon.height = 5
27 |
28 | ; active.item.label.color = blue
29 | ; active.item.label.fontbold = true
30 | ; active.item.label.fontsize = 30
31 |
32 | ; active.item.icon.color = yellow
33 | ; active.item.icon.width = 5
34 | ; active.item.icon.height = 5
35 |
36 | [GENERAL]
37 | padding = 4
38 | bodyWidth = 130
39 |
40 | body.color = #383838
41 | body.border.width = 1
42 | body.border.color = #4D4D4D
43 | body.radius = 5
44 |
45 | group.bg.visible = false
46 | group.label.color = #6D6D6D
47 |
48 | item.bg.color = #5D5D5D
49 | item.bg.visible = false
50 |
51 | item.label.color = #FFF
52 | item.icon.color = #FFF
53 |
54 | active.item.label.bold = true
55 |
--------------------------------------------------------------------------------
/themes/Dark/TProgressBar.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR label.color
3 | ; INT label.pixelSize
4 | ; COLOR bg.color
5 | ; INT bg.width
6 | ; INT bg.height
7 | ; INT bg.radius
8 | ; COLOR fg.color
9 | ; INT fg.radius
10 |
11 | [GENERAL]
12 | label.color = #FFF
13 | label.pixelSize = 12
14 | bg.color = #606266
15 | fg.color = #409EFF
16 |
--------------------------------------------------------------------------------
/themes/Dark/TRadioBox.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR bg.color
3 | ; BOOL bg.visible
4 | ; INT bg.radius
5 | ; INT bg.border.width
6 | ; COLOR bg.border.color
7 | ; COLOR icon.color
8 | ; INT icon.width
9 | ; INT icon.height
10 | ; COLOR icon.checked.color
11 | ; INT icon.checked.width
12 | ; INT icon.checked.height
13 | ; COLOR label.color
14 | ; STRING label.text
15 | ; BOOL label.bold
16 | ; INT label.pixelSize
17 | ; STRING label.family
18 |
19 | ; [:disabled]
20 | ; 控件被禁用用显示效果
21 |
22 | [GENERAL]
23 | bg.color = red
24 | bg.visible = false
25 | icon.color = #007acc
26 | icon.checked.color = #007acc
27 | label.color = #FDFDFD
28 |
29 | [:disabled]
30 | icon.color = #9D9D9D
31 | icon.checked.color = #9D9D9D
32 | label.color = #9D9D9D
33 |
34 | ;-----------
35 | [rboxa]
36 | bg.color = #409EFF
37 | bg.visible = true
38 | icon.color = #FFF
39 | icon.checked.color = #FFF
40 | label.bold = false
41 | bg.border.width = 0
42 | bg.border.color = #DAECFE
43 |
44 | [rboxa:checked]
45 | bg.border.width = 1
46 |
47 | ;-----------
48 | [rboxb]
49 | bg.color = #67C23A
50 | bg.visible = true
51 | icon.color = #FFF
52 | icon.checked.color = #FFF
53 | label.bold = false
54 | bg.border.width = 0
55 | bg.border.color = #E1F2D9
56 |
57 | [rboxb:checked]
58 | bg.border.width = 1
59 |
60 |
61 | ;-----------
62 | [rboxc]
63 | bg.color = #E6A23C
64 | bg.visible = true
65 | icon.color = #FFF
66 | icon.checked.color = #FFF
67 | label.bold = false
68 | bg.border.width = 0
69 | bg.border.color = #FCE2E2
70 |
71 | [rboxc:checked]
72 | bg.border.width = 1
73 |
74 |
75 | ;-----------
76 | [rboxd]
77 | bg.color = #F56C6C
78 | bg.visible = true
79 | icon.color = #FFF
80 | icon.checked.color = #FFF
81 | label.bold = false
82 | bg.border.width = 0
83 | bg.border.color = #FCE2E2
84 |
85 | [rboxd:checked]
86 | bg.border.width = 1
--------------------------------------------------------------------------------
/themes/Dark/TRectangle.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; DOUBLE scale
3 | ; COLOR color
4 | ; DOUBLE opacity
5 | ; INT width
6 | ; INT height
7 | ; INT radius
8 | ; INT border.width
9 | ; INT border.color
10 |
11 |
12 |
13 | [GENERAL]
14 | color = #21222C
15 |
16 | [topbar]
17 | color = #2D333B
18 |
19 | [leftbar]
20 | color = #202020
21 |
22 |
23 | [musiclistbg:highlight]
24 | color = #222222
25 |
26 | [newsoundbg]
27 | color = #2D2D2D
28 |
29 | [cdbg]
30 | color = #2D2D2D
31 |
--------------------------------------------------------------------------------
/themes/Dark/TSVGIcon.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR color
3 | ; STRING source
4 | ; INT width
5 | ; INT height
6 |
7 | [GENERAL]
8 |
9 |
10 | [cd]
11 | color = #DCDCDC
12 |
--------------------------------------------------------------------------------
/themes/Dark/TSwitch.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR bg.color
3 | ; INT bg.width
4 | ; INT bg.height
5 | ; INT bg.radius
6 | ; COLOR bg.active.color
7 | ; INT bg.active.width
8 | ; INT bg.active.height
9 | ; INT bg.active.radius
10 | ; COLOR dot.color
11 | ; INT dot.width
12 | ; INT dot.height
13 | ; INT dot.radius
14 |
15 | [GENERAL]
16 | bg.color = #909399
17 | bg.width = 40
18 | bg.height = 20
19 | bg.radius = 10
20 | bg.active.color = #67C23A
21 | bg.active.width = 40
22 | bg.active.height = 20
23 | bg.active.radius = 10
24 | dot.color = #DCDCDC
25 | dot.width = 20
26 | dot.height = 20
27 | dot.radius = 10
--------------------------------------------------------------------------------
/themes/Dark/TTag.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR color
3 | ; INT radius
4 | ; INT border.width
5 | ; COLOR border.color
6 | ; COLOR label.color
7 | ; BOOL label.bold
8 | ; INT label.pixelSize
9 | ; COLOR closebtn.icon.color
10 |
11 | [GENERAL]
12 | color = #4D4D4D
13 | radius = 2
14 | border.width = 1
15 | border.color = #6D6D6D
16 | label.color = #FFF
17 | label.pixelSize = 12
18 | closebtn.icon.color = #7D7D7D
19 |
20 | [mv]
21 | color = #202020
22 | border.color = #4D4D4D
--------------------------------------------------------------------------------
/themes/Dark/TToast.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR btn.close.icon.color
3 |
4 | ; [GROUP]
5 | ; COLOR bg.color
6 | ; INT bg.border.width
7 | ; COLOR bg.border.color
8 | ; COLOR content.color
9 |
10 | [GENERAL]
11 | btn.close.icon.color = #FAFAFA
12 |
13 | [success]
14 | bg.color = #3B8517
15 | bg.border.color = #67C23A
16 | content.color = #FFF
17 |
18 | [warning]
19 | bg.color = #A36913
20 | bg.border.color = #E6A23C
21 | content.color = #FFF
22 |
23 | [info]
24 | bg.color = #57595C
25 | bg.border.color = #909399
26 | content.color = #FFF
27 |
28 | [error]
29 | bg.color = #BA5252
30 | bg.border.color = #F56C6C
31 | content.color = #FFF
32 |
--------------------------------------------------------------------------------
/themes/Dark/main.ini:
--------------------------------------------------------------------------------
1 | ;基本信息配置
2 | [CONFIG]
3 | about = Dark! Enable all black theme.
4 | version = 1.0
5 | author = ShowFL
6 |
7 | ;控件皮肤配置
8 | [CONTROLS]
9 | TRectangle = TRectangle.ini
10 | TLabel = TLabel.ini
11 | TImage = TImage.ini
12 | TDividerLine = TDividerLine.ini
13 | TTag = TTag.ini
14 | TBadge = TBadge.ini
15 | TAwesomeIcon = TAwesomeIcon.ini
16 | TSVGIcon = TSVGIcon.ini
17 | TButton = TButton.ini
18 | TIconButton = TIconButton.ini
19 | TAvatar = TAvatar.ini
20 | TCarousel = TCarousel.ini
21 | TPagination = TPagination.ini
22 | TImageButton = TImageButton.ini
23 | TInputField = TInputField.ini
24 | TBusyIndicator = TBusyIndicator.ini
25 | TToast = TToast.ini
26 | TCheckBox = TCheckBox.ini
27 | TRadioBox = TRadioBox.ini
28 | TNavigationBar = TNavigationBar.ini
29 | TSwitch = TSwitch.ini
30 | TProgressBar = TProgressBar.ini
31 | TDialog = TDialog.ini
32 | TPopover = TPopover.ini
33 | TPopoverMenu = TPopoverMenu.ini
34 | TIcon = TIcon.ini
35 |
36 | ;... Other your custom theme;
37 |
--------------------------------------------------------------------------------
/themes/Solarized/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/STDwang/PenTool/40650e36cadaf456c931e87aa3feddcc752a7455/themes/Solarized/.DS_Store
--------------------------------------------------------------------------------
/themes/Solarized/TAvatar.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; INT radius
3 | ; INT border.width
4 | ; COLOR border.color
5 |
6 | [GENERAL]
7 |
8 | [cdbg]
9 | border.color = #052028
10 |
--------------------------------------------------------------------------------
/themes/Solarized/TAwesomeIcon.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR color
3 | ; STRING source
4 | ; INT width
5 | ; INT height
6 |
7 |
8 | [GENERAL]
9 | color = #DCDCDC
--------------------------------------------------------------------------------
/themes/Solarized/TBadge.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR color
3 | ; INT border.width
4 | ; COLOR border.color
5 | ; INT label.color
6 | ; BOOL label.bold
7 | ; INT label.pixelSize
8 |
9 |
10 | [GENERAL]
11 | color = #F56C6C
12 | border.width = 1
13 | border.color = #CB4C4C
14 | label.color = #FDFDFD
--------------------------------------------------------------------------------
/themes/Solarized/TBusyIndicator.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; STRING source
3 | ; INT size
4 | ; COLOR color
5 |
6 | [GENERAL]
7 | color = #EDEDED
--------------------------------------------------------------------------------
/themes/Solarized/TButton.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; DOUBLE scale
3 | ; COLOR bg.color
4 | ; INT bg.radius
5 | ; BOOL bg.visible
6 | ; DOUBLE bg.opacity
7 | ; INT bg.border.width
8 | ; COLOR bg.border.color
9 | ; COLOR label.color
10 | ; STRING label.text
11 | ; BOOL label.bold
12 | ; INT label.pixelSize
13 |
14 | [GENERAL]
15 | scale = 1
16 | bg.color = #196E6C
17 | bg.border.color = #188583
18 | label.color = #EFEFEF
19 |
20 | [:pressed]
21 | scale = 0.95
22 |
23 | [demo-popdialog]
24 | label.color = #EFEFEF
25 | label.bold = true
26 |
27 | ;-----------------------------------
28 | [primary]
29 | bg.color = #46A0FC
30 | bg.border.color = #3b87d5
31 |
32 | ;-----------------------------------
33 | [success]
34 | bg.color = #6AC044
35 | bg.border.color = #519434
36 |
37 | ;-----------------------------------
38 | [warning]
39 | bg.color = #E4A147
40 | bg.border.color = #C4A147
41 |
42 | ;-----------------------------------
43 | [danger]
44 | bg.color = #F36D6F
45 | bg.border.color = #BB5455
--------------------------------------------------------------------------------
/themes/Solarized/TCarousel.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; INT radius
3 | ; INT itemWidth
4 | ; INT itemHeight
5 |
6 | ; INT border.width
7 | ; COLOR border.color
8 |
9 |
10 | [GENERAL]
11 |
12 |
--------------------------------------------------------------------------------
/themes/Solarized/TCheckBox.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR bg.color
3 | ; BOOL bg.visible
4 | ; INT bg.radius
5 | ; INT bg.border.width
6 | ; COLOR bg.border.color
7 | ; COLOR icon.color
8 | ; INT icon.width
9 | ; INT icon.height
10 | ; COLOR icon.checked.color
11 | ; INT icon.checked.width
12 | ; INT icon.checked.height
13 | ; COLOR label.color
14 | ; STRING label.text
15 | ; BOOL label.bold
16 | ; INT label.pixelSize
17 | ; STRING label.family
18 |
19 | ; [:disabled]
20 | ; 控件被禁用用显示效果
21 |
22 | [GENERAL]
23 | bg.color = red
24 | bg.visible = false
25 | icon.color = #007acc
26 | icon.checked.color = #007acc
27 | label.color = #FDFDFD
28 |
29 | [:disabled]
30 | icon.color = #9D9D9D
31 | icon.checked.color = #9D9D9D
32 | label.color = #9D9D9D
33 |
34 | ;-----------
35 | [cboxa]
36 | bg.color = #409EFF
37 | bg.visible = true
38 | icon.color = #FFF
39 | icon.checked.color = #FFF
40 | label.bold = false
41 | bg.border.width = 0
42 | bg.border.color = #DAECFE
43 |
44 | [cboxa:checked]
45 | bg.border.width = 1
46 |
47 | ;-----------
48 | [cboxb]
49 | bg.color = #67C23A
50 | bg.visible = true
51 | icon.color = #FFF
52 | icon.checked.color = #FFF
53 | label.bold = false
54 | bg.border.width = 0
55 | bg.border.color = #E1F2D9
56 |
57 | [cboxb:checked]
58 | bg.border.width = 1
59 |
60 |
61 | ;-----------
62 | [cboxc]
63 | bg.color = #E6A23C
64 | bg.visible = true
65 | icon.color = #FFF
66 | icon.checked.color = #FFF
67 | label.bold = false
68 | bg.border.width = 0
69 | bg.border.color = #FCE2E2
70 |
71 | [cboxc:checked]
72 | bg.border.width = 1
73 |
74 |
75 | ;-----------
76 | [cboxd]
77 | bg.color = #F56C6C
78 | bg.visible = true
79 | icon.color = #FFF
80 | icon.checked.color = #FFF
81 | label.bold = false
82 | bg.border.width = 0
83 | bg.border.color = #FCE2E2
84 |
85 | [cboxd:checked]
86 | bg.border.width = 1
87 |
88 | ;-----------
89 | [cboxe]
90 | bg.color = #F56C6C
91 | bg.visible = true
92 | icon.color = #FFF
93 | icon.checked.color = #FFF
94 | label.bold = false
95 | bg.border.width = 0
96 | bg.border.color = #FCE2E2
97 |
98 | [cboxe:checked]
99 | bg.border.width = 1
--------------------------------------------------------------------------------
/themes/Solarized/TDialog.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR color
3 | ; INT radius
4 | ; INT border.width
5 | ; COLOR border.color
6 | ; COLOR line.color
7 | ; COLOR titlabel.color
8 | ; BOOL titlabel.bold
9 | ; INT titlabel.pixelSize
10 | ; COLOR closebtn.icon.color
11 | ; COLOR btn.label.color
12 | ; COLOR content.label.color
13 |
14 | ; [:btnlighter]
15 | ; Dialog 按钮重点突出设置
16 |
17 |
18 | [GENERAL]
19 | color = #085A71
20 | radius = 4
21 | border.width = 1
22 | border.color = #174D4C
23 | line.color = #084D60
24 | titlabel.color = #EFEFEF
25 | closebtn.icon.color = #EFEFEF
26 | btn.label.color = #EFEFEF
27 | content.label.color = #EFEFEF
28 |
29 | [:btnlighter]
30 | btn.label.color = #FFF
31 |
--------------------------------------------------------------------------------
/themes/Solarized/TDividerLine.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; color color
3 |
4 | [GENERAL]
5 | color = #174D4C
6 |
--------------------------------------------------------------------------------
/themes/Solarized/TIcon.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; STRING source
3 | ; COLOR color
4 | ; INT width
5 | ; INT height
6 |
7 | [GENERAL]
8 | source = FA_apple
9 | color = red
10 | width = 50
11 | height = 50
--------------------------------------------------------------------------------
/themes/Solarized/TIconButton.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; DOUBLE scale
3 | ; COLOR bg.color
4 | ; INT bg.radius
5 | ; BOOL bg.visible
6 | ; DOUBLE bg.opacity
7 | ; INT bg.border.width
8 | ; COLOR bg.border.color
9 | ; COLOR label.color
10 | ; STRING label.text
11 | ; BOOL label.bold
12 | ; INT label.pixelSize
13 | ; COLOR icon.color
14 | ; STRING icon.source
15 | ; INT icon.width
16 | ; INT icon.height
17 |
18 | [GENERAL]
19 | scale = 1
20 | bg.color = #196E6C
21 | bg.border.color = #188583
22 | label.color = #EFEFEF
23 | icon.color = #EFEFEF
24 |
25 | [:pressed]
26 | scale = 0.95
--------------------------------------------------------------------------------
/themes/Solarized/TImage.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; STRING source
3 | ; INT width
4 | ; INT height
5 |
6 | [GENERAL]
7 |
8 |
--------------------------------------------------------------------------------
/themes/Solarized/TImageButton.ini:
--------------------------------------------------------------------------------
1 | ; string source
2 | ; double scale
3 |
4 | [GENERAL]
5 | source = file:///Users/toou.net/Desktop/MUSIC/portrait/100.jpg
6 | scale = 2
7 |
8 | [:pressed]
9 | source = file:///Users/toou.net/Desktop/MUSIC/portrait/62.jpg
--------------------------------------------------------------------------------
/themes/Solarized/TInputField.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR inputTextColor
3 | ; INT width
4 | ; INT height
5 | ; COLOR cursor.color
6 | ; COLOR bg.color
7 | ; INT bg.radius
8 | ; INT bg.border.width
9 | ; INT bg.border.color
10 | ; COLOR placeholder.label.color
11 | ; COLOR placeholder.label.bold
12 | ; INT placeholder.label.pixelSize
13 | ; STRING placeholder.label.text
14 | ; INT placeholder.icon.width
15 | ; INT placeholder.icon.height
16 | ; COLOR placeholder.icon.color
17 | ; COLOR btn.clear.icon.color
18 | ; INT btn.clear.icon.width
19 | ; INT btn.clear.icon.height
20 |
21 | [GENERAL]
22 | inputTextColor = #DCDCDC
23 | cursor.color = #D30102
24 | bg.color = #004052
25 | bg.radius = 2
26 | bg.border.width = 1
27 | bg.border.color = #174D4C
28 | placeholder.label.color = #A7AAB1
29 | placeholder.icon.color = #A7AAB1
30 | btn.clear.icon.color = #A7AAB1
31 |
--------------------------------------------------------------------------------
/themes/Solarized/TLabel.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR color
3 | ; STRING text
4 | ; BOOL bold
5 | ; INT pixelSize
6 | ; STRING family
7 |
8 | [GENERAL]
9 | color = #DCDCDC
10 |
11 | [lyrics:hold]
12 | bold = true
13 | color = #FDFDFD
14 |
15 | [lyrics:none]
16 | bold = false
17 | color = #BCBCBC
18 |
--------------------------------------------------------------------------------
/themes/Solarized/TNavigationBar.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR label.color
3 | ; BOOL label.bold
4 | ; INT label.pixelSize
5 | ; COLOR active.label.color
6 | ; BOOL active.label.bold
7 | ; INT active.label.pixelSize
8 | ; COLOR icon.color
9 | ; INT icon.width
10 | ; INT icon.height
11 | ; COLOR active.icon.color
12 | ; INT active.icon.width
13 | ; INT active.icon.height
14 |
15 |
16 | [GENERAL]
17 | label.color = #ADADAD
18 | label.bold = false
19 | label.pixelSize = 12
20 |
21 | active.label.color = white
22 | active.label.bold = true
23 | active.label.pixelSize = 22
24 |
25 | icon.color = #ADADAD
26 | icon.width = 16
27 | icon.height = 16
28 |
29 | active.icon.color = white
30 | active.icon.width = 25
31 | active.icon.height = 25
--------------------------------------------------------------------------------
/themes/Solarized/TPagination.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; INT spacing
3 | ; DOUBLE item.opacity
4 | ; INT item.width
5 | ; INT item.height
6 | ; INT item.radius
7 | ; COLOR item.color
8 | ; DOUBLE item.active.opacity
9 | ; INT item.active.width
10 | ; INT item.active.height
11 | ; INT item.active.radius
12 | ; COLOR item.active.color
13 | ; INT item.border.width
14 | ; COLOR item.border.color
15 | ; INT item.active.border.width
16 | ; INT item.active.border.color
17 |
18 |
19 | [GENERAL]
20 |
21 | [first]
22 | item.width = 10
23 | item.height = 10
24 | item.radius = 5
25 | item.color = #00212B
26 | item.active.width = 10
27 | item.active.height = 10
28 | item.active.radius = 5
29 | item.active.color = #67C23A
30 |
31 | [second]
32 | spacing = 5
33 | item.width = 20
34 | item.height = 4
35 | item.radius = 2
36 | item.color = #00212B
37 | item.active.width = 40
38 | item.active.height = 4
39 | item.active.radius = 2
40 | item.active.color = #409EFF
41 |
42 |
43 | [third]
44 | spacing = 12
45 | item.width = 25
46 | item.height = 25
47 | item.radius = 2
48 | item.color = #00212B
49 | item.active.width = 40
50 | item.active.height = 4
51 | item.active.radius = 2
52 | item.active.color = #F56C6C
53 | item.active.border.width = 1
--------------------------------------------------------------------------------
/themes/Solarized/TPopover.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; INT padding
3 | ; INT bodyWidth
4 |
5 | ; COLOR body.color
6 | ; COLOR body.border.color
7 | ; INT body.border.width
8 | ; INT body.radius
9 |
10 | [GENERAL]
11 | padding = 4
12 | bodyWidth = 120
13 | body.color = #004052
14 | body.border.color = #106278
15 | body.border.width = 1
16 | body.radius = 4
17 |
--------------------------------------------------------------------------------
/themes/Solarized/TPopoverMenu.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; INT padding
3 | ; INT bodyWidth
4 |
5 | ; COLOR body.color
6 | ; INT body.border.width
7 | ; COLOR body.border.color
8 | ; INT body.radius
9 |
10 | ; COLOR group.bg.color
11 | ; INT group.bg.radius
12 | ; COLOR group.label.color
13 | ; BOOL group.label.bold
14 | ; INT group.label.pixelSize
15 |
16 | ; COLOR item.bg.color
17 | ; BOOL item.bg.visible
18 | ; INT item.bg.radius
19 |
20 | ; COLOR item.label.color
21 | ; BOOL item.label.bold
22 | ; INT item.label.pixelSize
23 | ; COLOR item.icon.color
24 | ; INT item.icon.width
25 | ; INT item.icon.height
26 |
27 | ; COLOR active.item.label.color
28 | ; BOOL active.item.label.fontbold
29 | ; INT active.item.label.fontsize
30 |
31 | ; COLOR active.item.icon.color
32 | ; INT active.item.icon.width
33 | ; INT active.item.icon.height
34 |
35 | [GENERAL]
36 | padding = 4
37 | bodyWidth = 130
38 |
39 | body.color = #004052
40 | body.border.width = 1
41 | body.border.color = #174D4C
42 | body.radius = 5
43 |
44 | group.bg.color = #004052
45 | group.label.color = #9D9D9D
46 |
47 | item.bg.color = #073642
48 | item.bg.visible = false
49 |
50 | item.label.color = #DCDCDC
51 | item.icon.color = #DCDCDC
52 |
53 | active.item.label.bold = true
54 |
--------------------------------------------------------------------------------
/themes/Solarized/TProgressBar.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR label.color
3 | ; INT label.pixelSize
4 | ; COLOR bg.color
5 | ; INT bg.width
6 | ; INT bg.height
7 | ; INT bg.radius
8 | ; COLOR fg.color
9 | ; INT fg.radius
10 |
11 | [GENERAL]
12 | label.color = #EFEFEF
13 | label.pixelSize = 12
14 | bg.color = #00212b
15 | fg.color = #4CAEAC
16 |
--------------------------------------------------------------------------------
/themes/Solarized/TRadioBox.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR bg.color
3 | ; BOOL bg.visible
4 | ; INT bg.radius
5 | ; INT bg.border.width
6 | ; COLOR bg.border.color
7 | ; COLOR icon.color
8 | ; INT icon.width
9 | ; INT icon.height
10 | ; COLOR icon.checked.color
11 | ; INT icon.checked.width
12 | ; INT icon.checked.height
13 | ; COLOR label.color
14 | ; STRING label.text
15 | ; BOOL label.bold
16 | ; INT label.pixelSize
17 | ; STRING label.family
18 |
19 | ; [:disabled]
20 | ; 控件被禁用用显示效果
21 |
22 | [GENERAL]
23 | bg.color = red
24 | bg.visible = false
25 | icon.color = #007acc
26 | icon.checked.color = #007acc
27 | label.color = #FDFDFD
28 |
29 | [:disabled]
30 | icon.color = #9D9D9D
31 | icon.checked.color = #9D9D9D
32 | label.color = #9D9D9D
33 |
34 | ;-----------
35 | [rboxa]
36 | bg.color = #409EFF
37 | bg.visible = true
38 | icon.color = #FFF
39 | icon.checked.color = #FFF
40 | label.bold = false
41 | bg.border.width = 0
42 | bg.border.color = #DAECFE
43 |
44 | [rboxa:checked]
45 | bg.border.width = 1
46 |
47 | ;-----------
48 | [rboxb]
49 | bg.color = #67C23A
50 | bg.visible = true
51 | icon.color = #FFF
52 | icon.checked.color = #FFF
53 | label.bold = false
54 | bg.border.width = 0
55 | bg.border.color = #E1F2D9
56 |
57 | [rboxb:checked]
58 | bg.border.width = 1
59 |
60 |
61 | ;-----------
62 | [rboxc]
63 | bg.color = #E6A23C
64 | bg.visible = true
65 | icon.color = #FFF
66 | icon.checked.color = #FFF
67 | label.bold = false
68 | bg.border.width = 0
69 | bg.border.color = #FCE2E2
70 |
71 | [rboxc:checked]
72 | bg.border.width = 1
73 |
74 |
75 | ;-----------
76 | [rboxd]
77 | bg.color = #F56C6C
78 | bg.visible = true
79 | icon.color = #FFF
80 | icon.checked.color = #FFF
81 | label.bold = false
82 | bg.border.width = 0
83 | bg.border.color = #FCE2E2
84 |
85 | [rboxd:checked]
86 | bg.border.width = 1
--------------------------------------------------------------------------------
/themes/Solarized/TRectangle.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; DOUBLE scale
3 | ; COLOR color
4 | ; DOUBLE opacity
5 | ; INT width
6 | ; INT height
7 | ; INT radius
8 | ; INT border.width
9 | ; INT border.color
10 |
11 |
12 |
13 | [GENERAL]
14 | color = #002B36
15 |
16 | [topbar]
17 | color = #004052
18 |
19 | [newsoundbg]
20 | color = #00212B
21 |
22 | [leftbar]
23 | color = #052028
24 |
25 | [musiclistbg:highlight]
26 | color = #02323E
27 |
28 | [cdbg]
29 | color = #004052
30 |
--------------------------------------------------------------------------------
/themes/Solarized/TSVGIcon.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR color
3 | ; STRING source
4 | ; INT width
5 | ; INT height
6 |
7 | [GENERAL]
8 | color = #DCDCDC
9 |
10 |
--------------------------------------------------------------------------------
/themes/Solarized/TSwitch.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR bg.color
3 | ; INT bg.width
4 | ; INT bg.height
5 | ; INT bg.radius
6 | ; COLOR bg.active.color
7 | ; INT bg.active.width
8 | ; INT bg.active.height
9 | ; INT bg.active.radius
10 | ; COLOR dot.color
11 | ; INT dot.width
12 | ; INT dot.height
13 | ; INT dot.radius
14 |
15 | [GENERAL]
16 | bg.color = #909399
17 | bg.width = 40
18 | bg.height = 20
19 | bg.radius = 10
20 | bg.active.color = #67C23A
21 | bg.active.width = 40
22 | bg.active.height = 20
23 | bg.active.radius = 10
24 | dot.color = #DCDCDC
25 | dot.width = 20
26 | dot.height = 20
27 | dot.radius = 10
--------------------------------------------------------------------------------
/themes/Solarized/TTag.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR color
3 | ; INT radius
4 | ; INT border.width
5 | ; COLOR border.color
6 | ; COLOR label.color
7 | ; BOOL label.bold
8 | ; INT label.pixelSize
9 | ; COLOR closebtn.icon.color
10 |
11 | [GENERAL]
12 | color = #389895
13 | radius = 2
14 | border.width = 1
15 | border.color = #188583
16 | label.color = #EFEFEF
17 | label.pixelSize = 12
18 | closebtn.icon.color = #EFEFEF
19 |
20 | ;-------------------------------------
21 | [success]
22 | color = #67C23A
23 | radius = 20
24 | border.width = 1
25 | border.color = #E1F2D9
26 | label.color = #FFF
27 | label.pixelSize = 12
28 | closebtn.icon.color = #E1F2D9
29 |
30 | ;-------------------------------------
31 | [warning]
32 | color = #E6A23C
33 | radius = 20
34 | border.width = 1
35 | border.color = #FAECD9
36 | label.color = #FFF
37 | label.pixelSize = 12
38 | closebtn.icon.color = #FAECD9
39 |
40 | ;-------------------------------------
41 | [danger]
42 | color = #F56C6C
43 | radius = 20
44 | border.width = 1
45 | border.color = #FCE2E2
46 | label.color = #FFF
47 | label.bold = true
48 | label.pixelSize = 12
49 | closebtn.icon.color = #FCE2E2
--------------------------------------------------------------------------------
/themes/Solarized/TToast.ini:
--------------------------------------------------------------------------------
1 | ; [GENERAL]
2 | ; COLOR btn.close.icon.color
3 |
4 | ; [GROUP]
5 | ; COLOR bg.color
6 | ; INT bg.border.width
7 | ; COLOR bg.border.color
8 | ; COLOR content.color
9 |
10 | [GENERAL]
11 | btn.close.icon.color = #FAFAFA
12 |
13 | [success]
14 | bg.color = #3B8517
15 | bg.border.color = #67C23A
16 | content.color = #FFF
17 |
18 | [warning]
19 | bg.color = #A36913
20 | bg.border.color = #E6A23C
21 | content.color = #FFF
22 |
23 | [info]
24 | bg.color = #57595C
25 | bg.border.color = #909399
26 | content.color = #FFF
27 |
28 | [error]
29 | bg.color = #BA5252
30 | bg.border.color = #F56C6C
31 | content.color = #FFF
32 |
--------------------------------------------------------------------------------
/themes/Solarized/main.ini:
--------------------------------------------------------------------------------
1 | ;基本信息配置
2 | [CONFIG]
3 | about = Solarized, Refer to vscode design.
4 | version = 1.0
5 | author = ShowFL
6 |
7 | ;控件皮肤配置
8 | [CONTROLS]
9 | TRectangle = TRectangle.ini
10 | TLabel = TLabel.ini
11 | TImage = TImage.ini
12 | TDividerLine = TDividerLine.ini
13 | TTag = TTag.ini
14 | TBadge = TBadge.ini
15 | TAwesomeIcon = TAwesomeIcon.ini
16 | TSVGIcon = TSVGIcon.ini
17 | TButton = TButton.ini
18 | TIconButton = TIconButton.ini
19 | TAvatar = TAvatar.ini
20 | TCarousel = TCarousel.ini
21 | TPagination = TPagination.ini
22 | TImageButton = TImageButton.ini
23 | TInputField = TInputField.ini
24 | TBusyIndicator = TBusyIndicator.ini
25 | TToast = TToast.ini
26 | TCheckBox = TCheckBox.ini
27 | TRadioBox = TRadioBox.ini
28 | TNavigationBar = TNavigationBar.ini
29 | TSwitch = TSwitch.ini
30 | TProgressBar = TProgressBar.ini
31 | TDialog = TDialog.ini
32 | TPopover = TPopover.ini
33 | TPopoverMenu = TPopoverMenu.ini
34 | TIcon = TIcon.ini
35 |
36 | ;... Other your custom theme;
37 |
--------------------------------------------------------------------------------