Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 75624462519d2dee21813e9401ac8229 > files > 2

kdebase-workspace-4.7.4-9.fc16.src.rpm

diff -up kde-workspace-4.7.3/ksplash/CMakeLists.txt.ksplash-qml kde-workspace-4.7.3/ksplash/CMakeLists.txt
--- kde-workspace-4.7.3/ksplash/CMakeLists.txt.ksplash-qml	2011-05-20 15:32:07.000000000 -0500
+++ kde-workspace-4.7.3/ksplash/CMakeLists.txt	2011-11-17 11:50:41.327911185 -0600
@@ -2,3 +2,4 @@ add_subdirectory( ksplashx )
 add_subdirectory( simple )
 add_subdirectory( none )
 add_subdirectory( kcm )
+add_subdirectory( ksplashqml )
diff -up kde-workspace-4.7.3/ksplash/kcm/installer.cpp.ksplash-qml kde-workspace-4.7.3/ksplash/kcm/installer.cpp
--- kde-workspace-4.7.3/ksplash/kcm/installer.cpp.ksplash-qml	2011-05-20 15:32:07.000000000 -0500
+++ kde-workspace-4.7.3/ksplash/kcm/installer.cpp	2011-11-17 11:50:41.327911185 -0600
@@ -184,7 +184,7 @@ SplashInstaller::~SplashInstaller()
 
 int SplashInstaller::addTheme(const QString &path, const QString &name)
 {
-  //kDebug() << "SplashInstaller::addTheme: " << path << " " << name;
+  qDebug() << "SplashInstaller::addTheme: " << path << " " << name;
   QString tmp(i18n( name.toUtf8() ));
   int i = mThemesList->count();
   while((i > 0) && (mThemesList->item(i-1)->text() > tmp))
@@ -434,7 +434,11 @@ void SplashInstaller::slotSetTheme(int i
         infoTxt += "</qt>";
 
         QString pluginName( cnf.readEntry( "Engine", "KSplashX" ).trimmed() );
-        if( pluginName == "Simple" || pluginName == "None" || pluginName == "KSplashX" )
+        if( pluginName == "Simple"
+                || pluginName == "None"
+                || pluginName == "KSplashX"
+                || pluginName == "KSplashQML"
+                )
             enabled = true; // these are not plugins
         else if ((KServiceTypeTrader::self()->query("KSplash/Plugin", QString("[X-KSplash-PluginName] == '%1'").arg(pluginName))).isEmpty())
         {
@@ -536,6 +540,7 @@ void SplashInstaller::slotTest()
     themeName = themeName.mid(r+1);
 
   // special handling for none and simple splashscreens
+  qDebug() << "the engine is " << mEngineOfSelected << "for" << themeName;
   if( mEngineOfSelected == "None" )
     return;
   else if( mEngineOfSelected == "Simple" )
@@ -553,6 +558,14 @@ void SplashInstaller::slotTest()
     if (proc.execute())
       KMessageBox::error(this,i18n("Failed to successfully test the splash screen."));
     return;
+  }
+  else if( mEngineOfSelected == "KSplashQML" )
+  {
+    KProcess proc;
+    proc << "ksplashqml" << themeName << "--test";
+    if (proc.execute())
+      KMessageBox::error(this,i18n("Failed to successfully test the splash screen."));
+    return;
   }
   else // KSplashML engines
   {
diff -up kde-workspace-4.7.3/ksplash/ksplashqml/CMakeLists.txt.ksplash-qml kde-workspace-4.7.3/ksplash/ksplashqml/CMakeLists.txt
--- kde-workspace-4.7.3/ksplash/ksplashqml/CMakeLists.txt.ksplash-qml	2011-11-17 11:50:41.328911173 -0600
+++ kde-workspace-4.7.3/ksplash/ksplashqml/CMakeLists.txt	2011-11-17 11:58:06.437346601 -0600
@@ -0,0 +1,18 @@
+project(ksplashqml)
+
+set(ksplashqml_SRCS
+    main.cpp
+    SplashApp.cpp
+    SplashWindow.cpp
+   )
+
+add_executable(ksplashqml ${ksplashqml_SRCS})
+
+target_link_libraries(ksplashqml
+   ${X11_LIBRARIES}
+   ${QT_QTCORE_LIBRARY}
+   ${QT_QTDECLARATIVE_LIBRARY}
+   ${QT_QTGUI_LIBRARY}
+   )
+
+install(TARGETS ksplashqml ${INSTALL_TARGETS_DEFAULT_ARGS})
diff -up kde-workspace-4.7.3/ksplash/ksplashqml/main.cpp.ksplash-qml kde-workspace-4.7.3/ksplash/ksplashqml/main.cpp
--- kde-workspace-4.7.3/ksplash/ksplashqml/main.cpp.ksplash-qml	2011-11-17 11:50:41.329911160 -0600
+++ kde-workspace-4.7.3/ksplash/ksplashqml/main.cpp	2011-11-17 11:50:41.329911160 -0600
@@ -0,0 +1,66 @@
+/*
+ *   Copyright (C) 2011 Ivan Cukic <ivan.cukic(at)kde.org>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   or (at your option) any later version, as published by the Free
+ *   Software Foundation
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details
+ *
+ *   You should have received a copy of the GNU General Public
+ *   License along with this program; if not, write to the
+ *   Free Software Foundation, Inc.,
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#include "SplashApp.h"
+
+#include <iostream>
+#include <X11/Xlib.h>
+
+int main(int argc, char **argv)
+{
+    bool test = false;
+    bool printPid = false;
+
+    for (int i = 1; i < argc; i++) {
+        if (strcmp("--test", argv[i]) == 0)
+            test = true;
+        else if (strcmp("--pid", argv[i]) == 0)
+            printPid = true;
+    }
+
+    // lets fork and all that...
+
+    if (!test) {
+        pid_t pid = fork();
+        if (pid < -1) {
+            return -1;
+        }
+
+        if (pid != 0) {
+            // this is the parent process, returning pid of the fork
+            if (printPid) {
+                std::cout << pid << std::endl;
+            }
+
+            return 0;
+        }
+
+        // close stdin,stdout,stderr, otherwise startkde will block
+        close(0);
+        close(1);
+        close(2);
+    }
+
+    Display * display = XOpenDisplay(NULL);
+
+    SplashApp app(display, argc, argv);
+
+    return app.exec();
+}
+
diff -up kde-workspace-4.7.3/ksplash/ksplashqml/SplashApp.cpp.ksplash-qml kde-workspace-4.7.3/ksplash/ksplashqml/SplashApp.cpp
--- kde-workspace-4.7.3/ksplash/ksplashqml/SplashApp.cpp.ksplash-qml	2011-11-17 11:50:41.328911173 -0600
+++ kde-workspace-4.7.3/ksplash/ksplashqml/SplashApp.cpp	2011-11-17 11:50:41.328911173 -0600
@@ -0,0 +1,116 @@
+/*
+ *   Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   or (at your option) any later version, as published by the Free
+ *   Software Foundation
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details
+ *
+ *   You should have received a copy of the GNU General Public
+ *   License along with this program; if not, write to the
+ *   Free Software Foundation, Inc.,
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#include "SplashWindow.h"
+#include "SplashApp.h"
+
+#define TEST_STEP_INTERVAL 2000
+
+SplashApp::SplashApp(Display * display, int argc, char ** argv)
+    : QApplication(display, argc, argv),
+      m_display(display), m_stage(0), m_window(0),
+      m_testing(false)
+{
+    m_kde_splash_progress = XInternAtom(m_display, "_KDE_SPLASH_PROGRESS", False);
+    m_testing = arguments().contains("--test");
+    m_window = new SplashWindow(m_testing);
+
+    setStage(1);
+
+    int sw = WidthOfScreen(ScreenOfDisplay(display, DefaultScreen(display)));
+    int sh = HeightOfScreen(ScreenOfDisplay(display, DefaultScreen(display)));
+
+    m_window->setGeometry(0, 0, sw, sh);
+    m_window->show();
+
+    XSelectInput(display, DefaultRootWindow(display), SubstructureNotifyMask);
+
+    if (m_testing) {
+        m_timer.start(TEST_STEP_INTERVAL, this);
+    }
+}
+
+SplashApp::~SplashApp() {
+    delete m_window;
+}
+
+Display * SplashApp::display() const
+{
+    return m_display;
+}
+
+void SplashApp::timerEvent(QTimerEvent * event)
+{
+    if (event->timerId() == m_timer.timerId()) {
+        m_timer.stop();
+
+        setStage(m_stage + 1);
+
+        m_timer.start(TEST_STEP_INTERVAL, this);
+    }
+}
+
+bool SplashApp::x11EventFilter(XEvent * xe)
+{
+    char * message;
+    switch (xe->type) {
+        case ClientMessage:
+            if (xe->xclient.message_type == m_kde_splash_progress) {
+                message = xe->xclient.data.b;
+
+                int stage = -1;
+
+                if (strcmp(message, "initial") == 0 && m_stage < 0)
+                    stage = 0; // not actually used
+                else if (strcmp(message, "kded") == 0 && m_stage < 1)
+                    stage = 1;
+                else if (strcmp(message, "confupdate") == 0 && m_stage < 2)
+                    stage = 2;
+                else if (strcmp(message, "kcminit") == 0 && m_stage < 3)
+                    stage = 3;
+                else if (strcmp(message, "ksmserver") == 0 && m_stage < 4)
+                    stage = 4;
+                else if (strcmp(message, "wm") == 0 && m_stage < 5)
+                    stage = 5;
+                else if (strcmp(message, "desktop") == 0 && m_stage < 6)
+                    stage = 6;
+
+                setStage(stage);
+            }
+    }
+    return false;
+
+}
+
+int SplashApp::x11ProcessEvent(XEvent * xe)
+{
+    Q_UNUSED(xe)
+    return 0;
+}
+
+void SplashApp::setStage(int stage)
+{
+    if (m_stage == 6) {
+        QApplication::exit(EXIT_SUCCESS);
+    }
+
+    m_stage = stage;
+    m_window->setStage(stage);
+}
+
diff -up kde-workspace-4.7.3/ksplash/ksplashqml/SplashApp.h.ksplash-qml kde-workspace-4.7.3/ksplash/ksplashqml/SplashApp.h
--- kde-workspace-4.7.3/ksplash/ksplashqml/SplashApp.h.ksplash-qml	2011-11-17 11:50:41.328911173 -0600
+++ kde-workspace-4.7.3/ksplash/ksplashqml/SplashApp.h	2011-11-17 11:50:41.328911173 -0600
@@ -0,0 +1,55 @@
+/*
+ *   Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   or (at your option) any later version, as published by the Free
+ *   Software Foundation
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details
+ *
+ *   You should have received a copy of the GNU General Public
+ *   License along with this program; if not, write to the
+ *   Free Software Foundation, Inc.,
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#ifndef SPLASH_APP_H_
+#define SPLASH_APP_H_
+
+#include <QObject>
+#include <QApplication>
+#include <QBasicTimer>
+
+#include <X11/Xlib.h>
+
+class SplashWindow;
+
+class SplashApp: public QApplication {
+
+public:
+    SplashApp(Display * display, int argc, char ** argv);
+    ~SplashApp();
+
+    Display * display() const;
+
+    bool x11EventFilter(XEvent * xe);
+    int x11ProcessEvent(XEvent * xe);
+
+protected:
+    void timerEvent(QTimerEvent * event);
+    void setStage(int stage);
+
+private:
+    Display * m_display;
+    int m_stage;
+    Atom m_kde_splash_progress;
+    SplashWindow * m_window;
+    bool m_testing;
+    QBasicTimer m_timer;
+};
+
+#endif // SPLASH_APP_H_
diff -up kde-workspace-4.7.3/ksplash/ksplashqml/SplashWindow.cpp.ksplash-qml kde-workspace-4.7.3/ksplash/ksplashqml/SplashWindow.cpp
--- kde-workspace-4.7.3/ksplash/ksplashqml/SplashWindow.cpp.ksplash-qml	2011-11-17 11:50:41.328911173 -0600
+++ kde-workspace-4.7.3/ksplash/ksplashqml/SplashWindow.cpp	2011-11-17 11:50:41.328911173 -0600
@@ -0,0 +1,83 @@
+/*
+ *   Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   or (at your option) any later version, as published by the Free
+ *   Software Foundation
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details
+ *
+ *   You should have received a copy of the GNU General Public
+ *   License along with this program; if not, write to the
+ *   Free Software Foundation, Inc.,
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#include "SplashWindow.h"
+
+#include <QApplication>
+#include <QDeclarativeContext>
+#include <QGraphicsObject>
+#include <QKeyEvent>
+#include <QMouseEvent>
+#include <QTimer>
+
+#include "SystemInfo.h"
+
+SplashWindow::SplashWindow(bool testing)
+    : QDeclarativeView(),
+      m_stage(0),
+      m_testing(testing)
+{
+    setWindowFlags(
+            Qt::FramelessWindowHint |
+            Qt::WindowStaysOnTopHint
+        );
+
+    if (m_testing) {
+        setWindowState(Qt::WindowFullScreen);
+    } else {
+        setWindowFlags(Qt::X11BypassWindowManagerHint);
+    }
+
+    rootContext()->setContextProperty("screenSize", size());
+    setSource(QUrl(themeDir(QApplication::arguments().at(1)) + "/main.qml"));
+    setStyleSheet("background: #000000; border: none");
+    //be sure it will be eventually closed
+    //FIXME: should never be stuck
+    QTimer::singleShot(120000, this, SLOT(close()));
+}
+
+void SplashWindow::setStage(int stage)
+{
+    m_stage = stage;
+
+    rootObject()->setProperty("stage", stage);
+}
+
+void SplashWindow::resizeEvent(QResizeEvent *event)
+{
+    Q_UNUSED(event)
+    rootContext()->setContextProperty("screenSize", size());
+    centerOn(rootObject());
+}
+
+void SplashWindow::keyPressEvent(QKeyEvent *event)
+{
+    QDeclarativeView::keyPressEvent(event);
+    if (m_testing && !event->isAccepted() && event->key() == Qt::Key_Escape) {
+        close();
+    }
+}
+
+void SplashWindow::mousePressEvent(QMouseEvent *event)
+{
+    QDeclarativeView::mousePressEvent(event);
+    if (m_testing && !event->isAccepted()) {
+        close();
+    }
+}
diff -up kde-workspace-4.7.3/ksplash/ksplashqml/SplashWindow.h.ksplash-qml kde-workspace-4.7.3/ksplash/ksplashqml/SplashWindow.h
--- kde-workspace-4.7.3/ksplash/ksplashqml/SplashWindow.h.ksplash-qml	2011-11-17 11:50:41.329911160 -0600
+++ kde-workspace-4.7.3/ksplash/ksplashqml/SplashWindow.h	2011-11-17 11:50:41.329911160 -0600
@@ -0,0 +1,46 @@
+/*
+ *   Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   or (at your option) any later version, as published by the Free
+ *   Software Foundation
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details
+ *
+ *   You should have received a copy of the GNU General Public
+ *   License along with this program; if not, write to the
+ *   Free Software Foundation, Inc.,
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#ifndef SPLASH_WINDOW_H_
+#define SPLASH_WINDOW_H_
+
+#include <QDeclarativeView>
+
+class QResizeEvent;
+class QMouseEvent;
+class QKeyEvent;
+
+class SplashWindow: public QDeclarativeView
+{
+public:
+    SplashWindow(bool testing);
+
+    void setStage(int stage);
+
+protected:
+    virtual void resizeEvent (QResizeEvent *event);
+    virtual void keyPressEvent(QKeyEvent *event);
+    virtual void mousePressEvent(QMouseEvent *event);
+
+private:
+    int m_stage;
+    bool m_testing;
+};
+
+#endif // SPLASH_WINDOW_H_
diff -up kde-workspace-4.7.3/ksplash/ksplashqml/SystemInfo.h.ksplash-qml kde-workspace-4.7.3/ksplash/ksplashqml/SystemInfo.h
--- kde-workspace-4.7.3/ksplash/ksplashqml/SystemInfo.h.ksplash-qml	2011-11-17 11:50:41.329911160 -0600
+++ kde-workspace-4.7.3/ksplash/ksplashqml/SystemInfo.h	2011-11-17 11:50:41.329911160 -0600
@@ -0,0 +1,60 @@
+/*
+ *   Copyright (C) 2010 Ivan Cukic <ivan.cukic(at)kde.org>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   or (at your option) any later version, as published by the Free
+ *   Software Foundation
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details
+ *
+ *   You should have received a copy of the GNU General Public
+ *   License along with this program; if not, write to the
+ *   Free Software Foundation, Inc.,
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+#ifndef SYSTEM_INFO_H_
+#define SYSTEM_INFO_H_
+
+#include <stdlib.h>
+#include <config-workspace.h>
+
+#include <QDir>
+#include <QString>
+
+QString homeDir()
+{
+    const char * kdehome = getenv("KDEHOME");
+    const char * home = getenv("HOME");
+    if (kdehome && kdehome[0]) {
+        return QString() + home + "/" + KDE_DEFAULT_HOME;
+    }
+
+    return kdehome;
+}
+
+QString systemDir()
+{
+    return KDE_DATADIR;
+}
+
+QString themeDir(QString theme)
+{
+    QString path;
+
+    path = homeDir() + "/share/apps/ksplash/Themes/" + theme;
+
+    if (!QDir(path).exists()) {
+        path = systemDir() + "/ksplash/Themes/" + theme;
+    }
+
+    return path;
+}
+
+#endif // SYSTEM_INFO_H_
+
+
diff -up kde-workspace-4.7.3/ksplash/ksplashqml/themes/CMakeLists.txt.ksplash-qml kde-workspace-4.7.3/ksplash/ksplashqml/themes/CMakeLists.txt
--- kde-workspace-4.7.3/ksplash/ksplashqml/themes/CMakeLists.txt.ksplash-qml	2011-11-17 11:50:41.329911160 -0600
+++ kde-workspace-4.7.3/ksplash/ksplashqml/themes/CMakeLists.txt	2011-11-17 11:50:41.329911160 -0600
@@ -0,0 +1,2 @@
+add_subdirectory(qmltest)
+add_subdirectory(qmldefault)
diff -up kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmldefault/CMakeLists.txt.ksplash-qml kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmldefault/CMakeLists.txt
--- kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmldefault/CMakeLists.txt.ksplash-qml	2011-11-17 11:50:41.330911147 -0600
+++ kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmldefault/CMakeLists.txt	2011-11-17 11:50:41.330911147 -0600
@@ -0,0 +1,7 @@
+install(FILES Preview.png Theme.rc main.qml DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmldefault)
+
+install(FILES images/kdegear.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmldefault/images)
+install(FILES images/kdeletter.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmldefault/images)
+install(FILES images/kdemask.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmldefault/images)
+install(FILES images/kdelogo.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmldefault/images)
+install(FILES images/kdelogo-contrast.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmldefault/images)
diff -up kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmldefault/main.qml.ksplash-qml kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmldefault/main.qml
--- kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmldefault/main.qml.ksplash-qml	2011-11-17 11:50:41.330911147 -0600
+++ kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmldefault/main.qml	2011-11-17 11:50:41.330911147 -0600
@@ -0,0 +1,189 @@
+/*   vim:set foldenable foldmethod=marker:
+ *
+ *   Copyright (C) 2011 Ivan Cukic <ivan.cukic(at)kde.org>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   or (at your option) any later version, as published by the Free
+ *   Software Foundation
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details
+ *
+ *   You should have received a copy of the GNU General Public
+ *   License along with this program; if not, write to the
+ *   Free Software Foundation, Inc.,
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+import Qt 4.7
+
+Item {
+    id: main
+
+    width: screenSize.width
+    height: screenSize.height
+    // width: 300
+    // height: 300
+
+    /* property declarations --------------------------{{{ */
+    property int stage
+    property int iconSize: (screenSize.width <= 1024) ? 64 : 128
+    /* }}} */
+
+    /* signal declarations ----------------------------{{{ */
+
+    /* }}} */
+
+    /* JavaScript functions ---------------------------{{{ */
+    onStageChanged: {
+        if (stage == 1) {
+            background.opacity = 1
+            gear.opacity = 0.5
+        }
+        if (stage == 2) {
+            gear.opacity = 1
+            mask.opacity = 1
+            letter.opacity = 1
+        }
+        if (stage == 3) {
+        }
+        if (stage == 4) {
+        }
+        if (stage == 5) {
+            logo.opacity = 1
+        }
+        if (stage == 6) {
+        }
+    }
+    /* }}} */
+
+    /* object properties ------------------------------{{{ */
+
+    /* }}} */
+
+    /* child objects ----------------------------------{{{ */
+
+    Rectangle {
+        color: "black"
+        anchors.fill: parent
+    }
+
+    Rectangle {
+        id: background
+
+        gradient: Gradient {
+            GradientStop { position: 0.0; color: "#55555f" }
+            GradientStop { position: 1.0; color: "#000000" }
+        }
+
+        anchors {
+            top: parent.top
+            left: parent.left
+            right: parent.right
+        }
+
+        height: gear.y - 32
+
+        opacity: 0
+        Behavior on opacity { NumberAnimation { duration: 1000; easing { type: Easing.InOutQuad } } }
+    }
+
+    Image {
+        id: gear
+
+        height: iconSize
+        width: iconSize
+        smooth: true
+
+        x: (parent.width - width) / 2
+        y: (parent.height - height) / 2
+
+        source: "images/kdegear.png"
+
+        opacity: 0
+        Behavior on opacity { NumberAnimation { duration: 1000; easing { type: Easing.InOutQuad } } }
+
+        NumberAnimation {
+            id: animateRotation
+            target: gear
+            properties: "rotation"
+            from: 0
+            to: 360
+            duration: 5000
+
+            loops: Animation.Infinite
+            running: true
+        }
+
+    }
+
+    Image {
+        id: mask
+
+        height: iconSize
+        width: iconSize
+        smooth: true
+
+        x: (parent.width - width) / 2
+        y: (parent.height - height) / 2
+
+        source: "images/kdemask.png"
+
+        opacity: 0
+        Behavior on opacity { NumberAnimation { duration: 1000; easing { type: Easing.InOutQuad } } }
+    }
+
+    Image {
+        id: letter
+
+        height: iconSize
+        width: iconSize
+        smooth: true
+
+        x: (parent.width - width) / 2
+        y: (parent.height - height) / 2
+
+        source: "images/kdeletter.png"
+
+        opacity: 0
+        Behavior on opacity { NumberAnimation { duration: 1000; easing { type: Easing.InOutQuad } } }
+    }
+
+    Image {
+        id: logo
+
+        height: iconSize
+        width: iconSize
+        smooth: true
+
+        x: (parent.width - width) / 2
+        y: (parent.height - height) / 2 - 1
+
+        source: "images/kdelogo-contrast.png"
+
+        opacity: 0
+        Behavior on opacity { NumberAnimation { duration: 1000; easing { type: Easing.InOutQuad } } }
+
+        Text {
+            text: "KDE Workspaces 4.7 'Friday'"
+            color: "white"
+
+            x: logo.width + 8
+            y: (logo.height - height) / 2
+        }
+    }
+
+    /* }}} */
+
+    /* stages -----------------------------------------{{{ */
+
+    /* }}} */
+
+    /* transitions ------------------------------------{{{ */
+
+    /* }}} */
+}
+
diff -up kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmldefault/Theme.rc.ksplash-qml kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmldefault/Theme.rc
--- kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmldefault/Theme.rc.ksplash-qml	2011-11-17 11:50:41.330911147 -0600
+++ kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmldefault/Theme.rc	2011-11-17 11:50:41.330911147 -0600
@@ -0,0 +1,9 @@
+[KSplash Theme: qmldefault]
+Name = Minimalistic splash screen
+Description = Animated KDE logo on a black background
+Version = 1.0
+Author = Ivan Cukic <ivan.cukic at kde.org>
+Homepage = http://www.kde.org
+
+# Theme behaviour settings.
+Engine = KSplashQML
diff -up kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmltest/CMakeLists.txt.ksplash-qml kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmltest/CMakeLists.txt
--- kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmltest/CMakeLists.txt.ksplash-qml	2011-11-17 11:50:41.330911147 -0600
+++ kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmltest/CMakeLists.txt	2011-11-17 11:50:41.330911147 -0600
@@ -0,0 +1,9 @@
+install(FILES Preview.png Theme.rc main.qml DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest)
+
+install(FILES images/background.jpg DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest/images)
+install(FILES images/configuring.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest/images)
+install(FILES images/desktop.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest/images)
+install(FILES images/globe.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest/images)
+install(FILES images/hardware.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest/images)
+install(FILES images/kde.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest/images)
+install(FILES images/plasma.png DESTINATION ${DATA_INSTALL_DIR}/ksplash/Themes/qmltest/images)
diff -up kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmltest/main.qml.ksplash-qml kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmltest/main.qml
--- kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmltest/main.qml.ksplash-qml	2011-11-17 11:50:41.331911134 -0600
+++ kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmltest/main.qml	2011-11-17 11:50:41.331911134 -0600
@@ -0,0 +1,164 @@
+/*   vim:set foldenable foldmethod=marker:
+ *
+ *   Copyright (C) 2011 Ivan Cukic <ivan.cukic(at)kde.org>
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   or (at your option) any later version, as published by the Free
+ *   Software Foundation
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details
+ *
+ *   You should have received a copy of the GNU General Public
+ *   License along with this program; if not, write to the
+ *   Free Software Foundation, Inc.,
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+import Qt 4.7 as QML
+
+QML.Item {
+    id: main
+
+    width: screenSize.width
+    height: screenSize.height
+
+    /* property declarations --------------------------{{{ */
+    property int stage
+    /* }}} */
+
+    /* signal declarations ----------------------------{{{ */
+
+    /* }}} */
+
+    /* JavaScript functions ---------------------------{{{ */
+    onStageChanged: {
+        if (stage == 2) {
+            stage1.x = (main.width - stage1.width) / 2
+            stage1.opacity = 1
+        }
+        if (stage == 3) {
+            stage1.x = - stage1.width
+            stage2.x = (main.width - stage2.width) / 2
+            stage1.opacity = 0
+            stage2.opacity = 1
+        }
+        if (stage == 4) {
+            stage2.x = - stage2.width
+            stage3.x = (main.width - stage3.width) / 2
+            stage2.opacity = 0
+            stage3.opacity = 1
+        }
+        if (stage == 5) {
+            stage3.x = - stage3.width
+            stage4.x = (main.width - stage4.width) / 2
+            stage3.opacity = 0
+            stage4.opacity = 1
+        }
+        if (stage == 6) {
+            stage4.x = - stage4.width
+            stage5.x = (main.width - stage5.width) / 2
+            stage4.opacity = 0
+            stage5.opacity = 1
+            stage5.width = 128
+            stage5.height = 128
+        }
+    }
+    /* }}} */
+
+    /* object properties ------------------------------{{{ */
+
+    /* }}} */
+
+    /* child objects ----------------------------------{{{ */
+    QML.Image {
+        anchors.fill: parent
+
+        source: "images/background.jpg"
+    }
+
+    QML.Rectangle {
+        width: parent.width
+        height: 100
+        x: 0
+        y: (parent.height - height) / 2
+        color: "#ffffff"
+        opacity: 0.2
+    }
+
+    QML.Image {
+        id: stage1
+        x: main.width + width
+        y: (main.height - height) / 2
+        source: "images/hardware.png"
+        QML.Behavior on x { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
+        opacity: 0
+        QML.Behavior on opacity { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
+
+        QML.Image { y: 128; x: parent.x - main.width / 2; height: 128; width: 128; opacity: 0.2 * parent.opacity; source: parent.source }
+    }
+
+    QML.Image {
+        id: stage2
+        x: main.width + width
+        y: (main.height - height) / 2
+        source: "images/configuring.png"
+        QML.Behavior on x { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
+        opacity: 0
+        QML.Behavior on opacity { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
+
+        QML.Image { y: 128; x: parent.x - main.width / 2; height: 128; width: 128; opacity: 0.2 * parent.opacity; source: parent.source }
+    }
+
+    QML.Image {
+        id: stage3
+        x: main.width + width
+        y: (main.height - height) / 2
+        source: "images/globe.png"
+        QML.Behavior on x { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
+        opacity: 0
+        QML.Behavior on opacity { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
+
+        QML.Image { y: 128; x: parent.x - main.width / 2; height: 128; width: 128; opacity: 0.2 * parent.opacity; source: parent.source }
+    }
+
+    QML.Image {
+        id: stage4
+        x: main.width + width
+        y: (main.height - height) / 2
+        source: "images/desktop.png"
+        QML.Behavior on x { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
+        opacity: 0
+        QML.Behavior on opacity { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
+
+        QML.Image { y: 128; x: parent.x - main.width / 2; height: 128; width: 128; opacity: 0.2 * parent.opacity; source: parent.source }
+    }
+
+    QML.Image {
+        id: stage5
+        x: main.width + width
+        y: (main.height - height) / 2
+        source: "images/kde.png"
+        QML.Behavior on x { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
+        QML.Behavior on width { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
+        QML.Behavior on height { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
+        opacity: 0
+        QML.Behavior on opacity { QML.NumberAnimation { duration: 1000; easing { type: QML.Easing.InOutQuad } } }
+
+        // QML.Image { y: 128; x: parent.x - main.width / 2; height: 128; width: 128; opacity: 0.2 * parent.opacity; source: parent.source }
+    }
+
+    /* }}} */
+
+    /* stages -----------------------------------------{{{ */
+
+    /* }}} */
+
+    /* transitions ------------------------------------{{{ */
+
+    /* }}} */
+}
+
diff -up kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmltest/Theme.rc.ksplash-qml kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmltest/Theme.rc
--- kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmltest/Theme.rc.ksplash-qml	2011-11-17 11:50:41.331911134 -0600
+++ kde-workspace-4.7.3/ksplash/ksplashqml/themes/qmltest/Theme.rc	2011-11-17 11:50:41.331911134 -0600
@@ -0,0 +1,9 @@
+[KSplash Theme: QMLtest]
+Name = Default Splash Screen
+Description = Air and Horos Splash Screen
+Version = 1.0
+Author = Nuno Pinheiro <nuno@oxygen-icons.org>, Riccardo Iaconelli <riccardo@kde.org> and Marco Martin <notmart@gmail.com>
+Homepage = http://www.kde.org
+
+# Theme behaviour settings.
+Engine = KSplashQML
diff -up kde-workspace-4.7.3/kwin/composite.cpp.ksplash-qml kde-workspace-4.7.3/kwin/composite.cpp
--- kde-workspace-4.7.3/kwin/composite.cpp.ksplash-qml	2011-07-19 16:33:58.000000000 -0500
+++ kde-workspace-4.7.3/kwin/composite.cpp	2011-11-17 11:50:41.331911134 -0600
@@ -991,7 +991,10 @@ bool Unmanaged::shouldUnredirect() const
 {
     // the pixmap is needed for the login effect, a nicer solution would be the login effect increasing
     // refcount for the window pixmap (which would prevent unredirect), avoiding this hack
-    if (resourceClass() == "ksplashx" || resourceClass() == "ksplashsimple")
+    if (resourceClass() == "ksplashx"
+            || resourceClass() == "ksplashsimple"
+            || resourceClass() == "ksplashqml"
+            )
         return false;
 // it must cover whole display or one xinerama screen, and be the topmost there
     if (geometry() == workspace()->clientArea(FullArea, geometry().center(), workspace()->currentDesktop())
diff -up kde-workspace-4.7.3/kwin/effects/fade/fade.cpp.ksplash-qml kde-workspace-4.7.3/kwin/effects/fade/fade.cpp
--- kde-workspace-4.7.3/kwin/effects/fade/fade.cpp.ksplash-qml	2011-05-20 15:32:07.000000000 -0500
+++ kde-workspace-4.7.3/kwin/effects/fade/fade.cpp	2011-11-17 11:50:41.332911121 -0600
@@ -192,6 +192,7 @@ bool FadeEffect::isFadeWindow(EffectWind
         e = w->data(WindowAddedGrabRole).value<void*>();
     if (w->windowClass() == "ksplashx ksplashx"
             || w->windowClass() == "ksplashsimple ksplashsimple"
+            || w->windowClass() == "qt-subapplication ksplashqml"
             || (e && e != this)) {
         // see login effect
         return false;
diff -up kde-workspace-4.7.3/kwin/effects/login/login.cpp.ksplash-qml kde-workspace-4.7.3/kwin/effects/login/login.cpp
--- kde-workspace-4.7.3/kwin/effects/login/login.cpp.ksplash-qml	2011-05-20 15:32:07.000000000 -0500
+++ kde-workspace-4.7.3/kwin/effects/login/login.cpp	2011-11-17 11:50:41.332911121 -0600
@@ -90,7 +90,8 @@ bool LoginEffect::isLoginSplash(EffectWi
     // TODO there should be probably a better way (window type?)
     // see also fade effect and composite.cpp
     if (w->windowClass() == "ksplashx ksplashx"
-            || w->windowClass() == "ksplashsimple ksplashsimple") {
+            || w->windowClass() == "ksplashsimple ksplashsimple"
+            || w->windowClass() == "qt-subapplication ksplashqml") {
         return true;
     }
     return false;
diff -up kde-workspace-4.7.3/startkde.cmake.ksplash-qml kde-workspace-4.7.3/startkde.cmake
--- kde-workspace-4.7.3/startkde.cmake.ksplash-qml	2011-11-17 11:50:41.291911634 -0600
+++ kde-workspace-4.7.3/startkde.cmake	2011-11-17 11:50:41.333911109 -0600
@@ -174,6 +174,9 @@ if test -z "$dl"; then
     KSplashX)
       ksplash_pid=`ksplashx "${ksplashrc_ksplash_theme}" --pid`
       ;;
+    KSplashQML)
+      ksplash_pid=`ksplashqml "${ksplashrc_ksplash_theme}" --pid`
+      ;;
     None)
       ;;
     Simple)
@@ -343,11 +346,11 @@ fi
 # if KDEWM is not set, ksmserver will ensure kwin is started.
 # kwrapper4 is used to reduce startup time and memory usage
 # kwrapper4 does not return useful error codes such as the exit code of ksmserver.
-# We only check for 255 which means that the ksmserver process could not be 
-# started, any problems thereafter, e.g. ksmserver failing to initialize, 
+# We only check for 255 which means that the ksmserver process could not be
+# started, any problems thereafter, e.g. ksmserver failing to initialize,
 # will remain undetected.
 test -n "$KDEWM" && KDEWM="--windowmanager $KDEWM"
-kwrapper4 ksmserver $KDEWM 
+kwrapper4 ksmserver $KDEWM
 if test $? -eq 255; then
   # Startup error
   echo 'startkde: Could not start ksmserver. Check your installation.'  1>&2