Coder Social home page Coder Social logo

kirigami's Introduction

Kirigami

QtQuick plugins to build user interfaces following the KDE Human Interface Guidelines.

Introduction

Kirigami is a set of QtQuick components for building adaptable user interfaces based on QtQuick Controls 2. Kirigami makes it easy to create applications that look and feel great on Plasma Mobile, Desktop Linux, Android, MacOS, and Windows.

The API can be found in the KDE API Reference website and a Kirigami tutorial is available in the KDE Developer Platform.

We also provide Kirigami Gallery to showcase most Kirigami components.

Building Kirigami

After installing extra-cmake-modules (ECM) and the necessary Qt6 development libraries, run:

git clone https://invent.kde.org/frameworks/kirigami.git
cd kirigami
cmake -B build/ -DCMAKE_INSTALL_PREFIX=/path/where/kirigami/will/be/installed
cmake --build build/
cmake --install build/

If you compiled and installed ECM yourself, you will need to add it to your PATH to compile Kirigami with it, as ECM does not provide its own prefix.sh file:

PATH=/path/to/the/ecm/installation/usr/ cmake -B build/ -DCMAKE_INSTALL_PREFIX=/path/where/kirigami/will/be/installed
cmake --build build/
cmake --install build/

Alternatively, we recommend you use kdesrc-build to build extra-cmake-modules and Kirigami together.

The provided Kirigami example can be built and run with:

cmake -B build/ -DBUILD_EXAMPLES=ON
cmake --build build/
./build/bin/applicationitemapp

And the remaining examples containing only single QML files in the examples/ folder can be viewed using qml <filename.qml> or qmlscene <filename.qml>.

Using a self-compiled Kirigami in your application

To compile your application and link a self-compiled build of Kirigami to it, run:

source path/to/kirigami/build/prefix.sh

And then compile your application as usual.

Build your Android application and ship it with Kirigami

  1. Build Kirigami

You will need to compile Qt for Android or use the Qt Installer to install it, in addition to the Android SDK and NDK. After that, run:

cmake -B build/ \
    -DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/Android.cmake \
    -DCMAKE_PREFIX_PATH=/path/to/Qt5.15.9/5.15/android_armv7/ \
    -DCMAKE_INSTALL_PREFIX=/path/where/kirigami/will/be/installed/ \
    -DECM_DIR=/usr/share/ECM/cmake

cmake --build build/
cmake --install build/
  1. Build your application

This guide assumes that you build your application with CMake and use Extra CMake Modules (ECM) from KDE frameworks.

Replace $yourapp with the actual name of your application:

cmake -B build/ \
    -DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/Android.cmake \
    -DQTANDROID_EXPORTED_TARGET=$yourapp \
    -DANDROID_APK_DIR=../path/to/yourapp/ \
    -DCMAKE_PREFIX_PATH=/path/to/Qt5.15.9/5.15/android_armv7/ \
    -DCMAKE_INSTALL_PREFIX=/path/where/yourapp/will/be/installed/

cmake --build build/
cmake --install build/
cmake --build build/ --target create-apk-$yourapp

Note: -DCMAKE_INSTALL_PREFIX directory should be the same as where Kirigami was installed, since you need to create an apk package that contains both the Kirigami build and the build of your application.

kirigami's People

Contributors

ahmadsamir avatar aleixpol avatar aseigo avatar awhiemstra avatar carlschwan avatar davidedmundson avatar dfaure avatar dirkhh avatar easyteacher avatar eikehein avatar espidev avatar hsitter avatar ismailof avatar jbruechert avatar jriddell avatar kbroulik avatar kossebau avatar leinir avatar montel avatar nicolasfella avatar noahadvs avatar notmart avatar pointedstick avatar pontaoski avatar ratijas avatar redstrate avatar sebasje avatar tobiasfella avatar tsdgeos avatar vkrause avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.