├── .git-blame-ignore-revs ├── .gitattributes ├── .gitignore ├── .gitlab-ci.yml ├── .kde-ci.yml ├── CMakeLists.txt ├── ExtraDesktop.sh ├── LICENSES ├── BSD-3-Clause.txt ├── CC0-1.0.txt ├── GPL-2.0-only.txt ├── GPL-2.0-or-later.txt ├── GPL-3.0-only.txt ├── LGPL-2.0-or-later.txt ├── LGPL-2.1-only.txt ├── LGPL-2.1-or-later.txt ├── LGPL-3.0-only.txt ├── LicenseRef-KDE-Accepted-GPL.txt ├── LicenseRef-KDE-Accepted-LGPL.txt ├── LicenseRef-Qt-Commercial.txt └── Qt-LGPL-exception-1.1.txt ├── PlasmaConfig.cmake.in ├── PlasmaMacros.cmake ├── README.md ├── autotests ├── CMakeLists.txt ├── TODO ├── coronatest.cpp ├── coronatest.h ├── coronatestresources.qrc ├── data │ ├── background.svgz │ ├── bug359388 │ │ └── hicolor │ │ │ └── 22x22 │ │ │ └── apps │ │ │ └── bug359388.svg │ ├── icons │ │ ├── test-theme-two │ │ │ ├── apps │ │ │ │ └── 22 │ │ │ │ │ └── tst-plasma-framework-test-icon.svg │ │ │ └── index.theme │ │ └── test-theme │ │ │ ├── apps │ │ │ ├── 22 │ │ │ │ └── tst-plasma-framework-test-icon.svg │ │ │ ├── 32 │ │ │ │ └── tst-plasma-framework-test-icon.svg │ │ │ └── 48 │ │ │ │ └── konversation.svg │ │ │ └── index.theme │ ├── plasma │ │ ├── desktoptheme │ │ │ ├── test_old_metadata_format_theme │ │ │ │ └── metadata.desktop │ │ │ └── testtheme │ │ │ │ ├── colors │ │ │ │ ├── element.svg │ │ │ │ ├── metadata.json │ │ │ │ ├── opaque │ │ │ │ └── element.svg │ │ │ │ └── plasmarc │ │ └── plasmoids │ │ │ └── simplecontainment │ │ │ ├── contents │ │ │ ├── main.qml │ │ │ └── ui │ │ │ │ └── main.qml │ │ │ └── metadata.json │ ├── signedPackage │ │ ├── contents.hash │ │ ├── contents.hash.sig │ │ ├── contents │ │ │ ├── code │ │ │ │ └── main.js │ │ │ └── images │ │ │ │ └── dummy │ │ └── metadata.json │ ├── test_image.png │ ├── test_nonsquare.png │ ├── testconfigpackage │ │ ├── contents │ │ │ ├── config │ │ │ │ ├── config.qml │ │ │ │ └── main.xml │ │ │ └── ui │ │ │ │ ├── ConfigGeneral.qml │ │ │ │ └── main.qml │ │ └── metadata.json │ ├── testfallbackpackage │ │ ├── contents │ │ │ └── ui │ │ │ │ └── main.qml │ │ └── metadata.json │ ├── testpackage │ │ ├── contents.hash │ │ ├── contents │ │ │ ├── images │ │ │ │ └── empty.png │ │ │ └── ui │ │ │ │ ├── main.qml │ │ │ │ └── otherfile.qml │ │ └── metadata.json │ └── view.qml ├── dialognativetest.cpp ├── dialognativetest.h ├── dialogqmltest.cpp ├── dialogqmltest.h ├── dialogstatetest.cpp ├── dialogstatetest.h ├── dummycontainmentaction.cpp ├── dummycontainmentaction.json ├── dynamictreemodel.cpp ├── dynamictreemodel.h ├── i18ndcheck.sh ├── input │ └── resizemodeitem.qml ├── plasma-test-appletsrc ├── plasmoidpackagerc ├── plasmoidpackagetest.cpp ├── plasmoidpackagetest.h ├── pluginloadertest.cpp ├── pluginloadertest.h ├── quickviewsharedenginetest.cpp ├── sharedqmlenginetest.cpp ├── signed.plasmoid ├── signed.plasmoid.invalid.sig ├── signed.plasmoid.sig ├── themetest.cpp ├── themetest.h └── utils.h ├── docs └── Doxyfile.local ├── examples ├── CMakeLists.txt ├── applets │ ├── CMakeLists.txt │ ├── bugreport │ │ ├── contents │ │ │ └── ui │ │ │ │ └── main.qml │ │ └── metadata.json │ ├── compactrepresentation │ │ ├── contents │ │ │ └── ui │ │ │ │ └── main.qml │ │ └── metadata.json │ ├── config │ │ ├── contents │ │ │ ├── config │ │ │ │ ├── config.qml │ │ │ │ └── main.xml │ │ │ └── ui │ │ │ │ ├── configGeneral.qml │ │ │ │ ├── configOther.qml │ │ │ │ └── main.qml │ │ └── metadata.json │ ├── helloworld │ │ ├── contents │ │ │ └── ui │ │ │ │ └── main.qml │ │ └── metadata.json │ ├── notes │ │ ├── contents │ │ │ ├── config │ │ │ │ └── main.xml │ │ │ └── ui │ │ │ │ └── main.qml │ │ └── metadata.json │ ├── testcomponents │ │ ├── contents │ │ │ ├── images │ │ │ │ ├── bridge.jpg │ │ │ │ └── surfboard.jpg │ │ │ └── ui │ │ │ │ ├── ButtonsPage.qml │ │ │ │ ├── DialogContent.qml │ │ │ │ ├── DialogsPage.qml │ │ │ │ ├── DragItem.qml │ │ │ │ ├── DragPage.qml │ │ │ │ ├── IconsPage.qml │ │ │ │ ├── MousePage.qml │ │ │ │ ├── PlasmoidPage.qml │ │ │ │ ├── TestMenu.qml │ │ │ │ ├── ThemePage.qml │ │ │ │ └── main.qml │ │ └── metadata.json │ ├── testshaders │ │ ├── contents │ │ │ ├── config │ │ │ │ └── main.xml │ │ │ ├── images │ │ │ │ └── elarun-small.png │ │ │ └── ui │ │ │ │ ├── ColorExample.qml │ │ │ │ ├── ColorShower.qml │ │ │ │ ├── EditorPage.qml │ │ │ │ ├── ShaderExample.qml │ │ │ │ ├── Shadows.qml │ │ │ │ ├── SimpleExample.qml │ │ │ │ ├── WaterEffect.qml │ │ │ │ ├── WobbleExample.qml │ │ │ │ ├── config.qml │ │ │ │ └── main.qml │ │ └── metadata.json │ └── widgetgallery │ │ ├── contents │ │ └── ui │ │ │ ├── Busy.qml │ │ │ ├── Buttons.qml │ │ │ ├── CheckableButtons.qml │ │ │ ├── Menu.qml │ │ │ ├── Misc.qml │ │ │ ├── Scrollers.qml │ │ │ ├── Sliders.qml │ │ │ ├── Texts.qml │ │ │ ├── Typography.qml │ │ │ ├── main.qml │ │ │ └── standalonemain.qml │ │ ├── metadata.json │ │ ├── platformcontents │ │ └── application │ │ │ └── tablet │ │ │ └── ui │ │ │ └── main.qml │ │ └── widgetgallery-tablet ├── containments │ ├── CMakeLists.txt │ └── testcontainment │ │ ├── contents │ │ └── ui │ │ │ ├── PlasmoidContainer.qml │ │ │ └── main.qml │ │ └── metadata.json ├── developerguide │ ├── CMakeLists.txt │ └── basic │ │ ├── contents │ │ └── ui │ │ │ └── main.qml │ │ └── metadata.json ├── shell │ ├── CMakeLists.txt │ ├── customcorona.cpp │ ├── customcorona.h │ └── main.cpp ├── testcontainmentactionsplugin │ ├── CMakeLists.txt │ ├── config.ui │ ├── plasma-containmentactions-test.json │ ├── test.cpp │ └── test.h └── wallpapers │ ├── CMakeLists.txt │ └── autumn │ ├── contents │ ├── config │ │ └── main.xml │ ├── images │ │ ├── backgroundLeaves.jpg │ │ ├── realLeaf1.png │ │ ├── realLeaf2.png │ │ ├── realLeaf3.png │ │ └── realLeaf4.png │ └── ui │ │ ├── config.qml │ │ └── main.qml │ └── metadata.json ├── metainfo.yaml ├── po ├── ar │ └── libplasma6.po ├── ast │ └── libplasma6.po ├── az │ └── libplasma6.po ├── be │ └── libplasma6.po ├── bg │ └── libplasma6.po ├── bs │ └── libplasma6.po ├── ca │ ├── docs │ │ └── plasmapkg2 │ │ │ └── man-plasmapkg2.1.docbook │ └── libplasma6.po ├── ca@valencia │ ├── docs │ │ └── plasmapkg2 │ │ │ └── man-plasmapkg2.1.docbook │ └── libplasma6.po ├── cs │ └── libplasma6.po ├── da │ └── libplasma6.po ├── de │ ├── docs │ │ └── plasmapkg2 │ │ │ └── man-plasmapkg2.1.docbook │ └── libplasma6.po ├── el │ └── libplasma6.po ├── en_GB │ └── libplasma6.po ├── eo │ └── libplasma6.po ├── es │ ├── docs │ │ └── plasmapkg2 │ │ │ └── man-plasmapkg2.1.docbook │ └── libplasma6.po ├── et │ └── libplasma6.po ├── eu │ └── libplasma6.po ├── fi │ └── libplasma6.po ├── fr │ ├── docs │ │ └── plasmapkg2 │ │ │ └── man-plasmapkg2.1.docbook │ └── libplasma6.po ├── gd │ └── libplasma6.po ├── gl │ └── libplasma6.po ├── he │ └── libplasma6.po ├── hu │ └── libplasma6.po ├── ia │ └── libplasma6.po ├── id │ └── libplasma6.po ├── it │ ├── docs │ │ └── plasmapkg2 │ │ │ └── man-plasmapkg2.1.docbook │ └── libplasma6.po ├── ja │ └── libplasma6.po ├── ka │ └── libplasma6.po ├── ko │ └── libplasma6.po ├── lt │ ├── libplasma6.po │ └── scripts │ │ └── libplasma6 │ │ ├── libplasma6.js │ │ └── plasmoids.js ├── lv │ └── libplasma6.po ├── ml │ └── libplasma6.po ├── mr │ └── libplasma6.po ├── nb │ └── libplasma6.po ├── nds │ └── libplasma6.po ├── nl │ ├── docs │ │ └── plasmapkg2 │ │ │ └── man-plasmapkg2.1.docbook │ └── libplasma6.po ├── nn │ └── libplasma6.po ├── pa │ └── libplasma6.po ├── pl │ └── libplasma6.po ├── pt │ ├── docs │ │ └── plasmapkg2 │ │ │ └── man-plasmapkg2.1.docbook │ └── libplasma6.po ├── pt_BR │ ├── docs │ │ └── plasmapkg2 │ │ │ └── man-plasmapkg2.1.docbook │ └── libplasma6.po ├── ro │ └── libplasma6.po ├── ru │ └── libplasma6.po ├── sa │ └── libplasma6.po ├── sk │ └── libplasma6.po ├── sl │ └── libplasma6.po ├── sr │ └── libplasma6.po ├── sr@ijekavian │ └── libplasma6.po ├── sr@ijekavianlatin │ └── libplasma6.po ├── sr@latin │ └── libplasma6.po ├── sv │ ├── docs │ │ └── plasmapkg2 │ │ │ └── man-plasmapkg2.1.docbook │ └── libplasma6.po ├── ta │ └── libplasma6.po ├── tg │ └── libplasma6.po ├── tr │ └── libplasma6.po ├── ug │ └── libplasma6.po ├── uk │ ├── docs │ │ └── plasmapkg2 │ │ │ └── man-plasmapkg2.1.docbook │ └── libplasma6.po ├── vi │ └── libplasma6.po ├── zh_CN │ └── libplasma6.po └── zh_TW │ └── libplasma6.po ├── src ├── CMakeLists.txt ├── Messages.sh ├── declarativeimports │ ├── CMakeLists.txt │ ├── core │ │ ├── CMakeLists.txt │ │ ├── Mainpage.dox │ │ ├── action.cpp │ │ ├── action.h │ │ ├── config-x11.h.cmake │ │ ├── corebindingsplugin.cpp │ │ ├── corebindingsplugin.h │ │ ├── plugins.qmltypes │ │ ├── private │ │ │ ├── DefaultToolTip.qml │ │ │ └── resources.qrc │ │ ├── quicktheme.cpp │ │ ├── quicktheme.h │ │ ├── tooltip.cpp │ │ ├── tooltip.h │ │ ├── tooltipdialog.cpp │ │ ├── tooltipdialog.h │ │ ├── windowthumbnail.cpp │ │ └── windowthumbnail.h │ ├── kirigamiplasmastyle │ │ ├── AbstractApplicationHeader.qml │ │ ├── CMakeLists.txt │ │ ├── Icon.qml │ │ ├── plasmatheme.cpp │ │ ├── plasmatheme.h │ │ ├── plugin.cpp │ │ ├── plugin.h │ │ ├── plugin.json │ │ ├── units.cpp │ │ └── units.h │ ├── plasmacomponents3 │ │ ├── AbstractButton.qml │ │ ├── BusyIndicator.qml │ │ ├── Button.qml │ │ ├── CheckBox.qml │ │ ├── CheckDelegate.qml │ │ ├── CheckIndicator.qml │ │ ├── ComboBox.qml │ │ ├── Container.qml │ │ ├── Control.qml │ │ ├── Dial.qml │ │ ├── Dialog.qml │ │ ├── DialogButtonBox.qml │ │ ├── Drawer.qml │ │ ├── Frame.qml │ │ ├── GroupBox.qml │ │ ├── ItemDelegate.qml │ │ ├── Label.qml │ │ ├── Menu.qml │ │ ├── MenuItem.qml │ │ ├── MenuSeparator.qml │ │ ├── Page.qml │ │ ├── PageIndicator.qml │ │ ├── Pane.qml │ │ ├── Popup.qml │ │ ├── ProgressBar.qml │ │ ├── README.md │ │ ├── RadioButton.qml │ │ ├── RadioDelegate.qml │ │ ├── RadioIndicator.qml │ │ ├── RangeSlider.qml │ │ ├── RoundButton.qml │ │ ├── ScrollBar.qml │ │ ├── ScrollView.qml │ │ ├── Slider.qml │ │ ├── SpinBox.qml │ │ ├── SwipeView.qml │ │ ├── Switch.qml │ │ ├── SwitchDelegate.qml │ │ ├── SwitchIndicator.qml │ │ ├── TabBar.qml │ │ ├── TabButton.qml │ │ ├── TextArea.qml │ │ ├── TextField.qml │ │ ├── ToolBar.qml │ │ ├── ToolButton.qml │ │ ├── ToolTip.qml │ │ ├── mobiletextselection │ │ │ ├── MobileCursor.qml │ │ │ ├── MobileTextActionsToolBar.qml │ │ │ ├── MobileTextActionsToolBarImpl.qml │ │ │ └── qmldir │ │ ├── private │ │ │ ├── ButtonBackground.qml │ │ │ ├── ButtonContent.qml │ │ │ ├── ButtonFocus.qml │ │ │ ├── ButtonHover.qml │ │ │ ├── ButtonShadow.qml │ │ │ ├── DefaultListItemBackground.qml │ │ │ ├── FlatButtonBackground.qml │ │ │ ├── IconLabel.qml │ │ │ ├── RaisedButtonBackground.qml │ │ │ ├── RoundShadow.qml │ │ │ ├── TextFieldFocus.qml │ │ │ └── qmldir │ │ └── qmldir │ └── plasmaextracomponents │ │ ├── CMakeLists.txt │ │ ├── Mainpage.dox │ │ ├── qmenu.cpp │ │ ├── qmenu.h │ │ ├── qmenuitem.cpp │ │ ├── qmenuitem.h │ │ └── qml │ │ ├── ActionTextField.qml │ │ ├── BasicPlasmoidHeading.qml │ │ ├── DescriptiveLabel.qml │ │ ├── ExpandableListItem.qml │ │ ├── Heading.qml │ │ ├── Highlight.qml │ │ ├── ListItem.qml │ │ ├── ModelContextMenu.qml │ │ ├── PasswordField.qml │ │ ├── PlaceholderMessage.qml │ │ ├── PlasmoidHeading.qml │ │ ├── Representation.qml │ │ ├── SearchField.qml │ │ ├── ShadowedLabel.qml │ │ ├── animations │ │ ├── ActivateAnimation.qml │ │ ├── AppearAnimation.qml │ │ ├── DisappearAnimation.qml │ │ ├── PressedAnimation.qml │ │ └── ReleasedAnimation.qml │ │ └── private │ │ └── BackgroundMetrics.qml ├── desktoptheme │ ├── CMakeLists.txt │ ├── breeze-dark │ │ ├── CMakeLists.txt │ │ ├── colors │ │ ├── metadata.json.cmake │ │ └── plasmarc │ ├── breeze-light │ │ ├── CMakeLists.txt │ │ ├── colors │ │ ├── metadata.json.cmake │ │ └── plasmarc │ ├── breeze │ │ ├── .gitignore │ │ ├── CMakeLists.txt │ │ ├── dialogs │ │ │ └── background.svg │ │ ├── icons │ │ │ ├── akonadi.svg │ │ │ ├── akregator.svg │ │ │ ├── amarok.svg │ │ │ ├── applications.svg │ │ │ ├── apport.svg │ │ │ ├── audio.svg │ │ │ ├── battery.svg │ │ │ ├── bookmarks.svg │ │ │ ├── cantata.svg │ │ │ ├── computer.svg │ │ │ ├── configure.svg │ │ │ ├── device.svg │ │ │ ├── disk.svg │ │ │ ├── distribute.svg │ │ │ ├── document.svg │ │ │ ├── drive.svg │ │ │ ├── edit.svg │ │ │ ├── fcitx.svg │ │ │ ├── go.svg │ │ │ ├── ime.svg │ │ │ ├── input.svg │ │ │ ├── kalarm.svg │ │ │ ├── kdeconnect.svg │ │ │ ├── keyboard.svg │ │ │ ├── kget.svg │ │ │ ├── kgpg.svg │ │ │ ├── kleopatra.svg │ │ │ ├── klipper.svg │ │ │ ├── kmail.svg │ │ │ ├── konv_message.svg │ │ │ ├── konversation.svg │ │ │ ├── kopete.svg │ │ │ ├── korgac.svg │ │ │ ├── kpackagekit.svg │ │ │ ├── kruler.svg │ │ │ ├── kteatime.svg │ │ │ ├── ktorrent.svg │ │ │ ├── kup.svg │ │ │ ├── list.svg │ │ │ ├── mail.svg │ │ │ ├── media.svg │ │ │ ├── mobile.svg │ │ │ ├── network.svg │ │ │ ├── notification.svg │ │ │ ├── osd.svg │ │ │ ├── phone.svg │ │ │ ├── plasmavault.svg │ │ │ ├── plasmavault_error.svg │ │ │ ├── preferences.svg │ │ │ ├── printer.svg │ │ │ ├── quassel.svg │ │ │ ├── search.svg │ │ │ ├── slc.svg │ │ │ ├── software.svg │ │ │ ├── start.svg │ │ │ ├── system.svg │ │ │ ├── touchpad.svg │ │ │ ├── user.svg │ │ │ ├── video-card.svg │ │ │ ├── video.svg │ │ │ ├── view.svg │ │ │ ├── vlc.svg │ │ │ ├── wallet.svg │ │ │ ├── window.svg │ │ │ ├── yakuake.svg │ │ │ └── zoom.svg │ │ ├── metadata.json.cmake │ │ ├── opaque │ │ │ ├── dialogs │ │ │ │ └── background.svg │ │ │ └── widgets │ │ │ │ ├── panel-background.svg │ │ │ │ └── tooltip.svg │ │ ├── plasmarc │ │ ├── solid │ │ │ ├── dialogs │ │ │ │ └── background.svg │ │ │ └── widgets │ │ │ │ ├── background.svg │ │ │ │ ├── panel-background.svg │ │ │ │ └── tooltip.svg │ │ ├── translucent │ │ │ ├── dialogs │ │ │ │ └── background.svg │ │ │ └── widgets │ │ │ │ ├── background.svg │ │ │ │ ├── panel-background.svg │ │ │ │ └── tooltip.svg │ │ └── widgets │ │ │ ├── .png │ │ │ ├── action-overlays.svg │ │ │ ├── actionbutton.svg │ │ │ ├── analog_meter.svg │ │ │ ├── arrows.svg │ │ │ ├── background.svg │ │ │ ├── bar_meter_horizontal.svg │ │ │ ├── bar_meter_vertical.svg │ │ │ ├── branding.svg │ │ │ ├── busywidget.svg │ │ │ ├── button.svg │ │ │ ├── calendar.svg │ │ │ ├── checkmarks.svg │ │ │ ├── clock.svg │ │ │ ├── configuration-icons.svg │ │ │ ├── containment-controls.svg │ │ │ ├── dragger.svg │ │ │ ├── frame.svg │ │ │ ├── glowbar.svg │ │ │ ├── line.svg │ │ │ ├── lineedit.svg │ │ │ ├── listitem.svg │ │ │ ├── margins-highlight.svg │ │ │ ├── media-delegate.svg │ │ │ ├── menubaritem.svg │ │ │ ├── monitor.svg │ │ │ ├── notes.svg │ │ │ ├── pager.svg │ │ │ ├── panel-background.svg │ │ │ ├── picker.svg │ │ │ ├── plasmoidheading.svg │ │ │ ├── plot-background.svg │ │ │ ├── radiobutton.svg │ │ │ ├── scrollbar.svg │ │ │ ├── scrollwidget.svg │ │ │ ├── slider.svg │ │ │ ├── switch.svg │ │ │ ├── tabbar.svg │ │ │ ├── tasks.svg │ │ │ ├── toolbar.svg │ │ │ ├── tooltip.svg │ │ │ ├── translucentbackground.svg │ │ │ └── viewitem.svg │ └── oxygen │ │ ├── CMakeLists.txt │ │ ├── colors │ │ ├── dialogs │ │ └── background.svg │ │ ├── metadata.json.cmake │ │ ├── opaque │ │ ├── dialogs │ │ │ ├── background.svg │ │ │ └── krunner.svg │ │ └── widgets │ │ │ ├── extender-background.svg │ │ │ ├── panel-background.svg │ │ │ └── tooltip.svg │ │ ├── plasmarc │ │ └── widgets │ │ ├── action-overlays.svg │ │ ├── actionbutton.svg │ │ ├── analog_meter.svg │ │ ├── arrows.svg │ │ ├── background.svg │ │ ├── bar_meter_horizontal.svg │ │ ├── bar_meter_vertical.svg │ │ ├── branding.svg │ │ ├── busywidget.svg │ │ ├── button.svg │ │ ├── clock.svg │ │ ├── containment-controls.svg │ │ ├── dragger.svg │ │ ├── extender-background.svg │ │ ├── extender-dragger.svg │ │ ├── frame.svg │ │ ├── glowbar.svg │ │ ├── line.svg │ │ ├── lineedit.svg │ │ ├── media-delegate.svg │ │ ├── monitor.svg │ │ ├── pager.svg │ │ ├── panel-background.svg │ │ ├── plot-background.svg │ │ ├── scrollbar.svg │ │ ├── scrollwidget.svg │ │ ├── slider.svg │ │ ├── tabbar.svg │ │ ├── tasks.svg │ │ ├── timer.svg │ │ ├── tooltip.svg │ │ ├── translucentbackground.svg │ │ └── viewitem.svg ├── plasma │ ├── .krazy │ ├── CMakeLists.txt │ ├── Mainpage.dox │ ├── README │ ├── applet.cpp │ ├── applet.h │ ├── config-plasma.h.cmake │ ├── containment.cpp │ ├── containment.h │ ├── containmentactions.cpp │ ├── containmentactions.h │ ├── corona.cpp │ ├── corona.h │ ├── data │ │ └── kconfigxt │ │ │ ├── libplasma-theme-global.kcfg │ │ │ └── libplasma-theme-global.kcfgc │ ├── packagestructure │ │ ├── CMakeLists.txt │ │ ├── packages.cpp │ │ ├── packages_p.h │ │ ├── plasma_applet_packagestructure.cpp │ │ ├── plasma_applet_packagestructure.json │ │ ├── plasma_containmentactions_packagestructure.cpp │ │ ├── plasma_containmentactions_packagestructure.json │ │ ├── plasma_generic_packagestructure.cpp │ │ ├── plasma_generic_packagestructure.json │ │ ├── plasma_theme_packagestructure.cpp │ │ ├── plasma_theme_packagestructure.json │ │ ├── qmlWallpaper │ │ │ ├── plasma-packagestructure-wallpaper.json │ │ │ └── wallpaper.cpp │ │ └── shell │ │ │ ├── plasma-packagestructure-plasma-shell.json │ │ │ └── shellpackage.cpp │ ├── plasma.cpp │ ├── plasma.h │ ├── pluginloader.cpp │ ├── pluginloader.h │ ├── private │ │ ├── actionwidgetinterface_p.h │ │ ├── applet_p.cpp │ │ ├── applet_p.h │ │ ├── containment_p.cpp │ │ ├── containment_p.h │ │ ├── containmentactions_p.h │ │ ├── corona_p.h │ │ ├── effectwatcher.cpp │ │ ├── effectwatcher_p.h │ │ ├── package_p.h │ │ ├── publish.ui │ │ ├── service_p.h │ │ ├── servicejob_p.h │ │ ├── sharedtimer_p.h │ │ ├── theme_p.cpp │ │ ├── theme_p.h │ │ ├── timetracker.cpp │ │ └── timetracker.h │ ├── theme.cpp │ └── theme.h ├── plasmaquick │ ├── CMakeLists.txt │ ├── Mainpage.dox │ ├── PlasmaQuickConfig.cmake.in │ ├── appletcontext.cpp │ ├── appletcontext_p.h │ ├── appletpopup.cpp │ ├── appletpopup.h │ ├── appletquickitem.cpp │ ├── appletquickitem.h │ ├── configmodel.cpp │ ├── configmodel.h │ ├── configview.cpp │ ├── configview.h │ ├── containmentview.cpp │ ├── containmentview.h │ ├── dialog.cpp │ ├── dialog.h │ ├── dialogshadows.cpp │ ├── dialogshadows_p.h │ ├── edgeeventforwarder.cpp │ ├── edgeeventforwarder.h │ ├── plasmawindow.cpp │ ├── plasmawindow.h │ ├── plasmoid │ │ ├── containmentitem.cpp │ │ ├── containmentitem.h │ │ ├── dropmenu.cpp │ │ ├── dropmenu.h │ │ ├── plasmoiditem.cpp │ │ ├── plasmoiditem.h │ │ ├── wallpaperitem.cpp │ │ └── wallpaperitem.h │ ├── popupplasmawindow.cpp │ ├── popupplasmawindow.h │ ├── private │ │ ├── DialogBackground.qml │ │ ├── appletquickitem_p.h │ │ ├── configcategory_p.cpp │ │ ├── configcategory_p.h │ │ ├── dialogbackground_p.cpp │ │ ├── dialogbackground_p.h │ │ ├── plasmoidattached_p.cpp │ │ ├── plasmoidattached_p.h │ │ └── resources.qrc │ ├── quickviewsharedengine.cpp │ ├── quickviewsharedengine.h │ ├── sharedqmlengine.cpp │ ├── sharedqmlengine.h │ ├── transientplacementhint.cpp │ ├── transientplacementhint_p.h │ ├── waylandintegration.cpp │ ├── waylandintegration_p.h │ ├── windowresizehandler.cpp │ └── windowresizehandler.h └── tools │ ├── apply-stylesheet.sh │ ├── currentColorFillFix.sh │ └── inkscape extensions │ ├── plasmarename.inx │ └── plasmarename.py ├── templates ├── .clang-format ├── CMakeLists.txt ├── cpp-plasmoid6 │ ├── CMakeLists.txt │ ├── LICENSES │ │ └── LGPL-2.1-or-later.txt │ ├── Messages.sh │ ├── README │ ├── cpp-plasmoid6.kdevtemplate │ ├── cpp-plasmoid6.png │ └── src │ │ ├── %{APPNAMELC}.cpp │ │ ├── %{APPNAMELC}.h │ │ ├── CMakeLists.txt │ │ └── package │ │ ├── contents │ │ ├── images │ │ │ └── pairs.svg │ │ └── ui │ │ │ └── main.qml │ │ └── metadata.json ├── plasma6-wallpaper-with-qml-extension │ ├── CMakeLists.txt │ ├── LICENSES │ │ └── LGPL-2.1-or-later.txt │ ├── Messages.sh │ ├── README │ ├── package │ │ ├── contents │ │ │ ├── config │ │ │ │ └── main.xml │ │ │ └── ui │ │ │ │ ├── config.qml │ │ │ │ └── main.qml │ │ └── metadata.json │ ├── plasma6-wallpaper-with-qml-extension.kdevtemplate │ └── plugin │ │ ├── %{APPNAMELC}plugin.cpp │ │ ├── %{APPNAMELC}plugin.h │ │ ├── CMakeLists.txt │ │ └── qmldir ├── plasma6-wallpaper │ ├── CMakeLists.txt │ ├── LICENSES │ │ └── LGPL-2.1-or-later.txt │ ├── Messages.sh │ ├── README │ ├── package │ │ ├── contents │ │ │ ├── config │ │ │ │ └── main.xml │ │ │ └── ui │ │ │ │ ├── config.qml │ │ │ │ └── main.qml │ │ └── metadata.json │ └── plasma6-wallpaper.kdevtemplate ├── qml-plasmoid6-with-qml-extension │ ├── CMakeLists.txt │ ├── LICENSES │ │ └── LGPL-2.1-or-later.txt │ ├── Messages.sh │ ├── README │ ├── package │ │ ├── contents │ │ │ └── ui │ │ │ │ └── main.qml │ │ └── metadata.json │ ├── plugin │ │ ├── %{APPNAMELC}plugin.cpp │ │ ├── %{APPNAMELC}plugin.h │ │ ├── CMakeLists.txt │ │ └── qmldir │ ├── qml-plasmoid6-with-qml-extension.kdevtemplate │ └── qml-plasmoid6-with-qml-extension.png └── qml-plasmoid6 │ ├── CMakeLists.txt │ ├── LICENSES │ └── LGPL-2.1-or-later.txt │ ├── Messages.sh │ ├── README │ ├── package │ ├── contents │ │ ├── images │ │ │ └── pairs.svgz │ │ └── ui │ │ │ └── main.qml │ └── metadata.json │ ├── qml-plasmoid6.kdevtemplate │ └── qml-plasmoid6.png └── tests ├── CMakeLists.txt ├── buttons_pc3.0.qml ├── components ├── ComponentBase.qml ├── busyindicator3.qml ├── button3.qml ├── checkbox3.qml ├── combobox3.qml ├── menu.qml ├── progressbar3.qml ├── radiobutton3.qml ├── roundbutton3.qml ├── slider3.qml ├── tabbar3.qml ├── textarea3.qml ├── textfield3.qml └── toolbutton3.qml ├── dialog.qml ├── dialog_fullscreen.qml ├── dialog_minWidthHeightRepositioning.qml ├── dialog_positioning.qml ├── dialog_positioning2.qml ├── dialog_positioning_parentrotated.qml ├── dialog_resizeWithParent.qml ├── dialog_sizeMoreThanMin.qml ├── dialog_tooltip.qml ├── dialog_visualParentChange.qml ├── dpi ├── CMakeLists.txt ├── dpitest.cpp ├── dpitest.h └── main.cpp ├── extras └── expandablelistitem.qml ├── frames.qml ├── selected_svg.qml ├── shadows.qml ├── testborders.qml ├── tooltip-icons.qml ├── tooltip.qml └── window.qml /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | #clang-format 2 | 08d4f6335bcd60306b243f4fd53d1ea60a995a06 3 | #clang-tidy 4 | 3120de70f25378cad1faf0ee4e96ac506006b953 5 | # re-run of clang-format 6 | 30f46ade664d7a9492817befa838297aecc44506 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.svg binary 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore the following files 2 | *~ 3 | *.[oa] 4 | *.diff 5 | *.kate-swp 6 | *.kdev4 7 | .kdev_include_paths 8 | *.kdevelop.pcs 9 | *.moc 10 | *.moc.cpp 11 | *.orig 12 | *.user 13 | .*.swp 14 | .swp.* 15 | Doxyfile 16 | Makefile 17 | avail 18 | random_seed 19 | /build*/ 20 | CMakeLists.txt.user* 21 | *.unc-backup* 22 | .cmake/ 23 | cmake-build-debug* 24 | .idea 25 | /.clang-format 26 | /compile_commands.json 27 | .clangd 28 | .cache 29 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2020 Volker Krause 2 | # SPDX-License-Identifier: CC0-1.0 3 | 4 | include: 5 | - project: sysadmin/ci-utilities 6 | file: 7 | - /gitlab-templates/linux-qt6.yml 8 | - /gitlab-templates/freebsd-qt6.yml 9 | -------------------------------------------------------------------------------- /.kde-ci.yml: -------------------------------------------------------------------------------- 1 | Dependencies: 2 | - 'on': ['Linux', 'FreeBSD', 'Windows', 'macOS'] 3 | 'require': 4 | 'frameworks/extra-cmake-modules': '@same' 5 | 'frameworks/karchive' : '@same' 6 | 'frameworks/kconfig' : '@same' 7 | 'frameworks/kconfigwidgets' : '@same' 8 | 'frameworks/kcoreaddons' : '@same' 9 | 'frameworks/kdbusaddons' : '@same' 10 | 'frameworks/kglobalaccel' : '@same' 11 | 'frameworks/kguiaddons' : '@same' 12 | 'frameworks/ki18n' : '@same' 13 | 'frameworks/kiconthemes' : '@same' 14 | 'frameworks/kio' : '@same' 15 | 'frameworks/knotifications' : '@same' 16 | 'frameworks/kpackage' : '@same' 17 | # kparts for examples 18 | 'frameworks/kparts' : '@same' 19 | 'frameworks/kwidgetsaddons' : '@same' 20 | 'frameworks/kwindowsystem' : '@same' 21 | 'frameworks/kirigami' : '@same' 22 | 'frameworks/kcmutils' : '@same' 23 | 'frameworks/ksvg' : '@same' 24 | 'plasma/kactivities' : '@same' 25 | 26 | Options: 27 | test-before-installing: True 28 | cppcheck-ignore-files: ['templates/'] 29 | require-passing-tests-on: [ '@all' ] 30 | cmake-options: -DBUILD_EXAMPLES=ON 31 | -------------------------------------------------------------------------------- /ExtraDesktop.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | #This file outputs in a separate line each file with a .desktop syntax 3 | #that needs to be translated but has a non .desktop extension 4 | find -name \*.kdevtemplate -print 5 | -------------------------------------------------------------------------------- /LICENSES/BSD-3-Clause.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) . All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without modification, 4 | are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, 7 | this list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | 3. Neither the name of the copyright holder nor the names of its contributors 14 | may be used to endorse or promote products derived from this software without 15 | specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 23 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 24 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 26 | USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /LICENSES/LicenseRef-KDE-Accepted-GPL.txt: -------------------------------------------------------------------------------- 1 | This library is free software; you can redistribute it and/or 2 | modify it under the terms of the GNU General Public License as 3 | published by the Free Software Foundation; either version 3 of 4 | the license or (at your option) at any later version that is 5 | accepted by the membership of KDE e.V. (or its successor 6 | approved by the membership of KDE e.V.), which shall act as a 7 | proxy as defined in Section 14 of version 3 of the license. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | -------------------------------------------------------------------------------- /LICENSES/LicenseRef-KDE-Accepted-LGPL.txt: -------------------------------------------------------------------------------- 1 | This library is free software; you can redistribute it and/or 2 | modify it under the terms of the GNU Lesser General Public 3 | License as published by the Free Software Foundation; either 4 | version 3 of the license or (at your option) any later version 5 | that is accepted by the membership of KDE e.V. (or its successor 6 | approved by the membership of KDE e.V.), which shall act as a 7 | proxy as defined in Section 6 of version 3 of the license. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | -------------------------------------------------------------------------------- /LICENSES/LicenseRef-Qt-Commercial.txt: -------------------------------------------------------------------------------- 1 | Commercial License Usage 2 | Licensees holding valid commercial Qt licenses may use this file in 3 | accordance with the commercial license agreement provided with the 4 | Software or, alternatively, in accordance with the terms contained in 5 | a written agreement between you and The Qt Company. For licensing terms 6 | and conditions see https://www.qt.io/terms-conditions. For further 7 | information use the contact form at https://www.qt.io/contact-us. 8 | -------------------------------------------------------------------------------- /LICENSES/Qt-LGPL-exception-1.1.txt: -------------------------------------------------------------------------------- 1 | The Qt Company Qt LGPL Exception version 1.1 2 | 3 | As an additional permission to the GNU Lesser General Public License version 2.1, the object code form of a "work that uses the Library" may incorporate material from a header file that is part of the Library. You may distribute such object code under terms of your choice, provided that: 4 | 5 | (i) the header files of the Library have not been modified; and 6 | 7 | (ii) the incorporated material is limited to numerical parameters, data structure layouts, accessors, macros, inline functions and templates; and 8 | 9 | (iii) you comply with the terms of Section 6 of the GNU Lesser General Public License version 2.1. 10 | 11 | Moreover, you may apply this exception to a modified version of the Library, provided that such modification does not involve copying material from the Library into the modified Library's header files unless such material is limited to 12 | 13 | (i) numerical parameters; 14 | 15 | (ii) data structure layouts; 16 | 17 | (iii) accessors; and 18 | 19 | (iv) small macros, templates and inline functions of five lines or less in length. 20 | 21 | Furthermore, you are not required to apply this additional permission to a modified version of the Library. 22 | -------------------------------------------------------------------------------- /PlasmaConfig.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | # Any changes in this ".cmake" file will be overwritten by CMake, the source is the ".cmake.in" file. 4 | 5 | include("${CMAKE_CURRENT_LIST_DIR}/PlasmaTargets.cmake") 6 | @PACKAGE_INCLUDE_QCHTARGETS@ 7 | 8 | set(Plasma_INSTALL_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@") 9 | 10 | set(Plasma_LIBRARIES Plasma::Plasma) 11 | 12 | set(PLASMA_PLASMOIDS_PLUGINDIR ${KDE_INSTALL_PLUGINDIR}/plasma/applets) 13 | set(PLASMA_CONTAINMENTACTIONS_PLUGINDIR ${KDE_INSTALL_PLUGINDIR}/plasma/containmentactions) 14 | 15 | include(CMakeFindDependencyMacro) 16 | find_dependency(Qt6Gui "@REQUIRED_QT_VERSION@") 17 | find_dependency(KF6Package "@KF_DEP_VERSION@") 18 | find_dependency(KF6WindowSystem "@KF_DEP_VERSION@") 19 | 20 | @PACKAGE_SETUP_AUTOMOC_VARIABLES@ 21 | 22 | include("${CMAKE_CURRENT_LIST_DIR}/PlasmaMacros.cmake") 23 | -------------------------------------------------------------------------------- /PlasmaMacros.cmake: -------------------------------------------------------------------------------- 1 | set(PLASMA_RELATIVE_DATA_INSTALL_DIR "plasma") 2 | set(PLASMA_DATA_INSTALL_DIR "${KDE_INSTALL_DATADIR}/${PLASMA_RELATIVE_DATA_INSTALL_DIR}") 3 | 4 | # plasma_install_package(path componentname [root] [type]) 5 | # 6 | # Installs a Plasma package to the system path 7 | # @arg path The source path to install from, location of metadata.desktop 8 | # @arg componentname The plugin name of the component, corresponding to the 9 | # X-KDE-PluginInfo-Name key in metadata.desktop 10 | # @arg root The subdirectory to install to, default: plasmoids 11 | # @arg type The type, default to applet, or applet, package, containment, 12 | # wallpaper, shell, lookandfeel, etc. 13 | # @see Types column in kpackagetool6 --list-types 14 | # 15 | # Examples: 16 | # plasma_install_package(mywidget org.kde.plasma.mywidget) # installs an applet 17 | # plasma_install_package(declarativetoolbox org.kde.toolbox packages package) # installs a generic package 18 | # 19 | macro(plasma_install_package dir component) 20 | set(root ${ARGV2}) 21 | set(type ${ARGV3}) 22 | if(NOT root) 23 | set(root plasmoids) 24 | endif() 25 | if(NOT type) 26 | set(type applet) 27 | endif() 28 | 29 | kpackage_install_package(${dir} ${component} ${root} ${PLASMA_RELATIVE_DATA_INSTALL_DIR} NO_DEPRECATED_WARNING) 30 | endmacro() 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Plasma Framework 2 | 3 | Foundational libraries, components, and tools of the Plasma workspaces 4 | 5 | ## Introduction 6 | The plasma framework provides the following: 7 | - QML components 8 | - A C++ library: libplasma 9 | - Script engines 10 | 11 | ## QML components 12 | ### org.kde.plasma.core 13 | 14 | Bindings for libplasma functionality, such FrameSvg, see @ref core. 15 | 16 | ### org.kde.plasma.components 17 | Graphical components for common items such as buttons, lineedits, tabbars and so on. Compatible subset of the MeeGo components used on the N9, see @ref plasmacomponents. 18 | 19 | ### org.kde.plasma.extras 20 | Extra graphical components that extend org.kde.plasma.components but are not in the standard api, see @ref plasmaextracomponents. 21 | 22 | ### org.kde.plasma.plasmoid 23 | Attached properties for manipulating the current applet or containment, see @ref libplasmaquick 24 | 25 | ## libplasma 26 | This C++ library provides: 27 | - rendering of SVG themes 28 | - loading of files from a certain filesystem structure: packages 29 | - data access through data engines 30 | - loading of the plugin structure of the workspace: containments and applets 31 | 32 | See @ref libplasma. 33 | 34 | ## Script engines 35 | Provides support to create applets or containments in various scripting languages. 36 | 37 | -------------------------------------------------------------------------------- /autotests/TODO: -------------------------------------------------------------------------------- 1 | This file enumerates which classes and methods needs test. Please feel free to 2 | add a specific test you'd like to see for a class/method. 3 | 4 | // Finished (as in has test for each method) 5 | package 6 | packagemetadata 7 | packagestructure 8 | 9 | // No tests written atm. 10 | abstractrunner 11 | animator 12 | appletbrowser 13 | applet 14 | configxml 15 | containment 16 | corona 17 | datacontainer 18 | datacontainer_p 19 | glapplet 20 | packages_p 21 | phase 22 | plasma_export 23 | plasma 24 | scriptengine 25 | searchaction 26 | searchcontext 27 | shadowitem_p 28 | svg 29 | theme 30 | uiloader 31 | -------------------------------------------------------------------------------- /autotests/coronatestresources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | plasma-test-appletsrc 4 | 5 | 6 | -------------------------------------------------------------------------------- /autotests/data/background.svgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/autotests/data/background.svgz -------------------------------------------------------------------------------- /autotests/data/icons/test-theme-two/index.theme: -------------------------------------------------------------------------------- 1 | [Icon Theme] 2 | Name=Unittest Theme two 3 | 4 | DisplayDepth=32 5 | 6 | DesktopDefault=48 7 | DesktopSizes=16,22,32,48,64,128,256 8 | ToolbarDefault=22 9 | ToolbarSizes=16,22,32,48 10 | MainToolbarDefault=22 11 | MainToolbarSizes=16,22,32,48 12 | SmallDefault=16 13 | SmallSizes=16,22,32,48 14 | PanelDefault=32 15 | PanelSizes=16,22,32,48,64,128,256 16 | DialogDefault=32 17 | DialogSizes=16,22,32,48,64,128,256 18 | 19 | ########## Directories 20 | ########## ordered by category and alphabetically 21 | 22 | Directories=apps/22 23 | 24 | [apps/22] 25 | Size=22 26 | Context=Applications 27 | Type=Fixed 28 | 29 | -------------------------------------------------------------------------------- /autotests/data/icons/test-theme/index.theme: -------------------------------------------------------------------------------- 1 | [Icon Theme] 2 | Name=Unittest Theme 3 | 4 | DisplayDepth=32 5 | 6 | DesktopDefault=48 7 | DesktopSizes=16,22,32,48,64,128,256 8 | ToolbarDefault=22 9 | ToolbarSizes=16,22,32,48 10 | MainToolbarDefault=22 11 | MainToolbarSizes=16,22,32,48 12 | SmallDefault=16 13 | SmallSizes=16,22,32,48 14 | PanelDefault=32 15 | PanelSizes=16,22,32,48,64,128,256 16 | DialogDefault=32 17 | DialogSizes=16,22,32,48,64,128,256 18 | 19 | ########## Directories 20 | ########## ordered by category and alphabetically 21 | 22 | Directories=apps/22,apps/32,apps/48 23 | 24 | [apps/22] 25 | Size=22 26 | Context=Applications 27 | Type=Fixed 28 | 29 | [apps/32] 30 | Size=32 31 | Context=Applications 32 | Type=Fixed 33 | 34 | [apps/48] 35 | Size=48 36 | Context=Applications 37 | Type=Fixed 38 | -------------------------------------------------------------------------------- /autotests/data/plasma/desktoptheme/test_old_metadata_format_theme/metadata.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Plasma test theme 3 | 4 | 5 | X-KDE-PluginInfo-Author=KDE Visual Design Group 6 | X-KDE-PluginInfo-Email=kde-artists@kde.org 7 | X-KDE-PluginInfo-Name=default 8 | X-KDE-PluginInfo-Version=5.20 9 | X-KDE-PluginInfo-Website=https://plasma.kde.org 10 | X-KDE-PluginInfo-Category= 11 | X-KDE-PluginInfo-License=LGPL 12 | X-KDE-PluginInfo-EnabledByDefault=true 13 | X-Plasma-API=5.0 14 | 15 | [ContrastEffect] 16 | enabled=true 17 | contrast=0.23 18 | intensity=2.0 19 | saturation=1.7 20 | -------------------------------------------------------------------------------- /autotests/data/plasma/desktoptheme/testtheme/element.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /autotests/data/plasma/desktoptheme/testtheme/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPlugin": { 3 | "Authors": [ 4 | { 5 | "Email": "kde-artists@kde.org", 6 | "Name": "KDE Visual Design Group" 7 | } 8 | ], 9 | "Category": "", 10 | "EnabledByDefault": true, 11 | "Id": "default", 12 | "License": "LGPL", 13 | "Name": "Plasma test theme", 14 | "Version": "5.20", 15 | "Website": "https://plasma.kde.org" 16 | }, 17 | "X-Plasma-API": "5.0" 18 | } 19 | -------------------------------------------------------------------------------- /autotests/data/plasma/desktoptheme/testtheme/opaque/element.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /autotests/data/plasma/desktoptheme/testtheme/plasmarc: -------------------------------------------------------------------------------- 1 | [ContrastEffect] 2 | enabled=true 3 | contrast=0.23 4 | intensity=2.0 5 | saturation=1.7 6 | -------------------------------------------------------------------------------- /autotests/data/plasma/plasmoids/simplecontainment/contents/main.qml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/autotests/data/plasma/plasmoids/simplecontainment/contents/main.qml -------------------------------------------------------------------------------- /autotests/data/plasma/plasmoids/simplecontainment/contents/ui/main.qml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/autotests/data/plasma/plasmoids/simplecontainment/contents/ui/main.qml -------------------------------------------------------------------------------- /autotests/data/plasma/plasmoids/simplecontainment/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPlugin": { 3 | "Id": "simplecontainment", 4 | "Name": "Testcontainment", 5 | "Category": "System Information" 6 | }, 7 | "KPackageStructure": "Plasma/Applet", 8 | "X-Plasma-ContainmentType": "Desktop" 9 | } 10 | -------------------------------------------------------------------------------- /autotests/data/signedPackage/contents.hash: -------------------------------------------------------------------------------- 1 | 5fd34038c612b9ee59ba9b8199594a370009f7ff -------------------------------------------------------------------------------- /autotests/data/signedPackage/contents.hash.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/autotests/data/signedPackage/contents.hash.sig -------------------------------------------------------------------------------- /autotests/data/signedPackage/contents/code/main.js: -------------------------------------------------------------------------------- 1 | // because we put the following line in the metadata.desktop file, we have access 2 | // to the HTTP extension in this Plasmoid. 3 | // 4 | // X-Plasma-RequiredExtensions=http 5 | // 6 | // More documentation can be found here: 7 | // 8 | // https://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/API#Extensions 9 | 10 | output = new TextEdit 11 | output.readOnly = true 12 | 13 | layout = new LinearLayout 14 | layout.orientation = QtVertical 15 | layout.addItem(output) 16 | 17 | // in case our request for HTTP urls in the metadata.desktop was rejected (e.g. due 18 | // to security restrictions) we won't have a plasmoid.get, so let's check for it 19 | // before using it! 20 | if (plasmoid.getUrl) { 21 | var getJob = plasmoid.getUrl("https://dot.kde.org/rss.xml"); 22 | function recv(job, data) 23 | { 24 | if (job == getJob) { 25 | print("we have our job") 26 | if (data.length) { 27 | output.append(data.toUtf8()) 28 | } 29 | } 30 | } 31 | 32 | function fini(job) 33 | { 34 | if (job == getJob) { 35 | print("our job is finished") 36 | } else { 37 | print("some other job is finished?") 38 | } 39 | } 40 | 41 | getJob.data.connect(recv) 42 | getJob.finished.connect(fini) 43 | } else { 44 | output.text = i18n("HTTP access denied!") 45 | } 46 | -------------------------------------------------------------------------------- /autotests/data/signedPackage/contents/images/dummy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/autotests/data/signedPackage/contents/images/dummy -------------------------------------------------------------------------------- /autotests/data/test_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/autotests/data/test_image.png -------------------------------------------------------------------------------- /autotests/data/test_nonsquare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/autotests/data/test_nonsquare.png -------------------------------------------------------------------------------- /autotests/data/testconfigpackage/contents/config/config.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2016 David Rosca 3 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 4 | */ 5 | import QtQuick 2.0 6 | import org.kde.plasma.configuration 2.0 7 | 8 | ConfigModel { 9 | ConfigCategory { 10 | name: "General" 11 | icon: "plasma" 12 | source: "ConfigGeneral.qml" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /autotests/data/testconfigpackage/contents/config/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 23 11 | 12 | 13 | string-value 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /autotests/data/testconfigpackage/contents/ui/ConfigGeneral.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2016 David Rosca 3 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 4 | */ 5 | import QtQuick 2.0 6 | 7 | Rectangle { 8 | id: root 9 | color: "darkblue" 10 | } 11 | 12 | -------------------------------------------------------------------------------- /autotests/data/testconfigpackage/contents/ui/main.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2016 David Rosca 3 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 4 | */ 5 | import QtQuick 2.0 6 | 7 | Rectangle { 8 | id: root 9 | color: "darkblue" 10 | } 11 | 12 | -------------------------------------------------------------------------------- /autotests/data/testconfigpackage/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPlugin": { 3 | "Authors": [ 4 | { 5 | "Email": "jblow@kde.org", 6 | "Name": "Joe Blow" 7 | } 8 | ], 9 | "Category": "", 10 | "Id": "org.kde.configtestpackage", 11 | "License": "GPLv2+", 12 | "Name": "Config Test Package", 13 | "Version": "", 14 | "Website": "" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /autotests/data/testfallbackpackage/contents/ui/main.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2014 Marco Martin 3 | * SPDX-FileCopyrightText: 2014 Vishesh Handa 4 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 5 | */ 6 | import QtQuick 2.0 7 | 8 | Rectangle { 9 | id: root 10 | color: "darkblue" 11 | } 12 | 13 | -------------------------------------------------------------------------------- /autotests/data/testpackage/contents.hash: -------------------------------------------------------------------------------- 1 | 88a45736f27b7b477a470feaacd9e725232c47cc 2 | -------------------------------------------------------------------------------- /autotests/data/testpackage/contents/images/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/autotests/data/testpackage/contents/images/empty.png -------------------------------------------------------------------------------- /autotests/data/testpackage/contents/ui/main.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2014 Marco Martin 3 | * SPDX-FileCopyrightText: 2014 Sebastian Kügler 4 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 5 | */ 6 | import QtQuick 2.0 7 | 8 | Rectangle { 9 | id: root 10 | color: "darkblue" 11 | } 12 | 13 | -------------------------------------------------------------------------------- /autotests/data/testpackage/contents/ui/otherfile.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2014 Marco Martin 3 | * SPDX-FileCopyrightText: 2014 Vishesh Handa 4 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 5 | */ 6 | import QtQuick 2.0 7 | 8 | Rectangle { 9 | id: root 10 | color: "darkblue" 11 | } 12 | 13 | -------------------------------------------------------------------------------- /autotests/data/view.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2016 David Rosca 3 | * SPDX-FileCopyrightText: 2016 Marco Martin 4 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 5 | */ 6 | import QtQuick 2.0 7 | Item { 8 | width: 100 9 | height: 100 10 | } 11 | -------------------------------------------------------------------------------- /autotests/dialognativetest.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2014 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | #ifndef DIALOGNATIVETEST_H 7 | #define DIALOGNATIVETEST_H 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | #include "plasmaquick/dialog.h" 14 | 15 | class DialogNativeTest : public QObject 16 | { 17 | Q_OBJECT 18 | 19 | public Q_SLOTS: 20 | void initTestCase(); 21 | void cleanupTestCase(); 22 | 23 | private Q_SLOTS: 24 | void size(); 25 | void position(); 26 | 27 | private: 28 | QQuickView *m_panel; 29 | QQuickView *m_panel2; 30 | QQuickView *m_panel3; 31 | QQuickItem *m_content; 32 | QQuickItem *m_content2; 33 | PlasmaQuick::Dialog *m_dialog; 34 | QDir m_cacheDir; 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /autotests/dialogqmltest.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2014 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | #ifndef DIALOGQMLTEST_H 7 | #define DIALOGQMLTEST_H 8 | 9 | #include 10 | 11 | #include "plasmaquick/dialog.h" 12 | 13 | class DialogQmlTest : public QObject 14 | { 15 | Q_OBJECT 16 | 17 | private Q_SLOTS: 18 | void loadAndShow(); 19 | 20 | private: 21 | bool m_dialogShown; 22 | }; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /autotests/dialogstatetest.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2016 Eike Hein 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | #ifndef DIALOGSTATETEST_H 7 | #define DIALOGSTATETEST_H 8 | 9 | #include 10 | 11 | #include "plasmaquick/dialog.h" 12 | 13 | class DialogStateTest : public QObject 14 | { 15 | Q_OBJECT 16 | 17 | public Q_SLOTS: 18 | void initTestCase(); 19 | void cleanupTestCase(); 20 | 21 | private Q_SLOTS: 22 | void windowState(); 23 | 24 | private: 25 | bool verifyState(PlasmaQuick::Dialog *dialog) const; 26 | 27 | PlasmaQuick::Dialog *m_dialog; 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /autotests/dummycontainmentaction.cpp: -------------------------------------------------------------------------------- 1 | #include "containmentactions.h" 2 | #include 3 | 4 | class DummyContainmentAction : public Plasma::ContainmentActions 5 | { 6 | Q_OBJECT 7 | 8 | public: 9 | explicit DummyContainmentAction(QObject *parent) 10 | : Plasma::ContainmentActions(parent) 11 | { 12 | } 13 | }; 14 | 15 | K_PLUGIN_CLASS_WITH_JSON(DummyContainmentAction, "dummycontainmentaction.json") 16 | 17 | #include "dummycontainmentaction.moc" 18 | -------------------------------------------------------------------------------- /autotests/dummycontainmentaction.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPlugin": { 3 | "Name": "DummyContainmentActions" 4 | }, 5 | "X-KDE-ParentApp": "plasma-shell" 6 | } 7 | -------------------------------------------------------------------------------- /autotests/i18ndcheck.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #If this test fails it means you are probably using i18n() in your QML code 4 | #This should be replaced by i18nd in order to for i18n to load the correct catalog 5 | 6 | #First arg should be the directory to check 7 | 8 | ! find "$1" -name '*.qml' -print0 | xargs -0 grep 'i18n[^d]*(' 9 | 10 | -------------------------------------------------------------------------------- /autotests/input/resizemodeitem.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.0 2 | Item { 3 | width: 200 4 | height: 200 5 | } 6 | -------------------------------------------------------------------------------- /autotests/plasma-test-appletsrc: -------------------------------------------------------------------------------- 1 | 2 | [Containments][1] 3 | formfactor=0 4 | immutability=1 5 | lastScreen=0 6 | location=0 7 | plugin=simplecontainment 8 | 9 | #those two applets are not ordered by id 10 | #but applets() should be ordered anyways 11 | [Containments][1][Applets][3] 12 | immutability=1 13 | plugin=simpleapplet 14 | 15 | [Containments][1][Applets][2] 16 | immutability=1 17 | plugin=invalid 18 | 19 | #empty panel: should emit complete even if empty 20 | [Containments][4] 21 | formfactor=2 22 | immutability=1 23 | lastScreen=0 24 | location=4 25 | plugin=simplecontainment 26 | 27 | #this is a desktop containment that even if has lastScreen=0 28 | #its screen will be -1: this is the case of a containment of 29 | #another activity, not the current one 30 | [Containments][5] 31 | formfactor=0 32 | immutability=1 33 | lastScreen=0 34 | location=0 35 | plugin=simplenoscreencontainment 36 | 37 | [General] 38 | immutability=1 39 | -------------------------------------------------------------------------------- /autotests/plasmoidpackagerc: -------------------------------------------------------------------------------- 1 | Type=Plasmoid 2 | 3 | [images] 4 | Path=images 5 | Name=Images 6 | Mimetypes=image/svg+xml,image/png,image/jpeg 7 | Directory=true 8 | 9 | [config] 10 | Path=config/xml 11 | Name=Configuration Definitions 12 | Mimetypes=text/xml 13 | Directory=true 14 | 15 | [configui] 16 | Path=config/ui 17 | Name=Configuration UI 18 | Mimetypes=text/xml 19 | Directory=true 20 | 21 | [scripts] 22 | Path=code 23 | Name=Executable Scripts 24 | Mimetypes=text/* 25 | Directory=true 26 | 27 | [mainconfiggui] 28 | Path=config/ui/main.ui 29 | Name=Main Config UI File 30 | 31 | [mainconfigxml] 32 | Path=config/ui/main.xml 33 | Name=Configuration XML File 34 | 35 | [mainscript] 36 | Path=code/main 37 | Name=Main Script File 38 | Required=true 39 | -------------------------------------------------------------------------------- /autotests/plasmoidpackagetest.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2007 Bertjan Broeksema 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef PACKAGETEST_H 8 | 9 | #include 10 | 11 | #include "plasma/package.h" 12 | #include "plasma/packagestructure.h" 13 | 14 | class PlasmoidPackageTest : public QObject 15 | { 16 | Q_OBJECT 17 | 18 | public Q_SLOTS: 19 | void initTestCase(); 20 | void init(); 21 | void cleanup(); 22 | 23 | private Q_SLOTS: 24 | void createAndInstallPackage(); 25 | void isValid(); 26 | void filePath(); 27 | void entryList(); 28 | 29 | void packageInstalled(KJob *j); 30 | void packageUninstalled(KJob *j); 31 | 32 | private: 33 | void createTestPackage(const QString &packageName); 34 | 35 | QString m_packageRoot; 36 | QString m_package; 37 | KJob *m_packageJob; 38 | Plasma::Package m_defaultPackage; 39 | Plasma::PackageStructure *m_defaultPackageStructure; 40 | }; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /autotests/pluginloadertest.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Sebastian Kügler 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #include "pluginloadertest.h" 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | 15 | #include 16 | 17 | QTEST_MAIN(PluginTest) 18 | 19 | PluginTest::PluginTest() 20 | { 21 | // To pick up the simpelcontianment dummy package 22 | qputenv("XDG_DATA_DIRS", QFINDTESTDATA("data/").toLocal8Bit().constData()); 23 | } 24 | 25 | void PluginTest::listContainmentActions() 26 | { 27 | const QList plugins = Plasma::PluginLoader::self()->listContainmentActionsMetaData(QStringLiteral("plasma-shell")); 28 | const bool pluginFound = std::any_of(plugins.begin(), plugins.end(), [](const KPluginMetaData &data) { 29 | return data.pluginId() == QLatin1String("dummycontainmentaction"); 30 | }); 31 | QVERIFY(pluginFound); 32 | } 33 | 34 | void PluginTest::listContainmentsOfType() 35 | { 36 | const QList plugins = Plasma::PluginLoader::listContainmentsMetaDataOfType(QStringLiteral("Desktop")); 37 | const bool pluginFound = std::any_of(plugins.begin(), plugins.end(), [](const KPluginMetaData &data) { 38 | return data.pluginId() == QLatin1String("simplecontainment"); 39 | }); 40 | QVERIFY(pluginFound); 41 | } 42 | 43 | #include "moc_pluginloadertest.cpp" 44 | -------------------------------------------------------------------------------- /autotests/pluginloadertest.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Sebastian Kügler 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef PLUGINLOADERTEST_H 8 | #define PLUGINLOADERTEST_H 9 | 10 | #include 11 | 12 | class PluginTest : public QObject 13 | { 14 | Q_OBJECT 15 | public: 16 | PluginTest(); 17 | 18 | private Q_SLOTS: 19 | void listContainmentActions(); 20 | void listContainmentsOfType(); 21 | }; 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /autotests/signed.plasmoid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/autotests/signed.plasmoid -------------------------------------------------------------------------------- /autotests/signed.plasmoid.invalid.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/autotests/signed.plasmoid.invalid.sig -------------------------------------------------------------------------------- /autotests/signed.plasmoid.sig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/autotests/signed.plasmoid.sig -------------------------------------------------------------------------------- /autotests/themetest.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2016 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | #ifndef THEMETEST_H 7 | #define THEMETEST_H 8 | 9 | #include 10 | 11 | #include "plasma/theme.h" 12 | 13 | class ThemeTest : public QObject 14 | { 15 | Q_OBJECT 16 | 17 | public Q_SLOTS: 18 | void initTestCase(); 19 | 20 | private Q_SLOTS: 21 | void testThemeConfig_data(); 22 | void testThemeConfig(); 23 | void testColors(); 24 | void testCompositingChange(); 25 | 26 | private: 27 | Plasma::Theme *m_theme; 28 | }; 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /docs/Doxyfile.local: -------------------------------------------------------------------------------- 1 | ### KApiDox Project-specific Overrides File 2 | 3 | # define so that deprecated API is not skipped 4 | PREDEFINED += \ 5 | "PLASMA_ENABLE_DEPRECATED_SINCE(x, y)=1" \ 6 | "PLASMA_BUILD_DEPRECATED_SINCE(x, y)=1" \ 7 | "PLASMA_DEPRECATED_VERSION(x, y, t)=" 8 | 9 | EXCLUDE_SYMBOLS = ToolTipDialog 10 | -------------------------------------------------------------------------------- /examples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | find_package(KF6Parts ${KF_DEP_VERSION} REQUIRED) 2 | set_package_properties(KF6Parts PROPERTIES PURPOSE "Required for examples") 3 | 4 | find_package(KF6WidgetsAddons ${KF_DEP_VERSION} REQUIRED) 5 | set_package_properties(KF6WidgetsAddons PROPERTIES PURPOSE "Required for examples") 6 | 7 | add_subdirectory(applets) 8 | add_subdirectory(containments) 9 | add_subdirectory(wallpapers) 10 | add_subdirectory(testcontainmentactionsplugin) 11 | add_subdirectory(developerguide) 12 | add_subdirectory(shell) 13 | -------------------------------------------------------------------------------- /examples/applets/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | plasma_install_package(bugreport org.kde.example.bugreport) 3 | plasma_install_package(compactrepresentation org.kde.example.compactrepresentation) 4 | plasma_install_package(config org.kde.example.configuration) 5 | plasma_install_package(helloworld org.kde.example.helloworld) 6 | plasma_install_package(notes org.kde.example.notes) 7 | plasma_install_package(testcomponents org.kde.example.testcomponents) 8 | plasma_install_package(testshaders org.kde.example.testshaders) 9 | plasma_install_package(widgetgallery org.kde.example.widgetgallery) 10 | -------------------------------------------------------------------------------- /examples/applets/config/contents/config/config.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Marco Martin 3 | SPDX-FileCopyrightText: 2023 ivan tkachenko 4 | 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | import QtQuick 9 | import org.kde.plasma.configuration 10 | 11 | ConfigModel { 12 | ConfigCategory { 13 | name: "General" 14 | icon: "plasma" 15 | source: "configGeneral.qml" 16 | } 17 | ConfigCategory { 18 | name: "Other page" 19 | icon: "konqueror" 20 | source: "configOther.qml" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /examples/applets/config/contents/config/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | true 11 | 12 | 13 | 14 | test 15 | 16 | 17 | 1 18 | -1 19 | 100 20 | 21 | 22 | 23 | 24 | 25 | 26 | test2 27 | 28 | 29 | Value2 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /examples/applets/config/contents/ui/configGeneral.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Marco Martin 3 | SPDX-FileCopyrightText: 2023 ivan tkachenko 4 | 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | import QtQuick 9 | import QtQuick.Controls as QQC2 10 | import org.kde.kirigami as Kirigami 11 | 12 | QQC2.Pane { 13 | id: root 14 | 15 | property alias cfg_BoolTest: testBoolConfigField.checked 16 | property alias cfg_Test: testConfigField.text 17 | property alias cfg_IntTest: intTestConfigField.value 18 | 19 | Kirigami.FormLayout { 20 | anchors.fill: parent 21 | 22 | QQC2.CheckBox { 23 | id: testBoolConfigField 24 | text: i18nc("@label example config", "Bool from config") 25 | Kirigami.FormData.label: i18nc("@label example config", "Bool Config value:") 26 | } 27 | QQC2.TextField { 28 | id: testConfigField 29 | placeholderText: i18nc("@label example config", "String test") 30 | Kirigami.FormData.label: i18nc("@label example config", "Text Config value:") 31 | } 32 | QQC2.SpinBox { 33 | id: intTestConfigField 34 | Kirigami.FormData.label: i18nc("@label example config", "Integer:") 35 | from: -1 36 | to: 100 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /examples/applets/config/contents/ui/configOther.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Marco Martin 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 8 | import QtQuick.Controls as QQC2 9 | 10 | Item { 11 | // TODO: How to fetch properties from another config group? 12 | } 13 | -------------------------------------------------------------------------------- /examples/applets/helloworld/contents/ui/main.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2012 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 8 | import QtQuick.Layouts 9 | import org.kde.kirigami as Kirigami 10 | import org.kde.plasma.plasmoid 11 | import org.kde.plasma.components as PlasmaComponents 12 | 13 | PlasmoidItem { 14 | Layout.minimumWidth: Kirigami.Units.gridUnit * 5 15 | Layout.minimumHeight: Kirigami.Units.gridUnit * 5 16 | 17 | implicitHeight: Kirigami.Units.gridUnit * 10 18 | implicitWidth: Kirigami.Units.gridUnit * 10 19 | 20 | PlasmaComponents.Label { 21 | anchors.fill: parent 22 | wrapMode: Text.Wrap 23 | text: i18n("Hello world") 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /examples/applets/notes/contents/config/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | Hello! 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /examples/applets/testcomponents/contents/images/bridge.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/examples/applets/testcomponents/contents/images/bridge.jpg -------------------------------------------------------------------------------- /examples/applets/testcomponents/contents/images/surfboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/examples/applets/testcomponents/contents/images/surfboard.jpg -------------------------------------------------------------------------------- /examples/applets/testcomponents/contents/ui/DialogContent.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Sebastian Kügler 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.0 8 | import QtQuick.Window 2.0 9 | 10 | import org.kde.plasma.components 2.0 as PlasmaComponents 11 | import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons 12 | import org.kde.kirigami 2 as Kirigami 13 | 14 | // DialogContent 15 | 16 | Item { 17 | id: dialogsPage 18 | width: 300 19 | height: 200 20 | signal closeMe() 21 | Rectangle { 22 | color: "green" 23 | //anchors.margins: 24 24 | opacity: 0 25 | anchors.fill: parent 26 | } 27 | Column { 28 | anchors.fill: parent 29 | spacing: 12 30 | Kirigami.Heading { 31 | id: tx 32 | level: 1 33 | text: "Test Dialog" 34 | } 35 | PlasmaComponents.TextArea { 36 | anchors { left: parent.left; right: parent.right; top: localeItem.bottom; } 37 | width: parent.width 38 | height: 80 39 | } 40 | PlasmaComponents.Button { 41 | id: thanks 42 | anchors { horizontalCenter: parent.horizontalCenter; bottom: parent.bottom; bottomMargin: 24; } 43 | iconSource: "dialog-ok" 44 | text: "Thanks." 45 | //onClicked: dialogsPage.parent.visible = false; 46 | onClicked: closeMe() 47 | } 48 | } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /examples/applets/testcomponents/contents/ui/DragItem.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Sebastian Kügler 3 | SPDX-FileCopyrightText: 2023 ivan tkachenko 4 | 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | import QtQuick 9 | 10 | import org.kde.kirigami as Kirigami 11 | import org.kde.plasma.components as PlasmaComponents 12 | 13 | import org.kde.draganddrop as DragAndDrop 14 | 15 | PlasmaComponents.ItemDelegate { 16 | id: control 17 | 18 | width: parent?.width ?? 0 19 | //height: _h * 1.5 20 | 21 | Kirigami.Icon { 22 | id: itemIcon 23 | 24 | width: _h 25 | height: width 26 | anchors.verticalCenter: parent.verticalCenter 27 | anchors.left: parent.left 28 | anchors.leftMargin: _h/2 29 | 30 | source: control.icon.name 31 | } 32 | 33 | PlasmaComponents.Label { 34 | id: label 35 | 36 | anchors { 37 | verticalCenter: parent.verticalCenter 38 | left: itemIcon.right 39 | leftMargin: _h/2 40 | right: parent.right 41 | rightMargin: _h/2 42 | } 43 | 44 | text: control.text 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /examples/applets/testcomponents/contents/ui/TestMenu.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Sebastian Kügler 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.0 8 | import org.kde.plasma.components 2.0 as PlasmaComponents 9 | import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons 10 | 11 | // PlasmoidPage 12 | 13 | PlasmaComponents.Menu { 14 | id: testMenu 15 | 16 | PlasmaComponents.MenuItem { 17 | text: "Red Snapper" 18 | icon: "dragonplayer" 19 | onClicked: print(" Clicked on : " + text) 20 | } 21 | 22 | PlasmaComponents.MenuItem { 23 | text: "Eel" 24 | icon: "kthesaurus" 25 | onClicked: print(" Clicked on : " + text) 26 | } 27 | 28 | PlasmaComponents.MenuItem { 29 | text: "White Tip Reef Shark" 30 | icon: "kmag" 31 | onClicked: print(" Clicked on : " + text) 32 | } 33 | 34 | Component.onCompleted:{ 35 | print("TestMenu.qml served .. opening"); 36 | 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /examples/applets/testshaders/contents/config/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 60 12 | 20 13 | 150 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/applets/testshaders/contents/images/elarun-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/examples/applets/testshaders/contents/images/elarun-small.png -------------------------------------------------------------------------------- /examples/applets/testshaders/contents/ui/ColorExample.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Sebastian Kügler 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.0 8 | 9 | ShaderExample { 10 | 11 | pageName: "Colors" 12 | pageDescription: "" 13 | 14 | ShaderEffect { 15 | anchors.fill: parent 16 | anchors.topMargin: 48 17 | opacity: 0.2 18 | 19 | fragmentShader: { 20 | "uniform mat4 gl_ModelViewMatrix;" + 21 | "uniform mat4 gl_ProjectionMatrix;" + 22 | //"attribute vec4 gl_Vertex;" + 23 | "void main(void) {" + 24 | " gl_FragColor = vec4(1.0, 0.0, 0.0, 0.3); " + 25 | " gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex; " + 26 | "}" 27 | } 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /examples/applets/testshaders/contents/ui/ShaderExample.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Sebastian Kügler 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.0 8 | 9 | import org.kde.plasma.components 2.0 as PlasmaComponents 10 | import org.kde.kirigami 2 as Kirigami 11 | 12 | // VertexPage 13 | 14 | PlasmaComponents.Page { 15 | id: examplesPage 16 | 17 | //property string shader 18 | property string pageName: "Shader Examples" 19 | property string pageDescription: "Shader Examples" 20 | property string icon: "weather-clear" 21 | 22 | anchors { 23 | fill: parent 24 | margins: _s 25 | } 26 | 27 | Kirigami.Heading { 28 | id: heading 29 | level: 1 30 | anchors { 31 | top: parent.top; 32 | left: parent.left 33 | right: parent.right 34 | } 35 | text: pageName 36 | } 37 | PlasmaComponents.Label { 38 | anchors { 39 | top: heading.bottom; 40 | left: parent.left; 41 | right: parent.right; 42 | } 43 | text: pageDescription 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /examples/applets/testshaders/contents/ui/SimpleExample.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Sebastian Kügler 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.0 8 | 9 | ShaderExample { 10 | 11 | pageName: "Simple" 12 | pageDescription: "Paints a red, translucent rectangle" 13 | 14 | ShaderEffect { 15 | anchors.fill: parent 16 | anchors.topMargin: 48 17 | opacity: 0.2 18 | 19 | fragmentShader: { " \ 20 | void main(void) { \ 21 | gl_FragColor = vec4(1.0, 0.0, 0.0, 0.3); \ 22 | } \ 23 | " 24 | } 25 | } 26 | } 27 | 28 | -------------------------------------------------------------------------------- /examples/applets/testshaders/contents/ui/config.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Sebastian Kügler 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.0 8 | // import org.kde.kirigami 2 as Kirigami 9 | 10 | Column { 11 | id: root 12 | //property alias cfg_Speed 13 | Rectangle { color: "green"; width: 200; height: 300; } 14 | // Kirigami.Heading { 15 | // text: "Applet Config:" 16 | // } 17 | } 18 | -------------------------------------------------------------------------------- /examples/applets/widgetgallery/contents/ui/main.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2011 Daker Fernandes Pinheiro 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.0 8 | import org.kde.plasma.plasmoid 2.0 9 | import QtQuick.Layouts 1.1 10 | import org.kde.plasma.components 2.0 11 | 12 | Item { 13 | Plasmoid.switchWidth: 300 14 | Plasmoid.switchHeight: 400 15 | 16 | Plasmoid.fullRepresentation: Item { 17 | Layout.minimumWidth: 300 18 | Layout.minimumHeight: 400 19 | 20 | ToolBar { 21 | id: toolBar 22 | z: 10 23 | anchors { 24 | top: parent.top 25 | left: parent.left 26 | right: parent.right 27 | } 28 | } 29 | 30 | PageStack { 31 | id: pageStack 32 | toolBar: toolBar 33 | clip: true 34 | anchors { 35 | top: toolBar.bottom 36 | left: parent.left 37 | right: parent.right 38 | bottom: parent.bottom 39 | } 40 | initialPage: Qt.createComponent("Menu.qml") 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /examples/applets/widgetgallery/contents/ui/standalonemain.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2011 Daker Fernandes Pinheiro 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.0 8 | import QtQuick.Layouts 1.1 9 | import org.kde.plasma.core 10 | import org.kde.plasma.components 2.0 11 | 12 | FrameSvgItem { 13 | width: 300 14 | height: 400 15 | imagePath: "widgets/background" 16 | 17 | 18 | ToolBar { 19 | id: toolBar 20 | z: 10 21 | 22 | anchors { 23 | top: parent.top 24 | left: parent.left 25 | right: parent.right 26 | margins: 10 27 | } 28 | } 29 | 30 | PageStack { 31 | id: pageStack 32 | toolBar: toolBar 33 | clip: true 34 | anchors { 35 | top: toolBar.bottom 36 | left: parent.left 37 | right: parent.right 38 | bottom: parent.bottom 39 | margins: 10 40 | } 41 | initialPage: Qt.createComponent("Menu.qml") 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /examples/applets/widgetgallery/widgetgallery-tablet: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export PLASMA_CUSTOM_PREFIX_PATHS=platformcontents/application/generic/:platformcontents/application/tablet/:contents/ 4 | 5 | plasmoidviewer -graphicssystem raster org.kde.example.widgetgallery 6 | -------------------------------------------------------------------------------- /examples/containments/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | plasma_install_package(testcontainment org.kde.example.testcontainment plasmoids containment) 3 | -------------------------------------------------------------------------------- /examples/containments/testcontainment/contents/ui/PlasmoidContainer.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2015 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.1 8 | 9 | Item { 10 | id: plasmoidContainer 11 | width: 300 12 | height: 300 13 | property Item applet 14 | } 15 | -------------------------------------------------------------------------------- /examples/containments/testcontainment/contents/ui/main.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Marco Martin 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.0 8 | 9 | import org.kde.plasma.components 2.0 as PlasmaComponents 10 | import org.kde.plasma.plasmoid 2.0 11 | 12 | Item { 13 | id: root 14 | width: 640 15 | height: 480 16 | 17 | property Item toolBox 18 | 19 | function addApplet(applet, x, y) { 20 | var component = Qt.createComponent("PlasmoidContainer.qml") 21 | var plasmoidContainer = component.createObject(root, {"x": x, "y": y}); 22 | 23 | plasmoidContainer.parent = root; 24 | plasmoidContainer.applet = applet 25 | applet.parent = plasmoidContainer 26 | applet.anchors.fill = plasmoidContainer 27 | applet.visible = true 28 | plasmoidContainer.visible = true 29 | 30 | } 31 | 32 | Containment.onAppletAdded: { 33 | addApplet(applet, x, y); 34 | } 35 | 36 | Component.onCompleted: { 37 | print("Test Containment loaded") 38 | print(plasmoid) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /examples/developerguide/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #plasma_install_package(basic org.kde.example.developerguide.basic) 2 | 3 | -------------------------------------------------------------------------------- /examples/shell/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(exampleplasmashell) 2 | 3 | target_sources(exampleplasmashell PRIVATE 4 | customcorona.cpp 5 | main.cpp 6 | ) 7 | 8 | target_link_libraries(exampleplasmashell 9 | Qt6::Widgets 10 | Qt6::Quick 11 | Qt6::Qml 12 | KF6::I18n 13 | Plasma::PlasmaQuick 14 | Plasma::Plasma 15 | KF6::DBusAddons 16 | KF6::Notifications 17 | KF6::Package 18 | ) 19 | 20 | -------------------------------------------------------------------------------- /examples/shell/customcorona.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2015 Marco Martin 3 | 4 | SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 5 | */ 6 | 7 | #ifndef CUSTOMCORONA_H 8 | #define CUSTOMCORONA_H 9 | 10 | #include 11 | #include 12 | 13 | class CustomCorona : public Plasma::Corona 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit CustomCorona(QObject *parent = nullptr); 19 | QRect screenGeometry(int id) const override; 20 | 21 | public Q_SLOTS: 22 | void load(); 23 | 24 | private: 25 | PlasmaQuick::ContainmentView *m_view; 26 | }; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /examples/shell/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2015 Marco Martin 3 | 4 | SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | #include 13 | 14 | #include "customcorona.h" 15 | 16 | int main(int argc, char **argv) 17 | { 18 | QQuickWindow::setDefaultAlphaBuffer(true); 19 | 20 | QApplication app(argc, argv); 21 | app.setApplicationVersion(QStringLiteral("1.0")); 22 | app.setOrganizationDomain(QStringLiteral("kde.org")); 23 | 24 | KDBusService service(KDBusService::Unique); 25 | 26 | QCommandLineParser parser; 27 | parser.setApplicationDescription(i18n("Plasma Example shell")); 28 | parser.addVersionOption(); 29 | parser.addHelpOption(); 30 | parser.process(app); 31 | 32 | CustomCorona *corona = new CustomCorona(); 33 | 34 | const int ret = app.exec(); 35 | delete corona; 36 | return ret; 37 | } 38 | -------------------------------------------------------------------------------- /examples/testcontainmentactionsplugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | remove_definitions(-DTRANSLATION_DOMAIN=\"libplasma6\") # Undo the global domain 2 | add_definitions(-DTRANSLATION_DOMAIN=\"plasma_containmentactions_test\") 3 | 4 | set(plasma_containmentactions_test_SRCS 5 | test.cpp 6 | test.h 7 | ) 8 | ki18n_wrap_ui(plasma_containmentactions_test_SRCS config.ui) 9 | 10 | kcoreaddons_add_plugin(plasma_containmentactions_test 11 | SOURCES ${plasma_containmentactions_test_SRCS} 12 | INSTALL_NAMESPACE "plasma/containmentactions" 13 | ) 14 | 15 | set_target_properties(plasma_containmentactions_test PROPERTIES 16 | OUTPUT_NAME org.kde.test 17 | ) 18 | 19 | target_link_libraries(plasma_containmentactions_test 20 | Qt::Widgets 21 | Plasma::Plasma 22 | KF6::I18n 23 | ) 24 | -------------------------------------------------------------------------------- /examples/testcontainmentactionsplugin/config.ui: -------------------------------------------------------------------------------- 1 | 2 | Config 3 | 4 | 5 | 6 | 0 7 | 0 8 | 355 9 | 100 10 | 11 | 12 | 13 | 14 | 15 | 16 | Text: 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /examples/testcontainmentactionsplugin/test.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2009 Chani Armitage 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #include "test.h" 8 | 9 | #include 10 | 11 | #include 12 | 13 | ContextTest::ContextTest(QObject *parent, const QVariantList &args) 14 | : Plasma::ContainmentActions(parent, args) 15 | { 16 | } 17 | 18 | QList ContextTest::contextualActions() 19 | { 20 | return {}; 21 | } 22 | 23 | void ContextTest::performNextAction() 24 | { 25 | qWarning() << "Next action requested"; 26 | } 27 | 28 | void ContextTest::performPreviousAction() 29 | { 30 | qWarning() << "Previous action requested"; 31 | } 32 | 33 | void ContextTest::init(const KConfigGroup &config) 34 | { 35 | Q_UNUSED(config) 36 | } 37 | 38 | QWidget *ContextTest::createConfigurationInterface(QWidget *parent) 39 | { 40 | QWidget *widget = new QWidget(parent); 41 | m_ui.setupUi(widget); 42 | 43 | m_ui.text->setText(m_text); 44 | return widget; 45 | } 46 | 47 | void ContextTest::configurationAccepted() 48 | { 49 | m_text = m_ui.text->text(); 50 | } 51 | 52 | void ContextTest::restore(const KConfigGroup &config) 53 | { 54 | m_text = config.readEntry("test-text", QString()); 55 | } 56 | 57 | void ContextTest::save(KConfigGroup &config) 58 | { 59 | config.writeEntry("test-text", m_text); 60 | } 61 | 62 | K_PLUGIN_CLASS_WITH_JSON(ContextTest, "plasma-containmentactions-test.json") 63 | 64 | #include "test.moc" 65 | 66 | #include "moc_test.cpp" 67 | -------------------------------------------------------------------------------- /examples/testcontainmentactionsplugin/test.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2009 Chani Armitage 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef CONTEXTTEST_HEADER 8 | #define CONTEXTTEST_HEADER 9 | 10 | #include "ui_config.h" 11 | #include 12 | #include 13 | 14 | class ContextTest : public Plasma::ContainmentActions 15 | { 16 | Q_OBJECT 17 | public: 18 | ContextTest(QObject *parent, const QVariantList &args); 19 | 20 | void init(const KConfigGroup &config); 21 | 22 | QList contextualActions() override; 23 | 24 | void performNextAction() override; 25 | void performPreviousAction() override; 26 | 27 | QWidget *createConfigurationInterface(QWidget *parent) override; 28 | void configurationAccepted() override; 29 | 30 | void restore(const KConfigGroup &config) override; 31 | void save(KConfigGroup &config) override; 32 | 33 | private: 34 | Ui::Config m_ui; 35 | QString m_text; 36 | }; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /examples/wallpapers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | plasma_install_package(autumn org.kde.autumn wallpapers wallpaper) 3 | -------------------------------------------------------------------------------- /examples/wallpapers/autumn/contents/config/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 60 12 | 20 13 | 150 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/wallpapers/autumn/contents/images/backgroundLeaves.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/examples/wallpapers/autumn/contents/images/backgroundLeaves.jpg -------------------------------------------------------------------------------- /examples/wallpapers/autumn/contents/images/realLeaf1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/examples/wallpapers/autumn/contents/images/realLeaf1.png -------------------------------------------------------------------------------- /examples/wallpapers/autumn/contents/images/realLeaf2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/examples/wallpapers/autumn/contents/images/realLeaf2.png -------------------------------------------------------------------------------- /examples/wallpapers/autumn/contents/images/realLeaf3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/examples/wallpapers/autumn/contents/images/realLeaf3.png -------------------------------------------------------------------------------- /examples/wallpapers/autumn/contents/images/realLeaf4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/examples/wallpapers/autumn/contents/images/realLeaf4.png -------------------------------------------------------------------------------- /examples/wallpapers/autumn/contents/ui/config.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Marco Martin 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 8 | import QtQuick.Controls as QtControls 9 | import org.kde.kirigami 2 as Kirigami 10 | 11 | Column { 12 | id: root 13 | property alias cfg_Speed: slider.value 14 | 15 | Row { 16 | spacing: Kirigami.Units.largeSpacing 17 | 18 | QtControls.Label { 19 | width: formAlignment - Kirigami.Units.largeSpacing * 2 20 | horizontalAlignment: Text.AlignRight 21 | text: "Speed:" 22 | } 23 | QtControls.Slider { 24 | id: slider 25 | from: .2 26 | to: 1.5 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /metainfo.yaml: -------------------------------------------------------------------------------- 1 | maintainer: mart 2 | description: Plugin based UI runtime used to write primary user interfaces 3 | tier: 3 4 | type: solution 5 | platforms: 6 | - name: Linux 7 | - name: FreeBSD 8 | portingAid: false 9 | deprecated: false 10 | release: true 11 | libraries: 12 | - cmake: KF6::Plasma 13 | - cmake: KF6::PlasmaQuick 14 | cmakename: KF6Plasma 15 | 16 | public_lib: true 17 | group: Frameworks 18 | subgroup: Tier 3 19 | -------------------------------------------------------------------------------- /po/lt/scripts/libplasma6/libplasma6.js: -------------------------------------------------------------------------------- 1 | function getProperty (prop, key) { 2 | return _dict_[key][prop]; 3 | } 4 | Ts.setcall("get-case", getProperty); 5 | 6 | function upperCaseFirstLetter(string) 7 | { 8 | return string.charAt(0).toUpperCase() + string.slice(1); 9 | } 10 | 11 | _dict_ = {}; 12 | function addDictCases (key, kil, gal) { 13 | if (!_dict_[key]) 14 | _dict_[key] = {}; 15 | _dict_[key]["vardininkas"] = key; 16 | _dict_[key]["kilmininkas"] = kil; 17 | _dict_[key]["galininkas"] = gal; 18 | _dict_[key]["Kilmininkas"] = upperCaseFirstLetter(kil) 19 | _dict_[key]["Galininkas"] = upperCaseFirstLetter(gal); 20 | } 21 | 22 | function dynamicSetCases (kil, gal) { 23 | addDictCases(Ts.msgstrf(), kil, gal); 24 | Ts.fallback(); 25 | } 26 | 27 | Ts.setcall("set-cases", dynamicSetCases); 28 | Ts.load("plasmoids") 29 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(desktoptheme) 2 | add_subdirectory(plasma) 3 | add_subdirectory(declarativeimports) 4 | add_subdirectory(plasmaquick) 5 | 6 | ecm_qt_install_logging_categories( 7 | EXPORT PLASMA 8 | FILE plasma-framework.categories 9 | DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR} 10 | ) 11 | -------------------------------------------------------------------------------- /src/Messages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Invoke the extractrc script on all .ui, .rc, and .kcfg files in the sources. 4 | # The results are stored in a pseudo .cpp file to be picked up by xgettext. 5 | lst=`find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` 6 | if [ -n "$lst" ] ; then 7 | $EXTRACTRC $lst >> rc.cpp 8 | fi 9 | 10 | # Run xgettext to extract strings from all source files. 11 | $XGETTEXT `find . -name \*.cpp -o -name \*.h -o -name \*.qml` -o $podir/libplasma6.pot 12 | -------------------------------------------------------------------------------- /src/declarativeimports/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(core) 2 | add_subdirectory(plasmaextracomponents) 3 | add_subdirectory(kirigamiplasmastyle) 4 | 5 | set(QQC2_VERSION "6.${Qt6Quick_VERSION_MINOR}") 6 | 7 | # Find all the source qml files 8 | FILE(GLOB_RECURSE inFiles RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" 9 | "${CMAKE_CURRENT_SOURCE_DIR}/plasmacomponents3/*") 10 | 11 | #for each file, replace @QQC2_VERSION@ with the version we found 12 | FOREACH(infileName ${inFiles}) 13 | configure_file( 14 | "${CMAKE_CURRENT_SOURCE_DIR}/${infileName}" 15 | "${CMAKE_CURRENT_BINARY_DIR}/${infileName}" 16 | @ONLY 17 | ) 18 | ENDFOREACH(infileName) 19 | 20 | ecm_add_qml_module(org_kde_plasmacomponents3 URI "org.kde.plasma.components" VERSION 3.0 NO_PLUGIN) 21 | file(GLOB _public_qml "${CMAKE_CURRENT_BINARY_DIR}/plasmacomponents3/*.qml") 22 | ecm_target_qml_sources(org_kde_plasmacomponents3 VERSION 3.0 SOURCES ${_public_qml}) 23 | file(GLOB _mobiletextselection_qml "${CMAKE_CURRENT_BINARY_DIR}/plasmacomponents3/mobiletextselection/*.qml" "${CMAKE_CURRENT_BINARY_DIR}/plasmacomponents3/mobiletextselection/qmldir") 24 | ecm_target_qml_sources(org_kde_plasmacomponents3 VERSION 3.0 PATH mobiletextselection SOURCES ${_mobiletextselection_qml}) 25 | file(GLOB _private_qml "${CMAKE_CURRENT_BINARY_DIR}/plasmacomponents3/private/*.qml") 26 | ecm_target_qml_sources(org_kde_plasmacomponents3 VERSION 3.0 PATH private SOURCES ${_private_qml}) 27 | ecm_finalize_qml_module(org_kde_plasmacomponents3 DESTINATION ${KDE_INSTALL_QMLDIR}) 28 | -------------------------------------------------------------------------------- /src/declarativeimports/core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(HAVE_X11 AND XCB_XCB_FOUND AND XCB_COMPOSITE_FOUND AND XCB_DAMAGE_FOUND) 2 | set(HAVE_XCB_COMPOSITE TRUE) 3 | else() 4 | set(HAVE_XCB_COMPOSITE FALSE) 5 | endif() 6 | 7 | configure_file(config-x11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-x11.h) 8 | 9 | ecm_add_qml_module(corebindingsplugin URI "org.kde.plasma.core") 10 | 11 | qt_add_resources(RESOURCES private/resources.qrc) 12 | 13 | target_sources(corebindingsplugin PRIVATE 14 | action.cpp 15 | corebindingsplugin.cpp 16 | quicktheme.cpp 17 | tooltip.cpp 18 | tooltipdialog.cpp 19 | windowthumbnail.cpp 20 | ${RESOURCES} 21 | ) 22 | 23 | target_link_libraries(corebindingsplugin PRIVATE 24 | Qt6::Quick 25 | Qt6::Qml 26 | Qt6::Widgets 27 | KF6::IconThemes 28 | KF6::I18n 29 | Qt6::Svg 30 | KF6::WindowSystem 31 | Plasma::Plasma 32 | Plasma::PlasmaQuick 33 | Wayland::Client 34 | ) 35 | 36 | if(HAVE_X11) 37 | target_link_libraries(corebindingsplugin PRIVATE ${X11_LIBRARIES} XCB::XCB Qt6::GuiPrivate) 38 | 39 | if(XCB_COMPOSITE_FOUND AND XCB_DAMAGE_FOUND) 40 | target_link_libraries(corebindingsplugin PRIVATE 41 | XCB::DAMAGE 42 | XCB::COMPOSITE 43 | ) 44 | endif() 45 | 46 | if(HAVE_GLX) 47 | target_link_libraries(corebindingsplugin PRIVATE OpenGL::GLX) 48 | endif() 49 | endif() 50 | 51 | if(HAVE_EGL) 52 | target_link_libraries(corebindingsplugin PRIVATE OpenGL::EGL) 53 | endif() 54 | 55 | ecm_finalize_qml_module(corebindingsplugin DESTINATION ${KDE_INSTALL_QMLDIR}) 56 | -------------------------------------------------------------------------------- /src/declarativeimports/core/Mainpage.dox: -------------------------------------------------------------------------------- 1 | /** @page core Plasma Core 2 | 3 |

