class: title-slide # There's a Framework for That! ## Seven and a Half Seconds of Fame Adriaan de Groot January 19th, 2020 --- # A little history .left-column[ ## KDE Frameworks Replace monolithic *kdelibs4* with something easier to use. Something - lightweight, - self-contained, - focused, - easier to consume externally. *Cool extensions to Qt* ] .right-column[ ## History - July 1st, 2014 - ECM from the start - 53 libraries in the first release - 74 in release 5.66 on January 11th, 2020 ] --- # That's great! ## it starts with an .. --- # Tier 1 .left-column[ ## Extra-CMake-Modules Support for finding and managing all the frameworks ] .right-column[ ## Earthquake
 ] --- # Tier 1 .left-column[ ## Attica Open Collaboration Services API ## KUserFeedback User feedback framework ] .right-column[ ## Birds
 ] --- # Tier 1 .left-column[ ## BreezeIcons Breeze icon theme ## Oxygen-icons Oxygen icon theme ## QQC2-Desktop-Style QtQuickControls 2 style that integrates with the desktop ] .right-column[ ## Snakes
 ] --- # Tier 1 .left-column[ ## BluezQt Qt wrapper for BlueZ 5 DBus API ## ModemManagerQt Qt wrapper for ModemManager API ## NetworkManagerQt Qt wrapper for NetworkManager API ## Solid Hardware integration and detection ] .right-column[ ## Aeroplanes
 ] --- # Tier 1 .left-column[ ## KHolidays Holiday calculation library ## KI18n Advanced internationalization framework ] .right-column[ ## Lenny Bruce
 ] --- # Tier 1 .left-column[ ## Kirigami2 QtQuick plugins to build user interfaces based on the KDE human interface guidelines ## KItemModels Models for Qt Model/View system ## KItemViews Widget addons for Qt Model/View ## Quick Charts A QtQuick module providing high-performance charts. ] .right-column[ ## Eye of a Hurricane
 ] --- # Tier 1 .left-column[ ## Prison Barcode abstraction layer providing uniform access to generation of barcodes ] .right-column[ ## Listen to yourself churn
 ] --- # Tier 1 .left-column[ ## KApiDox Scripts and data for building API documentation (dox) in a standard format and style ] .right-column[ ## World serves its own needs
 ] --- # Tier 1 .left-column[ ## ThreadWeaver High-level multithreading framework ] .right-column[ ## Speed it up a notch
 ] --- # Tier 1 .left-column[ ## KSyntaxHighlighting Syntax Highlighting ## Sonnet Support for spellchecking ] .right-column[ ## Grunt
 ] --- # Tier 1 .left-column[ ## KArchive File compression ## KCodecs Text encoding ] .right-column[ ## Strength
 ] --- # Tier 1 .left-column[ ## KCoreAddons Addons to QtCore ## KDBusAddons Addons to QtDBus ## KGuiAddons Addons to QtGui ## KWidgetsAddons Addons to QtWidgets ] .right-column[ ## The ladders clatter
 ] --- # Tier 1 .left-column[ ## KWayland Qt-style API to interact with the wayland-client and wayland-server API ## KWindowSystem Access to the windowing system ] .right-column[ ## Wire in a fire
 ] --- # Tier 1 .left-column[ ## KConfig Configuration system ## KDNSSD Abstraction to system DNSSD features ] .right-column[ ## Wasn't coming in a hurry
 ] --- # Tier 1 .left-column[ ## KIdleTime Monitoring user activity ## KPlotting Lightweight plotting framework ] .right-column[ ## Furies breathing down your neck
 ] --- .left-column[ .. and that's just Tier 1, the little libraries. Tiers 2, 3 and 4 build higher and further. ] .right-column[  ] --- class: title-slide # KCoreAddons ## Addons to QtCore --- . # KCoreAddons **Still** 30 classes of awesomeness in 670kB - About this application - Jobs - Plugins - System information
So let's pick just one: `KOSRelease` --- # KCoreAddons ## KOSRelease - `/etc/os-release` is a FreeDesktop standard file - It describes part of the Linux system - Mostly *vendor* information - Mix of text, URLs --- # KCoreAddons ## `/etc/os-release` ``` NAME="openSUSE Tumbleweed" # VERSION="20200107" ID="opensuse-tumbleweed" ID_LIKE="opensuse suse" VERSION_ID="20200107" PRETTY_NAME="openSUSE Tumbleweed" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:opensuse:tumbleweed:20200107" BUG_REPORT_URL="https://bugs.opensuse.org" HOME_URL="https://www.opensuse.org/" LOGO="distributor-logo" ``` --- # KCoreAddons ## KOSRelease Why bother? - Parsing the file is pretty trivial - Getting it right once is enough Use it because: - One source of truth about the contents of `/etc/os-release` - Supports alternate paths - Also supported on FreeBSD --- # KCoreAddons ## KOSRelease ``` #include
/* Reporting a bug? */ KOSRelease r; QUrl url( r.bugReportUrl() ); QString description = QStringLiteral( "Bug in %1 %2" ) .arg( r.prettyName(), r.variant() ); ``` --- # KHolidays Five classes, and support for all the holidays you could ever need.  --- # KHolidays ## LunarPhase - Convenience functions for phase-of-the-moon - Another case of "get it right once" --- # KHolidays ## LunarPhase - Static methods only - Query by (Gregorian) QDate ``` for ( int dayOfMonth = 1; dayOfMonth <= 31; ++dayOfMonth ) { QDate d( 2020, 1, dayOfMonth ); qDebug() << d << KHolidays::LunarPhase::phaseNameAtDate( d ); } ``` --- # KHolidays ## LunarPhase Why bother? - You rarely need the phase of the moon Use it because: - There's an entire **book** written about this calculation (see source code) --- class: title-slide # Credits - *End of the World as We Know It (and I feel fine)* by R.E.M. - *Puffin* by
Richard Bartz
-
Own work
,
CC BY-SA 3.0
,
Link
- *Cobra* by
Kamalnv
-
Own work
,
CC BY 3.0
,
Link
--- class: title-slide # Credits - *Churn* by
Musphot
-
Own work
,
CC BY-SA 3.0
,
Link
- *Speed* by
Brian Snelson
from Hockley, Essex, England -
Speedometer
,
CC BY 2.0
,
Link
--- class: title-slide # Credits - *Ladder* by
Amin
-
Own work
,
CC BY-SA 4.0
,
Link
- *Rangoli* by
Subharnab Majumdar
- originally posted to
Flickr
as
The Rangoli of Lights
,
CC BY 2.0
,
Link
--- class: title-slide # There's a Framework for That! ## Seven and a Half Seconds of Fame https://api.kde.org/frameworks/ (LGPL 2.1)