Commit 3858cd52 authored by Aleksi Suomalainen's avatar Aleksi Suomalainen Committed by GitHub

Merge pull request #41 from neochapay/theming

Theming
parents d20c0321 7197e400
......@@ -3,9 +3,13 @@
.directory
*.o
*.so
*.qmlc
moc_*
qrc_*
examples/touch/touch_nemo
.qmake.stash
*.spec.*
documentation.list
examples/touch/glacier-components
Makefile
installroot/
RPMS/
\ No newline at end of file
......@@ -83,7 +83,7 @@ Item {
anchors.right: parent.right
anchors.rightMargin: 20
anchors.verticalCenter: parent.verticalCenter
source: "../images/navigation_next_item.png"
source: "/usr/share/glacier-components/images/navigation_next_item.png"
}
MouseArea {
......
......@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0 //needed for the Stack attached property
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......@@ -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 {
......
......@@ -29,7 +29,7 @@
**
****************************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0 //needed for the Stack attached property
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......
......@@ -29,7 +29,7 @@
**
****************************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0 //needed for the Stack attached property
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......
......@@ -29,7 +29,7 @@
**
****************************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0 //needed for the Stack attached property
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......
......@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0 //needed for the Stack attached property
import QtQuick.Controls.Nemo 1.0
import QtQuick.Layouts 1.0
......
......@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0 //needed for the Stack attached property
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......
......@@ -29,7 +29,7 @@
**
****************************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0 //needed for the Stack attached property
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0 //needed for the Stack attached property
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......@@ -6,75 +6,70 @@ 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
Column {
spacing: 40
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)
}
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
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
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)
}
}
}
}
......
......@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0 //needed for the Stack attached property
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......
......@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0 //needed for the Stack attached property
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......@@ -79,7 +79,7 @@ Page {
anchors.fill: parent
border.bottom: size.dp(8)
border.top: size.dp(8)
source: styleData.selected ? "../images/tab_selected.png":"../images/tabs_standard.png"
source: styleData.selected ? "/usr/share/glacier-components/images/tab_selected.png":"/usr/share/glacier-components/images/tabs_standard.png"
Text {
anchors.centerIn: parent
color: "white"
......
......@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0 //needed for the Stack attached property
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......@@ -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
}
......@@ -112,7 +110,7 @@ Page {
implicitHeight: size.dp(50)
implicitWidth: size.dp(320)
BorderImage {
source: "../images/textinput.png"
source: "/usr/share/glacier-components/images/textinput.png"
border.left: size.dp(8)
border.right: size.dp(8)
anchors.bottom: parent.bottom
......
[Desktop Entry]
Type=Application
Name=Glacier UI
Name=Glacier components
Categories=Applications;
Exec=env QT_QUICK_CONTROLS_STYLE=Nemo /usr/lib/qt5/examples/touch_nemo
Exec=env QT_QUICK_CONTROLS_STYLE=Nemo /usr/bin/glacier-components
Icon=icon-app-components
X-Desktop-File-Install-Version=0.20
......
......@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......@@ -126,9 +126,9 @@ ApplicationWindow {
id: tools
title: "Nemo Touch Gallery"
tools: [ ToolButton { iconSource: "../images/icon_cog.png"},
ToolButton { iconSource: "../images/icon_edit.png"},
ToolButton { iconSource: "../images/icon_refresh.png"} ]
tools: [ ToolButton { iconSource: "/usr/share/glacier-components/images/icon_cog.png"},
ToolButton { iconSource: "/usr/share/glacier-components/images/icon_edit.png"},
ToolButton { iconSource: "/usr/share/glacier-components/images/icon_refresh.png"} ]
//The parent of these items is null when this ToolsLayout is not used
//(i.e. you're on a different page) so we need to check the parent,
......@@ -176,19 +176,19 @@ ApplicationWindow {
id: tool1
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
iconSource: "../images/icon_cog.png"
iconSource: "/usr/share/glacier-components/images/icon_cog.png"
}
ToolButton {
id: tool2
anchors.right: tool1.left
anchors.verticalCenter: parent.verticalCenter
iconSource: "../images/icon_edit.png"
iconSource: "/usr/share/glacier-components/images/icon_edit.png"
}
ToolButton {
id: tool3
anchors.right: tool2.left
anchors.verticalCenter: parent.verticalCenter
iconSource: "../images/icon_refresh.png"
iconSource: "/usr/share/glacier-components/images/icon_refresh.png"
}
},
ButtonRow {
......@@ -219,8 +219,8 @@ ApplicationWindow {
model: pageModel
anchors.fill: parent
clip: true
delegate: AndroidDelegate {
text: title
delegate: ListViewItemWithActions {
label: title
onClicked: pageItem.Stack.view.push(Qt.resolvedUrl(page))
}
}
......
<RCC>
<qresource prefix="/">
<file>main.qml</file>
<file>content/AndroidDelegate.qml</file>
<file>content/ButtonPage.qml</file>
<file>content/ProgressBarPage.qml</file>
<file>content/SliderPage.qml</file>
<file>content/TabBarPage.qml</file>
<file>content/TextInputPage.qml</file>
<file>images/button_default.png</file>
<file>images/button_pressed.png</file>
<file>images/navigation_next_item.png</file>
<file>images/navigation_previous_item.png</file>
<file>images/tab_selected.png</file>
<file>images/tabs_standard.png</file>
<file>images/textinput.png</file>
<file>images/toolbar.png</file>
<file>content/LiveCoding.qml</file>
<file>content/SpinnerPage.qml</file>
<file>content/LabelPage.qml</file>
<file>content/CheckboxPage.qml</file>
<file>content/ButtonRowPage.qml</file>
<file>content/QueryDialogPage.qml</file>
<file>images/dots-vertical.png</file>
<file>images/icon-triangle-left.png</file>
<file>images/icon_cog.png</file>
<file>images/icon_edit.png</file>
<file>images/icon_refresh.png</file>
</qresource>
</RCC>
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Copyright (C) 2017 Chupligin Sergey neochapay@gmail.com
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Quick Controls module of the Qt Toolkit.
......@@ -37,6 +38,22 @@
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QtGui/QGuiApplication>
#include <QQmlApplicationEngine>
#include <QtQuick/QQuickView>
#include "../../shared/qt_quick_controls_examplemain.h"
QT_QUICK_CONTROLS_EXAMPLE_MAIN(qrc:/main.qml)
int main(int argc, char *argv[])
{
setenv("QT_QUICK_CONTROLS_STYLE", "Nemo", 1);
QGuiApplication app(argc, argv);
QQmlApplicationEngine* engine = new QQmlApplicationEngine(QUrl("/usr/share/glacier-components/main.qml"));
QObject *topLevel = engine->rootObjects().value(0);
QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel);
window->setTitle(QObject::tr("Glacier components"));
window->showFullScreen();
return app.exec();
}
SOURCES += \
$$PWD/main.cpp
TEMPLATE = app
QT += qml quick
TARGET = touch_nemo
target.path = /usr/lib/qt5/examples
TARGET = glacier-components
target.path = /usr/bin
qtHaveModule(widgets) {
QT += widgets
}
include(src/src.pri)
mainqml.files = main.qml
mainqml.path = /usr/share/glacier-components
qml.files += \
content/AndroidDelegate.qml \
content/ButtonPage.qml \
content/ProgressBarPage.qml \
content/SliderPage.qml \
content/TabBarPage.qml \
content/TextInputPage.qml \
content/LiveCoding.qml \
content/SpinnerPage.qml \
content/LabelPage.qml \
content/CheckboxPage.qml \
content/ButtonRowPage.qml \
content/QueryDialogPage.qml \
content/ListViewPage.qml \
content/SelectRollerPage.qml
qml.path = /usr/share/glacier-components/content
images.files = images/*.png
images.path = /usr/share/glacier-components/images
OTHER_FILES += \
main.qml \
......@@ -22,18 +44,15 @@ OTHER_FILES += \
content/LabelPage.qml \
content/CheckboxPage.qml \
content/ButtonRowPage.qml \
content/QueryDialogPage.qml
RESOURCES += \
resources.qrc
content/QueryDialogPage.qml \
content/ListViewPage.qml \
content/SelectRollerPage.qml
INSTALLS += target
desktop.path = /usr/share/applications
desktop.files = glacier-gallery.desktop
INSTALLS += desktop
DISTFILES += \
content/ListViewPage.qml \
content/SelectRollerPage.qml
INSTALLS += desktop target qml mainqml images
SOURCES += \
src/main.cpp
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
......@@ -68,6 +68,7 @@ desktop-file-install --delete-original \
%files examples
%defattr(-,root,root,-)
%{_libdir}/qt5/examples/touch_nemo
%{_bindir}/glacier-components
%{_datadir}/glacier-components
%{_datadir}/applications/*.desktop
......@@ -18,7 +18,7 @@
*/
import QtQuick.Window 2.0
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Layouts 1.0
import QtQuick.Controls.Private 1.0
......@@ -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
}
......
......@@ -17,9 +17,9 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
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:
......@@ -29,14 +30,14 @@
**
****************************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls.Styles.Nemo 1.0
Rectangle {
id: main
width: childrenRect.width
color: "#313131"
height: size.dp(40)
color: Theme.fillDarkColor
height: Theme.itemHeightSmall
property ListModel model: ListModel {}
property bool enabled: true
property int currentIndex: -1
......@@ -54,8 +55,8 @@ Rectangle {
y: size.dp(-5)
width: rowElement.children[main.currentIndex].width || 0
height: size.dp(50)
color: "#0091e5"
height: Theme.itemHeightSmall
color: Theme.accentColor
visible: main.currentIndex > -1
......
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......
import QtQuick 2.0
import QtQuick 2.6
Item {
id: glacierRoller
......
import QtQuick 2.0
import QtQuick 2.6
Rectangle{
id: glacierRollerItem
......
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Window 2.0
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
......@@ -62,7 +62,7 @@ Item {
PropertyChanges {
target: toolBarRect
width: parent.width
height: size.dp(75)
height: Theme.itemHeightExtraLarge
}
},
State {
......@@ -91,7 +91,7 @@ Item {
}
PropertyChanges {
target: toolBarRect
width: size.dp(75)
width: Theme.itemHeightExtraLarge
height: parent.height
}
}
......@@ -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
......
import QtQuick 2.0
import QtQuick 2.6
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Layouts 1.0
......@@ -26,7 +26,7 @@ Item {
Rectangle {
id: backButton
width: opacity ? size.dp(60) : 0
anchors.leftMargin: size.dp(20)
anchors.leftMargin: Theme.itemSpacingLarge
//check if Stack.view has already been initialized as well
anchors.verticalCenter: parent.verticalCenter
antialiasing: true
......@@ -40,28 +40,30 @@ Item {
Image {
anchors.centerIn: parent
source: "../Styles/Nemo/images/icon-triangle-left.png"
source: "/usr/lib/qt5/qml/QtQuick/Controls/Styles/Nemo/images/icon-triangle-left.png"
}
MouseArea {
id: backmouse
anchors.fill: parent
anchors.margins: size.dp(-10)
anchors.margins: -Theme.itemSpacingSmall
onClicked: header && header.stackView && header.stackView.pop()
}
}
Label {
id: titleTxt
anchors.right: toolButtonsContainer.left
anchors.left: backButton.visible ? backButton.right : parent.left
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: size.dp(20)
anchors.rightMargin: size.dp(20)
anchors{
right: toolButtonsContainer.left
left: backButton.visible ? backButton.right : parent.left
verticalCenter: parent.verticalCenter
leftMargin: Theme.itemSpacingLarge
rightMargin: Theme.itemSpacingLarge
}
clip: true
font.family: Theme.fontFamily
color: Theme.label.color
font.pointSize: size.dp(24)
color: Theme.textColor
font.pointSize: Theme.fontSizeLarge
font.weight: Font.Bold
LinearGradient {
anchors.right: parent.right
......@@ -71,7 +73,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 } }
}
}
......@@ -106,11 +108,13 @@ Item {
Image {
id: dots
anchors.right: parent.right
anchors.rightMargin: size.dp(20)
anchors.verticalCenter: parent.verticalCenter
anchors{
right: parent.right
rightMargin: Theme.itemSpacingLarge
verticalCenter: parent.verticalCenter
}
visible: drawerLevels && drawerLevels.length > 1
source: "../Styles/Nemo/images/dots-vertical.png"
source: "/usr/lib/qt5/qml/QtQuick/Controls/Styles/Nemo/images/dots-vertical.png"
rotation: isUiPortrait ? 0 : 90
}
}
......@@ -28,12 +28,12 @@
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
****************************************************************************************/
import QtQuick 2.1
import QtQuick 2.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: Theme.fontSizeLarge
}
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtGraphicalEffects 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......@@ -16,17 +16,17 @@ ListView {
Rectangle {
width: listView.width
height: size.dp(44)
color: "black"
color: Theme.backgroundColor
Text {
id: sectionText
text: section
font.capitalization: Font.AllUppercase
font.pixelSize: size.dp(20)
color: "white"
font.pixelSize: Theme.fontSizeMedium
color: Theme.textColor
anchors{
left: parent.left
leftMargin: size.dp(10)
leftMargin: Theme.itemSpacingSmall
verticalCenter: parent.verticalCenter
}
}
......@@ -34,11 +34,11 @@ ListView {
Rectangle{
id: line
height: 1
color: "white"
color: Theme.textColor
width: listView.width-sectionText.width-size.dp(30)
anchors{
left: sectionText.right
leftMargin: size.dp(10)
leftMargin: Theme.itemSpacingSmall
verticalCenter: sectionText.verticalCenter
}
}
......@@ -59,7 +59,7 @@ ListView {
end: Qt.point(0, size.dp(30))
gradient: Gradient {
GradientStop { position: 0.0; color: "transparent" }
GradientStop { position: 1.0; color: "black" }
GradientStop { position: 1.0; color: Theme.backgroundColor }
}
}
......@@ -68,7 +68,7 @@ ListView {
Rectangle{
id: scrollerDecorator
visible: (listView.showDecorator && listView.contentHeight > listView.height)
color: "#0091e5"
color: Theme.accentColor
width: size.dp(5)
height: listView.height*listView.height/listView.contentHeight
......
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls.Nemo 1.0
import QtGraphicalEffects 1.0
......@@ -6,14 +6,13 @@ import QtGraphicalEffects 1.0
Item {
id: root
width: parent.width
height: 60
height: size.dp(60)
property string label: ""
property string description: ""
property string subdescription: ""
property string icon: ""
property string page: ""
property bool showNext: true
......@@ -36,7 +35,7 @@ Item {
Rectangle{
id: actionsArea
color: "#474747"
color: Theme.fillColor
anchors.right: listArea.left
......@@ -70,7 +69,7 @@ Item {
width: height
anchors{
left: parent.left
leftMargin: size.dp(20)
leftMargin: Theme.itemSpacingLarge
top: parent.top
topMargin: size.dp(5)
}
......@@ -90,14 +89,14 @@ Item {
anchors{
left:itemIcon.right
leftMargin: size.dp(20)
leftMargin: Theme.itemSpacingLarge
verticalCenter: itemIcon.verticalCenter
}
color: "transparent"
Text {
id: labelItem
color: "#ffffff"
color: Theme.textColor
text: label
anchors{
left: parent.left
......@@ -109,28 +108,28 @@ Item {
Text{
id: descriptionItem
color: "#ffffff"
color: Theme.textColor
text: description
anchors{
left: parent.left
right: parent.right
top: labelItem.bottom
}
font.pixelSize: size.dp(18)
font.pixelSize: Theme.fontSizeSmall
clip: true
visible: description != ""
}
Text{
id: subDescriptionItem
color: "#ffffff"
color: Theme.textColor
text: subdescription
anchors{
left: parent.left
right: parent.right
top: descriptionItem.bottom
}
font.pixelSize: size.dp(18)
font.pixelSize: Theme.fontSizeSmall
clip: true
visible: subdescription != ""
}
......@@ -162,7 +161,7 @@ Item {
anchors{
right: parent.right
rightMargin: size.dp(20)
rightMargin: Theme.itemSpacingLarge
verticalCenter: parent.verticalCenter
}
......
......@@ -29,7 +29,7 @@
**
****************************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0 // Needed for things like Stack attached properties
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......@@ -70,7 +70,7 @@ NemoPage {
Rectangle {
id: background
anchors.fill: parent
color: Theme.page.background
color: Theme.backgroundColor
}
Item {
......
import QtQuick 2.0
import QtQuick 2.6
Rectangle {
id: shell
anchors.fill: parent
opacity: 0.7
color: "black"
color: Theme.backgroundColor
signal accepted()
signal canceled()
property alias cancelText: cancel.text
......
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......
......@@ -29,8 +29,8 @@
**
****************************************************************************************/
import QtQuick 2.1
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick 2.6
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
}
}
}
......
......@@ -35,7 +35,8 @@ HEADERS += \
nemoimageprovider.h \
themedaemon/mlocalthemedaemonclient.h \
themedaemon/mabstractthemedaemonclient.h \
sizing.h
sizing.h \
theme.h
SOURCES += \
qquicknemocontrolsextensionplugin.cpp \
......@@ -46,13 +47,15 @@ SOURCES += \
nemoimageprovider.cpp \
themedaemon/mlocalthemedaemonclient.cpp \
themedaemon/mabstractthemedaemonclient.cpp \
sizing.cpp
sizing.cpp \
theme.cpp
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);
}
......
......@@ -29,13 +29,13 @@ Sizing::Sizing(QObject *parent) : QObject(parent)
}else if(m_dpi >= 140 && m_dpi < 200){
//~160dpi
m_densitie = mdpi;
}else if(m_dpi >= 200 && m_dpi < 280){
}else if(m_dpi >= 200 && m_dpi < 300){
//~240dpi
m_densitie = hdpi;
}else if(m_dpi >= 280 && m_dpi < 400){
}else if(m_dpi >= 300 && m_dpi < 420){
//~320dpi
m_densitie = xhdpi;
}else if(m_dpi >= 400 && m_dpi < 560){
}else if(m_dpi >= 420 && m_dpi < 560){
//~480dpi
m_densitie = xxhdpi;
}else{
......@@ -45,7 +45,6 @@ Sizing::Sizing(QObject *parent) : QObject(parent)
if(m_p_height > 0 && m_p_width >0){
m_valid = true;
setMmScaleFactor();
setDpScaleFactor();
}else{
if(m_p_height == 0){
qWarning("QT_QPA_EGLFS_PHYSICAL_HEIGHT is not set!");
......@@ -56,6 +55,7 @@ Sizing::Sizing(QObject *parent) : QObject(parent)
}
qWarning("Device mm sizing don`t work");
}
setDpScaleFactor();
}
void Sizing::setMmScaleFactor()
......@@ -80,7 +80,7 @@ void Sizing::setDpScaleFactor()
m_dp_factor = 1;
break;
case xhdpi:
m_dp_factor = 1.3;
m_dp_factor = 1.5;
break;
case xxhdpi:
m_dp_factor = 2;
......@@ -89,7 +89,7 @@ void Sizing::setDpScaleFactor()
m_dp_factor = 2.5;
break;
default:
m_dp_factor = 1.3;
m_dp_factor = 1.5;
break;
}
......
This diff is collapsed.
#ifndef THEME_He5
#define THEME_H
#include <QObject>
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 itemWidthExtraSmall READ itemWidthExtraSmall NOTIFY itemWidthExtraSmallChanged)
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 itemSpacingExtraSmall READ itemSpacingExtraSmall NOTIFY itemSpacingExtraSmallChanged)
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 fileName);
qreal itemWidthLarge(){return m_itemWidthLarge;}
qreal itemWidthMedium(){return m_itemWidthMedium;}
qreal itemWidthSmall(){return m_itemWidthSmall;}
qreal itemWidthExtraSmall(){return m_itemWidthExtraSmall;}
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 itemSpacingExtraSmall(){return m_itemSpacingExtraSmall;}
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 itemWidthExtraSmallChanged();
void itemHeightHugeChanged();
void itemHeightExtraLargeChanged();
void itemHeightLargeChanged();
void itemHeightMediumChanged();
void itemHeightSmallChanged();
void itemHeightExtraSmallChanged();
void itemSpacingHugeChanged();
void itemSpacingLargeChanged();
void itemSpacingMediumChanged();
void itemSpacingSmallChanged();
void itemSpacingExtraSmallChanged();
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_itemWidthExtraSmall; //72
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_itemSpacingExtraSmall; //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
......@@ -17,24 +17,23 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
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
}
}
......@@ -29,32 +29,30 @@
**
****************************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
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 {
id: background
color: "transparent"
implicitWidth: size.dp(72)
implicitHeight: size.dp(32)
implicitWidth: Theme.itemWidthExtraSmall
implicitHeight: Theme.itemHeightExtraSmall
Rectangle {
id: back1
implicitWidth: size.dp(72)
implicitWidth: Theme.itemWidthExtraSmall
implicitHeight: size.dp(28)
color: Theme.checkbox.back1
color: Theme.accentColor
anchors.centerIn: parent
}
Rectangle {
id: back2
implicitWidth: size.dp(72)
implicitWidth: Theme.itemWidthExtraSmall
implicitHeight: size.dp(28)
color: Theme.checkbox.back2
color: Theme.fillDarkColor
anchors.centerIn: parent
}
......@@ -62,7 +60,7 @@ CheckBoxStyle {
Image {
id: ball
width: size.dp(40)
height: size.dp(32)
height: Theme.itemHeightExtraSmall
source: "images/switch-ball.png"
anchors.verticalCenter: parent.verticalCenter
}
......@@ -81,7 +79,7 @@ CheckBoxStyle {
Component.onCompleted: {
back1.opacity = control.checked ? 1 : 0
back2.opacity = control.checked ? 0 : 1
ball.x = control.checked ? size.dp(32) : 0
ball.x = control.checked ? Theme.itemHeightExtraSmall : 0
}
SequentialAnimation {
......@@ -90,7 +88,7 @@ CheckBoxStyle {
NumberAnimation {
target: ball
property: "x"
to: size.dp(32)
to: Theme.itemHeightExtraSmall
duration: 120
}
NumberAnimation {
......
......@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls.Styles 1.0
ComboBoxStyle {
......
......@@ -37,7 +37,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Private 1.0
......
......@@ -17,18 +17,18 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick 2.6
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
}
......
......@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls.Styles.Private 1.0
GroupBoxStyle {
......
......@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls.Private 1.0
import "../../Private/style.js" as StyleHelpers
......
......@@ -38,7 +38,7 @@
**
****************************************************************************/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Private 1.0
import "../../Private/style.js" as StyleHelpers
......
......@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls.Styles 1.0
ProgressBarStyle {
......
......@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls.Styles 1.0
RadioButtonStyle {
......
......@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls.Styles 1.0
ScrollViewStyle {
......
......@@ -18,16 +18,16 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls.Styles 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Controls.Nemo 1.0
SliderStyle{
handle: Rectangle {
id: handle
anchors.centerIn: parent
color: "black"
border.color: "#0091e5"
color: Theme.backgroundColor
border.color: Theme.accentColor
border.width: 2
implicitWidth: size.dp(34)
implicitHeight: size.dp(34)
......@@ -39,7 +39,7 @@ SliderStyle{
anchors.centerIn: parent
text: parseInt(control.value*100)
visible: control.showValue
color: "white"
color: Theme.textColor
}
}
......@@ -48,13 +48,13 @@ SliderStyle{
implicitHeight: size.dp(16)
implicitWidth: size.dp(440)
color: "#313131"
color: Theme.fillDarkColor
z: 1
Rectangle{
id: dataLine
height: parent.height
width: styleData.handlePosition
color: "#0091e5"
color: Theme.accentColor
}
Image {
......
......@@ -20,7 +20,7 @@
// NOTE: THIS WILL NOT BE PRIVATE ANYMORE IN QtQuick.Controls 1.1!!!!!!!!!
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls.Styles.Private 1.0
SpinBoxStyle {
......
......@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls.Styles.Private 1.0
StatusBarStyle {
......
......@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls.Styles 1.0
TabViewStyle {
......
......@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls.Styles 1.0
TableViewStyle {
......
......@@ -17,22 +17,25 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
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
font.pointSize: size.dp(14)
font.family: Theme.textField.font
selectedTextColor: Theme.textColor
selectionColor: Theme.accentColor
textColor: Theme.textColor
font.pointSize: Theme.fontSizeTiny
font.family: Theme.fontFamily
background: Item {
anchors.leftMargin: size.dp(16)
anchors.rightMargin: size.dp(16)
implicitHeight: size.dp(50)
implicitWidth: size.dp(320)
anchors{
leftMargin: Theme.itemSpacingMedium
rightMargin: Theme.itemSpacingMedium
}
implicitHeight: Theme.itemHeightMedium
implicitWidth: Theme.itemWidthLarge
opacity: control.enabled ? 1 : 0.6
Image {
anchors.fill: parent
......@@ -46,7 +49,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
}
}
}
......@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls.Private 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......@@ -28,11 +28,11 @@ Style {
padding.bottom: 3
property Component panel: Item {
implicitHeight: size.dp(75)
implicitHeight:Theme.itemHeightExtraLarge
implicitWidth: size.dp(40)
Rectangle {
anchors.fill: parent
color: Theme.toolBar.background
color: Theme.backgroundColor
}
}
}
......@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Private 1.0
......@@ -31,8 +31,8 @@ Style {
id: styleitem
//TODO: Maybe we want to add a descriptive text at the bottom of the icon?
implicitWidth: size.dp(50)
implicitHeight: size.dp(50)
implicitWidth: Theme.itemHeightMedium
implicitHeight: implicitWidth
opacity: control.pressed ? 0.5 : 1
......@@ -47,7 +47,7 @@ Style {
id: icon
anchors.fill: parent
fillMode: Image.PreserveAspectFit
anchors.margins: size.dp(8)
anchors.margins: Theme.itemSpacingExtraSmall
source: control.iconSource
}
}
......
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
......
How to use the components generator
1. Have python 2 installed (the script don't work with Python 3 yet)
2. Add the components in "components.json"
3. call "./themehelper.py components.json"
4. copy all the generated files to the style folder in src
5. qmlRegisterUncreatableType the new created components in qquicknemostyleextensionplugin.cpp and
adds them in the style.pro file
6. update theme files if needed
You can also run ./generate.sh in the tools folder instead of doing 3 and 4.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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