Warning, /maui/mauikit/docs/QuickApp.dox is written in an unsupported language. File is not indexed.
0001 /* 0002 * This file is part of MauiKit 0003 * SPDX-FileCopyrightText: 2016 Marco Martin <mart@kde.org> 0004 * SPDX-FileCopyrightText: 2023 Camilo Higuita <milo.h@aol.com> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 0010 /** @mainpage mauikit 0011 0012 0013 @subsection overview Introduction 0014 MauiKit is a set of <a href="https://doc.qt.io/qt-6/qtquick-index.html">QtQuick</a> components for building adaptable UIs based on <a href="https://doc.qt.io/qt-6/qtquickcontrols-index.html">QtQuick Controls 2</a>. 0015 0016 Its goal is to enable creation of convergent applications that look and feel great on mobile as well as desktop devices and follow the <a href="https://develop.kde.org/hig">Maui Human Interface Guidelines</a> while being easy to use and not adding many dependencies. 0017 0018 MauiKit works on a variety of platforms, such as <a href="https://plasma-mobile.org/">Plasma Mobile</a>, Desktop Linux and Android. 0019 0020 @subsection tutorial Tutorial 0021 A tutorial for MauiKit Controls is available on <a href="https://develop.kde.org/docs/getting-started/kirigami/">our developer platform</a>. 0022 0023 It is possible to make short mockups using QtQuick and MauiKit Controls and briefly test individual QML files using the <a href="https://doc.qt.io/qt-6/qtquick-qml-runtime.html">qml tool</a>. 0024 0025 A list of additional QML learning resources is available in the <a href="https://community.kde.org/Get_Involved/development/Learn#QtQuick/QML">Community Wiki</a>. If you are not familiar with QML at all, the <a href="https://www.qt.io/product/qt6/qml-book">QML book</a> should be a good head start. 0026 0027 If you have any questions about MauiKit, feel free to drop by the <a href="https://go.kde.org/matrix/#/#kirigami:kde.org">Maui Project group on Telegram</a>. 0028 0029 @subsection components Main Views Components 0030 - \link ApplicationWindow ApplicationWindow \endlink 0031 - \link AppViews AppViews \endlink 0032 - \link SidebarView SidebarView \endlink 0033 - \link TabView TabView \endlink 0034 - \link SplitView SplitView \endlink 0035 - \link Page Page \endlink 0036 0037 @subsection controls Common Kirigami Controls 0038 0039 - \link org::kde::kirigami::Card Card \endlink 0040 - \link org::kde::kirigami::templates::OverlaySheet OverlaySheet \endlink 0041 - \link org::kde::kirigami::BasicListItem BasicListItem \endlink 0042 - \link org::kde::kirigami::SwipeListItem SwipeListItem \endlink 0043 - \link org::kde::kirigami::Heading Heading \endlink 0044 - \link org::kde::kirigami::PlaceholderMessage PlaceholderMessage \endlink 0045 - \link org::kde::kirigami::SearchField SearchField \endlink 0046 - \link org::kde::kirigami::Dialog Dialog \endlink 0047 - \link org::kde::kirigami::NavigationTabBar NavigationTabBar \endlink 0048 - \link Icon Icon \endlink 0049 0050 @subsection example Minimal Example 0051 0052 @code 0053 import QtQuick 0054 import QtQuick.Controls 0055 import org.mauikit.controls as Maui 0056 0057 Maui.ApplicationWindow 0058 { 0059 id: root 0060 0061 Maui.SideBarView 0062 { 0063 anchors.fill: parent 0064 0065 sideBarContent: Maui.Page 0066 { 0067 Maui.Theme.colorSet: Maui.Theme.Window 0068 anchors.fill: parent 0069 0070 headBar.leftContent: Maui.ToolButtonMenu 0071 { 0072 icon.name: "application-menu" 0073 MenuItem 0074 { 0075 text: "About" 0076 icon.name: "info-dialog" 0077 onTriggered: root.about() 0078 } 0079 } 0080 0081 headBar.rightContent: ToolButton 0082 { 0083 icon.name: "love" 0084 } 0085 } 0086 0087 Maui.Page 0088 { 0089 anchors.fill: parent 0090 showCSDControls: true 0091 } 0092 } 0093 } 0094 @endcode 0095 0096 @image html ApplicationWindow/minimal_dark.png 0097 0098 @subsection deployment Deployment 0099 CMake is used for both building Kirigami and projects using it, allowing for several configurations depending on how the deployment needs to be done. 0100 0101 Kirigami can be built in two ways: both as a module or statically linked to the application, leading to four combinations: 0102 0103 - Kirigami built as a module with CMake 0104 - Kirigami statically built with CMake (needed to link statically from applications built with CMake) 0105 0106 The simplest and recommended way to use Kirigami is to just use the packages provided by your Linux distribution, or build it as a module and deploy it together with the main application. 0107 0108 For example, when building an application on Android with CMake, if Kirigami for Android is built and installed in the same temporary directory before the application, the create-apk step of the application will include the Kirigami files as well in the APK. 0109 0110 Statically linked Kirigami will be used only on Android, while on desktop systems it will use the version provided by the distribution. Which platforms use the static version and which use the dynamic one can be freely adjusted. 0111 0112 The application needs to have a folder called "3rdparty" containing clones of two KDE repositories: kirigami and breeze-icons (available at git://anongit.kde.org/kirigami.git and git://anongit.kde.org/breeze-icons.git). 0113 0114 The main.cpp file should then have something like: 0115 0116 @code 0117 #include <QGuiApplication> 0118 #include <QQmlApplicationEngine> 0119 #ifdef Q_OS_ANDROID 0120 #include "./3rdparty/kirigami/src/kirigamiplugin.h" 0121 #endif 0122 0123 int main(int argc, char *argv[]) 0124 { 0125 QGuiApplication app(argc, argv); 0126 0127 QQmlApplicationEngine engine; 0128 0129 #ifdef Q_OS_ANDROID 0130 KirigamiPlugin::getInstance().registerTypes(&engine); 0131 #endif 0132 ... 0133 } 0134 @endcode 0135 0136 @authors 0137 Camilo Higuita \<milo.h@aol.com.com\><br> 0138 0139 @maintainers 0140 Camilo Higuita \<milo.h@aol.com.com\><br> 0141 0142 @licenses 0143 @lgpl 0144 0145 */ 0146 0147 0148 // DOXYGEN_SET_RECURSIVE = YES 0149 // DOXYGEN_SET_EXCLUDE_PATTERNS += *_p.h */private/* */examples/* */doc/* */styles/* 0150 // DOXYGEN_SET_PROJECT_NAME = MauiKit 0151 // vim:ts=4:sw=4:expandtab:filetype=doxygen