import org.kde.plasma.core

4 | 5 | Uncreatable Types: 6 | - \link Plasma::Types Types \endlink 7 | - \link Units Units \endlink 8 | - \link Plasma::QuickTheme Theme \endlink 9 | 10 | Types: 11 | - \link Plasma::Svg Svg \endlink 12 | - \link Plasma::FrameSvg FrameSvg \endlink 13 | - \link Plasma::SvgItem SvgItem \endlink 14 | - \link Plasma::FrameSvgItem FrameSvgItem \endlink 15 | 16 | - \link ColorScope ColorScope \endlink 17 | 18 | - \link PlasmaQuick::Dialog Dialog \endlink 19 | - \link ToolTip ToolTipArea \endlink 20 | 21 | - \link Plasma::Service Service \endlink 22 | - \link Plasma::ServiceJob ServiceJob \endlink 23 | 24 | - \link Plasma::ServiceOperationStatus ServiceOperationStatus \endlink 25 | 26 | - \link IconItem IconItem \endlink 27 | 28 | - \link Plasma::WindowThumbnail WindowThumbnail \endlink 29 | 30 | */ 31 | 32 | // DOXYGEN_SET_PROJECT_NAME = PlasmaCore 33 | // vim:ts=4:sw=4:expandtab:filetype=doxygen 34 | -------------------------------------------------------------------------------- /src/declarativeimports/core/config-x11.h.cmake: -------------------------------------------------------------------------------- 1 | #cmakedefine01 HAVE_X11 2 | #cmakedefine01 HAVE_XCB_COMPOSITE 3 | #cmakedefine01 HAVE_XCB_SHAPE 4 | -------------------------------------------------------------------------------- /src/declarativeimports/core/corebindingsplugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2009 Alan Alpert 3 | SPDX-FileCopyrightText: 2010 Ménard Alexis 4 | SPDX-FileCopyrightText: 2010 Marco Martin 5 | SPDX-FileCopyrightText: 2013 Sebastian Kügler 6 | 7 | SPDX-License-Identifier: LGPL-2.0-or-later 8 | */ 9 | 10 | #ifndef COREBINDINGSPLUGIN_H 11 | #define COREBINDINGSPLUGIN_H 12 | 13 | #include 14 | #include 15 | 16 | class CoreBindingsPlugin : public QQmlExtensionPlugin 17 | { 18 | Q_OBJECT 19 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 20 | 21 | public: 22 | void initializeEngine(QQmlEngine *engine, const char *uri) override; 23 | void registerTypes(const char *uri) override; 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /src/declarativeimports/core/private/resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | DefaultToolTip.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/declarativeimports/core/tooltipdialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Sebastian Kügler 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | #ifndef TOOLTIPDIALOG_H 8 | #define TOOLTIPDIALOG_H 9 | 10 | #include "popupplasmawindow.h" 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | class QQuickItem; 17 | 18 | namespace PlasmaQuick 19 | { 20 | class SharedQmlEngine; 21 | } 22 | 23 | /** 24 | * Internally used by Tooltip 25 | */ 26 | class ToolTipDialog : public PlasmaQuick::PopupPlasmaWindow 27 | { 28 | Q_OBJECT 29 | 30 | public: 31 | explicit ToolTipDialog(); 32 | ~ToolTipDialog() override; 33 | 34 | QQuickItem *loadDefaultItem(); 35 | 36 | void dismiss(); 37 | void keepalive(); 38 | 39 | bool interactive(); 40 | void setInteractive(bool interactive); 41 | 42 | int hideTimeout() const; 43 | void setHideTimeout(int timeout); 44 | 45 | /** 46 | * Basically the last one who has shown the dialog 47 | */ 48 | QObject *owner() const; 49 | void setOwner(QObject *owner); 50 | 51 | protected: 52 | void showEvent(QShowEvent *event) override; 53 | void hideEvent(QHideEvent *event) override; 54 | bool event(QEvent *e) override; 55 | 56 | private Q_SLOTS: 57 | void valueChanged(const QVariant &value); 58 | 59 | private: 60 | void updateSize(); 61 | 62 | QPointer m_lastMainItem; 63 | PlasmaQuick::SharedQmlEngine *m_qmlObject; 64 | QTimer *m_showTimer; 65 | int m_hideTimeout; 66 | bool m_interactive; 67 | QObject *m_owner; 68 | }; 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /src/declarativeimports/kirigamiplasmastyle/AbstractApplicationHeader.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2016 Marco Martin 3 | SPDY-FileCopyrightText: 2020 Jonah Brüchert 4 | 5 | SPDX-License-Identifier: LGPL-2.0-or-later 6 | */ 7 | 8 | import QtQuick 2.5 9 | import org.kde.kirigami 2 as Kirigami 10 | 11 | import "../../templates" as T 12 | import "../../private" as KirigamiPrivate 13 | 14 | T.AbstractApplicationHeader { 15 | id: root 16 | 17 | Kirigami.Theme.inherit: false 18 | Kirigami.Theme.colorSet: Kirigami.Theme.Header 19 | 20 | background: Rectangle { 21 | color: Kirigami.Theme.backgroundColor 22 | KirigamiPrivate.EdgeShadow { 23 | radius: Kirigami.Units.gridUnit * 0.5 24 | visible: root.separatorVisible 25 | anchors { 26 | right: parent.right 27 | left: parent.left 28 | top: parent.bottom 29 | } 30 | edge: Qt.TopEdge 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/declarativeimports/kirigamiplasmastyle/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_library(KirigamiPlasmaStyle MODULE ${org.kde.desktop_SRCS}) 3 | 4 | target_sources(KirigamiPlasmaStyle PRIVATE 5 | plugin.cpp 6 | units.cpp 7 | plasmatheme.cpp 8 | ) 9 | 10 | target_link_libraries(KirigamiPlasmaStyle 11 | PUBLIC 12 | Qt6::Core 13 | KF6::KirigamiPlatform 14 | PRIVATE 15 | Qt6::Qml 16 | Qt6::Quick 17 | KF6::ConfigWidgets 18 | KF6::IconThemes 19 | Plasma::Plasma 20 | ) 21 | 22 | install(TARGETS KirigamiPlasmaStyle DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf6/kirigami/platform) 23 | 24 | install(FILES 25 | AbstractApplicationHeader.qml 26 | Icon.qml 27 | DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/kirigami/styles/Plasma 28 | ) 29 | -------------------------------------------------------------------------------- /src/declarativeimports/kirigamiplasmastyle/Icon.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2015 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.0 8 | import org.kde.kirigami 2.20 as Kirigami 9 | import org.kde.ksvg 1.0 as KSvg 10 | 11 | Kirigami.Icon { 12 | property bool selected: false 13 | property bool isMask: false 14 | //TODO: implement in libplasma 15 | property color color: "transparent" 16 | } 17 | -------------------------------------------------------------------------------- /src/declarativeimports/kirigamiplasmastyle/plasmatheme.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2023 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef PLASMATHEME_H 8 | #define PLASMATHEME_H 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | class KIconLoader; 20 | 21 | class PlasmaTheme : public Kirigami::Platform::PlatformTheme 22 | { 23 | Q_OBJECT 24 | 25 | public: 26 | explicit PlasmaTheme(QObject *parent = nullptr); 27 | ~PlasmaTheme() override; 28 | 29 | Q_INVOKABLE QIcon iconFromTheme(const QString &name, const QColor &customColor = Qt::transparent) override; 30 | 31 | void syncColors(); 32 | 33 | protected: 34 | bool event(QEvent *event) override; 35 | 36 | private: 37 | Plasma::Theme m_theme; 38 | }; 39 | 40 | #endif // PLASMATHEME_H 41 | -------------------------------------------------------------------------------- /src/declarativeimports/kirigamiplasmastyle/plugin.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2017 Marco Martin 3 | SPDX-FileCopyrightText: 2021 Arjen Hiemstra 4 | 5 | SPDX-License-Identifier: LGPL-2.0-or-later 6 | */ 7 | 8 | #include "plugin.h" 9 | #include "plasmatheme.h" 10 | #include "units.h" 11 | 12 | Plugin::Plugin(QObject *parent) 13 | : Kirigami::Platform::PlatformPluginFactory(parent) 14 | { 15 | } 16 | 17 | Plugin::~Plugin() = default; 18 | 19 | Kirigami::Platform::PlatformTheme *Plugin::createPlatformTheme(QObject *parent) 20 | { 21 | Q_UNUSED(parent); 22 | // TODO: Implement a proper C++ version of PlatformTheme. This relies on fallback 23 | // behaviour in Kirigami to load the Theme.qml file. 24 | return new PlasmaTheme(parent); 25 | } 26 | 27 | Kirigami::Platform::Units *Plugin::createUnits(QObject *parent) 28 | { 29 | Q_ASSERT(parent); 30 | return new Units(parent); 31 | } 32 | 33 | #include "moc_plugin.cpp" 34 | -------------------------------------------------------------------------------- /src/declarativeimports/kirigamiplasmastyle/plugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2017 Marco Martin 3 | SPDX-FileCopyrightText: 2021 Arjen Hiemstra 4 | 5 | SPDX-License-Identifier: LGPL-2.0-or-later 6 | */ 7 | 8 | #ifndef PLUGIN_H 9 | #define PLUGIN_H 10 | 11 | #include 12 | #include 13 | 14 | class Plugin : public Kirigami::Platform::PlatformPluginFactory 15 | { 16 | Q_OBJECT 17 | 18 | Q_PLUGIN_METADATA(IID PlatformPluginFactory_iid FILE "plugin.json") 19 | 20 | Q_INTERFACES(Kirigami::Platform::PlatformPluginFactory) 21 | 22 | public: 23 | explicit Plugin(QObject *parent = nullptr); 24 | ~Plugin() override; 25 | 26 | Kirigami::Platform::PlatformTheme *createPlatformTheme(QObject *parent) override; 27 | Kirigami::Platform::Units *createUnits(QObject *parent) override; 28 | }; 29 | 30 | #endif // PLUGIN_H 31 | -------------------------------------------------------------------------------- /src/declarativeimports/kirigamiplasmastyle/plugin.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /src/declarativeimports/kirigamiplasmastyle/units.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2021 Jonah Brüchert 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef KIRIGAMIPLASMADESKTOPUNITS_H 8 | #define KIRIGAMIPLASMADESKTOPUNITS_H 9 | 10 | #include 11 | 12 | #include 13 | 14 | #include 15 | 16 | class Units : public Kirigami::Platform::Units 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | explicit Units(QObject *parent = nullptr); 22 | 23 | void updateAnimationSpeed(); 24 | 25 | private: 26 | KConfigWatcher::Ptr m_animationSpeedWatcher; 27 | }; 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/AbstractButton.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Noah Davis 3 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 4 | */ 5 | import QtQuick.Templates @QQC2_VERSION@ as T 6 | 7 | T.AbstractButton { 8 | id: control 9 | 10 | implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, 11 | implicitContentWidth + leftPadding + rightPadding) 12 | implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, 13 | implicitContentHeight + topPadding + bottomPadding) 14 | } 15 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/Container.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2016 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.6 8 | import QtQuick.Templates @QQC2_VERSION@ as T 9 | 10 | T.Container { 11 | id: control 12 | 13 | implicitWidth: Math.max(background ? background.implicitWidth : 0, 14 | (contentItem ? contentItem.implicitWidth : 0) + leftPadding + rightPadding) 15 | implicitHeight: Math.max(background ? background.implicitHeight : 0, 16 | (contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding) 17 | } 18 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/Control.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2016 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.6 8 | import QtQuick.Templates @QQC2_VERSION@ as T 9 | 10 | T.Control { 11 | id: control 12 | 13 | implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, 14 | implicitContentWidth + leftPadding + rightPadding) 15 | implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, 16 | implicitContentHeight + topPadding + bottomPadding) 17 | } 18 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/DialogButtonBox.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2016 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.6 8 | import QtQuick.Templates @QQC2_VERSION@ as T 9 | import org.kde.kirigami 2 as Kirigami 10 | 11 | T.DialogButtonBox { 12 | id: control 13 | 14 | implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding 15 | implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding 16 | 17 | spacing: Kirigami.Units.smallSpacing 18 | leftPadding: parent instanceof T.Control ? parent.leftPadding : horizontalPadding 19 | topPadding: parent instanceof T.Control ? parent.topPadding : verticalPadding 20 | rightPadding: parent instanceof T.Control ? parent.rightPadding : horizontalPadding 21 | bottomPadding: parent instanceof T.Control ? parent.bottomPadding : verticalPadding 22 | alignment: Qt.AlignRight 23 | 24 | delegate: Button { 25 | width: Math.min(implicitWidth, control.width / control.count - control.rightPadding - control.spacing * (control.count-1)) 26 | } 27 | 28 | contentItem: ListView { 29 | implicitWidth: contentWidth 30 | implicitHeight: Kirigami.Units.gridUnit * 1.6 31 | 32 | model: control.contentModel 33 | spacing: control.spacing 34 | orientation: ListView.Horizontal 35 | boundsBehavior: Flickable.StopAtBounds 36 | snapMode: ListView.SnapToItem 37 | } 38 | 39 | background: Item {} 40 | } 41 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/Frame.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2016 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.6 8 | import QtQuick.Controls @QQC2_VERSION@ 9 | import QtQuick.Templates @QQC2_VERSION@ as T 10 | import org.kde.kirigami 2 as Kirigami 11 | import org.kde.ksvg 1.0 as KSvg 12 | //NOTE: importing PlasmaCore is necessary in order to make KSvg load the current Plasma Theme 13 | import org.kde.plasma.core 2 as PlasmaCore 14 | 15 | T.Frame { 16 | id: control 17 | 18 | implicitWidth: contentWidth + leftPadding + rightPadding 19 | implicitHeight: contentHeight + topPadding + bottomPadding 20 | 21 | contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) 22 | contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) 23 | 24 | padding: Kirigami.Units.smallSpacing 25 | 26 | background: KSvg.FrameSvgItem { 27 | imagePath: "widgets/frame" 28 | prefix: "plain" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/GroupBox.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2016 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.6 8 | import QtQuick.Controls @QQC2_VERSION@ 9 | import QtQuick.Templates @QQC2_VERSION@ as T 10 | import org.kde.ksvg 1.0 as KSvg 11 | //NOTE: importing PlasmaCore is necessary in order to make KSvg load the current Plasma Theme 12 | import org.kde.plasma.core 2 as PlasmaCore 13 | import org.kde.plasma.components 3.0 as PlasmaComponents3 14 | 15 | T.GroupBox { 16 | id: control 17 | 18 | implicitWidth: contentWidth + leftPadding + rightPadding 19 | implicitHeight: contentHeight + topPadding + bottomPadding 20 | 21 | contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0) 22 | contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0) 23 | 24 | padding: 6 25 | topPadding: padding + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0) 26 | 27 | label: PlasmaComponents3.Label { 28 | x: control.leftPadding 29 | width: control.availableWidth 30 | 31 | text: control.title 32 | font: control.font 33 | enabled: control.enabled 34 | elide: Text.ElideRight 35 | horizontalAlignment: Text.AlignLeft 36 | verticalAlignment: Text.AlignVCenter 37 | } 38 | 39 | background: KSvg.FrameSvgItem { 40 | imagePath: "widgets/frame" 41 | prefix: "plain" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/Label.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2016 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.1 8 | import QtQuick.Templates @QQC2_VERSION@ as T 9 | import org.kde.kirigami 2 as Kirigami 10 | 11 | T.Label { 12 | id: control 13 | 14 | // Work around Qt bug where left aligned text is not right aligned 15 | // in RTL mode unless horizontalAlignment is explicitly set. 16 | // https://bugreports.qt.io/browse/QTBUG-95873 17 | horizontalAlignment: Text.AlignLeft 18 | 19 | activeFocusOnTab: false 20 | 21 | //font data is the system one by default 22 | color: Kirigami.Theme.textColor 23 | linkColor: Kirigami.Theme.linkColor 24 | 25 | opacity: enabled ? 1 : 0.6 26 | 27 | Accessible.role: Accessible.StaticText 28 | Accessible.name: text 29 | } 30 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/MenuSeparator.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2017 The Qt Company Ltd. 3 | SPDX-FileCopyrightText: 2019 Alexander Stippich 4 | SPDX-FileCopyrightText: 2021 Noah Davis 5 | 6 | SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-or-later 7 | */ 8 | 9 | 10 | import QtQuick 2.15 11 | import QtQuick.Templates @QQC2_VERSION@ as T 12 | import org.kde.kirigami 2 as Kirigami 13 | 14 | T.MenuSeparator { 15 | id: controlRoot 16 | implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, 17 | implicitContentWidth + leftPadding + rightPadding) 18 | implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, 19 | implicitContentHeight + topPadding + bottomPadding) 20 | verticalPadding: Math.round(Kirigami.Units.smallSpacing / 2) 21 | hoverEnabled: false 22 | focusPolicy: Qt.NoFocus 23 | contentItem: Rectangle { 24 | // same as MenuItem background 25 | implicitWidth: Kirigami.Units.gridUnit * 8 26 | implicitHeight: 1 27 | color: Kirigami.Theme.textColor 28 | opacity: 0.2 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/Page.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2020 Niccolò Venerandi 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.6 8 | import QtQuick.Templates @QQC2_VERSION@ as T 9 | 10 | T.Page { 11 | implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, 12 | contentWidth + leftPadding + rightPadding, 13 | implicitHeaderWidth, 14 | implicitFooterWidth) 15 | implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, 16 | contentHeight + topPadding + bottomPadding 17 | + (implicitHeaderHeight > 0 ? implicitHeaderHeight + spacing : 0) 18 | + (implicitFooterHeight > 0 ? implicitFooterHeight + spacing : 0)) 19 | } 20 | 21 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/PageIndicator.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2018 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.6 8 | import QtQuick.Layouts 1.2 9 | import QtQuick.Templates @QQC2_VERSION@ as T 10 | import org.kde.kirigami 2 as Kirigami 11 | 12 | T.PageIndicator { 13 | id: control 14 | 15 | implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding 16 | implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding 17 | 18 | padding: Kirigami.Units.smallSpacing 19 | spacing: Kirigami.Units.smallSpacing 20 | 21 | delegate: Rectangle { 22 | implicitWidth: Kirigami.Units.largeSpacing 23 | implicitHeight: implicitWidth 24 | 25 | radius: width 26 | color: Kirigami.Theme.textColor 27 | 28 | opacity: index === currentIndex ? 0.9 : pressed ? 0.7 : 0.5 29 | Behavior on opacity { 30 | OpacityAnimator { 31 | duration: Kirigami.Units.longDuration 32 | easing.type: Easing.InOutQuad 33 | } 34 | } 35 | } 36 | 37 | contentItem: Row { 38 | spacing: control.spacing 39 | 40 | Repeater { 41 | model: control.count 42 | delegate: control.delegate 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/Pane.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Noah Davis 3 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 4 | */ 5 | 6 | import QtQuick.Templates @QQC2_VERSION@ as T 7 | 8 | T.Pane { 9 | id: control 10 | 11 | implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, 12 | contentWidth + leftPadding + rightPadding) 13 | implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, 14 | contentHeight + topPadding + bottomPadding) 15 | 16 | //TODO: Add background? 17 | } 18 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/README.md: -------------------------------------------------------------------------------- 1 | Plasma Components 3 is a style for QtQuick Controls 2. 2 | 3 | It is exported as an import so users can force a theme, but it is also available just as a style. 4 | 5 | This folder should only contain inherited templates from QQC2 desktop themes. There should be no new Components or properties. 6 | 7 | New API should be in either upstream QQC2 itself, PlasmaExtras, or Kirigami. 8 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/SwipeView.qml: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2016 Marco Martin 2 | // SPDX-License-Identifier: LGPL-2.0-or-later 3 | 4 | import QtQuick 2.6 5 | import QtQuick.Templates @QQC2_VERSION@ as T 6 | import org.kde.kirigami 2 as Kirigami 7 | 8 | T.SwipeView { 9 | id: control 10 | implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, 11 | implicitContentWidth + leftPadding + rightPadding) 12 | implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, 13 | implicitContentHeight + topPadding + bottomPadding) 14 | 15 | 16 | contentItem: ListView { 17 | model: control.contentModel 18 | interactive: control.interactive 19 | currentIndex: control.currentIndex 20 | focus: control.focus 21 | 22 | spacing: control.spacing 23 | orientation: control.orientation 24 | snapMode: ListView.SnapOneItem 25 | boundsBehavior: Flickable.StopAtBounds 26 | 27 | highlightRangeMode: ListView.StrictlyEnforceRange 28 | preferredHighlightBegin: 0 29 | preferredHighlightEnd: 0 30 | highlightMoveDuration: Kirigami.Units.longDuration 31 | maximumFlickVelocity: 4 * (control.orientation === Qt.Horizontal ? width : height) 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/TabBar.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2016 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.6 8 | import QtQuick.Templates @QQC2_VERSION@ as T 9 | import org.kde.ksvg 1.0 as KSvg 10 | //NOTE: importing PlasmaCore is necessary in order to make KSvg load the current Plasma Theme 11 | import org.kde.plasma.core 2 as PlasmaCore 12 | import org.kde.kirigami 2 as Kirigami 13 | 14 | T.TabBar { 15 | id: control 16 | 17 | implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset, 18 | contentWidth + leftPadding + rightPadding) 19 | implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, 20 | contentHeight + topPadding + bottomPadding) 21 | 22 | spacing: 0 23 | 24 | contentItem: ListView { 25 | implicitWidth: contentWidth 26 | implicitHeight: contentHeight 27 | 28 | model: control.contentModel 29 | currentIndex: control.currentIndex 30 | 31 | spacing: control.spacing 32 | orientation: ListView.Horizontal 33 | boundsBehavior: Flickable.StopAtBounds 34 | flickableDirection: Flickable.AutoFlickIfNeeded 35 | snapMode: ListView.SnapToItem 36 | 37 | highlightMoveDuration: Kirigami.Units.longDuration 38 | highlightRangeMode: ListView.ApplyRange 39 | preferredHighlightBegin: 40 40 | preferredHighlightEnd: width - 40 41 | highlightResizeDuration: 0 42 | highlight: KSvg.FrameSvgItem { 43 | imagePath: "widgets/tabbar" 44 | prefix: control.position == T.TabBar.Header ? "north-active-tab" : "south-active-tab" 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/mobiletextselection/MobileTextActionsToolBar.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2023 Fushan Wen 3 | 4 | SPDX-License-Identifier: LGPL-2.1-or-later 5 | */ 6 | 7 | pragma Singleton 8 | 9 | import QtQuick 10 | import org.kde.kirigami as Kirigami 11 | 12 | Loader { 13 | property Item controlRoot: null 14 | property bool shouldBeVisible: false 15 | 16 | active: controlRoot ? shouldBeVisible && Kirigami.Settings.tabletMode && (controlRoot.selectedText.length > 0 || controlRoot.canPaste) : false 17 | source: "MobileTextActionsToolBarImpl.qml" 18 | } 19 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/mobiletextselection/qmldir: -------------------------------------------------------------------------------- 1 | 2 | singleton MobileTextActionsToolBar 1.0 MobileTextActionsToolBar.qml 3 | MobileCursor 1.0 MobileCursor.qml 4 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/private/ButtonBackground.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Noah Davis 3 | * SPDX-License-Identifier: LGPL-2.0-or-later 4 | */ 5 | 6 | import QtQuick 2.6 7 | import org.kde.kirigami 2 as Kirigami 8 | 9 | Item { 10 | id: root 11 | // These should be used as the padding for the parent control 12 | property real leftMargin: loader.item.leftMargin 13 | property real topMargin: loader.item.topMargin 14 | property real rightMargin: loader.item.rightMargin 15 | property real bottomMargin: loader.item.bottomMargin 16 | 17 | implicitWidth: Kirigami.Units.gridUnit + root.leftMargin + root.rightMargin 18 | implicitHeight: Kirigami.Units.gridUnit + root.topMargin + root.bottomMargin 19 | 20 | opacity: enabled ? 1 : 0.5 21 | layer.enabled: opacity < 1 22 | 23 | Loader { 24 | id: loader 25 | anchors.fill: parent 26 | sourceComponent: root.parent.flat ? flatButtonBackground : raisedButtonBackground 27 | } 28 | 29 | Component { 30 | id: flatButtonBackground 31 | FlatButtonBackground { 32 | anchors.fill: parent 33 | hovered: root.parent.hovered 34 | pressed: root.parent.down 35 | checked: root.parent.checked 36 | focused: root.parent.visualFocus 37 | } 38 | } 39 | 40 | Component { 41 | id: raisedButtonBackground 42 | RaisedButtonBackground { 43 | anchors.fill: parent 44 | hovered: root.parent.hovered 45 | pressed: root.parent.down 46 | checked: root.parent.checked 47 | focused: root.parent.visualFocus 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/private/ButtonFocus.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Noah Davis 3 | * SPDX-License-Identifier: LGPL-2.0-or-later 4 | */ 5 | 6 | import QtQuick 2.12 7 | import org.kde.ksvg 1.0 as KSvg 8 | import org.kde.kirigami 2 as Kirigami 9 | 10 | KSvg.FrameSvgItem { 11 | anchors { 12 | fill: parent 13 | leftMargin: -margins.left 14 | topMargin: -margins.top 15 | rightMargin: -margins.right 16 | bottomMargin: -margins.bottom 17 | } 18 | 19 | property bool showFocus: false 20 | property bool flat: false 21 | 22 | imagePath: "widgets/button" 23 | prefix: flat ? ["toolbutton-focus", "focus"] : "focus" 24 | 25 | opacity: showFocus ? 1 : 0 26 | Behavior on opacity { OpacityAnimator { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutQuad } } 27 | } 28 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/private/ButtonHover.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Noah Davis 3 | * SPDX-License-Identifier: LGPL-2.0-or-later 4 | */ 5 | 6 | import QtQuick 2.12 7 | import org.kde.ksvg 1.0 as KSvg 8 | 9 | KSvg.FrameSvgItem { 10 | property bool showHover: false 11 | 12 | anchors { 13 | fill: parent 14 | leftMargin: -margins.left 15 | topMargin: -margins.top 16 | rightMargin: -margins.right 17 | bottomMargin: -margins.bottom 18 | } 19 | imagePath: "widgets/button" 20 | prefix: "hover" 21 | 22 | visible: showHover ? 1 : 0 23 | } 24 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/private/ButtonShadow.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2011 Daker Fernandes Pinheiro 3 | SPDX-FileCopyrightText: 2011 Marco Martin 4 | SPDX-FileCopyrightText: 2020 Noah Davis 5 | 6 | SPDX-License-Identifier: LGPL-2.0-or-later 7 | */ 8 | 9 | import QtQuick 2.12 10 | import org.kde.ksvg 1.0 as KSvg 11 | import org.kde.kirigami 2 as Kirigami 12 | 13 | KSvg.FrameSvgItem { 14 | id: shadowEffect 15 | 16 | property bool showShadow 17 | 18 | anchors { 19 | fill: parent 20 | leftMargin: -margins.left 21 | topMargin: -margins.top 22 | rightMargin: -margins.right 23 | bottomMargin: -margins.bottom 24 | } 25 | imagePath: "widgets/button" 26 | prefix: "shadow" 27 | 28 | opacity: showShadow ? 1 : 0 29 | Behavior on opacity { OpacityAnimator { duration: Kirigami.Units.shortDuration; easing.type: Easing.OutQuad } } 30 | } 31 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/private/DefaultListItemBackground.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2016 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.1 8 | //for Settings 9 | import org.kde.ksvg 1.0 as KSvg 10 | import org.kde.kirigami 2 as Kirigami 11 | 12 | KSvg.FrameSvgItem { 13 | id: background 14 | 15 | imagePath: "widgets/listitem" 16 | prefix: control.highlighted || control.pressed ? "pressed" : "normal" 17 | 18 | visible: control.ListView.view ? control.ListView.view.highlight === null : true 19 | 20 | KSvg.FrameSvgItem { 21 | imagePath: "widgets/listitem" 22 | visible: !Kirigami.Settings.isMobile 23 | prefix: "hover" 24 | anchors.fill: parent 25 | opacity: control.hovered && !control.pressed ? 1 : 0 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/private/qmldir: -------------------------------------------------------------------------------- 1 | internal ButtonBackground ButtonBackground.qml 2 | internal ButtonFocus ButtonFocus.qml 3 | internal ButtonHoverFocus ButtonHoverFocus.qml 4 | internal ButtonShadow ButtonShadow.qml 5 | internal DefaultListItemBackground DefaultListItemBackground.qml 6 | internal FlatButtonBackground FlatButtonBackground.qml 7 | internal IconLabel IconLabel.qml 8 | internal RaisedButtonBackground RaisedButtonBackground.qml 9 | internal RoundShadow RoundShadow.qml 10 | internal TextFieldFocus TextFieldFocus.qml 11 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmacomponents3/qmldir: -------------------------------------------------------------------------------- 1 | module org.kde.plasma.components 2 | 3 | AbstractButton 3.0 AbstractButton.qml 4 | BusyIndicator 3.0 BusyIndicator.qml 5 | Button 3.0 Button.qml 6 | CheckBox 3.0 CheckBox.qml 7 | CheckDelegate 3.0 CheckDelegate.qml 8 | ComboBox 3.0 ComboBox.qml 9 | Container 3.0 Container.qml 10 | Control 3.0 Control.qml 11 | Dial 3.0 Dial.qml 12 | Drawer 3.0 Drawer.qml 13 | Frame 3.0 Frame.qml 14 | GroupBox 3.0 GroupBox.qml 15 | ItemDelegate 3.0 ItemDelegate.qml 16 | Label 3.0 Label.qml 17 | MenuItem 3.0 MenuItem.qml 18 | Menu 3.0 Menu.qml 19 | MenuSeparator 3.0 MenuSeparator.qml 20 | Pane 3.0 Pane.qml 21 | Popup 3.0 Popup.qml 22 | ProgressBar 3.0 ProgressBar.qml 23 | RadioButton 3.0 RadioButton.qml 24 | RadioDelegate 3.0 RadioDelegate.qml 25 | RangeSlider 3.0 RangeSlider.qml 26 | ScrollBar 3.0 ScrollBar.qml 27 | ScrollView 3.0 ScrollView.qml 28 | Slider 3.0 Slider.qml 29 | SpinBox 3.0 SpinBox.qml 30 | SwipeView 3.0 SwipeView.qml 31 | SwitchDelegate 3.0 SwitchDelegate.qml 32 | Switch 3.0 Switch.qml 33 | TabBar 3.0 TabBar.qml 34 | TabButton 3.0 TabButton.qml 35 | TextArea 3.0 TextArea.qml 36 | TextField 3.0 TextField.qml 37 | ToolBar 3.0 ToolBar.qml 38 | ToolButton 3.0 ToolButton.qml 39 | ToolTip 3.0 ToolTip.qml 40 | RoundButton 3.0 RoundButton.qml 41 | Page 3.0 Page.qml 42 | PageIndicator 3.0 PageIndicator.qml 43 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmaextracomponents/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ecm_add_qml_module(plasmaextracomponentsplugin VERSION 2.0 URI "org.kde.plasma.extras" GENERATE_PLUGIN_SOURCE) 2 | 3 | target_sources(plasmaextracomponentsplugin PRIVATE 4 | qmenu.cpp 5 | qmenuitem.cpp 6 | ) 7 | 8 | ecm_target_qml_sources(plasmaextracomponentsplugin SOURCES 9 | qml/ActionTextField.qml 10 | qml/BasicPlasmoidHeading.qml 11 | qml/DescriptiveLabel.qml 12 | qml/ExpandableListItem.qml 13 | qml/Heading.qml 14 | qml/Highlight.qml 15 | qml/ListItem.qml 16 | qml/ModelContextMenu.qml 17 | qml/PasswordField.qml 18 | qml/PlaceholderMessage.qml 19 | qml/PlasmoidHeading.qml 20 | qml/Representation.qml 21 | qml/SearchField.qml 22 | qml/ShadowedLabel.qml 23 | ) 24 | 25 | ecm_target_qml_sources(plasmaextracomponentsplugin PATH animations SOURCES 26 | qml/animations/ActivateAnimation.qml 27 | qml/animations/AppearAnimation.qml 28 | qml/animations/DisappearAnimation.qml 29 | qml/animations/PressedAnimation.qml 30 | qml/animations/ReleasedAnimation.qml 31 | ) 32 | 33 | ecm_target_qml_sources(plasmaextracomponentsplugin PRIVATE PATH private SOURCES 34 | qml/private/BackgroundMetrics.qml 35 | ) 36 | 37 | target_link_libraries(plasmaextracomponentsplugin PRIVATE 38 | Qt6::Quick 39 | Qt6::Qml 40 | Qt6::Widgets 41 | KF6::ConfigWidgets 42 | Plasma::Plasma) 43 | 44 | ecm_finalize_qml_module(plasmaextracomponentsplugin DESTINATION ${KDE_INSTALL_QMLDIR}) 45 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmaextracomponents/Mainpage.dox: -------------------------------------------------------------------------------- 1 | /** @page plasmaextracomponents Plasma Extra Components 2 | 3 |

