mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-16 07:09:58 +00:00
port widget to dbus
This commit is contained in:
@ -15,9 +15,9 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick.Dialogs 1.2 as QtDialogs
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import org.kde.plasma.private.awesomewidget 1.0
|
||||
|
||||
@ -40,25 +40,25 @@ Row {
|
||||
signal unlock
|
||||
signal showMessage(string message)
|
||||
|
||||
QtControls.Button {
|
||||
Button {
|
||||
width: parent.width * 3 / 15
|
||||
text: i18n("Edit bars")
|
||||
onClicked: backend.editItem("graphicalitem")
|
||||
}
|
||||
|
||||
QtControls.Button {
|
||||
Button {
|
||||
width: parent.width * 3 / 15
|
||||
text: i18n("Formatters")
|
||||
onClicked: awPairConfig.showFormatterDialog(backend.dictKeys(true))
|
||||
}
|
||||
|
||||
QtControls.Button {
|
||||
Button {
|
||||
width: parent.width * 3 / 15
|
||||
text: i18n("User keys")
|
||||
onClicked: awPairConfig.showKeysDialog(backend.dictKeys(true))
|
||||
}
|
||||
|
||||
QtControls.Button {
|
||||
Button {
|
||||
width: parent.width * 5 / 15
|
||||
text: i18n("Preview")
|
||||
onClicked: {
|
||||
@ -68,30 +68,31 @@ Row {
|
||||
}
|
||||
}
|
||||
|
||||
QtControls.Button {
|
||||
width: parent.width / 15
|
||||
iconName: "view-history"
|
||||
menu: QtControls.Menu {
|
||||
id: historyConfig
|
||||
Instantiator {
|
||||
model: awTelemetryHandler.get("awwidgetconfig")
|
||||
QtControls.MenuItem {
|
||||
text: modelData
|
||||
onTriggered: textArea.text = modelData
|
||||
}
|
||||
onObjectAdded: historyConfig.insertItem(index, object)
|
||||
onObjectRemoved: historyConfig.removeItem(object)
|
||||
}
|
||||
}
|
||||
}
|
||||
// TODO migrate history
|
||||
// Button {
|
||||
// width: parent.width / 15
|
||||
// iconName: "view-history"
|
||||
// menu: Menu {
|
||||
// id: historyConfig
|
||||
// Instantiator {
|
||||
// model: awTelemetryHandler.get("awwidgetconfig")
|
||||
// MenuItem {
|
||||
// text: modelData
|
||||
// onTriggered: textArea.text = modelData
|
||||
// }
|
||||
// onObjectAdded: historyConfig.insertItem(index, object)
|
||||
// onObjectRemoved: historyConfig.removeItem(object)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
QtDialogs.MessageDialog {
|
||||
MessageDialog {
|
||||
id: compiledText
|
||||
modality: Qt.NonModal
|
||||
title: i18n("Preview")
|
||||
}
|
||||
|
||||
onShowMessage: {
|
||||
onShowMessage: message => {
|
||||
compiledText.text = message.split(" ").join(" ") // replaceAll lols
|
||||
compiledText.open()
|
||||
}
|
||||
|
@ -15,11 +15,11 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
|
||||
|
||||
QtControls.Label {
|
||||
Label {
|
||||
width: parent.width
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
@ -15,8 +15,8 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
|
||||
|
||||
Row {
|
||||
@ -30,7 +30,7 @@ Row {
|
||||
property var textArea
|
||||
property alias groups: tagGroups.model
|
||||
|
||||
QtControls.ComboBox {
|
||||
ComboBox {
|
||||
id: tagGroups
|
||||
width: parent.width * 2 / 5
|
||||
textRole: "label"
|
||||
@ -41,12 +41,12 @@ Row {
|
||||
}
|
||||
}
|
||||
|
||||
QtControls.ComboBox {
|
||||
ComboBox {
|
||||
id: tags
|
||||
width: parent.width * 1 / 5
|
||||
}
|
||||
|
||||
QtControls.Button {
|
||||
Button {
|
||||
width: parent.width * 1 / 5
|
||||
text: i18n("Add")
|
||||
|
||||
@ -57,7 +57,7 @@ Row {
|
||||
}
|
||||
}
|
||||
|
||||
QtControls.Button {
|
||||
Button {
|
||||
width: parent.width * 1 / 5
|
||||
text: i18n("Show value")
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
|
||||
|
||||
Item {
|
||||
@ -26,7 +26,7 @@ Item {
|
||||
property var backend
|
||||
property alias text: textArea.text
|
||||
|
||||
QtControls.TextArea {
|
||||
TextArea {
|
||||
id: textArea
|
||||
anchors.fill: parent
|
||||
textFormat: TextEdit.PlainText
|
||||
|
@ -15,77 +15,79 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick.Layouts 1.0 as QtLayouts
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
|
||||
Column {
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
property var textProvider
|
||||
|
||||
QtControls.TabView {
|
||||
height: parent.height
|
||||
TabBar {
|
||||
id: bar
|
||||
width: parent.width
|
||||
TabButton {
|
||||
text: i18n("About")
|
||||
}
|
||||
TabButton {
|
||||
text: i18n("Acknowledgment")
|
||||
}
|
||||
}
|
||||
|
||||
QtControls.Tab {
|
||||
anchors.margins: 10.0
|
||||
title: i18n("About")
|
||||
StackLayout {
|
||||
width: parent.width
|
||||
currentIndex: bar.currentIndex
|
||||
|
||||
QtLayouts.ColumnLayout {
|
||||
QtControls.Label {
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: textProvider.getAboutText("header")
|
||||
}
|
||||
ColumnLayout {
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: textProvider.getAboutText("header")
|
||||
}
|
||||
|
||||
QtControls.Label {
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: textProvider.getAboutText("version")
|
||||
}
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: textProvider.getAboutText("version")
|
||||
}
|
||||
|
||||
QtControls.Label {
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignJustify
|
||||
text: textProvider.getAboutText("description")
|
||||
}
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignJustify
|
||||
text: textProvider.getAboutText("description")
|
||||
}
|
||||
|
||||
QtControls.Label {
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
textFormat: Text.RichText
|
||||
text: textProvider.getAboutText("links")
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
}
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
textFormat: Text.RichText
|
||||
text: textProvider.getAboutText("links")
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
}
|
||||
|
||||
QtControls.Label {
|
||||
QtLayouts.Layout.fillHeight: true
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
font.capitalization: Font.SmallCaps
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignBottom
|
||||
textFormat: Text.RichText
|
||||
text: textProvider.getAboutText("copy")
|
||||
}
|
||||
Label {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
font.capitalization: Font.SmallCaps
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignBottom
|
||||
textFormat: Text.RichText
|
||||
text: textProvider.getAboutText("copy")
|
||||
}
|
||||
}
|
||||
|
||||
QtControls.Tab {
|
||||
anchors.margins: 10.0
|
||||
title: i18n("Acknowledgment")
|
||||
|
||||
QtLayouts.ColumnLayout {
|
||||
QtControls.Label {
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
ColumnLayout {
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.WordWrap
|
||||
horizontalAlignment: Text.AlignJustify
|
||||
text: textProvider.getAboutText("translators")
|
||||
}
|
||||
|
||||
QtControls.Label {
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.WordWrap
|
||||
horizontalAlignment: Text.AlignJustify
|
||||
textFormat: Text.RichText
|
||||
@ -93,9 +95,9 @@ Column {
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
}
|
||||
|
||||
QtControls.Label {
|
||||
QtLayouts.Layout.fillHeight: true
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
Label {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
wrapMode: Text.WordWrap
|
||||
horizontalAlignment: Text.AlignJustify
|
||||
verticalAlignment: Text.AlignTop
|
||||
@ -104,6 +106,5 @@ Column {
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,15 +15,15 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick.Dialogs 1.2 as QtDialogs
|
||||
import QtQuick.Layouts 1.2 as QtLayouts
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Dialogs
|
||||
import QtQuick.Layouts
|
||||
|
||||
import org.kde.plasma.private.awesomewidget 1.0
|
||||
|
||||
|
||||
QtDialogs.Dialog {
|
||||
Dialog {
|
||||
id: reportDialog
|
||||
AWActions {
|
||||
id: awActions
|
||||
@ -38,85 +38,85 @@ QtDialogs.Dialog {
|
||||
|
||||
|
||||
title: i18n("Report a bug")
|
||||
standardButtons: QtDialogs.StandardButton.Ok | QtDialogs.StandardButton.Cancel | QtDialogs.StandardButton.Reset
|
||||
standardButtons: DialogButtonBox.Ok | DialogButtonBox.Cancel | DialogButtonBox.Reset
|
||||
|
||||
QtLayouts.ColumnLayout {
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
QtControls.TextField {
|
||||
TextField {
|
||||
id: title
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
Layout.fillWidth: true
|
||||
placeholderText: i18n("Report subject")
|
||||
}
|
||||
QtLayouts.ColumnLayout {
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
|
||||
QtControls.GroupBox {
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
GroupBox {
|
||||
Layout.fillWidth: true
|
||||
height: parent.height / 5
|
||||
title: i18n("Description")
|
||||
QtControls.TextArea {
|
||||
TextArea {
|
||||
id: description
|
||||
anchors.fill: parent
|
||||
textFormat: TextEdit.PlainText
|
||||
}
|
||||
}
|
||||
QtControls.GroupBox {
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
GroupBox {
|
||||
Layout.fillWidth: true
|
||||
height: parent.height / 5
|
||||
title: i18n("Steps to reproduce")
|
||||
QtControls.TextArea {
|
||||
TextArea {
|
||||
id: reproduce
|
||||
anchors.fill: parent
|
||||
textFormat: TextEdit.PlainText
|
||||
}
|
||||
}
|
||||
QtControls.GroupBox {
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
GroupBox {
|
||||
Layout.fillWidth: true
|
||||
height: parent.height / 5
|
||||
title: i18n("Expected result")
|
||||
QtControls.TextArea {
|
||||
TextArea {
|
||||
id: expected
|
||||
anchors.fill: parent
|
||||
textFormat: TextEdit.PlainText
|
||||
}
|
||||
}
|
||||
QtControls.GroupBox {
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
QtLayouts.Layout.alignment: Qt.AlignBottom
|
||||
GroupBox {
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
title: i18n("Logs")
|
||||
QtLayouts.ColumnLayout {
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
Layout.fillWidth: true
|
||||
Row {
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
QtControls.Label {
|
||||
Layout.fillWidth: true
|
||||
Label {
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignJustify
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
wrapMode: Text.WordWrap
|
||||
text: i18n("Use command")
|
||||
}
|
||||
QtControls.TextField {
|
||||
TextField {
|
||||
width: parent.width * 3 / 5
|
||||
readOnly: true
|
||||
text: "QT_LOGGING_RULES=*=true plasmawindowed org.kde.plasma.awesomewidget"
|
||||
}
|
||||
}
|
||||
QtControls.Button {
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
Button {
|
||||
Layout.fillWidth: true
|
||||
text: i18n("Load log file")
|
||||
onClicked: logPath.open()
|
||||
}
|
||||
QtControls.TextArea {
|
||||
TextArea {
|
||||
id: logBody
|
||||
QtLayouts.Layout.fillWidth: true
|
||||
QtLayouts.Layout.alignment: Qt.AlignBottom
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
textFormat: TextEdit.PlainText
|
||||
}
|
||||
}
|
||||
|
||||
QtDialogs.FileDialog {
|
||||
FileDialog {
|
||||
id: logPath
|
||||
title: i18n("Open log file")
|
||||
onAccepted:
|
||||
|
@ -15,28 +15,27 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
|
||||
property alias text: label.text
|
||||
property alias value: button.text
|
||||
property alias style: button.style
|
||||
property alias background: button.background
|
||||
|
||||
signal buttonActivated
|
||||
|
||||
QtControls.Label {
|
||||
Label {
|
||||
id: label
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
QtControls.Button {
|
||||
Button {
|
||||
id: button
|
||||
width: parent.width * 3 / 5
|
||||
onClicked: buttonActivated()
|
||||
|
@ -9,4 +9,4 @@ configure_file(${SUBPROJECT_QMLDIR_IN} ${CMAKE_CURRENT_SOURCE_DIR}/../awesome-wi
|
||||
configure_file(${SUBPROJECT_QMLDIR_IN} ${CMAKE_CURRENT_SOURCE_DIR}/../desktop-panel/package/contents/ui/qmldir)
|
||||
|
||||
# install
|
||||
install(FILES ${SUBPROJECT_SOURCE} DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/qml)
|
||||
install(FILES ${SUBPROJECT_SOURCE} DESTINATION ${KDE_INSTALL_FULL_DATADIR}/${PROJECT_NAME}/qml)
|
||||
|
@ -15,8 +15,8 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
|
||||
|
||||
Row {
|
||||
@ -26,11 +26,11 @@ Row {
|
||||
property alias text: checkBox.text
|
||||
property alias checked: checkBox.checked
|
||||
|
||||
QtControls.Label {
|
||||
Label {
|
||||
height: parent.heigth
|
||||
width: parent.width * 2 / 5
|
||||
}
|
||||
QtControls.CheckBox {
|
||||
CheckBox {
|
||||
id: checkBox
|
||||
width: parent.width * 3 / 5
|
||||
}
|
||||
|
@ -15,32 +15,22 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls.Styles 1.3 as QtStyles
|
||||
import QtQuick.Dialogs 1.1 as QtDialogs
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Dialogs
|
||||
|
||||
|
||||
Row {
|
||||
height: implicitHeight
|
||||
width: parent.width
|
||||
ButtonSelector {
|
||||
// TODO somehow doesn't work
|
||||
// background: Rectangle {
|
||||
// color: value
|
||||
// }
|
||||
|
||||
property alias text: selector.text
|
||||
property alias value: selector.value
|
||||
onButtonActivated: colorDialog.visible = true
|
||||
|
||||
ButtonSelector {
|
||||
id: selector
|
||||
style: QtStyles.ButtonStyle {
|
||||
background: Rectangle {
|
||||
color: value
|
||||
}
|
||||
}
|
||||
onButtonActivated: colorDialog.visible = true
|
||||
}
|
||||
|
||||
QtDialogs.ColorDialog {
|
||||
ColorDialog {
|
||||
id: colorDialog
|
||||
title: i18n("Select a color")
|
||||
color: value
|
||||
onAccepted: value = colorDialog.color
|
||||
selectedColor: value
|
||||
onAccepted: value = selectedColor
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,8 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
|
||||
|
||||
Row {
|
||||
@ -32,14 +32,14 @@ Row {
|
||||
|
||||
signal valueEdited(string newValue)
|
||||
|
||||
QtControls.Label {
|
||||
Label {
|
||||
id: label
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
QtControls.ComboBox {
|
||||
ComboBox {
|
||||
id: comboBox
|
||||
width: parent.width * 3 / 5
|
||||
textRole: 'label'
|
||||
@ -47,7 +47,7 @@ Row {
|
||||
Component.onCompleted: {
|
||||
var total = comboBox.model.length
|
||||
for (var i = 0; i < total; i++) {
|
||||
if (comboBox.model[i]["name"] == value)
|
||||
if (comboBox.model[i]["name"] === value)
|
||||
comboBox.currentIndex = i
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,8 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Dialogs 1.2 as QtDialogs
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import org.kde.plasma.private.awesomewidget 1.0
|
||||
|
||||
@ -28,16 +28,15 @@ Item {
|
||||
id: awConfig
|
||||
}
|
||||
|
||||
QtDialogs.MessageDialog {
|
||||
MessageDialog {
|
||||
id: messageDialog
|
||||
standardButtons: QtDialogs.StandardButton.Ok
|
||||
}
|
||||
|
||||
QtDialogs.FileDialog {
|
||||
FileDialog {
|
||||
id: fileDialog
|
||||
selectExisting: false
|
||||
fileMode: FileDialog.SaveFile
|
||||
title: i18n("Export")
|
||||
folder: awConfig.configurationDirectory()
|
||||
currentFolder: awConfig.configurationDirectory()
|
||||
onAccepted: {
|
||||
var status = awConfig.exportConfiguration(
|
||||
configuration,
|
||||
|
@ -15,8 +15,8 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Dialogs 1.1 as QtDialogs
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Dialogs
|
||||
|
||||
|
||||
Row {
|
||||
@ -35,15 +35,15 @@ Row {
|
||||
}
|
||||
}
|
||||
|
||||
QtDialogs.FontDialog {
|
||||
FontDialog {
|
||||
id: fontDialog
|
||||
title: i18n("Select a font")
|
||||
|
||||
signal setFont
|
||||
|
||||
onAccepted: value = fontDialog.font.family
|
||||
onAccepted: value = selectedFont.family
|
||||
onSetFont: {
|
||||
fontDialog.font = Qt.font({
|
||||
selectedFont = Qt.font({
|
||||
family: value,
|
||||
pointSize: 12,
|
||||
italic: false,
|
||||
|
@ -16,8 +16,10 @@
|
||||
***************************************************************************/
|
||||
|
||||
pragma Singleton
|
||||
import QtQuick 2.0
|
||||
import QtQuick 2.15
|
||||
|
||||
// required by i18n functions
|
||||
import org.kde.plasma.core as PlasmaCore
|
||||
|
||||
QtObject {
|
||||
property variant fontWeight: {
|
||||
|
@ -15,7 +15,7 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick 2.15
|
||||
|
||||
|
||||
Row {
|
||||
@ -41,35 +41,35 @@ Row {
|
||||
// new line
|
||||
HtmlEditorButton {
|
||||
width: parent.width / 15
|
||||
iconName: "format-indent-more"
|
||||
icon.name: "format-indent-more"
|
||||
textField: textArea
|
||||
end: "<br>\n"
|
||||
}
|
||||
// font properties
|
||||
HtmlEditorButton {
|
||||
width: parent.width / 15
|
||||
iconName: "format-text-bold"
|
||||
icon.name: "format-text-bold"
|
||||
textField: textArea
|
||||
start: "<b>"
|
||||
end: "</b>"
|
||||
}
|
||||
HtmlEditorButton {
|
||||
width: parent.width / 15
|
||||
iconName: "format-text-italic"
|
||||
icon.name: "format-text-italic"
|
||||
textField: textArea
|
||||
start: "<i>"
|
||||
end: "</i>"
|
||||
}
|
||||
HtmlEditorButton {
|
||||
width: parent.width / 15
|
||||
iconName: "format-text-underline"
|
||||
icon.name: "format-text-underline"
|
||||
textField: textArea
|
||||
start: "<u>"
|
||||
end: "</u>"
|
||||
}
|
||||
HtmlEditorButton {
|
||||
width: parent.width / 15
|
||||
iconName: "format-text-strikethrough"
|
||||
icon.name: "format-text-strikethrough"
|
||||
textField: textArea
|
||||
start: "<s>"
|
||||
end: "</s>"
|
||||
@ -78,28 +78,28 @@ Row {
|
||||
// indentation
|
||||
HtmlEditorButton {
|
||||
width: parent.width / 15
|
||||
iconName: "format-justify-left"
|
||||
icon.name: "format-justify-left"
|
||||
textField: textArea
|
||||
start: "<p align=\"left\">"
|
||||
end: "</p>"
|
||||
}
|
||||
HtmlEditorButton {
|
||||
width: parent.width / 15
|
||||
iconName: "format-justify-center"
|
||||
icon.name: "format-justify-center"
|
||||
textField: textArea
|
||||
start: "<p align=\"center\">"
|
||||
end: "</p>"
|
||||
}
|
||||
HtmlEditorButton {
|
||||
width: parent.width / 15
|
||||
iconName: "format-justify-right"
|
||||
icon.name: "format-justify-right"
|
||||
textField: textArea
|
||||
start: "<p align=\"right\">"
|
||||
end: "</p>"
|
||||
}
|
||||
HtmlEditorButton {
|
||||
width: parent.width / 15
|
||||
iconName: "format-justify-fill"
|
||||
icon.name: "format-justify-fill"
|
||||
textField: textArea
|
||||
start: "<p align=\"justify\">"
|
||||
end: "</p>"
|
||||
|
@ -15,11 +15,11 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
|
||||
|
||||
QtControls.Button {
|
||||
Button {
|
||||
// parent object in which text will be replaced
|
||||
property var textField
|
||||
// start and end tags
|
||||
|
@ -15,8 +15,8 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1 as QtDialogs
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Dialogs
|
||||
|
||||
|
||||
HtmlEditorButton {
|
||||
@ -24,7 +24,7 @@ HtmlEditorButton {
|
||||
|
||||
clickedEvent: function() { return colorDialog.open() }
|
||||
|
||||
QtDialogs.ColorDialog {
|
||||
ColorDialog {
|
||||
id: colorDialog
|
||||
title: i18n("Select a color")
|
||||
|
||||
|
@ -15,14 +15,14 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick 2.15
|
||||
|
||||
import org.kde.plasma.private.awesomewidget 1.0
|
||||
|
||||
|
||||
HtmlEditorButton {
|
||||
end: "</span>"
|
||||
iconName: "font"
|
||||
icon.name: "font"
|
||||
text: i18n("Font")
|
||||
|
||||
// backend
|
||||
|
@ -15,9 +15,9 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick.Dialogs 1.2 as QtDialogs
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Dialogs
|
||||
|
||||
import org.kde.plasma.private.awesomewidget 1.0
|
||||
|
||||
@ -29,28 +29,28 @@ Item {
|
||||
|
||||
signal configurationReceived(var configuration)
|
||||
|
||||
QtDialogs.FileDialog {
|
||||
FileDialog {
|
||||
id: fileDialog
|
||||
title: i18n("Import")
|
||||
folder: awConfig.configurationDirectory()
|
||||
currentFolder: awConfig.configurationDirectory()
|
||||
onAccepted: importSelection.open()
|
||||
}
|
||||
|
||||
QtDialogs.Dialog {
|
||||
Dialog {
|
||||
id: importSelection
|
||||
|
||||
Column {
|
||||
QtControls.CheckBox {
|
||||
CheckBox {
|
||||
id: importPlasmoid
|
||||
text: i18n("Import plasmoid settings")
|
||||
}
|
||||
|
||||
QtControls.CheckBox {
|
||||
CheckBox {
|
||||
id: importExtensions
|
||||
text: i18n("Import extensions")
|
||||
}
|
||||
|
||||
QtControls.CheckBox {
|
||||
CheckBox {
|
||||
id: importAdds
|
||||
text: i18n("Import additional files")
|
||||
}
|
||||
|
@ -15,8 +15,8 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
|
||||
|
||||
Row {
|
||||
@ -26,22 +26,22 @@ Row {
|
||||
property alias text: label.text
|
||||
property alias value: spinBox.value
|
||||
|
||||
property alias maximumValue: spinBox.maximumValue
|
||||
property alias minimumValue: spinBox.minimumValue
|
||||
property alias maximumValue: spinBox.to
|
||||
property alias minimumValue: spinBox.from
|
||||
property alias stepSize: spinBox.stepSize
|
||||
|
||||
signal valueEdited(int newValue)
|
||||
|
||||
QtControls.Label {
|
||||
Label {
|
||||
id: label
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
QtControls.SpinBox {
|
||||
SpinBox {
|
||||
id: spinBox
|
||||
width: parent.width * 3 / 5
|
||||
onEditingFinished: valueEdited(spinBox.value)
|
||||
onValueModified: valueEdited(spinBox.value)
|
||||
}
|
||||
}
|
||||
|
@ -15,8 +15,8 @@
|
||||
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
|
||||
***************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 1.3 as QtControls
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls
|
||||
|
||||
|
||||
Row {
|
||||
@ -28,14 +28,14 @@ Row {
|
||||
|
||||
signal valueEdited(string newValue)
|
||||
|
||||
QtControls.Label {
|
||||
Label {
|
||||
id: label
|
||||
height: parent.height
|
||||
width: parent.width * 2 / 5
|
||||
horizontalAlignment: Text.AlignRight
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
QtControls.TextField {
|
||||
TextField {
|
||||
id: textField
|
||||
width: parent.width * 3 / 5
|
||||
onEditingFinished: valueEdited(textField.text)
|
||||
|
@ -3,25 +3,25 @@
|
||||
|
||||
|
||||
# common QML constants
|
||||
singleton General 1.0 file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/General.qml
|
||||
singleton General 1.0 file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/General.qml
|
||||
|
||||
# custom QML UI classes
|
||||
AboutTab file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/AboutTab.qml
|
||||
AWExtensions file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/AWExtensions.qml
|
||||
AWInfoLabel file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/AWInfoLabel.qml
|
||||
AWTagSelector file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/AWTagSelector.qml
|
||||
AWTextEditor file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/AWTextEditor.qml
|
||||
BugReport file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/BugReport.qml
|
||||
ButtonSelector file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/ButtonSelector.qml
|
||||
CheckBoxSelector file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/CheckBoxSelector.qml
|
||||
ColorSelector file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/ColorSelector.qml
|
||||
ComboBoxSelector file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/ComboBoxSelector.qml
|
||||
ExportDialog file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/ExportDialog.qml
|
||||
FontSelector file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/FontSelector.qml
|
||||
HtmlDefaultFunctionsBar file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/HtmlDefaultFunctionsBar.qml
|
||||
HtmlEditorButton file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/HtmlEditorButton.qml
|
||||
HtmlEditorColor file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/HtmlEditorColor.qml
|
||||
HtmlEditorFont file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/HtmlEditorFont.qml
|
||||
ImportDialog file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/ImportDialog.qml
|
||||
IntegerSelector file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/IntegerSelector.qml
|
||||
LineSelector file://@CMAKE_INSTALL_PREFIX@/@DATA_INSTALL_DIR@/@PROJECT_NAME@/qml/LineSelector.qml
|
||||
AboutTab file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/AboutTab.qml
|
||||
AWExtensions file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/AWExtensions.qml
|
||||
AWInfoLabel file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/AWInfoLabel.qml
|
||||
AWTagSelector file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/AWTagSelector.qml
|
||||
AWTextEditor file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/AWTextEditor.qml
|
||||
BugReport file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/BugReport.qml
|
||||
ButtonSelector file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/ButtonSelector.qml
|
||||
CheckBoxSelector file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/CheckBoxSelector.qml
|
||||
ColorSelector file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/ColorSelector.qml
|
||||
ComboBoxSelector file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/ComboBoxSelector.qml
|
||||
ExportDialog file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/ExportDialog.qml
|
||||
FontSelector file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/FontSelector.qml
|
||||
HtmlDefaultFunctionsBar file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/HtmlDefaultFunctionsBar.qml
|
||||
HtmlEditorButton file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/HtmlEditorButton.qml
|
||||
HtmlEditorColor file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/HtmlEditorColor.qml
|
||||
HtmlEditorFont file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/HtmlEditorFont.qml
|
||||
ImportDialog file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/ImportDialog.qml
|
||||
IntegerSelector file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/IntegerSelector.qml
|
||||
LineSelector file://@KDE_INSTALL_FULL_DATADIR@/@PROJECT_NAME@/qml/LineSelector.qml
|
||||
|
Reference in New Issue
Block a user