From e747fb6e3bab28baebf15e77295c6cb62d9cc4c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Sat, 31 Mar 2012 01:20:08 +0200 Subject: [PATCH] APIDOX improvements for PlasmaExtras --- .../plasmaextracomponents/qml/App.qml | 47 +++++++++++++++---- .../plasmaextracomponents/qml/Heading.qml | 29 ++++++++---- .../plasmaextracomponents/qml/Paragraph.qml | 24 ++++++++-- .../plasmaextracomponents/qml/Title.qml | 23 ++++++--- 4 files changed, 92 insertions(+), 31 deletions(-) diff --git a/declarativeimports/plasmaextracomponents/qml/App.qml b/declarativeimports/plasmaextracomponents/qml/App.qml index b1f436418..ea47b691f 100644 --- a/declarativeimports/plasmaextracomponents/qml/App.qml +++ b/declarativeimports/plasmaextracomponents/qml/App.qml @@ -26,21 +26,48 @@ Imports: org.kde.plasma.extras Description: - This is a container for Apps. Navigation and Content area layout can - vary depending on the available size. + This is a container for Apps. Navigation and Content area layout can vary depending on the + available size. This class can be used as top level Item or inside your top-level item. It + will manage context or navigation area, content area and toolbars in a way consistent with + other apps, and adaptive to the device. - Note that App is experimental, its API might change + Note that App is experimental, its API might change. + + Example usage: +
import QtQuick 1.1
+import org.kde.plasma.core 0.1 as PlasmaCore
+import org.kde.plasma.extras 0.1 as PlasmaExtras
+
+PlasmaExtras.App {
+    id: app
+    width: 800
+    height: 600
+
+    navigation: navigationItem
+    content: contentItem
+
+    Item {
+        id: navigationItem
+        // [...] this is the navigation area
+    }
+
+    Loader {
+        id: contentItem
+        source: "gallery/Extras.qml"
+        parent: contentArea
+    }
+}
Properties: - Item navigation: Navigation or Context Area. - Item content: The "main view" - ToolBarLayout tools: alias to the topBar's ToolBar.tools + Item navigation: + Navigation or Context Area. -Methods: - + Item content: + The "main view" + + ToolBarLayout tools: + alias to the topBar's ToolBar.tools -Signals: - **/ import QtQuick 1.1 diff --git a/declarativeimports/plasmaextracomponents/qml/Heading.qml b/declarativeimports/plasmaextracomponents/qml/Heading.qml index ca7cdb3f7..1966bc83f 100644 --- a/declarativeimports/plasmaextracomponents/qml/Heading.qml +++ b/declarativeimports/plasmaextracomponents/qml/Heading.qml @@ -26,24 +26,35 @@ Imports: org.kde.plasma.extras Description: - This is a title label which uses the plasma theme. - The characteristics of the text will be automatically set - according to the plasma theme. Use this components for titles - in your UI, for example page or section titles. + This is a heading label used for subsections of texts. + The characteristics of the text will be automatically set according to the plasma theme. Use + this components for section titles or headings in your UI, for example page or section titles. + + Example usage: + +import org.kde.plasma.extras 0.1 as PlasmaExtras +[...] +Column{ + PlasmaExtras.Title { text: "Fruit sweetness on the rise" } + PlasmaExtras.Heading { text: "Apples in the sunlight"; level: 2 } + PlasmaExtras.Paragraph { text: "Long text about fruit and apples [...]" } + [...] +} + + + See Plasma Component's Label and primitive QML Text element API for additional properties, + methods and signals. + Properties: string text: The most important property is "text", which applies to the text property of Label For the other ones see Plasma Component's Label or QML primitive Text element + int level: The level determines how big the section header is display, values between 1 (big) and 5 (small) are accepted -Methods: - See Plasma Component's Label and primitive QML Text element - -Signals: - See Plasma Component's Label and primitive QML Text element **/ import QtQuick 1.1 diff --git a/declarativeimports/plasmaextracomponents/qml/Paragraph.qml b/declarativeimports/plasmaextracomponents/qml/Paragraph.qml index 2154c771d..a7d459683 100644 --- a/declarativeimports/plasmaextracomponents/qml/Paragraph.qml +++ b/declarativeimports/plasmaextracomponents/qml/Paragraph.qml @@ -26,21 +26,35 @@ Imports: org.kde.plasma.extras Description: - This is a paragraph label which uses the plasma theme. - The characteristics of the text will be automatically set - according to the plasma theme. Use this components for paragraphs - of text in your application. + This is a paragraph Label which uses the plasma theme. The characteristics of the text will + be automatically set according to the plasma theme. Use this components for paragraphs + of text in your application. Use this component for blocks of text in your app. + + Example usage: + +import org.kde.plasma.extras 0.1 as PlasmaExtras +[...] +Column{ + PlasmaExtras.Title { text: "Fruit sweetness on the rise" } + PlasmaExtras.Heading { text: "Apples in the sunlight"; level: 2 } + PlasmaExtras.Paragraph { text: "Long text about fruit and apples [...]" } + [...] +} + + + See Plasma Component's Label and primitive QML Text element API for additional properties, + methods and signals. Properties: string text: The most important property is "text", which applies to the text property of Label For the other ones see Plasma Component's Label or QML primitive Text element + int level: The level determines how big the section header is display, values between 1 (big) and 5 (small) are accepted Methods: - See Plasma Component's Label and primitive QML Text element Signals: See Plasma Component's Label and primitive QML Text element diff --git a/declarativeimports/plasmaextracomponents/qml/Title.qml b/declarativeimports/plasmaextracomponents/qml/Title.qml index f74c70985..87addb42a 100644 --- a/declarativeimports/plasmaextracomponents/qml/Title.qml +++ b/declarativeimports/plasmaextracomponents/qml/Title.qml @@ -23,7 +23,7 @@ Inherits: Imports: QtQuick 1.1 - org.kde.plasma.components + org.kde.plasma.components 0.1 Description: This is a title label which uses the plasma theme. @@ -31,16 +31,25 @@ Description: according to the plasma theme. Use this components for titles in your UI, for example page or section titles. + Example usage: + +import org.kde.plasma.extras 0.1 as PlasmaExtras +[...] +Column{ + PlasmaExtras.Title { text: "Fruit sweetness on the rise" } + PlasmaExtras.Heading { text: "Apples in the sunlight"; level: 2 } + PlasmaExtras.Paragraph { text: "Long text about fruit and apples [...]" } + [...] +} + + + See Plasma Component's Label and primitive QML Text element API for additional properties, + methods and signals. + Properties: string text: The most important property is "text", which applies to the text property of Label For the other ones see Plasma Component's Label or QML primitive Text element - -Methods: - See Plasma Component's Label and primitive QML Text element - -Signals: - See Plasma Component's Label and primitive QML Text element **/ import QtQuick 1.1