Commit b5bfdc9c authored by Chupligin Sergey's avatar Chupligin Sergey

[Theme] migrate colors to new Theme class

parent 4de110a2
......@@ -54,11 +54,11 @@ Page {
anchors.centerIn: parent
Button {
property bool isGlacier: Theme.name == "Glacier"
property bool isGlacier: true
anchors.margins: 20
text: isGlacier ? "Set Ugly Theme" : "Set Nice Theme"
onClicked: isGlacier ? Theme.loadFromFile("ugly.json")
: Theme.loadFromFile("glacier.json")
onClicked: isGlacier ? Theme.loadTheme("ugly")
: Theme.loadTheme("glacier")
}
Button {
......
......@@ -6,75 +6,76 @@ import QtQuick.Controls.Styles.Nemo 1.0
Page {
id: root
headerTools: HeaderToolsLayout {
showBackButton: true;
title: "Roller"
}
headerTools: HeaderToolsLayout { showBackButton: true; title: "Label" }
allowedOrientations: Qt.PortraitOrientation | Qt.LandscapeOrientation | Qt.InvertedLandscapeOrientation | Qt.InvertedPortraitOrientation
ListModel {
id: animalsModel
ListElement { name: "Ant";}
ListElement { name: "Flea"; }
ListElement { name: "Parrot"; }
ListElement { name: "Guinea pig";}
ListElement { name: "Rat";}
ListElement { name: "Butterfly";}
ListElement { name: "Dog";}
ListElement { name: "Cat";}
ListElement { name: "Pony";}
ListElement { name: "Koala";}
ListElement { name: "Horse";}
ListElement { name: "Tiger";}
ListElement { name: "Giraffe";}
ListElement { name: "Elephant";}
ListElement { name: "Whale";}
}
GlacierRoller {
id: simpleRoller
width: parent.width
Column {
spacing: 40
anchors{
top: parent.top
topMargin: 40
fill: parent;
}
clip: true
model: animalsModel
label: qsTr("Choose your favorite animal")
delegate: GlacierRollerItem{
Text{
height: simpleRoller.itemHeight
text: name
color: "white"
font.pixelSize: 32
font.bold: (simpleRoller.activated && simpleRoller.currentIndex === index)
}
ListModel {
id: animalsModel
ListElement { name: "Ant";}
ListElement { name: "Flea"; }
ListElement { name: "Parrot"; }
ListElement { name: "Guinea pig";}
ListElement { name: "Rat";}
ListElement { name: "Butterfly";}
ListElement { name: "Dog";}
ListElement { name: "Cat";}
ListElement { name: "Pony";}
ListElement { name: "Koala";}
ListElement { name: "Horse";}
ListElement { name: "Tiger";}
ListElement { name: "Giraffe";}
ListElement { name: "Elephant";}
ListElement { name: "Whale";}
}
}
GlacierRoller {
id: simpleRoller2
width: parent.width
anchors{
top: simpleRoller.bottom
topMargin: 40
GlacierRoller {
id: simpleRoller
width: parent.width
anchors{
top: parent.top
topMargin: 40
}
clip: true
model: animalsModel
label: qsTr("Choose your favorite animal")
delegate: GlacierRollerItem{
Text{
height: simpleRoller.itemHeight
text: name
color: "white"
font.pixelSize: 32
font.bold: (simpleRoller.activated && simpleRoller.currentIndex === index)
}
}
}
clip: true
model: animalsModel
label: qsTr("Choose your second favorite animal")
GlacierRoller {
id: simpleRoller2
width: parent.width
anchors{
top: simpleRoller.bottom
topMargin: 40
}
clip: true
model: animalsModel
label: qsTr("Choose your second favorite animal")
delegate: GlacierRollerItem{
Text{
height: simpleRoller2.itemHeight
text: name
color: "white"
font.pixelSize: 32
font.bold: (simpleRoller2.activated && simpleRoller2.currentIndex === index)
delegate: GlacierRollerItem{
Text{
height: simpleRoller2.itemHeight
text: name
color: "white"
font.pixelSize: 32
font.bold: (simpleRoller2.activated && simpleRoller2.currentIndex === index)
}
}
}
}
......
......@@ -71,13 +71,11 @@ Page {
TextField {
anchors.margins: size.dp(20)
text: "Text input"
//style: touchStyle
}
TextField {
anchors.margins: size.dp(20)
text: "Readonly Text input"
//style: touchStyle
readOnly: true
}
......
Name: qt5-qtquickcontrols-nemo
Summary: Nemomobile Qt Quick Controls
Version: 5.2.0
Version: 5.3.0
Release: nemo1
Group: Qt/Qt
License: LGPLv2.1 with exception or GPLv3
......
......@@ -43,7 +43,7 @@ NemoWindow {
//is this safe? can there be some situation in which it's neither portrait nor landscape?
readonly property int isUiLandscape: !isUiPortrait
readonly property var _bgColor: Theme.window.background
readonly property var _bgColor: Theme.backgroundColor
color: _bgColor
//README: allowedOrientations' default value is set in NemoWindow's c++ implementation
......@@ -226,7 +226,7 @@ NemoWindow {
property: "x"
from: target.width
to: 0
duration: Theme.pageStack.transitionDuration
duration: 500
easing.type: Easing.OutQuad
}
PropertyAnimation {
......@@ -234,7 +234,7 @@ NemoWindow {
property: "x"
from: 0
to: -target.width
duration: Theme.pageStack.transitionDuration
duration: 500
easing.type: Easing.OutQuad
}
}
......@@ -246,7 +246,7 @@ NemoWindow {
property: "x"
from: -target.width
to: 0
duration: Theme.pageStack.transitionDuration
duration: 500
easing.type: Easing.OutQuad
}
PropertyAnimation {
......@@ -254,7 +254,7 @@ NemoWindow {
property: "x"
from: 0
to: target.width
duration: Theme.pageStack.transitionDuration
duration: 500
easing.type: Easing.OutQuad
}
}
......@@ -287,16 +287,16 @@ NemoWindow {
anchors.right: isUiPortrait ? parent.right : undefined
anchors.bottom: isUiPortrait ? undefined : parent.bottom
//we only set the size in one orientation, the anchors will take care of the other
width: if (!isUiPortrait) Theme.header.dimmer.height
height: if (isUiPortrait) Theme.header.dimmer.height
width: if (!isUiPortrait) Theme.itemHeightExtraSmall/2
height: if (isUiPortrait) Theme.itemHeightExtraSmall/2
//MAKE SURE THAT THE HEIGHT SPECIFIED BY THE THEME IS AN EVEN NUMBER, TO AVOID ROUNDING ERRORS IN THE LAYOUT
Rectangle {
id: headerDimmer
anchors.centerIn: parent
gradient: Gradient {
GradientStop { position: Theme.header.dimmer.startPosition; color: Theme.header.dimmer.startColor }
GradientStop { position: Theme.header.dimmer.endPosition; color: Theme.header.dimmer.endColor }
GradientStop { position: 0; color: Theme.backgroundColor }
GradientStop { position: 1; color: "transparent" }
}
}
}
......@@ -324,7 +324,7 @@ NemoWindow {
}
PropertyChanges {
target: headerDimmer
height: Theme.header.dimmer.height
height: Theme.itemHeightExtraSmall/2
width: parent.width
rotation: 0
}
......@@ -342,7 +342,7 @@ NemoWindow {
}
PropertyChanges {
target: headerDimmer
height: Theme.header.dimmer.height
height: Theme.itemHeightExtraSmall/2
width: parent.height
rotation: -90
}
......@@ -360,7 +360,7 @@ NemoWindow {
}
PropertyChanges {
target: headerDimmer
height: Theme.header.dimmer.height
height: Theme.itemHeightExtraSmall/2
width: parent.width
rotation: 0
}
......@@ -378,7 +378,7 @@ NemoWindow {
}
PropertyChanges {
target: headerDimmer
height: Theme.header.dimmer.height
height: Theme.itemHeightExtraSmall/2
width: parent.height
rotation: -90
}
......
......@@ -19,7 +19,7 @@
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
Button {
......
/****************************************************************************************
**
** Copyright (C) 2014 Aleksi Suomalainen <suomalainen.aleksi@gmail.com>
** Copyright (C) 2017 Sergey Chupligin <neochapay@gmail.com>
** All rights reserved.
**
** You may use this file under the terms of BSD license as follows:
......
......@@ -149,14 +149,14 @@ Item {
SequentialAnimation {
id: changeToolsLayoutAnim
NumberAnimation { id: fadeOut; target: root; property: "opacity"; to: 0;
duration: Theme.pageStack.transitionDuration/2; easing.type: Easing.OutQuad; loops: !toolBarLayout ? 0 : 1 }
duration: 250; easing.type: Easing.OutQuad; loops: !toolBarLayout ? 0 : 1 }
//headerTools may change now, so we have to close the drawer
ScriptAction { script: closeDrawer() }
ScriptAction { script: updateHeaderTools() }
//tell the (maybe new) layout that we're its container
ScriptAction { script: propagateHeaderReference() }
NumberAnimation { id: fadeIn; target: root; property: "opacity"; to: 1;
duration: Theme.pageStack.transitionDuration/2; easing.type: Easing.OutQuad; loops: !toolBarLayout ? 0 : 1 }
duration: 250; easing.type: Easing.OutQuad; loops: !toolBarLayout ? 0 : 1 }
}
......@@ -181,7 +181,7 @@ Item {
anchors.right: parent.right
//README: the rest of the anchors/sizes will be set by AnchorChanges!
color: Theme.header.background
color: Theme.backgroundColor
FilteringMouseArea {
id: mouseArea
......@@ -305,7 +305,7 @@ Item {
Rectangle {
id: drawerContainer
color: Theme.header.background
color: Theme.backgroundColor
Binding on width {
value: drawer.width
......
......@@ -60,7 +60,7 @@ Item {
anchors.rightMargin: size.dp(20)
clip: true
font.family: Theme.fontFamily
color: Theme.label.color
color: Theme.textColor
font.pointSize: size.dp(24)
font.weight: Font.Bold
LinearGradient {
......@@ -71,7 +71,7 @@ Item {
start: Qt.point(0,0)
end: Qt.point(width,0)
gradient: Gradient { GradientStop { position: 0; color: "transparent"}
GradientStop {position: 0.9; color: Theme.header.background } }
GradientStop {position: 0.9; color: Theme.backgroundColor } }
}
}
......
......@@ -34,6 +34,6 @@ import QtQuick.Controls.Styles.Nemo 1.0
Text {
renderType: Text.NativeRendering
font.family: Theme.fontFamily
color: Theme.label.color
font.pointSize: size.dp(Theme.label.pointSize)
color: Theme.textColor
font.pointSize: size.dp(Theme.fontSizeLarge)
}
......@@ -70,7 +70,7 @@ NemoPage {
Rectangle {
id: background
anchors.fill: parent
color: Theme.page.background
color: Theme.backgroundColor
}
Item {
......
......@@ -30,7 +30,7 @@
****************************************************************************************/
import QtQuick 2.1
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Controls.Nemo 1.0
Item {
id: container
......@@ -49,7 +49,7 @@ Item {
targets: [circle0, circle1, circle2, circle3]
property: "opacity"
to: 1
duration: Theme.spinner.initialStateDuration
duration: 1500
}
PropertyAction { target: animations; property: "running"; value: true }
}
......@@ -63,14 +63,14 @@ Item {
PropertyAnimation {
targets: [circle0, circle1, circle2, circle3]
property: "color";
to: Theme.spinner.primaryColor
duration: Theme.spinner.transitionDuration
to: Theme.backgroundAccentColor
duration: 500
}
NumberAnimation {
targets: [circle0, circle1, circle2, circle3]
property: "opacity"
to: 0
duration: Theme.spinner.initialStateDuration
duration: 1500
}
}
}
......@@ -84,8 +84,8 @@ Item {
Item {
id: innerRect
anchors.centerIn: parent
width: Theme.spinner.radius + Theme.spinner.horizontalSpacing
height: Theme.spinner.radius + Theme.spinner.verticalSpacing
width: Theme.itemHeightExtraSmall + Theme.itemSpacingMedium
height: Theme.itemHeightExtraSmall + Theme.itemSpacingMedium
}
Rectangle {
......@@ -93,10 +93,10 @@ Item {
opacity: 0
anchors.horizontalCenter: innerRect.left
anchors.verticalCenter: innerRect.top
width: Theme.spinner.radius
height: Theme.spinner.radius
radius: Theme.spinner.radius / 2
color: Theme.spinner.primaryColor
width: Theme.itemHeightExtraSmall
height: Theme.itemHeightExtraSmall
radius: Theme.itemHeightExtraSmall / 2
color: Theme.backgroundAccentColor
}
Rectangle {
......@@ -104,10 +104,10 @@ Item {
opacity: 0
anchors.horizontalCenter: innerRect.right
anchors.verticalCenter: innerRect.top
width: Theme.spinner.radius
height: Theme.spinner.radius
radius: Theme.spinner.radius / 2
color: Theme.spinner.primaryColor
width: Theme.itemHeightExtraSmall
height: Theme.itemHeightExtraSmall
radius: Theme.itemHeightExtraSmall / 2
color: Theme.backgroundAccentColor
}
Rectangle {
......@@ -115,10 +115,10 @@ Item {
opacity: 0
anchors.horizontalCenter: innerRect.right
anchors.verticalCenter: innerRect.bottom
width: Theme.spinner.radius
height: Theme.spinner.radius
radius: Theme.spinner.radius / 2
color: Theme.spinner.primaryColor
width: Theme.itemHeightExtraSmall
height: Theme.itemHeightExtraSmall
radius: Theme.itemHeightExtraSmall / 2
color: Theme.backgroundAccentColor
}
Rectangle {
......@@ -126,10 +126,10 @@ Item {
opacity: 0
anchors.horizontalCenter: innerRect.left
anchors.verticalCenter: innerRect.bottom
width: Theme.spinner.radius
height: Theme.spinner.radius
radius: Theme.spinner.radius / 2
color: Theme.spinner.primaryColor
width: Theme.itemHeightExtraSmall
height: Theme.itemHeightExtraSmall
radius: Theme.itemHeightExtraSmall / 2
color: Theme.backgroundAccentColor
}
SequentialAnimation {
......@@ -139,14 +139,14 @@ Item {
PropertyAnimation {
target: circle0
property: "color"
to: Theme.spinner.secondaryColor
duration: Theme.spinner.transitionDuration
to: Theme.accentColor
duration: 500
}
PropertyAnimation {
target: circle3
property: "color"
to: Theme.spinner.primaryColor
duration: Theme.spinner.transitionDuration
to: Theme.backgroundAccentColor
duration: 500
}
}
......@@ -154,14 +154,14 @@ Item {
PropertyAnimation {
target: circle1
property: "color"
to: Theme.spinner.secondaryColor
duration: Theme.spinner.transitionDuration
to: Theme.accentColor
duration: 500
}
PropertyAnimation {
target: circle0
property: "color"
to: Theme.spinner.primaryColor
duration: Theme.spinner.transitionDuration
to: Theme.backgroundAccentColor
duration: 500
}
}
......@@ -169,14 +169,14 @@ Item {
PropertyAnimation {
target: circle2
property: "color"
to: Theme.spinner.secondaryColor
duration: Theme.spinner.transitionDuration
to: Theme.accentColor
duration: 500
}
PropertyAnimation {
target: circle1
property: "color"
to: Theme.spinner.primaryColor
duration: Theme.spinner.transitionDuration
to: Theme.backgroundAccentColor
duration: 500
}
}
......@@ -184,14 +184,14 @@ Item {
PropertyAnimation {
target: circle3
property: "color"
to: Theme.spinner.secondaryColor
duration: Theme.spinner.transitionDuration
to: Theme.accentColor
duration: 500
}
PropertyAnimation {
target: circle2
property: "color"
to: Theme.spinner.primaryColor
duration: Theme.spinner.transitionDuration
to: Theme.backgroundAccentColor
duration: 500
}
}
}
......
......@@ -19,9 +19,7 @@ QML_FILES += \
HeaderToolsLayout.qml \
Slider.qml\
ListView.qml \
ListViewItemWithActions.qml\
GlacierRoller.qml \
GlacierRollerItem.qml
ListViewItemWithActions.qml
OTHER_FILES += qmldir \
$$QML_FILES
......@@ -55,6 +53,7 @@ target.path = $$[QT_INSTALL_QML]/$$PLUGIN_IMPORT_PATH
qmlfiles.files = $$_PRO_FILE_PWD_/*.qml
qmlfiles.files += $$_PRO_FILE_PWD_/qmldir
qmlfiles.path = $$[QT_INSTALL_QML]/$$PLUGIN_IMPORT_PATH
images.files = $$_PRO_FILE_PWD_/images
images.path = $$[QT_INSTALL_QML]/$$PLUGIN_IMPORT_PATH
......
......@@ -26,6 +26,7 @@
#include "qquickfilteringmousearea.h"
#include "nemoimageprovider.h"
#include "sizing.h"
#include "theme.h"
QQuickNemoControlsExtensionPlugin::QQuickNemoControlsExtensionPlugin(QObject *parent) :
QQmlExtensionPlugin(parent)
......@@ -50,10 +51,12 @@ void QQuickNemoControlsExtensionPlugin::registerTypes(const char *uri)
void QQuickNemoControlsExtensionPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
{
Sizing *sizing = new Sizing();
Theme *theme = new Theme();
QQmlExtensionPlugin::initializeEngine(engine,uri);
QQmlContext* context = engine->rootContext();
context->setContextProperty("size",sizing);
context->setContextProperty("Theme",theme);
engine->addImageProvider(QLatin1String("theme"), new NemoImageProvider);
}
......
#include "theme.h"
#include "sizing.h"
Theme::Theme(QObject *parent) : QObject(parent)
{
Sizing *size = new Sizing;
m_dp = size->getDpScaleFactor();
//Load defaults
m_itemWidthLarge = 320*m_dp;
m_itemWidthMedium = 240*m_dp;
m_itemWidthSmall = 120*m_dp;
m_itemHeightHuge = 80*m_dp;
m_itemHeightExtraLarge = 75*m_dp;
m_itemHeightLarge = 63*m_dp;
m_itemHeightMedium = 50*m_dp;
m_itemHeightSmall = 40*m_dp;
m_itemHeightExtraSmall = 32*m_dp;
m_itemSpacingHuge = 40*m_dp;
m_itemSpacingLarge = 20*m_dp;
m_itemSpacingMedium = 15*m_dp;
m_itemSpacingSmall = 10*m_dp;
m_itemExtraSmall = 8*m_dp;
m_fontSizeExtraLarge = 30*m_dp;
m_fontSizeLarge = 24*m_dp;
m_fontSizeMedium = 20*m_dp;
m_fontSizeSmall = 18*m_dp;
m_fontSizeTiny = 16*m_dp;
m_fontWeightLarge = 63*m_dp;
m_fontWeightMedium = 25*m_dp;
m_fontFamily = "/usr/share/fonts/google-opensans/OpenSans-Regular.ttf";
m_accentColor = "#0091e5";
m_fillColor = "#474747";
m_fillDarkColor = "#313131";
m_textColor = "#ffffff";
m_backgroundColor = "#000000";
m_backgroundAccentColor = "#ffffff";
}
bool Theme::loadTheme(QString name)
......
......@@ -7,43 +7,151 @@ class Theme : public QObject
{
Q_OBJECT
Q_PROPERTY(qreal itemWidthLarge READ itemWidthLarge NOTIFY itemWidthLargeChanged)
Q_PROPERTY(qreal itemWidthMedium READ itemWidthMedium NOTIFY itemWidthMediumChanged)
Q_PROPERTY(qreal itemWidthSmall READ itemWidthSmall NOTIFY itemWidthSmallChanged)
Q_PROPERTY(qreal itemHeightHuge READ itemHeightHuge NOTIFY itemHeightHugeChanged)
Q_PROPERTY(qreal itemHeightExtraLarge READ itemHeightExtraLarge NOTIFY itemHeightExtraLargeChanged)
Q_PROPERTY(qreal itemHeightLarge READ itemHeightLarge NOTIFY itemHeightLargeChanged)
Q_PROPERTY(qreal itemHeightMedium READ itemHeightMedium NOTIFY itemHeightMediumChanged)
Q_PROPERTY(qreal itemHeightSmall READ itemHeightSmall NOTIFY itemHeightSmallChanged)
Q_PROPERTY(qreal itemHeightExtraSmall READ itemHeightExtraSmall NOTIFY itemHeightExtraSmallChanged)
Q_PROPERTY(qreal itemSpacingHuge READ itemSpacingHuge NOTIFY itemSpacingHugeChanged)
Q_PROPERTY(qreal itemSpacingLarge READ itemSpacingLarge NOTIFY itemSpacingLargeChanged)
Q_PROPERTY(qreal itemSpacingMedium READ itemSpacingMedium NOTIFY itemSpacingMediumChanged)
Q_PROPERTY(qreal itemSpacingSmall READ itemSpacingSmall NOTIFY itemSpacingSmallChanged)
Q_PROPERTY(qreal itemExtraSmall READ itemExtraSmall NOTIFY itemExtraSmallChanged)
Q_PROPERTY(int fontSizeExtraLarge READ fontSizeExtraLarge NOTIFY fontSizeExtraLargeChanged)
Q_PROPERTY(int fontSizeLarge READ fontSizeLarge NOTIFY fontSizeLargeChanged)
Q_PROPERTY(int fontSizeMedium READ fontSizeMedium NOTIFY fontSizeMediumChanged)
Q_PROPERTY(int fontSizeSmall READ fontSizeSmall NOTIFY fontSizeSmallChanged)
Q_PROPERTY(int fontSizeTiny READ fontSizeTiny NOTIFY fontSizeTinyChanged)
Q_PROPERTY(int fontWeightLarge READ fontWeightLarge NOTIFY fontWeightLargeChanged)
Q_PROPERTY(int fontWeightMedium READ fontWeightMedium NOTIFY fontWeightMediumChanged)
Q_PROPERTY(QString fontFamily READ fontFamily NOTIFY fontFamilyChanged)
Q_PROPERTY(QString accentColor READ accentColor NOTIFY accentColorChanged)
Q_PROPERTY(QString fillColor READ fillColor NOTIFY fillColorChanged)
Q_PROPERTY(QString fillDarkColor READ fillDarkColor NOTIFY fillDarkColorChanged)
Q_PROPERTY(QString textColor READ textColor NOTIFY textColorChanged)
Q_PROPERTY(QString backgroundColor READ backgroundColor NOTIFY backgroundColorChanged)
Q_PROPERTY(QString backgroundAccentColor READ backgroundAccentColor NOTIFY backgroundAccentColorChanged)
public:
explicit Theme(QObject *parent = 0);
bool loadTheme(QString name);
qreal itemWidthLarge(){return m_itemWidthLarge;}
qreal itemWidthMedium(){return m_itemWidthMedium;}
qreal itemWidthSmall(){return m_itemWidthSmall;}
qreal itemWidthLarge; //320
qreal itemWidthMedium; //240
qreal itemWidthSmall; //120
qreal itemHeightHuge; //80
qreal itemHeightExtraLarge; //75
qreal itemHeightLarge; //63
qreal itemHeightMedium; //50
qreal itemHeightSmall; //40
qreal itemSpacingHuge; //40
qreal itemSpacingLarge; //20
qreal itemSpacingMedium; //15
qreal itemSpacingSmall; //10
qreal itemExtraSmall; //8
int fontSizeExtraLarge; //30
int fontSizeLarge; //24
int fontSizeMedium; //20
int fontSizeSmall; //18
int fontSizeTiny; //16
QString accentColor; //#0091e5
QString fillColor; //#474747
QString fillDarkColor; //#313131
QString textColor; //#ffffff
QString backgroundColor; //#000000
qreal itemHeightHuge(){return m_itemHeightHuge;}
qreal itemHeightExtraLarge(){return m_itemHeightExtraLarge;}
qreal itemHeightLarge(){return m_itemHeightLarge;}
qreal itemHeightMedium(){return m_itemHeightMedium;}
qreal itemHeightSmall(){return m_itemHeightSmall;}
qreal itemHeightExtraSmall(){return m_itemHeightExtraSmall;}
qreal itemSpacingHuge(){return m_itemSpacingHuge;}
qreal itemSpacingLarge(){return m_itemSpacingLarge;}
qreal itemSpacingMedium(){return m_itemSpacingMedium;}
qreal itemSpacingSmall(){return m_itemSpacingSmall;}
qreal itemExtraSmall(){return m_itemExtraSmall;}
int fontSizeExtraLarge(){return m_fontSizeExtraLarge;}
int fontSizeLarge(){return m_fontSizeLarge;}
int fontSizeMedium(){return m_fontSizeMedium;}
int fontSizeSmall(){return m_fontSizeSmall;}
int fontSizeTiny(){return m_fontSizeTiny;}
int fontWeightLarge(){return m_fontWeightLarge;}
int fontWeightMedium(){return m_fontWeightMedium;}
QString fontFamily(){return m_fontFamily;}
QString accentColor(){return m_accentColor;}
QString fillColor(){return m_fillColor;}
QString fillDarkColor(){return m_fillDarkColor;}
QString textColor(){return m_textColor;}
QString backgroundColor(){return m_backgroundColor;}
QString backgroundAccentColor(){return m_backgroundAccentColor;}
signals:
void themeUpdate();
void itemWidthLargeChanged();
void itemWidthMediumChanged();
void itemWidthSmallChanged();
void itemHeightHugeChanged();
void itemHeightExtraLargeChanged();
void itemHeightLargeChanged();
void itemHeightMediumChanged();
void itemHeightSmallChanged();
void itemHeightExtraSmallChanged();
void itemSpacingHugeChanged();
void itemSpacingLargeChanged();
void itemSpacingMediumChanged();
void itemSpacingSmallChanged();
void itemExtraSmallChanged();
void fontSizeExtraLargeChanged();
void fontSizeLargeChanged();
void fontSizeMediumChanged();
void fontSizeSmallChanged();
void fontSizeTinyChanged();
void fontWeightLargeChanged();
void fontWeightMediumChanged();
void fontFamilyChanged();
void accentColorChanged();
void fillColorChanged();
void fillDarkColorChanged();
void textColorChanged();
void backgroundColorChanged();
void backgroundAccentColorChanged();
public slots:
private:
qreal m_itemWidthLarge; //320
qreal m_itemWidthMedium; //240
qreal m_itemWidthSmall; //120
qreal m_itemHeightHuge; //80
qreal m_itemHeightExtraLarge; //75
qreal m_itemHeightLarge; //63
qreal m_itemHeightMedium; //50
qreal m_itemHeightSmall; //40
qreal m_itemHeightExtraSmall; //32
qreal m_itemSpacingHuge; //40
qreal m_itemSpacingLarge; //20
qreal m_itemSpacingMedium; //15
qreal m_itemSpacingSmall; //10
qreal m_itemExtraSmall; //8
int m_fontSizeExtraLarge; //30
int m_fontSizeLarge; //24
int m_fontSizeMedium; //20
int m_fontSizeSmall; //18
int m_fontSizeTiny; //16
int m_fontWeightLarge; //63
int m_fontWeightMedium; //25
QString m_fontFamily; //???
QString m_accentColor; //#0091e5
QString m_fillColor; //#474747
QString m_fillDarkColor; //#313131
QString m_textColor; //#ffffff
QString m_backgroundColor; //#000000
QString m_backgroundAccentColor; //#ffffff
qreal m_dp;
};
#endif // THEME_H
......@@ -22,19 +22,18 @@ import QtQuick.Controls 1.0
import QtQuick.Controls.Styles 1.0
import QtGraphicalEffects 1.0
//Styles.Nemo provides Theme
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Controls.Nemo 1.0
ButtonStyle {
id: buttonstyle
// The background of the button.
background: Rectangle {
implicitWidth: size.dp(240)
implicitHeight: size.dp(50)
implicitWidth: Theme.itemWidthMedium
implicitHeight: Theme.itemHeightMedium
clip: true
color: control.primary ? Theme.primaryButton.background
: Theme.button.background
color: control.primary ? Theme.accentColor
: Theme.fillColor
Image {
id: disabledImg
anchors.fill: parent
......@@ -47,20 +46,20 @@ ButtonStyle {
RadialGradient {
x: control.pressX - width/2
y: control.pressY - height/2
width: Theme.button.pressedGradient.width
height: Theme.button.pressedGradient.height
width: Theme.itemWidthMedium
height: width
visible: control.pressed
gradient: Gradient {
GradientStop {
position: Theme.button.pressedGradient.center;
color: control.primary ? Theme.primaryButton.pressedGradient.centerColor
: Theme.button.pressedGradient.centerColor
position: 0.29
color: control.primary ? Theme.backgroundAccentColor
: Theme.accentColor
}
GradientStop {
position: Theme.button.pressedGradient.edge;
color: control.primary ? Theme.primaryButton.pressedGradient.edgeColor
: Theme.button.pressedGradient.edgeColor
position: 0.5;
color: control.primary ? Theme.accentColor
: "transparent"
}
}
}
......@@ -72,10 +71,10 @@ ButtonStyle {
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
text: control.text
color: Theme.button.text.color
color: Theme.textColor
font.family: Theme.fontFamily
font.pointSize: Theme.button.text.font.pointSize
font.weight: control.primary ? Theme.primaryButton.text.font.weight : Theme.button.text.font.weight
font.pointSize: Theme.fontSizeLarge
font.weight: control.primary ? Theme.fontWeightLarge : Theme.fontWeightMedium
opacity: control.enabled ? 1.0 : 0.3
}
}
......@@ -32,8 +32,6 @@
import QtQuick 2.1
import QtQuick.Controls.Styles 1.0
import QtQuick.Controls.Nemo 1.0
//Styles.Nemo provides Theme
import QtQuick.Controls.Styles.Nemo 1.0
CheckBoxStyle {
indicator: Rectangle {
......@@ -46,7 +44,7 @@ CheckBoxStyle {
id: back1
implicitWidth: size.dp(72)
implicitHeight: size.dp(28)
color: Theme.checkbox.back1
color: Theme.accentColor
anchors.centerIn: parent
}
......@@ -54,7 +52,7 @@ CheckBoxStyle {
id: back2
implicitWidth: size.dp(72)
implicitHeight: size.dp(28)
color: Theme.checkbox.back2
color: Theme.fillDarkColor
anchors.centerIn: parent
}
......
......@@ -18,17 +18,17 @@
*/
import QtQuick 2.1
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Controls.Nemo 1.0
Component {
Rectangle {
implicitHeight: size.dp(16)
implicitWidth: size.dp(440)
color: Theme.groove.background
color: Theme.fillColorDark
Rectangle {
antialiasing: true
radius: 1
color: Theme.groove.foreground
color: Theme.accentColor
height: parent.height
width: parent.width * control.value / control.maximumValue
}
......
......@@ -20,7 +20,7 @@
import QtQuick 2.1
import QtQuick.Controls.Styles 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Controls.Nemo 1.0
SliderStyle{
handle: Rectangle {
......
......@@ -19,14 +19,14 @@
import QtQuick 2.1
import QtQuick.Controls.Styles 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Controls.Nemo 1.0
TextFieldStyle {
selectedTextColor: Theme.textField.selectedTextColor
selectionColor: Theme.textField.selectionColor
textColor: Theme.textField.selectedTextColor
selectedTextColor: Theme.textColor
selectionColor: Theme.accentColor
textColor: Theme.textColor
font.pointSize: size.dp(14)
font.family: Theme.textField.font
font.family: Theme.fontFamily
background: Item {
anchors.leftMargin: size.dp(16)
......@@ -46,7 +46,7 @@ TextFieldStyle {
anchors.right: parent.right
height: 2
width: parent.width
color: control.readOnly ? "#313131" : Theme.textField.selectionColor
color: control.readOnly ? Theme.fillDarkColor : Theme.accentColor
}
}
}
......@@ -32,7 +32,7 @@ Style {
implicitWidth: size.dp(40)
Rectangle {
anchors.fill: parent
color: Theme.toolBar.background
color: Theme.backgroundColor
}
}
}
This diff is collapsed.
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEME_H
#define NEMOTHEME_H
#include <QtCore/QObject>
#include <QtCore/QString>
#include "nemothemebutton.h"
#include "nemothemegroove.h"
#include "nemothemetextfield.h"
#include "nemothemetoolbar.h"
#include "nemothemewindow.h"
#include "nemothemepage.h"
#include "nemothemepagestack.h"
#include "nemothemespinner.h"
#include "nemothemelabel.h"
#include "nemothemecheckbox.h"
#include "nemothemebuttonrow.h"
#include "nemothemeheader.h"
class NemoTheme: public QObject
{
Q_OBJECT
Q_PROPERTY(QString name READ name NOTIFY nameChanged)
Q_PROPERTY(QString description READ description NOTIFY descriptionChanged)
Q_PROPERTY(NemoThemeButton * button READ button CONSTANT)
Q_PROPERTY(NemoThemeButton * primaryButton READ primaryButton CONSTANT)
Q_PROPERTY(NemoThemeGroove * groove READ groove CONSTANT)
Q_PROPERTY(NemoThemeTextField * textField READ textField CONSTANT)
Q_PROPERTY(NemoThemeToolBar * toolBar READ toolBar CONSTANT)
Q_PROPERTY(NemoThemeWindow * window READ window CONSTANT)
Q_PROPERTY(NemoThemePage * page READ page CONSTANT)
Q_PROPERTY(NemoThemePageStack * pageStack READ pageStack CONSTANT)
Q_PROPERTY(NemoThemeSpinner * spinner READ spinner CONSTANT)
Q_PROPERTY(NemoThemeLabel * label READ label CONSTANT)
Q_PROPERTY(NemoThemeCheckbox * checkbox READ checkbox CONSTANT)
Q_PROPERTY(NemoThemeButtonRow * buttonRow READ buttonRow CONSTANT)
Q_PROPERTY(NemoThemeHeader * header READ header CONSTANT)
Q_PROPERTY(QString fontFamily READ fontFamily CONSTANT)
public:
explicit NemoTheme(QObject *parent = 0);
QString name() const;
void setName(const QString &name);
QString description() const;
void setDescription(const QString &description);
NemoThemeButton * button() const;
NemoThemeButton * primaryButton() const;
NemoThemeGroove * groove() const;
NemoThemeTextField * textField() const;
NemoThemeToolBar * toolBar() const;
NemoThemeWindow * window() const;
NemoThemePage * page() const;
NemoThemePageStack * pageStack() const;
NemoThemeSpinner * spinner() const;
NemoThemeLabel * label() const;
NemoThemeCheckbox * checkbox() const;
NemoThemeButtonRow * buttonRow() const;
NemoThemeHeader * header() const;
QString fontFamily() const;
public Q_SLOTS:
void loadFromFile(const QString &fileName);
Q_SIGNALS:
void nameChanged();
void descriptionChanged();
private:
QString m_name;
QString m_description;
NemoThemeButton * m_button;
NemoThemeButton * m_primaryButton;
NemoThemeGroove * m_groove;
NemoThemeTextField * m_textField;
NemoThemeToolBar * m_toolBar;
NemoThemeWindow * m_window;
NemoThemePage * m_page;
NemoThemePageStack * m_pageStack;
NemoThemeSpinner * m_spinner;
NemoThemeLabel * m_label;
NemoThemeCheckbox * m_checkbox;
NemoThemeButtonRow * m_buttonRow;
NemoThemeHeader * m_header;
QString m_fontFamily;
};
#endif //NEMOTHEME_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemebutton.h"
NemoThemeButton::NemoThemeButton(QObject *parent)
: QObject(parent)
, m_text(new NemoThemeButtonText(this))
, m_pressedGradient(new NemoThemeButtonPressedGradient(this))
{
}
QColor NemoThemeButton::background() const
{
return m_background;
}
void NemoThemeButton::setBackground(const QColor &background)
{
if (m_background != background) {
m_background = background;
emit backgroundChanged();
}
}
NemoThemeButtonText * NemoThemeButton::text() const
{
return m_text;
}
NemoThemeButtonPressedGradient * NemoThemeButton::pressedGradient() const
{
return m_pressedGradient;
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMEBUTTON_H
#define NEMOTHEMEBUTTON_H
#include <QtCore/QObject>
#include <QtGui/QColor>
#include "nemothemebuttontext.h"
#include "nemothemebuttonpressedgradient.h"
class NemoThemeButton: public QObject
{
Q_OBJECT
Q_PROPERTY(QColor background READ background NOTIFY backgroundChanged)
Q_PROPERTY(NemoThemeButtonText * text READ text CONSTANT)
Q_PROPERTY(NemoThemeButtonPressedGradient * pressedGradient READ pressedGradient CONSTANT)
public:
explicit NemoThemeButton(QObject *parent = 0);
QColor background() const;
void setBackground(const QColor &background);
NemoThemeButtonText * text() const;
NemoThemeButtonPressedGradient * pressedGradient() const;
Q_SIGNALS:
void backgroundChanged();
private:
QColor m_background;
NemoThemeButtonText * m_text;
NemoThemeButtonPressedGradient * m_pressedGradient;
};
#endif //NEMOTHEMEBUTTON_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemebuttonpressedgradient.h"
NemoThemeButtonPressedGradient::NemoThemeButtonPressedGradient(QObject *parent)
: QObject(parent)
, m_width(240)
, m_height(240)
, m_center(0.29)
, m_edge(0.5)
{
}
QColor NemoThemeButtonPressedGradient::centerColor() const
{
return m_centerColor;
}
void NemoThemeButtonPressedGradient::setCenterColor(const QColor &centerColor)
{
if (m_centerColor != centerColor) {
m_centerColor = centerColor;
emit centerColorChanged();
}
}
QColor NemoThemeButtonPressedGradient::edgeColor() const
{
return m_edgeColor;
}
void NemoThemeButtonPressedGradient::setEdgeColor(const QColor &edgeColor)
{
if (m_edgeColor != edgeColor) {
m_edgeColor = edgeColor;
emit edgeColorChanged();
}
}
int NemoThemeButtonPressedGradient::width() const
{
return m_width;
}
void NemoThemeButtonPressedGradient::setWidth(int width)
{
if (m_width != width) {
m_width = width;
emit widthChanged();
}
}
void NemoThemeButtonPressedGradient::setWidthDefault()
{
if (m_width != 240) {
m_width = 240;
emit widthChanged();
}
}
int NemoThemeButtonPressedGradient::height() const
{
return m_height;
}
void NemoThemeButtonPressedGradient::setHeight(int height)
{
if (m_height != height) {
m_height = height;
emit heightChanged();
}
}
void NemoThemeButtonPressedGradient::setHeightDefault()
{
if (m_height != 240) {
m_height = 240;
emit heightChanged();
}
}
double NemoThemeButtonPressedGradient::center() const
{
return m_center;
}
void NemoThemeButtonPressedGradient::setCenter(double center)
{
if (m_center != center) {
m_center = center;
emit centerChanged();
}
}
void NemoThemeButtonPressedGradient::setCenterDefault()
{
if (m_center != 0.29) {
m_center = 0.29;
emit centerChanged();
}
}
double NemoThemeButtonPressedGradient::edge() const
{
return m_edge;
}
void NemoThemeButtonPressedGradient::setEdge(double edge)
{
if (m_edge != edge) {
m_edge = edge;
emit edgeChanged();
}
}
void NemoThemeButtonPressedGradient::setEdgeDefault()
{
if (m_edge != 0.5) {
m_edge = 0.5;
emit edgeChanged();
}
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMEBUTTONPRESSEDGRADIENT_H
#define NEMOTHEMEBUTTONPRESSEDGRADIENT_H
#include <QtCore/QObject>
#include <QtGui/QColor>
class NemoThemeButtonPressedGradient: public QObject
{
Q_OBJECT
Q_PROPERTY(QColor centerColor READ centerColor NOTIFY centerColorChanged)
Q_PROPERTY(QColor edgeColor READ edgeColor NOTIFY edgeColorChanged)
Q_PROPERTY(int width READ width NOTIFY widthChanged)
Q_PROPERTY(int height READ height NOTIFY heightChanged)
Q_PROPERTY(double center READ center NOTIFY centerChanged)
Q_PROPERTY(double edge READ edge NOTIFY edgeChanged)
public:
explicit NemoThemeButtonPressedGradient(QObject *parent = 0);
QColor centerColor() const;
void setCenterColor(const QColor &centerColor);
QColor edgeColor() const;
void setEdgeColor(const QColor &edgeColor);
int width() const;
void setWidth(int width);
void setWidthDefault();
int height() const;
void setHeight(int height);
void setHeightDefault();
double center() const;
void setCenter(double center);
void setCenterDefault();
double edge() const;
void setEdge(double edge);
void setEdgeDefault();
Q_SIGNALS:
void centerColorChanged();
void edgeColorChanged();
void widthChanged();
void heightChanged();
void centerChanged();
void edgeChanged();
private:
QColor m_centerColor;
QColor m_edgeColor;
int m_width;
int m_height;
double m_center;
double m_edge;
};
#endif //NEMOTHEMEBUTTONPRESSEDGRADIENT_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemebuttonrow.h"
NemoThemeButtonRow::NemoThemeButtonRow(QObject *parent)
: QObject(parent)
{
}
QColor NemoThemeButtonRow::background() const
{
return m_background;
}
void NemoThemeButtonRow::setBackground(const QColor &background)
{
if (m_background != background) {
m_background = background;
emit backgroundChanged();
}
}
QColor NemoThemeButtonRow::buttonColor() const
{
return m_buttonColor;
}
void NemoThemeButtonRow::setButtonColor(const QColor &buttonColor)
{
if (m_buttonColor != buttonColor) {
m_buttonColor = buttonColor;
emit buttonColorChanged();
}
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMEBUTTONROW_H
#define NEMOTHEMEBUTTONROW_H
#include <QtCore/QObject>
#include <QtGui/QColor>
class NemoThemeButtonRow: public QObject
{
Q_OBJECT
Q_PROPERTY(QColor background READ background NOTIFY backgroundChanged)
Q_PROPERTY(QColor buttonColor READ buttonColor NOTIFY buttonColorChanged)
public:
explicit NemoThemeButtonRow(QObject *parent = 0);
QColor background() const;
void setBackground(const QColor &background);
QColor buttonColor() const;
void setButtonColor(const QColor &buttonColor);
Q_SIGNALS:
void backgroundChanged();
void buttonColorChanged();
private:
QColor m_background;
QColor m_buttonColor;
};
#endif //NEMOTHEMEBUTTONROW_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemebuttontext.h"
NemoThemeButtonText::NemoThemeButtonText(QObject *parent)
: QObject(parent)
, m_font(new NemoThemeFont(this))
{
}
QColor NemoThemeButtonText::color() const
{
return m_color;
}
void NemoThemeButtonText::setColor(const QColor &color)
{
if (m_color != color) {
m_color = color;
emit colorChanged();
}
}
NemoThemeFont * NemoThemeButtonText::font() const
{
return m_font;
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMEBUTTONTEXT_H
#define NEMOTHEMEBUTTONTEXT_H
#include <QtCore/QObject>
#include <QtGui/QColor>
#include "nemothemefont.h"
class NemoThemeButtonText: public QObject
{
Q_OBJECT
Q_PROPERTY(QColor color READ color NOTIFY colorChanged)
Q_PROPERTY(NemoThemeFont * font READ font CONSTANT)
public:
explicit NemoThemeButtonText(QObject *parent = 0);
QColor color() const;
void setColor(const QColor &color);
NemoThemeFont * font() const;
Q_SIGNALS:
void colorChanged();
private:
QColor m_color;
NemoThemeFont * m_font;
};
#endif //NEMOTHEMEBUTTONTEXT_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemecheckbox.h"
NemoThemeCheckbox::NemoThemeCheckbox(QObject *parent)
: QObject(parent)
{
}
QColor NemoThemeCheckbox::back1() const
{
return m_back1;
}
void NemoThemeCheckbox::setBack1(const QColor &back1)
{
if (m_back1 != back1) {
m_back1 = back1;
emit back1Changed();
}
}
QColor NemoThemeCheckbox::back2() const
{
return m_back2;
}
void NemoThemeCheckbox::setBack2(const QColor &back2)
{
if (m_back2 != back2) {
m_back2 = back2;
emit back2Changed();
}
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMECHECKBOX_H
#define NEMOTHEMECHECKBOX_H
#include <QtCore/QObject>
#include <QtGui/QColor>
class NemoThemeCheckbox: public QObject
{
Q_OBJECT
Q_PROPERTY(QColor back1 READ back1 NOTIFY back1Changed)
Q_PROPERTY(QColor back2 READ back2 NOTIFY back2Changed)
public:
explicit NemoThemeCheckbox(QObject *parent = 0);
QColor back1() const;
void setBack1(const QColor &back1);
QColor back2() const;
void setBack2(const QColor &back2);
Q_SIGNALS:
void back1Changed();
void back2Changed();
private:
QColor m_back1;
QColor m_back2;
};
#endif //NEMOTHEMECHECKBOX_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemefont.h"
NemoThemeFont::NemoThemeFont(QObject *parent)
: QObject(parent)
, m_pointSize(24)
, m_weight(25)
{
}
int NemoThemeFont::pointSize() const
{
return m_pointSize;
}
void NemoThemeFont::setPointSize(int pointSize)
{
if (m_pointSize != pointSize) {
m_pointSize = pointSize;
emit pointSizeChanged();
}
}
void NemoThemeFont::setPointSizeDefault()
{
if (m_pointSize != 24) {
m_pointSize = 24;
emit pointSizeChanged();
}
}
int NemoThemeFont::weight() const
{
return m_weight;
}
void NemoThemeFont::setWeight(int weight)
{
if (m_weight != weight) {
m_weight = weight;
emit weightChanged();
}
}
void NemoThemeFont::setWeightDefault()
{
if (m_weight != 25) {
m_weight = 25;
emit weightChanged();
}
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMEFONT_H
#define NEMOTHEMEFONT_H
#include <QtCore/QObject>
class NemoThemeFont: public QObject
{
Q_OBJECT
Q_PROPERTY(int pointSize READ pointSize NOTIFY pointSizeChanged)
Q_PROPERTY(int weight READ weight NOTIFY weightChanged)
public:
explicit NemoThemeFont(QObject *parent = 0);
int pointSize() const;
void setPointSize(int pointSize);
void setPointSizeDefault();
int weight() const;
void setWeight(int weight);
void setWeightDefault();
Q_SIGNALS:
void pointSizeChanged();
void weightChanged();
private:
int m_pointSize;
int m_weight;
};
#endif //NEMOTHEMEFONT_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemegroove.h"
NemoThemeGroove::NemoThemeGroove(QObject *parent)
: QObject(parent)
{
}
QColor NemoThemeGroove::background() const
{
return m_background;
}
void NemoThemeGroove::setBackground(const QColor &background)
{
if (m_background != background) {
m_background = background;
emit backgroundChanged();
}
}
QColor NemoThemeGroove::foreground() const
{
return m_foreground;
}
void NemoThemeGroove::setForeground(const QColor &foreground)
{
if (m_foreground != foreground) {
m_foreground = foreground;
emit foregroundChanged();
}
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMEGROOVE_H
#define NEMOTHEMEGROOVE_H
#include <QtCore/QObject>
#include <QtGui/QColor>
class NemoThemeGroove: public QObject
{
Q_OBJECT
Q_PROPERTY(QColor background READ background NOTIFY backgroundChanged)
Q_PROPERTY(QColor foreground READ foreground NOTIFY foregroundChanged)
public:
explicit NemoThemeGroove(QObject *parent = 0);
QColor background() const;
void setBackground(const QColor &background);
QColor foreground() const;
void setForeground(const QColor &foreground);
Q_SIGNALS:
void backgroundChanged();
void foregroundChanged();
private:
QColor m_background;
QColor m_foreground;
};
#endif //NEMOTHEMEGROOVE_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemeheader.h"
NemoThemeHeader::NemoThemeHeader(QObject *parent)
: QObject(parent)
, m_dimmer(new NemoThemeHeaderDimmer(this))
{
}
QColor NemoThemeHeader::background() const
{
return m_background;
}
void NemoThemeHeader::setBackground(const QColor &background)
{
if (m_background != background) {
m_background = background;
emit backgroundChanged();
}
}
NemoThemeHeaderDimmer * NemoThemeHeader::dimmer() const
{
return m_dimmer;
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMEHEADER_H
#define NEMOTHEMEHEADER_H
#include <QtCore/QObject>
#include <QtGui/QColor>
#include "nemothemeheaderdimmer.h"
class NemoThemeHeader: public QObject
{
Q_OBJECT
Q_PROPERTY(QColor background READ background NOTIFY backgroundChanged)
Q_PROPERTY(NemoThemeHeaderDimmer * dimmer READ dimmer CONSTANT)
public:
explicit NemoThemeHeader(QObject *parent = 0);
QColor background() const;
void setBackground(const QColor &background);
NemoThemeHeaderDimmer * dimmer() const;
Q_SIGNALS:
void backgroundChanged();
private:
QColor m_background;
NemoThemeHeaderDimmer * m_dimmer;
};
#endif //NEMOTHEMEHEADER_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemeheaderdimmer.h"
NemoThemeHeaderDimmer::NemoThemeHeaderDimmer(QObject *parent)
: QObject(parent)
, m_height(16)
, m_startPosition(0)
, m_endPosition(1.0)
{
}
QColor NemoThemeHeaderDimmer::startColor() const
{
return m_startColor;
}
void NemoThemeHeaderDimmer::setStartColor(const QColor &startColor)
{
if (m_startColor != startColor) {
m_startColor = startColor;
emit startColorChanged();
}
}
QColor NemoThemeHeaderDimmer::endColor() const
{
return m_endColor;
}
void NemoThemeHeaderDimmer::setEndColor(const QColor &endColor)
{
if (m_endColor != endColor) {
m_endColor = endColor;
emit endColorChanged();
}
}
int NemoThemeHeaderDimmer::height() const
{
return m_height;
}
void NemoThemeHeaderDimmer::setHeight(int height)
{
if (m_height != height) {
m_height = height;
emit heightChanged();
}
}
void NemoThemeHeaderDimmer::setHeightDefault()
{
if (m_height != 16) {
m_height = 16;
emit heightChanged();
}
}
double NemoThemeHeaderDimmer::startPosition() const
{
return m_startPosition;
}
void NemoThemeHeaderDimmer::setStartPosition(double startPosition)
{
if (m_startPosition != startPosition) {
m_startPosition = startPosition;
emit startPositionChanged();
}
}
void NemoThemeHeaderDimmer::setStartPositionDefault()
{
if (m_startPosition != 0) {
m_startPosition = 0;
emit startPositionChanged();
}
}
double NemoThemeHeaderDimmer::endPosition() const
{
return m_endPosition;
}
void NemoThemeHeaderDimmer::setEndPosition(double endPosition)
{
if (m_endPosition != endPosition) {
m_endPosition = endPosition;
emit endPositionChanged();
}
}
void NemoThemeHeaderDimmer::setEndPositionDefault()
{
if (m_endPosition != 1.0) {
m_endPosition = 1.0;
emit endPositionChanged();
}
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMEHEADERDIMMER_H
#define NEMOTHEMEHEADERDIMMER_H
#include <QtCore/QObject>
#include <QtGui/QColor>
class NemoThemeHeaderDimmer: public QObject
{
Q_OBJECT
Q_PROPERTY(QColor startColor READ startColor NOTIFY startColorChanged)
Q_PROPERTY(QColor endColor READ endColor NOTIFY endColorChanged)
Q_PROPERTY(int height READ height NOTIFY heightChanged)
Q_PROPERTY(double startPosition READ startPosition NOTIFY startPositionChanged)
Q_PROPERTY(double endPosition READ endPosition NOTIFY endPositionChanged)
public:
explicit NemoThemeHeaderDimmer(QObject *parent = 0);
QColor startColor() const;
void setStartColor(const QColor &startColor);
QColor endColor() const;
void setEndColor(const QColor &endColor);
int height() const;
void setHeight(int height);
void setHeightDefault();
double startPosition() const;
void setStartPosition(double startPosition);
void setStartPositionDefault();
double endPosition() const;
void setEndPosition(double endPosition);
void setEndPositionDefault();
Q_SIGNALS:
void startColorChanged();
void endColorChanged();
void heightChanged();
void startPositionChanged();
void endPositionChanged();
private:
QColor m_startColor;
QColor m_endColor;
int m_height;
double m_startPosition;
double m_endPosition;
};
#endif //NEMOTHEMEHEADERDIMMER_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemelabel.h"
NemoThemeLabel::NemoThemeLabel(QObject *parent)
: QObject(parent)
, m_pointSize(24)
{
}
QColor NemoThemeLabel::color() const
{
return m_color;
}
void NemoThemeLabel::setColor(const QColor &color)
{
if (m_color != color) {
m_color = color;
emit colorChanged();
}
}
int NemoThemeLabel::pointSize() const
{
return m_pointSize;
}
void NemoThemeLabel::setPointSize(int pointSize)
{
if (m_pointSize != pointSize) {
m_pointSize = pointSize;
emit pointSizeChanged();
}
}
void NemoThemeLabel::setPointSizeDefault()
{
if (m_pointSize != 24) {
m_pointSize = 24;
emit pointSizeChanged();
}
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMELABEL_H
#define NEMOTHEMELABEL_H
#include <QtCore/QObject>
#include <QtGui/QColor>
class NemoThemeLabel: public QObject
{
Q_OBJECT
Q_PROPERTY(QColor color READ color NOTIFY colorChanged)
Q_PROPERTY(int pointSize READ pointSize NOTIFY pointSizeChanged)
public:
explicit NemoThemeLabel(QObject *parent = 0);
QColor color() const;
void setColor(const QColor &color);
int pointSize() const;
void setPointSize(int pointSize);
void setPointSizeDefault();
Q_SIGNALS:
void colorChanged();
void pointSizeChanged();
private:
QColor m_color;
int m_pointSize;
};
#endif //NEMOTHEMELABEL_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemepage.h"
NemoThemePage::NemoThemePage(QObject *parent)
: QObject(parent)
{
}
QColor NemoThemePage::background() const
{
return m_background;
}
void NemoThemePage::setBackground(const QColor &background)
{
if (m_background != background) {
m_background = background;
emit backgroundChanged();
}
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMEPAGE_H
#define NEMOTHEMEPAGE_H
#include <QtCore/QObject>
#include <QtGui/QColor>
class NemoThemePage: public QObject
{
Q_OBJECT
Q_PROPERTY(QColor background READ background NOTIFY backgroundChanged)
public:
explicit NemoThemePage(QObject *parent = 0);
QColor background() const;
void setBackground(const QColor &background);
Q_SIGNALS:
void backgroundChanged();
private:
QColor m_background;
};
#endif //NEMOTHEMEPAGE_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemepagedimmer.h"
NemoThemePageDimmer::NemoThemePageDimmer(QObject *parent)
: QObject(parent)
, m_height(16)
, m_startPosition(0)
, m_endPosition(1.0)
{
}
QColor NemoThemePageDimmer::startColor() const
{
return m_startColor;
}
void NemoThemePageDimmer::setStartColor(const QColor &startColor)
{
if (m_startColor != startColor) {
m_startColor = startColor;
emit startColorChanged();
}
}
QColor NemoThemePageDimmer::endColor() const
{
return m_endColor;
}
void NemoThemePageDimmer::setEndColor(const QColor &endColor)
{
if (m_endColor != endColor) {
m_endColor = endColor;
emit endColorChanged();
}
}
int NemoThemePageDimmer::height() const
{
return m_height;
}
void NemoThemePageDimmer::setHeight(int height)
{
if (m_height != height) {
m_height = height;
emit heightChanged();
}
}
void NemoThemePageDimmer::setHeightDefault()
{
if (m_height != 16) {
m_height = 16;
emit heightChanged();
}
}
double NemoThemePageDimmer::startPosition() const
{
return m_startPosition;
}
void NemoThemePageDimmer::setStartPosition(double startPosition)
{
if (m_startPosition != startPosition) {
m_startPosition = startPosition;
emit startPositionChanged();
}
}
void NemoThemePageDimmer::setStartPositionDefault()
{
if (m_startPosition != 0) {
m_startPosition = 0;
emit startPositionChanged();
}
}
double NemoThemePageDimmer::endPosition() const
{
return m_endPosition;
}
void NemoThemePageDimmer::setEndPosition(double endPosition)
{
if (m_endPosition != endPosition) {
m_endPosition = endPosition;
emit endPositionChanged();
}
}
void NemoThemePageDimmer::setEndPositionDefault()
{
if (m_endPosition != 1.0) {
m_endPosition = 1.0;
emit endPositionChanged();
}
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMEPAGEDIMMER_H
#define NEMOTHEMEPAGEDIMMER_H
#include <QtCore/QObject>
#include <QtGui/QColor>
class NemoThemePageDimmer: public QObject
{
Q_OBJECT
Q_PROPERTY(QColor startColor READ startColor NOTIFY startColorChanged)
Q_PROPERTY(QColor endColor READ endColor NOTIFY endColorChanged)
Q_PROPERTY(int height READ height NOTIFY heightChanged)
Q_PROPERTY(double startPosition READ startPosition NOTIFY startPositionChanged)
Q_PROPERTY(double endPosition READ endPosition NOTIFY endPositionChanged)
public:
explicit NemoThemePageDimmer(QObject *parent = 0);
QColor startColor() const;
void setStartColor(const QColor &startColor);
QColor endColor() const;
void setEndColor(const QColor &endColor);
int height() const;
void setHeight(int height);
void setHeightDefault();
double startPosition() const;
void setStartPosition(double startPosition);
void setStartPositionDefault();
double endPosition() const;
void setEndPosition(double endPosition);
void setEndPositionDefault();
Q_SIGNALS:
void startColorChanged();
void endColorChanged();
void heightChanged();
void startPositionChanged();
void endPositionChanged();
private:
QColor m_startColor;
QColor m_endColor;
int m_height;
double m_startPosition;
double m_endPosition;
};
#endif //NEMOTHEMEPAGEDIMMER_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemepagestack.h"
NemoThemePageStack::NemoThemePageStack(QObject *parent)
: QObject(parent)
, m_transitionDuration(500)
{
}
int NemoThemePageStack::transitionDuration() const
{
return m_transitionDuration;
}
void NemoThemePageStack::setTransitionDuration(int transitionDuration)
{
if (m_transitionDuration != transitionDuration) {
m_transitionDuration = transitionDuration;
emit transitionDurationChanged();
}
}
void NemoThemePageStack::setTransitionDurationDefault()
{
if (m_transitionDuration != 500) {
m_transitionDuration = 500;
emit transitionDurationChanged();
}
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMEPAGESTACK_H
#define NEMOTHEMEPAGESTACK_H
#include <QtCore/QObject>
class NemoThemePageStack: public QObject
{
Q_OBJECT
Q_PROPERTY(int transitionDuration READ transitionDuration NOTIFY transitionDurationChanged)
public:
explicit NemoThemePageStack(QObject *parent = 0);
int transitionDuration() const;
void setTransitionDuration(int transitionDuration);
void setTransitionDurationDefault();
Q_SIGNALS:
void transitionDurationChanged();
private:
int m_transitionDuration;
};
#endif //NEMOTHEMEPAGESTACK_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemespinner.h"
NemoThemeSpinner::NemoThemeSpinner(QObject *parent)
: QObject(parent)
, m_radius(32)
, m_horizontalSpacing(15)
, m_verticalSpacing(15)
, m_initialStateDuration(1500)
, m_transitionDuration(500)
{
}
int NemoThemeSpinner::radius() const
{
return m_radius;
}
void NemoThemeSpinner::setRadius(int radius)
{
if (m_radius != radius) {
m_radius = radius;
emit radiusChanged();
}
}
void NemoThemeSpinner::setRadiusDefault()
{
if (m_radius != 32) {
m_radius = 32;
emit radiusChanged();
}
}
QColor NemoThemeSpinner::primaryColor() const
{
return m_primaryColor;
}
void NemoThemeSpinner::setPrimaryColor(const QColor &primaryColor)
{
if (m_primaryColor != primaryColor) {
m_primaryColor = primaryColor;
emit primaryColorChanged();
}
}
QColor NemoThemeSpinner::secondaryColor() const
{
return m_secondaryColor;
}
void NemoThemeSpinner::setSecondaryColor(const QColor &secondaryColor)
{
if (m_secondaryColor != secondaryColor) {
m_secondaryColor = secondaryColor;
emit secondaryColorChanged();
}
}
int NemoThemeSpinner::horizontalSpacing() const
{
return m_horizontalSpacing;
}
void NemoThemeSpinner::setHorizontalSpacing(int horizontalSpacing)
{
if (m_horizontalSpacing != horizontalSpacing) {
m_horizontalSpacing = horizontalSpacing;
emit horizontalSpacingChanged();
}
}
void NemoThemeSpinner::setHorizontalSpacingDefault()
{
if (m_horizontalSpacing != 15) {
m_horizontalSpacing = 15;
emit horizontalSpacingChanged();
}
}
int NemoThemeSpinner::verticalSpacing() const
{
return m_verticalSpacing;
}
void NemoThemeSpinner::setVerticalSpacing(int verticalSpacing)
{
if (m_verticalSpacing != verticalSpacing) {
m_verticalSpacing = verticalSpacing;
emit verticalSpacingChanged();
}
}
void NemoThemeSpinner::setVerticalSpacingDefault()
{
if (m_verticalSpacing != 15) {
m_verticalSpacing = 15;
emit verticalSpacingChanged();
}
}
int NemoThemeSpinner::initialStateDuration() const
{
return m_initialStateDuration;
}
void NemoThemeSpinner::setInitialStateDuration(int initialStateDuration)
{
if (m_initialStateDuration != initialStateDuration) {
m_initialStateDuration = initialStateDuration;
emit initialStateDurationChanged();
}
}
void NemoThemeSpinner::setInitialStateDurationDefault()
{
if (m_initialStateDuration != 1500) {
m_initialStateDuration = 1500;
emit initialStateDurationChanged();
}
}
int NemoThemeSpinner::transitionDuration() const
{
return m_transitionDuration;
}
void NemoThemeSpinner::setTransitionDuration(int transitionDuration)
{
if (m_transitionDuration != transitionDuration) {
m_transitionDuration = transitionDuration;
emit transitionDurationChanged();
}
}
void NemoThemeSpinner::setTransitionDurationDefault()
{
if (m_transitionDuration != 500) {
m_transitionDuration = 500;
emit transitionDurationChanged();
}
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMESPINNER_H
#define NEMOTHEMESPINNER_H
#include <QtCore/QObject>
#include <QtGui/QColor>
class NemoThemeSpinner: public QObject
{
Q_OBJECT
Q_PROPERTY(int radius READ radius NOTIFY radiusChanged)
Q_PROPERTY(QColor primaryColor READ primaryColor NOTIFY primaryColorChanged)
Q_PROPERTY(QColor secondaryColor READ secondaryColor NOTIFY secondaryColorChanged)
Q_PROPERTY(int horizontalSpacing READ horizontalSpacing NOTIFY horizontalSpacingChanged)
Q_PROPERTY(int verticalSpacing READ verticalSpacing NOTIFY verticalSpacingChanged)
Q_PROPERTY(int initialStateDuration READ initialStateDuration NOTIFY initialStateDurationChanged)
Q_PROPERTY(int transitionDuration READ transitionDuration NOTIFY transitionDurationChanged)
public:
explicit NemoThemeSpinner(QObject *parent = 0);
int radius() const;
void setRadius(int radius);
void setRadiusDefault();
QColor primaryColor() const;
void setPrimaryColor(const QColor &primaryColor);
QColor secondaryColor() const;
void setSecondaryColor(const QColor &secondaryColor);
int horizontalSpacing() const;
void setHorizontalSpacing(int horizontalSpacing);
void setHorizontalSpacingDefault();
int verticalSpacing() const;
void setVerticalSpacing(int verticalSpacing);
void setVerticalSpacingDefault();
int initialStateDuration() const;
void setInitialStateDuration(int initialStateDuration);
void setInitialStateDurationDefault();
int transitionDuration() const;
void setTransitionDuration(int transitionDuration);
void setTransitionDurationDefault();
Q_SIGNALS:
void radiusChanged();
void primaryColorChanged();
void secondaryColorChanged();
void horizontalSpacingChanged();
void verticalSpacingChanged();
void initialStateDurationChanged();
void transitionDurationChanged();
private:
int m_radius;
QColor m_primaryColor;
QColor m_secondaryColor;
int m_horizontalSpacing;
int m_verticalSpacing;
int m_initialStateDuration;
int m_transitionDuration;
};
#endif //NEMOTHEMESPINNER_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemetextfield.h"
NemoThemeTextField::NemoThemeTextField(QObject *parent)
: QObject(parent)
, m_pointSize(24)
, m_font("Open Sans")
{
}
QColor NemoThemeTextField::selectedTextColor() const
{
return m_selectedTextColor;
}
void NemoThemeTextField::setSelectedTextColor(const QColor &selectedTextColor)
{
if (m_selectedTextColor != selectedTextColor) {
m_selectedTextColor = selectedTextColor;
emit selectedTextColorChanged();
}
}
QColor NemoThemeTextField::selectionColor() const
{
return m_selectionColor;
}
void NemoThemeTextField::setSelectionColor(const QColor &selectionColor)
{
if (m_selectionColor != selectionColor) {
m_selectionColor = selectionColor;
emit selectionColorChanged();
}
}
int NemoThemeTextField::pointSize() const
{
return m_pointSize;
}
void NemoThemeTextField::setPointSize(int pointSize)
{
if (m_pointSize != pointSize) {
m_pointSize = pointSize;
emit pointSizeChanged();
}
}
void NemoThemeTextField::setPointSizeDefault()
{
if (m_pointSize != 24) {
m_pointSize = 24;
emit pointSizeChanged();
}
}
QString NemoThemeTextField::font() const
{
return m_font;
}
void NemoThemeTextField::setFont(const QString &font)
{
if (m_font != font) {
m_font = font;
emit fontChanged();
}
}
void NemoThemeTextField::setFontDefault()
{
if (m_font != "Open Sans") {
m_font = "Open Sans";
emit fontChanged();
}
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMETEXTFIELD_H
#define NEMOTHEMETEXTFIELD_H
#include <QtCore/QObject>
#include <QtGui/QColor>
#include <QtCore/QString>
class NemoThemeTextField: public QObject
{
Q_OBJECT
Q_PROPERTY(QColor selectedTextColor READ selectedTextColor NOTIFY selectedTextColorChanged)
Q_PROPERTY(QColor selectionColor READ selectionColor NOTIFY selectionColorChanged)
Q_PROPERTY(int pointSize READ pointSize NOTIFY pointSizeChanged)
Q_PROPERTY(QString font READ font NOTIFY fontChanged)
public:
explicit NemoThemeTextField(QObject *parent = 0);
QColor selectedTextColor() const;
void setSelectedTextColor(const QColor &selectedTextColor);
QColor selectionColor() const;
void setSelectionColor(const QColor &selectionColor);
int pointSize() const;
void setPointSize(int pointSize);
void setPointSizeDefault();
QString font() const;
void setFont(const QString &font);
void setFontDefault();
Q_SIGNALS:
void selectedTextColorChanged();
void selectionColorChanged();
void pointSizeChanged();
void fontChanged();
private:
QColor m_selectedTextColor;
QColor m_selectionColor;
int m_pointSize;
QString m_font;
};
#endif //NEMOTHEMETEXTFIELD_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemetoolbar.h"
NemoThemeToolBar::NemoThemeToolBar(QObject *parent)
: QObject(parent)
{
}
QColor NemoThemeToolBar::background() const
{
return m_background;
}
void NemoThemeToolBar::setBackground(const QColor &background)
{
if (m_background != background) {
m_background = background;
emit backgroundChanged();
}
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMETOOLBAR_H
#define NEMOTHEMETOOLBAR_H
#include <QtCore/QObject>
#include <QtGui/QColor>
class NemoThemeToolBar: public QObject
{
Q_OBJECT
Q_PROPERTY(QColor background READ background NOTIFY backgroundChanged)
public:
explicit NemoThemeToolBar(QObject *parent = 0);
QColor background() const;
void setBackground(const QColor &background);
Q_SIGNALS:
void backgroundChanged();
private:
QColor m_background;
};
#endif //NEMOTHEMETOOLBAR_H
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#include "nemothemewindow.h"
NemoThemeWindow::NemoThemeWindow(QObject *parent)
: QObject(parent)
{
}
QColor NemoThemeWindow::background() const
{
return m_background;
}
void NemoThemeWindow::setBackground(const QColor &background)
{
if (m_background != background) {
m_background = background;
emit backgroundChanged();
}
}
/*
* Copyright (C) 2013 Lucien Xu <sfietkonstantin@free.fr>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
// This class is autogenerated using themehelper.py
// Any modification done in this file will be overridden
#ifndef NEMOTHEMEWINDOW_H
#define NEMOTHEMEWINDOW_H
#include <QtCore/QObject>
#include <QtGui/QColor>
class NemoThemeWindow: public QObject
{
Q_OBJECT
Q_PROPERTY(QColor background READ background NOTIFY backgroundChanged)
public:
explicit NemoThemeWindow(QObject *parent = 0);
QColor background() const;
void setBackground(const QColor &background);
Q_SIGNALS:
void backgroundChanged();
private:
QColor m_background;
};
#endif //NEMOTHEMEWINDOW_H
<RCC>
<qresource prefix="/QtQuick/Controls/Styles/Nemo">
<file>themes/Colors.js</file>
<file>Images.js</file>
</qresource>
</RCC>
......@@ -20,42 +20,15 @@
#include "qquicknemostyleextensionplugin.h"
#include <QtQml>
#include "autogenerated/nemotheme.h"
QQuickNemoStyleExtensionPlugin::QQuickNemoStyleExtensionPlugin(QObject *parent) :
QQmlExtensionPlugin(parent)
{
}
static QObject * nemo_theme_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
{
Q_UNUSED(engine)
Q_UNUSED(scriptEngine)
return new NemoTheme();
}
void QQuickNemoStyleExtensionPlugin::registerTypes(const char *uri)
{
Q_ASSERT(uri == QLatin1String("QtQuick.Controls.Styles.Nemo"));
QString reason = QString("Cannot be created");
qmlRegisterUncreatableType<NemoTheme>(uri, 1, 0, "NemoTheme", reason);
qmlRegisterUncreatableType<NemoThemeButton>(uri, 1, 0, "NemoThemeButton", reason);
qmlRegisterUncreatableType<NemoThemeButtonPressedGradient>(uri, 1, 0, "NemoThemeButtonPressedGradient", reason);
qmlRegisterUncreatableType<NemoThemeButtonText>(uri, 1, 0, "NemoThemeButtonText", reason);
qmlRegisterUncreatableType<NemoThemeFont>(uri, 1, 0, "NemoThemeFont", reason);
qmlRegisterUncreatableType<NemoThemeGroove>(uri, 1, 0, "NemoThemeGroove", reason);
qmlRegisterUncreatableType<NemoThemeTextField>(uri, 1, 0, "NemoThemeTextField", reason);
qmlRegisterUncreatableType<NemoThemeToolBar>(uri, 1, 0, "NemoThemeToolBar", reason);
qmlRegisterUncreatableType<NemoThemeWindow>(uri, 1, 0, "NemoThemeWindow", reason);
qmlRegisterUncreatableType<NemoThemePage>(uri, 1, 0, "NemoThemePage", reason);
qmlRegisterUncreatableType<NemoThemeSpinner>(uri, 1, 0, "NemoThemeSpinner", reason);
qmlRegisterUncreatableType<NemoThemeLabel>(uri, 1, 0, "NemoThemeLabel", reason);
qmlRegisterUncreatableType<NemoThemeCheckbox>(uri, 1, 0, "NemoThemeCheckbox", reason);
qmlRegisterUncreatableType<NemoThemePageStack>(uri, 1, 0, "NemoThemePageStack", reason);
qmlRegisterUncreatableType<NemoThemeHeader>(uri, 1, 0, "NemoThemeHeader", reason);
qmlRegisterUncreatableType<NemoThemeHeaderDimmer>(uri, 1, 0, "NemoThemeHeaderDimmer", reason);
qmlRegisterSingletonType<QObject>(uri, 1, 0, "Theme", nemo_theme_provider);
}
void QQuickNemoStyleExtensionPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
......
......@@ -76,44 +76,10 @@ images.files = $$_PRO_FILE_PWD_/images/*.svg\
images.path = $$[QT_INSTALL_QML]/$$PLUGIN_IMPORT_PATH/images/
HEADERS += \
qquicknemostyleextensionplugin.h \
autogenerated/nemotheme.h \
autogenerated/nemothemebutton.h \
autogenerated/nemothemebuttonpressedgradient.h \
autogenerated/nemothemebuttontext.h \
autogenerated/nemothemefont.h \
autogenerated/nemothemegroove.h \
autogenerated/nemothemetextfield.h \
autogenerated/nemothemetoolbar.h \
autogenerated/nemothemewindow.h \
autogenerated/nemothemepage.h \
autogenerated/nemothemespinner.h \
autogenerated/nemothemelabel.h \
autogenerated/nemothemecheckbox.h \
autogenerated/nemothemepagestack.h \
autogenerated/nemothemebuttonrow.h \
autogenerated/nemothemeheader.h \
autogenerated/nemothemeheaderdimmer.h
qquicknemostyleextensionplugin.h
SOURCES += \
qquicknemostyleextensionplugin.cpp \
autogenerated/nemotheme.cpp \
autogenerated/nemothemebutton.cpp \
autogenerated/nemothemebuttonpressedgradient.cpp \
autogenerated/nemothemebuttontext.cpp \
autogenerated/nemothemefont.cpp \
autogenerated/nemothemegroove.cpp \
autogenerated/nemothemetextfield.cpp \
autogenerated/nemothemetoolbar.cpp \
autogenerated/nemothemewindow.cpp \
autogenerated/nemothemepage.cpp \
autogenerated/nemothemespinner.cpp \
autogenerated/nemothemelabel.cpp \
autogenerated/nemothemecheckbox.cpp \
autogenerated/nemothemepagestack.cpp \
autogenerated/nemothemebuttonrow.cpp \
autogenerated/nemothemeheader.cpp \
autogenerated/nemothemeheaderdimmer.cpp
qquicknemostyleextensionplugin.cpp
INSTALLS += target images qmlfiles themes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment