diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2013-04-11 19:49:39 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-15 15:09:57 +0200 |
commit | 5857ea03a77e44879191dd922b7c38c49616517b (patch) | |
tree | bff6d278b83e1ee1699ae36a89dfea463d08caa9 /src/controls | |
parent | 2b309cf52dfff7307a055b2662e7ce1a53d44bdb (diff) | |
download | qtquickcontrols-5857ea03a77e44879191dd922b7c38c49616517b.tar.gz |
Remove hard dependency on widgets
Change-Id: I1fabb4efcc931f12f0a65ac5c66e6e085108269b
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src/controls')
-rw-r--r-- | src/controls/Button.qml | 3 | ||||
-rw-r--r-- | src/controls/CheckBox.qml | 4 | ||||
-rw-r--r-- | src/controls/ComboBox.qml | 3 | ||||
-rw-r--r-- | src/controls/GroupBox.qml | 4 | ||||
-rw-r--r-- | src/controls/Menu.qml | 4 | ||||
-rw-r--r-- | src/controls/MenuBar.qml | 3 | ||||
-rw-r--r-- | src/controls/ProgressBar.qml | 3 | ||||
-rw-r--r-- | src/controls/RadioButton.qml | 3 | ||||
-rw-r--r-- | src/controls/ScrollView.qml | 3 | ||||
-rw-r--r-- | src/controls/Slider.qml | 3 | ||||
-rw-r--r-- | src/controls/SpinBox.qml | 3 | ||||
-rw-r--r-- | src/controls/StatusBar.qml | 3 | ||||
-rw-r--r-- | src/controls/TabView.qml | 3 | ||||
-rw-r--r-- | src/controls/TableView.qml | 3 | ||||
-rw-r--r-- | src/controls/TextField.qml | 3 | ||||
-rw-r--r-- | src/controls/ToolBar.qml | 3 | ||||
-rw-r--r-- | src/controls/ToolButton.qml | 3 | ||||
-rw-r--r-- | src/controls/controls.pro | 2 |
18 files changed, 20 insertions, 36 deletions
diff --git a/src/controls/Button.qml b/src/controls/Button.qml index 5249d21f..2b5df56a 100644 --- a/src/controls/Button.qml +++ b/src/controls/Button.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "Styles/Settings.js" as Settings /*! \qmltype Button @@ -87,5 +86,5 @@ BasicButton { Accessible.name: text - style: Qt.createComponent(Settings.THEME_PATH + "/ButtonStyle.qml", button) + style: Qt.createComponent(Settings.theme() + "/ButtonStyle.qml", button) } diff --git a/src/controls/CheckBox.qml b/src/controls/CheckBox.qml index 7f03573e..8b3ce5ea 100644 --- a/src/controls/CheckBox.qml +++ b/src/controls/CheckBox.qml @@ -42,8 +42,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "Styles/Settings.js" as Settings - /*! \qmltype CheckBox \inqmlmodule QtQuick.Controls 1.0 @@ -130,7 +128,7 @@ AbstractCheckable { */ property bool __ignoreChecked: false - style: Qt.createComponent(Settings.THEME_PATH + "/CheckBoxStyle.qml", checkBox) + style: Qt.createComponent(Settings.theme() + "/CheckBoxStyle.qml", checkBox) activeFocusOnTab: true diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml index 53ff46e3..f1b3978d 100644 --- a/src/controls/ComboBox.qml +++ b/src/controls/ComboBox.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "Styles/Settings.js" as Settings /*! \qmltype ComboBox @@ -91,7 +90,7 @@ Control { /*! \internal */ property alias __containsMouse: mouseArea.containsMouse - style: Qt.createComponent(Settings.THEME_PATH + "/ComboBoxStyle.qml", comboBox) + style: Qt.createComponent(Settings.theme() + "/ComboBoxStyle.qml", comboBox) activeFocusOnTab: true diff --git a/src/controls/GroupBox.qml b/src/controls/GroupBox.qml index d67dc216..6aa94e09 100644 --- a/src/controls/GroupBox.qml +++ b/src/controls/GroupBox.qml @@ -40,8 +40,8 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 +import QtQuick.Controls.Private 1.0 import QtQuick.Controls.Styles 1.0 -import "Styles/Settings.js" as Settings /*! \qmltype GroupBox @@ -138,7 +138,7 @@ Item { property real contentHeight: content.childrenRect.height /*! \internal */ - property Component style: Qt.createComponent(Settings.THEME_PATH + "/GroupBoxStyle.qml", groupbox) + property Component style: Qt.createComponent(Settings.theme() + "/GroupBoxStyle.qml", groupbox) /*! \internal */ default property alias data: content.data diff --git a/src/controls/Menu.qml b/src/controls/Menu.qml index 1df73356..a65f76e3 100644 --- a/src/controls/Menu.qml +++ b/src/controls/Menu.qml @@ -41,7 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Styles 1.0 -import "Styles/Settings.js" as Settings +import QtQuick.Controls.Private 1.0 /*! \qmltype Menu @@ -129,7 +129,7 @@ MenuPrivate { property Component __selfComponent: null /*! \internal */ - property Component style: Qt.createComponent(Settings.THEME_PATH + "/MenuStyle.qml", root) + property Component style: Qt.createComponent(Settings.theme() + "/MenuStyle.qml", root) /*! \internal */ property var __menuBar: null diff --git a/src/controls/MenuBar.qml b/src/controls/MenuBar.qml index 43ff1562..226e304e 100644 --- a/src/controls/MenuBar.qml +++ b/src/controls/MenuBar.qml @@ -42,7 +42,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Styles 1.0 import QtQuick.Controls.Private 1.0 -import "Styles/Settings.js" as Settings /*! \qmltype MenuBar @@ -74,7 +73,7 @@ MenuBarPrivate { id: root /*! \internal */ - property Component style: Qt.createComponent(Settings.THEME_PATH + "/MenuBarStyle.qml", root) + property Component style: Qt.createComponent(Settings.theme() + "/MenuBarStyle.qml", root) /*! \internal */ __contentItem: Loader { diff --git a/src/controls/ProgressBar.qml b/src/controls/ProgressBar.qml index 340d5777..b379bb8b 100644 --- a/src/controls/ProgressBar.qml +++ b/src/controls/ProgressBar.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "Styles/Settings.js" as Settings /*! \qmltype ProgressBar @@ -97,7 +96,7 @@ Control { property int orientation: Qt.Horizontal /*! \internal */ - style: Qt.createComponent(Settings.THEME_PATH + "/ProgressBarStyle.qml", progressbar) + style: Qt.createComponent(Settings.theme() + "/ProgressBarStyle.qml", progressbar) /*! \internal */ property bool __initialized: false diff --git a/src/controls/RadioButton.qml b/src/controls/RadioButton.qml index 87f57257..e3173934 100644 --- a/src/controls/RadioButton.qml +++ b/src/controls/RadioButton.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "Styles/Settings.js" as Settings /*! \qmltype RadioButton @@ -87,7 +86,7 @@ AbstractCheckable { \codeline Qt.createComponent("path/to/style.qml", radioButtonId); */ - style: Qt.createComponent(Settings.THEME_PATH + "/RadioButtonStyle.qml", radioButton) + style: Qt.createComponent(Settings.theme() + "/RadioButtonStyle.qml", radioButton) __cycleStatesHandler: function() { checked = !checked; } } diff --git a/src/controls/ScrollView.qml b/src/controls/ScrollView.qml index a218b546..3ce2054a 100644 --- a/src/controls/ScrollView.qml +++ b/src/controls/ScrollView.qml @@ -42,7 +42,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 import QtQuick.Controls.Styles 1.0 -import "Styles/Settings.js" as Settings /*! \qmltype ScrollView @@ -140,7 +139,7 @@ FocusScope { /*! \internal */ property alias verticalScrollBar: scroller.verticalScrollBar /*! \internal */ - property Component style: Qt.createComponent(Settings.THEME_PATH + "/ScrollViewStyle.qml", root) + property Component style: Qt.createComponent(Settings.theme() + "/ScrollViewStyle.qml", root) /* \internal */ property Style __style: styleLoader.item diff --git a/src/controls/Slider.qml b/src/controls/Slider.qml index 0493d934..3cc51119 100644 --- a/src/controls/Slider.qml +++ b/src/controls/Slider.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "Styles/Settings.js" as Settings /*! \qmltype Slider @@ -181,7 +180,7 @@ Control { return Math.round(v); } - style: Qt.createComponent(Settings.THEME_PATH + "/SliderStyle.qml", slider) + style: Qt.createComponent(Settings.theme() + "/SliderStyle.qml", slider) Keys.onRightPressed: value += (maximumValue - minimumValue)/10.0 Keys.onLeftPressed: value -= (maximumValue - minimumValue)/10.0 diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index 3eb16b58..ebcf82e6 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "Styles/Settings.js" as Settings /*! \qmltype SpinBox @@ -131,7 +130,7 @@ Control { */ property bool activeFocusOnPress: true - style: Qt.createComponent(Settings.THEME_PATH + "/SpinBoxStyle.qml", spinbox) + style: Qt.createComponent(Settings.theme() + "/SpinBoxStyle.qml", spinbox) /*! \internal */ function __increment() { diff --git a/src/controls/StatusBar.qml b/src/controls/StatusBar.qml index 02ac5ab8..cd905179 100644 --- a/src/controls/StatusBar.qml +++ b/src/controls/StatusBar.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "Styles/Settings.js" as Settings /*! \qmltype StatusBar @@ -72,7 +71,7 @@ Item { Accessible.role: Accessible.StatusBar implicitWidth: parent ? parent.width : loader.item ? loader.item.implicitHeight : 0 implicitHeight: loader.item ? loader.item.implicitHeight : 0 - property Component style: Qt.createComponent(Settings.THEME_PATH + "/StatusBarStyle.qml", statusbar) + property Component style: Qt.createComponent(Settings.theme() + "/StatusBarStyle.qml", statusbar) Loader { id: loader anchors.fill: parent diff --git a/src/controls/TabView.qml b/src/controls/TabView.qml index 88336eee..1ff28392 100644 --- a/src/controls/TabView.qml +++ b/src/controls/TabView.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "Styles/Settings.js" as Settings /*! \qmltype TabView @@ -126,7 +125,7 @@ FocusScope { property var __tabs: new Array() /*! \internal */ - property Component style: Qt.createComponent(Settings.THEME_PATH + "/TabViewStyle.qml", root) + property Component style: Qt.createComponent(Settings.theme() + "/TabViewStyle.qml", root) /*! \internal */ property var __styleItem: loader.item diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml index 1dc5602c..22e7e052 100644 --- a/src/controls/TableView.qml +++ b/src/controls/TableView.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "Styles/Settings.js" as Settings /*! \qmltype TableView @@ -225,7 +224,7 @@ ScrollView { signal activated - style: Qt.createComponent(Settings.THEME_PATH + "/TableViewStyle.qml", root) + style: Qt.createComponent(Settings.theme() + "/TableViewStyle.qml", root) Accessible.role: Accessible.Table diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml index 9ec60fd5..7ce75ee9 100644 --- a/src/controls/TextField.qml +++ b/src/controls/TextField.qml @@ -42,7 +42,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 import "Styles" -import "Styles/Settings.js" as Settings /*! \qmltype TextField @@ -530,7 +529,7 @@ Control { /*! \internal */ property alias __contentWidth: textInput.contentWidth - style: Qt.createComponent(Settings.THEME_PATH + "/TextFieldStyle.qml", textInput) + style: Qt.createComponent(Settings.theme() + "/TextFieldStyle.qml", textInput) activeFocusOnTab: true diff --git a/src/controls/ToolBar.qml b/src/controls/ToolBar.qml index ffbf16e1..74c6433a 100644 --- a/src/controls/ToolBar.qml +++ b/src/controls/ToolBar.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "Styles/Settings.js" as Settings /*! \qmltype ToolBar @@ -75,7 +74,7 @@ Item { Accessible.role: Accessible.ToolBar implicitWidth: loader.item ? loader.item.implicitWidth : 0 implicitHeight: loader.item ? loader.item.implicitHeight : 0 - property Component style: Qt.createComponent(Settings.THEME_PATH + "/ToolBarStyle.qml", toolbar) + property Component style: Qt.createComponent(Settings.theme() + "/ToolBarStyle.qml", toolbar) Loader { id: loader anchors.fill: parent diff --git a/src/controls/ToolButton.qml b/src/controls/ToolButton.qml index 445ab96b..3116e76e 100644 --- a/src/controls/ToolButton.qml +++ b/src/controls/ToolButton.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import "Styles/Settings.js" as Settings /*! \qmltype ToolButton @@ -78,5 +77,5 @@ BasicButton { Accessible.name: text - style: Qt.createComponent(Settings.THEME_PATH + "/ToolButtonStyle.qml", button) + style: Qt.createComponent(Settings.theme() + "/ToolButtonStyle.qml", button) } diff --git a/src/controls/controls.pro b/src/controls/controls.pro index a57e9991..369329e1 100644 --- a/src/controls/controls.pro +++ b/src/controls/controls.pro @@ -1,7 +1,7 @@ TARGET = plugin TARGETPATH = QtQuick/Controls -QT += qml quick widgets gui-private core-private +QT += qml quick gui-private core-private QMAKE_DOCS = $$PWD/doc/qtquickcontrols.qdocconf |