diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qstyleitem.cpp | 4 | ||||
-rw-r--r-- | src/qstyleitem.h | 2 | ||||
-rw-r--r-- | src/qstyleplugin.cpp | 27 | ||||
-rw-r--r-- | src/qstyleplugin.h | 1 | ||||
-rw-r--r-- | src/qtmenu.cpp | 181 | ||||
-rw-r--r-- | src/qtmenu.h | 93 | ||||
-rw-r--r-- | src/qtmenubar.cpp | 86 | ||||
-rw-r--r-- | src/qtmenubar.h | 73 | ||||
-rw-r--r-- | src/qtmenuitem.cpp | 142 | ||||
-rw-r--r-- | src/qtmenuitem.h | 117 | ||||
-rw-r--r-- | src/qtoplevelwindow.cpp | 92 | ||||
-rw-r--r-- | src/qtoplevelwindow.h | 69 | ||||
-rw-r--r-- | src/qtsplitterbase.h | 1 | ||||
-rw-r--r-- | src/qwheelarea.h | 2 | ||||
-rw-r--r-- | src/qwindowitem.cpp | 225 | ||||
-rw-r--r-- | src/qwindowitem.h | 126 | ||||
-rw-r--r-- | src/src.pro | 14 |
17 files changed, 16 insertions, 1239 deletions
diff --git a/src/qstyleitem.cpp b/src/qstyleitem.cpp index 6c82c146..5f950951 100644 --- a/src/qstyleitem.cpp +++ b/src/qstyleitem.cpp @@ -54,7 +54,7 @@ QStyleItem::QStyleItem(QQuickPaintedItem *parent) : QQuickPaintedItem(parent), - m_dummywidget(0), + m_dummywidget(new QWidget), m_styleoption(0), m_type(Undefined), m_sunken(false), @@ -862,6 +862,8 @@ void QStyleItem::setElementType(const QString &str) } else if (str == "scrollareacorner") { m_itemType = ScrollAreaCorner; } + if (!m_dummywidget) + m_dummywidget = new QWidget(); if (m_dummywidget) { m_dummywidget->installEventFilter(this); m_dummywidget->setAttribute(Qt::WA_QuitOnClose, false); // dont keep app open diff --git a/src/qstyleitem.h b/src/qstyleitem.h index 5a5d4f40..161b60fe 100644 --- a/src/qstyleitem.h +++ b/src/qstyleitem.h @@ -40,7 +40,7 @@ #ifndef STYLEWRAPPER_H #define STYLEWRAPPER_H -#include <QtDeclarative/qquickpainteditem.h> +#include <QtQuick/qquickpainteditem.h> //#include <QSGItem> #include <QtWidgets/QStyle> #include <QEvent> diff --git a/src/qstyleplugin.cpp b/src/qstyleplugin.cpp index c23ed701..e1f74894 100644 --- a/src/qstyleplugin.cpp +++ b/src/qstyleplugin.cpp @@ -41,9 +41,6 @@ #include "qstyleplugin.h" #include "qstyleitem.h" #include "qrangemodel.h" -#include "qtmenu.h" -#include "qtmenubar.h" -#include "qwindowitem.h" #include "qdesktopitem.h" #include "qwheelarea.h" #include "qcursorarea.h" @@ -83,24 +80,16 @@ public: void StylePlugin::registerTypes(const char *uri) { qDebug(uri); - qmlRegisterType<QWindowItem>(uri, 0, 1, "Window"); - qmlRegisterType<QStyleItem>(uri, 0, 1, "StyleItem"); - qmlRegisterType<QCursorArea>(uri, 0, 1, "CursorArea"); - qmlRegisterType<QTooltipArea>(uri, 0, 1, "TooltipArea"); - qmlRegisterType<QRangeModel>(uri, 0, 1, "RangeModel"); - qmlRegisterType<QWheelArea>(uri, 0, 1, "WheelArea"); + qmlRegisterType<QStyleItem>(uri, 0, 2, "StyleItem"); + qmlRegisterType<QCursorArea>(uri, 0, 2, "CursorArea"); + qmlRegisterType<QTooltipArea>(uri, 0, 2, "TooltipArea"); + qmlRegisterType<QRangeModel>(uri, 0, 2, "RangeModel"); + qmlRegisterType<QWheelArea>(uri, 0, 2, "WheelArea"); - qmlRegisterType<QtMenu>(uri, 0, 1, "Menu"); - qmlRegisterType<QtMenuBar>(uri, 0, 1, "MenuBar"); - qmlRegisterType<QtMenuItem>(uri, 0, 1, "MenuItem"); - qmlRegisterType<QtMenuSeparator>(uri, 0, 1, "Separator"); + qmlRegisterType<QFileSystemModel>(uri, 0, 2, "FileSystemModel"); + qmlRegisterType<QtSplitterBase>(uri, 0, 2, "Splitter"); - qmlRegisterType<QFileSystemModel>(uri, 0, 1, "FileSystemModel"); - qmlRegisterType<QtSplitterBase>(uri, 0, 1, "Splitter"); - qmlRegisterType<QWindowItem>("QtQuick", 0, 1, "Window"); - - qmlRegisterUncreatableType<QtMenuBase>("uri", 0, 1, "NativeMenuBase", QLatin1String("Do not create objects of type NativeMenuBase")); - qmlRegisterUncreatableType<QDesktopItem>("QtQuick",2,0,"Desktop", QLatin1String("Do not create objects of type Desktop")); + qmlRegisterUncreatableType<QDesktopItem>(uri, 0,2,"Desktop", QLatin1String("Do not create objects of type Desktop")); } void StylePlugin::initializeEngine(QDeclarativeEngine *engine, const char *uri) diff --git a/src/qstyleplugin.h b/src/qstyleplugin.h index 73c7a7e8..28a08b1b 100644 --- a/src/qstyleplugin.h +++ b/src/qstyleplugin.h @@ -41,7 +41,6 @@ #define STYLEPLUGIN_H #include <QDeclarativeExtensionPlugin> -#include <QtScript/QScriptValue> #include <QtCore/QTimer> #include <QtWidgets/QFileSystemModel> #include "qdeclarativefolderlistmodel.h" diff --git a/src/qtmenu.cpp b/src/qtmenu.cpp deleted file mode 100644 index 1b91f638..00000000 --- a/src/qtmenu.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Components project on Qt Labs. -** -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions contained -** in the Technology Preview License Agreement accompanying this package. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -****************************************************************************/ - -#include "qtmenu.h" -#include "qdebug.h" -#include <qguiapplication.h> -#include <QtWidgets/qmenubar.h> - -#include "qtoplevelwindow.h" - -QtMenu::QtMenu(QObject *parent) - : QtMenuBase(parent), - dummy(0), - _selectedIndex(0), - _highlightedIndex(0) -{ - _qmenu = new QMenu(0); - connect(_qmenu, SIGNAL(aboutToHide()), this, SIGNAL(menuClosed())); -} - -QtMenu::~QtMenu() -{ - delete _qmenu; -} - -void QtMenu::setText(const QString &text) -{ - _qmenu->setTitle(text); -} - -QString QtMenu::text() const -{ - return _qmenu->title(); -} - -void QtMenu::setSelectedIndex(int index) -{ - _selectedIndex = index; - QList<QAction *> actionList = _qmenu->actions(); - if (_selectedIndex >= 0 && _selectedIndex < actionList.size()) - _qmenu->setActiveAction(actionList[_selectedIndex]); - emit selectedIndexChanged(); -} - -void QtMenu::setHoveredIndex(int index) -{ - _highlightedIndex = index; - QList<QAction *> actionList = _qmenu->actions(); - if (_highlightedIndex >= 0 && _highlightedIndex < actionList.size()) - _qmenu->setActiveAction(actionList[_highlightedIndex]); - emit hoveredIndexChanged(); -} - -QDeclarativeListProperty<QtMenuBase> QtMenu::menuItems() -{ - return QDeclarativeListProperty<QtMenuBase>(this, 0, &QtMenu::append_qmenuItem); -} - -void QtMenu::showPopup(qreal x, qreal y, int atActionIndex) -{ - if (_qmenu->isVisible()) - return; - - // If atActionIndex is valid, x and y is specified from the - // the position of the corresponding QAction: - QAction *atAction = 0; - if (atActionIndex >= 0 && atActionIndex < _qmenu->actions().size()) - atAction = _qmenu->actions()[atActionIndex]; - - // x,y are in view coordinates, QMenu expects screen coordinates - // ### activeWindow hack - int menuBarHeight = 0; - QWindow *window = QGuiApplication::focusWindow(); -// QWidget *window = QApplication::activeWindow(); - QTopLevelWindow *tw = qobject_cast<QTopLevelWindow*>(window); - if (tw) { - QMenuBar *menuBar = tw->menuBar(); - menuBarHeight = menuBar->height(); - } - - QPoint screenPosition = window->mapToGlobal(QPoint(x, y+menuBarHeight)); - - setHoveredIndex(_selectedIndex); - _qmenu->popup(screenPosition, atAction); -} - -void QtMenu::hidePopup() -{ - _qmenu->close(); -} - -QAction* QtMenu::action() -{ - return _qmenu->menuAction(); -} - -Q_INVOKABLE void QtMenu::clearMenuItems() -{ - _qmenu->clear(); - foreach (QtMenuBase *item, _qmenuItems) { - delete item; - } - _qmenuItems.clear(); -} - -void QtMenu::addMenuItem(const QString &text) -{ - QtMenuItem *menuItem = new QtMenuItem(this); - menuItem->setText(text); - _qmenuItems.append(menuItem); - _qmenu->addAction(menuItem->action()); - - connect(menuItem->action(), SIGNAL(triggered()), this, SLOT(emitSelected())); - connect(menuItem->action(), SIGNAL(hovered()), this, SLOT(emitHovered())); - - if (_qmenu->actions().size() == 1) - // Inform QML that the selected action (0) now has changed contents: - emit selectedIndexChanged(); -} - -void QtMenu::emitSelected() -{ - QAction *act = qobject_cast<QAction *>(sender()); - if (!act) - return; - _selectedIndex = _qmenu->actions().indexOf(act); - emit selectedIndexChanged(); -} - -void QtMenu::emitHovered() -{ - QAction *act = qobject_cast<QAction *>(sender()); - if (!act) - return; - _highlightedIndex = _qmenu->actions().indexOf(act); - emit hoveredIndexChanged(); -} - -QString QtMenu::itemTextAt(int index) const -{ - QList<QAction *> actionList = _qmenu->actions(); - if (index >= 0 && index < actionList.size()) - return actionList[index]->text(); - else - return ""; -} - -void QtMenu::append_qmenuItem(QDeclarativeListProperty<QtMenuBase> *list, QtMenuBase *menuItem) -{ - QtMenu *menu = qobject_cast<QtMenu *>(list->object); - if (menu) { - menuItem->setParent(menu); - menu->_qmenuItems.append(menuItem); - menu->qmenu()->addAction(menuItem->action()); - } -} - - diff --git a/src/qtmenu.h b/src/qtmenu.h deleted file mode 100644 index 6e4f8211..00000000 --- a/src/qtmenu.h +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Components project on Qt Labs. -** -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions contained -** in the Technology Preview License Agreement accompanying this package. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -****************************************************************************/ - -#ifndef QTMLMENU_H -#define QTMLMENU_H - -#include <QtWidgets/qmenu.h> -#include <QtDeclarative/qdeclarative.h> -#include <QtDeclarative/QQuickItem> -#include <QtDeclarative/QDeclarativeListProperty> -#include "qtmenuitem.h" -#include <QtDeclarative/QDeclarativeListProperty> -#include "qtmenuitem.h" - -class QtMenu : public QtMenuBase -{ - Q_OBJECT - Q_PROPERTY(QString text READ text WRITE setText) - Q_PROPERTY(int selectedIndex READ selectedIndex WRITE setSelectedIndex NOTIFY selectedIndexChanged) - Q_PROPERTY(int hoveredIndex READ hoveredIndex WRITE setHoveredIndex NOTIFY hoveredIndexChanged) - Q_PROPERTY(QDeclarativeListProperty<QtMenuBase> menuItems READ menuItems) - Q_CLASSINFO("DefaultProperty", "menuItems") -public: - QtMenu(QObject *parent = 0); - virtual ~QtMenu(); - - void setText(const QString &text); - QString text() const; - - int selectedIndex() const { return _selectedIndex; } - void setSelectedIndex(int index); - int hoveredIndex() const { return _highlightedIndex; } - void setHoveredIndex(int index); - - QDeclarativeListProperty<QtMenuBase> menuItems(); - QMenu* qmenu() { return _qmenu; } - - QAction* action(); - - Q_INVOKABLE int minimumWidth() const { return _qmenu->minimumWidth(); } - Q_INVOKABLE void setMinimumWidth(int w) { _qmenu->setMinimumWidth(w); } - Q_INVOKABLE void showPopup(qreal x, qreal y, int atActionIndex = -1); - Q_INVOKABLE void hidePopup(); - Q_INVOKABLE void clearMenuItems(); - Q_INVOKABLE void addMenuItem(const QString &text); - Q_INVOKABLE QString itemTextAt(int index) const; - -Q_SIGNALS: - void menuClosed(); - void selectedIndexChanged(); - void hoveredIndexChanged(); - -private Q_SLOTS: - void emitSelected(); - void emitHovered(); - -private: - static void append_qmenuItem(QDeclarativeListProperty<QtMenuBase> *list, QtMenuBase *menuItem); - -private: - QWidget *dummy; - QMenu *_qmenu; - QList<QtMenuBase *> _qmenuItems; - int _selectedIndex; - int _highlightedIndex; -}; - -QML_DECLARE_TYPE(QtMenu) - -#endif // QTMLMENU_H diff --git a/src/qtmenubar.cpp b/src/qtmenubar.cpp deleted file mode 100644 index 921ec530..00000000 --- a/src/qtmenubar.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOTgall -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qtmenubar.h" -#include "qwindowitem.h" - -#include <QtWidgets/QMenu> -#include <QtWidgets/QMenuBar> - -QtMenuBar::QtMenuBar(QQuickItem *parent) - : QQuickItem(parent)/*, _menuBar(new QMenuBar)*/ -{ - connect(this, SIGNAL(parentChanged()), this, SLOT(updateParent())); - setFlag(QQuickItem::ItemHasContents, false); -} - -QtMenuBar::~QtMenuBar() -{ -} - -QDeclarativeListProperty<QtMenu> QtMenuBar::menus() -{ - return QDeclarativeListProperty<QtMenu>(this, 0, &QtMenuBar::append_menu); -} - -void QtMenuBar::updateParent() -{ - if (QWindowItem* window = qobject_cast<QWindowItem*>(parent())) - _menuBar = window->window()->menuBar(); - - //THIS IS WRONG... WE NEED TO DO THAT DIFFERENT! - _menuBar->clear(); - - foreach (QtMenu *menu, m_menus) { - _menuBar->addMenu(menu->qmenu()); - } - //THIS IS WRONG... WE NEED TO DO THAT DIFFERENT! - -} - -void QtMenuBar::append_menu(QDeclarativeListProperty<QtMenu> *list, QtMenu *menu) -{ - QtMenuBar *menuBar = qobject_cast<QtMenuBar *>(list->object); - if (menuBar) { - menu->setParent(menuBar); - menuBar->m_menus.append(menu); - if (menuBar->_menuBar) - menuBar->_menuBar->addMenu(menu->qmenu()); - } -} diff --git a/src/qtmenubar.h b/src/qtmenubar.h deleted file mode 100644 index 66a3908b..00000000 --- a/src/qtmenubar.h +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QTMENUBAR_H -#define QTMENUBAR_H - -#include <QQuickItem> -#include <QtGui> -#include <QtWidgets/QMenu> -#include <QtWidgets/QMenuBar> - -#include "qtmenu.h" - -class QtMenuBar: public QQuickItem -{ - Q_OBJECT - - Q_PROPERTY(QDeclarativeListProperty<QtMenu> menus READ menus) - Q_CLASSINFO("DefaultProperty", "menus") -public: - QtMenuBar(QQuickItem *parent = 0); - ~QtMenuBar(); - - QDeclarativeListProperty<QtMenu> menus(); - -protected Q_SLOTS: - void updateParent(); - -private: - static void append_menu(QDeclarativeListProperty<QtMenu> *list, QtMenu *menu); - -private: - QList<QtMenu *> m_menus; - QMenuBar *_menuBar; -}; - -#endif //QTMENUBAR_H diff --git a/src/qtmenuitem.cpp b/src/qtmenuitem.cpp deleted file mode 100644 index 34be067e..00000000 --- a/src/qtmenuitem.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOTgall -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qtmenuitem.h" - -void QtMenuBase::setIconSource(const QUrl &icon) -{ - _iconSource = icon; - if (_iconName.isEmpty()) - action()->setIcon(QIcon(icon.toLocalFile())); - else - action()->setIcon(QIcon::fromTheme(_iconName, QIcon(_iconSource.toLocalFile()))); - - emit iconSourceChanged(); -} - -QUrl QtMenuBase::iconSource() const -{ - return _iconSource; -} - -void QtMenuBase::setIconName(const QString &icon) -{ - _iconName = icon; - action()->setIcon(QIcon::fromTheme(_iconName, QIcon(_iconSource.toLocalFile()))); - - emit iconNameChanged(); -} - -QString QtMenuBase::iconName() const -{ - return _iconName; -} - -QtMenuSeparator::QtMenuSeparator(QObject *parent) - : QtMenuBase(parent), _action(new QAction(this)) -{ - _action->setSeparator(true); -} - -QtMenuSeparator::~QtMenuSeparator() -{ -} - -QAction * QtMenuSeparator::action() -{ - return _action; -} - -QtMenuItem::QtMenuItem(QObject *parent) - : QtMenuBase(parent), _action(new QAction(this)) -{ - connect(_action, SIGNAL(triggered()), this, SIGNAL(triggered())); - connect(_action, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool))); -} - -QtMenuItem::~QtMenuItem() -{ -} - -void QtMenuItem::setText(const QString &text) -{ - _action->setText(text); - emit textChanged(); -} - -void QtMenuItem::setShortcut(const QString &shortcut) -{ - _action->setShortcut(QKeySequence(shortcut)); - emit shortcutChanged(); -} - -void QtMenuItem::setCheckable(bool checkable) -{ - _action->setCheckable(checkable); -} - -void QtMenuItem::setChecked(bool checked) -{ - _action->setChecked(checked); -} - -QString QtMenuItem::text() const -{ - return _action->text(); -} - -QString QtMenuItem::shortcut() const -{ - return _action->shortcut().toString(); -} - -bool QtMenuItem::checkable() const -{ - return _action->isCheckable(); -} - -bool QtMenuItem::checked() const -{ - return _action->isChecked(); -} - -QAction * QtMenuItem::action() -{ - return _action; -} diff --git a/src/qtmenuitem.h b/src/qtmenuitem.h deleted file mode 100644 index f5860a03..00000000 --- a/src/qtmenuitem.h +++ /dev/null @@ -1,117 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QTMENUITEM_H -#define QTMENUITEM_H - -#include <QtCore/QObject> -#include <QtWidgets/QAction> -#include <QtCore/QUrl> - -class QtMenuBase: public QObject { - Q_OBJECT - Q_PROPERTY(QUrl iconSource READ iconSource WRITE setIconSource NOTIFY iconSourceChanged) - Q_PROPERTY(QString iconName READ iconName WRITE setIconName NOTIFY iconNameChanged) - -public: - QtMenuBase(QObject *parent = 0) : QObject(parent) {} - virtual QAction* action() = 0; - - void setIconSource(const QUrl &icon); - QUrl iconSource() const; - - void setIconName(const QString &icon); - QString iconName() const; - -Q_SIGNALS: - void iconSourceChanged(); - void iconNameChanged(); - -private: - QUrl _iconSource; - QString _iconName; -}; - -class QtMenuSeparator : public QtMenuBase -{ - Q_OBJECT -public: - QtMenuSeparator(QObject *parent = 0); - ~QtMenuSeparator(); - QAction* action(); - -private: - QAction *_action; -}; - -class QtMenuItem: public QtMenuBase -{ - Q_OBJECT - Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged); - Q_PROPERTY(QString shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged) - Q_PROPERTY(bool checkable READ checkable WRITE setCheckable) - Q_PROPERTY(bool checked READ checked WRITE setChecked NOTIFY toggled) - -public: - QtMenuItem(QObject *parent = 0); - ~QtMenuItem(); - - void setText(const QString &text); - void setShortcut(const QString &shortcut); - void setCheckable(bool checkable); - void setChecked(bool checked); - - QString text() const; - QString shortcut() const; - bool checkable() const; - bool checked() const; - - QAction* action(); - -Q_SIGNALS: - void triggered(); - void textChanged(); - void shortcutChanged(); - void toggled(bool); - -private: - QAction *_action; -}; - -#endif //QTMENUITEM_H diff --git a/src/qtoplevelwindow.cpp b/src/qtoplevelwindow.cpp deleted file mode 100644 index d029e03a..00000000 --- a/src/qtoplevelwindow.cpp +++ /dev/null @@ -1,92 +0,0 @@ -#include "qtoplevelwindow.h" - -#include <QtWidgets/QDesktopWidget> - -QTopLevelWindow::QTopLevelWindow() - : QMainWindow(), _view(new QQuickView), _positionIsDefined(false) { - setVisible(false); - //setCentralWidget(_view); - setAttribute(Qt::WA_DeleteOnClose); -} - -QTopLevelWindow::~QTopLevelWindow() -{ - //we need this to break the parental loop of QWindowItem and QTopLevelWindow - //_view->scene()->setParent(0); -} - -void QTopLevelWindow::registerChildWindow(QTopLevelWindow* child) -{ - _childWindows.insert(child); - child->setParent(this); -} - -void QTopLevelWindow::hideChildWindows() -{ - foreach(QTopLevelWindow* child, _childWindows) { - child->hide(); - } -} - -void QTopLevelWindow::initPosition() -{ - if (!_positionIsDefined) - center(); - foreach(QTopLevelWindow* child, _childWindows) { - child->initPosition(); - } -} - -void QTopLevelWindow::center() -{ - QPoint parentCenter; - if (parentWidget()) - parentCenter = parentWidget()->geometry().center(); - else - parentCenter = QDesktopWidget().screenGeometry().center(); - QRect thisGeometry = geometry(); - thisGeometry.moveCenter(parentCenter); - setGeometry(thisGeometry); -} - -void QTopLevelWindow::move(int x, int y) -{ - qDebug("a %d, %d", x, y); - move(QPoint(x,y)); -} - -void QTopLevelWindow::move(const QPoint &point) -{ - _positionIsDefined = true; - QMainWindow::move(point); -} - -void QTopLevelWindow::setWindowFlags(Qt::WindowFlags type) -{ - QWidget::setWindowFlags(type | Qt::Window); -} - -bool QTopLevelWindow::event(QEvent *event) { - switch (event->type()) { - case QEvent::WindowStateChange: - emit windowStateChanged(); - break; - case QEvent::Show: - emit visibilityChanged(); - break; - case QEvent::Hide: - hideChildWindows(); - emit visibilityChanged(); - break; - case QEvent::ParentChange: - setAttribute(Qt::WA_DeleteOnClose, !parent()); - break; - case QEvent::Resize: { - const QResizeEvent *resize = static_cast<const QResizeEvent *>(event); - emit sizeChanged(resize->size()); - break; - } - default: break; - } - return QMainWindow::event(event); -} diff --git a/src/qtoplevelwindow.h b/src/qtoplevelwindow.h deleted file mode 100644 index 143b576a..00000000 --- a/src/qtoplevelwindow.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Components project on Qt Labs. -** -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions contained -** in the Technology Preview License Agreement accompanying this package. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -****************************************************************************/ - -#ifndef QTOPLEVELWINDOW_H -#define QTOPLEVELWINDOW_H - -#include <QtDeclarative/QQuickView> -#include <QtWidgets/QMainWindow> -#include <QWindowStateChangeEvent> -#include <QDebug> - -class QTopLevelWindow : public QMainWindow { - Q_OBJECT -public: - QTopLevelWindow(); - ~QTopLevelWindow(); - - //QGraphicsScene *scene() { return _view->scene(); } - QQuickView *view() { return _view; } - - - void registerChildWindow(QTopLevelWindow* child); - void hideChildWindows(); - void initPosition(); - void setWindowFlags(Qt::WindowFlags type); - - void center(); - void move(int x, int y); - void move(const QPoint &); - -protected: - virtual bool event(QEvent *event); - -Q_SIGNALS: - void visibilityChanged(); - void windowStateChanged(); - void sizeChanged(QSize newSize); - -private: - QQuickView *_view; - QSet<QTopLevelWindow*> _childWindows; - bool _positionIsDefined; - -}; - -#endif // QTOPLEVELWINDOW_H diff --git a/src/qtsplitterbase.h b/src/qtsplitterbase.h index 726f2f04..c5507e2f 100644 --- a/src/qtsplitterbase.h +++ b/src/qtsplitterbase.h @@ -2,6 +2,7 @@ #define QTSPLITTERBASE_H #include <QtDeclarative> +#include <QtQuick> class QtSplitterAttached : public QObject diff --git a/src/qwheelarea.h b/src/qwheelarea.h index 275e6abf..f88832f6 100644 --- a/src/qwheelarea.h +++ b/src/qwheelarea.h @@ -29,7 +29,7 @@ #include <QtGui/qevent.h> #include <QtWidgets/qgraphicssceneevent.h> -#include <QtDeclarative/qquickitem.h> +#include <QtQuick/qquickitem.h> class QWheelArea : public QQuickItem diff --git a/src/qwindowitem.cpp b/src/qwindowitem.cpp deleted file mode 100644 index ae38b00e..00000000 --- a/src/qwindowitem.cpp +++ /dev/null @@ -1,225 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOTgall -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -#include "qwindowitem.h" -#include "qtoplevelwindow.h" - -#include <QTimer> - -QWindowItem::QWindowItem(QTopLevelWindow* tlw) - : _window(tlw ? tlw : new QTopLevelWindow), _positionIsDefined(false), _delayedVisible(false), _x(0), _y(0) -{ - connect(_window, SIGNAL(visibilityChanged()), this, SIGNAL(visibleChanged())); - connect(_window, SIGNAL(windowStateChanged()), this, SIGNAL(windowStateChanged())); - connect(_window, SIGNAL(sizeChanged(QSize)), this, SLOT(updateSize(QSize))); - - connect(qApp, SIGNAL(aboutToQuit()), _window, SLOT(close())); - view()->setResizeMode(QQuickView::SizeRootObjectToView); - _window->installEventFilter(this); -} - -QWindowItem::~QWindowItem() -{ -} - -bool QWindowItem::eventFilter(QObject *, QEvent *ev) -{ - switch(ev->type()) { - case QEvent::Resize: - emit sizeChanged(); - emit widthChanged(); - emit heightChanged(); - break; - - case QEvent::Move: - emit xChanged(); - emit yChanged(); - break; - - default: - break; - } - return false; -} - -void QWindowItem::registerChildWindow(QWindowItem *child) { - _window->registerChildWindow(child->window()); -} - -void QWindowItem::updateParentWindow() { - QQuickItem *p = parentItem(); - while (p) { - if (QWindowItem *w = qobject_cast<QWindowItem*>(p)) { - w->registerChildWindow(this); - return; - } - p = p->parentItem(); - } -} - -void QWindowItem::componentComplete() -{ - updateParentWindow(); -// _window->scene()->addItem(this); -// if (!_window->parentWidget()) -// _window->initPosition(); - - QQuickItem::componentComplete(); - - if (_delayedVisible) { - setVisible(true); - } -} - -void QWindowItem::updateSize(QSize newSize) -{ - QQuickItem::setSize(newSize); - emit sizeChanged(); -} - -void QWindowItem::center() -{ - _window->center(); -} - -void QWindowItem::setX(int x) -{ - _x = x; - _window->move(x, _y); -} -void QWindowItem::setY(int y) -{ - _y = y; - _window->move(_x, y); -} - -void QWindowItem::moveWindow(int x,int y, int lx, int ly) -{ - QPoint p = _window->mapToGlobal(QPoint(x,y)); - p.setX(p.x() - lx); - p.setY(p.y() - ly); - _window->move(p); -} - -void QWindowItem::setHeight(int height) -{ - int menuBarHeight = _window->menuBar()->sizeHint().height(); - if (menuBarHeight) menuBarHeight++; - _window->resize(width(), height+menuBarHeight); - QQuickItem::setHeight(_window->height()); -} - -void QWindowItem::setMinimumHeight(int height) -{ - int menuBarHeight = _window->menuBar()->sizeHint().height(); - if (menuBarHeight) menuBarHeight++; - _window->setMinimumHeight(height+menuBarHeight); -} - -void QWindowItem::setMaximumHeight(int height) -{ - int menuBarHeight = _window->menuBar()->sizeHint().height(); - if (menuBarHeight) menuBarHeight++; - _window->setMaximumHeight(height+menuBarHeight); -} - -void QWindowItem::setWidth(int width) -{ - _window->resize(width, height()); - QQuickItem::setWidth(_window->width()); -} - -void QWindowItem::setTitle(QString title) -{ - _window->setWindowTitle(title); - emit titleChanged(); -} - -void QWindowItem::setVisible(bool visible) -{ - _window->setWindowFlags(_window->windowFlags() | Qt::Window); - if (visible) { - if (isComponentComplete()) { - // avoid flickering when showing the widget, - // by passing the event loop at least once - QTimer::singleShot(1, _window, SLOT(show())); - } else { - _delayedVisible = true; - } - } else { - _window->hide(); - } -} - -void QWindowItem::setWindowDecoration(bool s) -{ - bool visible = _window->isVisible(); - - - _window->setWindowFlags(s ? _window->windowFlags() & ~Qt::FramelessWindowHint - : _window->windowFlags() | Qt::FramelessWindowHint); - if (visible) - _window->show(); - emit windowDecorationChanged(); -} - -void QWindowItem::setModal(bool modal) -{ - bool visible = _window->isVisible(); - _window->hide(); - _window->setWindowModality(modal ? Qt::WindowModal : Qt::NonModal); - - if (modal) //this is a workaround for a bug in Qt? or in Unity? - _window->setWindowFlags(_window->windowFlags() | Qt::WindowStaysOnTopHint); - else - _window->setWindowFlags(_window->windowFlags() & ~Qt::WindowStaysOnTopHint ); - - if (visible) - _window->show(); - emit modalityChanged(); -} - -void QWindowItem::setClose(bool close) -{ - if (close) - _window->close(); -} - - diff --git a/src/qwindowitem.h b/src/qwindowitem.h deleted file mode 100644 index 81e439b9..00000000 --- a/src/qwindowitem.h +++ /dev/null @@ -1,126 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the Qt Components project on Qt Labs. -** -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions contained -** in the Technology Preview License Agreement accompanying this package. -** -** 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. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -****************************************************************************/ - -#ifndef QWindowItem_H -#define QWindowItem_H - -#include "qtoplevelwindow.h" - -#include <QtWidgets/QApplication> -#include <QQuickItem> -#include <QQuickView> -#include <QtWidgets/QMenuBar> - - -class QWindowItem : public QQuickItem -{ - Q_OBJECT - Q_PROPERTY(int x READ x WRITE setX NOTIFY xChanged) - Q_PROPERTY(int y READ y WRITE setY NOTIFY yChanged) - Q_PROPERTY(int height READ height WRITE setHeight NOTIFY sizeChanged) - Q_PROPERTY(int width READ width WRITE setWidth NOTIFY sizeChanged) - Q_PROPERTY(int minimumHeight READ minimumHeight WRITE setMinimumHeight NOTIFY minimumHeightChanged) - Q_PROPERTY(int maximumHeight READ maximumHeight WRITE setMaximumHeight NOTIFY maximumHeightChanged) - Q_PROPERTY(int minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged) - Q_PROPERTY(int maximumWidth READ maximumWidth WRITE setMaximumWidth NOTIFY maximumWidthChanged) - Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged) - Q_PROPERTY(bool windowDecoration READ windowDecoration WRITE setWindowDecoration NOTIFY windowDecorationChanged) - Q_PROPERTY(bool modal READ modal WRITE setModal NOTIFY modalityChanged) - Q_PROPERTY(bool close READ close WRITE setClose) - Q_PROPERTY(Qt::WindowState windowState READ windowState WRITE setWindowState NOTIFY windowStateChanged) - Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged) - -public: - QWindowItem(QTopLevelWindow* QTopLevelWindow = 0); - ~QWindowItem(); - - QTopLevelWindow *window() { return _window; } - QQuickView *view() { return _window->view(); } - int x() { return _window->x(); } - int y() { return _window->y(); } - int height() { return _window->height(); } - int minimumHeight() { return _window->minimumHeight(); } - int maximumHeight() { return _window->maximumHeight(); } - int width() { return _window->width(); } - int minimumWidth() { return _window->minimumWidth(); } - int maximumWidth() { return _window->maximumWidth(); } - bool isVisible() { return _window->isVisible(); } - bool windowDecoration() { return !(_window->windowFlags() & Qt::FramelessWindowHint); } - Qt::WindowState windowState() { return static_cast<Qt::WindowState>(static_cast<int>(_window->windowState()) & ~Qt::WindowActive); } - QString title() const { return _window->windowTitle(); } - bool modal() { return _window->isModal(); } - bool close() { return false; } //we always return false here - - void setX(int x); - void setY(int y); - void setHeight(int height); - void setMinimumHeight(int height); - void setMaximumHeight(int height); - void setWidth(int width); - void setMinimumWidth(int width) { _window->setMinimumWidth(width); } - void setMaximumWidth(int width) { _window->setMaximumWidth(width); } - void setVisible(bool visible); - void setWindowDecoration(bool s); - void setWindowState(Qt::WindowState state) { _window->setWindowState(state); } - void setTitle(QString title); - void setModal(bool modal); - void setClose(bool close); - -protected: - bool eventFilter(QObject *, QEvent *ev); - void updateParentWindow(); - void registerChildWindow(QWindowItem* child); - void componentComplete(); - -protected Q_SLOTS: - void updateSize(QSize newSize); - void center(); - void moveWindow(int x, int y, int lx, int ly); - -Q_SIGNALS: - void sizeChanged(); - void xChanged(); - void yChanged(); - void visibleChanged(); - void windowDecorationChanged(); - void windowStateChanged(); - void minimumHeightChanged(); - void minimumWidthChanged(); - void maximumHeightChanged(); - void maximumWidthChanged(); - void titleChanged(); - void modalityChanged(); - -private: - QTopLevelWindow *_window; - bool _complete; - bool _positionIsDefined; - bool _delayedVisible; - int _x; - int _y; -}; - -#endif // QWindowItem_H diff --git a/src/src.pro b/src/src.pro index 6e82d68b..e95a64d7 100644 --- a/src/src.pro +++ b/src/src.pro @@ -9,33 +9,23 @@ DESTDIR = ../components/plugin OBJECTS_DIR = obj MOC_DIR = moc -HEADERS += qtmenu.h \ - qtmenubar.h \ - qrangemodel_p.h \ +HEADERS += qrangemodel_p.h \ qrangemodel.h \ qstyleplugin.h \ qdeclarativefolderlistmodel.h \ qstyleitem.h \ qwheelarea.h \ - qtmenuitem.h \ - qwindowitem.h \ qdesktopitem.h \ - qtoplevelwindow.h \ qcursorarea.h \ qtooltiparea.h \ qtsplitterbase.h -SOURCES += qtmenu.cpp \ - qtmenubar.cpp \ - qrangemodel.cpp \ +SOURCES += qrangemodel.cpp \ qstyleplugin.cpp \ qdeclarativefolderlistmodel.cpp \ qstyleitem.cpp \ qwheelarea.cpp \ - qtmenuitem.cpp \ - qwindowitem.cpp \ qdesktopitem.cpp \ - qtoplevelwindow.cpp \ qcursorarea.cpp \ qtooltiparea.cpp \ qtsplitterbase.cpp |