diff options
-rw-r--r-- | QtDemo/QtDemo.pro | 27 | ||||
-rw-r--r-- | QtDemo/deployment.pri | 27 | ||||
-rw-r--r-- | QtDemo/main.cpp | 13 | ||||
-rw-r--r-- | QtDemo/qml.qrc (renamed from QtDemo/resources.qrc) | 443 | ||||
-rw-r--r-- | QtDemo/shaderfilereader.cpp | 21 | ||||
-rw-r--r-- | QtDemo/shaderfilereader.h | 3 |
6 files changed, 268 insertions, 266 deletions
diff --git a/QtDemo/QtDemo.pro b/QtDemo/QtDemo.pro index eecd1fa..3c376ff 100644 --- a/QtDemo/QtDemo.pro +++ b/QtDemo/QtDemo.pro @@ -1,23 +1,22 @@ -# Additional import path used to resolve QML modules in Creator's code model -QML_IMPORT_PATH = +TEMPLATE = app -# If your application uses the Qt Mobility libraries, uncomment the following -# lines and add the respective components to the MOBILITY variable. -# CONFIG += mobility -# MOBILITY += +QT += qml quick xmlpatterns sql svg multimedia -# The .cpp file which was generated for your project. Feel free to hack it. HEADERS += shaderfilereader.h -SOURCES += main.cpp shaderfilereader.cpp -# Please do not modify the following two lines. Required for deployment. -include(qtquick2applicationviewer/qtquick2applicationviewer.pri) -qtcAddDeployment() +SOURCES += main.cpp \ + shaderfilereader.cpp + +RESOURCES += qml.qrc + +# Additional import path used to resolve QML modules in Qt Creator's code model +QML_IMPORT_PATH = -QT += multimedia +# Default rules for deployment. +include(deployment.pri) QTPLUGIN += qsqlite -RESOURCES += \ - resources.qrc +OTHER_FILES += \ + android/AndroidManifest.xml ios: QMAKE_INFO_PLIST = ios/iosInfo.plist diff --git a/QtDemo/deployment.pri b/QtDemo/deployment.pri new file mode 100644 index 0000000..5441b63 --- /dev/null +++ b/QtDemo/deployment.pri @@ -0,0 +1,27 @@ +android-no-sdk { + target.path = /data/user/qt + export(target.path) + INSTALLS += target +} else:android { + x86 { + target.path = /libs/x86 + } else: armeabi-v7a { + target.path = /libs/armeabi-v7a + } else { + target.path = /libs/armeabi + } + export(target.path) + INSTALLS += target +} else:unix { + isEmpty(target.path) { + qnx { + target.path = /tmp/$${TARGET}/bin + } else { + target.path = /opt/$${TARGET}/bin + } + export(target.path) + } + INSTALLS += target +} + +export(INSTALLS) diff --git a/QtDemo/main.cpp b/QtDemo/main.cpp index f63986e..5accb61 100644 --- a/QtDemo/main.cpp +++ b/QtDemo/main.cpp @@ -1,5 +1,5 @@ -#include <QtGui/QGuiApplication> -#include "qtquick2applicationviewer.h" +#include <QGuiApplication> +#include <QQmlApplicationEngine> #include <QQmlContext> #include "shaderfilereader.h" @@ -7,12 +7,11 @@ int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); - QtQuick2ApplicationViewer viewer; - viewer.setSource(QUrl("qrc:/qml/QtDemo/main.qml")); - viewer.showExpanded(); - ShaderFileReader fileReader; - viewer.rootContext()->setContextProperty("shaderFileReader", &fileReader); + + QQmlApplicationEngine engine; + engine.rootContext()->setContextProperty("shaderFileReader", &fileReader); + engine.load(QUrl(QStringLiteral("qrc:///qml/QtDemo/main.qml"))); return app.exec(); } diff --git a/QtDemo/resources.qrc b/QtDemo/qml.qrc index f90e7d1..aa6a0c0 100644 --- a/QtDemo/resources.qrc +++ b/QtDemo/qml.qrc @@ -1,24 +1,5 @@ <RCC> <qresource prefix="/"> - <file>qml/QtDemo/demos/shaders/shaders/billboard.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/blackandwhite.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/emboss.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/gaussianblur_h.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/gaussianblur_v.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/glow.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/isolate.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/pixelate.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/posterize.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/ripple.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/selectionpanel.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/sepia.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/sharpen.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/shockwave.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/sobeledgedetection1.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/toon.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/vignette.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/warhol.fsh</file> - <file>qml/QtDemo/demos/shaders/shaders/wobble.fsh</file> <file>qml/QtDemo/Button.qml</file> <file>qml/QtDemo/Cloud.qml</file> <file>qml/QtDemo/DialogButton.qml</file> @@ -29,58 +10,13 @@ <file>qml/QtDemo/IslandElementContainer.qml</file> <file>qml/QtDemo/main.qml</file> <file>qml/QtDemo/NavigationPanel.qml</file> - <file>qml/QtDemo/QtLogo.png</file> <file>qml/QtDemo/QuitDialog.qml</file> <file>qml/QtDemo/Slide.qml</file> <file>qml/QtDemo/SplashScreen.qml</file> - <file>qml/QtDemo/style.js</file> <file>qml/QtDemo/WorldCanvas.qml</file> <file>qml/QtDemo/WorldMouseArea.qml</file> - <file>qml/QtDemo/images/box_open.png</file> - <file>qml/QtDemo/images/box.png</file> - <file>qml/QtDemo/images/btn_help.png</file> - <file>qml/QtDemo/images/btn_home.png</file> - <file>qml/QtDemo/images/btn_next.png</file> - <file>qml/QtDemo/images/btn_previous.png</file> - <file>qml/QtDemo/images/car_device.png</file> - <file>qml/QtDemo/images/character0.png</file> - <file>qml/QtDemo/images/character1.png</file> - <file>qml/QtDemo/images/character2.png</file> - <file>qml/QtDemo/images/character3.png</file> - <file>qml/QtDemo/images/character4.png</file> - <file>qml/QtDemo/images/character5.png</file> - <file>qml/QtDemo/images/character6.png</file> - <file>qml/QtDemo/images/character7.png</file> - <file>qml/QtDemo/images/character8.png</file> - <file>qml/QtDemo/images/character9.png</file> - <file>qml/QtDemo/images/character10.png</file> - <file>qml/QtDemo/images/cloud1.png</file> - <file>qml/QtDemo/images/cloud2.png</file> - <file>qml/QtDemo/images/hand.png</file> - <file>qml/QtDemo/images/highlight_mask.png</file> - <file>qml/QtDemo/images/island.png</file> - <file>qml/QtDemo/images/laptop1.png</file> - <file>qml/QtDemo/images/laptop2.png</file> - <file>qml/QtDemo/images/man1.png</file> - <file>qml/QtDemo/images/medical_device.png</file> - <file>qml/QtDemo/images/mountain.png</file> - <file>qml/QtDemo/images/particle-smoke.png</file> - <file>qml/QtDemo/images/phone1.png</file> - <file>qml/QtDemo/images/phone2.png</file> - <file>qml/QtDemo/images/phone3.png</file> - <file>qml/QtDemo/images/stones.png</file> - <file>qml/QtDemo/images/tablet1.png</file> - <file>qml/QtDemo/images/tree1.png</file> - <file>qml/QtDemo/images/tree2.png</file> - <file>qml/QtDemo/images/tv.png</file> - <file>qml/QtDemo/fonts/OFL.txt</file> - <file>qml/QtDemo/fonts/PatrickHandSC-Regular.ttf</file> - <file>qml/QtDemo/demos/calqlatr/Calqlatr.qml</file> - <file>qml/QtDemo/demos/calqlatr/content/Button.qml</file> - <file>qml/QtDemo/demos/calqlatr/content/calculator.js</file> - <file>qml/QtDemo/demos/calqlatr/content/Display.qml</file> - <file>qml/QtDemo/demos/calqlatr/content/NumberPad.qml</file> - <file>qml/QtDemo/demos/calqlatr/content/StyleLabel.qml</file> + <file>qml/QtDemo/QtLogo.png</file> + <file>qml/QtDemo/style.js</file> <file>qml/QtDemo/demos/calqlatr/content/audio/touch.wav</file> <file>qml/QtDemo/demos/calqlatr/content/images/icon-back.png</file> <file>qml/QtDemo/demos/calqlatr/content/images/icon-close.png</file> @@ -93,59 +29,64 @@ <file>qml/QtDemo/demos/calqlatr/content/images/settings-selected-b.png</file> <file>qml/QtDemo/demos/calqlatr/content/images/touch-green.png</file> <file>qml/QtDemo/demos/calqlatr/content/images/touch-white.png</file> - <file>qml/QtDemo/demos/maroon/Maroon.qml</file> - <file>qml/QtDemo/demos/maroon/content/BuildButton.qml</file> - <file>qml/QtDemo/demos/maroon/content/GameCanvas.qml</file> - <file>qml/QtDemo/demos/maroon/content/GameOverScreen.qml</file> - <file>qml/QtDemo/demos/maroon/content/InfoBar.qml</file> - <file>qml/QtDemo/demos/maroon/content/logic.js</file> - <file>qml/QtDemo/demos/maroon/content/NewGameScreen.qml</file> - <file>qml/QtDemo/demos/maroon/content/SoundEffect.qml</file> + <file>qml/QtDemo/demos/calqlatr/content/Button.qml</file> + <file>qml/QtDemo/demos/calqlatr/content/calculator.js</file> + <file>qml/QtDemo/demos/calqlatr/content/Display.qml</file> + <file>qml/QtDemo/demos/calqlatr/content/NumberPad.qml</file> + <file>qml/QtDemo/demos/calqlatr/content/StyleLabel.qml</file> + <file>qml/QtDemo/demos/calqlatr/Calqlatr.qml</file> + <file>qml/QtDemo/demos/canvasclock/canvasClock.qml</file> + <file>qml/QtDemo/demos/gridrssnews/main.qml</file> + <file>qml/QtDemo/demos/gridrssnews/RssDelegate.qml</file> + <file>qml/QtDemo/demos/gridrssnews/ScrollBar.qml</file> + <file>qml/QtDemo/demos/heartmonitor/heart.png</file> + <file>qml/QtDemo/demos/heartmonitor/HeartData.js</file> + <file>qml/QtDemo/demos/heartmonitor/main.qml</file> <file>qml/QtDemo/demos/maroon/content/audio/bomb-action.wav</file> - <file>qml/QtDemo/demos/maroon/content/audio/catch-action.wav</file> <file>qml/QtDemo/demos/maroon/content/audio/catch.wav</file> + <file>qml/QtDemo/demos/maroon/content/audio/catch-action.wav</file> <file>qml/QtDemo/demos/maroon/content/audio/currency.wav</file> <file>qml/QtDemo/demos/maroon/content/audio/factory-action.wav</file> <file>qml/QtDemo/demos/maroon/content/audio/melee-action.wav</file> <file>qml/QtDemo/demos/maroon/content/audio/projectile-action.wav</file> <file>qml/QtDemo/demos/maroon/content/audio/shooter-action.wav</file> <file>qml/QtDemo/demos/maroon/content/gfx/background.png</file> + <file>qml/QtDemo/demos/maroon/content/gfx/bomb.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/bomb-action.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/bomb-idle.png</file> - <file>qml/QtDemo/demos/maroon/content/gfx/bomb.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/button-help.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/button-play.png</file> - <file>qml/QtDemo/demos/maroon/content/gfx/catch-action.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/catch.png</file> + <file>qml/QtDemo/demos/maroon/content/gfx/catch-action.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/cloud.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/currency.png</file> + <file>qml/QtDemo/demos/maroon/content/gfx/dialog.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/dialog-bomb.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/dialog-factory.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/dialog-melee.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/dialog-pointer.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/dialog-shooter.png</file> - <file>qml/QtDemo/demos/maroon/content/gfx/dialog.png</file> + <file>qml/QtDemo/demos/maroon/content/gfx/factory.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/factory-action.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/factory-idle.png</file> - <file>qml/QtDemo/demos/maroon/content/gfx/factory.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/grid.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/help.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/lifes.png</file> + <file>qml/QtDemo/demos/maroon/content/gfx/logo.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/logo-bubble.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/logo-fish.png</file> - <file>qml/QtDemo/demos/maroon/content/gfx/logo.png</file> + <file>qml/QtDemo/demos/maroon/content/gfx/melee.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/melee-action.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/melee-idle.png</file> - <file>qml/QtDemo/demos/maroon/content/gfx/melee.png</file> - <file>qml/QtDemo/demos/maroon/content/gfx/mob-idle.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/mob.png</file> + <file>qml/QtDemo/demos/maroon/content/gfx/mob-idle.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/points.png</file> - <file>qml/QtDemo/demos/maroon/content/gfx/projectile-action.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/projectile.png</file> + <file>qml/QtDemo/demos/maroon/content/gfx/projectile-action.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/scores.png</file> + <file>qml/QtDemo/demos/maroon/content/gfx/shooter.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/shooter-action.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/shooter-idle.png</file> - <file>qml/QtDemo/demos/maroon/content/gfx/shooter.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/sunlight.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/text-1.png</file> <file>qml/QtDemo/demos/maroon/content/gfx/text-2.png</file> @@ -160,159 +101,53 @@ <file>qml/QtDemo/demos/maroon/content/towers/Melee.qml</file> <file>qml/QtDemo/demos/maroon/content/towers/Ranged.qml</file> <file>qml/QtDemo/demos/maroon/content/towers/TowerBase.qml</file> - <file>qml/QtDemo/demos/gridrssnews/RssDelegate.qml</file> - <file>qml/QtDemo/demos/gridrssnews/ScrollBar.qml</file> - <file>qml/QtDemo/demos/gridrssnews/main.qml</file> - <file>qml/QtDemo/demos/rssnews/rssnews.qml</file> - <file>qml/QtDemo/demos/rssnews/rssnews.qmlproject</file> - <file>qml/QtDemo/demos/rssnews/content/RssFeeds.qml</file> - <file>qml/QtDemo/demos/rssnews/content/ScrollBar.qml</file> - <file>qml/QtDemo/demos/rssnews/content/BusyIndicator.qml</file> - <file>qml/QtDemo/demos/rssnews/content/CategoryDelegate.qml</file> - <file>qml/QtDemo/demos/rssnews/content/NewsDelegate.qml</file> - <file>qml/QtDemo/demos/rssnews/content/images/busy.png</file> - <file>qml/QtDemo/demos/rssnews/content/images/scrollbar.png</file> + <file>qml/QtDemo/demos/maroon/content/BuildButton.qml</file> + <file>qml/QtDemo/demos/maroon/content/GameCanvas.qml</file> + <file>qml/QtDemo/demos/maroon/content/GameOverScreen.qml</file> + <file>qml/QtDemo/demos/maroon/content/InfoBar.qml</file> + <file>qml/QtDemo/demos/maroon/content/logic.js</file> + <file>qml/QtDemo/demos/maroon/content/NewGameScreen.qml</file> + <file>qml/QtDemo/demos/maroon/content/SoundEffect.qml</file> + <file>qml/QtDemo/demos/maroon/Maroon.qml</file> + <file>qml/QtDemo/demos/particledemo/BootScreenDemo.qml</file> <file>qml/QtDemo/demos/particledemo/particledemo.qml</file> - <file>qml/QtDemo/demos/particledemo/particle.png</file> <file>qml/QtDemo/demos/particledemo/ParticleSysComponent.qml</file> - <file>qml/QtDemo/demos/particledemo/BootScreenDemo.qml</file> - <file>qml/QtDemo/demos/particledemo/images/particle.png</file> - <file>qml/QtDemo/demos/particledemo/images/qt-logo-green-mask.png</file> - <file>qml/QtDemo/demos/particledemo/images/particle_star.png</file> - <file>qml/QtDemo/demos/particledemo/images/qt-logo-white-mask.png</file> - <file>qml/QtDemo/demos/touchgallery/images/toolbar.png</file> - <file>qml/QtDemo/demos/touchgallery/images/tab_selected.png</file> - <file>qml/QtDemo/demos/touchgallery/images/button_pressed.png</file> - <file>qml/QtDemo/demos/touchgallery/images/button_default.png</file> - <file>qml/QtDemo/demos/touchgallery/images/navigation_previous_item.png</file> - <file>qml/QtDemo/demos/touchgallery/images/navigation_next_item.png</file> - <file>qml/QtDemo/demos/touchgallery/images/NOTICE.txt</file> - <file>qml/QtDemo/demos/touchgallery/images/textinput.png</file> - <file>qml/QtDemo/demos/touchgallery/images/tabs_standard.png</file> - <file>qml/QtDemo/demos/touchgallery/content/AndroidDelegate.qml</file> - <file>qml/QtDemo/demos/touchgallery/content/TabBarPage.qml</file> - <file>qml/QtDemo/demos/touchgallery/content/ProgressBarPage.qml</file> - <file>qml/QtDemo/demos/touchgallery/content/TextInputPage.qml</file> - <file>qml/QtDemo/demos/touchgallery/content/ButtonPage.qml</file> - <file>qml/QtDemo/demos/touchgallery/content/SliderPage.qml</file> - <file>qml/QtDemo/demos/touchgallery/content/CustomAppWindow.qml</file> - <file>qml/QtDemo/demos/touchgallery/main.qml</file> - <file>qml/QtDemo/demos/radio/VolumeButton.qml</file> + <file>qml/QtDemo/demos/photosurface/photosurface.qml</file> <file>qml/QtDemo/demos/radio/radio.qml</file> - <file>qml/QtDemo/demos/radio/images/radio_btn_play.png</file> - <file>qml/QtDemo/demos/radio/images/radio_btn_pause.png</file> - <file>qml/QtDemo/demos/radio/images/volume.png</file> - <file>qml/QtDemo/demos/radio/images/radio_btn_stop.png</file> - <file>qml/QtDemo/demos/radio/images/radio_sound_icon.png</file> - <file>qml/QtDemo/demos/radio/channels.xml</file> + <file>qml/QtDemo/demos/radio/VolumeButton.qml</file> <file>qml/QtDemo/demos/radio/VolumePoint.qml</file> - <file>qml/QtDemo/demos/canvasclock/canvasClock.qml</file> - <file>qml/QtDemo/demos/heartmonitor/HeartData.js</file> - <file>qml/QtDemo/demos/heartmonitor/heart.png</file> - <file>qml/QtDemo/demos/heartmonitor/main.qml</file> - <file>qml/QtDemo/demos/video/qt5_video_simon.png</file> - <file>qml/QtDemo/demos/video/qt5_video_lars.png</file> - <file>qml/QtDemo/demos/video/qt5_video_samuel.png</file> - <file>qml/QtDemo/demos/video/ControlBar.qml</file> - <file>qml/QtDemo/demos/video/PlaybackControl.qml</file> - <file>qml/QtDemo/demos/video/qt5_videos.xml</file> - <file>qml/QtDemo/demos/video/Slider.qml</file> - <file>qml/QtDemo/demos/video/ImageButton.qml</file> - <file>qml/QtDemo/demos/video/ScrollBar.qml</file> - <file>qml/QtDemo/demos/video/SeekControl.qml</file> - <file>qml/QtDemo/demos/video/VolumeControl.qml</file> - <file>qml/QtDemo/demos/video/VideoDelegate.qml</file> - <file>qml/QtDemo/demos/video/ContentVideo.qml</file> - <file>qml/QtDemo/demos/video/images/VolumeDown.png</file> - <file>qml/QtDemo/demos/video/images/RateButtonReverse.png</file> - <file>qml/QtDemo/demos/video/images/PlayButton.png</file> - <file>qml/QtDemo/demos/video/images/VolumeUp.png</file> - <file>qml/QtDemo/demos/video/images/PauseButton.png</file> - <file>qml/QtDemo/demos/video/images/CloseButton.png</file> - <file>qml/QtDemo/demos/video/images/StopButton.png</file> - <file>qml/QtDemo/demos/video/images/RateButtonForward.png</file> - <file>qml/QtDemo/demos/video/qt5_video_jens.png</file> - <file>qml/QtDemo/demos/video/qt5_video_kenneth.png</file> - <file>qml/QtDemo/demos/video/Content.qml</file> - <file>qml/QtDemo/demos/video/main.qml</file> - <file>qml/QtDemo/demos/video/VideoSelector.qml</file> - <file>qml/QtDemo/demos/video/qt5_video_thiago.png</file> - <file>qml/QtDemo/demos/samegame/samegame.qrc</file> - <file>qml/QtDemo/demos/samegame/samegame.qml</file> - <file>qml/QtDemo/demos/samegame/settings.js</file> - <file>qml/QtDemo/demos/samegame/content/Button.qml</file> - <file>qml/QtDemo/demos/samegame/content/Block.qml</file> - <file>qml/QtDemo/demos/samegame/content/PuzzleBlock.qml</file> - <file>qml/QtDemo/demos/samegame/content/SamegameText.qml</file> - <file>qml/QtDemo/demos/samegame/content/LogoAnimation.qml</file> - <file>qml/QtDemo/demos/samegame/content/gfx/logo-m.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/text-p2-won.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/but-game-1.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/text-highscore.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/but-game-3.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/background.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/text-no-winner.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/blue.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/yellow.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/icon-fail.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/logo-a.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/red-puzzle.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/text-p2-go.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/particle-brick.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/particle-paint.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/particle-smoke.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/logo-g.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/logo.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/icon-time.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/text-highscore-new.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/background-puzzle.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/text-p2.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/text-p1-won.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/blue-puzzle.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/text-p1.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/but-quit.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/logo-s.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/yellow-puzzle.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/bubble-puzzle.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/bubble-highscore.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/logo-e.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/green.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/but-game-2.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/but-game-4.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/but-puzzle-next.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/green-puzzle.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/icon-ok.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/but-game-new.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/text-p1-go.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/but-menu.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/red.png</file> - <file>qml/QtDemo/demos/samegame/content/gfx/bar.png</file> - <file>qml/QtDemo/demos/samegame/content/PrimaryPack.qml</file> - <file>qml/QtDemo/demos/samegame/content/SimpleBlock.qml</file> - <file>qml/QtDemo/demos/samegame/content/levels/level3.qml</file> - <file>qml/QtDemo/demos/samegame/content/levels/level8.qml</file> - <file>qml/QtDemo/demos/samegame/content/levels/level7.qml</file> + <file>qml/QtDemo/demos/rssnews/content/BusyIndicator.qml</file> + <file>qml/QtDemo/demos/rssnews/content/CategoryDelegate.qml</file> + <file>qml/QtDemo/demos/rssnews/content/NewsDelegate.qml</file> + <file>qml/QtDemo/demos/rssnews/content/RssFeeds.qml</file> + <file>qml/QtDemo/demos/rssnews/content/ScrollBar.qml</file> + <file>qml/QtDemo/demos/rssnews/rssnews.qml</file> <file>qml/QtDemo/demos/samegame/content/levels/level0.qml</file> <file>qml/QtDemo/demos/samegame/content/levels/level1.qml</file> - <file>qml/QtDemo/demos/samegame/content/levels/level6.qml</file> + <file>qml/QtDemo/demos/samegame/content/levels/level2.qml</file> + <file>qml/QtDemo/demos/samegame/content/levels/level3.qml</file> <file>qml/QtDemo/demos/samegame/content/levels/level4.qml</file> + <file>qml/QtDemo/demos/samegame/content/levels/level5.qml</file> + <file>qml/QtDemo/demos/samegame/content/levels/level6.qml</file> + <file>qml/QtDemo/demos/samegame/content/levels/level7.qml</file> + <file>qml/QtDemo/demos/samegame/content/levels/level8.qml</file> <file>qml/QtDemo/demos/samegame/content/levels/level9.qml</file> - <file>qml/QtDemo/demos/samegame/content/levels/level2.qml</file> <file>qml/QtDemo/demos/samegame/content/levels/TemplateBase.qml</file> - <file>qml/QtDemo/demos/samegame/content/levels/level5.qml</file> - <file>qml/QtDemo/demos/samegame/content/samegame.js</file> + <file>qml/QtDemo/demos/samegame/content/Block.qml</file> + <file>qml/QtDemo/demos/samegame/content/BlockEmitter.qml</file> + <file>qml/QtDemo/demos/samegame/content/Button.qml</file> <file>qml/QtDemo/demos/samegame/content/GameArea.qml</file> + <file>qml/QtDemo/demos/samegame/content/LogoAnimation.qml</file> <file>qml/QtDemo/demos/samegame/content/MenuEmitter.qml</file> <file>qml/QtDemo/demos/samegame/content/PaintEmitter.qml</file> - <file>qml/QtDemo/demos/samegame/content/BlockEmitter.qml</file> + <file>qml/QtDemo/demos/samegame/content/PrimaryPack.qml</file> + <file>qml/QtDemo/demos/samegame/content/PuzzleBlock.qml</file> + <file>qml/QtDemo/demos/samegame/content/samegame.js</file> + <file>qml/QtDemo/demos/samegame/content/SamegameText.qml</file> + <file>qml/QtDemo/demos/samegame/content/SimpleBlock.qml</file> <file>qml/QtDemo/demos/samegame/content/SmokeText.qml</file> - <file>qml/QtDemo/demos/photosurface/images/qml-photosurface-example-small.png</file> - <file>qml/QtDemo/demos/photosurface/images/image4.png</file> - <file>qml/QtDemo/demos/photosurface/images/image2.png</file> - <file>qml/QtDemo/demos/photosurface/images/image0.png</file> - <file>qml/QtDemo/demos/photosurface/images/image1.png</file> - <file>qml/QtDemo/demos/photosurface/images/image3.png</file> - <file>qml/QtDemo/demos/photosurface/photosurface.qml</file> + <file>qml/QtDemo/demos/samegame/samegame.qml</file> + <file>qml/QtDemo/demos/samegame/settings.js</file> <file>qml/QtDemo/demos/shaders/Effects/Effect.qml</file> <file>qml/QtDemo/demos/shaders/Effects/EffectBillboard.qml</file> <file>qml/QtDemo/demos/shaders/Effects/EffectBlackAndWhite.qml</file> @@ -339,8 +174,168 @@ <file>qml/QtDemo/demos/shaders/main.qml</file> <file>qml/QtDemo/demos/shaders/ParameterPanel.qml</file> <file>qml/QtDemo/demos/shaders/Slider.qml</file> + <file>qml/QtDemo/demos/touchgallery/content/AndroidDelegate.qml</file> + <file>qml/QtDemo/demos/touchgallery/content/ButtonPage.qml</file> + <file>qml/QtDemo/demos/touchgallery/content/CustomAppWindow.qml</file> + <file>qml/QtDemo/demos/touchgallery/content/ProgressBarPage.qml</file> + <file>qml/QtDemo/demos/touchgallery/content/SliderPage.qml</file> + <file>qml/QtDemo/demos/touchgallery/content/TabBarPage.qml</file> + <file>qml/QtDemo/demos/touchgallery/content/TextInputPage.qml</file> + <file>qml/QtDemo/demos/touchgallery/main.qml</file> + <file>qml/QtDemo/demos/video/Content.qml</file> + <file>qml/QtDemo/demos/video/ContentVideo.qml</file> + <file>qml/QtDemo/demos/video/ControlBar.qml</file> + <file>qml/QtDemo/demos/video/ImageButton.qml</file> + <file>qml/QtDemo/demos/video/main.qml</file> + <file>qml/QtDemo/demos/video/PlaybackControl.qml</file> + <file>qml/QtDemo/demos/video/ScrollBar.qml</file> + <file>qml/QtDemo/demos/video/SeekControl.qml</file> + <file>qml/QtDemo/demos/video/Slider.qml</file> + <file>qml/QtDemo/demos/video/VideoDelegate.qml</file> + <file>qml/QtDemo/demos/video/VideoSelector.qml</file> + <file>qml/QtDemo/demos/video/VolumeControl.qml</file> + <file>qml/QtDemo/fonts/OFL.txt</file> + <file>qml/QtDemo/fonts/PatrickHandSC-Regular.ttf</file> + <file>qml/QtDemo/images/box.png</file> + <file>qml/QtDemo/images/box_open.png</file> + <file>qml/QtDemo/images/btn_help.png</file> + <file>qml/QtDemo/images/btn_home.png</file> + <file>qml/QtDemo/images/btn_next.png</file> + <file>qml/QtDemo/images/btn_previous.png</file> + <file>qml/QtDemo/images/car_device.png</file> + <file>qml/QtDemo/images/character0.png</file> + <file>qml/QtDemo/images/character1.png</file> + <file>qml/QtDemo/images/character2.png</file> + <file>qml/QtDemo/images/character3.png</file> + <file>qml/QtDemo/images/character4.png</file> + <file>qml/QtDemo/images/character5.png</file> + <file>qml/QtDemo/images/character6.png</file> + <file>qml/QtDemo/images/character7.png</file> + <file>qml/QtDemo/images/character8.png</file> + <file>qml/QtDemo/images/character9.png</file> + <file>qml/QtDemo/images/character10.png</file> + <file>qml/QtDemo/images/cloud1.png</file> + <file>qml/QtDemo/images/cloud2.png</file> + <file>qml/QtDemo/images/hand.png</file> + <file>qml/QtDemo/images/highlight_mask.png</file> + <file>qml/QtDemo/images/island.png</file> + <file>qml/QtDemo/images/laptop1.png</file> + <file>qml/QtDemo/images/laptop2.png</file> + <file>qml/QtDemo/images/man1.png</file> + <file>qml/QtDemo/images/medical_device.png</file> + <file>qml/QtDemo/images/mountain.png</file> + <file>qml/QtDemo/images/particle-smoke.png</file> + <file>qml/QtDemo/images/phone1.png</file> + <file>qml/QtDemo/images/phone2.png</file> + <file>qml/QtDemo/images/phone3.png</file> + <file>qml/QtDemo/images/stones.png</file> + <file>qml/QtDemo/images/tablet1.png</file> + <file>qml/QtDemo/images/tree1.png</file> + <file>qml/QtDemo/images/tree2.png</file> + <file>qml/QtDemo/images/tv.png</file> + <file>qml/QtDemo/demos/photosurface/images/image0.png</file> + <file>qml/QtDemo/demos/photosurface/images/image1.png</file> + <file>qml/QtDemo/demos/photosurface/images/image2.png</file> + <file>qml/QtDemo/demos/photosurface/images/image3.png</file> + <file>qml/QtDemo/demos/photosurface/images/image4.png</file> + <file>qml/QtDemo/demos/photosurface/images/qml-photosurface-example-small.png</file> + <file>qml/QtDemo/demos/particledemo/images/particle.png</file> + <file>qml/QtDemo/demos/particledemo/images/particle_star.png</file> + <file>qml/QtDemo/demos/particledemo/images/qt-logo-green-mask.png</file> + <file>qml/QtDemo/demos/particledemo/images/qt-logo-white-mask.png</file> + <file>qml/QtDemo/demos/radio/images/radio_btn_pause.png</file> + <file>qml/QtDemo/demos/radio/images/radio_btn_play.png</file> + <file>qml/QtDemo/demos/radio/images/radio_btn_stop.png</file> + <file>qml/QtDemo/demos/radio/images/radio_sound_icon.png</file> + <file>qml/QtDemo/demos/radio/images/volume.png</file> + <file>qml/QtDemo/demos/rssnews/content/images/busy.png</file> + <file>qml/QtDemo/demos/rssnews/content/images/scrollbar.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/background.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/background-puzzle.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/bar.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/blue.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/blue-puzzle.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/bubble-highscore.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/bubble-puzzle.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/but-game-1.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/but-game-2.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/but-game-3.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/but-game-4.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/but-game-new.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/but-menu.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/but-puzzle-next.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/but-quit.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/green.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/green-puzzle.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/icon-fail.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/icon-ok.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/icon-time.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/logo.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/logo-a.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/logo-e.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/logo-g.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/logo-m.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/logo-s.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/particle-brick.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/particle-paint.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/particle-smoke.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/red.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/red-puzzle.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/text-highscore.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/text-highscore-new.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/text-no-winner.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/text-p1.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/text-p1-go.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/text-p1-won.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/text-p2.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/text-p2-go.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/text-p2-won.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/yellow.png</file> + <file>qml/QtDemo/demos/samegame/content/gfx/yellow-puzzle.png</file> <file>qml/QtDemo/demos/shaders/images/particle-smoke.png</file> <file>qml/QtDemo/demos/shaders/images/qt-logo.png</file> <file>qml/QtDemo/demos/shaders/images/wallpaper.png</file> + <file>qml/QtDemo/demos/particledemo/particle.png</file> + <file>qml/QtDemo/demos/touchgallery/images/button_default.png</file> + <file>qml/QtDemo/demos/touchgallery/images/button_pressed.png</file> + <file>qml/QtDemo/demos/touchgallery/images/navigation_next_item.png</file> + <file>qml/QtDemo/demos/touchgallery/images/navigation_previous_item.png</file> + <file>qml/QtDemo/demos/touchgallery/images/tab_selected.png</file> + <file>qml/QtDemo/demos/touchgallery/images/tabs_standard.png</file> + <file>qml/QtDemo/demos/touchgallery/images/textinput.png</file> + <file>qml/QtDemo/demos/touchgallery/images/toolbar.png</file> + <file>qml/QtDemo/demos/video/images/CloseButton.png</file> + <file>qml/QtDemo/demos/video/images/PauseButton.png</file> + <file>qml/QtDemo/demos/video/images/PlayButton.png</file> + <file>qml/QtDemo/demos/video/images/RateButtonForward.png</file> + <file>qml/QtDemo/demos/video/images/RateButtonReverse.png</file> + <file>qml/QtDemo/demos/video/images/StopButton.png</file> + <file>qml/QtDemo/demos/video/images/VolumeDown.png</file> + <file>qml/QtDemo/demos/video/images/VolumeUp.png</file> + <file>qml/QtDemo/demos/video/qt5_video_jens.png</file> + <file>qml/QtDemo/demos/video/qt5_video_kenneth.png</file> + <file>qml/QtDemo/demos/video/qt5_video_lars.png</file> + <file>qml/QtDemo/demos/video/qt5_video_samuel.png</file> + <file>qml/QtDemo/demos/video/qt5_video_simon.png</file> + <file>qml/QtDemo/demos/video/qt5_video_thiago.png</file> + <file>qml/QtDemo/demos/shaders/shaders/billboard.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/blackandwhite.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/emboss.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/gaussianblur_h.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/gaussianblur_v.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/glow.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/isolate.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/pixelate.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/posterize.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/ripple.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/selectionpanel.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/sepia.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/sharpen.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/shockwave.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/sobeledgedetection1.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/toon.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/vignette.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/warhol.fsh</file> + <file>qml/QtDemo/demos/shaders/shaders/wobble.fsh</file> </qresource> </RCC> diff --git a/QtDemo/shaderfilereader.cpp b/QtDemo/shaderfilereader.cpp index 2a4677b..e394682 100644 --- a/QtDemo/shaderfilereader.cpp +++ b/QtDemo/shaderfilereader.cpp @@ -1,34 +1,15 @@ #include "shaderfilereader.h" -#include <QtCore/QCoreApplication> #include <QtCore/QDir> #include <QtCore/QFile> #include <QtCore/QFileInfo> #include <QtCore/QTextStream> #include <QtCore/QDebug> -QString adjustPath(const QString &path) -{ -#ifdef Q_OS_UNIX -#ifdef Q_OS_MAC - if (!QDir::isAbsolutePath(path)) - return QCoreApplication::applicationDirPath() - + QLatin1String("/../Resources/") + path; -#else - QString pathInInstallDir; - const QString applicationDirPath = QCoreApplication::applicationDirPath(); - pathInInstallDir = QString::fromLatin1("%1/../%2").arg(applicationDirPath, path); - - if (QFileInfo(pathInInstallDir).exists()) - return pathInInstallDir; -#endif -#endif - return path; -} - QString ShaderFileReader::readFile(const QString &fileName) { QString content; QFile file(QString(QStringLiteral(":/%1")).arg(fileName)); + if (file.open(QIODevice::ReadOnly)) { QTextStream stream(&file); content = stream.readAll(); diff --git a/QtDemo/shaderfilereader.h b/QtDemo/shaderfilereader.h index af1bc8c..74b7779 100644 --- a/QtDemo/shaderfilereader.h +++ b/QtDemo/shaderfilereader.h @@ -1,11 +1,12 @@ #ifndef SHADERFILEREADER_H #define SHADERFILEREADER_H -#include <QtCore/QObject> +#include <QObject> class ShaderFileReader : public QObject { Q_OBJECT + public: Q_INVOKABLE QString readFile(const QString &fileName); }; |