diff --git a/test/qqtdicttest4/AppRoot/a.xml b/test/qqtdicttest4/AppRoot/a.xml new file mode 100644 index 00000000..9772dafb --- /dev/null +++ b/test/qqtdicttest4/AppRoot/a.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + XXXXXXXXX + + + + + + + + + + + + + + 张三 + + + + + + + + + + + + 重症医学科 + + + + + + + + + + + + + + + + 陈维 + + + + + 人事培训科 + + + 陈维 + + + + + + + + + diff --git a/test/qqtdicttest4/AppRoot/b.xml b/test/qqtdicttest4/AppRoot/b.xml new file mode 100644 index 00000000..dcc1eba0 --- /dev/null +++ b/test/qqtdicttest4/AppRoot/b.xml @@ -0,0 +1,9 @@ + + + 王哥 + 111122211 + 22222222 +
北京-xxxx
+ M + 75kg +
diff --git a/test/qqtdicttest4/AppRoot/c.xml b/test/qqtdicttest4/AppRoot/c.xml new file mode 100644 index 00000000..dd89e516 --- /dev/null +++ b/test/qqtdicttest4/AppRoot/c.xml @@ -0,0 +1,37 @@ + + + + + + Harry Potter + J K. Rowling + 2005 + 29.99 + + + + Everyday Italian + Giada De Laurentiis + 2005 + 30.00 + + + + Learning XML + Erik T. Ray + 2003 + 39.95 + + + + XQuery Kick Start + James McGovern + Per Bothner + Kurt Cagle + James Linn + Vaidyanathan Nagarajan + 2003 + 49.99 + + + diff --git a/test/qqtdicttest4/AppRoot/skin/default.qss b/test/qqtdicttest4/AppRoot/skin/default.qss new file mode 100644 index 00000000..09e37969 --- /dev/null +++ b/test/qqtdicttest4/AppRoot/skin/default.qss @@ -0,0 +1,24 @@ +/*spinbox 抬起样式*/ +QTimeEdit::up-button,QDoubleSpinBox::up-button,QSpinBox::up-button { + subcontrol-origin:border; + subcontrol-position:right; + width: 12px; +} + +QTimeEdit::down-button,QDoubleSpinBox::down-button,QSpinBox::down-button { + subcontrol-origin:border; + subcontrol-position:left; + width: 12px; +} + +/*按钮按下样式*/ +QTimeEdit::up-button:pressed,QDoubleSpinBox::up-button:pressed,QSpinBox::up-button:pressed{ + subcontrol-origin:border; + subcontrol-position:right; + width: 12px; +} + +QTimeEdit::down-button:pressed,QDoubleSpinBox::down-button:pressed,QSpinBox::down-button:pressed,QSpinBox::down-button:pressed{ + subcontrol-position:left; + width: 12px; +} diff --git a/test/qqtdicttest4/android/AndroidManifest.xml b/test/qqtdicttest4/android/AndroidManifest.xml new file mode 100644 index 00000000..1e86dba5 --- /dev/null +++ b/test/qqtdicttest4/android/AndroidManifest.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/qqtdicttest4/android/res/drawable-hdpi/ic_launcher_round.png b/test/qqtdicttest4/android/res/drawable-hdpi/ic_launcher_round.png new file mode 100644 index 00000000..3e1aeefe Binary files /dev/null and b/test/qqtdicttest4/android/res/drawable-hdpi/ic_launcher_round.png differ diff --git a/test/qqtdicttest4/android/res/drawable-hdpi/icon.png b/test/qqtdicttest4/android/res/drawable-hdpi/icon.png new file mode 100644 index 00000000..85e68717 Binary files /dev/null and b/test/qqtdicttest4/android/res/drawable-hdpi/icon.png differ diff --git a/test/qqtdicttest4/android/res/drawable-ldpi/ic_launcher_round.png b/test/qqtdicttest4/android/res/drawable-ldpi/ic_launcher_round.png new file mode 100644 index 00000000..66178784 Binary files /dev/null and b/test/qqtdicttest4/android/res/drawable-ldpi/ic_launcher_round.png differ diff --git a/test/qqtdicttest4/android/res/drawable-ldpi/icon.png b/test/qqtdicttest4/android/res/drawable-ldpi/icon.png new file mode 100644 index 00000000..88ee6f7d Binary files /dev/null and b/test/qqtdicttest4/android/res/drawable-ldpi/icon.png differ diff --git a/test/qqtdicttest4/android/res/drawable-mdpi/ic_launcher_round.png b/test/qqtdicttest4/android/res/drawable-mdpi/ic_launcher_round.png new file mode 100644 index 00000000..22d1ab6d Binary files /dev/null and b/test/qqtdicttest4/android/res/drawable-mdpi/ic_launcher_round.png differ diff --git a/test/qqtdicttest4/android/res/drawable-mdpi/icon.png b/test/qqtdicttest4/android/res/drawable-mdpi/icon.png new file mode 100644 index 00000000..e5c37c2d Binary files /dev/null and b/test/qqtdicttest4/android/res/drawable-mdpi/icon.png differ diff --git a/test/qqtdicttest4/android/res/drawable-xhdpi/ic_launcher_round.png b/test/qqtdicttest4/android/res/drawable-xhdpi/ic_launcher_round.png new file mode 100644 index 00000000..88ee6f7d Binary files /dev/null and b/test/qqtdicttest4/android/res/drawable-xhdpi/ic_launcher_round.png differ diff --git a/test/qqtdicttest4/android/res/drawable-xxhdpi/ic_launcher_round.png b/test/qqtdicttest4/android/res/drawable-xxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..e5c37c2d Binary files /dev/null and b/test/qqtdicttest4/android/res/drawable-xxhdpi/ic_launcher_round.png differ diff --git a/test/qqtdicttest4/android/res/drawable-xxxhdpi/ic_launcher_round.png b/test/qqtdicttest4/android/res/drawable-xxxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..85e68717 Binary files /dev/null and b/test/qqtdicttest4/android/res/drawable-xxxhdpi/ic_launcher_round.png differ diff --git a/test/qqtdicttest4/main.cpp b/test/qqtdicttest4/main.cpp new file mode 100644 index 00000000..219ca126 --- /dev/null +++ b/test/qqtdicttest4/main.cpp @@ -0,0 +1,11 @@ +#include "mainwindow.h" +#include + +int main ( int argc, char* argv[] ) +{ + QQtApplication a ( argc, argv ); + MainWindow w; + w.show(); + + return a.exec(); +} diff --git a/test/qqtdicttest4/mainwindow.cpp b/test/qqtdicttest4/mainwindow.cpp new file mode 100644 index 00000000..46aa9e73 --- /dev/null +++ b/test/qqtdicttest4/mainwindow.cpp @@ -0,0 +1,51 @@ +#include "mainwindow.h" +#include "ui_mainwindow.h" + +#include + +#include +#define p3line() qDebug().space() + +MainWindow::MainWindow ( QWidget* parent ) : + QMainWindow ( parent ), + ui ( new Ui::MainWindow ) +{ + ui->setupUi ( this ); + + QFile file ( "b.xml" ); + file.open ( QFile::ReadOnly ); + QByteArray bytes = file.readAll(); + file.close();; + + QQtDictionary dict; + dict.fromXML ( bytes ); + p3line() << "root:" << dict; +#if 1 + p3line() << "xml:" << dict["xml"]; + p3line() << "person:" << dict["person"]; + + p3line() << "phone-number:" << dict["person"]["phone-number"]; + p3line() << "address:" << dict["person"]["address"]; + p3line() << "username:" << dict["person"]["username"]; + + //节点多类型! + dict["person"]["phone-number"].setType ( QQtDictionary::DictMap ); + p3line() << "phone-number:" << dict["person"]["phone-number"]["__attributes__"]; + dict["person"]["phone-number"].setType ( QQtDictionary::DictValue ); + p3line() << "phone-number:" << dict["person"]["phone-number"]; + +#elif 1 + p3line() << "xml:" << dict["xml"]; + p3line() << "book:" << dict["bookstore"]["book"]; + p3line() << "book:" << dict["bookstore"]["book"]["__attributes__"]; +#else + p3line() << "PRPM_IN301010UV01:" << dict["PRPM_IN301010UV01"]; + p3line() << "PRPM_IN301010UV01:" << dict["PRPM_IN301010UV01"]["id"]; + p3line() << "PRPM_IN301010UV01:" << dict["PRPM_IN301010UV01"]["controlActProcess"]; +#endif +} + +MainWindow::~MainWindow() +{ + delete ui; +} diff --git a/test/qqtdicttest4/mainwindow.h b/test/qqtdicttest4/mainwindow.h new file mode 100644 index 00000000..29bb970d --- /dev/null +++ b/test/qqtdicttest4/mainwindow.h @@ -0,0 +1,22 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + +private: + Ui::MainWindow *ui; +}; + +#endif // MAINWINDOW_H diff --git a/test/qqtdicttest4/mainwindow.ui b/test/qqtdicttest4/mainwindow.ui new file mode 100644 index 00000000..837f2af2 --- /dev/null +++ b/test/qqtdicttest4/mainwindow.ui @@ -0,0 +1,40 @@ + + + MainWindow + + + + 0 + 0 + 400 + 300 + + + + qqtdicttest4 + + + + + + 0 + 0 + 400 + 17 + + + + + + TopToolBarArea + + + false + + + + + + + + diff --git a/test/qqtdicttest4/qqtdicttest4.pro b/test/qqtdicttest4/qqtdicttest4.pro new file mode 100644 index 00000000..8fb28509 --- /dev/null +++ b/test/qqtdicttest4/qqtdicttest4.pro @@ -0,0 +1,73 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2018-10-06T08:16:10 +# +#------------------------------------------------- + +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = qqtdicttest4 +TEMPLATE = app + +# The following define makes your compiler emit warnings if you use +# any feature of Qt which has been marked as deprecated (the exact warnings +# depend on your compiler). Please consult the documentation of the +# deprecated API in order to know how to port your code away from it. +DEFINES += QT_DEPRECATED_WARNINGS + +# You can also make your code fail to compile if you use deprecated APIs. +# In order to do so, uncomment the following line. +# You can also select to disable deprecated APIs only up to a certain version of Qt. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + + +SOURCES += \ + main.cpp \ + mainwindow.cpp + +HEADERS += \ + mainwindow.h + +FORMS += \ + mainwindow.ui + +include($${PWD}/../../multi-link/add_base_manager.pri) + +#------------------------------------------------- +#用户工程配置 +#------------------------------------------------- +add_version(1,0,0,0) +add_deploy() +add_deploy_config($${PWD}/AppRoot) +add_dependent_manager(QQt) +system(touch main.cpp) + +#------------------------------------------------- +#用户工程配置 +#------------------------------------------------- +equals(QSYS_PRIVATE, macOS) { + CONFIG += app_bundle +} + +contains(QSYS_PRIVATE, Android|AndroidX86) { + CONFIG += mobility + MOBILITY = + DISTFILES += \ + android/AndroidManifest.xml + + ANDROID_PACKAGE_SOURCE_DIR = $${PWD}/android +} + +message ($${TARGET} config $${CONFIG}) +message ($${TARGET} DEFINE $${DEFINES}) +message ($${TARGET} prelink $${QMAKE_PRE_LINK}) +message ($${TARGET} postlink $${QMAKE_POST_LINK}) + +add_file(AppRoot/a.xml) +add_file(AppRoot/b.xml) +add_file(AppRoot/c.xml) +OTHER_FILES += AppRoot/a.xml +OTHER_FILES += AppRoot/b.xml +OTHER_FILES += AppRoot/c.xml