diff --git a/source/qml/components/inlinemessage/Message1.qml b/source/qml/components/inlinemessage/Message1.qml new file mode 100644 --- /dev/null +++ b/source/qml/components/inlinemessage/Message1.qml @@ -0,0 +1,47 @@ +/* + * Copyright 2018 Fabian Riethmayer + * + * 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 2.7 +import QtQuick.Controls 2.2 +import QtQuick.Layouts 1.2 +import org.kde.kirigami 2.4 as Kirigami +import "../../lib" as HIG + +Rectangle { + id: root + width: 600 + height: 160 + + ColumnLayout { + x: Kirigami.Units.gridUnit * 2 + y: Kirigami.Units.gridUnit * 2 + width: parent.width - 2 * Kirigami.Units.gridUnit * 2 + Kirigami.InlineMessage { + Layout.fillWidth: true + visible: true + text: "This is an informational inline message with a custom icon." + icon.source: "system-run" + showCloseButton: true + } + } + + HIG.Raster { + z: 1 + } +} diff --git a/source/qml/components/inlinemessage/Message2.qml b/source/qml/components/inlinemessage/Message2.qml new file mode 100644 --- /dev/null +++ b/source/qml/components/inlinemessage/Message2.qml @@ -0,0 +1,55 @@ +/* + * Copyright 2018 Fabian Riethmayer + * + * 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 2.7 +import QtQuick.Controls 2.2 +import QtQuick.Layouts 1.2 +import org.kde.kirigami 2.4 as Kirigami +import "../../lib" as HIG + +Rectangle { + id: root + width: 600 + height: 160 + + ColumnLayout { + x: Kirigami.Units.gridUnit * 2 + y: Kirigami.Units.gridUnit * 2 + width: parent.width - 2 * Kirigami.Units.gridUnit * 2 + Kirigami.InlineMessage { + Layout.fillWidth: true + visible: true + text: "Remember password?" + actions: [ + Kirigami.Action { + text: "Remember" + icon.name: "dialog-ok-apply" + }, + Kirigami.Action { + text: "Do not remember" + icon.name: "dialog-cancel" + } + ] + } + } + + HIG.Raster { + z: 1 + } +} diff --git a/source/qml/components/inlinemessage/Message3.qml b/source/qml/components/inlinemessage/Message3.qml new file mode 100644 --- /dev/null +++ b/source/qml/components/inlinemessage/Message3.qml @@ -0,0 +1,54 @@ +/* + * Copyright 2018 Fabian Riethmayer + * + * 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 2.7 +import QtQuick.Controls 2.2 +import QtQuick.Layouts 1.2 +import org.kde.kirigami 2.4 as Kirigami +import "../../lib" as HIG + +import "../../lib/annotate.js" as A + +Rectangle { + id: root + width: 200 + height: 220 + + ColumnLayout { + x: Kirigami.Units.gridUnit * 2 + y: Kirigami.Units.gridUnit * 2 + width: parent.width - 2 * Kirigami.Units.gridUnit * 2 + Kirigami.InlineMessage { + Layout.fillWidth: true + visible: true + text: "Do you want to rip this CD?" + actions: [ + Kirigami.Action { + text: "Rip CD" + icon.name: "dialog-ok-apply" + } + ] + } + } + + HIG.Raster { + z: 1 + } +} diff --git a/source/qml/components/inlinemessage/Message5.qml b/source/qml/components/inlinemessage/Message5.qml new file mode 100644 --- /dev/null +++ b/source/qml/components/inlinemessage/Message5.qml @@ -0,0 +1,68 @@ +/* + * Copyright 2018 Fabian Riethmayer + * + * 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 2.7 +import QtQuick.Controls 2.2 +import QtQuick.Layouts 1.2 +import org.kde.kirigami 2.4 as Kirigami +import "../../lib" as HIG + +Rectangle { + id: root + width: 600 + height: 340 + + ColumnLayout { + x: Kirigami.Units.gridUnit * 2 + y: Kirigami.Units.gridUnit * 2 + width: parent.width - 2 * Kirigami.Units.gridUnit * 2 + spacing: Kirigami.Units.largeSpacing + + Kirigami.InlineMessage { + Layout.fillWidth: true + visible: true + text: "This is an informational inline message (the default type). Use it for example to announce a result or provide commentary." + } + + Kirigami.InlineMessage { + Layout.fillWidth: true + visible: true + type: Kirigami.MessageType.Positive + text: "This is a positive inline message. Use it for example to announce a successful result or the succesful completion of a procedure." + } + + Kirigami.InlineMessage { + Layout.fillWidth: true + visible: true + type: Kirigami.MessageType.Warning + text: "This is a warning inline message. Use it for example to provide critical guidance or warn about something that is not going to work." + } + + Kirigami.InlineMessage { + Layout.fillWidth: true + visible: true + type: Kirigami.MessageType.Error + text: "This is an error inline message. Use it for example to announce something has gone wrong or that input will not be accepted." + } + } + + HIG.Raster{ + z: 1 + } +}