Everything run form inside a qrc file instead.
|
@ -5,5 +5,6 @@ SUBDIRS = weatherinfo
|
|||
|
||||
SOURCES = QmlMirror.qml \
|
||||
Clock.qml \
|
||||
Weather.qml
|
||||
Weather.qml \
|
||||
Transport.qml
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!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>
|
||||
<data>
|
||||
<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.DisplayName">Desktop Qt 5.4.1 GCC 64bit</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.ActiveRunConfiguration">0</value>
|
||||
<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.DisplayName"></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.LinkQmlDebuggingLibraryAuto">true</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
|
||||
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
|
||||
|
@ -150,10 +150,23 @@
|
|||
<value type="QString">-r</value>
|
||||
</valuelist>
|
||||
<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>
|
||||
</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.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||
|
@ -238,19 +251,19 @@
|
|||
</valuelist>
|
||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments"></value>
|
||||
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Executable"></value>
|
||||
<value type="QString" key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments">QmlMirror.qml</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="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.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
|
||||
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebugger">true</value>
|
||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
|
||||
</valuemap>
|
||||
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||
</valuemap>
|
||||
|
|
|
@ -4,18 +4,34 @@ import QtQuick.Window 2.0
|
|||
|
||||
ApplicationWindow {
|
||||
title: qsTr("Hello World")
|
||||
width: 640
|
||||
height: 250
|
||||
width: 1080
|
||||
height: 1920
|
||||
color: "black"
|
||||
|
||||
Clock {
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
width: 360
|
||||
height: 240
|
||||
}
|
||||
|
||||
Weather {
|
||||
id: weatherId
|
||||
anchors.top: parent.top
|
||||
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 positioning.weatherinfo 1.0
|
||||
import net.frozentux.weatherinfo 1.0
|
||||
|
||||
|
||||
WeatherInfo {
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import net.weatherinfo.weatherinfo 1.0
|
||||
|
||||
Item {
|
||||
id: container
|
||||
|
@ -46,7 +47,7 @@ Item {
|
|||
property string weatherIcon: "01d"
|
||||
|
||||
//server icons are too small. we keep using the local images
|
||||
property bool useServerIcon: true
|
||||
property bool useServerIcon: false
|
||||
|
||||
Image {
|
||||
id: img
|
|
@ -39,9 +39,8 @@
|
|||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import "components"
|
||||
import net.frozentux.weatherinfo 1.0
|
||||
//! [0]
|
||||
import WeatherData 1.0
|
||||
|
||||
Item {
|
||||
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 \
|
||||
weatherplugin.h
|
||||
|
||||
target.path = $$[QT_INSTALL_QML]/positioning/weatherinfo
|
||||
target.path = $$[QT_INSTALL_QML]/net/frozentux/weatherinfo
|
||||
INSTALLS += target
|
||||
uri=weatherdata
|
||||
uri=net.frozentux.weatherinfo
|
||||
|
||||
|
||||
OTHER_FILES += \
|
||||
components/BigForecastIcon.qml \
|
||||
components/ForecastIcon.qml \
|
||||
components/WeatherIcon.qml \
|
||||
icons/weather-few-clouds.png \
|
||||
icons/weather-fog.png \
|
||||
icons/weather-haze.png \
|
||||
icons/weather-icy.png \
|
||||
icons/weather-overcast.png \
|
||||
icons/weather-showers.png \
|
||||
icons/weather-sleet.png \
|
||||
icons/weather-snow.png \
|
||||
icons/weather-storm.png \
|
||||
icons/weather-sunny.png \
|
||||
icons/weather-sunny-very-few-clouds.png \
|
||||
icons/weather-thundershower.png \
|
||||
icons/weather-few-clouds.xcf \
|
||||
icons/weather-fog.xcf \
|
||||
icons/weather-haze.xcf \
|
||||
icons/weather-icy.xcf \
|
||||
icons/weather-overcast.xcf \
|
||||
icons/weather-showers.xcf \
|
||||
icons/weather-sleet.xcf \
|
||||
icons/weather-snow.xcf \
|
||||
icons/weather-storm.xcf \
|
||||
icons/weather-sunny.xcf \
|
||||
icons/weather-sunny-very-few-clouds.xcf \
|
||||
icons/weather-thundershower.xcf \
|
||||
icons/README.txt
|
||||
|
||||
DISTFILES += \
|
||||
WeatherInfo.qml
|
||||
|
||||
RESOURCES += \
|
||||
images.qrc
|
||||
|
|