import org.kde.plasma.extras

4 | 5 | Heading 6 | - \link org::kde::plasma::extras::BasicPlasmoidHeading BasicPlasmoidHeading \endlink 7 | - \link org::kde::plasma::extras::PlasmoidHeading PlasmoidHeading \endlink 8 | 9 | List views 10 | - \link org::kde::plasma::extras::ExpandableListItem ExpandableListItem \endlink 11 | - \link org::kde::plasma::extras::ListItem ListItem \endlink 12 | - \link org::kde::plasma::extras::Highlight Highlight \endlink 13 | - \link org::kde::plasma::extras::PlaceholderMessage PlaceholderMessage \endlink 14 | 15 | Text formatting 16 | - \link org::kde::plasma::extras::Heading Heading \endlink 17 | - \link org::kde::plasma::extras::Title Title \endlink 18 | 19 | Animations 20 | - \link org::kde::plasma::extras::ActivateAnimation ActivateAnimation \endlink 21 | - \link org::kde::plasma::extras::AppearAnimation AppearAnimation \endlink 22 | - \link org::kde::plasma::extras::PressedAnimation PressedAnimation \endlink 23 | - \link org::kde::plasma::extras::ReleasedAnimation ReleasedAnimation \endlink 24 | 25 | Obsolete components 26 | - \link org::kde::plasma::extras::App App \endlink 27 | - \link org::kde::plasma::extras::PageRow PageRow \endlink 28 | - \link org::kde::plasma::extras::ScrollArea ScrollArea \endlink 29 | - \link FallbackComponent FallbackComponent \endlink 30 | 31 | */ 32 | 33 | // DOXYGEN_SET_PROJECT_NAME = PlasmaExtraComponents 34 | // vim:ts=4:sw=4:expandtab:filetype=doxygen 35 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmaextracomponents/qml/DescriptiveLabel.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2012 Sebastian Kügler 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.0 8 | import org.kde.plasma.components 3.0 9 | 10 | /** 11 | * This is a descriptive label which uses the plasma theme. The characteristics of 12 | * the text will be automatically set according to the plasma theme. Use this 13 | * components for less important additional data to show in a user interface. 14 | * 15 | * Example usage: 16 | * @code 17 | * import org.kde.plasma.extras 2.0 as PlasmaExtras 18 | * [...] 19 | * Column { 20 | * PlasmaComponents.Label { text: "Firefox" } 21 | * PlasmaExtras.DescriptiveLabel { text: "Web Browser"} 22 | * [...] 23 | * } 24 | * @endcode 25 | * 26 | * See PlasmaComponents Label and primitive QML Text element API for additional 27 | * properties, methods and signals. 28 | * 29 | * @inherits org::kde::plasma::components::Label 30 | */ 31 | Label { 32 | id: root 33 | 34 | /* 35 | * If a user can interact with this item, for example in a ListView delegate, this 36 | * property should be set to true when the label is being interacted with. 37 | * The default is false. 38 | */ 39 | property bool active: false 40 | 41 | opacity: active ? 0.8 : 0.6 42 | } 43 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmaextracomponents/qml/animations/ActivateAnimation.qml: -------------------------------------------------------------------------------- 1 | // -*- coding: iso-8859-1 -*- 2 | /* 3 | SPDX-FileCopyrightText: 2011 Sebastian Kügler 4 | 5 | SPDX-License-Identifier: LGPL-2.0-or-later 6 | */ 7 | 8 | import QtQuick 2.0 9 | import org.kde.kirigami 2 as Kirigami 10 | 11 | SequentialAnimation { 12 | id: activateAnimation 13 | objectName: "activateAnimation" 14 | 15 | property Item targetItem 16 | property int duration: Kirigami.Units.shortDuration 17 | 18 | // Fast scaling while we're animation == more FPS 19 | ScriptAction { script: targetItem.smooth = false } 20 | 21 | PressedAnimation { targetItem: activateAnimation.targetItem } 22 | ReleasedAnimation { targetItem: activateAnimation.targetItem } 23 | 24 | ScriptAction { script: targetItem.smooth = true } 25 | } 26 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmaextracomponents/qml/animations/AppearAnimation.qml: -------------------------------------------------------------------------------- 1 | // -*- coding: iso-8859-1 -*- 2 | /* 3 | SPDX-FileCopyrightText: 2011 Sebastian Kügler 4 | 5 | SPDX-License-Identifier: LGPL-2.0-or-later 6 | */ 7 | 8 | import QtQuick 2.2 9 | import org.kde.kirigami 2 as Kirigami 10 | 11 | SequentialAnimation { 12 | id: appearAnimation 13 | objectName: "appearAnimation" 14 | 15 | property Item targetItem 16 | property int duration: Kirigami.Units.longDuration 17 | 18 | // Animators run on the render thread so they kick in slightly delayed 19 | // so explicitly set the item's opacity to 0 before starting the animation 20 | ScriptAction { 21 | script: { 22 | targetItem.opacity = 0 23 | } 24 | } 25 | 26 | ParallelAnimation { 27 | OpacityAnimator { 28 | target: targetItem 29 | from: 0 30 | to: 1.0 31 | duration: appearAnimation.duration 32 | easing.type: Easing.InExpo 33 | } 34 | ScaleAnimator { 35 | target: targetItem 36 | from: 0.8 37 | to: 1.0 38 | duration: appearAnimation.duration 39 | easing.type: Easing.InExpo 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmaextracomponents/qml/animations/DisappearAnimation.qml: -------------------------------------------------------------------------------- 1 | // -*- coding: iso-8859-1 -*- 2 | /* 3 | SPDX-FileCopyrightText: 2011 Sebastian Kügler 4 | 5 | SPDX-License-Identifier: LGPL-2.0-or-later 6 | */ 7 | 8 | import QtQuick 2.2 9 | import org.kde.kirigami 2 as Kirigami 10 | 11 | SequentialAnimation { 12 | id: disappearAnimation 13 | objectName: "disappearAnimation" 14 | 15 | property Item targetItem 16 | property int duration: Kirigami.Units.longDuration 17 | 18 | ParallelAnimation { 19 | OpacityAnimator { 20 | duration: disappearAnimation.duration 21 | from: 1.0 22 | to: 0 23 | target: disappearAnimation.targetItem 24 | easing.type: Easing.OutExpo 25 | } 26 | ScaleAnimator { 27 | target: disappearAnimation.targetItem 28 | from: 1.0 29 | to: 0.8 30 | duration: disappearAnimation.duration * 0.6 31 | easing.type: Easing.OutExpo 32 | } 33 | } 34 | 35 | ScriptAction { 36 | script: { 37 | targetItem.visible = false; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmaextracomponents/qml/animations/PressedAnimation.qml: -------------------------------------------------------------------------------- 1 | // -*- coding: iso-8859-1 -*- 2 | /* 3 | SPDX-FileCopyrightText: 2011 Sebastian Kügler 4 | 5 | SPDX-License-Identifier: LGPL-2.0-or-later 6 | */ 7 | 8 | import QtQuick 2.0 9 | import org.kde.kirigami 2 as Kirigami 10 | 11 | SequentialAnimation { 12 | id: pressedAnimation 13 | objectName: "pressedAnimation" 14 | 15 | property Item targetItem 16 | property int duration: Kirigami.Units.shortDuration 17 | 18 | // Fast scaling while we're animation == more FPS 19 | ScriptAction { script: targetItem.smooth = false } 20 | 21 | ParallelAnimation { 22 | PropertyAnimation { 23 | target: targetItem 24 | properties: "opacity" 25 | from: 1.0; to: 0.8 26 | duration: pressedAnimation.duration; 27 | easing.type: Easing.OutExpo; 28 | } 29 | PropertyAnimation { 30 | target: targetItem 31 | properties: "scale" 32 | from: 1.0; to: 0.95 33 | duration: pressedAnimation.duration; 34 | easing.type: Easing.OutExpo; 35 | } 36 | } 37 | ScriptAction { script: targetItem.smooth = true } 38 | } 39 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmaextracomponents/qml/animations/ReleasedAnimation.qml: -------------------------------------------------------------------------------- 1 | // -*- coding: iso-8859-1 -*- 2 | /* 3 | SPDX-FileCopyrightText: 2011 Sebastian Kügler 4 | 5 | SPDX-License-Identifier: LGPL-2.0-or-later 6 | */ 7 | 8 | import QtQuick 2.0 9 | import org.kde.kirigami 2 as Kirigami 10 | 11 | SequentialAnimation { 12 | id: releasedAnimation 13 | objectName: "releasedAnimation" 14 | 15 | property Item targetItem 16 | property int duration: Kirigami.Units.shortDuration 17 | 18 | // Fast scaling while we're animation == more FPS 19 | ScriptAction { script: targetItem.smooth = false } 20 | 21 | ParallelAnimation { 22 | PropertyAnimation { 23 | target: targetItem 24 | properties: "opacity" 25 | from: 0.8; to: 1.0 26 | duration: releasedAnimation.duration; 27 | easing.type: Easing.InExpo; 28 | } 29 | PropertyAnimation { 30 | target: targetItem 31 | properties: "scale" 32 | from: 0.95; to: 1.0 33 | duration: releasedAnimation.duration; 34 | easing.type: Easing.InExpo; 35 | } 36 | } 37 | 38 | ScriptAction { script: targetItem.smooth = true } 39 | } 40 | -------------------------------------------------------------------------------- /src/declarativeimports/plasmaextracomponents/qml/private/BackgroundMetrics.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2020 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | import QtQuick 2.12 7 | import QtQuick.Window 2.2 8 | 9 | import org.kde.plasma.plasmoid 2.0 10 | import org.kde.plasma.core as PlasmaCore 11 | import org.kde.ksvg 1.0 as KSvg 12 | 13 | KSvg.FrameSvgItem { 14 | id: backgroundMetrics 15 | visible: false 16 | imagePath: { 17 | if (Window.window instanceof PlasmaCore.AppletPopup || Window.window instanceof PlasmaCore.Dialog) { 18 | return "dialogs/background"; 19 | } else if (Plasmoid.formFactor === PlasmaCore.Types.Planar) { 20 | return "widgets/background"; 21 | // panels and other formfactors are explicitly not supported 22 | } else { 23 | return ""; 24 | } 25 | } 26 | readonly property bool hasInset: backgroundMetrics.inset.left >= 0 && backgroundMetrics.inset.right >= 0 && backgroundMetrics.inset.top >= 0 && backgroundMetrics.inset.bottom >= 0 27 | } 28 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze-dark/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file( 2 | "${CMAKE_CURRENT_SOURCE_DIR}/metadata.json.cmake" 3 | "${CMAKE_CURRENT_BINARY_DIR}/metadata.json" 4 | @ONLY 5 | ) 6 | 7 | install( 8 | FILES colors "${CMAKE_CURRENT_BINARY_DIR}/metadata.json" 9 | plasmarc 10 | DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/breeze-dark 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze-dark/plasmarc: -------------------------------------------------------------------------------- 1 | [Wallpaper] 2 | defaultWallpaperTheme=Next 3 | defaultFileSuffix=.png 4 | defaultWidth=1920 5 | defaultHeight=1080 6 | 7 | [ContrastEffect] 8 | enabled=true 9 | contrast=0.17 10 | intensity=1.25 11 | saturation=9 12 | 13 | [AdaptiveTransparency] 14 | enabled=true 15 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze-light/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file( 2 | "${CMAKE_CURRENT_SOURCE_DIR}/metadata.json.cmake" 3 | "${CMAKE_CURRENT_BINARY_DIR}/metadata.json" 4 | @ONLY 5 | ) 6 | 7 | install( 8 | FILES colors "${CMAKE_CURRENT_BINARY_DIR}/metadata.json" 9 | plasmarc 10 | DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/breeze-light 11 | ) 12 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze-light/plasmarc: -------------------------------------------------------------------------------- 1 | [Wallpaper] 2 | defaultWallpaperTheme=Next 3 | defaultFileSuffix=.png 4 | defaultWidth=1920 5 | defaultHeight=1080 6 | 7 | [ContrastEffect] 8 | enabled=true 9 | contrast=0.17 10 | intensity=1.25 11 | saturation=9 12 | 13 | [AdaptiveTransparency] 14 | enabled=true 15 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled source # 2 | ################### 3 | *.directory 4 | *.bak 5 | *thumbs.db -------------------------------------------------------------------------------- /src/desktoptheme/breeze/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | configure_file( 3 | "${CMAKE_CURRENT_SOURCE_DIR}/metadata.json.cmake" 4 | "${CMAKE_CURRENT_BINARY_DIR}/metadata.json" 5 | @ONLY 6 | ) 7 | 8 | install( 9 | FILES "${CMAKE_CURRENT_BINARY_DIR}/metadata.json" 10 | plasmarc 11 | DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/default 12 | ) 13 | 14 | FILE(GLOB widgets widgets/*.svg) 15 | plasma_install_desktoptheme_svgs(default SUBPATH widgets FILES ${widgets}) 16 | 17 | FILE(GLOB dialogs dialogs/*.svg) 18 | plasma_install_desktoptheme_svgs(default SUBPATH dialogs FILES ${dialogs}) 19 | 20 | FILE(GLOB opaque_dialogs opaque/dialogs/*.svg) 21 | plasma_install_desktoptheme_svgs(default SUBPATH opaque/dialogs FILES ${opaque_dialogs}) 22 | 23 | FILE(GLOB opaque_widgets opaque/widgets/*.svg) 24 | plasma_install_desktoptheme_svgs(default SUBPATH opaque/widgets FILES ${opaque_widgets}) 25 | 26 | FILE(GLOB translucent_widgets translucent/widgets/*.svg) 27 | plasma_install_desktoptheme_svgs(default SUBPATH translucent/widgets FILES ${translucent_widgets}) 28 | 29 | FILE(GLOB translucent_dialogs translucent/dialogs/*.svg) 30 | plasma_install_desktoptheme_svgs(default SUBPATH translucent/dialogs FILES ${translucent_dialogs}) 31 | 32 | FILE(GLOB solid_widgets solid/widgets/*.svg) 33 | plasma_install_desktoptheme_svgs(default SUBPATH solid/widgets FILES ${solid_widgets}) 34 | 35 | FILE(GLOB solid_dialogs solid/dialogs/*.svg) 36 | plasma_install_desktoptheme_svgs(default SUBPATH solid/dialogs FILES ${solid_dialogs}) 37 | 38 | FILE(GLOB icons icons/*.svg) 39 | plasma_install_desktoptheme_svgs(default SUBPATH icons FILES ${icons}) 40 | 41 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze/icons/distribute.svg: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze/icons/drive.svg: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze/icons/edit.svg: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze/icons/kgpg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze/icons/kup.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze/icons/list.svg: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze/icons/mobile.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze/icons/plasmavault.svg: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze/icons/plasmavault_error.svg: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze/plasmarc: -------------------------------------------------------------------------------- 1 | [Wallpaper] 2 | defaultWallpaperTheme=Next 3 | defaultFileSuffix=.png 4 | defaultWidth=1920 5 | defaultHeight=1080 6 | 7 | [ContrastEffect] 8 | enabled=true 9 | contrast=0.2 10 | intensity=1.4 11 | saturation=10 12 | 13 | [AdaptiveTransparency] 14 | enabled=true 15 | -------------------------------------------------------------------------------- /src/desktoptheme/breeze/widgets/.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/src/desktoptheme/breeze/widgets/.png -------------------------------------------------------------------------------- /src/desktoptheme/oxygen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file( 2 | "${CMAKE_CURRENT_SOURCE_DIR}/metadata.json.cmake" 3 | "${CMAKE_CURRENT_BINARY_DIR}/metadata.json" 4 | @ONLY 5 | ) 6 | 7 | install( 8 | FILES colors "${CMAKE_CURRENT_BINARY_DIR}/metadata.json" 9 | plasmarc 10 | DESTINATION ${PLASMA_DATA_INSTALL_DIR}/desktoptheme/oxygen 11 | ) 12 | 13 | FILE(GLOB widgets widgets/*.svg) 14 | plasma_install_desktoptheme_svgs(oxygen SUBPATH widgets FILES ${widgets}) 15 | 16 | FILE(GLOB dialogs dialogs/*.svg) 17 | plasma_install_desktoptheme_svgs(oxygen SUBPATH dialogs FILES ${dialogs}) 18 | 19 | FILE(GLOB opaque opaque/widgets/*.svg) 20 | plasma_install_desktoptheme_svgs(oxygen SUBPATH opaque/widgets FILES ${opaque}) 21 | 22 | FILE(GLOB opaque opaque/dialogs/*.svg) 23 | plasma_install_desktoptheme_svgs(oxygen SUBPATH opaque/dialogs FILES ${opaque}) 24 | 25 | -------------------------------------------------------------------------------- /src/desktoptheme/oxygen/plasmarc: -------------------------------------------------------------------------------- 1 | [Wallpaper] 2 | defaultWallpaperTheme=Elarun 3 | defaultFileSuffix=.png 4 | defaultWidth=2560 5 | defaultHeight=1600 6 | 7 | [ContrastEffect] 8 | enabled=true 9 | contrast=0.3 10 | intensity=0.5 11 | saturation=1.9 12 | 13 | -------------------------------------------------------------------------------- /src/plasma/.krazy: -------------------------------------------------------------------------------- 1 | EXTRA defines,kdebug,qenums,tipsandthis 2 | SKIP /widgets/template\.h 3 | -------------------------------------------------------------------------------- /src/plasma/README: -------------------------------------------------------------------------------- 1 | libplasma 2 | 3 | This directory contains the classes making up libplasma, which provides the 4 | core framework used by Plasma applications, such as the Plasma desktop shell 5 | and its components. This includes applet and extension definitions and loading, 6 | common GUI elements, data and service interaction, search system, etc. 7 | 8 | Domain specific sets of functionality, e.g. for network awareness or sensors, 9 | are not found here but as Applet, Wallpaper, 10 | ContainmentActions, Containment and other plugins. 11 | 12 | Commit Guidelines: 13 | * If your patch is not an obvious or trivial bug fix, have it peer reviewed 14 | by another Plasma developer; https://phabricator.kde.org is your friend :) 15 | 16 | * All code MUST follow the KDE Frameworks coding style, as found at: 17 | https://techbase.kde.org/Policies/Frameworks_Coding_Style 18 | 19 | * All new public API MUST have apidox written before committing and must go 20 | through an API review with another Plasma developer. We have to maintain 21 | binary compatibility, remember! 22 | 23 | Unit tests are next to godliness. (Though as you can see, right now libplasma 24 | is hellbound.) 25 | 26 | Please refer to the Plasma website (https://plasma.kde.org) and Plasma wiki 27 | (https://community.kde.org/Plasma) for API documentation and design 28 | documents regarding this library. 29 | 30 | -------------------------------------------------------------------------------- /src/plasma/config-plasma.h.cmake: -------------------------------------------------------------------------------- 1 | #cmakedefine01 HAVE_X11 2 | #cmakedefine01 HAVE_GLX 3 | #cmakedefine01 HAVE_EGL 4 | 5 | #define PLASMA_RELATIVE_DATA_INSTALL_DIR "@PLASMA_RELATIVE_DATA_INSTALL_DIR@" 6 | -------------------------------------------------------------------------------- /src/plasma/data/kconfigxt/libplasma-theme-global.kcfg: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | true 11 | 12 | 13 | 14 | 15 | 16384 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/plasma/data/kconfigxt/libplasma-theme-global.kcfgc: -------------------------------------------------------------------------------- 1 | File=libplasma-theme-global.kcfg 2 | ClassName=ThemeConfig 3 | Singleton=false 4 | Mutators=false 5 | -------------------------------------------------------------------------------- /src/plasma/packagestructure/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | function(install_package_structure name) 2 | kcoreaddons_add_plugin(${name} SOURCES ${name}_packagestructure.cpp INSTALL_NAMESPACE "kf6/packagestructure") 3 | target_link_libraries(${name} plasma_packagestructure_static) 4 | endfunction() 5 | 6 | function(install_package_structure_source name source) 7 | kcoreaddons_add_plugin(${name} SOURCES ${source} INSTALL_NAMESPACE "kf6/packagestructure") 8 | target_link_libraries(${name} KF6::Package) 9 | endfunction() 10 | 11 | add_library(plasma_packagestructure_static STATIC packages.cpp) 12 | target_link_libraries(plasma_packagestructure_static KF6::Package Plasma::Plasma KF6::I18n) 13 | set_property(TARGET plasma_packagestructure_static PROPERTY POSITION_INDEPENDENT_CODE ON) 14 | 15 | install_package_structure(plasma_generic) 16 | install_package_structure(plasma_applet) 17 | install_package_structure(plasma_theme) 18 | install_package_structure(plasma_containmentactions) 19 | 20 | install_package_structure_source(plasma_wallpaper qmlWallpaper/wallpaper.cpp) 21 | install_package_structure_source(plasma_shell shell/shellpackage.cpp) 22 | -------------------------------------------------------------------------------- /src/plasma/packagestructure/packages_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2007 Aaron Seigo 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef LIBS_PLASMA_PACKAGES_P_H 8 | #define LIBS_PLASMA_PACKAGES_P_H 9 | 10 | #include "plasma.h" 11 | 12 | #include 13 | #include 14 | 15 | namespace Plasma 16 | { 17 | class GenericPackage : public KPackage::PackageStructure 18 | { 19 | Q_OBJECT 20 | public: 21 | using KPackage::PackageStructure::PackageStructure; 22 | void initPackage(KPackage::Package *package) override; 23 | }; 24 | 25 | } // namespace Plasma 26 | 27 | #endif // LIBS_PLASMA_PACKAGES_P_H 28 | -------------------------------------------------------------------------------- /src/plasma/packagestructure/plasma_applet_packagestructure.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2007-2009 Aaron Seigo 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #include "plasma.h" 8 | 9 | #include "config-plasma.h" 10 | #include "packages_p.h" 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | class PlasmoidPackage : public Plasma::GenericPackage 17 | { 18 | Q_OBJECT 19 | public: 20 | using Plasma::GenericPackage::GenericPackage; 21 | 22 | void initPackage(KPackage::Package *package) override 23 | { 24 | GenericPackage::initPackage(package); 25 | package->setDefaultPackageRoot(QStringLiteral(PLASMA_RELATIVE_DATA_INSTALL_DIR "/plasmoids/")); 26 | 27 | package->addFileDefinition("configmodel", QStringLiteral("config/config.qml")); 28 | package->addFileDefinition("mainconfigxml", QStringLiteral("config/main.xml")); 29 | } 30 | 31 | void pathChanged(KPackage::Package *package) override 32 | { 33 | GenericPackage::pathChanged(package); 34 | const KPluginMetaData md = package->metadata(); 35 | if (!md.isValid()) { 36 | return; 37 | } 38 | if (md.rawData().contains(QStringLiteral("X-Plasma-ContainmentType"))) { 39 | package->addFileDefinition("compactapplet", QStringLiteral("applet/CompactApplet.qml")); 40 | } else { 41 | package->removeDefinition("compactapplet"); 42 | } 43 | } 44 | }; 45 | 46 | K_PLUGIN_CLASS_WITH_JSON(PlasmoidPackage, "plasma_applet_packagestructure.json") 47 | 48 | #include "plasma_applet_packagestructure.moc" 49 | -------------------------------------------------------------------------------- /src/plasma/packagestructure/plasma_applet_packagestructure.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPackageStructure": "Plasma/Applet", 3 | "X-KDE-ParentApp": "org.kde.plasmashell" 4 | } 5 | -------------------------------------------------------------------------------- /src/plasma/packagestructure/plasma_containmentactions_packagestructure.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2007-2009 Aaron Seigo 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #include "plasma.h" 8 | 9 | #include "config-plasma.h" 10 | #include "packages_p.h" 11 | #include 12 | #include 13 | 14 | class ContainmentActionsPackage : public Plasma::GenericPackage 15 | { 16 | Q_OBJECT 17 | public: 18 | using Plasma::GenericPackage::GenericPackage; 19 | 20 | void initPackage(KPackage::Package *package) override 21 | { 22 | GenericPackage::initPackage(package); 23 | package->setDefaultPackageRoot(QStringLiteral(PLASMA_RELATIVE_DATA_INSTALL_DIR "/containmentactions/")); 24 | } 25 | }; 26 | 27 | K_PLUGIN_CLASS_WITH_JSON(ContainmentActionsPackage, "plasma_containmentactions_packagestructure.json") 28 | 29 | #include "plasma_containmentactions_packagestructure.moc" 30 | -------------------------------------------------------------------------------- /src/plasma/packagestructure/plasma_containmentactions_packagestructure.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPackageStructure": "Plasma/ContainmentActions", 3 | "X-KDE-ParentApp": "org.kde.plasmashell" 4 | } 5 | -------------------------------------------------------------------------------- /src/plasma/packagestructure/plasma_generic_packagestructure.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2007-2009 Aaron Seigo 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #include "plasma.h" 8 | 9 | #include "packages_p.h" 10 | #include 11 | #include 12 | #include 13 | 14 | K_PLUGIN_CLASS_WITH_JSON(Plasma::GenericPackage, "plasma_generic_packagestructure.json") 15 | 16 | #include "plasma_generic_packagestructure.moc" 17 | -------------------------------------------------------------------------------- /src/plasma/packagestructure/plasma_generic_packagestructure.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPackageStructure": "Plasma/Generic", 3 | "X-KDE-ParentApp": "org.kde.plasmashell" 4 | } 5 | -------------------------------------------------------------------------------- /src/plasma/packagestructure/plasma_theme_packagestructure.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPackageStructure": "Plasma/Theme", 3 | "X-KDE-ParentApp": "org.kde.plasmashell" 4 | } 5 | -------------------------------------------------------------------------------- /src/plasma/packagestructure/qmlWallpaper/plasma-packagestructure-wallpaper.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPackageStructure": "Plasma/Wallpaper", 3 | "X-KDE-ParentApp": "org.kde.plasmashell" 4 | } 5 | -------------------------------------------------------------------------------- /src/plasma/packagestructure/shell/plasma-packagestructure-plasma-shell.json: -------------------------------------------------------------------------------- 1 | { 2 | "KPackageStructure": "Plasma/Shell", 3 | "X-KDE-ParentApp": "org.kde.plasmashell" 4 | } 5 | -------------------------------------------------------------------------------- /src/plasma/plasma.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2005 Aaron Seigo 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | #include "containment.h" 14 | 15 | namespace Plasma 16 | { 17 | Types::Types(QObject *parent) 18 | : QObject(parent) 19 | { 20 | } 21 | 22 | Types::~Types() 23 | { 24 | } 25 | 26 | } // Plasma namespace 27 | 28 | #include "moc_plasma.cpp" 29 | -------------------------------------------------------------------------------- /src/plasma/private/containmentactions_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2009 Chani Armitage 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef PLASMA_CONTAINMENTACTIONSPRIVATE_H 8 | #define PLASMA_CONTAINMENTACTIONSPRIVATE_H 9 | 10 | #include 11 | 12 | namespace Plasma 13 | { 14 | 15 | class ContainmentActionsPrivate 16 | { 17 | public: 18 | ContainmentActionsPrivate(const QVariant &arg, ContainmentActions * /*containmentActions*/) 19 | : containmentActionsDescription(arg.value()) 20 | { 21 | } 22 | 23 | const KPluginMetaData containmentActionsDescription; 24 | Containment *containment = nullptr; 25 | }; 26 | 27 | } // namespace Plasma 28 | #endif // PLASMA_CONTAINMENTACTIONSPRIVATE_H 29 | -------------------------------------------------------------------------------- /src/plasma/private/corona_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2007-2011 Aaron Seigo 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef PLASMA_CORONA_P_H 8 | #define PLASMA_CORONA_P_H 9 | 10 | #include 11 | 12 | #include 13 | 14 | namespace Plasma 15 | { 16 | class Containment; 17 | 18 | class CoronaPrivate 19 | { 20 | public: 21 | CoronaPrivate(Corona *corona); 22 | ~CoronaPrivate(); 23 | 24 | void init(); 25 | void toggleImmutability(); 26 | void saveLayout(KSharedConfigPtr cg) const; 27 | void updateContainmentImmutability(); 28 | void containmentDestroyed(QObject *obj); 29 | void syncConfig(); 30 | void notifyContainmentsReady(); 31 | void containmentReady(bool ready); 32 | Containment *addContainment(const QString &name, const QVariantList &args, uint id, int lastScreen, bool delayedInit = false); 33 | QList importLayout(const KConfigGroup &conf, bool mergeConfig); 34 | 35 | Corona *q; 36 | KPackage::Package package; 37 | KConfigGroup desktopDefaultsConfig; 38 | Types::ImmutabilityType immutability; 39 | QString configName; 40 | KSharedConfigPtr config; 41 | QTimer *configSyncTimer; 42 | QList containments; 43 | // It's a map to have values() as a stable list 44 | QMap actions; 45 | int containmentsStarting; 46 | bool editMode = false; 47 | }; 48 | 49 | } 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/plasma/private/effectwatcher_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2011 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef EFFECTWATCHER_P_H 8 | #define EFFECTWATCHER_P_H 9 | 10 | #include 11 | 12 | #include 13 | 14 | #include 15 | 16 | namespace Plasma 17 | { 18 | class EffectWatcher : public QObject, public QAbstractNativeEventFilter 19 | { 20 | Q_OBJECT 21 | 22 | public: 23 | explicit EffectWatcher(const QString &property, QObject *parent = nullptr); 24 | 25 | protected: 26 | bool isEffectActive() const; 27 | bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *) override; 28 | 29 | Q_SIGNALS: 30 | void effectChanged(bool on); 31 | 32 | private: 33 | void init(const QString &property); 34 | xcb_atom_t m_property; 35 | bool m_effectActive; 36 | bool m_isX11; 37 | }; 38 | 39 | } // namespace Plasma 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/plasma/private/package_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2009 Rob Scheepmaker 3 | SPDX-FileCopyrightText: 2014 Marco Martin 4 | 5 | SPDX-License-Identifier: LGPL-2.0-or-later 6 | */ 7 | 8 | #ifndef PLASMA_PACKAGE_P_H 9 | #define PLASMA_PACKAGE_P_H 10 | 11 | #include "../package.h" 12 | 13 | #include 14 | 15 | #include 16 | 17 | namespace Plasma 18 | { 19 | class PackagePrivate : public QSharedData 20 | { 21 | public: 22 | PackagePrivate(); 23 | ~PackagePrivate(); 24 | 25 | void installFinished(KJob *job); 26 | void uninstallFinished(KJob *job); 27 | 28 | QString servicePrefix; 29 | KPackage::Package *internalPackage; 30 | Package *fallbackPackage; 31 | PackageStructure *structure; 32 | }; 33 | 34 | } 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/plasma/private/publish.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | publishWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 394 10 | 131 11 | 12 | 13 | 14 | 15 | 16 | 17 | Sharing a widget on the network allows you to access this widget from another computer as a remote control. 18 | 19 | 20 | true 21 | 22 | 23 | 24 | 25 | 26 | 27 | Share this widget on the network 28 | 29 | 30 | 31 | 32 | 33 | 34 | false 35 | 36 | 37 | Allow everybody to freely access this widget 38 | 39 | 40 | 41 | 42 | 43 | 44 | Qt::Vertical 45 | 46 | 47 | 48 | 20 49 | 40 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/plasma/private/servicejob_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2009 Rob Scheepmaker 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef SERVICEJOB_P_H 8 | #define SERVICEJOB_P_H 9 | 10 | #include "../servicejob.h" 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | namespace Plasma 17 | { 18 | class ServiceJobPrivate 19 | { 20 | public: 21 | ServiceJobPrivate(ServiceJob *owner, const QString &dest, const QString &op, const QVariantMap ¶ms); 22 | 23 | void preventAutoStart(); 24 | void autoStart(); 25 | 26 | ServiceJob *q; 27 | QString destination; 28 | QString operation; 29 | QVariantMap parameters; 30 | QVariant result; 31 | bool m_allowAutoStart; 32 | }; 33 | 34 | } 35 | #endif // SERVICEJOB_P_H 36 | -------------------------------------------------------------------------------- /src/plasma/private/sharedtimer_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2008 Aaron Seigo 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef PLASMA_SHAREDTIMER_P_H 8 | #define PLASMA_SHAREDTIMER_P_H 9 | 10 | #include 11 | 12 | namespace Plasma 13 | { 14 | class Timer; 15 | 16 | class TimerDrive : public QObject 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | static TimerDrive *self(); 22 | void registerTimer(const Timer *t, int msec); 23 | void unregisterTimer(const Timer *t, int msec); 24 | 25 | protected: 26 | void timerEvent(QTimerEvent *event); 27 | 28 | private: 29 | friend class TimerDriveSingleton; 30 | explicit TimerDrive(QObject *parent = nullptr); 31 | ~TimerDrive(); 32 | class Private; 33 | Private *const d; 34 | }; 35 | 36 | } // namespace Plasma 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /src/plasma/private/timetracker.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef TIMETRACKER_H 8 | #define TIMETRACKER_H 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "plasma/plasma_export.h" 16 | 17 | namespace Plasma 18 | { 19 | class Containment; 20 | class Applet; 21 | 22 | struct TimeEvent { 23 | QDateTime moment; 24 | QString comment; 25 | }; 26 | 27 | struct ObjectHistory { 28 | QVariantMap initial; 29 | QList events; 30 | }; 31 | 32 | /** 33 | * This debugging class is meant to provide an overview of how the objects change 34 | * over time and hopefully provide the information required to detect buggy initialization. 35 | * 36 | * To use it, you'll pass the object you want to track to the constructor and the TimeTracker 37 | * will use Qt introspection to read the properties and check what values they have and how they 38 | * change. 39 | * 40 | * To analyze the results one can read the generated json file /tmp/debug-$USER, as soon 41 | * as the process has quit. 42 | */ 43 | 44 | class PLASMA_EXPORT TimeTracker : public QObject 45 | { 46 | Q_OBJECT 47 | public: 48 | explicit TimeTracker(QObject *applet); 49 | ~TimeTracker() override; 50 | 51 | private Q_SLOTS: 52 | void init(); 53 | void sync(); 54 | void propertyChanged(); 55 | 56 | private: 57 | ObjectHistory m_history; 58 | }; 59 | 60 | } 61 | 62 | #endif // TIMETRACKER_H 63 | -------------------------------------------------------------------------------- /src/plasmaquick/Mainpage.dox: -------------------------------------------------------------------------------- 1 | /** @page libplasmaquick Plasmoid Interfaces 2 | 3 | libplasmaquick is an internal part of lib plasma. 4 | 5 | It should not be used directly, however some classes are exposed to Plasma as attached properties. 6 | 7 | Namely: 8 | - PlasmoidItem 9 | - ContainmentItem 10 | which are exposed as "Plasmoid" for applets and containments respectively. 11 | 12 | QML applets should import org.kde.plasma.plasmoid 2.0 in order to access this attached object 13 | 14 | 15 | - WallpaperItem 16 | which is exposed as to wallpapers as the attached property "wallpaper". 17 | It does not require any special imports 18 | 19 | 20 | */ 21 | 22 | // DOXYGEN_SET_PROJECT_NAME = Plasma 23 | // DOXYGEN_SET_RECURSIVE = YES 24 | // DOXYGEN_EXCLUDE_PATTERNS = *_p.h */private/* */tests/* 25 | 26 | // vim:ts=4:sw=4:expandtab:filetype=doxygen 27 | -------------------------------------------------------------------------------- /src/plasmaquick/PlasmaQuickConfig.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | # Any changes in this ".cmake" file will be overwritten by CMake, the source is the ".cmake.in" file. 4 | 5 | # do not use PACKAGE_CMAKE_INSTALL_PREFIX after calls to find_dependency, its content can change! 6 | set(PlasmaQuick_INSTALL_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@") 7 | set_and_check(PlasmaQuick_INCLUDE_DIR "@PACKAGE_PLASMAQUICK_INSTALL_INCLUDEDIR@") 8 | 9 | include(CMakeFindDependencyMacro) 10 | find_dependency(Qt6Quick "@REQUIRED_QT_VERSION@") 11 | find_dependency(Plasma "@KF_DEP_VERSION@") 12 | 13 | include("${CMAKE_CURRENT_LIST_DIR}/PlasmaQuickTargets.cmake") 14 | 15 | set(PlasmaQuick_LIBRARIES Plasma::PlasmaQuick) 16 | 17 | -------------------------------------------------------------------------------- /src/plasmaquick/appletcontext.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2023 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #include "appletcontext_p.h" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | #include 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | #include 25 | 26 | namespace PlasmaQuick 27 | { 28 | 29 | AppletContext::AppletContext(QQmlEngine *engine, Plasma::Applet *applet, SharedQmlEngine *parent) 30 | : QQmlContext(engine, applet) 31 | , m_applet(applet) 32 | , m_sharedEngine(parent) 33 | { 34 | setParent(parent); 35 | } 36 | 37 | AppletContext::~AppletContext() 38 | { 39 | } 40 | 41 | Plasma::Applet *AppletContext::applet() const 42 | { 43 | return m_applet; 44 | } 45 | 46 | SharedQmlEngine *AppletContext::sharedQmlEngine() const 47 | { 48 | return m_sharedEngine; 49 | } 50 | 51 | } 52 | 53 | #include "moc_appletcontext_p.cpp" 54 | -------------------------------------------------------------------------------- /src/plasmaquick/appletcontext_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2023 Marco Martin 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #pragma once 8 | 9 | #include "sharedqmlengine.h" 10 | 11 | #include 12 | #include 13 | 14 | namespace Plasma 15 | { 16 | class Applet; 17 | } 18 | 19 | namespace PlasmaQuick 20 | { 21 | 22 | class AppletContext : public QQmlContext 23 | { 24 | Q_OBJECT 25 | public: 26 | AppletContext(QQmlEngine *engine, Plasma::Applet *applet, SharedQmlEngine *parent); 27 | ~AppletContext(); 28 | 29 | Plasma::Applet *applet() const; 30 | SharedQmlEngine *sharedQmlEngine() const; 31 | 32 | private: 33 | Plasma::Applet *m_applet; 34 | SharedQmlEngine *m_sharedEngine; 35 | }; 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/plasmaquick/dialogshadows_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2011 Aaron Seigo 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef PLASMA_DIALOGSHADOWS_H 8 | #define PLASMA_DIALOGSHADOWS_H 9 | 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | class DialogShadows : public KSvg::Svg 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | explicit DialogShadows(QObject *parent = nullptr, const QString &prefix = QStringLiteral("dialogs/background")); 21 | ~DialogShadows() override; 22 | 23 | static DialogShadows *self(); 24 | 25 | void addWindow(QWindow *window, KSvg::FrameSvg::EnabledBorders enabledBorders = KSvg::FrameSvg::AllBorders); 26 | void removeWindow(QWindow *window); 27 | 28 | void setEnabledBorders(QWindow *window, KSvg::FrameSvg::EnabledBorders enabledBorders = KSvg::FrameSvg::AllBorders); 29 | 30 | bool enabled() const; 31 | 32 | private: 33 | class Private; 34 | Private *const d; 35 | 36 | Q_PRIVATE_SLOT(d, void updateShadows()) 37 | Q_PRIVATE_SLOT(d, void windowDestroyed(QObject *deletedObject)) 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/plasmaquick/edgeeventforwarder.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2023 David Edmundson 3 | SPDX-License-Identifier: LGPL-2.0-or-later 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | 14 | class QWindow; 15 | 16 | class EdgeEventForwarderPrivate; 17 | 18 | namespace PlasmaQuick 19 | { 20 | 21 | /** 22 | * @brief The EdgeEventForwarder class 23 | * This class forwards edge events to be replayed within the given margin 24 | * This is useful if children do not touch the edge of a window, but want to get input events 25 | */ 26 | class PLASMAQUICK_EXPORT EdgeEventForwarder : public QObject 27 | { 28 | Q_OBJECT 29 | public: 30 | /** 31 | * @brief EdgeEventForwarder constructor 32 | * @param window The window to intercept and filter 33 | * The event forwarder is parented to the window 34 | */ 35 | EdgeEventForwarder(QWindow *parent); 36 | ~EdgeEventForwarder(); 37 | 38 | /** 39 | * @brief setMargins sets the margins to use for the event forwarding 40 | */ 41 | void setMargins(const QMargins &margins); 42 | QMargins margins(); 43 | 44 | /** 45 | * @brief setActiveEdges sets which margins should be active for edge forwarding 46 | * typically this should match edges touching a screen edge 47 | */ 48 | void setActiveEdges(Qt::Edges edges); 49 | Qt::Edges activeEdges(); 50 | 51 | bool eventFilter(QObject *watched, QEvent *event) override; 52 | 53 | private: 54 | std::unique_ptr d; 55 | }; 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/plasmaquick/plasmoid/dropmenu.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2008-2013 Aaron Seigo 3 | SPDX-FileCopyrightText: 2010-2013 Marco Martin 4 | 5 | SPDX-License-Identifier: LGPL-2.0-or-later 6 | */ 7 | 8 | #ifndef DROPMENU_H 9 | #define DROPMENU_H 10 | 11 | #include 12 | #include 13 | 14 | class QJSValue; 15 | class QMenu; 16 | class QAction; 17 | 18 | namespace KIO 19 | { 20 | class DropJob; 21 | } 22 | 23 | class ContainmentItem; 24 | 25 | class DropMenu : public QObject 26 | { 27 | Q_OBJECT 28 | 29 | public: 30 | DropMenu(KIO::DropJob *dropJob, const QPoint &dropPoint, ContainmentItem *parent = nullptr); 31 | ~DropMenu() override; 32 | 33 | QList urls() const; 34 | QPoint dropPoint() const; 35 | void setUrls(const QList &urls); 36 | void setMultipleMimetypes(bool multipleMimetypes); 37 | 38 | void addAction(QAction *action); 39 | bool isDropjobMenu() const; 40 | bool isMultipleMimetypes() const; 41 | void show(); 42 | 43 | private: 44 | QPoint m_dropPoint; 45 | QMenu *m_menu = nullptr; 46 | KIO::DropJob *m_dropJob = nullptr; 47 | QList m_dropActions = QList(); 48 | QList m_urls = QList(); 49 | bool m_multipleMimetypes = false; 50 | }; 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/plasmaquick/private/DialogBackground.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2023 Marco Martin 3 | * 4 | * SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 8 | import org.kde.ksvg as KSvg 9 | 10 | KSvg.FrameSvgItem { 11 | anchors.fill: parent 12 | imagePath: "widgets/background" 13 | } 14 | -------------------------------------------------------------------------------- /src/plasmaquick/private/resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | DialogBackground.qml 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/plasmaquick/transientplacementhint_p.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2023 David Edmundson 3 | SPDX-FileCopyrightText: 2021 Vlad Zahorodnii 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #pragma once 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | // This class is proposed for Qt6.something, but it's not there yet. 14 | // keep as an implementation detail, and then drop eventually (famous last words) 15 | 16 | class TransientPlacementHintPrivate; 17 | class QWindow; 18 | 19 | class TransientPlacementHint 20 | { 21 | public: 22 | TransientPlacementHint(); 23 | ~TransientPlacementHint(); 24 | TransientPlacementHint(const TransientPlacementHint &other); 25 | TransientPlacementHint &operator=(const TransientPlacementHint &other); 26 | bool isValid() const; 27 | void setParentAnchorArea(const QRect &parentAnchorRect); 28 | QRect parentAnchorArea() const; 29 | void setParentAnchor(Qt::Edges parentAnchor); 30 | Qt::Edges parentAnchor() const; 31 | void setPopupAnchor(Qt::Edges popupAnchor); 32 | Qt::Edges popupAnchor() const; 33 | Qt::Orientations slideConstraintAdjustments() const; 34 | void setSlideConstraintAdjustments(Qt::Orientations slideConstraintAdjustments); 35 | Qt::Orientations flipConstraintAdjustments() const; 36 | void setFlipConstraintAdjustments(Qt::Orientations flipConstraintAdjustments); 37 | int margin() const; 38 | void setMargin(int margin); 39 | 40 | private: 41 | QSharedDataPointer d; 42 | }; 43 | 44 | namespace TransientPlacementHelper 45 | { 46 | QRect popupRect(QWindow *window, const TransientPlacementHint &placement); 47 | } 48 | -------------------------------------------------------------------------------- /src/plasmaquick/windowresizehandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2023 David Edmundson 3 | SPDX-License-Identifier: LGPL-2.0-or-later 4 | */ 5 | 6 | #pragma once 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | 14 | class QWindow; 15 | 16 | class WindowResizeHandlerPrivate; 17 | 18 | /** 19 | * @brief The EdgeEventForwarder class 20 | * This class forwards edge events to be replayed within the given margin 21 | * This is useful if children do not touch the edge of a window, but want to get input events 22 | */ 23 | 24 | namespace PlasmaQuick 25 | { 26 | 27 | class PLASMAQUICK_EXPORT WindowResizeHandler : public QObject 28 | { 29 | Q_OBJECT 30 | public: 31 | WindowResizeHandler(QWindow *parent); 32 | ~WindowResizeHandler(); 33 | 34 | void setMargins(const QMargins &margins); 35 | QMargins margins() const; 36 | 37 | void setActiveEdges(Qt::Edges edges); 38 | Qt::Edges activeEdges() const; 39 | 40 | bool eventFilter(QObject *watched, QEvent *event) override; 41 | 42 | private: 43 | std::unique_ptr d; 44 | }; 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/tools/currentColorFillFix.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ $# -ne 1 ]; 4 | then echo Usage: $0 file.svgz 5 | exit 1 6 | fi 7 | 8 | if [ ! -f $1 ]; then 9 | echo "you must specify a valid svg" 10 | exit 1 11 | fi 12 | 13 | 14 | file=`echo $1 | cut -d'.' --complement -f2-` 15 | mv $1 $file.svg.gz 16 | gunzip $file.svg.gz 17 | 18 | echo Processing $file 19 | 20 | /usr/bin/perl -p -i -e "s/color:#[^;]*;(.*)fill:currentColor/\1fill:currentColor/g" $file.svg 21 | 22 | gzip -n $file.svg 23 | mv $file.svg.gz $file.svgz -------------------------------------------------------------------------------- /src/tools/inkscape extensions/plasmarename.inx: -------------------------------------------------------------------------------- 1 | 2 | > 3 | <_name>PlasmaRename 4 | notmart.filter.plasmarename 5 | plasmarename.py 6 | 7 | 8 | all 9 | 10 | 11 | 12 | 13 | 16 | 17 | -------------------------------------------------------------------------------- /templates/.clang-format: -------------------------------------------------------------------------------- 1 | DisableFormat: true 2 | SortIncludes: false 3 | -------------------------------------------------------------------------------- /templates/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | kde_package_app_templates( 2 | TEMPLATES 3 | qml-plasmoid6 4 | qml-plasmoid6-with-qml-extension 5 | cpp-plasmoid6 6 | plasma6-wallpaper 7 | plasma6-wallpaper-with-qml-extension 8 | INSTALL_DIR ${KDE_INSTALL_KAPPTEMPLATESDIR} 9 | ) 10 | -------------------------------------------------------------------------------- /templates/cpp-plasmoid6/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.16) 2 | 3 | project(plasma-%{APPNAMELC}) 4 | 5 | set(QT_MIN_VERSION "6.4.0") 6 | set(KF6_MIN_VERSION "5.93.0") 7 | 8 | find_package(ECM ${KF6_MIN_VERSION} REQUIRED NO_MODULE) 9 | set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) 10 | 11 | include(KDEInstallDirs) 12 | include(KDECMakeSettings) 13 | include(KDECompilerSettings NO_POLICY_SCOPE) 14 | include(FeatureSummary) 15 | 16 | find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS 17 | Plasma 18 | I18n 19 | ) 20 | 21 | find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS 22 | Quick 23 | Core 24 | ) 25 | 26 | add_subdirectory(src) 27 | 28 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 29 | -------------------------------------------------------------------------------- /templates/cpp-plasmoid6/Messages.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | $XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` -o $podir/plasma_applet_org.kde.plasma.%{APPNAMELC}.pot 3 | -------------------------------------------------------------------------------- /templates/cpp-plasmoid6/README: -------------------------------------------------------------------------------- 1 | Plasma Applet mixed C++/QML Template 2 | ---------------------- 3 | 4 | -- Namespace adaption -- 5 | 6 | Each Plasma plugin has a unique identifier, which is also used to find related 7 | resources (like the translation catalogs). 8 | To avoid naming collisions, Plasma plugins use a reverse domain name notation 9 | for that identifier: 10 | 11 | * org.kde.plasma.* - plugins coming from Plasma modules 12 | * org.kde.* - plugins coming from other software from KDE 13 | * $(my.domain).* - plugins of your 3rd-party 14 | 15 | The generated code uses the "org.kde.plasma" namespace for the plugin identifier. 16 | As this namespace is reserved for use by plugins part of Plasma modules, you will 17 | need to adapt this namespace if you are writing a plugin which is not intended to 18 | end up in the Plasma modules. 19 | 20 | 21 | -- Build instructions -- 22 | 23 | cd /where/your/applet/is/generated 24 | mkdir build 25 | cd build 26 | cmake -DCMAKE_INSTALL_PREFIX=MYPREFIX .. 27 | make 28 | make install 29 | 30 | (MYPREFIX is where you install your Plasma setup, replace it accordingly) 31 | 32 | Restart plasma to load the applet 33 | (in a terminal type: 34 | kquitapp plasmashell 35 | and then 36 | plasmashell) 37 | 38 | or view it with 39 | plasmoidviewer -a YourAppletName 40 | 41 | -- Tutorials and resources -- 42 | The explanation of the template 43 | https://techbase.kde.org/Development/Tutorials/Plasma5/QML2/GettingStarted 44 | 45 | Plasma QML API explained 46 | https://techbase.kde.org/Development/Tutorials/Plasma2/QML2/API 47 | -------------------------------------------------------------------------------- /templates/cpp-plasmoid6/cpp-plasmoid6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/templates/cpp-plasmoid6/cpp-plasmoid6.png -------------------------------------------------------------------------------- /templates/cpp-plasmoid6/src/%{APPNAMELC}.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}> 3 | SPDX-License-Identifier: LGPL-2.1-or-later 4 | */ 5 | 6 | #include "%{APPNAMELC}.h" 7 | 8 | #include 9 | 10 | %{APPNAME}::%{APPNAME}(QObject *parent, const KPluginMetaData &data, const QVariantList &args) 11 | : Plasma::Applet(parent, data, args), 12 | m_nativeText(i18n("Text coming from C++ plugin")) 13 | { 14 | } 15 | 16 | %{APPNAME}::~%{APPNAME}() 17 | { 18 | } 19 | 20 | QString %{APPNAME}::nativeText() const 21 | { 22 | return m_nativeText; 23 | } 24 | 25 | K_PLUGIN_CLASS(%{APPNAME}) 26 | 27 | #include "%{APPNAMELC}.moc" 28 | #include "moc_%{APPNAMELC}.cpp" 29 | -------------------------------------------------------------------------------- /templates/cpp-plasmoid6/src/%{APPNAMELC}.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}> 3 | SPDX-License-Identifier: LGPL-2.1-or-later 4 | */ 5 | 6 | #ifndef %{APPNAMEUC}_H 7 | #define %{APPNAMEUC}_H 8 | 9 | #include 10 | 11 | class %{APPNAME} : public Plasma::Applet 12 | { 13 | Q_OBJECT 14 | Q_PROPERTY(QString nativeText READ nativeText CONSTANT) 15 | 16 | public: 17 | explicit %{APPNAME}(QObject *parent, const KPluginMetaData &data, const QVariantList &args); 18 | ~%{APPNAME}(); 19 | 20 | QString nativeText() const; 21 | 22 | private: 23 | QString m_nativeText; 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /templates/cpp-plasmoid6/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # TODO: adapt "org.kde.plasma" here & elsewhere if needed (see README) 2 | add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.%{APPNAMELC}\") 3 | 4 | add_library(org.kde.plasma.%{APPNAMELC} MODULE %{APPNAMELC}.cpp) 5 | 6 | target_link_libraries(org.kde.plasma.%{APPNAMELC} 7 | Qt6::Gui 8 | Plasma::Plasma 9 | KF6::I18n) 10 | 11 | 12 | install(TARGETS org.kde.plasma.%{APPNAMELC} DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/applets) 13 | 14 | plasma_install_package(package org.kde.plasma.%{APPNAMELC}) 15 | -------------------------------------------------------------------------------- /templates/cpp-plasmoid6/src/package/contents/ui/main.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}> 3 | SPDX-License-Identifier: LGPL-2.1-or-later 4 | */ 5 | 6 | import QtQuick 2.1 7 | import QtQuick.Layouts 1.1 8 | import org.kde.plasma.plasmoid 2.0 9 | import org.kde.plasma.components 3.0 as PlasmaComponents3 10 | 11 | Item { 12 | Plasmoid.fullRepresentation: ColumnLayout { 13 | anchors.fill: parent 14 | Image { 15 | Layout.fillHeight: true 16 | Layout.fillWidth: true 17 | fillMode: Image.PreserveAspectFit 18 | source: "../images/pairs.svg" 19 | } 20 | PlasmaComponents3.Label { 21 | Layout.alignment: Qt.AlignCenter 22 | text: Plasmoid.nativeInterface.nativeText 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper-with-qml-extension/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.16) 2 | 3 | project(plasma-%{APPNAMELC}) 4 | 5 | find_package(ECM 1.4.0 REQUIRED NO_MODULE) 6 | set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) 7 | 8 | include(KDEInstallDirs) 9 | include(KDECMakeSettings) 10 | include(KDECompilerSettings NO_POLICY_SCOPE) 11 | include(FeatureSummary) 12 | 13 | find_package(KF6 REQUIRED COMPONENTS 14 | Plasma 15 | I18n 16 | ) 17 | 18 | find_package(Qt6 CONFIG REQUIRED COMPONENTS 19 | Qml 20 | Gui 21 | Core 22 | ) 23 | 24 | # wallpaper applet 25 | # TODO: adapt "org.kde.plasma" here & elsewhere if needed (see README) 26 | plasma_install_package(package org.kde.plasma.%{APPNAMELC} wallpapers wallpaper) 27 | 28 | # qml extension plugin 29 | add_subdirectory(plugin) 30 | 31 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 32 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper-with-qml-extension/Messages.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | $XGETTEXT `find . -name \*.qml -o -name \*.cpp` -o $podir/plasma_wallpaper_org.kde.plasma.%{APPNAMELC}.pot 3 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper-with-qml-extension/README: -------------------------------------------------------------------------------- 1 | Plasma Wallpaper Template 2 | ---------------------- 3 | 4 | -- Namespace adaption -- 5 | 6 | Each Plasma plugin has a unique identifier, which is also used to find related 7 | resources (like the translation catalogs). 8 | To avoid naming collisions, Plasma plugins use a reverse domain name notation 9 | for that identifier: 10 | 11 | * org.kde.plasma.* - plugins coming from Plasma modules 12 | * org.kde.* - plugins coming from other software from KDE 13 | * $(my.domain).* - plugins of your 3rd-party 14 | 15 | The generated code uses the "org.kde.plasma" namespace for the plugin identifier. 16 | As this namespace is reserved for use by plugins part of Plasma modules, you will 17 | need to adapt this namespace if you are writing a plugin which is not intended to 18 | end up in the Plasma modules. 19 | 20 | 21 | -- Build instructions -- 22 | 23 | cd /where/your/wallpaper/is/generated 24 | mkdir build 25 | cd build 26 | cmake -DCMAKE_INSTALL_PREFIX=MYPREFIX .. 27 | make 28 | make install 29 | 30 | (MYPREFIX is where you install your Plasma setup, replace it accordingly) 31 | 32 | Restart plasma to load the wallpaper 33 | (in a terminal or in krunner type: 34 | kquitapp plasmashell 35 | and then 36 | plasmashell) 37 | then go to wallpaper settings and select it 38 | 39 | -- Tutorials and resources -- 40 | Plasma QML API explained 41 | https://techbase.kde.org/Development/Tutorials/Plasma2/QML2/API 42 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper-with-qml-extension/package/contents/config/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | Hello World! 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper-with-qml-extension/package/contents/ui/config.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}> 3 | SPDX-License-Identifier: LGPL-2.1-or-later 4 | */ 5 | 6 | import QtQuick 7 | import QtQuick.Layouts 8 | import QtQuick.Controls as QQC2 9 | import org.kde.kirigami 2 as Kirigami 10 | 11 | ColumnLayout { 12 | id: root 13 | property alias cfg_DisplayText: textField.text 14 | 15 | RowLayout { 16 | spacing: Kirigami.Units.largeSpacing 17 | 18 | // To allow aligned integration in the settings form, 19 | // "formAlignment" is a property injected by the config containment 20 | // which defines the offset of the value fields 21 | QQC2.Label { 22 | Layout.minimumWidth: width 23 | Layout.maximumWidth: width 24 | width: formAlignment - Kirigami.Units.largeSpacing * 2 25 | horizontalAlignment: Text.AlignRight 26 | 27 | // use i18nd in config QML, as the default textdomain is set to that of the config container 28 | text: i18nd("plasma_wallpaper_org.kde.plasma.%{APPNAMELC}", "Text to Display:") 29 | } 30 | QQC2.TextField { 31 | id: textField 32 | Layout.fillWidth: true 33 | } 34 | } 35 | 36 | Item { // tighten layout 37 | Layout.fillHeight: true 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper-with-qml-extension/package/contents/ui/main.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}> 3 | SPDX-License-Identifier: LGPL-2.1-or-later 4 | */ 5 | 6 | import QtQuick 7 | import QtQuick.Layouts 8 | import org.kde.plasma.components as PlasmaComponents 9 | import org.kde.kirigami 2 as Kirigami 10 | import org.kde.plasma.plasmoid 11 | import org.kde.plasma.private.%{APPNAMELC} 1.0 12 | 13 | WallpaperItem { 14 | id: root 15 | 16 | Rectangle { 17 | anchors.fill: parent 18 | color: Kirigami.Theme.backgroundColor 19 | } 20 | 21 | ColumnLayout { 22 | anchors.centerIn: parent 23 | 24 | Kirigami.Heading { 25 | Layout.alignment: Qt.AlignCenter 26 | level: 1 27 | text: wallpaper.configuration.DisplayText || 28 | i18n("") 29 | } 30 | 31 | PlasmaComponents.Label { 32 | Layout.alignment: Qt.AlignCenter 33 | text: HelloWorld.text 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper-with-qml-extension/plugin/%{APPNAMELC}plugin.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}> 3 | SPDX-License-Identifier: LGPL-2.1-or-later 4 | */ 5 | 6 | #include "%{APPNAMELC}plugin.h" 7 | 8 | // KF 9 | #include 10 | // Qt 11 | #include 12 | #include 13 | #include 14 | 15 | static QJSValue singletonTypeExampleProvider(QQmlEngine* engine, QJSEngine* scriptEngine) 16 | { 17 | Q_UNUSED(engine) 18 | 19 | QJSValue helloWorld = scriptEngine->newObject(); 20 | helloWorld.setProperty("text", i18n("Hello world!")); 21 | return helloWorld; 22 | } 23 | 24 | 25 | void %{APPNAME}Plugin::registerTypes(const char* uri) 26 | { 27 | Q_ASSERT(uri == QLatin1String("org.kde.plasma.private.%{APPNAMELC}")); 28 | 29 | qmlRegisterSingletonType(uri, 1, 0, "HelloWorld", singletonTypeExampleProvider); 30 | } 31 | 32 | #include "moc_%{APPNAMELC}plugin.cpp" 33 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper-with-qml-extension/plugin/%{APPNAMELC}plugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}> 3 | SPDX-License-Identifier: LGPL-2.1-or-later 4 | */ 5 | 6 | #ifndef %{APPNAMEUC}PLUGIN_H 7 | #define %{APPNAMEUC}PLUGIN_H 8 | 9 | #include 10 | 11 | class %{APPNAME}Plugin : public QQmlExtensionPlugin 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 15 | 16 | public: 17 | void registerTypes(const char *uri) override; 18 | }; 19 | 20 | #endif // %{APPNAMEUC}PLUGIN_H 21 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper-with-qml-extension/plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_definitions(-DTRANSLATION_DOMAIN=\"plasma_wallpaper_org.kde.plasma.%{APPNAMELC}\") 2 | 3 | add_library(%{APPNAMELC}plugin SHARED %{APPNAMELC}plugin.cpp) 4 | 5 | target_link_libraries(%{APPNAMELC}plugin 6 | KF6::I18n 7 | Qt6::Gui 8 | Qt6::Qml 9 | ) 10 | install(TARGETS %{APPNAMELC}plugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/%{APPNAMELC}) 11 | install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/%{APPNAMELC}) 12 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper-with-qml-extension/plugin/qmldir: -------------------------------------------------------------------------------- 1 | module org.kde.plasma.private.%{APPNAMELC} 2 | plugin %{APPNAMELC}plugin 3 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.16) 2 | 3 | project(plasma-%{APPNAMELC}) 4 | 5 | find_package(ECM 1.4.0 REQUIRED NO_MODULE) 6 | set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) 7 | 8 | find_package(Plasma REQUIRED) 9 | 10 | # TODO: adapt "org.kde.plasma" here & elsewhere if needed (see README) 11 | plasma_install_package(package org.kde.plasma.%{APPNAMELC} wallpapers wallpaper) 12 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper/Messages.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | $XGETTEXT `find . -name \*.qml` -o $podir/plasma_wallpaper_org.kde.plasma.%{APPNAMELC}.pot 3 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper/README: -------------------------------------------------------------------------------- 1 | Plasma Wallpaper Template 2 | ---------------------- 3 | 4 | -- Namespace adaption -- 5 | 6 | Each Plasma plugin has a unique identifier, which is also used to find related 7 | resources (like the translation catalogs). 8 | To avoid naming collisions, Plasma plugins use a reverse domain name notation 9 | for that identifier: 10 | 11 | * org.kde.plasma.* - plugins coming from Plasma modules 12 | * org.kde.* - plugins coming from other software from KDE 13 | * $(my.domain).* - plugins of your 3rd-party 14 | 15 | The generated code uses the "org.kde.plasma" namespace for the plugin identifier. 16 | As this namespace is reserved for use by plugins part of Plasma modules, you will 17 | need to adapt this namespace if you are writing a plugin which is not intended to 18 | end up in the Plasma modules. 19 | 20 | 21 | -- Build instructions -- 22 | 23 | cd /where/your/wallpaper/is/generated 24 | mkdir build 25 | cd build 26 | cmake -DCMAKE_INSTALL_PREFIX=MYPREFIX .. 27 | make 28 | make install 29 | 30 | (MYPREFIX is where you install your Plasma setup, replace it accordingly) 31 | 32 | Restart plasma to load the wallpaper 33 | (in a terminal or in krunner type: 34 | kquitapp plasmashell 35 | and then 36 | plasmashell) 37 | then go to wallpaper settings and select it 38 | 39 | -- Tutorials and resources -- 40 | Plasma QML API explained 41 | https://techbase.kde.org/Development/Tutorials/Plasma2/QML2/API 42 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper/package/contents/config/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | Hello World! 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper/package/contents/ui/config.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}> 3 | SPDX-License-Identifier: LGPL-2.1-or-later 4 | */ 5 | 6 | import QtQuick 7 | import QtQuick.Layouts 8 | import QtQuick.Controls as QQC2 9 | import org.kde.kirigami 2 as Kirigami 10 | 11 | ColumnLayout { 12 | id: root 13 | property alias cfg_DisplayText: textField.text 14 | 15 | RowLayout { 16 | spacing: Kirigami.Units.largeSpacing 17 | 18 | // To allow aligned integration in the settings form, 19 | // "formAlignment" is a property injected by the config containment 20 | // which defines the offset of the value fields 21 | QQC2.Label { 22 | Layout.minimumWidth: width 23 | Layout.maximumWidth: width 24 | width: formAlignment - Kirigami.Units.largeSpacing * 2 25 | horizontalAlignment: Text.AlignRight 26 | 27 | // use i18nd in config QML, as the default textdomain is set to that of the config container 28 | text: i18nd("plasma_wallpaper_org.kde.plasma.%{APPNAMELC}", "Text to Display:") 29 | } 30 | QQC2.TextField { 31 | id: textField 32 | Layout.fillWidth: true 33 | } 34 | } 35 | 36 | Item { // tighten layout 37 | Layout.fillHeight: true 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /templates/plasma6-wallpaper/package/contents/ui/main.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}> 3 | SPDX-License-Identifier: LGPL-2.1-or-later 4 | */ 5 | 6 | import QtQuick 7 | import org.kde.plasma.plasmoid 8 | import org.kde.kirigami 2 as Kirigami 9 | 10 | WallpaperItem { 11 | id: root 12 | 13 | Rectangle { 14 | anchors.fill: parent 15 | color: Kirigami.Theme.backgroundColor 16 | } 17 | 18 | Kirigami.Heading { 19 | anchors.centerIn: parent 20 | level: 1 21 | text: wallpaper.configuration.DisplayText || 22 | i18n("") 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /templates/qml-plasmoid6-with-qml-extension/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.16) 2 | 3 | project(plasma-%{APPNAMELC}) 4 | 5 | find_package(ECM 1.4.0 REQUIRED NO_MODULE) 6 | set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) 7 | 8 | include(KDEInstallDirs) 9 | include(KDECMakeSettings) 10 | include(KDECompilerSettings NO_POLICY_SCOPE) 11 | include(FeatureSummary) 12 | 13 | find_package(KF6 REQUIRED COMPONENTS 14 | Plasma 15 | I18n 16 | ) 17 | 18 | find_package(Qt6 CONFIG REQUIRED COMPONENTS 19 | Qml 20 | Gui 21 | Core 22 | ) 23 | 24 | # plasmoid 25 | # TODO: adapt "org.kde.plasma" here & elsewhere if needed (see README) 26 | plasma_install_package(package org.kde.plasma.%{APPNAMELC}) 27 | 28 | # qml extension plugin 29 | add_subdirectory(plugin) 30 | 31 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) 32 | -------------------------------------------------------------------------------- /templates/qml-plasmoid6-with-qml-extension/Messages.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | $XGETTEXT `find . -name \*.qml -o -name \*.cpp` -o $podir/plasma_applet_org.kde.plasma.%{APPNAMELC}.pot 3 | -------------------------------------------------------------------------------- /templates/qml-plasmoid6-with-qml-extension/README: -------------------------------------------------------------------------------- 1 | Plasma Applet Template 2 | ---------------------- 3 | 4 | -- Namespace adaption -- 5 | 6 | Each Plasma plugin has a unique identifier, which is also used to find related 7 | resources (like the translation catalogs). 8 | To avoid naming collisions, Plasma plugins use a reverse domain name notation 9 | for that identifier: 10 | 11 | * org.kde.plasma.* - plugins coming from Plasma modules 12 | * org.kde.* - plugins coming from other software from KDE 13 | * $(my.domain).* - plugins of your 3rd-party 14 | 15 | The generated code uses the "org.kde.plasma" namespace for the plugin identifier. 16 | As this namespace is reserved for use by plugins part of Plasma modules, you will 17 | need to adapt this namespace if you are writing a plugin which is not intended to 18 | end up in the Plasma modules. 19 | 20 | 21 | -- Build instructions -- 22 | 23 | cd /where/your/applet/is/generated 24 | mkdir build 25 | cd build 26 | cmake -DCMAKE_INSTALL_PREFIX=MYPREFIX .. 27 | make 28 | make install 29 | 30 | (MYPREFIX is where you install your Plasma setup, replace it accordingly) 31 | 32 | Restart plasma to load the applet 33 | (in a terminal type: 34 | kquitapp plasmashell 35 | and then 36 | plasmashell) 37 | 38 | or view it with 39 | plasmoidviewer -a YourAppletName 40 | 41 | -- Tutorials and resources -- 42 | The explanation of the QML part of the template 43 | https://techbase.kde.org/Development/Tutorials/Plasma5/QML2/GettingStarted 44 | 45 | Plasma QML API explained 46 | https://techbase.kde.org/Development/Tutorials/Plasma2/QML2/API 47 | -------------------------------------------------------------------------------- /templates/qml-plasmoid6-with-qml-extension/package/contents/ui/main.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}> 3 | SPDX-License-Identifier: LGPL-2.1-or-later 4 | */ 5 | 6 | import QtQuick 2.1 7 | import QtQuick.Layouts 1.1 8 | import org.kde.plasma.plasmoid 2.0 9 | import org.kde.plasma.components 2.0 as PlasmaComponents 10 | 11 | import org.kde.plasma.private.%{APPNAMELC} 1.0 12 | 13 | Item { 14 | Plasmoid.fullRepresentation: ColumnLayout { 15 | anchors.fill: parent 16 | PlasmaComponents.Label { 17 | Layout.alignment: Qt.AlignCenter 18 | text: HelloWorld.text 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /templates/qml-plasmoid6-with-qml-extension/plugin/%{APPNAMELC}plugin.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}> 3 | SPDX-License-Identifier: LGPL-2.1-or-later 4 | */ 5 | 6 | #include "%{APPNAMELC}plugin.h" 7 | 8 | // KF 9 | #include 10 | // Qt 11 | #include 12 | #include 13 | #include 14 | 15 | static QJSValue singletonTypeExampleProvider(QQmlEngine* engine, QJSEngine* scriptEngine) 16 | { 17 | Q_UNUSED(engine) 18 | 19 | QJSValue helloWorld = scriptEngine->newObject(); 20 | helloWorld.setProperty("text", i18n("Hello world!")); 21 | return helloWorld; 22 | } 23 | 24 | 25 | void %{APPNAME}Plugin::registerTypes(const char* uri) 26 | { 27 | Q_ASSERT(uri == QLatin1String("org.kde.plasma.private.%{APPNAMELC}")); 28 | 29 | qmlRegisterSingletonType(uri, 1, 0, "HelloWorld", singletonTypeExampleProvider); 30 | } 31 | 32 | #include "moc_%{APPNAMELC}plugin.cpp" 33 | -------------------------------------------------------------------------------- /templates/qml-plasmoid6-with-qml-extension/plugin/%{APPNAMELC}plugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}> 3 | SPDX-License-Identifier: LGPL-2.1-or-later 4 | */ 5 | 6 | #ifndef %{APPNAMEUC}PLUGIN_H 7 | #define %{APPNAMEUC}PLUGIN_H 8 | 9 | #include 10 | 11 | class %{APPNAME}Plugin : public QQmlExtensionPlugin 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") 15 | 16 | public: 17 | void registerTypes(const char *uri) override; 18 | }; 19 | 20 | #endif // %{APPNAMEUC}PLUGIN_H 21 | -------------------------------------------------------------------------------- /templates/qml-plasmoid6-with-qml-extension/plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.plasma.%{APPNAMELC}\") 2 | 3 | add_library(%{APPNAMELC}plugin SHARED %{APPNAMELC}plugin.cpp) 4 | 5 | target_link_libraries(%{APPNAMELC}plugin 6 | KF6::I18n 7 | Qt6::Gui 8 | Qt6::Qml 9 | ) 10 | install(TARGETS %{APPNAMELC}plugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/%{APPNAMELC}) 11 | install(FILES qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/%{APPNAMELC}) 12 | -------------------------------------------------------------------------------- /templates/qml-plasmoid6-with-qml-extension/plugin/qmldir: -------------------------------------------------------------------------------- 1 | module org.kde.plasma.private.%{APPNAMELC} 2 | plugin %{APPNAMELC}plugin 3 | -------------------------------------------------------------------------------- /templates/qml-plasmoid6-with-qml-extension/qml-plasmoid6-with-qml-extension.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/templates/qml-plasmoid6-with-qml-extension/qml-plasmoid6-with-qml-extension.png -------------------------------------------------------------------------------- /templates/qml-plasmoid6/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.16) 2 | 3 | project(plasma-%{APPNAMELC}) 4 | 5 | find_package(ECM 1.4.0 REQUIRED NO_MODULE) 6 | set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) 7 | 8 | find_package(Plasma REQUIRED) 9 | 10 | # TODO: adapt "org.kde.plasma" here & elsewhere if needed (see README) 11 | plasma_install_package(package org.kde.plasma.%{APPNAMELC}) 12 | -------------------------------------------------------------------------------- /templates/qml-plasmoid6/Messages.sh: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env bash 2 | $XGETTEXT `find . -name \*.qml` -o $podir/plasma_applet_org.kde.plasma.%{APPNAMELC}.pot 3 | -------------------------------------------------------------------------------- /templates/qml-plasmoid6/README: -------------------------------------------------------------------------------- 1 | Plasma Applet Template 2 | ---------------------- 3 | 4 | -- Namespace adaption -- 5 | 6 | Each Plasma plugin has a unique identifier, which is also used to find related 7 | resources (like the translation catalogs). 8 | To avoid naming collisions, Plasma plugins use a reverse domain name notation 9 | for that identifier: 10 | 11 | * org.kde.plasma.* - plugins coming from Plasma modules 12 | * org.kde.* - plugins coming from other software from KDE 13 | * $(my.domain).* - plugins of your 3rd-party 14 | 15 | The generated code uses the "org.kde.plasma" namespace for the plugin identifier. 16 | As this namespace is reserved for use by plugins part of Plasma modules, you will 17 | need to adapt this namespace if you are writing a plugin which is not intended to 18 | end up in the Plasma modules. 19 | 20 | 21 | -- Build instructions -- 22 | 23 | cd /where/your/applet/is/generated 24 | mkdir build 25 | cd build 26 | cmake -DCMAKE_INSTALL_PREFIX=MYPREFIX .. 27 | make 28 | make install 29 | 30 | (MYPREFIX is where you install your Plasma setup, replace it accordingly) 31 | 32 | Restart plasma to load the applet 33 | (in a terminal type: 34 | kquitapp plasmashell 35 | and then 36 | plasmashell) 37 | 38 | or view it with 39 | plasmoidviewer -a YourAppletName 40 | 41 | -- Tutorials and resources -- 42 | The explanation of the template 43 | https://techbase.kde.org/Development/Tutorials/Plasma5/QML2/GettingStarted 44 | 45 | Plasma QML API explained 46 | https://techbase.kde.org/Development/Tutorials/Plasma2/QML2/API 47 | -------------------------------------------------------------------------------- /templates/qml-plasmoid6/package/contents/images/pairs.svgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/templates/qml-plasmoid6/package/contents/images/pairs.svgz -------------------------------------------------------------------------------- /templates/qml-plasmoid6/package/contents/ui/main.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}> 3 | SPDX-License-Identifier: LGPL-2.1-or-later 4 | */ 5 | 6 | import QtQuick 2.1 7 | import QtQuick.Layouts 1.1 8 | import org.kde.plasma.plasmoid 2.0 9 | import org.kde.plasma.components 2.0 as PlasmaComponents 10 | 11 | Item { 12 | Plasmoid.fullRepresentation: ColumnLayout { 13 | anchors.fill: parent 14 | Image { 15 | Layout.fillHeight: true 16 | Layout.fillWidth: true 17 | fillMode: Image.PreserveAspectFit 18 | source: "../images/pairs.svgz" 19 | } 20 | PlasmaComponents.Label { 21 | Layout.alignment: Qt.AlignCenter 22 | text: "This is Plasma!" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /templates/qml-plasmoid6/qml-plasmoid6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KDE/plasma-framework/0806864a1e7c200ee8872074a4c16be7e1ce3358/templates/qml-plasmoid6/qml-plasmoid6.png -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(dpi) 2 | -------------------------------------------------------------------------------- /tests/buttons_pc3.0.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2018 Aleix Pol 3 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 4 | */ 5 | import QtQuick 2.0 6 | 7 | import org.kde.plasma.components 3.0 as PlasmaComponents 8 | 9 | Rectangle 10 | { 11 | width: 500 12 | height: 300 13 | color: "white" 14 | 15 | Flow { 16 | anchors.fill: parent 17 | anchors.margins: 20 18 | spacing: 20 19 | 20 | PlasmaComponents.Button { 21 | text: "test" 22 | } 23 | PlasmaComponents.Button { 24 | text: "test" 25 | flat: true 26 | } 27 | PlasmaComponents.ToolButton { 28 | text: "test" 29 | } 30 | } 31 | } 32 | 33 | -------------------------------------------------------------------------------- /tests/components/ComponentBase.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2019 David Edmundson 3 | * SPDX-FileCopyrightText: 2020 Noah Davis 4 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 5 | */ 6 | import QtQuick 2.0 7 | import QtQuick.Layouts 1.2 8 | import org.kde.plasma.components 3.0 as PlasmaComponents 9 | import org.kde.kirigami 2 as Kirigami 10 | 11 | PlasmaComponents.Page { 12 | id: mainPage 13 | title: "Test" 14 | width: Math.max(mainPage.contentWidth, mainPage.implicitHeaderWidth, mainPage.implicitFooterWidth) 15 | + leftPadding + rightPadding 16 | height: mainPage.contentHeight + mainPage.implicitHeaderHeight + mainPage.implicitFooterHeight 17 | + topPadding + bottomPadding 18 | 19 | padding: Kirigami.Units.gridUnit 20 | 21 | header: PlasmaComponents.ToolBar { 22 | leftPadding: mainPage.padding 23 | rightPadding: mainPage.padding 24 | contentItem: Kirigami.Heading { 25 | text: mainPage.title 26 | /* FIXME: this line is needed to prevent vertical pixel 27 | * misalignment of controls, such as checkboxes. 28 | * The cause of the problem is unknown. 29 | */ 30 | level: 2 31 | } 32 | } 33 | 34 | background: Rectangle { 35 | color: Kirigami.Theme.backgroundColor 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /tests/components/combobox3.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2019 David Edmundson 3 | * SPDX-FileCopyrightText: 2020 Noah Davis 4 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 5 | */ 6 | import QtQuick 2.0 7 | import QtQuick.Layouts 1.12 8 | import org.kde.plasma.components 3.0 9 | import org.kde.kirigami 2 as Kirigami 10 | 11 | ComponentBase { 12 | id: root 13 | title: "Plasma Components 3 ComboBox" 14 | contentItem: ColumnLayout { 15 | spacing: Kirigami.Units.gridUnit 16 | ListModel { 17 | id: demoModel 18 | ListElement { text: "Banana"; color: "Yellow" } 19 | ListElement { text: "Apple"; color: "Green" } 20 | ListElement { text: "Coconut"; color: "Brown" } 21 | } 22 | 23 | ComboBox { 24 | model:demoModel 25 | textRole: "text" 26 | } 27 | ComboBox { 28 | editable: true 29 | model: demoModel 30 | textRole: "text" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/components/tabbar3.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2020 Marco Martin 3 | * SPDX-FileCopyrightText: 2020 Noah Davis 4 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 5 | */ 6 | import QtQuick 2.0 7 | import QtQuick.Layouts 1.12 8 | import org.kde.plasma.components 3.0 as PlasmaComponents 9 | 10 | ComponentBase { 11 | id: root 12 | title: "Plasma Components 3 TabBar with TabButtons" 13 | contentItem: PlasmaComponents.TabBar { 14 | implicitWidth: tabButton2.implicitWidth*4 15 | PlasmaComponents.TabButton { 16 | icon.name: "application-menu" 17 | text: "Icon Only" 18 | display: PlasmaComponents.TabButton.IconOnly 19 | } 20 | PlasmaComponents.TabButton { 21 | id: tabButton2 22 | icon.name: "application-menu" 23 | text: "Text Beside Icon" 24 | display: PlasmaComponents.TabButton.TextBesideIcon 25 | } 26 | PlasmaComponents.TabButton { 27 | icon.name: "application-menu" 28 | text: "Text Under Icon" 29 | display: PlasmaComponents.TabButton.TextUnderIcon 30 | } 31 | PlasmaComponents.TabButton { 32 | icon.name: "application-menu" 33 | text: "Text Only" 34 | display: PlasmaComponents.TabButton.TextOnly 35 | } 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /tests/components/textfield3.qml: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2019 David Edmundson 3 | * SPDX-FileCopyrightText: 2020 Noah Davis 4 | * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 5 | */ 6 | import QtQuick 2.0 7 | import QtQuick.Layouts 1.12 8 | import org.kde.plasma.components 3.0 as PlasmaComponents 9 | import org.kde.kirigami 2 as Kirigami 10 | 11 | ComponentBase { 12 | id: root 13 | title: "Plasma Components 3 TextField" 14 | property string longText: "This is a longer sentence" 15 | 16 | contentItem: Flow { 17 | spacing: Kirigami.Units.gridUnit 18 | 19 | PlasmaComponents.TextField { 20 | placeholderText: longText 21 | } 22 | 23 | PlasmaComponents.TextField { 24 | text: root.longText 25 | } 26 | 27 | PlasmaComponents.TextField { 28 | width: 400 29 | placeholderText: longText 30 | } 31 | 32 | PlasmaComponents.TextField { 33 | text: root.longText 34 | echoMode: TextInput.Password 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tests/dialog.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2014 David Edmundson 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.0 8 | 9 | import QtQuick.Layouts 1.1 10 | 11 | import org.kde.plasma.core as PlasmaCore 12 | 13 | PlasmaCore.Dialog { 14 | visible: true 15 | 16 | mainItem: Item { 17 | width: 200 18 | height: 200 19 | 20 | MouseArea { 21 | anchors.fill: parent 22 | onClicked: Qt.quit() 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/dialog_fullscreen.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2014 Vishesh Handa 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.0 8 | 9 | import QtQuick.Controls 2.15 as Controls 10 | import QtQuick.Layouts 1.1 11 | 12 | import org.kde.plasma.core as PlasmaCore 13 | 14 | 15 | PlasmaCore.Dialog { 16 | id: dialog 17 | location: PlasmaCore.Types.Floating 18 | 19 | ColumnLayout { 20 | Controls.Label { 21 | Layout.maximumWidth: rect.width 22 | wrapMode: Text.WordWrap 23 | text: "Clicking on the rectangle should toggle the full screen mode. Make sure it retains its original geometry when jumping in between full screen and normal" 24 | } 25 | 26 | Rectangle { 27 | id: rect 28 | color: "green" 29 | 30 | width: 500 31 | height: 500 32 | 33 | MouseArea { 34 | anchors.fill: parent 35 | onClicked: { 36 | if (dialog.location != PlasmaCore.Types.FullScreen) { 37 | dialog.location = PlasmaCore.Types.FullScreen; 38 | } 39 | else { 40 | dialog.location = PlasmaCore.Types.Floating; 41 | } 42 | } 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /tests/dpi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(dpitest 2 | main.cpp 3 | dpitest.cpp 4 | ) 5 | 6 | target_link_libraries(dpitest Plasma::Plasma KF6::I18n Qt6::Gui) 7 | 8 | -------------------------------------------------------------------------------- /tests/dpi/dpitest.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2013 Sebastian Kügler 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #include "dpitest.h" 8 | 9 | #include 10 | 11 | #include 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | namespace Plasma 20 | { 21 | class DPITestPrivate 22 | { 23 | public: 24 | QString pluginName; 25 | QCommandLineParser *parser; 26 | }; 27 | 28 | DPITest::DPITest(int &argc, char **argv, QCommandLineParser *parser) 29 | : QGuiApplication(argc, argv) 30 | { 31 | d = new DPITestPrivate; 32 | d->parser = parser; 33 | QTimer::singleShot(0, this, &DPITest::runMain); 34 | } 35 | 36 | DPITest::~DPITest() 37 | { 38 | delete d; 39 | } 40 | 41 | void DPITest::runMain() 42 | { 43 | qDebug() << "DPI test runs: "; 44 | exit(0); 45 | return; 46 | } 47 | 48 | } 49 | 50 | #include "moc_dpitest.cpp" 51 | -------------------------------------------------------------------------------- /tests/dpi/dpitest.h: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2012 Sebastian Kügler 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | #ifndef DPITEST_H 8 | #define DPITEST_H 9 | 10 | #include 11 | #include 12 | 13 | class QCommandLineParser; 14 | 15 | namespace Plasma 16 | { 17 | class DPITestPrivate; 18 | 19 | class DPITest : public QGuiApplication 20 | { 21 | Q_OBJECT 22 | 23 | public: 24 | DPITest(int &argc, char **argv, QCommandLineParser *parser); 25 | ~DPITest() override; 26 | 27 | public Q_SLOTS: 28 | void runMain(); 29 | 30 | private: 31 | DPITestPrivate *d; 32 | }; 33 | 34 | } 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /tests/dpi/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2008 Aaron Seigo 3 | SPDX-FileCopyrightText: 2013 Sebastian Kügler 4 | 5 | SPDX-License-Identifier: GPL-2.0-or-later 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | 15 | #include "dpitest.h" 16 | 17 | int main(int argc, char **argv) 18 | { 19 | QCommandLineParser *parser = new QCommandLineParser; 20 | Plasma::DPITest app(argc, argv, parser); 21 | 22 | const QString description = i18n("DPI test app"); 23 | const QString version = QStringLiteral("2.0"); 24 | 25 | app.setApplicationVersion(version); 26 | parser->addVersionOption(); 27 | parser->setApplicationDescription(description); 28 | 29 | parser->addOption(QCommandLineOption(QStringList() << QStringLiteral("s") << QStringLiteral("show"), 30 | i18nc("Do not translate ", "Show icon sizes"), 31 | QStringLiteral("name"))); 32 | 33 | return app.exec(); 34 | } 35 | -------------------------------------------------------------------------------- /tests/frames.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2020 David Edmundson 3 | 4 | SPDX-License-Identifier: LGPL-2.0-or-later 5 | */ 6 | 7 | 8 | import QtQuick 2.0 9 | import QtQuick.Layouts 1.1 10 | 11 | import org.kde.ksvg 1.0 as KSvg 12 | 13 | Item 14 | { 15 | width: 500 16 | height: 500 17 | 18 | 19 | 20 | Grid { 21 | anchors.fill: parent 22 | columns: 3 23 | 24 | Repeater { 25 | model: ["widgets/background", 26 | "widgets/panel-background", 27 | "opaque/widgets/panel-background", 28 | "widgets/tooltip", 29 | "opaque/widgets/tooltip" 30 | ] 31 | 32 | delegate: KSvg.FrameSvgItem { 33 | width: 100 34 | height: 100 35 | imagePath: modelData 36 | } 37 | } 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /tests/selected_svg.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2016 Marco Martin 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.2 8 | import QtQuick.Controls 2.15 as Controls 9 | import org.kde.kirigami 2.20 as Kirigami 10 | import org.kde.ksvg 1.0 as KSvg 11 | 12 | KSvg.FrameSvgItem { 13 | id: root 14 | imagePath: "widgets/background" 15 | state: KSvg.Svg.Normal 16 | width: 600 17 | height: 800 18 | 19 | Column { 20 | anchors.centerIn: parent 21 | spacing: 4 22 | 23 | Controls.Button { 24 | text: "Switch Selected State" 25 | onClicked: root.state = (root.state == KSvg.Svg.Selected ? KSvg.Svg.Normal : KSvg.Svg.Selected) 26 | } 27 | 28 | KSvg.SvgItem { 29 | svg: KSvg.Svg { 30 | id: svg 31 | imagePath: "icons/phone" 32 | state: root.state 33 | } 34 | } 35 | 36 | Kirigami.Icon { 37 | id: icon 38 | source: "phone" 39 | state: root.state 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tests/shadows.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2021 Arjen Hiemstra 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.15 8 | import QtQuick.Layouts 1.15 9 | 10 | import org.kde.ksvg 1.0 as KSvg 11 | 12 | Rectangle { 13 | color: "white" 14 | width: 600 15 | height: 600 16 | 17 | GridLayout { 18 | anchors.fill: parent 19 | columns: 3 20 | 21 | Repeater { 22 | model: [ 23 | "shadow-topleft", 24 | "shadow-top", 25 | "shadow-topright", 26 | "shadow-left", 27 | "shadow-middle", 28 | "shadow-right", 29 | "shadow-bottomleft", 30 | "shadow-bottom", 31 | "shadow-bottomright" 32 | ] 33 | 34 | KSvg.SvgItem { 35 | elementId: modelData 36 | 37 | svg: KSvg.Svg { 38 | imagePath: "dialogs/background" 39 | } 40 | } 41 | } 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /tests/tooltip-icons.qml: -------------------------------------------------------------------------------- 1 | /* 2 | SPDX-FileCopyrightText: 2014 Bhushan Shah 3 | 4 | SPDX-License-Identifier: GPL-2.0-or-later 5 | */ 6 | 7 | import QtQuick 2.0 8 | import org.kde.plasma.core as PlasmaCore 9 | import org.kde.kirigami 2.20 as Kirigami 10 | 11 | Row { 12 | height: 200 13 | width: 400 14 | Kirigami.Icon { 15 | source: "plasma" 16 | PlasmaCore.ToolTipArea { 17 | anchors.fill: parent 18 | mainText: "Tooltip Title" 19 | subText: "Some explanation." 20 | icon: "plasma" 21 | } 22 | } 23 | 24 | Kirigami.Icon { 25 | source: "ark" 26 | PlasmaCore.ToolTipArea { 27 | anchors.fill: parent 28 | mainText: "Tooltip title" 29 | subText: "No icon!" 30 | } 31 | } 32 | } 33 | 34 | --------------------------------------------------------------------------------