diff --git a/applets/launcherpanel/contents/ui/Icon.qml b/applets/launcherpanel/contents/ui/Icon.qml index 4b20a9a5..9ad3dd74 100644 --- a/applets/launcherpanel/contents/ui/Icon.qml +++ b/applets/launcherpanel/contents/ui/Icon.qml @@ -1,32 +1,32 @@ /* * Copyright 2011 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import Qt 4.7 Image { property string icon property string command source: plasmoid.file("images", icon+".png") MouseArea { anchors.fill: parent onClicked: { plasmoid.runCommand(command) } } -} \ No newline at end of file +} diff --git a/applications/settings/modules/configtest/contents/ui/ConfigGroupItem.qml b/applications/settings/modules/configtest/contents/ui/ConfigGroupItem.qml index 7f609932..ede2989b 100644 --- a/applications/settings/modules/configtest/contents/ui/ConfigGroupItem.qml +++ b/applications/settings/modules/configtest/contents/ui/ConfigGroupItem.qml @@ -1,122 +1,122 @@ // -*- coding: iso-8859-1 -*- /* * Copyright 2012 Sebastian Kügler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 1.0 import org.kde.plasma.components 0.1 as PlasmaComponents import org.kde.active.settings 0.1 as ActiveSettings ActiveSettings.ConfigGroup { id: levelZero property int itemHeight: 24 property int itemMargin: 2 //width: 200 height: keyListView.height + groupListView.height + 40 //anchors.fill: parent anchors.leftMargin: itemHeight file: "active-settings-configtestrc" //group: "LevelZero" Rectangle { anchors.fill: parent; color: "white"; border.color: "black"; opacity: 0.4; } ListView { anchors { top: parent.top; topMargin: 24; left: parent.left; right: parent.right; } id: keyListView currentIndex: -1 height: keyList.length * (itemHeight + spacing) //height: contentHeight interactive: false width: parent.width clip: true spacing: itemMargin model: keyList delegate: configDelegate } Component { id: configDelegate Column { height: itemHeight width: keyListView.width - 300 //Text { id: txt; text: "" + modelData + ": "; anchors.right: parent.horizontalCenter } //Text { text: readEntry(modelData, "default value"); anchors.left: parent.horizontalCenter } Text { text: "" + modelData + ": " + readEntry(modelData, "default value"); anchors.left: parent.left; height: itemHeight; } //newGroupLoader.source = "ConfigGroupItem.qml"; } } } Column { anchors { top: keyListView.bottom; /*bottom: parent.bottom;*/ topMargin: itemMargin; left: parent.left; right: parent.right; } id: groupListView //currentIndex: -1 height: groupList.length * (itemHeight + spacing) //height: contentHeight //interactive: false width: parent.width //clip: true //orientation: Qt.Horizontal //spacing: itemMargin //model: groupList //delegate: groupDelegate } /* Component { id: groupDelegate Item { height: 100 id: delegateItem PlasmaComponents.Label { width: 300 height: itemHeight //height: groupListView.height //checked: levelOne.group == modelData text: "" + modelData + " blabla" //onClicked: levelOne.group = modelData } Component.onCompleted: { var component = Qt.createComponent("ConfigGroupItem.qml"); if (component.status == Component.Ready) { print(" ++++++++++ ... Creating new group " + modelData); var cfgItem = component.createObject(groupDelegate); cfgItem.group = modelData; //cftItem.height = //cfgItem.anchors.fill = parent; } } } } */ Component.onCompleted: { print(group + "ConfigGroupItem.onCompleted: " + group); for (var i = 0; i < groupList.length; i++){ //print(" no: " + i + groupList[i]); print(); var modelData = groupList[i]; var component = Qt.createComponent("ConfigGroupItem.qml"); if (component.status == Component.Ready) { print(" ++++++++++ ... Creating new group [" + group + "][" + modelData + "]"); var cfgItem = component.createObject(groupListView, { "group": modelData }); } } } -} \ No newline at end of file +} diff --git a/applications/settings/modules/time/package/contents/ui/SvgButton.qml b/applications/settings/modules/time/package/contents/ui/SvgButton.qml index f8554410..f17becc5 100644 --- a/applications/settings/modules/time/package/contents/ui/SvgButton.qml +++ b/applications/settings/modules/time/package/contents/ui/SvgButton.qml @@ -1,49 +1,49 @@ // -*- coding: iso-8859-1 -*- /* * Copyright 2011 Sebastian Kügler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 1.0 import org.kde.plasma.core 0.1 as PlasmaCore import org.kde.plasma.mobilecomponents 0.1 as MobileComponents Item { id: svgButton objectName: "svgButton" width: 48 height: 48 property Item targetItem MobileComponents.ActionButton { id: closeButtonSvg svg: iconsSvg iconSize: 22 backgroundVisible: false elementId: "close" anchors { //verticalCenter: parent.verticalCenter centerIn: parent //right: parent.right //rightMargin: parent.margins.right } onClicked: { targetItem.state = "closed"; } } -} \ No newline at end of file +} diff --git a/components/metadatamodel/cloudtest.qml b/components/metadatamodel/cloudtest.qml index d7044d47..5c2a1bc0 100644 --- a/components/metadatamodel/cloudtest.qml +++ b/components/metadatamodel/cloudtest.qml @@ -1,75 +1,75 @@ /* Copyright 2011 Marco Martin This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 1.1 import org.kde.plasma.components 0.1 import org.kde.metadatamodels 0.1 Item { width: 800 height: 480 MetadataUserTypes { id: userTypes } ListView { id: metadataList clip: true anchors { left: parent.left top: parent.top right: parent.right bottom: parent.bottom } model: MetadataCloudModel { id: metadataCloudModel cloudCategory: "rdf:type"//"nao:hasTag" //queryString: "pdf" //resourceType: "nfo:Document" //activityId: "12c8a6ea-c99b-4a54-bf42-a4e8fbcb9be7" //sortBy: ["nie#url", "nao#lastModified"] //startDate: "2011-10-10" //tags: ["kde"] //minimumRating: 5 //allowedCategories: userTypes.userTypes } delegate: Row { spacing: 10 Text { text: model["label"] } Text { text: model["count"] } } } ScrollBar { flickableItem: metadataList orientation: Qt.Vertical anchors { top:metadataList.top right:metadataList.right bottom:metadataList.bottom } } -} \ No newline at end of file +} diff --git a/components/metadatamodel/test.qml b/components/metadatamodel/test.qml index a233f81e..2aae8690 100644 --- a/components/metadatamodel/test.qml +++ b/components/metadatamodel/test.qml @@ -1,208 +1,208 @@ /* Copyright 2011 Marco Martin This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 1.1 import org.kde.plasma.components 0.1 import org.kde.metadatamodels 0.1 Item { width: 800 height: 480 ToolBar { id: toolBar anchors { left: parent.left right: parent.right } tools: Row { spacing: 10 Label { anchors.verticalCenter: parent.verticalCenter text: "Type" } ButtonRow { anchors.verticalCenter: parent.verticalCenter spacing: 10 RadioButton { text: "Documents" onCheckedChanged: { if (checked) { metadataModel.resourceType = "nfo:Document" } } } RadioButton { text: "Images" onCheckedChanged: { if (checked) { metadataModel.resourceType = "nfo:Image" } } } RadioButton { text: "Any" onCheckedChanged: { if (checked) { metadataModel.resourceType = "" } } } } Item { width: 10 height: 10 } Label { anchors.verticalCenter: parent.verticalCenter text: "Sort" } ButtonRow { anchors.verticalCenter: parent.verticalCenter spacing: 10 RadioButton { text: "Ascending" onCheckedChanged: { if (checked) { metadataModel.sortOrder = Qt.AscendingOrder } } } RadioButton { text: "Descending" onCheckedChanged: { if (checked) { metadataModel.sortOrder = Qt.DescendingOrder } } } } Item { width: 10 height: 10 } Label { anchors.verticalCenter: parent.verticalCenter text: "Tags" } ButtonRow { anchors.verticalCenter: parent.verticalCenter spacing: 10 exclusive: false CheckBox { id: kdeTagCheckbox text: "kde" } CheckBox { id: nepomukTagCheckbox text: "nepomuk" } } Item { width: 10 height: 10 } Label { anchors.verticalCenter: parent.verticalCenter text: "Dates" } TextField { anchors.verticalCenter: parent.verticalCenter onTextChanged: { metadataModel.startDate = text } } TextField { anchors.verticalCenter: parent.verticalCenter onTextChanged: { metadataModel.endDate = text } } Item { width: 10 height: 10 } Label { anchors.verticalCenter: parent.verticalCenter text: "Rating" } TextField { anchors.verticalCenter: parent.verticalCenter onTextChanged: { metadataModel.rating = text } } } } ListView { id: metadataList clip: true anchors { left: parent.left top: toolBar.bottom right: parent.right bottom: parent.bottom } model: MetadataModel { id: metadataModel //queryString: "pdf" //resourceType: "nfo:Document" //activityId: "12c8a6ea-c99b-4a54-bf42-a4e8fbcb9be7" //mimeType: "vnd.oasis.opendocument.text" sortBy: ["nie:url", "nao:lastModified"] tags: { if (kdeTagCheckbox.checked && nepomukTagCheckbox.checked) { return ["nepomuk", "kde"] } else if (kdeTagCheckbox.checked) { return ["kde"] } else if (nepomukTagCheckbox.checked) { return ["nepomuk"] } else { return [] } } sortOrder: Qt.AscendingOrder /*Component.onCompleted: { metadataModel.extraParameters["nie:mimeType"] = "vnd.oasis.opendocument.text" }*/ } delegate: Column{ /*Text { text: model["label"] }*/ Text { text: model["url"] } } } ScrollBar { flickableItem: metadataList orientation: Qt.Vertical anchors { top:metadataList.top right:metadataList.right bottom:metadataList.bottom } } -} \ No newline at end of file +} diff --git a/components/metadatamodel/timelinetest.qml b/components/metadatamodel/timelinetest.qml index e0c0d72c..687eeb0f 100644 --- a/components/metadatamodel/timelinetest.qml +++ b/components/metadatamodel/timelinetest.qml @@ -1,145 +1,145 @@ /* Copyright 2011 Marco Martin This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 1.1 import org.kde.plasma.components 0.1 import org.kde.metadatamodels 0.1 Item { width: 800 height: 480 MetadataUserTypes { id: userTypes } ListView { id: metadataList clip: true anchors { left: parent.left top: parent.top right: parent.right bottom: timeline.top } model: MetadataTimelineModel { id: metadataTimelineModel level: MetadataTimelineModel.Month //queryString: "pdf" //resourceType: "nfo:Document" //activityId: "12c8a6ea-c99b-4a54-bf42-a4e8fbcb9be7" //sortBy: ["nie#url", "nao#lastModified"] startDate: "2011-01-01" endDate: "2011-12-31" //tags: ["kde"] //minimumRating: 5 //allowedCategories: userTypes.userTypes } delegate: Row { spacing: 10 Text { text: model["year"] + "-" + model["month"] + "-" + model["day"] } Text { text: model["count"] } } } Button { text: (metadataTimelineModel.startDate == "2009-10-10") ? "2011-12-31" : "2009-10-10" onClicked: { if (metadataTimelineModel.startDate == "2009-10-10") { metadataTimelineModel.startDate = "2011-01-01" metadataTimelineModel.endDate = "2011-12-31" } else { metadataTimelineModel.startDate = "2009-10-10" metadataTimelineModel.endDate = "2011-12-31" } } } Item { id: timeline anchors { left: parent.left right: parent.right bottom: parent.bottom } height: contents.height Flickable { id: timelineFlickable anchors.fill: parent contentWidth: contents.width contentHeight: contents.height Item { id: contents width: childrenRect.width height: childrenRect.height Rectangle { color: "black" height: 12 width: timelineRow.width + 32 anchors.verticalCenter: timelineRow.verticalCenter } Row { id: timelineRow spacing: 40 x: 16 Repeater { id: timelineRepeater model: metadataTimelineModel delegate: Rectangle { color: "black" width: 14 + 300 * (model.count / metadataTimelineModel.totalCount) height: width radius: width/2 anchors.verticalCenter: parent.verticalCenter Text { text: model.label color: "white" anchors.centerIn: parent } } } } } } ScrollBar { flickableItem: timelineFlickable orientation: Qt.Horizontal } } ScrollBar { flickableItem: metadataList orientation: Qt.Vertical anchors { top:metadataList.top right:metadataList.right bottom:metadataList.bottom } } -} \ No newline at end of file +} diff --git a/components/mobilecomponents/animations/ActivateAnimation.qml b/components/mobilecomponents/animations/ActivateAnimation.qml index 40bde0c0..fb2433ce 100644 --- a/components/mobilecomponents/animations/ActivateAnimation.qml +++ b/components/mobilecomponents/animations/ActivateAnimation.qml @@ -1,38 +1,38 @@ // -*- coding: iso-8859-1 -*- /* * Copyright 2011 Sebastian Kügler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 1.0 import "Animations.js" as Animations SequentialAnimation { id: activateAnimation objectName: "activateAnimation" property Item targetItem property int duration: Animations.normalDuration/5 // Fast scaling while we're animation == more FPS ScriptAction { script: targetItem.smooth = false } PressedAnimation { targetItem: activateAnimation.targetItem } ReleasedAnimation { targetItem: activateAnimation.targetItem } ScriptAction { script: targetItem.smooth = true } -} \ No newline at end of file +} diff --git a/components/mobilecomponents/animations/AppearAnimation.qml b/components/mobilecomponents/animations/AppearAnimation.qml index 3bd900e3..6caffb3e 100644 --- a/components/mobilecomponents/animations/AppearAnimation.qml +++ b/components/mobilecomponents/animations/AppearAnimation.qml @@ -1,52 +1,52 @@ // -*- coding: iso-8859-1 -*- /* * Copyright 2011 Sebastian Kügler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 1.0 import "Animations.js" as Animations SequentialAnimation { id: appearAnimation objectName: "appearAnimation" property Item targetItem property int duration: Animations.normalDuration // Fast scaling while we're animation == more FPS ScriptAction { script: { targetItem.smooth = false; targetItem.visible = true; } } ParallelAnimation { PropertyAnimation { target: targetItem properties: "opacity" from: 0; to: 1.0 duration: appearAnimation.duration; easing.type: Easing.InExpo; } PropertyAnimation { target: targetItem properties: "scale" from: 0.8; to: 1.0 duration: appearAnimation.duration; easing.type: Easing.InExpo; } } ScriptAction { script: targetItem.smooth = true } -} \ No newline at end of file +} diff --git a/components/mobilecomponents/animations/DisappearAnimation.qml b/components/mobilecomponents/animations/DisappearAnimation.qml index 97c59d47..1448161e 100644 --- a/components/mobilecomponents/animations/DisappearAnimation.qml +++ b/components/mobilecomponents/animations/DisappearAnimation.qml @@ -1,53 +1,53 @@ // -*- coding: iso-8859-1 -*- /* * Copyright 2011 Sebastian Kügler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 1.0 import "Animations.js" as Animations SequentialAnimation { id: disappearAnimation objectName: "disappearAnimation" property Item targetItem property int duration: Animations.normalDuration ScriptAction { script: targetItem.smooth = false; } ParallelAnimation { PropertyAnimation { properties: "opacity" duration: disappearAnimation.duration target: disappearAnimation.targetItem easing.type: Easing.OutExpo; } PropertyAnimation { properties: "scale" target: disappearAnimation.targetItem duration: disappearAnimation.duration * 0.6 easing.type: Easing.OutExpo; } } ScriptAction { script: { targetItem.smooth = true; targetItem.visible = false; } } -} \ No newline at end of file +} diff --git a/components/mobilecomponents/animations/PressedAnimation.qml b/components/mobilecomponents/animations/PressedAnimation.qml index c18c077a..0fdcbf05 100644 --- a/components/mobilecomponents/animations/PressedAnimation.qml +++ b/components/mobilecomponents/animations/PressedAnimation.qml @@ -1,51 +1,51 @@ // -*- coding: iso-8859-1 -*- /* * Copyright 2011 Sebastian Kügler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 1.0 import "Animations.js" as Animations SequentialAnimation { id: pressedAnimation objectName: "pressedAnimation" property Item targetItem property int duration: Animations.feedbackDuration // Fast scaling while we're animation == more FPS ScriptAction { script: targetItem.smooth = false } ParallelAnimation { PropertyAnimation { target: targetItem properties: "opacity" from: 1.0; to: 0.8 duration: pressedAnimation.duration; easing.type: Easing.OutExpo; } PropertyAnimation { target: targetItem properties: "scale" from: 1.0; to: 0.95 duration: pressedAnimation.duration; easing.type: Easing.OutExpo; } } ScriptAction { script: targetItem.smooth = true } -} \ No newline at end of file +} diff --git a/components/mobilecomponents/animations/ReleasedAnimation.qml b/components/mobilecomponents/animations/ReleasedAnimation.qml index b267c1c1..a74b4699 100644 --- a/components/mobilecomponents/animations/ReleasedAnimation.qml +++ b/components/mobilecomponents/animations/ReleasedAnimation.qml @@ -1,52 +1,52 @@ // -*- coding: iso-8859-1 -*- /* * Copyright 2011 Sebastian Kügler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 1.0 import "Animations.js" as Animations SequentialAnimation { id: releasedAnimation objectName: "releasedAnimation" property Item targetItem property int duration: Animations.feedbackDuration // Fast scaling while we're animation == more FPS ScriptAction { script: targetItem.smooth = false } ParallelAnimation { PropertyAnimation { target: targetItem properties: "opacity" from: 0.8; to: 1.0 duration: releasedAnimation.duration; easing.type: Easing.InExpo; } PropertyAnimation { target: targetItem properties: "scale" from: 0.95; to: 1.0 duration: releasedAnimation.duration; easing.type: Easing.InExpo; } } ScriptAction { script: targetItem.smooth = true } -} \ No newline at end of file +} diff --git a/components/mobilecomponents/resourcedelegates/Bookmark/Item.qml b/components/mobilecomponents/resourcedelegates/Bookmark/Item.qml index 73b17793..e653816f 100644 --- a/components/mobilecomponents/resourcedelegates/Bookmark/Item.qml +++ b/components/mobilecomponents/resourcedelegates/Bookmark/Item.qml @@ -1,121 +1,121 @@ /* * Copyright 2011 Marco Martin * Copyright 2011 Sebastian Kügler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import Qt 4.7 import org.kde.plasma.core 0.1 as PlasmaCore import org.kde.plasma.mobilecomponents 0.1 as MobileComponents import org.kde.qtextracomponents 0.1 as QtExtraComponents Item { id: resourceItem anchors.fill: parent PlasmaCore.DataSource { id: pmSource engine: "org.kde.preview" connectedSources: [ description ] interval: 0 } PlasmaCore.DataSource { id: bookmarkSource engine: "org.kde.active.bookmarks" interval: 0 } PlasmaCore.Theme { id: theme } Rectangle { id: frameRect anchors { top: parent.top; left: parent.left; margins: 12; } width: 182 height: 122 color: theme.textColor opacity: .6 radius: 1 } QtExtraComponents.QImageItem { id: previewImage //fillMode: Image.PreserveAspectCrop //smooth: true width: frameRect.width - 2 height: frameRect.height - 2 anchors.centerIn: frameRect image: { if (typeof pmSource.data[description] != "undefined") { return pmSource.data[description]["thumbnail"]; } return; // FIXME: sensible placeholder image } } Rectangle { id: textRect width: 160 height: 48 color: theme.backgroundColor radius: 4 opacity: .8 anchors { bottom: frameRect.bottom right: parent.right margins: 10 } } Text { id: textLabel color: theme.textColor font.pointSize: 16 style: Text.Sunken; styleColor: theme.backgroundColor horizontalAlignment: Text.AlignRight text: { var s = description; s = s.replace("http://", ""); s = s.replace("https://", ""); s = s.replace("www.", ""); return s; } anchors.fill: textRect anchors.margins: 4 } MobileComponents.Rating { //color: "green" id: ratingItem score: rating //width: 22*5 //height: 22 anchors.right: textLabel.right anchors.bottom: textRect.bottom //margins.bottom: 20 } -} \ No newline at end of file +} diff --git a/components/settings/SettingsItem.qml b/components/settings/SettingsItem.qml index e2adf829..4c7a5d99 100644 --- a/components/settings/SettingsItem.qml +++ b/components/settings/SettingsItem.qml @@ -1,49 +1,49 @@ // -*- coding: iso-8859-1 -*- /* * Copyright 2011-2012 Sebastian Kügler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 1.0 import org.kde.plasma.components 0.1 as PlasmaComponents import org.kde.plasma.mobilecomponents 0.1 as MobileComponents import org.kde.active.settings 0.1 as ActiveSettings PlasmaComponents.PageStack { property alias module: settingsComponent.module id: moduleContainer objectName: "moduleContainer" clip: true ActiveSettings.SettingsComponent { id: settingsComponent onModuleChanged: { if (module != "") { switcherPackage.name = module print(" Loading package: " + switcherPackage.filePath("mainscript")); moduleContainer.replace(switcherPackage.filePath("mainscript")); } } } MobileComponents.Package { id: switcherPackage } -} \ No newline at end of file +} diff --git a/containments/appletstrip/contents/ui/ExtraActions.qml b/containments/appletstrip/contents/ui/ExtraActions.qml index e3249b30..5626a74b 100644 --- a/containments/appletstrip/contents/ui/ExtraActions.qml +++ b/containments/appletstrip/contents/ui/ExtraActions.qml @@ -1,162 +1,162 @@ /* * Copyright 2011 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 1.0 import org.kde.plasma.core 0.1 as PlasmaCore import org.kde.plasma.components 0.1 as PlasmaComponents import org.kde.plasma.mobilecomponents 0.1 as MobileComponents Item { id: extraActionsButtonPlaceHolder width: actionSize height: actionSize PlasmaCore.Theme { id: theme } PlasmaCore.FrameSvgItem { id: message imagePath: "widgets/background" anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: extraActionsFrame.top width: messageText.width+margins.left+margins.right height: messageText.height+margins.top+margins.bottom opacity: 0 Behavior on opacity { NumberAnimation { duration: 250 } } PlasmaComponents.Label { id: messageText color: theme.textColor x: message.margins.left y: message.margins.top } } PlasmaCore.FrameSvgItem { id: extraActionsFrame x: -placeHolder.x-margins.left y: -margins.top width: layout.width+margins.left+margins.right height: layout.height+margins.top+margins.bottom imagePath: "widgets/background" opacity: 0 Behavior on opacity { NumberAnimation { duration: 250 } } Row { id: layout x: extraActionsFrame.margins.left y: extraActionsFrame.margins.top MobileComponents.ActionButton { id: removeButton iconSize: 22 svg: iconsSvg elementId: "configure" action: applet.action("configure") } Item { id: placeHolder width: actionSize height: actionSize } MobileComponents.ActionButton { id: runButton iconSize: 22 svg: iconsSvg elementId: "close" action: applet.action("remove") } } } PlasmaCore.SvgItem { id: extraActionsButton width: actionSize height: actionSize x: 0 y: 0 svg: iconsSvg elementId: "configure" Behavior on x { NumberAnimation { duration: 250 } } Behavior on opacity { NumberAnimation { duration: 250 } } MouseArea { anchors.fill: parent anchors.leftMargin: -10 anchors.topMargin: -10 anchors.rightMargin: -10 anchors.bottomMargin: -10 drag.target: extraActionsButton drag.minimumX: -actionSize drag.maximumX: actionSize drag.minimumY: 0 drag.maximumY: 0 onPressed: { mouse.accepted = true extraActionsFrame.opacity = 1 extraActionsButton.opacity = 0.1 } onReleased: { extraActionsFrame.opacity = 0 extraActionsButton.opacity = 1 var pos = extraActionsButton.mapToItem(extraActionsFrame, 0, 10) var button = layout.childAt(pos.x, pos.y) if (button && button.action) { button.action.trigger() } extraActionsButton.x = 0 extraActionsButton.y = 0 message.opacity = 0 } onPositionChanged: { var pos = extraActionsButton.mapToItem(extraActionsFrame, 0, 10) var button = layout.childAt(pos.x, pos.y) if (button && button.action) { messageText.text = button.action.text message.opacity = 1 } else { message.opacity = 0 } mouse.accepted = false } } } -} \ No newline at end of file +} diff --git a/containments/webdashboard/contents/code/NewBookmark.qml b/containments/webdashboard/contents/code/NewBookmark.qml index 52a11805..30e4a2c2 100644 --- a/containments/webdashboard/contents/code/NewBookmark.qml +++ b/containments/webdashboard/contents/code/NewBookmark.qml @@ -1,166 +1,166 @@ /* * Copyright 2011 Sebastian Kügler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 1.0 import org.kde.plasma.core 0.1 as PlasmaCore import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets import org.kde.plasma.mobilecomponents 0.1 as MobileComponents Item { id: newBookmarkItem property int collapsedWidth: 10 property int expandedWidth: width property string defaultText: "http://"; height: 96 width: parent.width/4 state: "collapsed" PlasmaCore.DataSource { id: bookmarksEngine engine: "org.kde.active.bookmarks" interval: 0 } PlasmaCore.FrameSvgItem { id: frame enabledBorders: "LeftBorder|TopBorder|BottomBorder" imagePath: "widgets/background" anchors.fill: parent width: parent.width + 64 height: parent.height } Row { anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter PlasmaWidgets.LineEdit { id: lineEdit width: expandedWidth - 96 text: defaultText y: frame.margins.top clearButtonShown: true anchors.verticalCenter: parent.verticalCenter } PlasmaWidgets.IconWidget { id: newIcon icon: QIcon("bookmark-new") y: frame.margins.top minimumIconSize : "48x48" maximumIconSize : "48x48" preferredIconSize : "48x48" anchors.right: parent.right anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter onClicked: { print("--> new bookmark clicked!") if (newBookmarkItem.state == "expanded") { if (isValidBookmark(lineEdit.text)) { print("==> Add Bookmark: " + lineEdit.text); bookmarksEngine.connectSource("add:" + lineEdit.text); } } else { } newBookmarkItem.state = (newBookmarkItem.state == "expanded") ? "collapsed" : "expanded" } Component.onCompleted: { print("icon done" + icon); //icon = "bookmark-new"; state = "collapsed" } function isValidBookmark(url) { var ok = true; // empty? if (url == "") ok = false; // does it begin with http(s)://? if ((url.indexOf("http://") != 0) && (url.indexOf("https://") != 0)) { ok = false; } if (url == defaultText) { ok = false; } //print("valid url? " + url + " " + ok); return ok; } } Item { width: 20 } } states: [ State { id: expanded name: "expanded"; //when: mouseArea.pressed PropertyChanges { target: lineEdit width: expandedWidth - 64 opacity: 1.0 } PropertyChanges { target: frame width: expandedWidth opacity: 1.0 } }, State { id: collapsed name: "collapsed"; PropertyChanges { target: lineEdit width: collapsedWidth opacity: 0 } PropertyChanges { target: frame width: collapsedWidth opacity: 0 } } ] transitions: [ Transition { PropertyAnimation { properties: "width,opacity" duration: 200; //easing.type: Easing.InOutElastic; easing.type: Easing.OutQuad; easing.amplitude: 2.0; easing.period: .2 } } ] -} \ No newline at end of file +} diff --git a/containments/webdashboard/contents/code/WebDashboard.qml b/containments/webdashboard/contents/code/WebDashboard.qml index 06967bdd..b8747ca9 100644 --- a/containments/webdashboard/contents/code/WebDashboard.qml +++ b/containments/webdashboard/contents/code/WebDashboard.qml @@ -1,85 +1,85 @@ /* * Copyright 2011 Sebastian Kügler * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 1.0 import org.kde.plasma.core 0.1 as PlasmaCore import org.kde.plasma.components 0.1 as PlasmaComponents import org.kde.plasma.mobilecomponents 0.1 as MobileComponents import org.kde.plasma.slccomponents 0.1 as SlcComponents Item { width: 960 height: 540 y: 64 // leave space for the top panel PlasmaCore.Theme { id: theme } MobileComponents.ResourceInstance { id: resourceInstance } Column { id: mainList anchors.fill: parent PlasmaComponents.Label { id: bookmarksLabel text: i18n("Favorites") color: theme.textColor font.pointSize: 24 style: Text.Sunken; styleColor: theme.backgroundColor } Bookmarks { id: bookmarks width: parent.width } /* PlasmaComponents.Label { id: openPagesLabel text: i18n("Open pages") color: theme.textColor font.pointSize: 24 style: Text.Sunken; styleColor: theme.backgroundColor } Bookmarks { id: tabs width: parent.width } */ } NewBookmark { id: newBookmark width: parent.width / 3 x: parent.width-width y: -24 anchors.bottom: bookmarksLabel.bottom } SlcComponents.SlcMenu { id: contextMenu } -} \ No newline at end of file +} diff --git a/qmlpackages/activityswitcher/contents/ui/ConfirmationDialog.qml b/qmlpackages/activityswitcher/contents/ui/ConfirmationDialog.qml index 894c4f0b..022ca366 100644 --- a/qmlpackages/activityswitcher/contents/ui/ConfirmationDialog.qml +++ b/qmlpackages/activityswitcher/contents/ui/ConfirmationDialog.qml @@ -1,86 +1,86 @@ /* * Copyright 2011 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import Qt 4.7 import org.kde.plasma.core 0.1 as PlasmaCore import org.kde.plasma.components 0.1 as PlasmaComponents PlasmaCore.FrameSvgItem { id: confirmationDialog imagePath: "dialogs/background" scale: 0 width: theme.defaultFont.mSize.width*24 height: childrenRect.height+5+margins.top+margins.bottom property alias question: confirmationText.text signal accepted signal dismissed Behavior on scale { NumberAnimation { duration: 250 easing.type: Easing.InOutQuad } } Column { spacing: 8 anchors { left: parent.left top: parent.top right:parent.right leftMargin: confirmationDialog.margins.left rightMargin: confirmationDialog.margins.right topMargin: confirmationDialog.margins.top } Text { id: confirmationText wrapMode: Text.Wrap anchors { left: parent.left right: parent.right } } Row { id: buttons spacing: 16 anchors { horizontalCenter: parent.horizontalCenter } PlasmaComponents.Button { id: yesButton text: i18n("Yes") width: theme.defaultFont.mSize.width*8 onClicked: { confirmationDialog.accepted() } } PlasmaComponents.Button { id: noButton text: i18n("No") width: theme.defaultFont.mSize.width*8 onClicked: { confirmationDialog.scale = 0 confirmationDialog.dismissed() } } } } -} \ No newline at end of file +} diff --git a/qmlpackages/activityswitcher/contents/ui/ToolBar.qml b/qmlpackages/activityswitcher/contents/ui/ToolBar.qml index d00a3b61..99b6d94f 100644 --- a/qmlpackages/activityswitcher/contents/ui/ToolBar.qml +++ b/qmlpackages/activityswitcher/contents/ui/ToolBar.qml @@ -1,124 +1,124 @@ /* * Copyright 2011 Marco Martin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import Qt 4.7 import org.kde.plasma.core 0.1 as PlasmaCore import org.kde.plasma.components 0.1 as PlasmaComponents import org.kde.plasma.mobilecomponents 0.1 as MobileComponents PlasmaCore.FrameSvgItem { id: actionsToolBar property alias query: filterField.text Connections { target: activitySwitcher onStateChanged: { if (activitySwitcher.state != "AcceptingInput") { filterField.opacity = 0 filterField.text = "" query = "" fakeTextInput.closeSoftwareInputPanel() filterButton.checked = false } } } imagePath: "dialogs/background" enabledBorders: "LeftBorder|TopBorder|BottomBorder" width: childrenRect.width+margins.left+margins.right+60 height: childrenRect.height+margins.top+margins.bottom anchors { top: parent.top right: parent.right } Row { x: actionsToolBar.margins.left+30 y: actionsToolBar.margins.top spacing: 40 MobileComponents.ActionButton { svg: iconsSvg elementId: "add" onClicked: { activitySwitcher.state = "Passive" activitySwitcher.newActivityRequested() } } Item { width: filterField.opacity>0.5?filterField.width+iconSize/2:iconSize height: filterButton.height Item { clip: true anchors { fill: parent rightMargin: iconSize/2 } PlasmaComponents.TextField { id: filterField opacity: 0 width: theme.defaultFont.mSize.width*20 anchors.verticalCenter: parent.verticalCenter Behavior on opacity { NumberAnimation { duration: 250 easing.type: Easing.InOutQuad } } } } Behavior on width { NumberAnimation { duration: 250 easing.type: Easing.InOutQuad } } MobileComponents.ActionButton { id: filterButton svg: iconsSvg elementId: "filter" anchors.right: parent.right toggle: true onClicked: { if (filterField.opacity==1) { filterField.opacity = 0 activitySwitcher.state = "Normal" filterField.text = "" query = "" fakeTextInput.closeSoftwareInputPanel() } else { filterField.opacity = 1 filterField.forceActiveFocus() activitySwitcher.state = "AcceptingInput" fakeTextInput.openSoftwareInputPanel() } //TODO: should get focus } } //FIXME: this dummy text edit is used only to close the on screen keyboard, need QtComponents TextInput{ id: fakeTextInput width: 0 height: 0 } } } -} \ No newline at end of file +} diff --git a/qmlpackages/contour-tablet-homescreen/contents/ui/Shadow.qml b/qmlpackages/contour-tablet-homescreen/contents/ui/Shadow.qml index 3c106caa..681cfdec 100644 --- a/qmlpackages/contour-tablet-homescreen/contents/ui/Shadow.qml +++ b/qmlpackages/contour-tablet-homescreen/contents/ui/Shadow.qml @@ -1,73 +1,73 @@ /*************************************************************************** * Copyright 2010 Marco Martin * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * ***************************************************************************/ import Qt 4.7 Image { id: targetShadow /*source: "images/shadow-top.png" anchors.left: dragger.target.right width: dragger.target.width height: 12*/ state: "invisible" //property string location : "BottomEdge" states: [ State { name: "visible"; PropertyChanges { target: targetShadow; opacity: 1 } }, State { name: "invisible"; PropertyChanges { target: targetShadow; opacity: 0 } } ] transitions: [ Transition { from: "visible"; to: "invisible"; PropertyAnimation { targets: targetShadow; properties: "opacity"; duration: 300; easing.type: "InOutCubic"; } }, Transition { from: "invisible"; to: "visible"; PropertyAnimation { targets: targetShadow; properties: "opacity"; duration: 300; easing.type: "InOutCubic"; } } ] -} \ No newline at end of file +}