SlideShare a Scribd company logo
Plasma Widgets




API and Theming approaches

       Marco Martin
What is a plasma widget?
●   KDE 4.0: everything from scratch
●   4.1/Qt4.4: QGraphicsWidget
●   Preferably a QGraphicsProxyWidget
    –   This means: every Qt widget you can imagine
●    Exception of container widgets, like
    TabWidgets and Frames
    –   We want to contain GraphicsWidgets and
        GraphicsLayouts here
Standard API: why wrap?
●   Normally you would do this:
  QPushButton *nativeButton = new QPushButton();
● QgraphicsProxyWidget *proxy = new QgraphicsProxyWidget(this);
  proxy->setWidget(nativeButton);
●   Very ugly code
●   And in scripting too, where we would want
    something better
●   Very scarce possibilities of theming
●   So every widget has its own subclass with a set
    of standard methods
What to wrap?
●   Most used functions
●   Makes the code simpler
●   In particular for scripted applets
●   Important functions
    –   setText() text() when the underlying widget has it
    –   setImage() getImage() aware of Plasma theme, so
        you can do setImage(“widgets/clock”)
Additional stuff
●   setStyleSheet()/styleSheet(): applet creators
    can easily tweak the widget appearance with
    standard Qt stylesheets
●   nativeWidget()
    –   ...when a basic api is not enough :)
    –   Not available in EcmaScript bindings to keep api
        clean
    –   Available in richer bindings like ruby
Theming
●   3 approaches
    –   Overriding the paint function of the proxywidget
         ●   Better graphics results (no clipping and float arithmetics)
         ●   Used for instance in Plasma::PushButton
    –   Subclass the QWidget and override paintEvent
         ●   When the widget is really complex and we need other
             stuff like a custom sizehint (and notification of its change)
         ●   Used in the tabbar
    –   Using a Kstyle: open possibility for scrollbars, easier
        to apply when they are only available children of
        other widgets (i.e. scrollviews)
What are themes?
●   QWidgets on canvas looks really out of place
●   A color scheme provided by Plasma::Theme
    and many svgs, described in
●   http://techbase.kde.org/Projects/Plasma/Theme
●   Svg element naming format used by the
    PanelSvg class
●   Useful to make more or less rectangular
    elements, so good for buttons, textboxes etc
Why not a single svg?
Example
●   9 element for each prefix, here the “normal”,
    pressed, active and the focus rect

More Related Content

What's hot

The Next Generation Qt Item Views
The Next Generation Qt Item ViewsThe Next Generation Qt Item Views
The Next Generation Qt Item Views
account inactive
 
JS digest. January 2017
JS digest. January 2017JS digest. January 2017
JS digest. January 2017
ElifTech
 
Interactive 3D graphics for web with three.js, Andrey Vedilin, DataArt
Interactive  3D graphics for web with three.js, Andrey Vedilin, DataArtInteractive  3D graphics for web with three.js, Andrey Vedilin, DataArt
Interactive 3D graphics for web with three.js, Andrey Vedilin, DataArt
Alina Vilk
 
Lesson 08
Lesson 08Lesson 08
Lesson 08
Gene Babon
 
Demistifying the 3D Web - part 2
Demistifying the 3D Web - part 2Demistifying the 3D Web - part 2
Demistifying the 3D Web - part 2
Pietro Grandi
 
Faster Drupal sites using Queue API
Faster Drupal sites using Queue APIFaster Drupal sites using Queue API
Faster Drupal sites using Queue API
OSInet
 
ngconf2015
ngconf2015ngconf2015
ngconf2015
Anne Cypcar
 
JS digest. February 2017
JS digest. February 2017JS digest. February 2017
JS digest. February 2017
ElifTech
 
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
Alkacon Software GmbH & Co. KG
 
appborg, coffeesurgeon, moof, logging-system
appborg, coffeesurgeon, moof, logging-systemappborg, coffeesurgeon, moof, logging-system
appborg, coffeesurgeon, moof, logging-system
endian7000
 
Node.js 201: building real-world applications in pure JavaScript
Node.js 201: building real-world applications in pure JavaScriptNode.js 201: building real-world applications in pure JavaScript
Node.js 201: building real-world applications in pure JavaScript
Tom Boutell
 
