Commit 7ccdf8d1 authored by Niels Weber's avatar Niels Weber Committed by The Qt Project
Browse files

Make a pro file based project out of the photoviewer example


Having a .pro file project is necessary to be able to deploy to
Android. Further patches for Android support will be needed, but
this is the base.

Task-number: QTBUG-38122
Change-Id: I878ec1df50d7375ae9153f8a34f763b5678d7774
Reviewed-by: default avatarMika Salmela <mika.salmela@digia.com>
Reviewed-by: default avatarSami Makkonen <sami.makkonen@digia.com>
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent 3ed6361b
dev 5.10 5.11 5.12 5.12.1 5.12.10 5.12.11 5.12.12 5.12.2 5.12.3 5.12.4 5.12.5 5.12.6 5.12.7 5.12.8 5.12.9 5.13 5.13.0 5.13.1 5.13.2 5.14 5.14.0 5.14.1 5.14.2 5.15 5.15.0 5.15.1 5.15.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.9.8 6.0 6.0.0 6.1 6.1.0 6.1.1 6.1.2 6.1.3 6.2 6.2.0 6.2.1 6.2.2 wip/cmake wip/dbus wip/itemviews wip/nacl wip/new-backend wip/pointerhandler wip/propertycache-refactor wip/qquickdeliveryagent wip/scenegraphng wip/tizen wip/webassembly v5.15.0-alpha1 v5.14.1 v5.14.0 v5.14.0-rc2 v5.14.0-rc1 v5.14.0-beta3 v5.14.0-beta2 v5.14.0-beta1 v5.14.0-alpha1 v5.13.2 v5.13.1 v5.13.0 v5.13.0-rc3 v5.13.0-rc2 v5.13.0-rc1 v5.13.0-beta4 v5.13.0-beta3 v5.13.0-beta2 v5.13.0-beta1 v5.13.0-alpha1 v5.12.7 v5.12.6 v5.12.5 v5.12.4 v5.12.3 v5.12.2 v5.12.1 v5.12.0 v5.12.0-rc2 v5.12.0-rc1 v5.12.0-beta4 v5.12.0-beta3 v5.12.0-beta2 v5.12.0-beta1 v5.12.0-alpha1 v5.11.3 v5.11.2 v5.11.1 v5.11.0 v5.11.0-rc2 v5.11.0-rc1 v5.11.0-beta4 v5.11.0-beta3 v5.11.0-beta2 v5.11.0-beta1 v5.11.0-alpha1 v5.10.1 v5.10.0 v5.10.0-rc3 v5.10.0-rc2 v5.10.0-rc1 v5.10.0-beta4 v5.10.0-beta3 v5.10.0-beta2 v5.10.0-beta1 v5.10.0-alpha1 v5.9.9 v5.9.8 v5.9.7 v5.9.6 v5.9.5 v5.9.4 v5.9.3 v5.9.2 v5.9.1 v5.9.0 v5.9.0-rc2 v5.9.0-rc1 v5.9.0-beta4 v5.9.0-beta3 v5.9.0-beta2 v5.9.0-beta1 v5.9.0-alpha1 v5.8.0 v5.8.0-rc1 v5.8.0-beta1 v5.8.0-alpha1 v5.7.1 v5.7.0 v5.7.0-rc1 v5.7.0-beta1 v5.7.0-alpha1 v5.6.3 v5.6.2 v5.6.1 v5.6.1-1 v5.6.0 v5.6.0-rc1 v5.6.0-beta1 v5.6.0-alpha1 v5.5.1 v5.5.0 v5.5.0-rc1 v5.5.0-beta1 v5.5.0-alpha1 v5.4.2 v5.4.1 v5.4.0 v5.4.0-rc1 v5.4.0-beta1 v5.4.0-alpha1 v5.3.2 v5.3.1
No related merge requests found
Showing with 175 additions and 37 deletions
AlbumDelegate AlbumDelegate.qml
PhotoDelegate PhotoDelegate.qml
ProgressBar ProgressBar.qml
RssModel RssModel.qml
BusyIndicator BusyIndicator.qml
EditableButton EditableButton.qml
Button Button.qml
Tag Tag.qml
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) {
target.path = /opt/$${TARGET}/bin
export(target.path)
}
INSTALLS += target
}
export(INSTALLS)
File added
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS> <!DOCTYPE TS>
<TS version="2.0"> <TS version="2.1" language="de_DE">
<context> <context>
<name>AlbumDelegate</name> <name>AlbumDelegate</name>
<message> <message>
<location filename="../PhotoViewerCore/AlbumDelegate.qml" line="59"/> <location filename="../PhotoViewerCore/AlbumDelegate.qml" line="102"/>
<source>Remove</source> <source>Remove</source>
<translation type="unfinished"></translation> <translation>Entfernen</translation>
</message> </message>
</context> </context>
<context> <context>
<name>photoviewer</name> <name>main</name>
<message> <message>
<location filename="../photoviewer.qml" line="30"/> <location filename="../main.qml" line="75"/>
<source>Add</source> <source>Add</source>
<translation type="unfinished"></translation> <translation>Zufügen</translation>
</message> </message>
<message> <message>
<location filename="../photoviewer.qml" line="39"/> <location filename="../main.qml" line="84"/>
<source>Edit</source> <source>Edit</source>
<translation type="unfinished"></translation> <translation>Bearbeiten</translation>
</message> </message>
<message> <message>
<location filename="../photoviewer.qml" line="52"/> <location filename="../main.qml" line="89"/>
<source>Quit</source>
<translation>Verlassen</translation>
</message>
<message>
<location filename="../main.qml" line="102"/>
<source>Back</source> <source>Back</source>
<translation type="unfinished"></translation> <translation>Zurück</translation>
</message> </message>
</context> </context>
</TS> </TS>
No preview for this file type
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS> <!DOCTYPE TS>
<TS version="2.0" language="fr_FR"> <TS version="2.1" language="fr_FR">
<context> <context>
<name>AlbumDelegate</name> <name>AlbumDelegate</name>
<message> <message>
<location filename="../PhotoViewerCore/AlbumDelegate.qml" line="59"/> <location filename="../PhotoViewerCore/AlbumDelegate.qml" line="102"/>
<source>Remove</source> <source>Remove</source>
<translation>Supprimer</translation> <translation>Supprimer</translation>
</message> </message>
</context> </context>
<context> <context>
<name>photoviewer</name> <name>main</name>
<message> <message>
<location filename="../photoviewer.qml" line="30"/> <location filename="../main.qml" line="75"/>
<source>Add</source> <source>Add</source>
<translation>Ajouter</translation> <translation>Ajouter</translation>
</message> </message>
<message> <message>
<location filename="../photoviewer.qml" line="39"/> <location filename="../main.qml" line="84"/>
<source>Edit</source> <source>Edit</source>
<translation>Éditer</translation> <translation>Éditer</translation>
</message> </message>
<message> <message>
<location filename="../photoviewer.qml" line="52"/> <location filename="../main.qml" line="89"/>
<source>Quit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../main.qml" line="102"/>
<source>Back</source> <source>Back</source>
<translation>Retour</translation> <translation>Retour</translation>
</message> </message>
......
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtQml module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QTranslator>
#include <QDebug>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QTranslator qtTranslator;
qtTranslator.load("qml_" + QLocale::system().name(), ":/i18n/");
app.installTranslator(&qtTranslator);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
return app.exec();
}
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal ** Contact: http://www.qt-project.org/legal
** **
** This file is part of the QtQml module of the Qt Toolkit. ** This file is part of the QtQml module of the Qt Toolkit.
...@@ -39,13 +39,16 @@ ...@@ -39,13 +39,16 @@
** **
****************************************************************************/ ****************************************************************************/
import QtQuick 2.0 import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQml.Models 2.1 import QtQml.Models 2.1
import "PhotoViewerCore" import "PhotoViewerCore"
Rectangle { ApplicationWindow {
id: mainWindow id: mainWindow
visible: true
property real downloadProgress: 0 property real downloadProgress: 0
property bool imageLoading: false property bool imageLoading: false
property bool editMode: false property bool editMode: false
......
TEMPLATE = app
QT += qml quick widgets xmlpatterns
SOURCES += main.cpp
lupdate_only{
SOURCES = *.qml \
PhotoViewerCore/*.qml \
PhotoViewerCore/script/*.js
}
TRANSLATIONS += i18n/qml_fr.ts \
i18n/qml_de.ts
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)
import QmlProject 1.1
Project {
mainFile: "photoviewer.qml"
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
directory: "."
}
JavaScriptFiles {
directory: "."
}
ImageFiles {
directory: "."
}
Files {
filter: "*.ts"
directory: "i18n"
}
}
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>PhotoViewerCore/AlbumDelegate.qml</file>
<file>PhotoViewerCore/BusyIndicator.qml</file>
<file>PhotoViewerCore/Button.qml</file>
<file>PhotoViewerCore/EditableButton.qml</file>
<file>PhotoViewerCore/PhotoDelegate.qml</file>
<file>PhotoViewerCore/ProgressBar.qml</file>
<file>PhotoViewerCore/RssModel.qml</file>
<file>PhotoViewerCore/Tag.qml</file>
<file>PhotoViewerCore/images/box-shadow.png</file>
<file>PhotoViewerCore/images/busy.png</file>
<file>PhotoViewerCore/images/cardboard.png</file>
<file>PhotoViewerCore/script/script.js</file>
<file>i18n/qml_fr.qm</file>
<file>i18n/qml_de.qm</file>
</qresource>
</RCC>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment