diff options
21 files changed, 105 insertions, 484 deletions
diff --git a/src/ui/menus/fremantle_landscape.png b/models/maemoFremantle/fremantle_landscape.png Binary files differindex 9b1de05..9b1de05 100644 --- a/src/ui/menus/fremantle_landscape.png +++ b/models/maemoFremantle/fremantle_landscape.png diff --git a/src/ui/menus/fremantle_portrait.png b/models/maemoFremantle/fremantle_portrait.png Binary files differindex d9e12bd..d9e12bd 100644 --- a/src/ui/menus/fremantle_portrait.png +++ b/models/maemoFremantle/fremantle_portrait.png diff --git a/models/maemoFremantle/maemoFremantle.config b/models/maemoFremantle/maemoFremantle.config index adcea37..3d45983 100644 --- a/models/maemoFremantle/maemoFremantle.config +++ b/models/maemoFremantle/maemoFremantle.config @@ -7,5 +7,8 @@ offsetX:72 offsetY:165 defaultFontSize:18 forceDpi:96 -menu:maemoFremantle nativeOrientation:landscape +menuPortrait:fremantle_portrait.png +availableGeometryPortrait:0,56,480,744 +menuLandscape:fremantle_landscape.png +availableGeometryLandscape:0,57,800,423 diff --git a/models/symbianTouch/menu_landscape.png b/models/symbianTouch/menu_landscape.png Binary files differnew file mode 100644 index 0000000..5a0f62c --- /dev/null +++ b/models/symbianTouch/menu_landscape.png diff --git a/models/symbianTouch/menu_portrait.png b/models/symbianTouch/menu_portrait.png Binary files differnew file mode 100644 index 0000000..fbb88cb --- /dev/null +++ b/models/symbianTouch/menu_portrait.png diff --git a/models/symbianTouch/symbianTouch.config b/models/symbianTouch/symbianTouch.config index c68b854..d44227f 100644 --- a/models/symbianTouch/symbianTouch.config +++ b/models/symbianTouch/symbianTouch.config @@ -10,5 +10,8 @@ style:s60 button:Key_TopMenu,,50,872,62,50 button:Key_Call,,165,864,42,66 button:Key_Hangup,,255,858,43,78 -menu:symbianTouch +menuPortrait:menu_portrait.png +availableGeometryPortrait:0,92,360,487 +menuLandscape:menu_landscape.png +availableGeometryLandscape:0,73,502,288 nativeOrientation:portrait diff --git a/src/other/configurationreader.cpp b/src/other/configurationreader.cpp index 392b2fa..b6e6ca5 100644 --- a/src/other/configurationreader.cpp +++ b/src/other/configurationreader.cpp @@ -138,14 +138,30 @@ bool ConfigurationReader::processLine(const QByteArray &line, DeviceData *device b.area = QRectF(values[2].toFloat(), values[3].toFloat(), values[4].toFloat(), values[5].toFloat()); deviceData->buttons.append(b); - } else if (parameter == "menu") { - if (value == "maemoFremantle") { - deviceData->menuType = MaemoFremantle; - } else if (value == "symbianTouch") { - deviceData->menuType = SymbianTouch; - } else { - errorMsg = tr("ConfigurationReader: menu property requires a valid type for portrait mode\n" - " (top, right, bottom, left)"); + } else if (parameter == "availableGeometryPortrait" || parameter == "availableGeometryLandscape") { + QList<QByteArray> values = value.split(','); + if (values.count() != 4) { + errorMsg = tr("ConfigurationReader: availableGeometryPortrait/Landscape property requires" + "four comma separated values\n" + " availableGeometryPortrait/Landscape:x,y,width,height"); + return false; + } + QRect geometry = QRect(values[0].toInt(), values[1].toInt(), + values[2].toInt(), values[3].toInt()); + if (parameter == "availableGeometryPortrait") + deviceData->portraitMenu.availableGeometry = geometry; + else + deviceData->landscapeMenu.availableGeometry = geometry; + } else if (parameter == "menuPortrait") { + deviceData->portraitMenu.pixmapPath = mCurrentDir->filePath(value); + if (!mCurrentDir->exists(value)) { + errorMsg = tr("Portrait menu file %1 does not exist.").arg(deviceData->portraitMenu.pixmapPath); + return false; + } + } else if (parameter == "menuLandscape") { + deviceData->landscapeMenu.pixmapPath = mCurrentDir->filePath(value); + if (!mCurrentDir->exists(value)) { + errorMsg = tr("Landscape menu file %1 does not exist.").arg(deviceData->landscapeMenu.pixmapPath); return false; } } else if (parameter == "nativeOrientation") { diff --git a/src/other/deviceitem.cpp b/src/other/deviceitem.cpp index c08c831..58bb8e8 100644 --- a/src/other/deviceitem.cpp +++ b/src/other/deviceitem.cpp @@ -29,7 +29,6 @@ #include "deviceitem.h" #include "displaywidget.h" -#include "menu.h" #include <qmath.h> #include <QtCore/QState> @@ -51,10 +50,14 @@ DeviceItem::DeviceItem(QGraphicsItem *parent) mMockup = new QGraphicsPixmapItem(QPixmap(), this); mMockup->setFlag(QGraphicsItem::ItemIsFocusable); - mDisplay = new DisplayWidget(this); - mDisplay->setParentItem(mMockup); + mDisplay = new DisplayWidget(mMockup); mMockup->setFocusProxy(mDisplay); + mMenu = new MenuPixmapItem(QPixmap(), mDisplay); + mMenu->setFlag(QGraphicsItem::ItemIsFocusable); + mMenu->setFocusProxy(mDisplay); + mMenu->setZValue(SIMULATOR_MENU_Z); + mLandscapeState = new QState; mPortraitState = new QState; @@ -83,10 +86,6 @@ DeviceItem::DeviceItem(QGraphicsItem *parent) DeviceItem::~DeviceItem() { - if (mMenu) { - delete mMenu; - mMenu = 0; - } } DisplayWidget *DeviceItem::display() @@ -114,6 +113,23 @@ void DeviceItem::changeDevice(const DeviceData &data) if (!data.mockup || data.mockup->isNull()) qFatal("Could not read mockup image %s", qPrintable(data.mockupPath)); } + // menu setup + // the the menu mockups were not yet read, do so now + if (!data.portraitMenu.pixmapPath.isNull() + && !data.portraitMenu.pixmapPath.isEmpty() + && !data.portraitMenu.pixmap) { + data.portraitMenu.pixmap = QSharedPointer<QPixmap>(new QPixmap(data.portraitMenu.pixmapPath)); + if (!data.portraitMenu.pixmap || data.portraitMenu.pixmap->isNull()) + qFatal("Could not read portrait menu image %s", qPrintable(data.portraitMenu.pixmapPath)); + } + if (!data.landscapeMenu.pixmapPath.isNull() + && !data.landscapeMenu.pixmapPath.isEmpty() + && !data.landscapeMenu.pixmap) { + data.landscapeMenu.pixmap = QSharedPointer<QPixmap>(new QPixmap(data.landscapeMenu.pixmapPath)); + if (!data.landscapeMenu.pixmap || data.landscapeMenu.pixmap->isNull()) + qFatal("Could not read landscape menu image %s", qPrintable(data.landscapeMenu.pixmapPath)); + } + Orientation current; if (mLandscape) @@ -147,21 +163,6 @@ void DeviceItem::changeDevice(const DeviceData &data) mButtons.append(button); } - // menu setup - if (mMenu) { - delete mMenu; - mMenu = 0; - } - switch (mDeviceData.menuType) { - case MaemoFremantle: - mMenu = new FremantleMenu(mDisplay, this); - break; - case SymbianTouch: - mMenu = new SymbianTouchMenu(mDisplay, this); - break; - default: - break; - } updateMenuPositionAndSize(); mDeviceData.availableGeometry = mAvailableGeometry; // display setup @@ -295,15 +296,32 @@ int DeviceItem::rotationSideLength() void DeviceItem::updateMenuPositionAndSize() { QRect displayRect; - if (mLandscape) + if (mLandscape) { displayRect.setRect(0, 0, mDeviceData.resolution.height(), mDeviceData.resolution.width()); - else - displayRect.setRect(0, 0, mDeviceData.resolution.width(), mDeviceData.resolution.height()); - if (mMenu) { - mAvailableGeometry = mMenu->updateMenus(mLandscape, displayRect); + if (!mDeviceData.landscapeMenu.pixmapPath.isNull() + && !mDeviceData.landscapeMenu.pixmapPath.isEmpty()) { + mMenu->setPixmap(*mDeviceData.landscapeMenu.pixmap); + mAvailableGeometry = mDeviceData.landscapeMenu.availableGeometry; + } else { + mMenu->setPixmap(QPixmap()); + mAvailableGeometry = displayRect; + } } else { - mAvailableGeometry = displayRect; + displayRect.setRect(0, 0, mDeviceData.resolution.width(), mDeviceData.resolution.height()); + if (!mDeviceData.portraitMenu.pixmapPath.isNull() + && !mDeviceData.portraitMenu.pixmapPath.isEmpty()) { + mMenu->setPixmap(*mDeviceData.portraitMenu.pixmap); + mAvailableGeometry = mDeviceData.portraitMenu.availableGeometry; + } else { + mMenu->setPixmap(QPixmap()); + mAvailableGeometry = displayRect; + } } + //if (mMenu) { + // mAvailableGeometry = mMenu->updateMenus(mLandscape, displayRect); + //} else { + // mAvailableGeometry = displayRect; + //} emit offsetChanged(mAvailableGeometry.topLeft()); } diff --git a/src/other/deviceitem.h b/src/other/deviceitem.h index c8a7108..5978cdd 100644 --- a/src/other/deviceitem.h +++ b/src/other/deviceitem.h @@ -42,25 +42,28 @@ struct Button Qt::Key key; }; -enum MenuType { - MaemoFremantle, - SymbianTouch, - None -}; - enum Orientation { notSet, portraitOrientation, landscapeOrientation, }; +struct MenuData { + QString pixmapPath; + mutable QSharedPointer<QPixmap> pixmap; + QRect availableGeometry; + + MenuData() + : pixmap(0) + {} +}; + struct DeviceData { DeviceData() : diagonalInInch(0.) , defaultFontSize(12) , forceDpi(-1) - , menuType(None) , nativeOrientation(notSet) {} @@ -74,15 +77,25 @@ struct DeviceData int defaultFontSize; int forceDpi; QList<Button> buttons; - MenuType menuType; QString style; Orientation nativeOrientation; + MenuData landscapeMenu; + MenuData portraitMenu; }; class DisplayWidget; -class Menu; class QState; +class MenuPixmapItem: public QGraphicsPixmapItem +{ +public: + MenuPixmapItem(const QPixmap &pixmap, QGraphicsItem *parent = 0) + : QGraphicsPixmapItem(pixmap, parent) + {} + enum {MenuType = UserType + 2}; + int type() const {return MenuType;}; +}; + class DeviceButton: public QGraphicsObject { Q_OBJECT @@ -176,7 +189,7 @@ private: QPoint mDragOffset; QList<KeyButton*> mButtons; - Menu *mMenu; + MenuPixmapItem *mMenu; private slots: void startRotate(); diff --git a/src/other/menu.cpp b/src/other/menu.cpp deleted file mode 100644 index f71f23c..0000000 --- a/src/other/menu.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Simulator -** -** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** Commercial Usage -** -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. -** -** 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 are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** -**************************************************************************/ - -#include "menu.h" -#include "menuwidget.h" - -Menu::Menu(QGraphicsItem *displayWidget, QObject *parent) -: QObject(parent) -{ - Q_UNUSED(displayWidget); -} - -Menu::~Menu(void) -{ - qDeleteAll(mMenuWidgets); - mMenuWidgets.clear(); -} - -QRect Menu::updateMenus(Orientation orientation, const QRect &displayRect) -{ - QRect mAvailableGeometry = displayRect; - bool isLandscape = true; - if (orientation == portraitOrientation) - isLandscape = false; - - foreach (MenuWidget *menu, mMenuWidgets) { - MenuWidgetType currentType = menu->currentType(isLandscape); - switch (currentType) { - case (topMenu): { - menu->setX(mAvailableGeometry.x()); - menu->setY(mAvailableGeometry.y()); - menu->setHeight(menu->currentExtend(isLandscape)); - menu->setWidth(mAvailableGeometry.width()); - mAvailableGeometry.setTop(mAvailableGeometry.top() + menu->currentExtend(isLandscape)); - break; - } case (rightMenu): { - menu->setX(mAvailableGeometry.x() + mAvailableGeometry.width() - menu->currentExtend(isLandscape)); - menu->setY(mAvailableGeometry.y()); - menu->setHeight(mAvailableGeometry.height()); - menu->setWidth(menu->currentExtend(isLandscape)); - mAvailableGeometry.setWidth(mAvailableGeometry.width() - menu->currentExtend(isLandscape)); - break; - } case (bottomMenu): { - menu->setX(mAvailableGeometry.x()); - menu->setY(mAvailableGeometry.y() + mAvailableGeometry.height() - menu->currentExtend(isLandscape)); - menu->setHeight(menu->currentExtend(isLandscape)); - menu->setWidth(mAvailableGeometry.width()); - mAvailableGeometry.setHeight(mAvailableGeometry.height() - menu->currentExtend(isLandscape)); - break; - } case (leftMenu): { - menu->setX(mAvailableGeometry.x()); - menu->setY(mAvailableGeometry.y()); - menu->setWidth(menu->currentExtend(isLandscape)); - menu->setHeight(mAvailableGeometry.height()); - mAvailableGeometry.setX(mAvailableGeometry.x() + menu->currentExtend(isLandscape)); - break; - } default: { - menu->setSize(QSize(0,0)); - break; - } - } - menu->showPixmap(isLandscape); - } - return mAvailableGeometry; -} - -QRect Menu::updateMenus(bool isLandscape, const QRect &displayRect) -{ - if (isLandscape) - return updateMenus(landscapeOrientation, displayRect); - else - return updateMenus(portraitOrientation, displayRect); -} - -FremantleMenu::FremantleMenu(QGraphicsItem *displayWidget, DeviceItem *parent) -: Menu(displayWidget, parent) -{ - MenuWidget *menuWidget = new MenuWidget(topMenu, 57, topMenu, 56, displayWidget); - menuWidget->setPortraitPixmap(QPixmap(":/menus/fremantle_portrait.png")); - menuWidget->setLandscapePixmap(QPixmap(":/menus/fremantle_landscape.png")); - mMenuWidgets.append(menuWidget); - - mCloseButton = new DeviceButton(menuWidget); - mCloseButton->setSize(QSizeF(111, 56)); - connect(mCloseButton, SIGNAL(pressed()), parent, SIGNAL(closeWindowPressed())); -} - -QRect FremantleMenu::updateMenus(Orientation orientation, const QRect &displayRect) -{ - mCloseButton->setX(displayRect.width() - mCloseButton->size().width()); - - return Menu::updateMenus(orientation, displayRect); -} - -SymbianTouchMenu::SymbianTouchMenu(QGraphicsItem *displayWidget, QObject *parent) -: Menu(displayWidget, parent) -{ - MenuWidget *menuWidget = new MenuWidget(bottomMenu, 60, rightMenu, 138, displayWidget); - menuWidget->setPortraitPixmap(QPixmap(":/menus/symbiantouch_buttons_small_portrait.png")); - menuWidget->setLandscapePixmap(QPixmap(":/menus/symbiantouch_buttons_small_landscape.png")); - mMenuWidgets.append(menuWidget); - menuWidget = new MenuWidget(topMenu, 73, topMenu, 73, displayWidget); - menuWidget->setPortraitPixmap(QPixmap(":/menus/symbiantouch_status_portrait.png")); - menuWidget->setLandscapePixmap(QPixmap(":/menus/symbiantouch_status_landscape.png")); - mMenuWidgets.append(menuWidget); -} diff --git a/src/other/menu.h b/src/other/menu.h deleted file mode 100644 index 82cb732..0000000 --- a/src/other/menu.h +++ /dev/null @@ -1,73 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Simulator -** -** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** Commercial Usage -** -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. -** -** 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 are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** -**************************************************************************/ - -#ifndef MENU_H -#define MENU_H - -#include "deviceitem.h" - -#include <QtCore/QObject> - -class MenuWidget; -class DeviceItem; -class QRect; -class QGraphicsItem; - -class Menu : public QObject -{ - Q_OBJECT -public: - explicit Menu(QGraphicsItem *displayWidget, QObject *parent = 0); - virtual ~Menu(); - - virtual QRect updateMenus(Orientation orientation, const QRect &displayRect); - QRect updateMenus(bool isLandscape, const QRect &displayRect); - -protected: - QList<MenuWidget *> mMenuWidgets; -}; - -class FremantleMenu: public Menu -{ -public: - explicit FremantleMenu(QGraphicsItem *displayWidget, DeviceItem *parent = 0); - - virtual QRect updateMenus(Orientation orientation, const QRect &displayRect); - -private: - DeviceButton *mCloseButton; -}; - -class SymbianTouchMenu: public Menu -{ -public: - explicit SymbianTouchMenu(QGraphicsItem *displayWidget, QObject *parent = 0); -}; - -#endif //MENU_H diff --git a/src/other/menuwidget.cpp b/src/other/menuwidget.cpp deleted file mode 100644 index 4eae4c0..0000000 --- a/src/other/menuwidget.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Simulator -** -** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** Commercial Usage -** -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. -** -** 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 are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** -**************************************************************************/ - -#include "menuwidget.h" - -#include <QtGui/QPainter> - -MenuWidget::MenuWidget(MenuWidgetType portraitType, int portraitExtend, MenuWidgetType landscapeType, int landscapeExtend, QGraphicsItem *parent) -: QGraphicsPixmapItem(parent) -, mPortraitType(portraitType) -, mPortraitExtend(portraitExtend) -, mLandscapeType(landscapeType) -, mLandscapeExtend(landscapeExtend) -{ - setFlag(QGraphicsItem::ItemIsFocusable); - setFocusProxy(parent); - setZValue(SIMULATOR_MENU_Z); -} - -MenuWidgetType MenuWidget::currentType(bool landscape) const -{ - if (landscape) - return mLandscapeType; - else - return mPortraitType; -} - -int MenuWidget::currentExtend(bool landscape) const -{ - if (landscape) - return mLandscapeExtend; - else - return mPortraitExtend; -} - -MenuWidgetType MenuWidget::landscapeType() const -{ - return mLandscapeType; -} - -MenuWidgetType MenuWidget::portraitType() const -{ - return mPortraitType; -} - -int MenuWidget::portraitExtend() const -{ - return mPortraitExtend; -} - -int MenuWidget::landscapeExtend() const -{ - return mLandscapeExtend; -} - -int MenuWidget::width() const -{ - return mSize.width(); -} - -int MenuWidget::height() const -{ - return mSize.height(); -} - -QSize MenuWidget::size() const -{ - return mSize; -} - -void MenuWidget::setWidth(quint32 w) -{ - mSize.setWidth(w); -} - -void MenuWidget::setHeight(quint32 h) -{ - mSize.setHeight(h); -} - -void MenuWidget::setSize(const QSize &s) -{ - if (mSize != s) - { - mSize = s; - } -} - -void MenuWidget::showPixmap(bool isLandscape) -{ - if (isLandscape) - setPixmap(mLandscapePixmap); - else - setPixmap(mPortraitPixmap); - show(); -} - -void MenuWidget::setPortraitPixmap(const QPixmap &portraitPixmap) -{ - mPortraitPixmap = portraitPixmap; -} - -void MenuWidget::setLandscapePixmap(const QPixmap &landscapePixmap) -{ - mLandscapePixmap = landscapePixmap; -} diff --git a/src/other/menuwidget.h b/src/other/menuwidget.h deleted file mode 100644 index d66a7e1..0000000 --- a/src/other/menuwidget.h +++ /dev/null @@ -1,80 +0,0 @@ -/************************************************************************** -** -** This file is part of Qt Simulator -** -** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -** -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** Commercial Usage -** -** Licensees holding valid Qt Commercial licenses may use this file in -** accordance with the Qt Commercial License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Nokia. -** -** 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 are unsure which license is appropriate for your use, please -** contact the sales department at http://qt.nokia.com/contact. -** -**************************************************************************/ - -#ifndef MENUWIDGET_H -#define MENUWIDGET_H - -#include "deviceitem.h" - -#include <QtGui/QGraphicsObject> - -enum MenuWidgetType { - topMenu, - leftMenu, - bottomMenu, - rightMenu, - noMenu -}; - -class MenuWidget : public QGraphicsPixmapItem -{ -public: - enum {MenuType = UserType + 2}; - MenuWidget(MenuWidgetType type, int portraitExtend, MenuWidgetType landscapeType, int landscapeExtend, QGraphicsItem *parent = 0); - - MenuWidgetType currentType(bool landscape) const; - int currentExtend(bool landscape) const; - MenuWidgetType portraitType() const; - int portraitExtend() const; - MenuWidgetType landscapeType() const; - int landscapeExtend() const; - - int type() const {return MenuType;}; - int width() const; - int height() const; - QSize size() const; - - void showPixmap(bool isLandscape); - void setPortraitPixmap(const QPixmap &portraitPixmap); - void setLandscapePixmap(const QPixmap &landscapePixmap); - void setWidth(quint32 w); - void setHeight(quint32 h); - void setSize(const QSize &s); - -private: - QSize mSize; - MenuWidgetType mPortraitType; - int mPortraitExtend; - QPixmap mPortraitPixmap; - MenuWidgetType mLandscapeType; - int mLandscapeExtend; - QPixmap mLandscapePixmap; -}; - -#endif // MENUWIDGET_H diff --git a/src/other/other.pri b/src/other/other.pri index 56f4ee1..b83c43c 100644 --- a/src/other/other.pri +++ b/src/other/other.pri @@ -7,8 +7,6 @@ SOURCES += application.cpp \ configurationreader.cpp \ deviceitem.cpp \ displaywidget.cpp \ - menu.cpp \ - menuwidget.cpp \ phononmanager.cpp \ widgetmanager.cpp \ widget.cpp @@ -17,8 +15,6 @@ HEADERS += application.h \ configurationreader.h \ deviceitem.h \ displaywidget.h \ - menu.h \ - menuwidget.h \ phononmanager.h \ widgetmanager.h \ widget.h diff --git a/src/other/widgetmanager.cpp b/src/other/widgetmanager.cpp index 30ff30c..79b992b 100644 --- a/src/other/widgetmanager.cpp +++ b/src/other/widgetmanager.cpp @@ -29,10 +29,10 @@ #include "widgetmanager.h" #include "widget.h" -#include "menuwidget.h" #include "application.h" #include "displaywidget.h" #include "qsimulatordata_p.h" +#include "deviceitem.h" #include <QtCore/QDebug> #include <QtGui/QWidget> @@ -447,7 +447,7 @@ void WidgetManager::setHighestZ(Widget *w) // get the existing z order of everything but this and menus foreach (Widget *child, widgets) { - if (child != w && child->type() != MenuWidget::MenuType + if (child != w && child->type() != MenuPixmapItem::MenuType && w->isFullScreen() == child->isFullScreen()) order.insert(child->zValue(), child); } @@ -491,7 +491,7 @@ void WidgetManager::setLowestZ(Widget *w) // get the existing z order of everything but this and menus foreach (Widget *child, widgets) { - if (child != w && child->type() != MenuWidget::MenuType + if (child != w && child->type() != MenuPixmapItem::MenuType && w->isFullScreen() == child->isFullScreen()) order.insert(child->zValue(), child); } @@ -520,7 +520,7 @@ void WidgetManager::setZBefore(Widget *w, Widget *other) // get the existing z order of everything but this and menus foreach (Widget *child, widgets) { - if (child != w && child->type() != MenuWidget::MenuType) + if (child != w && child->type() != MenuPixmapItem::MenuType) order.insert(child->zValue(), child); if (child == other) otherFound = true; diff --git a/src/ui/menus/menus.qrc b/src/ui/menus/menus.qrc deleted file mode 100644 index 773d106..0000000 --- a/src/ui/menus/menus.qrc +++ /dev/null @@ -1,10 +0,0 @@ -<RCC> - <qresource prefix="/menus"> - <file>fremantle_landscape.png</file> - <file>fremantle_portrait.png</file> - <file>symbiantouch_status_landscape.png</file> - <file>symbiantouch_status_portrait.png</file> - <file>symbiantouch_buttons_small_landscape.png</file> - <file>symbiantouch_buttons_small_portrait.png</file> - </qresource> -</RCC> diff --git a/src/ui/menus/symbiantouch_buttons_small_landscape.png b/src/ui/menus/symbiantouch_buttons_small_landscape.png Binary files differdeleted file mode 100644 index 78ccda3..0000000 --- a/src/ui/menus/symbiantouch_buttons_small_landscape.png +++ /dev/null diff --git a/src/ui/menus/symbiantouch_buttons_small_portrait.png b/src/ui/menus/symbiantouch_buttons_small_portrait.png Binary files differdeleted file mode 100644 index 6ef0847..0000000 --- a/src/ui/menus/symbiantouch_buttons_small_portrait.png +++ /dev/null diff --git a/src/ui/menus/symbiantouch_status_landscape.png b/src/ui/menus/symbiantouch_status_landscape.png Binary files differdeleted file mode 100644 index e55eb16..0000000 --- a/src/ui/menus/symbiantouch_status_landscape.png +++ /dev/null diff --git a/src/ui/menus/symbiantouch_status_portrait.png b/src/ui/menus/symbiantouch_status_portrait.png Binary files differdeleted file mode 100644 index 62c42b6..0000000 --- a/src/ui/menus/symbiantouch_status_portrait.png +++ /dev/null diff --git a/src/ui/ui.pri b/src/ui/ui.pri index 9cb3f46..78cd8ab 100644 --- a/src/ui/ui.pri +++ b/src/ui/ui.pri @@ -20,7 +20,6 @@ SOURCES += applicationtablewidget.cpp \ messagingui.cpp \ sensorsui.cpp \ viewconfiguration.cpp -RESOURCES += menus/menus.qrc FORMS += inspector.ui \ viewconfiguration.ui |