From 181b39ddd0b3c027341b228ab51482ce4413d3bb Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Thu, 10 Mar 2016 13:54:07 +0100 Subject: add scaling unit to the theme plugin and use it instaed of the main.qml unit item --- framework/theme/unit.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 framework/theme/unit.h (limited to 'framework/theme/unit.h') diff --git a/framework/theme/unit.h b/framework/theme/unit.h new file mode 100644 index 00000000..bd9b58f0 --- /dev/null +++ b/framework/theme/unit.h @@ -0,0 +1,38 @@ +/* + Copyright (C) 2016 Michael Bohlender + + 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. +*/ + +#include + + +class Unit : public QObject +{ + Q_OBJECT + Q_PROPERTY (int size READ size NOTIFY unitChanged) + + +public: + explicit Unit(QObject *parent = Q_NULLPTR); + + int size() const; + +signals: + void unitChanged(); + +private: + int m_size; +}; -- cgit v1.2.3