From 87892fce31ace521a2f229c09af56e4d41cb5174 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig <jensb.bache-wiig@nokia.com> Date: Wed, 21 Sep 2011 20:26:54 +0200 Subject: [PATCH] Refactor source tree a bit --- components/Button.qml | 3 + src/{styleitem => }/qcursorarea.cpp | 0 src/{styleitem => }/qcursorarea.h | 0 .../qdeclarativefolderlistmodel.cpp | 0 .../qdeclarativefolderlistmodel.h | 0 src/{styleitem => }/qdesktopitem.cpp | 0 src/{styleitem => }/qdesktopitem.h | 0 src/{styleitem => }/qrangemodel.cpp | 0 src/{styleitem => }/qrangemodel.h | 0 src/{styleitem => }/qrangemodel_p.h | 0 src/{styleitem => }/qstyleitem.cpp | 0 src/{styleitem => }/qstyleitem.h | 0 src/{styleitem => }/qstyleplugin.cpp | 0 src/{styleitem => }/qstyleplugin.h | 0 src/{styleitem => }/qtmenu.cpp | 0 src/{styleitem => }/qtmenu.h | 0 src/{styleitem => }/qtmenubar.cpp | 0 src/{styleitem => }/qtmenubar.h | 0 src/{styleitem => }/qtmenuitem.cpp | 0 src/{styleitem => }/qtmenuitem.h | 0 src/{styleitem => }/qtooltiparea.cpp | 1 + src/{styleitem => }/qtooltiparea.h | 0 src/{styleitem => }/qtoplevelwindow.cpp | 0 src/{styleitem => }/qtoplevelwindow.h | 0 src/{styleitem => }/qwheelarea.cpp | 0 src/{styleitem => }/qwheelarea.h | 0 src/{styleitem => }/qwindowitem.cpp | 0 src/{styleitem => }/qwindowitem.h | 0 src/src.pro | 65 ++++++++++++++++++- src/styleitem/styleitem.pro | 63 ------------------ 30 files changed, 67 insertions(+), 65 deletions(-) rename src/{styleitem => }/qcursorarea.cpp (100%) rename src/{styleitem => }/qcursorarea.h (100%) rename src/{styleitem => }/qdeclarativefolderlistmodel.cpp (100%) rename src/{styleitem => }/qdeclarativefolderlistmodel.h (100%) rename src/{styleitem => }/qdesktopitem.cpp (100%) rename src/{styleitem => }/qdesktopitem.h (100%) rename src/{styleitem => }/qrangemodel.cpp (100%) rename src/{styleitem => }/qrangemodel.h (100%) rename src/{styleitem => }/qrangemodel_p.h (100%) rename src/{styleitem => }/qstyleitem.cpp (100%) rename src/{styleitem => }/qstyleitem.h (100%) rename src/{styleitem => }/qstyleplugin.cpp (100%) rename src/{styleitem => }/qstyleplugin.h (100%) rename src/{styleitem => }/qtmenu.cpp (100%) rename src/{styleitem => }/qtmenu.h (100%) rename src/{styleitem => }/qtmenubar.cpp (100%) rename src/{styleitem => }/qtmenubar.h (100%) rename src/{styleitem => }/qtmenuitem.cpp (100%) rename src/{styleitem => }/qtmenuitem.h (100%) rename src/{styleitem => }/qtooltiparea.cpp (96%) rename src/{styleitem => }/qtooltiparea.h (100%) rename src/{styleitem => }/qtoplevelwindow.cpp (100%) rename src/{styleitem => }/qtoplevelwindow.h (100%) rename src/{styleitem => }/qwheelarea.cpp (100%) rename src/{styleitem => }/qwheelarea.h (100%) rename src/{styleitem => }/qwindowitem.cpp (100%) rename src/{styleitem => }/qwindowitem.h (100%) delete mode 100644 src/styleitem/styleitem.pro diff --git a/components/Button.qml b/components/Button.qml index 885a9f0e8..403479ad1 100644 --- a/components/Button.qml +++ b/components/Button.qml @@ -7,11 +7,14 @@ Components.Button { width: Math.max(80, sizehint.width) height: Math.max(22, sizehint.height) + property alias containsMouse: tooltip.containsMouse property variant sizehint: backgroundItem.sizeFromContents(80, 6) property bool defaultbutton property string hint TooltipArea { + // Note this will eat hover events + id: tooltip anchors.fill: parent text: button.tooltip } diff --git a/src/styleitem/qcursorarea.cpp b/src/qcursorarea.cpp similarity index 100% rename from src/styleitem/qcursorarea.cpp rename to src/qcursorarea.cpp diff --git a/src/styleitem/qcursorarea.h b/src/qcursorarea.h similarity index 100% rename from src/styleitem/qcursorarea.h rename to src/qcursorarea.h diff --git a/src/styleitem/qdeclarativefolderlistmodel.cpp b/src/qdeclarativefolderlistmodel.cpp similarity index 100% rename from src/styleitem/qdeclarativefolderlistmodel.cpp rename to src/qdeclarativefolderlistmodel.cpp diff --git a/src/styleitem/qdeclarativefolderlistmodel.h b/src/qdeclarativefolderlistmodel.h similarity index 100% rename from src/styleitem/qdeclarativefolderlistmodel.h rename to src/qdeclarativefolderlistmodel.h diff --git a/src/styleitem/qdesktopitem.cpp b/src/qdesktopitem.cpp similarity index 100% rename from src/styleitem/qdesktopitem.cpp rename to src/qdesktopitem.cpp diff --git a/src/styleitem/qdesktopitem.h b/src/qdesktopitem.h similarity index 100% rename from src/styleitem/qdesktopitem.h rename to src/qdesktopitem.h diff --git a/src/styleitem/qrangemodel.cpp b/src/qrangemodel.cpp similarity index 100% rename from src/styleitem/qrangemodel.cpp rename to src/qrangemodel.cpp diff --git a/src/styleitem/qrangemodel.h b/src/qrangemodel.h similarity index 100% rename from src/styleitem/qrangemodel.h rename to src/qrangemodel.h diff --git a/src/styleitem/qrangemodel_p.h b/src/qrangemodel_p.h similarity index 100% rename from src/styleitem/qrangemodel_p.h rename to src/qrangemodel_p.h diff --git a/src/styleitem/qstyleitem.cpp b/src/qstyleitem.cpp similarity index 100% rename from src/styleitem/qstyleitem.cpp rename to src/qstyleitem.cpp diff --git a/src/styleitem/qstyleitem.h b/src/qstyleitem.h similarity index 100% rename from src/styleitem/qstyleitem.h rename to src/qstyleitem.h diff --git a/src/styleitem/qstyleplugin.cpp b/src/qstyleplugin.cpp similarity index 100% rename from src/styleitem/qstyleplugin.cpp rename to src/qstyleplugin.cpp diff --git a/src/styleitem/qstyleplugin.h b/src/qstyleplugin.h similarity index 100% rename from src/styleitem/qstyleplugin.h rename to src/qstyleplugin.h diff --git a/src/styleitem/qtmenu.cpp b/src/qtmenu.cpp similarity index 100% rename from src/styleitem/qtmenu.cpp rename to src/qtmenu.cpp diff --git a/src/styleitem/qtmenu.h b/src/qtmenu.h similarity index 100% rename from src/styleitem/qtmenu.h rename to src/qtmenu.h diff --git a/src/styleitem/qtmenubar.cpp b/src/qtmenubar.cpp similarity index 100% rename from src/styleitem/qtmenubar.cpp rename to src/qtmenubar.cpp diff --git a/src/styleitem/qtmenubar.h b/src/qtmenubar.h similarity index 100% rename from src/styleitem/qtmenubar.h rename to src/qtmenubar.h diff --git a/src/styleitem/qtmenuitem.cpp b/src/qtmenuitem.cpp similarity index 100% rename from src/styleitem/qtmenuitem.cpp rename to src/qtmenuitem.cpp diff --git a/src/styleitem/qtmenuitem.h b/src/qtmenuitem.h similarity index 100% rename from src/styleitem/qtmenuitem.h rename to src/qtmenuitem.h diff --git a/src/styleitem/qtooltiparea.cpp b/src/qtooltiparea.cpp similarity index 96% rename from src/styleitem/qtooltiparea.cpp rename to src/qtooltiparea.cpp index 2a1cb3e2a..c560a52e2 100644 --- a/src/styleitem/qtooltiparea.cpp +++ b/src/qtooltiparea.cpp @@ -2,6 +2,7 @@ #include <QGraphicsView> #include <QToolTip> #include <QApplication> +#include <QGraphicsSceneEvent> QTooltipArea::QTooltipArea(QDeclarativeItem *parent) : QDeclarativeItem(parent) diff --git a/src/styleitem/qtooltiparea.h b/src/qtooltiparea.h similarity index 100% rename from src/styleitem/qtooltiparea.h rename to src/qtooltiparea.h diff --git a/src/styleitem/qtoplevelwindow.cpp b/src/qtoplevelwindow.cpp similarity index 100% rename from src/styleitem/qtoplevelwindow.cpp rename to src/qtoplevelwindow.cpp diff --git a/src/styleitem/qtoplevelwindow.h b/src/qtoplevelwindow.h similarity index 100% rename from src/styleitem/qtoplevelwindow.h rename to src/qtoplevelwindow.h diff --git a/src/styleitem/qwheelarea.cpp b/src/qwheelarea.cpp similarity index 100% rename from src/styleitem/qwheelarea.cpp rename to src/qwheelarea.cpp diff --git a/src/styleitem/qwheelarea.h b/src/qwheelarea.h similarity index 100% rename from src/styleitem/qwheelarea.h rename to src/qwheelarea.h diff --git a/src/styleitem/qwindowitem.cpp b/src/qwindowitem.cpp similarity index 100% rename from src/styleitem/qwindowitem.cpp rename to src/qwindowitem.cpp diff --git a/src/styleitem/qwindowitem.h b/src/qwindowitem.h similarity index 100% rename from src/styleitem/qwindowitem.h rename to src/qwindowitem.h diff --git a/src/src.pro b/src/src.pro index b06387a2b..c2689d6f0 100644 --- a/src/src.pro +++ b/src/src.pro @@ -1,2 +1,63 @@ -TEMPLATE = subdirs -SUBDIRS = styleitem +TEMPLATE = lib +CONFIG += qt plugin +QT += declarative +QT += script + +TARGET = styleplugin + +DESTDIR = ../components/plugin +OBJECTS_DIR = obj +MOC_DIR = moc + +HEADERS += qtmenu.h \ + qtmenubar.h \ + 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 + +SOURCES += qtmenu.cpp \ + qtmenubar.cpp \ + qrangemodel.cpp \ + qstyleplugin.cpp \ + qdeclarativefolderlistmodel.cpp \ + qstyleitem.cpp \ + qwheelarea.cpp \ + qtmenuitem.cpp \ + qwindowitem.cpp \ + qdesktopitem.cpp \ + qtoplevelwindow.cpp \ + qcursorarea.cpp \ + qtooltiparea.cpp + +TARGETPATH = QtDesktop/plugin + +symbian { + INSTALL_IMPORTS = /resource/qt/imports +} else { + INSTALL_IMPORTS = $$[QT_INSTALL_IMPORTS] +} + +target.path = $$INSTALL_IMPORTS/$$TARGETPATH + +INSTALLS += target + +symbian { + DEPLOYMENT += target +} + + + + + + + + diff --git a/src/styleitem/styleitem.pro b/src/styleitem/styleitem.pro deleted file mode 100644 index 21aba3fa4..000000000 --- a/src/styleitem/styleitem.pro +++ /dev/null @@ -1,63 +0,0 @@ -TEMPLATE = lib -CONFIG += qt plugin -QT += declarative -QT += script - -TARGET = styleplugin - -DESTDIR = ../../components/plugin -OBJECTS_DIR = obj -MOC_DIR = moc - -HEADERS += qtmenu.h \ - qtmenubar.h \ - 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 - -SOURCES += qtmenu.cpp \ - qtmenubar.cpp \ - qrangemodel.cpp \ - qstyleplugin.cpp \ - qdeclarativefolderlistmodel.cpp \ - qstyleitem.cpp \ - qwheelarea.cpp \ - qtmenuitem.cpp \ - qwindowitem.cpp \ - qdesktopitem.cpp \ - qtoplevelwindow.cpp \ - qcursorarea.cpp \ - qtooltiparea.cpp - -TARGETPATH = QtDesktop/plugin - -symbian { - INSTALL_IMPORTS = /resource/qt/imports -} else { - INSTALL_IMPORTS = $$[QT_INSTALL_IMPORTS] -} - -target.path = $$INSTALL_IMPORTS/$$TARGETPATH - -INSTALLS += target - -symbian { - DEPLOYMENT += target -} - - - - - - - - -- GitLab