mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-11-23 07:53:42 +00:00
port widget to dbus
This commit is contained in:
@ -20,7 +20,7 @@ import QtQuick 2.0
|
||||
import org.kde.plasma.private.awesomewidget 1.0
|
||||
|
||||
|
||||
Item {
|
||||
PlasmoidItem {
|
||||
id: aboutPage
|
||||
// backend
|
||||
AWActions {
|
||||
|
||||
@ -21,7 +21,7 @@ import QtQuick.Controls 1.3 as QtControls
|
||||
import org.kde.plasma.private.awesomewidget 1.0
|
||||
|
||||
|
||||
Item {
|
||||
PlasmoidItem {
|
||||
id: advancedPage
|
||||
// backend
|
||||
AWActions {
|
||||
|
||||
@ -21,7 +21,7 @@ import org.kde.plasma.private.awesomewidget 1.0
|
||||
import "."
|
||||
|
||||
|
||||
Item {
|
||||
PlasmoidItem {
|
||||
id: appearancePage
|
||||
// backend
|
||||
AWActions {
|
||||
|
||||
@ -22,7 +22,7 @@ import QtQuick.Dialogs 1.1 as QtDialogs
|
||||
import org.kde.plasma.private.awesomewidget 1.0
|
||||
|
||||
|
||||
Item {
|
||||
PlasmoidItem {
|
||||
id: dataenginePage
|
||||
// backend
|
||||
AWKeys {
|
||||
|
||||
@ -15,19 +15,18 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.4
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick.Dialogs 1.2 as QtDialogs
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Dialogs
|
||||
import QtQuick.Layouts
|
||||
import org.kde.plasma.core as PlasmaCore
|
||||
import org.kde.plasma.plasmoid 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
|
||||
import org.kde.plasma.private.awesomewidget 1.0
|
||||
import "."
|
||||
|
||||
|
||||
Item {
|
||||
PlasmoidItem {
|
||||
id: main
|
||||
// backend
|
||||
AWKeys {
|
||||
@ -74,17 +73,12 @@ Item {
|
||||
signal sizeUpdate
|
||||
|
||||
|
||||
// init
|
||||
Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation
|
||||
Plasmoid.compactRepresentation: Plasmoid.fullRepresentation
|
||||
|
||||
Layout.fillWidth: plasmoid.formFactor != PlasmaCore.Planar
|
||||
Layout.fillHeight: plasmoid.formFactor != PlasmaCore.Planar
|
||||
Layout.fillWidth: PlasmoidItem.formFactor != PlasmaCore.Planar
|
||||
Layout.fillHeight: PlasmoidItem.formFactor != PlasmaCore.Planar
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
||||
|
||||
Plasmoid.icon: "utilities-system-monitor"
|
||||
Plasmoid.backgroundHints: plasmoid.configuration.background ? "DefaultBackground" : "NoBackground"
|
||||
Plasmoid.associatedApplication: "ksysguard"
|
||||
|
||||
|
||||
// ui
|
||||
@ -119,11 +113,11 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
QtDialogs.Dialog {
|
||||
Dialog {
|
||||
id: tagSelector
|
||||
title: i18n("Select tag")
|
||||
|
||||
QtControls.ComboBox {
|
||||
ComboBox {
|
||||
id: tagSelectorBox
|
||||
width: parent.width
|
||||
editable: true
|
||||
@ -140,17 +134,29 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Plasmoid.contextualActions: [
|
||||
PlasmaCore.Action {
|
||||
text: i18n("Request key")
|
||||
icon.name: "utilities-system-monitor"
|
||||
},
|
||||
PlasmaCore.Action {
|
||||
text: i18n("Show README")
|
||||
icon.name: "text-x-readme"
|
||||
},
|
||||
PlasmaCore.Action {
|
||||
text: i18n("Check updates")
|
||||
icon.name: "system-software-update"
|
||||
},
|
||||
PlasmaCore.Action {
|
||||
text: i18n("Report bug")
|
||||
icon.name: "tools-report-bug"
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Component.onCompleted: {
|
||||
if (debug) console.debug()
|
||||
|
||||
// actions
|
||||
// it makes no sense to use this field with optimization enable
|
||||
if (!plasmoid.configuration.optimize)
|
||||
plasmoid.setAction("requestKey", i18n("Request key"), "utilities-system-monitor")
|
||||
plasmoid.setAction("showReadme", i18n("Show README"), "text-x-readme")
|
||||
plasmoid.setAction("checkUpdates", i18n("Check updates"), "system-software-update")
|
||||
plasmoid.setAction("reportBug", i18n("Report bug"), "tools-report-bug")
|
||||
// init submodule
|
||||
Plasmoid.userConfiguringChanged(false)
|
||||
// connect data
|
||||
@ -160,14 +166,14 @@ Item {
|
||||
if (plasmoid.configuration.checkUpdates) return awActions.checkUpdates(false)
|
||||
}
|
||||
|
||||
onNeedTextUpdate: {
|
||||
onNeedTextUpdate: newText => {
|
||||
if (debug) console.debug()
|
||||
|
||||
text.text = newText
|
||||
sizeUpdate()
|
||||
}
|
||||
|
||||
onNeedToolTipUpdate: {
|
||||
onNeedToolTipUpdate: newText => {
|
||||
if (debug) console.debug()
|
||||
|
||||
tooltip.text = newText
|
||||
|
||||
@ -3,25 +3,25 @@
|
||||
|
||||
|
||||
# common QML constants
|
||||
singleton General 1.0 file:///usr//awesomewidgets/qml/General.qml
|
||||
singleton General 1.0 file:///usr/share/awesomewidgets/qml/General.qml
|
||||
|
||||
# custom QML UI classes
|
||||
AboutTab file:///usr//awesomewidgets/qml/AboutTab.qml
|
||||
AWExtensions file:///usr//awesomewidgets/qml/AWExtensions.qml
|
||||
AWInfoLabel file:///usr//awesomewidgets/qml/AWInfoLabel.qml
|
||||
AWTagSelector file:///usr//awesomewidgets/qml/AWTagSelector.qml
|
||||
AWTextEditor file:///usr//awesomewidgets/qml/AWTextEditor.qml
|
||||
BugReport file:///usr//awesomewidgets/qml/BugReport.qml
|
||||
ButtonSelector file:///usr//awesomewidgets/qml/ButtonSelector.qml
|
||||
CheckBoxSelector file:///usr//awesomewidgets/qml/CheckBoxSelector.qml
|
||||
ColorSelector file:///usr//awesomewidgets/qml/ColorSelector.qml
|
||||
ComboBoxSelector file:///usr//awesomewidgets/qml/ComboBoxSelector.qml
|
||||
ExportDialog file:///usr//awesomewidgets/qml/ExportDialog.qml
|
||||
FontSelector file:///usr//awesomewidgets/qml/FontSelector.qml
|
||||
HtmlDefaultFunctionsBar file:///usr//awesomewidgets/qml/HtmlDefaultFunctionsBar.qml
|
||||
HtmlEditorButton file:///usr//awesomewidgets/qml/HtmlEditorButton.qml
|
||||
HtmlEditorColor file:///usr//awesomewidgets/qml/HtmlEditorColor.qml
|
||||
HtmlEditorFont file:///usr//awesomewidgets/qml/HtmlEditorFont.qml
|
||||
ImportDialog file:///usr//awesomewidgets/qml/ImportDialog.qml
|
||||
IntegerSelector file:///usr//awesomewidgets/qml/IntegerSelector.qml
|
||||
LineSelector file:///usr//awesomewidgets/qml/LineSelector.qml
|
||||
AboutTab file:///usr/share/awesomewidgets/qml/AboutTab.qml
|
||||
AWExtensions file:///usr/share/awesomewidgets/qml/AWExtensions.qml
|
||||
AWInfoLabel file:///usr/share/awesomewidgets/qml/AWInfoLabel.qml
|
||||
AWTagSelector file:///usr/share/awesomewidgets/qml/AWTagSelector.qml
|
||||
AWTextEditor file:///usr/share/awesomewidgets/qml/AWTextEditor.qml
|
||||
BugReport file:///usr/share/awesomewidgets/qml/BugReport.qml
|
||||
ButtonSelector file:///usr/share/awesomewidgets/qml/ButtonSelector.qml
|
||||
CheckBoxSelector file:///usr/share/awesomewidgets/qml/CheckBoxSelector.qml
|
||||
ColorSelector file:///usr/share/awesomewidgets/qml/ColorSelector.qml
|
||||
ComboBoxSelector file:///usr/share/awesomewidgets/qml/ComboBoxSelector.qml
|
||||
ExportDialog file:///usr/share/awesomewidgets/qml/ExportDialog.qml
|
||||
FontSelector file:///usr/share/awesomewidgets/qml/FontSelector.qml
|
||||
HtmlDefaultFunctionsBar file:///usr/share/awesomewidgets/qml/HtmlDefaultFunctionsBar.qml
|
||||
HtmlEditorButton file:///usr/share/awesomewidgets/qml/HtmlEditorButton.qml
|
||||
HtmlEditorColor file:///usr/share/awesomewidgets/qml/HtmlEditorColor.qml
|
||||
HtmlEditorFont file:///usr/share/awesomewidgets/qml/HtmlEditorFont.qml
|
||||
ImportDialog file:///usr/share/awesomewidgets/qml/ImportDialog.qml
|
||||
IntegerSelector file:///usr/share/awesomewidgets/qml/IntegerSelector.qml
|
||||
LineSelector file:///usr/share/awesomewidgets/qml/LineSelector.qml
|
||||
|
||||
@ -21,7 +21,7 @@ import QtQuick.Controls 1.3 as QtControls
|
||||
import org.kde.plasma.private.awesomewidget 1.0
|
||||
|
||||
|
||||
Item {
|
||||
PlasmoidItem {
|
||||
id: tooltipPage
|
||||
// backend
|
||||
AWActions {
|
||||
|
||||
Reference in New Issue
Block a user