2020-10-29 09:37:45 +08:00
[简体中文 ](README-zh.md )
2020-06-12 12:25:26 +08:00
2019-08-17 11:17:07 +08:00
-------------------------------------------------------------
2020-10-29 09:37:45 +08:00
# catalogue
- [catalogue ](#catalogue )
2019-07-23 12:54:07 +08:00
- [TaoQuick ](#taoquick )
2020-10-29 09:37:45 +08:00
- [Badge preview ](#badge-preview )
- [Project ](#project )
- [Build ](#build )
- [Release ](#release )
- [Repository status ](#repository-status )
2019-07-23 12:54:07 +08:00
- [Issue ](#issue )
2020-10-29 09:37:45 +08:00
- [Other status ](#other-status )
- [Some Demo Preview ](#some-demo-preview )
- [Main Page ](#main-page )
- [Change Skin ](#change-skin )
- [Multi-Language ](#multi-language )
- [Some Button Controls ](#some-button-controls )
- [Data entry Controls ](#data-entry-controls )
- [Table Controls ](#table-controls )
- [Rect Drag Controls ](#rect-drag-controls )
- [Wizard ](#wizard )
- [ShaderToy-Snail ](#shadertoy-snail )
- [ShaderToy-SuperMario ](#shadertoy-supermario )
- [Environment ](#environment )
- [Project Struct ](#project-struct )
- [TaoQuick Core Library ](#taoquick-core-library )
- [Use TaoQuick ](#use-taoquick )
2020-11-12 14:34:21 +08:00
- [qmake ](#qmake )
- [cmake ](#cmake )
2020-10-29 09:37:45 +08:00
- [Sponsorship ](#sponsorship )
2019-07-23 12:54:07 +08:00
2019-07-18 10:17:02 +08:00
# TaoQuick
2020-10-29 09:37:45 +08:00
This is a QtQuick/Qml Component library, integrated some commonly used QtQuick components, and
2019-07-18 10:17:02 +08:00
2020-10-29 09:37:45 +08:00
make the appropriate function expansion to facilitate development of Qml applications.
2019-08-03 02:11:21 +08:00
2020-10-29 09:37:45 +08:00
## Badge preview
2019-07-18 10:17:02 +08:00
2020-10-29 09:37:45 +08:00
### Project
2019-12-07 15:45:19 +08:00
2020-10-29 09:37:45 +08:00
|[Best Practices plan][CII-link]|[License][license-link]|
2019-12-07 15:45:19 +08:00
|:--:|:--:|
|![CII-badge]|![license-badge]|
2019-07-18 10:17:02 +08:00
[license-link]: https://github.com/jaredtao/TaoQuick/blob/master/LICENSE "LICENSE"
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg "MIT"
2020-10-29 09:37:45 +08:00
[CII-badge]: https://bestpractices.coreinfrastructure.org/projects/3060/badge
[CII-link]: https://bestpractices.coreinfrastructure.org/projects/3060
2019-07-18 10:17:02 +08:00
2020-10-29 09:37:45 +08:00
### Build
2019-12-07 15:45:19 +08:00
| [Windows][win-link]| [Ubuntu][ubuntu-link]|[MacOS][macos-link]|[Android][android-link]|[IOS][ios-link]|
|---------------|---------------|-----------------|-----------------|----------------|
| ![win-badge] | ![ubuntu-badge] | ![macos-badge] |![android-badge] |![ios-badge] |
[win-link]: https://github.com/JaredTao/TaoQuick/actions?query=workflow%3AWindows "WindowsAction"
[win-badge]: https://github.com/JaredTao/TaoQuick/workflows/Windows/badge.svg "Windows"
[ubuntu-link]: https://github.com/JaredTao/TaoQuick/actions?query=workflow%3AUbuntu "UbuntuAction"
[ubuntu-badge]: https://github.com/JaredTao/TaoQuick/workflows/Ubuntu/badge.svg "Ubuntu"
2019-07-18 10:17:02 +08:00
2019-12-07 15:45:19 +08:00
[macos-link]: https://github.com/JaredTao/TaoQuick/actions?query=workflow%3AMacOS "MacOSAction"
[macos-badge]: https://github.com/JaredTao/TaoQuick/workflows/MacOS/badge.svg "MacOS"
[android-link]: https://github.com/JaredTao/TaoQuick/actions?query=workflow%3AAndroid "AndroidAction"
[android-badge]: https://github.com/JaredTao/TaoQuick/workflows/Android/badge.svg "Android"
[ios-link]: https://github.com/JaredTao/TaoQuick/actions?query=workflow%3AIOS "IOSAction"
[ios-badge]: https://github.com/JaredTao/TaoQuick/workflows/IOS/badge.svg "IOS"
2020-10-29 09:37:45 +08:00
### Release
2019-12-07 15:45:19 +08:00
2020-10-29 09:37:45 +08:00
|[Released][release-link]|[Download][download-link]|Download count|
2019-12-07 15:45:19 +08:00
|:--:|:--:|:--:|
|![release-badge] |![download-badge]|![download-latest]|
2019-12-07 16:04:32 +08:00
2019-07-18 10:17:02 +08:00
[release-link]: https://github.com/jaredtao/TaoQuick/releases "Release status"
[release-badge]: https://img.shields.io/github/release/jaredtao/TaoQuick.svg?style=flat-square "Release status"
[download-link]: https://github.com/jaredtao/TaoQuick/releases/latest "Download status"
[download-badge]: https://img.shields.io/github/downloads/jaredtao/TaoQuick/total.svg "Download status"
[download-latest]: https://img.shields.io/github/downloads/jaredtao/TaoQuick/latest/total.svg "latest status"
2019-12-07 15:45:19 +08:00
2020-10-29 09:37:45 +08:00
### Repository status
2019-12-07 15:45:19 +08:00
2020-10-29 09:37:45 +08:00
|Tag|Languages|Top Language|code size|repo size|
2019-07-18 10:17:02 +08:00
|:--: |:--: |:--:|:--:|:--:|
|![tag-latest]|![languanges]|![taolanguage]|![code-size]|![repo-size]|
[languanges]: https://img.shields.io/github/languages/count/jaredtao/taoquick.svg "language count"
[taolanguage]: https://img.shields.io/github/languages/top/jaredtao/taoquick.svg "top language"
[code-size]: https://img.shields.io/github/languages/code-size/jaredtao/taoquick.svg "code size"
[repo-size]: https://img.shields.io/github/repo-size/jaredtao/taoquick.svg "repo-size"
[tag-latest]: https://img.shields.io/github/tag/jaredtao/taoquick.svg
### Issue
2020-10-29 09:37:45 +08:00
|[Issues][issues-link]|pull request|
|:--:|:--:|
|![issuse-badge]|![pull-request]|
2019-07-18 10:17:02 +08:00
[issues-link]: https://github.com/jaredtao/TaoQuick/issues
[issuse-badge]: https://img.shields.io/github/issues/jaredtao/taoquick.svg?style=popout
[issue-closed]: https://img.shields.io/github/issues-closed/jaredtao/taoquick.svg
[pull-request]: https://img.shields.io/github/issues-pr/jaredtao/taoquick.svg
[pull-closed]: https://img.shields.io/github/issues-pr-closed/jaredtao/taoquick.svg
2020-10-29 09:37:45 +08:00
### Other status
2019-07-18 10:17:02 +08:00
2020-10-29 09:37:45 +08:00
|commit freq|last commit|date|forks|stars|
2019-08-03 17:47:27 +08:00
|:--:|:--:|:--:|:--:|:--:|
|![commit-active]|![commit-latest]|![release-date]|![forks-badge]|![stars-badge]|
2019-07-18 10:17:02 +08:00
[forks-badge]: https://img.shields.io/github/forks/jaredtao/taoquick.svg "forks"
[stars-badge]: https://img.shields.io/github/stars/jaredtao/taoquick.svg "stars"
[commit-active]: https://img.shields.io/github/commit-activity/w/jaredtao/taoquick.svg
[commit-latest]: https://img.shields.io/github/last-commit/jaredtao/taoquick.svg
[release-date]: https://img.shields.io/github/release-date/jaredtao/taoquick.svg
2020-10-29 09:37:45 +08:00
## Some Demo Preview
2019-07-18 10:17:02 +08:00
2020-10-29 09:37:45 +08:00
### Main Page
2019-07-18 10:17:02 +08:00
2020-10-29 09:37:45 +08:00
![](preview/main-en.png)
2019-07-18 10:17:02 +08:00
2020-10-29 09:37:45 +08:00
### Change Skin
2019-07-18 10:17:02 +08:00
2020-10-29 09:37:45 +08:00
![](preview/skin-en.png)
2019-07-18 10:17:02 +08:00
2020-10-29 09:37:45 +08:00
### Multi-Language
2019-07-18 10:17:02 +08:00
2020-10-29 09:37:45 +08:00
![](preview/I18n-en.png)
2019-07-18 10:17:02 +08:00
2020-10-29 09:37:45 +08:00
### Some Button Controls
2019-07-18 10:17:02 +08:00
2020-10-29 09:37:45 +08:00
![](preview/Buttons-en.png)
2019-08-03 17:47:27 +08:00
2020-10-29 09:37:45 +08:00
### Data entry Controls
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
![](preview/Data-en.png)
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
### Table Controls
2020-10-29 01:30:35 +08:00
2020-10-29 09:37:45 +08:00
![](preview/Table-en.png)
2020-10-29 01:30:35 +08:00
2020-10-29 09:37:45 +08:00
### Rect Drag Controls
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
![](preview/rect-en.png)
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
### Wizard
2020-10-29 01:30:35 +08:00
2020-10-29 09:37:45 +08:00
![](preview/wizard-en.png)
2020-10-29 01:30:35 +08:00
![](preview/wizard.gif)
2020-10-29 09:37:45 +08:00
### ShaderToy-Snail
2020-10-21 18:49:59 +08:00
![](preview/snail.png)
2020-10-29 09:37:45 +08:00
### ShaderToy-SuperMario
2020-10-21 18:49:59 +08:00
![](preview/SuperMario.png)
2019-08-03 17:47:27 +08:00
2020-06-13 01:41:54 +08:00
2020-10-29 09:37:45 +08:00
## Environment
2020-06-19 00:03:03 +08:00
2020-10-29 09:37:45 +08:00
* Qt 5.9.0 or later
2020-10-21 18:49:59 +08:00
2020-11-04 13:34:57 +08:00
* compatibility Qt5.15
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
## Project Struct
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
Project Struct as flow:
2020-10-21 18:49:59 +08:00
![](doc/struct1.png)
2020-10-29 09:37:45 +08:00
echo content as table:
|Content|Reference|Remark|
2020-10-21 18:49:59 +08:00
|----|----|----|
2020-10-29 09:37:45 +08:00
|src|TaoQuick Core Library|some qml code, picture and scripts for support designer, not has c++ code|
|exampes|some demo|show how to use TaoQuick Core Library|
|3rdparty|thrid party library||
|mkspecs|qmake extern||
|.github|github-actions|CI CD|
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
## TaoQuick Core Library
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
Core Library source code path:
2020-10-21 18:49:59 +08:00
src/TaoQuick/imports/TaoQuick/Qml
2020-10-29 09:37:45 +08:00
Content:
2020-10-21 18:49:59 +08:00
![](doc/core.png)
2020-10-29 09:37:45 +08:00
To avoid confusion with Qt default components, TaoQuick components names all begin with Cus (The abbreviation of Custom)
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
CusConfig is global configuration, mainly contain font、 theme and so on, all components are displayed in this configuration
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
Other Contents reference to above table:
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
|Content|Reference|Remark|
2020-10-21 18:49:59 +08:00
|----|----|----|
2020-10-29 09:37:45 +08:00
|Basic|Basic Controls| such as Text, ToolTip, It is used to unify the basic components in the whole project and facilitate the global replacement when the project becomes huge|
|CusBackground|A simple background box|it is usually placed at the beginning of the program to absorb mouse focus from the white space|
|CusButton|button|Some commonly used buttons have been encapsulated, and various effects can be customized again|
|CusCheckBox|CheckBox||
|CusComboBox|ComboBox||
|CusImage|Basic Image||
|CusInput|Input||
|CusLabel|Label||
|CusListView|List|Simaple custom scrollbars|
|CusPopup|Popup||
|CusScroll|ScrollBar||
|CusSlider|Slider||
|CusSpinBox|SpinBox||
|CusTable|Table|It needs to be used with specific C++ model to support the selection, check, draw rect selection, anti-selection, continuous selection and all selection|
|Effect|Effect|Animation、PageSwitch and ShaderToy|
|Misc|Others||
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
## Use TaoQuick
2020-10-21 18:49:59 +08:00
2020-11-12 14:34:21 +08:00
### qmake
You just need import '.pri' file to project and add import Path to QmlEngine, TaoQuick will be use as local file or qrc resource.
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
Compared with 'Qml module' and 'Qml C++ plugin', this usage has the following advantages:
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
* After importing '.pri', no additional compile, generation of dll or plugin are required
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
* No additional copy resources are required to deployment the program
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
* After importing '.pri', Qt Creater can support TaoQuick Qml code highlighting and double-clicking the Follow symbol
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
* After import the module 'import TaoQuick 1.0' in Qml, you can use the TaoQuick component in The Designer mode of Qt Creater by dragging or visual property editor.(principle: Generate metainfo required by Designer via some script)
2020-10-21 18:49:59 +08:00
2020-10-21 19:54:30 +08:00
![](preview/designer.png)
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
detail use step:
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
1. copy src/TaoQuick to your project, in any location
2020-10-21 18:49:59 +08:00
2020-10-29 09:37:45 +08:00
2. Import 'pri' files in the corresponding TaoQuick folder in your project 'pro' file
for eaxmple:
2020-10-21 18:49:59 +08:00
```qmake
include(TaoQuick/TaoQuick.pri)
```
2020-10-29 09:37:45 +08:00
or
2020-10-21 18:49:59 +08:00
```qmake
include(src/TaoQuick/imports/imports.pri)
```
2020-11-12 14:34:21 +08:00
TaoQuick.pri will define two MACRO: TaoQuickImportPath and TaoQuickImagePath.
Debug mode will use TaoQuick as local file, and release mode for qrc resource.
3. add import path in cpp
Before load source qml, TaoQuick need add import path to QmlEngine and set imagePath to context.
if use QQuickView, TaoQuick can be use as flow:
```C++
view.engine()->addImportPath(TaoQuickImportPath);
view.rootContext()->setContextProperty("taoQuickImagePath", TaoQuickImagePath);
```
if use QmlEngine, TaoQuick can be use as flow:
```C++
engine.addImportPath(TaoQuickImportPath);
engine.rootContext()->setContextProperty("taoQuickImagePath", TaoQuickImagePath);
```
2019-08-26 16:23:33 +08:00
2020-06-19 00:03:03 +08:00
***
2020-11-12 14:34:21 +08:00
### cmake
TaoQuick start support cmake after version 0.5.0 , it's same as qmake.
detail use step:
1. copy src/TaoQuick to your project, in any location
2. copy cmake/taoQuick.cmake to your project, in any location
and make sure the first line of taoQuick.cmake location to correct TaoQuick path
2019-08-26 16:23:33 +08:00
2020-11-12 14:34:21 +08:00
3. add cmake extern path in your CMakeLists.txt
add extern path:
```cmake
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
```
then load taoQuick by 'include'
```cmake
include(taoQuick)
```
taoQuick.cmake will define two MACRO: TaoQuickImportPath and TaoQuickImagePath.
Debug mode will use TaoQuick as local file, and release mode for qrc resource.
2020-11-12 14:38:56 +08:00
Release mode taoQuick.cmake also define a MACRO TaoQuickRes, that location to qrc file.
2020-11-12 14:34:21 +08:00
your project should add TaoQuickRes to executable, like this:
```cmake
if (CMAKE_BUILD_TYPE MATCHES "Release")
add_executable(MyApp ${someSource} ${TaoQuickRes})
else()
add_executable(MyApp ${someSource})
endif()
```
4. add import path in cpp
Before load source qml, TaoQuick need add import path to QmlEngine and set imagePath to context.
if use QQuickView, TaoQuick can be use as flow:
```C++
view.engine()->addImportPath(TaoQuickImportPath);
view.rootContext()->setContextProperty("taoQuickImagePath", TaoQuickImagePath);
```
if use QmlEngine, TaoQuick can be use as flow:
```C++
engine.addImportPath(TaoQuickImportPath);
engine.rootContext()->setContextProperty("taoQuickImagePath", TaoQuickImagePath);
```
2020-06-19 00:03:03 +08:00
2020-10-29 09:37:45 +08:00
## Sponsorship
2020-06-19 00:03:03 +08:00
2020-10-29 09:37:45 +08:00
If you feel the share content is good, treat the author a drink.
2020-06-19 00:03:03 +08:00
2020-10-29 09:37:45 +08:00
< img src = "https://github.com/jaredtao/jaredtao.github.io/blob/master/img/weixin.jpg?raw=true" width = "30%" height = "30%" / > < img src = "https://github.com/jaredtao/jaredtao.github.io/blob/master/img/zhifubao.jpg?raw=true" width = "30%" height = "30%" / >
2020-07-17 09:09:08 +08:00
2020-10-29 09:37:45 +08:00
it's WeChat Pay and Alipay