Merge branch 'master' into vhanda/dialogRefactor

This commit is contained in:
Vishesh Handa 2014-09-15 14:50:49 +02:00
commit 18a6a7302b
153 changed files with 820 additions and 389 deletions

View File

@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12)
project(Plasma)
# ECM setup
find_package(ECM 1.1.0 REQUIRED NO_MODULE)
find_package(ECM 1.2.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(FeatureSummary)
@ -16,8 +16,8 @@ include(ECMPackageConfigHelpers)
include(ECMSetupVersion)
include(KDEFrameworkCompilerSettings)
set(KF5_VERSION "5.1.0") # handled by release scripts
set(KF5_DEP_VERSION "5.1.0") # handled by release scripts
set(KF5_VERSION "5.3.0") # handled by release scripts
set(KF5_DEP_VERSION "5.2.0") # handled by release scripts
ecm_setup_version(${KF5_VERSION}
VARIABLE_PREFIX PLASMA

View File

@ -3,9 +3,23 @@ The plasma framework provides the foundations that can be used to build a primar
## Introduction
The plasma framework provides the following:
- QML components
- A C++ library: libplasma
- Script engines
- QML components
## QML components
### org.kde.plasma.core
Bindings for libplasma functionality, such as DataEngine and FrameSvg, see @ref core.
### org.kde.plasma.components
Graphical components for common items such as buttons, lineedits, tabbars and so on. Compatible subset of the MeeGo components used on the N9, see @ref plasmacomponents.
### org.kde.plasma.extras
Extra graphical components that extend org.kde.plasma.components but are not in the standard api, see @ref plasmaextracomponents.
### org.kde.plasma.plasmoid
Attached properties for manipulating the current applet or containment, see @ref libplasmaquick
## libplasma
This C++ library provides:
@ -19,14 +33,3 @@ See @ref libplasma.
## Script engines
Provides support to create applets or containments in various scripting languages.
## QML components
### org.kde.plasma.core
Bindings for libplasma functionality, such as DataEngine and FrameSvg, see @ref core.
### org.kde.plasma.components
Graphical components for common items such as buttons, lineedits, tabbars and so on. Compatible subset of the MeeGo components used on the N9, see @ref plasmacomponents.
### org.kde.plasma.extras
Extra graphical components that extend org.kde.plasma.components but are not in the standard api, see @ref plasmaextracomponents.

View File

@ -37,6 +37,7 @@ MACRO(PLASMA_UNIT_TESTS)
ENDMACRO(PLASMA_UNIT_TESTS)
PLASMA_UNIT_TESTS(
fallbackpackagetest
packagestructuretest
packageurlinterceptortest
pluginloadertest

View File

@ -129,7 +129,7 @@ void CoronaTest::cleanupTestCase()
void CoronaTest::restore()
{
m_corona->loadLayout("plasma-test-appletsrc");
QCOMPARE(m_corona->containments().count(), 1);
QCOMPARE(m_corona->containments().count(), 2);
QCOMPARE(m_corona->containments().first()->applets().count(), 2);
}

View File

@ -6,6 +6,7 @@ Name[de]=JavaScript-Datei-Aktionen
Name[en_GB]=JavaScript File Operations
Name[es]=Operaciones de archivo JavaScript
Name[fi]=JavaScript-tiedostotoiminnot
Name[fr]=Opérations sur les fichiers en JavaScript
Name[gl]=Operacións de ficheiro JavaScript
Name[hu]=JavaScript fájlműveletek
Name[ia]=Operationes de file de JavaScript
@ -34,7 +35,9 @@ Comment[de]=Demonstriert den Zugriff auf Daten über HTTP in JavaScript
Comment[en_GB]=Demonstrates accessing data via HTTP in JavaScript
Comment[es]=Demuestra el acceso a datos usando HTTP en JavaScript
Comment[fi]=Demonstroi datan hakemista HTTP:n välityksellä käyttäen JavaScriptiä
Comment[fr]=Illustre l'accès aux données via HTTP en JavaScript
Comment[gl]=Demostra o acceso a datos mediante HTTP en JavaScript
Comment[hu]=Demonstrálja adatok elérését HTTP-n keresztül JavaScriptben
Comment[ia]=Il demonstra como acceder datos via HTTP inJavaScript
Comment[mr]=ि HTTP
Comment[nds]=Wiest, wodennig een op Daten över HTTP in JavaScript togriepen kann

View File

@ -0,0 +1,7 @@
import QtQuick 2.0
Rectangle {
id: root
color: "darkblue"
}

View File

@ -0,0 +1,33 @@
[Desktop Entry]
Encoding=UTF-8
Keywords=
Name=Test Fallback Package
Name[ca]=Paquet de proves alternatiu
Name[en_GB]=Test Fallback Package
Name[es]=Probar el paquete al que recurrir
Name[hu]=Tartalék tesztcsomag
Name[nl]=Testterugvalpakket
Name[pl]=Awaryjny pakiet próbny
Name[pt]=Pacote de Teste
Name[pt_BR]=Pacote de teste secundário
Name[sk]=Testovací záchranný balík
Name[sl]=Preizkusni zasilni paket
Name[sr]=Пробни одступни пакет
Name[sr@ijekavian]=Пробни одступни пакет
Name[sr@ijekavianlatin]=Probni odstupni paket
Name[sr@latin]=Probni odstupni paket
Name[sv]=Reservtestpaket
Name[uk]=Тестовий резервний пакунок
Name[x-test]=xxTest Fallback Packagexx
Name[zh_TW]=
Type=Service
X-KDE-ParentApp=
X-KDE-PluginInfo-Author=Marco Martin
X-KDE-PluginInfo-Category=
X-KDE-PluginInfo-Email=mart@kde.org
X-KDE-PluginInfo-License=GPLv2+
X-KDE-PluginInfo-Name=org.kde.testfallbackpackage
X-KDE-PluginInfo-Version=
X-KDE-PluginInfo-Website=
X-Plasma-MainScript=ui/main.qml

View File

@ -0,0 +1,7 @@
import QtQuick 2.0
Rectangle {
id: root
color: "darkblue"
}

View File

@ -7,8 +7,9 @@ Name[bs]=Testni paket
Name[ca]=Paquet de proves
Name[de]=Test-Paket
Name[en_GB]=Test Package
Name[es]=Paquete de pruebas
Name[es]=Probar el paquete
Name[fi]=Testipaketti
Name[fr]=Paquet de test
Name[gl]=Paquete de probas
Name[hu]=Tesztcsomag
Name[ia]=Pacchetto de prova

View File

@ -0,0 +1,71 @@
/******************************************************************************
* Copyright 2007 by Aaron Seigo <aseigo@kde.org> *
* Copyright 2014 Marco Martin <mart@kde.org> *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public License *
* along with this library; see the file COPYING.LIB. If not, write to *
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301, USA. *
*******************************************************************************/
#include "fallbackpackagetest.h"
#include <QDebug>
#include "packagestructure.h"
#include "pluginloader.h"
void FallbackPackageTest::initTestCase()
{
m_fallPackagePath = QFINDTESTDATA("data/testpackage");
m_fallbackPkg = Plasma::PluginLoader::self()->loadPackage("Plasma/Generic");
m_fallbackPkg.setPath(m_fallPackagePath);
m_packagePath = QFINDTESTDATA("data/testfallbackpackage");
m_pkg = Plasma::PluginLoader::self()->loadPackage("Plasma/Generic");
m_pkg.setPath(m_packagePath);
}
void FallbackPackageTest::beforeFallback()
{
QVERIFY(m_fallbackPkg.hasValidStructure());
QVERIFY(m_pkg.hasValidStructure());
//m_fallbackPkg should have otherfile.qml, m_pkg shouldn't
QVERIFY(!m_fallbackPkg.filePath("ui", "otherfile.qml").isEmpty());
QVERIFY(m_pkg.filePath("ui", "otherfile.qml").isEmpty());
}
void FallbackPackageTest::afterFallback()
{
m_pkg.setFallbackPackage(m_fallbackPkg);
//after setting the fallback, m_pkg should resolve the exact same file as m_fallbackPkg
// for otherfile.qml
QVERIFY(!m_pkg.filePath("ui", "otherfile.qml").isEmpty());
QCOMPARE(m_fallbackPkg.filePath("ui", "otherfile.qml"), m_pkg.filePath("ui", "otherfile.qml"));
QVERIFY(m_fallbackPkg.filePath("mainscript") != m_pkg.filePath("mainscript"));
}
void FallbackPackageTest::cycle()
{
m_fallbackPkg.setFallbackPackage(m_pkg);
m_pkg.setFallbackPackage(m_fallbackPkg);
//The cycle should have been detected and filePath should take a not infinite time
QTRY_COMPARE_WITH_TIMEOUT(m_fallbackPkg.filePath("ui", "otherfile.qml"), m_pkg.filePath("ui", "otherfile.qml"), 1000);
}
QTEST_MAIN(FallbackPackageTest)

View File

@ -0,0 +1,46 @@
/******************************************************************************
* Copyright 2007 by Aaron Seigo <aseigo@kde.org> *
* Copyright 2014 Marco Martin <mart@kde.org> *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public License *
* along with this library; see the file COPYING.LIB. If not, write to *
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
* Boston, MA 02110-1301, USA. *
*******************************************************************************/
#ifndef FALLBACKPACKAGETEST_H
#include <QtTest/QtTest>
#include "plasma/package.h"
class FallbackPackageTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void initTestCase();
void beforeFallback();
void afterFallback();
void cycle();
private:
Plasma::Package m_pkg;
Plasma::Package m_fallbackPkg;
QString m_packagePath;
QString m_fallPackagePath;
};
#endif

View File

@ -7,7 +7,9 @@ Name[de]=Testdatei für Paket-Metadaten
Name[en_GB]=Package metadata test file
Name[es]=Archivo de pruebas de metadatos de paquete
Name[fi]=Pakettimetatietojen testitiedosto
Name[fr]=Fichier de test de métadonnées de paquets
Name[gl]=Ficheiro de proba de metadatos de paquete
Name[hu]=Tesztfájl csomagok metaadatához
Name[ia]=File de prova del pacchetto metadata
Name[mr]=
Name[nds]=Paketmetadaten-Testdatei
@ -37,7 +39,9 @@ Comment[de]=Eine Test-Desktop-Datei zum Testen der Klasse „PackageMetaData“.
Comment[en_GB]=A test desktop file to test the PackageMetaData class.
Comment[es]=Un archivo de escritorio para probar la clase PackageMetaData.
Comment[fi]=Kokeellinen desktop-tiedosto PackageMetaData-luokan testaamiseen.
Comment[fr]=Un fichier « desktop » de test pour tester la classe PackageMetaData.
Comment[gl]=Un ficheiro de escritorio de proba para probar a clase PackageMetaData.
Comment[hu]=Teszt .desktop fájl a PackageMetaData osztály teszteléséhez.
Comment[ia]=Un file de prova del scriptorio pro provar le classe PackageMetaData.
Comment[mr]= .
Comment[nds]=En Test-Schriefdischdatei för't Utproberen vun de Klass PackageMetaData.

View File

@ -14,5 +14,13 @@ plugin=invalid
immutability=1
plugin=simpleapplet
#empty panel: should emit complete even if empty
[Containments][4]
formfactor=2
immutability=1
lastScreen=0
location=4
plugin=simplecontainment
[General]
immutability=1

View File

@ -6,7 +6,9 @@ Comment[de]=Einen Fehler in Plasma berichten
Comment[en_GB]=Report a bug in Plasma
Comment[es]=Informar de un fallo en Plasma
Comment[fi]=Ilmoita viasta Plasmassa
Comment[fr]=Rapporter un bogue dans Plasma
Comment[gl]=Informar dun erro en Plasma
Comment[hu]=Hiba jelentése a Plasmában
Comment[ia]=Reporta un bug in Plasma
Comment[it]=Segnala un bug in Plasma
Comment[nds]=En Fehler binnen Plasma künnig maken
@ -33,7 +35,9 @@ Keywords[de]=plasma,bugzilla,Fehler,Entwicklung,Unterstützung
Keywords[en_GB]=plasma,bugzilla,bug,development,support
Keywords[es]=plasma,bugzilla,fallo,desarrollo,soporte
Keywords[fi]=plasma,bugzilla,bug,bugi,vika,virhe,development,kehitys,kehittäminen,support,tuki
Keywords[fr]=plasma,bugzilla,bug,développement,support
Keywords[gl]=plasma,bugzilla,erro,desenvolvemento,soporte,asistencia técnica
Keywords[hu]=plasma,bugzilla,hiba,fejlesztés,támogatás
Keywords[ia]=plasma,bugzilla,bug,development,support
Keywords[it]=plasma,bugzilla,bug,sviluppo,supporto
Keywords[nds]=Plasma,Bugzilla,Fehler,utwickeln,Support,ünnerstütten
@ -58,7 +62,9 @@ Name[de]=Fehler
Name[en_GB]=Bug
Name[es]=Fallo
Name[fi]=Vika
Name[fr]=Bogue
Name[gl]=Erro
Name[hu]=Hiba
Name[ia]=Bug
Name[it]=Bug
Name[nds]=Fehler

View File

@ -6,10 +6,12 @@ Name=hello world
Name[ar]=أهلًا يا عالم
Name[bs]=zdravo raja
Name[ca]=hola món
Name[cs]=Hello World
Name[de]=Hallo Welt
Name[en_GB]=hello world
Name[es]=hola mundo
Name[fi]=Hei maailma
Name[fr]=Bonjour tout le monde
Name[gl]=Ola mundo
Name[hu]=helló, világ
Name[ia]=Salute mundo

View File

@ -8,6 +8,7 @@ Name[de]=Miniprogrammtest
Name[en_GB]=Applet Test
Name[es]=Prueba de miniaplicación
Name[fi]=Sovelmatesti
Name[fr]=Applet test
Name[gl]=Proba de applet
Name[hu]=Kisalkalmazás teszt
Name[ia]=Applet Test (Prova de applet)

View File

@ -8,6 +8,7 @@ Name[de]=Einrichtungstest
Name[en_GB]=Configuration test
Name[es]=Prueba de configuración
Name[fi]=Asetustesti
Name[fr]=Test de configuration
Name[gl]=Proba de configuración
Name[hu]=Beállításteszt
Name[ia]=Prova de configuration

View File

@ -5,7 +5,9 @@ Comment[de]=Miniprogramm-Beispiel, das die Anwendung von Modellen eingebettet in
Comment[en_GB]=Example applet that shows how to use Models embedded in DataEngines
Comment[es]=Miniaplicación de ejemplo que muestra cómo usar modelos empotrados en motores de datos
Comment[fi]=Esimerkkisovelma, joka näyttää, miten tietomoottoreihin upotettuja malleja käytetään
Comment[fr]=Exemple d'applet qui montre comment utiliser les modèles embarqués dans DataEngines
Comment[gl]=Unha applet de exemplo que mostra como usar os modelos incorporados nos DataEngines
Comment[hu]=Példa kisalkalmazás a DataEngine-be ágyazott modellek használatának bemutatására
Comment[ia]=Applet de exemplo que monstra como usar Models (modellos) insertate in DataEngines (Motores de datos)
Comment[nds]=Bispill-Lüttprogramm, dat wiest, wodennig sik Modellen binnen Datenkarns bruken laat
Comment[nl]=Voorbeeld van applet dat toont hoe modellen ingebed in gegevensengines zijn te gebruiken
@ -31,6 +33,7 @@ Name[de]=Datenquellen-Modell
Name[en_GB]=Dataengine model
Name[es]=Modelo de motor de datos
Name[fi]=Tietomoottorimalli
Name[fr]=Modèle DataEngine
Name[gl]=Modelo de Dataengine
Name[hu]=Adatmotor modell
Name[ia]=Modello de Dataengine (Motor de datos)

View File

@ -6,10 +6,12 @@ Name=hello world
Name[ar]=أهلًا يا عالم
Name[bs]=zdravo raja
Name[ca]=hola món
Name[cs]=Hello World
Name[de]=Hallo Welt
Name[en_GB]=hello world
Name[es]=hola mundo
Name[fi]=Hei maailma
Name[fr]=Bonjour tout le monde
Name[gl]=Ola mundo
Name[hu]=helló, világ
Name[ia]=Salute mundo

View File

@ -6,7 +6,9 @@ Comment[de]=Beispiel zur Verwaltung von abgelegten Daten
Comment[en_GB]=Example on how to manage Drop data
Comment[es]=Ejemplo sobre cómo usar los datos soltados
Comment[fi]=Esimerkki tiedon pudottamisen käsittelemisestä
Comment[fr]=Exemple de comment gérer les données déposées
Comment[gl]=Exemplo de como xestionar os datos soltados
Comment[hu]=Példa a Drop adatok kezeléséhez
Comment[ia]=Exemplo de como gerer Drop data (deponer datos)
Comment[nds]=Bispill för't Hanteren vun afleggt Daten
Comment[nl]=Voorbeeld van hoe gegevens van Drop te beheren
@ -32,7 +34,9 @@ Name[de]=Beispielnotizen
Name[en_GB]=Example notes
Name[es]=Notas del ejemplo
Name[fi]=Muistiinpanoesimerkki
Name[fr]=Exemple de notes
Name[gl]=Notas de exemplo
Name[hu]=Példa jegyzetek
Name[ia]=Notas de exemplo
Name[it]=Note di esempio
Name[nds]=Bispillnotizen

View File

@ -7,7 +7,9 @@ Name[de]=Musiktitel-Anzeige (QML)
Name[en_GB]=Now playing (QML)
Name[es]=Reproduciendo (QML)
Name[fi]=Nyt soi (QML)
Name[fr]=Lecture en cours (QML)
Name[gl]=Estase a reproducir (QML)
Name[hu]=Most játszott (QML)
Name[ia]=Ora reproducente (QML)
Name[it]=In riproduzione (QML)
Name[nds]=Lopen Stück (QML)
@ -33,7 +35,9 @@ Comment[de]=Ein Konzeptnachweis für eine Medien-Wiedergabe geschrieben in QML
Comment[en_GB]=A proof of concept media player controller qml
Comment[es]=Una prueba de concepto de controlador de reproductor multimedia en QML
Comment[fi]=QML:n soveltuvuusselvitys mediasoittimen ohjaamiseen
Comment[fr]=Un contrôleur de lecteur multimédia comme démonstrateur de faisabilité en QML
Comment[gl]=Unha proba de concepto de controlador de reprodutor multimedia en qml
Comment[hu]=Bemutató médiavezérlő QML-ben írva
Comment[ia]=Un prova de controlator qml de reproductor de media ideate
Comment[nds]=En Konzeptprööv för en QML-Medianafspeler-Kuntrull
Comment[nl]=Een 'proof of concept' qml voor besturing van een mediaspeler

View File

@ -7,7 +7,9 @@ Name[de]=Einfache Aufgaben
Name[en_GB]=Poor Man's Tasks
Name[es]=Tareas del hombre pobre
Name[fi]=Köyhän miehen tehtävät
Name[fr]=Tâches du pauvre
Name[gl]=Tarefa do pobre home
Name[hu]=Szegény ember feladatlistája
Name[ia]=Cargas del Paupere Homine
Name[nds]=Sülvenmaakt Opgavenpleger
Name[nl]=Taken van 'Poor Man'
@ -32,7 +34,9 @@ Comment[de]=Beispiel für das Schreiben eigener Aufgaben-Miniprogramme
Comment[en_GB]=Example showing how to write your own tasks Widget
Comment[es]=Ejemplo que muestra cómo escribir su propio widget de tareas
Comment[fi]=Esimerkki oman tehtäväsovelman kirjoittamisesta
Comment[fr]=Exemple montrant comment écrire votre propre composant graphique de tâches
Comment[gl]=Un exemplo de como escribir un widget de tarefas pendentes
Comment[hu]=Példa saját feladatlista írásához
Comment[ia]=Exemplo monstrante como scriber tu proprie Widget de cargas
Comment[nds]=Bispill för en sülvenschreven Opgavenpleeg-Lüttprogramm
Comment[nl]=Voorbeeld die toont hoe u uw eigen taak-widget schrijft

View File

@ -7,7 +7,9 @@ Name[de]=SameGame-Spiel (QML)
Name[en_GB]=Same game (QML)
Name[es]=Juego Iguales (QML)
Name[fi]=Same Game (QML)
Name[fr]=Same Game (QML)
Name[gl]=Xogo dos iguais (QML)
Name[hu]=Leszedegetős játék (QML)
Name[ia]=Mesme Joco (QML)
Name[nds]=SameGame (QML)
Name[nl]=Zelfde spel (QML)
@ -31,7 +33,9 @@ Comment[de]=Das Spiel SameGame als QML-QT-Demo umgewandelt in ein Plasmoid
Comment[en_GB]=The Same game QML Qt demo converted as plasmoid
Comment[es]=Demo en QML de Qt del juego Iguales convertido en plasmoide
Comment[fi]=QML Qt-demo Same Game muunnettuna plasmoidiksi
Comment[fr]=Le jeu « Same Game » de la démo QML de Qt, converti en plasmoid
Comment[gl]=O xogo dos iguais en QML convertido nun plasmoide
Comment[hu]=A leszedegetős játék demó verziója plazmoidként
Comment[ia]=Le Mesme Joco QML. Demo de QT convertite in plasmoid
Comment[nds]=Dat SameGame-QML-Qt-Demo ümbuut as Plasma-Lüttprogramm
Comment[nl]=De demo van QML Qt van 'Zelfde spel' geconverteerd als plasmoid

View File

@ -8,7 +8,9 @@ Name[de]=Komponententest
Name[en_GB]=Components Test
Name[es]=Prueba de componentes
Name[fi]=Komponenttitesti
Name[fr]=Test des composants
Name[gl]=Proba dos compoñentes
Name[hu]=Komponensteszt
Name[ia]=Essayo de componentes(Components)
Name[mr]=
Name[nds]=Komponententest

View File

@ -8,7 +8,9 @@ Name[de]=Schattentest
Name[en_GB]=Shader Test
Name[es]=Prueba de sombreado
Name[fi]=Varjostintesti
Name[fr]=Test du nuanceur
Name[gl]=Proba de sombreador
Name[hu]=Árnyékoló teszt
Name[ia]=Essayo de umbrator (Shader)
Name[mr]=
Name[nds]=Schaddeerertest
@ -33,7 +35,9 @@ Comment[de]=Verschwommen mit optischen Effekten
Comment[en_GB]=Futzing with Visual Effects
Comment[es]=Jugar con los efectos visuales
Comment[fi]=Ajan tuhlausta visuaalisten tehosteiden parissa
Comment[fr]=Jouer avec les effets visuels
Comment[gl]=Perdas de tempo con efectos visuais
Comment[hu]=Vizuális effektek kavalkádja
Comment[ia]=Jocante (Futzing) con effectos visual
Comment[mr]= ि ि
Comment[nds]=Rümspelen mit visuell Effekten

View File

@ -7,7 +7,9 @@ Name[de]=Designtest
Name[en_GB]=Theme Test
Name[es]=Prueba del tema
Name[fi]=Teematesti
Name[fr]=Thème test
Name[gl]=Proba do tema
Name[hu]=Témateszt
Name[ia]=Essayo de Thema
Name[it]=Test del tema
Name[nds]=Mustertest

View File

@ -89,6 +89,7 @@ PlasmaComponents.Page {
orientation: Qt.Horizontal
minimumValue: 0
maximumValue: 255
tickmarksEnabled: true
stepSize: 10
Keys.onTabPressed: blueSlider.forceActiveFocus()
}

View File

@ -8,7 +8,9 @@ Name[de]=Miniprogramm-Galerie
Name[en_GB]=Widgets gallery
Name[es]=Galería de elementos gráficos
Name[fi]=Kontrolligalleria
Name[fr]=Galerie de composants graphiques
Name[gl]=Galería de widgets
Name[hu]=Elemgaléria
Name[ia]=Galleria de widget
Name[it]=Galleria dei widget
Name[nds]=Lüttprogramm-Galerie
@ -33,7 +35,9 @@ Comment[de]=Galerie von Miniprogrammen, die mit Plasma QtComponents erstellt wur
Comment[en_GB]=gallery of widgets done with Plasma QtComponents
Comment[es]=Galería de elementos gráficos realizada con Plasma QtComponents
Comment[fi]=galleria kontrolleista, jotka on tehty Plasman QtComponents-tekniikalla
Comment[fr]=Galerie de composants graphiques réalisés avec les QtComponents de Plasma
Comment[gl]=galería de widgets feita con QtComponents de Plasma
Comment[hu]=A Plasma QtComponentből készült elemek galériája
Comment[ia]=galleria de widget facite con Plasma QtComponents
Comment[nds]=Galerie vun Lüttprogrammen, de mit de Plasma-QtComponents opstellt wöörn
Comment[nl]=galerij van widgets gemaakt met Plasma QtComponents

View File

@ -6,7 +6,9 @@ Name[de]=Beispiel einer Liste mit Fenstervorschaubilden
Name[en_GB]=Example window thumbnails list
Name[es]=Ejemplo de lista de miniaturas de ventanas
Name[fi]=Esimerkki ikkunoiden pikkukuvien luettelosta
Name[fr]=Exemple de liste de vignettes de fenêtres
Name[gl]=Exemplo de lista de miniaturas de xanelas
Name[hu]=Ablakbélyegképek lista - példa
Name[ia]=Lista de miniaturas de fenestra de exemplo
Name[nds]=Bispill-Finstervöransichten-List
Name[nl]=Voorbeeld van lijst met miniaturen van vensters
@ -30,7 +32,9 @@ Comment[de]=Beispiel zur Anzeige einer Liste mit Fenstervorschaubilden
Comment[en_GB]=Example showing how to display window thumbnails
Comment[es]=Ejemplo que muestra cómo mostrar miniaturas de ventanas
Comment[fi]=Esimerkki ikkunoiden pikkukuvien näyttämisestä
Comment[fr]=Exemple montrant comment afficher des vignettes de fenêtres
Comment[gl]=Un exemplo que como mostrar miniaturas de xanelas
Comment[hu]=Példa ablakok bélyegképeinek megjelenítésére
Comment[ia]=Exemplo monstrante como monstrar miniaturas de fenestra
Comment[nds]=En Bispill, dat wiest, wodennig sik Finstervöransichten dorstellen laat
Comment[nl]=Voorbeeld van hoe miniaturen van vensters te tonen

View File

@ -8,7 +8,9 @@ Name[de]=Container-Test
Name[en_GB]=Containment Test
Name[es]=Prueba de contenedor
Name[fi]=Sovelmasäiiliötesti
Name[fr]=Test du conteneur
Name[gl]=Proba de contedor
Name[hu]=Tartalomteszt
Name[ia]=Essayo de Containment
Name[mr]=
Name[nds]=Gelaatstest

View File

@ -6,7 +6,9 @@ Name[de]=Benutzerdefinierte Datencontainer
Name[en_GB]=Custom DataContainers
Name[es]=«DataContainers» personalizados
Name[fi]=Mukautetut DataContainerit
Name[fr]=DataContainers personnalisés
Name[gl]=DataContainers personalizado
Name[hu]=Egyéni DataContainerek
Name[ia]=DataContainers (Contento de datos) personalisate
Name[nds]=Egen Datengelaatsen
Name[nl]=Aangepaste gegevenscontainers
@ -30,7 +32,9 @@ Comment[de]=Eine Demonstration wie Unterklassen von Datencontainern erstellt wer
Comment[en_GB]=A demonstration of how to subclass DataContainer
Comment[es]=Una demostración de cómo derivar una clase de «DataContainer»
Comment[fi]=Demonstraatio DataContainerin aliluokittamisesta
Comment[fr]=Une démonstration de comment faire une sous-classe de « DataContainer »
Comment[gl]=Unha demostración de como facer subclases de DataContainer
Comment[hu]=A DataContainer alosztályként használatának demonstrációja
Comment[ia]=Un demonstration de como poner in sub-classe un DataContainer
Comment[nds]=En Demonstratschoon, wodennig sik en DataContainer-Ünnerklass bruken lett
Comment[nl]=Een demonstratie van hoe een subklasse toe te kennen aan een gegevenscontainer

View File

@ -7,6 +7,7 @@ Name[de]=Einfaches Datentreiber-Beispiel
Name[en_GB]=Simple DataEngine Example
Name[es]=Ejemplo sencillo de «DataEngine»
Name[fi]=Yksinkertainen DataEngine-esimerkki
Name[fr]=Exemple simple de DataEngine
Name[gl]=Exemplo sinxelo de DataEngine
Name[hu]=Egyszerű adatmotor példa
Name[ia]=Exemplo semplice de DataEngine (Motor de datos)
@ -32,6 +33,7 @@ Comment[de]=Eine Basis-Implementation eines Datentreibers
Comment[en_GB]=A very basic DataEngine implementation
Comment[es]=Una implementación muy básica de «DataEngine»
Comment[fi]=Erittäin yksinkertainen DataEngine-toteutus
Comment[fr]=Une implémentation très basique de DataEngine
Comment[gl]=Unha implementación moi básica de DataEngine
Comment[hu]=Egy nagyon egyszerű adatmotor megvalósítás
Comment[ia]=Un implementation multo basic de DataEngine (Motor de datos)

View File

@ -6,7 +6,9 @@ Name[de]=Ressourcen auf Anforderung
Name[en_GB]=Sources On Request
Name[es]=Fuentes bajo petición
Name[fi]=Lähteet pyynnöstä
Name[fr]=Sources à la demande
Name[gl]=Orixes baixo pedido
Name[hu]=Forráskérés
Name[ia]=Fontes sur requesta
Name[nds]=Borns op Anfraag
Name[nl]=Bronnen op verzoek
@ -30,7 +32,9 @@ Comment[de]=Ein Datentreiber-Beispiel, das die Antwort auf Anfragen zur Erstellu
Comment[en_GB]=A DataEngine example showing how to respond to requests for source creation and updates
Comment[es]=Un ejemplo de «DataEngine» que muestra cómo responder a peticiones para creación y actualización de fuentes
Comment[fi]=DataEngine-esimerkki, joka näyttää miten vastata lähteiden luonnin ja päivittämisen pyyntöihin
Comment[fr]=Un exemple DataEngine montrant comment répondre à des requêtes de création de source et de mise à jour
Comment[gl]=Un exemplo de DataEngine que mostra como responder a pedidos de creación e actualización de orixes
Comment[hu]=DataEngine példa forráslétrehozási és frissítési kérések megválaszolására
Comment[ia]=Un exemplo de dataEngine (motor de datos) monstrante como responder a requestas de creation de fonte e actualisationes
Comment[nds]=En Datenkarn-Bispill, dat wiest, wodennig een op Anfragen na Bornopstellen un -opfrischen antern kann
Comment[nl]=Een voorbeeld van een gegevens-engine die toont hoe te antwoorden op verzoeken voor aanmaken van een bron en bijwerken

View File

@ -7,6 +7,7 @@ Name[de]=plasma-kpart-shell
Name[en_GB]=plasma-kpart-shell
Name[es]=plasma-kpart-shell
Name[fi]=plasma-kpart-shell
Name[fr]=plasma-kpart-shell
Name[gl]=plasma-kpart-shell
Name[hu]=plasma-kpart-shell
Name[ia]=plasma-kpart-shell
@ -36,7 +37,9 @@ GenericName[de]=Eine KPart-Shell für Plasma
GenericName[en_GB]=A KPart shell for Plasma
GenericName[es]=Un KPart de intérprete para Plasma
GenericName[fi]=KPart-kuori Plasmalle
GenericName[fr]=Un interpréteur KPart pour Plasma
GenericName[gl]=Unha shell de KPart para Plasma
GenericName[hu]=KPart héj a Plasmához
GenericName[ia]=Un shell (concha) de KPart pro Plasma
GenericName[nds]=En KPart-Konsool för Plasma
GenericName[nl]=Een KPart-shell voor Plasma

View File

@ -7,7 +7,9 @@ Name[de]=Test
Name[en_GB]=Test
Name[es]=Prueba
Name[fi]=Testi
Name[fr]=Test
Name[gl]=Proba
Name[hu]=Teszt
Name[ia]=Essaya
Name[it]=Test
Name[mr]=
@ -37,7 +39,9 @@ Comment[de]=Ein Dummy-Modul zum Testen.
Comment[en_GB]=A dummy plugin for testing
Comment[es]=Un complemento de simulación para hacer pruebas
Comment[fi]=Tyhjä testausliitännäinen
Comment[fr]=Un module externe factice pour tester
Comment[gl]=Un complemento para probas
Comment[hu]=Üres bővítmény tesztelésre
Comment[ia]=Un plugin vacue pro essayar
Comment[mr]=
Comment[nds]=En Platzholler-Moduul för't Utproberen

View File

@ -10,7 +10,9 @@ Name[de]=Herbst
Name[en_GB]=Autumn
Name[es]=Otoño
Name[fi]=Syksy
Name[fr]=Automne
Name[gl]=Outono
Name[hu]=Ősz
Name[ia]=Autumno
Name[it]=Autunno
Name[mr]=

View File

@ -107,6 +107,8 @@ Item {
}
MouseArea {
id: monthMouse
property int previousPixelDelta
width: monthHeading.paintedWidth
anchors {
left: parent.left
@ -119,6 +121,29 @@ Item {
}
menuLoader.item.open(0, height);
}
onExited: previousPixelDelta = 0
onWheel: {
var delta = wheel.angleDelta.y || wheel.angleDelta.x
var pixelDelta = wheel.pixelDelta.y || wheel.pixelDelta.x
// For high-precision touchpad scrolling, we get a wheel event for basically every slightest
// finger movement. To prevent the view from suddenly ending up in the next century, we
// cumulate all the pixel deltas until they're larger than the label and then only change
// the month. Standard mouse wheel scrolling is unaffected since it's fine.
if (pixelDelta) {
if (Math.abs(previousPixelDelta) < monthMouse.height) {
previousPixelDelta += pixelDelta
return
}
}
if (delta >= 15) {
calendarBackend.previousMonth()
} else if (delta <= -15) {
calendarBackend.nextMonth()
}
previousPixelDelta = 0
}
}
}

View File

@ -38,9 +38,25 @@ class QQuickItem;
class ColorScope : public QQuickItem
{
Q_OBJECT
/**
* Specifies the color group to use for this ColorScope
*/
Q_PROPERTY(Plasma::Theme::ColorGroup colorGroup READ colorGroup WRITE setColorGroup NOTIFY colorGroupChanged)
/**
* The main foreground color within this colorscope
*/
Q_PROPERTY(QColor textColor READ textColor NOTIFY colorsChanged)
/**
* The highlight color within this colorscope
*/
Q_PROPERTY(QColor highlightColor READ highlightColor NOTIFY colorsChanged)
/**
* The background color that should be used within this colorscope
*/
Q_PROPERTY(QColor backgroundColor READ backgroundColor NOTIFY colorsChanged)
public:

View File

@ -163,7 +163,7 @@ void DataSource::modelChanged(const QString &sourceName, QAbstractItemModel *mod
m_models->insert(sourceName, QVariant::fromValue(model));
//FIXME: this will break in the case a second model is set
connect(model, &QObject::destroyed, [ = ]() {
connect(model, &QObject::destroyed, m_models, [ = ]() {
m_models->clear(sourceName);
});
}

View File

@ -54,7 +54,6 @@ public:
typedef QMap<QString, QVariant> Data;
DataSource(QObject *parent = 0);
/**
* true if the connection to the Plasma DataEngine is valid
*/

View File

@ -1,6 +1,6 @@
/***************************************************************************
* Copyright 2013 Marco Martin <mart@kde.org> *
* Copyright 2014 Sebastian Kugler <sebas@kde.org> *
* Copyright 2014 Sebastian Kügler <sebas@kde.org> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@ -48,7 +48,7 @@ Units::Units(QObject *parent)
updateDevicePixelRatio(); // also updates icon sizes
updateSpacing(); // updates gridUnit and *Spacing properties
connect(KIconLoader::global(), SIGNAL(iconLoaderSettingsChanged()), this, SLOT(iconLoaderSettingsChanged()));
connect(KIconLoader::global(), &KIconLoader::iconLoaderSettingsChanged, this, &Units::iconLoaderSettingsChanged);
connect(&m_theme, &Plasma::Theme::themeChanged, this, &Units::updateSpacing);
QCoreApplication::instance()->installEventFilter(this);
@ -173,7 +173,7 @@ int Units::largeSpacing() const
void Units::updateSpacing()
{
int gridUnit = QFontMetrics(QGuiApplication::font()).boundingRect("M").height();;
int gridUnit = QFontMetrics(QGuiApplication::font()).boundingRect("M").height();
if (gridUnit % 2 != 0) {
gridUnit++;
}

View File

@ -19,6 +19,9 @@
#ifndef PLASMA_WINDOWTHUMBNAIL_H
#define PLASMA_WINDOWTHUMBNAIL_H
#include <config-plasma.h>
#include <cstdint>
// Qt
#include <QAbstractNativeEventFilter>
#include <QSGSimpleTextureNode>

View File

@ -4,60 +4,60 @@
## Widgets
Input:
- TextArea
- TextField
- CheckBox
- RadioButton
- Switch
- Slider
- \link org::kde::plasma::components::TextArea TextArea \endlink
- \link org::kde::plasma::components::TextField TextField \endlink
- \link org::kde::plasma::components::CheckBox CheckBox \endlink
- \link org::kde::plasma::components::RadioButton RadioButton \endlink
- \link org::kde::plasma::components::Switch Switch \endlink
- \link org::kde::plasma::components::Slider Slider \endlink
Buttons:
- Button
- ButtonColumn
- ButtonRow
- ToolButton
- \link org::kde::plasma::components::Button Button \endlink
- \link org::kde::plasma::components::ButtonColumn ButtonColumn \endlink
- \link org::kde::plasma::components::ButtonRow ButtonRow \endlink
- \link org::kde::plasma::components::ToolButton ToolButton \endlink
Misc:
- BusyIndicator
- ProgressBar
- Label
- \link org::kde::plasma::components::BusyIndicator BusyIndicator \endlink
- \link org::kde::plasma::components::ProgressBar ProgressBar \endlink
- \link org::kde::plasma::components::Label Label \endlink
## Containers
Pages:
- Page
- PageOrientation
- PageStatus
- PageStack
- \link org::kde::plasma::components::Page Page \endlink
- \link org::kde::plasma::components::PageOrientation PageOrientation \endlink
- \link org::kde::plasma::components::PageStatus PageStatus \endlink
- \link org::kde::plasma::components::PageStack PageStack \endlink
Dialogs:
- Dialog
- DialogStatus
- CommonDialog
- QueryDialog
- SelectionDialog
- \link org::kde::plasma::components::Dialog Dialog \endlink
- \link org::kde::plasma::components::DialogStatus DialogStatus \endlink
- \link org::kde::plasma::components::CommonDialog CommonDialog \endlink
- \link org::kde::plasma::components::QueryDialog QueryDialog \endlink
- \link org::kde::plasma::components::SelectionDialog SelectionDialog \endlink
Tab bars:
- TabBar
- TabButton
- TabGroup
- \link org::kde::plasma::components::TabBar TabBar \endlink
- \link org::kde::plasma::components::TabButton TabButton \endlink
- \link org::kde::plasma::components::TabGroup TabGroup \endlink
Misc:
- Sheet
- ScrollBar
- \link org::kde::plasma::components::Sheet Sheet \endlink
- \link org::kde::plasma::components::ScrollBar ScrollBar \endlink
## Menus
- Menu
- MenuItem
- ContextMenu
- \link org::kde::plasma::components::Menu Menu \endlink
- \link org::kde::plasma::components::MenuItem MenuItem \endlink
- \link org::kde::plasma::components::ContextMenu ContextMenu \endlink
## Lists
- ListItem
- Highlight
- SectionScroller
- \link org::kde::plasma::components::ListItem ListItem \endlink
- \link org::kde::plasma::components::Highlight Highlight \endlink
- \link org::kde::plasma::components::SectionScroller SectionScroller \endlink
## Toolbar
- ToolBar
- ToolBarLayout
- \link org::kde::plasma::components::ToolBar ToolBar \endlink
- \link org::kde::plasma::components::ToolBarLayout ToolBarLayout \endlink
*/
// DOXYGEN_SET_PROJECT_NAME = PlasmaComponents

View File

@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp@gmail.com>
* Copyright (C) 2014 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
@ -19,66 +20,19 @@
import QtQuick 2.1
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import "private" as Private
import QtQuick.Controls 1.2 as QtControls
import "styles" as Styles
// TODO: create a value indicator for plasma?
/**
* An interactive slider component with Plasma look and feel.
*
* @inherit QtQuick.Item
* @inherit QtControls.Slider
*/
Item {
QtControls.Slider {
id: slider
// Common API
/**
* type:real
* How many steps the slider value can be selected within its range value.
*/
property alias stepSize: range.stepSize
/**
* type:real
* Minimum value that the slider's value can assume.
*
* The default value is 0.
*/
property alias minimumValue: range.minimumValue
/**
* type:real
* Maximum value that the slider's value can assume.
*
* The default value is 1.
*/
property alias maximumValue: range.maximumValue
/**
* type:real
* This property holds the value selected inside the minimum to maximum
* range of value.
*
* The default value is 0.
*/
property alias value: range.value
/**
* Orientation for this component.
*
* The orientation can be either Qt.Horizontal or Qt.Vertical.
*
* The default is Qt.Horizontal.
*/
property int orientation: Qt.Horizontal
/**
* type:bool
*
* True if the Slider is being pressed.
*/
property alias pressed: mouseArea.pressed
/**
* This property holds if a value indicator element will be shown while is
* dragged or not.
@ -96,15 +50,14 @@ Item {
*/
property string valueIndicatorText: value
// Plasma API
/**
* type:bool
* This property holds if the slider visualizations has an inverted
* direction.
*
* The default value is false.
* @warning: deprecated and not supported, here for retrocompatibility
*/
property alias inverted: range.inverted
property bool inverted: false
width: contents.isVertical ? theme.mSize(theme.defaultFont).height*1.6 : 200
height: contents.isVertical ? 200 : theme.mSize(theme.defaultFont).height*1.6
@ -114,10 +67,7 @@ Item {
activeFocusOnTab: true
Keys.onUpPressed: { if (contents.isVertical) decrease() }
Keys.onDownPressed: { if (contents.isVertical) increase() }
Keys.onLeftPressed: { if (!contents.isVertical) increase() }
Keys.onRightPressed: { if (!contents.isVertical) decrease() }
//FIXME: remove those 2 functions once we can depend from 5.4*/
function accessibleIncreaseAction() { increase() }
function accessibleDecreaseAction() { decrease() }
@ -138,177 +88,5 @@ Item {
value += stepSize;
}
Item {
id: contents
// Plasma API
property bool animated: units.longDuration > 0
property real handleWidth: handle.naturalSize.width
property real handleHeight: handle.naturalSize.height
// Convenience API
property bool isVertical: orientation == Qt.Vertical
width: contents.isVertical ? slider.height : slider.width
height: contents.isVertical ? slider.width : slider.height
rotation: contents.isVertical ? -90 : 0
anchors.centerIn: parent
PlasmaComponents.RangeModel {
id: range
minimumValue: 0.0
maximumValue: 1.0
value: 0
stepSize: 0.0
inverted: false
positionAtMinimum: -handle.width/8
positionAtMaximum: contents.width - (handle.width/8) * 7
}
PlasmaCore.Svg {
id: grooveSvg
imagePath: "widgets/slider"
}
PlasmaCore.FrameSvgItem {
id: groove
imagePath: "widgets/slider"
prefix: "groove"
//FIXME: frameSvg should have a minimumSize attribute, could be added to kdelibs 4.7(maybe just the qml binding is enough)?
height: margins.top + margins.bottom
anchors {
left: parent.left
right: parent.right
verticalCenter: parent.verticalCenter
}
}
PlasmaCore.FrameSvgItem {
id: highlight
imagePath: "widgets/slider"
prefix: "groove-highlight"
height: groove.height
width: inverted ? groove.width - handle.x - handle.width/4 : fakeHandle.x + handle.width/4
x: inverted ? handle.x + handle.width/4 : 0
anchors.verticalCenter: parent.verticalCenter
//use the same animation when resizing a slider as moving the slider this keeps it in line when using key shortcuts
Behavior on width {
enabled: !mouseArea.drag.active && contents.animated
PropertyAnimation {
duration: behavior.enabled ? units.shortDuration : 0
easing.type: Easing.OutSine
}
}
Behavior on x {
enabled: inverted && !mouseArea.drag.active && contents.animated
PropertyAnimation {
duration: behavior.enabled ? units.shortDuration : 0
easing.type: Easing.OutSine
}
}
visible: range.position > 0 && slider.enabled
}
Private.RoundShadow {
id: shadow
imagePath: "widgets/slider"
focusElement: contents.isVertical ? "vertical-slider-focus" : "horizontal-slider-focus"
hoverElement: contents.isVertical ? "vertical-slider-hover" : "horizontal-slider-hover"
shadowElement: contents.isVertical ? "vertical-slider-shadow" : "horizontal-slider-shadow"
state: slider.activeFocus ? "focus" : (mouseArea.containsMouse ? "hover" : "shadow")
anchors.fill: handle
//We rotate the handle below, we need to rotate the shadow back as well
rotation: contents.isVertical ? 90 : 0
}
PlasmaCore.SvgItem {
id: handle
x: fakeHandle.x
anchors {
verticalCenter: groove.verticalCenter
}
width: contents.handleWidth
height: contents.handleHeight
//Rotate the handle back for vertical slider so all the handles have the same shadow effect
rotation: contents.isVertical ? 90 : 0
svg: grooveSvg
elementId: contents.isVertical ? "vertical-slider-handle" : "horizontal-slider-handle"
Behavior on x {
id: behavior
enabled: !mouseArea.drag.active && contents.animated
PropertyAnimation {
duration: behavior.enabled ? units.shortDuration : 0
easing.type: Easing.OutSine
}
}
}
Item {
id: fakeHandle
width: handle.width
height: handle.height
}
MouseArea {
id: mouseArea
anchors.fill: parent
enabled: slider.enabled
drag {
target: fakeHandle
axis: Drag.XAxis
minimumX: range.positionAtMinimum
maximumX: range.positionAtMaximum
}
hoverEnabled: true
onPressed: {
// 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 (Math.abs(newX - fakeHandle.x) > handle.width / 2) {
range.position = newX - handle.width / 2
}
slider.forceActiveFocus()
}
onWheel: {
// horizontal scrolling (angleDelta.x) is "inverted"
// this matches QSlider's behavior
var delta = wheel.angleDelta.x ? -wheel.angleDelta.x : wheel.angleDelta.y
if (delta > 0) { // up/right
slider.value += (slider.inverted ? -slider.stepSize : slider.stepSize)
} else if (delta < 0) {
slider.value += (slider.inverted ? slider.stepSize : -slider.stepSize)
}
slider.forceActiveFocus()
}
}
}
Binding {
target: range
property: "position"
value: fakeHandle.x
}
// During the drag, we simply ignore position set from the range, this
// means that setting a value while dragging will not "interrupt" the
// dragging activity.
Binding {
when: !mouseArea.drag.active
target: fakeHandle
property: "x"
value: range.position
}
Accessible.role: Accessible.Slider
style: Styles.SliderStyle {}
}

View File

@ -27,7 +27,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
Item{
id: toolBar
width: parent.width
height: (tools && enabled) ? tools.height + frameSvg.margins.top + frameSvg.margins.bottom : 0
height: (tools && enabled) ? tools.implicitHeight + frameSvg.margins.top + frameSvg.margins.bottom : 0
visible: height > 0
/**

View File

@ -37,8 +37,8 @@ QtQuickControlStyle.CheckBoxStyle {
indicator: PlasmaCore.FrameSvgItem {
imagePath: "widgets/button"
prefix: "normal"
width: units.gridUnit
height: units.gridUnit
width: theme.mSize(theme.defaultFont).height + margins.left
height: theme.mSize(theme.defaultFont).height + margins.top
opacity: control.enabled ? 1 : 0.6
PlasmaCore.SvgItem {

View File

@ -42,8 +42,8 @@ QtQuickControlStyle.RadioButtonStyle {
}
elementId: "normal"
width: units.gridUnit
height: width
width: theme.mSize(theme.defaultFont).height + margins.left
height: theme.mSize(theme.defaultFont).height + margins.top
PlasmaCore.SvgItem {
id: checkmark

View File

@ -0,0 +1,91 @@
/*
* Copyright (C) 2014 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 2.010-1301, USA.
*/
import QtQuick 2.1
import QtQuick.Controls.Styles 1.1 as QtQuickControlStyle
import QtQuick.Controls 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import "../private" as Private
QtQuickControlStyle.SliderStyle {
id: styleItem
property Item handleItem
padding { top: 0 ; left: 0 ; right: 0 ; bottom: 0 }
PlasmaCore.Svg {
id: grooveSvg
imagePath: "widgets/slider"
}
handle: Item {
width: handle.naturalSize.width
height: handle.naturalSize.height
Private.RoundShadow {
id: shadow
anchors.fill: parent
imagePath: "widgets/slider"
focusElement: "horizontal-slider-focus"
hoverElement: "horizontal-slider-hover"
shadowElement: "horizontal-slider-shadow"
state: control.activeFocus ? "focus" : (control.hovered ? "hover" : "shadow")
}
PlasmaCore.SvgItem {
id: handle
anchors.fill: parent
svg: grooveSvg
elementId: "horizontal-slider-handle"
}
}
groove: PlasmaCore.FrameSvgItem {
id: groove
imagePath: "widgets/slider"
prefix: "groove"
PlasmaCore.FrameSvgItem {
id: highlight
imagePath: "widgets/slider"
prefix: "groove-highlight"
height: groove.height
width: styleData.handlePosition
anchors.verticalCenter: parent.verticalCenter
visible: value > 0 && slider.enabled
}
}
tickmarks: Repeater {
id: repeater
model: control.stepSize > 0 ? 1 + (control.maximumValue - control.minimumValue) / control.stepSize : 0
Rectangle {
color: theme.textColor
width: 1 ; height: 3
y: repeater.height
//Position ticklines from styleData.handleWidth to width - styleData.handleWidth/2
//position them at an half handle width increment
x: styleData.handleWidth / 2 + index * ((repeater.width - styleData.handleWidth) / (repeater.count>1 ? repeater.count-1 : 1))
}
}
}

View File

@ -33,6 +33,9 @@ QtQuickControlStyle.TextFieldStyle {
selectedTextColor: theme.viewBackgroundColor
background: Item {
implicitHeight: theme.mSize(theme.defaultFont).height * 1.6
implicitWidth: theme.mSize(theme.defaultFont).width * 12
Private.TextFieldFocus {
id: hover
state: control.activeFocus ? "focus" : (control.hovered ? "hover" : "hidden")

View File

@ -170,7 +170,7 @@ QtQuickControlStyle.ButtonStyle {
implicitWidth: {
if (control.text.length == 0) {
height;
implicitHeight;
} else {
Math.max(theme.mSize(theme.defaultFont).width*12, style.minimumWidth);
}

View File

@ -2,22 +2,22 @@
<h2>import org.kde.plasma.extras</h2>
- App
- PageRow
- ScrollArea
- FallbackComponent
- ResourceInstance
- \link org::kde::plasma::plasmaextracomponents::App App \endlink
- \link org::kde::plasma::plasmaextracomponents::PageRow PageRow \endlink
- \link org::kde::plasma::plasmaextracomponents::ScrollArea ScrollArea \endlink
- \link org::kde::plasma::plasmaextracomponents::FallbackComponent FallbackComponent \endlink
- \link org::kde::plasma::plasmaextracomponents::ResourceInstance ResourceInstance \endlink
Text formatting
- Heading
- Paragraph
- Title
- \link org::kde::plasma::plasmaextracomponents::Heading Heading \endlink
- \link org::kde::plasma::plasmaextracomponents::Paragraph Paragraph \endlink
- \link org::kde::plasma::plasmaextracomponents::Title Title \endlink
Animations
- ActivateAnimation
- AppearAnimation
- PressedAnimation
- ReleasedAnimation
- \link org::kde::plasma::plasmaextracomponents::ActivateAnimation ActivateAnimation \endlink
- \link org::kde::plasma::plasmaextracomponents::AppearAnimation AppearAnimation \endlink
- \link org::kde::plasma::plasmaextracomponents::PressedAnimation PressedAnimation \endlink
- \link org::kde::plasma::plasmaextracomponents::ReleasedAnimation ReleasedAnimation \endlink
*/

View File

@ -8,6 +8,7 @@ Name[de]=Air
Name[en_GB]=Air
Name[es]=Aire
Name[fi]=Air
Name[fr]=Air
Name[gl]=Air
Name[hu]=Levegő
Name[ia]=Air
@ -42,6 +43,7 @@ Comment[de]=Ein Atemzug frische Luft
Comment[en_GB]=A breath of fresh air
Comment[es]=Una bocanada de aire fresco
Comment[fi]=Raikkaan ilman leyhähdys
Comment[fr]=Un souffle d'air frais
Comment[gl]=Un folgo de ar fresco
Comment[hu]=Friss fuvallat
Comment[ia]=Un respiration de aere fresc

View File

@ -6,7 +6,9 @@ Name[de]=Dunkle Brise
Name[en_GB]=Breeze Dark
Name[es]=Brisa oscuro
Name[fi]=Breeze Dark
Name[fr]=Breeze foncé
Name[gl]=Breeze escuro
Name[hu]=Breeze Dark
Name[ia]=Brisa obscure
Name[nds]=Breeze düüster
Name[nl]=Breeze Dark

Some files were not shown because too many files have changed in this diff Show More