SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
Developing
                   Device-Adaptive Apps
                              Using KDE Plasma Technologies




Sebastian Kügler & Daker Fernandes Pinheiro
Overview


          ●   Conceptual Intro
          ●   Qt Quick / QML Introduction
          ●   Extending Qt Quick using C++
          ●   Plasma Quick
          ●   Tools, Tips & Tricks
          ●   Hacking / Discussion / Hands-on / Help




Developing Device-Adaptive Apps – Overview
Adapt instead of dumbing down


      ●   Different interfaces for different devices
          ●   UI as thin layer
          ●   Switchable input profiles (part of the platform, “for free”)
          ●   Switchable layouts (per app, usually one file per device)
      ●   Work with different input methods
      ●   Reusable components




Developing Device-Adaptive Apps – General
Technologies


          ●   Qt / QML
          ●   KDE libraries
          ●   UI profile switchable by env var
          ●   Reusable components




Developing Device-Adaptive Apps – General
Developer Story


          ●   Chad – casual hacker, familiar with web technologies
              ●   Plasmate introduces Chad to Plasma
          ●   Lwing – experienced C++ developer, own codebase
              ●   Lwing ports, develops and packages her applications using the Mer SDK
          ●   Brian – KDE Hacker
              ●   Brian is part of the KDE team and regularly contributes patches




Developing Device-Adaptive Apps – General
Qt Quick: Intro

   ●    Declarative UI – not procedural but “object tree”
   ●    JSON + JavaScript
   ●    Interpreted at runtime
   ●    Dynamic types
   ●    Reusable components
    •   http://qt-project.org/doc/qt-4.8/qdeclarativeintroduction.html
    •   https://developer.mozilla.org/en/JavaScript/Guide




Developing Device-Adaptive Apps – QtQuick Intro
Qt Quick: Concepts

   ●    Property binding vs. value assignment
   ●    Extensible using modules
   ●    Layouting using anchors
   ●    Reusable components


    •   http://qt-project.org/doc/qt-4.8/qdeclarativeintroduction.html
    •   https://developer.mozilla.org/en/JavaScript/Guide




Developing Device-Adaptive Apps – QtQuick Intro
Qt Quick Example
           import QtQuick 1.1


           Rectangle {
                width: 200
                height: 200
                color: "blue"


                Image {
                      source: "pics/logo.png"
                      anchors.centerIn: parent
                }
           }


Developing Device-Adaptive Apps – QtQuick Intro
Qt Quick Anchor Layouts

          •   Align objects to each other
          •   Useful for flexible layouts
          •   Dynamic sizing of objects: Scales well
          •   Surprisingly painless and logical
          •   Very powerful




Developing Device-Adaptive Apps – QtQuick Intro
QML Lists & Models
           import QtQuick 1.1

           Item {
               width: 200; height: 250

               ListModel {
                   id: myModel
                   ListElement { type: "Dog"; age: 8 }
                   ListElement { type: "Cat"; age: 5 }
               }

               Component {
                   id: myDelegate
                   Text { text: type + ", " + age }
               }

               ListView {
                   anchors.fill: parent
                   model: myModel
                   delegate: myDelegate
               }
           }


Developing Device-Adaptive Apps – QtQuick Intro
QML & C++ Hybrids: Basics

   ●   QML can be extended using C++
   ●   Getting data from C++ to QML:
       ●   setContextProperty()
       ●   qmlRegisterType()
       ●   Creating new imports (careful, public API!)
   ●   QObject as base class
       ●   Q_PROPERTY() for getter, setter, notify
       ●   Q_INVOKABLE() for methods

Developing Device-Adaptive Apps – Advanced QML
QML & C++ Hybrids: Models

   ●    QStringList – really basic, “modelData” holds your string
   ●    QList<QObject*> – useful for smallish lists
   ●    QAbstractItemModel – Full power, full control, full pain




    •   http://qt-project.org/doc/qt-4.8/qdeclarativemodels.html
    •   http://qt-project.org/doc/qt-4.8/qdeclarativemodels.html#qml-c-models
    •



    http://steveire.wordpress.com/2010/02/19/qml-with-akonadi-or-how-to-use-your-existing-model-view
    •   http://sf2011.meego.com/program/sessions/data-models-qml

