introduce Debug Ability

pull/21/head
Michail Vourlakos 4 years ago
parent ac2ccc1358
commit 169b7d6aae

@ -0,0 +1,35 @@
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.7
import org.kde.plasma.plasmoid 2.0
import org.kde.latte.abilities.containers 0.1 as ContainerAbility
import org.kde.latte.abilities.definitions 0.1 as AbilityDefinition
ContainerAbility.Debug {
graphicsEnabled: Qt.application.arguments.indexOf("--graphics")>=0
inputMaskEnabled: Qt.application.arguments.indexOf("--input")>=0
layouterEnabled: Qt.application.arguments.indexOf("--layouter")>=0
localGeometryEnabled: Qt.application.arguments.indexOf("--localgeometry")>=0
spacersEnabled: Qt.application.arguments.indexOf("--spacers")>=0
timersEnabled: Qt.application.arguments.indexOf("--timers")>=0
windowEnabled: Qt.application.arguments.indexOf("--with-window")>=0
overloadedIconsEnabled: Qt.application.arguments.indexOf("--overloaded-icons")>=0
}

@ -289,6 +289,7 @@ Item {
readonly property alias wrapper: _wrapper
property Item animations: null
property Item debug: null
property Item indexer: null
property Item layouter: null
property Item metrics: null

@ -117,6 +117,7 @@ Item{
readonly property Item actions: Actions{}
readonly property Item applet: mainCommunicator.requires
readonly property Item debug: appletItem.debug.publicApi
readonly property Item metrics: appletItem.metrics.publicApi
readonly property Item userRequests: appletItem.userRequests

@ -40,7 +40,7 @@ import "editmode" as EditMode
import "indicators" as Indicators
import "layouts" as Layouts
import "./background" as Background
import "./debug" as Debug
import "./debugger" as Debugger
import "../code/LayoutManager.js" as LayoutManager
Item {
@ -381,8 +381,9 @@ Item {
property Item latteApplet
readonly property alias animations: _animations
readonly property alias background: _background
readonly property alias autosize: _autosize
readonly property alias background: _background
readonly property alias debug: _debug
readonly property alias indexer: _indexer
readonly property alias indicatorsManager: indicators
readonly property alias layouter: _layouter
@ -1256,6 +1257,7 @@ Item {
id: appletContainerComponent
Applet.AppletItem{
animations: _animations
debug: _debug
indexer: _indexer
layouter: _layouter
metrics: _metrics
@ -1296,7 +1298,7 @@ Item {
Loader{
active: root.debugModeWindow
sourceComponent: Debug.DebugWindow{}
sourceComponent: Debugger.DebugWindow{}
}
Item {
@ -1479,6 +1481,10 @@ Item {
visibility: visibilityManager
}
Ability.Debug {
id: _debug
}
Ability.Indexer {
id: _indexer
layouts: layoutsContainer

@ -0,0 +1,42 @@
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.0
import org.kde.latte.abilities.definitions 0.1 as AbilityDefinition
AbilityDefinition.Debug {
property Item bridge: null
graphicsEnabled: ref.debug.graphicsEnabled
inputMaskEnabled: ref.debug.inputMaskEnabled
layouterEnabled: ref.debug.layouterEnabled
localGeometryEnabled: ref.debug.localGeometryEnabled
spacersEnabled: ref.debug.spacersEnabled
timersEnabled: ref.debug.timersEnabled
windowEnabled: ref.debug.windowEnabled
overloadedIconsEnabled: ref.debug.overloadedIconsEnabled
readonly property AbilityDefinition.Debug local: AbilityDefinition.Debug {}
Item {
id: ref
readonly property Item debug: bridge ? bridge.debug : local
}
}

@ -1,6 +1,7 @@
module org.kde.latte.abilities.applets
Animations 0.1 Animations.qml
Debug 0.1 Debug.qml
Indexer 0.1 Indexer.qml
Metrics 0.1 Metrics.qml
ParabolicEffect 0.1 ParabolicEffect.qml

@ -0,0 +1,37 @@
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.0
import org.kde.latte.abilities.definitions 0.1 as AbilityDefinition
AbilityDefinition.Debug {
id: apis
readonly property Item publicApi: Item {
readonly property alias graphicsEnabled: apis.graphicsEnabled
readonly property alias inputMaskEnabled: apis.inputMaskEnabled
readonly property alias layouterEnabled: apis.layouterEnabled
readonly property alias localGeometryEnabled: apis.localGeometryEnabled
readonly property alias spacersEnabled: apis.spacersEnabled
readonly property alias timersEnabled: apis.timersEnabled
readonly property alias windowEnabled: apis.windowEnabled
readonly property alias overloadedIconsEnabled: apis.overloadedIconsEnabled
}
}

@ -1,5 +1,6 @@
module org.kde.latte.abilities.containers
Animations 0.1 Animations.qml
Debug 0.1 Debug.qml
Metrics 0.1 Metrics.qml
ParabolicEffect 0.1 ParabolicEffect.qml

@ -0,0 +1,31 @@
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.0
Item {
property bool graphicsEnabled: false
property bool inputMaskEnabled: false
property bool layouterEnabled: false
property bool localGeometryEnabled: false
property bool spacersEnabled: false
property bool timersEnabled: false
property bool windowEnabled: false
property bool overloadedIconsEnabled: false
}

@ -2,6 +2,7 @@ module org.kde.latte.abilities.definitions
Animations 0.1 Animations.qml
AppletRequirements 0.1 AppletRequirements.qml
Debug 0.1 Debug.qml
Indexer 0.1 Indexer.qml
Metrics 0.1 Metrics.qml
ParabolicEffect 0.1 ParabolicEffect.qml

@ -934,6 +934,11 @@ Item {
bridge: latteBridge
}
AppletAbility.Debug {
id: _debug
bridge: latteBridge
}
Ability.Indexer {
id: _indexer
bridge: latteBridge
@ -1255,6 +1260,7 @@ Item {
orientation: plasmoid.formFactor === PlasmaCore.Types.Vertical ? Qt.Vertical : Qt.Horizontal
delegate: Task.TaskItem{
animations: _animations
debug: _debug
indexer: _indexer
launchers: _launchers
metrics: _metrics

@ -185,6 +185,7 @@ MouseArea{
//abilities
property Item animations: null
property Item debug: null
property Item indexer: null
property Item launchers: null
property Item metrics: null

Loading…
Cancel
Save