Xwt, a cross-desktop UI library
Xwt, a cross-desktop UI libraryXwt, a cross-desktop UI library
Xwt, a cross-desktop UI library
Jérémie Laval
 

What's hot (12)

The Next Generation Qt Item Views
The Next Generation Qt Item ViewsThe Next Generation Qt Item Views
The Next Generation Qt Item Views
 
JS digest. January 2017
JS digest. January 2017JS digest. January 2017
JS digest. January 2017
 
Interactive 3D graphics for web with three.js, Andrey Vedilin, DataArt
Interactive  3D graphics for web with three.js, Andrey Vedilin, DataArtInteractive  3D graphics for web with three.js, Andrey Vedilin, DataArt
Interactive 3D graphics for web with three.js, Andrey Vedilin, DataArt
 
Lesson 08
Lesson 08Lesson 08
Lesson 08
 
Demistifying the 3D Web - part 2
Demistifying the 3D Web - part 2Demistifying the 3D Web - part 2
Demistifying the 3D Web - part 2
 
Faster Drupal sites using Queue API
Faster Drupal sites using Queue APIFaster Drupal sites using Queue API
Faster Drupal sites using Queue API
 
ngconf2015
ngconf2015ngconf2015
ngconf2015
 
JS digest. February 2017
JS digest. February 2017JS digest. February 2017
JS digest. February 2017
 
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
 
appborg, coffeesurgeon, moof, logging-system
appborg, coffeesurgeon, moof, logging-systemappborg, coffeesurgeon, moof, logging-system
appborg, coffeesurgeon, moof, logging-system
 
Node.js 201: building real-world applications in pure JavaScript
Node.js 201: building real-world applications in pure JavaScriptNode.js 201: building real-world applications in pure JavaScript
Node.js 201: building real-world applications in pure JavaScript
 
Xwt, a cross-desktop UI library
Xwt, a cross-desktop UI libraryXwt, a cross-desktop UI library
Xwt, a cross-desktop UI library
 

Viewers also liked

Letni procházka s Ferdou 1
Letni procházka s Ferdou 1Letni procházka s Ferdou 1
Letni procházka s Ferdou 1HaKuPa
 
Marketing intelligence assessment
Marketing intelligence assessmentMarketing intelligence assessment
Marketing intelligence assessment
Tag Urit
 
Thiền Triết lý Phật
Thiền Triết lý PhậtThiền Triết lý Phật
Thiền Triết lý PhậtMinh NghC
 
Tokamak2: themes and netbook shell
Tokamak2: themes and netbook shellTokamak2: themes and netbook shell
Tokamak2: themes and netbook shell
Marco Martin
 
Tokamak 4: KDE Plasma Netbook
Tokamak 4: KDE Plasma NetbookTokamak 4: KDE Plasma Netbook
Tokamak 4: KDE Plasma Netbook
Marco Martin
 
Z pohadkovych krajin
Z pohadkovych krajinZ pohadkovych krajin
Z pohadkovych krajin
HaKuPa
 
Graphics Art 1
Graphics Art 1Graphics Art 1
Graphics Art 1
guest3cb8af
 
Vocab Unidad 1.1
Vocab Unidad 1.1Vocab Unidad 1.1
Vocab Unidad 1.1
Jeff Young
 
Smart Evaluation Considerations
Smart Evaluation ConsiderationsSmart Evaluation Considerations
Smart Evaluation Considerations
guest916929
 
Campkde 2010: KDE Plasma netbook
Campkde 2010: KDE Plasma netbookCampkde 2010: KDE Plasma netbook
Campkde 2010: KDE Plasma netbook
Marco Martin
 
Akademy 2010 presentation
Akademy 2010 presentationAkademy 2010 presentation
Akademy 2010 presentation
Marco Martin
 
URSI 2008
URSI 2008URSI 2008
URSI 2008
guestfe1066
 
Vocab 1.3
Vocab 1.3Vocab 1.3
Vocab 1.3
Jeff Young
 
Krasne fotky a vtipy
Krasne  fotky  a vtipyKrasne  fotky  a vtipy
Krasne fotky a vtipyHaKuPa
 
Podzimni prochazka s Ferdou 2
Podzimni prochazka s Ferdou 2Podzimni prochazka s Ferdou 2
Podzimni prochazka s Ferdou 2HaKuPa
 
