Everything run form inside a qrc file instead.
|
@ -5,5 +5,6 @@ SUBDIRS = weatherinfo
|
||||||
|
|
||||||
SOURCES = QmlMirror.qml \
|
SOURCES = QmlMirror.qml \
|
||||||
Clock.qml \
|
Clock.qml \
|
||||||
Weather.qml
|
Weather.qml \
|
||||||
|
Transport.qml
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 3.4.0, 2015-05-22T22:12:58. -->
|
<!-- Written by QtCreator 3.4.0, 2015-06-17T09:24:13. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.4.1 GCC 64bit</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.4.1 GCC 64bit</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.4.1 GCC 64bit</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.4.1 GCC 64bit</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.54.gcc_64_kit</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.54.gcc_64_kit</value>
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
|
@ -72,8 +72,8 @@
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
|
||||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||||
|
@ -150,10 +150,23 @@
|
||||||
<value type="QString">-r</value>
|
<value type="QString">-r</value>
|
||||||
</valuelist>
|
</valuelist>
|
||||||
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">-j 4</value>
|
||||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
|
||||||
|
<value type="QString">-w</value>
|
||||||
|
<value type="QString">-r</value>
|
||||||
|
</valuelist>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">install </value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
@ -238,19 +251,19 @@
|
||||||
</valuelist>
|
</valuelist>
|
||||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
|
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments">QmlMirror.qml</value>
|
||||||
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"></value>
|
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable">/opt/Qt/5.4/gcc_64/bin/qmlscene</value>
|
||||||
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
|
<value type="bool" key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal">false</value>
|
||||||
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value>
|
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory">%{buildDir}</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Executable</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Run /opt/Qt/5.4/gcc_64/bin/qmlscene</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">true</value>
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
|
|
|
@ -4,18 +4,34 @@ import QtQuick.Window 2.0
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
title: qsTr("Hello World")
|
title: qsTr("Hello World")
|
||||||
width: 640
|
width: 1080
|
||||||
height: 250
|
height: 1920
|
||||||
color: "black"
|
color: "black"
|
||||||
|
|
||||||
Clock {
|
Clock {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
width: 360
|
||||||
|
height: 240
|
||||||
}
|
}
|
||||||
|
|
||||||
Weather {
|
Weather {
|
||||||
id: weatherId
|
id: weatherId
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
width: 360
|
||||||
|
height: 240
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Transport {
|
||||||
|
id: transportId
|
||||||
|
anchors.top: weatherId.bottom
|
||||||
|
anchors.right: parent.right
|
||||||
|
width: 360
|
||||||
|
height: 480
|
||||||
|
color: "black"
|
||||||
|
border.color: "grey"
|
||||||
|
border.width: 0
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
106
Transport.qml
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
import QtQuick 2.0
|
||||||
|
import QtQuick.Layouts 1.1
|
||||||
|
import QtQuick.Controls 1.3
|
||||||
|
import QtQuick.Controls.Styles 1.2
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: "black"
|
||||||
|
width: 360
|
||||||
|
height: 480
|
||||||
|
|
||||||
|
ListModel {
|
||||||
|
id: lineModel
|
||||||
|
|
||||||
|
ListElement {
|
||||||
|
number: 16
|
||||||
|
destination: "Eketrägatan"
|
||||||
|
arriving: "5"
|
||||||
|
next: "10"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
number: 16
|
||||||
|
destination: "Högsbohöjd"
|
||||||
|
arriving: "5"
|
||||||
|
next: "10"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
number: 60
|
||||||
|
destination: "Kungssten"
|
||||||
|
arriving: "5"
|
||||||
|
next: "10"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
number: 60
|
||||||
|
destination: "Eketrägatan"
|
||||||
|
arriving: "5"
|
||||||
|
next: "10"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TableView {
|
||||||
|
anchors.fill: parent
|
||||||
|
model: lineModel
|
||||||
|
|
||||||
|
style: TableViewStyle {
|
||||||
|
backgroundColor: "black"
|
||||||
|
alternateBackgroundColor: "black"
|
||||||
|
|
||||||
|
headerDelegate: Rectangle {
|
||||||
|
height: textItem.implicitHeight * 1.2
|
||||||
|
width: textItem.implicitWidth
|
||||||
|
color: "black"
|
||||||
|
Text {
|
||||||
|
id: textItem
|
||||||
|
anchors.fill: parent
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
anchors.leftMargin: 0
|
||||||
|
text: styleData.value
|
||||||
|
elide: Text.ElideRight
|
||||||
|
color: "white"
|
||||||
|
renderType: Text.NativeRendering
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.bottomMargin: 1
|
||||||
|
anchors.topMargin: 1
|
||||||
|
width: 1
|
||||||
|
color: "black"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
itemDelegate: Rectangle {
|
||||||
|
color: "black"
|
||||||
|
Text {
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
color: "white"
|
||||||
|
text: styleData.value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
TableViewColumn {
|
||||||
|
role: "number"
|
||||||
|
title: "No"
|
||||||
|
width: parent.width / 6
|
||||||
|
}
|
||||||
|
TableViewColumn {
|
||||||
|
role: "destination"
|
||||||
|
title: "Destination"
|
||||||
|
width: (parent.width / 6) * 3
|
||||||
|
}
|
||||||
|
TableViewColumn {
|
||||||
|
role: "arriving"
|
||||||
|
title: "Arriving"
|
||||||
|
width: parent.width / 6
|
||||||
|
}
|
||||||
|
TableViewColumn {
|
||||||
|
role: "next"
|
||||||
|
title: "Next"
|
||||||
|
width: (parent.width / 6)-2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import positioning.weatherinfo 1.0
|
import net.frozentux.weatherinfo 1.0
|
||||||
|
|
||||||
|
|
||||||
WeatherInfo {
|
WeatherInfo {
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
import net.weatherinfo.weatherinfo 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: container
|
id: container
|
||||||
|
@ -46,7 +47,7 @@ Item {
|
||||||
property string weatherIcon: "01d"
|
property string weatherIcon: "01d"
|
||||||
|
|
||||||
//server icons are too small. we keep using the local images
|
//server icons are too small. we keep using the local images
|
||||||
property bool useServerIcon: true
|
property bool useServerIcon: false
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: img
|
id: img
|
|
@ -39,9 +39,8 @@
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
import "components"
|
import net.frozentux.weatherinfo 1.0
|
||||||
//! [0]
|
//! [0]
|
||||||
import WeatherData 1.0
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: window
|
id: window
|
||||||
|
|
24
weatherinfo/images.qrc
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<RCC>
|
||||||
|
<qresource prefix="/icons">
|
||||||
|
<file>weather-few-clouds.png</file>
|
||||||
|
<file>weather-fog.png</file>
|
||||||
|
<file>weather-haze.png</file>
|
||||||
|
<file>weather-icy.png</file>
|
||||||
|
<file>weather-overcast.png</file>
|
||||||
|
<file>weather-showers.png</file>
|
||||||
|
<file>weather-sleet.png</file>
|
||||||
|
<file>weather-snow.png</file>
|
||||||
|
<file>weather-storm.png</file>
|
||||||
|
<file>weather-sunny.png</file>
|
||||||
|
<file>weather-sunny-very-few-clouds.png</file>
|
||||||
|
<file>weather-thundershower.png</file>
|
||||||
|
</qresource>
|
||||||
|
<qresource prefix="/components">
|
||||||
|
<file>BigForecastIcon.qml</file>
|
||||||
|
<file>ForecastIcon.qml</file>
|
||||||
|
<file>WeatherIcon.qml</file>
|
||||||
|
</qresource>
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file>WeatherInfo.qml</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
@ -10,27 +10,31 @@ SOURCES += appmodel.cpp \
|
||||||
HEADERS += appmodel.h \
|
HEADERS += appmodel.h \
|
||||||
weatherplugin.h
|
weatherplugin.h
|
||||||
|
|
||||||
target.path = $$[QT_INSTALL_QML]/positioning/weatherinfo
|
target.path = $$[QT_INSTALL_QML]/net/frozentux/weatherinfo
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
uri=weatherdata
|
uri=net.frozentux.weatherinfo
|
||||||
|
|
||||||
|
|
||||||
OTHER_FILES += \
|
OTHER_FILES += \
|
||||||
components/BigForecastIcon.qml \
|
components/BigForecastIcon.qml \
|
||||||
components/ForecastIcon.qml \
|
components/ForecastIcon.qml \
|
||||||
components/WeatherIcon.qml \
|
components/WeatherIcon.qml \
|
||||||
icons/weather-few-clouds.png \
|
icons/weather-few-clouds.xcf \
|
||||||
icons/weather-fog.png \
|
icons/weather-fog.xcf \
|
||||||
icons/weather-haze.png \
|
icons/weather-haze.xcf \
|
||||||
icons/weather-icy.png \
|
icons/weather-icy.xcf \
|
||||||
icons/weather-overcast.png \
|
icons/weather-overcast.xcf \
|
||||||
icons/weather-showers.png \
|
icons/weather-showers.xcf \
|
||||||
icons/weather-sleet.png \
|
icons/weather-sleet.xcf \
|
||||||
icons/weather-snow.png \
|
icons/weather-snow.xcf \
|
||||||
icons/weather-storm.png \
|
icons/weather-storm.xcf \
|
||||||
icons/weather-sunny.png \
|
icons/weather-sunny.xcf \
|
||||||
icons/weather-sunny-very-few-clouds.png \
|
icons/weather-sunny-very-few-clouds.xcf \
|
||||||
icons/weather-thundershower.png \
|
icons/weather-thundershower.xcf \
|
||||||
icons/README.txt
|
icons/README.txt
|
||||||
|
|
||||||
DISTFILES += \
|
DISTFILES += \
|
||||||
WeatherInfo.qml
|
WeatherInfo.qml
|
||||||
|
|
||||||
|
RESOURCES += \
|
||||||
|
images.qrc
|
||||||
|
|