move to contents
53
examples/TaoQuickShow/Contents.qrc
Normal file
@ -0,0 +1,53 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>Contents/Animation/Board.qml</file>
|
||||
<file>Contents/Animation/Circle.qml</file>
|
||||
<file>Contents/Animation/Cleavage.qml</file>
|
||||
<file>Contents/Animation/Cross.qml</file>
|
||||
<file>Contents/Animation/Diagonal.qml</file>
|
||||
<file>Contents/Animation/Dissolve.qml</file>
|
||||
<file>Contents/Animation/Enter.qml</file>
|
||||
<file>Contents/Animation/Grad.qml</file>
|
||||
<file>Contents/Animation/Louver.qml</file>
|
||||
<file>Contents/Animation/Rhombus.qml</file>
|
||||
<file>Contents/Animation/Square.qml</file>
|
||||
<file>Contents/Animation/Wheel.qml</file>
|
||||
<file>Contents/BaseComponent/Buttons.qml</file>
|
||||
<file>Contents/BaseComponent/Dialogs.qml</file>
|
||||
<file>Contents/BaseComponent/Drags.qml</file>
|
||||
<file>Contents/BaseComponent/Gradiants.qml</file>
|
||||
<file>Contents/BaseComponent/Progresses.qml</file>
|
||||
<file>Contents/Effect/Effects/TAround.qml</file>
|
||||
<file>Contents/Effect/Effects/TArrow.qml</file>
|
||||
<file>Contents/Effect/Effects/TRingPage.qml</file>
|
||||
<file>Contents/Effect/Effects/TSoundByte.qml</file>
|
||||
<file>Contents/Effect/Effects/TSwapper.qml</file>
|
||||
<file>Contents/Effect/ARound.qml</file>
|
||||
<file>Contents/Effect/Arrow.qml</file>
|
||||
<file>Contents/Effect/RingPage.qml</file>
|
||||
<file>Contents/Effect/SoundByte.qml</file>
|
||||
<file>Contents/Effect/Swapper.qml</file>
|
||||
<file>Contents/PageSwitch/Board.qml</file>
|
||||
<file>Contents/PageSwitch/Circle.qml</file>
|
||||
<file>Contents/PageSwitch/Cleavage.qml</file>
|
||||
<file>Contents/PageSwitch/Cross.qml</file>
|
||||
<file>Contents/PageSwitch/Diagonal.qml</file>
|
||||
<file>Contents/PageSwitch/Dissolve.qml</file>
|
||||
<file>Contents/PageSwitch/FadeInOut.qml</file>
|
||||
<file>Contents/PageSwitch/Grad.qml</file>
|
||||
<file>Contents/PageSwitch/Louver.qml</file>
|
||||
<file>Contents/PageSwitch/PageSwitchBase.qml</file>
|
||||
<file>Contents/PageSwitch/Rhombus.qml</file>
|
||||
<file>Contents/PageSwitch/Sector.qml</file>
|
||||
<file>Contents/PageSwitch/Square.qml</file>
|
||||
<file>Contents/PageSwitch/Wheel.qml</file>
|
||||
<file>Contents/ShaderEffect/CloudHole.qml</file>
|
||||
<file>Contents/ShaderEffect/Planet.qml</file>
|
||||
<file>Contents/ShaderEffect/Planet1.png</file>
|
||||
<file>Contents/ShaderEffect/Snail.qml</file>
|
||||
<file>Contents/ShaderEffect/SuperMario.qml</file>
|
||||
<file>Contents/Shape/KLine.qml</file>
|
||||
<file>Contents/Shape/RoundRect.qml</file>
|
||||
<file>Contents/Welcome/Welcome.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -18,5 +18,37 @@
|
||||
<file>Image/Window/about_gray.png</file>
|
||||
<file>Image/Window/about_white.png</file>
|
||||
<file>Image/Window/flower.jpg</file>
|
||||
<file>Image/Button/cry-fill.png</file>
|
||||
<file>Image/Button/smile-fill-hover.png</file>
|
||||
<file>Image/Button/smile-fill.png</file>
|
||||
<file>Image/Effect/Girls/girl1.jpeg</file>
|
||||
<file>Image/Effect/Girls/girl10.jpeg</file>
|
||||
<file>Image/Effect/Girls/girl11.jpeg</file>
|
||||
<file>Image/Effect/Girls/girl12.jpeg</file>
|
||||
<file>Image/Effect/Girls/girl14.jpeg</file>
|
||||
<file>Image/Effect/Girls/girl15.jpeg</file>
|
||||
<file>Image/Effect/Girls/girl2.jpeg</file>
|
||||
<file>Image/Effect/Girls/girl3.jpeg</file>
|
||||
<file>Image/Effect/Girls/girl4.jpeg</file>
|
||||
<file>Image/Effect/Girls/girl5.jpeg</file>
|
||||
<file>Image/Effect/Girls/girl6.jpeg</file>
|
||||
<file>Image/Effect/Girls/girl7.jpeg</file>
|
||||
<file>Image/Effect/Girls/girl8.jpeg</file>
|
||||
<file>Image/Effect/Girls/girl9.jpeg</file>
|
||||
<file>Image/Effect/arrow.png</file>
|
||||
<file>Image/Effect/astronomy.jpg</file>
|
||||
<file>Image/Effect/baby.jpg</file>
|
||||
<file>Image/Effect/Dissolve_1.jpg</file>
|
||||
<file>Image/Effect/Dissolve_2.png</file>
|
||||
<file>Image/Effect/girl.jpg</file>
|
||||
<file>Image/Effect/soundRect.png</file>
|
||||
<file>Image/Tao/qq.jpg</file>
|
||||
<file>Image/Tao/qq_connect.jpg</file>
|
||||
<file>Image/Tao/qqgroup.jpg</file>
|
||||
<file>Image/Tao/qqgroup2.jpg</file>
|
||||
<file>Image/Tao/weixin.jpg</file>
|
||||
<file>Image/Tao/weixin_connect.jpg</file>
|
||||
<file>Image/Tao/weixingongzhonghao.jpg</file>
|
||||
<file>Image/Tao/zhifubao.jpg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 447 B |
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 447 B |
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 447 B |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 217 KiB After Width: | Height: | Size: 217 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 180 B |
@ -1,5 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>Trans/language_zh.json</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -1,65 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/EffectImage">
|
||||
<file>Img/astronomy.jpg</file>
|
||||
<file>Img/soundRect.png</file>
|
||||
<file>Img/girl.jpg</file>
|
||||
<file>Img/baby.jpg</file>
|
||||
<file>Img/Dissolve_1.jpg</file>
|
||||
<file>Img/Dissolve_2.png</file>
|
||||
<file>Img/arrow.png</file>
|
||||
<file>Img/Girls/girl1.jpeg</file>
|
||||
<file>Img/Girls/girl2.jpeg</file>
|
||||
<file>Img/Girls/girl3.jpeg</file>
|
||||
<file>Img/Girls/girl4.jpeg</file>
|
||||
<file>Img/Girls/girl5.jpeg</file>
|
||||
<file>Img/Girls/girl6.jpeg</file>
|
||||
<file>Img/Girls/girl7.jpeg</file>
|
||||
<file>Img/Girls/girl8.jpeg</file>
|
||||
<file>Img/Girls/girl9.jpeg</file>
|
||||
<file>Img/Girls/girl10.jpeg</file>
|
||||
<file>Img/Girls/girl11.jpeg</file>
|
||||
<file>Img/Girls/girl12.jpeg</file>
|
||||
<file>Img/Girls/girl14.jpeg</file>
|
||||
<file>Img/Girls/girl15.jpeg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/Effect">
|
||||
<file>Qml/ContentPage/Animation/Board.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Circle.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Cleavage.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Cross.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Diagonal.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Dissolve.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Enter.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Grad.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Louver.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Rhombus.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Square.qml</file>
|
||||
<file>Qml/ContentPage/Animation/Wheel.qml</file>
|
||||
<file>Qml/ContentPage/Effect/Arrow.qml</file>
|
||||
<file>Qml/ContentPage/Effect/RingPage.qml</file>
|
||||
<file>Qml/ContentPage/Effect/SoundByte.qml</file>
|
||||
<file>Qml/ContentPage/Effect/Swapper.qml</file>
|
||||
<file>Qml/ContentPage/Shape/KLine.qml</file>
|
||||
<file>Qml/ContentPage/Shape/RoundRect.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/FadeInOut.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Dissolve.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Louver.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/PageSwitchBase.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Board.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Circle.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Cleavage.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Cross.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Grad.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Rhombus.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Sector.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Square.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Wheel.qml</file>
|
||||
<file>Qml/ContentPage/PageSwitch/Diagonal.qml</file>
|
||||
<file>Qml/ContentPage/Effect/ARound.qml</file>
|
||||
<file>Qml/ContentPage/Effect/Effects/TAround.qml</file>
|
||||
<file>Qml/ContentPage/Effect/Effects/TArrow.qml</file>
|
||||
<file>Qml/ContentPage/Effect/Effects/TRingPage.qml</file>
|
||||
<file>Qml/ContentPage/Effect/Effects/TSoundByte.qml</file>
|
||||
<file>Qml/ContentPage/Effect/Effects/TSwapper.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -1,64 +0,0 @@
|
||||
#include "EffectsPlugin.h"
|
||||
#include <QQmlEngine>
|
||||
EffectsPlugin::EffectsPlugin(QObject* parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
void EffectsPlugin::init()
|
||||
{
|
||||
Q_INIT_RESOURCE(Qml);
|
||||
}
|
||||
|
||||
QJsonArray EffectsPlugin::infos() const
|
||||
{
|
||||
static QJsonArray arr {
|
||||
QJsonObject {
|
||||
{ "name", u8"Effect" },
|
||||
{ "children",
|
||||
QJsonArray { QJsonObject { { "name", u8"Ring" }, { "url", "qrc:/Effect/Qml/ContentPage/Effect/RingPage.qml" } },
|
||||
QJsonObject { { "name", u8"Brilliant Starry Sky" }, { "url", "qrc:/Effect/Qml/ContentPage/Effect/Swapper.qml" } },
|
||||
QJsonObject { { "name", u8"Keep up with the pace" },{ "url", "qrc:/Effect/Qml/ContentPage/Effect/SoundByte.qml" } },
|
||||
QJsonObject { { "name", u8"Undercurrent surge" },{ "url", "qrc:/Effect/Qml/ContentPage/Effect/Arrow.qml" } },
|
||||
QJsonObject { { "name", u8"Magic Circle" }, { "url", "qrc:/Effect/Qml/ContentPage/Effect/ARound.qml" } } } },
|
||||
},
|
||||
|
||||
QJsonObject {
|
||||
{ "name", u8"Painter" },
|
||||
{ "children",
|
||||
QJsonArray { QJsonObject { { "name", u8"RoundRect" }, { "url", "qrc:/Effect/Qml/ContentPage/Shape/RoundRect.qml" } },
|
||||
QJsonObject { { "name", u8"KLine" }, { "url", "qrc:/Effect/Qml/ContentPage/Shape/KLine.qml" } } } } },
|
||||
QJsonObject {
|
||||
{ "name", u8"Animation" },
|
||||
{ "children",
|
||||
QJsonArray { QJsonObject { { "name", u8"Enter" }, { "url", "qrc:/Effect/Qml/ContentPage/Animation/Enter.qml" } },
|
||||
QJsonObject { { "name", u8"Grad" }, { "url", "qrc:/Effect/Qml/ContentPage/Animation/Grad.qml" } },
|
||||
QJsonObject { { "name", u8"Cleavage" }, { "url", "qrc:/Effect/Qml/ContentPage/Animation/Cleavage.qml" } },
|
||||
QJsonObject { { "name", u8"Diagonal" }, { "url", "qrc:/Effect/Qml/ContentPage/Animation/Diagonal.qml" } },
|
||||
QJsonObject { { "name", u8"Louver" }, { "url", "qrc:/Effect/Qml/ContentPage/Animation/Louver.qml" } },
|
||||
QJsonObject { { "name", u8"Square" }, { "url", "qrc:/Effect/Qml/ContentPage/Animation/Square.qml" } },
|
||||
QJsonObject { { "name", u8"Circle" }, { "url", "qrc:/Effect/Qml/ContentPage/Animation/Circle.qml" } },
|
||||
QJsonObject { { "name", u8"Cross" }, { "url", "qrc:/Effect/Qml/ContentPage/Animation/Cross.qml" } },
|
||||
QJsonObject { { "name", u8"Rhombus" }, { "url", "qrc:/Effect/Qml/ContentPage/Animation/Rhombus.qml" } },
|
||||
QJsonObject { { "name", u8"Wheel" }, { "url", "qrc:/Effect/Qml/ContentPage/Animation/Wheel.qml" } },
|
||||
QJsonObject { { "name", u8"Board" }, { "url", "qrc:/Effect/Qml/ContentPage/Animation/Board.qml" } },
|
||||
QJsonObject { { "name", u8"Dissolve" }, { "url", "qrc:/Effect/Qml/ContentPage/Animation/Dissolve.qml" } } } } },
|
||||
QJsonObject {
|
||||
{ "name", u8"PageSwitch" },
|
||||
{ "children",
|
||||
QJsonArray { QJsonObject { { "name", u8"FadeInOut" },{ "url", "qrc:/Effect/Qml/ContentPage/PageSwitch/FadeInOut.qml" } },
|
||||
QJsonObject { { "name", u8"Grad" }, { "url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Grad.qml" } },
|
||||
QJsonObject { { "name", u8"Cleavage" }, { "url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Cleavage.qml" } },
|
||||
QJsonObject { { "name", u8"Diagonal" }, { "url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Diagonal.qml" } },
|
||||
QJsonObject { { "name", u8"Louver" }, { "url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Louver.qml" } },
|
||||
QJsonObject { { "name", u8"Square" }, { "url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Square.qml" } },
|
||||
QJsonObject { { "name", u8"Circle" }, { "url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Circle.qml" } },
|
||||
QJsonObject { { "name", u8"Cross" }, { "url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Cross.qml" } },
|
||||
QJsonObject { { "name", u8"Rhombus" }, { "url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Rhombus.qml" } },
|
||||
QJsonObject { { "name", u8"Wheel" }, { "url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Wheel.qml" } },
|
||||
QJsonObject { { "name", u8"Sector" }, { "url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Sector.qml" } },
|
||||
QJsonObject { { "name", u8"Board" }, { "url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Board.qml" } },
|
||||
QJsonObject { { "name", u8"Dissolve" }, { "url", "qrc:/Effect/Qml/ContentPage/PageSwitch/Dissolve.qml" } } } } }
|
||||
};
|
||||
return arr;
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "ITaoQuickPlugin.h"
|
||||
class EffectsPlugin
|
||||
: public QObject
|
||||
, public ITaoQuickPlugin
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID TaoQuickInterface_iid)
|
||||
Q_INTERFACES(ITaoQuickPlugin)
|
||||
public:
|
||||
explicit EffectsPlugin(QObject *parent = nullptr);
|
||||
|
||||
void init() override;
|
||||
QJsonArray infos() const override;
|
||||
};
|
@ -1,36 +0,0 @@
|
||||
QT += core gui qml
|
||||
|
||||
#TARGET = $$qtLibraryTarget(TaoEffect)
|
||||
TARGET = TaoEffect
|
||||
TEMPLATE = lib
|
||||
CONFIG += plugin
|
||||
msvc {
|
||||
QMAKE_CFLAGS += -source-charset:utf-8
|
||||
QMAKE_CXXFLAGS += -source-charset:utf-8
|
||||
}
|
||||
load(taoVersion)
|
||||
include(../TaoPlugin.pri)
|
||||
|
||||
|
||||
load(taoBundle)
|
||||
BundlePath = $$getBundlePath("TaoQuickApp")
|
||||
|
||||
load(taoBuildPath)
|
||||
setBuildPath($${TaoQuick_BUILD_TREE}/$${TARGET})
|
||||
|
||||
CONFIG(debug, debug|release){
|
||||
DESTDIR=$${TaoQuick_RUN_TREE}/debug/$${BundlePath}TaoPlugin
|
||||
} else {
|
||||
DESTDIR=$${TaoQuick_RUN_TREE}/release/$${BundlePath}TaoPlugin
|
||||
}
|
||||
|
||||
|
||||
SOURCES += \
|
||||
Src/EffectsPlugin.cpp
|
||||
|
||||
HEADERS += \
|
||||
Src/EffectsPlugin.h
|
||||
|
||||
RESOURCES += \
|
||||
Qml.qrc
|
||||
|
@ -1,17 +0,0 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>Qml/Contents/BaseComponent/Buttons.qml</file>
|
||||
<file>Qml/Contents/BaseComponent/Dialogs.qml</file>
|
||||
<file>Qml/Contents/BaseComponent/Drags.qml</file>
|
||||
<file>Qml/Contents/BaseComponent/Gradiants.qml</file>
|
||||
<file>Qml/Contents/BaseComponent/Progresses.qml</file>
|
||||
<file>Qml/Contents/ShaderEffect/CloudHole.qml</file>
|
||||
<file>Qml/Contents/ShaderEffect/Planet.qml</file>
|
||||
<file>Qml/Contents/ShaderEffect/Planet1.png</file>
|
||||
<file>Qml/Contents/ShaderEffect/Snail.qml</file>
|
||||
<file>Qml/Contents/ShaderEffect/SuperMario.qml</file>
|
||||
<file>Image/Button/cry-fill.png</file>
|
||||
<file>Image/Button/smile-fill-hover.png</file>
|
||||
<file>Image/Button/smile-fill.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
@ -1,65 +0,0 @@
|
||||
#include "TaoQuickPlugin.h"
|
||||
#include <QQmlEngine>
|
||||
TaoQuickPlugin::TaoQuickPlugin(QObject *parent) : QObject (parent)
|
||||
{
|
||||
}
|
||||
|
||||
void TaoQuickPlugin::init()
|
||||
{
|
||||
Q_INIT_RESOURCE(Qml);
|
||||
}
|
||||
|
||||
QJsonArray TaoQuickPlugin::infos() const
|
||||
{
|
||||
static QJsonArray arr {
|
||||
QJsonObject {
|
||||
{"name", u8"Basic"},
|
||||
{ "children", QJsonArray{
|
||||
QJsonObject {
|
||||
{"name", u8"Button"},
|
||||
{"url", "qrc:/Qml/Contents/BaseComponent/Buttons.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"Drag"},
|
||||
{"url", "qrc:/Qml/Contents/BaseComponent/Drags.qml"},
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"Gradient"},
|
||||
{"url", "qrc:/Qml/Contents/BaseComponent/Gradiants.qml"},
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"ProgressBar"},
|
||||
{"url", "qrc:/Qml/Contents/BaseComponent/Progresses.qml"},
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"Dialog"},
|
||||
{"url", "qrc:/Qml/Contents/BaseComponent/Dialogs.qml"}
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"ShaderEffect"},
|
||||
{ "children", QJsonArray{
|
||||
QJsonObject {
|
||||
{"name", u8"Cloud Hole"},
|
||||
{"url", "qrc:/Qml/Contents/ShaderEffect/CloudHole.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"Star Light"},
|
||||
{"url", "qrc:/Qml/Contents/ShaderEffect/Planet.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"Snail"},
|
||||
{"url", "qrc:/Qml/Contents/ShaderEffect/Snail.qml"}
|
||||
},
|
||||
QJsonObject {
|
||||
{"name", u8"Super Mario"},
|
||||
{"url", "qrc:/Qml/Contents/ShaderEffect/SuperMario.qml"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
return arr;
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "ITaoQuickPlugin.h"
|
||||
class TaoQuickPlugin : public QObject, public ITaoQuickPlugin {
|
||||
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID TaoQuickInterface_iid)
|
||||
Q_INTERFACES(ITaoQuickPlugin)
|
||||
public:
|
||||
explicit TaoQuickPlugin(QObject *parent = nullptr);
|
||||
|
||||
void init() override;
|
||||
QJsonArray infos() const override;
|
||||
};
|
@ -1,34 +0,0 @@
|
||||
QT += core gui qml
|
||||
|
||||
#TARGET = $$qtLibraryTarget(TaoQuickPlugin)
|
||||
TARGET = TaoQuickPlugin
|
||||
TEMPLATE = lib
|
||||
CONFIG += plugin
|
||||
msvc {
|
||||
QMAKE_CFLAGS += -source-charset:utf-8
|
||||
QMAKE_CXXFLAGS += -source-charset:utf-8
|
||||
}
|
||||
load(taoVersion)
|
||||
|
||||
include(../TaoPlugin.pri)
|
||||
|
||||
load(taoBundle)
|
||||
BundlePath = $$getBundlePath("TaoQuickApp")
|
||||
|
||||
load(taoBuildPath)
|
||||
setBuildPath($${TaoQuick_BUILD_TREE}/$${TARGET})
|
||||
|
||||
CONFIG(debug, debug|release){
|
||||
DESTDIR=$${TaoQuick_RUN_TREE}/debug/$${BundlePath}TaoPlugin
|
||||
} else {
|
||||
DESTDIR=$${TaoQuick_RUN_TREE}/release/$${BundlePath}TaoPlugin
|
||||
}
|
||||
|
||||
SOURCES += \
|
||||
Src/TaoQuickPlugin.cpp
|
||||
|
||||
HEADERS += \
|
||||
Src/TaoQuickPlugin.h
|
||||
|
||||
RESOURCES += \
|
||||
Qml.qrc
|
@ -9,7 +9,6 @@
|
||||
<file>Qml/MainPage.qml</file>
|
||||
<file>Qml/Page/ContentData.qml</file>
|
||||
<file>Qml/Page/AboutDialog.qml</file>
|
||||
<file>Qml/Welcome/Welcome.qml</file>
|
||||
<file>Qml/Page/Biz/Background.qml</file>
|
||||
<file>Qml/Page/Biz/LangBtn.qml</file>
|
||||
<file>Qml/Page/Biz/SkinBtn.qml</file>
|
||||
|
@ -26,11 +26,7 @@ Item {
|
||||
id: aboutDialog
|
||||
|
||||
}
|
||||
Component.onCompleted: {
|
||||
view.initAppInfo()
|
||||
pluginLoader.pluginReady.connect(onPluginReady);
|
||||
pluginLoader.loadPlugin("TaoPlugin")
|
||||
}
|
||||
|
||||
function onPluginReady(pluginInfo) {
|
||||
console.log("onPluginReady")
|
||||
var arr = null
|
||||
|
@ -26,7 +26,7 @@ Popup {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 2
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: "qrc:/Image/logo/milk.png"
|
||||
source: imgPath + "logo/milk.png"
|
||||
}
|
||||
TTextBtn {
|
||||
id: closeBtn
|
||||
|
@ -37,7 +37,7 @@ Rectangle {
|
||||
opacity: 0.2
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
source: "qrc:/Image/Window/flower.jpg"
|
||||
source: imgPath + "Window/flower.jpg"
|
||||
}
|
||||
Image {
|
||||
id: img2
|
||||
@ -46,6 +46,6 @@ Rectangle {
|
||||
opacity: 0.2
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
source: "qrc:/Image/Window/flower.jpg"
|
||||
source: imgPath + "Window/flower.jpg"
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import TaoQuick 1.0
|
||||
import "qrc:/TaoQuick"
|
||||
|
||||
TImageBtn {
|
||||
imageUrl: containsMouse ? "qrc:/Image/Window/lang_white.png" : "qrc:/Image/Window/lang_gray.png"
|
||||
imageUrl: imgPath + (containsMouse ? "Window/lang_white.png" : "Window/lang_gray.png")
|
||||
onClicked: {
|
||||
// notifyBox.notify("change language")
|
||||
pop.show()
|
||||
|
@ -4,7 +4,7 @@ import TaoQuick 1.0
|
||||
import "qrc:/TaoQuick"
|
||||
TImageBtn {
|
||||
|
||||
imageUrl: containsMouse ? "qrc:/Image/Window/skin_white.png" : "qrc:/Image/Window/skin_gray.png"
|
||||
imageUrl: imgPath + (containsMouse ? "Window/skin_white.png" : "Window/skin_gray.png")
|
||||
onClicked: {
|
||||
skinBox.show()
|
||||
}
|
||||
|
@ -60,6 +60,6 @@ QtObject {
|
||||
}
|
||||
|
||||
property ListModel contentData: ListModel {
|
||||
ListElement { name: "Home"; url: "qrc:/Qml/Welcome/Welcome.qml"; children: []}
|
||||
ListElement { name: "Home"; url: ""; children: []}
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ Rectangle {
|
||||
height: parent.height
|
||||
spacing: 4
|
||||
Image {
|
||||
source: "qrc:/Image/logo/milk.png"
|
||||
source: imgPath + "logo/milk.png"
|
||||
}
|
||||
Text {
|
||||
id: t
|
||||
@ -31,7 +31,7 @@ Rectangle {
|
||||
TImageBtn {
|
||||
width: 20
|
||||
height: 20
|
||||
imageUrl: containsMouse ? "qrc:/Image/Window/minimal_white.png" : "qrc:/Image/Window/minimal_gray.png"
|
||||
imageUrl: imgPath + (containsMouse ? "Window/minimal_white.png" : "Window/minimal_gray.png")
|
||||
onClicked: {
|
||||
view.showMinimized()
|
||||
}
|
||||
@ -40,7 +40,7 @@ Rectangle {
|
||||
width: 20
|
||||
height: 20
|
||||
visible: !isMaxed
|
||||
imageUrl: containsMouse ? "qrc:/Image/Window/max_white.png" : "qrc:/Image/Window/max_gray.png"
|
||||
imageUrl: imgPath + (containsMouse ? "Window/max_white.png" : "Window/max_gray.png")
|
||||
onClicked: {
|
||||
view.showMaximized()
|
||||
isMaxed = true
|
||||
@ -50,7 +50,7 @@ Rectangle {
|
||||
width: 20
|
||||
height: 20
|
||||
visible: isMaxed
|
||||
imageUrl: containsMouse ? "qrc:/Image/Window/normal_white.png" : "qrc:/Image/Window/normal_gray.png"
|
||||
imageUrl: imgPath + (containsMouse ? "Window/normal_white.png" : "Window/normal_gray.png")
|
||||
onClicked: {
|
||||
view.showNormal()
|
||||
isMaxed = false
|
||||
@ -59,7 +59,7 @@ Rectangle {
|
||||
TImageBtn {
|
||||
width: 20
|
||||
height: 20
|
||||
imageUrl: containsMouse ? "qrc:/Image/Window/close_white.png" : "qrc:/Image/Window/close_gray.png"
|
||||
imageUrl: imgPath + (containsMouse ? "Window/close_white.png" : "Window/close_gray.png")
|
||||
onClicked: {
|
||||
view.close()
|
||||
}
|
||||
@ -94,7 +94,7 @@ Rectangle {
|
||||
height: 20
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
imageUrl: containsMouse ? "qrc:/Image/Window/about_white.png" : "qrc:/Image/Window/about_gray.png"
|
||||
imageUrl: imgPath + (containsMouse ? "Window/about_white.png" : "Window/about_gray.png")
|
||||
onClicked: {
|
||||
aboutDialog.show()
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
Item {
|
||||
width: 1024
|
||||
@ -10,6 +10,6 @@ Item {
|
||||
|
||||
AnimatedImage {
|
||||
anchors.fill: parent
|
||||
source: "qrc:/Image/logo/splash.gif"
|
||||
source: imgPath + "logo/splash.gif"
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,10 @@ Item {
|
||||
id: rootView
|
||||
width: 1440
|
||||
height: 960
|
||||
Component.onCompleted: {
|
||||
view.initAppInfo()
|
||||
trans.loadFolder(appPath + "/Trans")
|
||||
}
|
||||
RectangularGlow {
|
||||
id: glow
|
||||
anchors.fill: parent
|
||||
|
@ -1,24 +0,0 @@
|
||||
#pragma once
|
||||
#include <QJsonArray>
|
||||
#include <QtPlugin>
|
||||
//ITaoQuickPlugin 插件接口
|
||||
class ITaoQuickPlugin
|
||||
{
|
||||
public:
|
||||
virtual ~ITaoQuickPlugin() {}
|
||||
//插件初始化
|
||||
virtual void init() = 0;
|
||||
//获取插件内容,Json格式为
|
||||
// [name: "首页", title: "欢迎", url: "qrc:/Qml/Contents/Welcome/Welcome.qml", children: []]
|
||||
//或者
|
||||
// [
|
||||
// name: "基础组件"; title: "基础组件"; children: [
|
||||
// { name: "按钮组件"; title: "按钮组件"; url: "qrc:/Qml/Contents/BaseComponent/Buttons.qml"}
|
||||
// ]
|
||||
// ]
|
||||
virtual QJsonArray infos() const = 0;
|
||||
|
||||
virtual void uninit() {}
|
||||
};
|
||||
#define TaoQuickInterface_iid "jaredtao.github.io/TaoQuick"
|
||||
Q_DECLARE_INTERFACE(ITaoQuickPlugin, TaoQuickInterface_iid)
|
@ -1,45 +0,0 @@
|
||||
#include "PluginLoader.h"
|
||||
#include "logger.h"
|
||||
#include <QDir>
|
||||
#include <QCoreApplication>
|
||||
#include <QJsonDocument>
|
||||
PluginLoader::PluginLoader(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
PluginLoader::~PluginLoader()
|
||||
{
|
||||
qDeleteAll(m_pluginList);
|
||||
m_pluginList.clear();
|
||||
}
|
||||
|
||||
void PluginLoader::loadPlugin(const QString &pluginPath)
|
||||
{
|
||||
QDir dir(qApp->applicationDirPath() + "/" + pluginPath);
|
||||
|
||||
auto list = dir.entryInfoList(QDir::Files);
|
||||
|
||||
for (auto info : list) {
|
||||
if (QLibrary::isLibrary(info.absoluteFilePath()))
|
||||
{
|
||||
m_loader = std::make_unique<QPluginLoader>();
|
||||
m_loader->setFileName(info.absoluteFilePath());
|
||||
if (!m_loader->load())
|
||||
{
|
||||
LOG_WARN << m_loader->fileName() << m_loader->errorString();
|
||||
continue;
|
||||
}
|
||||
QObject *pObj = m_loader->instance();
|
||||
auto pPlugin = qobject_cast<ITaoQuickPlugin *>(pObj);
|
||||
if (!pPlugin)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
pPlugin->init();
|
||||
emit pluginReady(QString(QJsonDocument(pPlugin->infos()).toJson()));
|
||||
m_pluginList.append(pPlugin);
|
||||
LOG_INFO << "loaded plugin " << info.absoluteFilePath();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
#pragma once
|
||||
#include "ITaoQuickPlugin.h"
|
||||
#include <QObject>
|
||||
#include <memory>
|
||||
#include <QPluginLoader>
|
||||
|
||||
class PluginLoader : public QObject{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PluginLoader(QObject *parent = nullptr);
|
||||
~PluginLoader() override;
|
||||
|
||||
Q_INVOKABLE void loadPlugin(const QString &pluginPath = u8"plugin/");
|
||||
|
||||
signals:
|
||||
void pluginReady(QString pluginInfo);
|
||||
private:
|
||||
QList<ITaoQuickPlugin *> m_pluginList;
|
||||
std::unique_ptr<QPluginLoader> m_loader = nullptr;
|
||||
};
|
@ -2,7 +2,6 @@
|
||||
|
||||
#include "Ver-u8.h"
|
||||
|
||||
|
||||
#include <QQmlContext>
|
||||
#include <QQmlEngine>
|
||||
#include <QQuickItem>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "Trans.h"
|
||||
#include "Trans.h"
|
||||
#include "filereadwrite.h"
|
||||
#include <QDir>
|
||||
const static auto cEnglisthStr = QStringLiteral("English");
|
||||
@ -93,7 +93,6 @@ void Trans::setCurrentLang(const QString& currentLang)
|
||||
return;
|
||||
|
||||
m_currentLang = currentLang;
|
||||
// qWarning() << "m_currentLang" << m_currentLang;
|
||||
emit currentLangChanged(m_currentLang);
|
||||
emit transStringChanged();
|
||||
}
|
||||
|
@ -12,8 +12,8 @@ class Trans : public QObject
|
||||
Q_PROPERTY(QString transString READ transString NOTIFY transStringChanged)
|
||||
public:
|
||||
explicit Trans(QObject *parent = nullptr);
|
||||
void loadFolder(const QString &folder);
|
||||
bool load(QString &lang, const QString &filePath);
|
||||
Q_INVOKABLE void loadFolder(const QString &folder);
|
||||
Q_INVOKABLE bool load(QString &lang, const QString &filePath);
|
||||
public:
|
||||
const QString ¤tLang() const;
|
||||
|
||||
|