farm Animals
farm Animalsfarm Animals
farm Animals
Cristina Cobarrientos
 
10 10 How To Protect Your Bank Card
10 10 How To Protect Your Bank Card10 10 How To Protect Your Bank Card
10 10 How To Protect Your Bank Card
Minh NghC
 

Viewers also liked (18)

Letni procházka s Ferdou 1
Letni procházka s Ferdou 1Letni procházka s Ferdou 1
Letni procházka s Ferdou 1
 
Marketing intelligence assessment
Marketing intelligence assessmentMarketing intelligence assessment
Marketing intelligence assessment
 
Thiền Triết lý Phật
Thiền Triết lý PhậtThiền Triết lý Phật
Thiền Triết lý Phật
 
Tokamak2: themes and netbook shell
Tokamak2: themes and netbook shellTokamak2: themes and netbook shell
Tokamak2: themes and netbook shell
 
Tokamak 4: KDE Plasma Netbook
Tokamak 4: KDE Plasma NetbookTokamak 4: KDE Plasma Netbook
Tokamak 4: KDE Plasma Netbook
 
Z pohadkovych krajin
Z pohadkovych krajinZ pohadkovych krajin
Z pohadkovych krajin
 
Graphics Art 1
Graphics Art 1Graphics Art 1
Graphics Art 1
 
Vocab Unidad 1.1
Vocab Unidad 1.1Vocab Unidad 1.1
Vocab Unidad 1.1
 
Smart Evaluation Considerations
Smart Evaluation ConsiderationsSmart Evaluation Considerations
Smart Evaluation Considerations
 
Campkde 2010: KDE Plasma netbook
Campkde 2010: KDE Plasma netbookCampkde 2010: KDE Plasma netbook
Campkde 2010: KDE Plasma netbook
 
Akademy 2010 presentation
Akademy 2010 presentationAkademy 2010 presentation
Akademy 2010 presentation
 
URSI 2008
URSI 2008URSI 2008
URSI 2008
 
Vocab 1.3
Vocab 1.3Vocab 1.3
Vocab 1.3
 
Krasne fotky a vtipy
Krasne  fotky  a vtipyKrasne  fotky  a vtipy
Krasne fotky a vtipy
 
Podzimni prochazka s Ferdou 2
Podzimni prochazka s Ferdou 2Podzimni prochazka s Ferdou 2
Podzimni prochazka s Ferdou 2
 
farm Animals
farm Animalsfarm Animals
farm Animals
 
10 10 How To Protect Your Bank Card
10 10 How To Protect Your Bank Card10 10 How To Protect Your Bank Card
10 10 How To Protect Your Bank Card
 
Kinder ppp numbers from 50 59
Kinder ppp numbers from 50 59Kinder ppp numbers from 50 59
Kinder ppp numbers from 50 59
 

Similar to KDE 4.1 Plasma 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
ICS
 
Qt
QtQt
Qt Programming on TI Processors
Qt Programming on TI ProcessorsQt Programming on TI Processors
Qt Programming on TI Processors
Prabindh Sundareson
 
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfDeveloping and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Prabindh Sundareson
 
Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1
NokiaAppForum
 
Qt coin3d soqt
Qt coin3d soqtQt coin3d soqt
Qt coin3d soqt
charuchopra84
 
Untitled presentation(4)
Untitled presentation(4)Untitled presentation(4)
Untitled presentation(4)
chan20kaur
 
Qt for S60
Qt for S60Qt for S60
Qt for S60
Mark Wilcox
 
PraveenKumar A T AWS
PraveenKumar A T AWSPraveenKumar A T AWS
PraveenKumar A T AWS
Praveen Kumar
 
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
CybercomChannel
 
Qt 5 - C++ and Widgets
Qt 5 - C++ and WidgetsQt 5 - C++ and Widgets
Qt 5 - C++ and Widgets
Juha Peltomäki
 
Cross Platform Qt
Cross Platform QtCross Platform Qt
Cross Platform Qt
Johan Thelin
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
Janel Heilbrunn
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
ICS
 
Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13
Daker Fernandes
 
Robust C++ Task Systems Through Compile-time Checks
Robust C++ Task Systems Through Compile-time ChecksRobust C++ Task Systems Through Compile-time Checks
Robust C++ Task Systems Through Compile-time Checks
Stoyan Nikolov
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologies
Simeon Prusiyski
 
