/** Copyright 2013 David Edmundson <davidedmundson@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 2.010-1301, USA.*/import QtQuick 2.0import QtQuick.Layouts 1.1import QtQuick.Controls 1.0 as QtControlsimport org.kde.plasma.core 2.0 as PlasmaCoreimport org.kde.plasma.components 2.0 as PlasmaComponentsimport org.kde.kquickcontrolsaddons 2.0 as KQuickAddonsColumnLayout {property string cfg_icon: plasmoid.configuration.iconproperty alias cfg_switchTabsOnHover: switchTabsOnHoverCheckbox.checkedproperty alias cfg_showAppsByName: showApplicationsByNameCheckbox.checkedproperty alias cfg_useExtraRunners: useExtraRunners.checkedspacing: units.smallSpacingRowLayout {spacing: units.smallSpacingQtControls.Label {text: i18n("Icon:")}QtControls.Button {id: iconButtonLayout.minimumWidth: units.iconSizes.large + units.smallSpacing * 2Layout.maximumWidth: Layout.minimumWidthLayout.minimumHeight: Layout.minimumWidthLayout.maximumHeight: Layout.minimumWidthKQuickAddons.IconDialog {id: iconDialogonIconNameChanged: cfg_icon = iconName || "start-here-kde" // TODO use actual default}// just to provide some visual feedback, cannot have checked without checkable enabledcheckable: trueonClicked: {checked = Qt.binding(function() { // never actually allow it being checkedreturn iconMenu.status === PlasmaComponents.DialogStatus.Open})iconMenu.open(0, height)}PlasmaCore.IconItem {anchors.centerIn: parentwidth: units.iconSizes.largeheight: widthsource: cfg_icon}}// QQC Menu can only be opened at cursor position, not a random onePlasmaComponents.ContextMenu {id: iconMenuvisualParent: iconButtonPlasmaComponents.MenuItem {text: i18nc("@item:inmenu Open icon chooser dialog", "Choose...")icon: "document-open-folder"onClicked: iconDialog.open()}PlasmaComponents.MenuItem {text: i18nc("@item:inmenu Reset icon to default", "Clear Icon")icon: "edit-clear"onClicked: cfg_icon = "start-here-kde" // TODO reset to actual default}}}QtControls.CheckBox {id: switchTabsOnHoverCheckboxtext: i18n("Switch tabs on hover")}QtControls.CheckBox {id: showApplicationsByNameCheckboxtext: i18n("Show applications by name")}QtControls.CheckBox {id: useExtraRunnerstext: i18n("Expand search to bookmarks, files and emails")}Item {//spacerLayout.fillHeight: true}}