summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-04-27 07:12:14 (GMT)
committeraxis <qt-info@nokia.com>2009-04-27 07:12:14 (GMT)
commit001d46dffc6240da27634ef9e27b47f768587253 (patch)
treea6c26268335c3f9552e2e7a4c2fcaa5649a55512 /util
parentde6a89077241016da39ae5f9cbb696d6606a757d (diff)
parent04b8d70bb0965f868ffa78595c7afc99675e656e (diff)
downloadQt-001d46dffc6240da27634ef9e27b47f768587253.zip
Qt-001d46dffc6240da27634ef9e27b47f768587253.tar.gz
Qt-001d46dffc6240da27634ef9e27b47f768587253.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
Diffstat (limited to 'util')
-rw-r--r--util/s60pixelmetrics/pixelmetricsmapper/PMMapperApp.cpp9
-rw-r--r--util/s60pixelmetrics/pixelmetricsmapper/PMMapperView.cpp9
-rw-r--r--util/s60pixelmetrics/pixelmetricsmapper/bld.inf45
-rw-r--r--util/s60pixelmetrics/pixelmetricsmapper/pm_mapper.mmp92
-rw-r--r--util/s60pixelmetrics/pixelmetricsmapper/pm_mapper.rss162
-rw-r--r--util/s60pixelmetrics/pixelmetricsmapper/pm_mapper_reg.rss57
-rw-r--r--util/s60pixelmetrics/pixelmetricsmapper/pmmapper.pkg32
-rw-r--r--util/s60pixelmetrics/src/pixel_metrics.cpp20
8 files changed, 403 insertions, 23 deletions
diff --git a/util/s60pixelmetrics/pixelmetricsmapper/PMMapperApp.cpp b/util/s60pixelmetrics/pixelmetricsmapper/PMMapperApp.cpp
index 3371baa..de0b753 100644
--- a/util/s60pixelmetrics/pixelmetricsmapper/PMMapperApp.cpp
+++ b/util/s60pixelmetrics/pixelmetricsmapper/PMMapperApp.cpp
@@ -39,15 +39,14 @@
**
****************************************************************************/
-
// INCLUDE FILES
#include <avkon.rsg>
#include <avkon.hrh>
-#include "PMMapper.hrh"
-#include "PMMapperApp.h"
-#include "PMMapperView.h"
-#include <PM_Mapper.rsg>
+#include "pmmapper.hrh"
+#include "pmmapperApp.h"
+#include "pmmapperView.h"
+#include <pm_mapper.rsg>
#include <BldVariant.hrh>
diff --git a/util/s60pixelmetrics/pixelmetricsmapper/PMMapperView.cpp b/util/s60pixelmetrics/pixelmetricsmapper/PMMapperView.cpp
index d7bd121..9d5d668 100644
--- a/util/s60pixelmetrics/pixelmetricsmapper/PMMapperView.cpp
+++ b/util/s60pixelmetrics/pixelmetricsmapper/PMMapperView.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
-
// INCLUDE FILES
#include <eiklabel.h>
@@ -47,10 +46,10 @@
#include <aknviewappui.h>
#include <aknconsts.h>
-#include "PMMapper.hrh"
-#include <PM_Mapper.rsg>
-#include "PMMapperView.h"
-#include "PMMapperApp.h"
+#include "pmmapper.hrh"
+#include <pm_mapper.rsg>
+#include "pmmapperView.h"
+#include "pmmapperApp.h"
#include <aknlists.h>
#include <avkon.hrh>
diff --git a/util/s60pixelmetrics/pixelmetricsmapper/bld.inf b/util/s60pixelmetrics/pixelmetricsmapper/bld.inf
new file mode 100644
index 0000000..748e8810
--- /dev/null
+++ b/util/s60pixelmetrics/pixelmetricsmapper/bld.inf
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** 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, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+PRJ_MMPFILES
+pm_mapper.mmp
+
+// End of File
diff --git a/util/s60pixelmetrics/pixelmetricsmapper/pm_mapper.mmp b/util/s60pixelmetrics/pixelmetricsmapper/pm_mapper.mmp
new file mode 100644
index 0000000..fe55fc9
--- /dev/null
+++ b/util/s60pixelmetrics/pixelmetricsmapper/pm_mapper.mmp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** 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, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <data_caging_paths.hrh>
+#include <domain\osextensions\platform_paths.hrh>
+
+TARGET pm_mapper.exe
+TARGETTYPE exe
+UID 0x100039CE 0x2002121F
+
+CAPABILITY CAP_APPLICATION
+VENDORID VID_DEFAULT
+
+SOURCEPATH .
+SOURCE pmmapperview.cpp
+SOURCE pmmapperapp.cpp
+SOURCE ..\src\pixel_metrics.cpp
+
+START RESOURCE pm_mapper.rss
+HEADER
+TARGETPATH APP_RESOURCE_DIR
+END
+
+START RESOURCE pm_mapper_reg.rss
+TARGETPATH \private\10003a3f\apps
+END
+
+APP_LAYER_SYSTEMINCLUDE
+USERINCLUDE .
+USERINCLUDE ..\inc
+
+LIBRARY eikcoctl.lib
+LIBRARY avkon.lib
+LIBRARY euser.lib
+LIBRARY apparc.lib
+LIBRARY cone.lib
+LIBRARY eikcore.lib
+LIBRARY bafl.lib
+LIBRARY eikctl.lib
+LIBRARY apgrfx.lib
+LIBRARY aknnotify.lib
+LIBRARY ws32.lib
+LIBRARY commonengine.lib
+LIBRARY fbscli.lib
+LIBRARY eikdlg.lib
+LIBRARY aknskins.lib
+LIBRARY gdi.lib
+LIBRARY CentralRepository.lib
+LIBRARY efsrv.lib
+LIBRARY cdlengine.lib
+LIBRARY AknLayout2.lib
+LIBRARY AknLayout2Scalable.lib
+
+// End of File
diff --git a/util/s60pixelmetrics/pixelmetricsmapper/pm_mapper.rss b/util/s60pixelmetrics/pixelmetricsmapper/pm_mapper.rss
new file mode 100644
index 0000000..60c15a8
--- /dev/null
+++ b/util/s60pixelmetrics/pixelmetricsmapper/pm_mapper.rss
@@ -0,0 +1,162 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** 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, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+// RESOURCE IDENTIFIER
+NAME TATR
+
+
+// INCLUDES
+#include <eikon.rh>
+#include <avkon.rh>
+#include <avkon.mbg>
+#include <avkon.rsg>
+#include <avkon.hrh>
+#include <uikon.hrh>
+#include <avkonIcons.hrh>
+#include <data_caging_paths_strings.hrh>
+#include <appinfo.rh>
+
+#include "pmmapper.hrh"
+
+
+// RESOURCE DEFINITIONS
+
+// -----------------------------------------------------------------------------
+//
+// RSS_SIGNATURE
+//
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE { }
+
+
+// -----------------------------------------------------------------------------
+//
+// TBUF
+//
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF { buf = "pm_mapper"; }
+
+
+// -----------------------------------------------------------------------------
+//
+// EIK_APP_INFO
+//
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE EIK_APP_INFO
+ {
+ }
+
+// -----------------------------------------------------------------------------
+//
+// r_pmmapper_localisable_app_info
+// Captions for this application.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE LOCALISABLE_APP_INFO r_pmmapper_localisable_app_info
+ {
+ short_caption = "pm_mapper";
+ caption_and_icon =
+ CAPTION_AND_ICON_INFO
+ {
+ caption = "PixelMetricsMapper";
+ };
+ }
+
+// -----------------------------------------------------------------------------
+//
+// r_pmmapper_view
+//
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_pmmapper_view
+ {
+ menubar = r_pmmapper_view_menu;
+ cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// r_pmmapper_view_menu
+//
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_pmmapper_view_menu
+ {
+ titles=
+ {
+ MENU_TITLE { txt = "A"; menu_pane = r_pmmapper_system_menu; }
+ };
+ }
+
+// -----------------------------------------------------------------------------
+//
+// r_pmmapper_system_menu
+//
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_pmmapper_system_menu
+ {
+ items =
+ {
+ MENU_ITEM { command = ECmdStartCalculations; txt = "Start calculations"; },
+ MENU_ITEM { command = ECmdSwitchOrientation; txt = "Switch orientation"; },
+ MENU_ITEM { command = ECmdSwitchMirroring; txt = "Switch mirroring";},
+ MENU_ITEM { command = ECmdStatus; txt = "Status"; },
+ MENU_ITEM { command = ECmdSwitchOutput; txt = "Switch output (file/screen)"; },
+ MENU_ITEM { command = ECmdCreateHeaderFile; txt = "Create header file"; },
+ MENU_ITEM { command = ECmdSetAutoMode; txt = "Switch autoMode";}
+ };
+ }
+
+
+// End of File
diff --git a/util/s60pixelmetrics/pixelmetricsmapper/pm_mapper_reg.rss b/util/s60pixelmetrics/pixelmetricsmapper/pm_mapper_reg.rss
new file mode 100644
index 0000000..d21a2c8
--- /dev/null
+++ b/util/s60pixelmetrics/pixelmetricsmapper/pm_mapper_reg.rss
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the utility applications of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** 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, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, 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.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <appinfo.rh>
+#include <pm_mapper.rsg>
+#include <data_caging_paths_strings.hrh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x2002121F // application UID
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file = "pm_mapper";
+ localisable_resource_file =
+ APP_RESOURCE_DIR"\\pm_mapper";
+ localisable_resource_id = R_PMMAPPER_LOCALISABLE_APP_INFO;
+ }
+
+// End of File
diff --git a/util/s60pixelmetrics/pixelmetricsmapper/pmmapper.pkg b/util/s60pixelmetrics/pixelmetricsmapper/pmmapper.pkg
new file mode 100644
index 0000000..1f2e38f
--- /dev/null
+++ b/util/s60pixelmetrics/pixelmetricsmapper/pmmapper.pkg
@@ -0,0 +1,32 @@
+; ==============================================================================
+; Name : PMMapper.pkg
+; Part of : Pixel Metrics Mapper
+; Description : Package file for pixel metrics mapper
+; SIS creation.
+; Version :
+;
+; Copyright (c) 2009 Nokia Corporation.
+; This material, including documentation and any related
+; computer programs, is protected by copyright controlled by
+; Nokia Corporation. All rights are reserved. Copying,
+; including reproducing, storing, adapting or translating, any
+; or all of this material requires the prior written consent of
+; Nokia Corporation. This material also contains confidential
+; information which may not be disclosed to others without the
+; prior written consent of Nokia Corporation.
+; ==============================================================================
+
+
+;Header
+#{"PMMapper"},(0x2002121F),1,0,0
+
+;Localised Vendor name
+%{"Nokia Test EN"}
+
+;Unique Vendor name
+:"Vendor"
+
+;Files to install
+"\Epoc32\release\armv5\urel\pm_mapper.exe" -"!:\sys\bin\pm_mapper.exe"
+"\epoc32\data\z\private\10003a3f\apps\pm_mapper_reg.rsc" -"!:\private\10003a3f\import\apps\pm_mapper_reg.rsc"
+"\epoc32\data\Z\Resource\Apps\pm_mapper.RSC" -"!:\resource\apps\pm_mapper.rsc"
diff --git a/util/s60pixelmetrics/src/pixel_metrics.cpp b/util/s60pixelmetrics/src/pixel_metrics.cpp
index 4d04e3b..f71a266 100644
--- a/util/s60pixelmetrics/src/pixel_metrics.cpp
+++ b/util/s60pixelmetrics/src/pixel_metrics.cpp
@@ -50,7 +50,7 @@
// so that we can keep dynamic and static values inline.
// Please adjust version data if correcting dynamic PM calculations.
const TInt KPMMajorVersion = 1;
-const TInt KPMMinorVersion = 12;
+const TInt KPMMinorVersion = 13;
TPixelMetricsVersion PixelMetrics::Version()
{
@@ -233,6 +233,7 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric)
case QStyle::PM_SpinBoxFrameWidth:
value = 0;
break;
+ case QStyle::PM_ToolBarFrameWidth:
case QStyle::PM_DefaultFrameWidth:
{
TAknLayoutRect highLightPaneRect;
@@ -656,16 +657,6 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric)
value = cellToolBarRect1.Rect().iBr.iX - cellToolBarRect2.Rect().iTl.iX;
}
break;
- case QStyle::PM_ToolBarFrameWidth:
- {
- variety = 4;
- TAknLayoutRect popupToolBarWindow;
- popupToolBarWindow.LayoutRect( mainPaneRect, AknLayoutScalable_Avkon::popup_toolbar_window(variety) );
- TAknLayoutRect gridToolBarRect;
- gridToolBarRect.LayoutRect( popupToolBarWindow.Rect(), AknLayoutScalable_Avkon::grid_toobar_pane() );
- value = popupToolBarWindow.Rect().iBr.iX - gridToolBarRect.Rect().iBr.iX;
- }
- break;
case QStyle::PM_ToolBarItemMargin:
{
variety = 4;
@@ -886,7 +877,7 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric)
TAknLayoutRect cellToolBarRect1;
TAknLayoutRect cellToolBarRect2;
cellToolBarRect1.LayoutRect( gridToolBarRect.Rect(), AknLayoutScalable_Avkon::cell_toolbar_pane(0).LayoutLine() ); //first item
- value = Max( cellToolBarRect1.Rect().Height(), cellToolBarRect1.Rect().Width() );
+ value = Min( cellToolBarRect1.Rect().Height(), cellToolBarRect1.Rect().Width() );
}
break;
@@ -1003,6 +994,10 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric)
case QStyle::PM_ButtonShiftVertical:
value = 0;
break;
+
+ case QStyle::PM_ToolBarExtensionExtent:
+ value = PixelMetricTabValue(QStyle::PM_TabBarScrollButtonWidth, appWindow.Rect(), landscape);
+ break;
// todo: re-check if these really are not available in s60
case QStyle::PM_MenuDesktopFrameWidth: // not needed in S60 - dislocates Menu both horizontally and vertically
@@ -1016,7 +1011,6 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric)
case QStyle::PM_MdiSubWindowMinimizedWidth: //no such thing in S60
case QStyle::PM_HeaderGripMargin: // not in S60
case QStyle::PM_SplitterWidth: // not in S60
- case QStyle::PM_ToolBarExtensionExtent: // not in S60
case QStyle::PM_ToolBarSeparatorExtent: // not in S60
case QStyle::PM_ToolBarHandleExtent: // not in s60
case QStyle::PM_MenuButtonIndicator: // none???