Webrender 1.0
Webrender 1.0Webrender 1.0
Webrender 1.0
Daosheng Mu
 
Drupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developersDrupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developers
nuppla
 
Qt5 on ti processors
Qt5 on ti processorsQt5 on ti processors
Qt5 on ti processors
Prabindh Sundareson
 

Similar to KDE 4.1 Plasma widgets (20)

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
 
Qt
QtQt
Qt
 
Qt Programming on TI Processors
Qt Programming on TI ProcessorsQt Programming on TI Processors
Qt Programming on TI Processors
 
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfDeveloping and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
 
Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1
 
Qt coin3d soqt
Qt coin3d soqtQt coin3d soqt
Qt coin3d soqt
 
Untitled presentation(4)
Untitled presentation(4)Untitled presentation(4)
Untitled presentation(4)
 
Qt for S60
Qt for S60Qt for S60
Qt for S60
 
PraveenKumar A T AWS
PraveenKumar A T AWSPraveenKumar A T AWS
PraveenKumar A T AWS
 
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
 
Qt 5 - C++ and Widgets
Qt 5 - C++ and WidgetsQt 5 - C++ and Widgets
Qt 5 - C++ and Widgets
 
Cross Platform Qt
Cross Platform QtCross Platform Qt
Cross Platform Qt
 
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
 
Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13
 
Robust C++ Task Systems Through Compile-time Checks
Robust C++ Task Systems Through Compile-time ChecksRobust C++ Task Systems Through Compile-time Checks
Robust C++ Task Systems Through Compile-time Checks
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologies
 
Webrender 1.0
Webrender 1.0Webrender 1.0
Webrender 1.0
 
Drupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developersDrupalcon 2021 - Nuxt.js for drupal developers
Drupalcon 2021 - Nuxt.js for drupal developers
 
Qt5 on ti processors
Qt5 on ti processorsQt5 on ti processors
Qt5 on ti processors
 

Recently uploaded

Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 

Recently uploaded (20)

Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 

KDE 4.1 Plasma widgets

  • 1. Plasma Widgets API and Theming approaches Marco Martin
  • 2. What is a plasma widget? ● KDE 4.0: everything from scratch ● 4.1/Qt4.4: QGraphicsWidget ● Preferably a QGraphicsProxyWidget – This means: every Qt widget you can imagine ● Exception of container widgets, like TabWidgets and Frames – We want to contain GraphicsWidgets and GraphicsLayouts here
  • 3. Standard API: why wrap? ● Normally you would do this: QPushButton *nativeButton = new QPushButton(); ● QgraphicsProxyWidget *proxy = new QgraphicsProxyWidget(this); proxy->setWidget(nativeButton); ● Very ugly code ● And in scripting too, where we would want something better ● Very scarce possibilities of theming ● So every widget has its own subclass with a set of standard methods
  • 4. What to wrap? ● Most used functions ● Makes the code simpler ● In particular for scripted applets ● Important functions – setText() text() when the underlying widget has it – setImage() getImage() aware of Plasma theme, so you can do setImage(“widgets/clock”)
  • 5. Additional stuff ● setStyleSheet()/styleSheet(): applet creators can easily tweak the widget appearance with standard Qt stylesheets ● nativeWidget() – ...when a basic api is not enough :) – Not available in EcmaScript bindings to keep api clean – Available in richer bindings like ruby
  • 6. Theming ● 3 approaches – Overriding the paint function of the proxywidget ● Better graphics results (no clipping and float arithmetics) ● Used for instance in Plasma::PushButton – Subclass the QWidget and override paintEvent ● When the widget is really complex and we need other stuff like a custom sizehint (and notification of its change) ● Used in the tabbar – Using a Kstyle: open possibility for scrollbars, easier to apply when they are only available children of other widgets (i.e. scrollviews)
  • 7. What are themes? ● QWidgets on canvas looks really out of place ● A color scheme provided by Plasma::Theme and many svgs, described in ● http://techbase.kde.org/Projects/Plasma/Theme ● Svg element naming format used by the PanelSvg class ● Useful to make more or less rectangular elements, so good for buttons, textboxes etc
  • 8. Why not a single svg?
  • 9. Example ● 9 element for each prefix, here the “normal”, pressed, active and the focus rect