[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [lightdm/kb-friendly-userbar] themes/userbar/private: Remove unused copies
From:       Aurélien Gâteau <aurelien.gateau () canonical ! com>
Date:       2012-04-16 23:05:35
Message-ID: 20120416230535.76764A60A9 () git ! kde ! org
[Download RAW message or body]

Git commit e6487b3f3d5c2c7dda13eaa15958e45473f315b6 by Aurélien Gâteau.
Committed on 17/04/2012 at 01:04.
Pushed by gateau into branch 'kb-friendly-userbar'.

Remove unused copies

Those files come from Plasma Components but are not needed by our
copies.

D  +0    -85   themes/userbar/private/AppManager.js
D  +0    -143  themes/userbar/private/DualStateButton.qml
D  +0    -239  themes/userbar/private/PageStack.js
D  +0    -131  themes/userbar/private/RoundShadow.qml
D  +0    -251  themes/userbar/private/ScrollBarDelegate.qml
D  +0    -114  themes/userbar/private/ScrollDecoratorDelegate.qml
D  +0    -71   themes/userbar/private/SectionScroller.js
D  +0    -146  themes/userbar/private/TabBarLayout.qml
D  +0    -115  themes/userbar/private/TabGroup.js

http://commits.kde.org/lightdm/e6487b3f3d5c2c7dda13eaa15958e45473f315b6

diff --git a/themes/userbar/private/AppManager.js b/themes/userbar/private/AppManager.js
deleted file mode 100644
index daed77a..0000000
--- a/themes/userbar/private/AppManager.js
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components project.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-function rootObject() {
-    var next = parent
-    while (next && next.parent)
-        next = next.parent
-    return next
-}
-
-function findParent(child, propertyName) {
-    if (!child)
-        return null
-    var next = child.parent
-    while (next && !next.hasOwnProperty(propertyName))
-        next = next.parent
-    return next
-}
-
-function sceneX(item) {
-    // Binding may cause that this function is evaluated even when item is undefined,
-    // but in that case the Binding isn't active however so we can safely return 0
-    var x = 0
-    if (item) {
-        x = item.x
-        var p = item.parent
-        while (p) {
-            x += p.x
-            p = p.parent
-        }
-    }
-    return x
-}
-
-function sceneY(item) {
-    // Binding may cause that this function is evaluated even when item is undefined,
-    // but in that case the Binding isn't active however so we can safely return 0
-    var y = 0
-    if (item) {
-        y = item.y
-        var p = item.parent
-        while (p) {
-            y += p.y
-            p = p.parent
-        }
-    }
-    return y
-}
diff --git a/themes/userbar/private/DualStateButton.qml \
b/themes/userbar/private/DualStateButton.qml deleted file mode 100644
index 1579e88..0000000
--- a/themes/userbar/private/DualStateButton.qml
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
-*   Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp@gmail.com>
-*
-*   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.
-*/
-
-/**Documented API
-Inherits:
-        Item
-
-Imports:
-        QtQuick 1.0
-        org.kde.plasma.core
-
-Description:
- TODO i need more info here
-
-Properties:
-            bool checked:
-            Returns if the Button is checked or not.
-
-            alias pressed:
-            TODO i need more info here
-
-            alias text:
-            Sets the text for the button
-
-            QtObject theme:
-            TODO needs info
-
-            alias view:
-            TODO needs info
-
-            alias shadow:
-            TODO needs info
-Signals:
-        clicked:
-        The signal is emited when the button is clicked!
-**/
-
-import QtQuick 1.0
-import org.kde.plasma.core 0.1 as PlasmaCore
-
-Item {
-    id: dualButton
-
-    // Common API
-    property bool checked
-    property alias pressed: mouseArea.pressed
-
-    signal clicked()
-
-    // Plasma API
-    property alias text: label.text // TODO: Not yet part of the common API
-    property alias view: surfaceLoader.sourceComponent
-    property alias shadow: shadowLoader.sourceComponent
-
-    width: surfaceLoader.width + label.paintedWidth
-    height: theme.defaultFont.mSize.height*1.6
-    // TODO: needs to define if there will be specific graphics for
-    //     disabled buttons
-    opacity: dualButton.enabled ? 1.0 : 0.5
-
-    function entered() {
-        if (dualButton.enabled) {
-            shadowLoader.state = "hover"
-        }
-    }
-
-    function released() {
-        if (dualButton.enabled) {
-            dualButton.checked = !dualButton.checked;
-            dualButton.clicked();
-        }
-    }
-
-    Keys.onSpacePressed: entered();
-    Keys.onReturnPressed: entered();
-    Keys.onReleased: {
-        if(event.key == Qt.Key_Space ||
-           event.key == Qt.Key_Return)
-            released();
-    }
-
-    Loader {
-        id: shadowLoader
-        anchors.fill: surfaceLoader
-    }
-
-    Loader {
-        id: surfaceLoader
-
-        anchors {
-            verticalCenter: parent.verticalCenter
-            left: text ? parent.left : undefined
-            horizontalCenter: text ? undefined : parent.horizontalCenter
-        }
-    }
-
-    Text {
-        id: label
-
-        text: dualButton.text
-        anchors {
-            top: parent.top
-            bottom: parent.bottom
-            left: surfaceLoader.right
-            right: parent.right
-            //FIXME: see how this margin will be set
-            leftMargin: height/4
-        }
-        color: theme.textColor
-        verticalAlignment: Text.AlignVCenter
-    }
-
-    MouseArea {
-        id: mouseArea
-
-        anchors.fill: parent
-        hoverEnabled: true
-
-        onReleased: dualButton.released();
-        onEntered: dualButton.entered();
-        onPressed: dualButton.forceActiveFocus();
-        onExited: {
-            shadowLoader.state = "shadow"
-        }
-    }
-}
-
diff --git a/themes/userbar/private/PageStack.js b/themes/userbar/private/PageStack.js
deleted file mode 100644
index 827e2e2..0000000
--- a/themes/userbar/private/PageStack.js
+++ /dev/null
@@ -1,239 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components project.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-// Page stack. Items are page containers.
-var pageStack = [];
-
-// Page component cache map. Key is page url, value is page component.
-var componentCache = {};
-
-// Returns the page stack depth.
-function getDepth() {
-    return pageStack.length;
-}
-
-// Pushes a page on the stack.
-function push(page, properties, replace, immediate) {
-    // page order sanity check
-    if ((!replace && page == currentPage)
-        || (replace && pageStack.length > 1
-        && page == pageStack[pageStack.length - 2].page)) {
-        throw new Error("Cannot navigate so that the resulting page stack has two consecutive \
                entries of the same page instance.");
-    }
-
-    // figure out if more than one page is being pushed
-    var pages;
-    if (page instanceof Array) {
-        pages = page;
-        page = pages.pop();
-        if (page.createObject === undefined && page.parent === undefined && typeof page != \
                "string") {
-            properties = properties || page.properties;
-            page = page.page;
-        }
-    }
-
-    // get the current container
-    var oldContainer = pageStack[pageStack.length - 1];
-
-    // pop the old container off the stack if this is a replace
-    if (oldContainer && replace) {
-        pageStack.pop();
-    }
-
-    // push any extra defined pages onto the stack
-    if (pages) {
-        var i;
-        for (i = 0; i < pages.length; i++) {
-            var tPage = pages[i];
-            var tProps;
-            if (tPage.createObject === undefined && tPage.parent === undefined && typeof tPage \
                != "string") {
-                tProps = tPage.properties;
-                tPage = tPage.page;
-            }
-            pageStack.push(initPage(tPage, tProps));
-        }
-    }
-
-    // initialize the page
-    var container = initPage(page, properties);
-
-    // push the page container onto the stack
-    pageStack.push(container);
-
-    depth = pageStack.length;
-    currentPage = container.page;
-
-    // perform page transition
-    immediate = immediate || !oldContainer;
-    var orientationChange = false;
-    if (oldContainer) {
-        orientationChange = orientationChanges(oldContainer.page, container.page);
-        oldContainer.pushExit(replace, immediate, orientationChange);
-    }
-
-    // sync tool bar
-    var tools = container.page.tools || null;
-    if (toolBar) {
-        toolBar.setTools(tools, immediate ? "set" : replace ? "replace" : "push");
-    }
-
-    container.pushEnter(immediate, orientationChange);
-    return container.page;
-}
-
-// Initializes a page and its container.
-function initPage(page, properties) {
-    var container = containerComponent.createObject(root);
-
-    var pageComp;
-    if (page.createObject) {
-        // page defined as component
-        pageComp = page;
-    } else if (typeof page == "string") {
-        // page defined as string (a url)
-        pageComp = componentCache[page];
-        if (!pageComp) {
-            pageComp = componentCache[page] = Qt.createComponent(page);
-        }
-    }
-    if (pageComp) {
-        if (pageComp.status == Component.Error) {
-            throw new Error("Error while loading page: " + pageComp.errorString());
-        } else {
-            // instantiate page from component
-            page = pageComp.createObject(container, properties || {});
-        }
-    } else {
-        // copy properties to the page
-        for (var prop in properties) {
-            if (properties.hasOwnProperty(prop)) {
-                page[prop] = properties[prop];
-            }
-        }
-    }
-
-    container.page = page;
-    if (page.parent == null) {
-        container.owner = container;
-    } else {
-        container.owner = page.parent;
-    }
-
-    // the page has to be reparented if
-    if (page.parent != container) {
-        page.parent = container;
-    }
-
-    if (page.pageStack !== undefined) {
-        page.pageStack = root;
-    }
-
-    page.anchors.fill = container
-
-    return container;
-}
-
-// Pops a page off the stack.
-function pop(page, immediate) {
-    // make sure there are enough pages in the stack to pop
-    if (pageStack.length > 1) {
-        //unwind to itself means no pop
-        if (page !== undefined && page == pageStack[pageStack.length - 1].page) {
-            return
-        }
-        // pop the current container off the stack and get the next container
-        var oldContainer = pageStack.pop();
-        var container = pageStack[pageStack.length - 1];
-        if (page !== undefined) {
-            // an unwind target has been specified - pop until we find it
-            while (page != container.page && pageStack.length > 1) {
-                container.cleanup();
-                pageStack.pop();
-                container = pageStack[pageStack.length - 1];
-            }
-        }
-
-        depth = pageStack.length;
-        currentPage = container.page;
-
-        // perform page transition
-        var orientationChange = orientationChanges(oldContainer.page, container.page);
-        oldContainer.popExit(immediate, orientationChange);
-        container.popEnter(immediate, orientationChange);
-
-        // sync tool bar
-        var tools = container.page.tools || null;
-        if (toolBar) {
-            toolBar.setTools(tools, immediate ? "set" : "pop");
-        }
-        return oldContainer.page;
-    } else {
-        return null;
-    }
-}
-
-// Checks if the orientation changes between oldPage and newPage
-function orientationChanges(oldPage, newPage) {
-    return newPage.orientationLock != PageOrientation.Automatic
-           && newPage.orientationLock != PageOrientation.LockPrevious
-           && newPage.orientationLock != oldPage.orientationLock
-}
-
-// Clears the page stack.
-function clear() {
-    var container;
-    while (container = pageStack.pop()) {
-        container.cleanup();
-    }
-    depth = 0;
-    currentPage = null;
-}
-
-// Iterates through all pages in the stack (top to bottom) to find a page.
-function find(func) {
-    for (var i = pageStack.length - 1; i >= 0; i--) {
-        var page = pageStack[i].page;
-        if (func(page)) {
-            return page;
-        }
-    }
-    return null;
-}
-
diff --git a/themes/userbar/private/RoundShadow.qml b/themes/userbar/private/RoundShadow.qml
deleted file mode 100644
index b94cc6b..0000000
--- a/themes/userbar/private/RoundShadow.qml
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- *   Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp@gmail.com>
- *   Copyright (C) 2011 by Marco Martin <mart@kde.org>
- *
- *   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.
- */
-
-/**Documented API
-Inherits:
-        Item
-
-Imports:
-        QtQuick 1.0
-        org.kde.plasma.core
-
-Description:
-        It is a simple Radio button which is using the plasma theme.
-        TODO Do we need more info?
-
-Properties:
-        TODO needs more info??
-**/
-
-import QtQuick 1.0
-import org.kde.plasma.core 0.1 as PlasmaCore
-
-Item {
-    id: main
-    state: parent.state
-    property alias imagePath: shadowSvg.imagePath
-    property string hoverElement: "hover"
-    property string focusElement: "focus"
-    property alias shadowElement: shadow.elementId
-
-    PlasmaCore.Svg {
-        id: shadowSvg
-        imagePath: "widgets/actionbutton"
-    }
-
-    PlasmaCore.SvgItem {
-        id: hover
-        svg: shadowSvg
-        elementId: "hover"
-
-        anchors.fill: parent
-
-        opacity: 0
-    }
-
-    PlasmaCore.SvgItem {
-        id: shadow
-        svg: shadowSvg
-        elementId: "shadow"
-
-        anchors.fill: parent
-    }
-
-    states: [
-        State {
-            name: "shadow"
-            PropertyChanges {
-                target: shadow
-                opacity: 1
-            }
-            PropertyChanges {
-                target: hover
-                opacity: 0
-                elementId: hoverElement
-            }
-        },
-        State {
-            name: "hover"
-            PropertyChanges {
-                target: shadow
-                opacity: 0
-            }
-            PropertyChanges {
-                target: hover
-                opacity: 1
-                elementId: hoverElement
-            }
-        },
-        State {
-            name: "focus"
-            PropertyChanges {
-                target: shadow
-                opacity: 0
-            }
-            PropertyChanges {
-                target: hover
-                opacity: 1
-                elementId: focusElement
-            }
-        },
-        State {
-            name: "hidden"
-            PropertyChanges {
-                target: shadow
-                opacity: 0
-            }
-            PropertyChanges {
-                target: hover
-                opacity: 0
-                elementId: hoverElement
-            }
-        }
-    ]
-
-    transitions: [
-        Transition {
-            PropertyAnimation {
-                properties: "opacity"
-                duration: 250
-                easing.type: Easing.OutQuad
-            }
-        }
-    ]
-}
diff --git a/themes/userbar/private/ScrollBarDelegate.qml \
b/themes/userbar/private/ScrollBarDelegate.qml deleted file mode 100644
index 15ee7aa..0000000
--- a/themes/userbar/private/ScrollBarDelegate.qml
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
-*   Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp@gmail.com>
-*   Copyright (C) 2011 Marco Martin <mart@kde.org>
-*
-*   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 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.1
-import org.kde.plasma.core 0.1 as PlasmaCore
-
-
-PlasmaCore.FrameSvgItem {
-    id: background
-    anchors.fill: parent
-    imagePath:"widgets/scrollbar"
-    prefix: internalLoader.isVertical ? "background-vertical" : "background-horizontal"
-
-     Keys.onUpPressed: {
-        if (!enabled || !internalLoader.isVertical)
-            return;
-
-        if (inverted)
-            internalLoader.incrementValue(stepSize);
-        else
-            internalLoader.incrementValue(-stepSize);
-    }
-
-    Keys.onDownPressed: {
-        if (!enabled || !internalLoader.isVertical)
-            return;
-
-        if (inverted)
-            internalLoader.incrementValue(-stepSize);
-        else
-            internalLoader.incrementValue(stepSize);
-    }
-
-    Keys.onLeftPressed: {
-        if (!enabled || internalLoader.isVertical)
-            return;
-
-        if (inverted)
-            internalLoader.incrementValue(stepSize);
-        else
-            internalLoader.incrementValue(-stepSize);
-    }
-
-    Keys.onRightPressed: {
-        if (!enabled || internalLoader.isVertical)
-            return;
-
-        if (inverted)
-            internalLoader.incrementValue(-stepSize);
-        else
-            internalLoader.incrementValue(stepSize);
-    }
-
-    property Item handle: handle
-
-    property Item contents: contents
-    Item {
-        id: contents
-        anchors {
-            fill: parent
-            leftMargin: internalLoader.isVertical || stepSize <= 0 ? 0 : leftButton.width
-            rightMargin: internalLoader.isVertical || stepSize <= 0 ? 0 : rightButton.width
-            topMargin: internalLoader.isVertical && stepSize > 0 ? leftButton.height : 0
-            bottomMargin: internalLoader.isVertical && stepSize > 0 ? rightButton.height : 0
-        }
-
-        PlasmaCore.FrameSvgItem {
-            id: handle
-            imagePath:"widgets/scrollbar"
-            prefix: {
-                if (mouseArea.pressed) {
-                    return "sunken-slider"
-                }
-
-                if (scrollbar.activeFocus || mouseArea.containsMouse) {
-                    return "mouseover-slider"
-                } else {
-                    return "slider"
-                }
-            }
-
-            property int length: internalLoader.isVertical? \
flickableItem.visibleArea.heightRatio * parent.height :  flickableItem.visibleArea.widthRatio * \
                parent.width
-
-            width: internalLoader.isVertical ? parent.width : length
-            height: internalLoader.isVertical ? length : parent.height
-        }
-    }
-
-    PlasmaCore.Svg {
-        id: scrollbarSvg
-        imagePath: "widgets/scrollbar"
-    }
-
-    PlasmaCore.SvgItem {
-        id: leftButton
-        visible: stepSize > 0
-
-        anchors {
-            left: internalLoader.isVertical ? undefined : parent.left
-            verticalCenter: internalLoader.isVertical ? undefined : parent.verticalCenter
-            top: internalLoader.isVertical ? parent.top : undefined
-            horizontalCenter: internalLoader.isVertical ? parent.horizontalCenter : undefined
-        }
-        width: 18
-        height: 18
-        svg: scrollbarSvg
-        elementId: {
-            if (leftMouseArea.pressed) {
-                return internalLoader.isVertical ? "sunken-arrow-up" : "sunken-arrow-left"
-            }
-
-            if (scrollbar.activeFocus || leftMouseArea.containsMouse) {
-                return internalLoader.isVertical ? "mouseover-arrow-up" : \
                "mouseover-arrow-left"
-            } else {
-                return internalLoader.isVertical ? "mouseover-arrow-up" : "arrow-left"
-            }
-        }
-
-        MouseArea {
-            id: leftMouseArea
-
-            anchors.fill: parent
-            enabled: scrollbar.enabled
-            Timer {
-                id: leftTimer
-                interval: scrollbar.scrollButtonInterval;
-                running: parent.pressed
-                repeat: true
-                onTriggered: {
-                    background.forceActiveFocus()
-                    if (inverted) {
-                        internalLoader.incrementValue(stepSize);
-                    } else {
-                        internalLoader.incrementValue(-stepSize);
-                    }
-                }
-            }
-        }
-    }
-
-    PlasmaCore.SvgItem {
-        id: rightButton
-        visible: stepSize > 0
-
-        anchors {
-            right: internalLoader.isVertical ? undefined : parent.right
-            verticalCenter: internalLoader.isVertical ? undefined : parent.verticalCenter
-            bottom: internalLoader.isVertical ? parent.bottom : undefined
-            horizontalCenter: internalLoader.isVertical ? parent.horizontalCenter : undefined
-        }
-        width: 18
-        height: 18
-        svg: scrollbarSvg
-        elementId: {
-            if (leftMouseArea.pressed) {
-                return internalLoader.isVertical ? "sunken-arrow-down" : "sunken-arrow-right"
-            }
-
-            if (scrollbar.activeFocus || leftMouseArea.containsMouse) {
-                return internalLoader.isVertical ? "mouseover-arrow-down" : \
                "mouseover-arrow-right"
-            } else {
-                return internalLoader.isVertical ? "mouseover-arrow-down" : "arrow-right"
-            }
-        }
-
-        MouseArea {
-            id: rightMouseArea
-
-            anchors.fill: parent
-            enabled: scrollbar.enabled
-            Timer {
-                id: rightTimer
-                interval: scrollbar.scrollButtonInterval;
-                running: parent.pressed;
-                repeat: true
-                onTriggered: {
-                    background.forceActiveFocus();
-                    if (inverted)
-                        internalLoader.incrementValue(-stepSize);
-                    else
-                        internalLoader.incrementValue(stepSize);
-                }
-            }
-        }
-    }
-
-    property MouseArea mouseArea: mouseArea
-    MouseArea {
-        id: mouseArea
-
-        anchors.fill: contents
-        enabled: scrollbar.enabled
-        hoverEnabled: true
-        drag {
-            target: handle
-            axis: internalLoader.isVertical ? Drag.YAxis : Drag.XAxis
-            minimumX: range.positionAtMinimum
-            maximumX: range.positionAtMaximum
-            minimumY: range.positionAtMinimum
-            maximumY: range.positionAtMaximum
-        }
-
-        onPressed: {
-            if (internalLoader.isVertical) {
-                // Clamp the value
-                var newY = Math.max(mouse.y, drag.minimumY);
-                newY = Math.min(newY, drag.maximumY);
-
-                // Debounce the press: a press event inside the handler will not
-                // change its position, the user needs to drag it.
-                if (newY > handle.y + handle.height) {
-                    handle.y = mouse.y - handle.height
-                } else if (newY < handle.y) {
-                    handle.y = mouse.y
-                }
-            } else {
-                // Clamp the value
-                var newX = Math.max(mouse.x, drag.minimumX);
-                newX = Math.min(newX, drag.maximumX);
-
-                // Debounce the press: a press event inside the handler will not
-                // change its position, the user needs to drag it.
-                if (newX > handle.x + handle.width) {
-                    handle.x = mouse.x - handle.width
-                } else if (newX < handle.x) {
-                    handle.x = mouse.x
-                }
-            }
-
-            background.forceActiveFocus();
-        }
-    }
-}
-
diff --git a/themes/userbar/private/ScrollDecoratorDelegate.qml \
b/themes/userbar/private/ScrollDecoratorDelegate.qml deleted file mode 100644
index 4da4c31..0000000
--- a/themes/userbar/private/ScrollDecoratorDelegate.qml
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
-*   Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp@gmail.com>
-*   Copyright (C) 2011 Marco Martin <mart@kde.org>
-*
-*   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 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.1
-import org.kde.plasma.core 0.1 as PlasmaCore
-
-
-PlasmaCore.FrameSvgItem {
-    id: background
-    anchors.fill: parent
-    imagePath:"widgets/scrollbar"
-    prefix: internalLoader.isVertical ? "background-vertical" : "background-horizontal"
-
-    opacity: 0
-    Behavior on opacity {
-        NumberAnimation {
-            duration: 250
-            easing.type: Easing.OutQuad
-        }
-    }
-
-    property Item handle: handle
-
-    property Item contents: contents
-    Item {
-        id: contents
-        anchors.fill: parent
-
-        PlasmaCore.FrameSvgItem {
-            id: handle
-            imagePath:"widgets/scrollbar"
-            prefix: "slider"
-
-            function length()
-            {
-                var nh, ny;
-
-                if (internalLoader.isVertical) {
-                    nh = flickableItem.visibleArea.heightRatio * internalLoader.height
-                } else {
-                    nh = flickableItem.visibleArea.widthRatio * internalLoader.width
-                }
-
-                if (internalLoader.isVertical) {
-                    ny = flickableItem.visibleArea.yPosition * internalLoader.height
-                } else {
-                    ny = flickableItem.visibleArea.xPosition * internalLoader.width
-                }
-
-                if (ny > 3) {
-                    var t
-
-                    if (internalLoader.isVertical) {
-                        t = Math.ceil(internalLoader.height - 3 - ny)
-                    } else {
-                        t = Math.ceil(internalLoader.width - 3 - ny)
-                    }
-
-                    if (nh > t) {
-                        return t
-                    } else {
-                        return nh
-                    }
-                } else {
-                    return nh + ny
-                }
-            }
-
-            width: internalLoader.isVertical ? parent.width : length()
-            height: internalLoader.isVertical ? length() : parent.height
-        }
-    }
-
-    property MouseArea mouseArea: null
-
-    Connections {
-        target: flickableItem
-        onMovingChanged: {
-            if (flickableItem.moving) {
-                opacityTimer.running = false
-                background.opacity = 1
-            } else {
-                opacityTimer.restart()
-            }
-        }
-    }
-    Timer {
-        id: opacityTimer
-        interval: 500
-        repeat: false
-        running: false
-        onTriggered: {
-            background.opacity = 0
-        }
-    }
-}
-
diff --git a/themes/userbar/private/SectionScroller.js \
b/themes/userbar/private/SectionScroller.js deleted file mode 100644
index 7b987fe..0000000
--- a/themes/userbar/private/SectionScroller.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components project.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-var _sectionData = [];
-var _sections = [];
-
-function initSectionData(list) {
-    if (!list || !list.model) return;
-    _sectionData = [];
-    _sections = [];
-    var current = "";
-    var prop = list.section.property;
-
-    for (var i = 0, count = list.model.count; i < count; i++) {
-        var item = list.model.get(i);
-        if (item[prop] !== current) {
-            current = item[prop];
-            _sections.push(current);
-            _sectionData.push({ index: i, header: current });
-        }
-    }
-}
-
-function closestSection(pos) {
-    var tmp = (_sections.length) * pos;
-    var val = Math.ceil(tmp) // TODO: better algorithm
-    val = val < 2 ? 1 : val;
-    return _sections[val-1];
-}
-
-function indexOf(sectionName) {
-    var val = _sectionData[_sections.indexOf(sectionName)].index;
-    return val === 0 || val > 0 ? val : -1;
-}
diff --git a/themes/userbar/private/TabBarLayout.qml b/themes/userbar/private/TabBarLayout.qml
deleted file mode 100644
index a423885..0000000
--- a/themes/userbar/private/TabBarLayout.qml
+++ /dev/null
@@ -1,146 +0,0 @@
-/****************************************************************************
-**
-** Copyright 2011 Marco Martin <mart@kde.org>
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components project.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/**Documented API
-Inherits:
-        Item
-
-Imports:
-        QtQuick 1.1
-
-Description:
- TODO
-
-Properties:
-
-**/
-
-import QtQuick 1.1
-
-Item {
-    id: root
-
-    Component.onCompleted: priv.layoutChildren()
-    onChildrenChanged: priv.layoutChildren()
-    onWidthChanged: priv.layoutChildren()
-    onHeightChanged: priv.layoutChildren()
-
-    Keys.onPressed: {
-        if (event.key == Qt.Key_Right || event.key == Qt.Key_Left) {
-            if (event.key == Qt.Key_Right || priv.mirrored) {
-                var oldIndex = priv.currentButtonIndex();
-
-                if (oldIndex != root.children.length - 1) {
-                    priv.tabGroup.currentTab = root.children[oldIndex + 1].tab
-                    root.parent.currentTab = root.children[oldIndex + 1]
-                    event.accepted = true
-                }
-            } else if (event.key == Qt.Key_Left || priv.mirrored) {
-                var oldIndex = priv.currentButtonIndex()
-                if (oldIndex != 0) {
-                    priv.tabGroup.currentTab = root.children[oldIndex - 1].tab
-                    root.parent.currentTab = root.children[oldIndex - 1]
-                    event.accepted = true
-                }
-            }
-        }
-    }
-
-    focus: true
-
-    QtObject {
-        id: priv
-        property Item firstButton: root.children.length > 0 ? root.children[0] : null
-        property Item firstTab: firstButton ? (firstButton.tab != null ? firstButton.tab : \
                null) : null
-        property Item tabGroup: firstTab ? (firstTab.parent ? firstTab.parent.parent.parent : \
                null) : null
-        property bool mirrored: root.LayoutMirroring.enabled
-
-        onMirroredChanged: layoutChildren()
-
-        function currentButtonIndex() {
-            for (var i = 0; i < root.children.length; ++i) {
-                if (root.children[i].tab == tabGroup.currentTab)
-                    return i
-            }
-            return -1
-        }
-
-        function layoutChildren() {
-            var childCount = root.children.length
-            var visibleChildCount = childCount
-            var contentWidth = 0
-            var contentHeight = 0
-            if (childCount != 0) {
-                //not too much efficient but the loop over children needs to be done two times \
                to get the proper child width
-                for (var i = 0; i < childCount; ++i) {
-                    if (!root.children[i].visible || root.children[i].text === undefined) {
-                        --visibleChildCount
-                    }
-                }
-                var itemWidth = (root.width - (visibleChildCount-1)*10) / visibleChildCount
-                var itemIndex = mirrored ? childCount - 1 : 0
-                var increment = mirrored ? - 1 : 1
-                var visibleIndex = 0
-
-                for (var i = 0; i < childCount; ++i, itemIndex += increment) {
-                    var child = root.children[itemIndex]
-                    if (!child.visible || root.children[i].text === undefined) {
-                        continue
-                    }
-
-                    child.x = visibleIndex * itemWidth + visibleIndex*10
-                    ++visibleIndex
-                    child.y = 0
-                    child.width = itemWidth
-                    child.height = root.height
-
-                    if (child.implicitWidth != undefined) {
-                        contentWidth = Math.max(contentWidth + i*10, (child.implicitWidth + \
                buttonFrame.margins.left*2 + buttonFrame.margins.right*2) * childCount)
-                        contentHeight = Math.max(contentHeight, (child.implicitHeight + \
                buttonFrame.margins.top + buttonFrame.margins.bottom))
-                    }
-                }
-            }
-            root.implicitWidth = contentWidth
-            root.implicitHeight = contentHeight
-        }
-    }
-}
diff --git a/themes/userbar/private/TabGroup.js b/themes/userbar/private/TabGroup.js
deleted file mode 100644
index da1c654..0000000
--- a/themes/userbar/private/TabGroup.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Components project.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-**   * Redistributions of source code must retain the above copyright
-**     notice, this list of conditions and the following disclaimer.
-**   * Redistributions in binary form must reproduce the above copyright
-**     notice, this list of conditions and the following disclaimer in
-**     the documentation and/or other materials provided with the
-**     distribution.
-**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-**     the names of its contributors may be used to endorse or promote
-**     products derived from this software without specific prior written
-**     permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-var allContainers = []
-var allContents = []
-
-function hasContainer(content) {
-    for (var i = 0; i < allContainers.length; ++i) {
-        if (allContainers[i].children[0] == content)
-            return true
-    }
-    return false
-}
-
-function addContent(content) {
-    for (var i = 0; i < allContents.length; ++i) {
-        if (allContents[i] == content)
-            return false
-    }
-    allContents.push(content)
-    return true
-}
-
-function ensureContainers() {
-    var somethingChanged = false
-
-    // check if we need to create a container
-    for (var i = 0; i < root.privateContents.length; ++i) {
-        var content = root.privateContents[i]
-        addContent(content)
-        if (!hasContainer(content)) {
-            var newContainer = tabContainerComponent.createObject(containerHost)
-            content.parent = newContainer
-            allContainers.push(newContainer)
-            somethingChanged = true
-        }
-    }
-    return somethingChanged
-}
-
-function addTab(content) {
-    if (addContent(content)) {
-        var newContainer = tabContainerComponent.createObject(containerHost)
-        content.parent = newContainer
-        allContainers.push(newContainer)
-    }
-}
-
-function removeTab(content) {
-    var foundIndex = -1
-    for (var i = 0; i < allContents.length && foundIndex == -1; ++i) {
-        if (allContents[i] == content)
-            foundIndex = i
-    }
-
-    if (foundIndex != -1)
-        allContents.splice(foundIndex, 1)
-
-    if (hasContainer(content))
-        content.parent = null // this causes deletion of container
-}
-
-function removeContainer(container) {
-    var foundIndex = -1
-    for (var i = 0; i < allContainers.length && foundIndex == -1; ++i) {
-        if (allContainers[i] == container)
-            foundIndex = i
-    }
-
-    if (foundIndex != -1) {
-        var deletedContainer = allContainers[foundIndex]
-        if (deletedContainer.children.length > 0)
-            removeTab(deletedContainer.children[0])
-        allContainers.splice(foundIndex, 1)
-        deletedContainer.destroy()
-    }
-}
-


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic