/**************************************************************************** Copyright (C) 2013 by Eike Hein <hein@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, write to the ** Free Software Foundation, Inc., ** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . ****************************************************************************/import QtQuick 2.0import QtQuick.Controls 1.4 as QQC1import QtQuick.Controls 2.5import QtQuick.Layouts 1.12import org.kde.kirigami 2.4 as Kirigamiimport org.kde.plasma.core 2.0 as PlasmaCoreimport org.kde.plasma.private.taskmanager 0.1 as TaskManagerAppletItem {width: childrenRect.widthheight: childrenRect.heightproperty alias cfg_groupingStrategy: groupingStrategy.currentIndexproperty alias cfg_groupedTaskVisualization: groupedTaskVisualization.currentIndexproperty alias cfg_groupPopups: groupPopups.checkedproperty alias cfg_onlyGroupWhenFull: onlyGroupWhenFull.checkedproperty alias cfg_sortingStrategy: sortingStrategy.currentIndexproperty alias cfg_separateLaunchers: separateLaunchers.checkedproperty alias cfg_middleClickAction: middleClickAction.currentIndexproperty alias cfg_wheelEnabled: wheelEnabled.checkedproperty alias cfg_showOnlyCurrentScreen: showOnlyCurrentScreen.checkedproperty alias cfg_showOnlyCurrentDesktop: showOnlyCurrentDesktop.checkedproperty alias cfg_showOnlyCurrentActivity: showOnlyCurrentActivity.checkedproperty alias cfg_showOnlyMinimized: showOnlyMinimized.checkedproperty alias cfg_minimizeActiveTaskOnClick: minimizeActive.checkedTaskManagerApplet.Backend {id: backend}Kirigami.FormLayout {anchors.left: parent.leftanchors.right: parent.right// TODO: port to QQC2 version once we've fixed https://bugs.kde.org/show_bug.cgi?id=403153QQC1.ComboBox {id: groupingStrategyKirigami.FormData.label: i18n("Group:")Layout.fillWidth: truemodel: [i18n("Do not group"), i18n("By program name")]}// TODO: port to QQC2 version once we've fixed https://bugs.kde.org/show_bug.cgi?id=403153QQC1.ComboBox {id: groupedTaskVisualizationKirigami.FormData.label: i18n("Clicking grouped task:")Layout.fillWidth: true// FIXME: minimum width once this is ported to QQC2Layout.preferredWidth: Kirigami.Units.gridUnit * 14enabled: groupingStrategy.currentIndex !== 0model: [i18nc("Completes the sentence 'Clicking grouped task cycles through tasks' ", "Cycles through tasks"),i18nc("Completes the sentence 'Clicking grouped task shows tooltip window thumbnails' ", "Shows tooltip window thumbnails"),i18nc("Completes the sentence 'Clicking grouped task shows 'Present Windows' effect' ", "Shows 'Present Windows' effect"),i18nc("Completes the sentence 'Clicking grouped task shows textual list' ", "Shows textual list"),]}// "You asked for Tooltips but Tooltips are disabled" messageKirigami.InlineMessage {Layout.fillWidth: truevisible: groupedTaskVisualization.currentIndex === 1 && !plasmoid.configuration.showToolTips && backend.canPresentWindows()type: Kirigami.MessageType.Warningtext: i18n("Tooltips are disabled, so the 'Present Windows' effect will be displayed instead.")}// "You asked for Tooltips but Tooltips are disabled and Present Windows is not available" messageKirigami.InlineMessage {Layout.fillWidth: truevisible: groupedTaskVisualization.currentIndex === 1 && !plasmoid.configuration.showToolTips && !backend.canPresentWindows()type: Kirigami.MessageType.Warningtext: i18n("Tooltips are disabled, and the 'Present Windows' effect is not enabled or otherwise available right now, so a textual list will be displayed instead")}// "You asked for Present Windows but Present Windows is not available" messageKirigami.InlineMessage {Layout.fillWidth: truevisible: groupedTaskVisualization.currentIndex === 2 && !backend.canPresentWindows()type: Kirigami.MessageType.Warningtext: i18n("The 'Present Windows' effect is not enabled or otherwise available right now, so a textual list will be displayed instead.")}Item {Kirigami.FormData.isSection: true}CheckBox {id: groupPopupsvisible: (plasmoid.pluginName !== "org.kde.plasma.icontasks")text: i18n("Combine into single button")enabled: groupingStrategy.currentIndex > 0}CheckBox {id: onlyGroupWhenFullvisible: (plasmoid.pluginName !== "org.kde.plasma.icontasks")text: i18n("Group only when the Task Manager is full")enabled: groupingStrategy.currentIndex > 0 && groupPopups.checked}Item {Kirigami.FormData.isSection: truevisible: (plasmoid.pluginName !== "org.kde.plasma.icontasks")}// TODO: port to QQC2 version once we've fixed https://bugs.kde.org/show_bug.cgi?id=403153QQC1.ComboBox {id: sortingStrategyvisible: (plasmoid.pluginName !== "org.kde.plasma.icontasks")Kirigami.FormData.label: i18n("Sort:")Layout.fillWidth: truemodel: [i18n("Do not sort"), i18n("Manually"), i18n("Alphabetically"), i18n("By desktop"), i18n("By activity")]}CheckBox {id: separateLaunchersvisible: (plasmoid.pluginName !== "org.kde.plasma.icontasks")text: i18n("Keep launchers separate")enabled: sortingStrategy.currentIndex == 1}Item {Kirigami.FormData.isSection: truevisible: (plasmoid.pluginName !== "org.kde.plasma.icontasks")}CheckBox {id: minimizeActiveKirigami.FormData.label: i18nc("Part of a sentence: 'Clicking active task minimizes the task'", "Clicking active task:")text: i18nc("Part of a sentence: 'Clicking active task minimizes the task'", "Minimizes the task")}// TODO: port to QQC2 version once we've fixed https://bugs.kde.org/show_bug.cgi?id=403153QQC1.ComboBox {id: middleClickActionKirigami.FormData.label: i18n("Middle-clicking any task:")Layout.fillWidth: truemodel: [i18nc("Part of a sentence: 'Middle-clicking any task does nothing'", "Does nothing"),i18nc("Part of a sentence: 'Middle-clicking any task closes window or group'", "Closes window or group"),i18nc("Part of a sentence: 'Middle-clicking any task opens a new instance'", "Opens a new instance"),i18nc("Part of a sentence: 'Middle-clicking any task minimizes/restores window or group'", "Minimizes/Restores window or group"),i18nc("Part of a sentence: 'Middle-clicking any task toggles grouping'", "Toggles grouping"),i18nc("Part of a sentence: 'Middle-clicking any task brings it to the current virtual desktop'", "Brings it to the current virtual desktop")]}Item {Kirigami.FormData.isSection: true}CheckBox {id: wheelEnabledKirigami.FormData.label: i18nc("Part of a sentence: 'Mouse wheel cycles through tasks'", "Mouse wheel:")text: i18nc("Part of a sentence: 'Mouse wheel cycles through tasks'", "Cycles through tasks")}Item {Kirigami.FormData.isSection: true}CheckBox {id: showOnlyCurrentScreenKirigami.FormData.label: i18n("Show only tasks:")text: i18n("From current screen")}CheckBox {id: showOnlyCurrentDesktoptext: i18n("From current desktop")}CheckBox {id: showOnlyCurrentActivitytext: i18n("From current activity")}CheckBox {id: showOnlyMinimizedtext: i18n("That are minimized")}}}