port to new api
This commit is contained in:
parent
9275e84a99
commit
308f59bc68
@ -19,13 +19,14 @@
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
|
||||
Item {
|
||||
property int minimumWidth: 200
|
||||
property int minimumHeight: 300
|
||||
property Component compactRepresentation: Component {
|
||||
Layout.minimumWidth: 200
|
||||
Layout.minimumHeight: 300
|
||||
Plasmoid.compactRepresentation: Component {
|
||||
PlasmaComponents.Button {
|
||||
text: i18n("Click me")
|
||||
onClicked: plasmoid.expanded = !plasmoid.expanded
|
||||
|
@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import QtQuick.Layouts 1.0
|
||||
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
@ -30,10 +31,10 @@ Rectangle {
|
||||
height: 100
|
||||
radius: 10
|
||||
smooth: true
|
||||
property int minimumWidth: units.gridUnit * 20
|
||||
property int minimumHeight: column.implicitHeight
|
||||
Layout.minimumWidth: units.gridUnit * 20
|
||||
Layout.minimumHeight: column.implicitHeight
|
||||
|
||||
property Component compactRepresentation: Component {
|
||||
Plasmoid.compactRepresentation: Component {
|
||||
Rectangle {
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
@ -26,8 +26,8 @@ Item {
|
||||
id: root
|
||||
width: 100
|
||||
height: 100
|
||||
property int minimumWidth: units.gridUnit * 20
|
||||
property int minimumHeight: column.implicitHeight
|
||||
Layout.minimumWidth: units.gridUnit * 20
|
||||
Layout.minimumHeight: column.implicitHeight
|
||||
|
||||
|
||||
ColumnLayout {
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
||||
@ -26,8 +27,8 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras
|
||||
Column {
|
||||
width: 500
|
||||
height: 500
|
||||
property int minimumWidth: 200
|
||||
property int minimumHeight: 300
|
||||
Layout.minimumWidth: 200
|
||||
Layout.minimumHeight: 300
|
||||
|
||||
PlasmaCore.DataSource {
|
||||
id: source
|
||||
|
@ -19,12 +19,13 @@
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
|
||||
Item {
|
||||
property int minimumWidth: 200
|
||||
property int minimumHeight: 300
|
||||
Layout.minimumWidth: 200
|
||||
Layout.minimumHeight: 300
|
||||
|
||||
PlasmaComponents.Label {
|
||||
text: i18n("Hello world")
|
||||
|
@ -18,12 +18,13 @@
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
|
||||
PlasmaCore.SvgItem {
|
||||
property int minimumWidth: 150
|
||||
property int minimumHeight: 150
|
||||
Layout.minimumWidth: 150
|
||||
Layout.minimumHeight: 150
|
||||
svg: PlasmaCore.Svg("widgets/notes")
|
||||
elementId: "yellow-notes"
|
||||
|
||||
|
@ -27,8 +27,8 @@ Item {
|
||||
width: 400
|
||||
height: 32
|
||||
|
||||
property bool fillWidth: true
|
||||
property bool fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
implicitWidth: tasksModel.count * 50
|
||||
|
||||
PlasmaCore.DataSource {
|
||||
|
@ -28,8 +28,8 @@ Item {
|
||||
width: 100
|
||||
height: 100
|
||||
clip: true
|
||||
property int minimumWidth: units.gridUnit * 20
|
||||
property int minimumHeight: units.gridUnit * 30
|
||||
Layout.minimumWidth: units.gridUnit * 20
|
||||
Layout.minimumHeight: units.gridUnit * 30
|
||||
|
||||
property int _s: units.iconSizes.small
|
||||
property int _h: units.iconSizes.desktop
|
||||
|
@ -28,8 +28,8 @@ Item {
|
||||
width: 400
|
||||
height: 400
|
||||
|
||||
property int minimumWidth: units.gridUnit * 20
|
||||
property int minimumHeight: units.gridUnit * 30
|
||||
Layout.minimumWidth: units.gridUnit * 20
|
||||
Layout.minimumHeight: units.gridUnit * 30
|
||||
property int _s: units.iconSizes.small
|
||||
property int _h: units.iconSizes.desktop
|
||||
property int _m: 12
|
||||
|
@ -28,8 +28,8 @@ Item {
|
||||
width: 300
|
||||
height: 400
|
||||
clip: true
|
||||
property int minimumWidth: units.gridUnit * 10
|
||||
property int minimumHeight: units.gridUnit * 10
|
||||
Layout.minimumWidth: units.gridUnit * 10
|
||||
Layout.minimumHeight: units.gridUnit * 10
|
||||
|
||||
property int _s: units.iconSizes.small
|
||||
property int _h: units.iconSizes.medium
|
||||
|
@ -18,18 +18,18 @@
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import QtQuick.Layouts 1.1
|
||||
import org.kde.plasma.components 2.0
|
||||
import org.kde.plasma.shell 2.0
|
||||
|
||||
Item {
|
||||
Layout.minimumWidth: 300
|
||||
Layout.minimumHeight: 400
|
||||
|
||||
Plasmoid.title: "bah"
|
||||
Plasmoid.switchWidth: 300
|
||||
Plasmoid.switchHeight: 400
|
||||
|
||||
Plasmoid.fullRepresentation: Item {
|
||||
Layout.minimumWidth: 300
|
||||
Layout.minimumHeight: 400
|
||||
|
||||
ToolBar {
|
||||
id: toolBar
|
||||
z: 10
|
||||
@ -41,7 +41,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PageStack {
|
||||
id: pageStack
|
||||
toolBar: toolBar
|
||||
@ -54,4 +53,5 @@ Item {
|
||||
}
|
||||
initialPage: Qt.createComponent("Menu.qml")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,11 +18,12 @@
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import org.kde.plasma.components 2.0
|
||||
|
||||
Image {
|
||||
property int minimumWidth: 300
|
||||
property int minimumHeight: 400
|
||||
Layout.minimumWidth: 300
|
||||
Layout.minimumHeight: 400
|
||||
source: "image://appbackgrounds/standard"
|
||||
fillMode: Image.Tile
|
||||
asynchronous: true
|
||||
|
@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
import QtQuick 2.0
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
import org.kde.plasma.extras 2.0 as PlasmaExtras
|
||||
@ -28,8 +29,8 @@ Item {
|
||||
width: 400
|
||||
height: 32
|
||||
|
||||
property bool fillWidth: true
|
||||
property bool fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
PlasmaCore.DataSource {
|
||||
id: tasksSource
|
||||
|
Loading…
Reference in New Issue
Block a user