From kde-commits Wed May 16 18:14:22 2012 From: Giorgos Tsiapaliwkas Date: Wed, 16 May 2012 18:14:22 +0000 To: kde-commits Subject: [kde-runtime] plasma/declarativeimports/test: Remove declarativeimports/test. Message-Id: <20120516181422.B0176A60A9 () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=133719223329610 Git commit 36788f1ee3bb2c6132d22c5c710b75e16f73e5ee by Giorgos Tsiapaliwkas. Committed on 16/05/2012 at 20:13. Pushed by tsiapaliwkas into branch 'master'. Remove declarativeimports/test. We moved it to kdeexamples D +0 -94 plasma/declarativeimports/test/AppTest.qml D +0 -99 plasma/declarativeimports/test/contents/ui/Busy.qml D +0 -118 plasma/declarativeimports/test/contents/ui/Buttons.qml D +0 -129 plasma/declarativeimports/test/contents/ui/CheckableButtons.= qml D +0 -156 plasma/declarativeimports/test/contents/ui/Gallery.qml D +0 -484 plasma/declarativeimports/test/contents/ui/Locale.qml D +0 -636 plasma/declarativeimports/test/contents/ui/Misc.qml D +0 -154 plasma/declarativeimports/test/contents/ui/Scrollers.qml D +0 -148 plasma/declarativeimports/test/contents/ui/Sliders.qml D +0 -74 plasma/declarativeimports/test/contents/ui/TextEditing.qml D +0 -127 plasma/declarativeimports/test/contents/ui/Texts.qml D +0 -65 plasma/declarativeimports/test/gallery/Extras.qml D +0 -23 plasma/declarativeimports/test/metadata.desktop http://commits.kde.org/kde-runtime/36788f1ee3bb2c6132d22c5c710b75e16f73e5ee diff --git a/plasma/declarativeimports/test/AppTest.qml b/plasma/declarativ= eimports/test/AppTest.qml deleted file mode 100644 index 1ae1fe0..0000000 --- a/plasma/declarativeimports/test/AppTest.qml +++ /dev/null @@ -1,94 +0,0 @@ -// -*- coding: iso-8859-1 -*- -/* - * Copyright 2011 Sebastian K=C3=BCgler - * - * 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.1 -import org.kde.plasma.core 0.1 as PlasmaCore -import org.kde.plasma.components 0.1 as PlasmaComponents -import org.kde.plasma.extras 0.1 as PlasmaExtras - -PlasmaExtras.App { - id: app - width: 800 - height: 600 - - property string formFactor: "tablet" - - navigation: navigationItem - content: contentItem - - Item { - id: navigationItem - width: navigationWidth + space - height: parent.height -// PlasmaExtras.Title { -// text: "Navigation is zoo" -// elide: Text.ElideMiddle -// anchors { top: parent.top; left: parent.left; right: parent= .right; } -// } - Column { - id: navigationColumn - anchors.fill: navigationItem - width: navigationWidth - PlasmaExtras.Title { - width: navigationColumn.width - visible: widthCheck.checked - text: "Navigation Pane." - elide: Text.ElideRight - //anchors { top: parent.top; left: parent.left; topMargin:= 48; } - } - } - PlasmaComponents.CheckBox { - id: widthCheck - text: checked ? "Make big" : " " - //width: navigationWidth - checked: navigationWidth > 200 - anchors { left: parent.left; leftMargin: space; bottomMargin: = space; bottom: parent.bottom; } - onCheckedChanged: { - var w =3D !checked ? 48 : 340; - //print(" new: " + w); - navigationWidth =3D w; - } - //width: contentItem.width - } - //Rectangle { color: "blue"; opacity: 0.3; anchors.fill: parent; } - } - - Loader { - id: contentItem - source: "gallery/Extras.qml" - width: app.width - navigationWidth - space*2 - parent: contentArea - anchors.margins: space*2 - //Rectangle { color: "green"; opacity: 0.8; anchors.fill: contentI= tem; } - } - - onWidthChanged: { - //return; - if (width < 340 + 200) { - //print("window changed: small " + width); - navigationWidth =3D 48; - } else { - //print("window changed: tablet " + width); - navigationWidth =3D 340; - } - widthCheck.checked =3D navigationWidth > 200; - } - -} diff --git a/plasma/declarativeimports/test/contents/ui/Busy.qml b/plasma/d= eclarativeimports/test/contents/ui/Busy.qml deleted file mode 100644 index acf20fe..0000000 --- a/plasma/declarativeimports/test/contents/ui/Busy.qml +++ /dev/null @@ -1,99 +0,0 @@ -/* -* Copyright (C) 2011 by Daker Fernandes Pinheiro -* -* 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.components 0.1 as PlasmaComponents - -PlasmaComponents.Page { - height: childrenRect.height - property int implicitHeight: childrenRect.height - - PlasmaComponents.ToolBarLayout { - id: toolbarlayout - spacing: 5 - PlasmaComponents.ToolButton { - text: "ToolButton" - } - PlasmaComponents.ProgressBar { - value: 0.3 - } - PlasmaComponents.TextField { - text: "Busy widgets" - } - Component.onCompleted: { - app.tools =3D toolbarlayout - } - } - Column { - spacing: 20 - - Text { - font.pixelSize: 20 - text: "Busy Indicator" - } - - PlasmaComponents.BusyIndicator { } - - PlasmaComponents.BusyIndicator { running: true } - - Text { - font.pixelSize: 20 - text: "Progress Bar" - } - - Text { text: "Horizontal" } - - PlasmaComponents.ProgressBar { - value: 0.3 - } - - PlasmaComponents.ProgressBar { - indeterminate: true - } - - PlasmaComponents.ProgressBar { - minimumValue: 0 - maximumValue: 100 - value: 30 - } - - Text { text: "Vertical" } - Row { - spacing: 20 - PlasmaComponents.ProgressBar { - value: 0.3 - orientation: Qt.Vertical - width: 20 - height: 100 - } - PlasmaComponents.ProgressBar { - value: 0.4 - orientation: Qt.Vertical - width: 20 - height: 120 - } - PlasmaComponents.ProgressBar { - orientation: Qt.Vertical - width: 20 - height: 100 - indeterminate: true - } - } - } -} diff --git a/plasma/declarativeimports/test/contents/ui/Buttons.qml b/plasm= a/declarativeimports/test/contents/ui/Buttons.qml deleted file mode 100644 index 176b862..0000000 --- a/plasma/declarativeimports/test/contents/ui/Buttons.qml +++ /dev/null @@ -1,118 +0,0 @@ -/* -* Copyright (C) 2011 by Daker Fernandes Pinheiro -* -* 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.components 0.1 as PlasmaComponents - -PlasmaComponents.Page { - height: childrenRect.height - = - PlasmaComponents.ToolBarLayout { - id: toolbarlayout - spacing: 5 - PlasmaComponents.Button { - text: "Button" - } - PlasmaComponents.Button { - text: "toolbar of the Buttons page" - } - PlasmaComponents.TextField {} - } - Component.onCompleted: { - app.tools =3D toolbarlayout - } - - Column { - spacing: 20 - - Text { - font.pixelSize: 20 - text: "Buttons" - } - - PlasmaComponents.Button { - id: bt1 - width: 140 - height: 30 - text: "Button" - - onClicked: { - console.log("Clicked"); - } - - Keys.onTabPressed: bt2.forceActiveFocus(); - } - - PlasmaComponents.Button { - id: bt2 - width: 140 - height: 30 - text: "Checkable Button" - checkable: true - - onCheckedChanged: { - if (checked) - console.log("Button Checked"); - else - console.log("Button Unchecked"); - } - - Keys.onTabPressed: bt3.forceActiveFocus(); - } - - PlasmaComponents.Button { - id: bt3 - width: 140 - height: 30 - text: "Different Font" - font { - pixelSize: 20 - family: "Helvetica" - } - - Keys.onTabPressed: bt4.forceActiveFocus(); - } - - PlasmaComponents.Button { - id: bt4 - width: 140 - height: 30 - text: "Icon Button" - iconSource: "system-shutdown" - - Keys.onTabPressed: bt5.forceActiveFocus(); - } - - PlasmaComponents.Button { - id: bt5 - width: 140 - height: 30 - iconSource: "system-switch-user" - - Keys.onTabPressed: bt1.forceActiveFocus(); - } - - PlasmaComponents.Button { - width: 140 - height: 30 - text: "Disabled Button" - enabled: false - } - } -} diff --git a/plasma/declarativeimports/test/contents/ui/CheckableButtons.qm= l b/plasma/declarativeimports/test/contents/ui/CheckableButtons.qml deleted file mode 100644 index 0b3cd5e..0000000 --- a/plasma/declarativeimports/test/contents/ui/CheckableButtons.qml +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Copyright (C) 2011 by Daker Fernandes Pinheiro -* -* 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.components 0.1 as PlasmaComponents - - -PlasmaComponents.Page { - height: childrenRect.height - property int implicitHeight: childrenRect.height - - PlasmaComponents.ToolBarLayout { - id: toolbarlayout - spacing: 5 - PlasmaComponents.ToolButton { - text: "ToolButton" - } - PlasmaComponents.CheckBox { - text: "Checkbox in the toolbar" - } - PlasmaComponents.TextField { - text: "hello" - } - Component.onCompleted: { - app.tools =3D toolbarlayout - } - } - Column { - spacing: 20 - - Text { - font.pixelSize: 20 - text: "Check Box" - } - - PlasmaComponents.CheckBox { - width: 140 - height: 30 - text: "Check Box 1" - - onCheckedChanged: { - if (checked) - console.log("CheckBox checked"); - else - console.log("CheckBox unchecked"); - } - onClicked: { - console.log("CheckBox clicked"); - } - } - - PlasmaComponents.CheckBox { - height: 30 - text: "Disabled" - enabled: false - } - - PlasmaComponents.CheckBox { - height: 30 - text: "" - } - - PlasmaComponents.CheckBox { - height: 30 - text: "A loooooooooooooong text" - } - - Text { - font.pixelSize: 20 - text: "Radio Button" - } - - PlasmaComponents.RadioButton { - width: 140 - height: 30 - text: "RadioButton" - - onCheckedChanged: { - if (checked) - console.log("RadioButton Checked"); - else - console.log("RadioButton Unchecked"); - } - } - - PlasmaComponents.Switch { } - - Text { - font.pixelSize: 20 - text: "Button Row" - } - - PlasmaComponents.ButtonRow { - spacing: 20 - PlasmaComponents.RadioButton { text: "A" } - PlasmaComponents.RadioButton { text: "B" } - PlasmaComponents.RadioButton { text: "C" } - } - - Text { - font.pixelSize: 20 - text: "Button Column" - } - - PlasmaComponents.ButtonColumn { - spacing: 20 - PlasmaComponents.RadioButton { text: "Alice" } - PlasmaComponents.RadioButton { text: "Bob" } - PlasmaComponents.RadioButton { text: "Charles" } - } - - } -} diff --git a/plasma/declarativeimports/test/contents/ui/Gallery.qml b/plasm= a/declarativeimports/test/contents/ui/Gallery.qml deleted file mode 100644 index 29a4f8d..0000000 --- a/plasma/declarativeimports/test/contents/ui/Gallery.qml +++ /dev/null @@ -1,156 +0,0 @@ -/* -* Copyright (C) 2011 by Daker Fernandes Pinheiro -* -* 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.components 0.1 -import org.kde.plasma.extras 0.1 as PlasmaExtras - -PlasmaExtras.App { - id: app - width: 1000 - height: 600 - navigationWidth: 200 - - property string formFactor: "tablet" - - navigation: pageSelector - content: page - - ListView { - id: pageSelector - width: navigationWidth - anchors { - fill: parent - top: content.top - bottom: parent.bottom - left: parent.left - right: parent.right - } - model: ListModel { - id: pagesModel - ListElement { - page: "Buttons.qml" - title: "Buttons" - } - ListElement { - page: "CheckableButtons.qml" - title: "Checkable buttons" - } - ListElement { - page: "Busy.qml" - title: "Busy indicators" - } - ListElement { - page: "Sliders.qml" - title: "Sliders" - } - ListElement { - page: "Scrollers.qml" - title: "Scrollers" - } - ListElement { - page: "Texts.qml" - title: "Text elements" - } - ListElement { - page: "TextEditing.qml" - title: "Text Editing" - } - ListElement { - page: "Misc.qml" - title: "Misc stuff" - } - ListElement { - page: "Extras.qml" - title: "Extras" - } - ListElement { - page: "Locale.qml" - title: "Locale stuff" - } - } - delegate: ListItem { - enabled: true - Column { - Label { - text: title - } - } - onClicked: pageStack.replace(Qt.createComponent(page)) - } - } - - Flickable { - id: page - clip: true - width: app.contentWidth - -// anchors { -// top: toolBar.bottom -// left: pageSelector.right -// right: verticalScrollBar.left -// bottom: horizontalScrollBar.top -// leftMargin: 5 -// rightMargin: 5 -// topMargin: 5 -// bottomMargin: 5 -// } - anchors.fill: parent - contentWidth: app.contentWidth - contentHeight: pageStack.currentPage.implicitHeight - - PageStack { - id: pageStack - //toolBar: app.toolBar - //width: page.width - width: contentWidth - height: currentPage.implicitHeight - initialPage: Qt.createComponent("Buttons.qml") - } - - } - - ScrollBar { - id: horizontalScrollBar - - stepSize: 30 - - flickableItem: page - orientation: Qt.Horizontal - anchors { - left: parent.left - right: verticalScrollBar.left - bottom: parent.bottom - } - } - - ScrollBar { - id: verticalScrollBar - - stepSize: 30 - - orientation: Qt.Vertical - flickableItem: page - anchors { - top: content.top - right: parent.right - bottom: horizontalScrollBar.top - } - } -} diff --git a/plasma/declarativeimports/test/contents/ui/Locale.qml b/plasma= /declarativeimports/test/contents/ui/Locale.qml deleted file mode 100644 index 3110e91..0000000 --- a/plasma/declarativeimports/test/contents/ui/Locale.qml +++ /dev/null @@ -1,484 +0,0 @@ -// -*- coding: iso-8859-1 -*- -/* - * Author: Giorgos Tsiapaliwkas - * Date: Wed Feb 15 2012, 18:28:32 - * - * 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.components 0.1 as PlasmaComponents -import org.kde.plasma.locale 0.1 - -Item { - id: root - property int minimumHeight: 200 - property int minimumWidth: 500 - Column { - id: column - width: parent.width - height: parent.height - anchors.horizontalCenter: root.horizontalCenter - spacing: 20 - Text { - id: text1 - anchors.horizontalCenter: column.horizontalCenter - text: "This is a test plasmoid for the locale bindings" - color: "black" - } - - Text { - id: text2 - anchors.horizontalCenter: column.horizontalCenter - text: "If you see this text,that means that every " + - " non printable property/method has been already set. And it w= orks!!" - color: "black" - } - - PlasmaComponents.Button { - id: bt1 - anchors.horizontalCenter: column.horizontalCenter - text: "click in order to test the Locale component" - onClicked:{ - console.log("=3D=3D=3D=3D=3DLocale Component=3D=3D=3D=3D") - console.log("country:" + locale.country) - - locale.binaryUnitDialect =3D Locale.IECBinaryDialect - locale.calendarSystem =3D Locale.CopticCalendar - - locale.countryDivisionCode =3D "AL" - console.log("countryDivisionCode:" + locale.countryDivisio= nCode) - - console.log("currencyCode:" + locale.currencyCode) - - locale.currencySymbol =3D "$" - console.log("currencySymbol:" + locale.currencySymbol) - - locale.dateTimeDigitSet =3D Locale.EasternArabicIndicDigits - - locale.dateFormat =3D "Y" - console.log("dateFormat:" + locale.dateFormat) - - locale.dateFormatShort =3D "Y" - console.log("dateFormatShort:" + locale.dateFormatShort) - - locale.dateMonthNamePossessive =3D false - console.log("dateMonthNamePossessive:" + locale.dateMonthN= amePossessive) - - locale.decimalPlaces =3D 2 - console.log("decimalPlaces:" + locale.decimalPlaces) - - locale.decimalSymbol =3D "." - console.log("decimalSymbol:" + locale.decimalSymbol) - - locale.digitSet =3D Locale.EasternArabicIndicDigits - console.log("digitSet:" + locale.digitSet) - - console.log("language:" + locale.language) - - locale.measureSystem =3D Locale.Imperial - - locale.monetaryDecimalPlaces =3D 3 - console.log("monetaryDecimalPlaces:" + locale.monetaryDeci= malPlaces) - - locale.monetaryDecimalSymbol =3D "." - console.log("monetaryDecimalSymbol:" + locale.monetaryDeci= malSymbol) - - locale.monetaryDigitSet =3D Locale.EasternArabicIndicDigits - - locale.monetaryThousandsSeparator =3D "." - console.log("monetaryThousandsSeparator:" + locale.monetar= yThousandsSeparator) - - locale.negativeMonetarySignPosition =3D Locale.AfterMoney - - locale.negativePrefixCurrencySymbol =3D false - console.log("negativePrefixCurrencySymbol:" + locale.negat= ivePrefixCurrencySymbol) - - locale.negativeSign =3D "-" - console.log("negativeSign:" + locale.negativeSign) - - locale.pageSize =3D 6 - console.log("pageSize:" + locale.pageSize) - - locale.positiveMonetarySignPosition =3D Locale.AfterMoney - - locale.positivePrefixCurrencySymbol =3D false - console.log("positivePrefixCurrencySymbol:" + locale.posit= ivePrefixCurrencySymbol) - - locale.positiveSign =3D "+" - console.log("positiveSign:" + locale.positiveSign) - - locale.thousandsSeparator =3D "." - console.log("thousandsSeparator:" + locale.thousandsSepara= tor) - - locale.weekDayOfPray =3D 10 - console.log("weekDayOfPray:" + locale.weekDayOfPray) - - locale.weekNumberSystem =3D Locale.FirstFullWeek - - locale.weekStartDay =3D 3 - console.log("weekStartDay:" + locale.weekStartDay) - - locale.workingWeekEndDay =3D 6 - console.log("workingWeekEndDay:" + locale.workingWeekEndDa= y) - - locale.workingWeekStartDay =3D 2 - console.log("workingWeekStartDay:" + locale.workingWeekEnd= Day) - - console.log("use12Clock:" + locale.use12Clock) - - console.log("defaultLanguage:" + locale.defaultLanguage) - - console.log("defaultCountry:" + locale.defaultCountry) - - console.log("defaultCurrencyCode:" + locale.defaultCurrenc= yCode) - - console.log("the useTranscript:" + locale.useTranscript) - - console.log("the encodingMib:" + locale.encodingMib) - - for (var i in locale.languageList) { - console.log("languageList:" + locale.languageList[i]) - } - - for (var i in locale.currencyCodeList) { - console.log("currencyCodeList:" + locale.currencyCodeL= ist[i]) - } - - for (var i in locale.installedLanguages) { - console.log("installedLanguages:" + locale.installedLa= nguages[i]) - } - - for (var i in locale.allCountriesList) { - console.log("allCountriesList:" + locale.allCountriesL= ist[i]) - } - - console.log("formatDate:" + locale.formatDate("2010-05-05"= )) - - console.log("formatDateTime:" + locale.formatDateTime("201= 0-05-05")) - - console.log("formatMoney:" + locale.formatMoney(10)) - - console.log("formatLong:" + locale.formatLong(10)) - - console.log("formatByteSize:" + locale.formatByteSize(10)) - - console.log("formatDuration:" + locale.formatDuration(10)) - - console.log("prettyFormatDuration:" + locale.prettyFormatD= uration(10)) - - console.log("formatLocaleTime:" + locale.formatLocaleTime(= "11:12:13")) - - console.log("dayPeriodText:" + locale.dayPeriodText("11:22= :33")) - - console.log("readMoney:" + locale.readMoney("$ 21")) - - console.log("readNumber:" + locale.readNumber(10.0,3)) - - console.log("readDate:" + locale.readDate("2004-02-01", Lo= cale.IsoFormat)) - - console.log("readTime:" + locale.readTime("11:22:33 AM")) - - console.log("readLocaleTime:" + locale.readLocaleTime("11:= 12:13 AM")) - - console.log("fileEncodingMib:" + locale.fileEncodingMib) - - console.log("languageCodeToName:" + locale.languageCodeToN= ame("en_US")) - - console.log("isApplicationTranslatedInto:" + locale.isAppl= icationTranslatedInto("en_US")) - - console.log("removeAcceleratorMarker:" + locale.removeAcce= leratorMarker("&*hello")) - - console.log("convertDigits:" + locale.convertDigits(locale= .digitSet, Locale.ArabicDigits)) - - for (var i in locale.allDigitSetsList) { - console.log("allDigitSetsList:" + locale.allDigitSetsL= ist[i]) - } - - console.log("=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3Dend=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D") - } - } - - PlasmaComponents.Button { - id: bt2 - property variant hash - anchors.horizontalCenter: column.horizontalCenter - text: "click in order to test the CalendarSystem component" - onClicked:{ - console.log("=3D=3D=3D=3D=3DCalendarSystem Component=3D=3D= =3D=3D") - - console.log("calendarLabel:" + calendar.calendarLabel) - - console.log("epoch:" + calendar.epoch) - - console.log("earliestValidDate:" + calendar.earliestValidD= ate) - - console.log("latestValidDate:" + calendar.latestValidDate) - - console.log("shortYearWindowStartYear:" + calendar.shortYe= arWindowStartYear) - - console.log("weekStartDay:" + locale.weekStartDay) - - console.log("isLunar:" + calendar.isLunar) - - console.log("isLunisolar:" + calendar.isLunisolar) - - console.log("isSolar:" + calendar.isSolar) - - console.log("isProleptic:" + calendar.isProleptic) - //Q_INVOKABLE methods - - console.log("isValidIsoWeekDate:" + calendar.isValidIsoWee= kDate(2012, 2, 3)) - - console.log("isValid:" + calendar.isValid("2012-02-03")) - - console.log("year:" + calendar.year("2012-02-03")) - - console.log("month:" + calendar.month("2012-02-03")) - - console.log("day:" + calendar.day("2012-02-03")) - - console.log("eraName:" + calendar.eraName("2012-02-03")) - - console.log("eraYear:" + calendar.eraYear("2012-02-03")) - - console.log("yearInEra:" + calendar.yearInEra("2012-02-03"= )) - - console.log("addYears:" + calendar.addYears("2012-02-03", = 3)) - - console.log("addMonthss:" + calendar.addMonths("2012-02-03= ", 3)) - - console.log("addDays:" + calendar.addDays("2012-02-03", 3)) - - console.log("yearsDifference:" + calendar.yearsDifference(= "2010-02-03", "2012-02-03")) - - console.log("monthsDifference:" + calendar.monthsDifferenc= e("2012-02-03", "2012-04-03")) - - console.log("daysDifference:" + calendar.daysDifference("2= 012-02-03", "2012-02-13")) - - console.log("monthsInYear:" + calendar.monthsInYear(2012)) - - console.log("weeksInYear:" + calendar.weeksInYear(2012, Ca= lendarSystem.SimpleWeek)) - - console.log("daysInYear:" + calendar.daysInYear("2012-02-0= 3")) - - console.log("daysInMonth:" + calendar.daysInMonth(2012, 8)) - - console.log("daysInWeek:" + calendar.daysInWeek("2012-02-0= 3")) - - console.log("dayOfYear:" + calendar.dayOfYear("2012-02-03"= )) - - console.log("week:" + calendar.week("2012-02-03", Calendar= System.SimpleWeek)) - - console.log("isLeapYear:" + calendar.isLeapYear(2012)) - - console.log("firstDayOfYear:" + calendar.firstDayOfYear(20= 12)) - - console.log("lastDayOfYear:" + calendar.lastDayOfYear(2012= )) - - console.log("firstDayOfMonth:" + calendar.firstDayOfMonth(= 2012, 02)) - - console.log("lastDayOfMonth:" + calendar.lastDayOfMonth(20= 12, 02)) - - console.log("monthName:" + calendar.monthName(02, 2012)) - - console.log("weekDayName:" + calendar.weekDayName(3)) - - console.log("formatDate:" + calendar.formatDate("2012-02-0= 3", CalendarSystem.Year, CalendarSystem.ShortNumber, CalendarSystem.SimpleW= eek)) - - console.log("readDate:" + calendar.readDate("2012-02-03", = CalendarSystem.IsoFormat)) - - console.log("applyShortYearWindow:" + calendar.applyShortY= earWindow(50)) - - console.log("calendarSystem:" + calendar.calendarSystem) - console.log("getDate:") - hash =3D calendar.getDate("2012-02-03") - for (var i in hash) { - console.log(" " + i, "=3D", hash[i]) - } - - console.log("dateDifference:") - hash =3D calendar.dateDifference("2012-01-01", "2014-03-03= ") - for (var i in hash) { - console.log(" " + i, "=3D", hash[i]) - } - - for (var i in calendar.calendarSystemsList) { - console.log("calendarSystemsList:" + calendar.calendar= SystemsList[i]) - } - - console.log("=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= end=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D") - } - } - - Locale { - id: locale - - binaryUnitDialect: Locale.DefaultBinaryUnits - onBinaryUnitDialectChanged: { - console.log("the binaryUnitDialect property has been changed") - } - - calendarSystem: Locale.QDateCalendar - onCalendarSystemChanged: { - console.log("the calendarSystem property has been changed") - } - - onCurrencyCodeChanged: { - console.log("the currencyCode property has been changed") - } - - currencySymbol: "$" - onCurrencySymbolChanged: { - console.log("the currencySymbol property has been changed") - } - - countryDivisionCode: "AD" - onCountryDivisionCodeChanged: { - console.log("the countryDivisionCode property has been cha= nged") - } - - dateFormat: "y" - onDateFormatChanged: { - console.log("the dateFormat property has been changed") - } - - dateFormatShort: "y" - onDateFormatShortChanged: { - console.log("the dateFormatShort property has been changed= ") - } - - dateMonthNamePossessive: true - onDateMonthNamePossessiveChanged: { - console.log("the dateMonthNamePossessive property has been= changed") - } - - dateTimeDigitSet: Locale.ArabicDigits - onDateTimeDigitSetChanged: { - console.log("the dateTimeDigitSet property has been change= d") - } - - decimalPlaces: 1 - onDecimalPlacesChanged: { - console.log("the decimalPlaces property has been changed") - } - - decimalSymbol: "," - onDecimalSymbolChanged: { - console.log("the decimalSymbol property has been changed") - } - - digitSet: Locale.ArabicDigits - onDigitSetChanged: { - console.log("the digitSet property has been changed") - } - - measureSystem: Locale.Metric - onMeasureSystemChanged: { - console.log("the measureSystem property has been changed") - } - - monetaryDecimalPlaces: 2 - onMonetaryDecimalPlacesChanged: { - console.log("the monetaryDecimalPlaces property has been c= hanged") - } - - monetaryDecimalSymbol: "," - onMonetaryDecimalSymbolChanged: { - console.log("the monetaryDecimalSymbol property has been c= hanged") - } - - monetaryDigitSet: Locale.ArabicDigits - onMonetaryDigitSetChanged: { - console.log("the monetaryDigitSet property has been change= d") - } - - monetaryThousandsSeparator: "," - onMonetaryThousandsSeparatorChanged: { - console.log("the monetaryThousandsSeparator property has b= een changed") - } - - negativeMonetarySignPosition: Locale.ParensAround - onNegativeMonetarySignPositionChanged: { - console.log("the negativeMonetarySignPosition property has= been changed") - } - - negativePrefixCurrencySymbol: true - onNegativePrefixCurrencySymbolChanged: { - console.log("the negativePrefixCurrencySymbol property has= been changed") - } - - negativeSign: "-----" - onNegativeSignChanged: { - console.log("the negativeSign property has been changed") - } - - pageSize: 5 - onPageSizeChanged: { - console.log("the pageSign property has been changed") - } - - positiveMonetarySignPosition: Locale.ParensAround - onPositiveMonetarySignPositionChanged: { - console.log("the positiveMonetarySignPosition property has= been changed") - } - - positivePrefixCurrencySymbol: true - onPositivePrefixCurrencySymbolChanged: { - console.log("the positivePrefixCurrencySymbol property has= been changed") - } - - positiveSign: " " - onPositiveSignChanged: { - console.log("the positiveSign property has been changed") - } - - thousandsSeparator: "," - onThousandsSeparatorChanged: { - console.log("the thousandsSeparator property has been chan= ged") - } - - weekDayOfPray: 20 - onWeekDayOfPrayChanged: { - console.log("the weekDayOfPray property has been changed") - } - - weekNumberSystem: Locale.IsoWeekNumber - onWeekNumberSystemChanged: { - console.log("the weekNumberSystem property has been change= d") - } - - weekStartDay: 2 - onWeekStartDayChanged: { - console.log("the weekStartDay property has been changed") - } - - workingWeekEndDay: 5 - onWorkingWeekEndDayChanged: { - console.log("the workingWeekEndDay property has been chang= ed") - } - - workingWeekStartDay: 1 - onWorkingWeekStartDayChanged: { - console.log("the workingWeekStartDay property has been cha= nged") - } - } - - CalendarSystem { - id: calendar - } - } -} diff --git a/plasma/declarativeimports/test/contents/ui/Misc.qml b/plasma/d= eclarativeimports/test/contents/ui/Misc.qml deleted file mode 100644 index 739a0e4..0000000 --- a/plasma/declarativeimports/test/contents/ui/Misc.qml +++ /dev/null @@ -1,636 +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$ -** -**************************************************************************= **/ - -import QtQuick 1.1 -import org.kde.plasma.components 0.1 - - -Column { - id: column - - // for demonstration and testing purposes each component needs to - // set its inverted state explicitly - property bool childrenInverted: false - property bool windowInverted: false - - spacing: 14 - - Label { - anchors.horizontalCenter: parent.horizontalCenter - text: "Qt Components " + (enabled ? "(enabled)" : "(disabled)") - } - - Button { - anchors.horizontalCenter: parent.horizontalCenter - text: "Push me" - width: parent.width - parent.spacing - } - - TextField { - anchors.horizontalCenter: parent.horizontalCenter - placeholderText: "TextField" - width: parent.width - parent.spacing - } - - TextField { - id: clearable - anchors.horizontalCenter: parent.horizontalCenter - placeholderText: "Clearable TextField" - text: "Clearable TextField" - width: parent.width - parent.spacing - - Image { - id: clearText - anchors { top: parent.top; right: parent.right; margins: 6 } - fillMode: Image.PreserveAspectFit - smooth: true; visible: parent.text - source: "qrc:close_stop.svg" - height: parent.height - 6 - width: parent.height - 6 - - MouseArea { - id: clear - anchors { horizontalCenter: parent.horizontalCenter; verti= calCenter: parent.verticalCenter } - height: clearable.height; width: clearable.height - onClicked: clearable.text =3D "" - } - } - } - - TextField { - id: customOperation - anchors.horizontalCenter: parent.horizontalCenter - placeholderText: "Custom operation" - width: parent.width - parent.spacing - - Image { - id: addText - anchors { top: parent.top; right: parent.right } - smooth: true - fillMode: Image.PreserveAspectFit - source: "qrc:ok.svg" - height: parent.height; width: parent.height - scale: LayoutMirroring.enabled ? -1 : 1 - - MouseArea { - id: add - anchors.fill: parent - onClicked: textSelection.open() - } - - SelectionDialog { - id: textSelection - titleText: "Preset Texts" - selectedIndex: -1 - model: ListModel { - ListElement { name: "Lorem ipsum." } - ListElement { name: "Lorem ipsum dolor sit amet." } - ListElement { name: "Lorem ipsum dolor sit amet ipsum.= " } - } - - onAccepted: { - customOperation.text =3D textSelection.model.get(textS= election.selectedIndex).name - customOperation.forceActiveFocus() - } - - onRejected: selectedIndex =3D -1 - } - } - } - - TextArea { - anchors.horizontalCenter: parent.horizontalCenter - placeholderText: "This is a\n multiline control." - width: parent.width - parent.spacing; height: 280 - } - - Slider { - anchors.horizontalCenter: parent.horizontalCenter - value: 50 - } - - ButtonRow { - anchors.horizontalCenter: parent.horizontalCenter - spacing: parent.spacing - - exclusive: true - - RadioButton { - } - - RadioButton { - } - } - - Row { - anchors.horizontalCenter: parent.horizontalCenter - spacing: parent.spacing - - CheckBox { - } - - CheckBox { - checked: true - } - } - - Switch { - anchors.horizontalCenter: parent.horizontalCenter - } - - ProgressBar { - anchors.horizontalCenter: parent.horizontalCenter - - Timer { - running: true - repeat: true - interval: 100 - onTriggered: parent.value =3D (parent.value + 1) % 1.1 - } - } - - ProgressBar { - anchors.horizontalCenter: parent.horizontalCenter - indeterminate: true - } - - Component { - id: dialogComponent - CommonDialog { - id: dialog - titleText: "CommonDialog" - buttonTexts: ["Ok", "Cancel"] - - content: Text { - text: "This is the content" - font { bold: true; pixelSize: 16 } - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - } - } - } - - Button { - property CommonDialog dialog - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - parent.spacing - text: "CommonDialog" - onClicked: { - if (!dialog) - dialog =3D dialogComponent.createObject(column) - dialog.open() - } - } - - Component { - id: singleSelectionDialogComponent - SelectionDialog { - titleText: "Select background color" - selectedIndex: 1 - - model: ListModel { - id: colorModel - - ListElement { name: "Red" } - ListElement { name: "Blue" } - ListElement { name: "Green" } - ListElement { name: "Yellow" } - ListElement { name: "Black" } - ListElement { name: "White" } - ListElement { name: "Grey" } - ListElement { name: "Orange" } - ListElement { name: "Pink" } - } - - onAccepted: { selectionDialogButton.parent.color =3D colorMode= l.get(selectedIndex).name } - } - } - - Rectangle { - anchors.horizontalCenter: parent.horizontalCenter - height: selectionDialogButton.height - width: parent.width - parent.spacing - radius: 10 - - Button { - id: selectionDialogButton - property SelectionDialog singleSelectionDialog - anchors.centerIn: parent - text: "Selection Dialog" - onClicked: { - if (!singleSelectionDialog) - singleSelectionDialog =3D singleSelectionDialogCompone= nt.createObject(column) - singleSelectionDialog.open() - } - } - } - - Button { - property QueryDialog queryDialog - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - parent.spacing - text: "QueryDialog" - onClicked: { - if (!queryDialog) - queryDialog =3D queryDialogComponent.createObject(column) - queryDialog.open() - } - } - - Component { - id: queryDialogComponent - QueryDialog { - titleText: "Query Dialog" - // Arabic character in the beginning to test right-to-left UI = alignment - message: (LayoutMirroring.enabled ? "\u062a" : "") + "Lorem ip= sum dolor sit amet, consectetur adipisici elit," - + "sed eiusmod tempor incidunt ut labore et dolore ma= gna aliqua." - + "Ut enim ad minim veniam, quis nostrud exercitation= ullamco laboris" - + "nisi ut aliquid ex ea commodi consequat. Quis aute= iure reprehenderit" - + "in voluptate velit esse cillum dolore eu fugiat nu= lla pariatur." - + "Excepteur sint obcaecat cupiditat non proident, su= nt in culpa qui" - + "officia deserunt mollit anim id est laborum." - - acceptButtonText: "Ok" - rejectButtonText: "Cancel" - - titleIcon: "kmail" - } - } - - Rectangle { - anchors.horizontalCenter: parent.horizontalCenter - height: contentMenuButton.height - width: parent.width - parent.spacing - radius: 10 - - Button { - id: contentMenuButton - property ContextMenu contextMenu - anchors.horizontalCenter: parent.horizontalCenter - text: "ContextMenu" - onClicked: { - if (!contextMenu) - contextMenu =3D contextMenuComponent.createObject(cont= entMenuButton) - contextMenu.open() - } - } - } - - Component { - id: contextMenuComponent - ContextMenu { - MenuItem { - text: "White" - onClicked: contentMenuButton.parent.color =3D "White" - } - MenuItem { - text: "Red" - onClicked: contentMenuButton.parent.color =3D "Red" - } - MenuItem { - text: "LightBlue" - onClicked: contentMenuButton.parent.color =3D "LightBlue" - } - MenuItem { - text: "LightGreen" - onClicked: contentMenuButton.parent.color =3D "LightGreen" - } - } - } - - ListView { - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - parent.spacing; height: 120 - clip: true - delegate: listDelegate - model: listModel - header: listHeading - } - - ListModel { - id: listModel - - ListElement { - titleText: "Title" - subTitleText: "SubTitle" - } - ListElement { - titleText: "Title2" - subTitleText: "SubTitle" - } - ListElement { - titleText: "Title3" - subTitleText: "SubTitle" - } - } - - Component { - id: listHeading - Label { - text: "Heading" - } - } - - Component { - id: listDelegate - ListItem { - id: listItem - Column { - - Label { - text: titleText - } - Label { - text: subTitleText - } - } - } - } - - Label { - property SelectionDialog selectionDialog - text: { - if (selectionDialog) { - if (selectionDialog.selectedIndex >=3D 0) - return selectionDialog.model.get(selectionDialog.selec= tedIndex).name - } - return "Three" - } - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - parent.spacing - - MouseArea { - anchors.fill: parent - onClicked: { - if (!selectionDialog) - selectionDialog =3D selectionDialogComponent.createObj= ect(column) - selectionDialog.open() - } - } - - Component { - id: selectionDialogComponent - SelectionDialog { - titleText: "Select" - selectedIndex: 2 - model: ListModel { - ListElement { name: "One" } - ListElement { name: "Two" } - ListElement { name: "Three" } - ListElement { name: "Four" } - ListElement { name: "Five" } - ListElement { name: "Six" } - ListElement { name: "Seven" } - ListElement { name: "Eight" } - ListElement { name: "Nine" } - } - } - } - } - - - TabBar { - //width: parent.width - parent.spacing - //height: 50 - anchors.horizontalCenter: parent.horizontalCenter - TabButton { tab: tab1content; text: "1"; iconSource: "qrc:close_st= op.svg"} - TabButton { tab: tab2content; text: "2"; iconSource: "konqueror"} - TabButton { tab: tab3content; text: "3"} - } - - TabGroup { - height: 100 - width: parent.width - parent.spacing - Button { id: tab1content; text: "tab1" } - Text { - id: tab2content - text: "tab2" - horizontalAlignment: "AlignHCenter" - verticalAlignment: "AlignVCenter" - } - Page { - id: tab3content - width: 50 - height: 32 - CheckBox { anchors.fill: parent; text: "tab3"} - } - } - - ToolButton { - id: toolButton - text: "ToolButton" - iconSource: "konqueror" - } - - ToolButton { - id: toolButton2 - flat: true - iconSource: "qrc:ok.svg" - } - - ToolButton { - id: toolButton3 - text: "ToolButton" - iconSource: "qrc:close_stop.svg" - } - - Row { - spacing: 5 - - BusyIndicator { - id: busyInd1 - width: 20 - height: 20 - running: true - } - - BusyIndicator { - // default width/height is 40 - id: busyInd2 - running: true - } - - BusyIndicator { - id: busyInd3 - width: 60 - height: 60 - running: true - } - - Button { - text: "Toggle" - onClicked: { - busyInd1.running =3D !busyInd1.running - busyInd2.running =3D !busyInd2.running - busyInd3.running =3D !busyInd3.running - } - } - } - - Button { - property CommonDialog sectionScroll - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width - parent.spacing - text: "SectionScroller" - iconSource: "konqueror" - onClicked: { - if (!sectionScroll) - sectionScroll =3D sectionScrollComponent.createObject(colu= mn) - sectionScroll.open() - } - } - - Component { - id: sectionScrollComponent - CommonDialog { - id: sectionScroll - titleText: "Section Scroller" - buttonTexts: ["Close"] - onButtonClicked: close() - - content: Rectangle { - color: Qr.rgba(1,1,1,0.8) - width: parent.width - implicitHeight: 300 - - ListModel { - id: testModel - ListElement { name: "A Cat 1"; alphabet: "A" } - ListElement { name: "A Cat 2"; alphabet: "A" } - ListElement { name: "Boo 1"; alphabet: "B" } - ListElement { name: "Boo 2"; alphabet: "B" } - ListElement { name: "Cat 1"; alphabet: "C" } - ListElement { name: "Cat 2"; alphabet: "C" } - ListElement { name: "Dog 1"; alphabet: "D" } - ListElement { name: "Dog 2"; alphabet: "D" } - ListElement { name: "Dog 3"; alphabet: "D" } - ListElement { name: "Dog 4"; alphabet: "D" } - ListElement { name: "Dog 5"; alphabet: "D" } - ListElement { name: "Dog 6"; alphabet: "D" } - ListElement { name: "Dog 7"; alphabet: "D" } - ListElement { name: "Dog 8"; alphabet: "D" } - ListElement { name: "Dog 9"; alphabet: "D" } - ListElement { name: "Dog 10"; alphabet: "D" } - ListElement { name: "Dog 11"; alphabet: "D" } - ListElement { name: "Dog 12"; alphabet: "D" } - ListElement { name: "Elephant 1"; alphabet: "E" } - ListElement { name: "Elephant 2"; alphabet: "E" } - ListElement { name: "FElephant 1"; alphabet: "F" } - ListElement { name: "FElephant 2"; alphabet: "F" } - ListElement { name: "Guinea pig"; alphabet: "G" } - ListElement { name: "Goose"; alphabet: "G" } - ListElement { name: "Horse"; alphabet: "H" } - ListElement { name: "Horse"; alphabet: "H" } - ListElement { name: "Parrot"; alphabet: "P" } - ListElement { name: "Parrot"; alphabet: "P" } - } - - ListView { - id: list - anchors.fill: parent - clip: true - cacheBuffer: contentHeight - delegate: ListItem { - Label { - anchors { - top: parent.top; topMargin: 4 - left: parent.left; leftMargin: 4 - } - text: name + " (index " + index + ")" - horizontalAlignment: Text.AlignLeft - } - } - - model: testModel - section.property: "alphabet" - section.criteria: ViewSection.FullString - section.delegate: ListItem { - sectionDelegate: true - Label { - anchors { - top: parent.top; topMargin: 4 - left: parent.left; leftMargin: 4 - } - text: section - horizontalAlignment: Text.AlignLeft - font { bold: true; } - } - } - } - - SectionScroller { - id: sectionScroller - listView: list - } - } - } - } - - ButtonRow { - id: buttonRow1 - width: parent.width - parent.spacing - exclusive: true - checkedButton: b2 - - Button { text: "b1" } - Button { text: "b2" } - Button { text: "b3" } - } - - ButtonRow { - id: buttonRow2 - width: parent.width - parent.spacing - exclusive: true - - ToolButton { text: "tb1" } - ToolButton { text: "tb2" } - } - - ButtonColumn { - id: buttonColumn - width: parent.width - parent.spacing - exclusive: true - - Button { text: "b4" } - Button { text: "b5" } - Button { text: "b6" } - Button { text: "b7" } - } -} diff --git a/plasma/declarativeimports/test/contents/ui/Scrollers.qml b/pla= sma/declarativeimports/test/contents/ui/Scrollers.qml deleted file mode 100644 index 435cc9e..0000000 --- a/plasma/declarativeimports/test/contents/ui/Scrollers.qml +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Copyright (C) 2011 by Daker Fernandes Pinheiro -* -* 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.components 0.1 as PlasmaComponents - -PlasmaComponents.Page { - height: childrenRect.height - property int implicitHeight: childrenRect.height - - PlasmaComponents.ToolBarLayout { - id: toolbarlayout - spacing: 5 - PlasmaComponents.ToolButton { - text: "ToolButton" - } - PlasmaComponents.ScrollBar { - orientation: Qt.Horizontal - interactive: true - flickableItem: scrollArea - width: 200 - } - PlasmaComponents.TextField { - text: "hello" - } - Component.onCompleted: { - app.tools =3D toolbarlayout - } - } - Column { - spacing: 20 - - Text { - font.pixelSize: 20 - text: "Scroll Bar" - } - - ListView { - id: scrollList - - width: 200 - height: 200 - clip: true - model: 20 - delegate: Text { - width: 200 - height: 30 - text: index - font.pixelSize: 18 - } - - Rectangle { - anchors.fill: parent - color: "grey" - opacity: 0.3 - } - - PlasmaComponents.ScrollBar { - id: scrollBar - orientation: Qt.Vertical - flickableItem: scrollList - stepSize: 40 - scrollButtonInterval: 50 - anchors { - top: scrollList.top - right: scrollList.right - bottom: scrollList.bottom - } - } - } - - Text { - font.pixelSize: 20 - text: "Scroll Decorator" - } - - Item { - width: 200 - height: 200 - PlasmaComponents.Highlight { anchors.fill: parent } - Flickable { - id: scrollArea - anchors.fill: parent - clip: true - contentWidth: 400 - contentHeight: 400 - - // Flickable Contents - Rectangle { - color: "green" - width: 100 - height: 100 - } - Rectangle { - x: 80 - y: 80 - color: "blue" - width: 200 - height: 200 - } - Rectangle { - x: 200 - y: 200 - color: "red" - width: 150 - height: 150 - } - } - - // Scroll Decorators - PlasmaComponents.ScrollBar { - orientation: Qt.Vertical - flickableItem: scrollArea - inverted: true - anchors { - top: scrollArea.top - right: scrollArea.right - bottom: scrollArea.bottom - } - Text { - y: parent.height / 2 - x: 13 - rotation: -90 - text: "inverted" - } - } - PlasmaComponents.ScrollBar { - orientation: Qt.Horizontal - flickableItem: scrollArea - anchors { - left: scrollArea.left - right: scrollArea.right - bottom: scrollArea.bottom - } - } - } - } -} diff --git a/plasma/declarativeimports/test/contents/ui/Sliders.qml b/plasm= a/declarativeimports/test/contents/ui/Sliders.qml deleted file mode 100644 index 833f9ce..0000000 --- a/plasma/declarativeimports/test/contents/ui/Sliders.qml +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Copyright (C) 2011 by Daker Fernandes Pinheiro -* -* 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.components 0.1 as PlasmaComponents - -PlasmaComponents.Page { - height: childrenRect.height - property int implicitHeight: childrenRect.height - - PlasmaComponents.ToolBarLayout { - id: toolbarlayout - spacing: 5 - PlasmaComponents.ToolButton { - text: "ToolButton" - } - PlasmaComponents.Slider { - width: 140 - enabled: true - } - PlasmaComponents.TextField { - text: "hello" - } - Component.onCompleted: { - app.tools =3D toolbarlayout - } - } - Column { - spacing: 20 - - PlasmaComponents.Label { - font.pixelSize: 20 - text: "Slider" - } - - PlasmaComponents.Highlight { - width: 300 - height: 400 - Column { - anchors { - fill: parent - } - spacing: 10 - - PlasmaComponents.Label { text: "Color Selector"; font.pixe= lSize: 20 } - - PlasmaComponents.Label { text: "Red" } - - PlasmaComponents.Slider { - id: redSlider - height: 20 - width: 255 - orientation: Qt.Horizontal - minimumValue: 0 - maximumValue: 255 - stepSize: 10 - Keys.onTabPressed: greenSlider.forceActiveFocus() - } - - PlasmaComponents.Label { text: "Green" } - - PlasmaComponents.Slider { - id: greenSlider - height: 20 - width: 255 - orientation: Qt.Horizontal - minimumValue: 0 - maximumValue: 255 - stepSize: 10 - Keys.onTabPressed: blueSlider.forceActiveFocus() - } - - PlasmaComponents.Label { text: "Blue" } - - PlasmaComponents.Slider { - id: blueSlider - height: 20 - width: 255 - orientation: Qt.Horizontal - minimumValue: 0 - maximumValue: 255 - stepSize: 10 - Keys.onTabPressed: redSlider.forceActiveFocus() - } - - Rectangle { - anchors.horizontalCenter: parent.horizontalCenter - width: parent.width / 2 - height: width - color: Qt.rgba(redSlider.value / 255, greenSlider.valu= e / 255, blueSlider.value / 255, 1) - } - } - } - - PlasmaComponents.Label { text: "Disabled Horizontal Slider" } - - PlasmaComponents.Slider { - id: horizontalSlider - width: 140 - height: 20 - enabled: false - } - - PlasmaComponents.Label { text: "Inverted Horizontal Slider" } - - PlasmaComponents.Slider { - id: invHorizontalSlider - width: 140 - height: 20 - inverted: true - enabled: true - } - - PlasmaComponents.Label { text: "Vertical Slider" } - - Row { - spacing: 30 - PlasmaComponents.Slider { - id: verticalSlider - width: 20 - height: 140 - orientation: Qt.Vertical - minimumValue: 10 - maximumValue: 1000 - stepSize: 50 - inverted: true - } - PlasmaComponents.Label { text: verticalSlider.value } - } - - } -} diff --git a/plasma/declarativeimports/test/contents/ui/TextEditing.qml b/p= lasma/declarativeimports/test/contents/ui/TextEditing.qml deleted file mode 100644 index 388a2a0..0000000 --- a/plasma/declarativeimports/test/contents/ui/TextEditing.qml +++ /dev/null @@ -1,74 +0,0 @@ -/* -* Copyright (C) 2011 by Daker Fernandes Pinheiro -* -* 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.components 0.1 as PlasmaComponents - -PlasmaComponents.Page { - height: editThing.height - width: 500 - //property int implicitHeight: childrenRect.height - //scale: 1.25 - - PlasmaComponents.ToolBarLayout { - id: toolbarlayout - spacing: 5 - PlasmaComponents.Label { - text: "Text label:" - } - PlasmaComponents.ToolButton { - text: "ToolButton" - } - PlasmaComponents.TextField { - placeholderText: "Place holder text" - } - PlasmaComponents.TextField { - text: "Text fields page" - } - Component.onCompleted: { - app.tools =3D toolbarlayout - } - } - MouseArea { - anchors.fill: editThing - onClicked: editThing.forceActiveFocus(); - } - - Column { - id: editThing - anchors.top: parent.top - anchors.horizontalCenter: parent.horizontalCenter - width: 300 - height: 300 - - spacing: 12 - Item { height: 4; width: parent.width; } - PlasmaComponents.TextField { - placeholderText: "Try copy & paste" - text: "The cat bites into the socks" - width: editThing.width - clearButtonShown: true - } - PlasmaComponents.TextArea { - width: editThing.width - height: 200 - placeholderText: "Touch copy & paste not implemented yet." - } - } -} diff --git a/plasma/declarativeimports/test/contents/ui/Texts.qml b/plasma/= declarativeimports/test/contents/ui/Texts.qml deleted file mode 100644 index 951e11a..0000000 --- a/plasma/declarativeimports/test/contents/ui/Texts.qml +++ /dev/null @@ -1,127 +0,0 @@ -/* -* Copyright (C) 2011 by Daker Fernandes Pinheiro -* -* 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.components 0.1 as PlasmaComponents - -PlasmaComponents.Page { - height: childrenRect.height - property int implicitHeight: childrenRect.height - - PlasmaComponents.ToolBarLayout { - id: toolbarlayout - spacing: 5 - PlasmaComponents.Label { - text: "Text label:" - } - PlasmaComponents.ToolButton { - text: "ToolButton" - } - PlasmaComponents.TextField { - placeholderText: "Place holder text" - } - PlasmaComponents.TextField { - text: "Text fields page" - } - Component.onCompleted: { - app.tools =3D toolbarlayout - } - } - Column { - spacing: 30 - Text { - text: "Text Fields" - font.pixelSize: 20 - } - - PlasmaComponents.Highlight { - width: 200 - height: 100 - Column { - spacing: 10 - Row { - Text { - text: "Username: " - anchors.verticalCenter: tf1.verticalCenter - } - PlasmaComponents.TextField { - id: tf1 - placeholderText: "login" - clearButtonShown: true - Keys.onTabPressed: tf2.forceActiveFocus(); - } - } - - Row { - Text { - text: "Password: " - anchors.verticalCenter: tf2.verticalCenter - } - PlasmaComponents.TextField { - id: tf2 - clearButtonShown: true - width: 120 - echoMode: TextInput.Password - Keys.onTabPressed: loginButton.forceActiveFocus(); - } - } - - PlasmaComponents.Button { - id: loginButton - text: "Login" - z: -1 - anchors { - right: parent.right - rightMargin: 0 - } - width: 100 - } - } - } - - PlasmaComponents.TextField { - width: 120 - clearButtonShown: true - placeholderText: "Disabled Text Field" - Keys.onTabPressed: loginButton.forceActiveFocus(); - enabled: false - } - - Text { - text: "Text Area" - font.pixelSize: 20 - } - - PlasmaComponents.TextArea { - width: 200 - height: 200 - placeholderText: "Lorem ipsum et dolor" - wrapMode: TextEdit.WordWrap - contentMaxWidth: 400 - contentMaxHeight: 400 - } - - PlasmaComponents.TextArea { - width: 200 - height: 100 - enabled: false - text: "Disabled Text Area" - } - } -} diff --git a/plasma/declarativeimports/test/gallery/Extras.qml b/plasma/dec= larativeimports/test/gallery/Extras.qml deleted file mode 100644 index 6551d20..0000000 --- a/plasma/declarativeimports/test/gallery/Extras.qml +++ /dev/null @@ -1,65 +0,0 @@ -/* -* Copyright 2012 by Sebastian K=C3=BCgler -* -* 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.1 -import org.kde.plasma.components 0.1 -import org.kde.plasma.extras 0.1 as PlasmaExtras - -Column { - - PlasmaExtras.ResourceInstance { - uri: "http://api.kde.org/4.x-api/plasma-qml-apidocs/" - title: "Plasma Components API documentation" - } - - ToolBarLayout { - id: toolbarlayout - Component.onCompleted: app.tools =3D toolbarlayout - } - //anchors.fill: parent -// anchors.rightMargin: space*2 - width: 600 - spacing: 12 - PlasmaExtras.Title { - text: "PlasmaExtras" - } - PlasmaExtras.Heading { - level: 2 - text: "Additional Plasma Quick components for Apps" - } - PlasmaExtras.Paragraph { - //width: contentWidth - text: "PlasmaExtras contains additional components for your app. I= t makes available the appbackground image providers, for example, it also h= as components for structured, styled Text layout (PlasmaExtras.Title, Plasm= aExtras.Heading, PlasmaExtras.Paragraph)." - } - PlasmaExtras.Paragraph { - //width: contentWidth - text:"PlasmaExtras.ResourceInstance offers a way for apps to annou= nce the document they are currently viewing. This adds support for \"share-= like-connect\" to your app. This page for example uses the PlasmaComponents= API as \"current document\"." - } - PlasmaExtras.Heading { - level: 3 - text: "Heading at level " + level - } - PlasmaExtras.Paragraph { - text: "Lorem Ipsum is slechts een proeftekst uit het drukkerij- en= zetterijwezen. Lorem Ipsum is de standaard proeftekst in deze bedrijfstak = sinds de 16e eeuw, toen een onbekende drukker een zethaak met letters nam e= n ze door elkaar husselde om een font-catalogus te maken. Het heeft niet al= leen vijf eeuwen overleefd maar is ook, vrijwel onveranderd, overgenomen in= elektronische letterzetting. Het is in de jaren '60 populair geworden met = de introductie van Letraset vellen met Lorem Ipsum passages en meer recente= lijk door desktop publishing software zoals Aldus PageMaker die versies van= Lorem Ipsum bevatten." - } - PlasmaExtras.Heading { - level: 5 - text: "Heading at level " + level - } -} \ No newline at end of file diff --git a/plasma/declarativeimports/test/metadata.desktop b/plasma/decla= rativeimports/test/metadata.desktop deleted file mode 100644 index 684bdb8..0000000 --- a/plasma/declarativeimports/test/metadata.desktop +++ /dev/null @@ -1,23 +0,0 @@ -[Desktop Entry] -Name=3Dorg.kde.example.widgetgallery -Name[de]=3Dorg.kde.example.widgetgallery -Name[el]=3Dorg.kde.example.widgetgallery -Name[et]=3Dorg.kde.example.widgetgallery -Name[ia]=3Dorg.kde.example.widgetgallery -Name[is]=3Dorg.kde.example.widgetgallery -Name[nl]=3Dorg.kde.example.widgetgallery -Name[pl]=3Dorg.kde.example.widgetgallery -Name[pt]=3Dorg.kde.example.widgetgallery -Name[pt_BR]=3Dorg.kde.example.widgetgallery -Name[uk]=3Dorg.kde.example.widgetgallery -Name[x-test]=3Dxxorg.kde.example.widgetgalleryxx -Type=3DService -X-KDE-PluginInfo-Author=3DGiorgos Tsiapaliwkas -X-KDE-PluginInfo-Email=3Dterietor@gmail.com -X-KDE-PluginInfo-License=3DGPL -X-KDE-PluginInfo-Name=3Dorg.kde.example.widgetgallery -X-KDE-PluginInfo-Version=3D1 -X-KDE-ServiceTypes=3DPlasma/Applet -X-Plasma-API=3Ddeclarativeappletscript -X-Plasma-DefaultSize=3D200,100 -X-Plasma-MainScript=3Dui/Gallery.qml