[aurorae] Change QML for themes to QtQuick 2

Needed for getting proper previews in the QtQuick 2 based kcm.
Obviously this breaks Aurorae as Aurorae is not yet migrated to
QtQuick 2. But there is no more broken than broken anyway.
This commit is contained in:
Martin Gräßlin 2013-10-01 11:45:46 +02:00
parent 97572f3dbb
commit cd6fadc84c
13 changed files with 27 additions and 27 deletions

View file

@ -30,11 +30,11 @@ set(decoration_plugin_SRCS
add_library(decorationplugin SHARED ${decoration_plugin_SRCS})
target_link_libraries(decorationplugin
Qt5::Declarative
Qt5::Quick
kdecorations
KF5::KConfigWidgets
)
install(TARGETS decorationplugin DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/kwin/decoration)
install(TARGETS decorationplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/kwin/decoration)
########### install files ###############
@ -57,5 +57,5 @@ install( FILES
qml/AppMenuButton.qml
qml/ButtonGroup.qml
qml/qmldir
DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/kwin/decoration )
DESTINATION ${QML_INSTALL_DIR}/org/kde/kwin/decoration )
install( FILES kwindecoration.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} )

View file

@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "decorationplugin.h"
#include "colorhelper.h"
#include "decorationoptions.h"
#include <qdeclarative.h>
#include <QtQml>
void DecorationPlugin::registerTypes(const char *uri)
{

View file

@ -16,9 +16,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#ifndef DECORATION_PLUGIN_H
#define DECORATION_PLUGIN_H
#include <QDeclarativeExtensionPlugin>
#include <QQmlExtensionPlugin>
class DecorationPlugin : public QDeclarativeExtensionPlugin
class DecorationPlugin : public QQmlExtensionPlugin
{
Q_PLUGIN_METADATA(IID "org.kde.kwin.decoration")
Q_OBJECT

View file

@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 1.1
import org.kde.qtextracomponents 0.1 as QtExtra
import QtQuick 2.0
import org.kde.qtextracomponents 2.0 as QtExtra
DecorationButton {
id: appMenuButton

View file

@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 1.1
import org.kde.plasma.core 0.1 as PlasmaCore
import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
DecorationButton {
function widthForButton() {

View file

@ -14,21 +14,21 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 1.1
import org.kde.plasma.core 0.1 as PlasmaCore
import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
Item {
function createButtons() {
var component = Qt.createComponent("AuroraeButton.qml");
for (var i=0; i<buttons.length; i++) {
if (buttons.charAt(i) == "_") {
Qt.createQmlObject("import QtQuick 1.1; Item { width: auroraeTheme.explicitButtonSpacer * auroraeTheme.buttonSizeFactor; height: auroraeTheme.buttonHeight * auroraeTheme.buttonSizeFactor }",
Qt.createQmlObject("import QtQuick 2.0; Item { width: auroraeTheme.explicitButtonSpacer * auroraeTheme.buttonSizeFactor; height: auroraeTheme.buttonHeight * auroraeTheme.buttonSizeFactor }",
groupRow, "explicitSpacer" + buttons + i);
} else if (buttons.charAt(i) == "M") {
Qt.createQmlObject("import QtQuick 1.1; MenuButton { width: auroraeTheme.buttonWidthMenu * auroraeTheme.buttonSizeFactor; height: auroraeTheme.buttonHeight * auroraeTheme.buttonSizeFactor }",
Qt.createQmlObject("import QtQuick 2.0; MenuButton { width: auroraeTheme.buttonWidthMenu * auroraeTheme.buttonSizeFactor; height: auroraeTheme.buttonHeight * auroraeTheme.buttonSizeFactor }",
groupRow, "menuButton" + buttons + i);
} else if (buttons.charAt(i) == "N") {
Qt.createQmlObject("import QtQuick 1.1; AppMenuButton { width: auroraeTheme.buttonWidthAppMenu * auroraeTheme.buttonSizeFactor; height: auroraeTheme.buttonHeight * auroraeTheme.buttonSizeFactor }",
Qt.createQmlObject("import QtQuick 2.0; AppMenuButton { width: auroraeTheme.buttonWidthAppMenu * auroraeTheme.buttonSizeFactor; height: auroraeTheme.buttonHeight * auroraeTheme.buttonSizeFactor }",
groupRow, "appMenuButton" + buttons + i);
} else if (buttons.charAt(i) == "A") {
var maximizeComponent = Qt.createComponent("AuroraeMaximizeButton.qml");
@ -47,7 +47,7 @@ Item {
spacing: auroraeTheme.buttonSpacing * auroraeTheme.buttonSizeFactor
}
onButtonsChanged: {
for (i = 0; i < groupRow.children.length; i++) {
for (var i = 0; i < groupRow.children.length; i++) {
groupRow.children[i].destroy();
}
createButtons();

View file

@ -14,7 +14,7 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 1.1
import QtQuick 2.0
Item {
id: button

View file

@ -14,7 +14,7 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 1.1
import QtQuick 2.0
Item {
function createButtons() {
@ -58,7 +58,7 @@ Item {
if (!component) {
continue;
}
var button = Qt.createQmlObject("import QtQuick 1.1; Loader{}", groupRow, "dynamicGroup_" + buttons + i);
var button = Qt.createQmlObject("import QtQuick 2.0; Loader{}", groupRow, "dynamicGroup_" + buttons + i);
button.sourceComponent = component;
}
}

View file

@ -14,10 +14,10 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.kwin.decoration 0.1
Item {
signal alphaChanged()
property QtObject borders: Borders {
objectName: "borders"
}
@ -31,7 +31,6 @@ Item {
objectName: "padding"
}
property bool alpha: true
onAlphaChanged: alphaChanged()
MouseArea {
anchors.fill: parent

View file

@ -14,7 +14,7 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 1.1
import QtQuick 2.0
Item {
id: button

View file

@ -14,8 +14,8 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 1.1
import org.kde.qtextracomponents 0.1 as QtExtra
import QtQuick 2.0
import org.kde.qtextracomponents 2.0 as QtExtra
DecorationButton {
property bool closeOnDoubleClick: true

View file

@ -14,9 +14,9 @@ General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import QtQuick 1.1
import QtQuick 2.0
import org.kde.kwin.decoration 0.1
import org.kde.plasma.core 0.1 as PlasmaCore
import org.kde.plasma.core 2.0 as PlasmaCore
Decoration {
id: root

View file

@ -1,3 +1,4 @@
module org.kde.kwin.decoration
plugin decorationplugin
Decoration 0.1 Decoration.qml