aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2013-10-07 14:54:02 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-08 22:11:39 +0200
commit2eef1a3cfa90e6eba1cacc3adf23bae05ccee561 (patch)
tree29409eb7d5fe899436609669720e5af30fecbf75 /examples
parent118a4f143b9125f02a11d2c579cced4e37fb9d70 (diff)
Remove obsolete examples
These examples were more like manual tests than examples. These features are now covered and documented in the music player example. Furthermore, corresponding manual test applications already exist. Change-Id: I28d857cd704e08a8ef5e6763d6403885119accba Reviewed-by: Ivan Vizir <define-true-false@yandex.com> Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/winextras/dwmfeatures/doc/src/qtwinextras-example-dwmfeatures.qdoc40
-rw-r--r--examples/winextras/dwmfeatures/dwmfeatures.pro11
-rw-r--r--examples/winextras/dwmfeatures/examplewidget.cpp179
-rw-r--r--examples/winextras/dwmfeatures/examplewidget.h80
-rw-r--r--examples/winextras/dwmfeatures/examplewidget.ui319
-rw-r--r--examples/winextras/dwmfeatures/main.cpp52
-rw-r--r--examples/winextras/jumplistexample/doc/images/qtwinextras-examples-jumplist.pngbin46012 -> 0 bytes
-rw-r--r--examples/winextras/jumplistexample/doc/src/qtwinextras-example-jumplist.qdoc38
-rw-r--r--examples/winextras/jumplistexample/examplewidget.cpp135
-rw-r--r--examples/winextras/jumplistexample/examplewidget.h77
-rw-r--r--examples/winextras/jumplistexample/examplewidget.ui198
-rw-r--r--examples/winextras/jumplistexample/jumplistexample.pro11
-rw-r--r--examples/winextras/jumplistexample/main.cpp83
-rw-r--r--examples/winextras/quickdwm/doc/src/qtwinextras-example-quickdwm.qdoc40
-rw-r--r--examples/winextras/quickdwm/icon.pngbin4945 -> 0 bytes
-rw-r--r--examples/winextras/quickdwm/quickdwm.qml153
-rw-r--r--examples/winextras/quickdwm/quickdwm.qmlproject15
-rw-r--r--examples/winextras/winextras.pro8
18 files changed, 2 insertions, 1437 deletions
diff --git a/examples/winextras/dwmfeatures/doc/src/qtwinextras-example-dwmfeatures.qdoc b/examples/winextras/dwmfeatures/doc/src/qtwinextras-example-dwmfeatures.qdoc
deleted file mode 100644
index 6bf9db9..0000000
--- a/examples/winextras/dwmfeatures/doc/src/qtwinextras-example-dwmfeatures.qdoc
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \title DWM Features
- \ingroup examples-qtwinextras
- \example dwmfeatures
- \brief Demonstrates managing Windows DWM features.
-
- \image peek-on.png
-
- This example shows how to use Desktop Window Manager (DWM) features
- provided by the \l{Qt Windows Extras} module. These include
- controlling the \l{DWM and Glass Frame}{Glass Frame} and \l{Aero Peek}
- features for a Qt application.
-*/
diff --git a/examples/winextras/dwmfeatures/dwmfeatures.pro b/examples/winextras/dwmfeatures/dwmfeatures.pro
deleted file mode 100644
index 1768438..0000000
--- a/examples/winextras/dwmfeatures/dwmfeatures.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-QT += widgets winextras
-
-TARGET = dwmfeatures
-TEMPLATE = app
-
-SOURCES += main.cpp\
- examplewidget.cpp
-
-HEADERS += examplewidget.h
-
-FORMS += examplewidget.ui
diff --git a/examples/winextras/dwmfeatures/examplewidget.cpp b/examples/winextras/dwmfeatures/examplewidget.cpp
deleted file mode 100644
index 25b9aba..0000000
--- a/examples/winextras/dwmfeatures/examplewidget.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-/****************************************************************************
- **
- ** Copyright (C) 2013 Ivan Vizir <define-true-false@yandex.com>
- ** Contact: http://www.qt-project.org/legal
- **
- ** This file is part of the QtWinExtras module of the Qt Toolkit.
- **
- ** $QT_BEGIN_LICENSE:LGPL$
- ** Commercial License Usage
- ** Licensees holding valid commercial Qt licenses may use this file in
- ** accordance with the commercial license agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Digia. For licensing terms and
- ** conditions see http://qt.digia.com/licensing. For further information
- ** use the contact form at http://qt.digia.com/contact-us.
- **
- ** GNU Lesser General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU Lesser
- ** General Public License version 2.1 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.LGPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU Lesser General Public License version 2.1 requirements
- ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Digia gives you certain additional
- ** rights. These rights are described in the Digia Qt LGPL Exception
- ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License version 3.0 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.GPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU General Public License version 3.0 requirements will be
- ** met: http://www.gnu.org/copyleft/gpl.html.
- **
- **
- ** $QT_END_LICENSE$
- **
- ****************************************************************************/
-
-#include "examplewidget.h"
-#include "ui_examplewidget.h"
-
-#include <QWinFunctions>
-#include <QWinEvent>
-#include <QDebug>
-#include <qt_windows.h>
-
-ExampleWidget::ExampleWidget(QWidget *parent) :
- QWidget(parent),
- ui(new Ui::ExampleWidget)
-{
- ui->setupUi(this);
-
- connect(ui->btnPeekDisallow, SIGNAL(clicked()), SLOT(onDisallowPeekClicked()));
- connect(ui->btnPeekExclude, SIGNAL(clicked()), SLOT(onExcludeFromPeekClicked()));
- connect(ui->radioFlipDefault, SIGNAL(clicked()), SLOT(onFlip3DPolicyChanged()));
- connect(ui->radioFlipAbove, SIGNAL(clicked()), SLOT(onFlip3DPolicyChanged()));
- connect(ui->radioFlipBelow, SIGNAL(clicked()), SLOT(onFlip3DPolicyChanged()));
- connect(ui->btnFrameReset, SIGNAL(clicked()), SLOT(onResetGlassFrameClicked()));
- connect(ui->frameTop, SIGNAL(valueChanged(int)), SLOT(onGlassMarginsChanged()));
- connect(ui->frameRight, SIGNAL(valueChanged(int)), SLOT(onGlassMarginsChanged()));
- connect(ui->frameBottom, SIGNAL(valueChanged(int)), SLOT(onGlassMarginsChanged()));
- connect(ui->frameLeft, SIGNAL(valueChanged(int)), SLOT(onGlassMarginsChanged()));
-}
-
-ExampleWidget::~ExampleWidget()
-{
- delete ui;
-}
-
-void ExampleWidget::changeEvent(QEvent *e)
-{
- QWidget::changeEvent(e);
- switch (e->type()) {
- case QEvent::LanguageChange:
- ui->retranslateUi(this);
- break;
- default:
- break;
- }
-}
-
-bool ExampleWidget::event(QEvent *e)
-{
- if (e->type() == QWinEvent::CompositionChange) {
- QWinCompositionChangeEvent *event = static_cast<QWinCompositionChangeEvent *>(e);
- qDebug() << "Composition state change: " << event->isCompositionEnabled();
- } else if (e->type() == QWinEvent::ThemeChange) {
- qDebug() << "Theme change.";
- }
- return QWidget::event(e);
-}
-
-void ExampleWidget::onDisallowPeekClicked()
-{
- QtWin::setWindowDisallowPeek(this, ui->btnPeekDisallow->isChecked());
-}
-
-void ExampleWidget::onExcludeFromPeekClicked()
-{
- QtWin::setWindowExcludedFromPeek(this, ui->btnPeekExclude->isChecked());
-}
-
-void ExampleWidget::onFlip3DPolicyChanged()
-{
- QtWin::WindowFlip3DPolicy policy;
- if (ui->radioFlipAbove->isChecked())
- policy = QtWin::FlipExcludeAbove;
- else if (ui->radioFlipBelow->isChecked())
- policy = QtWin::FlipExcludeBelow;
- else
- policy = QtWin::FlipDefault;
- QtWin::setWindowFlip3DPolicy(this, policy);
-}
-
-void ExampleWidget::onGlassMarginsChanged()
-{
- if (!QtWin::isCompositionEnabled())
- return;
-
- // what you see here is the only way to force widget to redraw itself
- // so it actually redraws itself without caching and without any glitch
- // but causes flickering :(
- // and yes, update() and redraw() do nothing
-
- if (!testAttribute(Qt::WA_NoSystemBackground)) {
-
- QSize original = size();
- QSize modified = original;
- modified.setWidth(original.height() + 1);
- resize(modified);
-
- setAttribute(Qt::WA_NoSystemBackground);
- QtWin::extendFrameIntoClientArea(this,
- ui->frameTop->value(),
- ui->frameRight->value(),
- ui->frameBottom->value(),
- ui->frameLeft->value());
-
- resize(original);
-
- ui->groupBox_2->setAutoFillBackground(true);
- ui->groupBox_3->setAutoFillBackground(true);
- ui->groupBox_4->setAutoFillBackground(true);
- } else {
- QtWin::extendFrameIntoClientArea(this,
- ui->frameLeft->value(),
- ui->frameTop->value(),
- ui->frameRight->value(),
- ui->frameBottom->value());
- }
-}
-
-void ExampleWidget::onResetGlassFrameClicked()
-{
- if (!testAttribute(Qt::WA_NoSystemBackground))
- return;
-
- ui->frameTop->setValue(0);
- ui->frameRight->setValue(0);
- ui->frameBottom->setValue(0);
- ui->frameLeft->setValue(0);
-
- QtWin::resetExtendedFrame(this);
- setAttribute(Qt::WA_NoSystemBackground, false);
-
- QSize original = size();
- QSize modified = original;
- modified.setHeight(original.height() + 1);
- resize(modified);
-
- ui->groupBox_2->setAutoFillBackground(false);
- ui->groupBox_3->setAutoFillBackground(false);
- ui->groupBox_4->setAutoFillBackground(false);
-
- resize(original);
-}
diff --git a/examples/winextras/dwmfeatures/examplewidget.h b/examples/winextras/dwmfeatures/examplewidget.h
deleted file mode 100644
index 81a5a87..0000000
--- a/examples/winextras/dwmfeatures/examplewidget.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
- **
- ** Copyright (C) 2013 Ivan Vizir <define-true-false@yandex.com>
- ** Contact: http://www.qt-project.org/legal
- **
- ** This file is part of the QtWinExtras module of the Qt Toolkit.
- **
- ** $QT_BEGIN_LICENSE:LGPL$
- ** Commercial License Usage
- ** Licensees holding valid commercial Qt licenses may use this file in
- ** accordance with the commercial license agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Digia. For licensing terms and
- ** conditions see http://qt.digia.com/licensing. For further information
- ** use the contact form at http://qt.digia.com/contact-us.
- **
- ** GNU Lesser General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU Lesser
- ** General Public License version 2.1 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.LGPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU Lesser General Public License version 2.1 requirements
- ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Digia gives you certain additional
- ** rights. These rights are described in the Digia Qt LGPL Exception
- ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License version 3.0 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.GPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU General Public License version 3.0 requirements will be
- ** met: http://www.gnu.org/copyleft/gpl.html.
- **
- **
- ** $QT_END_LICENSE$
- **
- ****************************************************************************/
-
-#ifndef EXAMPLEWIDGET_H
-#define EXAMPLEWIDGET_H
-
-#include <QWidget>
-
-QT_BEGIN_NAMESPACE
-namespace Ui {
-class ExampleWidget;
-}
-QT_END_NAMESPACE
-
-#if defined(QT_NAMESPACE)
-namespace Ui = QT_NAMESPACE::Ui;
-#endif
-
-class ExampleWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit ExampleWidget(QWidget *parent = 0);
- ~ExampleWidget();
-
-protected:
- void changeEvent(QEvent *e);
- bool event(QEvent *);
-
-private:
- Ui::ExampleWidget *ui;
-
-private slots:
- void onDisallowPeekClicked();
- void onExcludeFromPeekClicked();
- void onFlip3DPolicyChanged();
- void onGlassMarginsChanged();
- void onResetGlassFrameClicked();
-};
-
-#endif // EXAMPLEWIDGET_H
diff --git a/examples/winextras/dwmfeatures/examplewidget.ui b/examples/winextras/dwmfeatures/examplewidget.ui
deleted file mode 100644
index c3520bc..0000000
--- a/examples/winextras/dwmfeatures/examplewidget.ui
+++ /dev/null
@@ -1,319 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>ExampleWidget</class>
- <widget class="QWidget" name="ExampleWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>569</width>
- <height>331</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>QtWinExtras DWM Example</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="minimumSize">
- <size>
- <width>150</width>
- <height>0</height>
- </size>
- </property>
- <property name="title">
- <string>Aero Peek</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_4">
- <property name="spacing">
- <number>3</number>
- </property>
- <property name="margin">
- <number>4</number>
- </property>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_7">
- <item>
- <spacer name="horizontalSpacer_11">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="btnPeekDisallow">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Disallow peek</string>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_12">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_8">
- <item>
- <spacer name="horizontalSpacer_13">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="btnPeekExclude">
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Exclude from peek</string>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_14">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QGroupBox" name="groupBox_4">
- <property name="title">
- <string>Flip3D</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_5">
- <property name="spacing">
- <number>3</number>
- </property>
- <property name="margin">
- <number>4</number>
- </property>
- <item>
- <widget class="QRadioButton" name="radioFlipDefault">
- <property name="text">
- <string>Default</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioFlipAbove">
- <property name="text">
- <string>Exclude above</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioFlipBelow">
- <property name="text">
- <string>Exclude below</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_3">
- <property name="title">
- <string>Glass frame</string>
- </property>
- <layout class="QFormLayout" name="formLayout_2">
- <property name="horizontalSpacing">
- <number>3</number>
- </property>
- <property name="verticalSpacing">
- <number>3</number>
- </property>
- <property name="margin">
- <number>4</number>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>Left</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>Right</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_7">
- <property name="text">
- <string>Top</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_8">
- <property name="text">
- <string>Bottom</string>
- </property>
- </widget>
- </item>
- <item row="4" column="0" colspan="2">
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <item>
- <spacer name="horizontalSpacer_5">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="btnFrameReset">
- <property name="text">
- <string>Reset</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_6">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item row="0" column="1">
- <widget class="QSpinBox" name="frameLeft">
- <property name="minimum">
- <number>-1</number>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QSpinBox" name="frameRight">
- <property name="minimum">
- <number>-1</number>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QSpinBox" name="frameTop">
- <property name="minimum">
- <number>-1</number>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QSpinBox" name="frameBottom">
- <property name="minimum">
- <number>-1</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <resources/>
- <connections/>
-</ui>
diff --git a/examples/winextras/dwmfeatures/main.cpp b/examples/winextras/dwmfeatures/main.cpp
deleted file mode 100644
index 677725d..0000000
--- a/examples/winextras/dwmfeatures/main.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
- **
- ** Copyright (C) 2013 Ivan Vizir <define-true-false@yandex.com>
- ** Contact: http://www.qt-project.org/legal
- **
- ** This file is part of the QtWinExtras module of the Qt Toolkit.
- **
- ** $QT_BEGIN_LICENSE:LGPL$
- ** Commercial License Usage
- ** Licensees holding valid commercial Qt licenses may use this file in
- ** accordance with the commercial license agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Digia. For licensing terms and
- ** conditions see http://qt.digia.com/licensing. For further information
- ** use the contact form at http://qt.digia.com/contact-us.
- **
- ** GNU Lesser General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU Lesser
- ** General Public License version 2.1 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.LGPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU Lesser General Public License version 2.1 requirements
- ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Digia gives you certain additional
- ** rights. These rights are described in the Digia Qt LGPL Exception
- ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License version 3.0 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.GPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU General Public License version 3.0 requirements will be
- ** met: http://www.gnu.org/copyleft/gpl.html.
- **
- **
- ** $QT_END_LICENSE$
- **
- ****************************************************************************/
-
-#include "examplewidget.h"
-#include <QApplication>
-
-int main(int argc, char *argv[])
-{
- QApplication a(argc, argv);
- ExampleWidget w;
- w.show();
-
- return a.exec();
-}
diff --git a/examples/winextras/jumplistexample/doc/images/qtwinextras-examples-jumplist.png b/examples/winextras/jumplistexample/doc/images/qtwinextras-examples-jumplist.png
deleted file mode 100644
index f1c0d01..0000000
--- a/examples/winextras/jumplistexample/doc/images/qtwinextras-examples-jumplist.png
+++ /dev/null
Binary files differ
diff --git a/examples/winextras/jumplistexample/doc/src/qtwinextras-example-jumplist.qdoc b/examples/winextras/jumplistexample/doc/src/qtwinextras-example-jumplist.qdoc
deleted file mode 100644
index ef0beee..0000000
--- a/examples/winextras/jumplistexample/doc/src/qtwinextras-example-jumplist.qdoc
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \title Jump List
- \ingroup examples-qtwinextras
- \example jumplistexample
- \brief Demonstrates managing jump lists for Windows task bar buttons.
-
- \image qtwinextras-examples-jumplist.png
-
- This example shows how to implement a \l{Jump Lists}{jump list}
- for the Windows task bar button of a Qt application.
-*/
diff --git a/examples/winextras/jumplistexample/examplewidget.cpp b/examples/winextras/jumplistexample/examplewidget.cpp
deleted file mode 100644
index 9eff582..0000000
--- a/examples/winextras/jumplistexample/examplewidget.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************************
- **
- ** Copyright (C) 2013 Ivan Vizir <define-true-false@yandex.com>
- ** Contact: http://www.qt-project.org/legal
- **
- ** This file is part of the QtWinExtras module of the Qt Toolkit.
- **
- ** $QT_BEGIN_LICENSE:LGPL$
- ** Commercial License Usage
- ** Licensees holding valid commercial Qt licenses may use this file in
- ** accordance with the commercial license agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Digia. For licensing terms and
- ** conditions see http://qt.digia.com/licensing. For further information
- ** use the contact form at http://qt.digia.com/contact-us.
- **
- ** GNU Lesser General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU Lesser
- ** General Public License version 2.1 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.LGPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU Lesser General Public License version 2.1 requirements
- ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Digia gives you certain additional
- ** rights. These rights are described in the Digia Qt LGPL Exception
- ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License version 3.0 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.GPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU General Public License version 3.0 requirements will be
- ** met: http://www.gnu.org/copyleft/gpl.html.
- **
- **
- ** $QT_END_LICENSE$
- **
- ****************************************************************************/
-
-#include "examplewidget.h"
-#include "ui_examplewidget.h"
-
-#include <QApplication>
-#include <QStyle>
-#include <QFile>
-#include <QFileDialog>
-#include <QMessageBox>
-#include <QWinJumpList>
-#include <QWinJumpListItem>
-#include <QWinJumpListCategory>
-#include <QDebug>
-
-ExampleWidget::ExampleWidget(QWidget *parent) :
- QWidget(parent),
- ui(new Ui::ExampleWidget)
-{
- ui->setupUi(this);
-
- if (QCoreApplication::arguments().contains("-text"))
- ui->text->setPlainText("Hello, world!");
- if (!QCoreApplication::arguments().contains("-fullscreen"))
- ui->btnClose->hide();
-
- for (int i = 1; i < QCoreApplication::arguments().size(); i++) {
- const QString arg = QCoreApplication::arguments().at(i);
- if (!arg.isEmpty() && arg.at(0) != '-' && QFile(arg).exists()) {
- showFile(arg);
- break;
- }
- }
-
- connect(ui->btnUpdate, SIGNAL(clicked()), SLOT(updateJumpList()));
- connect(ui->btnOpenFile, SIGNAL(clicked()), SLOT(openFile()));
- connect(ui->btnClose, SIGNAL(clicked()), qApp, SLOT(quit()));
-}
-
-ExampleWidget::~ExampleWidget()
-{
- delete ui;
-}
-
-void ExampleWidget::changeEvent(QEvent *e)
-{
- QWidget::changeEvent(e);
- switch (e->type()) {
- case QEvent::LanguageChange:
- ui->retranslateUi(this);
- break;
- default:
- break;
- }
-}
-
-void ExampleWidget::showFile(const QString &path)
-{
- QFile file(path);
- if (file.open(QIODevice::ReadOnly|QIODevice::Text))
- ui->text->setPlainText(QString::fromUtf8(file.readAll()));
- else
- QMessageBox::warning(this, "Error", "Failed to open file");
-}
-
-void ExampleWidget::updateJumpList()
-{
- QWinJumpList jumplist;
- jumplist.recent()->setVisible(ui->cbShowRecent->isChecked());
- jumplist.frequent()->setVisible(ui->cbShowFrequent->isChecked());
- if (ui->cbRunFullscreen->isChecked()) {
- QWinJumpListItem *item = new QWinJumpListItem(QWinJumpListItem::Link);
- item->setTitle(ui->cbRunFullscreen->text());
- item->setFilePath(QDir::toNativeSeparators(QCoreApplication::applicationFilePath()));
- item->setArguments(QStringList("-fullscreen"));
- item->setIcon(style()->standardIcon(QStyle::SP_TitleBarMaxButton));
- jumplist.tasks()->addItem(item);
- }
- if (ui->cbRunFusion->isChecked()) {
- jumplist.tasks()->addLink(style()->standardIcon(QStyle::SP_DesktopIcon), ui->cbRunFusion->text(), QDir::toNativeSeparators(QCoreApplication::applicationFilePath()), (QStringList() << "-style" << "fusion"));
- }
- if (ui->cbRunText->isChecked()) {
- jumplist.tasks()->addSeparator();
- jumplist.tasks()->addLink(ui->cbRunText->text(), QDir::toNativeSeparators(QCoreApplication::applicationFilePath()), QStringList("-text"));
- }
- jumplist.tasks()->setVisible(!jumplist.tasks()->isEmpty());
-}
-
-void ExampleWidget::openFile()
-{
- QString filePath = QFileDialog::getOpenFileName(this, "Open a text file", QString(), "Text files (*.txt)");
- if (filePath.isEmpty())
- return;
- else
- showFile(filePath);
-}
diff --git a/examples/winextras/jumplistexample/examplewidget.h b/examples/winextras/jumplistexample/examplewidget.h
deleted file mode 100644
index a26b1bf..0000000
--- a/examples/winextras/jumplistexample/examplewidget.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
- **
- ** Copyright (C) 2013 Ivan Vizir <define-true-false@yandex.com>
- ** Contact: http://www.qt-project.org/legal
- **
- ** This file is part of the QtWinExtras module of the Qt Toolkit.
- **
- ** $QT_BEGIN_LICENSE:LGPL$
- ** Commercial License Usage
- ** Licensees holding valid commercial Qt licenses may use this file in
- ** accordance with the commercial license agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Digia. For licensing terms and
- ** conditions see http://qt.digia.com/licensing. For further information
- ** use the contact form at http://qt.digia.com/contact-us.
- **
- ** GNU Lesser General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU Lesser
- ** General Public License version 2.1 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.LGPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU Lesser General Public License version 2.1 requirements
- ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Digia gives you certain additional
- ** rights. These rights are described in the Digia Qt LGPL Exception
- ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License version 3.0 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.GPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU General Public License version 3.0 requirements will be
- ** met: http://www.gnu.org/copyleft/gpl.html.
- **
- **
- ** $QT_END_LICENSE$
- **
- ****************************************************************************/
-
-#ifndef EXAMPLEWIDGET_H
-#define EXAMPLEWIDGET_H
-
-#include <QWidget>
-
-QT_BEGIN_NAMESPACE
-namespace Ui {
-class ExampleWidget;
-}
-QT_END_NAMESPACE
-
-#if defined(QT_NAMESPACE)
-namespace Ui = QT_NAMESPACE::Ui;
-#endif
-
-class ExampleWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit ExampleWidget(QWidget *parent = 0);
- ~ExampleWidget();
-
-protected:
- void changeEvent(QEvent *e);
-
-private:
- Ui::ExampleWidget *ui;
- void showFile(const QString &path);
-
-private slots:
- void updateJumpList();
- void openFile();
-};
-
-#endif // EXAMPLEWIDGET_H
diff --git a/examples/winextras/jumplistexample/examplewidget.ui b/examples/winextras/jumplistexample/examplewidget.ui
deleted file mode 100644
index 592a913..0000000
--- a/examples/winextras/jumplistexample/examplewidget.ui
+++ /dev/null
@@ -1,198 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>ExampleWidget</class>
- <widget class="QWidget" name="ExampleWidget">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>695</width>
- <height>394</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>QtWinExtras JumpList Example</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,1">
- <property name="spacing">
- <number>3</number>
- </property>
- <property name="margin">
- <number>3</number>
- </property>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>Known categories</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <property name="spacing">
- <number>3</number>
- </property>
- <property name="margin">
- <number>3</number>
- </property>
- <item>
- <widget class="QCheckBox" name="cbShowFrequent">
- <property name="text">
- <string>Frequent</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="cbShowRecent">
- <property name="text">
- <string>Recent</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="title">
- <string>Tasks</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <property name="spacing">
- <number>3</number>
- </property>
- <property name="margin">
- <number>3</number>
- </property>
- <item>
- <widget class="QCheckBox" name="cbRunFullscreen">
- <property name="text">
- <string>Run in fullscreen</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="cbRunFusion">
- <property name="text">
- <string>Run with Fusion style</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="cbRunText">
- <property name="text">
- <string>Run with some text displayed</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="btnUpdate">
- <property name="text">
- <string>Update</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_4">
- <property name="spacing">
- <number>3</number>
- </property>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QPushButton" name="btnOpenFile">
- <property name="text">
- <string>Open a file</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="btnClose">
- <property name="text">
- <string>Close</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QTextEdit" name="text">
- <property name="font">
- <font>
- <family>Consolas</family>
- <pointsize>10</pointsize>
- </font>
- </property>
- <property name="readOnly">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <resources/>
- <connections/>
-</ui>
diff --git a/examples/winextras/jumplistexample/jumplistexample.pro b/examples/winextras/jumplistexample/jumplistexample.pro
deleted file mode 100644
index 9263372..0000000
--- a/examples/winextras/jumplistexample/jumplistexample.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-QT += widgets winextras
-
-TARGET = jumplistexample
-TEMPLATE = app
-
-SOURCES += main.cpp\
- examplewidget.cpp
-
-HEADERS += examplewidget.h
-
-FORMS += examplewidget.ui
diff --git a/examples/winextras/jumplistexample/main.cpp b/examples/winextras/jumplistexample/main.cpp
deleted file mode 100644
index 40673e7..0000000
--- a/examples/winextras/jumplistexample/main.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
- **
- ** Copyright (C) 2013 Ivan Vizir <define-true-false@yandex.com>
- ** Contact: http://www.qt-project.org/legal
- **
- ** This file is part of the QtWinExtras module of the Qt Toolkit.
- **
- ** $QT_BEGIN_LICENSE:LGPL$
- ** Commercial License Usage
- ** Licensees holding valid commercial Qt licenses may use this file in
- ** accordance with the commercial license agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Digia. For licensing terms and
- ** conditions see http://qt.digia.com/licensing. For further information
- ** use the contact form at http://qt.digia.com/contact-us.
- **
- ** GNU Lesser General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU Lesser
- ** General Public License version 2.1 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.LGPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU Lesser General Public License version 2.1 requirements
- ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Digia gives you certain additional
- ** rights. These rights are described in the Digia Qt LGPL Exception
- ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License version 3.0 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.GPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU General Public License version 3.0 requirements will be
- ** met: http://www.gnu.org/copyleft/gpl.html.
- **
- **
- ** $QT_END_LICENSE$
- **
- ****************************************************************************/
-
-#include "examplewidget.h"
-
-#include <QApplication>
-#include <QSettings>
-#include <QDir>
-
-void associateFileType()
-{
- QString exeFileName = QCoreApplication::applicationFilePath();
- exeFileName = exeFileName.right(exeFileName.length() - exeFileName.lastIndexOf("/") - 1);
- QString appName = "QtWinExtras JumpList Example";
-
- QSettings regApplications("HKEY_CURRENT_USER\\Software\\Classes\\Applications\\" + exeFileName, QSettings::NativeFormat);
- regApplications.setValue("FriendlyAppName", appName);
-
- regApplications.beginGroup("SupportedTypes");
- regApplications.setValue(".txt", QString());
- regApplications.endGroup();
-
- regApplications.beginGroup("shell");
- regApplications.beginGroup("open");
- regApplications.setValue("FriendlyAppName", appName);
- regApplications.beginGroup("command");
- regApplications.setValue(".", '"' + QDir::toNativeSeparators(QCoreApplication::applicationFilePath()) + "\" \"%1\"");
- regApplications.endGroup();
- regApplications.endGroup();
- regApplications.endGroup();
-}
-
-int main(int argc, char *argv[])
-{
- QApplication a(argc, argv);
- associateFileType();
-
- ExampleWidget w;
- if (QCoreApplication::arguments().contains("-fullscreen"))
- w.showFullScreen();
- else
- w.show();
-
- return a.exec();
-}
diff --git a/examples/winextras/quickdwm/doc/src/qtwinextras-example-quickdwm.qdoc b/examples/winextras/quickdwm/doc/src/qtwinextras-example-quickdwm.qdoc
deleted file mode 100644
index a3574c8..0000000
--- a/examples/winextras/quickdwm/doc/src/qtwinextras-example-quickdwm.qdoc
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \title Quick DWM
- \ingroup examples-qtwinextras
- \example quickdwm
- \brief Demonstrates managing Windows DWM features from QML.
-
- \image glass.png
-
- This example shows how to use the
- \l{Qt Windows Extras QML Types}{QML types} provided by the
- \l{Qt Windows Extras} module to manage Desktop Windows
- Manager (DWM) features from a Qt Quick application.
-*/
diff --git a/examples/winextras/quickdwm/icon.png b/examples/winextras/quickdwm/icon.png
deleted file mode 100644
index 6ad8096..0000000
--- a/examples/winextras/quickdwm/icon.png
+++ /dev/null
Binary files differ
diff --git a/examples/winextras/quickdwm/quickdwm.qml b/examples/winextras/quickdwm/quickdwm.qml
deleted file mode 100644
index e983790..0000000
--- a/examples/winextras/quickdwm/quickdwm.qml
+++ /dev/null
@@ -1,153 +0,0 @@
-/****************************************************************************
- **
- ** Copyright (C) 2013 Ivan Vizir <define-true-false@yandex.com>
- ** Contact: http://www.qt-project.org/legal
- **
- ** This file is part of the QtWinExtras module of the Qt Toolkit.
- **
- ** $QT_BEGIN_LICENSE:LGPL$
- ** Commercial License Usage
- ** Licensees holding valid commercial Qt licenses may use this file in
- ** accordance with the commercial license agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and Digia. For licensing terms and
- ** conditions see http://qt.digia.com/licensing. For further information
- ** use the contact form at http://qt.digia.com/contact-us.
- **
- ** GNU Lesser General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU Lesser
- ** General Public License version 2.1 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.LGPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU Lesser General Public License version 2.1 requirements
- ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
- **
- ** In addition, as a special exception, Digia gives you certain additional
- ** rights. These rights are described in the Digia Qt LGPL Exception
- ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License version 3.0 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.GPL included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU General Public License version 3.0 requirements will be
- ** met: http://www.gnu.org/copyleft/gpl.html.
- **
- **
- ** $QT_END_LICENSE$
- **
- ****************************************************************************/
-
-import QtQuick 2.0
-import QtWinExtras 1.0
-import QtQuick.Window 2.1
-
-Rectangle {
- width: 300
- height: 130
- color: "transparent"
-
- DwmFeatures {
- id: dwmfeatures
- bottomGlassMargin: compositionEnabled ? 30 : 0
- excludedFromPeek: true
- flip3DPolicy: QtWin.FlipExcludeAbove
- }
-
- Window {
- height: 128
- width: 256
- maximumHeight: height
- minimumHeight: height
- maximumWidth: width
- minimumWidth: width
- visible: true
- title: "Sheet of glass"
-
- DwmFeatures {
- bottomGlassMargin: compositionEnabled ? -1 : 0
- }
- }
-
- Rectangle {
- id: contentRect
- anchors.fill: parent
- anchors.bottomMargin: dwmfeatures.bottomGlassMargin
-
- Rectangle {
- id: rectColorization
- color: DwmFeatures.colorizationColor
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- height: 32
-
- Text {
- text: "Colorization color"
- anchors.centerIn: parent
- font.pointSize: 12
- }
- }
-
- Rectangle {
- id: rectRealColorization
- color: DwmFeatures.realColorizationColor
- anchors.top: rectColorization.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- height: rectColorization.height
-
- Text {
- text: "Real colorization color"
- anchors.centerIn: parent
- font.pointSize: 12
- }
- }
-
- Rectangle {
- anchors.topMargin: 2
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.top: rectRealColorization.bottom
- height: rectRealColorization.height
- color: (function () {
- if (!mouseComposition.containsMouse)
- return "#D7D7D7";
- else if (mouseComposition.containsMouse && !mouseComposition.pressedButtons)
- return "#D7E0E7";
- else
- return "#EEEEF7"
- })()
-
- Text {
- anchors.centerIn: parent
- text: "DWM composition is " + (DwmFeatures.compositionEnabled ? "enabled" : "disabled")
- font.pointSize: 12
- }
-
- MouseArea {
- id: mouseComposition
- anchors.fill: parent
- hoverEnabled: true
- onClicked: DwmFeatures.compositionEnabled = !DwmFeatures.compositionEnabled
- }
- }
- }
-
- Rectangle {
- id: transparentBottom
- color: DwmFeatures.compositionEnabled ? "transparent" : "#EEE"
- height: dwmfeatures.bottomGlassMargin
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
-
- Text {
- id: textOnGlass
- anchors.centerIn: parent
- text: "Text on glass" + (DwmFeatures.compositionEnabled ? "" : " (potentially)")
- font.pointSize: 12
- }
- }
-}
diff --git a/examples/winextras/quickdwm/quickdwm.qmlproject b/examples/winextras/quickdwm/quickdwm.qmlproject
deleted file mode 100644
index 20a7c55..0000000
--- a/examples/winextras/quickdwm/quickdwm.qmlproject
+++ /dev/null
@@ -1,15 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "quickdwm.qml"
-
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/winextras/winextras.pro b/examples/winextras/winextras.pro
index 17d9cf3..8cb2148 100644
--- a/examples/winextras/winextras.pro
+++ b/examples/winextras/winextras.pro
@@ -1,10 +1,6 @@
TEMPLATE = subdirs
-win32:{
+win32 {
SUBDIRS += \
- iconextractor \
- dwmfeatures \
- jumplistexample
- EXAMPLE_FILES += quickdwm
-
+ iconextractor
qtHaveModule(widgets):qtHaveModule(multimedia): SUBDIRS += musicplayer
}