shift-shell/kwinmultitasking/contents/ui/main.qml

66 lines
1.6 KiB
QML
Raw Normal View History

/********************************************************************
This file is part of the KDE project.
Copyright (C) 2015 Marco MArtin <mart@kde.org>
This program 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.
This program 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
2015-06-04 21:08:27 +00:00
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kwin 2.0;
Item {
id: root
2019-12-12 15:52:53 +00:00
function peekWindowList(amount) {
switcher.view.contentY = amount;
switcher.visible = true;
//panelLoader.item.raise();
}
2015-06-04 21:08:27 +00:00
function showWindowList() {
2019-12-12 15:52:53 +00:00
switcher.open();
//panelLoader.item.raise();
2015-06-04 22:14:26 +00:00
}
function closeWindowList() {
2019-12-12 15:52:53 +00:00
switcher.close();
2015-06-04 21:08:27 +00:00
}
2019-12-12 15:52:53 +00:00
Switcher {
id: switcher
}
Connections {
target: workspace
onCurrentDesktopChanged: {
2019-12-12 15:52:53 +00:00
if (!switcher) {
mainItemLoader.source = "switcher.qml";
}
2019-12-12 15:52:53 +00:00
switcher.visible = true;
}
}
2015-06-04 21:08:27 +00:00
Loader {
id: panelLoader
}
Component.onCompleted: {
panelLoader.source = "panel.qml"
}
}