# HG changeset patch # User sl # Date 1401203662 -7200 # Node ID 780ee91f4ffba05113ca79af66c764094de1a793 # Parent bc046f5187fdb9b4b1bb07ae4c12f5bdec3f70d1 Creating a quick item for our MiniDisplay. diff -r bc046f5187fd -r 780ee91f4ffb DisplayTab.qml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DisplayTab.qml Tue May 27 17:14:22 2014 +0200 @@ -0,0 +1,16 @@ +import QtQuick 2.2 +import QtQuick.Controls 1.2 +import MiniDisplay 1.0 + +Item { + width: 100 + height: 62 + //SystemPalette { id: palette } + clip: true + + + MiniDisplay { + + } + +} diff -r bc046f5187fd -r 780ee91f4ffb Manager.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Manager.pro Tue May 27 17:14:22 2014 +0200 @@ -0,0 +1,25 @@ +TEMPLATE = app +TARGET = MiniDisplayManager +QT += qml quick widgets + +# Avoid going to debug/release subdirectory +# so that our application will see the +# import path for the MiniDisplay module. +win32: DESTDIR = ./ + +SOURCES += main.cpp + +RESOURCES += \ + qml.qrc + +# Additional import path used to resolve QML modules in Qt Creator's code model +QML_IMPORT_PATH = $$DESTDIR/MiniDisplay + +# Default rules for deployment. +include(deployment.pri) + +OTHER_FILES += \ + FontsTab.qml \ + main.qml \ + TestsTab.qml \ + DisplayTab.qml diff -r bc046f5187fd -r 780ee91f4ffb MiniDisplay/minidisplay.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MiniDisplay/minidisplay.cpp Tue May 27 17:14:22 2014 +0200 @@ -0,0 +1,16 @@ +#include "minidisplay.h" + +MiniDisplay::MiniDisplay(QQuickItem *parent): + QQuickItem(parent) +{ + // By default, QQuickItem does not draw anything. If you subclass + // QQuickItem to create a visual item, you will need to uncomment the + // following line and re-implement updatePaintNode() + + // setFlag(ItemHasContents, true); +} + +MiniDisplay::~MiniDisplay() +{ +} + diff -r bc046f5187fd -r 780ee91f4ffb MiniDisplay/minidisplay.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MiniDisplay/minidisplay.h Tue May 27 17:14:22 2014 +0200 @@ -0,0 +1,17 @@ +#ifndef MINIDISPLAY_H +#define MINIDISPLAY_H + +#include + +class MiniDisplay : public QQuickItem +{ + Q_OBJECT + Q_DISABLE_COPY(MiniDisplay) + +public: + MiniDisplay(QQuickItem *parent = 0); + ~MiniDisplay(); +}; + +#endif // MINIDISPLAY_H + diff -r bc046f5187fd -r 780ee91f4ffb MiniDisplay/minidisplay.pro --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MiniDisplay/minidisplay.pro Tue May 27 17:14:22 2014 +0200 @@ -0,0 +1,44 @@ +TEMPLATE = lib +TARGET = MiniDisplay +QT += qml quick +CONFIG += qt plugin + +#DESTDIR = ../MiniDisplay + +# Avoid going to debug/release subdirectory +# so that our application will see the +# import path for the MiniDisplay module. +win32: DESTDIR = ./ + + +TARGET = $$qtLibraryTarget($$TARGET) +#uri = com.slions.minidisplay +uri = MiniDisplay + +# Input +SOURCES += \ + minidisplay_plugin.cpp \ + minidisplay.cpp + +HEADERS += \ + minidisplay_plugin.h \ + minidisplay.h + +OTHER_FILES = qmldir + +!equals(_PRO_FILE_PWD_, $$OUT_PWD) { + copy_qmldir.target = $$OUT_PWD/qmldir + copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir + copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\" + QMAKE_EXTRA_TARGETS += copy_qmldir + PRE_TARGETDEPS += $$copy_qmldir.target +} + +qmldir.files = qmldir +unix { + installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /) + qmldir.path = $$installPath + target.path = $$installPath + INSTALLS += target qmldir +} + diff -r bc046f5187fd -r 780ee91f4ffb MiniDisplay/minidisplay_plugin.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MiniDisplay/minidisplay_plugin.cpp Tue May 27 17:14:22 2014 +0200 @@ -0,0 +1,12 @@ +#include "minidisplay_plugin.h" +#include "minidisplay.h" + +#include + +void MiniDisplayPlugin::registerTypes(const char *uri) +{ + // @uri com.slions.minidisplay + qmlRegisterType(uri, 1, 0, "MiniDisplay"); +} + + diff -r bc046f5187fd -r 780ee91f4ffb MiniDisplay/minidisplay_plugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MiniDisplay/minidisplay_plugin.h Tue May 27 17:14:22 2014 +0200 @@ -0,0 +1,16 @@ +#ifndef MINIDISPLAY_PLUGIN_H +#define MINIDISPLAY_PLUGIN_H + +#include + +class MiniDisplayPlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") + +public: + void registerTypes(const char *uri); +}; + +#endif // MINIDISPLAY_PLUGIN_H + diff -r bc046f5187fd -r 780ee91f4ffb MiniDisplay/qmldir --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MiniDisplay/qmldir Tue May 27 17:14:22 2014 +0200 @@ -0,0 +1,3 @@ +module MiniDisplay +plugin MiniDisplay + diff -r bc046f5187fd -r 780ee91f4ffb MiniDisplayManager.pro --- a/MiniDisplayManager.pro Tue May 27 13:08:12 2014 +0200 +++ b/MiniDisplayManager.pro Tue May 27 17:14:22 2014 +0200 @@ -1,19 +1,5 @@ -TEMPLATE = app - -QT += qml quick widgets - -SOURCES += main.cpp - -RESOURCES += \ - qml.qrc - -# Additional import path used to resolve QML modules in Qt Creator's code model -QML_IMPORT_PATH = - -# Default rules for deployment. -include(deployment.pri) - -OTHER_FILES += \ - FontsTab.qml \ - main.qml \ - TestsTab.qml +TEMPLATE = subdirs +CONFIG += ordered +SUBDIRS = \ + MiniDisplay \ + Manager.pro diff -r bc046f5187fd -r 780ee91f4ffb MiniDisplayManager.pro.user --- a/MiniDisplayManager.pro.user Tue May 27 13:08:12 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,251 +0,0 @@ - - - - - - ProjectExplorer.Project.ActiveTarget - 0 - - - ProjectExplorer.Project.EditorSettings - - true - false - true - - Cpp - - CppGlobal - - - - QmlJS - - QmlJSGlobal - - - 2 - UTF-8 - false - 4 - false - 80 - true - true - 1 - true - false - 0 - true - 0 - 8 - true - 1 - true - true - true - false - - - - ProjectExplorer.Project.PluginSettings - - - - ProjectExplorer.Project.Target.0 - - Desktop Qt 5.3.0 MSVC2012 OpenGL 32bit - Desktop Qt 5.3.0 MSVC2012 OpenGL 32bit - qt.53.win32_msvc2012_opengl_kit - 0 - 0 - 0 - - D:/Dev/Qt/build-MiniDisplayManager-Desktop_Qt_5_3_0_MSVC2012_OpenGL_32bit-Debug - - - true - qmake - - QtProjectManager.QMakeBuildStep - false - true - - false - - - true - Make - - Qt4ProjectManager.MakeStep - - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - true - Make - - Qt4ProjectManager.MakeStep - - true - clean - - - 1 - Clean - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Debug - - Qt4ProjectManager.Qt4BuildConfiguration - 2 - true - - - D:/Dev/Qt/build-MiniDisplayManager-Desktop_Qt_5_3_0_MSVC2012_OpenGL_32bit-Release - - - true - qmake - - QtProjectManager.QMakeBuildStep - false - true - - false - - - true - Make - - Qt4ProjectManager.MakeStep - - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - true - Make - - Qt4ProjectManager.MakeStep - - true - clean - - - 1 - Clean - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Release - - Qt4ProjectManager.Qt4BuildConfiguration - 0 - true - - 2 - - - 0 - Deploy - - ProjectExplorer.BuildSteps.Deploy - - 1 - Deploy locally - - ProjectExplorer.DefaultDeployConfiguration - - 1 - - - - false - false - false - false - true - 0.01 - 10 - true - 1 - 25 - - 1 - true - false - true - valgrind - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - - 2 - - MiniDisplayManager - MiniDisplayManager2 - Qt4ProjectManager.Qt4RunConfiguration:D:/Dev/slions.net/MiniDisplayManager/MiniDisplayManager.pro - - MiniDisplayManager.pro - false - false - - 3768 - false - true - false - false - true - - 1 - - - - ProjectExplorer.Project.TargetCount - 1 - - - ProjectExplorer.Project.Updater.EnvironmentId - {acc65bd0-f32a-4e5c-a5a8-5fb52e4a9cd9} - - - ProjectExplorer.Project.Updater.FileVersion - 15 - - diff -r bc046f5187fd -r 780ee91f4ffb main.qml --- a/main.qml Tue May 27 13:08:12 2014 +0200 +++ b/main.qml Tue May 27 17:14:22 2014 +0200 @@ -37,7 +37,11 @@ TabView { anchors.fill: parent anchors.margins: 8 - Tab { + Tab { + title: qsTr("Display") + DisplayTab { anchors.fill: parent } + } + Tab { title: qsTr("Fonts") FontsTab { anchors.fill: parent } } diff -r bc046f5187fd -r 780ee91f4ffb qml.qrc --- a/qml.qrc Tue May 27 13:08:12 2014 +0200 +++ b/qml.qrc Tue May 27 17:14:22 2014 +0200 @@ -3,5 +3,6 @@ main.qml FontsTab.qml TestsTab.qml + DisplayTab.qml