Developing Device-Adaptive Apps – Advanced QML
Plasma Quick: Basics

   ●    QtQuick + Plasma / KDE libraries
   ●    i18n() for translation
   ●    Plasma Components
   ●    PlasmaCore, QtExtras, PlasmaExtras, ...


    •   http://techbase.kde.org/Development/Tutorials/Plasma/QML/API
    •   http://api.kde.org/4.x-api/plasma-qml-apidocs/
    •




Developing Device-Adaptive Apps – Plasma Quick
Plasma Quick: Classes

   ●    PlasmaCore.Theme
   ●    PlasmaCore.{SvgItem,FrameSvg,...}
   ●    PlasmaCore.DataSource to use dataengines
   ●    PlasmaCore.Dialog
   ●    PlasmaCore.SortFilterModel
   ●    QIconItem, QPixmapItem, QImageItem, ...


    •   http://techbase.kde.org/Development/Tutorials/Plasma/QML/API


Developing Device-Adaptive Apps – Plasma Quick
    •
Tools

   ●   QtCreator
   ●   qmlviewer
       ●   qmlviewer -I `kde4-config --prefix`/lib/kde4/imports/
   ●   Plasmoidviewer
           plasmoidviewer --list
       ●   plasmoidviewer [pluginname]
   ●   Qt Assistant (try searching for QML!)




