Warning, /maui/mauikit/Mainpage.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 on desktop devices and follow the <a href="https://develop.kde.org/hig">Maui Human Interface Guidelines</a> while being easy to use.
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 @image html maui_apps.png "Maui Apps - Index, Station & Vvave"
0021 
0022 @subsection tutorial Tutorial
0023 A tutorial for getting started on creating a MauiKit application is available on <a href="https://develop.kde.org/docs/getting-started/mauikit/">our developer platform</a>.
0024 
0025 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>. Notice that for it to work correctly you also need to export the enviroment variable `QT_QUICK_CONTROLS_STYLE=QtQuick.Controls.Maui`. This will make sure the Maui style is being used.
0026 
0027 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.
0028 
0029 If you have any questions about MauiKit, feel free to drop by the Maui Project group on Telegram as `[at]mauiproject`.
0030 
0031 @section component Components
0032 The MauiKit Controls could be divided into a few sections: there are the container views, the browsers, the delegates, and the common elements, such as buttons, cards, etc.
0033 
0034 @subsection views Main Views Components
0035 
0036 - @link ApplicationWindow  ApplicationWindow @endlink
0037 - @link AppViews AppViews @endlink
0038 - @link SideBarView SideBarView @endlink
0039 - @link TabView TabView @endlink
0040 - @link Page Page  @endlink
0041 - @link PageLayout PageLayout  @endlink
0042 
0043 Another views include:
0044 - @link SplitView  SplitView @endlink
0045 
0046 @subsection browsers Browsing Views
0047 
0048 - @link GridBrowser  GridBrowser @endlink
0049 - @link ListBrowser ListBrowser @endlink
0050 - @link AltBrowser AltBrowser @endlink
0051 - @link ScrollColumn ScrollColumn @endlink
0052 
0053 @subsection delegates Delegates & Templates
0054 
0055 - @link ListBrowserDelegate  ListBrowserDelegate @endlink
0056 - @link GridBrowserDelegate GridBrowserDelegate @endlink
0057 - @link GalleryRollItem GalleryRollItem @endlink
0058 - @link ListItemTemplate ListItemTemplate @endlink
0059 - @link GridItemTemplate GridItemTemplate @endlink
0060 
0061 @subsection common Common Controls
0062 
0063 - @link ToolActions  ToolActions @endlink
0064 - @link ContextualMenu ContextualMenu @endlink
0065 - @link Holder Holder @endlink
0066 - @link PopupPage PopupPage @endlink
0067 - @link TextFieldPopup TextFieldPopup @endlink
0068 - @link InfoDialog InfoDialog @endlink
0069 - @link MenuItemActionRow MenuItemActionRow @endlink
0070 
0071 
0072 @subsection example Minimal Example
0073 
0074 @code
0075 import QtQuick
0076 import QtQuick.Controls
0077 import org.mauikit.controls as Maui
0078 
0079 Maui.ApplicationWindow
0080 {
0081     id: root
0082     
0083     Maui.SideBarView
0084     {
0085         anchors.fill: parent
0086         
0087         sideBarContent: Maui.Page
0088         {
0089             Maui.Theme.colorSet: Maui.Theme.Window
0090             anchors.fill: parent
0091             
0092             headBar.leftContent: Maui.ToolButtonMenu
0093             {
0094                 icon.name: "application-menu"
0095                 MenuItem
0096                 {
0097                     text: "About"
0098                     icon.name: "info-dialog"
0099                     onTriggered: root.about()
0100                 }
0101             }
0102             
0103             headBar.rightContent: ToolButton
0104             {
0105                 icon.name: "love"
0106             }
0107         }
0108         
0109         Maui.Page
0110         {
0111             anchors.fill: parent
0112             showCSDControls: true
0113         }
0114     }
0115 }
0116 @endcode
0117 
0118 @image html ApplicationWindow/minimal_dark.png "Minimal application setup"
0119 
0120 @section deployment Deployment
0121 
0122 @subsection building Building
0123 For building MauiKit from source, you will need to be familiar with some basic shell commands, with a terminal emulator and your distribution package manager.
0124 
0125 Before building MauiKit, make sure you have all the dependencies already installed with its development files.
0126 
0127 `git cmake make kf6-ki18n kf6-kcoreaddons qt6-svg qt6-base mauiman ...`
0128 
0129 Then you can clone the project to your machine.
0130 
0131 `git clone https://invent.kde.org/maui/mauikit.git`
0132 
0133 Now that you have the sources, go into the `mauikit` folder and start the building process.
0134 
0135 `cd mauikit`
0136 
0137 Let's build the project into a separate directory
0138 
0139 `mkdir build`
0140 
0141 Then.
0142 
0143 `cd build`
0144 
0145 An lets build it. 
0146 In this example the installation prefix path is set to the `/usr` directory; you can modify it if you want to, but bare in mind that you will also need to let know Qt where else it can find the installed QML plugins.
0147 
0148 `cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_WITH_QT6=ON`
0149 
0150 If everything goes right, the next step is to install it on the system for it to be ready to be used.
0151 
0152 To build the demo app, use the build flag `-DBUILD_DEMO=ON`
0153 
0154 @subsection installation Installation
0155 
0156 Once the project has been built from source - as explained in the previous section, you can install it.
0157 
0158 `sudo make install`
0159 
0160 This step will install the QML plugin to the right location, the Maui Style and a few other items, such as the CSD styles.
0161 
0162 If you don't want to build it from source, you can also look for it in your distribution packages.
0163 
0164 For example, to install it on Arch based distributions:
0165 
0166 `sudo pacman install mauikit4`
0167 
0168 Debian based distros:
0169 
0170 `sudo apt install mauikit4`
0171 
0172 
0173 @subsection android Android
0174 For Android, you will need to build it from source and install it at your Qt-for-Android root directory. 
0175 
0176 The easiest way is to build it using the Qt Creator IDE. Go to the project settings page, and enable the installation build step for CMake. That will take care of installing MauiKit into the right location. Remember you need to set the Kit to be Android.
0177 You can read more about setting up Qt from Android on their documentation website.
0178 
0179 @subsection usage Usage
0180 The simplest and recommended way to use MauiKit 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.
0181 
0182 Once MauiKit has been installed you can start using it in your QML files by importing it `import org.mauikit.controls`. 
0183 Checkout the ApplicationWindow for a quick example.
0184 
0185 @subsection examples Examples
0186 A group of examples for all of the QQC2 controls can be found in the source code under the `examples` directory.
0187 
0188 @section notes Notes
0189 
0190 @subsection contributing Contributing
0191 
0192 If you find any syntax errors, missing documentation, or not working code snippets or examples, please consider reporting the issue at 
0193 <a href="https://invent.kde.org/maui/mauikit/-/issues">MauiKit</a> issues page, with the **documentation** tag.
0194 
0195 If you want to contribute with the documentation efforts, you can contact the Maui Project at Telegram `[at]mauiproject`.
0196 
0197 @authors
0198 Camilo Higuita \<milo.h@aol.com.com\><br>
0199 
0200 @maintainers
0201 Camilo Higuita \<milo.h@aol.com.com\><br>
0202 
0203 @licenses
0204 @lgpl
0205 */
0206 
0207 // DOXYGEN_SET_RECURSIVE = YES
0208 // DOXYGEN_SET_EXCLUDE_PATTERNS += *_p.h */private/* */examples/* */doc/* */styles/*
0209 // DOXYGEN_SET_PROJECT_NAME = MauiKit
0210 // vim:ts=4:sw=4:expandtab:filetype=doxygen