Warning, /plasma/wacomtablet/src/applet/package/contents/ui/RotationButton.qml is written in an unsupported language. File is not indexed.

0001 // -*- coding: iso-8859-1 -*-
0002 /*
0003  *   Copyright 2015 Weng Xuetian <wengxt@gmail.com>
0004  *
0005  *   This program is free software; you can redistribute it and/or modify
0006  *   it under the terms of the GNU Library General Public License as
0007  *   published by the Free Software Foundation; either version 2 or
0008  *   (at your option) any later version.
0009  *
0010  *   This program is distributed in the hope that it will be useful,
0011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  *   GNU General Public License for more details
0014  *
0015  *   You should have received a copy of the GNU Library General Public
0016  *   License along with this program; if not, write to the
0017  *   Free Software Foundation, Inc.,
0018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
0019  */
0020 import QtQuick
0021 import QtQuick.Layouts
0022 import org.kde.plasma.plasmoid
0023 import org.kde.plasma.components as PC3
0024 
0025 PC3.ToolButton {
0026     property string rotation;
0027 
0028     onClicked : {
0029         if (tabletComboBox.currentIndex < 0) {
0030             return;
0031         }
0032         var service = dataSource.serviceForSource("wacomtablet");
0033         var operation = service.operationDescription("SetRotation");
0034         operation.tabletId = dataModel.get(tabletComboBox.currentIndex).id;
0035         operation.rotation = rotation
0036         service.startOperationCall(operation);
0037     }
0038 }