Developing Device-Adaptive Apps – Tips & Tricks
Tips & Tricks
●   git clone kde:kdeexamples → plasma/declarative/*
●   Use PlasmaComponents.Label instead of Text
●   Think about splitting into reusable components
●   grep in kde:declarative-plasmoids and kde:plasma-mobile
●   Rectangle { color: “orange”; opacity: 0.3; anchors.fill: parent; }

inside your Item helps finding sizing problems




    Developing Device-Adaptive Apps – Tips & Tricks
Plasmate


              Workflow-driven IDE for Plasmoids:
          ●   Create – Hack – Test – Deploy – Publish
          ●   1.0 end of summer
          ●   Clone from git://anongit.kde.org/plasmate
          ●   Build using cmake (needs kdelibs-devel)
          ●   Start hacking




Developing Device-Adaptive Apps – SDK “light”
Mer SDK

          Chroot environment with everything pre-setup
          ●   Work in progress: involves a bit of manual setup
          ●   Easy way to cross-compile
          ●   Easy way to build packages for $DEVICE
          ●   Takes complexity away big time




Developing Device-Adaptive Apps – Limitless SDK
Help!

   •   #plasma on Freenode
   •   plasma-devel@kde.org



Sebastian Kügler
Happy hacking!
   Interesting blogs:
   •   http://codecereal.blogspot.com.br/ (Daker)
   •   http://vizZzion.org (sebas)
   •   http://notmart.org (Marco Martin)




Sebastian Kügler

Contenu connexe

Tendances

[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020Akihiro Suda
 
Qt Internationalization
Qt InternationalizationQt Internationalization
Qt InternationalizationICS
 
[HKOSCON][20200613][ Ansible: From VM to Kubernetes]
[HKOSCON][20200613][ Ansible: From VM to Kubernetes][HKOSCON][20200613][ Ansible: From VM to Kubernetes]
[HKOSCON][20200613][ Ansible: From VM to Kubernetes]Wong Hoi Sing Edison
 
[FOSDEM 2020] Lazy distribution of container images
[FOSDEM 2020] Lazy distribution of container images[FOSDEM 2020] Lazy distribution of container images
[FOSDEM 2020] Lazy distribution of container imagesAkihiro Suda
 
AOT-compilation of JavaScript with V8
AOT-compilation of JavaScript with V8AOT-compilation of JavaScript with V8
AOT-compilation of JavaScript with V8Phil Eaton
 
Qt for beginners part 1 overview and key concepts
Qt for beginners part 1   overview and key conceptsQt for beginners part 1   overview and key concepts
Qt for beginners part 1 overview and key conceptsICS
 
10 reasons to be excited about go
10 reasons to be excited about go10 reasons to be excited about go
10 reasons to be excited about goDvir Volk
 
Metasepi team meeting #7: Snatch application on tiny OS
Metasepi team meeting #7: Snatch application on tiny OSMetasepi team meeting #7: Snatch application on tiny OS
Metasepi team meeting #7: Snatch application on tiny OSKiwamu Okabe
 
[KubeCon EU 2021] Introduction and Deep Dive Into Containerd
[KubeCon EU 2021] Introduction and Deep Dive Into Containerd[KubeCon EU 2021] Introduction and Deep Dive Into Containerd
[KubeCon EU 2021] Introduction and Deep Dive Into ContainerdAkihiro Suda
 
Rootless Containers & Unresolved issues
Rootless Containers & Unresolved issuesRootless Containers & Unresolved issues
Rootless Containers & Unresolved issuesAkihiro Suda
 
Building a high-performance, scalable ML & NLP platform with Python, Sheer El...
Building a high-performance, scalable ML & NLP platform with Python, Sheer El...Building a high-performance, scalable ML & NLP platform with Python, Sheer El...
Building a high-performance, scalable ML & NLP platform with Python, Sheer El...Pôle Systematic Paris-Region
 
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...NETWAYS
 
QThreads: Are You Using Them Wrong?
QThreads: Are You Using Them Wrong? QThreads: Are You Using Them Wrong?
QThreads: Are You Using Them Wrong? ICS
 
NUS-ISS Learning Day 2017 - Bots-Managed CloudOps
NUS-ISS Learning Day 2017 - Bots-Managed CloudOpsNUS-ISS Learning Day 2017 - Bots-Managed CloudOps
NUS-ISS Learning Day 2017 - Bots-Managed CloudOpsNUS-ISS
 
平行化你的工作 part1
平行化你的工作 part1平行化你的工作 part1
平行化你的工作 part1Shuen-Huei Guan
 

Tendances (20)

ISC HPCW talks
ISC HPCW talksISC HPCW talks
ISC HPCW talks
 
[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020
 
Qt Internationalization
Qt InternationalizationQt Internationalization
Qt Internationalization
 
[HKOSCON][20200613][ Ansible: From VM to Kubernetes]
[HKOSCON][20200613][ Ansible: From VM to Kubernetes][HKOSCON][20200613][ Ansible: From VM to Kubernetes]
[HKOSCON][20200613][ Ansible: From VM to Kubernetes]
 
了解 Qt
了解 Qt了解 Qt
了解 Qt
 
[FOSDEM 2020] Lazy distribution of container images
[FOSDEM 2020] Lazy distribution of container images[FOSDEM 2020] Lazy distribution of container images
[FOSDEM 2020] Lazy distribution of container images
 
AOT-compilation of JavaScript with V8
AOT-compilation of JavaScript with V8AOT-compilation of JavaScript with V8
AOT-compilation of JavaScript with V8
 
Qt for beginners part 1 overview and key concepts
Qt for beginners part 1   overview and key conceptsQt for beginners part 1   overview and key concepts
Qt for beginners part 1 overview and key concepts
 
10 reasons to be excited about go
10 reasons to be excited about go10 reasons to be excited about go
10 reasons to be excited about go
 
Metasepi team meeting #7: Snatch application on tiny OS
Metasepi team meeting #7: Snatch application on tiny OSMetasepi team meeting #7: Snatch application on tiny OS
Metasepi team meeting #7: Snatch application on tiny OS
 
[KubeCon EU 2021] Introduction and Deep Dive Into Containerd
[KubeCon EU 2021] Introduction and Deep Dive Into Containerd[KubeCon EU 2021] Introduction and Deep Dive Into Containerd
[KubeCon EU 2021] Introduction and Deep Dive Into Containerd
 
Rootless Containers & Unresolved issues
Rootless Containers & Unresolved issuesRootless Containers & Unresolved issues
Rootless Containers & Unresolved issues
 
Building a high-performance, scalable ML & NLP platform with Python, Sheer El...
Building a high-performance, scalable ML & NLP platform with Python, Sheer El...Building a high-performance, scalable ML & NLP platform with Python, Sheer El...
Building a high-performance, scalable ML & NLP platform with Python, Sheer El...
 
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...
 
Extending Node.js using C++
Extending Node.js using C++Extending Node.js using C++
Extending Node.js using C++
 
A Python Tutorial
A Python TutorialA Python Tutorial
A Python Tutorial
 
Cling c++
Cling c++Cling c++
Cling c++
 
QThreads: Are You Using Them Wrong?
QThreads: Are You Using Them Wrong? QThreads: Are You Using Them Wrong?
QThreads: Are You Using Them Wrong?
 
NUS-ISS Learning Day 2017 - Bots-Managed CloudOps
NUS-ISS Learning Day 2017 - Bots-Managed CloudOpsNUS-ISS Learning Day 2017 - Bots-Managed CloudOps
NUS-ISS Learning Day 2017 - Bots-Managed CloudOps
 
平行化你的工作 part1
平行化你的工作 part1平行化你的工作 part1
平行化你的工作 part1
 

Similaire à Plasmaquick Workshop - FISL 13

Qt for beginners part 4 doing more
Qt for beginners part 4   doing moreQt for beginners part 4   doing more
Qt for beginners part 4 doing moreICS
 
Making your app soar without a container manifest
Making your app soar without a container manifestMaking your app soar without a container manifest
Making your app soar without a container manifestLibbySchulze
 
Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Johan Thelin
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesRishabh Indoria
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingPiotr Perzyna
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarICS
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarJanel Heilbrunn
 
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CDA GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CDJulian Mazzitelli
 
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023Nicolas HAAN
 
From development to production: Deploying Java and Scala apps to kubernetes
From development to production: Deploying Java and Scala apps to kubernetesFrom development to production: Deploying Java and Scala apps to kubernetes
From development to production: Deploying Java and Scala apps to kubernetesOlanga Ochieng'
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...NETWAYS
 
下午3 intel fenghaitao_mee_go api and application development
下午3 intel fenghaitao_mee_go api and application development下午3 intel fenghaitao_mee_go api and application development
下午3 intel fenghaitao_mee_go api and application developmentcsdnmobile
 
Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021Avanti Patil
 
Building production-quality apps with Node.js
Building production-quality apps with Node.jsBuilding production-quality apps with Node.js
Building production-quality apps with Node.jsmattpardee
 
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3sHaggai Philip Zagury
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kuberneteskloia
 

Similaire à Plasmaquick Workshop - FISL 13 (20)

Qt Qml
Qt QmlQt Qml
Qt Qml
 
Qt 5 - C++ and Widgets
Qt 5 - C++ and WidgetsQt 5 - C++ and Widgets
Qt 5 - C++ and Widgets
 
Qt for beginners part 4 doing more
Qt for beginners part 4   doing moreQt for beginners part 4   doing more
Qt for beginners part 4 doing more
 
Making your app soar without a container manifest
Making your app soar without a container manifestMaking your app soar without a container manifest
Making your app soar without a container manifest
 
Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011
 
QtQuick Day 1
QtQuick Day 1QtQuick Day 1
QtQuick Day 1
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
 
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CDA GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
A GitOps Kubernetes Native CICD Solution with Argo Events, Workflows, and CD
 
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
Comment développer une application mobile en 8 semaines - Meetup PAUG 24-01-2023
 
From development to production: Deploying Java and Scala apps to kubernetes
From development to production: Deploying Java and Scala apps to kubernetesFrom development to production: Deploying Java and Scala apps to kubernetes
From development to production: Deploying Java and Scala apps to kubernetes
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
 
下午3 intel fenghaitao_mee_go api and application development
下午3 intel fenghaitao_mee_go api and application development下午3 intel fenghaitao_mee_go api and application development
下午3 intel fenghaitao_mee_go api and application development
 
Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021Nugwc k8s session-16-march-2021
Nugwc k8s session-16-march-2021
 
Qt
QtQt
Qt
 
Building production-quality apps with Node.js
Building production-quality apps with Node.jsBuilding production-quality apps with Node.js
Building production-quality apps with Node.js
 
DevEx | there’s no place like k3s
DevEx | there’s no place like k3sDevEx | there’s no place like k3s
DevEx | there’s no place like k3s
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 

Plus de Daker Fernandes

Plus de Daker Fernandes (8)

Functional Pattern Matching on Python
Functional Pattern Matching on PythonFunctional Pattern Matching on Python
Functional Pattern Matching on Python
 
Raspberry Pi + Python
Raspberry Pi + PythonRaspberry Pi + Python
Raspberry Pi + Python
 
Opengl aula-01
Opengl aula-01Opengl aula-01
Opengl aula-01
 
Jogos em Qt
Jogos em QtJogos em Qt
Jogos em Qt
 
Dominando Modelos Ocultos de Markov com Python e GHMM
Dominando Modelos Ocultos de Markov com Python e GHMMDominando Modelos Ocultos de Markov com Python e GHMM
Dominando Modelos Ocultos de Markov com Python e GHMM
 
CITi - PySide
CITi - PySideCITi - PySide
CITi - PySide
 
QtQuick - WSL II
QtQuick - WSL IIQtQuick - WSL II
QtQuick - WSL II
 
Mongodb workshop cinlug
Mongodb workshop cinlugMongodb workshop cinlug
Mongodb workshop cinlug
 

Dernier

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Dernier (20)

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

Plasmaquick Workshop - FISL 13

  • 1. Developing Device-Adaptive Apps Using KDE Plasma Technologies Sebastian Kügler & Daker Fernandes Pinheiro
  • 2. Overview ● Conceptual Intro ● Qt Quick / QML Introduction ● Extending Qt Quick using C++ ● Plasma Quick ● Tools, Tips & Tricks ● Hacking / Discussion / Hands-on / Help Developing Device-Adaptive Apps – Overview
  • 3. Adapt instead of dumbing down ● Different interfaces for different devices ● UI as thin layer ● Switchable input profiles (part of the platform, “for free”) ● Switchable layouts (per app, usually one file per device) ● Work with different input methods ● Reusable components Developing Device-Adaptive Apps – General
  • 4. Technologies ● Qt / QML ● KDE libraries ● UI profile switchable by env var ● Reusable components Developing Device-Adaptive Apps – General
  • 5. Developer Story ● Chad – casual hacker, familiar with web technologies ● Plasmate introduces Chad to Plasma ● Lwing – experienced C++ developer, own codebase ● Lwing ports, develops and packages her applications using the Mer SDK ● Brian – KDE Hacker ● Brian is part of the KDE team and regularly contributes patches Developing Device-Adaptive Apps – General
  • 6. Qt Quick: Intro ● Declarative UI – not procedural but “object tree” ● JSON + JavaScript ● Interpreted at runtime ● Dynamic types ● Reusable components • http://qt-project.org/doc/qt-4.8/qdeclarativeintroduction.html • https://developer.mozilla.org/en/JavaScript/Guide Developing Device-Adaptive Apps – QtQuick Intro
  • 7. Qt Quick: Concepts ● Property binding vs. value assignment ● Extensible using modules ● Layouting using anchors ● Reusable components • http://qt-project.org/doc/qt-4.8/qdeclarativeintroduction.html • https://developer.mozilla.org/en/JavaScript/Guide Developing Device-Adaptive Apps – QtQuick Intro
  • 8. Qt Quick Example import QtQuick 1.1 Rectangle { width: 200 height: 200 color: "blue" Image { source: "pics/logo.png" anchors.centerIn: parent } } Developing Device-Adaptive Apps – QtQuick Intro
  • 9. Qt Quick Anchor Layouts • Align objects to each other • Useful for flexible layouts • Dynamic sizing of objects: Scales well • Surprisingly painless and logical • Very powerful Developing Device-Adaptive Apps – QtQuick Intro
  • 10. QML Lists & Models import QtQuick 1.1 Item { width: 200; height: 250 ListModel { id: myModel ListElement { type: "Dog"; age: 8 } ListElement { type: "Cat"; age: 5 } } Component { id: myDelegate Text { text: type + ", " + age } } ListView { anchors.fill: parent model: myModel delegate: myDelegate } } Developing Device-Adaptive Apps – QtQuick Intro
  • 11. QML & C++ Hybrids: Basics ● QML can be extended using C++ ● Getting data from C++ to QML: ● setContextProperty() ● qmlRegisterType() ● Creating new imports (careful, public API!) ● QObject as base class ● Q_PROPERTY() for getter, setter, notify ● Q_INVOKABLE() for methods Developing Device-Adaptive Apps – Advanced QML
  • 12. QML & C++ Hybrids: Models ● QStringList – really basic, “modelData” holds your string ● QList<QObject*> – useful for smallish lists ● QAbstractItemModel – Full power, full control, full pain • http://qt-project.org/doc/qt-4.8/qdeclarativemodels.html • http://qt-project.org/doc/qt-4.8/qdeclarativemodels.html#qml-c-models • http://steveire.wordpress.com/2010/02/19/qml-with-akonadi-or-how-to-use-your-existing-model-view • http://sf2011.meego.com/program/sessions/data-models-qml Developing Device-Adaptive Apps – Advanced QML
  • 13. Plasma Quick: Basics ● QtQuick + Plasma / KDE libraries ● i18n() for translation ● Plasma Components ● PlasmaCore, QtExtras, PlasmaExtras, ... • http://techbase.kde.org/Development/Tutorials/Plasma/QML/API • http://api.kde.org/4.x-api/plasma-qml-apidocs/ • Developing Device-Adaptive Apps – Plasma Quick
  • 14. Plasma Quick: Classes ● PlasmaCore.Theme ● PlasmaCore.{SvgItem,FrameSvg,...} ● PlasmaCore.DataSource to use dataengines ● PlasmaCore.Dialog ● PlasmaCore.SortFilterModel ● QIconItem, QPixmapItem, QImageItem, ... • http://techbase.kde.org/Development/Tutorials/Plasma/QML/API Developing Device-Adaptive Apps – Plasma Quick •
  • 15. Tools ● QtCreator ● qmlviewer ● qmlviewer -I `kde4-config --prefix`/lib/kde4/imports/ ● Plasmoidviewer plasmoidviewer --list ● plasmoidviewer [pluginname] ● Qt Assistant (try searching for QML!) Developing Device-Adaptive Apps – Tips & Tricks
  • 16. Tips & Tricks ● git clone kde:kdeexamples → plasma/declarative/* ● Use PlasmaComponents.Label instead of Text ● Think about splitting into reusable components ● grep in kde:declarative-plasmoids and kde:plasma-mobile ● Rectangle { color: “orange”; opacity: 0.3; anchors.fill: parent; } inside your Item helps finding sizing problems Developing Device-Adaptive Apps – Tips & Tricks
  • 17. Plasmate Workflow-driven IDE for Plasmoids: ● Create – Hack – Test – Deploy – Publish ● 1.0 end of summer ● Clone from git://anongit.kde.org/plasmate ● Build using cmake (needs kdelibs-devel) ● Start hacking Developing Device-Adaptive Apps – SDK “light”
  • 18. Mer SDK Chroot environment with everything pre-setup ● Work in progress: involves a bit of manual setup ● Easy way to cross-compile ● Easy way to build packages for $DEVICE ● Takes complexity away big time Developing Device-Adaptive Apps – Limitless SDK
  • 19. Help! • #plasma on Freenode • plasma-devel@kde.org Sebastian Kügler
  • 20. Happy hacking! Interesting blogs: • http://codecereal.blogspot.com.br/ (Daker) • http://vizZzion.org (sebas) • http://notmart.org (Marco Martin) Sebastian Kügler