--- a/group/bld.inf Wed Apr 14 15:58:04 2010 +0300
+++ b/group/bld.inf Tue Apr 27 16:38:40 2010 +0300
@@ -25,6 +25,6 @@
#include "../loadgen/group/bld.inf"
#include "../perfmon/group/bld.inf"
#include "../screengrabber/group/bld.inf"
-#include "../stifui/group/bld.inf"
+#include "../stifui/avkon/group/bld.inf"
#include "../memspyui/group/bld.inf"
#include "../htiui/group/bld.inf"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/group/ReleaseNote.txt Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,47 @@
+========================================================================
+RELEASE NOTE FOR STIF UI - STIF_201014 (7.3.30)
+SUPPORTING SERIES 60 3.0 ->
+========================================================================
+
+Product Description:
+====================
+STIF UI is Series 60 UI application for STIF project.
+STIF is a test harness for testing Symbian & S60 non-UI components.
+This widely used test framework can be used for both test case implementation and test cases execution.
+
+Features :
+=========
+- Easy to use
+- Multiple test cases can be executed concurrently.
+
+
+Enhancements:
+=============
+N/A
+
+
+New Features:
+=============
+N/A
+
+
+System Requirements:
+====================
+Basic Requirements:
+- S60/Symbian OS development environment installed
+
+- stif project needs to be compiled/installed before stifui can be used
+
+
+Compatibility Issues:
+=====================
+N/A
+
+Known Issues:
+===========
+If problems with compilation appears (missing platform_paths.hrh file error message),
+please use EnvPatcher.pl script from stif/envpatcher folder to fix environment.
+
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/group/bld.inf Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: bld.inf Toplevel build information for STIF UI
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+// Specify the platforms your component needs to be built for here.
+// If not specified all platforms can be built.
+
+// Note that if you want to build STIF to GCCE platform, GCCE must be
+// specified separately - it is not part of default platforms.
+// DEFAULT GCCE
+
+ DEFAULT
+
+
+PRJ_EXPORTS
+// This is added in order to export iby files automaticly in 5.0 env
+ ../rom/Stifui.iby CORE_IBY_EXPORT_PATH(tools,Stifui.iby)
+
+PRJ_TESTEXPORTS
+
+PRJ_MMPFILES
+ // StifUI
+ #include "../stifui/group/bld.inf"
+
+ // UiTestServerStarter
+ #include "../uitestserverstarter/group/bld.inf"
+
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/rom/Stifui.iby Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Stifui.iby file specifies needed STIF and STIF UI
+* and UITetsServerstarter components for ROM image
+*
+*/
+
+#ifndef __STIF_UI_IBY__
+#define __STIF_UI_IBY__
+
+S60_APP_EXE(Stifui)
+
+#ifdef S60_UPGRADABLE_APP_REG_RSC
+ S60_UPGRADABLE_APP_REG_RSC(Stifui)
+#else
+ S60_APP_AIF_RSC(Stifui)
+#endif
+
+S60_APP_RESOURCE(Stifui)
+
+S60_APP_EXE(UITestServerStarter)
+
+#ifdef S60_UPGRADABLE_APP_REG_RSC
+ S60_UPGRADABLE_APP_REG_RSC(UITestServerStarter)
+#else
+ S60_APP_AIF_RSC(UITestServerStarter)
+#endif
+
+
+S60_APP_RESOURCE(UITestServerStarter)
+
+// Note: before creating image, copy Stifui_31_Stub.sis from \stifui\sis\ to \epoc32\data\Z\system\install\
+data=ZSYSTEM\install\Stifui_31_Stub.sis System\Install\Stifui_31_Stub.sis
+
+#endif
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/sis/Stifui.pkg Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,67 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: Installation file for STIF UI
+;
+
+; Languages
+&EN
+
+; Package header, uid is the Stifui's uid
+#{"STIF UI"},(0x1028311D),0,1,0,TYPE=SA
+
+; Series60 product id for S60 3.0
+[0x101F7961], 0, 0, 0, {"Series60ProductID"}
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+; Logo
+; None
+
+; Package signature - Optional
+; None
+
+; Start of Package body
+
+; Condition blocks
+; None
+
+; Options list
+; None
+
+; Install files
+
+ ;// Note: STIF needs to be installed before STIF UI can be used
+
+ "\epoc32\release\armv5\udeb\Stifui.exe"-"!:\Sys\Bin\Stifui.exe"
+ "\epoc32\data\z\private\10003a3f\apps\Stifui_reg.rsc"-"!:\Private\10003a3f\import\apps\Stifui_reg.rsc"
+ "\epoc32\data\z\Resource\apps\Stifui.rsc"-"!:\Resource\apps\Stifui.rsc"
+
+ "\epoc32\release\armv5\udeb\UITestServerStarter.exe"-"!:\Sys\Bin\UITestServerStarter.exe"
+ "\epoc32\data\z\private\10003a3f\apps\UITestServerStarter_reg.rsc"-"!:\Private\10003a3f\import\apps\UITestServerStarter_reg.rsc"
+ "\epoc32\data\z\Resource\apps\UITestServerStarter.rsc"-"!:\Resource\apps\UITestServerStarter.rsc"
+
+; Embedded SIS
+; None
+
+; End of Package body
+
+; PKG dependencies
+; None
+
+; PKG capabilities
+; None
\ No newline at end of file
Binary file stifui/avkon/sis/Stifui_31.sis has changed
Binary file stifui/avkon/sis/Stifui_31_Stub.SIS has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/data/Stifui.rss Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,2057 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file defines StifUI resources.
+*
+*/
+
+// RESOURCE IDENTIFIER
+NAME STIF // 4 letter ID
+
+// INCLUDES
+
+#include <eikon.rh>
+#include "Stifui.hrh"
+#include "Stifui_loc.hrh"
+#include <avkon.rsg>
+#include <avkon.rh>
+#include <avkon.mbg>
+#include <avkon.hrh>
+#include <CommonDialogs.hrh> // Enumerations of memory selection, file selection, save etc dialogs
+#include <CommonDialogs.rh> // Resource structures of memory selection, file selection, save etc dialogs
+#if defined (__S60_)
+ #include <data_caging_paths_strings.hrh>
+#endif
+#include <appinfo.rh>
+
+// CONSTANTS
+
+
+// MACROS
+
+
+// RESOURCE DEFINITIONS
+
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf="STIF UI"; }
+
+RESOURCE EIK_APP_INFO
+ {
+ status_pane = r_appui_status_pane;
+ }
+
+STRUCT STRING
+ {
+ BUF text;
+ }
+
+
+// RESOURCE DEFINITIONS
+//-----------------------------------------------------------------------------
+//
+// r_appui_hotkeys
+// ?description
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE HOTKEYS r_appui_hotkeys
+ {
+ control=
+ {
+ HOTKEY { command=EAknCmdExit; key='e'; }
+ };
+ }
+
+
+// APPUI
+//-----------------------------------------------------------------------------
+//
+// r_appui_status_pane
+// Applications status panel.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE STATUS_PANE_APP_MODEL r_appui_status_pane
+ {
+ panes=
+ {
+ //SPANE_PANE
+ // {
+ // id = EEikStatusPaneUidNavi;
+ // //type = EEikCtLabel;
+ // //type = EAknCtTitlePane;
+ // type = EAknCtNaviPane;
+ // //resource = r_appui_statuspane_text;
+ // resource = r_appui_navi_decorator;
+ // },
+ SPANE_PANE
+ {
+ id = EEikStatusPaneUidTitle;
+ type = EAknCtTitlePane;
+ resource = r_appui_overriden_app_name;
+ }
+ //SPANE_PANE
+ // {
+ // id = EEikStatusPaneUidContext;
+ // type = EAknCtContextPane;
+ // resource = ;
+ // }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_status_pane
+// Status panel text.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE LABEL r_appui_statuspane_text
+ {
+ txt = "STIF UI";
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_overriden_app_name
+// Application name.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE TITLE_PANE r_appui_overriden_app_name
+ {
+ txt = qtn_app_caption_string;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_navi_decorator
+// ?description
+//
+//-----------------------------------------------------------------------------
+//
+/*
+RESOURCE NAVI_DECORATOR r_appui_navi_decorator
+ {
+ type = ENaviDecoratorControlTabGroup;
+ control = TAB_GROUP
+ {
+ tab_width = EAknTabWidthWithTwoTabs; // two tabs
+ active = 0;
+ tabs = {
+ TAB
+ {
+ id = ETestCaseMenuTab; // from application hrh
+ txt = qtn_testcase_menu_tab;
+ },
+ TAB
+ {
+ id = ETestModulesMenuTab; // from application hrh
+ txt = qtn_testmodules_menu_tab;
+ },
+ TAB
+ {
+ id = ETestSetsMenuTab; // from application hrh
+ txt = qtn_testsets_menu_tab;
+ }
+ };
+ };
+ }
+*/
+
+// MAIN MENU
+//-----------------------------------------------------------------------------
+//
+// r_appui_mainmenuview
+// Mainmenu view.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_appui_mainmenuview
+ {
+ menubar=r_appui_menubar_mainmenuview;
+ cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_menubar_mainmenuview
+// Main menu menubar.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_appui_menubar_mainmenuview
+ {
+ titles=
+ {
+ MENU_TITLE
+ {
+ menu_pane=r_appui_mainmenuview_menu;
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_mainmenuview_menu
+// Main menu options menu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_appui_mainmenuview_menu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command= EAknCmdOpen;
+ txt = "Open";
+ },
+ MENU_ITEM
+ {
+ command = ECmdShowAbout;
+ txt = "About";
+ },
+ MENU_ITEM
+ {
+ command = EAknSoftkeyExit;
+ txt = "Exit";
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_main_menu_listbox
+// ListBox( Single )
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE LISTBOX r_main_menu_listbox
+ {
+ array_id = r_main_menu_items;
+ flags = EAknListBoxSelectionList;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_main_menu_items
+// Items array for Main Menu
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE ARRAY r_main_menu_items
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = qtn_mainmenulist_test_cases;
+ },
+ LBUF
+ {
+ txt = qtn_mainmenulist_modules;
+ },
+ LBUF
+ {
+ txt = qtn_mainmenulist_test_sets;
+ }
+ };
+ }
+
+
+
+// TEST CASES MENU
+//-----------------------------------------------------------------------------
+//
+// r_appui_testcasemenuview
+// Test case menu view.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_appui_testcasemenuview
+ {
+ menubar=r_appui_menubar_testcasemenuview;
+ cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_menubar_testcasemenuview
+// Test case view menubar.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_appui_menubar_testcasemenuview
+ {
+ titles=
+ {
+ MENU_TITLE
+ {
+ menu_pane=r_appui_testcasemenuview_menu;
+ }
+ };
+
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_testcasemenuview_menu
+// Testcase view options menu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_appui_testcasemenuview_menu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command= EAknCmdOpen;
+ txt = "Open";
+ },
+ MENU_ITEM
+ {
+ command = EAknSoftkeyExit;
+ txt = "Exit";
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_testcase_menu_listbox
+// ListBox( Single )
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE LISTBOX r_testcase_menu_listbox
+ {
+ array_id = r_testcase_menu_items;
+ flags = EAknListBoxSelectionList;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_testcase_menu_items
+// Items array for Test Case Menu
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE ARRAY r_testcase_menu_items
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = qtn_testcasemenu_startcase; // "\tStart Case(s)";
+ },
+ LBUF
+ {
+ txt = qtn_testcasemenu_startedcases; // "\tStarted Cases";
+ }
+ };
+ }
+
+
+
+// START CASES
+//-----------------------------------------------------------------------------
+//
+// r_appui_startcasesview
+// Startcases view.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_appui_startcasesview
+ {
+ hotkeys=r_appui_hotkeys;
+ menubar=r_appui_menubar_startcasesview;
+ cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_menubar_startcasesview
+// Startcases view menubar.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_appui_menubar_startcasesview
+ {
+ titles=
+ {
+ MENU_TITLE
+ {
+ menu_pane=r_appui_startcasesview_menu;
+ //menu_pane=R_AVKON_MENUPANE_MARKABLE_LIST;
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_loadtestsetview_menu
+// loadtestset view options menu.
+//
+//-----------------------------------------------------------------------------
+RESOURCE MENU_PANE r_appui_loadtestsetview_menu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command=EAknCmdOpen;
+ txt = qtn_start;
+ },
+ MENU_ITEM
+ {
+ command=EEikCmdExit;
+ txt = qtn_exit;
+ }
+ };
+ }
+//-----------------------------------------------------------------------------
+//
+// r_appui_loadtestsetview
+// Started cases view.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_appui_loadtestsetview
+ {
+ //hotkeys=r_appui_hotkeys;
+ menubar=r_appui_menubar_startedcasesmenuview;
+ cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_menubar_startedcasesmenuview
+// Started cases menubar.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_appui_menubar_loadtestsetview
+ {
+ titles=
+ {
+ MENU_TITLE
+ {
+ menu_pane=r_appui_loadtestsetview_menu;
+ }
+ };
+
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_startcasesview_menu
+// Startcases view options menu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_appui_startcasesview_menu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command = ECmdFilterMenu;
+ txt = qtn_filter_menu;
+ cascade = r_appui_filtermenu;
+ },
+ /*
+ MENU_ITEM
+ {
+ command=ECmdFilterByModule;
+ txt = qtn_filter_by_modules;
+ cascade = r_appui_filterbymodules_menu;
+ },
+ MENU_ITEM
+ {
+ command=ECmdFilterByTestCaseFile;
+ txt = qtn_filter_by_test_case_file;
+ cascade = r_appui_filter_by_testcasefile_menu;
+ },
+ MENU_ITEM
+ {
+ command=ECmdNOFiltering;
+ txt = qtn_no_filtering;
+ },
+ */
+ MENU_ITEM
+ {
+ command=ECmdMarkMenu;
+ txt = qtn_markmenu_title;
+ cascade = r_appui_markunmark_menu;
+ },
+ MENU_ITEM
+ {
+ command=ECmdStartCases;
+ txt = qtn_start_test_cases;
+ },
+ MENU_ITEM
+ {
+ command=EEikCmdExit;
+ txt = qtn_exit;
+ }
+ };
+ }
+
+
+
+// STARTED CASES
+//-----------------------------------------------------------------------------
+//
+// r_appui_startedcasesmenuview
+// Started cases view.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_appui_startedcasesmenuview
+ {
+ //hotkeys=r_appui_hotkeys;
+ menubar=r_appui_menubar_startedcasesmenuview;
+ cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_menubar_startedcasesmenuview
+// Started cases menubar.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_appui_menubar_startedcasesmenuview
+ {
+ titles=
+ {
+ MENU_TITLE
+ {
+ menu_pane=r_appui_startedcasesmenuview_menu;
+ }
+ };
+
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_startedcasesmenuview_menu
+// Started cases view options menu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_appui_startedcasesmenuview_menu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command= EAknCmdOpen;
+ txt = "Open";
+ },
+ MENU_ITEM
+ {
+ command = EAknSoftkeyExit;
+ txt = "Exit";
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_started_cases_menu_listbox
+// ListBox( Single )
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE LISTBOX r_started_cases_menu_listbox
+ {
+ array_id = r_startedcases_menu_items;
+ flags = EAknListBoxSelectionList;
+ }
+
+
+
+//-----------------------------------------------------------------------------
+//
+// r_startedcases_menu_items
+// Items array for Test Case Menu
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE ARRAY r_startedcases_menu_items
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = qtn_startedcases_allcases;
+ },
+ LBUF
+ {
+ txt = qtn_startedcases_ongoing;
+ },
+ LBUF
+ {
+ txt = qtn_startedcases_paused;
+ },
+ LBUF
+ {
+ txt = qtn_startedcases_passed;
+ },
+ LBUF
+ {
+ txt = qtn_startedcases_failed;
+ },
+ LBUF
+ {
+ txt = qtn_startedcases_crashed_aborted;
+ },
+ LBUF
+ {
+ txt = qtn_startedcases_statistics;
+ }
+ };
+ }
+
+
+
+// SHOW STARTED CASES
+//-----------------------------------------------------------------------------
+//
+// r_appui_showstartedcasesview
+// Show started cases view.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_appui_showstartedcasesview
+ {
+ hotkeys=r_appui_hotkeys;
+ menubar=r_appui_menubar_showstartedcasesview;
+ cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_menubar_showstartedcasesview
+// Show started cases view menubar.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_appui_menubar_showstartedcasesview
+ {
+ titles=
+ {
+ MENU_TITLE
+ {
+ menu_pane=r_appui_showstartedcasesview_menu;
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_showstartedcasesview_menu
+// Show started cases view options menu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_appui_showstartedcasesview_menu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command=ECmdViewOutput;
+ txt = qtn_view_output;
+ },
+ MENU_ITEM
+ {
+ command = ECmdFilterMenu;
+ txt = qtn_filter_menu;
+ cascade = r_appui_filtermenu;
+ },
+ MENU_ITEM
+ {
+ command=ECmdShowSetMenu;
+ txt = qtn_testcase_control_menu;
+ cascade = r_testcase_control_submenu;
+ },
+ MENU_ITEM
+ {
+ command=EEikCmdExit;
+ txt = qtn_exit;
+ }
+
+ /*
+ MENU_ITEM
+ {
+ command=ECmdPauseTestCase;
+ txt = qtn_pause_testcase;
+ },
+ MENU_ITEM
+ {
+ command=ECmdResumeTestCase;
+ txt = qtn_resume_testcase;
+ },
+ MENU_ITEM
+ {
+ command=ECmdAbortTestCase;
+ txt = qtn_abort_testcase;
+ },
+ */
+
+ /*
+ MENU_ITEM
+ {
+ command=ECmdFilterByModule;
+ txt = qtn_filter_by_modules;
+ cascade = r_appui_filterbymodules_menu;
+ },
+ MENU_ITEM
+ {
+ command=ECmdFilterByTestCaseFile;
+ txt = qtn_filter_by_test_case_file;
+ cascade = r_appui_filter_by_testcasefile_menu;
+ },
+ MENU_ITEM
+ {
+ command=ECmdNOFiltering;
+ txt = qtn_no_filtering;
+ },
+ */
+
+ /*
+ MENU_ITEM
+ {
+ command=ECmdRemoveExecution;
+ txt = qtn_remove_execution;
+ },
+ MENU_ITEM
+ {
+ command=ECmdRemoveAllExecutions;
+ txt = qtn_remove_all_executions;
+ },
+ */
+
+ };
+ }
+
+
+// STATISTICS VIEW
+//-----------------------------------------------------------------------------
+//
+// r_appui_statisticsview
+// Statistics view.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_appui_statisticsview
+ {
+ menubar= r_appui_menubar_statisticsview;
+ cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_menubar_statisticsview
+// Statistics view menubar.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_appui_menubar_statisticsview
+ {
+ titles=
+ {
+ MENU_TITLE
+ {
+ menu_pane=r_appui_statisticsview_menu;
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_statisticsview_menu
+// Statistics view options menu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_appui_statisticsview_menu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command=ECmdFilterByModule;
+ txt = qtn_filter_by_modules;
+ cascade = r_appui_filterbymodules_menu;
+ },
+ MENU_ITEM
+ {
+ command=ECmdFilterByTestCaseFile;
+ txt = qtn_filter_by_test_case_file;
+ cascade = r_appui_filter_by_testcasefile_menu;
+ },
+ MENU_ITEM
+ {
+ command=ECmdNOFiltering;
+ txt = qtn_no_filtering;
+ },
+
+ MENU_ITEM
+ {
+ command=EEikCmdExit;
+ txt = qtn_exit;
+ }
+ };
+ }
+
+
+// TESTCASE OUTPUT VIEW
+//-----------------------------------------------------------------------------
+//
+// r_appui_testcaseoutputview
+// Testcase output view.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_appui_testcaseoutputview
+ {
+ hotkeys=r_appui_hotkeys;
+ menubar=r_appui_menubar_testcaseoutputview;
+ cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_menubar_testcaseoutputview
+// Testcase output view menub bar.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_appui_menubar_testcaseoutputview
+ {
+ titles=
+ {
+ MENU_TITLE
+ {
+ menu_pane=r_appui_testcaseoutputview_menu;
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_testcaseoutputview_menu
+// Testcase output view options menu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_appui_testcaseoutputview_menu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command=ECmdPauseTestCase;
+ txt = qtn_pause_testcase;
+ },
+ MENU_ITEM
+ {
+ command=ECmdResumeTestCase;
+ txt = qtn_resume_testcase;
+ },
+ MENU_ITEM
+ {
+ command=ECmdAbortTestCase;
+ txt = qtn_abort_testcase;
+ },
+ MENU_ITEM
+ {
+ command=EEikCmdExit;
+ txt = qtn_exit;
+ }
+ };
+ }
+
+
+
+// MODULES MENU
+//-----------------------------------------------------------------------------
+//
+// r_appui_testmodulesmenuview
+// Test modules menu view.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_appui_testmodulesmenuview
+ {
+ hotkeys=r_appui_hotkeys;
+ menubar=r_appui_menubar_testmodulesmenuview;
+ cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_menubar_testmodulesmenuview
+// Test modules view menubar.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_appui_menubar_testmodulesmenuview
+ {
+ titles=
+ {
+ MENU_TITLE
+ {
+ menu_pane=r_appui_testmodulesmenuview_menu;
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_testmodulesmenuview_menu
+// Testmodules view options menu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_appui_testmodulesmenuview_menu
+ {
+ items=
+ {
+ // MENU_ITEM
+ // {
+ // command=ECmdOpenModule;
+ // txt = qtn_open_module;
+ // },
+ MENU_ITEM
+ {
+ command=ECmdAddModule;
+ txt = qtn_add_module;
+ },
+ MENU_ITEM
+ {
+ command=ECmdRemoveModule;
+ txt = qtn_remove_module;
+ },
+ MENU_ITEM
+ {
+ command=EAknCmdExit;
+ txt = qtn_exit;
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+// r_testmodules_menu_listbox
+// ListBox( Single )
+//
+//-----------------------------------------------------------------------------
+//
+/*
+RESOURCE LISTBOX r_testmodules_menu_listbox
+ {
+ array_id = r_testmodules_menu_items;
+ flags = EAknListBoxSelectionList;
+ }
+*/
+
+//-----------------------------------------------------------------------------
+// r_testmodules_menu_items
+// Items array for Test Case Menu
+//
+//-----------------------------------------------------------------------------
+//
+/*
+RESOURCE ARRAY r_testmodules_menu_items
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = "\tModule1";
+ },
+ LBUF
+ {
+ txt = "\tModule2";
+ }
+ };
+ }
+*/
+
+
+// TEST SET BASE
+//-----------------------------------------------------------------------------
+//
+// r_appui_testsetbasemenuview
+// Testset base menu view.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_appui_testsetbasemenuview
+ {
+ menubar=r_appui_menubar_testsetbasemenuview;
+ cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_menubar_testsetbasemenuview
+// Testset base menu view menubar.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_appui_menubar_testsetbasemenuview
+ {
+ titles=
+ {
+ MENU_TITLE
+ {
+ menu_pane=r_appui_testsetbasemenuview_menu;
+ }
+ };
+
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_testsetbasemenuview_menu
+// Testset base menu view options menu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_appui_testsetbasemenuview_menu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command= ECmdCreateTestSet;
+ txt = "Create test set";
+ },
+ MENU_ITEM
+ {
+ command= ECmdLoadTestSet;
+ txt = "Load test set";
+ },
+ MENU_ITEM
+ {
+ command = EAknSoftkeyExit;
+ txt = "Exit";
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_testsetbase_menu_listbox
+// ListBox( Single )
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE LISTBOX r_testsetbase_menu_listbox
+ {
+ array_id = r_testsetbase_menu_items;
+ flags = EAknListBoxSelectionList;
+ }
+
+
+
+//-----------------------------------------------------------------------------
+//
+// r_testsetbase_menu_items
+// Items array for Test Sets Base Menu
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE ARRAY r_testsetbase_menu_items
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = qtn_testsetbasemenu_createtestset;
+ },
+ LBUF
+ {
+ txt = qtn_testsetbasemenu_loadtestset;
+ }
+ };
+ }
+
+
+// TESTSET MENU
+//-----------------------------------------------------------------------------
+//
+// r_appui_testsetmenuview
+// Test set menu view.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_appui_testsetmenuview
+ {
+ menubar=r_appui_menubar_testsetmenuview;
+ cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_menubar_testsetmenuview
+// Test set menu view menubar.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_appui_menubar_testsetmenuview
+ {
+ titles=
+ {
+ MENU_TITLE
+ {
+ menu_pane=r_appui_testsetmenuview_menu;
+ }
+ };
+
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_testsetmenuview_menu
+// Test set menu view options menu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_appui_testsetmenuview_menu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command= ECmdStartTestSet;
+ txt = "Start testing";
+ },
+ MENU_ITEM
+ {
+ command= ECmdShowStartedTestSet;
+ txt = "View started cases";
+ },
+ MENU_ITEM
+ {
+ command= ECmdSaveTestSet;
+ txt = "Save test set";
+ },
+ MENU_ITEM
+ {
+ command= ECmdInsertTestCases;
+ txt = "Insert test case(s)";
+ },
+ MENU_ITEM
+ {
+ command= ECmdRemoveTestCases;
+ txt = "Remove test case";
+ },
+ MENU_ITEM
+ {
+ command = EAknSoftkeyExit;
+ txt = "Exit";
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_testset_menu_listbox
+// ListBox( Single )
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE LISTBOX r_testset_menu_listbox
+ {
+ array_id = r_testset_menu_items;
+ flags = EAknListBoxSelectionList;
+ }
+
+
+
+//-----------------------------------------------------------------------------
+//
+// r_testset_menu_items
+// Items array for Test Sets Menu
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE ARRAY r_testset_menu_items
+ {
+ items =
+ {
+ LBUF
+ {
+ txt = "";
+ }
+ };
+ }
+
+
+// TESTSET STARTED CASES
+//-----------------------------------------------------------------------------
+//
+// r_test_set_startedcasesview
+// Test set started cases view.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_testset_startedcasesview
+ {
+ //hotkeys=r_appui_hotkeys;
+ menubar=r_testset_menubar_startedcasesview;
+ cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_test_set_menubar_startedcasesview
+// Test set started cases view menubar.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_testset_menubar_startedcasesview
+ {
+ titles=
+ {
+ MENU_TITLE
+ {
+ menu_pane=r_testset_startedcasesview_menu;
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_testset_startedcasesview_menu
+// Test set started cases view options menu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_testset_startedcasesview_menu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ txt = qtn_testset_started_menu;
+ cascade = r_testset_startedcases_submenu;
+ },
+ MENU_ITEM
+ {
+ command=ECmdViewOutput;
+ txt = qtn_view_output;
+ },
+ MENU_ITEM
+ {
+ command=ECmdShowSetMenu;
+ txt = qtn_testcase_control_menu;
+ cascade = r_testcase_control_submenu;
+ },
+ MENU_ITEM
+ {
+ command=EEikCmdExit;
+ txt = qtn_exit;
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_testset_startedcases_submenu
+// Test set started cases view sub menu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_testset_startedcases_submenu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command = ECmdShowAllStartedCases;
+ txt = qtn_testset_started_allcases;
+ },
+ MENU_ITEM
+ {
+ command = ECmdShowOngoingCases;
+ txt = qtn_testset_started_ongoing;
+ },
+ MENU_ITEM
+ {
+ command = ECmdShowPausedCases;
+ txt = qtn_testset_started_paused;
+ },
+ MENU_ITEM
+ {
+ command = ECmdShowPassedCases;
+ txt = qtn_testset_started_passed;
+ },
+ MENU_ITEM
+ {
+ command = ECmdShowFailedCases;
+ txt = qtn_testset_started_failed;
+ },
+ MENU_ITEM
+ {
+ command = ECmdShowCrashedAbortedCases;
+ txt = qtn_testset_started_crashed_aborted;
+ }
+ };
+ }
+
+
+// TESTSET INSERT CASES
+//-----------------------------------------------------------------------------
+//
+// r_insert_testcases_view
+// Insert test cases view.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_insert_testcases_view
+ {
+ //hotkeys=r_appui_hotkeys;
+ menubar=r_insert_testcases_menubar;
+ cba=R_AVKON_SOFTKEYS_OPTIONS_CANCEL;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_insert_testcases_menubar
+// Insert test cases view menubar.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_insert_testcases_menubar
+ {
+ titles=
+ {
+ MENU_TITLE
+ {
+ menu_pane=r_insert_testcases_menu;
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_insert_testcases_menu
+// Insert test cases view options menu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_insert_testcases_menu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command=ECmdInsertSelectedCases;
+ txt = qtn_testsetinsert_add_selected;
+ },
+ MENU_ITEM
+ {
+ command = ECmdFilterMenu;
+ txt = qtn_filter_menu;
+ cascade = r_appui_filtermenu;
+ },
+ MENU_ITEM
+ {
+ command=ECmdMarkMenu;
+ txt = qtn_markmenu_title;
+ cascade = r_appui_markunmark_menu;
+ },
+ MENU_ITEM
+ {
+ command=EEikCmdExit;
+ txt = qtn_exit;
+ }
+ };
+ }
+
+
+
+// GENERAL
+// MARKMENU
+//-----------------------------------------------------------------------------
+//
+// r_appui_markunmark_menu
+// Submenu for marking items.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_appui_markunmark_menu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command=EAknCmdMark;
+ txt = qtn_markmenu_mark;
+ },
+ MENU_ITEM
+ {
+ command=EAknCmdUnmark;
+ txt = qtn_markmenu_unmark;
+ },
+ MENU_ITEM
+ {
+ command=EAknMarkAll;
+ txt = qtn_markmenu_markall;
+ },
+ MENU_ITEM
+ {
+ command=EAknUnmarkAll;
+ txt = qtn_markmenu_unmarkall;
+ }
+ };
+ }
+
+// TEST CASE CONTROL
+//-----------------------------------------------------------------------------
+//
+// r_testset_stertedcases_setmenu
+// Test set started cases view set menu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_testcase_control_submenu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command=ECmdPauseTestCase;
+ txt = qtn_pause_testcase;
+ },
+ MENU_ITEM
+ {
+ command=ECmdResumeTestCase;
+ txt = qtn_resume_testcase;
+ },
+ MENU_ITEM
+ {
+ command=ECmdAbortTestCase;
+ txt = qtn_abort_testcase;
+ }
+ };
+ }
+
+// FILTERING
+//-----------------------------------------------------------------------------
+//
+// r_appui_filtermenu
+// MenuPane for Filter submenu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_appui_filtermenu
+ {
+ items=
+ {
+ MENU_ITEM
+ {
+ command=ECmdFilterByModule;
+ txt = qtn_filter_by_modules;
+ cascade = r_appui_filterbymodules_menu;
+ },
+ MENU_ITEM
+ {
+ command=ECmdFilterByTestCaseFile;
+ txt = qtn_filter_by_test_case_file;
+ cascade = r_appui_filter_by_testcasefile_menu;
+ },
+ MENU_ITEM
+ {
+ command=ECmdNOFiltering;
+ txt = qtn_no_filtering;
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_filterbymodules_menu
+// MenuPane for Filter submenu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_appui_filterbymodules_menu
+ {
+ items=
+ {
+ // items (modules) are added dynamically when
+ // Filter by module submenu is opened
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_appui_filter_by_testcasefile_menu
+// MenuPane for Filter submenu.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_appui_filter_by_testcasefile_menu
+ {
+ items=
+ {
+ // Items (testcase files are added dynamically when
+ // Filter by testcase file menu is opened
+ };
+ }
+
+
+// DIALOGS
+// START TEST CASES
+//-----------------------------------------------------------------------------
+//
+// r_start_testcase_list_query
+// Query dialog for starting single test case.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_LIST_QUERY r_start_testcase_list_query
+ {
+ flags = EGeneralQueryFlags;
+ softkeys = R_AVKON_SOFTKEYS_OK_CANCEL;
+ items =
+ {
+ DLG_LINE //AVKON_LIST_QUERY_DLG_LINE
+ {
+ type = EAknCtListQueryControl;
+ id = EListQueryControl;
+ control = AVKON_LIST_QUERY_CONTROL
+ {
+ listtype = EAknCtSinglePopupMenuListBox;
+ listbox = LISTBOX //AVKON_LIST_QUERY_LIST
+ {
+ flags = EAknListBoxMenuList;
+ height = 3;
+ width = 3;
+ array_id = r_start_testcase_listbox_item_array;
+ };
+ heading = qtn_starting_test_case;
+ };
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_start_testcase_listbox_item_array
+// Listbox items in query dialog for starting single test case.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE ARRAY r_start_testcase_listbox_item_array
+ {
+ items =
+ {
+ LBUF { txt = qtn_start_test; },
+ LBUF { txt = qtn_start_test_output; }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_start_multiple_testcases_list_query
+// Query dialog for starting multiple test cases.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE AVKON_LIST_QUERY r_start_multiple_testcases_list_query
+ {
+ flags = EGeneralQueryFlags;
+ softkeys = R_AVKON_SOFTKEYS_OK_CANCEL;
+ items =
+ {
+ DLG_LINE //AVKON_LIST_QUERY_DLG_LINE
+ {
+ type = EAknCtListQueryControl;
+ id = EListQueryControl;
+ control = AVKON_LIST_QUERY_CONTROL
+ {
+ listtype = EAknCtSinglePopupMenuListBox;
+ listbox = LISTBOX //AVKON_LIST_QUERY_LIST
+ {
+ flags = EAknListBoxMenuList;
+ height = 3;
+ width = 3;
+ array_id = r_start_multiple_testcases_listbox_item_array;
+ };
+ heading = qtn_starting_test_cases;
+ };
+ }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_start_multiple_testcases_listbox_item_array
+// Listbox items in query dialog for starting single test case.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE ARRAY r_start_multiple_testcases_listbox_item_array
+ {
+ items =
+ {
+ LBUF { txt = qtn_start_tests_parallel; },
+ LBUF { txt = qtn_start_tests_serial; }
+ };
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_general_confirmation_dialog
+// General confirmation dialog with empty label.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_general_confirmation_dialog
+ {
+ flags = EGeneralQueryFlags;
+ buttons = R_AVKON_SOFTKEYS_YES_NO;
+ items =
+ {
+ DLG_LINE
+ {
+ type = EAknCtQuery;
+ id = EGeneralQuery;
+ control = AVKON_CONFIRMATION_QUERY
+ {
+ layout = EConfirmationQueryLayout;
+ label = "";
+ };
+ }
+ };
+
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_stifui_about_dialog
+// "About" dialog
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_stifui_about_dialog
+{
+ flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
+ buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
+ items=
+ {
+ DLG_LINE
+ {
+ type = EAknCtPopupHeadingPane;
+ id = EAknMessageQueryHeaderId;
+ control = AVKON_HEADING
+ {
+ label = "About STIF";
+ headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE;
+ };
+ },
+ DLG_LINE
+ {
+ type = EAknCtMessageQuery;
+ id = EAknMessageQueryContentId;
+ control = AVKON_MESSAGE_QUERY
+ {
+
+ };
+ }
+ };
+}
+
+//-----------------------------------------------------------------------------
+//
+// r_memory_selection_dialog
+// Selection dialog for selectiong either C or E drive.
+// Not yet used.
+//
+//-----------------------------------------------------------------------------
+//
+/*
+RESOURCE MEMORYSELECTIONDIALOG r_memory_selection_dialog
+ {
+ title = "Choose memory:";
+ softkey_1 = "Ok";
+ softkey_2 = "Cancel";
+ locations =
+ {
+ LOCATION { root_path = "C:\\"; },
+ LOCATION { root_path = "E:\\"; //default_folder = "TestFramework\\";
+ }
+ };
+ }
+*/
+
+//-----------------------------------------------------------------------------
+//
+// r_file_selection_dialog
+// Fileselection dialog.
+// Not yet used.
+//
+//-----------------------------------------------------------------------------
+//
+/*
+RESOURCE FILESELECTIONDIALOG r_file_selection_dialog
+ {
+ title = "Select-a-file:";
+ root_path = "C:\\";
+ filters =
+ {
+ FILTER
+ {
+ filter_type = EAttributeFilter; //EAttributeFilter;
+ filter_style = EExclusiveFilter; //EExclusiveFilter;
+ filter_data =
+ {
+ "SH",
+ "R"
+ }; // Excludes system, hidden and read-only attributes
+ }
+ };
+ }
+*/
+
+
+// APPLICATION NAVIPANEL TITLES
+//-----------------------------------------------------------------------------
+//
+// r_navititle_main
+// Main menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_main
+ {
+ txt = qtn_navi_main;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_testcases
+// Test cases menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_testcases
+ {
+ txt = qtn_navi_testcases;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_startcases
+// Startcases menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_startcases
+ {
+ txt = qtn_navi_startcases;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_loadtestset
+// Startcases menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_loadtestset
+ {
+ txt = qtn_navi_load_test_set;
+ }
+
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_startedcases
+// Started cases menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_startedcases
+ {
+ txt = qtn_navi_startedcases;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_testcase_output
+// Test case output view title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_testcase_output
+ {
+ txt = qtn_navi_testcase_output;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_modules
+// Modules menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_modules
+ {
+ txt = qtn_navi_modules;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_testset_base
+// Testset base menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_testset_base
+ {
+ txt = qtn_navi_testset_base;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_testset
+// Testset menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_testset
+ {
+ txt = qtn_navi_testset;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_testset_insert
+// Testset insert menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_testset_insert
+ {
+ txt = qtn_navi_testset_insert;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_started
+// Started cases view menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_started
+ {
+ txt = qtn_navi_started;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_started_all
+// All started cases view menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_started_all
+ {
+ txt = qtn_navi_started_all;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_started_ongoing
+// Ongoing cases view menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_started_ongoing
+ {
+ txt = qtn_navi_started_ongoing;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_started_paused
+// Paused cases view menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_started_paused
+ {
+ txt = qtn_navi_started_paused;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_started_passed
+// Passed cases view menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_started_passed
+ {
+ txt = qtn_navi_started_passed;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_started_failed
+// Failed cases view menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_started_failed
+ {
+ txt = qtn_navi_started_failed;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_started_crashed_aborted
+// Crashed cases view menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_started_crashed_aborted
+ {
+ txt = qtn_navi_started_crashed_aborted;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_navititle_started_stats
+// Statistics view menu title.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE NAVI_LABEL r_navititle_started_stats
+ {
+ txt = qtn_navi_started_stats;
+ }
+
+
+// RESOURCE TEXTS
+//-----------------------------------------------------------------------------
+//
+// r_insert_confirmation_question
+// Insert test cases confirmation query text.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE STRING r_insert_confirmation_question
+ {
+ text = qtn_insert_confirmation;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_insert_nocases_text
+// Infomsg text to inform user that there´s no test cases selected when
+// trying to insert test cases.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE STRING r_insert_nocases_text
+ {
+ text = qtn_insert_none_selected;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_insert_confirmation_question
+// Overwrite existing test set confirmation query text.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE STRING r_overwrite_testset_question
+ {
+ text = qtn_owerwrite_testset_confirmation;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_insert_confirmation_question
+// Save test set confirmation query text.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE STRING r_save_testset_question
+ {
+ text = qtn_save_testset_confirmation;
+ }
+
+//-----------------------------------------------------------------------------
+//
+// r_insert_confirmation_question
+// Loading test set failed text.
+//
+//-----------------------------------------------------------------------------
+//
+RESOURCE STRING r_load_testset_failed
+ {
+ text = qtn_load_testset_errornote;
+ }
+
+
+// TEST CASE STATES
+RESOURCE STRING r_testcase_state_running
+ {
+ text = qtn_testcase_state_running;
+ }
+
+RESOURCE STRING r_testcase_state_passed
+ {
+ text = qtn_testcase_state_passed;
+ }
+
+RESOURCE STRING r_testcase_state_failed
+ {
+ text = qtn_testcase_state_failed;
+ }
+
+RESOURCE STRING r_testcase_state_crashed_aborted
+ {
+ text = qtn_testcase_state_crashed_aborted;
+ }
+
+RESOURCE STRING r_testcase_state_unknown
+ {
+ text = qtn_testcase_state_unknown;
+ }
+
+RESOURCE LOCALISABLE_APP_INFO r_stifui_localisable_app_info
+ {
+ short_caption = qtn_app_short_caption_string;
+ caption_and_icon =
+ CAPTION_AND_ICON_INFO
+ {
+ caption = qtn_app_caption_string;
+ };
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/data/Stifui_reg.rss Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file defines StifUI resources.
+*
+*/
+
+#include <Stifui.rsg>
+#include <appinfo.rh>
+#if defined (__S60_)
+ #include <data_caging_paths_strings.hrh>
+#endif
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x1028311D
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file = "Stifui";
+ localisable_resource_file = APP_RESOURCE_DIR"\\Stifui";
+ localisable_resource_id = R_STIFUI_LOCALISABLE_APP_INFO;
+ group_name = "RnD Tools";
+ }
+
+// End of File
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/group/Stifui.mmp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,123 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: STIFUI MMP file.
+*
+*/
+
+#include <platform_paths.hrh>
+
+SMPSAFE
+
+TARGET Stifui.exe
+TARGETTYPE exe
+UID 0x100039ce 0x1028311D
+VENDORID 0x101FB657
+SECUREID 0x102073DC
+CAPABILITY AllFiles SwEvent CommDD
+
+START RESOURCE ../data/Stifui.rss
+ HEADER
+ TARGETPATH resource/apps
+END
+
+SOURCEPATH ../data
+START RESOURCE ./Stifui_reg.rss
+ DEPENDS stifui.rsg
+ TARGETPATH /private/10003a3f/apps
+END
+
+SOURCEPATH ../src
+
+
+SOURCE AppUIApp.cpp
+SOURCE AppUIAppUi.cpp
+SOURCE AppUIDocument.cpp
+SOURCE View.cpp
+SOURCE Container.cpp
+SOURCE UIStoreHandler.cpp
+
+SOURCE MainMenuView.cpp
+SOURCE MainMenuContainer.cpp
+
+SOURCE TestCaseMenuView.cpp
+SOURCE TestCaseMenuContainer.cpp
+
+SOURCE StartCasesView.cpp
+SOURCE StartCasesContainer.cpp
+
+SOURCE StartedCasesMenuView.cpp
+SOURCE StartedCasesMenuContainer.cpp
+
+SOURCE ShowStartedCasesView.cpp
+SOURCE ShowStartedCasesContainer.cpp
+
+SOURCE TestCaseOutputView.cpp
+SOURCE TestCaseOutputContainer.cpp
+
+SOURCE Testmodulesmenuview.cpp
+SOURCE TestModulesMenuContainer.cpp
+
+SOURCE StatisticsView.cpp
+SOURCE StatisticsContainer.cpp
+
+SOURCE TestSetBaseMenuView.cpp
+SOURCE TestSetBaseMenuContainer.cpp
+
+SOURCE TestSetMenuView.cpp
+SOURCE TestSetMenuContainer.cpp
+
+SOURCE TestSetInsertMenuView.cpp
+SOURCE TestSetInsertMenuContainer.cpp
+
+SOURCE TestSetStartedCasesView.cpp
+SOURCE TestSetStartedCasesContainer.cpp
+
+//SOURCE MenuListBox.cpp
+
+SOURCE MenuListBox.cpp CreatedTestSetMenuContainer.cpp CreatedTestSetMenuView.cpp
+
+USERINCLUDE ../inc
+
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY euser.lib
+LIBRARY apparc.lib
+LIBRARY cone.lib
+LIBRARY eikcore.lib
+
+LIBRARY eikcoctl.lib
+LIBRARY avkon.lib
+
+LIBRARY stiftestengine.lib
+LIBRARY stiftestinterface.lib
+LIBRARY bafl.lib
+LIBRARY eikctl.lib // For adding icons
+LIBRARY StifTFwIf.lib
+LIBRARY efsrv.lib
+
+LIBRARY egul.lib
+LIBRARY aknskins.lib
+LIBRARY aknicon.lib
+
+START WINS
+// ?wins_specific_information
+END
+
+START MARM
+// ?marm_specific_information
+END
+
+EPOCHEAPSIZE 0x10000 0x500000
+EPOCSTACKSIZE 32768
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/group/bld.inf Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: bld.inf build information for STIF UI.
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+// Specify the platforms your component needs to be built for here.
+// ARM4 not supported in SDK
+
+ DEFAULT
+
+
+PRJ_EXPORTS
+// None
+
+PRJ_TESTEXPORTS
+// None
+
+PRJ_MMPFILES
+
+ Stifui.mmp
+
+PRJ_TESTMMPFILES
+// None
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/AppUIApp.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CAppUIApp class declaration.
+*
+*/
+
+#ifndef APPUIAPP_H
+#define APPUIAPP_H
+
+// INCLUDES
+#include <aknapp.h>
+
+// CONSTANTS
+// UID of the application
+const TUid KUidAppUI = { 0x1028311D };
+
+// CLASS DECLARATION
+
+/**
+* CAppUIApp application class.
+* Provides factory to create concrete document object.
+*
+*/
+class CAppUIApp : public CAknApplication
+ {
+
+ public: // Functions from base classes
+ private:
+
+ /**
+ * From CApaApplication, creates CAppUIDocument document object.
+ * @return A pointer to the created document object.
+ */
+ CApaDocument* CreateDocumentL();
+
+ /**
+ * From CApaApplication, returns application's UID (KUidAppUI).
+ * @return The value of KUidAppUI.
+ */
+ TUid AppDllUid() const;
+ };
+
+#endif
+
+// End of File
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/AppUIAppUi.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,222 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CAppUIAppUi class declaration.
+*
+*/
+
+#ifndef APPUIAPPUI_H
+#define APPUIAPPUI_H
+
+// INCLUDES
+#include <eikapp.h>
+#include <e32std.h>
+#include <aknViewAppUi.h>
+#include <akntabgrp.h>
+#include <aknnavide.h>
+#include <StifLogger.h>
+#include "Stifui.hrh"
+
+//#include "UIStoreIf.h"
+//#include "UIStore.h"
+//#include "UIEngine.h"
+//#include "SettingServerClient.h"
+
+#include <stifinternal/UIStoreIf.h>
+#include <stifinternal/UIStore.h>
+#include <stifinternal/UIEngine.h>
+#include <SettingServerClient.h>
+
+#include "UIStoreHandler.h"
+
+
+// FORWARD DECLARATIONS
+class CAppUIContainer;
+class CUIStoreHandler;
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+_LIT( KDefaultPathAndIni, "C:\\TestFramework\\TestFramework.ini" );
+
+// CLASS DECLARATION
+
+
+/**
+ * Class contains static methods for calling different
+ * types of message dialog boxes.
+ */
+class TMessageBoxUtil
+ {
+ public:
+
+ /**
+ * Display message that executed funtion is not implemented yet.
+ */
+ static void ShowNotImplementedYetL();
+
+ /**
+ * Display error note.
+ * @param aMessage Error message to display.
+ */
+ static void ShowErrorNoteL( const TDesC& aMessage );
+ };
+
+
+/**
+* Application UI class.
+* Provides support for the following features:
+* - EIKON control architecture
+* - view architecture
+* - status pane
+*
+*/
+class CAppUIAppUi : public CAknViewAppUi
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CAppUIAppUi();
+
+ public: // New functions
+
+ /**
+ * Returns pointer to UIStoreHandler object,
+ * which handles test cases and test modules.
+ * @return UIStoreHandler to CData object
+ */
+ CUIStore* UIStoreHandler();
+
+ /**
+ * Shows outputs of the test case.
+ * @param aTestCase Pointer to started test case.
+ */
+ void ShowTestCaseOutput(CStartedTestCase* aTestCase);
+
+ /**
+ * Receives output update notification from CData.
+ * @param aTestCase Pointer to started test case.
+ * @param aStatus Status.
+ */
+ void OutputUpdateL( CStartedTestCase* aTestCase, TInt aStatus );
+
+ /**
+ * Sets pointer to selected test case for viewing output.
+ * @param aStartedCase Pointer to started test case.
+ */
+ void SetStartedTestCase( CStartedTestCase* aStartedCase );
+
+ /**
+ * Returns pointer to started test case for viewing output.
+ * @return Poiner to started test case.
+ */
+ CStartedTestCase* GetStartedTestCase( );
+
+ /**
+ * Saves position of focus of any specific view
+ * @param aViewId ID of view under which the position will be stored
+ * @param aPosition is a number to be stored
+ */
+ void SaveFocusPosition(TAppUIViewNumber aViewId, TInt aPosition);
+
+ /**
+ * Used to retrieve previous focus position in a specific view
+ * @param aViewId - ID of view that the position should be retrieved for
+ * @return the previous focus position
+ */
+ TInt GetFocusPosition(TAppUIViewNumber aViewId);
+
+
+ public: // Functions from base classes
+
+ private:
+ /**
+ * Initializes menu pane.
+ * @param aResourceId Menu pane resource ID.
+ * @param aMenuPane Menu pane pointer.
+ */
+ void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
+
+ private:
+ /**
+ * From CEikAppUi, takes care of command handling.
+ * @param aCommand command to be handled
+ */
+ void HandleCommandL(TInt aCommand);
+
+ /**
+ * From CEikAppUi, handles key events.
+ * @param aKeyEvent Event to handled.
+ * @param aType Type of the key event.
+ * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed).
+ */
+ virtual TKeyResponse HandleKeyEventL(
+ const TKeyEvent& aKeyEvent,TEventCode aType);
+
+ private: //Data
+ CUIStoreHandler* iUIStoreHandler;
+ CStartedTestCase* iStartedTestCase;
+ TInt iPreviousView; // For Back function
+
+ RArray<TInt> iPreviousFocusPosition;
+ // used to store positions in different views
+
+ TBool iPreviousPositionListValid;
+ // used to mark validity of iPreviousFocusPosition array
+
+ public: //Data
+
+ /**
+ * Pointer to logger.
+ */
+ CStifLogger* iLogger;
+
+ /**
+ * Mode of view started cases.
+ */
+ TInt /*enum TShowStartedCasesMode*/ iShowStartedCasesMode;
+
+ /**
+ * Index of started test set.
+ */
+ TInt iStartedTestSet;
+
+ /**
+ * Handle to Setting server.
+ */
+ RSettingServer iSettingServer;
+
+ public: // Friend classes
+
+ protected: // Friend classes
+
+ private: // Friend classes
+
+ // For iExecutedTestCaseCount moving
+ friend class CStartCasesView;
+ friend class CStatisticsView;
+ friend class CTestCaseOutputView;
+ friend class CTestSetInsertMenuView;
+ friend class CTestSetMenuView;
+
+ };
+
+#endif
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/AppUIDocument.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CAppUIDocument class declaration.
+*
+*/
+
+#ifndef APPUIDOCUMENT_H
+#define APPUIDOCUMENT_H
+
+// INCLUDES
+#include <AknDoc.h>
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class CEikAppUi;
+
+// CLASS DECLARATION
+
+/**
+* CAppUIDocument application class.
+*/
+class CAppUIDocument : public CAknDocument
+ {
+ public: // Constructors and destructor
+ /**
+ * Two-phased constructor.
+ */
+ static CAppUIDocument* NewL(CEikApplication& aApp);
+
+ /**
+ * Destructor.
+ */
+ virtual ~CAppUIDocument();
+
+ public: // New functions
+
+ protected: // New functions
+
+ protected: // Functions from base classes
+
+ private:
+
+ /**
+ * Symbian OS default constructor.
+ */
+ CAppUIDocument(CEikApplication& aApp);
+ void ConstructL();
+
+ private:
+
+ /**
+ * From CEikDocument, create CAppUIAppUi "App UI" object.
+ */
+ CEikAppUi* CreateAppUiL();
+ };
+
+#endif
+
+// End of File
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/Container.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,263 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestCaseListBoxModel class
+* declaration
+*
+*/
+
+#ifndef CCONTAINER_H
+#define CCONTAINER_H
+
+#include <e32std.h>
+// Define *.mbm file name.
+_LIT(KListMbmFileName, "\\Resource\\Apps\\Stifui.mbm");
+
+// INCLUDES
+#include "View.h"
+
+#include <coecntrl.h>
+#include <eiklbo.h> // MEikListBoxObserver
+#include <bamdesca.h> // MDesCArray
+#include <aknsfld.h>
+
+//#include "RRefArray.h"
+//#include "UIEngine.h"
+//#include "UIStoreIf.h"
+//#include "UIStoreContainer.h"
+
+#include <stifinternal/RRefArray.h>
+#include <stifinternal/UIEngine.h>
+#include <stifinternal/UIStoreIf.h>
+#include <stifinternal/UIStoreContainer.h>
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+class CDesC16Array;
+
+//class CTestSetInsertMenuView;
+class CEikColumnListBox;
+class CStartedTestCase;
+
+class CUIStoreHandler;
+class CUIStore;
+class CUIStoreIf;
+class CUIEngineContainer;
+class CUIEngine;
+
+// CLASS DECLARATION
+
+class CTestCaseListBoxModel : public CBase, public MDesCArray
+ {
+ public:
+ /**
+ * Destructor.
+ */
+ ~CTestCaseListBoxModel();
+
+ /**
+ * Two-phased constructor.
+ * @param aTestCasesInView Array of test cases in view.
+ * @return Pointer to created list box model.
+ */
+ static CTestCaseListBoxModel* NewL(
+ RPointerArray<CTestInfo>* aTestCasesInView);
+
+ public: // Functions from base classes
+
+ /**
+ * Returns the number of descriptor elements in the array.
+ * @return The number of descriptor elements.
+ */
+ virtual TInt MdcaCount() const;
+
+ /**
+ * Indexes into a descriptor array.
+ * @param aIndex The position of the descriptor element within the
+ * array. The position is relative to zero; i.e. zero
+ * implies the first descriptor element in the array.
+ * This value must be non-negative and less than the
+ * number of descriptors currently within the array
+ * otherwise the operator panics with
+ * EArrayIndexOutOfRange.
+ * @return A non-modifiable pointer descriptor representing the
+ * descriptor element located at position aIndex within
+ * the array.
+ */
+ virtual TPtrC MdcaPoint(TInt aIndex) const;
+
+ protected:
+ /**
+ * Symbian OS two phased constructor.
+ * Completes the construction of the object.
+ */
+ void ConstructL();
+
+ protected: //data
+ RPointerArray<CTestInfo>* iTestCasesInView;
+ HBufC* iBuffer;
+
+ private: //data
+
+ };
+
+/**
+* CContainer container control class.
+*
+*/
+class CContainer : public CCoeControl
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ * @param aRect Frame rectangle for container.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CContainer();
+
+ public: // New functions
+
+ /**
+ * Show only testcases which are defined is specified module.
+ * @param aModuleName Module which test cases are shown.
+ */
+ virtual void FilterCasesByModuleL(TName aModuleName);
+
+ /**
+ * Show only testcases which are defined in specified test case file.
+ * @param aTestCaseFileName Test cases file name.
+ */
+ virtual void FilterCasesByTCFileNameL(TFileName aTestCaseFileName);
+
+ /**
+ * Remove possible filtering of test cases -> show all test cases.
+ */
+ virtual void NoFilteringL();
+
+ /**
+ * Returns pointers to selected test cases.
+ * @param aSelectedTestCases Currently selected test case.
+ */
+ virtual void SelectedTestCases(RPointerArray<CTestInfo>& aSelectedTestCases);
+
+ /**
+ * Sets graphic icon using listbox as CEikColumnListBox.
+ * @param aListBox Pointer to list box.
+ */
+ virtual void SetGraphicIconL( CEikColumnListBox* aListBox );
+
+ /**
+ * Appends graphics data.
+ * @param aIcons Pointer array of icons.
+ */
+ virtual void GraphicIconL( CArrayPtr<CGulIcon>* aIcons );
+
+ /**
+ * Gets the index number of the current item in the view.
+ * @return Index number of the current item.
+ */
+ virtual TInt CurrentItemIndex();
+
+ /**
+ * Sets the current item.
+ * @param aIndex Index of the item to make current.
+ */
+ virtual void SetCurrentItemIndex(TInt aCurrentTestCase);
+
+ /**
+ * Inline function for getting pointer to list box.
+ * @return Pointer to list box.
+ */
+ virtual inline CEikListBox* ListBox() { return (CEikListBox*)iListBox; };
+
+
+
+ /**
+ * Processes user commands.
+ * @param aCommand ID of the command to respond to.
+ */
+ virtual void ProcessCommandL( TInt aCommand );
+
+ /**
+ * Processes user commands.
+ * @param aCommand ID of the command to respond to.
+ */
+ virtual void SelectionListProcessCommandL( TInt aCommand );
+
+ /**
+ * Handles mark commands.
+ * @param aCommand ID of the command to respond to.
+ */
+ virtual void HandleMarkCommandL( TInt aCommand );
+
+
+
+ public: // Functions from base classes
+
+ private: // Functions from base classes
+
+ /**
+ * From CoeControl,SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ virtual void SizeChanged();
+
+
+
+
+ /**
+ * From CoeControl,CountComponentControls.
+ * Gets a count of the component controls of this list box control.
+ * This information is used for DrawNow().
+ */
+ virtual TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ * Gets a pointer to the specified component control.
+ * @param aIndex Index of the component control to look up.
+ * @return The control at aIndex.
+ */
+ virtual CCoeControl* ComponentControl(TInt aIndex) const;
+
+
+
+ /**
+ * From CCoeControl,Draw.
+ * Draw a control, called by window server.
+ * @param aRect The region of the control to be redrawn. Co-ordinates
+ * are relative to the control's origin (top left corner).
+ */
+ virtual void Draw(const TRect& aRect) const;
+
+ protected: //data
+
+ CView* iParentView;
+ CEikColumnListBox* iListBox;
+ //CEikTextListBox* iListBox;
+ CTestCaseListBoxModel* iListBoxModel;
+ RPointerArray<CTestInfo> iTestCasesInView;
+ CUIStore* iUIStore;
+
+ private: //data
+
+ };
+
+#endif // CTestSetInsertMenuContainer_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/CreatedTestSetMenuContainer.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,126 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CCreatedTestSetMenuContainer
+* class declaration.
+*
+*/
+
+#ifndef CREATETESTSETMENUCONTAINER_H
+#define CREATETESTSETMENUCONTAINER_H
+
+// INCLUDES
+#include "Container.h"
+
+#include <coecntrl.h>
+#include <eiklbo.h> // MEikListBoxObserver
+#include <bamdesca.h> // MDesCArray
+#include <aknsfld.h>
+
+#include <stifinternal/RRefArray.h>
+#include <stifinternal/UIEngine.h>
+#include <stifinternal/UIStoreIf.h>
+#include <stifinternal/UIStoreContainer.h>
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+class CDesC16Array;
+
+class CCreatedTestSetMenuView;
+class CEikColumnListBox;
+class CStartedTestCase;
+
+class CUIStoreHandler;
+class CUIStore;
+class CUIStoreIf;
+class CUIEngineContainer;
+class CUIEngine;
+
+// CLASS DECLARATION
+/**
+* CCreatedTestSetMenuContainer container control class.
+*
+*/
+class CCreatedTestSetMenuContainer : public CContainer//public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ * @param aRect Frame rectangle for container.
+ */
+ void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
+
+ /**
+ * Destructor.
+ */
+ ~CCreatedTestSetMenuContainer();
+
+ public: // New functions
+
+ /**
+ * Stores current position of focus of iListBox to the CAppUiAppUi object
+ */
+ void SaveActiveLine();
+
+ public: // Functions from base classes
+
+ private: // Functions from base classes
+
+ /**
+ * From CoeControl,SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ void SizeChanged();
+
+ /**
+ * From CoeControl,CountComponentControls.
+ * Gets a count of the component controls of this list box control.
+ * This information is used for DrawNow().
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ * Gets a pointer to the specified component control.
+ * @param aIndex Index of the component control to look up.
+ * @return The control at aIndex.
+ */
+ CCoeControl* ComponentControl(TInt aIndex) const;
+
+ /**
+ * From CCoeControl,Draw.
+ * Draw a control, called by window server.
+ * @param aRect The region of the control to be redrawn. Co-ordinates
+ * are relative to the control's origin (top left corner).
+ */
+ void Draw(const TRect& aRect) const;
+
+ /**
+ * From CCoeControl,OfferKeyEventL
+ * Handles key events.
+ * @param aKeyEvent The key event.
+ * @param aType The type of key event.
+ * @return Indicates whether or not the key event was used
+ * by this control.
+ */
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+ private: //data
+
+ CCreatedTestSetMenuView* iParentView;
+ };
+
+#endif // CREATETESTSETMENUCONTAINER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/CreatedTestSetMenuView.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,120 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CCreatedTestSetMenuView class
+* declaration.
+*
+*/
+
+#ifndef CREATEDTESTSETSETMENUVIEW_H
+#define CREATEDTESTSETSETMENUVIEW_H
+
+// INCLUDES
+#include "View.h"
+#include <eiklbo.h> // MEikListBoxObserver
+#include <aknnavide.h>
+
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class CCreatedTestSetMenuContainer;
+
+
+// CLASS DECLARATION
+
+/**
+* CTestCaseMenuView view class.
+*
+*/
+class CCreatedTestSetMenuView : public CView, public MEikListBoxObserver //CAknView
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CCreatedTestSetMenuView();
+
+ public: // Functions from base classes
+
+ /**
+ * Returns view´s id.
+ * @return View id.
+ */
+ TUid Id() const;
+
+ /**
+ * Handles a command.
+ * @param aCommand A command ID.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * Handles client rect changes.
+ */
+ void HandleClientRectChange();
+
+ /**
+ * Handles a list box event.
+ * @param aListBox A pointer to list box.
+ * @param aEventType Type of list box event.
+ */
+ void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
+
+ public: // New functions
+
+
+
+ private:
+
+ /**
+ * Initializes view when activated.
+ * @param aPrevViewId Id of the previous view (not used).
+ * @param aCustomMessageId Custom message id (not used).
+ * @param aCustomMessage Custom message (not used).
+ */
+ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * Deactivates view.
+ */
+ void DoDeactivate();
+
+
+ private: // New functions
+
+ /**
+ * Checks listbox selections and launches
+ * query dialog to start test cases.
+ * @param aListBox Pointer to listbox.
+ */
+ void CheckListBoxSelectionsL(CEikListBox* aListBox);
+
+ private: // Data
+ CAknNavigationDecorator* iNaviDecorator;
+ CCreatedTestSetMenuContainer* iContainer;
+ TInt iCurrentTestCase;
+ TBufC<50> iCurrentTestSet;
+ TBool iSaveNeeded;
+ };
+
+#endif //CREATEDTESTSETSETMENUVIEW_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/MainMenuContainer.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,127 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CMainMenuContainer class definition.
+*
+*/
+
+#ifndef CMAINMENUCONTAINER_H
+#define CMAINMENUCONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+#include <eiklbo.h>
+
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+
+// CLASS DECLARATION
+
+/**
+* CMainMenuContainer container control class.
+*
+*/
+class CMainMenuContainer : public CCoeControl, public MEikListBoxObserver /* MCoeControlObserver */
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ * @param aRect Frame rectangle for container.
+ */
+ void ConstructL(const TRect& aRect);
+
+ /**
+ * Destructor.
+ */
+ ~CMainMenuContainer();
+
+ public: // New functions
+
+ /**
+ * Get currently selected items index.
+ * @return Current item index.
+ */
+ TInt GetActiveLine();
+
+ /**
+ * Makes the iListBox store its focus position to CAppUiAppUi object
+ */
+ void SaveActiveLine();
+
+ public: // Functions from base classes
+
+ /**
+ * Method HandleSelectedListItemL handles valix index.
+ * @param aIndex Current item index.
+ */
+ void HandleSelectedListItemL( TInt aIndex );
+
+ private: // Functions from base classes
+
+ /**
+ * From CoeControl,SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ void SizeChanged();
+
+ /**
+ * From CoeControl,CountComponentControls.
+ * @return Number of controls indside this container.
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ * Gets the specified component of a compound control.
+ * @param aIndex The index of the control to get.
+ * @return The component control with an index of aIndex.
+ */
+ CCoeControl* ComponentControl(TInt aIndex) const;
+
+ /**
+ * From CCoeControl,Draw.
+ * Draw a control, called by window server.
+ * @param aRect The region of the control to be redrawn. Co-ordinates
+ * are relative to the control's origin (top left corner).
+ */
+ void Draw(const TRect& aRect) const;
+
+ /**
+ * Handles list box events.
+ * @param aListBox The originating list box.
+ * @param aEventType A code for the event. Further information may be
+ * obtained by accessing the list box itself.
+ */
+ void HandleListBoxEventL(CEikListBox* aListBox,TListBoxEvent aEventType);
+
+ /**
+ * From CCoeControl,OfferKeyEventL
+ * Handles key events.
+ * @param aKeyEvent The key event.
+ * @param aType The type of key event.
+ * @return Indicates whether or not the key event was used
+ * by this control.
+ */
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+
+ private: //data
+
+ CEikTextListBox* iListBox;
+ };
+
+#endif
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/MainMenuView.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CMainMenuView class declaration.
+*
+*/
+
+#ifndef MAINMENUVIEW_H
+#define MAINMENUVIEW_H
+
+// INCLUDES
+#include "View.h"
+#include <aknnavide.h>
+
+// CONSTANTS
+// UID of view
+const TUid KMainMenuViewId = {1};
+
+// FORWARD DECLARATIONS
+class CMainMenuContainer;
+
+// CLASS DECLARATION
+
+/**
+* CMainMenuView view class.
+*
+*/
+class CMainMenuView : public CView //CAknView
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CMainMenuView();
+
+ public: // Functions from base classes
+
+ /**
+ * Returns view´s id.
+ * @return View id.
+ */
+ TUid Id() const;
+
+ /**
+ * Handles a command.
+ * @param aCommand A command ID.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * Handles client rect changes.
+ */
+ void HandleClientRectChange();
+
+ private:
+
+ /**
+ * Initializes view when activated.
+ * @param aPrevViewId Id of the previous view (not used).
+ * @param aCustomMessageId Custom message id (not used).
+ * @param aCustomMessage Custom message (not used).
+ */
+ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * Deactivates view.
+ */
+ void DoDeactivate();
+
+ private: // Data
+ CMainMenuContainer* iContainer;
+ CAknNavigationDecorator* iNaviDecorator;
+ };
+
+#endif
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/MenuListBox.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CMenuListBox class declaration.
+*
+*/
+
+#ifndef MENULISTBOX_H_
+#define MENULISTBOX_H_
+
+// INCLUDES
+#include <eiktxlbx.h>
+#include "Stifui.hrh"
+#include "AppUIAppUi.h"
+#include <aknview.h>
+#include <aknlists.h>
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+
+// CLASS DECLARATION
+
+/**
+* CMenuListBox class. Has ability to store and retrieve previous focus position
+*/
+class CMenuListBox : public CAknSingleStyleListBox
+ {
+ public: // Constructors and destructor
+
+ static CMenuListBox* NewL(TAppUIViewNumber aViewId);
+
+ /**
+ * Destructor.
+ */
+ virtual ~CMenuListBox();
+
+ /**
+ * Sets focus on last chosen position
+ */
+ void SetPreviousFocus();
+
+ /**
+ * Saves position of focus to CAppUiAppUi object
+ */
+ void SaveFocusPosition();
+
+ private: // Constructors and destructor
+
+ CMenuListBox(TAppUIViewNumber aViewId);
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ public: // Functions from base classes
+
+ private:
+
+ private: // Data
+ const TAppUIViewNumber iViewId;
+ };
+
+#endif /*MENULISTBOX_H_*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/ShowStartedCasesContainer.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,252 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStartedTestsListBoxModel class
+* declaration.
+*
+*/
+
+#ifndef CSHOWSTARTEDCASESCONTAINER_H
+#define CSHOWSTARTEDCASESCONTAINER_H
+
+// INCLUDES
+#include "Container.h"
+
+#include <coecntrl.h>
+#include <eiklbo.h>
+#include <bamdesca.h> // MDesCArray
+
+//#include "RRefArray.h"
+#include <stifinternal/RRefArray.h>
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+class CAknSingleGraphicStyleListBox;
+class CDesC16ArrayFlat;
+class CStartedTestCase;
+class CUIStore;
+
+// CLASS DECLARATION
+
+class CStartedTestsListBoxModel : public CTestCaseListBoxModel //public CBase, public MDesCArray
+ {
+ public:
+ /**
+ * Destructor.
+ */
+ ~CStartedTestsListBoxModel();
+
+ /**
+ * Two-phased constructor.
+ * @param aTestsInView Array of test cases in view.
+ * @return Pointer to created list box model.
+ */
+ static CStartedTestsListBoxModel* NewL(
+ RRefArray<CStartedTestCase>* aTestsInView);
+
+ public: // Functions from base classes
+
+ /**
+ * Returns the number of descriptor elements in the array.
+ * @return The number of descriptor elements.
+ */
+ TInt MdcaCount() const;
+
+ /**
+ * Indexes into a descriptor array.
+ * @param aIndex The position of the descriptor element within the
+ * array. The position is relative to zero; i.e. zero
+ * implies the first descriptor element in the array.
+ * This value must be non-negative and less than the
+ * number of descriptors currently within the array
+ * otherwise the operator panics with
+ * EArrayIndexOutOfRange.
+ * @return A non-modifiable pointer descriptor representing the
+ * descriptor element located at position aIndex within
+ * the array.
+ */
+ TPtrC MdcaPoint(TInt aIndex) const;
+
+ private:
+
+ /**
+ * Symbian OS two phased constructor.
+ * Completes the construction of the object.
+ */
+ void ConstructL();
+
+ private: //data
+ RRefArray<CStartedTestCase>* iTestCasesInView;
+ };
+
+/**
+* CShowStartedCasesContainer container control class.
+*
+*/
+class CShowStartedCasesContainer : public CContainer //public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ * @param aRect Frame rectangle for container.
+ * @return Observer for list box.
+ */
+ void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
+
+ /**
+ * Destructor.
+ */
+ ~CShowStartedCasesContainer();
+
+ public: // New functions
+
+ /**
+ * Show only testcases which are defined is specified module.
+ * @param aModuleName Module which test cases are shown.
+ */
+ void FilterCasesByModuleL(TName aModuleName);
+
+ /**
+ * Show only testcases which are defined in specified test case file.
+ * @param aTestCaseFileName Test cases file name.
+ */
+ void FilterCasesByTCFileNameL(TFileName aTestCaseFileName);
+
+ /**
+ * Remove possible filtering of test cases -> show all test cases.
+ */
+ void NoFilteringL();
+
+ /**
+ * Returns reference to currently selected test case in view (listbox).
+ * @return Currently selected test case.
+ */
+ CStartedTestCase* SelectedTestCase();
+
+ /**
+ * Constructs list box model without any filtering.
+ */
+ void ConstructListBoxModelL();
+
+ /**
+ * Draws the list box.
+ */
+ void DrawListBox();
+
+ /**
+ * Returns count of test cases in view.
+ * @return Count of test cases in view.
+ */
+ TInt TestsInViewCount();
+
+ /**
+ * Handles the addition of an item to the model.
+ */
+ void HandleItemAdditionL();
+
+ /**
+ * Handles the removal of an item from the model.
+ */
+ void HandleItemRemovalL();
+
+ /**
+ * Returns pointer to currently selected test case.
+ * @param Current test case.
+ */
+ CStartedTestCase* CurrentTestCase();
+
+ /**
+ * Sets the current item.
+ * @param aIndex Index of the item to make current.
+ */
+ void SetCurrentItemIndex(TInt aIndex);
+
+ /**
+ * Resets the selection indices, top and current item indices,
+ * the selection, and the horizontal scroll offset of this list box.
+ * This function does not redraw the list box.
+ */
+ void ResetListBox();
+
+ /**
+ * Removes items from list box.
+ */
+ void RemoveSelectedExecutionsL();
+
+ /**
+ * Removes all started test cases from list box.
+ */
+ void RemoveAllExecutionsInViewL();
+
+ /**
+ * Stores current position of focus of iListBox to the CAppUiAppUi object
+ */
+ void SaveActiveLine();
+
+ private: // New functions
+
+ public: // Functions from base classes
+
+ private: // Functions from base classes
+
+ /**
+ * From CoeControl,SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ void SizeChanged();
+
+ /**
+ * From CoeControl,CountComponentControls.
+ * Gets a count of the component controls of this list box control.
+ * This information is used for DrawNow().
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ * Gets a pointer to the specified component control.
+ * @param aIndex Index of the component control to look up.
+ * @return The control at aIndex.
+ */
+ CCoeControl* ComponentControl(TInt aIndex) const;
+
+ /**
+ * From CCoeControl,Draw.
+ * Draw a control, called by window server.
+ * @param aRect The region of the control to be redrawn. Co-ordinates
+ * are relative to the control's origin (top left corner).
+ */
+ void Draw(const TRect& aRect) const;
+
+ /**
+ * From CCoeControl,OfferKeyEventL
+ * Handles key events.
+ * @param aKeyEvent The key event.
+ * @param aType The type of key event.
+ * @return Indicates whether or not the key event was used
+ * by this control.
+ */
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+ private: //data
+
+ CStartedTestsListBoxModel* iListBoxModel;
+ RRefArray<CStartedTestCase> iStartedTestsPtrs;
+ };
+
+#endif // CSHOWSTARTEDCASESCONTAINER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/ShowStartedCasesView.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,130 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CShowStartedCasesView class
+* declaration.
+*
+*/
+
+#ifndef SHOWSTARTEDCASESVIEW_H
+#define SHOWSTARTEDCASESVIEW_H
+
+// INCLUDES
+#include "View.h"
+#include <eiklbo.h> // MEikListBoxObserver
+#include <aknnavide.h> //CAknNavigationDecorator
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class CShowStartedCasesContainer;
+
+// CLASS DECLARATION
+
+/**
+* CShowStartedCasesView view class.
+*
+*/
+class CShowStartedCasesView : public CView, public MEikListBoxObserver
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CShowStartedCasesView();
+
+ public: // Functions from base classes
+
+ /**
+ * Returns view´s id.
+ * @return View id.
+ */
+ TUid Id() const;
+
+ /**
+ * Handles a command.
+ * @param aCommand A command ID.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * Handles client rect changes.
+ */
+ void HandleClientRectChange();
+
+ /**
+ * Handles a list box event.
+ * @param aListBox A pointer to list box (not used).
+ * @param aEventType Type of list box event.
+ */
+ void HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType);
+
+ public: // New functions
+
+ /**
+ * Handles status changes of test cases in view.
+ */
+ void TestCaseStateChangedL();
+
+ /**
+ * Handles call to view test case´s output data.
+ */
+ void ViewTestCaseOutputL();
+
+ private:
+
+ /**
+ * Initializes view when activated.
+ * @param aPrevViewId Id of the previous view (not used).
+ * @param aCustomMessageId Custom message id (not used).
+ * @param aCustomMessage Custom message (not used).
+ */
+ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * Deactivates view.
+ */
+ void DoDeactivate();
+
+ /** From MEikMenuObserver
+ * Initializes menu pane.
+ * @param aResourceId Menu pane resource ID
+ * @param aMenuPane Menu pane pointer
+ */
+ void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
+
+ /**
+ * Refreshes view name shown in the navi pane.
+ */
+ void RefreshNaviTitleL();
+
+ private: // Data
+ CShowStartedCasesContainer* iContainer;
+ CAknNavigationDecorator* iNaviDecorator;
+ TName iFilterModule;
+ TFileName iFilterTestCaseFile;
+ TInt iSelectedTestCase; // Which testcase was
+ // selected when view
+ // was active earlier.
+ };
+
+#endif //SHOWSTARTEDCASESVIEW_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/StartCasesContainer.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStartCasesContainer class
+* declaration.
+*
+*/
+
+#ifndef CSTARTCASESCONTAINER_H
+#define CSTARTCASESCONTAINER_H
+
+// INCLUDES
+#include "Container.h"
+
+#include <coecntrl.h>
+#include <eiklbo.h> // MEikListBoxObserver
+#include <bamdesca.h> // MDesCArray
+#include <aknsfld.h>
+
+//#include "RRefArray.h"
+//#include "UIEngine.h"
+//#include "UIStoreIf.h"
+//#include "UIStoreContainer.h"
+
+#include <stifinternal/RRefArray.h>
+#include <stifinternal/UIEngine.h>
+#include <stifinternal/UIStoreIf.h>
+#include <stifinternal/UIStoreContainer.h>
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+class CDesC16Array;
+
+class CStartCasesView;
+class CEikColumnListBox;
+class CStartedTestCase;
+
+class CUIStoreHandler;
+class CUIStore;
+class CUIStoreIf;
+class CUIEngineContainer;
+class CUIEngine;
+
+// CLASS DECLARATION
+/**
+* CStartCasesContainer container control class.
+*
+*/
+class CStartCasesContainer : public CContainer//public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ * @param aRect Frame rectangle for container.
+ */
+ void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
+
+ /**
+ * Destructor.
+ */
+ ~CStartCasesContainer();
+
+ public: // New functions
+
+ /**
+ * Stores current position of focus of iListBox to the CAppUiAppUi object
+ */
+ void SaveActiveLine();
+
+ public: // Functions from base classes
+
+ private: // Functions from base classes
+
+ /**
+ * From CoeControl,SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ void SizeChanged();
+
+ /**
+ * From CoeControl,CountComponentControls.
+ * Gets a count of the component controls of this list box control.
+ * This information is used for DrawNow().
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ * Gets a pointer to the specified component control.
+ * @param aIndex Index of the component control to look up.
+ * @return The control at aIndex.
+ */
+ CCoeControl* ComponentControl(TInt aIndex) const;
+
+ /**
+ * From CCoeControl,Draw.
+ * Draw a control, called by window server.
+ * @param aRect The region of the control to be redrawn. Co-ordinates
+ * are relative to the control's origin (top left corner).
+ */
+ void Draw(const TRect& aRect) const;
+
+ /**
+ * From CCoeControl,OfferKeyEventL
+ * Handles key events.
+ * @param aKeyEvent The key event.
+ * @param aType The type of key event.
+ * @return Indicates whether or not the key event was used
+ * by this control.
+ */
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+ private: //data
+
+ CStartCasesView* iParentView;
+ };
+
+#endif // CSTARTCASESCONTAINER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/StartCasesView.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,132 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStartCasesView class declaration.
+*
+*/
+
+#ifndef STARTCASESVIEW_H
+#define STARTCASESVIEW_H
+
+// INCLUDES
+#include "View.h"
+#include <eiklbo.h> // MEikListBoxObserver
+#include <aknnavide.h>
+
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class CStartCasesContainer;
+
+
+// CLASS DECLARATION
+
+/**
+* CTestCaseMenuView view class.
+*
+*/
+class CStartCasesView : public CView, public MEikListBoxObserver //CAknView
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CStartCasesView();
+
+ public: // Functions from base classes
+
+ /**
+ * Returns view´s id.
+ * @return View id.
+ */
+ TUid Id() const;
+
+ /**
+ * Handles a command.
+ * @param aCommand A command ID.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * Handles client rect changes.
+ */
+ void HandleClientRectChange();
+
+ /**
+ * Handles a list box event.
+ * @param aListBox A pointer to list box.
+ * @param aEventType Type of list box event.
+ */
+ void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
+
+ public: // New functions
+
+ /**
+ * Starts test case.
+ */
+ void StartTestCaseL();
+
+ /**
+ * Starts multiple test cases.
+ * @param aSelectedÍndexes Indexes of selected test cases.
+ */
+ void StartTestCasesL( RArray<TInt> aSelectedIndexes );
+
+ private:
+
+ /**
+ * Initializes view when activated.
+ * @param aPrevViewId Id of the previous view (not used).
+ * @param aCustomMessageId Custom message id (not used).
+ * @param aCustomMessage Custom message (not used).
+ */
+ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * Deactivates view.
+ */
+ void DoDeactivate();
+
+ /**
+ * Initializes menu pane.
+ * @param aResourceId Menu pane resource ID.
+ * @param aMenuPane Menu pane pointer.
+ */
+ void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
+
+ private: // New functions
+
+ /**
+ * Checks listbox selections and launches
+ * query dialog to start test cases.
+ * @param aListBox Pointer to listbox.
+ */
+ void CheckListBoxSelectionsL(CEikListBox* aListBox);
+
+ private: // Data
+ CAknNavigationDecorator* iNaviDecorator;
+ CStartCasesContainer* iContainer;
+ TInt iCurrentTestCase;
+ };
+
+#endif //STARTCASESVIEW_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/StartedCasesMenuContainer.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,130 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStartedCasesMenuContainer class
+* declaration.
+*
+*/
+
+#ifndef CSTARTEDCASESMENUCONTAINER_H
+#define CSTARTEDCASESMENUCONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+#include <eiklbo.h>
+
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+
+// CLASS DECLARATION
+
+/**
+* CStartedCasesMenuContainer container control class.
+*
+*/
+class CStartedCasesMenuContainer : public CCoeControl , public MEikListBoxObserver /* MCoeControlObserver */
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ * @param aRect Frame rectangle for container.
+ */
+ void ConstructL(const TRect& aRect );
+
+ /**
+ * Destructor.
+ */
+ ~CStartedCasesMenuContainer();
+
+ public: // New functions
+
+ /**
+ * Get currently selected items index.
+ * @return Current item index.
+ */
+ TInt GetActiveLine();
+
+ /**
+ * Stores current position of focus of iListBox to the CAppUiAppUi object
+ */
+ void SaveActiveLine();
+
+ public: // Functions from base classes
+
+ /**
+ * Method HandleSelectedListItemL handles valix index.
+ * @param TInt aIndex
+ * @return nothing
+ */
+ void HandleSelectedListItemL( TInt aIndex );
+
+ private: // Functions from base classes
+
+ /**
+ * From CoeControl,SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ void SizeChanged();
+
+ /**
+ * From CoeControl,CountComponentControls.
+ * Gets a count of the component controls of this list box control.
+ * This information is used for DrawNow().
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ * Gets a pointer to the specified component control.
+ * @param aIndex Index of the component control to look up.
+ * @return The control at aIndex.
+ */
+ CCoeControl* ComponentControl(TInt aIndex) const;
+
+ /**
+ * From CCoeControl,Draw.
+ * Draw a control, called by window server.
+ * @param aRect The region of the control to be redrawn. Co-ordinates
+ * are relative to the control's origin (top left corner).
+ */
+ void Draw(const TRect& aRect) const;
+
+ /**
+ * Handles list box events.
+ * @param aListBox The originating list box.
+ * @param aEventType A code for the event. Further information may be
+ * obtained by accessing the list box itself.
+ */
+ void HandleListBoxEventL(CEikListBox* aListBox,TListBoxEvent aEventType);
+
+ /**
+ * From CCoeControl,OfferKeyEventL
+ * Handles key events.
+ * @param aKeyEvent The key event.
+ * @param aType The type of key event.
+ * @return Indicates whether or not the key event was used
+ * by this control.
+ */
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+
+ private: //data
+
+ CEikTextListBox* iListBox;
+ };
+
+#endif // CSTARTEDCASESMENUCONTAINER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/StartedCasesMenuView.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStartedCasesMenuView class
+* declaration.
+*
+*/
+
+#ifndef STARTEDCASESMENUVIEW_H
+#define STARTEDCASESMENUVIEW_H
+
+// INCLUDES
+#include <eiklbo.h> // MEikListBoxObserver
+#include <aknnavide.h>
+#include "View.h"
+
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class CStartedCasesMenuContainer;
+
+// CLASS DECLARATION
+
+/**
+* CStartedCasesMenuView view class.
+*
+*/
+class CStartedCasesMenuView : public CView
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CStartedCasesMenuView();
+
+ public: // Functions from base classes
+
+ /**
+ * Returns view´s id.
+ * @return View id.
+ */
+ TUid Id() const;
+
+ /**
+ * Handles a command.
+ * @param aCommand A command ID.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * Handles client rect changes.
+ */
+ void HandleClientRectChange();
+
+ private:
+
+ /**
+ * Initializes view when activated.
+ * @param aPrevViewId Id of the previous view (not used).
+ * @param aCustomMessageId Custom message id (not used).
+ * @param aCustomMessage Custom message (not used).
+ */
+ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * Deactivates view.
+ */
+ void DoDeactivate();
+
+ private: // Data
+ CAknNavigationDecorator* iNaviDecorator;
+ CStartedCasesMenuContainer* iContainer;
+ };
+
+#endif
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/StatisticsContainer.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStatisticsContainer class
+* declaration.
+*
+*/
+
+#ifndef CSTATISTICSCONTAINER_H
+#define CSTATISTICSCONTAINER_H
+
+// INCLUDES
+#include "Container.h"
+
+#include <coecntrl.h>
+#include <eiklbo.h> // MEikListBoxObserver
+#include <bamdesca.h> // MDesCArray
+#include <aknsfld.h>
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+class CDesC16Array;
+
+class CStartCasesView;
+class CEikColumnListBox;
+
+// CLASS DECLARATION
+/**
+* StatisticsContainer container control class.
+*
+*/
+class CStatisticsContainer : public CContainer//public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ * @param aRect Frame rectangle for container.
+ */
+ void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
+
+ /**
+ * Destructor.
+ */
+ ~CStatisticsContainer();
+
+ public: // New functions
+
+ /**
+ * Stores current position of focus of iListBox to the CAppUiAppUi object
+ */
+ void SaveActiveLine();
+
+ public: // Functions from base classes
+
+ private: // Functions from base classes
+
+ /**
+ * From CoeControl,SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ void SizeChanged();
+
+ /**
+ * From CoeControl,CountComponentControls.
+ * Gets a count of the component controls of this list box control.
+ * This information is used for DrawNow().
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ * Gets a pointer to the specified component control.
+ * @param aIndex Index of the component control to look up.
+ * @return The control at aIndex.
+ */
+ CCoeControl* ComponentControl(TInt aIndex) const;
+
+ /**
+ * From CCoeControl,Draw.
+ * Draw a control, called by window server.
+ * @param aRect The region of the control to be redrawn. Co-ordinates
+ * are relative to the control's origin (top left corner).
+ */
+ void Draw(const TRect& aRect) const;
+
+ /**
+ * From CCoeControl,OfferKeyEventL
+ * Handles key events.
+ * @param aKeyEvent The key event.
+ * @param aType The type of key event.
+ * @return Indicates whether or not the key event was used
+ * by this control.
+ */
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+ private: //data
+
+ CStartCasesView* iParentView;
+ CDesC16ArrayFlat* iTestCaseArray;
+ };
+
+#endif // CSTATISTICSCONTAINER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/StatisticsView.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStatisticsView class declaration.
+*
+*/
+
+#ifndef STATISTICSVIEW_H
+#define STATISTICSVIEW_H
+
+// INCLUDES
+#include "View.h"
+#include <eiklbo.h> // MEikListBoxObserver
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class CStatisticsContainer;
+
+// CLASS DECLARATION
+
+/**
+* CTestCaseMenuView view class.
+*
+*/
+class CStatisticsView : public CView, public MEikListBoxObserver //CAknView
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CStatisticsView();
+
+ public: // Functions from base classes
+
+ /**
+ * Returns view´s id.
+ * @return View id.
+ */
+ TUid Id() const;
+
+ /**
+ * Handles a command.
+ * @param aCommand A command ID.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * Handles client rect changes.
+ */
+ void HandleClientRectChange();
+
+ /**
+ * Handles a list box event.
+ * @param aListBox A pointer to list box.
+ * @param aEventType Type of list box event.
+ */
+ void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
+
+ public: // New functions
+
+ /**
+ * Starts test case.
+ */
+ void StartTestCasesL();
+
+ private:
+
+ /**
+ * Initializes view when activated.
+ * @param aPrevViewId Id of the previous view (not used).
+ * @param aCustomMessageId Custom message id (not used).
+ * @param aCustomMessage Custom message (not used).
+ */
+ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * Deactivates view.
+ */
+ void DoDeactivate();
+
+ /** From MEikMenuObserver
+ * Initializes menu pane.
+ * @param aResourceId Menu pane resource ID
+ * @param aMenuPane Menu pane pointer
+ */
+ void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
+
+
+ private: // Data
+ CAknNavigationDecorator* iNaviDecorator;
+ CStatisticsContainer* iContainer;
+ TInt iCurrentTestCase;
+ };
+
+#endif //STATISTICSVIEW_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/Stifui.hrh Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Const definitions file.
+*
+*/
+
+#ifndef STIF_UI_HRH
+#define STIF_UI_HRH
+
+enum TAppUICommandIds
+ {
+ EAppUIGoBack = 1,
+ EAppUIGoToMainMenu,
+ EAppUIGoToTestCaseMenu,
+ EAppUIGoToModulesMenu,
+ EAppUIGoToTestSetsMenu,
+ ECmdGoToStartCasesView,
+ ECmdGoToStartedCasesView,
+ ECmdShowStartedTestSet,
+ ECmdCreateTestSet,
+ ECmdLoadTestSet,
+ ECmdStartTestSet,
+ ECmdSaveTestSet,
+ ECmdInsertTestCases,
+ ECmdRemoveTestCases,
+ ECmdFilterCases,
+ ECmdMarkMenu,
+ ECmdInsertSelectedCases,
+ ECmdShowSetMenu,
+ ECmdStartCases,
+ ECmdShowAllStartedCases,
+ ECmdShowOngoingCases,
+ ECmdShowPassedCases,
+ ECmdShowFailedCases,
+ ECmdShowPausedCases,
+ ECmdShowCrashedAbortedCases,
+ ECmdShowStatistics,
+ ECmdViewOutput,
+ ECmdPauseTestCase,
+ ECmdResumeTestCase,
+ ECmdAbortTestCase,
+ ECmdRemoveExecution,
+ ECmdRemoveAllExecutions,
+ ECmdOpenModule,
+ ECmdAddModule,
+ ECmdRemoveModule,
+ ECmdFilterMenu,
+ ECmdShowAbout,
+ ECmdFilterByModule = 0x1000,
+ ECmdFilterByTestCaseFile = 0x2000,
+ ECmdNOFiltering = 0x3000,
+ ECmdGoToTestSetView
+ };
+
+
+enum TAppUITabViewId
+ {
+ ETestCaseMenuTab = 1,
+ ETestModulesMenuTab,
+ ETestSetsMenuTab
+ };
+
+// Application view ids.
+enum TAppUIViewNumber
+ {
+ EMainMenuViewId = 1,
+ ETestCaseMenuViewId,
+ EStartCaseMenuViewId,
+ EStartedCasesMenuViewId,
+ ETestModulesMenuViewId,
+ ETestSetBaseMenuViewId,
+ ETestSetMenuViewId,
+ ETestSetInsertMenuViewId,
+ ETestSetStartedCasesViewId,
+ ETestSetsMenuViewId, /*???*/
+ EShowStartedCasesViewId,
+ EShowStatisticsViewId,
+ ETestCaseOutputViewId,
+ EStatisticsViewId,
+ ECreatedTestSetMenuViewId
+ };
+
+enum TPanic
+ {
+ EModuleIndexOutOfBound,
+ EShowCasesOutOfSync
+ };
+
+enum TShowStartedCasesMode
+ {
+ EShowAllStartedCases,
+ EShowOngoingCases,
+ EShowPausedCases,
+ EShowPassedCases,
+ EShowFailedCases,
+ EShowCrashedAbortedCases,
+ EShowStatistics
+ };
+
+#endif // STIF_UI_HRH
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/Stifui_loc.hrh Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,145 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains localized strings.
+*
+*/
+
+// LOCALISATION STRINGS
+
+//#define qtn_testcase_menu_tab "Cases"
+//#define qtn_testmodules_menu_tab "Modules"
+//#define qtn_testsets_menu_tab "Sets"
+
+// Main menu
+#define qtn_mainmenulist_test_cases "\tTest Cases"
+#define qtn_mainmenulist_modules "\tModules"
+#define qtn_mainmenulist_test_sets "\tTest Sets"
+
+// Test cases menu
+#define qtn_testcasemenu_startcase "\tStart Case(s)"
+#define qtn_testcasemenu_startedcases "\tStarted Cases"
+
+// Started cases menu
+#define qtn_startedcases_allcases "\tAll Started Cases"
+#define qtn_startedcases_ongoing "\tOngoing Cases"
+#define qtn_startedcases_paused "\tPaused Cases"
+#define qtn_startedcases_passed "\tPassed Cases"
+#define qtn_startedcases_failed "\tFailed Cases"
+#define qtn_startedcases_crashed_aborted "\tCrashed/Aborted Cases"
+#define qtn_startedcases_statistics "\tStatistics"
+
+// Modules menu
+#define qtn_open_module "Open module"
+#define qtn_add_module "Load all module(s)"
+#define qtn_remove_module "Remove module"
+
+// Test set menu.
+#define qtn_testsetbasemenu_createtestset "\tCreate test set"
+#define qtn_testsetbasemenu_loadtestset "\tLoad test set"
+#define qtn_owerwrite_testset_confirmation "Test set already created. Do you want to overwrite it?"
+#define qtn_save_testset_confirmation "Save current test?"//changes for STIF-451
+#define qtn_load_testset_errornote "Error loading test set."
+
+#define qtn_testsetinsert_add_selected "Add selected"
+#define qtn_insert_confirmation "Add selected test case(s) to test set?"
+#define qtn_insert_none_selected "No test cases selected."
+
+#define qtn_testset_started_menu "Show"
+#define qtn_testset_set_menu "Set"
+
+#define qtn_testset_started_allcases "Started Cases"
+#define qtn_testset_started_ongoing "Ongoing Cases"
+#define qtn_testset_started_paused "Paused Cases"
+#define qtn_testset_started_passed "Passed Cases"
+#define qtn_testset_started_failed "Failed Cases"
+#define qtn_testset_started_crashed_aborted "Crashed/Aborted Cases"
+
+#define qtn_filter_test_cases "Filter"
+#define qtn_by_module "By module"
+#define qtn_by_testcasefile "By test case file"
+
+// Test case operations and menu texts
+#define qtn_markmenu_title "Mark/Unmark"
+#define qtn_markmenu_mark "Mark"
+#define qtn_markmenu_unmark "Unmark"
+#define qtn_markmenu_markall "Mark All"
+#define qtn_markmenu_unmarkall "Unmark All"
+#define qtn_mark_test_case "Mark"
+#define qtn_unmark_test_case "Unmark"
+
+#define qtn_filter_menu "Filtering"
+#define qtn_filter_by_modules "Filter by module"
+#define qtn_filter_by_test_case_file "Filter by test case file"
+#define qtn_no_filtering "No filtering"
+
+
+//#define qtn_remove_execution "Remove execution"
+//#define qtn_remove_all_executions "Remove all executions"
+#define qtn_testcase_control_menu "Test case control"
+#define qtn_view_output "View ouput of case"
+#define qtn_pause_testcase "Pause"
+#define qtn_resume_testcase "Resume"
+#define qtn_abort_testcase "Abort"
+
+#define qtn_exit "Exit"
+
+// Start test cases queries.
+#define qtn_start_test_cases "Start Case(s)"
+#define qtn_starting_test_case "Start test?"
+#define qtn_starting_test_cases "Start tests?"
+
+#define qtn_start "Start"
+#define qtn_start_and_view_output "Start and view output"
+
+#define qtn_start_test "Start"
+#define qtn_start_test_output "Start&view output"
+#define qtn_start_tests_parallel "Parallel"
+#define qtn_start_tests_serial "Sequential"
+
+// example caption strings for app
+#define qtn_app_caption_string "STIF UI"
+#define qtn_appui_demo "Demo"
+
+#define qtn_app_short_caption_string "STIF UI"
+
+// Navipanel titles
+#define qtn_navi_load_test_set "Load Test Set"
+#define qtn_navi_main "Main menu"
+#define qtn_navi_testcases "Test cases menu"
+#define qtn_navi_startcases "Start cases"
+#define qtn_navi_startedcases "Started cases"
+#define qtn_navi_testcase_output "Test case output"
+#define qtn_navi_modules "Modules menu"
+#define qtn_navi_testset_base "Test set menu"
+#define qtn_navi_testset "Test set"
+#define qtn_navi_testset_insert "Insert test case"
+
+#define qtn_navi_started "Started cases"
+#define qtn_navi_started_all "All started cases"
+#define qtn_navi_started_ongoing "Ongoing cases"
+#define qtn_navi_started_paused "Paused cases"
+#define qtn_navi_started_passed "Passed cases"
+#define qtn_navi_started_failed "Failed cases"
+#define qtn_navi_started_crashed_aborted "Crashed/Aborted cases"
+#define qtn_navi_started_stats "Statistics"
+
+// Test case states
+#define qtn_testcase_state_running "Running"
+#define qtn_testcase_state_passed "Passed"
+#define qtn_testcase_state_failed "Failed"
+#define qtn_testcase_state_crashed_aborted "Crashed/Aborted"
+#define qtn_testcase_state_unknown "Undefined state!"
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/TestCaseMenuContainer.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,129 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestCaseMenuContainer class
+* declaration.
+*
+*/
+
+#ifndef CTESTCASEMENUCONTAINER_H
+#define CTESTCASEMENUCONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+#include <eiklbo.h>
+
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+
+// CLASS DECLARATION
+
+/**
+* CTestCaseMenuContainer container control class.
+*
+*/
+class CTestCaseMenuContainer : public CCoeControl, public MEikListBoxObserver /* MCoeControlObserver */
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ * @param aRect Frame rectangle for container.
+ */
+ void ConstructL(const TRect& aRect);
+
+ /**
+ * Destructor.
+ */
+ ~CTestCaseMenuContainer();
+
+ public: // New functions
+
+ /**
+ * Get currently selected items index.
+ * @return Current item index.
+ */
+ TInt GetActiveLine();
+
+ /**
+ * Stores current position of focus of iListBox to the CAppUiAppUi object
+ */
+ void SaveActiveLine();
+
+ public: // Functions from base classes
+
+ /**
+ * Method HandleSelectedListItemL handles valix index.
+ * @param TInt aIndex
+ * @return nothing
+ */
+ void HandleSelectedListItemL( TInt aIndex );
+
+ private: // Functions from base classes
+
+ /**
+ * From CoeControl,SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ void SizeChanged();
+
+ /**
+ * From CoeControl,CountComponentControls.
+ * Gets a count of the component controls of this list box control.
+ * This information is used for DrawNow().
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ * Gets a pointer to the specified component control.
+ * @param aIndex Index of the component control to look up.
+ * @return The control at aIndex.
+ */
+ CCoeControl* ComponentControl(TInt aIndex) const;
+
+ /**
+ * From CCoeControl,Draw.
+ * Draw a control, called by window server.
+ * @param aRect The region of the control to be redrawn. Co-ordinates
+ * are relative to the control's origin (top left corner).
+ */
+ void Draw(const TRect& aRect) const;
+
+ /**
+ * Handles list box events.
+ * @param aListBox The originating list box.
+ * @param aEventType A code for the event. Further information may be
+ * obtained by accessing the list box itself.
+ */
+ void HandleListBoxEventL(CEikListBox* aListBox,TListBoxEvent aEventType);
+
+ /**
+ * From CCoeControl,OfferKeyEventL
+ * Handles key events.
+ * @param aKeyEvent The key event.
+ * @param aType The type of key event.
+ * @return Indicates whether or not the key event was used
+ * by this control.
+ */
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+ private: //data
+
+ CEikTextListBox* iListBox;
+ };
+
+#endif // CTESTCASEMENUCONTAINER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/TestCaseMenuView.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestCaseMenuView class
+* declaration.
+*
+*/
+
+#ifndef TESTCASEMENUVIEW_H
+#define TESTCASEMENUVIEW_H
+
+// INCLUDES
+#include "View.h"
+#include <aknnavide.h>
+
+
+// CONSTANTS
+// UID of view
+const TUid KTestCaseMenuViewId = {2};
+
+// FORWARD DECLARATIONS
+class CTestCaseMenuContainer;
+
+// CLASS DECLARATION
+
+/**
+* CTestCaseMenuView view class.
+*
+*/
+class CTestCaseMenuView : public CView //CAknView
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CTestCaseMenuView();
+
+ public: // Functions from base classes
+
+ /**
+ * Returns view´s id.
+ * @return View id.
+ */
+ TUid Id() const;
+
+ /**
+ * Handles a command.
+ * @param aCommand A command ID.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * Handles client rect changes.
+ */
+ void HandleClientRectChange();
+
+ private:
+
+ /**
+ * Initializes view when activated.
+ * @param aPrevViewId Id of the previous view (not used).
+ * @param aCustomMessageId Custom message id (not used).
+ * @param aCustomMessage Custom message (not used).
+ */
+ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * Deactivates view.
+ */
+ void DoDeactivate();
+
+ private: // Data
+ CAknNavigationDecorator* iNaviDecorator;
+ CTestCaseMenuContainer* iContainer;
+ };
+
+#endif
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/TestCaseOutputContainer.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,184 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestOutputListBoxModel class
+* declaration.
+*
+*/
+
+#ifndef TESTCASEOUTPUTCONTAINER_H
+#define TESTCASEOUTPUTCONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+#include <eiklbo.h>
+#include <bamdesca.h> // MDesCArray
+
+// #include "RRefArray.h"
+#include <stifinternal/RRefArray.h>
+
+
+// Define *.mbm file name.
+_LIT(KMbmFileName, "\\Resource\\Apps\\Stifui.mbm");
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+class CAknSingleGraphicStyleListBox;
+class CDesC16ArrayFlat;
+class CStartedTestCase;
+
+class CUIStore;
+
+// CLASS DECLARATION
+
+class CTestOutputListBoxModel : public CBase, public MDesCArray
+ {
+ public:
+ /**
+ * Destructor.
+ */
+ ~CTestOutputListBoxModel();
+
+ /**
+ * Two-phased constructor.
+ * @param aStartedTestCase Pointer to started test case.
+ * @return Pointer to created list box model.
+ */
+ static CTestOutputListBoxModel* NewL(CStartedTestCase* aStartedTestCase);
+
+ public: // Functions from base classes
+
+ /**
+ * Returns the number of descriptor elements in the array.
+ * @return The number of descriptor elements.
+ */
+ TInt MdcaCount() const;
+
+ /**
+ * Indexes into a descriptor array.
+ * @param aIndex The position of the descriptor element within the
+ * array. The position is relative to zero; i.e. zero
+ * implies the first descriptor element in the array.
+ * This value must be non-negative and less than the
+ * number of descriptors currently within the array
+ * otherwise the operator panics with
+ * EArrayIndexOutOfRange.
+ * @return A non-modifiable pointer descriptor representing the
+ * descriptor element located at position aIndex within
+ * the array.
+ */
+ TPtrC MdcaPoint(TInt aIndex) const;
+
+ private:
+ /**
+ * Symbian OS two phased constructor.
+ * Completes the construction of the object.
+ */
+ void ConstructL();
+
+ private: //data
+ CStartedTestCase* iStartedTestCase;
+ HBufC* iBuffer;
+
+ };
+
+/**
+* CTestCaseOutputContainer container control class.
+*
+*/
+class CTestCaseOutputContainer : public CCoeControl, public MEikListBoxObserver /* MCoeControlObserver */
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ * @param aRect Frame rectangle for container.
+ */
+ //void ConstructL(const TRect& aRect, TInt aExecutedTestCaseCount );
+ void ConstructL(const TRect& aRect, CStartedTestCase* aStartedTestCase );
+
+ /**
+ * Destructor.
+ */
+ ~CTestCaseOutputContainer();
+
+ public: // New functions
+ /**
+ * Handles addition of item to list box.
+ */
+ void OutputUpdateL();
+
+ private:
+
+ public: // Functions from base classes
+
+ private: // Functions from base classes
+
+ /**
+ * From CoeControl,SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ void SizeChanged();
+
+ /**
+ * From CoeControl,CountComponentControls.
+ * Gets a count of the component controls of this list box control.
+ * This information is used for DrawNow().
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ * Gets a pointer to the specified component control.
+ * @param aIndex Index of the component control to look up.
+ * @return The control at aIndex.
+ */
+ CCoeControl* ComponentControl(TInt aIndex) const;
+
+ /**
+ * From CCoeControl,Draw.
+ * Draw a control, called by window server.
+ * @param aRect The region of the control to be redrawn. Co-ordinates
+ * are relative to the control's origin (top left corner).
+ */
+ void Draw(const TRect& aRect) const;
+
+ /**
+ * Handles list box events.
+ * @param aListBox The originating list box.
+ * @param aEventType A code for the event. Further information may be
+ * obtained by accessing the list box itself.
+ */
+ void HandleListBoxEventL(CEikListBox* aListBox,TListBoxEvent aEventType);
+
+ /**
+ * From CCoeControl,OfferKeyEventL
+ * Handles key events.
+ * @param aKeyEvent The key event.
+ * @param aType The type of key event.
+ * @return Indicates whether or not the key event was used
+ * by this control.
+ */
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+ private: //data
+
+ CEikTextListBox* iListBox;
+ CTestOutputListBoxModel* iListBoxModel;
+ CUIStore* iUIStore;
+
+ };
+
+#endif // TESTCASEOUTPUTCONTAINER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/TestCaseOutputView.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestCaseOutputView class
+* declaration.
+*
+*/
+
+#ifndef TESTCASEOUTPUTVIEW_H
+#define TESTCASEOUTPUTVIEW_H
+
+// INCLUDES
+#include "View.h"
+#include <aknnavide.h>
+
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class CTestCaseOutputContainer;
+
+// CLASS DECLARATION
+
+/**
+* CTestCaseOutputView view class.
+*
+*/
+class CTestCaseOutputView : public CView
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CTestCaseOutputView();
+
+ public: // Functions from base classes
+
+ /**
+ * Returns view´s id.
+ * @return View id.
+ */
+ TUid Id() const;
+
+ /**
+ * Handles a command.
+ * @param aCommand A command ID.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * Handles client rect changes.
+ */
+ void HandleClientRectChange();
+
+ public: // New functions
+
+ /**
+ * Receives output update notification from AppUI
+ * @param aTestCase A pointer to started test case.
+ */
+ void OutputUpdateL( CStartedTestCase* aTestCase );
+
+ /**
+ * Prints test case state to title pane
+ */
+ void PrintTestCaseStateL();
+
+ /**
+ * Handles test case state changed notification
+ */
+ void TestCaseStateChangedL();
+
+ private:
+
+ /**
+ * Initializes view when activated.
+ * @param aPrevViewId Id of the previous view (not used).
+ * @param aCustomMessageId Custom message id (not used).
+ * @param aCustomMessage Custom message (not used).
+ */
+ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * Deactivates view.
+ */
+ void DoDeactivate();
+
+ /** From MEikMenuObserver
+ * Initializes menu pane.
+ * @param aResourceId Menu pane resource ID
+ * @param aMenuPane Menu pane pointer
+ */
+ void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
+
+
+ private: // Data
+ CAknNavigationDecorator* iNaviDecorator;
+ CTestCaseOutputContainer* iContainer;
+ CStartedTestCase* iCurrentTestCase;
+
+ };
+
+#endif //SHOWSTARTEDCASESVIEW_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/TestModulesMenuContainer.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,169 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestModulesListBoxModel class
+* declaration.
+*
+*/
+
+#ifndef CTESTMODULESMENUCONTAINER_H
+#define CTESTMODULESMENUCONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+#include <eiklbo.h>
+
+// #include "RRefArray.h"
+#include <stifinternal/RRefArray.h>
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+class CUIStore;
+
+// CLASS DECLARATION
+class CTestModulesListBoxModel : public CBase, public MDesCArray
+ {
+ public:
+ /**
+ * Destructor.
+ */
+ ~CTestModulesListBoxModel();
+
+ /**
+ * Two-phased constructor.
+ * @param aTestModules Array of test modules names.
+ * @return Pointer to created list box model.
+ */
+ static CTestModulesListBoxModel* NewL(RRefArray<TDesC> aTestModules);
+
+ public: // Functions from base classes
+
+ /**
+ * Returns the number of descriptor elements in the array.
+ * @return The number of descriptor elements.
+ */
+ TInt MdcaCount() const;
+
+ /**
+ * Indexes into a descriptor array.
+ * @param aIndex The position of the descriptor element within the
+ * array. The position is relative to zero; i.e. zero
+ * implies the first descriptor element in the array.
+ * This value must be non-negative and less than the
+ * number of descriptors currently within the array
+ * otherwise the operator panics with
+ * EArrayIndexOutOfRange.
+ * @return A non-modifiable pointer descriptor representing the
+ * descriptor element located at position aIndex within
+ * the array.
+ */
+ TPtrC MdcaPoint(TInt aIndex) const;
+
+ private:
+ /**
+ * Symbian OS two phased constructor.
+ * Completes the construction of the object.
+ */
+ void ConstructL();
+
+ private: //data
+ RRefArray<TDesC> iTestModules;
+ HBufC* iBuffer;
+ };
+
+/**
+* CTestModulesMenuContainer container control class.
+*
+*/
+class CTestModulesMenuContainer : public CCoeControl
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ * @param aRect Frame rectangle for container.
+ */
+ void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
+
+ /**
+ * Destructor.
+ */
+ ~CTestModulesMenuContainer();
+
+ public: // New functions
+
+ /**
+ * Gets the index number of the current item in the view.
+ * @return Index number of the current item.
+ */
+ TInt CurrentItemIndex();
+
+ public: // New functions
+
+ /**
+ * Stores current position of focus of iListBox to the CAppUiAppUi object
+ */
+ void SaveActiveLine();
+
+ private: // Functions from base classes
+
+ /**
+ * From CoeControl,SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ void SizeChanged();
+
+ /**
+ * From CoeControl,CountComponentControls.
+ * Gets a count of the component controls of this list box control.
+ * This information is used for DrawNow().
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ * Gets a pointer to the specified component control.
+ * @param aIndex Index of the component control to look up.
+ * @return The control at aIndex.
+ */
+ CCoeControl* ComponentControl(TInt aIndex) const;
+
+ /**
+ * From CCoeControl,Draw.
+ * Draw a control, called by window server.
+ * @param aRect The region of the control to be redrawn. Co-ordinates
+ * are relative to the control's origin (top left corner).
+ */
+ void Draw(const TRect& aRect) const;
+
+ /**
+ * From CCoeControl,OfferKeyEventL
+ * Handles key events.
+ * @param aKeyEvent The key event.
+ * @param aType The type of key event.
+ * @return Indicates whether or not the key event was used
+ * by this control.
+ */
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+ private: //data
+
+ CEikTextListBox* iListBox;
+ CTestModulesListBoxModel* iListBoxModel;
+ CUIStore* iUIStore;
+ RRefArray<TDesC> iModules;
+ };
+
+#endif // CTESTMODULESMENUCONTAINER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/TestModulesMenuView.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestModulesMenuView class
+* declaration.
+*
+*/
+
+#ifndef TESTMODULEMENUVIEW_H
+#define TESTMODULEMENUVIEW_H
+
+// INCLUDES
+#include "View.h"
+#include <eiklbo.h> // MEikListBoxObserver
+#include <aknnavide.h>
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class CTestModulesMenuContainer;
+
+// CLASS DECLARATION
+
+/**
+* CTestModulesMenuView view class.
+*
+*/
+class CTestModulesMenuView : public CView, public MEikListBoxObserver
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CTestModulesMenuView();
+
+ public: // Functions from base classes
+
+ /**
+ * Returns view´s id.
+ * @return View id.
+ */
+ TUid Id() const;
+
+ /**
+ * Handles a command.
+ * @param aCommand A command ID.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * Handles client rect changes.
+ */
+ void HandleClientRectChange();
+
+ /**
+ * Handles a list box event.
+ * @param aListBox A pointer to list box (not used).
+ * @param aEventType Type of list box event.
+ */
+ void HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType);
+
+ /**
+ * Initializes menu pane.
+ * @param aResourceId Menu pane resource ID.
+ * @param aMenuPane Menu pane pointer.
+ */
+ void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
+
+ private:
+
+ /**
+ * Initializes view when activated.
+ * @param aPrevViewId Id of the previous view (not used).
+ * @param aCustomMessageId Custom message id (not used).
+ * @param aCustomMessage Custom message (not used).
+ */
+ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * Deactivates view.
+ */
+ void DoDeactivate();
+
+ private: // Data
+ CAknNavigationDecorator* iNaviDecorator;
+ CTestModulesMenuContainer* iContainer;
+ };
+
+#endif // TESTMODULEMENUVIEW_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/TestSetBaseMenuContainer.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetBaseMenuContainer
+* class declaration.
+*
+*/
+
+#ifndef CTestSetBaseMenuContainer_H
+#define CTestSetBaseMenuContainer_H
+
+// INCLUDES
+#include <coecntrl.h>
+#include <eiklbo.h>
+
+
+// FORWARD DECLARATIONS
+//class CEikLabel; // for example labels
+class CEikTextListBox;
+
+// CLASS DECLARATION
+
+/**
+* CTestSetBaseMenuContainer container control class.
+*
+*/
+class CTestSetBaseMenuContainer : public CCoeControl
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ * @param aRect Frame rectangle for container.
+ * @return Observer for list box.
+ */
+ void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
+
+ /**
+ * Destructor.
+ */
+ ~CTestSetBaseMenuContainer();
+
+ public: // New functions
+
+ /**
+ * Get currently selected items index.
+ * @return Current item index.
+ */
+ TInt GetActiveLine();
+
+ /**
+ * Stores current position of focus of iListBox to the CAppUiAppUi object
+ */
+ void SaveActiveLine();
+
+ public: // Functions from base classes
+
+ /**
+ * Method HandleSelectedListItemL handles valix index.
+ * @param TInt aIndex
+ * @return nothing
+ */
+ void HandleSelectedListItemL( TInt aIndex );
+
+ private: // Functions from base classes
+
+ /**
+ * From CoeControl,SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ void SizeChanged();
+
+ /**
+ * From CoeControl,CountComponentControls.
+ * Gets a count of the component controls of this list box control.
+ * This information is used for DrawNow().
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ * Gets a pointer to the specified component control.
+ * @param aIndex Index of the component control to look up.
+ * @return The control at aIndex.
+ */
+ CCoeControl* ComponentControl(TInt aIndex) const;
+
+ /**
+ * From CCoeControl,Draw.
+ * Draw a control, called by window server.
+ * @param aRect The region of the control to be redrawn. Co-ordinates
+ * are relative to the control's origin (top left corner).
+ */
+ void Draw(const TRect& aRect) const;
+
+ /**
+ * From CCoeControl,OfferKeyEventL
+ * Handles key events.
+ * @param aKeyEvent The key event.
+ * @param aType The type of key event.
+ * @return Indicates whether or not the key event was used
+ * by this control.
+ */
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+
+ private: //data
+
+ CEikTextListBox* iListBox;
+ };
+
+#endif // CTestSetBaseMenuContainer_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/TestSetBaseMenuView.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,101 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetBaseMenuView class declaration.
+*
+*/
+
+#ifndef TESTSETBASEMENUVIEW_H
+#define TESTSETBASEMENUVIEW_H
+
+// INCLUDES
+#include "View.h"
+#include <eiklbo.h> // MEikListBoxObserver
+#include <aknnavide.h>
+
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class CTestSetBaseMenuContainer;
+
+// CLASS DECLARATION
+
+/**
+* CTestSetBaseMenuView view class.
+*
+*/
+class CTestSetBaseMenuView : public CView, public MEikListBoxObserver
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CTestSetBaseMenuView();
+
+ public: // Functions from base classes
+
+ /**
+ * Returns view´s id.
+ * @return View id.
+ */
+ TUid Id() const;
+
+ /**
+ * Handles a command.
+ * @param aCommand A command ID.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * Handles client rect changes.
+ */
+ void HandleClientRectChange();
+
+ /**
+ * Handles a list box event.
+ * @param aListBox A pointer to list box.
+ * @param aEventType Type of list box event.
+ */
+ void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
+
+ private:
+
+ /**
+ * Initializes view when activated.
+ * @param aPrevViewId Id of the previous view (not used).
+ * @param aCustomMessageId Custom message id (not used).
+ * @param aCustomMessage Custom message (not used).
+ */
+ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * Deactivates view.
+ */
+ void DoDeactivate();
+
+ private: // Data
+ CAknNavigationDecorator* iNaviDecorator;
+ CTestSetBaseMenuContainer* iContainer;
+ };
+
+#endif
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/TestSetInsertMenuContainer.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,133 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetInsertMenuContainer
+* class definition.
+*
+*/
+
+#ifndef TESTSETINSERTMENUCONTAINER_H
+#define TESTSETINSERTMENUCONTAINER_H
+
+// INCLUDES
+#include "Container.h"
+
+#include <coecntrl.h>
+#include <eiklbo.h> // MEikListBoxObserver
+#include <bamdesca.h> // MDesCArray
+#include <aknsfld.h>
+
+//#include "RRefArray.h"
+//#include "UIEngine.h"
+//#include "UIStoreIf.h"
+//#include "UIStoreContainer.h"
+
+#include <stifinternal/RRefArray.h>
+#include <stifinternal/UIEngine.h>
+#include <stifinternal/UIStoreIf.h>
+#include <stifinternal/UIStoreContainer.h>
+
+
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+class CDesC16Array;
+
+class CTestSetInsertMenuView;
+class CEikColumnListBox;
+class CStartedTestCase;
+
+class CUIStoreHandler;
+class CUIStore;
+class CUIStoreIf;
+class CUIEngineContainer;
+class CUIEngine;
+
+// CLASS DECLARATION
+/**
+* CTestSetInsertMenuContainer container control class.
+*
+*/
+class CTestSetInsertMenuContainer : public CContainer //public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ * @param aRect Frame rectangle for container.
+ */
+ void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
+
+ /**
+ * Destructor.
+ */
+ ~CTestSetInsertMenuContainer();
+
+ public: // New functions
+
+ /**
+ * Stores current position of focus of iListBox to the CAppUiAppUi object
+ */
+ void SaveActiveLine();
+
+ public: // Functions from base classes
+
+ private: // Functions from base classes
+
+ /**
+ * From CoeControl,SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ void SizeChanged();
+
+ /**
+ * From CoeControl,CountComponentControls.
+ * Gets a count of the component controls of this list box control.
+ * This information is used for DrawNow().
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ * Gets a pointer to the specified component control.
+ * @param aIndex Index of the component control to look up.
+ * @return The control at aIndex.
+ */
+ CCoeControl* ComponentControl(TInt aIndex) const;
+
+ /**
+ * From CCoeControl,Draw.
+ * Draw a control, called by window server.
+ * @param aRect The region of the control to be redrawn. Co-ordinates
+ * are relative to the control's origin (top left corner).
+ */
+ void Draw(const TRect& aRect) const;
+
+ /**
+ * From CCoeControl,OfferKeyEventL
+ * Handles key events.
+ * @param aKeyEvent The key event.
+ * @param aType The type of key event.
+ * @return Indicates whether or not the key event was used
+ * by this control.
+ */
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+ private: //data
+
+ CTestSetInsertMenuView* iParentView;
+ };
+
+#endif // CTestSetInsertMenuContainer_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/TestSetInsertMenuView.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,123 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetInsertMenuView class
+* declaration.
+*
+*/
+
+#ifndef TESTSETINSERTMENUVIEW_H
+#define TESTSETINSERTMENUVIEW_H
+
+// INCLUDES
+#include "View.h"
+#include <eiklbo.h> // MEikListBoxObserver
+#include <aknnavide.h>
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class CTestSetInsertMenuContainer;
+
+
+// CLASS DECLARATION
+
+/**
+* CTestCaseMenuView view class.
+*
+*/
+class CTestSetInsertMenuView : public CView, public MEikListBoxObserver //CAknView
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CTestSetInsertMenuView();
+
+ public: // Functions from base classes
+
+ /**
+ * Returns view´s id.
+ * @return View id.
+ */
+ TUid Id() const;
+
+ /**
+ * Handles a command.
+ * @param aCommand A command ID.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * Handles client rect changes.
+ */
+ void HandleClientRectChange();
+
+ /**
+ * Handles a list box event.
+ * @param aListBox A pointer to list box.
+ * @param aEventType Type of list box event.
+ */
+ void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
+
+ public: // New functions
+
+ /**
+ * Adds selected test cases to the current test set.
+ * @param aSelectedIndexes Indexes of selected test cases.
+ */
+ void AddCasesToTestSet( RArray<TInt> aSelectedIndexes );
+
+ private:
+
+ /**
+ * Initializes view when activated.
+ * @param aPrevViewId Id of the previous view (not used).
+ * @param aCustomMessageId Custom message id (not used).
+ * @param aCustomMessage Custom message (not used).
+ */
+ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * Deactivates view.
+ */
+ void DoDeactivate();
+
+ /**
+ * Initializes menu pane.
+ * @param aResourceId Menu pane resource ID.
+ * @param aMenuPane Menu pane pointer.
+ */
+ void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
+
+ /**
+ * Show confirmation dialog for inserting test cases.
+ */
+ void ShowInsertCasesDialogL();
+
+ private: // Data
+ CAknNavigationDecorator* iNaviDecorator;
+ CTestSetInsertMenuContainer* iContainer;
+ TInt iCurrentTestCase;
+ };
+
+#endif //TestSetInsertMenuView_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/TestSetMenuContainer.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,209 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetMenuContainer class
+* declaration.
+*
+*/
+
+#ifndef TestSetMenuContainer_H
+#define TestSetMenuContainer_H
+
+// INCLUDES
+#include <coecntrl.h>
+#include <eiklbo.h> // MEikListBoxObserver
+#include <bamdesca.h> // MDesCArray
+#include <aknsfld.h>
+
+//#include "RRefArray.h"
+//#include "UIEngine.h"
+//#include "UIStoreIf.h"
+//#include "UIStoreContainer.h"
+
+#include <stifinternal/RRefArray.h>
+#include <stifinternal/UIEngine.h>
+#include <stifinternal/UIStoreIf.h>
+#include <stifinternal/UIStoreContainer.h>
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+class CDesC16Array;
+
+class CTestSetMenuView;
+class CEikColumnListBox;
+class CTestCaseListBoxModel;
+
+class CUIStoreHandler;
+class CUIStore;
+class CUIStoreIf;
+class CUIEngineContainer;
+class CUIEngine;
+
+// CLASS DECLARATION
+/**
+* CTestSetMenuContainer container control class.
+*
+*/
+class CTestSetMenuContainer : public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ * @param aRect Frame rectangle for container.
+ */
+ void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
+
+ /**
+ * Destructor.
+ */
+ ~CTestSetMenuContainer();
+
+ public: // New functions
+ /**
+ * Show only testcases which are defined is specified module.
+ * @param aModuleName Module which test cases are shown.
+ */
+ void FilterCasesByModuleL(TName aModuleName);
+
+ /**
+ * Show only testcases which are defined in specified test case file.
+ * @param aTestCaseFileName Test cases file name.
+ */
+ void FilterCasesByTCFileNameL(TFileName aTestCaseFileName);
+
+ /**
+ * Remove possible filtering of test cases -> show all test cases.
+ */
+ void NoFilteringL();
+
+ /**
+ * Returns pointers to selected test cases.
+ * @param aSelectedTestCases Currently selected test case.
+ */
+ void SelectedTestCases(RPointerArray<CTestInfo>& aSelectedTestCases);
+
+ /**
+ * Sets graphic icon using listbox as CEikColumnListBox.
+ * @param aListBox Pointer to list box.
+ */
+ void SetGraphicIconL( CEikColumnListBox* aListBox );
+
+ /**
+ * Appends graphics data.
+ * @param aIcons Pointer array of icons.
+ */
+ void GraphicIconL( CArrayPtr<CGulIcon>* aIcons );
+
+ /**
+ * Gets the index number of the current item in the view.
+ * @return Index number of the current item.
+ */
+ TInt CurrentItemIndex();
+
+ /**
+ * Sets the current item.
+ * @param aIndex Index of the item to make current.
+ */
+ void SetCurrentItemIndex(TInt aCurrentTestCase);
+
+ /**
+ * Inline function for getting pointer to list box.
+ * @return Pointer to list box.
+ */
+ inline CEikListBox* ListBox() { return (CEikListBox*)iListBox; };
+
+ /**
+ * Processes user commands.
+ * @param aCommand ID of the command to respond to.
+ */
+ void ProcessCommandL( TInt aCommand );
+
+ /**
+ * Processes user commands.
+ * @param aCommand ID of the command to respond to.
+ */
+ void SelectionListProcessCommandL( TInt aCommand );
+
+ /**
+ * Handles mark commands.
+ * @param aCommand ID of the command to respond to.
+ */
+ void HandleMarkCommandL( TInt aCommand );
+
+ /**
+ * Removes items from list box.
+ * @param aSelected Indexes of removed items.
+ */
+ void RemoveListBoxItemL( TInt aSelected );
+
+ /**
+ * Stores current position of focus of iListBox to the CAppUiAppUi object
+ */
+ void SaveActiveLine();
+
+ public: // Functions from base classes
+
+ private: // Functions from base classes
+
+ /**
+ * From CoeControl,SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ void SizeChanged();
+
+ /**
+ * From CoeControl,CountComponentControls.
+ * Gets a count of the component controls of this list box control.
+ * This information is used for DrawNow().
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ * Gets a pointer to the specified component control.
+ * @param aIndex Index of the component control to look up.
+ * @return The control at aIndex.
+ */
+ CCoeControl* ComponentControl(TInt aIndex) const;
+
+ /**
+ * From CCoeControl,Draw.
+ * Draw a control, called by window server.
+ * @param aRect The region of the control to be redrawn. Co-ordinates
+ * are relative to the control's origin (top left corner).
+ */
+ void Draw(const TRect& aRect) const;
+
+ /**
+ * From CCoeControl,OfferKeyEventL
+ * Handles key events.
+ * @param aKeyEvent The key event.
+ * @param aType The type of key event.
+ * @return Indicates whether or not the key event was used
+ * by this control.
+ */
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+ private: //data
+
+ CTestSetMenuView* iParentView;
+ CEikColumnListBox* iListBox;
+ CTestCaseListBoxModel* iListBoxModel;
+ RPointerArray<CTestInfo> iTestCasesInView;
+ CUIStore* iUIStore;
+ };
+
+#endif // CTestSetMenuContainer_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/TestSetMenuView.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,167 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetMenuView class declaration.
+*
+*/
+
+#ifndef TESTSETMENUVIEW_H
+#define TESTSETMENUVIEW_H
+
+// INCLUDES
+#include "View.h"
+#include <eiklbo.h> // MEikListBoxObserver
+#include <aknnavide.h>
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class CTestSetMenuContainer;
+
+// CLASS DECLARATION
+/**
+* CTestCaseMenuView view class.
+*/
+class CTestSetMenuView : public CView, public MEikListBoxObserver
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CTestSetMenuView();
+
+ public: // Functions from base classes
+
+ /**
+ * Returns view´s id.
+ * @return View id.
+ */
+ TUid Id() const;
+
+ /**
+ * Handles a command.
+ * @param aCommand A command ID.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * Handles client rect changes.
+ */
+ void HandleClientRectChange();
+
+ public: // From MEikListBoxObserver
+
+ /**
+ * Handles list box event.
+ * @param aListBox Pointer to list box.
+ * @param aEventType List box event.
+ */
+ void HandleListBoxEventL(CEikListBox* aListBox,
+ TListBoxEvent aEventType);
+
+ public: // New functions
+
+ /**
+ * Starts all cases in active test set.
+ */
+ void StartTestSetL();
+
+ /**
+ * Removes selected test cases from active test set.
+ */
+ void RemoveSelectedTestCasesL();
+
+ /**
+ * Creates new test set.
+ * @param aTestSetName Name of the test set.
+ * @return Symbian OS error code.
+. */
+ TInt CreateTestSetL( const TDesC& aTestSetName );
+
+ /**
+ * Loads saved test set.
+ * @param aTestSetName Name of the test set.
+ * @return Symbian OS error code.
+ */
+ TInt LoadTestSetL( const TDesC& aTestSetName );
+
+ /**
+ * Saves current test set.
+ * @return Symbian OS error code.
+ */
+ TInt SaveCurrentTestSetL();
+
+ /**
+ * Removes current test set.
+ * @return Symbian OS error code.
+ */
+ TInt RemoveActiveTestSet();
+
+ /**
+ * Get name of the current test set.
+ * @return Name of the current test set.
+ */
+ inline const TDesC& CurrentTestSet()
+ { return iCurrentTestSet; }
+
+ /**
+ * Set save needed flag.
+ */
+ inline void SetSaveNeeded( TBool aSave )
+ { iSaveNeeded = aSave; }
+
+ private: // From AknView
+
+ /**
+ * Initializes view when activated.
+ * @param aPrevViewId Id of the previous view (not used).
+ * @param aCustomMessageId Custom message id (not used).
+ * @param aCustomMessage Custom message (not used).
+ */
+ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * Deactivates view.
+ */
+ void DoDeactivate();
+
+ private: // From MEikMenuObserver
+
+ /**
+ * Initializes menu pane.
+ * @param aResourceId Menu pane resource ID.
+ * @param aMenuPane Menu pane pointer.
+ */
+ void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
+
+ private: // Data
+ CAknNavigationDecorator* iNaviDecorator;
+ CTestSetMenuContainer* iContainer;
+ CUIStore* iUIStore;
+ TInt iCurrentTestCase;
+ TInt iTestSetIndex;
+ TBuf<50> iCurrentTestSet;
+ TBool iSaveNeeded;
+
+ };
+
+#endif // TESTSETMENUVIEW_H
+
+// End of File
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/TestSetStartedCasesContainer.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,193 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetStartedCasesContainer
+* class declaration.
+*
+*/
+
+#ifndef TESTSETSTARTEDCASESCONTAINER_H
+#define TESTSETSTARTEDCASESCONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+#include <eiklbo.h>
+#include <bamdesca.h> // MDesCArray
+
+//#include "RRefArray.h"
+#include <stifinternal/RRefArray.h>
+
+
+// Define *.mbm file name.
+_LIT(KMbmFileName, "\\Resource\\Apps\\Stifui.mbm");
+
+// FORWARD DECLARATIONS
+class CEikTextListBox;
+class CAknSingleGraphicStyleListBox;
+class CDesC16ArrayFlat;
+class CStartedTestCase;
+
+class CUIStore;
+class CStartedTestsListBoxModel;
+
+// CLASS DECLARATION
+
+/**
+* CTestSetStartedCasesContainer container control class.
+*
+*/
+class CTestSetStartedCasesContainer : public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ * @param aRect Frame rectangle for container.
+ */
+ void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
+
+ /**
+ * Destructor.
+ */
+ ~CTestSetStartedCasesContainer();
+
+ public: // New functions
+
+ /**
+ * Returns reference to currently selected test case in view (listbox).
+ * @return Currently selected test case.
+ */
+ CStartedTestCase* SelectedTestCase();
+
+ /**
+ * Constructs list box model.
+ */
+ void ConstructListBoxModelL();
+
+ /**
+ * Draws the list box.
+ */
+ void DrawListBox();
+
+ /**
+ * Returns count of test cases in view.
+ * @return Count of test cases in view.
+ */
+ TInt TestsInViewCount();
+
+ /**
+ * Handles the addition of an item to the model.
+ */
+ void HandleItemAdditionL();
+
+ /**
+ * Handles the removal of an item from the model.
+ */
+ void HandleItemRemovalL();
+
+ /**
+ * Returns pointer to currently selected test case.
+ * @param Current test case.
+ */
+ CStartedTestCase* CurrentTestCase();
+
+ /**
+ * Gets the index number of the current item in the view.
+ * @return Index number of the current item.
+ */
+ TInt CurrentItemIndex();
+
+ /**
+ * Sets the current item.
+ * @param aIndex Index of the item to make current.
+ */
+ void SetCurrentItemIndex(TInt aIndex);
+
+ /**
+ * Resets the selection indices, top and current item indices,
+ * the selection, and the horizontal scroll offset of this list box.
+ * This function does not redraw the list box.
+ */
+ void ResetListBox();
+
+ /**
+ * Removes items from list box.
+ */
+ void RemoveSelectedExecutionsL();
+
+ /**
+ * Removes all started test cases from list box.
+ */
+ void RemoveAllExecutionsInViewL();
+
+ /**
+ * Stores current position of focus of iListBox to the CAppUiAppUi object
+ */
+ void SaveActiveLine();
+
+ private: // New functions
+
+ public: // Functions from base classes
+
+ private: // Functions from base classes
+
+ /**
+ * From CoeControl,SizeChanged.
+ * Called by framework when the view size is changed.
+ */
+ void SizeChanged();
+
+ /**
+ * From CoeControl,CountComponentControls.
+ * Gets a count of the component controls of this list box control.
+ * This information is used for DrawNow().
+ */
+ TInt CountComponentControls() const;
+
+ /**
+ * From CCoeControl,ComponentControl.
+ * Gets a pointer to the specified component control.
+ * @param aIndex Index of the component control to look up.
+ * @return The control at aIndex.
+ */
+ CCoeControl* ComponentControl(TInt aIndex) const;
+
+ /**
+ * From CCoeControl,Draw.
+ * Draw a control, called by window server.
+ * @param aRect The region of the control to be redrawn. Co-ordinates
+ * are relative to the control's origin (top left corner).
+ */
+ void Draw(const TRect& aRect) const;
+
+ /**
+ * From CCoeControl,OfferKeyEventL
+ * Handles key events.
+ * @param aKeyEvent The key event.
+ * @param aType The type of key event.
+ * @return Indicates whether or not the key event was used
+ * by this control.
+ */
+ TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
+
+ private: //data
+
+ CEikTextListBox* iListBox;
+ CStartedTestsListBoxModel* iListBoxModel;
+ RRefArray<CStartedTestCase> iStartedTestsPtrs;
+ CUIStore* iUIStore;
+ };
+
+#endif // CTestSetStartedCasesCONTAINER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/TestSetStartedCasesView.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,130 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetStartedCasesView class
+* declaration.
+*
+*/
+
+#ifndef TESTSETSTARTEDCASESVIEW_H
+#define TESTSETSTARTEDCASESVIEW_H
+
+// INCLUDES
+#include "View.h"
+#include <eiklbo.h> // MEikListBoxObserver
+#include <aknnavide.h> //CAknNavigationDecorator
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class CTestSetStartedCasesContainer;
+
+// CLASS DECLARATION
+
+/**
+* CTestSetStartedCasesView view class.
+*
+*/
+class CTestSetStartedCasesView : public CView, public MEikListBoxObserver
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CTestSetStartedCasesView();
+
+ public: // Functions from base classes
+
+ /**
+ * Returns view´s id.
+ * @return View id.
+ */
+ TUid Id() const;
+
+ /**
+ * Handles a command.
+ * @param aCommand A command ID.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ /**
+ * Handles client rect changes.
+ */
+ void HandleClientRectChange();
+
+ /**
+ * Handles a list box event.
+ * @param aListBox A pointer to list box (not used).
+ * @param aEventType Type of list box event.
+ */
+ void HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType);
+
+ public: // New functions
+
+ /**
+ * Handles status changes of test cases in view.
+ */
+ void TestCaseStateChangedL();
+
+ /**
+ * Handles call to view test case´s output data.
+ */
+ void ViewTestCaseOutputL();
+
+ private:
+
+ /**
+ * Initializes view when activated.
+ * @param aPrevViewId Id of the previous view (not used).
+ * @param aCustomMessageId Custom message id (not used).
+ * @param aCustomMessage Custom message (not used).
+ */
+ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * Deactivates view.
+ */
+ void DoDeactivate();
+
+ /**
+ * Initializes menu pane.
+ * @param aResourceId Menu pane resource ID.
+ * @param aMenuPane Menu pane pointer.
+ */
+ void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
+
+ /**
+ * Refreshes view name shown in the navi pane.
+ */
+ void RefreshNaviTitleL();
+
+ private: // Data
+ CAknNavigationDecorator* iNaviDecorator;
+ CTestSetStartedCasesContainer* iContainer;
+ TName iFilterModule;
+ TFileName iFilterTestCaseFile;
+ TInt iSelectedTestCase; // Which testcase was
+ // selected when view
+ // was active earlier.
+ };
+
+#endif //TestSetStartedCasesVIEW_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/UIStoreHandler.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,135 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CUIStoreHandler class declaration.
+*
+*/
+
+#ifndef UISTOREHANDLER_H
+#define UISTOREHANDLER_H
+
+// INCLUDES
+//#include "UIStoreIf.h"
+//#include "UIStore.h"
+//#include "UIEngine.h"
+
+#include <stifinternal/UIStoreIf.h>
+#include <stifinternal/UIStore.h>
+#include <stifinternal/UIEngine.h>
+
+#include "AppUIAppUi.h"
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// DATA TYPES
+// None
+
+// FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+// None
+
+// CLASS DECLARATION
+// None
+class CAppUIAppUi;
+
+// DESCRIPTION
+// CUIStoreHandler is a STIF Test Framework Series60 UI class.
+// CUIStoreHandler's methods purpose is to offer handle to UI Engine.
+// Because multible inheritance in not allowed in SOS we cannot
+// inheritance CUIStore class direct so we use this class.
+
+class CUIStoreHandler
+ :public CUIStoreIf
+ {
+ public: // Enumerations
+
+ private: // Enumerations
+
+ public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ * @param aAppUIAppUI Pointer to application ui.
+ * @return Pointer to UIStoreHandler.
+ */
+ static CUIStoreHandler* NewL( CAppUIAppUi* aAppUIAppUI );
+
+ /**
+ * Destructor.
+ */
+ ~CUIStoreHandler();
+
+ public: // New functions
+
+ /**
+ * C++ default constructor.
+ * @param aAppUIAppUI Pointer to application ui.
+ */
+ CUIStoreHandler( CAppUIAppUi* aAppUIAppUI );
+
+ /**
+ * Receives output update notify from started test case.
+ * Checks if that test case is currently in output view then
+ * sends notification to AppUI which handles notification onward.
+ * @param aTestCase
+ * @param aStatus
+ */
+ void Update( CStartedTestCase* aTestCase, TInt aStatus );
+
+ public: // Functions from base classes
+
+ protected: // New functions
+
+ protected: // Functions from base classes
+
+ private:
+
+ /**
+ * By default Symbian OS constructor is private.
+ */
+ void ConstructL();
+
+ public: // Data
+
+ /**
+ * Returns the AppUI of the application
+ * @return Pointer to the Application UI.
+ */
+ CAppUIAppUi* iAppUIAppUI;
+
+ /**
+ * Counter for executed test cases
+ */
+ TInt iExecutedTestCaseCount;
+
+ protected: // Data
+
+ private: // Data
+
+ public: // Friend classes
+
+ protected: // Friend classes
+
+ private: // Friend classes
+
+ };
+
+#endif // UISTOREHANDLER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/View.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,101 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CView class declaration.
+*
+*/
+
+#ifndef VIEW_H
+#define VIEW_H
+
+// INCLUDES
+#include <aknview.h>
+
+//#include "UIStoreIf.h"
+#include <stifinternal/UIStoreIf.h>
+
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+//class CMainMenuContainer;
+
+// CLASS DECLARATION
+
+/**
+* CMainMenuView view class.
+*
+*/
+class CView : public CAknView
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Symbian OS default constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Destructor.
+ */
+ ~CView();
+
+ public: // Functions from base classes
+
+ /**
+ * Returns view´s id.
+ * @return View id.
+ */
+ virtual TUid Id() const;
+
+ /**
+ * Handles a command.
+ * @param aCommand A command ID.
+ */
+ virtual void HandleCommandL( TInt aCommand );
+
+ /**
+ * Handles client rect changes.
+ */
+ virtual void HandleClientRectChange();
+
+ private:
+
+ /**
+ * Initializes view when activated.
+ * @param aPrevViewId Id of the previous view (not used).
+ * @param aCustomMessageId Custom message id (not used).
+ * @param aCustomMessage Custom message (not used).
+ */
+ virtual void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * Deactivates view.
+ */
+ virtual void DoDeactivate();
+
+ protected: // Data
+
+ /**
+ * Pointer to UI Store.
+ */
+ CUIStore* iUIStore;
+
+
+ private: // Data
+
+ };
+
+#endif // VIEW_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/inc/version.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains STIF UI version declaration.
+*
+*/
+
+#ifndef VERSION_H_
+#define VERSION_H_
+
+#define STIFUI_MAJOR_VERSION 7
+#define STIFUI_MINOR_VERSION 3
+#define STIFUI_BUILD_VERSION 30
+
+#define STIFUI_REL_DATE "06th Apr 2010"
+
+#define TO_UNICODE(text) _L(text)
+
+#endif /*VERSION_H_*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/AppUIApp.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CAppUIApp class definition.
+*
+*/
+
+// INCLUDE FILES
+#include "AppUIApp.h"
+#include "AppUIDocument.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CSTIFAppUIApp::AppDllUid()
+// Returns application UID
+// ---------------------------------------------------------
+//
+TUid CAppUIApp::AppDllUid() const
+ {
+ return KUidAppUI;
+ }
+
+
+// ---------------------------------------------------------
+// CSTIFAppUIApp::CreateDocumentL()
+// Creates CSTIFAppUIDocument object
+// ---------------------------------------------------------
+//
+CApaDocument* CAppUIApp::CreateDocumentL()
+ {
+ return CAppUIDocument::NewL( *this );
+ }
+
+// ================= OTHER EXPORTED FUNCTIONS ==============
+//
+
+ #include <eikstart.h>
+ // ---------------------------------------------------------
+ // NewApplication()
+ // Exported function
+ // Returns: CApaApplication:
+ // ---------------------------------------------------------
+ //
+ LOCAL_C CApaApplication* NewApplication()
+ {
+ return new CAppUIApp;
+ }
+ // ---------------------------------------------------------
+ // E32Main()
+ // EXE Entry point
+ // Returns: KErrNone: No error
+ // ---------------------------------------------------------
+ //
+ GLDEF_C TInt E32Main()
+ {
+ return EikStart::RunApplication(NewApplication);
+ }
+
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/AppUIAppUi.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,698 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains TMessageBoxUtil class definition.
+*
+*/
+
+// INCLUDE FILES
+#include "AppUIAppUi.h"
+
+#include "MainMenuView.h"
+#include "TestCaseMenuView.h"
+#include "StartCasesView.h"
+#include "TestModulesMenuView.h"
+#include "StartedCasesMenuView.h"
+#include "ShowStartedCasesView.h"
+#include "TestCaseOutputView.h"
+#include "StatisticsView.h"
+#include "TestSetBaseMenuView.h"
+#include "TestSetMenuView.h"
+#include "TestSetInsertMenuView.h"
+#include "TestSetStartedCasesView.h"
+#include <aknmessagequerydialog.h>
+#include "version.h"
+
+#include "CreatedTestSetMenuView.h"
+
+#include <Stifui.rsg>
+#include "Stifui.hrh"
+
+
+#include <StifTestInterface.h>
+
+#include <aknnotewrappers.h>
+#include <StringLoader.h>
+
+_LIT( KTestSet, "DefaultSet" );
+
+static const TInt KCopyrightChar = 169;
+
+// ----------------------------------------------------------
+// CMessageBoxUtil::ShowNotImplementedYetL
+// Displays message that executed funtion is not implemented yet.
+// ----------------------------------------------------------
+//
+void TMessageBoxUtil::ShowNotImplementedYetL()
+ {
+ _LIT(message, "Not implemented yet");
+ CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
+ informationNote->ExecuteLD(message);
+ }
+
+// ----------------------------------------------------------
+// Display error note.
+// @param aMessage Error message to display.
+// ----------------------------------------------------------
+//
+void TMessageBoxUtil::ShowErrorNoteL( const TDesC& aMessage )
+ {
+ CAknErrorNote* errorNote = new (ELeave) CAknErrorNote(ETrue);
+ // set timeout to 5 sec
+ errorNote->SetTimeout( (CAknNoteDialog::TTimeout)5000000 );
+ errorNote->ExecuteLD( aMessage );
+ }
+
+// ================= MEMBER FUNCTIONS =======================
+//
+// ----------------------------------------------------------
+// CAppUIAppUi::ConstructL()
+// ?implementation_description
+// ----------------------------------------------------------
+//
+void CAppUIAppUi::ConstructL()
+ {
+ TInt error(0);
+
+ BaseConstructL( EAknEnableSkin );
+
+ // connection to setting server needs to be open as long as STIF Series 60 UI APP is alive
+ TInt ret = iSettingServer.Connect();
+ if ( ret != KErrNone )
+ {
+ User::Leave( ret );
+ }
+
+ iLogger = CStifLogger::NewL( _L("E\x3a\\"), _L("stif_tfw_ui"),
+ CStifLogger::ETxt, CStifLogger::EFile,
+ ETrue, EFalse, ETrue, EFalse, EFalse );
+
+ iLogger->Log( _L("--- UI log starts ---") );
+ iLogger->Log( _L(" ") );
+ iLogger->Log( _L("appui: ConstructL") );
+
+ // Create CData object which handles all test cases data and running of them
+ iUIStoreHandler = CUIStoreHandler::NewL( this );
+
+ // CUIStore open
+ error = UIStoreHandler()->Open( KDefaultPathAndIni );
+ if ( KErrNone != error )
+ {
+ User::Leave( error );
+ }
+
+ CMainMenuView* mainMenuView = new (ELeave) CMainMenuView;
+ CleanupStack::PushL( mainMenuView );
+ mainMenuView->ConstructL();
+ AddViewL( mainMenuView ); // transfer ownership to CAknViewAppUi
+ CleanupStack::Pop(); // MainMenuView
+
+ iLogger->Log(_L("appui:mainview "));
+
+ CCreatedTestSetMenuView* testCreatedTestSetMenuView = new (ELeave) CCreatedTestSetMenuView;
+ CleanupStack::PushL( testCreatedTestSetMenuView );
+ testCreatedTestSetMenuView->ConstructL();
+ AddViewL( testCreatedTestSetMenuView ); // transfer ownership to CAknViewAppUi
+ CleanupStack::Pop(); // testCaseMenuView
+ CTestCaseMenuView* testCaseMenuView = new (ELeave) CTestCaseMenuView;
+ CleanupStack::PushL( testCaseMenuView );
+ testCaseMenuView->ConstructL();
+ AddViewL( testCaseMenuView ); // transfer ownership to CAknViewAppUi
+ CleanupStack::Pop(); // testCaseMenuView
+
+ iLogger->Log(_L("appui:caseview "));
+
+ CStartCasesView* startCasesView = new (ELeave) CStartCasesView;
+ CleanupStack::PushL( startCasesView );
+ startCasesView->ConstructL();
+ AddViewL( startCasesView ); // transfer ownership to CAknViewAppUi
+ CleanupStack::Pop(); // startCasesView
+
+ iLogger->Log(_L("appui:startcaseview "));
+
+ CStartedCasesMenuView* startedCasesMenuView = new (ELeave) CStartedCasesMenuView;
+ CleanupStack::PushL( startedCasesMenuView );
+ startedCasesMenuView->ConstructL();
+ AddViewL( startedCasesMenuView ); // transfer ownership to CAknViewAppUi
+ CleanupStack::Pop(); // startedCasesMenuView
+
+ iLogger->Log(_L("appui:started cases view created"));
+
+ CShowStartedCasesView* showStartedCasesView = new (ELeave) CShowStartedCasesView;
+ CleanupStack::PushL( showStartedCasesView );
+ showStartedCasesView->ConstructL();
+ AddViewL( showStartedCasesView ); // transfer ownership to CAknViewAppUi
+ CleanupStack::Pop(); // showStartedCasesView
+
+ iLogger->Log(_L("appui: show started cases view created"));
+
+ CTestCaseOutputView* testCaseOutputView = new (ELeave) CTestCaseOutputView;
+ CleanupStack::PushL( testCaseOutputView );
+ testCaseOutputView->ConstructL();
+ AddViewL( testCaseOutputView ); // transfer ownership to CAknViewAppUi
+ CleanupStack::Pop(); // testCaseOutputView
+
+ iLogger->Log(_L("appui: test case output view created"));
+
+ CTestModulesMenuView* testModulesMenuView = new (ELeave) CTestModulesMenuView;
+ CleanupStack::PushL( testModulesMenuView );
+ testModulesMenuView->ConstructL();
+ AddViewL( testModulesMenuView ); // transfer ownership to CAknViewAppUi
+ CleanupStack::Pop(); // testModulesMenuView
+
+ iLogger->Log(_L("appui:modulesview "));
+
+ CStatisticsView* statisticsMenuView = new (ELeave) CStatisticsView;
+ CleanupStack::PushL( statisticsMenuView );
+ statisticsMenuView->ConstructL();
+ AddViewL( statisticsMenuView ); // transfer ownership to CAknViewAppUi
+ CleanupStack::Pop(); // statisticsMenuView
+
+ iLogger->Log(_L("appui:modulesview "));
+
+ //
+ CTestSetBaseMenuView* testSetBaseMenuView = new (ELeave) CTestSetBaseMenuView;
+ CleanupStack::PushL( testSetBaseMenuView );
+ testSetBaseMenuView->ConstructL();
+ AddViewL( testSetBaseMenuView ); // transfer ownership to CAknViewAppUi
+ CleanupStack::Pop(); // testSetBaseMenuView
+
+ iLogger->Log(_L("appui:testsetsbaseview "));
+
+ CTestSetMenuView* testSetMenuView = new (ELeave) CTestSetMenuView;
+ CleanupStack::PushL( testSetMenuView );
+ testSetMenuView->ConstructL();
+ AddViewL( testSetMenuView ); // transfer ownership to CAknViewAppUi
+ CleanupStack::Pop(); // testSetMenuView
+
+ iLogger->Log(_L("appui:testsetsview "));
+
+ CTestSetInsertMenuView* testSetInsertMenuView = new (ELeave) CTestSetInsertMenuView;
+ CleanupStack::PushL( testSetInsertMenuView );
+ testSetInsertMenuView->ConstructL();
+ AddViewL( testSetInsertMenuView ); // transfer ownership to CAknViewAppUi
+ CleanupStack::Pop(); // testSetInsertMenuView
+
+ iLogger->Log(_L("appui:testsetinsertview "));
+
+ CTestSetStartedCasesView* testSetStartedCasesView = new (ELeave) CTestSetStartedCasesView;
+ CleanupStack::PushL( testSetStartedCasesView );
+ testSetStartedCasesView->ConstructL();
+ AddViewL( testSetStartedCasesView ); // transfer ownership to CAknViewAppUi
+ CleanupStack::Pop(); // testSetStartedCasesView
+
+ iLogger->Log(_L("appui:testsetStartedCasesView "));
+
+
+ SetDefaultViewL( *mainMenuView );
+
+ iLogger->Log(_L("appui:setdefview "));
+
+ iStartedTestCase = NULL;
+ iStartedTestSet = -1;
+
+ iPreviousPositionListValid = ETrue;
+ }
+
+// ----------------------------------------------------
+// CAppUIAppUi::~CAppUIAppUi()
+// Destructor
+// Frees reserved resources
+// ----------------------------------------------------
+//
+CAppUIAppUi::~CAppUIAppUi()
+ {
+
+ if ( iLogger )
+ {
+ iLogger->Log( _L(" ") );
+ iLogger->Log( _L("--- UI log ends ---") );
+ }
+
+ delete iLogger;
+ iSettingServer.Close();
+ UIStoreHandler()->Close();
+ delete iUIStoreHandler;
+
+ // Closing of array of positions of focus in various menus
+ iPreviousFocusPosition.Close();
+ // iPreviousFocusPosition is no longer valid and cannot be used any more
+ iPreviousPositionListValid = EFalse;
+ //RemoveView(EMainMenuViewId);
+ }
+
+// ------------------------------------------------------------------------------
+// CAppUIAppUi::Data( )
+// Just returns pointer to CUIStore object, which is created by CAppUIAppUi
+// ------------------------------------------------------------------------------
+//
+CUIStore* CAppUIAppUi::UIStoreHandler()
+ {
+ return &iUIStoreHandler->UIStore();
+
+ }
+
+// ------------------------------------------------------------------------------
+// CAppUIAppUi::::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
+// This function is called by the EIKON framework just before it displays
+// a menu pane. Its default implementation is empty, and by overriding it,
+// the application can set the state of menu items dynamically according
+// to the state of application data.
+// ------------------------------------------------------------------------------
+//
+void CAppUIAppUi::DynInitMenuPaneL(
+ TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
+ {
+
+ }
+
+// ----------------------------------------------------
+// CAppUIAppUi::HandleKeyEventL(
+// const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
+// ?implementation_description
+// ----------------------------------------------------
+//
+TKeyResponse CAppUIAppUi::HandleKeyEventL(
+ const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
+ {
+ TInt currentView;
+
+ if ( iView )
+ {
+ currentView = (iView->Id()).iUid;
+
+
+ switch ( aKeyEvent.iCode )
+ {
+ case EKeyLeftArrow:
+ {
+ switch ( currentView )
+ {
+ case ETestModulesMenuViewId:
+ {
+ HandleCommandL( EAppUIGoToTestCaseMenu );
+ break;
+ }
+ case ETestSetBaseMenuViewId:
+ {
+ HandleCommandL( EAppUIGoToModulesMenu );
+ ActivateLocalViewL(TUid::Uid(ETestModulesMenuViewId));
+ break;
+ }
+ }
+ break;
+ }
+ case EKeyRightArrow:
+ {
+ switch ( currentView )
+ {
+ case ETestCaseMenuViewId:
+ {
+ HandleCommandL( EAppUIGoToModulesMenu ); // TestCaseMenu --> TestModuleMenu
+ ActivateLocalViewL(TUid::Uid(ETestModulesMenuViewId));
+ break;
+ }
+ case ETestModulesMenuViewId:
+ {
+ HandleCommandL( EAppUIGoToTestSetsMenu );
+ ActivateLocalViewL(TUid::Uid(ETestSetBaseMenuViewId));
+ break;
+ }
+ case ETestSetsMenuViewId:
+ {
+ break;
+ }
+
+ }
+ break;
+ }
+
+ default:
+ {
+ return EKeyWasNotConsumed;
+ //break;
+ }
+ }
+ }
+
+ return EKeyWasConsumed;
+
+ }
+
+// ----------------------------------------------------
+// CAppUIAppUi::HandleCommandL(TInt aCommand)
+// ?implementation_description
+// ----------------------------------------------------
+//
+void CAppUIAppUi::HandleCommandL(TInt aCommand)
+ {
+ TInt currentView, newView;
+ TInt error(0);
+
+ currentView = (iView->Id()).iUid;
+
+ switch ( aCommand )
+ {
+ case EEikCmdExit:
+ case EAknSoftkeyExit:
+ {
+ PrepareToExit();
+ Exit();
+ newView = currentView;
+ break;
+ }
+ case EAppUIGoBack:
+ {
+ switch ( currentView )
+ {
+ case ETestCaseMenuViewId:
+ {
+ newView = EMainMenuViewId; // Test Cases Menu --> Main Menu
+ break;
+ }
+ case EStartCaseMenuViewId:
+ {
+ newView = ETestCaseMenuViewId; // Start Cases Menu --> Test Cases Menu
+ //iTabGroup->SetActiveTabByIndex(0);
+ break;
+ }
+ case ETestModulesMenuViewId:
+ {
+ newView = EMainMenuViewId; // Test Modules Menu --> Main Menu
+ break;
+ }
+ case EStartedCasesMenuViewId:
+ {
+ newView = ETestCaseMenuViewId; // Started Cases Menu --> Test Case Menu
+ break;
+ }
+ case EShowStartedCasesViewId:
+ {
+ newView = EStartedCasesMenuViewId; // Show started cases --> Started Cases Menu
+ break;
+ }
+ case ETestCaseOutputViewId:
+ {
+ newView = iPreviousView; // Test case output view --> previous view
+ break;
+ }
+ case EStatisticsViewId:
+ {
+ newView = EStartedCasesMenuViewId; // Statistic view --> Started Cases Menu
+ break;
+ }
+ case ETestSetBaseMenuViewId:
+ {
+ newView = EMainMenuViewId; // Test Sets Base Menu --> Main Menu
+ break;
+ }
+ case ETestSetMenuViewId:
+ {
+ newView = ETestSetBaseMenuViewId; // Test Sets Menu --> Test Sets Base Menu
+ break;
+ }
+ case ETestSetInsertMenuViewId:
+ {
+ newView = ETestSetMenuViewId; // Test Set Insert Menu --> Test Sets Menu
+ break;
+ }
+ case ETestSetStartedCasesViewId:
+ {
+ newView = ETestSetMenuViewId; // Test Set Started Cases Menu --> Test Sets Menu
+ break;
+ }
+ default:
+ {
+ newView = currentView; // Back does not work. This should not happen ever
+ break;
+ }
+ }
+ break;
+ }
+ case EAppUIGoToMainMenu:
+ {
+ newView = EMainMenuViewId;
+ break;
+ }
+ case EAppUIGoToTestCaseMenu:
+ {
+ newView = ETestCaseMenuViewId;
+ break;
+ }
+ case ECmdGoToStartCasesView:
+ {
+ newView = EStartCaseMenuViewId;
+ break;
+ }
+ case ECmdGoToStartedCasesView:
+ {
+ newView = EStartedCasesMenuViewId;
+ break;
+ }
+ case EAppUIGoToModulesMenu:
+ {
+ newView = ETestModulesMenuViewId;
+ //iTabGroup->SetActiveTabByIndex(1);
+ break;
+ }
+ case EAppUIGoToTestSetsMenu:
+ {
+ newView = ETestSetBaseMenuViewId;
+
+ //ShowNotImplementedYet();
+ //newView = currentView;
+ break;
+ }
+ case ECmdCreateTestSet:
+ {
+ CTestSetMenuView* testSetMenu = (CTestSetMenuView*)View( TUid::Uid(ETestSetMenuViewId) );
+ error = testSetMenu->CreateTestSetL( KTestSet );
+ if ( KErrNone == error || KErrAlreadyExists == error)
+ {
+ newView = ETestSetInsertMenuViewId;
+ currentView = ETestSetMenuViewId; // Store previous view for Back function
+ }
+ else
+ {
+ newView = ETestSetMenuViewId;
+ }
+ break;
+ }
+ case ECmdLoadTestSet:
+ {
+ newView = ECreatedTestSetMenuViewId; /*ETestSetBaseMenuViewId;*/
+ break;
+ }
+ case ECmdGoToTestSetView:
+ {
+
+ newView = ETestSetMenuViewId;
+ break;
+ }
+ case ECmdInsertTestCases:
+ {
+ newView = ETestSetInsertMenuViewId;
+ break;
+ }
+ case ECmdShowStartedTestSet:
+ {
+ newView = ETestSetStartedCasesViewId;
+ iShowStartedCasesMode = EShowAllStartedCases;
+ break;
+ }
+ case ECmdShowAllStartedCases:
+ newView = EShowStartedCasesViewId;
+ iShowStartedCasesMode = EShowAllStartedCases;
+ break;
+ case ECmdShowOngoingCases:
+ newView = EShowStartedCasesViewId;
+ iShowStartedCasesMode = EShowOngoingCases;
+ break;
+ case ECmdShowPassedCases:
+ newView = EShowStartedCasesViewId;
+ iShowStartedCasesMode = EShowPassedCases;
+ break;
+ case ECmdShowPausedCases:
+ newView = EShowStartedCasesViewId;
+ iShowStartedCasesMode = EShowPausedCases;
+ break;
+ case ECmdShowFailedCases:
+ newView = EShowStartedCasesViewId;
+ iShowStartedCasesMode = EShowFailedCases;
+ break;
+ case ECmdShowCrashedAbortedCases:
+ newView = EShowStartedCasesViewId;
+ iShowStartedCasesMode = EShowCrashedAbortedCases;
+ break;
+ case ECmdShowStatistics:
+ newView = EStatisticsViewId;
+ break;
+ case ECmdViewOutput:
+ newView = ETestCaseOutputViewId;
+ break;
+ case ECmdShowAbout:
+ {
+ CAknMessageQueryDialog* dlg = new (ELeave) CAknMessageQueryDialog;
+ TBuf<200> version;
+ version.Format(_L("STIF UI - Version %d.%d.%d - "), STIFUI_MAJOR_VERSION, STIFUI_MINOR_VERSION, STIFUI_BUILD_VERSION);
+ version.Append(TO_UNICODE(STIFUI_REL_DATE));
+ version.Append(_L("\n"));
+
+ TInt stifMajorV;
+ TInt stifMinorV;
+ TInt stifBuildV;
+ TBuf<30> relDate;
+ TStifUtil::STIFVersion(stifMajorV, stifMinorV, stifBuildV, relDate);
+
+ TBuf<40> stifVersion;
+ stifVersion.Format(_L("STIF - Version %d.%d.%d - "), stifMajorV, stifMinorV, stifBuildV);
+ stifVersion.Append(relDate);
+ stifVersion.Append(_L("\n"));
+
+ version.Append(stifVersion);
+
+ version.Append(_L("Copyright "));
+ version.Append( KCopyrightChar );
+ version.Append(_L(" 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved."));
+
+ dlg->SetMessageText(version);
+ dlg->ExecuteLD(R_STIFUI_ABOUT_DIALOG);
+ newView = currentView;
+ break;
+ }
+ default:
+ {
+ TMessageBoxUtil::ShowNotImplementedYetL();
+ newView = currentView;
+ break;
+ }
+ }
+
+ if( newView != currentView )
+ {
+ iPreviousView = currentView; // Store previous view for Back function
+ ActivateLocalViewL( TUid::Uid(newView) );
+
+ /*switch ( newView )
+ {
+ case EMainMenuViewId:
+ case EStartedCasesMenuViewId:
+ case EStartCaseMenuViewId:
+ case ETestCaseOutputViewId:
+ {
+ //StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL);
+ //iTabGroup->DimTab (ETestCaseMenuTab, ETrue);
+ //iTabGroup->DimTab (ETestModulesMenuTab, ETrue);
+ //iTabGroup->DimTab (ETestSetsMenuTab, ETrue);
+
+ //StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_EMPTY);
+ //StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_IDLE);
+ break;
+ }
+ case ETestCaseMenuViewId:
+ case ETestModulesMenuViewId:
+ case ETestSetsMenuViewId:
+ {
+ //StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL);
+ //iTabGroup->DimTab (ETestCaseMenuTab, EFalse);
+ //iTabGroup->DimTab (ETestModulesMenuTab, EFalse);
+ //iTabGroup->DimTab (ETestSetsMenuTab, EFalse);
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }*/
+ }
+
+ }
+
+/**
+* Receives output update notification from UI Storehandler
+* @param
+* @return
+*/
+void CAppUIAppUi::OutputUpdateL( CStartedTestCase* aTestCase, TInt /* aStatus */ )
+ {
+ if( iView->Id().iUid == ETestCaseOutputViewId )
+ {
+ ( ( CTestCaseOutputView* )iView )->OutputUpdateL( aTestCase );
+ }
+ else if( iView->Id().iUid == EShowStartedCasesViewId )
+ {
+ ( ( CShowStartedCasesView* )iView )->TestCaseStateChangedL();
+ }
+ else if( iView->Id().iUid == ETestCaseOutputViewId )
+ {
+ ( ( CTestCaseOutputView* )iView )->TestCaseStateChangedL();
+ }
+ }
+
+/**
+* Sets index of selected test case for viewing test case output
+* @param
+* @return
+*/
+void CAppUIAppUi::SetStartedTestCase( CStartedTestCase* aStartedTestCase )
+ {
+ iStartedTestCase = aStartedTestCase;
+ }
+
+/**
+* Returns index of selected test case for viewing test case output
+* @param
+* @return
+*/
+CStartedTestCase* CAppUIAppUi::GetStartedTestCase( )
+ {
+ return iStartedTestCase;
+ }
+
+/**
+ * Stores focus position of focus from a specyfic view to iPreviousFocusPosition object.
+ * Value is than used to retrieve previous position of focus in the menu
+ * @param aViewId - identification of view
+ * @param aPosition - value to store for a specyfic view
+ */
+void CAppUIAppUi::SaveFocusPosition(TAppUIViewNumber aViewId, TInt aPosition)
+ {
+ if(!iPreviousPositionListValid)
+ {
+ return;
+ }
+ for(TInt counter = iPreviousFocusPosition.Count(); counter <= aViewId; counter++)
+ {
+ iPreviousFocusPosition.Append(0);
+ }
+ iPreviousFocusPosition[aViewId] = aPosition;
+ }
+
+/**
+ * Restores focus position of focus for a specyfic view from iPreviousFocusPosition object.
+ * @param aViewId - identification of view
+ * @return - previous position of focus in the requested view
+ */
+TInt CAppUIAppUi::GetFocusPosition(TAppUIViewNumber aViewId)
+ {
+ if(iPreviousFocusPosition.Count() > aViewId)
+ {
+ return iPreviousFocusPosition[aViewId];
+ }
+ else
+ {
+ return KErrNotFound;
+ }
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/AppUIDocument.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CAppUIDocument class definition.
+*
+*/
+
+// INCLUDE FILES
+#include "AppUIDocument.h"
+#include "AppUIAppUi.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// constructor
+CAppUIDocument::CAppUIDocument(CEikApplication& aApp)
+: CAknDocument(aApp)
+ {
+ }
+
+// destructor
+CAppUIDocument::~CAppUIDocument()
+ {
+ }
+
+// Symbian OS default constructor can leave.
+void CAppUIDocument::ConstructL()
+ {
+ }
+
+// Two-phased constructor.
+CAppUIDocument* CAppUIDocument::NewL(
+ CEikApplication& aApp) // CAppUIApp reference
+ {
+ CAppUIDocument* self = new (ELeave) CAppUIDocument( aApp );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop();
+
+ return self;
+ }
+
+// ----------------------------------------------------
+// CAppUIDocument::CreateAppUiL()
+// constructs CAppUIAppUi
+// ----------------------------------------------------
+//
+CEikAppUi* CAppUIDocument::CreateAppUiL()
+ {
+ return new (ELeave) CAppUIAppUi;
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/Container.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,410 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestCaseListBoxModel class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <aknlists.h> // ListBox
+#include <AknIconArray.h> // CAknIconArray
+#include <aknnotewrappers.h>
+
+#include <eikclbd.h> // CColumnListBoxData
+
+#include "Container.h"
+#include <Stifui.rsg>
+#include "Stifui.hrh"
+#include "AppUIAppUi.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CTestCaseListBoxModel::NewL
+//
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+
+CTestCaseListBoxModel* CTestCaseListBoxModel::NewL(RPointerArray<CTestInfo>* aTestCasesInView)
+ {
+ CTestCaseListBoxModel* self = new ( ELeave ) CTestCaseListBoxModel();
+ CleanupStack::PushL( self );
+ self->iBuffer = HBufC::NewL( 130 );
+ self->iTestCasesInView = aTestCasesInView;
+ CleanupStack::Pop();
+ return self;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseListBoxModel::ConstructL
+//
+// Symbian OS two phased constructor.
+// ----------------------------------------------------------------------------
+//
+
+void CTestCaseListBoxModel::ConstructL()
+ {
+ //iBuffer = HBufC::NewLC( KMaxInfoName + KMaxName + 2 );
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseListBoxModel::~CTestCaseListBoxModel
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestCaseListBoxModel::~CTestCaseListBoxModel()
+ {
+ delete iBuffer;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseListBoxModel::MdcaCount
+//
+// Returns the number of descriptor elements in the array.
+// ----------------------------------------------------------------------------
+//
+
+TInt CTestCaseListBoxModel::MdcaCount() const
+ {
+ return iTestCasesInView->Count();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseListBoxModel::MdcaPoint
+//
+// Indexes into a descriptor array.
+// ----------------------------------------------------------------------------
+//
+TPtrC CTestCaseListBoxModel::MdcaPoint(TInt aIndex) const
+ {
+ CTestInfo* testCasePtr = (*iTestCasesInView)[aIndex];
+ TPtr buffer( iBuffer->Des() );
+ buffer.Zero();
+ buffer.Append(_L("\t"));
+ buffer.Append(testCasePtr->TestCaseTitle() );
+ return *iBuffer;
+ }
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CContainer::ConstructL
+//
+// Symbian OS two phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CContainer::ConstructL()
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::~CContainer
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CContainer::~CContainer()
+ {
+ iTestCasesInView.Close(); // does not delete objects whose pointers are contained in the array
+ delete iListBox;
+ }
+
+
+// ----------------------------------------------------------------------------
+// CContainer::SetGraphicIconL
+//
+// Sets graphic icon using listbox as CEikColumnListBox.
+// ----------------------------------------------------------------------------
+//
+void CContainer::SetGraphicIconL( CEikColumnListBox* aListBox )
+ {
+ if ( aListBox )
+ {
+ // Creates gul icon.
+ CAknIconArray* iconArray = new(ELeave) CAknIconArray(1);
+ CleanupStack::PushL( iconArray );
+
+ GraphicIconL( iconArray ); // Appends graphic data.
+
+ // Sets graphics as ListBox icon.
+ aListBox->ItemDrawer()->ColumnData()->SetIconArray( iconArray );
+
+ CleanupStack::Pop();
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::CurrentItemIndex
+//
+// Returns current item index in list box.
+// ----------------------------------------------------------------------------
+//
+TInt CContainer::CurrentItemIndex()
+ {
+ return iListBox->CurrentItemIndex();
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::SetCurrentItemIndex
+//
+// Sets current item index in list box.
+// ----------------------------------------------------------------------------
+//
+void CContainer::SetCurrentItemIndex(TInt aCurrentTestCase)
+ {
+ iListBox->SetCurrentItemIndexAndDraw(aCurrentTestCase);
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::GraphicIconL
+//
+// Appends graphics data.
+// ----------------------------------------------------------------------------
+//
+void CContainer::GraphicIconL( CArrayPtr<CGulIcon>* aIcons )
+ {
+ if ( aIcons )
+ {
+ CFbsBitmap* markBitmap = NULL;
+ CFbsBitmap* markBitmapMask = NULL;
+
+ TRgb defaultColor;
+ defaultColor = CEikonEnv::Static()->Color(EColorControlText);
+
+ AknsUtils::CreateColorIconL(AknsUtils::SkinInstance(),
+ KAknsIIDQgnIndiMarkedAdd,
+ KAknsIIDQsnIconColors,
+ EAknsCIQsnIconColorsCG13,
+ markBitmap,
+ markBitmapMask,
+ AknIconUtils::AvkonIconFileName(),
+ EMbmAvkonQgn_indi_marked_add,
+ EMbmAvkonQgn_indi_marked_add_mask,
+ defaultColor );
+
+ CGulIcon* markIcon = CGulIcon::NewL(markBitmap,markBitmapMask);
+ aIcons->AppendL(markIcon);
+ }
+ }
+
+
+// ----------------------------------------------------------------------------
+// CContainer::SizeChanged
+//
+// Called by framework when the view size is changed.
+// ----------------------------------------------------------------------------
+//
+void CContainer::SizeChanged()
+ {
+ if ( iListBox )
+ {
+ iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::CountComponentControls
+//
+// Gets a count of the component controls of this list box control.
+// ----------------------------------------------------------------------------
+//
+TInt CContainer::CountComponentControls() const
+ {
+ return 1; // return nbr of controls inside this container
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::ComponentControl
+//
+// Gets a pointer to the specified component control.
+// ----------------------------------------------------------------------------
+//
+CCoeControl* CContainer::ComponentControl(TInt aIndex) const
+ {
+ switch ( aIndex )
+ {
+ case 0:
+ return iListBox;
+ default:
+ return NULL;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::Draw
+//
+// Draw a control, called by window server.
+// ----------------------------------------------------------------------------
+//
+void CContainer::Draw(const TRect& /*aRect*/) const
+ {
+ // CWindowGc& gc = SystemGc();
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::SelectedTestCases
+//
+// Returns pointers to selected test cases.
+// ----------------------------------------------------------------------------
+//
+void CContainer::SelectedTestCases
+ (RPointerArray<CTestInfo>& aSelectedTestCases)
+ {
+ aSelectedTestCases.Append( iTestCasesInView[iListBox->CurrentItemIndex()] );
+ }
+
+
+// ----------------------------------------------------------------------------
+// CContainer::HandleMarkCommandL
+//
+// Handles mark commands.
+// ----------------------------------------------------------------------------
+//
+void CContainer::HandleMarkCommandL( TInt aCommand )
+ {
+ if (iListBox)
+ {
+ AknSelectionService::HandleMarkableListProcessCommandL( aCommand, iListBox );
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::ProcessCommandL
+//
+// Processes user commands.
+// ----------------------------------------------------------------------------
+//
+void CContainer::ProcessCommandL( TInt aCommand )
+ {
+ AknSelectionService::HandleMarkableListProcessCommandL( aCommand, iListBox );
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::SelectionListProcessCommandL
+//
+// Processes user commands.
+// ----------------------------------------------------------------------------
+//
+void CContainer::SelectionListProcessCommandL( TInt aCommand )
+ {
+ AknSelectionService::HandleSelectionListProcessCommandL( aCommand, iListBox );
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::FilterCasesByModuleL
+//
+// Show only testcases which are defined is specified module.
+// ----------------------------------------------------------------------------
+//
+void CContainer::FilterCasesByModuleL( TName aModuleName )
+ {
+ iTestCasesInView.Reset(); // Clear testCasesInView pointer array
+
+ RRefArray<CTestInfo> allCases;
+ TInt ret = iUIStore->TestCases( allCases );
+ if( KErrNone != ret )
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("FilterCasesByModuleL(): iUIStore->TestCases() fails"));
+ allCases.Reset();
+ allCases.Close();
+ User::Leave( ret );
+ }
+ const TInt KTestCaseCount = allCases.Count();
+ for( TInt i=0; i < KTestCaseCount; i++ )
+ {
+ if ( allCases[i].ModuleName() == aModuleName )
+ {
+ iTestCasesInView.Append( &( allCases[i] ) );
+ }
+ }
+ allCases.Reset();
+ allCases.Close();
+
+ iListBox->Reset();
+ iListBox->DrawNow();
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::FilterCasesByTCFileNameL
+//
+// Show only testcases which are defined is specified test case file.
+// ----------------------------------------------------------------------------
+//
+void CContainer::FilterCasesByTCFileNameL(
+ TFileName aTestCaseFileName )
+ {
+
+ iTestCasesInView.Reset(); // Clear testCasesInView pointer array
+
+ RRefArray<CTestInfo> allCases;
+ TInt ret = iUIStore->TestCases( allCases );
+ if( KErrNone != ret )
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("FilterCasesByModuleL(): iUIStore->TestCases() fails"));
+ allCases.Reset();
+ allCases.Close();
+ User::Leave( ret );
+ }
+ const TInt KTestCaseCount = allCases.Count();
+ for( TInt i=0; i < KTestCaseCount; i++ )
+ {
+ if ( allCases[i].TestCaseFile() == aTestCaseFileName )
+ {
+ iTestCasesInView.Append( &( allCases[i] ) );
+ }
+ }
+
+ allCases.Reset();
+ allCases.Close();
+
+ iListBox->Reset();
+ iListBox->DrawNow();
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::NoFilteringL
+//
+// Remove possible filtering of test cases -> show all test cases.
+// ----------------------------------------------------------------------------
+//
+void CContainer::NoFilteringL()
+ {
+ iTestCasesInView.Reset(); // Clear testCasesInView pointer array
+
+ RRefArray<CTestInfo> allCases;
+ TInt ret = iUIStore->TestCases( allCases );
+ if( KErrNone != ret )
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("FilterCasesByModuleL(): iUIStore->TestCases() fails"));
+ allCases.Reset();
+ allCases.Close();
+ User::Leave( ret );
+ }
+ const TInt KTestCaseCount = allCases.Count();
+
+ // Add all cases to iTestCasesInView pointer array
+ for( TInt i=0; i < KTestCaseCount; i++ )
+ {
+ iTestCasesInView.Append( &( allCases[i] ) );
+ }
+
+ allCases.Reset();
+ allCases.Close();
+
+ iListBox->Reset();
+ iListBox->DrawNow();
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/CreatedTestSetMenuContainer.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,210 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This fiole contains CreatedTestSetMenuContainer class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <aknlists.h> // ListBox
+#include <AknIconArray.h> // CAknIconArray
+#include <aknnotewrappers.h>
+
+#include <eikclbd.h> // CColumnListBoxData
+
+#include "CreatedTestSetMenuContainer.h"
+#include "StartCasesView.h"
+#include <Stifui.rsg>
+#include "Stifui.hrh"
+#include "AppUIAppUi.h"
+
+#include "Container.h"
+#include "MenuListBox.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CreatedTestSetMenuContainer::ConstructL
+//
+// Symbian OS two phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CCreatedTestSetMenuContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("CCreatedTestSetMenuContainer: ConstructL"));
+
+ iParentView = (CCreatedTestSetMenuView*)aListBoxObserver;
+ CreateWindowL();
+
+ iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
+
+ iTestCasesInView.Reset();
+
+ iListBox = CMenuListBox::NewL(ECreatedTestSetMenuViewId);
+ iListBox->SetContainerWindowL( *this );
+ iListBox->SetListBoxObserver( aListBoxObserver /*this*/ ); //
+ iListBox->ConstructL(this, EAknListBoxMarkableList /*EAknListBoxSelectionList*/);
+
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("CCreatedTestSetMenuContainer: ListBox constructed"));
+
+ //Create Scroller control for ListBox and set its visibility
+ iListBox->CreateScrollBarFrameL(ETrue);
+ iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+ iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
+
+ if ( iUIStore )
+ {
+ CDesCArray* items = static_cast<CDesCArray*> (iListBox->Model()->ItemTextArray());
+
+ //Create list of available Test Set
+ RRefArray<TDesC> allSet;
+ RRefArray<CTestInfo> allCases;
+ TInt ret = iUIStore->GetTestSetsList( allSet );
+ if( KErrNone != ret )
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("iUIStore->GetTestSetsList() fails"));
+ allSet.Reset();
+ allSet.Close();
+ User::Leave( ret );
+ }
+
+ const TInt KTestCaseCount = allSet.Count();
+ for (TInt i=0; i <KTestCaseCount; i++)
+ {
+ _LIT(KItemFromat, "0\t%S\t\t");
+
+ RBuf tmp;
+ tmp.Create(allSet[i].Length() + 6);
+ tmp.Format( KItemFromat, &allSet[i] );
+ items->AppendL( tmp );
+ tmp.Close();
+ }
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("CCreatedTestSetMenuContainer: ListBox model"));
+ iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
+ iListBox->HandleItemAdditionL();
+
+ allSet.Reset();
+ allSet.Close();
+ }
+ else
+ {
+ User::Leave( KErrGeneral );
+ }
+
+ // Creates graphic.
+ SetGraphicIconL( iListBox );
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("CCreatedTestSetMenuContainer: icons created"));
+
+ iListBox->ActivateL();
+ ((CMenuListBox*)iListBox)->SetPreviousFocus();
+
+ SetRect(aRect);
+ ActivateL();
+ }
+
+// ----------------------------------------------------------------------------
+//CreatedTestSetMenuContainer::~CStartCasesContainer
+//
+// Destructor
+// ----------------------------------------------------------------------------
+//
+CCreatedTestSetMenuContainer::~CCreatedTestSetMenuContainer()
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// CreatedTestSetMenuContainer::SizeChanged
+//
+// Called by framework when the view size is changed.
+// ----------------------------------------------------------------------------
+//
+void CCreatedTestSetMenuContainer::SizeChanged()
+ {
+
+ if ( iListBox )
+ {
+ iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
+ }
+ }
+
+// ----------------------------------------------------------------------------
+//CreatedTestSetMenuContainer::CountComponentControls
+//
+// Gets a count of the component controls of this list box control.
+// ----------------------------------------------------------------------------
+//
+TInt CCreatedTestSetMenuContainer::CountComponentControls() const
+ {
+ return 1; // return nbr of controls inside this container
+ }
+
+// ----------------------------------------------------------------------------
+// CreatedTestSetMenuContainer::ComponentControl
+//
+// Gets a pointer to the specified component control.
+// ----------------------------------------------------------------------------
+//
+CCoeControl* CCreatedTestSetMenuContainer::ComponentControl(TInt aIndex) const
+ {
+ switch ( aIndex )
+ {
+ case 0:
+ return iListBox;
+ default:
+ return NULL;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CreatedTestSetMenuContainer::Draw
+//
+// Draw a control, called by window server.
+// ----------------------------------------------------------------------------
+//
+void CCreatedTestSetMenuContainer::Draw(const TRect& /*aRect*/) const
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// CreatedTestSetMenuContainer::OfferKeyEventL
+//
+// Handles key events.
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CCreatedTestSetMenuContainer::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent, TEventCode aType )
+ {
+ if (iListBox)
+ {
+
+ return iListBox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ else
+ {
+ return EKeyWasNotConsumed;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CreatedTestSetMenuContainer:::SaveActiveLine
+//
+// Makes the iListBox member save its focus position
+// ----------------------------------------------------------------------------
+//
+void CCreatedTestSetMenuContainer::SaveActiveLine()
+ {
+ ((CMenuListBox*)iListBox)->SaveFocusPosition();
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/CreatedTestSetMenuView.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,199 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStartCasesView class definition.
+*
+*/
+
+// INCLUDE FILES
+#include <eikmenub.h>
+#include <aknViewAppUi.h>
+#include <aknlistquerydialog.h>
+#include <barsread.h> //TResourceReader
+#include <Stifui.rsg>
+#include "CreatedTestSetMenuView.h"
+#include "CreatedTestSetMenuContainer.h"
+#include "AppUIAppUi.h"
+#include "Stifui.hrh"
+#include "TestSetMenuView.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CStartCasesView::ConstructL
+//
+// Symbian OS two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CCreatedTestSetMenuView::ConstructL()
+ {
+ CView::ConstructL();
+ BaseConstructL(R_APPUI_LOADTESTSETVIEW);
+ iCurrentTestCase = 0;
+
+ }
+
+// ----------------------------------------------------------------------------
+// CreatedTestSetMenuView::~CStartCasesView
+//
+// Destructor
+// ----------------------------------------------------------------------------
+//
+CCreatedTestSetMenuView::~CCreatedTestSetMenuView()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CreatedTestSetMenuView::Id
+//
+// Returns view´s id.
+// ----------------------------------------------------------------------------
+//
+TUid CCreatedTestSetMenuView::Id() const
+ {
+ return TUid::Uid(ECreatedTestSetMenuViewId);
+
+ }
+
+// ----------------------------------------------------------------------------
+// CreatedTestSetMenuView::HandleCommandL
+//
+// Handles a command.
+// ----------------------------------------------------------------------------
+//
+void CCreatedTestSetMenuView::HandleCommandL(TInt aCommand)
+ {
+ switch ( aCommand )
+ {
+ case EAknSoftkeyBack:
+ {
+ AppUi()->HandleCommandL(EAppUIGoToTestSetsMenu);
+ break;
+ }
+ case EAknCmdOpen:
+ {
+ HandleListBoxEventL(iContainer->ListBox(), EEventEnterKeyPressed);
+ break;
+ }
+ default:
+ {
+ AppUi()->HandleCommandL( aCommand );
+ break;
+ }
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+//CreatedTestSetMenuView::HandleClientRectChange
+//
+// Handles client rect changes.
+// ----------------------------------------------------------------------------
+//
+void CCreatedTestSetMenuView::HandleClientRectChange()
+ {
+ if ( iContainer )
+ {
+ iContainer->SetRect( ClientRect() );
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CreatedTestSetMenuView::DoActivateL
+//
+// Initializes view when activated.
+// ----------------------------------------------------------------------------
+//
+void CCreatedTestSetMenuView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/)
+ {
+ if (!iContainer)
+ {
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("CreatedTestSetMenuView: DoActivateL"));
+ iContainer = new (ELeave) CCreatedTestSetMenuContainer;
+ iContainer->SetMopParent(this);
+ iContainer->ConstructL( ClientRect(), this );
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("CreatedTestSetMenuView: container constructed"));
+ AppUi()->AddToStackL( *this, iContainer );
+ }
+
+ iContainer->SetCurrentItemIndex(iCurrentTestCase);
+
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
+
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_LOADTESTSET);
+ iNaviDecorator = np->CreateNavigationLabelL( reader );
+ CleanupStack::PopAndDestroy(); // resource reader
+ np->PushL(*iNaviDecorator);
+
+ }
+
+// ----------------------------------------------------------------------------
+// CreatedTestSetMenuView::DoDeactivate
+//
+// Deactivates view.
+// ----------------------------------------------------------------------------
+//
+void CCreatedTestSetMenuView::DoDeactivate()
+ {
+ if ( iContainer )
+ {
+ iContainer->SaveActiveLine();
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+
+// ----------------------------------------------------------------------------
+// CreatedTestSetMenuView::HandleListBoxEventL
+//
+// Handles listbox events.
+// ----------------------------------------------------------------------------
+//
+void CCreatedTestSetMenuView::HandleListBoxEventL( CEikListBox* aListBox,
+ TListBoxEvent aEventType )
+ {
+ if ( aEventType == MEikListBoxObserver::EEventEnterKeyPressed )
+ {
+ // Checking with item from list was selected
+ CTextListBoxModel* tmp = (CTextListBoxModel*)aListBox->Model();
+ TPtrC item = tmp->ItemText(aListBox->CurrentItemIndex());
+ // Geting propper format of item from list (ex. 2008_8_10_13_16.set ).
+ TPtrC substracted(item.Left(item.Length()-2));
+ substracted.Set(substracted.Right(substracted.Length()-2));
+ // Creating new view containing
+ CTestSetMenuView* testSetMenu = (CTestSetMenuView*)AppUi()->View( TUid::Uid(ETestSetMenuViewId) );
+ TInt error = testSetMenu->LoadTestSetL( substracted );
+ AppUi()->HandleCommandL(ECmdGoToTestSetView);
+
+ }
+
+ }
+
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/MainMenuContainer.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,217 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CMainMenuContainer class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <aknlists.h> // ListBox
+
+#include <barsread.h> // for TResourceReader
+
+#include <aknnotewrappers.h>
+
+#include "MainMenuContainer.h"
+#include "Stifui.hrh"
+#include <Stifui.rsg>
+#include "MenuListBox.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CMainMenuContainer::ConstructL
+//
+// Symbian OS two phased constructor
+// ---------------------------------------------------------
+//
+void CMainMenuContainer::ConstructL(const TRect& aRect)
+ {
+ CreateWindowL();
+
+ iListBox = CMenuListBox::NewL(EMainMenuViewId);
+ iListBox->SetContainerWindowL( *this );
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC( reader, R_MAIN_MENU_LISTBOX );
+ iListBox->SetListBoxObserver( this );
+ iListBox->ConstructFromResourceL( reader );
+ CleanupStack::PopAndDestroy(); // resource stuffs.
+ iListBox->ActivateL(); // Sets control as ready to be drawn
+
+ // retrieve previous position of focus for this view/continer and set focus to this value
+ ((CMenuListBox*)iListBox)->SetPreviousFocus();
+
+ SetRect(aRect);
+ ActivateL();
+ }
+
+
+// ---------------------------------------------------------
+// CMainMenuContainer::~CMainMenuContainer
+//
+// Destructor
+// ---------------------------------------------------------
+//
+CMainMenuContainer::~CMainMenuContainer()
+ {
+ if( iListBox )
+ {
+ delete iListBox;
+ iListBox = NULL;
+ }
+ }
+
+// ---------------------------------------------------------
+// CMainMenuContainer::SizeChanged
+//
+// Called by framework when the view size is changed
+// ---------------------------------------------------------
+//
+void CMainMenuContainer::SizeChanged()
+ {
+ if ( iListBox )
+ {
+ iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
+ }
+ }
+
+// ---------------------------------------------------------
+// CMainMenuContainer::CountComponentControls
+//
+// Returns number of controls indside this container.
+// ---------------------------------------------------------
+//
+TInt CMainMenuContainer::CountComponentControls() const
+ {
+ return 1;
+ }
+
+// ---------------------------------------------------------
+// CMainMenuContainer::ComponentControl
+//
+// Gets the specified component of a compound control.
+// ---------------------------------------------------------
+//
+CCoeControl* CMainMenuContainer::ComponentControl(TInt aIndex) const
+ {
+ switch ( aIndex )
+ {
+ case 0:
+ return iListBox;
+ default:
+ return NULL;
+ }
+ }
+
+// ---------------------------------------------------------
+// CMainMenuContainer::Draw
+//
+// Draw a control, called by window server.
+// ---------------------------------------------------------
+//
+void CMainMenuContainer::Draw(const TRect& /*aRect*/) const
+ {
+ }
+
+// ---------------------------------------------------------
+// CMainMenuContainer::HandleListBoxEventL
+//
+// Handles list box events.
+// ---------------------------------------------------------
+//
+void CMainMenuContainer::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType)
+ {
+
+ if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
+ {
+ HandleSelectedListItemL( aListBox->CurrentItemIndex() );
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CMainMenuContainer::HandleSelectedListItemL
+//
+// Method HandleSelectedListItemL handles valix index.
+// ----------------------------------------------------------------------------
+//
+void CMainMenuContainer::HandleSelectedListItemL( TInt aIndex )
+ {
+ TInt selection = aIndex;
+
+ // Change active view.
+ switch ( selection )
+ {
+ case 0:
+ ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(EAppUIGoToTestCaseMenu);
+ break;
+ case 1:
+ ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(EAppUIGoToModulesMenu);
+ break;
+ case 2:
+ ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(EAppUIGoToTestSetsMenu);
+ break;
+ default:
+ break;
+ }
+ }
+
+// ---------------------------------------------------------
+// CMainMenuContainer::OfferKeyEventL
+//
+// Handles key events.
+// ---------------------------------------------------------
+//
+TKeyResponse CMainMenuContainer::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent, TEventCode aType)
+{
+ if (aType != EEventKey)
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ // Offers key events to list box
+ if (iListBox)
+ {
+ return iListBox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ else
+ {
+ return EKeyWasNotConsumed;
+ }
+}
+
+// ----------------------------------------------------------------------------
+// CMainMenuContainer:::GetActiveLine
+//
+// Get currently selected items index.
+// ----------------------------------------------------------------------------
+//
+TInt CMainMenuContainer::GetActiveLine()
+ {
+ return iListBox->CurrentItemIndex();
+ }
+
+// ----------------------------------------------------------------------------
+// CMainMenuContainer:::SaveActiveLine
+//
+// Makes the iListBox member save its focus position
+// ----------------------------------------------------------------------------
+//
+void CMainMenuContainer::SaveActiveLine()
+ {
+ ((CMenuListBox*)iListBox)->SaveFocusPosition();
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/MainMenuView.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,163 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CMainMenuView class definition.
+*
+*/
+
+// INCLUDE FILES
+#include <aknViewAppUi.h>
+#include <barsread.h> //TResourceReader
+#include <Stifui.rsg>
+#include "MainMenuView.h"
+#include "MainMenuContainer.h"
+#include "Stifui.hrh"
+#include "AppUIAppUi.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CMainMenuView::ConstructL
+//
+// Symbian OS two-phased constructor
+// ---------------------------------------------------------
+//
+void CMainMenuView::ConstructL()
+ {
+ BaseConstructL( R_APPUI_MAINMENUVIEW );
+ }
+
+// ---------------------------------------------------------
+// CMainMenuView::~CMainMenuView
+//
+// Destructor
+// ---------------------------------------------------------
+//
+CMainMenuView::~CMainMenuView()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ---------------------------------------------------------
+// TUid CMainMenuView::Id
+//
+// Returns view´s id.
+// ---------------------------------------------------------
+//
+TUid CMainMenuView::Id() const
+ {
+ return TUid::Uid(EMainMenuViewId); //KMainMenuViewId;
+ }
+
+// ---------------------------------------------------------
+// CMainMenuView::HandleCommandL
+//
+// Handles a command.
+// ---------------------------------------------------------
+//
+void CMainMenuView::HandleCommandL(TInt aCommand)
+ {
+ switch ( aCommand )
+ {
+ case EAknSoftkeyBack:
+ {
+ AppUi()->HandleCommandL(EEikCmdExit);
+ break;
+ }
+ case EAknCmdOpen:
+ {
+ TInt a = iContainer->GetActiveLine();
+ iContainer->HandleSelectedListItemL( a );
+ }
+ break;
+ default:
+ {
+ AppUi()->HandleCommandL( aCommand );
+ break;
+ }
+ }
+ }
+
+// ---------------------------------------------------------
+// CMainMenuView::HandleClientRectChange
+//
+// Handles client rect changes.
+// ---------------------------------------------------------
+//
+void CMainMenuView::HandleClientRectChange()
+ {
+ if ( iContainer )
+ {
+ iContainer->SetRect( ClientRect() );
+ }
+ }
+
+// ---------------------------------------------------------
+// CMainMenuView::DoActivateL
+//
+// Initializes view when activated.
+// ---------------------------------------------------------
+//
+void CMainMenuView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/)
+ {
+ if (!iContainer)
+ {
+ iContainer = new (ELeave) CMainMenuContainer;
+ iContainer->SetMopParent(this);
+ iContainer->ConstructL( ClientRect() );
+ AppUi()->AddToStackL( *this, iContainer );
+ }
+
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
+
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_MAIN);
+ iNaviDecorator = np->CreateNavigationLabelL( reader );
+ CleanupStack::PopAndDestroy(); // resource reader
+
+ np->PushL(*iNaviDecorator);
+ }
+
+// ---------------------------------------------------------
+// CAppUIView::DoDeactivate
+//
+// Deactivates view.
+// ---------------------------------------------------------
+//
+void CMainMenuView::DoDeactivate()
+ {
+ if ( iContainer )
+ {
+ iContainer->SaveActiveLine();
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// End of File
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/MenuListBox.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CMenuListBox class definition.
+*
+*/
+
+// INCLUDE FILES
+#include "MenuListBox.h"
+#include <aknview.h>
+
+// ================= MEMBER FUNCTIONS =======================
+// ---------------------------------------------------------
+// CMainMenuView::CMenuListBox
+//
+// c++ constructor
+// ---------------------------------------------------------
+//
+CMenuListBox::CMenuListBox(TAppUIViewNumber aViewId)
+ : CAknSingleStyleListBox(), iViewId(aViewId)
+ {
+ }
+
+// ---------------------------------------------------------
+// CMenuListBox::ConstructL
+//
+// Symbian OS two-phased constructor
+// ---------------------------------------------------------
+//
+void CMenuListBox::ConstructL()
+ {
+
+ }
+
+// ---------------------------------------------------------
+// CMenuListBox::~CMenuListBox
+//
+// Destructor
+// ---------------------------------------------------------
+//
+CMenuListBox::~CMenuListBox()
+ {
+
+ }
+
+// ---------------------------------------------------------
+// CMenuListBox::NewL
+//
+// Symbian OS public constructor
+// @param aViewId - id of view to identify position in array where focus position will be saved to
+// or retrieved from
+//
+// @return - pointer to an instance of CMenuListBOx
+// ---------------------------------------------------------
+//
+CMenuListBox* CMenuListBox::NewL(TAppUIViewNumber aViewId)
+ {
+ CMenuListBox* self = new(ELeave) CMenuListBox(aViewId);
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+ return self;
+ }
+
+// ---------------------------------------------------------
+// CMenuListBox::SaveFocusPosition
+//
+// Saves current focus position to CAppUiAppUi object
+// ---------------------------------------------------------
+//
+void CMenuListBox::SaveFocusPosition()
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->SaveFocusPosition(iViewId, this->CurrentItemIndex());
+ }
+
+// ---------------------------------------------------------
+// CMenuListBox::SetPreviousFocus
+//
+// Retrieves previous focus position from CAppUiAppUi object and sets focus
+// to that position
+// ---------------------------------------------------------
+//
+void CMenuListBox::SetPreviousFocus()
+ {
+ TInt previousPosition = ((CAppUIAppUi*)iCoeEnv->AppUi())->GetFocusPosition(iViewId);
+ if(previousPosition != KErrNotFound)
+ {
+ if(previousPosition < this->Model()->NumberOfItems() && previousPosition != 0)
+ {
+ this->SetCurrentItemIndex(previousPosition);
+ }
+ if(previousPosition >= this->Model()->NumberOfItems())
+ {
+ this->SetCurrentItemIndex(0); // setting current item to first element if pervious position is grater then current.
+ }
+ this->SetTopItemIndex(0);
+ }
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/ShowStartedCasesContainer.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,648 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStartedTestsListBoxModel class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+
+#include <aknlists.h> // ListBox
+#include <AknIconArray.h> // CAknIconArray
+#include <badesca.h> // CDesCArray
+#include <eikclbd.h> // CColumnListBoxData
+#include <aknnotewrappers.h>
+
+#include <Stifui.rsg>
+
+//#include "UIStoreIf.h"
+//#include "UIStore.h"
+//#include "UIEngine.h"
+//#include "UIEngineContainer.h"
+
+#include <stifinternal/UIStoreIf.h>
+#include <stifinternal/UIStore.h>
+#include <stifinternal/UIEngine.h>
+#include <stifinternal/UIEngineContainer.h>
+
+#include "ShowStartedCasesContainer.h"
+
+#include "Stifui.hrh"
+#include "AppUIAppUi.h"
+#include "MenuListBox.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ---------------------------------------------------------
+// CStartedTestsListBoxModel::NewL
+//
+// Symbian OS two phased constructor
+// ---------------------------------------------------------
+//
+CStartedTestsListBoxModel* CStartedTestsListBoxModel::NewL
+ ( RRefArray<CStartedTestCase>* aTestCasesInView )
+ {
+ CStartedTestsListBoxModel* self = new ( ELeave ) CStartedTestsListBoxModel();
+ CleanupStack::PushL( self );
+ self->iBuffer = HBufC::NewL( 130 );
+ self->iTestCasesInView = aTestCasesInView;
+ CleanupStack::Pop();
+ return self;
+
+ }
+
+// ---------------------------------------------------------
+// CStartedTestsListBoxModel::ConstructL
+//
+// Symbian OS two phased constructor
+// Completes the construction of the object.
+// ---------------------------------------------------------
+//
+
+void CStartedTestsListBoxModel::ConstructL()
+ {
+ }
+
+// ---------------------------------------------------------
+// CStartedTestsListBoxModel::~CStartedTestsListBoxModel
+//
+// Destructor
+// ---------------------------------------------------------
+//
+
+CStartedTestsListBoxModel::~CStartedTestsListBoxModel()
+ {
+ }
+
+// ---------------------------------------------------------
+// CStartedTestsListBoxModel::MdcaCount
+//
+// Returns the number of descriptor elements in the array.
+// ---------------------------------------------------------
+//
+
+TInt CStartedTestsListBoxModel::MdcaCount() const
+ {
+ return iTestCasesInView->Count();
+
+ }
+
+// ---------------------------------------------------------
+// CStartedTestsListBoxModel::MdcaPoint
+//
+// Indexes into a descriptor array.
+// ---------------------------------------------------------
+//
+TPtrC CStartedTestsListBoxModel::MdcaPoint(TInt aIndex) const
+ {
+ TPtr buffer( iBuffer->Des() );
+ buffer.Zero();
+ switch ( (*iTestCasesInView)[aIndex].Status() )
+ {
+ case CUIStoreIf::EStatusRunning:
+ {
+ if( (*iTestCasesInView)[aIndex].UIEngineContainer().State() ==
+ CUIEngineContainer::ERunning )
+ {
+ buffer.Append(_L("Running\t"));
+ }
+ else
+ {
+ buffer.Append(_L("Paused\t"));
+ }
+ break;
+ }
+ case CUIStoreIf::EStatusPassed:
+ {
+ buffer.Append(_L("Passed\t"));
+ break;
+ }
+ case CUIStoreIf::EStatusFailed:
+ {
+ buffer.Append(_L("Failed\t"));
+ break;
+ }
+ /*case ECrashed:
+ buffer.Append(_L("Crashed\t"));
+ break;*/
+ case CUIStoreIf::EStatusAborted:
+ {
+ buffer.Append(_L("Aborted\t"));
+ break;
+ }
+ default:
+ {
+ if((*iTestCasesInView)[aIndex].Status() & CUIStoreIf::EStatusPassed)
+ {
+ buffer.Append(_L("Passed\t"));
+ }
+ else if((*iTestCasesInView)[aIndex].Status() & CUIStoreIf::EStatusFailed)
+ {
+ buffer.Append(_L("Failed\t"));
+ }
+ else if((*iTestCasesInView)[aIndex].Status() & CUIStoreIf::EStatusAborted)
+ {
+ buffer.Append(_L("Aborted\t"));
+ }
+ else if((*iTestCasesInView)[aIndex].Status() & CUIStoreIf::EStatusCrashed)
+ {
+ buffer.Append(_L("Crashed\t"));
+ }
+ else
+ {
+ buffer.Append(_L("\t"));
+ }
+ break;
+ }
+ }
+
+ buffer.Append((*iTestCasesInView)[aIndex].TestInfo().TestCaseTitle() );
+
+ return *iBuffer;
+
+ }
+
+
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::ConstructL
+//
+// Symbian OS two phased constructor
+// ---------------------------------------------------------
+//
+void CShowStartedCasesContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
+ {
+ CreateWindowL();
+
+ iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
+
+ const TInt KSelectedMode = ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
+
+ if(KSelectedMode == EShowOngoingCases || KSelectedMode == EShowPausedCases
+ || KSelectedMode == EShowCrashedAbortedCases || KSelectedMode == EShowAllStartedCases)
+ {
+ iListBox = new (ELeave) CAknSingleHeadingStyleListBox();
+ }
+ else
+ {
+ iListBox = CMenuListBox::NewL(EShowStartedCasesViewId); //CAknSingleStyleListBox();
+ }
+ iListBox->SetContainerWindowL( *this );
+ iListBox->SetListBoxObserver( aListBoxObserver );
+ iListBox->ConstructL(this, EAknListBoxSelectionList);
+
+ //Create Scroller control for ListBox and set its visibility
+ iListBox->CreateScrollBarFrameL(ETrue);
+ iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+ iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
+
+ if ( iUIStore )
+ {
+ ConstructListBoxModelL();
+ iListBoxModel = CStartedTestsListBoxModel::NewL( &iStartedTestsPtrs );
+ iListBox->Model()->SetItemTextArray(iListBoxModel);
+ }
+ else
+ {
+ //User::Leave( syy?? )
+ }
+ iListBox->ActivateL();
+ if(KSelectedMode != EShowOngoingCases && KSelectedMode != EShowPausedCases
+ && KSelectedMode != EShowCrashedAbortedCases && KSelectedMode != EShowAllStartedCases)
+ {
+ ((CMenuListBox*)iListBox)->SetPreviousFocus();
+ }
+
+ SetRect(aRect);
+ ActivateL();
+
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::ConstructListBoxModelL
+//
+// Constructs list box model without any filtering.
+// ---------------------------------------------------------
+//
+void CShowStartedCasesContainer::ConstructListBoxModelL()
+ {
+ TInt ret( 0 );
+ RRefArray<CStartedTestCase> startedTestCases;
+ ret = iUIStore->StartedTestCases( startedTestCases );
+ if( KErrNone != ret )
+ {
+ startedTestCases.Reset();
+ startedTestCases.Close();
+ User::Leave( ret );
+ }
+ CleanupClosePushL( startedTestCases ); // Closes the handle
+
+ const TInt KStartedCaseCount = startedTestCases.Count();
+
+ iStartedTestsPtrs.Reset(); // Remove all pointers (does not delete objects)
+
+ const TInt KSelectedMode = ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
+
+ // Loop through all started cases
+ for( TInt i=0; i < KStartedCaseCount; i++ )
+ {
+ switch ( KSelectedMode )
+ {
+ case EShowAllStartedCases:
+ {
+ iStartedTestsPtrs.Append( startedTestCases[i] );
+ break;
+ }
+ case EShowOngoingCases:
+ {
+ // Note: PAUSE IS ALSO RUNNIN STATUS
+ if ( startedTestCases[i].Status() & CUIStoreIf::EStatusRunning )
+ {
+ iStartedTestsPtrs.Append(startedTestCases[i]);
+ }
+ break;
+ }
+ case EShowPassedCases:
+ {
+ if ( startedTestCases[i].Status() & CUIStoreIf::EStatusPassed )
+ {
+ iStartedTestsPtrs.Append( startedTestCases[i] );
+ }
+ break;
+ }
+ case EShowPausedCases:
+ {
+ if ( startedTestCases[i].Status() & CUIStoreIf::EStatusRunning )
+ {
+ if( startedTestCases[i].UIEngineContainer().State() == CUIEngineContainer::EPaused )
+ {
+ iStartedTestsPtrs.Append( startedTestCases[i] );
+ }
+ }
+ break;
+ }
+ case EShowFailedCases:
+ {
+ if ( startedTestCases[i].Status() & CUIStoreIf::EStatusFailed )
+ {
+ iStartedTestsPtrs.Append( startedTestCases[i] );
+ }
+ break;
+ }
+ case EShowCrashedAbortedCases:
+ {
+ if ( startedTestCases[i].Status() & CUIStoreIf::EStatusAborted
+ || startedTestCases[i].Status() & CUIStoreIf::EStatusCrashed)
+ {
+ iStartedTestsPtrs.Append( startedTestCases[i] );
+ }
+ break;
+ }
+ }
+ }
+ startedTestCases.Reset();
+ startedTestCases.Close();
+
+ CleanupStack::PopAndDestroy(); // startedTestCases
+
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::~CShowStartedCasesContainer
+//
+// Destructor
+// ---------------------------------------------------------
+//
+CShowStartedCasesContainer::~CShowStartedCasesContainer()
+ {
+ iStartedTestsPtrs.Close(); // does not delete objects whose pointers are contained in the array
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::SizeChanged
+//
+// Called by framework when the view size is changed
+// ---------------------------------------------------------
+//
+void CShowStartedCasesContainer::SizeChanged()
+ {
+ if ( iListBox )
+ {
+ iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
+ }
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::CountComponentControls
+//
+// Gets a count of the component controls of this list box control.
+// ---------------------------------------------------------
+//
+TInt CShowStartedCasesContainer::CountComponentControls() const
+ {
+ return 1; // return nbr of controls inside this container
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::ComponentControl
+//
+// Gets a pointer to the specified component control.
+// ---------------------------------------------------------
+//
+CCoeControl* CShowStartedCasesContainer::ComponentControl(TInt aIndex) const
+ {
+ switch ( aIndex )
+ {
+ case 0:
+ return iListBox;
+ default:
+ return NULL;
+ }
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::Draw
+//
+// Draw a control, called by window server.
+// ---------------------------------------------------------
+//
+void CShowStartedCasesContainer::Draw(const TRect& /*aRect*/) const
+ {
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::OfferKeyEventL
+//
+// Handles key events.
+// ---------------------------------------------------------
+//
+TKeyResponse CShowStartedCasesContainer::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent, TEventCode aType)
+ {
+ if (aType != EEventKey)
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ if (iListBox)
+ {
+ return iListBox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ else
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::SelectedTestCase
+//
+// Returns reference to currently selected test case in view (listbox).
+// ---------------------------------------------------------
+//
+CStartedTestCase* CShowStartedCasesContainer::SelectedTestCase()
+ {
+ if ( iStartedTestsPtrs.Count() > 0 )
+ {
+ return &(iStartedTestsPtrs[ iListBox->CurrentItemIndex() ]);
+ }
+ else
+ {
+ return NULL;
+ }
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::DrawListBox
+//
+// Refresh ListBox, if aSelectedTestCase is still found from ListBox
+// it is set as selected test case.
+// ---------------------------------------------------------
+//
+void CShowStartedCasesContainer::DrawListBox()
+ {
+ if ( iListBox )
+ {
+ iListBox->DrawNow();
+ }
+
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::HandleItemAdditionL
+//
+// Refresh ListBox after new item was added to listbox model.
+// ---------------------------------------------------------
+//
+void CShowStartedCasesContainer::HandleItemAdditionL()
+ {
+ iListBox->HandleItemAdditionL();
+
+ }
+
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::HandleItemRemovalL
+//
+// Refresh ListBox after item is removed from listbox model.
+// ---------------------------------------------------------
+//
+void CShowStartedCasesContainer::HandleItemRemovalL()
+ {
+ iListBox->HandleItemRemovalL();
+
+ // HandleItemRemovalL "loses selection" if current item is removed
+ // -> we have to check it and set one item as current item to make it possible for
+ // user to select one item from items left after remove
+ if ( iListBox->CurrentItemIndex() == -1 ) // No item selected
+ if ( ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount() > 0 ) // there are items
+ SetCurrentItemIndex(0);
+
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::TestsInViewCount
+//
+// Returns count of test cases in view.
+// ---------------------------------------------------------
+//
+TInt CShowStartedCasesContainer::TestsInViewCount()
+ {
+ return ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount();
+
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::CurrentTestCase
+//
+// Returns pointer to currently selected test case.
+// ---------------------------------------------------------
+//
+CStartedTestCase* CShowStartedCasesContainer::CurrentTestCase()
+ {
+ return &iStartedTestsPtrs[ iListBox->CurrentItemIndex() ];
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::SetCurrentItemIndex
+//
+// Sets the current item.
+// ---------------------------------------------------------
+//
+void CShowStartedCasesContainer::SetCurrentItemIndex(TInt aIndex)
+ {
+ TInt itemCount = ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount();
+ if ( aIndex < itemCount )
+ {
+ iListBox->SetCurrentItemIndex(aIndex);
+ }
+ else
+ {
+ iListBox->SetCurrentItemIndex(itemCount);
+ }
+
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::ResetListBox
+//
+// Resets the selection indices, top and current item indices,
+// the selection, and the horizontal scroll offset of this list box.
+// This function does not redraw the list box.
+// ---------------------------------------------------------
+//
+void CShowStartedCasesContainer::ResetListBox()
+ {
+ iListBox->Reset();
+
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::RemoveSelectedExecutionsL
+//
+// Removes items from list box.
+// ---------------------------------------------------------
+//
+void CShowStartedCasesContainer::RemoveSelectedExecutionsL()
+ {
+ TInt indexOfRemovedExecution = 0;
+ iStartedTestsPtrs.Remove(indexOfRemovedExecution);
+ HandleItemRemovalL();
+
+ }
+
+// ---------------------------------------------------------
+// CShowStartedCasesContainer::RemoveAllExecutionsInViewL
+//
+// Removes all started test cases from list box.
+// ---------------------------------------------------------
+//
+void CShowStartedCasesContainer::RemoveAllExecutionsInViewL()
+ {
+ TInt exutionsInViewCount = iStartedTestsPtrs.Count();
+ iStartedTestsPtrs.Reset(); //Empties the array, does not delete the objects whose pointers are contained in the array
+ HandleItemRemovalL();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::FilterCasesByModuleL
+//
+// Show only testcases which are defined is specified module.
+// ----------------------------------------------------------------------------
+//
+void CShowStartedCasesContainer::FilterCasesByModuleL(TName aModuleName)
+ {
+ //First the list box model have to be reconstructed to make sure that all
+ //possible earlier filtering does not affect
+ ConstructListBoxModelL();
+
+ TInt i;
+ const TInt KCurrentShowedCaseCount = iStartedTestsPtrs.Count();
+
+ for ( i = KCurrentShowedCaseCount-1; i >= 0; i-- )
+ {
+ RRefArray<CStartedTestCase> startedTestCases;
+ TInt ret = iUIStore->StartedTestCases( startedTestCases );
+ if( ret != KErrNone )
+ {
+ startedTestCases.Reset();
+ startedTestCases.Close();
+ }
+ if ( startedTestCases[i].TestInfo().ModuleName() != aModuleName )
+ {
+ iStartedTestsPtrs.Remove(i); // delete pointer to CStartedTestCase
+ }
+ startedTestCases.Reset();
+ startedTestCases.Close();
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::FilterCasesByTCFileNameL
+//
+// Show only testcases which are defined is specified test case file.
+// ----------------------------------------------------------------------------
+//
+void CShowStartedCasesContainer::FilterCasesByTCFileNameL(TFileName aTestCaseFileName)
+ {
+
+ //First the list box model have to be reconstructed to make sure that all
+ //possible earlier filtering does not affect
+ ConstructListBoxModelL();
+
+ const TInt KCurrentShowedCaseCount = iStartedTestsPtrs.Count();
+
+ for ( TInt i = KCurrentShowedCaseCount-1; i >= 0; i-- )
+ {
+ RRefArray<CStartedTestCase> startedTestCases;
+ TInt ret = iUIStore->StartedTestCases( startedTestCases );
+ if( ret != KErrNone )
+ {
+ startedTestCases.Reset();
+ startedTestCases.Close();
+ }
+ if ( startedTestCases[i].TestInfo().TestCaseFile() != aTestCaseFileName )
+ {
+ iStartedTestsPtrs.Remove(i); // delete pointer to CStartedTestCase
+ }
+ startedTestCases.Reset();
+ startedTestCases.Close();
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CContainer::NoFilteringL
+//
+// Remove possible filtering of test cases -> show all test cases.
+// ----------------------------------------------------------------------------
+//
+void CShowStartedCasesContainer::NoFilteringL()
+ {
+ ConstructListBoxModelL();
+ }
+
+// ----------------------------------------------------------------------------
+// CShowStartedCasesContainer:::SaveActiveLine
+//
+// Makes the iListBox member save its focus position
+// ----------------------------------------------------------------------------
+//
+void CShowStartedCasesContainer::SaveActiveLine()
+ {
+ ((CMenuListBox*)iListBox)->SaveFocusPosition();
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/ShowStartedCasesView.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,668 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CShowStartedCasesView class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <eikmenub.h>
+#include <aknViewAppUi.h>
+#include <barsread.h> //TResourceReader
+#include <Stifui.rsg>
+
+//#include "UIEngineContainer.h"
+#include <stifinternal/UIEngineContainer.h>
+
+#include "Stifui.hrh"
+#include "ShowStartedCasesView.h"
+#include "ShowStartedCasesContainer.h"
+#include "AppUIAppUi.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------------------------------
+// CShowStartedCasesView::ConstructL
+//
+// Symbian OS two-phased constructor
+// ----------------------------------------------------------------------------
+//
+void CShowStartedCasesView::ConstructL()
+ {
+ CView::ConstructL();
+ BaseConstructL( R_APPUI_SHOWSTARTEDCASESVIEW );
+ iFilterModule.Zero();
+ iFilterTestCaseFile.Zero();
+ iSelectedTestCase=0;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CShowStartedCasesView::~CShowStartedCasesView()
+//
+// Destructor
+// ----------------------------------------------------------------------------
+//
+CShowStartedCasesView::~CShowStartedCasesView()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// TUid CShowStartedCasesView::Id()
+//
+// Returns view´s id.
+// ----------------------------------------------------------------------------
+//
+TUid CShowStartedCasesView::Id() const
+ {
+ return TUid::Uid(EShowStartedCasesViewId);
+ }
+
+// ----------------------------------------------------------------------------
+// CShowStartedCasesView::HandleCommandL(TInt aCommand)
+//
+// Handles a command.
+// ----------------------------------------------------------------------------
+//
+void CShowStartedCasesView::HandleCommandL(TInt aCommand)
+ {
+ if ( aCommand >= ECmdFilterByModule && aCommand < ECmdFilterByTestCaseFile )
+ {
+ TInt moduleNumber = aCommand - ECmdFilterByModule;
+ RRefArray<TDesC> testModules;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( testModules );
+ if( KErrNone != ret )
+ {
+ testModules.Reset();
+ testModules.Close();
+ User::Leave( ret );
+ }
+ iFilterModule = testModules[moduleNumber];
+
+ iFilterTestCaseFile.Zero();
+
+ iContainer->FilterCasesByModuleL(iFilterModule);
+ //iContainer->ResetListBox();
+ //iContainer->DrawListBox();
+
+ testModules.Reset();
+ testModules.Close();
+
+ return;
+ }
+
+ else if ( aCommand >= ECmdFilterByTestCaseFile && aCommand < ECmdNOFiltering )
+ {
+ TInt testCaseFileNumber = aCommand - ECmdFilterByTestCaseFile;
+ RRefArray<TDesC> testCaseFiles;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( testCaseFiles );
+ if( KErrNone != ret )
+ {
+ testCaseFiles.Reset();
+ testCaseFiles.Close();
+ User::Leave( ret );
+ }
+
+ iFilterTestCaseFile = testCaseFiles[ testCaseFileNumber ];
+ iFilterModule.Zero();
+ //iContainer->FilterCasesByTCFileNameL(testCaseFileName);
+ iContainer->FilterCasesByTCFileNameL(iFilterTestCaseFile);
+ iContainer->ResetListBox();
+ iContainer->DrawListBox();
+
+ testCaseFiles.Reset();
+ testCaseFiles.Close();
+
+ return;
+ }
+
+ else if ( aCommand == ECmdNOFiltering )
+ {
+ iFilterModule.Zero();
+ iFilterTestCaseFile.Zero();
+ iContainer->NoFilteringL();
+ iContainer->ResetListBox();
+ iContainer->DrawListBox();
+ return;
+ }
+
+ // Handle rest possible commands
+ switch ( aCommand )
+ {
+ case ECmdViewOutput:
+ {
+ ViewTestCaseOutputL();
+ break;
+ }
+ case ECmdRemoveExecution:
+ {
+ iContainer->RemoveSelectedExecutionsL();
+ break;
+ }
+ case ECmdRemoveAllExecutions:
+ {
+ iContainer->RemoveAllExecutionsInViewL();
+ break;
+ }
+ case ECmdPauseTestCase:
+ {
+ TInt index = iContainer->CurrentItemIndex();
+ RRefArray<CStartedTestCase> runningTestCases;
+ TShowStartedCasesMode currentMode = (TShowStartedCasesMode)((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
+ TInt ret = KErrNone;
+ if(currentMode == EShowAllStartedCases)
+ ret = iUIStore->StartedTestCases(runningTestCases, CUIStoreIf::EStatusAll);
+ else if(currentMode == EShowOngoingCases)
+ ret = iUIStore->StartedTestCases(runningTestCases, CUIStoreIf::EStatusRunning);
+ if( KErrNone != ret )
+ {
+ User::Leave( ret );
+ }
+ runningTestCases[index].UIEngineContainer().PauseTest();
+ runningTestCases.Close();
+ break;
+ }
+ case ECmdResumeTestCase:
+ {
+ TInt index = iContainer->CurrentItemIndex();
+ RRefArray<CStartedTestCase> runningTestCases;
+ TShowStartedCasesMode currentMode = (TShowStartedCasesMode)((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
+ TInt ret = KErrNone;
+ if(currentMode == EShowAllStartedCases)
+ ret = iUIStore->StartedTestCases(runningTestCases, CUIStoreIf::EStatusAll);
+ else if(currentMode == EShowOngoingCases || currentMode == EShowPausedCases)
+ ret = iUIStore->StartedTestCases(runningTestCases, CUIStoreIf::EStatusRunning);
+ if( KErrNone != ret )
+ {
+ User::Leave( ret );
+ }
+ TInt testCaseToControl = 0;
+ if(currentMode == EShowAllStartedCases || currentMode == EShowOngoingCases)
+ {
+ testCaseToControl = index;
+ }
+ else if(currentMode == EShowPausedCases)
+ {
+ TInt pausedTestCasesCounter = 0;
+ for(int i = 0; i < runningTestCases.Count(); i++)
+ {
+ if(runningTestCases[i].UIEngineContainer().State() == CUIEngineContainer::EPaused)
+ {
+ if(pausedTestCasesCounter == index)
+ {
+ testCaseToControl = i;
+ break;
+ }
+ pausedTestCasesCounter++;
+ }
+ }
+ }
+
+ runningTestCases[testCaseToControl].UIEngineContainer().ResumeTest();
+ runningTestCases.Close();
+ break;
+ }
+ case ECmdAbortTestCase:
+ {
+ TInt index = iContainer->CurrentItemIndex();
+ RRefArray<CStartedTestCase> runningTestCases;
+ TShowStartedCasesMode currentMode = (TShowStartedCasesMode)((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
+ TInt ret = KErrNone;
+ if(currentMode == EShowAllStartedCases)
+ ret = iUIStore->StartedTestCases(runningTestCases, CUIStoreIf::EStatusAll);
+ else if(currentMode == EShowOngoingCases || currentMode == EShowPausedCases)
+ ret = iUIStore->StartedTestCases(runningTestCases, CUIStoreIf::EStatusRunning);
+
+ if( KErrNone != ret )
+ {
+ User::Leave( ret );
+ }
+ TInt testCaseToControl = 0;
+
+ if(currentMode == EShowAllStartedCases || currentMode == EShowOngoingCases)
+ {
+ testCaseToControl = index;
+ }
+ else if(currentMode == EShowPausedCases)
+ {
+ TInt pausedTestCasesCounter = 0;
+ for(int i = 0; i < runningTestCases.Count(); i++)
+ {
+ if(runningTestCases[i].UIEngineContainer().State() == CUIEngineContainer::EPaused)
+ {
+ if(pausedTestCasesCounter == index)
+ {
+ testCaseToControl = i;
+ break;
+ }
+ pausedTestCasesCounter++;
+ }
+ }
+ }
+
+ runningTestCases[testCaseToControl].UIEngineContainer().CancelTest();
+ runningTestCases.Close();
+ break;
+ }
+ case EAknSoftkeyOk:
+ {
+ iEikonEnv->InfoMsg( _L("TestCase Menu ok") );
+ break;
+ }
+ case EAknSoftkeyBack:
+ {
+ // Remove possible filterings so that they does not affect when coming again to this view
+ iFilterModule.Zero();
+ iFilterTestCaseFile.Zero();
+ iSelectedTestCase=0; //Reset selected test case information
+ AppUi()->HandleCommandL(EAppUIGoBack);
+ break;
+ }
+ default:
+ {
+ AppUi()->HandleCommandL( aCommand );
+ break;
+ }
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CShowStartedCasesView::HandleListBoxEventL
+//
+// Handles listbox events.
+// ----------------------------------------------------------------------------
+//
+void CShowStartedCasesView::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
+ {
+ if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
+ {
+ ViewTestCaseOutputL();
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CShowStartedCasesView::ViewTestCaseOutputL
+//
+// Shows outputs of test case which is selected in Container.
+// ----------------------------------------------------------------------------
+//
+void CShowStartedCasesView::ViewTestCaseOutputL()
+ {
+ iSelectedTestCase = iContainer->CurrentItemIndex();
+
+ // Sets index of selected test case to AppUi
+ //( ( CAppUIAppUi* )AppUi() )->SetTestCaseIndex( iSelectedTestCase );
+ ( ( CAppUIAppUi* )AppUi() )->SetStartedTestCase( iContainer->CurrentTestCase() );
+
+ AppUi()->HandleCommandL(ECmdViewOutput);
+ }
+
+
+// ----------------------------------------------------------------------------
+// CShowStartedCasesView::HandleClientRectChange()
+//
+// Handles client rect changes.
+// ----------------------------------------------------------------------------
+//
+void CShowStartedCasesView::HandleClientRectChange()
+ {
+ if ( iContainer )
+ {
+ iContainer->SetRect( ClientRect() );
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CShowStartedCasesView::DoActivateL
+//
+// Initializes view when activated.
+// ----------------------------------------------------------------------------
+//
+void CShowStartedCasesView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/)
+ {
+ if (!iContainer)
+ {
+ iContainer = new (ELeave) CShowStartedCasesContainer;
+ iContainer->SetMopParent(this);
+ iContainer->ConstructL( ClientRect(), this );
+ AppUi()->AddToStackL( *this, iContainer );
+ }
+
+ // Check if filtering by module or by test case file is selected
+ if ( iFilterModule.Length() )
+ {
+ iContainer->FilterCasesByModuleL(iFilterModule);
+ }
+ else if ( iFilterTestCaseFile.Length() )
+ {
+ iContainer->FilterCasesByTCFileNameL(iFilterTestCaseFile);
+ }
+ if ( iSelectedTestCase )
+ iContainer->SetCurrentItemIndex(iSelectedTestCase);
+
+ RefreshNaviTitleL();
+
+ iContainer->DrawListBox();
+ }
+
+
+// ----------------------------------------------------------------------------
+// CShowStartedCasesView::RefreshNaviTitle
+//
+// Refreshes view name shown in the navi pane.
+// ----------------------------------------------------------------------------
+//
+void CShowStartedCasesView::RefreshNaviTitleL()
+ {
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
+ TResourceReader reader;
+
+ switch ( ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode )
+ {
+ case EShowAllStartedCases:
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_ALL);
+ break;
+ case EShowOngoingCases:
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_ONGOING);
+ break;
+ case EShowPausedCases:
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_PAUSED);
+ break;
+ case EShowPassedCases:
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_PASSED);
+ break;
+ case EShowFailedCases:
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_FAILED);
+ break;
+ case EShowCrashedAbortedCases:
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_CRASHED_ABORTED);
+ break;
+ default:
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_TESTSET);
+ break;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ iNaviDecorator = np->CreateNavigationLabelL( reader );
+ CleanupStack::PopAndDestroy(); // resource reader
+ np->PushL(*iNaviDecorator);
+ }
+
+
+// ----------------------------------------------------------------------------
+// CShowStartedCasesView::DoDeactivate
+//
+// Deactivates view.
+// ----------------------------------------------------------------------------
+//
+void CShowStartedCasesView::DoDeactivate()
+ {
+ if ( iContainer )
+ {
+ TInt mode = ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
+ if(mode != EShowOngoingCases && mode != EShowPausedCases
+ && mode != EShowCrashedAbortedCases && mode != EShowAllStartedCases)
+ {
+ iContainer->SaveActiveLine();
+ }
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+
+ }
+
+
+// ----------------------------------------------------------------------------
+// CShowStartedCasesView::DynInitMenuPaneL
+//
+// Initializes menu pane.
+// ----------------------------------------------------------------------------
+//
+void CShowStartedCasesView::DynInitMenuPaneL(
+ TInt aResourceId, CEikMenuPane* aMenuPane)
+ {
+ // options menu
+ if ( R_APPUI_SHOWSTARTEDCASESVIEW_MENU == aResourceId )
+ {
+ CStartedTestCase* startedTestCase = iContainer->SelectedTestCase();
+ if ( NULL != startedTestCase )
+ {
+ aMenuPane->SetItemDimmed( ECmdFilterMenu, EFalse );
+ switch ( startedTestCase->Status() )
+ {
+ // test case running
+ case CUIStoreIf::EStatusRunning:
+ {
+ switch ( startedTestCase->UIEngineContainer().State() )
+ {
+ case CUIEngineContainer::ERunning:
+ case CUIEngineContainer::EPaused:
+ {
+ aMenuPane->SetItemDimmed( ECmdShowSetMenu, EFalse );
+ break;
+ }
+ //case CUIEngineContainer::ENotStarted:
+ //case CUIEngineContainer::EExecuted:
+ //case CUIEngineContainer::EFinished:
+ default:
+ {
+ aMenuPane->SetItemDimmed( ECmdShowSetMenu, ETrue );
+ }
+ }
+ break;
+ }
+
+ // test case not running
+ //case CUIStoreIf::EStatusPassed:
+ //case CUIStoreIf::EStatusFailed:
+ //case CUIStoreIf::EStatusAborted:
+ //case CUIStoreIf::EStatusExecuted
+ default:
+ {
+ aMenuPane->SetItemDimmed( ECmdShowSetMenu, ETrue );
+ }
+ }
+ }
+ else
+ {
+ //aMenuPane->SetItemDimmed( ECmdFilterMenu, ETrue );
+ aMenuPane->SetItemDimmed( ECmdViewOutput, ETrue );
+ aMenuPane->SetItemDimmed( ECmdShowSetMenu, ETrue );
+ }
+ }
+
+ // test case control menu
+ if ( R_TESTCASE_CONTROL_SUBMENU == aResourceId )
+ {
+ CStartedTestCase* startedTestCase = iContainer->SelectedTestCase();
+
+ if ( NULL != startedTestCase )
+ {
+ if ( startedTestCase->Status() == CUIStoreIf::EStatusRunning )
+ {
+ switch ( startedTestCase->UIEngineContainer().State() )
+ {
+ case CUIEngineContainer::ERunning:
+ {
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, EFalse );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, EFalse );
+ break;
+ }
+ case CUIEngineContainer::EPaused:
+ {
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, EFalse );
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, EFalse );
+ break;
+ }
+ //case CUIEngineContainer::ENotStarted:
+ //case CUIEngineContainer::EExecuted:
+ //case CUIEngineContainer::EFinished:
+ default:
+ {
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
+ break;
+ }
+ }
+ }
+ else
+ {
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
+ }
+ }
+ else
+ {
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
+ }
+ }
+
+ // Test modules are added to filter by test module submenu if the submenu is opened
+ if (R_APPUI_FILTERBYMODULES_MENU == aResourceId)
+ {
+ RRefArray<TDesC> testModules;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( testModules );
+ if( KErrNone != ret )
+ {
+ testModules.Reset();
+ testModules.Close();
+ User::Leave( ret );
+ }
+ TInt moduleCount = testModules.Count();
+
+ TInt i;
+ CEikMenuPaneItem::SData item;
+
+ item.iCommandId = ECmdFilterByModule;
+ item.iFlags = 0;
+ item.iCascadeId = 0;
+
+ for (i = 0; i < moduleCount; i++)
+ {
+ item.iText = testModules[i];
+ aMenuPane->AddMenuItemL(item);
+ item.iCommandId++; // command IDs 0x1000 - 0x1FFF are reserved for modules in hrh file
+ }
+
+ testModules.Reset();
+ testModules.Close();
+
+ }
+
+ // Test case files are added to filter by test case file submenu if the submenu is opened
+ if (R_APPUI_FILTER_BY_TESTCASEFILE_MENU == aResourceId)
+ {
+ RRefArray<TDesC> testCaseFiles;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( testCaseFiles );
+ if( KErrNone != ret )
+ {
+ testCaseFiles.Reset();
+ testCaseFiles.Close();
+ User::Leave( ret );
+ }
+ TInt testCaseFileCount = testCaseFiles.Count();
+
+ TInt i;
+ CEikMenuPaneItem::SData item;
+
+ item.iCommandId = ECmdFilterByTestCaseFile;
+ item.iFlags = 0;
+ item.iCascadeId = 0;
+
+ for (i = 0; i < testCaseFileCount; i++)
+ {
+ item.iText = testCaseFiles[i];
+ // If there´s no test case file, don´t add item to menu.
+ if ( testCaseFiles[i].Length() > 0 )
+ {
+ aMenuPane->AddMenuItemL(item);
+ }
+ item.iCommandId++; // command IDs 0x2000 - 0x2FFF are reserved for test case files in hrh file
+ }
+
+ testCaseFiles.Reset();
+ testCaseFiles.Close();
+
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CShowStartedCasesView::TestCaseStateChangedL
+//
+// Handles status changes of test cases in view.
+// ----------------------------------------------------------------------------
+//
+void CShowStartedCasesView::TestCaseStateChangedL()
+ {
+ if ( iContainer )
+ {
+
+ //CStartedTestCase* currentlySelectedTest = iContainer->SelectedTestCase();
+
+ TInt numOfTestsInViewBeforeStateChange = iContainer->TestsInViewCount();
+
+ //((CStartedTestsListBoxModel*)iContainer->iListBox->Model())->MdcaCount();
+
+ iContainer->ConstructListBoxModelL();
+
+ // Check if filtering by module or by test case file is selected
+ if ( iFilterModule.Length() )
+ {
+ iContainer->FilterCasesByModuleL(iFilterModule);
+ }
+ else if ( iFilterTestCaseFile.Length() )
+ {
+ iContainer->FilterCasesByTCFileNameL(iFilterTestCaseFile);
+ }
+
+ TInt numOfTestsInViewAfterStateChange = iContainer->TestsInViewCount();
+ //((CStartedTestsListBoxModel*)iContainer->iListBox->Model())->MdcaCount();
+
+ if ( numOfTestsInViewAfterStateChange >= numOfTestsInViewBeforeStateChange )
+ iContainer->HandleItemAdditionL();
+ else
+ iContainer->HandleItemRemovalL();
+
+ if(iContainer->CurrentItemIndex() < 0)
+ {
+ iContainer->SetCurrentItemIndex(0);
+ }
+ iContainer->DrawListBox();
+
+ }
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/StartCasesContainer.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,227 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStartCasesContainer class
+* definition
+*
+*/
+
+// INCLUDE FILES
+#include <aknlists.h> // ListBox
+#include <AknIconArray.h> // CAknIconArray
+#include <aknnotewrappers.h>
+
+#include <eikclbd.h> // CColumnListBoxData
+
+#include "StartCasesContainer.h"
+#include "StartCasesView.h"
+#include <Stifui.rsg>
+#include "Stifui.hrh"
+#include "AppUIAppUi.h"
+
+#include "Container.h"
+#include "MenuListBox.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CStartCasesContainer::ConstructL
+//
+// Symbian OS two phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CStartCasesContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: ConstructL"));
+
+ iParentView = (CStartCasesView*)aListBoxObserver;
+ CreateWindowL();
+
+ iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
+
+ iTestCasesInView.Reset();
+ //((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: iTCInV Reset"));
+
+ iListBox = CMenuListBox::NewL(EStartCaseMenuViewId);
+ iListBox->SetContainerWindowL( *this );
+ iListBox->SetListBoxObserver( aListBoxObserver /*this*/ ); // jos peritty MEikListBoxObserver:sta
+ iListBox->ConstructL(this, EAknListBoxMarkableList /*EAknListBoxSelectionList*/);
+
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: ListBox constructed"));
+
+ //Create Scroller control for ListBox and set its visibility
+ iListBox->CreateScrollBarFrameL(ETrue);
+ iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+ iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
+
+ if ( iUIStore )
+ {
+ RRefArray<CTestInfo> allCases;
+ TInt ret = iUIStore->TestCases( allCases );
+ if( KErrNone != ret )
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("iUIStore->TestCases() fails"));
+ allCases.Reset();
+ allCases.Close();
+ User::Leave( ret );
+ }
+
+ const TInt KTestCaseCount = allCases.Count();
+ for (TInt i=0; i < KTestCaseCount; i++)
+ {
+ ret = iTestCasesInView.Append( &allCases[i] );
+ if( ret != KErrNone )
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("Test case append fails with: %d"), ret );
+ User::Leave( ret );
+ }
+ }
+
+ iListBoxModel = CTestCaseListBoxModel::NewL(&iTestCasesInView);
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: ListBox model"));
+
+ iListBox->Model()->SetItemTextArray(iListBoxModel);
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: ListBox model set"));
+
+ allCases.Reset();
+ allCases.Close();
+ }
+ else
+ {
+ User::Leave( KErrGeneral );
+ }
+
+ // Creates graphic.
+ SetGraphicIconL( iListBox );
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: icons created"));
+
+ iListBox->ActivateL();
+ ((CMenuListBox*)iListBox)->SetPreviousFocus();
+
+ SetRect(aRect);
+ ActivateL();
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesContainer::~CStartCasesContainer
+//
+// Destructor
+// ----------------------------------------------------------------------------
+//
+CStartCasesContainer::~CStartCasesContainer()
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesContainer::SizeChanged
+//
+// Called by framework when the view size is changed.
+// ----------------------------------------------------------------------------
+//
+void CStartCasesContainer::SizeChanged()
+ {
+ if ( iListBox )
+ {
+ iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesContainer::CountComponentControls
+//
+// Gets a count of the component controls of this list box control.
+// ----------------------------------------------------------------------------
+//
+TInt CStartCasesContainer::CountComponentControls() const
+ {
+ return 1; // return nbr of controls inside this container
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesContainer::ComponentControl
+//
+// Gets a pointer to the specified component control.
+// ----------------------------------------------------------------------------
+//
+CCoeControl* CStartCasesContainer::ComponentControl(TInt aIndex) const
+ {
+ switch ( aIndex )
+ {
+ case 0:
+ return iListBox;
+ default:
+ return NULL;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesContainer::Draw
+//
+// Draw a control, called by window server.
+// ----------------------------------------------------------------------------
+//
+void CStartCasesContainer::Draw(const TRect& /*aRect*/) const
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesContainer::OfferKeyEventL
+//
+// Handles key events.
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CStartCasesContainer::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent, TEventCode aType )
+ {
+ if (aType != EEventKey)
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ if (iListBox)
+ {
+ //if multiple items selected
+ if ( iListBox->SelectionIndexes()->Count() > 0 )
+ {
+ TUint mask = 0x40488;
+
+ //if event is enter key,
+ //don´t send it to listbox
+ if ( aKeyEvent.iScanCode == 0xa7
+ && ( aKeyEvent.iModifiers & mask ) == 0 )
+ {
+ iParentView->HandleListBoxEventL( iListBox, MEikListBoxObserver::EEventEnterKeyPressed );
+ return EKeyWasConsumed;
+ }
+ }
+
+ return iListBox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ else
+ {
+ return EKeyWasNotConsumed;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesContainer:::SaveActiveLine
+//
+// Makes the iListBox member save its focus position
+// ----------------------------------------------------------------------------
+//
+void CStartCasesContainer::SaveActiveLine()
+ {
+ ((CMenuListBox*)iListBox)->SaveFocusPosition();
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/StartCasesView.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,474 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStartCasesView class definition.
+*
+*/
+
+// INCLUDE FILES
+#include <eikmenub.h>
+#include <aknViewAppUi.h>
+#include <aknlistquerydialog.h>
+#include <barsread.h> //TResourceReader
+#include <Stifui.rsg>
+#include "StartCasesView.h"
+#include "StartCasesContainer.h"
+#include "AppUIAppUi.h"
+#include "Stifui.hrh"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CStartCasesView::ConstructL
+//
+// Symbian OS two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CStartCasesView::ConstructL()
+ {
+ CView::ConstructL();
+ BaseConstructL( R_APPUI_STARTCASESVIEW );
+ iCurrentTestCase = 0;
+
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesView::~CStartCasesView
+//
+// Destructor
+// ----------------------------------------------------------------------------
+//
+CStartCasesView::~CStartCasesView()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesView::Id
+//
+// Returns view´s id.
+// ----------------------------------------------------------------------------
+//
+TUid CStartCasesView::Id() const
+ {
+ return TUid::Uid(EStartCaseMenuViewId);
+
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesView::HandleCommandL
+//
+// Handles a command.
+// ----------------------------------------------------------------------------
+//
+void CStartCasesView::HandleCommandL(TInt aCommand)
+ {
+ if ( aCommand >= ECmdFilterByModule && aCommand < ECmdFilterByTestCaseFile ) // 0x1000 - 0x1FFF
+ {
+ TInt moduleNumber = aCommand - ECmdFilterByModule;
+ RRefArray<TDesC> allModules;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( allModules );
+ if( KErrNone != ret )
+ {
+ allModules.Reset();
+ allModules.Close();
+ User::Leave( ret );
+ }
+ TName moduleName = allModules[ moduleNumber ];
+
+ iContainer->FilterCasesByModuleL( moduleName );
+
+ allModules.Reset();
+ allModules.Close();
+ }
+ else if ( aCommand >= ECmdFilterByTestCaseFile && aCommand < ECmdNOFiltering )
+ {
+ TInt testCaseFileNumber = aCommand - ECmdFilterByTestCaseFile;
+ RRefArray<TDesC> allTestCases;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( allTestCases );
+ if( KErrNone != ret )
+ {
+ allTestCases.Reset();
+ allTestCases.Close();
+ User::Leave( ret );
+ }
+ TFileName testCaseFileName = allTestCases[ testCaseFileNumber ];
+
+ iContainer->FilterCasesByTCFileNameL( testCaseFileName );
+
+ allTestCases.Reset();
+ allTestCases.Close();
+ }
+ else if ( aCommand == ECmdNOFiltering )
+ {
+ iContainer->NoFilteringL();
+ }
+ else if ( aCommand == EAknCmdMark || aCommand == EAknCmdUnmark
+ || aCommand == EAknMarkAll || aCommand == EAknUnmarkAll )
+ {
+ iContainer->HandleMarkCommandL( aCommand );
+ }
+ else
+ {
+ switch ( aCommand )
+ {
+ case ECmdStartCases:
+ {
+ CheckListBoxSelectionsL( iContainer->ListBox() );
+ break;
+ }
+ case EAknSoftkeyBack:
+ {
+ iCurrentTestCase = 0;
+ AppUi()->HandleCommandL(EAppUIGoBack);
+ break;
+ }
+ default:
+ {
+ AppUi()->HandleCommandL( aCommand );
+ break;
+ }
+ }
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesView::HandleClientRectChange
+//
+// Handles client rect changes.
+// ----------------------------------------------------------------------------
+//
+void CStartCasesView::HandleClientRectChange()
+ {
+ if ( iContainer )
+ {
+ iContainer->SetRect( ClientRect() );
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesView::DoActivateL
+//
+// Initializes view when activated.
+// ----------------------------------------------------------------------------
+//
+void CStartCasesView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/)
+ {
+ if (!iContainer)
+ {
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("StartCasesView: DoActivateL"));
+ iContainer = new (ELeave) CStartCasesContainer;
+ iContainer->SetMopParent(this);
+ iContainer->ConstructL( ClientRect(), this );
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("StartCasesView: container constructed"));
+ AppUi()->AddToStackL( *this, iContainer );
+ }
+
+ iContainer->SetCurrentItemIndex(iCurrentTestCase);
+
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
+
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTCASES);
+ iNaviDecorator = np->CreateNavigationLabelL( reader );
+ CleanupStack::PopAndDestroy(); // resource reader
+ np->PushL(*iNaviDecorator);
+
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesView::DoDeactivate
+//
+// Deactivates view.
+// ----------------------------------------------------------------------------
+//
+void CStartCasesView::DoDeactivate()
+ {
+ if ( iContainer )
+ {
+ iContainer->SaveActiveLine();
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+
+// ----------------------------------------------------------------------------
+// CStartCasesView::DynInitMenuPaneL
+//
+// Initializes menu pane.
+// ----------------------------------------------------------------------------
+//
+void CStartCasesView::DynInitMenuPaneL(
+ TInt aResourceId, CEikMenuPane* aMenuPane)
+ {
+
+ // Test modules are added to filter by test module submenu if the submenu is opened
+ if (R_APPUI_FILTERBYMODULES_MENU == aResourceId)
+ {
+ RRefArray<TDesC> modules;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( modules );
+ if( KErrNone != ret )
+ {
+ modules.Reset();
+ modules.Close();
+ User::Leave( ret );
+ }
+
+ TInt moduleCount = modules.Count();
+
+ TInt i;
+ CEikMenuPaneItem::SData item;
+
+ item.iCommandId = ECmdFilterByModule;
+ item.iFlags = 0;
+ item.iCascadeId = 0;
+
+ for (i = 0; i < moduleCount; i++)
+ {
+ //item.iText = modules[i].iModuleName;
+ item.iText = modules[i];
+ aMenuPane->AddMenuItemL(item);
+ item.iCommandId++; // command IDs 0x1000 - 0x1FFF are reserved for modules in hrh file
+ }
+
+ modules.Reset();
+ modules.Close();
+
+ }
+
+ // Test case files are added to filter by test case file submenu if the submenu is opened
+ if (R_APPUI_FILTER_BY_TESTCASEFILE_MENU == aResourceId)
+ {
+ RRefArray<TDesC> testCaseFiles;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( testCaseFiles );
+ if( KErrNone != ret )
+ {
+ testCaseFiles.Reset();
+ testCaseFiles.Close();
+ User::Leave( ret );
+ }
+
+ TInt testCaseFileCount = testCaseFiles.Count();
+
+ TInt i;
+ CEikMenuPaneItem::SData item;
+
+ item.iCommandId = ECmdFilterByTestCaseFile;
+ item.iFlags = 0;
+ item.iCascadeId = 0;
+
+ for (i = 0; i < testCaseFileCount; i++)
+ {
+ item.iText = testCaseFiles[i];
+ // If there´s no test case file, don´t add item to menu.
+ if ( testCaseFiles[i].Length() > 0 )
+ {
+ aMenuPane->AddMenuItemL(item);
+ }
+ item.iCommandId++; // command IDs 0x2000 - 0x2FFF are reserved for test case files in hrh file
+ }
+
+ testCaseFiles.Reset();
+ testCaseFiles.Close();
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesView::HandleListBoxEventL
+//
+// Handles listbox events.
+// ----------------------------------------------------------------------------
+//
+void CStartCasesView::HandleListBoxEventL( CEikListBox* aListBox,
+ TListBoxEvent aEventType )
+ {
+ if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
+ {
+ CheckListBoxSelectionsL( aListBox );
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesView::CheckListBoxSelectionsL
+//
+// Checks listbox selections and launches query dialog to start test cases.
+// ----------------------------------------------------------------------------
+//
+void CStartCasesView::CheckListBoxSelectionsL( CEikListBox* aListBox )
+ {
+ TInt i(0);
+ TInt count = aListBox->SelectionIndexes()->Count();
+
+ RArray<TInt> selectedIndices;
+ CleanupClosePushL( selectedIndices );
+
+ if ( count > 0 )
+ {
+ for( i = 0; i < count; i++ )
+ {
+ selectedIndices.InsertInOrder(
+ (*aListBox->SelectionIndexes())[i] );
+ }
+ }
+
+ // Check count of selected items.
+ if ( count == 1 )
+ {
+ iCurrentTestCase = selectedIndices[0];
+ StartTestCaseL();
+ }
+ else if (count > 1)
+ {
+ StartTestCasesL( selectedIndices );
+ }
+ else
+ {
+ iCurrentTestCase = iContainer->CurrentItemIndex();
+ StartTestCaseL();
+ }
+
+ CleanupStack::PopAndDestroy();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesView::StartTestCaseL
+//
+// Starts test case which is selected in containers list box.
+// First shows a list query if user wants just start test case or
+// if he wants to start test case and view test case output.
+// ----------------------------------------------------------------------------
+//
+void CStartCasesView::StartTestCaseL()
+ {
+ TInt selectedItem(0);
+ CAknListQueryDialog* startDialog = new (ELeave) CAknListQueryDialog(&selectedItem);
+ if ( startDialog->ExecuteLD(R_START_TESTCASE_LIST_QUERY) )
+ {
+ RRefArray<CTestInfo> testInfo;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCases( testInfo );
+ if( KErrNone != ret )
+ {
+ testInfo.Reset();
+ testInfo.Close();
+ User::Leave( ret );
+ }
+ TInt testCaseNumber = iCurrentTestCase;
+
+ TInt testCaseIndex( 0 );
+
+ ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->StartTestCase( testInfo[testCaseNumber], testCaseIndex );
+
+ if( KErrNone != ret )
+ {
+ User::Leave( ret );
+ }
+ testInfo.Reset();
+ testInfo.Close();
+
+ // Increment the counter value
+ ((CAppUIAppUi*)AppUi())->iUIStoreHandler->iExecutedTestCaseCount++;
+
+ if ( selectedItem == 1 ) // if view output was selected
+ {
+ CStartedTestCase* startedCase =
+ &((CAppUIAppUi*)AppUi())->UIStoreHandler()->StartedTestCaseL(
+ testCaseIndex );
+ ((CAppUIAppUi*)AppUi())->SetStartedTestCase( startedCase );
+
+ AppUi()->HandleCommandL( ECmdViewOutput );
+
+ }
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CStartCasesView::StartTestCasesL
+//
+// Starts multiple test cases which are selected in containers list box.
+// Shows a list query if user wants to start cases parallel or sequential.
+// ----------------------------------------------------------------------------
+//
+void CStartCasesView::StartTestCasesL( RArray<TInt> aSelectedIndexes )
+ {
+ _LIT( KTempSet, "TempSet");
+ TInt selectedItem(0);
+ TInt i(0);
+ TInt ret(0);
+
+ CAknListQueryDialog* startDialog = new (ELeave) CAknListQueryDialog(&selectedItem);
+ if ( startDialog->ExecuteLD(R_START_MULTIPLE_TESTCASES_LIST_QUERY) )
+ {
+ RRefArray<CTestInfo> testInfo;
+ CleanupClosePushL( testInfo );
+
+ ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->CreateTestSet( KTempSet );
+
+ ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCases( testInfo );
+ if( KErrNone != ret )
+ {
+ testInfo.Reset();
+ testInfo.Close();
+ User::Leave( ret );
+ }
+
+ for( i = 0; i < aSelectedIndexes.Count(); i++ )
+ {
+ ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->AddToTestSet( KTempSet,
+ testInfo[ aSelectedIndexes[i] ] );
+ if( KErrNone != ret )
+ {
+ User::Leave( ret );
+ }
+ // Increment the counter value
+ ((CAppUIAppUi*)AppUi())->iUIStoreHandler->iExecutedTestCaseCount++;
+ }
+
+ //start cases
+ if ( selectedItem == 0 )
+ {
+ ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->StartTestSet(
+ ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestSetL( KTempSet ),
+ i, CStartedTestSet::ESetParallel);
+ }
+ else if (selectedItem == 1)
+ {
+ ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->StartTestSet(
+ ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestSetL( KTempSet ),
+ i, CStartedTestSet::ESetSequential);
+ }
+
+ ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->RemoveTestSet( KTempSet );
+
+ CleanupStack::PopAndDestroy();
+ }
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/StartedCasesMenuContainer.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,234 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStartedCasesMenuContainer
+* class definition.
+*
+*/
+
+// INCLUDE FILES
+#include "StartedCasesMenuContainer.h"
+#include "Stifui.hrh"
+#include <Stifui.rsg>
+
+#include <aknlists.h> //ListBox
+#include <barsread.h> // for TResourceReader
+
+#include <aknnotewrappers.h>
+
+#include "MenuListBox.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuContainer::ConstructL
+//
+// Symbian OS default constructor.
+// ----------------------------------------------------------------------------
+//
+void CStartedCasesMenuContainer::ConstructL(
+ const TRect& aRect )
+ {
+ CreateWindowL();
+
+ iListBox = CMenuListBox::NewL(EStartedCasesMenuViewId);
+ iListBox->SetContainerWindowL( *this );
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC( reader, R_STARTED_CASES_MENU_LISTBOX );
+ iListBox->SetListBoxObserver( this ); // jos peritty MEikListBoxObserver:sta
+ //iListBox->SetObserver( this /*iMainMenuObserver*/ ); //jos peritty MCoeControlObserver:sta
+ iListBox->ConstructFromResourceL( reader );
+ CleanupStack::PopAndDestroy(); // resource stuffs.
+
+ //Create Scroller control for ListBox and set its visibility
+ iListBox->CreateScrollBarFrameL(ETrue);
+ iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+
+ ((CMenuListBox*)iListBox)->SetPreviousFocus();
+ iListBox->ActivateL();
+
+ SetRect(aRect);
+ ActivateL();
+ }
+
+// Destructor
+CStartedCasesMenuContainer::~CStartedCasesMenuContainer()
+ {
+ if ( iListBox )
+ {
+ iListBox->Reset();
+ delete iListBox;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuContainer::SizeChanged
+//
+// Called by framework when the view size is changed.
+// ----------------------------------------------------------------------------
+//
+void CStartedCasesMenuContainer::SizeChanged()
+ {
+ if ( iListBox )
+ {
+ iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuContainer::CountComponentControls
+//
+// Gets a count of the component controls of this list box control.
+// ----------------------------------------------------------------------------
+//
+TInt CStartedCasesMenuContainer::CountComponentControls() const
+ {
+ return 1; // return nbr of controls inside this container
+ }
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuContainer::ComponentControl
+//
+// Gets a pointer to the specified component control.
+// ----------------------------------------------------------------------------
+//
+CCoeControl* CStartedCasesMenuContainer::ComponentControl(TInt aIndex) const
+ {
+ switch ( aIndex )
+ {
+ case 0:
+ return iListBox;
+ default:
+ return NULL;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuContainer::Draw
+//
+// Draw a control, called by window server.
+// ----------------------------------------------------------------------------
+//
+void CStartedCasesMenuContainer::Draw(const TRect& /*aRect*/) const
+ {
+ // CWindowGc& gc = SystemGc();
+ }
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuContainer::HandleListBoxEventL
+//
+// Handles list box events.
+// ----------------------------------------------------------------------------
+//
+void CStartedCasesMenuContainer::HandleListBoxEventL(
+ CEikListBox* aListBox,
+ TListBoxEvent aEventType )
+ {
+
+ if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
+ {
+ HandleSelectedListItemL( aListBox->CurrentItemIndex() );
+ }
+ }
+
+
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuContainer::HandleSelectedListItemL
+//
+// Method HandleSelectedListItemL handles valid index.
+// ----------------------------------------------------------------------------
+//
+void CStartedCasesMenuContainer::HandleSelectedListItemL( TInt aIndex )
+ {
+ TInt selection = aIndex;
+
+ switch ( selection )
+ {
+ case 0: ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdShowAllStartedCases);
+ break;
+ case 1: ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdShowOngoingCases);
+ break;
+ case 2: ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdShowPausedCases);
+ break;
+ case 3: ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdShowPassedCases);
+ break;
+ case 4: ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdShowFailedCases);
+ break;
+ case 5: ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdShowCrashedAbortedCases);
+ break;
+ case 6: ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdShowStatistics);
+ break;
+ default:
+ break;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuContainer::OfferKeyEventL
+//
+// Handles key events.
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CStartedCasesMenuContainer::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent, TEventCode aType)
+ {
+ if (aType != EEventKey)
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ switch ( aKeyEvent.iCode )
+ {
+ case EKeyLeftArrow:
+ case EKeyRightArrow:
+ { /* Left ja right key eventit valitetaan AppUille joka hoitaa siirtymisen toisiin nakymiin */
+ return EKeyWasNotConsumed;
+ //break;
+ }
+ default:
+ {
+ //Muut Key eventit valitetaan listboxille, joka hoitaa ne
+ if (iListBox)
+ {
+ return iListBox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ }
+ }
+ return EKeyWasNotConsumed;
+ }
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuContainer::GetActiveLine
+//
+// Get currently selected items index.
+// ----------------------------------------------------------------------------
+//
+TInt CStartedCasesMenuContainer::GetActiveLine()
+ {
+ return iListBox->CurrentItemIndex();
+ }
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuContainer:::SaveActiveLine
+//
+// Makes the iListBox member save its focus position
+// ----------------------------------------------------------------------------
+//
+void CStartedCasesMenuContainer::SaveActiveLine()
+ {
+ ((CMenuListBox*)iListBox)->SaveFocusPosition();
+ }
+
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/StartedCasesMenuView.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,160 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStartedCasesMenuView class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <aknViewAppUi.h>
+#include <barsread.h> //TResourceReader
+#include <Stifui.rsg>
+#include "StartedCasesMenuView.h"
+#include "StartedCasesMenuContainer.h"
+#include "Stifui.hrh"
+#include "AppUIAppUi.h"
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuView::ConstructL
+//
+// Symbian OS two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CStartedCasesMenuView::ConstructL()
+ {
+ CView::ConstructL();
+ BaseConstructL( R_APPUI_STARTEDCASESMENUVIEW );
+ }
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuView::~CStartedCasesMenuView
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CStartedCasesMenuView::~CStartedCasesMenuView()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuView::Id
+//
+// Returns view´s id.
+// ----------------------------------------------------------------------------
+//
+TUid CStartedCasesMenuView::Id() const
+ {
+ return TUid::Uid(EStartedCasesMenuViewId); //KTestCaseMenuViewId;
+ }
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuView::HandleCommandL
+//
+// Handles a command.
+// ----------------------------------------------------------------------------
+//
+void CStartedCasesMenuView::HandleCommandL(TInt aCommand)
+ {
+ switch ( aCommand )
+ {
+ case EAknSoftkeyBack:
+ {
+ AppUi()->HandleCommandL(EAppUIGoBack);
+ break;
+ }
+ case EAknCmdOpen:
+ {
+ TInt a = iContainer->GetActiveLine();
+ iContainer->HandleSelectedListItemL( a );
+ }
+ break;
+ default:
+ {
+ AppUi()->HandleCommandL( aCommand );
+ break;
+ }
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuView::HandleClientRectChange
+//
+// Handles client rect changes.
+// ----------------------------------------------------------------------------
+//
+void CStartedCasesMenuView::HandleClientRectChange()
+ {
+ if ( iContainer )
+ {
+ iContainer->SetRect( ClientRect() );
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuView::DoActivateL
+//
+// Initializes view when activated.
+// ----------------------------------------------------------------------------
+//
+void CStartedCasesMenuView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/)
+ {
+ if (!iContainer)
+ {
+ iContainer = new (ELeave) CStartedCasesMenuContainer;
+ iContainer->SetMopParent(this);
+ iContainer->ConstructL( ClientRect() );
+ AppUi()->AddToStackL( *this, iContainer );
+ }
+
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
+
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTEDCASES);
+ iNaviDecorator = np->CreateNavigationLabelL( reader );
+ CleanupStack::PopAndDestroy(); // resource reader
+ np->PushL(*iNaviDecorator);
+ }
+
+// ----------------------------------------------------------------------------
+// CStartedCasesMenuView::DoDeactivate
+//
+// Deactivates view.
+// ----------------------------------------------------------------------------
+//
+void CStartedCasesMenuView::DoDeactivate()
+ {
+ if ( iContainer )
+ {
+ iContainer->SaveActiveLine();
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/StatisticsContainer.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,297 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStatisticsContainer class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <aknlists.h> // ListBox
+#include <AknIconArray.h> // CAknIconArray
+#include <aknnotewrappers.h>
+
+#include <eikclbd.h> // CColumnListBoxData
+
+#include <Stifui.rsg>
+
+//#include "UIStoreIf.h"
+//#include "UIStore.h"
+//#include "UIEngine.h"
+//#include "UIEngineContainer.h"
+
+#include <stifinternal/UIStoreIf.h>
+#include <stifinternal/UIStore.h>
+#include <stifinternal/UIEngine.h>
+#include <stifinternal/UIEngineContainer.h>
+
+#include "StatisticsContainer.h"
+#include "Stifui.hrh"
+#include "AppUIAppUi.h"
+
+#include "MenuListBox.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CStatisticsContainer::ConstructL
+//
+// Symbian OS two phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CStatisticsContainer::ConstructL( const TRect& aRect,
+ MEikListBoxObserver* aListBoxObserver )
+ {
+
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(
+ _L("StatisticsContainer: ConstructL"));
+
+ CreateWindowL();
+
+ iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
+
+ //iTestCasesInView.Reset();
+ //((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StatisticsContainer: iTCInV Reset"));
+
+ iListBox = CMenuListBox::NewL(EStatisticsViewId);
+ iListBox->SetContainerWindowL( *this );
+ iListBox->SetListBoxObserver( aListBoxObserver /*this*/ ); // jos peritty MEikListBoxObserver:sta
+ iListBox->ConstructL(this, EAknListBoxMarkableList /*EAknListBoxSelectionList*/);
+
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StatisticsContainer: ListBox constructed"));
+
+ //Create Scroller control for ListBox and set its visibility
+ iListBox->CreateScrollBarFrameL(ETrue);
+ iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+
+ if ( iUIStore )
+ {
+ //RRefArray<CStartedTestCase> allStarted;
+ RRefArray<CStartedTestCase> allStarted;
+ TInt ret = iUIStore->StartedTestCases( allStarted );
+ if( KErrNone != ret )
+ {
+ allStarted.Reset();
+ allStarted.Close();
+ User::Leave( ret );
+ }
+ TInt count = allStarted.Count();
+ // TInt notstarted( 0 );
+ TInt ongoing( 0 );
+ TInt passed( 0 );
+ TInt failed( 0 );
+ TInt other( 0 );
+ //TInt aborted( 0 );
+ // TInt paused( 0 );
+ //TInt crashed( 0 );
+ //TInt executed( 0 );
+ // TInt state( 0 );
+
+ for( TInt a = 0; a < count; a++ )
+ {
+ switch ( allStarted[a].Status() )
+ {
+ case CUIStoreIf::EStatusRunning:
+ {
+ ongoing++;
+ break;
+ }
+ case CUIStoreIf::EStatusExecuted | CUIStoreIf::EStatusPassed:
+ {
+ passed++;
+ break;
+ }
+ case CUIStoreIf::EStatusExecuted |CUIStoreIf::EStatusFailed:
+ {
+ failed++;
+ break;
+ }
+ //case CUIStoreIf::EStatusAborted:
+ // {
+ // aborted++;
+ // break;
+ // }
+ /*case ECrashed:
+ {
+ crashed++;
+ break;
+ }
+ */
+ /*case EExecuted:
+ {
+ executed++;
+ break;
+ }
+ */
+ default:
+ {
+ other++;
+ break;
+ }
+ }
+ }
+
+ allStarted.Reset();
+ allStarted.Close();
+
+ iTestCaseArray = new (ELeave) CDesC16ArrayFlat(6);
+ iTestCaseArray->Reset();
+
+ HBufC* tmpHBuf = HBufC::NewL( 40 );
+ TPtr buffer( tmpHBuf->Des() );
+
+ buffer = ( _L("\t") );
+ buffer.AppendNum( ongoing );
+ buffer.Append( _L(" Running") );
+ iTestCaseArray->AppendL( buffer );
+
+ buffer = ( _L("\t") );
+ buffer.AppendNum( passed );
+ buffer.Append( _L(" Passed") );
+ iTestCaseArray->AppendL( buffer );
+
+ buffer = ( _L("\t") );
+ buffer.AppendNum( failed );
+ buffer.Append( _L(" Failed") );
+ iTestCaseArray->AppendL( buffer );
+
+ buffer = ( _L("\t") );
+ buffer.AppendNum( other );
+ buffer.Append( _L(" Crashed/Aborted") );
+ iTestCaseArray->AppendL( buffer );
+
+ delete tmpHBuf;
+
+ iListBox->Model()->SetItemTextArray( iTestCaseArray );
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StatisticsContainer: ListBox model set"));
+ }
+ else
+ {
+ //User::Leave( syy?? )
+ }
+
+ // Creates graphic.
+ //SetGraphicIconL( iListBox );
+ // ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StatisticsContainer: icons created"));
+
+ iListBox->ActivateL();
+ ((CMenuListBox*)iListBox)->SetPreviousFocus();
+
+ SetRect(aRect);
+ ActivateL();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsContainer::~CStatisticsContainer
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CStatisticsContainer::~CStatisticsContainer()
+ {
+ //iTestCasesInView.Close(); // does not delete objects whose pointers are contained in the array
+ //delete iListBox;
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsContainer::SizeChanged
+//
+// Called by framework when the view size is changed.
+// ----------------------------------------------------------------------------
+//
+void CStatisticsContainer::SizeChanged()
+ {
+ if ( iListBox )
+ {
+ iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsContainer::CountComponentControls
+//
+// Gets a count of the component controls of this list box control.
+// ----------------------------------------------------------------------------
+//
+TInt CStatisticsContainer::CountComponentControls() const
+ {
+ return 1; // return nbr of controls inside this container
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsContainer::ComponentControl
+//
+// Gets a pointer to the specified component control.
+// ----------------------------------------------------------------------------
+//
+
+CCoeControl* CStatisticsContainer::ComponentControl(TInt aIndex) const
+ {
+ switch ( aIndex )
+ {
+ case 0:
+ return iListBox;
+ default:
+ return NULL;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsContainer::Draw
+//
+// Draw a control, called by window server.
+// ----------------------------------------------------------------------------
+//
+void CStatisticsContainer::Draw(const TRect& /*aRect*/) const
+ {
+ // CWindowGc& gc = SystemGc();
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsContainer::OfferKeyEventL
+//
+// Handles key events.
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CStatisticsContainer::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent, TEventCode aType)
+ {
+ if (aType != EEventKey)
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ if (iListBox)
+ {
+ return iListBox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ else
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsContainer::SaveActiveLine
+//
+// Makes the iListBox member save its focus position
+// ----------------------------------------------------------------------------
+//
+void CStatisticsContainer::SaveActiveLine()
+ {
+ ((CMenuListBox*)iListBox)->SaveFocusPosition();
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/StatisticsView.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,350 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CStatisticsView class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <eikmenub.h>
+#include <aknViewAppUi.h>
+#include <aknlistquerydialog.h>
+#include <barsread.h> //TResourceReader
+#include <Stifui.rsg>
+#include "AppUIAppUi.h"
+#include "Stifui.hrh"
+#include "StatisticsView.h"
+#include "StatisticsContainer.h"
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CStatisticsView::ConstructL
+//
+// Symbian OS two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CStatisticsView::ConstructL()
+ {
+ CView::ConstructL();
+ BaseConstructL( R_APPUI_STATISTICSVIEW );
+ iCurrentTestCase = 0;
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsView::~CStatisticsView
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CStatisticsView::~CStatisticsView()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsView::Id
+//
+// Returns view´s id.
+// ----------------------------------------------------------------------------
+//
+TUid CStatisticsView::Id() const
+ {
+ return TUid::Uid(EStatisticsViewId);
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsView::HandleCommandL
+//
+// Handles a command.
+// ----------------------------------------------------------------------------
+//
+void CStatisticsView::HandleCommandL(TInt aCommand)
+ {
+ if ( aCommand >= ECmdFilterByModule && aCommand < ECmdFilterByTestCaseFile ) // 0x1000 - 0x1FFF
+ {
+ TInt moduleNumber = aCommand - ECmdFilterByModule;
+
+ RRefArray<TDesC> moduleName;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( moduleName );
+ if( KErrNone != ret )
+ {
+ moduleName.Reset();
+ moduleName.Close();
+ User::Leave( ret );
+ }
+ //iFilterModule = testModules[moduleNumber];
+
+ iContainer->FilterCasesByModuleL( moduleName[moduleNumber] );
+
+ moduleName.Reset();
+ moduleName.Close();
+
+ return;
+ }
+
+ if ( aCommand >= ECmdFilterByTestCaseFile && aCommand < ECmdNOFiltering )
+ {
+ TInt testCaseFileNumber = aCommand - ECmdFilterByTestCaseFile;
+ RRefArray<TDesC> testCaseFileName;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( testCaseFileName );
+ if( KErrNone != ret )
+ {
+ testCaseFileName.Reset();
+ testCaseFileName.Close();
+ User::Leave( ret );
+ }
+
+ iContainer->FilterCasesByTCFileNameL( testCaseFileName[testCaseFileNumber] );
+
+ testCaseFileName.Reset();
+ testCaseFileName.Close();
+
+ return;
+ }
+
+ if ( aCommand == ECmdNOFiltering )
+ {
+ iContainer->NoFilteringL();
+ return;
+ }
+
+ switch ( aCommand )
+ {
+ case ECmdStartCases:
+ {
+ iCurrentTestCase = iContainer->CurrentItemIndex();
+ StartTestCasesL();
+ break;
+ }
+ case EAknSoftkeyBack:
+ {
+ AppUi()->HandleCommandL( EAppUIGoBack );
+ break;
+ }
+ default:
+ {
+ AppUi()->HandleCommandL( aCommand );
+ break;
+ }
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsView::HandleClientRectChange
+//
+// Handles client rect changes.
+// ----------------------------------------------------------------------------
+//
+void CStatisticsView::HandleClientRectChange()
+ {
+ if ( iContainer )
+ {
+ iContainer->SetRect( ClientRect() );
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsView::DoActivateL
+//
+// Initializes view when activated.
+// ----------------------------------------------------------------------------
+//
+void CStatisticsView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/)
+ {
+ if (!iContainer)
+ {
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("StatisticsView: DoActivateL"));
+ //message = _L("eng.open ret:");
+ //message.AppendNum( ret , EDecimal );
+ //AppUi()->iLogger->Log( message );
+ iContainer = new (ELeave) CStatisticsContainer;
+ iContainer->SetMopParent(this);
+ iContainer->ConstructL( ClientRect(), this );
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("StatisticsView: container constructed"));
+ AppUi()->AddToStackL( *this, iContainer );
+ }
+ iContainer->SetCurrentItemIndex(iCurrentTestCase);
+
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
+
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_STATS);
+ iNaviDecorator = np->CreateNavigationLabelL( reader );
+ CleanupStack::PopAndDestroy(); // resource reader
+ np->PushL(*iNaviDecorator);
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsView::DoDeactivate
+//
+// Deactivates view.
+// ----------------------------------------------------------------------------
+//
+void CStatisticsView::DoDeactivate()
+ {
+ if ( iContainer )
+ {
+ iContainer->SaveActiveLine();
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsView::DynInitMenuPaneL
+//
+// Initializes menu pane.
+// ----------------------------------------------------------------------------
+//
+void CStatisticsView::DynInitMenuPaneL(
+ TInt aResourceId, CEikMenuPane* aMenuPane)
+ {
+
+ // Test modules are added to filter by test module submenu if the submenu is opened
+ if (R_APPUI_FILTERBYMODULES_MENU == aResourceId)
+ {
+ RRefArray<TDesC> modules;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( modules );
+ if( KErrNone != ret )
+ {
+ modules.Reset();
+ modules.Close();
+ User::Leave( ret );
+ }
+
+ TInt moduleCount = modules.Count();
+
+ TInt i;
+ CEikMenuPaneItem::SData item;
+
+ item.iCommandId = ECmdFilterByModule;
+ item.iFlags = 0;
+ item.iCascadeId = 0;
+
+ for (i = 0; i < moduleCount; i++)
+ {
+ item.iText = modules[i];
+ aMenuPane->AddMenuItemL(item);
+ item.iCommandId++; // command IDs 0x1000 - 0x1FFF are reserved for modules in hrh file
+ }
+
+ modules.Reset();
+ modules.Close();
+ }
+
+ // Test case files are added to filter by test case file submenu if the submenu is opened
+ if (R_APPUI_FILTER_BY_TESTCASEFILE_MENU == aResourceId)
+ {
+ RRefArray<TDesC> testCaseFiles;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( testCaseFiles );
+ if( KErrNone != ret )
+ {
+ testCaseFiles.Reset();
+ testCaseFiles.Close();
+ User::Leave( ret );
+ }
+
+ TInt testCaseFileCount = testCaseFiles.Count();
+
+ TInt i;
+ CEikMenuPaneItem::SData item;
+
+ item.iCommandId = ECmdFilterByTestCaseFile;
+ item.iFlags = 0;
+ item.iCascadeId = 0;
+
+ for (i = 0; i < testCaseFileCount; i++)
+ {
+ item.iText = testCaseFiles[i];
+ aMenuPane->AddMenuItemL(item);
+ item.iCommandId++; // command IDs 0x2000 - 0x2FFF are reserved for test case files in hrh file
+ }
+
+ testCaseFiles.Reset();
+ testCaseFiles.Close();
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsView::HandleListBoxEventL
+//
+// Handles a list box event.
+// ----------------------------------------------------------------------------
+//
+void CStatisticsView::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
+ {
+ if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
+ {
+ //iCurrentTestCase = aListBox->CurrentItemIndex();
+ //iCurrentTestCase = iContainer->CurrentItemIndex();
+ //StartTestCases();
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CStatisticsView::StartTestCases
+//
+// Starts test case(s) which is selected in containers list box.
+// First shows a list query if user wants just start test case or
+// if he wants to start test case and view test case output.
+// ----------------------------------------------------------------------------
+//
+void CStatisticsView::StartTestCasesL()
+ {
+ TInt selectedItem(0);
+ CAknListQueryDialog* startDialog = new (ELeave) CAknListQueryDialog(&selectedItem);
+ if ( startDialog->ExecuteLD(R_START_TESTCASE_LIST_QUERY) )
+ {
+ RRefArray<CTestInfo> testInfo;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCases( testInfo );
+ if( KErrNone != ret )
+ {
+ testInfo.Reset();
+ testInfo.Close();
+ User::Leave( ret );
+ }
+ TInt testCaseNumber = testInfo[0].TestCaseNum();
+ TInt testCaseIndex( 0 );
+
+ //CUIEngineContainer* container = NULL;
+ ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->StartTestCase( testInfo[testCaseNumber], testCaseIndex );
+ if( KErrNone != ret )
+ {
+ User::Leave( ret );
+ }
+ testInfo.Reset();
+ testInfo.Close();
+
+ // Increment the counter value
+ ((CAppUIAppUi*)AppUi())->iUIStoreHandler->iExecutedTestCaseCount++;
+
+ }
+
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/TestCaseMenuContainer.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,224 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestCaseMenuContainer class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include "TestCaseMenuContainer.h"
+#include "Stifui.hrh"
+#include <Stifui.rsg>
+
+#include <aknlists.h> //ListBox
+#include <barsread.h> // for TResourceReader
+
+#include <aknnotewrappers.h>
+
+#include "MenuListBox.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CTestCaseMenuContainer::ConstructL
+//
+// Symbian OS two phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseMenuContainer::ConstructL(const TRect& aRect)
+ {
+ CreateWindowL();
+
+ iListBox = CMenuListBox::NewL(ETestCaseMenuViewId);
+ iListBox->SetContainerWindowL( *this );
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC( reader, R_TESTCASE_MENU_LISTBOX );
+ iListBox->SetListBoxObserver( this );
+ iListBox->ConstructFromResourceL( reader );
+ CleanupStack::PopAndDestroy(); // resource stuffs.
+
+ // Create Scroller control for ListBox and set its visibility
+ // !!! Not needed yet because there are only two items in list box.
+ // If items are added later, scroller may be taken to use
+ //iListBox->CreateScrollBarFrameL(ETrue);
+ //iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+
+ iListBox->ActivateL();
+ ((CMenuListBox*)iListBox)->SetPreviousFocus();
+
+ SetRect(aRect);
+ ActivateL();
+ }
+
+// Destructor
+CTestCaseMenuContainer::~CTestCaseMenuContainer()
+ {
+ if ( iListBox )
+ {
+ iListBox->Reset();
+ delete iListBox;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuContainer::SizeChanged
+//
+// Called by framework when the view size is changed.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseMenuContainer::SizeChanged()
+ {
+ if ( iListBox )
+ {
+ iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuContainer::CountComponentControls
+//
+// Gets a count of the component controls of this list box control.
+// ----------------------------------------------------------------------------
+//
+TInt CTestCaseMenuContainer::CountComponentControls() const
+ {
+ return 1; // return nbr of controls inside this container
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuContainer::ComponentControl
+//
+// Gets a pointer to the specified component control.
+// ----------------------------------------------------------------------------
+//
+CCoeControl* CTestCaseMenuContainer::ComponentControl(TInt aIndex) const
+ {
+ switch ( aIndex )
+ {
+ case 0:
+ return iListBox;
+ default:
+ return NULL;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuContainer::Draw
+//
+// Draw a control, called by window server.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseMenuContainer::Draw(const TRect& /*aRect*/) const
+ {
+ // CWindowGc& gc = SystemGc();
+ }
+
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuContainer::HandleListBoxEventL
+//
+// Handles list box events.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseMenuContainer::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType)
+ {
+ if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
+ {
+ HandleSelectedListItemL( aListBox->CurrentItemIndex() );
+
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuContainer::HandleSelectedListItemL
+//
+// Method HandleSelectedListItemL handles valid index.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseMenuContainer::HandleSelectedListItemL( TInt aIndex )
+ {
+ TInt selection = aIndex;
+
+ switch ( selection )
+ {
+ case 0:
+ //Vaihda StartCasesView aktiiviseksi
+ ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdGoToStartCasesView);
+ break;
+ case 1:
+ ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdGoToStartedCasesView);
+ break;
+ default:
+ break;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuContainer::OfferKeyEventL
+//
+// Handles key events.
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CTestCaseMenuContainer::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent, TEventCode aType)
+ {
+ if (aType != EEventKey)
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ switch ( aKeyEvent.iCode )
+ {
+ case EKeyLeftArrow:
+ case EKeyRightArrow:
+ { /* Left ja right key eventit valitetaan AppUille joka hoitaa siirtymisen toisiin nakymiin */
+ return EKeyWasNotConsumed;
+ //break;
+ }
+ default:
+ {
+ //Muut Key eventit valitetaan listboxille, joka hoitaa ne
+ if (iListBox)
+ {
+ return iListBox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ }
+ }
+ return EKeyWasNotConsumed;
+}
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuContainer::GetActiveLine
+//
+// Get currently selected items index.
+// ----------------------------------------------------------------------------
+//
+TInt CTestCaseMenuContainer::GetActiveLine()
+ {
+ return iListBox->CurrentItemIndex();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuContainer::SaveActiveLine
+//
+// Makes the iListBox member save its focus position
+// ----------------------------------------------------------------------------
+//
+void CTestCaseMenuContainer::SaveActiveLine()
+ {
+ ((CMenuListBox*)iListBox)->SaveFocusPosition();
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/TestCaseMenuView.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,165 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestCaseMenuView class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <aknViewAppUi.h>
+#include <barsread.h> //TResourceReader
+#include <Stifui.rsg>
+#include "TestCaseMenuView.h"
+#include "TestCaseMenuContainer.h"
+#include "Stifui.hrh"
+#include "AppUIAppUi.h" // loggerin kayttoa varten, muuten ei tarvittaisi
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CTestCaseMenuView::ConstructL
+//
+// Symbian OS two phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseMenuView::ConstructL()
+ {
+ CView::ConstructL();
+ BaseConstructL( R_APPUI_TESTCASEMENUVIEW );
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuView::~CTestCaseMenuView
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestCaseMenuView::~CTestCaseMenuView()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuView::Id
+//
+// Returns view´s id.
+// ----------------------------------------------------------------------------
+//
+TUid CTestCaseMenuView::Id() const
+ {
+ return TUid::Uid(ETestCaseMenuViewId); //KTestCaseMenuViewId;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuView::HandleCommandL
+//
+// Handles a command.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseMenuView::HandleCommandL(TInt aCommand)
+ {
+ switch ( aCommand )
+ {
+ case EAknSoftkeyBack:
+ {
+ AppUi()->HandleCommandL(EAppUIGoBack);
+ break;
+ }
+ case EAknCmdOpen:
+ {
+ TInt a = iContainer->GetActiveLine();
+ iContainer->HandleSelectedListItemL( a );
+ }
+ break;
+ default:
+ {
+ AppUi()->HandleCommandL( aCommand );
+ break;
+ }
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuView::HandleClientRectChange
+//
+// Handles client rect changes.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseMenuView::HandleClientRectChange()
+ {
+ if ( iContainer )
+ {
+ iContainer->SetRect( ClientRect() );
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuView::DoActivateL
+//
+// Initializes view when activated.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseMenuView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/)
+ {
+ if (!iContainer)
+ {
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("TestCaseMenu: DoActivateL"));
+ //message = _L("eng.open ret:");
+ //message.AppendNum( ret , EDecimal );
+ //AppUi->iLogger->Log( message );
+ iContainer = new (ELeave) CTestCaseMenuContainer;
+ iContainer->SetMopParent(this);
+ iContainer->ConstructL( ClientRect() );
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("TestCaseMenu: container constructed"));
+ AppUi()->AddToStackL( *this, iContainer );
+ }
+
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
+
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_TESTCASES);
+ iNaviDecorator = np->CreateNavigationLabelL( reader );
+ CleanupStack::PopAndDestroy(); // resource reader
+ np->PushL(*iNaviDecorator);
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseMenuView::DoDeactivate
+//
+// Deactivates view.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseMenuView::DoDeactivate()
+ {
+ if ( iContainer )
+ {
+ iContainer->SaveActiveLine();
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/TestCaseOutputContainer.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,328 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestCaseOutputContainer class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include "TestCaseOutputContainer.h"
+#include <Stifui.rsg>
+#include "Stifui.hrh"
+#include "AppUIAppUi.h"
+
+#include <aknlists.h> // ListBox
+#include <AknIconArray.h> // CAknIconArray
+#include <badesca.h> // CDesCArray
+#include <eikclbd.h> // CColumnListBoxData
+#include <aknnotewrappers.h>
+
+//#include "UIStoreIf.h"
+//#include "UIStore.h"
+//#include "UIEngine.h"
+//#include "UIEngineContainer.h"
+
+#include <stifinternal/UIStoreIf.h>
+#include <stifinternal/UIStore.h>
+#include <stifinternal/UIEngine.h>
+#include <stifinternal/UIEngineContainer.h>
+
+#include "MenuListBox.h"
+
+//#include <gdi.h>
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CTestCaseOutputContainer::ConstructL
+//
+// Symbian OS two phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseOutputContainer::ConstructL(const TRect& aRect, CStartedTestCase* aStartedTestCase ) //TInt aExecutedTestCaseCount )
+ {
+ CreateWindowL();
+
+ iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
+
+ iListBox = CMenuListBox::NewL(ETestCaseOutputViewId);
+ iListBox->SetContainerWindowL( *this );
+ iListBox->SetListBoxObserver( this );
+ iListBox->ConstructL(this, EAknListBoxSelectionList);
+
+ //Create Scroller control for ListBox and set its visibility
+ iListBox->CreateScrollBarFrameL(ETrue);
+ iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+
+ if( iUIStore )
+ {
+ iListBoxModel = CTestOutputListBoxModel::NewL( aStartedTestCase );
+ iListBox->Model()->SetItemTextArray( iListBoxModel );
+ }
+ else
+ {
+ //User::Leave( syy?? )
+ }
+ iListBox->ActivateL();
+ ((CMenuListBox*)iListBox)->SetPreviousFocus();
+
+ SetRect(aRect);
+ ActivateL();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputContainer::~CTestCaseOutputContainer
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestCaseOutputContainer::~CTestCaseOutputContainer()
+ {
+ // Discard and destroy the font
+ //CWindowGc* listBoxGc = iListBox->View()->ItemDrawer()->Gc();
+ //listBoxGc->DiscardFont();
+
+ //CWindowGc& gc = SystemGc();
+ //gc.DiscardFont();
+
+ //iCoeEnv->ScreenDevice()->ReleaseFont(iListBoxFont);
+
+ delete iListBox;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputContainer::SizeChanged
+//
+// Called by framework when the view size is changed.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseOutputContainer::SizeChanged()
+ {
+ if ( iListBox )
+ {
+ iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputContainer::CountComponentControls
+//
+// Gets a count of the component controls of this list box control.
+// ----------------------------------------------------------------------------
+//
+TInt CTestCaseOutputContainer::CountComponentControls() const
+ {
+ return 1; // return nbr of controls inside this container
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputContainer::ComponentControl
+//
+// Gets a pointer to the specified component control.
+// ----------------------------------------------------------------------------
+//
+CCoeControl* CTestCaseOutputContainer::ComponentControl(TInt aIndex) const
+ {
+ switch ( aIndex )
+ {
+ case 0:
+ return iListBox;
+ default:
+ return NULL;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputContainer::Draw
+//
+// Draw a control, called by window server.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseOutputContainer::Draw(const TRect& /*aRect*/) const
+ {
+ // CWindowGc& gc = SystemGc();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputContainer::HandleListBoxEventL
+//
+// Handles list box events.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseOutputContainer::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
+ {
+ if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
+ {
+ //TBuf<200> outputLine;
+ //CAknNoteDialog* outputLineNote = new (ELeave) CAknNoteDialog;
+ //outputLineNote->SetTextL( iListBoxModel->MdcaPoint(iListBox->CurrentItemIndex()) );
+ //outputLineNote->RunDlgLD();
+
+
+
+ //CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
+ //informationNote->SetTextL( iListBoxModel->MdcaPoint(iListBox->CurrentItemIndex()) );
+ //informationNote->SetTextPluralityL( ETrue );
+ //informationNote->SetTextL( _L("Number of cases: %d") );
+ //informationNote->SetTextNumberL( count );
+ //informationNote->ExecuteLD();
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputContainer::OfferKeyEventL
+//
+// Handles key events.
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CTestCaseOutputContainer::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent, TEventCode aType)
+{
+ if (aType != EEventKey)
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ if (iListBox)
+ {
+ return iListBox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ else
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ /*
+ switch ( aKeyEvent.iCode )
+ {
+ case EKeyLeftArrow:
+ case EKeyRightArrow:
+ { */ /* Left ja right key eventit valitetaan AppUille joka hoitaa siirtymisen toisiin nakymiin */
+ /* return EKeyWasNotConsumed;
+ break;
+ }
+ default:
+ {
+ //Muut Key eventit valitetaan listboxille, joka hoitaa ne
+ if (iListBox)
+ {
+ return iListBox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ else
+ {
+ return EKeyWasNotConsumed;
+ }
+ break;
+ }
+ }*/
+}
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputContainer::OutputUpdateL
+//
+// Handles addition of item to list box.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseOutputContainer::OutputUpdateL()
+ {
+ if ( iListBox )
+ {
+ iListBox->HandleItemAdditionL();
+ iListBox->DrawNow();
+ }
+ }
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------------------------------
+// CTestOutputListBoxModel::NewL
+//
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CTestOutputListBoxModel* CTestOutputListBoxModel::NewL(CStartedTestCase* aStartedTestCase /*, HBufC* aBuffer*/)
+ {
+
+ CTestOutputListBoxModel* self = new ( ELeave ) CTestOutputListBoxModel();
+ CleanupStack::PushL( self );
+ //self->ConstructL();
+ //self->iBuffer = aBuffer;
+ self->iBuffer = HBufC::NewL( 150 );
+ self->iStartedTestCase = aStartedTestCase;
+ CleanupStack::Pop();
+ return self;
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestOutputListBoxModel::ConstructL
+//
+// Symbian OS two phased constructor.
+// Completes the construction of the object.
+// ----------------------------------------------------------------------------
+//
+void CTestOutputListBoxModel::ConstructL()
+ {
+ //iBuffer = HBufC::NewLC( KMaxInfoName + KMaxName + 2 );
+ }
+
+// ----------------------------------------------------------------------------
+// CTestOutputListBoxModel::~CTestCaseOutputContainer
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestOutputListBoxModel::~CTestOutputListBoxModel()
+ {
+ delete iBuffer;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestOutputListBoxModel::MdcaCount
+//
+// Returns the number of descriptor elements in the array.
+// ----------------------------------------------------------------------------
+//
+TInt CTestOutputListBoxModel::MdcaCount() const
+ {
+
+ TInt rows = iStartedTestCase->PrintArray().Count();
+ return rows;
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestOutputListBoxModel::MdcaPoint
+//
+// Indexes into a descriptor array.
+// ----------------------------------------------------------------------------
+//
+TPtrC CTestOutputListBoxModel::MdcaPoint(TInt aIndex) const
+ {
+ const RPointerArray<CTestProgress> printArray = iStartedTestCase->PrintArray();
+
+ TPtr buffer( iBuffer->Des() );
+ buffer.Zero();
+ buffer.Append(_L("\t"));
+ buffer.Append(printArray[aIndex]->iDescription);
+ buffer.Append(_L(" "));
+ buffer.Append(printArray[aIndex]->iText);
+
+ return *iBuffer;
+
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/TestCaseOutputView.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,380 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestCaseOutputView class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <eikmenub.h>
+#include <aknViewAppUi.h>
+#include <akntitle.h>
+#include <barsread.h> //TResourceReader
+#include <Stifui.rsg>
+
+//#include "UIStoreIf.h"
+//#include "UIStore.h"
+//#include "UIEngine.h"
+//#include "UIEngineContainer.h"
+
+#include <stifinternal/UIStoreIf.h>
+#include <stifinternal/UIStore.h>
+#include <stifinternal/UIEngine.h>
+#include <stifinternal/UIEngineContainer.h>
+
+#include "TestCaseOutputView.h"
+#include "TestCaseOutputContainer.h"
+#include "AppUIAppUi.h"
+#include "Stifui.hrh"
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CTestCaseOutputView::ConstructL
+//
+// Symbian OS two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseOutputView::ConstructL()
+ {
+ CView::ConstructL();
+ BaseConstructL( R_APPUI_TESTCASEOUTPUTVIEW );
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputView::~CTestCaseOutputView
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestCaseOutputView::~CTestCaseOutputView()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+
+ iCurrentTestCase = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputView::Id
+//
+// Returns view´s id.
+// ----------------------------------------------------------------------------
+//
+TUid CTestCaseOutputView::Id() const
+ {
+ return TUid::Uid(ETestCaseOutputViewId);
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputView::HandleCommandL
+//
+// Handles a command.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseOutputView::HandleCommandL(TInt aCommand)
+ {
+ switch ( aCommand )
+ {
+ case EAknSoftkeyBack:
+ {
+ AppUi()->HandleCommandL(EAppUIGoBack);
+ break;
+ }
+ case ECmdPauseTestCase:
+ {
+ /*
+ TInt index( 0 );
+ index = ( ( CAppUIAppUi* )AppUi() )->GetTestCaseIndex();
+ CStartedTestCase* startedTestCase = NULL;
+ TRAPD( ret, startedTestCase = &iUIStore->StartedTestCaseL( index ) );
+ if( ret != KErrNone )
+ {
+ // Leave
+ }
+ */
+ CStartedTestCase* startedTestCase =
+ ( ( CAppUIAppUi* )AppUi() )->GetStartedTestCase();
+ startedTestCase->UIEngineContainer().PauseTest();
+ break;
+ }
+ case ECmdResumeTestCase:
+ {
+ /*
+ TInt index( 0 );
+ index = ( ( CAppUIAppUi* )AppUi() )->GetTestCaseIndex();
+ CStartedTestCase* startedTestCase = NULL;
+ TRAPD( ret, startedTestCase = &iUIStore->StartedTestCaseL( index ) );
+ if( ret != KErrNone )
+ {
+ // Leave
+ }
+ */
+ CStartedTestCase* startedTestCase =
+ ( ( CAppUIAppUi* )AppUi() )->GetStartedTestCase();
+ startedTestCase->UIEngineContainer().ResumeTest();
+ break;
+ }
+ case ECmdAbortTestCase:
+ {
+ /*
+ TInt index( 0 );
+ index = ( ( CAppUIAppUi* )AppUi() )->GetTestCaseIndex();
+ CStartedTestCase* startedTestCase = NULL;
+ TRAPD( ret, startedTestCase = &iUIStore->StartedTestCaseL( index ) );
+ if( ret != KErrNone )
+ {
+ // Leave
+ }
+ */
+ CStartedTestCase* startedTestCase =
+ ( ( CAppUIAppUi* )AppUi() )->GetStartedTestCase();
+ startedTestCase->UIEngineContainer().CancelTest();
+ break;
+ }
+ default:
+ {
+ AppUi()->HandleCommandL( aCommand );
+ break;
+ }
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputView::HandleClientRectChange
+//
+// Handles client rect changes.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseOutputView::HandleClientRectChange()
+ {
+ if ( iContainer )
+ {
+ iContainer->SetRect( ClientRect() );
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputView::DoActivateL
+//
+// Initializes view when activated.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseOutputView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/)
+ {
+ if (!iContainer)
+ {
+ iContainer = new (ELeave) CTestCaseOutputContainer;
+ iContainer->SetMopParent(this);
+
+ iCurrentTestCase = ( ( CAppUIAppUi* )AppUi() )->GetStartedTestCase();
+ iContainer->ConstructL( ClientRect(), iCurrentTestCase );
+
+ AppUi()->AddToStackL( *this, iContainer );
+ }
+ PrintTestCaseStateL();
+
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
+
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_TESTCASE_OUTPUT);
+ iNaviDecorator = np->CreateNavigationLabelL( reader );
+ CleanupStack::PopAndDestroy(); // resource reader
+ np->PushL(*iNaviDecorator);
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputView::DoDeactivate
+//
+// Deactivates view.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseOutputView::DoDeactivate()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ // Because DoDeactivate method can't leave we must
+ // catch unexpected leaves.
+ TInt ret = KErrNone;
+ TRAP( ret,
+ CAknTitlePane* tp=(CAknTitlePane*)sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle));
+ if ( tp != NULL )
+ {
+ tp->SetTextToDefaultL(); // Set application name.
+ }
+ ); // TRAPD end
+
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+
+ iCurrentTestCase = NULL;
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputView::DynInitMenuPaneL
+//
+// Initializes menu pane.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseOutputView::DynInitMenuPaneL(
+ TInt aResourceId, CEikMenuPane* aMenuPane)
+ {
+ CStartedTestCase* startedTestCase =
+ ( ( CAppUIAppUi* )AppUi() )->GetStartedTestCase();
+
+ if (R_APPUI_TESTCASEOUTPUTVIEW_MENU == aResourceId)
+ {
+
+ if ( startedTestCase->Status() == CUIStoreIf::EStatusRunning )
+ {
+ if( startedTestCase->UIEngineContainer().State() == CUIEngineContainer::ENotStarted )
+ {
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
+ }
+ else if( startedTestCase->UIEngineContainer().State() == CUIEngineContainer::ERunning )
+ {
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, EFalse );
+ }
+ else if( startedTestCase->UIEngineContainer().State() == CUIEngineContainer::EPaused )
+ {
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, EFalse );
+ }
+ else if( startedTestCase->UIEngineContainer().State() == CUIEngineContainer::EExecuted )
+ {
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
+ }
+ else if( startedTestCase->UIEngineContainer().State() == CUIEngineContainer::EFinished )
+ {
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
+ }
+
+ }
+ else
+ {
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
+ }
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputView::OutputUpdate
+//
+// Receives output update notification from AppUI.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseOutputView::OutputUpdateL( CStartedTestCase* /*aTestCase*/ )
+ {
+ PrintTestCaseStateL();
+ iContainer->OutputUpdateL();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputView::TestCaseStateChangedL
+//
+// Receives test case state changed notification from AppUI.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseOutputView::TestCaseStateChangedL()
+ {
+ PrintTestCaseStateL();
+ iContainer->OutputUpdateL();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestCaseOutputView::PrintTestCaseState
+//
+// Prints test case state to title pane.
+// ----------------------------------------------------------------------------
+//
+void CTestCaseOutputView::PrintTestCaseStateL()
+ {
+ TBuf<50> statusMessage;
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ CAknTitlePane* tp=(CAknTitlePane*)sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle));
+
+ if ( iCurrentTestCase != NULL )
+ {
+ TUint status = iCurrentTestCase->Status();
+
+ if( status & CUIStoreIf::EStatusRunning )
+ {
+ CEikonEnv::Static()->ReadResource( statusMessage,
+ R_TESTCASE_STATE_RUNNING );
+ }
+ else if( status & CUIStoreIf::EStatusExecuted &&
+ status & CUIStoreIf::EStatusPassed )
+ {
+ CEikonEnv::Static()->ReadResource( statusMessage,
+ R_TESTCASE_STATE_PASSED );
+ }
+ else if( status & CUIStoreIf::EStatusExecuted &&
+ status & CUIStoreIf::EStatusFailed )
+ {
+ CEikonEnv::Static()->ReadResource( statusMessage,
+ R_TESTCASE_STATE_FAILED );
+ }
+ else if( status & CUIStoreIf::EStatusAborted )
+ {
+ CEikonEnv::Static()->ReadResource( statusMessage,
+ R_TESTCASE_STATE_CRASHED_ABORTED );
+ }
+ else if( status & CUIStoreIf::EStatusCrashed )
+ {
+ CEikonEnv::Static()->ReadResource( statusMessage,
+ R_TESTCASE_STATE_CRASHED_ABORTED );
+ }
+ else
+ {
+ CEikonEnv::Static()->ReadResource( statusMessage,
+ R_TESTCASE_STATE_UNKNOWN );
+ }
+
+ tp->SetTextL( statusMessage );
+ tp->DrawNow();
+
+ }
+
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/TestModulesMenuContainer.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,310 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestModulesListBoxModel class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <aknlists.h> // ListBox
+#include <barsread.h> // for TResourceReader
+#include <aknnotewrappers.h>
+
+#include "Stifui.hrh"
+#include <Stifui.rsg>
+
+//#include "UIStoreIf.h"
+//#include "UIStore.h"
+//#include "UIEngine.h"
+//#include "UIEngineContainer.h"
+
+#include <stifinternal/UIStoreIf.h>
+#include <stifinternal/UIStore.h>
+#include <stifinternal/UIEngine.h>
+#include <stifinternal/UIEngineContainer.h>
+
+#include "TestModulesMenuContainer.h"
+#include "AppUIAppUi.h"
+
+#include "MenuListBox.h"
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CTestModulesListBoxModel::NewL
+//
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CTestModulesListBoxModel* CTestModulesListBoxModel::NewL(RRefArray<TDesC> aTestModules)
+ {
+
+ CTestModulesListBoxModel* self = new ( ELeave ) CTestModulesListBoxModel();
+ CleanupStack::PushL( self );
+ self->iBuffer = HBufC::NewL( 130 );
+ self->iTestModules = aTestModules;
+ CleanupStack::Pop();
+ return self;
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesListBoxModel::ConstructL
+//
+// Symbian OS two phased constructor.
+// Completes the construction of the object.
+// ----------------------------------------------------------------------------
+//
+void CTestModulesListBoxModel::ConstructL()
+ {
+ //iBuffer = HBufC::NewLC( KMaxInfoName + KMaxName + 2 );
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesListBoxModel::~CTestCaseOutputView
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestModulesListBoxModel::~CTestModulesListBoxModel()
+ {
+ delete iBuffer;
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesListBoxModel::MdcaCount
+//
+// Returns the number of descriptor elements in the array.
+// ----------------------------------------------------------------------------
+//
+TInt CTestModulesListBoxModel::MdcaCount() const
+ {
+ return iTestModules.Count();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesListBoxModel::MdcaPoint
+//
+// Indexes into a descriptor array.
+// ----------------------------------------------------------------------------
+//
+TPtrC CTestModulesListBoxModel::MdcaPoint(TInt aIndex) const
+ {
+ TPtrC testModule = (iTestModules)[aIndex];
+ TPtr buffer( iBuffer->Des() );
+ buffer.Zero();
+
+ buffer.Append(_L("\t"));
+ buffer.Append( testModule );
+
+ return *iBuffer;
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuContainer::ConstructL
+//
+// Symbian OS two phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CTestModulesMenuContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
+ {
+ _LIT( KErrMessage, "Error loading modules! Check Test engine log.");
+ CreateWindowL();
+
+ iListBox = CMenuListBox::NewL(ETestModulesMenuViewId);
+ iListBox->SetContainerWindowL( *this );
+ iListBox->SetListBoxObserver( aListBoxObserver /*this*/ ); // jos peritty MEikListBoxObserver:sta
+ iListBox->ConstructL(this, EAknListBoxSelectionList /*EAknListBoxMarkableList*/ );
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: ListBox constructed"));
+
+ //Create Scroller control for ListBox and set its visibility
+ iListBox->CreateScrollBarFrameL(ETrue);
+ iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+
+ iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
+
+ if( iUIStore )
+ {
+ /*const CFixedFlatArray<TTestInfo>& allCases = iData->AllCases();
+ const TInt KTestCaseCount = allCases.Count();
+ for (TInt i=0; i < KTestCaseCount; i++)
+ {
+ iTestCasesInView.Append(&(allCases[i]));
+ } */
+
+ //RRefArray<TDesC> modules;
+ TInt ret = iUIStore->Modules( iModules );
+ if( ret != KErrNone )
+ {
+ //iModules.Reset();
+ //iModules.Close();
+ TMessageBoxUtil::ShowErrorNoteL( KErrMessage );
+ }
+
+ iListBoxModel = CTestModulesListBoxModel::NewL( iModules );
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: ListBox model"));
+
+
+ iListBox->Model()->SetItemTextArray(iListBoxModel);
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: ListBox model set"));
+
+ }
+ else
+ {
+ // General error becouse UIStore should be opened in AppUI when
+ // program starts.
+ User::Leave( KErrGeneral );
+ }
+
+ iListBox->ActivateL();
+ ((CMenuListBox*)iListBox)->SetPreviousFocus();
+ SetRect(aRect);
+ ActivateL();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuContainer::~CTestCaseOutputView
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestModulesMenuContainer::~CTestModulesMenuContainer()
+ {
+
+ iModules.Reset();
+ iModules.Close();
+
+ if( iListBox )
+ {
+ delete iListBox;
+ iListBox = NULL;
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuContainer::SizeChanged
+//
+// Called by framework when the view size is changed.
+// ----------------------------------------------------------------------------
+//
+void CTestModulesMenuContainer::SizeChanged()
+ {
+ if ( iListBox )
+ {
+ iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuContainer::CountComponentControls
+//
+// Gets a count of the component controls of this list box control.
+// ----------------------------------------------------------------------------
+//
+TInt CTestModulesMenuContainer::CountComponentControls() const
+ {
+ return 1; // return nbr of controls inside this container
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuContainer::ComponentControl
+//
+// Gets a pointer to the specified component control.
+// ----------------------------------------------------------------------------
+//
+CCoeControl* CTestModulesMenuContainer::ComponentControl(TInt aIndex) const
+ {
+ switch ( aIndex )
+ {
+ case 0:
+ return iListBox;
+ default:
+ return NULL;
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuContainer::Draw
+//
+// Draw a control, called by window server.
+// ----------------------------------------------------------------------------
+//
+void CTestModulesMenuContainer::Draw(const TRect& /*aRect*/) const
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuContainer::OfferKeyEventL
+//
+// Handles key events.
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CTestModulesMenuContainer::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent, TEventCode aType)
+ {
+ if (aType != EEventKey)
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ switch ( aKeyEvent.iCode )
+ {
+ case EKeyLeftArrow:
+ case EKeyRightArrow:
+ { /* Left ja right key eventit valitetaan AppUille joka hoitaa siirtymisen toisiin nakymiin */
+ return EKeyWasNotConsumed;
+ //break;
+ }
+ default:
+ {
+ //Muut Key eventit valitetaan listboxille, joka hoitaa ne
+ if (iListBox)
+ {
+ return iListBox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ }
+ }
+ return EKeyWasNotConsumed;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuContainer::CurrentItemIndex
+//
+// Returns current item index in list box.
+// ----------------------------------------------------------------------------
+//
+TInt CTestModulesMenuContainer::CurrentItemIndex()
+ {
+ return iListBox->CurrentItemIndex();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuContainer::SaveActiveLine
+//
+// Makes the iListBox member save its focus position
+// ----------------------------------------------------------------------------
+//
+void CTestModulesMenuContainer::SaveActiveLine()
+ {
+ ((CMenuListBox*)iListBox)->SaveFocusPosition();
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/TestSetBaseMenuContainer.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,188 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetBaseMenuContainer class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include "TestSetBaseMenuContainer.h"
+#include "Stifui.hrh"
+
+#include <Stifui.rsg>
+
+#include <aknlists.h> //ListBox
+#include <barsread.h> // for TResourceReader
+
+#include <aknnotewrappers.h>
+
+#include "MenuListBox.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuContainer::ConstructL
+//
+// Symbian OS two phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CTestSetBaseMenuContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
+ {
+ CreateWindowL();
+
+ iListBox = CMenuListBox::NewL(ETestSetMenuViewId);
+ iListBox->SetContainerWindowL( *this );
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC( reader, R_TESTSETBASE_MENU_LISTBOX );
+ iListBox->SetListBoxObserver( aListBoxObserver );
+ iListBox->ConstructFromResourceL( reader );
+ CleanupStack::PopAndDestroy(); // resource stuffs.
+
+ // Create Scroller control for ListBox and set its visibility
+ // !!! Not needed yet because there are only two items in list box.
+ // If items are added later, scroller may be taken to use
+ //iListBox->CreateScrollBarFrameL(ETrue);
+ //iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+
+ iListBox->ActivateL();
+ ((CMenuListBox*)iListBox)->SetPreviousFocus();
+
+ SetRect(aRect);
+ ActivateL();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuContainer::~CTestSetBaseMenuContainer
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestSetBaseMenuContainer::~CTestSetBaseMenuContainer()
+ {
+ if ( iListBox )
+ {
+ iListBox->Reset();
+ delete iListBox;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuContainer::SizeChanged
+//
+// Called by framework when the view size is changed.
+// ----------------------------------------------------------------------------
+//
+void CTestSetBaseMenuContainer::SizeChanged()
+ {
+ if ( iListBox )
+ {
+ iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuContainer::CountComponentControls
+//
+// Gets a count of the component controls of this list box control.
+// ----------------------------------------------------------------------------
+//
+TInt CTestSetBaseMenuContainer::CountComponentControls() const
+ {
+ return 1; // return nbr of controls inside this container
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuContainer::ComponentControl
+//
+// Gets a pointer to the specified component control.
+// ----------------------------------------------------------------------------
+//
+CCoeControl* CTestSetBaseMenuContainer::ComponentControl(TInt aIndex) const
+ {
+ switch ( aIndex )
+ {
+ case 0:
+ return iListBox;
+ default:
+ return NULL;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuContainer::Draw
+//
+// Draw a control, called by window server.
+// ----------------------------------------------------------------------------
+//
+void CTestSetBaseMenuContainer::Draw(const TRect& /*aRect*/) const
+ {
+ // CWindowGc& gc = SystemGc();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuContainer::OfferKeyEventL
+//
+// Handles key events..
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CTestSetBaseMenuContainer::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent, TEventCode aType)
+ {
+ if (aType != EEventKey)
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ switch ( aKeyEvent.iCode )
+ {
+ case EKeyLeftArrow:
+ case EKeyRightArrow:
+ { /* Left ja right key eventit valitetaan AppUille joka hoitaa siirtymisen toisiin nakymiin */
+ return EKeyWasNotConsumed;
+ //break;
+ }
+ default:
+ {
+ //Muut Key eventit valitetaan listboxille, joka hoitaa ne
+ if (iListBox)
+ {
+ return iListBox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ }
+ }
+ return EKeyWasNotConsumed;
+}
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuContainer::GetActiveLine
+//
+// Get currently selected items index.
+// ----------------------------------------------------------------------------
+//
+TInt CTestSetBaseMenuContainer::GetActiveLine()
+ {
+ return iListBox->CurrentItemIndex();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuContainer::SaveActiveLine
+//
+// Makes the iListBox member save its focus position
+// ----------------------------------------------------------------------------
+//
+void CTestSetBaseMenuContainer::SaveActiveLine()
+ {
+ ((CMenuListBox*)iListBox)->SaveFocusPosition();
+ }
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/TestSetBaseMenuView.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,200 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetBaseMenuView class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <aknViewAppUi.h>
+#include <aknlists.h>
+#include <barsread.h> //TResourceReader
+#include <Stifui.rsg>
+#include "TestSetBaseMenuView.h"
+#include "TestSetBaseMenuContainer.h"
+#include "Stifui.hrh"
+#include "AppUIAppUi.h" // loggerin kayttoa varten, muuten ei tarvittaisi
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CTestSetBaseMenuView::ConstructL
+//
+// Symbian OS two-phased constructor.
+// ---------------------------------------------------------
+//
+void CTestSetBaseMenuView::ConstructL()
+ {
+ CView::ConstructL();
+ BaseConstructL( R_APPUI_TESTSETBASEMENUVIEW );
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuView::~CTestSetBaseMenuView
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestSetBaseMenuView::~CTestSetBaseMenuView()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuView::Id
+//
+// Returns view´s id.
+// ----------------------------------------------------------------------------
+//
+TUid CTestSetBaseMenuView::Id() const
+ {
+ return TUid::Uid(ETestSetBaseMenuViewId); //KTestSetBaseMenuViewId;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuView::HandleCommandL
+//
+// Handles a command.
+// ----------------------------------------------------------------------------
+//
+void CTestSetBaseMenuView::HandleCommandL(TInt aCommand)
+ {
+ switch ( aCommand )
+ {
+ case EAknSoftkeyBack:
+ {
+ AppUi()->HandleCommandL(EAppUIGoBack);
+ break;
+ }
+ case EAknCmdOpen:
+ {
+ break;
+ }
+ case ECmdCreateTestSet:
+ {
+ AppUi()->HandleCommandL(ECmdCreateTestSet);
+ break;
+ }
+ case ECmdLoadTestSet:
+ {
+ AppUi()->HandleCommandL(ECmdLoadTestSet);
+ break;
+ }
+ default:
+ {
+ AppUi()->HandleCommandL( aCommand );
+ break;
+ }
+ }
+ }
+
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuView::HandleListBoxEventL
+//
+// Handles a list box event.
+// ----------------------------------------------------------------------------
+//
+void CTestSetBaseMenuView::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType)
+ {
+ if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
+ {
+ switch ( aListBox->CurrentItemIndex() )
+ {
+ case 0:
+ HandleCommandL( ECmdCreateTestSet );
+ break;
+ case 1:
+ HandleCommandL( ECmdLoadTestSet );
+ break;
+ }
+ }
+ }
+
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuView::HandleClientRectChange
+//
+// Handles client rect changes.
+// ----------------------------------------------------------------------------
+//
+void CTestSetBaseMenuView::HandleClientRectChange()
+ {
+ if ( iContainer )
+ {
+ iContainer->SetRect( ClientRect() );
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuView::DoActivateL
+//
+// Initializes view when activated.
+// ----------------------------------------------------------------------------
+//
+void CTestSetBaseMenuView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/)
+ {
+ if (!iContainer)
+ {
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("TestSetBaseMenu: DoActivateL"));
+ //message = _L("eng.open ret:");
+ //message.AppendNum( ret , EDecimal );
+ //AppUi->iLogger->Log( message );
+ iContainer = new (ELeave) CTestSetBaseMenuContainer;
+ iContainer->SetMopParent(this);
+ iContainer->ConstructL( ClientRect(), this );
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("TestSetBaseMenu: container constructed"));
+ AppUi()->AddToStackL( *this, iContainer );
+ }
+
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
+
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_TESTSET_BASE);
+ iNaviDecorator = np->CreateNavigationLabelL( reader );
+ CleanupStack::PopAndDestroy(); // resource reader
+ np->PushL(*iNaviDecorator);
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetBaseMenuView::DoDeactivate
+//
+// Deactivates view.
+// ----------------------------------------------------------------------------
+//
+void CTestSetBaseMenuView::DoDeactivate()
+ {
+ if ( iContainer )
+ {
+ iContainer->SaveActiveLine();
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/TestSetInsertMenuContainer.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,224 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetInsertMenuContainer class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <aknlists.h> // ListBox
+#include <AknIconArray.h> // CAknIconArray
+#include <aknnotewrappers.h>
+
+#include <eikclbd.h> // CColumnListBoxData
+
+#include "TestSetInsertMenuContainer.h"
+#include "TestSetInsertMenuView.h"
+#include <Stifui.rsg>
+#include "Stifui.hrh"
+#include "AppUIAppUi.h"
+
+#include "MenuListBox.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuContainer::ConstructL
+//
+// Symbian OS two phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CTestSetInsertMenuContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetInsertMenuContainer: ConstructL"));
+
+ iParentView = (CTestSetInsertMenuView*)aListBoxObserver;
+ CreateWindowL();
+
+ iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
+
+ iTestCasesInView.Reset();
+ //((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetInsertMenuContainer: iTCInV Reset"));
+
+ iListBox = CMenuListBox::NewL(ETestSetInsertMenuViewId);
+ iListBox->SetContainerWindowL( *this );
+ iListBox->SetListBoxObserver( aListBoxObserver /*this*/ ); // jos peritty MEikListBoxObserver:sta
+ iListBox->ConstructL(this, EAknListBoxMarkableList /*EAknListBoxSelectionList*/);
+
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetInsertMenuContainer: ListBox constructed"));
+
+ //Create Scroller control for ListBox and set its visibility
+ iListBox->CreateScrollBarFrameL(ETrue);
+ iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+ iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
+
+ if ( iUIStore )
+ {
+ RRefArray<CTestInfo> allCases;
+ TInt ret = iUIStore->TestCases( allCases );
+ if( KErrNone != ret )
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("iUIStore->TestCases() fails"));
+ allCases.Reset();
+ allCases.Close();
+ User::Leave( ret );
+ }
+
+ const TInt KTestCaseCount = allCases.Count();
+ for (TInt i=0; i < KTestCaseCount; i++)
+ {
+ iTestCasesInView.Append( &allCases[i] );
+ }
+
+ iListBoxModel = CTestCaseListBoxModel::NewL(&iTestCasesInView);
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetInsertMenuContainer: ListBox model"));
+
+ iListBox->Model()->SetItemTextArray(iListBoxModel);
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetInsertMenuContainer: ListBox model set"));
+
+ allCases.Reset();
+ allCases.Close();
+ }
+ else
+ {
+ //User::Leave( syy?? )
+ }
+
+ // Creates graphic.
+ SetGraphicIconL( iListBox );
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetInsertMenuContainer: icons created"));
+
+ iListBox->ActivateL();
+ ((CMenuListBox*)iListBox)->SetPreviousFocus();
+
+ SetRect(aRect);
+ ActivateL();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuContainer::~CTestSetInsertMenuContainer
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestSetInsertMenuContainer::~CTestSetInsertMenuContainer()
+ {
+ //iTestCasesInView.Close(); // does not delete objects whose pointers are contained in the array
+ //delete iListBox;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuContainer::SizeChanged
+//
+// Called by framework when the view size is changed.
+// ----------------------------------------------------------------------------
+//
+void CTestSetInsertMenuContainer::SizeChanged()
+ {
+ if ( iListBox )
+ {
+ iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuContainer::CountComponentControls
+//
+// Gets a count of the component controls of this list box control.
+// ----------------------------------------------------------------------------
+//
+TInt CTestSetInsertMenuContainer::CountComponentControls() const
+ {
+ return 1; // return nbr of controls inside this container
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuContainer::ComponentControl
+//
+// Gets a pointer to the specified component control.
+// ----------------------------------------------------------------------------
+//
+CCoeControl* CTestSetInsertMenuContainer::ComponentControl(TInt aIndex) const
+ {
+ switch ( aIndex )
+ {
+ case 0:
+ return iListBox;
+ default:
+ return NULL;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuContainer::Draw
+//
+// Draw a control, called by window server.
+// ----------------------------------------------------------------------------
+//
+void CTestSetInsertMenuContainer::Draw(const TRect& /*aRect*/) const
+ {
+ // CWindowGc& gc = SystemGc();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuContainer::OfferKeyEventL
+//
+// Handles key events.
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CTestSetInsertMenuContainer::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent, TEventCode aType )
+ {
+ if (aType != EEventKey)
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ if (iListBox)
+ {
+ //if multiple items selected
+ if ( iListBox->SelectionIndexes()->Count() > 0 )
+ {
+ TUint mask = 0x40488;
+
+ //if event is enter key,
+ //don´t send it to listbox
+ if ( aKeyEvent.iScanCode == 0xa7
+ && ( aKeyEvent.iModifiers & mask ) == 0 )
+ {
+ iParentView->HandleListBoxEventL( iListBox, MEikListBoxObserver::EEventEnterKeyPressed );
+ return EKeyWasConsumed;
+ }
+ }
+
+ return iListBox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ else
+ {
+ return EKeyWasNotConsumed;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuContainer::SaveActiveLine
+//
+// Makes the iListBox member save its focus position
+// ----------------------------------------------------------------------------
+//
+void CTestSetInsertMenuContainer::SaveActiveLine()
+ {
+ ((CMenuListBox*)iListBox)->SaveFocusPosition();
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/TestSetInsertMenuView.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,399 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetInsertMenuView class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <eikmenub.h>
+#include <aknViewAppUi.h>
+#include <aknlistquerydialog.h>
+#include <aknnotewrappers.h>
+#include <barsread.h> //TResourceReader
+#include <Stifui.rsg>
+#include "TestSetInsertMenuView.h"
+#include "TestSetInsertMenuContainer.h"
+#include "TestSetMenuView.h"
+#include "AppUIAppUi.h"
+#include "Stifui.hrh"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuView::ConstructL
+//
+// Symbian OS two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CTestSetInsertMenuView::ConstructL()
+ {
+ CView::ConstructL();
+ BaseConstructL( R_INSERT_TESTCASES_VIEW );
+ iCurrentTestCase = 0;
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuView::~CTestSetInsertMenuView
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestSetInsertMenuView::~CTestSetInsertMenuView()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuView::Id
+//
+// Returns view´s id.
+// ----------------------------------------------------------------------------
+//
+TUid CTestSetInsertMenuView::Id() const
+ {
+ return TUid::Uid(ETestSetInsertMenuViewId);
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuView::HandleCommandL
+//
+// Handles a command.
+// ----------------------------------------------------------------------------
+//
+void CTestSetInsertMenuView::HandleCommandL(TInt aCommand)
+ {
+ if ( aCommand >= ECmdFilterByModule && aCommand < ECmdFilterByTestCaseFile ) // 0x1000 - 0x1FFF
+ {
+ TInt moduleNumber = aCommand - ECmdFilterByModule;
+ RRefArray<TDesC> allModules;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( allModules );
+ if( KErrNone != ret )
+ {
+ allModules.Reset();
+ allModules.Close();
+ User::Leave( ret );
+ }
+ TName moduleName = allModules[ moduleNumber ];
+
+ iContainer->FilterCasesByModuleL( moduleName );
+
+ allModules.Reset();
+ allModules.Close();
+ }
+ else if ( aCommand >= ECmdFilterByTestCaseFile && aCommand < ECmdNOFiltering )
+ {
+ TInt testCaseFileNumber = aCommand - ECmdFilterByTestCaseFile;
+ RRefArray<TDesC> allTestCases;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( allTestCases );
+ if( KErrNone != ret )
+ {
+ allTestCases.Reset();
+ allTestCases.Close();
+ User::Leave( ret );
+ }
+ TFileName testCaseFileName = allTestCases[ testCaseFileNumber ];
+
+ iContainer->FilterCasesByTCFileNameL( testCaseFileName );
+
+ allTestCases.Reset();
+ allTestCases.Close();
+ }
+ else if ( aCommand == ECmdNOFiltering )
+ {
+ iContainer->NoFilteringL();
+ }
+ else if ( aCommand == EAknCmdMark || aCommand == EAknCmdUnmark
+ || aCommand == EAknMarkAll || aCommand == EAknUnmarkAll )
+ {
+ iContainer->HandleMarkCommandL( aCommand );
+ }
+ else
+ {
+ switch ( aCommand )
+ {
+ case ECmdInsertSelectedCases:
+ {
+ ShowInsertCasesDialogL();
+ break;
+ }
+ case EAknSoftkeyCancel:
+ {
+ //iCurrentTestCase = 0;
+ ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(EAppUIGoToTestSetsMenu);
+ break;
+ }
+ default:
+ {
+ AppUi()->HandleCommandL( aCommand );
+ break;
+ }
+ }
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuView::HandleClientRectChange
+//
+// Handles client rect changes.
+// ----------------------------------------------------------------------------
+//
+void CTestSetInsertMenuView::HandleClientRectChange()
+ {
+ if ( iContainer )
+ {
+ iContainer->SetRect( ClientRect() );
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuView::DoActivateL
+//
+// Initializes view when activated.
+// ----------------------------------------------------------------------------
+//
+void CTestSetInsertMenuView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/)
+ {
+ if (!iContainer)
+ {
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("TestSetInsertMenuView: DoActivateL"));
+ //message = _L("eng.open ret:");
+ //message.AppendNum( ret , EDecimal );
+ //AppUi()->iLogger->Log( message );
+ iContainer = new (ELeave) CTestSetInsertMenuContainer;
+ iContainer->SetMopParent(this);
+ iContainer->ConstructL( ClientRect(), this );
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("TestSetInsertMenuView: container constructed"));
+ AppUi()->AddToStackL( *this, iContainer );
+ }
+
+ //testing
+ iContainer->SetCurrentItemIndex(iCurrentTestCase);
+
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
+
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_TESTSET_INSERT);
+ iNaviDecorator = np->CreateNavigationLabelL( reader );
+ CleanupStack::PopAndDestroy(); // resource reader
+ np->PushL(*iNaviDecorator);
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuView::DoDeactivate
+//
+// Deactivates view.
+// ----------------------------------------------------------------------------
+//
+void CTestSetInsertMenuView::DoDeactivate()
+ {
+ if ( iContainer )
+ {
+ iContainer->SaveActiveLine();
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuView::DynInitMenuPaneL
+//
+// Initializes menu pane.
+// ----------------------------------------------------------------------------
+//
+void CTestSetInsertMenuView::DynInitMenuPaneL(
+ TInt aResourceId, CEikMenuPane* aMenuPane)
+ {
+
+ // Test modules are added to filter by test module submenu if the submenu is opened
+ if (R_APPUI_FILTERBYMODULES_MENU == aResourceId)
+ {
+ RRefArray<TDesC> modules;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( modules );
+ if( KErrNone != ret )
+ {
+ modules.Reset();
+ modules.Close();
+ User::Leave( ret );
+ }
+
+ TInt moduleCount = modules.Count();
+
+ TInt i;
+ CEikMenuPaneItem::SData item;
+
+ item.iCommandId = ECmdFilterByModule;
+ item.iFlags = 0;
+ item.iCascadeId = 0;
+
+ for (i = 0; i < moduleCount; i++)
+ {
+ //item.iText = modules[i].iModuleName;
+ item.iText = modules[i];
+ aMenuPane->AddMenuItemL(item);
+ item.iCommandId++; // command IDs 0x1000 - 0x1FFF are reserved for modules in hrh file
+ }
+
+ modules.Reset();
+ modules.Close();
+
+ }
+
+ // Test case files are added to filter by test case file submenu if the submenu is opened
+ if (R_APPUI_FILTER_BY_TESTCASEFILE_MENU == aResourceId)
+ {
+ RRefArray<TDesC> testCaseFiles;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( testCaseFiles );
+ if( KErrNone != ret )
+ {
+ testCaseFiles.Reset();
+ testCaseFiles.Close();
+ User::Leave( ret );
+ }
+
+ TInt testCaseFileCount = testCaseFiles.Count();
+
+ TInt i;
+ CEikMenuPaneItem::SData item;
+
+ item.iCommandId = ECmdFilterByTestCaseFile;
+ item.iFlags = 0;
+ item.iCascadeId = 0;
+
+ for (i = 0; i < testCaseFileCount; i++)
+ {
+ item.iText = testCaseFiles[i];
+ aMenuPane->AddMenuItemL(item);
+ item.iCommandId++; // command IDs 0x2000 - 0x2FFF are reserved for test case files in hrh file
+ }
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuView::HandleListBoxEventL
+//
+// Handles listbox events.
+// ----------------------------------------------------------------------------
+//
+void CTestSetInsertMenuView::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
+ {
+
+ if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
+ {
+ ShowInsertCasesDialogL();
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuView::ShowInsertCasesDialogL
+//
+// Show confirmation dialog for inserting test cases.
+// ----------------------------------------------------------------------------
+//
+void CTestSetInsertMenuView::ShowInsertCasesDialogL()
+ {
+ TInt i(0);
+ TBuf<50> message;
+ CEikListBox* listBox = iContainer->ListBox();
+ TInt count = listBox->SelectionIndexes()->Count();
+
+ if ( count > 0 )
+ {
+ CEikonEnv::Static()->ReadResource( message, R_INSERT_CONFIRMATION_QUESTION );
+
+ CAknQueryDialog * dlg = CAknQueryDialog::NewL(CAknQueryDialog::ENoTone);
+ if ( dlg->ExecuteLD( R_GENERAL_CONFIRMATION_DIALOG, message ) )
+ {
+ CEikListBox* newListBox = iContainer->ListBox();
+ TInt newCount = newListBox->SelectionIndexes()->Count();
+ RArray<TInt> selectedIndices;
+ CleanupClosePushL( selectedIndices );
+ if ( newCount > 0 )
+ {
+ for( i = 0; i < newCount; i++ )
+ {
+ selectedIndices.InsertInOrder( (*newListBox->SelectionIndexes())[i] );
+ }
+
+ AddCasesToTestSet( selectedIndices );
+ // Test cases added, set save needed flag to true.
+ ((CTestSetMenuView*)AppUi()->View(
+ TUid::Uid(ETestSetMenuViewId) ))->SetSaveNeeded(ETrue);
+ }
+ CleanupStack::PopAndDestroy();
+
+ // Test cases added -> go to test set menu
+ AppUi()->HandleCommandL(EAppUIGoBack);
+ }
+ }
+ else
+ {
+ CAknWarningNote* dialog = new(ELeave)CAknWarningNote();
+ CEikonEnv::Static()->ReadResource( message, R_INSERT_NOCASES_TEXT );
+ dialog->ExecuteLD(message);
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetInsertMenuView::AddCasesToTestSet
+//
+// Adds selected test cases to the current test set.
+// ----------------------------------------------------------------------------
+//
+void CTestSetInsertMenuView::AddCasesToTestSet( RArray<TInt> aSelectedIndexes )
+ {
+ TInt ret(0);
+ TInt i(0);
+ RRefArray<CTestInfo> allCases;
+ CTestSetMenuView* testSetMenuView =
+ (CTestSetMenuView*)((CAppUIAppUi*)AppUi())->View( TUid::Uid(ETestSetMenuViewId) );
+
+ ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCases(allCases);
+
+ for ( i = 0; i < aSelectedIndexes.Count(); i++ )
+ {
+ ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->AddToTestSet(
+ testSetMenuView->CurrentTestSet(),
+ allCases[ aSelectedIndexes[i] ] );
+ }
+ if( ret != KErrNone )
+ {
+ RDebug::Print( _L("AddCasesToTestSet failed with value: %d"), ret );
+ }
+
+ allCases.Reset();
+ allCases.Close();
+
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/TestSetMenuContainer.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,486 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetMenuContainer class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <aknlists.h> // ListBox
+#include <AknIconArray.h> // CAknIconArray
+#include <aknnotewrappers.h>
+
+#include <eikclbd.h> // CColumnListBoxData
+
+#include "TestSetMenuContainer.h"
+#include "TestSetMenuView.h"
+#include "StartCasesContainer.h"
+#include <Stifui.rsg>
+#include "Stifui.hrh"
+#include "AppUIAppUi.h"
+
+#include "MenuListBox.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::ConstructL
+//
+// Symbian OS two phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetMenuContainer: ConstructL"));
+
+ iParentView = (CTestSetMenuView*)aListBoxObserver;
+ CreateWindowL();
+
+ iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
+
+ iTestCasesInView.Reset();
+ //((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetMenuContainer: iTCInV Reset"));
+
+ iListBox = CMenuListBox::NewL(ETestSetMenuViewId);
+ iListBox->SetContainerWindowL( *this );
+ iListBox->SetListBoxObserver( aListBoxObserver /*this*/ ); // jos peritty MEikListBoxObserver:sta
+ iListBox->ConstructL(this, EAknListBoxMarkableList /*EAknListBoxSelectionList*/);
+
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetMenuContainer: ListBox constructed"));
+
+ //Create Scroller control for ListBox and set its visibility
+ iListBox->CreateScrollBarFrameL(ETrue);
+ iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+ iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
+ iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
+ iListBox->HandleItemAdditionL();
+
+ if ( iUIStore )
+ {
+ //RRefArray<const CTestInfo> allCases;
+ //CTestSetInfo* testSetInfo;
+ //IMPORT_C const CTestSetInfo& TestSetL( const TDesC& aSetName );
+
+ TPtrC ptr = iParentView->CurrentTestSet();
+
+ const CTestSetInfo* testSetInfo =
+ &iUIStore->TestSetL( ptr );
+
+ //inline const RRefArray<const CTestInfo>& TestCases() const
+ const RRefArray<const CTestInfo>* allCases = &testSetInfo->TestCases();
+
+ /*if( ret != KErrNone )
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("iUIStore->TestCases() fails"));
+ // Leave
+ }
+ */
+
+ const TInt KTestCaseCount = allCases->Count();
+ for (TInt i=0; i < KTestCaseCount; i++)
+ {
+ iTestCasesInView.Append( &allCases->operator[](i) );
+ }
+
+ iListBoxModel = CTestCaseListBoxModel::NewL(&iTestCasesInView);
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetMenuContainer: ListBox model"));
+
+ iListBox->Model()->SetItemTextArray(iListBoxModel);
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetMenuContainer: ListBox model set"));
+
+ }
+ else
+ {
+ //User::Leave( syy?? )
+ }
+
+ // Creates graphic.
+ SetGraphicIconL( iListBox );
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetMenuContainer: icons created"));
+
+ iListBox->ActivateL();
+ ((CMenuListBox*)iListBox)->SetPreviousFocus();
+
+ SetRect(aRect);
+ ActivateL();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::SetGraphicIconL
+//
+// Sets graphic icon using listbox as CEikColumnListBox.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::SetGraphicIconL( CEikColumnListBox* aListBox )
+ {
+ if ( aListBox )
+ {
+ // Creates gul icon.
+ CAknIconArray* iconArray = new(ELeave) CAknIconArray(1);
+ CleanupStack::PushL( iconArray );
+
+ GraphicIconL( iconArray ); // Appends graphic data.
+
+ // Sets graphics as ListBox icon.
+ aListBox->ItemDrawer()->ColumnData()->SetIconArray( iconArray );
+
+ CleanupStack::Pop();
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::CurrentItemIndex
+//
+// Returns current item index in list box.
+// ----------------------------------------------------------------------------
+//
+TInt CTestSetMenuContainer::CurrentItemIndex()
+ {
+ return iListBox->CurrentItemIndex();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::SetCurrentItemIndex
+//
+// Sets current item index in list box.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::SetCurrentItemIndex(TInt aCurrentTestCase)
+ {
+ iListBox->SetCurrentItemIndexAndDraw(aCurrentTestCase);
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::GraphicIconL
+//
+// Appends graphics data.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::GraphicIconL( CArrayPtr<CGulIcon>* aIcons )
+ {
+ if ( aIcons )
+ {
+ CFbsBitmap* markBitmap = NULL;
+ CFbsBitmap* markBitmapMask = NULL;
+
+ TRgb defaultColor;
+ defaultColor = CEikonEnv::Static()->Color(EColorControlText);
+
+ AknsUtils::CreateColorIconL(AknsUtils::SkinInstance(),
+ KAknsIIDQgnIndiMarkedAdd,
+ KAknsIIDQsnIconColors,
+ EAknsCIQsnIconColorsCG13,
+ markBitmap,
+ markBitmapMask,
+ AknIconUtils::AvkonIconFileName(),
+ EMbmAvkonQgn_indi_marked_add,
+ EMbmAvkonQgn_indi_marked_add_mask,
+ defaultColor );
+
+ CGulIcon* markIcon = CGulIcon::NewL(markBitmap,markBitmapMask);
+ aIcons->AppendL(markIcon);
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::~CTestSetMenuContainer
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestSetMenuContainer::~CTestSetMenuContainer()
+ {
+ iTestCasesInView.Close(); // does not delete objects whose pointers are contained in the array
+ delete iListBox;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::SizeChanged
+//
+// Called by framework when the view size is changed.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::SizeChanged()
+ {
+ if ( iListBox )
+ {
+ iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::CountComponentControls
+//
+// Gets a count of the component controls of this list box control.
+// ----------------------------------------------------------------------------
+//
+TInt CTestSetMenuContainer::CountComponentControls() const
+ {
+ return 1; // return nbr of controls inside this container
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::ComponentControl
+//
+// Gets a pointer to the specified component control.
+// ----------------------------------------------------------------------------
+//
+CCoeControl* CTestSetMenuContainer::ComponentControl(TInt aIndex) const
+ {
+ switch ( aIndex )
+ {
+ case 0:
+ return iListBox;
+ default:
+ return NULL;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::Draw
+//
+// Draw a control, called by window server.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::Draw(const TRect& /*aRect*/) const
+ {
+ // CWindowGc& gc = SystemGc();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::SelectedTestCases
+//
+// Returns pointers to selected test cases.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::SelectedTestCases
+ (RPointerArray<CTestInfo>& aSelectedTestCases)
+ {
+ aSelectedTestCases.Append( iTestCasesInView[iListBox->CurrentItemIndex()] );
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::OfferKeyEventL
+//
+// Handles key events.
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CTestSetMenuContainer::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent, TEventCode aType )
+ {
+ if (aType != EEventKey)
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ if (iListBox)
+ {
+ //if multiple items selected
+ if ( iListBox->SelectionIndexes()->Count() > 0 )
+ {
+ TUint mask = 0x40488;
+
+ //if event is enter key,
+ //don´t send it to listbox
+ if ( aKeyEvent.iScanCode == 0xa7
+ && ( aKeyEvent.iModifiers & mask ) == 0 )
+ {
+ iParentView->HandleListBoxEventL( iListBox, MEikListBoxObserver::EEventEnterKeyPressed );
+ return EKeyWasConsumed;
+ }
+ }
+
+ return iListBox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ else
+ {
+ return EKeyWasNotConsumed;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::HandleMarkCommandL
+//
+// Handles mark commands.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::HandleMarkCommandL( TInt aCommand )
+ {
+ if (iListBox)
+ {
+ AknSelectionService::HandleMarkableListProcessCommandL( aCommand, iListBox );
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::ProcessCommandL
+//
+// Processes user commands.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::ProcessCommandL( TInt aCommand )
+ {
+ AknSelectionService::HandleMarkableListProcessCommandL( aCommand, iListBox );
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::SelectionListProcessCommandL
+//
+// Processes user commands.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::SelectionListProcessCommandL( TInt aCommand )
+ {
+ AknSelectionService::HandleSelectionListProcessCommandL( aCommand, iListBox );
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::FilterCasesByModuleL
+//
+// Show only testcases which are defined is specified module.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::FilterCasesByModuleL( TName aModuleName )
+ {
+ iTestCasesInView.Reset(); // Clear testCasesInView pointer array
+
+ RRefArray<CTestInfo> allCases;
+ TInt ret = iUIStore->TestCases( allCases );
+ if( KErrNone != ret )
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("FilterCasesByModuleL(): iUIStore->TestCases() fails"));
+ allCases.Reset();
+ allCases.Close();
+ User::Leave( ret );
+ }
+ const TInt KTestCaseCount = allCases.Count();
+ for( TInt i=0; i < KTestCaseCount; i++ )
+ {
+ if ( allCases[i].ModuleName() == aModuleName )
+ {
+ iTestCasesInView.Append( &( allCases[i] ) );
+ }
+ }
+ allCases.Reset();
+ allCases.Close();
+
+ iListBox->Reset();
+ iListBox->DrawNow();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::FilterCasesByTCFileNameL
+//
+// Show only testcases which are defined is specified test case file.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::FilterCasesByTCFileNameL(
+ TFileName aTestCaseFileName )
+ {
+
+ iTestCasesInView.Reset(); // Clear testCasesInView pointer array
+
+ RRefArray<CTestInfo> allCases;
+ TInt ret = iUIStore->TestCases( allCases );
+ if( KErrNone != ret )
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("FilterCasesByModuleL(): iUIStore->TestCases() fails"));
+ allCases.Reset();
+ allCases.Close();
+ User::Leave( ret );
+ }
+ const TInt KTestCaseCount = allCases.Count();
+ for( TInt i=0; i < KTestCaseCount; i++ )
+ {
+ if ( allCases[i].TestCaseFile() == aTestCaseFileName )
+ {
+ iTestCasesInView.Append( &( allCases[i] ) );
+ }
+ }
+
+ allCases.Reset();
+ allCases.Close();
+
+ iListBox->Reset();
+ iListBox->DrawNow();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::NoFilteringL
+//
+// Remove possible filtering of test cases -> show all test cases.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::NoFilteringL()
+ {
+ iTestCasesInView.Reset(); // Clear testCasesInView pointer array
+
+ RRefArray<CTestInfo> allCases;
+ TInt ret = iUIStore->TestCases( allCases );
+ if( KErrNone != ret )
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("FilterCasesByModuleL(): iUIStore->TestCases() fails"));
+ allCases.Reset();
+ allCases.Close();
+ User::Leave( ret );
+ }
+ const TInt KTestCaseCount = allCases.Count();
+
+ // Add all cases to iTestCasesInView pointer array
+ for( TInt i=0; i < KTestCaseCount; i++ )
+ {
+ iTestCasesInView.Append( &( allCases[i] ) );
+ }
+
+ allCases.Reset();
+ allCases.Close();
+
+ iListBox->Reset();
+ iListBox->DrawNow();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::RemoveListBoxItemsL
+//
+// Removes items from list box.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::RemoveListBoxItemL( TInt aSelected )
+ {
+ TInt currentItem(0);
+ TBool remCurr(EFalse);
+
+ currentItem = iListBox->CurrentItemIndex();
+ if( aSelected == currentItem )
+ {
+ remCurr = ETrue;
+ }
+
+ iTestCasesInView.Remove( aSelected );
+ AknListBoxUtils::HandleItemRemovalAndPositionHighlightL(iListBox, aSelected, remCurr);
+ iListBox->HandleItemAdditionL();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuContainer::SaveActiveLine
+//
+// Makes the iListBox member save its focus position
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuContainer::SaveActiveLine()
+ {
+ ((CMenuListBox*)iListBox)->SaveFocusPosition();
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/TestSetMenuView.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,554 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetMenuView class ddefinition.
+*
+*/
+
+// INCLUDE FILES
+#include <eikmenub.h>
+#include <aknViewAppUi.h>
+#include <aknlistquerydialog.h>
+#include <aknnotewrappers.h>
+#include <barsread.h> //TResourceReader
+#include <Stifui.rsg>
+#include "TestSetMenuView.h"
+#include "TestSetMenuContainer.h"
+#include "AppUIAppUi.h"
+#include "Stifui.hrh"
+
+
+
+// ================= MEMBER FUNCTIONS =========================================
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::ConstructL
+//
+// Symbian OS two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuView::ConstructL()
+ {
+ CView::ConstructL();
+ BaseConstructL( R_APPUI_TESTSETMENUVIEW );
+ iCurrentTestCase = 0;
+ iSaveNeeded = ETrue;
+ iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::~CTestSetMenuView
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestSetMenuView::~CTestSetMenuView()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::Id
+//
+// Returns view´s id.
+// ----------------------------------------------------------------------------
+//
+TUid CTestSetMenuView::Id() const
+ {
+ return TUid::Uid(ETestSetMenuViewId);
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::HandleCommandL
+//
+// Handles a command.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuView::HandleCommandL(TInt aCommand)
+ {
+ if ( aCommand == EAknCmdMark || aCommand == EAknCmdUnmark
+ || aCommand == EAknMarkAll || aCommand == EAknUnmarkAll )
+ {
+ iContainer->HandleMarkCommandL( aCommand );
+ }
+ else
+ {
+ switch ( aCommand )
+ {
+ case ECmdStartTestSet:
+ {
+ const CTestSetInfo& testSetInfo =
+ iUIStore->TestSetL( iCurrentTestSet );
+ const RRefArray<const CTestInfo>* allCases =
+ &testSetInfo.TestCases();
+
+ TInt testCaseCount = allCases->Count();
+ if (testCaseCount > 0 )
+ {
+ StartTestSetL();
+ }
+ break;
+ }
+ case ECmdShowStartedTestSet:
+ {
+ AppUi()->HandleCommandL(ECmdShowStartedTestSet);
+ break;
+ }
+ case ECmdSaveTestSet:
+ {
+ SaveCurrentTestSetL();
+ break;
+ }
+ case ECmdInsertTestCases:
+ {
+ // iSaveNeeded is set from
+ // CTestSetInsertMenuView::ShowInsertCasesDialog()
+ //iSaveNeeded = ETrue;
+ AppUi()->HandleCommandL(ECmdInsertTestCases);
+ break;
+ }
+ case ECmdRemoveTestCases:
+ {
+ RemoveSelectedTestCasesL();
+ break;
+ }
+ case EAknSoftkeyBack:
+ {
+ //iCurrentTestCase = 0;
+ // AppUi()->HandleCommandL(ECmdLoadTestSet/*EAppUIGoToTestSetsMenu*/);
+ //( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(EAppUIGoToTestSetsMenu);
+ SaveCurrentTestSetL();
+ break;
+ }
+ default:
+ {
+ AppUi()->HandleCommandL( aCommand );
+ break;
+ }
+ }
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::HandleClientRectChange
+//
+// Handles client rect changes.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuView::HandleClientRectChange()
+ {
+ if ( iContainer )
+ {
+ iContainer->SetRect( ClientRect() );
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::DoActivateL
+//
+// Initializes view when activated.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/)
+ {
+ if (!iContainer)
+ {
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(
+ _L("TestSetMenuView: DoActivateL") );
+ iContainer = new (ELeave) CTestSetMenuContainer;
+ iContainer->SetMopParent(this);
+ iContainer->ConstructL( ClientRect(), this );
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(
+ _L("TestSetMenuView: container constructed") );
+ AppUi()->AddToStackL( *this, iContainer );
+ }
+
+ //testing
+ iContainer->SetCurrentItemIndex(iCurrentTestCase);
+
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ CAknNavigationControlContainer* np =
+ (CAknNavigationControlContainer *)sp->ControlL(
+ TUid::Uid(EEikStatusPaneUidNavi));
+
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_TESTSET );
+ iNaviDecorator = np->CreateNavigationLabelL( reader );
+ CleanupStack::PopAndDestroy(); // resource reader
+ np->PushL(*iNaviDecorator);
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::DoDeactivate
+//
+// Deactivates view.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuView::DoDeactivate()
+ {
+ if ( iContainer )
+ {
+ iContainer->SaveActiveLine();
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::DynInitMenuPaneL
+//
+// Initializes menu pane.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuView::DynInitMenuPaneL(
+ TInt aResourceId, CEikMenuPane* aMenuPane)
+ {
+
+ // Test modules are added to filter by test module submenu
+ // if the submenu is opened
+ if (R_APPUI_FILTERBYMODULES_MENU == aResourceId)
+ {
+ RRefArray<TDesC> modules;
+ TInt ret = iUIStore->Modules( modules );
+ if( KErrNone != ret )
+ {
+ modules.Reset();
+ modules.Close();
+ User::Leave( ret );
+ }
+
+ TInt moduleCount = modules.Count();
+
+ TInt i;
+ CEikMenuPaneItem::SData item;
+
+ item.iCommandId = ECmdFilterByModule;
+ item.iFlags = 0;
+ item.iCascadeId = 0;
+
+ for (i = 0; i < moduleCount; i++)
+ {
+ item.iText = modules[i];
+ aMenuPane->AddMenuItemL(item);
+ item.iCommandId++; // Command IDs 0x1000 - 0x1FFF are reserved
+ // for modules in hrh file.
+ }
+
+ modules.Reset();
+ modules.Close();
+ }
+
+ // Test case files are added to filter by test case file submenu
+ // if the submenu is opened.
+ if (R_APPUI_FILTER_BY_TESTCASEFILE_MENU == aResourceId)
+ {
+ RRefArray<TDesC> testCaseFiles;
+ TInt ret = iUIStore->TestCaseFiles( testCaseFiles );
+ if( KErrNone != ret )
+ {
+ testCaseFiles.Reset();
+ testCaseFiles.Close();
+ User::Leave( ret );
+ }
+
+ TInt testCaseFileCount = testCaseFiles.Count();
+
+ TInt i;
+ CEikMenuPaneItem::SData item;
+
+ item.iCommandId = ECmdFilterByTestCaseFile;
+ item.iFlags = 0;
+ item.iCascadeId = 0;
+
+ for (i = 0; i < testCaseFileCount; i++)
+ {
+ item.iText = testCaseFiles[i];
+ aMenuPane->AddMenuItemL(item);
+ item.iCommandId++; // Command IDs 0x2000 - 0x2FFF are reserved for
+ // test case files in hrh file.
+ }
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::HandleListBoxEventL
+//
+// Handles listbox events.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuView::HandleListBoxEventL(CEikListBox* /*aListBox*/,
+ TListBoxEvent aEventType)
+ {
+
+ if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
+ {
+ const CTestSetInfo& testSetInfo =
+ iUIStore->TestSetL( iCurrentTestSet );
+ const RRefArray<const CTestInfo>* allCases = &testSetInfo.TestCases();
+
+ TInt testCaseCount = allCases->Count();
+ if (testCaseCount > 0 )
+ {
+ StartTestSetL();
+ }
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::CreateTestSet
+//
+// Creates new test set.
+// ----------------------------------------------------------------------------
+//
+TInt CTestSetMenuView::CreateTestSetL( const TDesC& aTestSetName )
+ {
+ TInt error = 0;
+ TBuf<100> message;
+
+ _LIT(KPath, "c:\\TestFramework\\");
+ RFs fs;
+ User::LeaveIfError(fs.Connect());
+ CleanupClosePushL(fs);
+ TEntry entry;
+ // we check if the c:\testframework directory exists
+ // It is mandatory for this dir to exist if we want to save a test set.
+ // This dir must be localised on the C drive of the device
+ if(fs.Entry(KPath, entry) != KErrNone)
+ { // if the dir does not exist
+ TInt err = fs.MkDirAll(KPath); // we create it
+ if(err != KErrNone)
+ { // if of any reason it was impossible to create the dir - inform user about it
+ CAknInformationNote* note = new (ELeave) CAknInformationNote(ETrue);
+ note->ExecuteLD( _L("Could not create c:\\TestFramework dir!") );
+ }
+ }
+ CleanupStack::PopAndDestroy(&fs); // close and remove RFs object
+
+ error = iUIStore->LoadTestSet( aTestSetName );
+
+ // If testset is either active or already created and saved.
+ /* if ( KErrNone == error)// || KErrAlreadyExists == error )
+ {
+ CEikonEnv::Static()->ReadResource( message,
+ R_OVERWRITE_TESTSET_QUESTION );
+ CAknQueryDialog * dlg =
+ CAknQueryDialog::NewL(CAknQueryDialog::ENoTone);
+ // Confirm overwrite
+ if ( dlg->ExecuteLD( R_GENERAL_CONFIRMATION_DIALOG, message ) )
+ {
+ error = iUIStore->RemoveTestSet( aTestSetName );
+ error = iUIStore->CreateTestSet( aTestSetName );
+ if ( error == KErrNone )
+ {
+ iCurrentTestSet = aTestSetName;
+ iSaveNeeded = ETrue;
+ }
+ }
+ // Else load saved default test set
+ else
+ {
+ iSaveNeeded = EFalse;
+ iCurrentTestSet = aTestSetName;
+ error = KErrAlreadyExists;
+ }
+ }
+ else if ( KErrNotFound == error )
+ {
+ error = iUIStore->CreateTestSet( aTestSetName );
+ if ( KErrNone == error )
+ {
+ iCurrentTestSet = aTestSetName;
+ iSaveNeeded = ETrue;
+ }
+ }
+ else if ( KErrPathNotFound == error )
+ {
+ error = iUIStore->CreateTestSet( aTestSetName );
+ iCurrentTestSet = aTestSetName;
+ iSaveNeeded = EFalse;
+ }
+ else
+ {
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("Test set creation fails with error: %d"), error );
+ CAknInformationNote* informationNote = new (ELeave) CAknInformationNote(ETrue);
+ informationNote->ExecuteLD( _L("UNDEFINED ERROR!") );
+ }*/
+
+ error = iUIStore->CreateTestSet( aTestSetName );
+ iCurrentTestSet = aTestSetName;
+ iSaveNeeded = ETrue;
+ return error;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::LoadTestSetL
+//
+// Loads saved test set.
+// ----------------------------------------------------------------------------
+//
+TInt CTestSetMenuView::LoadTestSetL( const TDesC& aTestSetName )
+ {
+ TInt error = 0;
+ TBuf<100> message;
+ error = iUIStore->LoadTestSet( aTestSetName );
+ if ( KErrNone == error || KErrAlreadyExists == error )
+ {
+ iCurrentTestSet = aTestSetName;
+ iSaveNeeded = EFalse;
+ }
+ else
+ {
+ CEikonEnv::Static()->ReadResource( message,
+ R_LOAD_TESTSET_FAILED );
+
+ CAknInformationNote* informationNote = new (ELeave) CAknInformationNote(ETrue);
+ informationNote->ExecuteLD(message);
+ }
+
+ return error;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::SaveCurrentTestSet
+//
+// Saves current test set.
+// ----------------------------------------------------------------------------
+//
+TInt CTestSetMenuView::SaveCurrentTestSetL()
+ {
+ TInt error = 0;
+ TBuf<100> message;
+
+ CEikonEnv::Static()->ReadResource( message,
+ R_SAVE_TESTSET_QUESTION );
+
+ CAknQueryDialog * dlg =
+ CAknQueryDialog::NewL(CAknQueryDialog::ENoTone);
+
+ if ( dlg->ExecuteLD( R_GENERAL_CONFIRMATION_DIALOG, message ) )
+ {
+ error = iUIStore->SaveTestSet2( iCurrentTestSet );
+ iSaveNeeded = EFalse;
+
+ }
+ AppUi()->HandleCommandL(EAppUIGoBack);
+
+ return error;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::RemoveActiveTestSet
+//
+// Removes current test set.
+// ----------------------------------------------------------------------------
+//
+TInt CTestSetMenuView::RemoveActiveTestSet()
+ {
+ TInt error = 0;
+
+ error = iUIStore->RemoveTestSet( iCurrentTestSet );
+
+ return error;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::StartTestSetL
+//
+// Shows confirmation dialog and verify if user really want to start test set.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuView::StartTestSetL()
+ {
+ _LIT( KErrorStartingTestSet,
+ "TestSetMenuView: StartTestSetL() fails (%d)" );
+
+ TInt ret(KErrNone);
+ TInt index(0);
+ TInt selectedItem(0);
+
+ // Default mode is parallel.
+ CStartedTestSet::TSetType mode = CStartedTestSet::ESetParallel;
+
+ CAknListQueryDialog* startDialog =
+ new (ELeave) CAknListQueryDialog(&selectedItem);
+
+ // Show confirmation dialog.
+ if ( startDialog->ExecuteLD(R_START_MULTIPLE_TESTCASES_LIST_QUERY) )
+ {
+ index = ((CAppUIAppUi*)AppUi())->iStartedTestSet;
+ // Check mode
+ if ( 1 == selectedItem )
+ {
+ mode = CStartedTestSet::ESetSequential;
+ }
+
+ // Start test set cases.
+ ret = iUIStore->StartTestSet(
+ iUIStore->TestSetL( iCurrentTestSet ), index, mode );
+
+ if ( ret != KErrNone )
+ {
+ ((CAppUIAppUi*)AppUi())->iStartedTestSet = -1;
+ ((CAppUIAppUi*)AppUi())->iLogger->Log(
+ KErrorStartingTestSet, ret );
+ }
+ else
+ {
+ ((CAppUIAppUi*)AppUi())->iStartedTestSet = index;
+ }
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetMenuView::RemoveSelectedTestCasesL
+//
+// Removes marked test cases from test set.
+// ----------------------------------------------------------------------------
+//
+void CTestSetMenuView::RemoveSelectedTestCasesL()
+ {
+ TInt positionToRemove(0);
+
+ const CTestSetInfo& testSetInfo = iUIStore->TestSetL( iCurrentTestSet );
+ const RRefArray<const CTestInfo>* allCases = &testSetInfo.TestCases();
+ CEikListBox* listBox = iContainer->ListBox();
+
+ iSaveNeeded = ETrue;
+ positionToRemove = listBox->CurrentItemIndex();
+ // Remove selected test case from test set.
+ TInt ret = iUIStore->RemoveFromTestSet(iCurrentTestSet, allCases->operator[](positionToRemove));
+ iContainer->RemoveListBoxItemL(positionToRemove);
+
+ if( ret != KErrNone )
+ {
+ RDebug::Print( _L("RemoveFromTestSet failed with value: %d"), ret );
+ }
+ }
+
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/TestSetStartedCasesContainer.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,466 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetStartedCasesContainer
+* class definition.
+*
+*/
+
+// INCLUDE FILES
+
+#include <aknlists.h> // ListBox
+#include <AknIconArray.h> // CAknIconArray
+#include <badesca.h> // CDesCArray
+#include <eikclbd.h> // CColumnListBoxData
+#include <aknnotewrappers.h>
+
+#include <Stifui.rsg>
+
+//#include "UIStoreIf.h"
+//#include "UIStore.h"
+//#include "UIEngine.h"
+//#include "UIEngineContainer.h"
+
+#include <stifinternal/UIStoreIf.h>
+#include <stifinternal/UIStore.h>
+#include <stifinternal/UIEngine.h>
+#include <stifinternal/UIEngineContainer.h>
+
+#include "TestSetStartedCasesContainer.h"
+#include "ShowStartedCasesContainer.h"
+#include "Stifui.hrh"
+#include "AppUIAppUi.h"
+
+#include "MenuListBox.h"
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::ConstructL
+//
+// Symbian OS two phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
+ {
+ CreateWindowL();
+
+ iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
+
+ iListBox = CMenuListBox::NewL(ETestSetStartedCasesViewId); /*CAknSingleStyleListBox();*/
+ iListBox->SetContainerWindowL( *this );
+ iListBox->SetListBoxObserver( aListBoxObserver );
+ iListBox->ConstructL(this, EAknListBoxSelectionList);
+
+ //Create Scroller control for ListBox and set its visibility
+ iListBox->CreateScrollBarFrameL(ETrue);
+ iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
+
+ if ( iUIStore )
+ {
+
+ iListBoxModel = CStartedTestsListBoxModel::NewL( &iStartedTestsPtrs );
+ iListBox->Model()->SetItemTextArray(iListBoxModel);
+ ConstructListBoxModelL();
+ iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
+ iListBox->HandleItemAdditionL();
+
+ }
+ else
+ {
+ //User::Leave( syy?? )
+ }
+ iListBox->ActivateL();
+ ((CMenuListBox*)iListBox)->SetPreviousFocus();
+
+ SetRect(aRect);
+ ActivateL();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::ConstructListBoxModelL
+//
+// Constructs list box model without any filtering.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesContainer::ConstructListBoxModelL()
+ {
+ TInt items(0);
+ TInt index = ((CAppUIAppUi*)iCoeEnv->AppUi())->iStartedTestSet;
+
+ // Check if there is started test sets and if there is,
+ // show test set´s info.
+ if ( index != -1 )
+ {
+ const RRefArray<CStartedTestCase>* startedTestCases;
+ CStartedTestSet* startedTestSet =
+ &iUIStore->StartedTestSetL( index );
+ startedTestCases = &startedTestSet->TestCases();
+
+ const TInt KStartedCaseCount = startedTestCases->Count();
+
+ items = iStartedTestsPtrs.Count();
+ iStartedTestsPtrs.Reset(); // Remove all pointers (does not delete objects)
+ iListBox->HandleItemRemovalL();
+
+ const TInt KSelectedMode = ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
+
+ // Loop through all started cases
+ for( TInt i=0; i < KStartedCaseCount; i++ )
+ {
+ switch ( KSelectedMode )
+ {
+ case EShowAllStartedCases:
+ {
+ iStartedTestsPtrs.Append( startedTestCases->operator[](i) );
+ break;
+ }
+ case EShowOngoingCases:
+ {
+ // Note: PAUSE IS ALSO RUNNIN STATUS
+ if ( startedTestCases->operator[](i).Status() & CUIStoreIf::EStatusRunning )
+ {
+ iStartedTestsPtrs.Append( startedTestCases->operator[](i) );
+ }
+ break;
+ }
+ case EShowPassedCases:
+ {
+ if ( startedTestCases->operator[](i).Status() & CUIStoreIf::EStatusPassed )
+ {
+ iStartedTestsPtrs.Append( startedTestCases->operator[](i) );
+ }
+ break;
+ }
+ case EShowPausedCases:
+ {
+ if ( startedTestCases->operator[](i).Status() & CUIStoreIf::EStatusRunning )
+ {
+ if( startedTestCases->operator[](i).UIEngineContainer().State() == CUIEngineContainer::EPaused )
+ {
+ iStartedTestsPtrs.Append( startedTestCases->operator[](i) );
+ }
+ }
+ break;
+ }
+ case EShowFailedCases:
+ {
+ if ( startedTestCases->operator[](i).Status() & CUIStoreIf::EStatusFailed )
+ {
+ iStartedTestsPtrs.Append( startedTestCases->operator[](i) );
+ }
+ break;
+ }
+ case EShowCrashedAbortedCases:
+ {
+ if ( startedTestCases->operator[](i).Status() & CUIStoreIf::EStatusAborted
+ ||
+ startedTestCases->operator[](i).Status() & CUIStoreIf::EStatusCrashed)
+ {
+ iStartedTestsPtrs.Append( startedTestCases->operator[](i) );
+ }
+ break;
+ }
+ }
+ }
+
+ if ( items < iStartedTestsPtrs.Count() )
+ {
+ iListBox->HandleItemAdditionL();
+ }
+ else
+ {
+ iListBox->HandleItemRemovalL();
+ }
+
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::~CTestSetStartedCasesContainer
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestSetStartedCasesContainer::~CTestSetStartedCasesContainer()
+ {
+ delete iListBox;
+
+ iStartedTestsPtrs.Close(); // does not delete objects whose pointers are contained in the array
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::SizeChanged
+//
+// Called by framework when the view size is changed.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesContainer::SizeChanged()
+ {
+ if ( iListBox )
+ {
+ iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::CountComponentControls
+//
+// Gets a count of the component controls of this list box control.
+// ----------------------------------------------------------------------------
+//
+TInt CTestSetStartedCasesContainer::CountComponentControls() const
+ {
+ return 1; // return nbr of controls inside this container
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::ComponentControl
+//
+// Gets a pointer to the specified component control.
+// ----------------------------------------------------------------------------
+//
+CCoeControl* CTestSetStartedCasesContainer::ComponentControl(TInt aIndex) const
+ {
+ switch ( aIndex )
+ {
+ case 0:
+ return iListBox;
+ default:
+ return NULL;
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::Draw
+//
+// Draw a control, called by window server.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesContainer::Draw(const TRect& /*aRect*/) const
+ {
+ // CWindowGc& gc = SystemGc();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::OfferKeyEventL
+//
+// Handles key events.
+// ----------------------------------------------------------------------------
+//
+TKeyResponse CTestSetStartedCasesContainer::OfferKeyEventL(
+ const TKeyEvent& aKeyEvent, TEventCode aType)
+ {
+ if (aType != EEventKey)
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ if (iListBox)
+ {
+ return iListBox->OfferKeyEventL( aKeyEvent, aType );
+ }
+ else
+ {
+ return EKeyWasNotConsumed;
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::SelectedTestCase
+//
+// Returns reference to currently selected test case in view (listbox).
+// ----------------------------------------------------------------------------
+//
+CStartedTestCase* CTestSetStartedCasesContainer::SelectedTestCase()
+ {
+ if ( iStartedTestsPtrs.Count() > 0 )
+ {
+ return &(iStartedTestsPtrs[ iListBox->CurrentItemIndex() ]);
+ }
+ else
+ {
+ return NULL;
+ }
+/*
+ //if ( iListBox->ItemExists(0) ) // Check that list box is not empty
+ if ( ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount() ) // Check that list box is not empty
+ {
+ return &(iStartedTestsPtrs[ iListBox->CurrentItemIndex() ]);
+ }
+ else
+ {
+ return NULL;
+ }
+*/
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::DrawListBox
+//
+// Draws the list box.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesContainer::DrawListBox()
+ {
+ if ( iListBox )
+ {
+ iListBox->DrawNow();
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::HandleItemAdditionL
+//
+// Handles the addition of an item to the model.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesContainer::HandleItemAdditionL()
+ {
+ iListBox->HandleItemAdditionL();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::HandleItemRemovalL
+//
+// Handles the removal of an item from the model.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesContainer::HandleItemRemovalL()
+ {
+ //TInt itemIndexBeforeRemoval = iListBox->CurrentItemIndex();
+
+ iListBox->HandleItemRemovalL();
+
+ // HandleItemRemovalL "loses selection" if current item is removed
+ // -> we have to check it and set one item as current item to make it possible for
+ // user to select one item from items left after remove
+ if ( iListBox->CurrentItemIndex() == -1 ) // No item selected
+ if ( ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount() > 0 ) // there are items
+ SetCurrentItemIndex(0);
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::TestsInViewCount
+//
+// Returns count of test cases in view.
+// ----------------------------------------------------------------------------
+//
+TInt CTestSetStartedCasesContainer::TestsInViewCount()
+ {
+ return ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::CurrentTestCase
+//
+// Returns pointer to currently selected test case.
+// ----------------------------------------------------------------------------
+//
+CStartedTestCase* CTestSetStartedCasesContainer::CurrentTestCase()
+ {
+ return &iStartedTestsPtrs[ iListBox->CurrentItemIndex() ];
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::CurrentItemIndex
+//
+// Gets the index number of the current item in the view.
+// ----------------------------------------------------------------------------
+//
+TInt CTestSetStartedCasesContainer::CurrentItemIndex()
+ {
+ return iListBox->CurrentItemIndex();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::SetCurrentItemIndex
+//
+// Sets the current item.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesContainer::SetCurrentItemIndex(TInt aIndex)
+ {
+ TInt itemCount = ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount();
+ if ( aIndex < itemCount )
+ {
+ iListBox->SetCurrentItemIndex(aIndex);
+ }
+ else
+ {
+ iListBox->SetCurrentItemIndex(itemCount);
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::ResetListBox
+//
+// Resets the selection indices, top and current item indices,
+// the selection, and the horizontal scroll offset of this list box.
+// This function does not redraw the list box.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesContainer::ResetListBox()
+ {
+ iListBox->Reset();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::RemoveSelectedExecutionsL
+//
+// Removes items from list box.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesContainer::RemoveSelectedExecutionsL()
+ {
+ TInt indexOfRemovedExecution = 0;
+ iStartedTestsPtrs.Remove(indexOfRemovedExecution);
+ HandleItemRemovalL();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::RemoveAllExecutionsInViewL
+//
+// Removes all started test cases from list box.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesContainer::RemoveAllExecutionsInViewL()
+ {
+ TInt exutionsInViewCount = iStartedTestsPtrs.Count();
+ iStartedTestsPtrs.Reset(); //Empties the array, does not delete the objects whose pointers are contained in the array
+ HandleItemRemovalL();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesContainer::SaveActiveLine
+//
+// Makes the iListBox member save its focus position
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesContainer::SaveActiveLine()
+ {
+ ((CMenuListBox*)iListBox)->SaveFocusPosition();
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/TestSetStartedCasesView.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,485 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestSetStartedCasesView class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <eikmenub.h>
+#include <aknViewAppUi.h>
+#include <barsread.h> //TResourceReader
+#include <Stifui.rsg>
+
+//#include "UIEngineContainer.h"
+#include <stifinternal/UIEngineContainer.h>
+
+#include "Stifui.hrh"
+
+#include "TestSetStartedCasesView.h"
+#include "TestSetStartedCasesContainer.h"
+#include "AppUIAppUi.h"
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesView::ConstructL
+//
+// Symbian OS two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesView::ConstructL()
+ {
+ CView::ConstructL();
+ BaseConstructL( R_TESTSET_STARTEDCASESVIEW );
+ iFilterModule.Zero();
+ iFilterTestCaseFile.Zero();
+ iSelectedTestCase=0;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesView::~CTestSetStartedCasesView
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestSetStartedCasesView::~CTestSetStartedCasesView()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesView::Id
+//
+// Returns view´s id.
+// ----------------------------------------------------------------------------
+//
+TUid CTestSetStartedCasesView::Id() const
+ {
+ return TUid::Uid(ETestSetStartedCasesViewId);
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesView::HandleCommandL
+//
+// Handles a command.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesView::HandleCommandL(TInt aCommand)
+ {
+ TBool refreshListBox = EFalse;
+ // Handle rest possible commands
+ switch ( aCommand )
+ {
+ case ECmdShowAllStartedCases:
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode = EShowAllStartedCases;
+ refreshListBox = ETrue;
+ break;
+ }
+ case ECmdShowOngoingCases:
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode = EShowOngoingCases;
+ refreshListBox = ETrue;
+ break;
+ }
+ case ECmdShowPausedCases:
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode = EShowPausedCases;
+ refreshListBox = ETrue;
+ break;
+ }
+ case ECmdShowPassedCases:
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode = EShowPassedCases;
+ refreshListBox = ETrue;
+ break;
+ }
+ case ECmdShowFailedCases:
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode = EShowFailedCases;
+ refreshListBox = ETrue;
+ break;
+ }
+ case ECmdShowCrashedAbortedCases:
+ {
+ ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode = EShowCrashedAbortedCases;
+ refreshListBox = ETrue;
+ break;
+ }
+ case ECmdShowStatistics:
+ {
+ //EShowStatistics
+ TMessageBoxUtil::ShowNotImplementedYetL();
+ break;
+ }
+ case ECmdViewOutput:
+ {
+ ViewTestCaseOutputL();
+ break;
+ }
+ case ECmdPauseTestCase:
+ {
+ CStartedTestCase* startedTestCase = iContainer->SelectedTestCase();
+ if ( NULL != startedTestCase )
+ {
+ startedTestCase->UIEngineContainer().PauseTest();
+ }
+ break;
+ }
+ case ECmdResumeTestCase:
+ {
+ CStartedTestCase* startedTestCase = iContainer->SelectedTestCase();
+ if ( NULL != startedTestCase )
+ {
+ startedTestCase->UIEngineContainer().ResumeTest();
+ }
+ break;
+ }
+ case ECmdAbortTestCase:
+ {
+ CStartedTestCase* startedTestCase = iContainer->SelectedTestCase();
+ if ( NULL != startedTestCase )
+ {
+ startedTestCase->UIEngineContainer().CancelTest();
+ }
+ break;
+ }
+ case EAknSoftkeyOk:
+ {
+ iEikonEnv->InfoMsg( _L("TestCase Menu ok") );
+ break;
+ }
+ case EAknSoftkeyBack:
+ {
+ // Remove possible filterings so that they does not affect when coming again to this view
+ iFilterModule.Zero();
+ iFilterTestCaseFile.Zero();
+ iSelectedTestCase=0; //Reset selected test case information
+ AppUi()->HandleCommandL(EAppUIGoBack);
+ break;
+ }
+ default:
+ {
+ AppUi()->HandleCommandL( aCommand );
+ break;
+ }
+ }
+
+ if ( refreshListBox )
+ {
+ RefreshNaviTitleL();
+ iContainer->ConstructListBoxModelL();
+ iContainer->DrawListBox();
+ }
+
+ }
+
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesView::RefreshNaviTitleL
+//
+// Refreshes view name shown in the navi pane.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesView::RefreshNaviTitleL()
+ {
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
+ TResourceReader reader;
+
+ switch ( ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode )
+ {
+ case EShowAllStartedCases:
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED);
+ break;
+ case EShowOngoingCases:
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_ONGOING);
+ break;
+ case EShowPausedCases:
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_PAUSED);
+ break;
+ case EShowPassedCases:
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_PASSED);
+ break;
+ case EShowFailedCases:
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_FAILED);
+ break;
+ case EShowCrashedAbortedCases:
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_CRASHED_ABORTED);
+ break;
+ default:
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_TESTSET);
+ break;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ iNaviDecorator = np->CreateNavigationLabelL( reader );
+ CleanupStack::PopAndDestroy(); // resource reader
+ np->PushL(*iNaviDecorator);
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesView::HandleListBoxEventL
+//
+// Handles listbox events.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesView::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
+ {
+ if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
+ {
+ ViewTestCaseOutputL();
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesView::ViewTestCaseOutput
+//
+// Shows outputs of test case which is selected in Container.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesView::ViewTestCaseOutputL()
+ {
+ iSelectedTestCase = iContainer->CurrentItemIndex();
+
+ // Sets index of selected test case to AppUi
+ ( ( CAppUIAppUi* )AppUi() )->SetStartedTestCase( iContainer->CurrentTestCase() );
+
+ AppUi()->HandleCommandL(ECmdViewOutput);
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesView::HandleClientRectChange
+//
+// Handles client rect changes.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesView::HandleClientRectChange()
+ {
+ if ( iContainer )
+ {
+ iContainer->SetRect( ClientRect() );
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesView::DoActivateL
+//
+// Initializes view when activated.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/)
+ {
+ if (!iContainer)
+ {
+ iContainer = new (ELeave) CTestSetStartedCasesContainer;
+ iContainer->SetMopParent(this);
+ iContainer->ConstructL( ClientRect(), this );
+ AppUi()->AddToStackL( *this, iContainer );
+ }
+
+ if ( iSelectedTestCase )
+ iContainer->SetCurrentItemIndex(iSelectedTestCase);
+
+ iContainer->DrawListBox();
+
+ RefreshNaviTitleL();
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesView::DoDeactivate
+//
+// Deactivates view.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesView::DoDeactivate()
+ {
+ if ( iContainer )
+ {
+ iContainer->SaveActiveLine();
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesView::DynInitMenuPaneL
+//
+// Initializes menu pane.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesView::DynInitMenuPaneL(
+ TInt aResourceId, CEikMenuPane* aMenuPane)
+ {
+
+ // options menu
+ if ( R_TESTSET_STARTEDCASESVIEW_MENU == aResourceId )
+ {
+ CStartedTestCase* startedTestCase = iContainer->SelectedTestCase();
+ if ( NULL != startedTestCase )
+ {
+ switch ( startedTestCase->Status() )
+ {
+ // test case running
+ case CUIStoreIf::EStatusRunning:
+ {
+ switch ( startedTestCase->UIEngineContainer().State() )
+ {
+ case CUIEngineContainer::ERunning:
+ case CUIEngineContainer::EPaused:
+ {
+ aMenuPane->SetItemDimmed( ECmdShowSetMenu, EFalse );
+ break;
+ }
+ //case CUIEngineContainer::ENotStarted:
+ //case CUIEngineContainer::EExecuted:
+ //case CUIEngineContainer::EFinished:
+ default:
+ {
+ aMenuPane->SetItemDimmed( ECmdShowSetMenu, ETrue );
+ }
+ }
+ break;
+ }
+
+ // test case not running
+ //case CUIStoreIf::EStatusPassed:
+ //case CUIStoreIf::EStatusFailed:
+ //case CUIStoreIf::EStatusAborted:
+ //case CUIStoreIf::EStatusExecuted
+ default:
+ {
+ aMenuPane->SetItemDimmed( ECmdShowSetMenu, ETrue );
+ }
+ }
+ }
+ else
+ {
+ aMenuPane->SetItemDimmed( ECmdViewOutput, ETrue );
+ aMenuPane->SetItemDimmed( ECmdShowSetMenu, ETrue );
+ }
+ }
+
+ // test case control menu
+ if ( R_TESTCASE_CONTROL_SUBMENU == aResourceId )
+ {
+ CStartedTestCase* startedTestCase = iContainer->SelectedTestCase();
+
+ if ( NULL != startedTestCase )
+ {
+ if ( startedTestCase->Status() == CUIStoreIf::EStatusRunning )
+ {
+ switch ( startedTestCase->UIEngineContainer().State() )
+ {
+ case CUIEngineContainer::ERunning:
+ {
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, EFalse );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, EFalse );
+ break;
+ }
+ case CUIEngineContainer::EPaused:
+ {
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, EFalse );
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, EFalse );
+ break;
+ }
+ //case CUIEngineContainer::ENotStarted:
+ //case CUIEngineContainer::EExecuted:
+ //case CUIEngineContainer::EFinished:
+ default:
+ {
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
+ break;
+ }
+ }
+ }
+ else
+ {
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
+ }
+ }
+ else
+ {
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
+ }
+ }
+
+ }
+
+// ----------------------------------------------------------------------------
+// CTestSetStartedCasesView::TestCaseStateChangedL
+//
+// Handles status changes of test cases in view.
+// ----------------------------------------------------------------------------
+//
+void CTestSetStartedCasesView::TestCaseStateChangedL()
+ {
+ if ( iContainer )
+ {
+
+ //CStartedTestCase* currentlySelectedTest = iContainer->SelectedTestCase();
+
+ TInt numOfTestsInViewBeforeStateChange = iContainer->TestsInViewCount();
+
+ //((CStartedTestsListBoxModel*)iContainer->iListBox->Model())->MdcaCount();
+
+ iContainer->ConstructListBoxModelL();
+
+ // Check if filtering by module or by test case file is selected
+ /*
+ if ( iFilterModule.Length() )
+ {
+ iContainer->FilterCasesByModuleL(iFilterModule);
+ }
+ else if ( iFilterTestCaseFile.Length() )
+ {
+ iContainer->FilterCasesByTCFileNameL(iFilterTestCaseFile);
+ }
+ */
+
+ TInt numOfTestsInViewAfterStateChange = iContainer->TestsInViewCount();
+ //((CStartedTestsListBoxModel*)iContainer->iListBox->Model())->MdcaCount();
+
+ if ( numOfTestsInViewAfterStateChange >= numOfTestsInViewBeforeStateChange )
+ iContainer->HandleItemAdditionL();
+ else
+ iContainer->HandleItemRemovalL();
+
+ iContainer->DrawListBox();
+
+ }
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/Testmodulesmenuview.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,280 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CTestModulesMenuView class
+* definition.
+*
+*/
+
+// INCLUDE FILES
+#include <aknViewAppUi.h>
+#include <Stifui.rsg>
+
+#include <barsread.h> //TResourceReader
+#include "TestModulesMenuView.h"
+#include "TestModulesMenuContainer.h"
+#include "Stifui.hrh"
+
+#include "AppUIAppUi.h" // For ShowNotImplementedYet() method
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CTestModulesMenuView::ConstructL
+//
+// Symbian OS two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CTestModulesMenuView::ConstructL()
+ {
+ CView::ConstructL();
+ BaseConstructL( R_APPUI_TESTMODULESMENUVIEW );
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuView::~CTestCaseOutputView
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CTestModulesMenuView::~CTestModulesMenuView()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuView::Id
+//
+// Returns view´s id.
+// ----------------------------------------------------------------------------
+//
+TUid CTestModulesMenuView::Id() const
+ {
+ return TUid::Uid(ETestModulesMenuViewId); //KTestCaseMenuViewId;
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuView::HandleCommandL
+//
+// Handles a command.
+// ----------------------------------------------------------------------------
+//
+void CTestModulesMenuView::HandleCommandL(TInt aCommand)
+ {
+ switch ( aCommand )
+ {
+ case EAknSoftkeyOk:
+ {
+ iEikonEnv->InfoMsg( _L("TestCase Menu ok") );
+ break;
+ }
+ case EAknSoftkeyBack:
+ {
+ AppUi()->HandleCommandL(EAppUIGoBack);
+ break;
+ }
+ // Next is removed from Stifui.rss file in
+ // RESOURCE MENU_PANE r_appui_testmodulesmenuview_menu's
+ // items section. If want back to use remeve comment there
+ //case ECmdOpenModule:
+ // {
+ //TFileName fileName;
+ //AknCommonDialogs::RunSelectDlgLD (fileName,
+ // R_MEMORY_SELECTION_DIALOG,
+ // R_FILE_SELECTION_DIALOG
+ //
+ //);
+ // ShowNotImplementedYet();
+ // break;
+ // }
+ case ECmdAddModule:
+ {
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->LoadAllModules();
+ if( KErrNone != ret )
+ {
+ iEikonEnv->InfoMsg( _L("Module adding fails!") );
+ break;
+ }
+
+ AppUi()->HandleCommandL( EAppUIGoBack );
+ //ShowNotImplementedYet();
+ break;
+ }
+ case ECmdRemoveModule:
+ {
+ TInt moduleNumber = iContainer->CurrentItemIndex();
+ RRefArray<TDesC> allModules;
+ TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( allModules );
+ if( KErrNone != ret )
+ {
+ allModules.Reset();
+ allModules.Close();
+ User::Leave( ret );
+ }
+ // No modules exist...break...
+ if( allModules.Count() == 0 )
+ {
+ iEikonEnv->InfoMsg( _L("No modules available!") );
+ allModules.Reset();
+ allModules.Close();
+ break;
+ }
+ // Module found...remove module...
+ ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->RemoveTestModule(
+ allModules[ moduleNumber ] );
+ if( KErrNone != ret )
+ {
+ User::Leave( ret );
+ }
+ allModules.Reset();
+ allModules.Close();
+
+ //iContainer->UpdateView();
+ AppUi()->HandleCommandL( EAppUIGoBack );
+ //ShowNotImplementedYet();
+ break;
+ }
+ default:
+ {
+ AppUi()->HandleCommandL( aCommand );
+ break;
+ }
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuView::DynInitMenuPaneL
+//
+// Initializes menu pane.
+// ----------------------------------------------------------------------------
+//
+void CTestModulesMenuView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* /* aMenuPane */)
+ {
+
+ if (R_APPUI_TESTMODULESMENUVIEW_MENU == aResourceId)
+ {
+ /*switch ( iData->StartedCaseInOutputView()->State() )
+ {
+ case ENotStarted:
+ {
+ aMenuPane->SetItemDimmed( ECmdOpenModule, ETrue );
+ aMenuPane->SetItemDimmed( ECmdAddModule, ETrue );
+ aMenuPane->SetItemDimmed( ECmdRemoveModule, ETrue );
+ break;
+ }
+ case ERunning:
+ {
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ break;
+ }
+ case EPaused:
+ {
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ break;
+ }
+ case EPassed:
+ case EFailed:
+ case EAborted:
+ case EExecuted:
+ {
+ aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
+ aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
+ break;
+ }
+ }*/
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuView::HandleClientRectChange
+//
+// Handles client rect changes.
+// ----------------------------------------------------------------------------
+//
+void CTestModulesMenuView::HandleClientRectChange()
+ {
+ if ( iContainer )
+ {
+ iContainer->SetRect( ClientRect() );
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuView::HandleListBoxEventL
+//
+// Handles listbox events.
+// ----------------------------------------------------------------------------
+//
+void CTestModulesMenuView::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
+ {
+ if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
+ {
+ // Open or edit test module or ???
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuView::DoActivateL
+//
+// Initializes view when activated.
+// ----------------------------------------------------------------------------
+//
+void CTestModulesMenuView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/)
+ {
+ if (!iContainer)
+ {
+ iContainer = new (ELeave) CTestModulesMenuContainer;
+ iContainer->SetMopParent(this);
+ iContainer->ConstructL( ClientRect(), this);
+ AppUi()->AddToStackL( *this, iContainer );
+ }
+ CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
+ CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
+
+ TResourceReader reader;
+ iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_MODULES);
+ iNaviDecorator = np->CreateNavigationLabelL( reader );
+ CleanupStack::PopAndDestroy(); // resource reader
+ np->PushL(*iNaviDecorator);
+ }
+
+// ----------------------------------------------------------------------------
+// CTestModulesMenuView::DoDeactivate
+//
+// Deactivates view.
+// ----------------------------------------------------------------------------
+//
+void CTestModulesMenuView::DoDeactivate()
+ {
+ if ( iContainer )
+ {
+ iContainer->SaveActiveLine();
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ delete iContainer;
+ iContainer = NULL;
+ }
+ delete iNaviDecorator;
+ iNaviDecorator = NULL;
+ }
+
+// End of File
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/UIStoreHandler.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,140 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This module contains implementation of
+* CUIStoreHandler class member functions.
+*
+*/
+
+// INCLUDE FILES
+#include "UIStoreHandler.h"
+
+// EXTERNAL DATA STRUCTURES
+// None
+
+// EXTERNAL FUNCTION PROTOTYPES
+// None
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// LOCAL CONSTANTS AND MACROS
+// None
+
+// MODULE DATA STRUCTURES
+// None
+
+// LOCAL FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+// None
+class CUIStore;
+
+// ==================== LOCAL FUNCTIONS =======================================
+// None
+
+// ================= MEMBER FUNCTIONS =========================================
+// ----------------------------------------------------------------------------
+// CUIStoreHandler::CUIStoreHandler
+//
+// Default constructor.
+// C++ default constructor can NOT contain any code, that might leave.
+// ----------------------------------------------------------------------------
+//
+CUIStoreHandler::CUIStoreHandler( CAppUIAppUi* aAppUIAppUI ) :
+ iAppUIAppUI( aAppUIAppUI ),
+ iExecutedTestCaseCount( 0 )
+ {
+
+ }
+
+// ----------------------------------------------------------------------------
+// CUIStoreHandler::ConstructL
+//
+// Symbian OS second phase constructor.
+// Symbian OS default constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CUIStoreHandler::ConstructL()
+ {
+ CUIStoreIf::ConstructL();
+
+ }
+
+// ----------------------------------------------------------------------------
+// CUIStoreHandler::NewL
+//
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CUIStoreHandler* CUIStoreHandler::NewL( CAppUIAppUi* aAppUIAppUI )
+ {
+ // Create CUIStoreHandler object uistorehandler
+ CUIStoreHandler* uistorehandler = new (ELeave) CUIStoreHandler( aAppUIAppUI );
+
+ CleanupStack::PushL( uistorehandler );
+ uistorehandler->ConstructL();
+ CleanupStack::Pop( uistorehandler );
+
+ return uistorehandler;
+
+ }
+
+// ----------------------------------------------------------------------------
+// CUIStoreHandler::~CUIStoreHandler
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CUIStoreHandler::~CUIStoreHandler()
+ {
+
+ }
+
+// ----------------------------------------------------------------------------
+// CUIStoreHandler::Update
+//
+// Receives output update notify from started test case.
+// Checks if that test case is currently in output view then
+// sends notification to AppUI which handles notification onward.
+// ----------------------------------------------------------------------------
+//
+void CUIStoreHandler::Update( CStartedTestCase* aTestCase, TInt aStatus )
+ {
+ _LIT( KErrorMsg, "Error during output update" );
+ TRAPD(err,iAppUIAppUI->OutputUpdateL( aTestCase, aStatus ));
+ if ( err != KErrNone )
+ {
+ RDebug::Print( KErrorMsg );
+ }
+
+ //iAppUi->OutputUpdate();
+ //if( aStatus == EPrintUpdate )
+ // {
+ //iAppUIAppUI->OutputUpdate( aTestCase );
+ // }
+ //else
+ // {
+ //iAppUIAppUI->TestCaseStateChanged();
+ // }
+
+ }
+
+// ================= OTHER EXPORTED FUNCTIONS =================================
+// None
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/stifui/src/View.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,100 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains CView class definition.
+*
+*/
+
+// INCLUDE FILES
+#include <aknViewAppUi.h>
+#include <Stifui.rsg>
+#include "AppUIAppUi.h"
+#include "View.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+// ----------------------------------------------------------------------------
+// CView::ConstructL
+//
+// Symbian OS two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+void CView::ConstructL()
+ {
+ iUIStore = ( (CAppUIAppUi*)AppUi() )->UIStoreHandler();
+ }
+
+// ----------------------------------------------------------------------------
+// CView::~CView
+//
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CView::~CView()
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// CView::Id
+//
+// Returns view´s id.
+// ----------------------------------------------------------------------------
+//
+TUid CView::Id() const
+ {
+ return TUid::Uid(0);
+ }
+
+// ----------------------------------------------------------------------------
+// CView::HandleCommandL
+//
+// Handles a command.
+// ----------------------------------------------------------------------------
+//
+void CView::HandleCommandL(TInt /*aCommand*/)
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// CView::HandleClientRectChange
+//
+// Handles client rect changes.
+// ----------------------------------------------------------------------------
+//
+void CView::HandleClientRectChange()
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// CView::DoActivateL
+//
+// Initializes view when activated.
+// ----------------------------------------------------------------------------
+//
+void CView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/ )
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// CView::DoDeactivate
+//
+// Deactivates view.
+// ----------------------------------------------------------------------------
+//
+void CView::DoDeactivate()
+ {
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/data/UITestServerStarter.rls Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,23 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains name of uitestserverstarter.
+*
+*/
+
+// LOCALISATION STRINGS
+
+// Caption string for app.
+#define qtn_caption_string "UITestServerStarter"
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/data/UITestServerStarter.rss Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,136 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file defines UITestServerStarter resources.
+*
+*/
+
+// RESOURCE IDENTIFIER
+NAME UITE // 4 letter ID
+
+
+// INCLUDES
+#include <eikon.rh>
+#include <avkon.rsg>
+#include <avkon.rh>
+#include <appinfo.rh>
+#include "UITestServerStarter.hrh"
+#include "UITestServerStarter.rls"
+
+// RESOURCE DEFINITIONS
+// -----------------------------------------------------------------------------
+//
+// Define the resource file signature
+// This resource should be empty.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE
+ {
+ }
+
+// -----------------------------------------------------------------------------
+//
+// Default Document Name
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF r_default_document_name
+ {
+ buf="UITE";
+ }
+
+// -----------------------------------------------------------------------------
+//
+// Define default menu and CBA key.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE EIK_APP_INFO
+ {
+ //menubar = r_menubar;
+ cba = R_AVKON_SOFTKEYS_EXIT;
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// r_menubar
+// Main menubar
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_menubar
+ {
+ titles =
+ {
+ MENU_TITLE { menu_pane = r_menu; }
+ };
+ }
+
+
+// -----------------------------------------------------------------------------
+//
+// r_menu
+// Menu for "Options"
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_PANE r_menu
+ {
+ items =
+ {
+ MENU_ITEM
+ {
+ command = EAknSoftkeyExit;
+ txt = qtn_exit;
+ }
+ };
+ }
+
+// -----------------------------------------------------------------------------
+//
+// About dialog resource.
+//
+// -----------------------------------------------------------------------------
+//
+// None
+
+// -----------------------------------------------------------------------------
+//
+// Resources for messages.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE TBUF32 r_caption_string { buf=qtn_caption_string; }
+
+// ----------------------------------------------------------------------------
+//
+// r_localisable_app_info
+//
+// ----------------------------------------------------------------------------
+//
+RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
+ {
+ short_caption = qtn_caption_string;
+ caption_and_icon =
+ CAPTION_AND_ICON_INFO
+ {
+ caption = qtn_caption_string;
+
+ number_of_icons = 1;
+ icon_file = "\\resource\\apps\\UITestServerStarter.mif";
+ };
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/data/UITestServerStarter_reg.rss Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file defines UITestServerStarter resources.
+*
+*/
+
+#include "UITestServerStarter.hrh"
+#include "UITestServerStarter.rls"
+#include <appinfo.rh>
+#include <UITestServerStarter.rsg>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 _UID3
+
+RESOURCE APP_REGISTRATION_INFO
+ {
+ app_file="UITestServerStarter";
+// localisable_resource_file = qtn_loc_resource_file_1;
+// localisable_resource_id = R_LOCALISABLE_APP_INFO;
+ hidden=KAppIsHidden;
+ embeddability=KAppNotEmbeddable;
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/group/UITestServerStarter.mmp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: MMP file of UITestServerStarter.
+*
+*/
+
+#include <platform_paths.hrh>
+
+SMPSAFE
+
+TARGET UITestServerStarter.exe
+TARGETTYPE exe
+UID 0x100039CE 0x2000F8E8
+VENDORID 0x101FB657
+SECUREID 0x2000F8E8
+CAPABILITY ALL -TCB
+
+START RESOURCE ../data/UITestServerStarter.rss
+ HEADER
+ TARGETPATH resource/apps
+END
+
+SOURCEPATH ../data
+START RESOURCE UITestServerStarter_reg.rss
+ DEPENDS uitestserverstarter.rsg
+ TARGETPATH /private/10003a3f/apps
+END
+
+SOURCEPATH ../src
+
+SOURCE TestServerThreadStarter.cpp
+SOURCE UITestServerStarter.cpp
+SOURCE UITestServerStarterAppView.cpp
+SOURCE UITestServerStarterAppUi.cpp
+SOURCE AknUiEnvProxy.cpp
+SOURCE EventUtil.cpp
+SOURCE UITestServerStarterApplication.cpp
+SOURCE UITestServerStarterDocument.cpp
+SOURCE UITestServerStarterAppContainer.cpp
+
+USERINCLUDE ../inc
+
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY euser.lib
+LIBRARY apparc.lib
+LIBRARY cone.lib
+LIBRARY eikcore.lib
+LIBRARY avkon.lib
+LIBRARY commonengine.lib
+LIBRARY efsrv.lib
+LIBRARY estor.lib
+LIBRARY aknnotify.lib
+LIBRARY hlplch.lib
+LIBRARY apgrfx.lib
+LIBRARY ws32.lib
+LIBRARY aknskins.lib
+LIBRARY aknskinsrv.lib
+
+LIBRARY stiftestserver.lib
+
+START WINS
+// ?wins_specific_information
+END
+
+START MARM
+// ?marm_specific_information
+END
+
+/* Test Server requires large stack. In case of change update also thread creation parameters
+ in "void CTestServerThreadStarter::RunL" method.
+*/
+EPOCSTACKSIZE 40960
+EPOCHEAPSIZE 0x001000 0x400000
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/group/bld.inf Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: bld.inf build information for UITestServerStarter.
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+// Specify the platforms your component needs to be built for here.
+// ARM4 not supported in SDK
+
+ DEFAULT
+
+
+PRJ_EXPORTS
+// None
+
+PRJ_TESTEXPORTS
+// None
+
+PRJ_MMPFILES
+
+ UITestServerStarter.mmp
+
+PRJ_TESTMMPFILES
+// None
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/inc/AknUiEnvProxy.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,166 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains the header file of the Akn UI
+* Proxy class implementations.
+*
+*/
+
+#ifndef AKNUIENVPROXY_H_
+#define AKNUIENVPROXY_H_
+
+// INCLUDES
+#include <stifinternal/UiEnvProxy.h>
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// DATA TYPES
+// None
+
+// FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+class CUITestServerStarterAppUi;
+
+// CLASS DECLARATION
+
+// DESCRIPTION
+// Akn implementation of UI Proxy interface.
+class CAknUiEnvProxy: public CUiEnvProxy
+ {
+ public: // Enumerations
+ // None
+
+ private: // Enumerations
+ // None
+
+ public: // Constructors and destructor
+ /**
+ * C++ destructor.
+ */
+ ~CAknUiEnvProxy();
+
+ public: // New functions
+ /**
+ * NewL is first phase of two-phased constructor.
+ */
+ static CAknUiEnvProxy* NewL( CUITestServerStarterAppUi* aAppUi );
+
+ public: // Functions from base classes
+
+ /**
+ * Parses key code.
+ */
+ virtual TInt ParseKeyCode( const TDesC& aKeyCodeName, TUint& aKeyCode ) const;
+
+ /**
+ * Parses key scan code.
+ */
+ virtual TInt ParseKeyScanCode( const TDesC& aKeyScanCodeName, TInt& aKeyScanCode ) const;
+
+ /**
+ * Parses key modifier.
+ */
+ virtual TInt ParseModifier( const TDesC& aModifierName, TUint& aModifier ) const;
+
+ /**
+ * Parse pointer event type
+ */
+ virtual TInt ParsePointerEventType( const TDesC& aPointerEventTypeName, TUint& aPointerEventType ) const;
+
+ /**
+ * Brings UI control container to foreground.
+ */
+ virtual void BringToForeground();
+
+ /**
+ * Sends UI control container to background.
+ */
+ virtual void SendToBackground();
+
+ /**
+ * Sends local key event to UI control.
+ */
+ virtual void PressKeyL( TRequestStatus* aStatus, TUint aKeyCode, TInt aKeyScanCode = 0,
+ TUint aKeyModifiers = 0, TInt aKeyRepeats = 0 );
+
+ /**
+ * Sends global key event to UI control.
+ */
+ virtual void PressKeyL( TUint aKeyCode, TInt aKeyScanCode = 0,
+ TUint aKeyModifiers = 0, TInt aKeyRepeats = 0 );
+
+ /**
+ * Sends text to UI control.
+ */
+ virtual void TypeTextL( TRequestStatus* aStatus, const TDesC& aText );
+
+ /**
+ * Sends global text to UI control.
+ */
+ virtual void TypeTextL( const TDesC& aText );
+
+ /**
+ * Send pointer event
+ */
+ virtual void SendPointerEventL( TUint aType, const TPoint& aPosition );
+
+ /**
+ * Send local pointer event
+ */
+ virtual void SendPointerEventL( TRequestStatus* aStatus, TUint aType, const TPoint& aPosition );
+
+ protected: // New functions
+ // None
+
+ protected: // Functions from base classes
+ // None
+
+ private: // New functions
+ /**
+ * C++ default constructor.
+ */
+ CAknUiEnvProxy();
+
+ /**
+ * By default Symbian OS constructor is private.
+ */
+ void ConstructL( CUITestServerStarterAppUi* aAppUi );
+
+ public: //Data
+ // None
+
+ protected: // Data
+ // None
+
+ private: // Data
+ CUITestServerStarterAppUi* iAppUi; // Pointer to AppUi
+
+ public: // Friend classes
+ // None
+
+ protected: // Friend classes
+ // None
+
+ private: // Friend classes
+ // None
+};
+
+#endif // AKNUIENVPROXY_H_
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/inc/EventUtil.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains TEventUtil class declaration.
+*
+*/
+
+#ifndef EVENTUTIL_H_
+#define EVENTUTIL_H_
+
+// INCLUDES
+#include <e32base.h>
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// DATA TYPES
+// None
+
+// FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+// None
+
+// CLASS DECLARATION
+
+// DESCRIPTION
+// Utility class for key codes parsing.
+class TEventUtil
+ {
+ private: // Enumerations
+ // none
+
+ public: // Enumerations
+ enum TCustomPointerEventType { EButton1 = 1000, EButton2, EButton3 };
+
+ public: // Constructors and destructor
+
+ public: // Constructors and destructor
+
+ public: // New functions
+ /**
+ * Returns descriptive key code name.
+ */
+ static TPtrC GetKeyCodeName( TUint aKeyCode );
+
+ /**
+ * Parses key code.
+ */
+ static TInt ParseKeyCode( const TDesC& aKeyCodeName, TUint& aKeyCode );
+
+ /**
+ * Returns descriptive key scan code name.
+ */
+ static TPtrC GetKeyScanCodeName( TInt aKeyScanCode );
+
+ /**
+ * Parses key scan code.
+ */
+ static TInt ParseKeyScanCode( const TDesC& aKeyScanCodeName, TInt& aKeyScanCode );
+
+ /**
+ * Returns descriptive key modifier name.
+ */
+ static TPtrC GetModifierName( TUint aModifier );
+
+ /**
+ * Parses key modifier.
+ */
+ static TInt ParseModifier( const TDesC& aModifierName, TUint& aModifier );
+
+ /**
+ * Parses pointer event type.
+ */
+ static TInt ParsePointerEventType( const TDesC& aPointerEventTypeName, TUint& aPointerEventType );
+
+ public: // Functions from base classes
+
+ protected: // New functions
+
+ protected: // Functions from base classes
+
+ private: // New functions
+
+ public: // Data
+
+ protected: // Data
+
+ private: // Data
+
+ public: // Friend classes
+
+ protected: // Friend classes
+
+ private: // Friend classes
+
+ };
+
+#endif /*EVENTUTIL_H_*/
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/inc/TestServerThreadStarter.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,132 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains the header file of the
+* TestServerThreadStarter class.
+*
+*/
+
+
+#ifndef TESTSERVERTHREADSTARTER_H_
+#define TESTSERVERTHREADSTARTER_H_
+
+// INCLUDES
+#include "e32base.h"
+
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// DATA TYPES
+// None
+
+// FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+class CTestThreadContainerRunnerFactory;
+
+// CLASS DECLARATION
+
+// DESCRIPTION
+// Class used to create thread in which testserver execution code is placed.
+class CTestServerThreadStarter: public CActive
+ {
+ public: // Enumerations
+ // None
+
+ private: // Enumerations
+ // None
+
+ public: // Constructors and destructor
+ /**
+ * C++ destructor.
+ */
+ ~CTestServerThreadStarter();
+
+ public: // New functions
+ /**
+ * NewL is first phase of two-phased constructor.
+ */
+ static CTestServerThreadStarter* NewL();
+
+ /**
+ * Performs testserver execution request.
+ */
+ TInt RunTestServerThread( CTestThreadContainerRunnerFactory* aTestThreadContainerRunnerFactory );
+ public: // Functions from base classes
+ /**
+ * RunL derived from CActive handles the completed requests.
+ */
+ void RunL();
+
+ /**
+ * DoCancel derived from CActive handles the Cancel.
+ */
+ void DoCancel();
+
+ protected: // New functions
+ // None
+
+ protected: // Functions from base classes
+ // None
+
+ private: // New functions
+ /**
+ * Thread function in which testserver execution code is placed.
+ */
+ static TInt TestServerStarterThreadFunction( TAny* aParameters );
+
+ /**
+ * C++ default constructor.
+ */
+ CTestServerThreadStarter();
+
+ /**
+ * By default Symbian OS constructor is private.
+ */
+ void ConstructL();
+
+ public: //Data
+ // None
+
+ protected: // Data
+ // None
+
+ private: // Data
+ RTimer iTimer; // Timer which complets testserver execution request
+ CTestThreadContainerRunnerFactory* iTestThreadContainerRunnerFactory; // Pointer to test thread container
+ // runner factory passed as a parameter
+ // to function which executes testserver
+ TThreadId iMainThreadId; // UITestServerStarter main thread id
+ TInt iReturnCode; // TestServer execution return code
+ RSemaphore iServerThreadStartedSemaphore; // Semaphore which indicates that testserver execution thread
+ // was successfully created
+ public: // Friend classes
+ // None
+
+ protected: // Friend classes
+ // None
+
+ private: // Friend classes
+ // None
+ };
+
+
+
+#endif // TESTSERVERTHREADSTARTER_H_
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/inc/UITestServerStarter.hrh Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,23 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains UID3 definition.
+*
+*/
+
+#ifndef __UITESTSERVERSTARTER_HRH__
+#define __UITESTSERVERSTARTER_HRH__
+
+#define _UID3 0x2000F8E8
+
+#endif // __UITESTSERVERSTARTER_HRH__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/inc/UITestServerStarterAppContainer.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,138 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains the header file of the
+* UITestServerStarter AppUi container class.
+*
+*/
+
+#ifndef UITESTSERVERSTARTERAPPCONTAINER_H_
+#define UITESTSERVERSTARTERAPPCONTAINER_H_
+
+// INCLUDES
+#include <coecntrl.h>
+#include <coemop.h>
+
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// DATA TYPES
+// None
+
+// FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+class CAknsBasicBackgroundControlContext;
+
+// CLASS DECLARATION
+
+// DESCRIPTION
+// UITestServerStarter standard AppUi container class.
+class CUITestServerStarterAppContainer: public CCoeControl
+ {
+ public: // Enumerations
+ // None
+
+ private: // Enumerations
+ // None
+
+ public: // Constructors and destructor
+ /**
+ * Virtual Destructor.
+ */
+ ~CUITestServerStarterAppContainer();
+
+ private: // Constructors and destructor
+ /**
+ * C++ default constructor.
+ */
+ CUITestServerStarterAppContainer();
+
+ /**
+ * Perform the second phase construction of a
+ * CUITestServerStarterAppView object.
+ */
+ void ConstructL( const TRect& aRect );
+
+ public: // New functions
+ /**
+ * Two-phased constructor.
+ * Create a CUITestServerStarterAppContainer object, which will draw itself to aRect.
+ */
+ static CUITestServerStarterAppContainer* NewL( const TRect& aRect );
+
+ /**
+ * Two-phased constructor.
+ * Create a CUITestServerStarterAppContainer object, which will draw itself
+ */
+ static CUITestServerStarterAppContainer* NewLC( const TRect& aRect );
+
+
+ /**
+ * This function is used to allow controls to ask their owners
+ * for access to other objects that they own
+ */
+ TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
+ public: // Functions from base classes
+ // None
+
+ protected: // New functions
+ // None
+
+ protected: // Functions from base classes
+ // None
+
+ private: // New functions
+ // None
+
+ private: // Functions from base classes
+
+ /**
+ * Draws the control
+ */
+ void Draw( const TRect& aRect ) const;
+
+ /**
+ * Responds to changes to the size and position of the
+ * contents of this control
+ */
+ void SizeChanged();
+
+ //void HandleResourceChange( TInt aType );
+ public: //Data
+ // None
+
+ protected: // Data
+ // None
+
+ private: // Data
+ CAknsBasicBackgroundControlContext* iBgContext; // Skin background object context pointer
+
+ public: // Friend classes
+ // None
+
+ protected: // Friend classes
+ // None
+
+ private: // Friend classes
+ // None
+ };
+
+#endif /*UITESTSERVERSTARTERAPPCONTAINER_H_*/
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/inc/UITestServerStarterAppUi.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,172 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains the header file of the
+* UITestServerStarter AppUi class
+*
+*/
+
+#ifndef UITESTSERVERSTARTERAPPUI_H_
+#define UITESTSERVERSTARTERAPPUI_H_
+
+// INCLUDES
+#include <aknViewAppUi.h>
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// DATA TYPES
+// None
+
+// FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+class CUITestServerStarterAppView;
+
+// CLASS DECLARATION
+
+// DESCRIPTION
+// UITestServerStarter AppUi class
+class CUITestServerStarterAppUi : public CAknViewAppUi
+ {
+ public: // Enumerations
+ // None
+
+ private: // Enumerations
+ /**
+ * Currently handled event type.
+ */
+ enum TEventType {
+ ENone, // None
+ EPressKey, // Press key event
+ ETypeText, // Type text event
+ EPointerEvent, // Pointer event
+ };
+
+ public: // Constructors and destructor
+ /**
+ * C++ default constructor. This needs to be public due to
+ * the way the framework constructs the AppUi
+ */
+ CUITestServerStarterAppUi();
+
+ /**
+ * Virtual Destructor.
+ */
+ virtual ~CUITestServerStarterAppUi();
+
+ public: // New functions
+ /**
+ * ConstructL.
+ * 2nd phase constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Prepares AppUi to recive type text event
+ */
+ virtual void PrepareToTypeText( TInt aTextLength );
+
+ /**
+ * Prepares AppUi to recive key press event
+ */
+ virtual void PrepareToPressKey();
+
+ /**
+ * Prepares AppUi to recive pointer event
+ */
+ virtual void PrepareToPointerEvent();
+
+ /**
+ * Notifies that key press event was recived.
+ */
+ virtual void KeyPressHandled();
+
+ /**
+ * Notifies that text type event was recived.
+ */
+ virtual void TextTypeHandled();
+
+ /**
+ * Notifies that pointer event was recived.
+ */
+ virtual void PointerEventHandled();
+
+ /**
+ * Requests notification when key press event is handled.
+ */
+ virtual void NotifyAboutHandledKeyPress( TRequestStatus* aStatus );
+
+ /**
+ * Requests notification when text type event is handled.
+ */
+ virtual void NotifyAboutHandledTextType( TRequestStatus* aStatus );
+
+ /**
+ * Requests notification when pointer event is handled.
+ */
+ virtual void NotifyAboutHandledPointerEvent( TRequestStatus* aStatus );
+
+ public: // Functions from base classes
+ /**
+ * Overwritten version of CCoeAppUi::HandleWsEventL() method.
+ */
+ void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );
+
+ protected: // New functions
+ // None
+
+ protected: // Functions from base classes
+ // None
+
+ private: // New functions
+ // None
+
+ private: // Functions from base classes
+ /**
+ * From CEikAppUi, HandleCommandL.
+ * Takes care of command handling.
+ * @param aCommand Command to be handled.
+ */
+ void HandleCommandL( TInt aCommand );
+
+ public: //Data
+ // None
+
+ protected: // Data
+ // None
+
+ private: // Data
+ CUITestServerStarterAppView* iAppView; // The application view owned by CUITestServerStarterAppUi
+ TRequestStatus* iEventStatus; // Pointer to request statuc which is completed when
+ // selected event is handled.
+ TEventType iEventType; // Currently handled event type;
+ TInt iTypeTextLength; // Length of text send by typetext testscripter keyword
+
+ public: // Friend classes
+ // None
+
+ protected: // Friend classes
+ // None
+
+ private: // Friend classes
+ // None
+ };
+
+#endif // UITESTSERVERSTARTERAPPUI_H_
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/inc/UITestServerStarterAppView.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,142 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains the header file of the
+* UITestServerStarter AppUi view class.
+*
+*/
+
+#ifndef UITESTSERVERSTARTERAPPVIEW_H_
+#define UITESTSERVERSTARTERAPPVIEW_H_
+
+// INCLUDES
+#include <aknview.h>
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// DATA TYPES
+// None
+
+// FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+class CUITestServerStarterAppContainer;
+
+// CLASS DECLARATION
+
+// DESCRIPTION
+// UITestServerStarter standard AppUi view class.
+class CUITestServerStarterAppView : public CAknView
+ {
+ public: // Enumerations
+ // None
+
+ private: // Enumerations
+ // None
+
+ public: // Constructors and destructor
+ /**
+ * Virtual Destructor.
+ */
+ virtual ~CUITestServerStarterAppView();
+
+ private: // Constructors and destructor
+
+ /**
+ * Perform the second phase construction of a
+ * CUITestServerStarterAppView object.
+ */
+ void ConstructL();
+
+ /**
+ * C++ default constructor.
+ */
+ CUITestServerStarterAppView();
+
+ public: // New functions
+ /**
+ * Two-phased constructor.
+ * Create a CUITestServerStarterAppView object.
+ */
+ static CUITestServerStarterAppView* NewL();
+
+ /**
+ * Two-phased constructor.
+ * Create a CUITestServerStarterAppView object
+ */
+ static CUITestServerStarterAppView* NewLC();
+
+ public: // Functions from base classes
+ /**
+ * Return Uid
+ */
+ TUid Id() const;
+
+ /**
+ * Handle Commands
+ */
+ void HandleCommandL(TInt aCommand);
+
+ /**
+ * Handle size changes
+ */
+ void HandleClientRectChange();
+
+ protected: // New functions
+ // None
+
+ protected: // Functions from base classes
+ // None
+
+ private: // New functions
+ // None
+
+ private: // Functions from base classes
+ /**
+ * From AknView, Activates view
+ */
+ void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
+ const TDesC8& aCustomMessage);
+
+ /**
+ * From AknView, Deactivates view
+ */
+ void DoDeactivate();
+
+ public: //Data
+ // None
+
+ protected: // Data
+ // None
+
+ private: // Data
+ CUITestServerStarterAppContainer* iContainer; // View container
+
+ public: // Friend classes
+ // None
+
+ protected: // Friend classes
+ // None
+
+ private: // Friend classes
+ // None
+ };
+
+#endif // UITESTSERVERSTARTERAPPVIEW_H_
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/inc/UITestServerStarterApplication.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,111 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains the header file of the
+* CUITestServerStarterApplication class.
+*
+*/
+
+#ifndef UITESTSERVERSTARTERAPPLICATION_H_
+#define UITESTSERVERSTARTERAPPLICATION_H_
+
+
+// INCLUDES
+#include <aknapp.h>
+#include "UITestServerStarter.hrh"
+
+// CONSTANTS
+
+// UID for the application;
+const TUid KUidUITestServerStarterApp =
+ {
+ _UID3
+ };
+
+const TUid KMainViewId = { 1982 };
+// CLASS DECLARATION
+
+// CLASS DECLARATION
+// DESCRIPTION
+/**
+ * UITestServerStarterApplication application class.
+ * Provides factory to create concrete document object.
+ * An instance of CUITestServerStarterApplication is the application part of the
+ * AVKON application framework for the CUITestServerStarterApplication application.
+ */
+class CUITestServerStarterApplication : public CAknApplication
+ {
+ public: // Enumerations
+ // None
+
+ private: // Enumerations
+ // None
+
+ public: // Constructors and destructor
+ /**
+ * C++ destructor.
+ */
+
+ public:
+ // Functions from base classes
+
+ /**
+ * From CApaApplication, AppDllUid.
+ * @return Application's UID (KUidUITestServerStarterApplication).
+ */
+ TUid AppDllUid () const;
+
+ protected: // Functions from base classes
+
+ /**
+ * From CApaApplication, CreateDocumentL.
+ * Creates CUITestServerStarterDocument document object. The returned
+ * pointer in not owned by the CUITestServerStarterApplication object.
+ * @return A pointer to the created document object.
+ */
+ CApaDocument* CreateDocumentL ();
+
+ virtual void PreDocConstructL();
+
+
+ protected: // New functions
+ // None
+
+ protected: // Functions from base classes
+ // None
+
+ private: // New functions
+ // None
+
+ public: //Data
+ // None
+
+ protected: // Data
+ // None
+
+ private: // Data
+ // None
+
+ public: // Friend classes
+ // None
+
+ protected: // Friend classes
+ // None
+
+ private: // Friend classes
+ // None
+ };
+
+
+
+#endif /*UITESTSERVERSTARTERAPPLICATION_H_*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/inc/UITestServerStarterDocument.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,144 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This file contains the header file of the
+* UITestServerStarter Document class.
+*
+*/
+
+#ifndef UITESTSERVERSTARTERDOCUMENT_H_
+#define UITESTSERVERSTARTERDOCUMENT_H_
+
+// INCLUDES
+#include <AknDoc.h>
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// DATA TYPES
+// None
+
+// FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+class CUITestServerStarterAppUi;
+class CEikApplication;
+
+// CLASS DECLARATION
+
+// DESCRIPTION
+/**
+ * CClockTestDocument application class.
+ * An instance of class CClockTestDocument is the Document part of the
+ * AVKON application framework for the ClockTest example application.
+ */
+class CUITestServerStarterDocument : public CAknDocument
+ {
+ public: // Enumerations
+ // None
+
+ private: // Enumerations
+ // None
+
+ private: // Constructors and destructor
+ // None
+ public: // New functions
+
+ /**
+ * NewL.
+ * Two-phased constructor.
+ * Construct a CUITestServerStarterDocument for the AVKON application aApp
+ * using two phase construction, and return a pointer
+ * to the created object.
+ * @param aApp Application creating this document.
+ * @return A pointer to the created instance of CUITestServerStarterDocument.
+ */
+ static CUITestServerStarterDocument* NewL (CEikApplication& aApp);
+
+ /**
+ * NewLC.
+ * Two-phased constructor.
+ * Construct a CUITestServerStarterDocument for the AVKON application aApp
+ * using two phase construction, and return a pointer
+ * to the created object.
+ * @param aApp Application creating this document.
+ * @return A pointer to the created instance of CUITestServerStarterDocument.
+ */
+ static CUITestServerStarterDocument* NewLC (CEikApplication& aApp);
+
+ /**
+ * ~CUITestServerStarterDocument
+ * Virtual Destructor.
+ */
+ virtual ~CUITestServerStarterDocument();
+
+ public: // Functions from base classes
+
+ /**
+ * CreateAppUiL
+ * From CEikDocument, CreateAppUiL.
+ * Create a CUITestServerStarterAppUi object and return a pointer to it.
+ * The object returned is owned by the Uikon framework.
+ * @return Pointer to created instance of AppUi.
+ */
+ CEikAppUi* CreateAppUiL ();
+
+ protected: // New functions
+ // None
+
+ protected: // Functions from base classes
+ // None
+
+ private: // New functions
+
+ /**
+ * ConstructL
+ * 2nd phase constructor.
+ */
+ void ConstructL ();
+
+ /**
+ * CUITestServerStarterDocument.
+ * C++ default constructor.
+ * @param aApp Application creating this document.
+ */
+ CUITestServerStarterDocument( CEikApplication& aApp );
+
+ private: // Functions from base classes
+ // None
+
+ public: //Data
+ // None
+
+ protected: // Data
+ // None
+
+ private: // Data
+ // None
+
+ public: // Friend classes
+ // None
+
+ protected: // Friend classes
+ // None
+
+ private: // Friend classes
+ // None
+ };
+
+
+#endif /*UITESTSERVERSTARTERDOCUMENT_H_*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/src/AknUiEnvProxy.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,674 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This module contains the implementation of
+* CAknUiEnvProxy class member functions.
+*
+*/
+
+// INCLUDE FILES
+#include "AknUiEnvProxy.h"
+#include "UITestServerStarterAppUi.h"
+#include "EventUtil.h"
+
+#include <coeaui.h>
+#include <eikenv.h>
+#include <apgtask.h>
+#include <w32std.h>
+
+// EXTERNAL DATA STRUCTURES
+// None
+
+// EXTERNAL FUNCTION PROTOTYPES
+// None
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// LOCAL CONSTANTS AND MACROS
+// None
+
+// MODULE DATA STRUCTURES
+// None
+
+// LOCAL FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+// None
+
+// ================= MEMBER FUNCTIONS =========================================
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: NewL
+
+ Description: NewL is first phase of two-phased constructor.
+
+ NewL is first phase of two-phased constructor.
+
+ Parameters: CUITestServerStarterAppUi* aAppUi: in: Pointer to CUITestServerStarterAppUi.
+
+ Return Values: Pointer to new CAknUiEnvProxy object.
+
+ Errors/Exceptions: Leaves if new or ConstructL leaves.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CAknUiEnvProxy* CAknUiEnvProxy::NewL( CUITestServerStarterAppUi* aAppUi )
+ {
+ CAknUiEnvProxy* self = new(ELeave)CAknUiEnvProxy();
+ CleanupStack::PushL( self );
+ self->ConstructL( aAppUi );
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: ConstructL
+
+ Description: ConstructL is second phase of two-phased constructor.
+
+ Performs construction of CAknUiEnvProxy object.
+
+ Parameters: CUITestServerStarterAppUi* aAppUi: in: Pointer to CUITestServerStarterAppUi.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CAknUiEnvProxy::ConstructL( CUITestServerStarterAppUi* aAppUi )
+ {
+ iAppUi = aAppUi;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: BringToForeground
+
+ Description: Brings UI component container to foreground.
+
+ Brings UI component container to foreground.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CAknUiEnvProxy::BringToForeground()
+ {
+ TApaTask task( CCoeEnv::Static()->WsSession() );
+ task.SetWgId( CCoeEnv::Static()->RootWin().Identifier() );
+ task.BringToForeground();
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: SendToBackground
+
+ Description: Sends UI component container to background.
+
+ Sends UI component container to background.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CAknUiEnvProxy::SendToBackground( )
+ {
+ TApaTask task( CCoeEnv::Static()->WsSession() );
+ task.SetWgId( CCoeEnv::Static()->RootWin().Identifier() );
+ task.SendToBackground();
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: PressKeyL
+
+ Description: Sends local key press event to UI component.
+
+ Sends key press event to UI component. UI component must be first added to
+ AppUi stack to be able to recive this key event.
+
+ Parameters: TRequestStatus* aStatus: out: Pointer to request status used to notify that
+ key event was recived.
+ TUint aKeyCode: in: Key code.
+ TInt aKeyScanCode: in: Key scan code.
+ TUint aKeyModifiers: in: Key modifiers
+ TInt aKeyRepeats: in: Key press repeats count.
+
+ Return Values: None.
+
+ Errors/Exceptions: Leaves if some error occurs during key event sending.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CAknUiEnvProxy::PressKeyL( TRequestStatus* aStatus, TUint aKeyCode, TInt aKeyScanCode,
+ TUint aKeyModifiers, TInt aKeyRepeats )
+ {
+ // Fill key event structure
+ TWsEvent wsEvent;
+ wsEvent.SetType(EEventKey);
+ TKeyEvent* keyEvent = wsEvent.Key();
+ keyEvent->iCode = aKeyCode;
+ keyEvent->iScanCode = aKeyScanCode;
+ keyEvent->iModifiers = aKeyModifiers;
+ keyEvent->iRepeats = aKeyRepeats;
+
+ // Send info to AppUi that we are going to send key event
+ iAppUi->PrepareToPressKey();
+
+ RWsSession& wsSession = CCoeEnv::Static()->WsSession();
+ TInt wgId = CCoeEnv::Static()->RootWin().Identifier();
+ // Send key event
+ TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );
+ User::LeaveIfError( ret );
+
+ // Request notification when key press is handled
+ *aStatus = KRequestPending;
+ iAppUi->NotifyAboutHandledKeyPress( aStatus );
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: PressKeyL
+
+ Description: Sends global key press event to UI component.
+
+ Sends key press event to UI component which is currently focuused.
+
+ Parameters: TUint aKeyCode: in: Key code.
+ TInt aKeyScanCode: in: Key scan code.
+ TUint aKeyModifiers: in: Key modifiers
+ TInt aKeyRepeats: in: Key press repeats count.
+
+ Return Values: None.
+
+ Errors/Exceptions: Leaves if some error occurs during key event sending.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CAknUiEnvProxy::PressKeyL( TUint aKeyCode, TInt aKeyScanCode,
+ TUint aKeyModifiers, TInt aKeyRepeats )
+ {
+ // Fill key event structure
+ TWsEvent wsEvent;
+ wsEvent.SetType(EEventKey);
+ TKeyEvent* keyEvent = wsEvent.Key();
+ keyEvent->iCode = aKeyCode;
+ keyEvent->iScanCode = aKeyScanCode;
+ keyEvent->iModifiers = aKeyModifiers;
+ keyEvent->iRepeats = aKeyRepeats;
+
+ RWsSession& wsSession = CCoeEnv::Static()->WsSession();
+ TInt wgId = wsSession.GetFocusWindowGroup();
+ TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );
+ User::LeaveIfError( ret );
+ }
+
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: TypeTextL
+
+ Description: Sends text to UI component.
+
+ Sends text to UI component. UI component must be first added to
+ AppUi stack to be able to recive this key event.
+
+ Parameters: TRequestStatus* aStatus: out: Pointer to request status used to notify that
+ key event was recived.
+ TPtrC aText: in: Text which will be send to UI component.
+
+ Return Values: None.
+
+ Errors/Exceptions: Leaves if some error occurs during key event sending.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CAknUiEnvProxy::TypeTextL( TRequestStatus* aStatus, const TDesC& aText )
+ {
+ TLex textParser( aText );
+
+ // Send info to AppUi that we are going to send text
+ iAppUi->PrepareToTypeText( aText.Length() );
+
+ TInt wgId = CCoeEnv::Static()->RootWin().Identifier();
+ RWsSession& wsSession = CCoeEnv::Static()->WsSession();
+
+ TChar character = 0;
+ while ( ( character = textParser.Get() ) != 0 )
+ {
+ // Fill key event structure
+ TWsEvent wsEvent;
+ wsEvent.SetType(EEventKey);
+ TKeyEvent* keyEvent = wsEvent.Key();
+ keyEvent->iCode = character;
+ keyEvent->iScanCode = 0;
+ keyEvent->iModifiers = 0;
+ keyEvent->iRepeats = 0;
+
+ // Send single character from text to UI component
+ TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );
+ User::LeaveIfError( ret );
+ }
+
+ // Request notification when send text is recived
+ *aStatus = KRequestPending;
+ iAppUi->NotifyAboutHandledTextType( aStatus );
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: TypeTextL
+
+ Description: Sends global text to UI component.
+
+ Sends global text to UI component. UI component must be focused to receive that event.
+
+ Parameters: TPtrC aText: in: Text which will be send to UI component.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CAknUiEnvProxy::TypeTextL( const TDesC& aText )
+ {
+ TLex textParser( aText );
+
+ RWsSession& wsSession = CCoeEnv::Static()->WsSession();
+ TInt wgId = wsSession.GetFocusWindowGroup();
+
+ TChar character = 0;
+ while ( ( character = textParser.Get() ) != 0 )
+ {
+ // Fill key event structure
+ TWsEvent wsEvent;
+ wsEvent.SetType(EEventKey);
+ TKeyEvent* keyEvent = wsEvent.Key();
+ keyEvent->iCode = character;
+ keyEvent->iScanCode = 0;
+ keyEvent->iModifiers = 0;
+ keyEvent->iRepeats = 0;
+
+ // Send single character from text to UI component
+ TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );
+ User::LeaveIfError( ret );
+ }
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: SendPointerEventL
+
+ Description: Send pointer event
+
+ Send pointer event.
+
+ Parameters: TUint aType: in: KEvent type.
+ const TPoint& aPosition: in: Position.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CAknUiEnvProxy::SendPointerEventL( TUint aType, const TPoint& aPosition )
+ {
+ RWsSession& wsSession = CCoeEnv::Static()->WsSession();
+ TRawEvent pointerEvent;
+
+ if ( aType < TEventUtil::EButton1 ) {
+ pointerEvent.Set( ( TRawEvent::TType )aType, aPosition.iX, aPosition.iY );
+ wsSession.SimulateRawEvent( pointerEvent );
+ }
+ else if ( ( aType >= TEventUtil::EButton1 ) && ( aType <= TEventUtil::EButton3 ) )
+ {
+ TRawEvent pointerEventDown;
+ TRawEvent pointerEventUp;
+
+ switch ( aType )
+ {
+ case TEventUtil::EButton1:
+ {
+ pointerEventDown.Set( TRawEvent::EButton1Down, aPosition.iX, aPosition.iY );
+ pointerEventUp.Set( TRawEvent::EButton1Up, aPosition.iX, aPosition.iY );
+ }
+ break;
+ case TEventUtil::EButton2:
+ {
+ pointerEventDown.Set( TRawEvent::EButton2Down, aPosition.iX, aPosition.iY );
+ pointerEventUp.Set( TRawEvent::EButton2Up, aPosition.iX, aPosition.iY );
+ }
+ break;
+ case TEventUtil::EButton3:
+ {
+ pointerEventDown.Set( TRawEvent::EButton3Down, aPosition.iX, aPosition.iY );
+ pointerEventUp.Set( TRawEvent::EButton3Up, aPosition.iX, aPosition.iY );
+ }
+ break;
+ default:
+ User::Leave( KErrArgument );
+ }
+ wsSession.SimulateRawEvent( pointerEventDown );
+ wsSession.SimulateRawEvent( pointerEventUp );
+ }
+ else
+ {
+ User::Leave( KErrArgument );
+ }
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: SendPointerEventL
+
+ Description: Send pointer event
+
+ Send pointer event.
+
+ Parameters: TRequestStatus* aStatus: in: Pointer to request status used to notify that
+ pointer event was recived.
+ TUint aType: in: KEvent type.
+ const TPoint& aPosition: in: Position.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CAknUiEnvProxy::SendPointerEventL( TRequestStatus* aStatus, TUint aType, const TPoint& aPosition )
+ {
+ RWsSession& wsSession = CCoeEnv::Static()->WsSession();
+
+ if ( aType < TEventUtil::EButton1 ) {
+ TRawEvent pointerEvent;
+ pointerEvent.Set( ( TRawEvent::TType )aType, aPosition.iX, aPosition.iY );
+ // Send info to AppUi that we are going to send key event
+ iAppUi->PrepareToPointerEvent();
+ wsSession.SimulateRawEvent( pointerEvent );
+ // Request notification when key press is handled
+ *aStatus = KRequestPending;
+ iAppUi->NotifyAboutHandledPointerEvent( aStatus );
+ }
+ else if ( ( aType >= TEventUtil::EButton1 ) && ( aType <= TEventUtil::EButton3 ) )
+ {
+ TRawEvent pointerEventDown;
+ TRawEvent pointerEventUp;
+ switch ( aType )
+ {
+ case TEventUtil::EButton1:
+ {
+ pointerEventDown.Set( TRawEvent::EButton1Down, aPosition.iX, aPosition.iY );
+ pointerEventUp.Set( TRawEvent::EButton1Up, aPosition.iX, aPosition.iY );
+ }
+ break;
+ case TEventUtil::EButton2:
+ {
+ pointerEventDown.Set( TRawEvent::EButton2Down, aPosition.iX, aPosition.iY );
+ pointerEventUp.Set( TRawEvent::EButton2Up, aPosition.iX, aPosition.iY );
+ }
+ break;
+ case TEventUtil::EButton3:
+ {
+ pointerEventDown.Set( TRawEvent::EButton3Down, aPosition.iX, aPosition.iY );
+ pointerEventUp.Set( TRawEvent::EButton3Up, aPosition.iX, aPosition.iY );
+ }
+ break;
+ default:
+ User::Leave( KErrArgument );
+ }
+
+ CCoeEnv::Static()->RootWin().SimulatePointerEvent( pointerEventDown );
+
+ // Send info to AppUi that we are going to send key event
+ iAppUi->PrepareToPointerEvent();
+
+ CCoeEnv::Static()->RootWin().SimulatePointerEvent( pointerEventUp );
+
+ // Request notification when key press is handled
+ *aStatus = KRequestPending;
+ iAppUi->NotifyAboutHandledPointerEvent( aStatus );
+ }
+ else
+ {
+ User::Leave( KErrArgument );
+ }
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: ParseKeyCode
+
+ Description: Parses key code.
+
+ Parses key code.
+
+ Parameters: TDesC& aKeyCodeName: in: Key code name.
+ TUint& aKeyCode: out: Parsed key code.
+
+ Return Values: KErrNone if no error occures during parsing.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt CAknUiEnvProxy::ParseKeyCode( const TDesC& aKeyCodeName, TUint& aKeyCode ) const
+ {
+ return TEventUtil::ParseKeyCode( aKeyCodeName, aKeyCode );
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: ParseKeyScanCode
+
+ Description: Parses key scan code.
+
+ Parses key scan code.
+
+ Parameters: TDesC& aKeyScanCodeName: in: Key scan code name.
+ TUint& aKeyScanCode: out: Parsed key scan code.
+
+ Return Values: KErrNone if no error occures during parsing.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt CAknUiEnvProxy::ParseKeyScanCode( const TDesC& aKeyScanCodeName, TInt& aKeyScanCode ) const
+ {
+ return TEventUtil::ParseKeyScanCode( aKeyScanCodeName, aKeyScanCode );
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: ParseModifier
+
+ Description: Parses key modifier.
+
+ Parses key modifier.
+
+ Parameters: TDesC& aModifierName: in: Key modifier.
+ TUint& aModifier: out: Parsed key modifier.
+
+ Return Values: KErrNone if no error occures during parsing.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt CAknUiEnvProxy::ParseModifier( const TDesC& aModifierName, TUint& aModifier ) const
+ {
+ return TEventUtil::ParseModifier( aModifierName, aModifier );
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: ParsePointerEventType
+
+ Description: Parses pointer event type.
+
+ Parses key modifier.
+
+ Parameters: const TDesC& aPointerEventTypeName: in: Pointer event type.
+ TUint& aModifier: out: Parsed pointer event type.
+
+ Return Values: KErrNone if no error occures during parsing.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt CAknUiEnvProxy::ParsePointerEventType( const TDesC& aPointerEventTypeName, TUint& aPointerEventType ) const
+ {
+ return TEventUtil::ParsePointerEventType( aPointerEventTypeName, aPointerEventType );
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: CAknUiEnvProxy
+
+ Description: C++ constructor.
+
+ C++ constructor.
+
+ Parameters: None
+
+ Return Values: None
+
+ Errors/Exceptions: None
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CAknUiEnvProxy::CAknUiEnvProxy()
+ {
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: ~CAknUiEnvProxy
+
+ Description: C++ destructor.
+
+ C++ destructor.
+
+ Parameters: None
+
+ Return Values: None
+
+ Errors/Exceptions: None
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CAknUiEnvProxy::~CAknUiEnvProxy()
+ {
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/src/EventUtil.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,1100 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This module contains the implementation of
+* CAknUiEnvProxy class member functions.
+*
+*/
+
+// INCLUDE FILES
+#include "EventUtil.h"
+#include <e32def.h>
+#include <e32keys.h>
+#include <w32std.h>
+
+// EXTERNAL DATA STRUCTURES
+// None
+
+// EXTERNAL FUNCTION PROTOTYPES
+// None
+
+// CONSTANTS
+// None
+
+// MACROS
+
+/**
+ * Key code names definition macro
+ */
+#define DefineKeyCodeNames( varName ) \
+ static TText* const varName[] = \
+ { \
+ (TText*)L"ekeynull", \
+ (TText*)L"ekeybell", \
+ (TText*)L"ekeybackspace", \
+ (TText*)L"ekeytab", \
+ (TText*)L"ekeylinefeed", \
+ (TText*)L"ekeyverticaltab", \
+ (TText*)L"ekeyformfeed", \
+ (TText*)L"ekeyenter", \
+ (TText*)L"ekeyescape", \
+ (TText*)L"ekeyspace", \
+ (TText*)L"ekeydelete", \
+ (TText*)L"ekeyprintscreen", \
+ (TText*)L"ekeypause", \
+ (TText*)L"ekeyhome", \
+ (TText*)L"ekeyend", \
+ (TText*)L"ekeypageup", \
+ (TText*)L"ekeypagedown", \
+ (TText*)L"ekeyinsert", \
+ (TText*)L"ekeyleftarrow", \
+ (TText*)L"ekeyrightarrow", \
+ (TText*)L"ekeyuparrow", \
+ (TText*)L"ekeydownarrow", \
+ (TText*)L"ekeyleftshift", \
+ (TText*)L"ekeyrightshift", \
+ (TText*)L"ekeyleftalt", \
+ (TText*)L"ekeyrightalt", \
+ (TText*)L"ekeyleftctrl", \
+ (TText*)L"ekeyrightctrl", \
+ (TText*)L"ekeyleftfunc", \
+ (TText*)L"ekeyrightfunc", \
+ (TText*)L"ekeycapslock", \
+ (TText*)L"ekeynumlock", \
+ (TText*)L"ekeyscrolllock", \
+ (TText*)L"ekeyf1", \
+ (TText*)L"ekeyf2", \
+ (TText*)L"ekeyf3", \
+ (TText*)L"ekeyf4", \
+ (TText*)L"ekeyf5", \
+ (TText*)L"ekeyf6", \
+ (TText*)L"ekeyf7", \
+ (TText*)L"ekeyf8", \
+ (TText*)L"ekeyf9", \
+ (TText*)L"ekeyf10", \
+ (TText*)L"ekeyf11", \
+ (TText*)L"ekeyf12", \
+ (TText*)L"ekeyf13", \
+ (TText*)L"ekeyf14", \
+ (TText*)L"ekeyf15", \
+ (TText*)L"ekeyf16", \
+ (TText*)L"ekeyf17", \
+ (TText*)L"ekeyf18", \
+ (TText*)L"ekeyf19", \
+ (TText*)L"ekeyf20", \
+ (TText*)L"ekeyf21", \
+ (TText*)L"ekeyf22", \
+ (TText*)L"ekeyf23", \
+ (TText*)L"ekeyf24", \
+ (TText*)L"ekeyoff", \
+ (TText*)L"ekeyinccontrast", \
+ (TText*)L"ekeydeccontrast", \
+ (TText*)L"ekeybacklighton", \
+ (TText*)L"ekeybacklightoff", \
+ (TText*)L"ekeybacklighttoggle", \
+ (TText*)L"ekeysliderdown", \
+ (TText*)L"ekeysliderup", \
+ (TText*)L"ekeymenu", \
+ (TText*)L"ekeydictaphoneplay", \
+ (TText*)L"ekeydictaphonestop", \
+ (TText*)L"ekeydictaphonerecord",\
+ (TText*)L"ekeyhelp", \
+ (TText*)L"ekeydial", \
+ (TText*)L"ekeyscreendimension0",\
+ (TText*)L"ekeyscreendimension1",\
+ (TText*)L"ekeyscreendimension2",\
+ (TText*)L"ekeyscreendimension3",\
+ (TText*)L"ekeyincvolume", \
+ (TText*)L"ekeydecvolume", \
+ (TText*)L"ekeydevice0", \
+ (TText*)L"ekeydevice1", \
+ (TText*)L"ekeydevice2", \
+ (TText*)L"ekeydevice3", \
+ (TText*)L"ekeydevice4", \
+ (TText*)L"ekeydevice5", \
+ (TText*)L"ekeydevice6", \
+ (TText*)L"ekeydevice7", \
+ (TText*)L"ekeydevice8", \
+ (TText*)L"ekeydevice9", \
+ (TText*)L"ekeydevicea", \
+ (TText*)L"ekeydeviceb", \
+ (TText*)L"ekeydevicec", \
+ (TText*)L"ekeydeviced", \
+ (TText*)L"ekeydevicee", \
+ (TText*)L"ekeydevicef", \
+ (TText*)L"ekeyapplication0", \
+ (TText*)L"ekeyapplication1", \
+ (TText*)L"ekeyapplication2", \
+ (TText*)L"ekeyapplication3", \
+ (TText*)L"ekeyapplication4", \
+ (TText*)L"ekeyapplication5", \
+ (TText*)L"ekeyapplication6", \
+ (TText*)L"ekeyapplication7", \
+ (TText*)L"ekeyapplication8", \
+ (TText*)L"ekeyapplication9", \
+ (TText*)L"ekeyapplicationa", \
+ (TText*)L"ekeyapplicationb", \
+ (TText*)L"ekeyapplicationc", \
+ (TText*)L"ekeyapplicationd", \
+ (TText*)L"ekeyapplicatione", \
+ (TText*)L"ekeyapplicationf", \
+ (TText*)L"ekeyyes", \
+ (TText*)L"ekeyno", \
+ (TText*)L"ekeyincbrightness", \
+ (TText*)L"ekeydecbrightness", \
+ (TText*)L"ekeykeyboardextend", \
+ (TText*)L"ekeydevice10", \
+ (TText*)L"ekeydevice11", \
+ (TText*)L"ekeydevice12", \
+ (TText*)L"ekeydevice13", \
+ (TText*)L"ekeydevice14", \
+ (TText*)L"ekeydevice15", \
+ (TText*)L"ekeydevice16", \
+ (TText*)L"ekeydevice17", \
+ (TText*)L"ekeydevice18", \
+ (TText*)L"ekeydevice19", \
+ (TText*)L"ekeydevice1a", \
+ (TText*)L"ekeydevice1b", \
+ (TText*)L"ekeydevice1c", \
+ (TText*)L"ekeydevice1d", \
+ (TText*)L"ekeydevice1e", \
+ (TText*)L"ekeydevice1f", \
+ (TText*)L"ekeyapplication10", \
+ (TText*)L"ekeyapplication11", \
+ (TText*)L"ekeyapplication12", \
+ (TText*)L"ekeyapplication13", \
+ (TText*)L"ekeyapplication14", \
+ (TText*)L"ekeyapplication15", \
+ (TText*)L"ekeyapplication16", \
+ (TText*)L"ekeyapplication17", \
+ (TText*)L"ekeyapplication18", \
+ (TText*)L"ekeyapplication19", \
+ (TText*)L"ekeyapplication1a", \
+ (TText*)L"ekeyapplication1b", \
+ (TText*)L"ekeyapplication1c", \
+ (TText*)L"ekeyapplication1d", \
+ (TText*)L"ekeyapplication1e", \
+ (TText*)L"ekeyapplication1f", \
+ }
+
+/**
+ * Key codes definition macro
+ */
+#define DefineKeyCodes( varName ) \
+ static TUint const varName[] = \
+ { \
+ (TUint)EKeyNull, \
+ (TUint)EKeyBell, \
+ (TUint)EKeyBackspace, \
+ (TUint)EKeyTab, \
+ (TUint)EKeyLineFeed, \
+ (TUint)EKeyVerticalTab, \
+ (TUint)EKeyFormFeed, \
+ (TUint)EKeyEnter, \
+ (TUint)EKeyEscape, \
+ (TUint)EKeySpace, \
+ (TUint)EKeyDelete, \
+ (TUint)EKeyPrintScreen, \
+ (TUint)EKeyPause, \
+ (TUint)EKeyHome, \
+ (TUint)EKeyEnd, \
+ (TUint)EKeyPageUp, \
+ (TUint)EKeyPageDown, \
+ (TUint)EKeyInsert, \
+ (TUint)EKeyLeftArrow, \
+ (TUint)EKeyRightArrow, \
+ (TUint)EKeyUpArrow, \
+ (TUint)EKeyDownArrow, \
+ (TUint)EKeyLeftShift, \
+ (TUint)EKeyRightShift, \
+ (TUint)EKeyLeftAlt, \
+ (TUint)EKeyRightAlt, \
+ (TUint)EKeyLeftCtrl, \
+ (TUint)EKeyRightCtrl, \
+ (TUint)EKeyLeftFunc, \
+ (TUint)EKeyRightFunc, \
+ (TUint)EKeyCapsLock, \
+ (TUint)EKeyNumLock, \
+ (TUint)EKeyScrollLock, \
+ (TUint)EKeyF1, \
+ (TUint)EKeyF2, \
+ (TUint)EKeyF3, \
+ (TUint)EKeyF4, \
+ (TUint)EKeyF5, \
+ (TUint)EKeyF6, \
+ (TUint)EKeyF7, \
+ (TUint)EKeyF8, \
+ (TUint)EKeyF9, \
+ (TUint)EKeyF10, \
+ (TUint)EKeyF11, \
+ (TUint)EKeyF12, \
+ (TUint)EKeyF13, \
+ (TUint)EKeyF14, \
+ (TUint)EKeyF15, \
+ (TUint)EKeyF16, \
+ (TUint)EKeyF17, \
+ (TUint)EKeyF18, \
+ (TUint)EKeyF19, \
+ (TUint)EKeyF20, \
+ (TUint)EKeyF21, \
+ (TUint)EKeyF22, \
+ (TUint)EKeyF23, \
+ (TUint)EKeyF24, \
+ (TUint)EKeyOff, \
+ (TUint)EKeyIncContrast, \
+ (TUint)EKeyDecContrast, \
+ (TUint)EKeyBacklightOn, \
+ (TUint)EKeyBacklightOff, \
+ (TUint)EKeyBacklightToggle, \
+ (TUint)EKeySliderDown, \
+ (TUint)EKeySliderUp, \
+ (TUint)EKeyMenu, \
+ (TUint)EKeyDictaphonePlay, \
+ (TUint)EKeyDictaphoneStop, \
+ (TUint)EKeyDictaphoneRecord, \
+ (TUint)EKeyHelp, \
+ (TUint)EKeyDial, \
+ (TUint)EKeyScreenDimension0, \
+ (TUint)EKeyScreenDimension1, \
+ (TUint)EKeyScreenDimension2, \
+ (TUint)EKeyScreenDimension3, \
+ (TUint)EKeyIncVolume, \
+ (TUint)EKeyDecVolume, \
+ (TUint)EKeyDevice0, \
+ (TUint)EKeyDevice1, \
+ (TUint)EKeyDevice2, \
+ (TUint)EKeyDevice3, \
+ (TUint)EKeyDevice4, \
+ (TUint)EKeyDevice5, \
+ (TUint)EKeyDevice6, \
+ (TUint)EKeyDevice7, \
+ (TUint)EKeyDevice8, \
+ (TUint)EKeyDevice9, \
+ (TUint)EKeyDeviceA, \
+ (TUint)EKeyDeviceB, \
+ (TUint)EKeyDeviceC, \
+ (TUint)EKeyDeviceD, \
+ (TUint)EKeyDeviceE, \
+ (TUint)EKeyDeviceF, \
+ (TUint)EKeyApplication0, \
+ (TUint)EKeyApplication1, \
+ (TUint)EKeyApplication2, \
+ (TUint)EKeyApplication3, \
+ (TUint)EKeyApplication4, \
+ (TUint)EKeyApplication5, \
+ (TUint)EKeyApplication6, \
+ (TUint)EKeyApplication7, \
+ (TUint)EKeyApplication8, \
+ (TUint)EKeyApplication9, \
+ (TUint)EKeyApplicationA, \
+ (TUint)EKeyApplicationB, \
+ (TUint)EKeyApplicationC, \
+ (TUint)EKeyApplicationD, \
+ (TUint)EKeyApplicationE, \
+ (TUint)EKeyApplicationF, \
+ (TUint)EKeyYes, \
+ (TUint)EKeyNo, \
+ (TUint)EKeyIncBrightness, \
+ (TUint)EKeyDecBrightness, \
+ (TUint)EKeyKeyboardExtend, \
+ (TUint)EKeyDevice10, \
+ (TUint)EKeyDevice11, \
+ (TUint)EKeyDevice12, \
+ (TUint)EKeyDevice13, \
+ (TUint)EKeyDevice14, \
+ (TUint)EKeyDevice15, \
+ (TUint)EKeyDevice16, \
+ (TUint)EKeyDevice17, \
+ (TUint)EKeyDevice18, \
+ (TUint)EKeyDevice19, \
+ (TUint)EKeyDevice1A, \
+ (TUint)EKeyDevice1B, \
+ (TUint)EKeyDevice1C, \
+ (TUint)EKeyDevice1D, \
+ (TUint)EKeyDevice1E, \
+ (TUint)EKeyDevice1F, \
+ (TUint)EKeyApplication10, \
+ (TUint)EKeyApplication11, \
+ (TUint)EKeyApplication12, \
+ (TUint)EKeyApplication13, \
+ (TUint)EKeyApplication14, \
+ (TUint)EKeyApplication15, \
+ (TUint)EKeyApplication16, \
+ (TUint)EKeyApplication17, \
+ (TUint)EKeyApplication18, \
+ (TUint)EKeyApplication19, \
+ (TUint)EKeyApplication1A, \
+ (TUint)EKeyApplication1B, \
+ (TUint)EKeyApplication1C, \
+ (TUint)EKeyApplication1D, \
+ (TUint)EKeyApplication1E, \
+ (TUint)EKeyApplication1F, \
+ }
+
+/**
+ * Key scan code names definition macro.
+ */
+#define DefineKeyScanCodeNames( varName ) \
+ static TText* const varName[] = \
+ { \
+ (TText*)L"estdkeynull", \
+ (TText*)L"estdkeybackspace", \
+ (TText*)L"estdkeytab", \
+ (TText*)L"estdkeyenter", \
+ (TText*)L"estdkeyescape", \
+ (TText*)L"estdkeyspace", \
+ (TText*)L"estdkeyprintscreen", \
+ (TText*)L"estdkeypause", \
+ (TText*)L"estdkeyhome", \
+ (TText*)L"estdkeyend", \
+ (TText*)L"estdkeypageup", \
+ (TText*)L"estdkeypagedown", \
+ (TText*)L"estdkeyinsert", \
+ (TText*)L"estdkeydelete", \
+ (TText*)L"estdkeyleftarrow", \
+ (TText*)L"estdkeyrightarrow", \
+ (TText*)L"estdkeyuparrow", \
+ (TText*)L"estdkeydownarrow", \
+ (TText*)L"estdkeyleftshift", \
+ (TText*)L"estdkeyrightshift", \
+ (TText*)L"estdkeyleftalt", \
+ (TText*)L"estdkeyrightalt", \
+ (TText*)L"estdkeyleftctrl", \
+ (TText*)L"estdkeyrightctrl", \
+ (TText*)L"estdkeyleftfunc", \
+ (TText*)L"estdkeyrightfunc", \
+ (TText*)L"estdkeycapslock", \
+ (TText*)L"estdkeynumlock", \
+ (TText*)L"estdkeyscrolllock", \
+ (TText*)L"estdkeyf1", \
+ (TText*)L"estdkeyf2", \
+ (TText*)L"estdkeyf3", \
+ (TText*)L"estdkeyf4", \
+ (TText*)L"estdkeyf5", \
+ (TText*)L"estdkeyf6", \
+ (TText*)L"estdkeyf7", \
+ (TText*)L"estdkeyf8", \
+ (TText*)L"estdkeyf9", \
+ (TText*)L"estdkeyf10", \
+ (TText*)L"estdkeyf11", \
+ (TText*)L"estdkeyf12", \
+ (TText*)L"estdkeyf13", \
+ (TText*)L"estdkeyf14", \
+ (TText*)L"estdkeyf15", \
+ (TText*)L"estdkeyf16", \
+ (TText*)L"estdkeyf17", \
+ (TText*)L"estdkeyf18", \
+ (TText*)L"estdkeyf19", \
+ (TText*)L"estdkeyf20", \
+ (TText*)L"estdkeyf21", \
+ (TText*)L"estdkeyf22", \
+ (TText*)L"estdkeyf23", \
+ (TText*)L"estdkeyf24", \
+ (TText*)L"estdkeyxxx", \
+ (TText*)L"estdkeycomma", \
+ (TText*)L"estdkeyfullstop", \
+ (TText*)L"estdkeyforwardslash", \
+ (TText*)L"estdkeybackslash", \
+ (TText*)L"estdkeysemicolon", \
+ (TText*)L"estdkeysinglequote", \
+ (TText*)L"estdkeyhash", \
+ (TText*)L"estdkeysquarebracketleft", \
+ (TText*)L"estdkeysquarebracketright", \
+ (TText*)L"estdkeyminus", \
+ (TText*)L"estdkeyequals", \
+ (TText*)L"estdkeynkpforwardslash", \
+ (TText*)L"estdkeynkpasterisk", \
+ (TText*)L"estdkeynkpminus", \
+ (TText*)L"estdkeynkpplus", \
+ (TText*)L"estdkeynkpenter", \
+ (TText*)L"estdkeynkp1", \
+ (TText*)L"estdkeynkp2", \
+ (TText*)L"estdkeynkp3", \
+ (TText*)L"estdkeynkp4", \
+ (TText*)L"estdkeynkp5", \
+ (TText*)L"estdkeynkp6", \
+ (TText*)L"estdkeynkp7", \
+ (TText*)L"estdkeynkp8", \
+ (TText*)L"estdkeynkp9", \
+ (TText*)L"estdkeynkp0", \
+ (TText*)L"estdkeynkpfullstop", \
+ (TText*)L"estdkeymenu", \
+ (TText*)L"estdkeybacklighton", \
+ (TText*)L"estdkeybacklightoff", \
+ (TText*)L"estdkeybacklighttoggle", \
+ (TText*)L"estdkeyinccontrast", \
+ (TText*)L"estdkeydeccontrast", \
+ (TText*)L"estdkeysliderdown", \
+ (TText*)L"estdkeysliderup", \
+ (TText*)L"estdkeydictaphoneplay", \
+ (TText*)L"estdkeydictaphonestop", \
+ (TText*)L"estdkeydictaphonerecord", \
+ (TText*)L"estdkeyhelp", \
+ (TText*)L"estdkeyoff", \
+ (TText*)L"estdkeydial", \
+ (TText*)L"estdkeyincvolume", \
+ (TText*)L"estdkeydecvolume", \
+ (TText*)L"estdkeydevice0", \
+ (TText*)L"estdkeydevice1", \
+ (TText*)L"estdkeydevice2", \
+ (TText*)L"estdkeydevice3", \
+ (TText*)L"estdkeydevice4", \
+ (TText*)L"estdkeydevice5", \
+ (TText*)L"estdkeydevice6", \
+ (TText*)L"estdkeydevice7", \
+ (TText*)L"estdkeydevice8", \
+ (TText*)L"estdkeydevice9", \
+ (TText*)L"estdkeydevicea", \
+ (TText*)L"estdkeydeviceb", \
+ (TText*)L"estdkeydevicec", \
+ (TText*)L"estdkeydeviced", \
+ (TText*)L"estdkeydevicee", \
+ (TText*)L"estdkeydevicef", \
+ (TText*)L"estdkeyapplication0", \
+ (TText*)L"estdkeyapplication1", \
+ (TText*)L"estdkeyapplication2", \
+ (TText*)L"estdkeyapplication3", \
+ (TText*)L"estdkeyapplication4", \
+ (TText*)L"estdkeyapplication5", \
+ (TText*)L"estdkeyapplication6", \
+ (TText*)L"estdkeyapplication7", \
+ (TText*)L"estdkeyapplication8", \
+ (TText*)L"estdkeyapplication9", \
+ (TText*)L"estdkeyapplicationa", \
+ (TText*)L"estdkeyapplicationb", \
+ (TText*)L"estdkeyapplicationc", \
+ (TText*)L"estdkeyapplicationd", \
+ (TText*)L"estdkeyapplicatione", \
+ (TText*)L"estdkeyapplicationf", \
+ (TText*)L"estdkeyyes", \
+ (TText*)L"estdkeyno", \
+ (TText*)L"estdkeyincbrightness", \
+ (TText*)L"estdkeydecbrightness", \
+ (TText*)L"estdkeykeyboardextend", \
+ (TText*)L"estdkeydevice10", \
+ (TText*)L"estdkeydevice11", \
+ (TText*)L"estdkeydevice12", \
+ (TText*)L"estdkeydevice13", \
+ (TText*)L"estdkeydevice14", \
+ (TText*)L"estdkeydevice15", \
+ (TText*)L"estdkeydevice16", \
+ (TText*)L"estdkeydevice17", \
+ (TText*)L"estdkeydevice18", \
+ (TText*)L"estdkeydevice19", \
+ (TText*)L"estdkeydevice1a", \
+ (TText*)L"estdkeydevice1b", \
+ (TText*)L"estdkeydevice1c", \
+ (TText*)L"estdkeydevice1d", \
+ (TText*)L"estdkeydevice1e", \
+ (TText*)L"estdkeydevice1f", \
+ (TText*)L"estdkeyapplication10", \
+ (TText*)L"estdkeyapplication11", \
+ (TText*)L"estdkeyapplication12", \
+ (TText*)L"estdkeyapplication13", \
+ (TText*)L"estdkeyapplication14", \
+ (TText*)L"estdkeyapplication15", \
+ (TText*)L"estdkeyapplication16", \
+ (TText*)L"estdkeyapplication17", \
+ (TText*)L"estdkeyapplication18", \
+ (TText*)L"estdkeyapplication19", \
+ (TText*)L"estdkeyapplication1a", \
+ (TText*)L"estdkeyapplication1b", \
+ (TText*)L"estdkeyapplication1c", \
+ (TText*)L"estdkeyapplication1d", \
+ (TText*)L"estdkeyapplication1e", \
+ (TText*)L"estdkeyapplication1f", \
+ }
+
+/**
+ * Key scan codes definition macro.
+ */
+#define DefineKeyScanCodes( varName ) \
+ static TUint const varName[] = \
+ { \
+ (TUint)EStdKeyNull, \
+ (TUint)EStdKeyBackspace, \
+ (TUint)EStdKeyTab, \
+ (TUint)EStdKeyEnter, \
+ (TUint)EStdKeyEscape, \
+ (TUint)EStdKeySpace, \
+ (TUint)EStdKeyPrintScreen, \
+ (TUint)EStdKeyPause, \
+ (TUint)EStdKeyHome, \
+ (TUint)EStdKeyEnd, \
+ (TUint)EStdKeyPageUp, \
+ (TUint)EStdKeyPageDown, \
+ (TUint)EStdKeyInsert, \
+ (TUint)EStdKeyDelete, \
+ (TUint)EStdKeyLeftArrow, \
+ (TUint)EStdKeyRightArrow, \
+ (TUint)EStdKeyUpArrow, \
+ (TUint)EStdKeyDownArrow, \
+ (TUint)EStdKeyLeftShift, \
+ (TUint)EStdKeyRightShift, \
+ (TUint)EStdKeyLeftAlt, \
+ (TUint)EStdKeyRightAlt, \
+ (TUint)EStdKeyLeftCtrl, \
+ (TUint)EStdKeyRightCtrl, \
+ (TUint)EStdKeyLeftFunc, \
+ (TUint)EStdKeyRightFunc, \
+ (TUint)EStdKeyCapsLock, \
+ (TUint)EStdKeyNumLock, \
+ (TUint)EStdKeyScrollLock, \
+ (TUint)EStdKeyF1, \
+ (TUint)EStdKeyF2, \
+ (TUint)EStdKeyF3, \
+ (TUint)EStdKeyF4, \
+ (TUint)EStdKeyF5, \
+ (TUint)EStdKeyF6, \
+ (TUint)EStdKeyF7, \
+ (TUint)EStdKeyF8, \
+ (TUint)EStdKeyF9, \
+ (TUint)EStdKeyF10, \
+ (TUint)EStdKeyF11, \
+ (TUint)EStdKeyF12, \
+ (TUint)EStdKeyF13, \
+ (TUint)EStdKeyF14, \
+ (TUint)EStdKeyF15, \
+ (TUint)EStdKeyF16, \
+ (TUint)EStdKeyF17, \
+ (TUint)EStdKeyF18, \
+ (TUint)EStdKeyF19, \
+ (TUint)EStdKeyF20, \
+ (TUint)EStdKeyF21, \
+ (TUint)EStdKeyF22, \
+ (TUint)EStdKeyF23, \
+ (TUint)EStdKeyF24, \
+ (TUint)EStdKeyXXX, \
+ (TUint)EStdKeyComma, \
+ (TUint)EStdKeyFullStop, \
+ (TUint)EStdKeyForwardSlash, \
+ (TUint)EStdKeyBackSlash, \
+ (TUint)EStdKeySemiColon, \
+ (TUint)EStdKeySingleQuote, \
+ (TUint)EStdKeyHash, \
+ (TUint)EStdKeySquareBracketLeft, \
+ (TUint)EStdKeySquareBracketRight, \
+ (TUint)EStdKeyMinus, \
+ (TUint)EStdKeyEquals, \
+ (TUint)EStdKeyNkpForwardSlash, \
+ (TUint)EStdKeyNkpAsterisk, \
+ (TUint)EStdKeyNkpMinus, \
+ (TUint)EStdKeyNkpPlus, \
+ (TUint)EStdKeyNkpEnter, \
+ (TUint)EStdKeyNkp1, \
+ (TUint)EStdKeyNkp2, \
+ (TUint)EStdKeyNkp3, \
+ (TUint)EStdKeyNkp4, \
+ (TUint)EStdKeyNkp5, \
+ (TUint)EStdKeyNkp6, \
+ (TUint)EStdKeyNkp7, \
+ (TUint)EStdKeyNkp8, \
+ (TUint)EStdKeyNkp9, \
+ (TUint)EStdKeyNkp0, \
+ (TUint)EStdKeyNkpFullStop, \
+ (TUint)EStdKeyMenu, \
+ (TUint)EStdKeyBacklightOn, \
+ (TUint)EStdKeyBacklightOff, \
+ (TUint)EStdKeyBacklightToggle, \
+ (TUint)EStdKeyIncContrast, \
+ (TUint)EStdKeyDecContrast, \
+ (TUint)EStdKeySliderDown, \
+ (TUint)EStdKeySliderUp, \
+ (TUint)EStdKeyDictaphonePlay, \
+ (TUint)EStdKeyDictaphoneStop, \
+ (TUint)EStdKeyDictaphoneRecord, \
+ (TUint)EStdKeyHelp, \
+ (TUint)EStdKeyOff, \
+ (TUint)EStdKeyDial, \
+ (TUint)EStdKeyIncVolume, \
+ (TUint)EStdKeyDecVolume, \
+ (TUint)EStdKeyDevice0, \
+ (TUint)EStdKeyDevice1, \
+ (TUint)EStdKeyDevice2, \
+ (TUint)EStdKeyDevice3, \
+ (TUint)EStdKeyDevice4, \
+ (TUint)EStdKeyDevice5, \
+ (TUint)EStdKeyDevice6, \
+ (TUint)EStdKeyDevice7, \
+ (TUint)EStdKeyDevice8, \
+ (TUint)EStdKeyDevice9, \
+ (TUint)EStdKeyDeviceA, \
+ (TUint)EStdKeyDeviceB, \
+ (TUint)EStdKeyDeviceC, \
+ (TUint)EStdKeyDeviceD, \
+ (TUint)EStdKeyDeviceE, \
+ (TUint)EStdKeyDeviceF, \
+ (TUint)EStdKeyApplication0, \
+ (TUint)EStdKeyApplication1, \
+ (TUint)EStdKeyApplication2, \
+ (TUint)EStdKeyApplication3, \
+ (TUint)EStdKeyApplication4, \
+ (TUint)EStdKeyApplication5, \
+ (TUint)EStdKeyApplication6, \
+ (TUint)EStdKeyApplication7, \
+ (TUint)EStdKeyApplication8, \
+ (TUint)EStdKeyApplication9, \
+ (TUint)EStdKeyApplicationA, \
+ (TUint)EStdKeyApplicationB, \
+ (TUint)EStdKeyApplicationC, \
+ (TUint)EStdKeyApplicationD, \
+ (TUint)EStdKeyApplicationE, \
+ (TUint)EStdKeyApplicationF, \
+ (TUint)EStdKeyYes, \
+ (TUint)EStdKeyNo, \
+ (TUint)EStdKeyIncBrightness, \
+ (TUint)EStdKeyDecBrightness, \
+ (TUint)EStdKeyKeyboardExtend, \
+ (TUint)EStdKeyDevice10, \
+ (TUint)EStdKeyDevice11, \
+ (TUint)EStdKeyDevice12, \
+ (TUint)EStdKeyDevice13, \
+ (TUint)EStdKeyDevice14, \
+ (TUint)EStdKeyDevice15, \
+ (TUint)EStdKeyDevice16, \
+ (TUint)EStdKeyDevice17, \
+ (TUint)EStdKeyDevice18, \
+ (TUint)EStdKeyDevice19, \
+ (TUint)EStdKeyDevice1A, \
+ (TUint)EStdKeyDevice1B, \
+ (TUint)EStdKeyDevice1C, \
+ (TUint)EStdKeyDevice1D, \
+ (TUint)EStdKeyDevice1E, \
+ (TUint)EStdKeyDevice1F, \
+ (TUint)EStdKeyApplication10, \
+ (TUint)EStdKeyApplication11, \
+ (TUint)EStdKeyApplication12, \
+ (TUint)EStdKeyApplication13, \
+ (TUint)EStdKeyApplication14, \
+ (TUint)EStdKeyApplication15, \
+ (TUint)EStdKeyApplication16, \
+ (TUint)EStdKeyApplication17, \
+ (TUint)EStdKeyApplication18, \
+ (TUint)EStdKeyApplication19, \
+ (TUint)EStdKeyApplication1A, \
+ (TUint)EStdKeyApplication1B, \
+ (TUint)EStdKeyApplication1C, \
+ (TUint)EStdKeyApplication1D, \
+ (TUint)EStdKeyApplication1E, \
+ (TUint)EStdKeyApplication1F, \
+ }
+
+/**
+ * Key modifier names definition macro.
+ */
+#define DefineModifiers( varName ) \
+ static TUint const varName[] = \
+ { \
+ (TUint)EModifierAutorepeatable, \
+ (TUint)EModifierKeypad, \
+ (TUint)EModifierLeftAlt, \
+ (TUint)EModifierRightAlt, \
+ (TUint)EModifierAlt, \
+ (TUint)EModifierLeftCtrl, \
+ (TUint)EModifierRightCtrl, \
+ (TUint)EModifierCtrl, \
+ (TUint)EModifierLeftShift, \
+ (TUint)EModifierRightShift, \
+ (TUint)EModifierShift, \
+ (TUint)EModifierLeftFunc, \
+ (TUint)EModifierRightFunc, \
+ (TUint)EModifierFunc, \
+ (TUint)EModifierCapsLock, \
+ (TUint)EModifierNumLock, \
+ (TUint)EModifierScrollLock, \
+ (TUint)EModifierKeyUp, \
+ (TUint)EModifierSpecial, \
+ (TUint)EModifierDoubleClick, \
+ (TUint)EModifierPureKeycode, \
+ (TUint)EModifierKeyboardExtend, \
+ (TUint)EModifierCancelRotation, \
+ (TUint)EModifierRotateBy90, \
+ (TUint)EModifierRotateBy180, \
+ (TUint)EModifierRotateBy270, \
+ (TUint)EModifierPointer3DButton1, \
+ (TUint)EModifierPointer3DButton2, \
+ (TUint)EModifierPointer3DButton3, \
+ (TUint)EAllModifiers, \
+ }
+
+/**
+ * Key modifiers definition macro.
+ */
+#define DefineModifierNames( varName ) \
+ static TText* const varName[] = \
+ { \
+ (TText*)L"estdkeynull", \
+ (TText*)L"emodifierautorepeatable", \
+ (TText*)L"emodifierkeypad", \
+ (TText*)L"emodifierleftalt", \
+ (TText*)L"emodifierrightalt", \
+ (TText*)L"emodifieralt", \
+ (TText*)L"emodifierleftctrl", \
+ (TText*)L"emodifierrightctrl", \
+ (TText*)L"emodifierctrl", \
+ (TText*)L"emodifierleftshift", \
+ (TText*)L"emodifierrightshift", \
+ (TText*)L"emodifiershift", \
+ (TText*)L"emodifierleftfunc", \
+ (TText*)L"emodifierrightfunc", \
+ (TText*)L"emodifierfunc", \
+ (TText*)L"emodifiercapslock", \
+ (TText*)L"emodifiernumlock", \
+ (TText*)L"emodifierscrolllock", \
+ (TText*)L"emodifierkeyup", \
+ (TText*)L"emodifierspecial", \
+ (TText*)L"emodifierdoubleclick", \
+ (TText*)L"emodifierpurekeycode", \
+ (TText*)L"emodifierkeyboardextend", \
+ (TText*)L"emodifiercancelrotation", \
+ (TText*)L"emodifierrotateby90", \
+ (TText*)L"emodifierrotateby180", \
+ (TText*)L"emodifierrotateby270", \
+ (TText*)L"emodifierpointer3dbutton1", \
+ (TText*)L"emodifierpointer3dbutton2", \
+ (TText*)L"emodifierpointer3dbutton3", \
+ (TText*)L"eallmodifiers", \
+ }
+
+
+/**
+ * Pointer event type names definition macro
+ */
+#define DefinePointerEventTypeNames( varName ) \
+ static TText* const varName[] = \
+ { \
+ (TText*)L"epointermove", \
+ (TText*)L"epointerswitchon", \
+ (TText*)L"ebutton1down", \
+ (TText*)L"ebutton1up", \
+ (TText*)L"ebutton2down", \
+ (TText*)L"ebutton2up", \
+ (TText*)L"ebutton3down", \
+ (TText*)L"ebutton3up", \
+ (TText*)L"ebutton1", \
+ (TText*)L"ebutton2", \
+ (TText*)L"ebutton3", \
+ }
+
+/**
+ * Pointer event type codes definition macro.
+ */
+#define DefinePointerEventTypes( varName ) \
+ static TInt const varName[] = \
+ { \
+ (TUint)TRawEvent::EPointerMove, \
+ (TUint)TRawEvent::EPointerSwitchOn, \
+ (TUint)TRawEvent::EButton1Down, \
+ (TUint)TRawEvent::EButton1Up, \
+ (TUint)TRawEvent::EButton2Down, \
+ (TUint)TRawEvent::EButton2Up, \
+ (TUint)TRawEvent::EButton3Down, \
+ (TUint)TRawEvent::EButton3Up, \
+ (TUint)TEventUtil::EButton1, \
+ (TUint)TEventUtil::EButton2, \
+ (TUint)TEventUtil::EButton3, \
+ }
+
+// LOCAL CONSTANTS AND MACROS
+// None
+
+// MODULE DATA STRUCTURES
+// None
+
+// LOCAL FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+// None
+
+// ================= MEMBER FUNCTIONS =========================================
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: TEventUtil
+
+ Method: GetKeyCodeName
+
+ Description: Gets key name.
+
+ Returns selected key name.
+
+ Parameters: TUint aKeyCode: out: Key code.
+
+ Return Values: Key name.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TPtrC TEventUtil::GetKeyCodeName( TUint aKeyCode )
+ {
+ DefineKeyCodeNames( keyCodeNames );
+ DefineKeyCodes( keyCodes );
+ int keyCodeNamesCount = (sizeof( keyCodeNames )/sizeof(TText*));
+
+ for ( int i = 0; i < keyCodeNamesCount; i++ ) {
+ if ( keyCodes[ i ] == aKeyCode )
+ {
+ return keyCodeNames[ i ];
+ }
+ }
+
+ return NULL;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: TEventUtil
+
+ Method: GetKeyScanCodeName
+
+ Description: Gets key scan code name.
+
+ Returns selected key scan code name.
+
+ Parameters: TUint aKeyCode: out: Key scan code.
+
+ Return Values: Key scan code name.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TPtrC TEventUtil::GetKeyScanCodeName( TInt aKeyScanCode )
+ {
+ DefineKeyScanCodeNames( keyScanCodeNames );
+ DefineKeyScanCodes( keyScanCodes );
+ int keyScanCodeNamesCount = (sizeof( keyScanCodeNames )/sizeof(TText*));
+
+ for ( int i = 0; i < keyScanCodeNamesCount; i++ ) {
+ if ( keyScanCodes[ i ] == aKeyScanCode )
+ {
+ return keyScanCodeNames[ i ];
+ }
+ }
+
+ return NULL;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: TEventUtil
+
+ Method: GetModifierName
+
+ Description: Gets key modifier name.
+
+ Returns selected key modifier name.
+
+ Parameters: TUint aModifier: out: Key modifier.
+
+ Return Values: Key modifier name.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TPtrC TEventUtil::GetModifierName( TUint aModifier )
+ {
+ DefineModifierNames( modifierNames );
+ DefineModifiers( modifiers );
+ int modifierNamesCount = (sizeof( modifierNames )/sizeof(TText*));
+
+ for ( int i = 0; i < modifierNamesCount; i++ ) {
+ if ( modifiers[ i ] == aModifier )
+ {
+ return modifierNames[ i ];
+ }
+ }
+
+ return NULL;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: TEventUtil
+
+ Method: ParseKeyCode
+
+ Description: Parses key code.
+
+ Parses key code.
+
+ Parameters: TDesC& aKeyCodeName: in: Key code name.
+ TUint& aKeyCode: out: Parsed key code.
+
+ Return Values: KErrNone if key code was parsed successfuly,
+ KErrNotFound in other case.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt TEventUtil::ParseKeyCode( const TDesC& aKeyCodeName, TUint& aKeyCode )
+ {
+ DefineKeyCodeNames( keyCodeNames );
+ DefineKeyCodes( keyCodes );
+ int keyCodeNamesCount = (sizeof( keyCodeNames )/sizeof(TText*));
+
+ TBuf<64> keyCodeNameLowerCase( aKeyCodeName );
+ keyCodeNameLowerCase.LowerCase();
+ for ( int i = 0; i < keyCodeNamesCount; i++ ) {
+ if ( TPtrC( keyCodeNames[ i ] ).Compare( keyCodeNameLowerCase ) == 0 )
+ {
+ aKeyCode = keyCodes[ i ];
+ return KErrNone;
+ }
+ }
+
+ return KErrNotFound;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: TEventUtil
+
+ Method: ParseKeyScanCode
+
+ Description: Parses key scan code.
+
+ Parses key scan code.
+
+ Parameters: TDesC& aKeyScanCodeName: in: Key scan code name.
+ TUint& aKeyScanCode: out: Parsed key scan code.
+
+ Return Values: KErrNone if key scan code was parsed successfuly,
+ KErrNotFound in other case.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt TEventUtil::ParseKeyScanCode( const TDesC& aKeyScanCodeName, TInt& aKeyScanCode )
+ {
+ DefineKeyScanCodeNames( keyScanCodeNames );
+ DefineKeyScanCodes( keyScanCodes );
+ int keyScanCodeNamesCount = (sizeof( keyScanCodeNames )/sizeof(TText*));
+
+ TBuf<64> keyScanCodeNameLowerCase( aKeyScanCodeName );
+ keyScanCodeNameLowerCase.LowerCase();
+ for ( int i = 0; i < keyScanCodeNamesCount; i++ ) {
+ if ( TPtrC( keyScanCodeNames[ i ] ).Compare( keyScanCodeNameLowerCase ) == 0 )
+ {
+ aKeyScanCode = keyScanCodes[ i ];
+ return KErrNone;
+ }
+ }
+
+ return KErrNotFound;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: TEventUtil
+
+ Method: ParseModifier
+
+ Description: Parses key modifier.
+
+ Parses key modifier.
+
+ Parameters: TDesC& aModifierName: in: Key modifier name.
+ TUint& aModifier: out: Parsed key modifier.
+
+ Return Values: KErrNone if key modifier was parsed successfuly,
+ KErrNotFound in other case.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt TEventUtil::ParseModifier( const TDesC& aModifierName, TUint& aModifier )
+ {
+ DefineModifierNames( modifierNames );
+ DefineModifiers( modifiers );
+ int modifierNamesCount = (sizeof( modifierNames )/sizeof(TText*));
+
+ TBuf<64> modifierNameLowerCase( aModifierName );
+ modifierNameLowerCase.LowerCase();
+ for ( int i = 0; i < modifierNamesCount; i++ ) {
+ if ( TPtrC( modifierNames[ i ] ).Compare( modifierNameLowerCase ) == 0 )
+ {
+ aModifier = modifiers[ i ];
+ return KErrNone;
+ }
+ }
+
+ return KErrNotFound;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CAknUiEnvProxy
+
+ Method: ParsePointerEventType
+
+ Description: Parses pointer event type.
+
+ Parses key modifier.
+
+ Parameters: const TDesC& aPointerEventTypeName: in: Pointer event type.
+ TUint& aModifier: out: Parsed pointer event type.
+
+ Return Values: KErrNone if no error occures during parsing.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt TEventUtil::ParsePointerEventType( const TDesC& aPointerEventTypeName, TUint& aPointerEventType )
+ {
+ DefinePointerEventTypeNames( pointerEventTypeNames );
+ DefinePointerEventTypes( pointerEventTypes );
+ int pointerEventTypeNamesCount = (sizeof( pointerEventTypeNames )/sizeof(TText*));
+
+ TBuf<64> pointerEventTypeNamesLowerCase( aPointerEventTypeName );
+ pointerEventTypeNamesLowerCase.LowerCase();
+ for ( int i = 0; i < pointerEventTypeNamesCount; i++ ) {
+ if ( TPtrC( pointerEventTypeNames[ i ] ).Compare( pointerEventTypeNamesLowerCase ) == 0 )
+ {
+ aPointerEventType = pointerEventTypes[ i ];
+ return KErrNone;
+ }
+ }
+
+ return KErrNotFound;
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/src/TestServerThreadStarter.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,393 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This module contains the implementation of
+* CTestServerThreadStarter class member functions.
+*
+*/
+
+// INCLUDE FILES
+#include "TestServerThreadStarter.h"
+#include <stifinternal/TestServerClient.h>
+
+// EXTERNAL DATA STRUCTURES
+// None
+
+// EXTERNAL FUNCTION PROTOTYPES
+// None
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+/**
+ * CTestServerThreadStarter thread heap size.
+ */
+const TUint KDefaultHeapSize = 0x10000; // 64 K
+
+/**
+ * CTestServerThreadStarter thread max heap size.
+ */
+const TUint KMaxHeapSize = 0x20000; // 128 K
+
+// LOCAL CONSTANTS AND MACROS
+// None
+
+// MODULE DATA STRUCTURES
+// None
+
+// LOCAL FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+// None
+
+
+// ================= MEMBER FUNCTIONS =========================================
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CTestServerThreadStarter
+
+ Method: TestServerStarterThreadFunction
+
+ Description: CTestServerThreadStarter thread function.
+
+ CTestServerThreadStarter thread function in which testserver creation code
+ is executed.
+
+ Parameters: TAny* aParameters: in: Pointer to CTestServerThreadStarter object
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt CTestServerThreadStarter::TestServerStarterThreadFunction( TAny* aParameters )
+ {
+ RDebug::Printf( "UITESTING: CTestServerThreadStarter::TestServerStarterThreadFunction" );
+
+ CTestServerThreadStarter* testServerStarter = (CTestServerThreadStarter*)aParameters;
+ TThreadId mainThreadId = testServerStarter->iMainThreadId;
+ CTestThreadContainerRunnerFactory* testThreadContainerRunnerFactory =
+ testServerStarter->iTestThreadContainerRunnerFactory;
+
+ // Signal that all needed data is copied and main thread can continue its execution
+ testServerStarter->iServerThreadStartedSemaphore.Signal();
+
+ // Get module name from command line
+ const TInt length = User().CommandLineLength();
+
+ HBufC* cmdLine = HBufC::New( length );
+
+ if ( cmdLine == NULL )
+ {
+ return KErrNoMemory;
+ }
+
+ TPtr moduleName = cmdLine->Des();
+
+ User().CommandLine( moduleName );
+
+ RDebug::Print(_L("CTestServerThreadStarter::TestServerStarterThreadFunction() Received data [%S]"), &moduleName);
+
+ // Extract semaphore name passed in data
+ TInt index = moduleName.Find(_L(" "));
+ RDebug::Print(_L("CTestServerThreadStarter::TestServerStarterThreadFunction() Space separator found at position [%d]"), index);
+ TPtrC semaphoreName = moduleName.Mid(index + 1);
+ moduleName = moduleName.Left(index);
+
+ RDebug::Print(_L("CTestServerThreadStarter::TestServerStarterThreadFunction() Extracted module name [%S] and sempahore name [%S]"), &moduleName, &semaphoreName);
+
+ // Open start-up synchronization semaphore
+ RSemaphore startup;
+ RDebug::Print(_L(" Openingstart-up semaphore"));
+ //TName semaphoreName = _L("startupSemaphore");
+ //semaphoreName.Append( moduleName );
+
+ TInt res = startup.OpenGlobal(semaphoreName);
+ RDebug::Print(_L("Opening result %d"), res);
+
+
+ TFileName serverName;
+ TInt r = StartNewServer ( moduleName, serverName, EFalse, startup, true, testThreadContainerRunnerFactory );
+
+ if ( r == KErrAlreadyExists )
+ {
+ // Ok, server was already started
+ RDebug::Print(_L("UI TestServer already started, signaling semaphore and exiting"));
+ startup.Signal();
+
+ delete cmdLine;
+
+ return KErrNone;
+ }
+ else
+ {
+ RDebug::Print(_L("UI TestServer is finished, code %d"), r);
+ }
+
+ delete cmdLine;
+
+ //delete testThreadContainerRunnerFactory;
+ testThreadContainerRunnerFactory = NULL;
+
+ // Kill main thread to end UITestServerStarter application
+ // when testserver is finished
+ RThread mainThread;
+ TInt ret = mainThread.Open( mainThreadId );
+ if( ret != KErrNone )
+ {
+ User::Panic( _L("ThreadHandleOpenError"), ret );
+ }
+ mainThread.Kill( KErrNone );
+
+ return r;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CTestServerThreadStarter
+
+ Method: NewL
+
+ Description: NewL is first phase of two-phased constructor.
+
+ NewL is first phase of two-phased constructor.
+
+ Parameters: None.
+
+ Return Values: Pointer to new CTestServerThreadStarter object.
+
+ Errors/Exceptions: Leaves if new or ConstructL leaves.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CTestServerThreadStarter* CTestServerThreadStarter::NewL( )
+ {
+ CTestServerThreadStarter* self = new(ELeave) CTestServerThreadStarter();
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CTestServerThreadStarter
+
+ Method: CTestServerThreadStarter
+
+ Description: Default constructor.
+
+ Default constructor.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CTestServerThreadStarter::CTestServerThreadStarter()
+:CActive( EPriorityNormal )
+ {
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CTestServerThreadStarter
+
+ Method: NewL
+
+ Description: Default destructor.
+
+ Default destructor.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CTestServerThreadStarter::~CTestServerThreadStarter()
+ {
+ Cancel();
+ iTimer.Close();
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CTestServerThreadStarter
+
+ Method: ConstructL
+
+ Description: Second phase of two-phased constructor.
+
+ Second phase of two-phased constructor.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CTestServerThreadStarter::ConstructL()
+ {
+ TInt ret = iTimer.CreateLocal();
+ if ( ret != KErrNone )
+ {
+ User::Leave( ret );
+ }
+
+ CActiveScheduler::Add( this );
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CTestServerThreadStarter
+
+ Method: RunTestServerThread
+
+ Description: Starts-up testserver.
+
+ Starts-up testserver.
+
+ Parameters: None.
+
+ Return Values: KErrNone when there was no error.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TInt CTestServerThreadStarter::RunTestServerThread( CTestThreadContainerRunnerFactory* aTestThreadContainerRunnerFactory )
+ {
+ if ( IsActive() )
+ {
+ User::Panic( _L("E32USER-CBase"), 42 );
+ }
+
+ TInt ret = iServerThreadStartedSemaphore.CreateLocal( 0 );
+ if ( ret != KErrNone )
+ {
+ User::Leave( ret );
+ }
+
+ iTestThreadContainerRunnerFactory = aTestThreadContainerRunnerFactory;
+ iMainThreadId = RThread().Id();
+ iReturnCode = KErrNone;
+
+ iStatus = KRequestPending;
+
+ SetActive();
+ iTimer.After( iStatus, 0 );
+
+ return KErrNone;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CTestServerThreadStarter
+
+ Method: RunL
+
+ Description: RunL derived from CActive handles the completed requests.
+
+ RunL derived from CActive handles the completed requests.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: Leaves if one of the called method leavs.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CTestServerThreadStarter::RunL()
+ {
+ RThread testServerStarterThread;
+ TInt ret = testServerStarterThread.Create( _L("testserverstarterthread"),
+ TestServerStarterThreadFunction, 10 * KDefaultStackSize, 10 * KDefaultHeapSize, 10 * KMaxHeapSize, this );
+
+ User::LeaveIfError( ret );
+
+ testServerStarterThread.Resume();
+ testServerStarterThread.Close();
+
+ iServerThreadStartedSemaphore.Wait();
+ iServerThreadStartedSemaphore.Close();
+
+ // Delete CTestServerThreadStarter after testserver is started
+ delete this;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CTestServerThreadStarter
+
+ Method: DoCancel
+
+ Description: DoCancel derived from CActive handles the Cancel.
+
+ DoCancel derived from CActive handles the Cancel.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CTestServerThreadStarter::DoCancel()
+ {
+ if ( IsActive() )
+ {
+ iTimer.Cancel();
+ }
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/src/UITestServerStarter.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This module contains the implementation of application
+* main function.
+*
+*/
+
+// INCLUDE FILES
+#include <eikstart.h>
+#include "UITestServerStarterAppUi.h"
+#include "UITestServerStarterApplication.h"
+#include <eikenv.h>
+
+// EXTERNAL DATA STRUCTURES
+// None
+
+// EXTERNAL FUNCTION PROTOTYPES
+// None
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// LOCAL CONSTANTS AND MACROS
+// None
+
+// MODULE DATA STRUCTURES
+// None
+
+// LOCAL FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+// None
+
+/**
+ * Application factory function.
+ */
+LOCAL_C CApaApplication* NewApplication()
+ {
+ return new CUITestServerStarterApplication;
+ }
+
+// ================= MEMBER FUNCTIONS =========================================
+/**
+ * Application main function.
+ */
+GLDEF_C TInt E32Main()
+ {
+
+ RDebug::Printf( "UITESTING: UITestServerStarter - E32Main" );
+
+ TInt ret = EikStart::RunApplication( NewApplication );
+
+ RDebug::Printf( "UITESTING: UITestServerStarter - E32Main End" );
+
+ return ret;
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/src/UITestServerStarterAppContainer.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,291 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This module contains the implementation of
+* CUITestServerStarterAppContainer class member functions.
+*
+*/
+
+// INCLUDE FILES
+#include "UITestServerStarterAppContainer.h"
+#include <AknsDrawUtils.h>
+#include <AknsBasicBackgroundControlContext.h>
+#include <AknDef.h>
+#include <AknUtils.h>
+
+// EXTERNAL DATA STRUCTURES
+// None
+
+// EXTERNAL FUNCTION PROTOTYPES
+// None
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// LOCAL CONSTANTS AND MACROS
+// None
+
+// MODULE DATA STRUCTURES
+// None
+
+// LOCAL FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+// None
+
+
+// ================= MEMBER FUNCTIONS =========================================
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppContainer
+
+ Method: NewL
+
+ Description: NewL is first phase of two-phased constructor.
+
+ NewL is first phase of two-phased constructor.
+
+ Parameters: const TRect& aRect: container rectangle.
+
+ Return Values: Pointer to new CUITestServerStarterAppContainer object.
+
+ Errors/Exceptions: Leave if one of the called functions leaves.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CUITestServerStarterAppContainer* CUITestServerStarterAppContainer::NewL( const TRect& aRect )
+ {
+ CUITestServerStarterAppContainer* self = NewLC( aRect );
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppContainer
+
+ Method: NewLC
+
+ Description: NewL is first phase of two-phased constructor.
+
+ NewL is first phase of two-phased constructor.
+
+ Parameters: const TRect& aRect: container rect
+
+ Return Values: Pointer to new CUITestServerStarterAppContainer object.
+
+ Errors/Exceptions: Leave if one of the called functions leaves.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CUITestServerStarterAppContainer* CUITestServerStarterAppContainer::NewLC( const TRect& aRect )
+ {
+ CUITestServerStarterAppContainer* self =
+ new(ELeave)CUITestServerStarterAppContainer;
+ CleanupStack::PushL( self );
+ self->ConstructL( aRect );
+ return self;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppContainer
+
+ Method: CUITestServerStarterAppContainer
+
+ Description: C++ constructor.
+
+ C++ constructor.
+
+ Parameters: None
+
+ Return Values: None
+
+ Errors/Exceptions: None
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CUITestServerStarterAppContainer::CUITestServerStarterAppContainer()
+ {
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppContainer
+
+ Method: CUITestServerStarterAppContainer
+
+ Description: C++ destructor.
+
+ C++ destructor.
+
+ Parameters: None
+
+ Return Values: None
+
+ Errors/Exceptions: None
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CUITestServerStarterAppContainer::~CUITestServerStarterAppContainer()
+ {
+ delete iBgContext;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppContainer
+
+ Method: ConstructL
+
+ Description: ConstructL is second phase of two-phased constructor.
+
+ ConstructL is second phase of two-phased constructor.
+
+ Parameters: const TRect& aRect: container rectangle.
+
+ Return Values: None
+
+ Errors/Exceptions: Leave if one of the called functions leaves.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppContainer::ConstructL( const TRect& aRect )
+ {
+ CreateWindowL();
+
+ iBgContext = CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgAreaMain, aRect, ETrue );
+
+ SetRect( aRect );
+ ActivateL();
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppContainer
+
+ Method: Draw
+
+ Description: Draws the control.
+
+ Draws the control.
+
+ Parameters: const TRect& aRect: rectangle which should be redrawn.
+
+ Return Values: None
+
+ Errors/Exceptions: None
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppContainer::Draw( const TRect& aRect ) const
+ {
+ // Get the standard graphics context
+ CWindowGc& gc = SystemGc();
+
+ // Redraw the background using the default skin
+ MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+ MAknsControlContext* controlContext = AknsDrawUtils::ControlContext( this );
+ AknsDrawUtils::Background( skin, controlContext, this, gc, aRect );
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppContainer
+
+ Method: SizeChanged
+
+ Description: Responds to changes to the size and position of the contents of this control
+
+ Responds to changes to the size and position of the
+ contents of this control
+
+ Parameters: None
+
+ Return Values: None
+
+ Errors/Exceptions: None
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppContainer::SizeChanged()
+ {
+ if ( iBgContext )
+ {
+ iBgContext->SetRect( Rect() );
+ if ( &Window() )
+ {
+ iBgContext->SetParentPos( PositionRelativeToScreen() );
+ }
+ }
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppContainer
+
+ Method: MopSupplyObject
+
+ Description: This function is used to allow controls to ask their owners for access to other objects that they own
+
+ This function is used to allow controls to ask their owners
+ for access to other objects that they own
+
+ Parameters: TTypeUid aId: requested object type id.
+
+ Return Values: Pointer to requested object.
+
+ Errors/Exceptions: None
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TTypeUid::Ptr CUITestServerStarterAppContainer::MopSupplyObject( TTypeUid aId )
+ {
+ if ( iBgContext )
+ {
+ return MAknsControlContext::SupplyMopObject( aId, iBgContext );
+ }
+ return CCoeControl::MopSupplyObject( aId );
+ }
+
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/src/UITestServerStarterAppUi.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,508 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This module contains the implementation of
+* CUITestServerStarterAppUi class member functions.
+*
+*/
+
+// INCLUDE FILES
+#include <avkon.hrh>
+#include <aknmessagequerydialog.h>
+#include <aknnotewrappers.h>
+#include <StringLoader.h>
+#include <f32file.h>
+#include <s32file.h>
+#include <hlplch.h>
+
+#include <UITestServerStarter.rsg>
+
+#include "UITestServerStarter.hrh"
+#include "UITestServerStarterAppUi.h"
+#include "UITestServerStarterAppView.h"
+
+#include "TestServerThreadStarter.h"
+#include <stifinternal/TestThreadContainerRunnerFactory.h>
+#include "AknUiEnvProxy.h"
+
+// EXTERNAL DATA STRUCTURES
+// None
+
+// EXTERNAL FUNCTION PROTOTYPES
+// None
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// LOCAL CONSTANTS AND MACROS
+// None
+
+// MODULE DATA STRUCTURES
+// None
+
+// LOCAL FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+// None
+
+// ================= MEMBER FUNCTIONS =========================================
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppUi
+
+ Method: ConstructL
+
+ Description: ConstructL is second phase of two-phased constructor.
+
+ ConstructL is second phase of two-phased constructor.
+
+ Parameters: None
+
+ Return Values: None.
+
+ Errors/Exceptions: Leaves if one of called functions leave.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppUi::ConstructL()
+ {
+ RDebug::Printf( "UITESTING: CUITestServerStarterAppUi::ConstructL - Begin" );
+
+ // Initialise app UI with standard value.
+ BaseConstructL( ENoAppResourceFile || CAknAppUi::EAknEnableSkin );
+
+ CEikonEnv::Static()->DisableExitChecks( true );
+
+ // Create view object
+ iAppView = CUITestServerStarterAppView::NewL();
+
+ AddViewL( iAppView );
+ SetDefaultViewL( *iAppView );
+
+ CAknUiEnvProxy* uiEnvProxy = CAknUiEnvProxy::NewL( this );
+
+ CTestThreadContainerRunnerFactory* testThreadContainerRunnerFactory =
+ CTestThreadContainerRunnerFactory::NewL( RThread().Id(), CActiveScheduler::Current(), uiEnvProxy );
+
+ RDebug::Printf( "UITESTING: CUITestServerStarterAppUi::ConstructL - Starting TestServer" );
+ CTestServerThreadStarter* testServerThreadStarter = CTestServerThreadStarter::NewL( );
+ testServerThreadStarter->RunTestServerThread( testThreadContainerRunnerFactory );
+
+ RDebug::Printf( "UITESTING: CUITestServerStarterAppUi::ConstructL - Move to background" );
+
+ TApaTask task( CCoeEnv::Static()->WsSession() );
+ task.SetWgId( CCoeEnv::Static()->RootWin().Identifier() );
+ task.SendToBackground();
+
+ RDebug::Printf( "UITESTING: CUITestServerStarterAppUi::ConstructL - End" );
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppUi
+
+ Method: CUITestServerStarterAppUi
+
+ Description: C++ default constructor can NOT contain any code, that might leave.
+
+ C++ default constructor can NOT contain any code, that might leave.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CUITestServerStarterAppUi::CUITestServerStarterAppUi()
+ {
+ // No implementation required
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppUi
+
+ Method: ~CUITestServerStarterAppUi
+
+ Description: C++ destructor.
+
+ C++ destructor.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CUITestServerStarterAppUi::~CUITestServerStarterAppUi()
+ {
+ // No implementation required
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppUi
+
+ Method: HandleCommandL
+
+ Description: Handles user commands.
+
+ Derived from CCoeAppUi. Handles user commands.
+
+ Parameters: TInt aCommand: in: User command code.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppUi::HandleCommandL( TInt )
+ {
+ // No implementation required
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppUi
+
+ Method: HandleWsEventL
+
+ Description: Handles window server event.
+
+ Derived from CCoeAppUi. Handles window server event.
+
+ Parameters: const TWsEvent& aEvent: in: Event.
+ CCoeControl* aDestination: in: Destination control.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppUi::HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination )
+ {
+ CAknAppUi::HandleWsEventL( aEvent, aDestination );
+
+ if ( ( aEvent.Type() == EEventKey ) )
+ {
+ switch( iEventType )
+ {
+ case EPressKey:
+ {
+ if ( iEventStatus != NULL )
+ {
+ KeyPressHandled();
+ }
+ }
+ break;
+ case ETypeText:
+ {
+ iTypeTextLength--;
+ if ( ( iEventStatus != NULL ) && ( iTypeTextLength == 0 ) )
+ {
+ TextTypeHandled();
+ }
+ }
+ break;
+ }
+ }
+ else if ( aEvent.Type() == EEventPointer )
+ {
+ if ( iEventType == EPointerEvent )
+ {
+ PointerEventHandled();
+ }
+ }
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppUi
+
+ Method: PrepareToTypeText
+
+ Description: Prepares AppUi to recive type text event
+
+ Prepares AppUi to recive type text event
+
+ Parameters: TInt aTextLength: in: Text length.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppUi::PrepareToTypeText( TInt aTextLength )
+ {
+ iTypeTextLength = aTextLength;
+ iEventType = ETypeText;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppUi
+
+ Method: PrepareToPressKey
+
+ Description: Prepares AppUi to recive key press event
+
+ Prepares AppUi to recive key press event
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppUi::PrepareToPressKey()
+ {
+ iEventType = EPressKey;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppUi
+
+ Method: PrepareToPointerEvent
+
+ Description: Prepares AppUi to recive pointer event
+
+ Prepares AppUi to recive key press event
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppUi::PrepareToPointerEvent()
+ {
+ iEventType = EPointerEvent;
+ }
+
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppUi
+
+ Method: KeyPressHandled
+
+ Description: Sends notification that key press was handled.
+
+ Notifies client that key press was handled.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppUi::KeyPressHandled()
+ {
+ if ( ( iEventType == EPressKey ) && ( iEventStatus != NULL ) && ( iEventType == EPressKey ) )
+ {
+ iEventType = ENone;
+ User::RequestComplete( iEventStatus, KErrNone );
+ iEventStatus = NULL;
+ }
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppUi
+
+ Method: TextTypeHandled
+
+ Description: Sends notification that type text was handled.
+
+ Notifies client that type text was handled.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppUi::TextTypeHandled()
+ {
+ if ( ( iEventType == ETypeText ) && ( iEventStatus != NULL ) && ( iEventType == ETypeText ) )
+ {
+ iEventType = ENone;
+ iTypeTextLength = 0;
+ User::RequestComplete( iEventStatus, KErrNone );
+ iEventStatus = NULL;
+ }
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppUi
+
+ Method: PointerEventHandled
+
+ Description: Sends notification that pointer event was handled.
+
+ Notifies client that pointer event was handled.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppUi::PointerEventHandled()
+ {
+ if ( ( iEventType == EPointerEvent ) && ( iEventStatus != NULL ) )
+ {
+ iEventType = ENone;
+ User::RequestComplete( iEventStatus, KErrNone );
+ iEventStatus = NULL;
+ }
+ }
+
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppUi
+
+ Method: NotifyAboutHandledKeyPress
+
+ Description: Requests notification of press key completion.
+
+ Requests notification of press key completion.
+
+ Parameters: TRequestStatus* aStatus: in: Request status pointer.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppUi::NotifyAboutHandledKeyPress( TRequestStatus* aStatus )
+ {
+ iEventStatus = aStatus;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppUi
+
+ Method: NotifyAboutHandledTextType
+
+ Description: Requests notification when text type event is handled.
+
+ Requests notification when text type event is handled.
+
+ Parameters: TRequestStatus* aStatus: in: Request status pointer.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppUi::NotifyAboutHandledTextType( TRequestStatus* aStatus )
+ {
+ iEventStatus = aStatus;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppUi
+
+ Method: NotifyAboutHandledPointerEvent
+
+ Description: Requests notification when pointer event is handled.
+
+ Requests notification when pointer event is handled.
+
+ Parameters: TRequestStatus* aStatus: in: Request status pointer.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppUi::NotifyAboutHandledPointerEvent( TRequestStatus* aStatus )
+ {
+ iEventStatus = aStatus;
+ }
+
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/src/UITestServerStarterAppView.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,345 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+* Description: This module contains the
+* implementation of CUITestServerStarterAppView class member
+* functions.
+*
+*/
+
+// INCLUDE FILES
+#include <coemain.h>
+#include <aknViewAppUi.h>
+#include "UITestServerStarterAppView.h"
+#include "UITestServerStarterApplication.h"
+#include "UITestServerStarterAppContainer.h"
+
+// EXTERNAL DATA STRUCTURES
+// None
+
+// EXTERNAL FUNCTION PROTOTYPES
+// None
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// LOCAL CONSTANTS AND MACROS
+// None
+
+// MODULE DATA STRUCTURES
+// None
+
+// LOCAL FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+// None
+
+
+// ================= MEMBER FUNCTIONS =========================================
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppView
+
+ Method: NewL
+
+ Description: NewL is first phase of two-phased constructor.
+
+ NewL is first phase of two-phased constructor.
+
+ Parameters: None
+
+ Return Values: Pointer to new CUITestServerStarterAppView object.
+
+ Errors/Exceptions: Leave if one of the called functions leaves.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CUITestServerStarterAppView* CUITestServerStarterAppView::NewL()
+ {
+ CUITestServerStarterAppView* self = CUITestServerStarterAppView::NewLC();
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppView
+
+ Method: NewLC
+
+ Description: NewL is first phase of two-phased constructor.
+
+ NewL is first phase of two-phased constructor.
+
+ Parameters: None
+
+ Return Values: Pointer to new CUITestServerStarterAppView object.
+
+ Errors/Exceptions: Leave if one of the called functions leaves.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CUITestServerStarterAppView* CUITestServerStarterAppView::NewLC()
+ {
+ CUITestServerStarterAppView* self = new ( ELeave ) CUITestServerStarterAppView;
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ return self;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppView
+
+ Method: ConstructL
+
+ Description: ConstructL is second phase of two-phased constructor.
+
+ ConstructL is second phase of two-phased constructor.
+
+ Parameters: None
+
+ Return Values: None
+
+ Errors/Exceptions: Leave if one of the called functions leaves.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppView::ConstructL()
+ {
+ BaseConstructL( 0 );
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppView
+
+ Method: CUITestServerStarterAppView
+
+ Description: C++ constructor.
+
+ C++ constructor.
+
+ Parameters: None
+
+ Return Values: None
+
+ Errors/Exceptions: None
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CUITestServerStarterAppView::CUITestServerStarterAppView()
+ {
+ // No implementation required
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppView
+
+ Method: CUITestServerStarterAppView
+
+ Description: C++ destructor.
+
+ C++ destructor.
+
+ Parameters: None
+
+ Return Values: None
+
+ Errors/Exceptions: None
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CUITestServerStarterAppView::~CUITestServerStarterAppView()
+ {
+ if ( iContainer )
+ {
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ }
+
+ delete iContainer;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppView
+
+ Method: Id
+
+ Description: Returns view Uid.
+
+ Returns view Uid.
+
+ Parameters: None
+
+ Return Values: View Uid
+
+ Errors/Exceptions: None
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TUid CUITestServerStarterAppView::Id() const
+ {
+ return KMainViewId;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppView
+
+ Method: HandleCommandL
+
+ Description: Handle Commands.
+
+ Handle Commands.
+
+ Parameters: TInt aCommand: command id
+
+ Return Values: None
+
+ Errors/Exceptions: None
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppView::HandleCommandL( TInt aCommand )
+ {
+ AppUi()->HandleCommandL( aCommand );
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppView
+
+ Method: HandleClientRectChange
+
+ Description: Handle size changes.
+
+ Handle size changes.
+
+ Parameters: None
+
+ Return Values: None
+
+ Errors/Exceptions: None
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppView::HandleClientRectChange()
+ {
+ if ( iContainer )
+ {
+ iContainer->SetRect( ClientRect() );
+ }
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppView
+
+ Method: DoActivateL
+
+ Description: From AknView, Activates view.
+
+ From AknView, Activates view.
+
+ Parameters: const TVwsViewId& aPrevViewId: previouse view id
+ TUid aCustomMessageId: custom message id
+ const TDesC8& aCustomMessage: custom message data
+
+ Return Values: None
+
+ Errors/Exceptions: None
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppView::DoActivateL(
+ const TVwsViewId& /*aPrevViewId*/, TUid /*aCustomMessageId*/,
+ const TDesC8& /*aCustomMessage*/)
+ {
+ if ( !iContainer )
+ {
+ // Create view container
+ iContainer = CUITestServerStarterAppContainer::NewL( ClientRect() );
+ iContainer->SetMopParent( this );
+ // Add container to view stack
+ AppUi()->AddToStackL( *this, iContainer );
+ }
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterAppView
+
+ Method: DoDeactivate
+
+ Description: From AknView, Deactivates view.
+
+ From AknView, Deactivates view.
+
+ Parameters: None
+
+ Return Values: None
+
+ Errors/Exceptions: None
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterAppView::DoDeactivate()
+ {
+ if ( iContainer )
+ {
+ // Remove container from view stack
+ AppUi()->RemoveFromViewStack( *this, iContainer );
+ }
+
+ // Delete container since it's not longer needed.
+ delete iContainer;
+ iContainer = NULL;
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/src/UITestServerStarterApplication.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This module contains the implementation of
+* CUITestServerStarterApplication class member functions.
+*
+*/
+
+// INCLUDE FILES
+#include "UITestServerStarter.hrh"
+#include "UITestServerStarterDocument.h"
+#include "UITestServerStarterApplication.h"
+
+// EXTERNAL DATA STRUCTURES
+// None
+
+// EXTERNAL FUNCTION PROTOTYPES
+// None
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// LOCAL CONSTANTS AND MACROS
+// None
+
+// MODULE DATA STRUCTURES
+// None
+
+// LOCAL FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+// None
+
+
+// ================= MEMBER FUNCTIONS =========================================
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterApplication
+
+ Method: CreateDocumentL
+
+ Creates CUITestServerStarterDocument document object.
+
+ Creates CUITestServerStarterDocument document object. The returned
+ pointer in not owned by the CUITestServerStarterApplication object.
+
+ Parameters: None
+
+ Return Values: A pointer to the created document object.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CApaDocument* CUITestServerStarterApplication::CreateDocumentL ()
+ {
+ return (static_cast<CApaDocument*> (CUITestServerStarterDocument::NewL ( *this) ) );
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterApplication
+
+ Method: AppDllUid
+
+ Gets application Uid
+
+ Gets application Uid
+
+ Parameters: None
+
+ Return Values: Application Uid.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+TUid CUITestServerStarterApplication::AppDllUid() const
+ {
+ return KUidUITestServerStarterApp;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: PreDocConstructL
+
+ Method: AppDllUid
+
+ Preconstructs document.
+
+ Preconstructs document.
+
+ Parameters: None
+
+ Return Values: None
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterApplication::PreDocConstructL()
+ {
+ // This call allow us to run multiple instances of UI application in same time.
+ CEikApplication::PreDocConstructL();
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/avkon/uitestserverstarter/src/UITestServerStarterDocument.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,214 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This module contains the implementation of
+* CUITestServerStarterDocument class member functions.
+*
+*/
+
+// INCLUDE FILES
+#include "UITestServerStarterAppUi.h"
+#include "UITestServerStarterDocument.h"
+
+
+// EXTERNAL DATA STRUCTURES
+// None
+
+// EXTERNAL FUNCTION PROTOTYPES
+// None
+
+// CONSTANTS
+// None
+
+// MACROS
+// None
+
+// LOCAL CONSTANTS AND MACROS
+// None
+
+// MODULE DATA STRUCTURES
+// None
+
+// LOCAL FUNCTION PROTOTYPES
+// None
+
+// FORWARD DECLARATIONS
+// None
+
+
+// ================= MEMBER FUNCTIONS =========================================
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterDocument
+
+ Method: NewL
+
+ Description: NewL is first phase of two-phased constructor.
+
+ NewL is first phase of two-phased constructor.
+
+ Parameters: CEikApplication& aApp: in: Reference to application..
+
+ Return Values: Pointer to new CUITestServerStarterDocument object.
+
+ Errors/Exceptions: Leave if one of the called functions leaves.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CUITestServerStarterDocument* CUITestServerStarterDocument::NewL( CEikApplication& aApp )
+ {
+ CUITestServerStarterDocument* self = NewLC (aApp);
+ CleanupStack::Pop (self);
+ return self;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterDocument
+
+ Method: NewLC
+
+ Description: NewL is first phase of two-phased constructor.
+
+ NewL is first phase of two-phased constructor.
+
+ Parameters: CEikApplication& aApp: in: Reference to application.
+
+ Return Values: Pointer to new CUITestServerStarterDocument object.
+
+ Errors/Exceptions: Leave if one of the called functions leaves.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CUITestServerStarterDocument* CUITestServerStarterDocument::NewLC (CEikApplication& aApp)
+ {
+ CUITestServerStarterDocument* self = new ( ELeave ) CUITestServerStarterDocument( aApp );
+
+ CleanupStack::PushL (self);
+ self->ConstructL ();
+ return self;
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterDocument
+
+ Method: ConstructL
+
+ Description: This is second phase of two-phased constructor.
+
+ This is second phase of two-phased constructor.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+void CUITestServerStarterDocument::ConstructL()
+ {
+ // No implementation required
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterDocument
+
+ Method: CUITestServerStarterDocument
+
+ Description: Constructor.
+
+ Constructor.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CUITestServerStarterDocument::CUITestServerStarterDocument( CEikApplication& aApp ) :
+ CAknDocument(aApp)
+ {
+ // No implementation required
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterDocument
+
+ Method: ~CUITestServerStarterDocument
+
+ Description: Destructor.
+
+ Destructor.
+
+ Parameters: None.
+
+ Return Values: None.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CUITestServerStarterDocument::~CUITestServerStarterDocument ()
+ {
+ // No implementation required
+ }
+
+/*
+-------------------------------------------------------------------------------
+
+ Class: CUITestServerStarterDocument
+
+ Method: CreateAppUiL
+
+ Description: Creates AppUi object.
+
+ Creates AppUi object.
+
+ Parameters: None.
+
+ Return Values: Pointer to AppUi object.
+
+ Errors/Exceptions: None.
+
+ Status: Draft
+
+-------------------------------------------------------------------------------
+*/
+CEikAppUi* CUITestServerStarterDocument::CreateAppUiL ()
+ {
+ return ( static_cast <CEikAppUi*>( new ( ELeave ) CUITestServerStarterAppUi ) );
+ }
+
+// End of File
--- a/stifui/group/ReleaseNote.txt Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-========================================================================
-RELEASE NOTE FOR STIF UI - STIF_201012 (7.3.29)
-SUPPORTING SERIES 60 3.0 ->
-========================================================================
-
-Product Description:
-====================
-STIF UI is Series 60 UI application for STIF project.
-STIF is a test harness for testing Symbian & S60 non-UI components.
-This widely used test framework can be used for both test case implementation and test cases execution.
-
-Features :
-=========
-- Easy to use
-- Multiple test cases can be executed concurrently.
-
-
-Enhancements:
-=============
-N/A
-
-
-New Features:
-=============
-N/A
-
-
-System Requirements:
-====================
-Basic Requirements:
-- S60/Symbian OS development environment installed
-
-- stif project needs to be compiled/installed before stifui can be used
-
-
-Compatibility Issues:
-=====================
-N/A
-
-Known Issues:
-===========
-If problems with compilation appears (missing platform_paths.hrh file error message),
-please use EnvPatcher.pl script from stif/envpatcher folder to fix environment.
-
-
-Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-All rights reserved.
--- a/stifui/group/bld.inf Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: bld.inf Toplevel build information for STIF UI
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-// Specify the platforms your component needs to be built for here.
-// If not specified all platforms can be built.
-
-// Note that if you want to build STIF to GCCE platform, GCCE must be
-// specified separately - it is not part of default platforms.
-// DEFAULT GCCE
-
- DEFAULT
-
-
-PRJ_EXPORTS
-// This is added in order to export iby files automaticly in 5.0 env
- ../rom/Stifui.iby CORE_IBY_EXPORT_PATH(tools,Stifui.iby)
-
-PRJ_TESTEXPORTS
-
-PRJ_MMPFILES
- // StifUI
- #include "../stifui/group/bld.inf"
-
- // UiTestServerStarter
- #include "../uitestserverstarter/group/bld.inf"
-
-
-// End of File
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/ReleaseNote.txt Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,45 @@
+========================================================================
+RELEASE NOTE FOR STIFQTUI - STIF_201014 (7.3.30)
+========================================================================
+
+Product Description:
+====================
+STIFQTUI is Series QT UI application for STIF project.
+STIF is a test harness for testing Symbian components.
+This widely used test framework can be used for both test case implementation and test cases execution.
+
+Features :
+=========
+- Easy to use
+- Multiple test cases can be executed concurrently.
+
+
+Enhancements:
+=============
+N/A
+
+
+New Features:
+=============
+N/A
+
+
+System Requirements:
+====================
+Basic Requirements:
+
+- StifQtUI project is written by QT C++ and Symbian C++.
+- It should be compiled by QT for S60 4.6.0 under proper S60 SDK.
+
+You can get QT for S60 from: http://qt.nokia.com/downloads/downloads
+
+- stif project needs to be compiled/installed before stifui can be used
+
+
+Compatibility Issues:
+=====================
+N/A
+
+
+Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+All rights reserved.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/inc/cstfcase.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QT C++ based Class.
+* CSTFCase used to describe a test case.
+*
+*/
+#ifndef CSTFCASE_H
+#define CSTFCASE_H
+#include "QString"
+
+enum TSTFCaseRunningType
+ {
+ Sequentially = 0,
+ Parallel
+ };
+
+enum TSTFCaseStatusType
+ {
+ EStatusRunning = 0x00000001,
+ EStatusExecuted = 0x00000002,
+ EStatusPassed = 0x00000004,
+ EStatusFailed = 0x00000008,
+ EStatusAborted = 0x00000010,
+ EStatusCrashed = 0x00000020,
+ EStatusAll = 0x000000ff,
+ };
+
+class CSTFCase
+{
+public:
+ CSTFCase() {isActive = true; caseIndex=-1;}
+ CSTFCase(QString name, int index) {caseName = name; caseIndex = index; isActive = true;}
+
+public:
+ QString& Name(){return caseName;}
+ int Index(){return caseIndex;}
+ bool IsActive(){return isActive;}
+ QString& ModuleName() {return moduleName;}
+
+public:
+ void SetName(const QString name){caseName = name; }
+ void SetIndex(const int index){caseIndex = index;}
+ void SetActive(const bool active) {isActive = active;}
+ void SetModuleName(const QString name){moduleName = name;}
+
+private:
+ QString caseName;
+ int caseIndex;
+ bool isActive;
+ QString moduleName;
+};
+#endif // CSTFCASE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/inc/cstfmodule.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QT C++ based Class.
+* CSTFModule used to describe a test module.
+*
+*/
+#ifndef CSTFMODULE_H
+#define CSTFMODULE_H
+#include "QString"
+
+class CSTFModule
+{
+public:
+ CSTFModule(){isActive = true;}
+ CSTFModule(QString name, QString inifile, QString cfgfile)
+ {moduleName = name; iniFile = inifile; configFile = cfgfile; isActive = true;}
+
+public:
+ QString& Name(){return moduleName;}
+ QString& IniFile(){return iniFile;}
+ QString& ConfigFile(){return configFile;}
+ bool IsActive(){return isActive;}
+
+
+public:
+ void SetName(const QString& name){moduleName = name; }
+ void SetIniFile(const QString& inifile){iniFile = inifile;}
+ void SetConfigFile(const QString& cfgfile){configFile = cfgfile;}
+ void SetActive(const bool active) {isActive = active;}
+
+private:
+ QString moduleName;
+ QString iniFile;
+ QString configFile;
+ bool isActive;
+
+
+};
+#endif // CSTFMODULE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/inc/dlgoutput.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QT C++ based Class.
+* DlgOutput is a QT based dialog.
+* Used to display case execution output and control the test case (pause/resume/abort).
+*
+*/
+#ifndef DLGOUTPUT_H_
+#define DLGOUTPUT_H_
+
+#include <QDialog>
+#include <QHash>
+#include "istfqtuicontroller.h"
+
+
+QT_BEGIN_NAMESPACE
+class QTabWidget;
+class QGridLayout;
+class QPlainTextEdit;
+class QPushButton;
+QT_END_NAMESPACE
+
+class DlgOutput : public QDialog, public IStfEventListener {
+ Q_OBJECT
+
+public:
+ DlgOutput(IStfQtUIController* ctl, QWidget *parent = 0);
+ ~DlgOutput();
+
+private:
+ void CreateItem(QString index, QString item);
+ void CloseItem(QString index);
+ void ShowMessage(QString index, QString msg);
+
+private://implement IStfEventListener
+ void OnGetMessage(const QString& ){};
+ void OnSetListChanged(){};
+ void OnCaseOutputChanged(const IStfEventListener::CaseOutputCommand& cmd, const QString& index, const QString& msg);
+
+private slots:
+ void on_btnPause_clicked();
+ void on_btnAbort_clicked();
+
+
+private:
+ IStfQtUIController* controller;
+ QTabWidget* tabMain;
+ QPushButton* btnPause;
+ QPushButton* btnAbort;
+ QHash<QString , QPlainTextEdit*> tabList;
+
+private:
+ void on_btnClose_clicked();
+
+
+};
+
+
+#endif /* DLGOUTPUT_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/inc/dlgsetting.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QT C++ based Class.
+*/
+
+#ifndef DLGSETTING_H_
+#define DLGSETTING_H_
+#include <QDialog>
+#include "uisetting.h"
+
+
+QT_BEGIN_NAMESPACE
+class QTabWidget;
+class QGridLayout;
+class QCheckBox;
+class QPushButton;
+QT_END_NAMESPACE
+
+class DlgSetting : public QDialog {
+ Q_OBJECT
+
+public:
+ DlgSetting(UiSetting* settingObj, QWidget *parent = 0);
+
+private:
+ void SetupUI();
+
+private:
+ QPushButton* btnOk;
+ QPushButton* btnCancel;
+ QCheckBox* chkShowoutput;
+
+private slots:
+ void on_btnOk_clicked();
+ void on_btnCancel_clicked();
+
+private:
+ UiSetting* setting;
+
+ };
+
+#endif /* DLGSETTING_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/inc/frmmain.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,179 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QT C++ based Class.
+* frmMain is a QT based Window.
+* Used to display STF executor main GUI.
+*
+*/
+#ifndef FRMMAIN_H
+#define FRMMAIN_H
+
+#include <QMainWindow>
+#include "istfqtuicontroller.h"
+#include "istfqtuimodel.h"
+#include "dlgoutput.h"
+#include "uisetting.h"
+#include "dlgsetting.h"
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QLabel;
+class QMenu;
+class QTabWidget;
+class QWidget;
+class QPushButton;
+class QComboBox;
+class QPlainTextEdit;
+class QTreeWidget;
+class QTreeWidgetItem;
+class QListWidget;
+class QCheckBox;
+class QMessageBox;
+class QFileDialog;
+QT_END_NAMESPACE
+
+const QString QtUIVersion = "StfQtUI v1.0.1";
+
+class frmMain : public QMainWindow, public IStfEventListener, public IStifModelEventListener
+{
+ Q_OBJECT
+
+public:
+ frmMain();
+ ~frmMain();
+
+
+public: //Implement IStfEventListener
+ void OnGetMessage(const QString& aMessage);
+ void OnSetListChanged();
+ void OnCaseOutputChanged(const IStfEventListener::CaseOutputCommand& cmd, const QString& index, const QString& msg);
+
+
+public: //Implement IStifModelEventListener
+ void OnCaseStatisticChanged() ;
+ void OnRunningCaseChanged() ;
+
+protected slots:
+ void onTabWidgetSelectIndexChanged();
+
+
+private:
+ void createMenus();
+ void LoadSubMenu();
+ void load();
+ void loadContent();
+ void loadModuleList();
+ void loadSetList();
+ void loadStatistic();
+ QList<CSTFCase> getSelectedCases();
+ void reloadStatisticItem(QString name, QTreeWidgetItem* item, TSTFCaseStatusType type);
+ void setSetting();
+
+private:
+ IStfQtUIController* controller;
+ IStfQtUIModel* model;
+ DlgOutput* dlgOutput;
+ UiSetting* uiSetting;
+
+
+private: //UI Components
+ QWidget *MainWidget;
+ //menus and actions
+ QMenu *operateMenu;
+ //output panel
+ QPlainTextEdit *txtOutput;
+ //tab control.
+ QTabWidget *tabWidget;
+ QWidget *tabCase;
+ QWidget *tabSet;
+ QWidget *tabStarted;
+ QWidget *tabStatistic;
+
+ //Cases Tab
+ QTreeWidget *treeModuleList;
+
+ //Statistic Tab
+ QTreeWidget *treeStatistic;
+ QTreeWidgetItem *executedItems;
+ QTreeWidgetItem *passedItems;
+ QTreeWidgetItem *failedItems;
+ QTreeWidgetItem *abortedItems;
+ QTreeWidgetItem *crashedItems;
+
+
+ //Set Tab
+ QComboBox *cboSetList;
+ QListWidget *lstSetCases;
+
+ //Started Tab
+ QListWidget *lstStartedCases;
+ QPushButton *btnPauseCase;
+ QPushButton *btnAbortCase;
+ QPlainTextEdit *txtCaseOutput;
+
+ //menu actions
+ QAction *actExit;
+ QAction *actAbout;
+
+ //cases actoins
+ QAction *actOpenFile;
+ QAction *actRunCaseSeq;
+ QAction *actRunCasePar;
+ QAction *actAddtoSet;
+ QAction *actSelectAll;
+ QAction *actExpandAll;
+ QAction *actCollapseAll;
+ QAction *actSetting;
+ //sets actions
+ QAction *actRunSetSeq;
+ QAction *actRunSetPar;
+ QAction *actNewSet;
+ QAction *actDelSet;
+ //running actions.
+ QAction *actPause;
+ QAction *actAbort;
+ //statistics actions
+ QAction *actClearStatistics;
+
+private slots:
+ void on_cboSetList_currentIndexChanged(QString );
+
+ void on_actAbout_triggered();
+ void on_actOpenFile_triggered();
+ void on_actRunCaseSeq_triggered();
+ void on_actRunCasePar_triggered();
+ void on_actAddtoSet_triggered();
+ void on_actSelectAll_triggered();
+ void on_actExpandAll_triggered();
+ void on_actCollapseAll_triggered();
+ void on_actSetting_triggered();
+
+ void on_actRunSetSeq_triggered();
+ void on_actRunSetPar_triggered();
+ void on_actNewSet_triggered();
+ void on_actDelSet_triggered();
+ void on_actPause_triggered();
+ void on_actAbort_triggered();
+ void on_actClearStatistics_triggered();
+ void on_treeModuleList_itemClicked(QTreeWidgetItem* item, int column);
+
+
+
+
+
+
+
+};
+
+#endif // FRMMAIN_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/inc/istfqtuicontroller.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QT C++ based Class.
+* IStfQtUIController is interface of appliction controller.
+* IStfEventListener is interface of Stf view observer.
+*
+*/
+#ifndef ISTFQTUICONTROLLER_H
+#define ISTFQTUICONTROLLER_H
+#include "cstfmodule.h"
+#include "cstfcase.h"
+#include <QList>
+#include "istfqtuimodel.h"
+
+class IStfEventListener
+{
+public:
+ enum CaseOutputCommand
+ {
+ ECreate,
+ EOutput,
+ EClose
+ };
+public:
+ virtual void OnGetMessage(const QString& aMessage) = 0;
+ virtual void OnSetListChanged() = 0;
+ virtual void OnCaseOutputChanged(const IStfEventListener::CaseOutputCommand& cmd, const QString& index, const QString& msg) = 0;
+};
+
+class IStfQtUIController
+{
+public:
+ inline virtual ~IStfQtUIController(){}
+ //for cases
+ virtual bool OpenEngineIniFile(const QString& fileName) = 0;
+ virtual QList<QString> GetModuleList() = 0;
+ virtual QList<QString> GetCaseListByModule(const QString& moduleName) = 0;
+ virtual CSTFCase GetCase(const QString& moduleName, const int index) = 0;
+ virtual void RunCases(const QList<CSTFCase>& caseList, const TSTFCaseRunningType& type) = 0;
+ virtual void AddCaseToSet(const QList<CSTFCase>& aCase, const QString& setName) = 0;
+
+ //for set
+ virtual QList<QString> GetSetList() = 0;
+ virtual QList<QString> GetCaseListBySet(const QString& setName) = 0;
+ virtual void CreateSet(const QString& setName) = 0;
+ virtual void DeleteSet(const QString& setName) = 0;
+ virtual void RunSets(const QString& setName, const TSTFCaseRunningType& type) = 0;
+
+ //for Started
+ virtual void PauseCase() = 0;
+ virtual void ResumeCase() = 0;
+ virtual void AbortCase() = 0;
+ virtual bool ShowOutput() = 0;
+ virtual void SetShowOutput(bool isShow) = 0;
+
+ //for staticstic
+ virtual QList<CSTFCase> GetCasesByStatus(const TSTFCaseStatusType& type) = 0;
+
+ //listener
+ virtual void AddStfEventListener(IStfEventListener* listener) = 0;
+ virtual void RemoveStfEventListener(IStfEventListener* listener) = 0;
+
+
+};
+
+
+
+#endif // ISTFQTUICONTROLLER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/inc/istfqtuimodel.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QT C++ based Class.
+* IStfQtUIModel is interface of appliction data model.
+* IStifModelEventListener is used to listen event from data model.
+*
+*/
+#ifndef ISTFQTUIMODEL_H
+#define ISTFQTUIMODEL_H
+
+//#include <TestModuleInfo.h>
+#include "cstfcase.h"
+#include "cstfmodule.h"
+#include <UIStoreIf.h>
+#include <UIStore.h>
+#include <UIEngine.h>
+
+class IStifModelEventListener
+ {
+public:
+ virtual void OnCaseStatisticChanged() = 0;
+ virtual void OnRunningCaseChanged() = 0;
+ };
+
+class IStfQtUIModel
+{
+public:
+ inline virtual ~IStfQtUIModel(){}
+ virtual void ClearCasesStatus() = 0;
+ virtual QList<CSTFCase> GetCasesByStatus(const TSTFCaseStatusType& type) = 0;
+ virtual void AddRunningCase(const CStartedTestCase* startedCase, const CSTFCase& stfCase) = 0;
+ virtual void RemoveRunningCase(const CStartedTestCase* startedCase) = 0;
+ virtual void AddCaseByStatus(const TSTFCaseStatusType& type, const CSTFCase& aCase) = 0;
+ virtual void PauseCase() = 0;
+ virtual void ResumeCase() = 0;
+ virtual void AbortCase() = 0;
+
+ virtual void AddStifModelEventListener(IStifModelEventListener* listener) = 0;
+ virtual void RemoveStifModelEventListener(IStifModelEventListener* listener) = 0;
+
+
+};
+
+#endif // ISTFQTUIMODEL_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/inc/stfqtuicontroller.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QT C++ based Class.
+* Application's controller.
+*
+*/
+#ifndef STFQTUICONTROLLER_H_
+#define STFQTUICONTROLLER_H_
+
+#include "istfqtuicontroller.h"
+#include "istfqtuimodel.h"
+#include "stifexecutor.h"
+
+class StfQtUIController : public IStfQtUIController, public IStifCaseUpdateListener
+ {
+public:
+ StfQtUIController(IStfQtUIModel* aModel);
+ ~StfQtUIController();
+public: //Implement IStfQtUIController.
+ //for cases
+
+ bool OpenEngineIniFile(const QString& fileName);
+ QList<QString> GetModuleList();
+ QList<QString> GetCaseListByModule(const QString& moduleName);
+ CSTFCase GetCase(const QString& moduleName, const int index);
+ void RunCases(const QList<CSTFCase>& caseList, const TSTFCaseRunningType& type);
+ void AddCaseToSet(const QList<CSTFCase>& aCase, const QString& setName);
+
+ //for set
+ QList<QString> GetSetList();
+ QList<QString> GetCaseListBySet(const QString& setName);
+ void CreateSet(const QString& setName);
+ void DeleteSet(const QString& setName);
+ void RunSets(const QString& setName, const TSTFCaseRunningType& type);
+
+ //for Started
+ void PauseCase();
+ void ResumeCase();
+ void AbortCase();
+ bool ShowOutput();
+ void SetShowOutput(bool isShow);
+
+ //for staticstic
+ QList<CSTFCase> GetCasesByStatus(const TSTFCaseStatusType& type);
+
+ //listener
+ void AddStfEventListener(IStfEventListener* listener);
+ void RemoveStfEventListener(IStfEventListener* listener);
+
+public://implement IStifCaseUpdateListener
+ void OnGetCaseUpdated(CStartedTestCase* aCase, CSTFCase& stfcase, int flags);
+ void OnGetCaseOutput(CStartedTestCase* aCase, QString& msg);
+
+private: //Fire event
+ void FireOnGetOutput(QString message);
+ void FireOnSetListChanged();
+ void FireOnCaseOutputChanged(IStfEventListener::CaseOutputCommand cmd, int index, QString msg);
+
+private://help methods
+ CSTFModule GetModuleByName(const QString& moduleName);
+
+private:
+ CStifExecutor* executor;
+ IStfQtUIModel* model;
+ QList<IStfEventListener*> listenerList;
+ bool isShowOutput;
+
+
+
+ };
+
+
+
+
+#endif /* STFQTUICONTROLLER_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/inc/stfqtuimodel.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QT C++ based Class.
+* application data model.
+*
+*/
+#include "istfqtuimodel.h"
+#include "stifexecutor.h"
+#include <QHash>
+
+class StfQtUIModel : public IStfQtUIModel
+ {
+public:
+ StfQtUIModel();
+ virtual ~StfQtUIModel();
+public://implement IStfQtUIModel
+ void ClearCasesStatus();
+ QList<CSTFCase> GetCasesByStatus(const TSTFCaseStatusType& type);
+ void AddRunningCase(const CStartedTestCase* startedCase, const CSTFCase& stfCase);
+ void RemoveRunningCase(const CStartedTestCase* startedCase);
+ void AddCaseByStatus(const TSTFCaseStatusType& type, const CSTFCase& aCase);
+ void AddStifModelEventListener(IStifModelEventListener* listener);
+ void RemoveStifModelEventListener(IStifModelEventListener* listener);
+ void PauseCase();
+ void ResumeCase();
+ void AbortCase();
+
+private:
+ void FireOnCaseStatisticChangedEvent();
+ void FireOnRunningCaseChangedEvent();
+
+private:
+ QList<IStifModelEventListener*> listenerList;
+ QList<CSTFCase> executedCaseList;
+ QList<CSTFCase> passedCaseList;
+ QList<CSTFCase> failedCaseList;
+ QList<CSTFCase> abortCaseList;
+ QList<CSTFCase> crashedCaseList;
+ QHash<const CStartedTestCase*, CSTFCase> runningCaseList;
+
+
+
+
+
+
+ };
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/inc/stifexecutor.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QT C++ and Symbian C++ combination Class.
+* Call STIF UI engine and UI interface to perform test operation.
+* All the public methods are QT C++ based object.
+*
+*/
+#ifndef STIFEXECUTOR_H_
+#define STIFEXECUTOR_H_
+
+//#include <TestModuleInfo.h>
+#include "cstfcase.h"
+#include "cstfmodule.h"
+#include <UIStoreIf.h>
+#include <UIStore.h>
+#include <UIEngine.h>
+#include <QList>
+
+class IStifCaseUpdateListener
+ {
+public:
+ virtual void OnGetCaseUpdated(CStartedTestCase* aCase,CSTFCase& stfcase, int flags) = 0;
+ virtual void OnGetCaseOutput(CStartedTestCase* aCase, QString& msg) = 0;
+ };
+
+
+class CStifExecutor : public CUIStoreIf
+ {
+public:
+ CStifExecutor();
+ ~CStifExecutor();
+public:
+ void AddStifCaseUpdateListener(IStifCaseUpdateListener* listener);
+ void RemoveStifCaseUpdateListener(IStifCaseUpdateListener* listener);
+ bool OpenIniFile(const QString& filename);
+ QList<CSTFModule> GetModuleList();
+ QList<CSTFCase> GetCaseList(const QString& moduleName);
+ void ExecuteSingleCase(const QString& moduleName, int caseIndex);
+ QList<QString> GetSetList();
+ QList<CSTFCase> GetCaseListFromSet(const QString& setName);
+ void CreateSet(const QString& setName);
+ void SaveSet(QString& setName);
+ void RemoveSet(const QString& setName);
+ void AddtoSet(const QString& setName, CSTFCase& caseInfo);
+ void ExecuteSet(const QString& SetName, const int startIndex, const TSTFCaseRunningType type);
+
+public://implement CUIStoreIf
+ void Update( CStartedTestCase* aTestCase,
+ TInt aFlags);
+
+public:
+ TPtrC QString2TPtrC(const QString& aString);
+ QString TDesC2QString(const TDesC& des);
+ //CTestInfo* GetTestInfo(CSTFCase aCase);
+private:
+ QList<IStifCaseUpdateListener*> *listenerList;
+ HBufC* iBuffer;
+ };
+
+
+
+#endif /* STIFEXECUTOR_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/inc/uisetting.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QT C++ based Class.
+*/
+
+#ifndef UISETTING_H_
+#define UISETTING_H_
+#include <QHash>
+
+class UiSetting
+ {
+public:
+ UiSetting();
+ ~UiSetting();
+
+public:
+ QString ReadSetting(const QString& item);
+ void SetSetting(const QString& item,const QString& value);
+
+private:
+ bool load();
+ bool save();
+ void loadDefault();
+
+private:
+ QHash<QString, QString> settingList;
+ };
+
+#endif /* UISETTING_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/inc/version.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: STIF QT UI version declaration
+*
+*/
+
+#ifndef VERSION_H_
+#define VERSION_H_
+
+#define STIF_MAJOR_VERSION 7
+#define STIF_MINOR_VERSION 3
+#define STIF_BUILD_VERSION 26
+
+#define STIF_REL_DATE "09th Feb 2010"
+
+#define TO_UNICODE(text) _L(text)
+
+#endif /*VERSION_H_*/
Binary file stifui/qt/sis/stifqtui.sisx has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/src/dlgoutput.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: QT C++ based Class.
+ *
+ */
+#include "dlgoutput.h"
+#include <QtGui>
+
+DlgOutput::DlgOutput(IStfQtUIController* ctl, QWidget *parent) :
+ QDialog(parent), controller(ctl)
+ {
+ QSize btnSize(100,30);
+ QGridLayout *mainLayout = new QGridLayout(this);
+ this->setLayout(mainLayout);
+ this->setContextMenuPolicy(Qt::NoContextMenu);
+
+ tabMain = new QTabWidget();
+ tabMain->setContextMenuPolicy(Qt::NoContextMenu);
+
+ QWidget *toolWidget = new QWidget(this);
+ toolWidget->setContextMenuPolicy(Qt::NoContextMenu);
+ QGridLayout *toolLayout = new QGridLayout();
+ toolWidget->setLayout(toolLayout);
+ btnPause = new QPushButton(tr("Pause"), toolWidget);
+ btnPause->setContextMenuPolicy(Qt::NoContextMenu);
+ btnPause->setFixedSize(btnSize);
+ QObject::connect(btnPause, SIGNAL(clicked()), this,
+ SLOT(on_btnPause_clicked()));
+ btnAbort = new QPushButton(tr("Abort"), toolWidget);
+ btnAbort->setContextMenuPolicy(Qt::NoContextMenu);
+ btnAbort->setFixedSize(btnSize);
+ QObject::connect(btnAbort, SIGNAL(clicked()), this,
+ SLOT(on_btnAbort_clicked()));
+ toolLayout->addWidget(btnPause, 0, 0);
+ toolLayout->addWidget(btnAbort, 0, 1);
+
+ mainLayout->addWidget(toolWidget, 0, 0);
+ mainLayout->addWidget(tabMain, 1, 0);
+ controller->AddStfEventListener(this);
+ }
+
+DlgOutput::~DlgOutput()
+ {
+ controller->RemoveStfEventListener(this);
+ }
+
+void DlgOutput::CreateItem(QString index, QString item)
+ {
+ QPlainTextEdit* edit = new QPlainTextEdit(this);
+ edit->setContextMenuPolicy(Qt::NoContextMenu);
+ tabMain->addTab(edit, item);
+ tabList.insert(index, edit);
+ }
+
+void DlgOutput::CloseItem(QString index)
+ {
+ int u = tabList.keys().indexOf(index);
+ tabList.remove(index);
+ tabMain->removeTab(u);
+ if (tabMain->count() == 0)
+ {
+ this->close();
+ }
+ }
+
+void DlgOutput::ShowMessage(QString index, QString msg)
+ {
+ if(tabList.contains(index))
+ {
+ tabList.value(index)->setPlainText(msg);
+ }
+ }
+
+void DlgOutput::on_btnPause_clicked()
+ {
+ if (btnPause->text() == "Pause")
+ {
+ controller->PauseCase();
+ btnPause->setText(tr("Resume"));
+ }
+ else
+ {
+ controller->ResumeCase();
+ btnPause->setText(tr("Pause"));
+ }
+ }
+
+void DlgOutput::on_btnAbort_clicked()
+ {
+ controller->AbortCase();
+ }
+
+void DlgOutput::OnCaseOutputChanged(const IStfEventListener::CaseOutputCommand& cmd,
+ const QString& index, const QString& msg)
+ {
+ this->showMaximized();
+ switch (cmd)
+ {
+ case IStfEventListener::ECreate:
+ CreateItem(index, msg);
+ break;
+ case IStfEventListener::EClose:
+ CloseItem(index);
+ break;
+ default:
+ ShowMessage(index, msg);
+ break;
+ }
+
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/src/dlgsetting.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: QT C++ based Class.
+ *
+ */
+
+#include "dlgsetting.h"
+#include <QtGui>
+
+DlgSetting::DlgSetting(UiSetting* settingObj, QWidget *parent)
+ : QDialog(parent), setting(settingObj)
+ {
+ SetupUI();
+ }
+
+void DlgSetting::SetupUI()
+ {
+ this->setContextMenuPolicy(Qt::NoContextMenu);
+ QGridLayout *mainLayout = new QGridLayout(this);
+ this->setLayout(mainLayout);
+
+ chkShowoutput = new QCheckBox(this);
+ chkShowoutput->setText(tr("Show output in execution."));
+ chkShowoutput->setChecked(setting->ReadSetting("showoutput") == "true");
+
+ QWidget *toolWidget = new QWidget(this);
+ QGridLayout *toolLayout = new QGridLayout();
+
+ toolWidget->setLayout(toolLayout);
+ btnOk = new QPushButton(tr("Ok"), toolWidget);
+ btnOk->setFixedSize(100, 30);
+ QObject::connect(btnOk, SIGNAL(clicked()), this,
+ SLOT(on_btnOk_clicked()));
+ btnCancel = new QPushButton(tr("Cancel"), toolWidget);
+ btnCancel->setFixedSize(100, 30);
+ QObject::connect(btnCancel, SIGNAL(clicked()), this,
+ SLOT(on_btnCancel_clicked()));
+ toolLayout->addWidget(btnOk, 0, 0);
+ toolLayout->addWidget(btnCancel, 0, 1);
+
+ mainLayout->addWidget(chkShowoutput, 0, 0);
+ mainLayout->addWidget(toolWidget, 2, 0);
+ }
+
+void DlgSetting::on_btnOk_clicked()
+ {
+ if(chkShowoutput->checkState() == Qt::Checked)
+ {
+ setting->SetSetting("showoutput", "true");
+ }
+ else
+ {
+ setting->SetSetting("showoutput", "false");
+ }
+ this->accept();
+ }
+
+void DlgSetting::on_btnCancel_clicked()
+ {
+ this->reject();
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/src/frmmain.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,809 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: QT C++ based Class.
+ *
+ */
+#include <QtGui>
+#include "frmmain.h"
+#include "stfqtuicontroller.h"
+#include "stfqtuimodel.h"
+#include <QList>
+#include "version.h"
+#include <QCursor>
+
+const QString SELECTITEMHEADER = " * ";
+const QString UNSELECTITEMHEADER = " ";
+
+frmMain::frmMain()
+ {
+ uiSetting = new UiSetting();
+ createMenus();
+ load();
+ LoadSubMenu();
+ model = new StfQtUIModel();
+ model->AddStifModelEventListener(this);
+ controller = new StfQtUIController(model);
+ controller->AddStfEventListener(this);
+ loadContent();
+ dlgOutput = new DlgOutput(controller);
+ setSetting();
+ }
+
+frmMain::~frmMain()
+ {
+ model->AbortCase();
+ controller->RemoveStfEventListener(this);
+ model->RemoveStifModelEventListener(this);
+
+ delete uiSetting;
+ delete dlgOutput;
+ delete controller;
+ delete model;
+ }
+
+void frmMain::setSetting()
+ {
+ controller->SetShowOutput(uiSetting->ReadSetting("showoutput") == "true");
+ }
+
+void frmMain::OnGetMessage(const QString& aMessage)
+ {
+ txtOutput->appendPlainText(aMessage);
+ }
+
+void frmMain::OnRunningCaseChanged()
+ {
+ QList<CSTFCase> caseList = controller->GetCasesByStatus(EStatusRunning);
+ lstStartedCases->clear();
+ foreach(CSTFCase aCase, caseList)
+ {
+ lstStartedCases->addItem(aCase.Name());
+ }
+ if (caseList.size() != 0)
+ {
+ btnPauseCase->setEnabled(true);
+ btnAbortCase->setEnabled(true);
+ actPause->setEnabled(true);
+ actAbort->setEnabled(true);
+ }
+ else
+ {
+ btnPauseCase->setEnabled(false);
+ btnAbortCase->setEnabled(false);
+ actPause->setEnabled(false);
+ actAbort->setEnabled(false);
+ }
+ }
+
+void frmMain::OnCaseOutputChanged(const IStfEventListener::CaseOutputCommand& /*cmd*/, const QString& /*index*/, const QString& /*msg*/)
+ {
+ //nothing to do.
+ }
+
+void frmMain::OnSetListChanged()
+ {
+ loadSetList();
+ }
+
+void frmMain::OnCaseStatisticChanged()
+ {
+ loadStatistic();
+ }
+
+void frmMain::createMenus()
+ {
+ //operateMenu = menuBar()->addMenu(tr("&Operation"));
+ actAbout = new QAction(tr("&About"), this);
+ connect(actAbout, SIGNAL(triggered()), this,
+ SLOT(on_actAbout_triggered()));
+
+ actExit = new QAction(tr("&Exit"), this);
+ connect(actExit, SIGNAL(triggered()), this, SLOT(close()));
+
+ actOpenFile = new QAction(tr("&Open Ini File"), this);
+ connect(actOpenFile, SIGNAL(triggered()), this,
+ SLOT(on_actOpenFile_triggered()));
+
+ actRunCaseSeq = new QAction(tr("Run Case Sequentially"), this);
+ connect(actRunCaseSeq, SIGNAL(triggered()), this,
+ SLOT(on_actRunCaseSeq_triggered()));
+
+ actRunCasePar = new QAction(tr("Run Case Parallel"), this);
+ connect(actRunCasePar, SIGNAL(triggered()), this,
+ SLOT(on_actRunCasePar_triggered()));
+
+ actAddtoSet = new QAction(tr("Add cases to Set"), this);
+ connect(actAddtoSet, SIGNAL(triggered()), this,
+ SLOT(on_actAddtoSet_triggered()));
+
+ actSelectAll = new QAction(tr("Select All"), this);
+ connect(actSelectAll, SIGNAL(triggered()), this,
+ SLOT(on_actSelectAll_triggered()));
+
+ actExpandAll = new QAction(tr("Expand All"), this);
+ connect(actExpandAll, SIGNAL(triggered()), this,
+ SLOT(on_actExpandAll_triggered()));
+
+ actCollapseAll = new QAction(tr("Collapse All"), this);
+ connect(actCollapseAll, SIGNAL(triggered()), this,
+ SLOT(on_actCollapseAll_triggered()));
+
+ actSetting = new QAction(tr("Setting"), this);
+ connect(actSetting, SIGNAL(triggered()), this,
+ SLOT(on_actSetting_triggered()));
+
+ actRunSetSeq = new QAction(tr("Run Set Sequentially"), this);
+ connect(actRunSetSeq, SIGNAL(triggered()), this,
+ SLOT(on_actRunSetSeq_triggered()));
+
+ actRunSetPar = new QAction(tr("Run Set Parallel"), this);
+ connect(actRunSetPar, SIGNAL(triggered()), this,
+ SLOT(on_actRunSetPar_triggered()));
+
+ actNewSet = new QAction(tr("Create New Set"), this);
+ connect(actNewSet, SIGNAL(triggered()), this,
+ SLOT(on_actNewSet_triggered()));
+
+ actDelSet = new QAction(tr("Delete Set"), this);
+ connect(actDelSet, SIGNAL(triggered()), this,
+ SLOT(on_actDelSet_triggered()));
+
+ actPause = new QAction(tr("Pause"), this);
+ actPause->setEnabled(false);
+ connect(actPause, SIGNAL(triggered()), this,
+ SLOT(on_actPause_triggered()));
+
+ actAbort = new QAction(tr("Abort"), this);
+ actAbort->setEnabled(false);
+ connect(actAbort, SIGNAL(triggered()), this,
+ SLOT(on_actAbort_triggered()));
+
+ actClearStatistics = new QAction(tr("Clear Statistics"), this);
+ connect(actClearStatistics, SIGNAL(triggered()), this,
+ SLOT(on_actClearStatistics_triggered()));
+
+ }
+
+void frmMain::load()
+ {
+ this->setContextMenuPolicy(Qt::NoContextMenu);
+ QSize btnSize(100,35);
+ QGridLayout *mainLayout = new QGridLayout(this);
+ mainLayout->setVerticalSpacing(2);
+ mainLayout->setHorizontalSpacing(2);
+ mainLayout->setSpacing(2);
+ mainLayout->setMargin(2);
+
+ MainWidget = new QWidget(this);
+ MainWidget->setContextMenuPolicy(Qt::NoContextMenu);
+
+ //tab control
+ tabWidget = new QTabWidget(this);
+ tabWidget->setContextMenuPolicy(Qt::NoContextMenu);
+ tabCase = new QWidget(tabWidget);
+ tabCase->setContextMenuPolicy(Qt::NoContextMenu);
+ tabWidget->addTab(tabCase, tr("Cases"));
+ tabSet = new QWidget(tabWidget);
+ tabSet->setContextMenuPolicy(Qt::NoContextMenu);
+ tabWidget->addTab(tabSet, tr(" Set "));
+ tabStarted = new QWidget(tabWidget);
+ tabStarted->setContextMenuPolicy(Qt::NoContextMenu);
+ tabWidget->addTab(tabStarted, tr("Running"));
+ tabStatistic = new QWidget(tabWidget);
+ tabStatistic->setContextMenuPolicy(Qt::NoContextMenu);
+ tabWidget->addTab(tabStatistic, tr("Statistics"));
+ connect(tabWidget, SIGNAL(currentChanged(int)), this,
+ SLOT(onTabWidgetSelectIndexChanged()));
+
+ //output panel
+ QGroupBox *groupBox = new QGroupBox(this);
+ groupBox->setFixedHeight(150);
+ groupBox->setContextMenuPolicy(Qt::NoContextMenu);
+ groupBox->setTitle(tr("Information"));
+ QFont serifFont("Times", 5, QFont::Normal);
+ txtOutput = new QPlainTextEdit(groupBox);
+ txtOutput->setFont(serifFont);
+ txtOutput->setContextMenuPolicy(Qt::NoContextMenu);
+ txtOutput->setReadOnly(true);
+ txtOutput->setFocusPolicy(Qt::NoFocus);
+ //txtOutput->setEditFocus(false);
+ QGridLayout *groupBoxLayout = new QGridLayout(this);
+ groupBoxLayout->setVerticalSpacing(2);
+ groupBoxLayout->setHorizontalSpacing(2);
+ groupBoxLayout->setSpacing(2);
+ groupBoxLayout->setMargin(2);
+ groupBoxLayout->addWidget(txtOutput, 0, 0);
+ groupBox->setLayout(groupBoxLayout);
+
+ //Create MainLayout and MainWidget
+ mainLayout->addWidget(tabWidget, 0, 0);
+ mainLayout->addWidget(groupBox, 1, 0, Qt::AlignBottom);
+ MainWidget->setLayout(mainLayout);
+
+
+ //Tab page: Case
+ QGridLayout *tabCaseLayout = new QGridLayout(this);
+ tabCaseLayout->setVerticalSpacing(2);
+ tabCaseLayout->setHorizontalSpacing(2);
+ tabCaseLayout->setSpacing(2);
+ tabCaseLayout->setMargin(2);
+ treeModuleList = new QTreeWidget(tabCase);
+ treeModuleList->setContextMenuPolicy(Qt::NoContextMenu);
+ treeModuleList->headerItem()->setText(0, tr("Module List"));
+ treeModuleList->setSelectionBehavior(QAbstractItemView::SelectRows);
+ treeModuleList->setEditFocus(false);
+ connect(treeModuleList, SIGNAL(itemClicked(QTreeWidgetItem* , int)), this,
+ SLOT(on_treeModuleList_itemClicked(QTreeWidgetItem* , int)));
+
+
+ QWidget *caseToolWidget = new QWidget(tabCase);
+ caseToolWidget->setContextMenuPolicy(Qt::NoContextMenu);
+ QGridLayout *caseToolWidgetLayout = new QGridLayout;
+ QPushButton *btnRunCase = new QPushButton(tr("Run"), caseToolWidget);
+ btnRunCase->setContextMenuPolicy(Qt::NoContextMenu);
+ btnRunCase->setFixedSize(btnSize);
+ connect(btnRunCase, SIGNAL(clicked()), this,
+ SLOT(on_actRunCaseSeq_triggered()));
+ QPushButton *btnExpandAll = new QPushButton(tr("Expand"), caseToolWidget);
+ btnExpandAll->setContextMenuPolicy(Qt::NoContextMenu);
+ btnExpandAll->setFixedSize(btnSize);
+ connect(btnExpandAll, SIGNAL(clicked()), this,
+ SLOT(on_actExpandAll_triggered()));
+ QPushButton *btnCollapseAll = new QPushButton(tr("Collapse"),
+ caseToolWidget);
+ btnCollapseAll->setContextMenuPolicy(Qt::NoContextMenu);
+ btnCollapseAll->setFixedSize(btnSize);
+ connect(btnCollapseAll, SIGNAL(clicked()), this,
+ SLOT(on_actCollapseAll_triggered()));
+
+ caseToolWidgetLayout->addWidget(btnRunCase, 0, 0);
+ caseToolWidgetLayout->addWidget(btnExpandAll, 0, 1);
+ caseToolWidgetLayout->addWidget(btnCollapseAll, 0, 2);
+ caseToolWidget->setLayout(caseToolWidgetLayout);
+
+ tabCaseLayout->addWidget(caseToolWidget, 1, 0);
+ tabCaseLayout->addWidget(treeModuleList, 0, 0);
+ tabCase->setLayout(tabCaseLayout);
+
+ //Tab page: Set
+
+ QGridLayout *tabSetLayout = new QGridLayout(this);
+ tabSetLayout->setVerticalSpacing(2);
+ tabSetLayout->setHorizontalSpacing(2);
+ tabSetLayout->setSpacing(2);
+ tabSetLayout->setMargin(2);
+
+ QGridLayout *tabSetMainLayout = new QGridLayout(this);
+ tabSetMainLayout->setVerticalSpacing(2);
+ tabSetMainLayout->setHorizontalSpacing(2);
+ tabSetMainLayout->setSpacing(2);
+ tabSetMainLayout->setMargin(2);
+ QWidget *tabSetMainWidget = new QWidget(tabSet);
+ tabSetMainWidget->setContextMenuPolicy(Qt::NoContextMenu);
+ QLabel *lblSet = new QLabel(tr("Test Set:"), tabSetMainWidget);
+ lblSet->setContextMenuPolicy(Qt::NoContextMenu);
+ QLabel *lblCase = new QLabel(tr("Cases:"), tabSetMainWidget);
+ lblCase->setContextMenuPolicy(Qt::NoContextMenu);
+ cboSetList = new QComboBox(tabSetMainWidget);
+ cboSetList->setContextMenuPolicy(Qt::NoContextMenu);
+ cboSetList->setEditable(false);
+ connect(cboSetList, SIGNAL(currentIndexChanged(QString)), this,
+ SLOT(on_cboSetList_currentIndexChanged(QString)));
+ lstSetCases = new QListWidget(tabSetMainWidget);
+ lstSetCases->setContextMenuPolicy(Qt::NoContextMenu);
+ tabSetMainLayout->addWidget(lblSet, 0, 0);
+ tabSetMainLayout->addWidget(cboSetList, 0, 1);
+ tabSetMainLayout->addWidget(lblCase, 1, 0,
+ (Qt::AlignTop | Qt::AlignRight));
+ tabSetMainLayout->addWidget(lstSetCases, 1, 1);
+ tabSetMainWidget->setLayout(tabSetMainLayout);
+
+ QWidget *setToolWidget = new QWidget(tabSet);
+ setToolWidget->setContextMenuPolicy(Qt::NoContextMenu);
+ QGridLayout *setToolWidgetLayout = new QGridLayout(this);
+ setToolWidgetLayout->setVerticalSpacing(2);
+ setToolWidgetLayout->setHorizontalSpacing(2);
+ setToolWidgetLayout->setSpacing(2);
+ setToolWidgetLayout->setMargin(2);
+ QPushButton *btnRunSetCase = new QPushButton(tr("Run"), setToolWidget);
+ btnRunSetCase->setContextMenuPolicy(Qt::NoContextMenu);
+ btnRunSetCase->setFixedSize(btnSize);
+ connect(btnRunSetCase, SIGNAL(clicked()), this,
+ SLOT(on_actRunSetSeq_triggered()));
+ QPushButton *btnNewSet = new QPushButton(tr("New Set"), setToolWidget);
+ btnNewSet->setContextMenuPolicy(Qt::NoContextMenu);
+ btnNewSet->setFixedSize(btnSize);
+ connect(btnNewSet, SIGNAL(clicked()), this,
+ SLOT(on_actNewSet_triggered()));
+ QPushButton *btnDelSet = new QPushButton(tr("Delete Set"), setToolWidget);
+ btnDelSet->setContextMenuPolicy(Qt::NoContextMenu);
+ btnDelSet->setFixedSize(btnSize);
+ connect(btnDelSet, SIGNAL(clicked()), this,
+ SLOT(on_actDelSet_triggered()));
+
+ setToolWidgetLayout->addWidget(btnRunSetCase, 0, 0);
+ setToolWidgetLayout->addWidget(btnNewSet, 0, 1);
+ setToolWidgetLayout->addWidget(btnDelSet, 0, 2);
+ setToolWidget->setLayout(setToolWidgetLayout);
+
+ tabSetLayout->addWidget(tabSetMainWidget, 0, 0);
+ tabSetLayout->addWidget(setToolWidget, 1, 0);
+ tabSet->setLayout(tabSetLayout);
+
+ //Tab Started
+ QGridLayout *tabStartedLayout = new QGridLayout(this);
+ tabStartedLayout->setVerticalSpacing(2);
+ tabStartedLayout->setHorizontalSpacing(2);
+ tabStartedLayout->setSpacing(2);
+ tabStartedLayout->setMargin(2);
+ lstStartedCases = new QListWidget(tabStarted);
+ lstStartedCases->setContextMenuPolicy(Qt::NoContextMenu);
+ QWidget *startedToolWidget = new QWidget(tabStarted);
+ startedToolWidget->setContextMenuPolicy(Qt::NoContextMenu);
+ QGridLayout *startedToolWidgetLayout = new QGridLayout(this);
+ startedToolWidgetLayout->setVerticalSpacing(2);
+ startedToolWidgetLayout->setHorizontalSpacing(2);
+ startedToolWidgetLayout->setSpacing(2);
+ startedToolWidgetLayout->setMargin(2);
+ btnPauseCase = new QPushButton(tr("Pause"), startedToolWidget);
+ btnPauseCase->setContextMenuPolicy(Qt::NoContextMenu);
+ btnPauseCase->setFixedSize(btnSize);
+ connect(btnPauseCase, SIGNAL(clicked()), this,
+ SLOT(on_actPause_triggered()));
+ btnPauseCase->setEnabled(false);
+
+ btnAbortCase = new QPushButton(tr("Abort"), startedToolWidget);
+ btnAbortCase->setContextMenuPolicy(Qt::NoContextMenu);
+ btnAbortCase->setFixedSize(btnSize);
+ connect(btnAbortCase, SIGNAL(clicked()), this,
+ SLOT(on_actAbort_triggered()));
+ btnAbortCase->setEnabled(false);
+ //
+ // QPushButton *btnShowOutput = new QPushButton(tr("Output"), startedToolWidget);
+ // connect(btnShowOutput, SIGNAL(clicked()), this,
+ // SLOT(on_btnShowOutput_clicked()));
+
+
+ startedToolWidgetLayout->addWidget(btnPauseCase, 0, 0);
+ startedToolWidgetLayout->addWidget(btnAbortCase, 0, 1);
+ //startedToolWidgetLayout->addWidget(btnShowOutput, 0, 2);
+ startedToolWidget->setLayout(startedToolWidgetLayout);
+
+ tabStartedLayout->addWidget(lstStartedCases, 0, 0);
+ tabStartedLayout->addWidget(startedToolWidget, 1, 0);
+ tabStarted->setLayout(tabStartedLayout);
+
+ //Tab Statistic
+ QGridLayout *tabStatisticLayout = new QGridLayout(this);
+ tabStatisticLayout->setVerticalSpacing(2);
+ tabStatisticLayout->setHorizontalSpacing(2);
+ tabStatisticLayout->setSpacing(2);
+ tabStatisticLayout->setMargin(2);
+
+ treeStatistic = new QTreeWidget(tabStatistic);
+ treeStatistic->setContextMenuPolicy(Qt::NoContextMenu);
+ treeStatistic->headerItem()->setText(0, tr("Statistics"));
+ tabStatisticLayout->addWidget(treeStatistic, 0, 0);
+ tabStatistic->setLayout(tabStatisticLayout);
+
+ executedItems = new QTreeWidgetItem(treeStatistic);
+ executedItems->setText(0, tr("Executed Cases(0)"));
+ passedItems = new QTreeWidgetItem(treeStatistic);
+ passedItems->setText(0, tr("Passed Cases(0)"));
+ failedItems = new QTreeWidgetItem(treeStatistic);
+ failedItems->setText(0, tr("Failed Cases(0)"));
+ crashedItems = new QTreeWidgetItem(treeStatistic);
+ crashedItems->setText(0, tr("Crashed Cases(0)"));
+ abortedItems = new QTreeWidgetItem(treeStatistic);
+ abortedItems->setText(0, tr("Aborted Cases(0)"));
+
+
+ setCentralWidget(MainWidget);
+
+ }
+
+void frmMain::LoadSubMenu()
+ {
+ menuBar()->clear();
+ menuBar()->setContextMenuPolicy(Qt::NoContextMenu);
+ if (tabWidget->currentIndex() == 0)
+ {
+ //Cases Tab
+ menuBar()->addAction(actOpenFile);
+ menuBar()->addAction(actRunCaseSeq);
+ menuBar()->addAction(actRunCasePar);
+ menuBar()->addSeparator();
+ menuBar()->addAction(actAddtoSet);
+ menuBar()->addSeparator();
+ menuBar()->addAction(actSelectAll);
+ menuBar()->addAction(actExpandAll);
+ menuBar()->addAction(actCollapseAll);
+ }
+ else if (tabWidget->currentIndex() == 1)
+ {
+ //Set Tab
+ menuBar()->addAction(actRunSetSeq);
+ menuBar()->addAction(actRunSetPar);
+ menuBar()->addSeparator();
+ menuBar()->addAction(actNewSet);
+ menuBar()->addAction(actDelSet);
+ }
+ else if (tabWidget->currentIndex() == 2)
+ {
+ //Started Tab
+ menuBar()->addAction(actPause);
+ menuBar()->addAction(actAbort);
+
+ }
+ else
+ {
+ //Staticstic tab
+ menuBar()->addAction(actClearStatistics);
+ }
+ menuBar()->addSeparator();
+ menuBar()->addAction(actSetting);
+ menuBar()->addAction(actAbout);
+ menuBar()->addAction(actExit);
+
+ }
+
+void frmMain::onTabWidgetSelectIndexChanged()
+ {
+ LoadSubMenu();
+ }
+
+void frmMain::loadContent()
+ {
+ //Load ModuleList
+ loadModuleList();
+ //Load SetList
+ loadSetList();
+ //Load Statistic List
+ loadStatistic();
+ }
+
+void frmMain::loadModuleList()
+ {
+ treeModuleList->clear();
+
+ QList<QString> moduleList = controller->GetModuleList();
+ foreach(QString moduleName, moduleList)
+ {
+ QTreeWidgetItem* item = new QTreeWidgetItem(treeModuleList);
+ item->setText(0, UNSELECTITEMHEADER + moduleName);
+
+ QList<QString> caseList = controller->GetCaseListByModule(
+ moduleName);
+
+ foreach(QString caseName, caseList)
+ {
+ QTreeWidgetItem* caseItem = new QTreeWidgetItem(item);
+ caseItem->setText(0, UNSELECTITEMHEADER + caseName);
+ }
+ }
+ if (moduleList.size() > 0)
+ {
+ treeModuleList->setCurrentItem(treeModuleList->topLevelItem(0));
+ }
+ }
+
+void frmMain::reloadStatisticItem(QString name, QTreeWidgetItem* item,
+ TSTFCaseStatusType type)
+ {
+ QList<CSTFCase> caseList = controller->GetCasesByStatus(type);
+ while (item->childCount() != 0)
+ {
+ item->removeChild(item->child(0));
+ }
+ item->setText(0, name + "(" + QString::number(caseList.size(), 10) + ")");
+ foreach(CSTFCase aCase, caseList)
+ {
+ QTreeWidgetItem* child = new QTreeWidgetItem(item);
+ child->setText(0, aCase.Name());
+ }
+ }
+
+void frmMain::loadStatistic()
+ {
+ //executedItems;
+ reloadStatisticItem("Executed Cases", executedItems, EStatusExecuted);
+
+ //passedItems;
+ reloadStatisticItem("Passed Cases", passedItems, EStatusPassed);
+
+ //failedItems;
+ reloadStatisticItem("Failed Cases", failedItems, EStatusFailed);
+
+ //crashedItems;
+ reloadStatisticItem("Crashed Cases", crashedItems, EStatusCrashed);
+
+ //abortedItems;
+ reloadStatisticItem("Aborted Cases", abortedItems, EStatusAborted);
+
+ }
+
+void frmMain::loadSetList()
+ {
+ cboSetList->clear();
+
+ QList<QString> setList = controller->GetSetList();
+ foreach(QString setName, setList)
+ {
+ cboSetList->addItem(setName);
+ }
+// if (setList.size() > 0)
+// {
+// //cboSetList->setCurrentIndex(0);
+// on_cboSetList_currentIndexChanged(setList.at(0));
+// }
+ }
+
+QList<CSTFCase> frmMain::getSelectedCases()
+ {
+ int index = 0;
+ QTreeWidgetItem* item = treeModuleList->topLevelItem(index);
+ QList<CSTFCase> caseList;
+ while (item != 0)
+ {
+ for (int i = 0; i < item->childCount(); i++)
+ {
+ QTreeWidgetItem* child = item->child(i);
+ if (child->text(0).startsWith(SELECTITEMHEADER))
+ {
+ CSTFCase aCase(child->text(0).remove(0,3), i);
+ aCase.SetIndex(i);
+ //aCase.SetModuleName(moduleBox->text());
+ aCase.SetModuleName(item->text(0).remove(0,3));
+ caseList.append(aCase);
+ }
+ }
+ index++;
+ item = treeModuleList->topLevelItem(index);
+ }
+ return caseList;
+ }
+
+void frmMain::on_cboSetList_currentIndexChanged(QString item)
+ {
+ lstSetCases->clear();
+ QList<QString> list = controller->GetCaseListBySet(item);
+ foreach(QString caseName, list)
+ {
+ lstSetCases->addItem(caseName);
+ }
+ }
+
+void frmMain::on_actRunCaseSeq_triggered()
+ {
+ //run case seq
+ controller->RunCases(getSelectedCases(), Sequentially);
+ }
+
+void frmMain::on_actRunCasePar_triggered()
+ {
+ controller->RunCases(getSelectedCases(), Parallel);
+ }
+
+void frmMain::on_actAddtoSet_triggered()
+ {
+
+ QList<CSTFCase> list = getSelectedCases();
+ if (list.size() == 0)
+ {
+ QErrorMessage *errorMessageDialog = new QErrorMessage(this);
+ errorMessageDialog->showMessage(tr(
+ "Please select cases you want to added to set."));
+ return;
+ }
+
+ QList<QString> setList = controller->GetSetList();
+
+ /*
+ bool ok;
+ QString setName = QInputDialog::getItem(this, tr(
+ "Add select cases to Set"), tr("Sets:"), setList, 0, false, &ok);
+ if (ok && !setName.isEmpty())
+ {
+ controller->AddCaseToSet(list, setName);
+ }
+ */
+
+ //temp code, because UIStore()->AddCaseToSet() is not support to define a set name.
+ controller->AddCaseToSet(list, "");
+ tabWidget->setCurrentIndex(1);
+
+ }
+
+void frmMain::on_actSelectAll_triggered()
+ {
+ QString header = UNSELECTITEMHEADER;
+ if(actSelectAll->text() == "Select All")
+ {
+ actSelectAll->setText("UnSelect All");
+ header = SELECTITEMHEADER;
+ }
+ else
+ {
+ actSelectAll->setText("Select All");
+ }
+
+ int index = 0;
+ QTreeWidgetItem* item = treeModuleList->topLevelItem(index);
+ while (item != 0)
+ {
+ item->setText(0, item->text(0).replace(0,3, header));
+ for (int i = 0; i < item->childCount(); i++)
+ {
+ QTreeWidgetItem* child = item->child(i);
+ child->setText(0,child->text(0).replace(0,3,header));
+ }
+ index++;
+ item = treeModuleList->topLevelItem(index);
+ }
+ }
+
+void frmMain::on_actExpandAll_triggered()
+ {
+ treeModuleList->expandAll();
+ }
+
+void frmMain::on_actCollapseAll_triggered()
+ {
+ treeModuleList->collapseAll();
+ }
+
+void frmMain::on_actSetting_triggered()
+ {
+ DlgSetting dlgSet(uiSetting);
+ int result = dlgSet.exec();
+ if(result == QDialog::Accepted)
+ {
+ setSetting();
+ }
+ }
+
+void frmMain::on_actRunSetSeq_triggered()
+ {
+ QString setName = cboSetList->currentText();
+ controller->RunSets(setName, Sequentially);
+ }
+
+void frmMain::on_actRunSetPar_triggered()
+ {
+ QString setName = cboSetList->currentText();
+ controller->RunSets(setName, Parallel);
+ }
+
+void frmMain::on_actNewSet_triggered()
+ {
+ //not supported.
+ QErrorMessage *errorMessageDialog = new QErrorMessage(this);
+ errorMessageDialog->showMessage(
+ tr(
+ "The feature is not supported in this version.\r\n \
+ If you want to Add test set.\r\n \
+ Please switch to \"Case\" tab, Select case(s) and perform \"Add case to set\"."));
+ return;
+ /*
+ * These function is not supported in this version.
+ * Unless this function has been impelemented:
+ * UIStore()->AddSet(setName);
+ *
+ bool ok;
+ QString text = QInputDialog::getText(this, tr("Create a new Set"), tr(
+ "Input a set name:"), QLineEdit::Normal, QDir::home().dirName(),
+ &ok);
+ if (ok && !text.isEmpty())
+ {
+ controller->CreateSet(text);
+ }
+ */
+ }
+
+void frmMain::on_actDelSet_triggered()
+ {
+ //not supported.
+ QErrorMessage *errorMessageDialog = new QErrorMessage(this);
+ errorMessageDialog->showMessage(
+ tr(
+ "The feature is not supported in this version.\r\n \
+ If you want to remove test set.\r\n \
+ Please delete them under {epoc root}\\winscw\\c\\TestFramework \
+ And restart Application"));
+ return;
+ /*
+ * These function is not supported in this version.
+ * Unless this function has been impelemented:
+ * UIStore()->RemoveSet(setName);
+ *
+ QString setName = cboSetList->currentText();
+ QMessageBox msgBox(QMessageBox::Warning, tr("Delete a Set"), tr(
+ "Do you really want to delete the set?"), 0, this);
+ msgBox.addButton(tr("&Delete"), QMessageBox::AcceptRole);
+ msgBox.addButton(tr("&Cancel"), QMessageBox::RejectRole);
+ if (msgBox.exec() == QMessageBox::AcceptRole)
+ {
+ controller->DeleteSet(setName);
+ }
+
+
+ */
+ }
+
+void frmMain::on_actPause_triggered()
+ {
+ if (btnPauseCase->text() == "Pause")
+ {
+ controller->PauseCase();
+ btnPauseCase->setText(tr("Resume"));
+ actPause->setText(tr("Resume"));
+ }
+ else
+ {
+ controller->ResumeCase();
+ btnPauseCase->setText(tr("Pause"));
+ actPause->setText(tr("Pause"));
+ }
+ }
+
+void frmMain::on_actAbort_triggered()
+ {
+ controller->AbortCase();
+ }
+
+void frmMain::on_treeModuleList_itemClicked(QTreeWidgetItem* item, int /*column*/)
+ {
+ QString header = UNSELECTITEMHEADER;
+ if(item->text(0).startsWith(UNSELECTITEMHEADER))
+ {
+ header = SELECTITEMHEADER;
+ }
+ item->setText(0 , item->text(0).replace(0, 3, header));
+ for(int i=0;i<item->childCount();i++)
+ {
+ item->child(i)->setText(0, item->child(i)->text(0).replace(0, 3, header));
+ }
+ }
+
+void frmMain::on_actAbout_triggered()
+ {
+ QString str = QtUIVersion;
+ str.append("\r\n").append("STF version:");
+
+ str.append(QString::number(STIF_MAJOR_VERSION, 10)).append(".");
+ str.append(QString::number(STIF_MINOR_VERSION, 10)).append(".");
+ str.append(QString::number(STIF_BUILD_VERSION, 10));
+ str.append(" --").append(STIF_REL_DATE).append("\r\n");
+ str.append("---");
+ str.append("\r\nCopyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. ");
+
+ QMessageBox::information(this, tr("About"), str);
+ }
+
+void frmMain::on_actOpenFile_triggered()
+ {
+ QString fileName = QFileDialog::getOpenFileName(this, tr(
+ "Select ini file"), tr("c:\\"), tr(
+ "Ini Files (*.ini);;All Files (*)"));
+ if (!fileName.isEmpty())
+ {
+ controller->OpenEngineIniFile(fileName);
+ this->loadModuleList();
+ }
+ }
+
+void frmMain::on_actClearStatistics_triggered()
+ {
+ model->ClearCasesStatus();
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/src/main.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QT C++ based Class.
+* Application entrance.
+*
+*/
+#include <QApplication>
+#include "frmmain.h"
+
+int main(int argc, char* argv[])
+{
+ QApplication app(argc, argv);
+ frmMain win;
+ win.showMaximized();
+ return app.exec();
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/src/stfqtuicontroller.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,324 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: QT C++ based Class.
+ * Stf Controller implementation.
+ *
+ */
+#include "stfqtuicontroller.h"
+#include <stifinternal/UIStoreIf.h>
+#include <stifinternal/UIStoreContainer.h>
+//#include "stiflogger.h"
+#include <QDateTime>
+
+const QString TEMPSETNAME = "TEMPSET";
+const QString DEFAULTINI = "c:\\testframework\\testframework.ini";
+
+//__DECLARE_LOG
+
+StfQtUIController::StfQtUIController(IStfQtUIModel* aModel) :
+ model(aModel), isShowOutput(false)
+ {
+// __OPENLOGL ("\\STFQtUI\\", "StifQtUi.log" );
+ executor = new CStifExecutor();
+ executor->OpenIniFile(DEFAULTINI);
+ executor->AddStifCaseUpdateListener(this);
+ }
+
+StfQtUIController::~StfQtUIController()
+ {
+ executor->RemoveStifCaseUpdateListener(this);
+ delete executor;
+ executor = NULL;
+// __CLOSELOG;
+ }
+//for cases
+
+bool StfQtUIController::OpenEngineIniFile(const QString& fileName)
+ {
+ delete executor;
+ executor = new CStifExecutor();
+ bool rst = executor->OpenIniFile(fileName);
+ executor->AddStifCaseUpdateListener(this);
+ return rst;
+ }
+
+QList<QString> StfQtUIController::GetModuleList()
+ {
+ QList<CSTFModule> modules = executor->GetModuleList();
+ QList<QString> moduleList;
+ foreach(CSTFModule m, modules)
+ {
+ moduleList.append(m.Name());
+ }
+ return moduleList;
+ }
+
+CSTFModule StfQtUIController::GetModuleByName(const QString& moduleName)
+ {
+ QList<CSTFModule> modules = executor->GetModuleList();
+ CSTFModule module;
+ foreach(CSTFModule m, modules)
+ {
+ if(m.Name() == moduleName)
+ {
+ module = m;
+ break;
+ }
+ }
+ return module;
+
+ }
+
+QList<QString> StfQtUIController::GetCaseListByModule(const QString& moduleName)
+ {
+ QList<QString> caseList;
+ if (moduleName != "")
+ {
+ QList<CSTFCase> cases = executor->GetCaseList(moduleName);
+ foreach(CSTFCase c, cases)
+ {
+ caseList.append(c.Name());
+ }
+ }
+
+ return caseList;
+ }
+
+CSTFCase StfQtUIController::GetCase(const QString& moduleName, const int index)
+ {
+ CSTFCase rst;
+ if(moduleName != "")
+ {
+ QList<CSTFCase> cases = executor->GetCaseList(moduleName);
+ if(index < cases.length())
+ {
+ rst = cases.at(index);
+ }
+ }
+ return rst;
+ }
+
+void StfQtUIController::RunCases(const QList<CSTFCase>& caseList,
+ const TSTFCaseRunningType& type)
+ {
+ if (caseList.size() == 1)
+ {
+ CSTFCase aCase = caseList.at(0);
+ QString msg = "Start execute case:" + aCase.Name();
+ FireOnGetOutput(msg);
+ executor->ExecuteSingleCase(aCase.ModuleName(), aCase.Index());
+ }
+ else
+ {
+ //create a temp set, append cases into the set and execute it.
+ executor->CreateSet(TEMPSETNAME);
+ foreach(CSTFCase aCase, caseList)
+ {
+ executor->AddtoSet(TEMPSETNAME, aCase);
+ }
+ RunSets(TEMPSETNAME, type);
+ executor->RemoveSet(TEMPSETNAME);
+ }
+ }
+
+void StfQtUIController::AddCaseToSet(const QList<CSTFCase>& caseList,
+ const QString& /*setName*/)
+ {
+ QString setName = QDateTime::currentDateTime().toString("hh_mm_ss");
+ setName.append(".set");
+ executor->CreateSet(setName);
+ foreach(CSTFCase aCase, caseList)
+ {
+ executor->AddtoSet(setName, aCase);
+ }
+ executor->SaveSet(setName);
+ executor->RemoveSet(setName);
+ FireOnSetListChanged();
+ }
+
+//for set
+
+QList<QString> StfQtUIController::GetSetList()
+ {
+ return executor->GetSetList();
+ }
+QList<QString> StfQtUIController::GetCaseListBySet(const QString& setName)
+ {
+ QList<CSTFCase> cases = executor->GetCaseListFromSet(setName);
+ QList<QString> caseList;
+ foreach(CSTFCase c, cases)
+ {
+ caseList.append(c.Name());
+ }
+ return caseList;
+ }
+
+void StfQtUIController::CreateSet(const QString& setName)
+ {
+ executor->CreateSet(setName);
+ //executor->SaveSet(setName);
+ FireOnSetListChanged();
+ }
+
+void StfQtUIController::DeleteSet(const QString& setName)
+ {
+ executor->RemoveSet(setName);
+ //executor->SaveSet(setName);
+ FireOnSetListChanged();
+ }
+
+void StfQtUIController::RunSets(const QString& setName, const TSTFCaseRunningType& type)
+ {
+ executor->ExecuteSet(setName, 0, type);
+ }
+
+//for Started
+void StfQtUIController::PauseCase()
+ {
+ model->PauseCase();
+ QString msg = "Execution Paused";
+ FireOnGetOutput(msg);
+ }
+
+void StfQtUIController::ResumeCase()
+ {
+ model->ResumeCase();
+ FireOnGetOutput("Execution Resumed");
+ }
+
+void StfQtUIController::AbortCase()
+ {
+ model->AbortCase();
+ FireOnGetOutput("Case Aborted");
+ }
+
+bool StfQtUIController::ShowOutput()
+ {
+ return isShowOutput;
+ }
+
+void StfQtUIController::SetShowOutput(bool isShow)
+ {
+ isShowOutput = isShow;
+ }
+
+QList<CSTFCase> StfQtUIController::GetCasesByStatus(const TSTFCaseStatusType& type)
+ {
+ return model->GetCasesByStatus(type);
+ }
+
+void StfQtUIController::AddStfEventListener(IStfEventListener* listener)
+ {
+ if (!listenerList.contains(listener))
+ {
+ listenerList.append(listener);
+ }
+ }
+void StfQtUIController::RemoveStfEventListener(IStfEventListener* listener)
+ {
+ if (listenerList.contains(listener))
+ {
+ listenerList.removeOne(listener);
+ }
+ }
+
+void StfQtUIController::OnGetCaseUpdated(CStartedTestCase* aCase,
+ CSTFCase& stfcase, int flags)
+ {
+ if (flags & CUIStoreIf::EPrintUpdate || aCase == NULL)
+ {
+ return;
+ }
+ QString msg = "case Name:";
+ msg += stfcase.Name() + "\r\n Status:";
+ flags = aCase->Status();
+ if (flags & CUIStoreIf::EStatusRunning)
+ {
+ model->AddRunningCase(aCase, stfcase);
+ msg += "start running";
+ FireOnCaseOutputChanged(IStfEventListener::ECreate, (int) aCase,
+ stfcase.Name());
+ }
+ else if (flags & CUIStoreIf::EStatusAborted)
+ {
+ FireOnCaseOutputChanged(IStfEventListener::EClose, (int) aCase, "");
+ model->RemoveRunningCase(aCase);
+ model->AddCaseByStatus(EStatusAborted, stfcase);
+ msg += "aborted";
+
+ }
+ else if (flags & CUIStoreIf::EStatusExecuted)
+ {
+ FireOnCaseOutputChanged(IStfEventListener::EClose, (int) aCase, "");
+ model->RemoveRunningCase(aCase);
+ model->AddCaseByStatus(EStatusExecuted, stfcase);
+
+ if (flags & CUIStoreIf::EStatusCrashed)
+ {
+ model->AddCaseByStatus(EStatusCrashed, stfcase);
+ msg += "crashed";
+ }
+ else if (flags & CUIStoreIf::EStatusFailed)
+ {
+ model->AddCaseByStatus(EStatusFailed, stfcase);
+ msg += "failed";
+ }
+ else if (flags & CUIStoreIf::EStatusPassed)
+ {
+ model->AddCaseByStatus(EStatusPassed, stfcase);
+ msg += "passed";
+ }
+
+ }
+ else
+ {
+ return;
+ }
+
+ FireOnGetOutput(msg);
+ }
+
+void StfQtUIController::OnGetCaseOutput(CStartedTestCase* aCase, QString& msg)
+ {
+ FireOnCaseOutputChanged(IStfEventListener::EOutput, (int) aCase, msg);
+ }
+
+void StfQtUIController::FireOnCaseOutputChanged(
+ IStfEventListener::CaseOutputCommand cmd, int index, QString msg)
+ {
+ if (ShowOutput())
+ {
+ foreach(IStfEventListener* listener, listenerList)
+ {
+ listener->OnCaseOutputChanged(cmd,
+ QString::number(index, 10), msg);
+ }
+ }
+ }
+
+void StfQtUIController::FireOnGetOutput(QString message)
+ {
+ foreach(IStfEventListener* listener, listenerList)
+ {
+ listener->OnGetMessage(message);
+ }
+ }
+
+void StfQtUIController::FireOnSetListChanged()
+ {
+ foreach(IStfEventListener* listener, listenerList)
+ {
+ listener->OnSetListChanged();
+ }
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/src/stfqtuimodel.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: QT C++ based Class.
+ * application model implementation.
+ *
+ */
+#include "stfqtuimodel.h"
+#include <UIEngineContainer.h>
+
+StfQtUIModel::StfQtUIModel()
+ {
+ //nothing to do.
+ }
+
+StfQtUIModel::~StfQtUIModel()
+ {
+ //nothing to do.
+ }
+
+void StfQtUIModel::PauseCase()
+ {
+ foreach(const CStartedTestCase* startedCase, runningCaseList.keys())
+ {
+ startedCase->UIEngineContainer().PauseTest();
+ }
+ }
+
+void StfQtUIModel::ResumeCase()
+ {
+ foreach(const CStartedTestCase* startedCase, runningCaseList.keys())
+ {
+ startedCase->UIEngineContainer().ResumeTest();
+ }
+ }
+
+void StfQtUIModel::AbortCase()
+ {
+ foreach(const CStartedTestCase* startedCase, runningCaseList.keys())
+ {
+ startedCase->UIEngineContainer().CancelTest();
+ }
+ }
+
+void StfQtUIModel::AddRunningCase(const CStartedTestCase* startedCase,
+ const CSTFCase& stfCase)
+ {
+ runningCaseList.insert(startedCase, stfCase);
+ FireOnRunningCaseChangedEvent();
+ }
+
+void StfQtUIModel::RemoveRunningCase(const CStartedTestCase* startedCase)
+ {
+ runningCaseList.remove(startedCase);
+ FireOnRunningCaseChangedEvent();
+ }
+
+void StfQtUIModel::AddCaseByStatus(const TSTFCaseStatusType& type, const CSTFCase& aCase)
+ {
+ switch (type)
+ {
+ case EStatusRunning:
+ break;
+ case EStatusExecuted:
+ executedCaseList.append(aCase);
+ break;
+ case EStatusPassed:
+ passedCaseList.append(aCase);
+ break;
+ case EStatusFailed:
+ failedCaseList.append(aCase);
+ break;
+ case EStatusAborted:
+ abortCaseList.append(aCase);
+ break;
+ case EStatusCrashed:
+ crashedCaseList.append(aCase);
+ break;
+ }
+ FireOnCaseStatisticChangedEvent();
+ }
+
+QList<CSTFCase> StfQtUIModel::GetCasesByStatus(const TSTFCaseStatusType& type)
+ {
+ switch (type)
+ {
+ case EStatusRunning:
+ return runningCaseList.values();
+ case EStatusExecuted:
+ return executedCaseList;
+ case EStatusPassed:
+ return passedCaseList;
+ case EStatusFailed:
+ return failedCaseList;
+ case EStatusAborted:
+ return abortCaseList;
+ case EStatusCrashed:
+ return crashedCaseList;
+ }
+ QList<CSTFCase> list;
+ return list;
+ }
+
+void StfQtUIModel::AddStifModelEventListener(
+ IStifModelEventListener* listener)
+ {
+ if (!listenerList.contains(listener))
+ {
+ listenerList.append(listener);
+ }
+ }
+
+void StfQtUIModel::RemoveStifModelEventListener(
+ IStifModelEventListener* listener)
+ {
+ if (!listenerList.contains(listener))
+ {
+ listenerList.removeOne(listener);
+ }
+ }
+
+void StfQtUIModel::FireOnCaseStatisticChangedEvent()
+ {
+ foreach(IStifModelEventListener* listener, listenerList)
+ {
+ listener->OnCaseStatisticChanged();
+ }
+ }
+
+void StfQtUIModel::FireOnRunningCaseChangedEvent()
+ {
+ foreach(IStifModelEventListener* listener, listenerList)
+ {
+ listener->OnRunningCaseChanged();
+ }
+ }
+
+void StfQtUIModel::ClearCasesStatus()
+ {
+ executedCaseList.clear();
+ passedCaseList.clear();
+ failedCaseList.clear();
+ abortCaseList.clear();
+ crashedCaseList.clear();
+ FireOnCaseStatisticChangedEvent();
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/src/stifexecutor.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,360 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: QT C++ and Symbian C++ combination Class.
+ * STIF UI interface and engine caller implementaion.
+ *
+ */
+#include <e32base.h>
+#include <e32cons.h>
+#include <e32svr.h>
+#include <f32file.h>
+#include <HAL.h>
+#include <hal_data.h>
+#include <stiflogger.h>
+#include <QString>
+#include "stifexecutor.h"
+#include "StifTFwIf.h"
+
+
+CStifExecutor::CStifExecutor() :
+ listenerList(NULL)
+ {
+// __LOG(_L("started"));
+ TInt result;
+ TRAP(result, CUIStoreIf::ConstructL());
+// __LOG1(_L("CUIStoreIf ConstructL, result=%d"), result);
+ if (result != KErrNone)
+ {
+ return;
+ }
+ TRAP(result, iBuffer = HBufC::NewL(500));
+// __LOG1(_L("Create Case Execution output buffer, result=%d"), result);
+
+ }
+
+CStifExecutor::~CStifExecutor()
+ {
+ UIStore().Close();
+ delete iBuffer;
+ if (listenerList)
+ {
+ delete listenerList;
+ listenerList = NULL;
+ }
+// __LOG(_L("finished"));
+ }
+
+bool CStifExecutor::OpenIniFile(const QString& filename)
+ {
+ TInt result = UIStore().Open(QString2TPtrC(filename));
+// __LOG2(_L("Open ini file %s.result=%d"),QString2TPtrC(filename).Ptr(),result);
+ return (result == KErrNone);
+ }
+
+TPtrC CStifExecutor::QString2TPtrC(const QString& aString)
+ {
+ TPtrC ret(reinterpret_cast<const TText*> (aString.constData()),
+ aString.length());
+ return ret;
+ }
+QString CStifExecutor::TDesC2QString(const TDesC& des)
+ {
+ //#ifdef QT_NO_UNICODE
+ //return QString::fromLocal8Bit((char*)des.Ptr(), des.Length());
+ //#else
+ QString rst = QString::fromUtf16(des.Ptr(), des.Length());
+ return rst;
+ //#endif
+ }
+
+void CStifExecutor::AddStifCaseUpdateListener(
+ IStifCaseUpdateListener* listener)
+ {
+// __LOG(_L("AddStifCaseUpdateListener"));
+ if (!listenerList)
+ {
+ listenerList = new QList<IStifCaseUpdateListener*> ();
+ }
+ if (!listenerList->contains(listener))
+ {
+ listenerList->append(listener);
+ }
+ }
+
+void CStifExecutor::RemoveStifCaseUpdateListener(
+ IStifCaseUpdateListener* listener)
+ {
+// __LOG(_L("RemoveStifCaseUpdateListener"));
+ if (!listenerList)
+ {
+ return;
+ }
+
+ if (listenerList->contains(listener))
+ {
+ listenerList->removeOne(listener);
+ }
+
+ }
+
+QList<CSTFModule> CStifExecutor::GetModuleList()
+ {
+ QList<CSTFModule> list;
+ RRefArray<TDesC> modules;
+// __LOG(_L("GetModuleList"));
+ TInt ret = UIStore().Modules(modules);
+// __LOG1(_L("LoadAllModules %d"), ret);
+// __LOG1(_L("Modules number=%d"), modules.Count());
+ for (TInt i = 0; i < modules.Count(); i++)
+ {
+// __LOG1(_L("Get Module Names %d"), i);
+ CSTFModule module;
+ module.SetName(QString::fromUtf16(modules[i].Ptr(),
+ modules[i].Length()));
+ //module.SetName(TDesC2QString(modules[i]));
+ list.append(module);
+ }
+ modules.Reset();
+ modules.Close();
+ return list;
+ }
+
+QList<CSTFCase> CStifExecutor::GetCaseList(const QString& moduleName)
+ {
+ TPtrC name = QString2TPtrC(moduleName);
+ QList<CSTFCase> list;
+ RRefArray<CTestInfo> testCases;
+ TInt ret = UIStore().TestCases(testCases, name, KNullDesC);
+// __LOG1(_L("Get TestCases: %d"), ret);
+ for (TInt i = 0; i < testCases.Count(); i++)
+ {
+// __LOG1(_L("Case Number: %d"),testCases[i].TestCaseNum());
+ CSTFCase testcase;
+ testcase.SetName(TDesC2QString(testCases[i].TestCaseTitle()));
+ testcase.SetIndex(i);
+ list.append(testcase);
+ }
+ testCases.Reset();
+ testCases.Close();
+ return list;
+ }
+
+void CStifExecutor::ExecuteSingleCase(const QString& moduleName, const int caseIndex)
+ {
+// __LOG(_L("ExecuteCase start"));
+ TPtrC name = QString2TPtrC(moduleName);
+ RRefArray<CTestInfo> testCases;
+ TInt ret = UIStore().TestCases(testCases, name, KNullDesC);
+// __LOG1(_L("Get TestCases return code=%d"), ret);
+ if (testCases.Count() > caseIndex)
+ {
+ TInt index;
+ UIStore().StartTestCase(testCases[caseIndex], index);
+// __LOG1(_L("start test case index=%d"), index);
+ }
+ testCases.Reset();
+ testCases.Close();
+// __LOG(_L("ExecuteCase end"));
+
+ }
+
+QList<QString> CStifExecutor::GetSetList()
+ {
+ QList<QString> list;
+ RRefArray<TDesC> aArray;
+ TInt ret = UIStore().GetTestSetsList(aArray);
+// __LOG1(_L("Get TestSet list return code=%d"), ret);
+ if (ret != KErrNone) //setInfos.Count() != 1
+ {
+ return list;
+ }
+ for (int i = 0; i < aArray.Count(); i++)
+ {
+ list.append(TDesC2QString(aArray[i]));
+ }
+ aArray.Reset();
+ aArray.Close();
+ return list;
+ }
+
+QList<CSTFCase> CStifExecutor::GetCaseListFromSet(const QString& setName)
+ {
+// __LOG(_L("GetCaseListFromSet start."));
+ QList<CSTFCase> list;
+ TPtrC name = QString2TPtrC(setName);
+
+ //__LOG(name);
+ if (name.Length() == 0)
+ {
+ return list;
+ }
+
+// __LOG1(_L("name.Length()=%d"), name.Length());
+ TInt ret = UIStore().LoadTestSet(name);
+// __LOG1(_L("Load Test Set return=%d"),ret);
+ const CTestSetInfo* set = NULL;
+ TRAP(ret , set = &UIStore().TestSetL(name));
+// __LOG(_L("GetCaseListFromSet TestSetL."));
+ if(ret != KErrNone)
+ {
+ return list;
+ }
+ const RRefArray<const CTestInfo>& testCases = set->TestCases();
+// __LOG(_L("GetCaseListFromSet TestCases."));
+ TInt count = testCases.Count();
+ for (TInt i = 0; i < count; i++)
+ {
+ CSTFCase testcase;
+ testcase.SetName(TDesC2QString(testCases[i].TestCaseTitle()));
+ testcase.SetIndex(testCases[i].TestCaseNum());
+ testcase.SetModuleName(TDesC2QString(testCases[i].ModuleName()));
+ list.append(testcase);
+ }
+// __LOG(_L("GetCaseListFromSet end."));
+ return list;
+ }
+
+void CStifExecutor::CreateSet(const QString& setName)
+ {
+ TPtrC name = QString2TPtrC(setName);
+ TInt ret = UIStore().CreateTestSet(name);
+// __LOG1(_L("CreateSet return: %d"), ret);
+// ret = UIStore().LoadTestSet(name);
+// __LOG1(_L("Load Set after CreateSet return: %d"), ret);
+
+
+ }
+
+void CStifExecutor::SaveSet(QString& setName)
+ {
+ TPtrC name = QString2TPtrC(setName);
+ TFileName testSetName;
+ testSetName.Copy(name);
+ TInt ret = UIStore().SaveTestSet(testSetName);
+ setName = TDesC2QString(testSetName);
+// __LOG1(_L("SaveSet return: %d"),ret);
+ }
+
+void CStifExecutor::RemoveSet(const QString& setName)
+ {
+ //This method wil not work at this stage.
+ TPtrC name = QString2TPtrC(setName);
+ UIStore().RemoveTestSet(name);
+ }
+
+void CStifExecutor::AddtoSet(const QString& setName, CSTFCase& caseInfo)
+ {
+ //IMPORT_C TInt AddToTestSet( const TDesC& aSetName, const CTestInfo& aTestInfo );
+ TPtrC modulename = QString2TPtrC(caseInfo.ModuleName());
+ RRefArray<CTestInfo> testCases;
+ TInt ret = UIStore().TestCases(testCases, modulename, KNullDesC);
+// __LOG1(_L("Get TestCases: %d"), ret);
+ for (TInt i = 0; i < testCases.Count(); i++)
+ {
+// __LOG1(_L("Case Number: %d"),testCases[i].TestCaseNum());
+ if (TDesC2QString(testCases[i].TestCaseTitle()) == caseInfo.Name()
+ && testCases[i].TestCaseNum() == caseInfo.Index())
+ {
+ ret = UIStore().AddToTestSet(QString2TPtrC(setName), testCases[i]);
+// __LOG1(_L("AddToTestSet: %d"), ret);
+ break;
+ }
+ }
+ testCases.Reset();
+ testCases.Close();
+ }
+
+void CStifExecutor::ExecuteSet(const QString& SetName, const int startIndex,
+ const TSTFCaseRunningType type)
+ {
+ CStartedTestSet::TSetType setType = CStartedTestSet::ESetSequential;
+ if (type == Parallel)
+ {
+ setType = CStartedTestSet::ESetParallel;
+ }
+ const CTestSetInfo* set = NULL;
+ TInt ret;
+ TBuf<30> test;
+ test.Append(QString2TPtrC(SetName));
+// __LOG(_L("StartTestSet GetSetName:"));
+// __LOG(test);
+ TRAP(ret, set = &UIStore().TestSetL(test));
+
+ //const CTestSetInfo& set = UIStore().TestSetL(QString2TPtrC(SetName));
+ if(ret != KErrNone)
+ {
+// __LOG1(_L("StartTestSet GetTestSet Error return=%d"),ret);
+ return;
+ }
+ int a = startIndex;
+ ret = UIStore().StartTestSet(*set, a, setType);
+// __LOG1(_L("StartTestSet return=%d"),ret);
+ }
+
+void CStifExecutor::Update(CStartedTestCase* aCase, int flags)
+ {
+// __LOG1(_L("CStifExecutor::Update return case=%d"),aCase);
+// __LOG1(_L("CStifExecutor::Update return status=%d"),flags);
+
+ if(aCase == NULL)
+ {
+ return;
+ }
+
+ if (flags & CUIStoreIf::EPrintUpdate)
+ {
+ //Cases output information update.
+ const RPointerArray<CTestProgress> printArray = aCase->PrintArray();
+ TInt rows = aCase->PrintArray().Count();
+ TPtr buffer(iBuffer->Des());
+ buffer.Zero();
+ for (int i = 0; i < rows; i++)
+ {
+ buffer.Append(_L("\r\n"));
+ buffer.Append(printArray[i]->iDescription);
+ buffer.Append(_L(" "));
+ buffer.Append(printArray[i]->iText);
+ buffer.Append(_L("\r\n"));
+ }
+ QString msg = TDesC2QString(buffer);
+// __LOG(_L("Get output msg:"));
+// __LOG(buffer);
+ if (listenerList)
+ {
+ for (int i = 0; i < listenerList->size(); i++)
+ {
+ listenerList->at(i)->OnGetCaseOutput(aCase, msg);
+ }
+ }
+
+ }
+ else
+ {
+ //case status changed update.
+ CSTFCase testcase;
+ testcase.SetName(TDesC2QString(aCase->TestInfo().TestCaseTitle()));
+ testcase.SetIndex(aCase->TestInfo().TestCaseNum());
+ testcase.SetModuleName(TDesC2QString(aCase->TestInfo().ModuleName()));
+ if (listenerList)
+ {
+ for (int i = 0; i < listenerList->size(); i++)
+ {
+ listenerList->at(i)->OnGetCaseUpdated(aCase, testcase, flags);
+ }
+ }
+
+ }
+
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/src/uisetting.cpp Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: QT C++ based Class.
+ *
+ */
+
+#include <QFile>
+#include <QTextStream>
+#include <QDateTime>
+#include "uisetting.h"
+const QString SETTINGFILE = "c:\\TestFramework\\StfQtUISetting.ini";
+
+UiSetting::UiSetting()
+ {
+ if(!load())
+ {
+ loadDefault();
+ }
+ }
+
+UiSetting::~UiSetting()
+ {
+ }
+
+QString UiSetting::ReadSetting(const QString& item)
+ {
+ QString value = "";
+ if(settingList.contains(item))
+ {
+ value = settingList.value(item);
+ }
+ return value;
+ }
+
+
+void UiSetting::SetSetting(const QString& item, const QString& value)
+ {
+ if(settingList.contains(item))
+ {
+ settingList.remove(item);
+ }
+ settingList.insert(item, value);
+ save();
+ }
+
+
+void UiSetting::loadDefault()
+ {
+ settingList.clear();
+ settingList.insert("showoutput", "true");
+ //add mor default setting here.
+ }
+
+
+bool UiSetting::load()
+ {
+ QFile file(SETTINGFILE);
+ if(!file.open(QIODevice::ReadOnly))
+ {
+ return false;
+ }
+ QTextStream in(&file);
+ QString line, item, value;
+ int index;
+ while(!in.atEnd())
+ {
+ line = in.readLine().trimmed().toLower();
+ if(!line.startsWith("//"))
+ {
+ index = line.indexOf("=");
+ if(index > 0 && index < line.length() - 1)
+ {
+ item = line.left(index).trimmed();
+ value = line.right(line.length() - index -1);
+ settingList.insert(item, value);
+ }
+ }
+ //end while.
+ }
+ return true;
+ }
+
+bool UiSetting::save()
+ {
+ QFile file(SETTINGFILE);
+ if(!file.open(QIODevice::WriteOnly))
+ {
+ return false;
+ }
+ QTextStream in(&file);
+ in << "//STFQtUI Setting.\r\n";
+ in << "//Created at: " + QDateTime::currentDateTime().toString("yyyy.mm.dd hh:mm::ss");
+ in << "\r\n";
+ for(int i=0;i< settingList.size();i++)
+ {
+ in << settingList.keys()[i];
+ in << "=";
+ in << settingList.value(settingList.keys()[i]);
+ in << "\r\n";
+ }
+ return true;
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/stifqtui.pro Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,66 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: QT project file.
+#
+
+HEADERS += inc\version.h \
+ inc\frmmain.h \
+ inc\istfqtuicontroller.h \
+ inc\stfqtuicontroller.h \
+ inc\cstfcase.h \
+ inc\cstfmodule.h \
+ inc\istfqtuimodel.h \
+ inc\stfqtuimodel.h \
+ inc\dlgoutput.h \
+ inc\uisetting.h \
+ inc\dlgsetting.h \
+
+SOURCES += src\frmmain.cpp \
+ src\main.cpp \
+ src\stfqtuimodel.cpp \
+ src\stfqtuicontroller.cpp \
+ src\dlgoutput.cpp \
+ src\uisetting.cpp \
+ src\dlgsetting.cpp \
+
+RESOURCES +=
+symbian {
+ TARGET.UID3 = 0x2002BCA0
+ TARGET.EPOCALLOWDLLDATA = 1
+ //HEADERS += ../../../inc/.
+ INCLUDEPATH += /epoc32/include/mw
+ INCLUDEPATH += /epoc32/include/platform
+ INCLUDEPATH += /epoc32/include/platform/stifinternal
+ INCLUDEPATH += /epoc32/include/domain/osextensions
+ INCLUDEPATH += /epoc32/include/domain/osextensions/stif
+ HEADERS += inc\stifexecutor.h
+ SOURCES += src\stifexecutor.cpp
+ LIBS += -leuser \
+ -lefsrv \
+ -lstiftestinterface \
+ -lstiftfwif \
+ -lstiftestengine \
+ -lecons \
+ -lhal \
+ -lflogger
+ TARGET.CAPABILITY = AllFiles \
+ CommDD
+
+ # Export headers to SDK Epoc32/include directory
+ deploy.path = $$EPOCROOT
+ exportheaders.sources = $$PUBLIC_HEADERS
+ exportheaders.path = epoc32/include
+ for(header, exportheaders.sources)
+ :BLD_INF_RULES.prj_exports += "$$header $$deploy.path$$exportheaders.path/$$basename(header)"
+}
--- a/stifui/rom/Stifui.iby Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Stifui.iby file specifies needed STIF and STIF UI
-* and UITetsServerstarter components for ROM image
-*
-*/
-
-#ifndef __STIF_UI_IBY__
-#define __STIF_UI_IBY__
-
-S60_APP_EXE(Stifui)
-
-#ifdef S60_UPGRADABLE_APP_REG_RSC
- S60_UPGRADABLE_APP_REG_RSC(Stifui)
-#else
- S60_APP_AIF_RSC(Stifui)
-#endif
-
-S60_APP_RESOURCE(Stifui)
-
-S60_APP_EXE(UITestServerStarter)
-
-#ifdef S60_UPGRADABLE_APP_REG_RSC
- S60_UPGRADABLE_APP_REG_RSC(UITestServerStarter)
-#else
- S60_APP_AIF_RSC(UITestServerStarter)
-#endif
-
-
-S60_APP_RESOURCE(UITestServerStarter)
-
-// Note: before creating image, copy Stifui_31_Stub.sis from \stifui\sis\ to \epoc32\data\Z\system\install\
-data=ZSYSTEM\install\Stifui_31_Stub.sis System\Install\Stifui_31_Stub.sis
-
-#endif
-// End of File
--- a/stifui/sis/Stifui.pkg Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: Installation file for STIF UI
-;
-
-; Languages
-&EN
-
-; Package header, uid is the Stifui's uid
-#{"STIF UI"},(0x1028311D),0,1,0,TYPE=SA
-
-; Series60 product id for S60 3.0
-[0x101F7961], 0, 0, 0, {"Series60ProductID"}
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Logo
-; None
-
-; Package signature - Optional
-; None
-
-; Start of Package body
-
-; Condition blocks
-; None
-
-; Options list
-; None
-
-; Install files
-
- ;// Note: STIF needs to be installed before STIF UI can be used
-
- "\epoc32\release\armv5\udeb\Stifui.exe"-"!:\Sys\Bin\Stifui.exe"
- "\epoc32\data\z\private\10003a3f\apps\Stifui_reg.rsc"-"!:\Private\10003a3f\import\apps\Stifui_reg.rsc"
- "\epoc32\data\z\Resource\apps\Stifui.rsc"-"!:\Resource\apps\Stifui.rsc"
-
- "\epoc32\release\armv5\udeb\UITestServerStarter.exe"-"!:\Sys\Bin\UITestServerStarter.exe"
- "\epoc32\data\z\private\10003a3f\apps\UITestServerStarter_reg.rsc"-"!:\Private\10003a3f\import\apps\UITestServerStarter_reg.rsc"
- "\epoc32\data\z\Resource\apps\UITestServerStarter.rsc"-"!:\Resource\apps\UITestServerStarter.rsc"
-
-; Embedded SIS
-; None
-
-; End of Package body
-
-; PKG dependencies
-; None
-
-; PKG capabilities
-; None
\ No newline at end of file
Binary file stifui/sis/Stifui_31.sis has changed
Binary file stifui/sis/Stifui_31_Stub.SIS has changed
--- a/stifui/stifui/data/Stifui.rss Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2057 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file defines StifUI resources.
-*
-*/
-
-// RESOURCE IDENTIFIER
-NAME STIF // 4 letter ID
-
-// INCLUDES
-
-#include <eikon.rh>
-#include "Stifui.hrh"
-#include "Stifui_loc.hrh"
-#include <avkon.rsg>
-#include <avkon.rh>
-#include <avkon.mbg>
-#include <avkon.hrh>
-#include <CommonDialogs.hrh> // Enumerations of memory selection, file selection, save etc dialogs
-#include <CommonDialogs.rh> // Resource structures of memory selection, file selection, save etc dialogs
-#if defined (__S60_)
- #include <data_caging_paths_strings.hrh>
-#endif
-#include <appinfo.rh>
-
-// CONSTANTS
-
-
-// MACROS
-
-
-// RESOURCE DEFINITIONS
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf="STIF UI"; }
-
-RESOURCE EIK_APP_INFO
- {
- status_pane = r_appui_status_pane;
- }
-
-STRUCT STRING
- {
- BUF text;
- }
-
-
-// RESOURCE DEFINITIONS
-//-----------------------------------------------------------------------------
-//
-// r_appui_hotkeys
-// ?description
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE HOTKEYS r_appui_hotkeys
- {
- control=
- {
- HOTKEY { command=EAknCmdExit; key='e'; }
- };
- }
-
-
-// APPUI
-//-----------------------------------------------------------------------------
-//
-// r_appui_status_pane
-// Applications status panel.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE STATUS_PANE_APP_MODEL r_appui_status_pane
- {
- panes=
- {
- //SPANE_PANE
- // {
- // id = EEikStatusPaneUidNavi;
- // //type = EEikCtLabel;
- // //type = EAknCtTitlePane;
- // type = EAknCtNaviPane;
- // //resource = r_appui_statuspane_text;
- // resource = r_appui_navi_decorator;
- // },
- SPANE_PANE
- {
- id = EEikStatusPaneUidTitle;
- type = EAknCtTitlePane;
- resource = r_appui_overriden_app_name;
- }
- //SPANE_PANE
- // {
- // id = EEikStatusPaneUidContext;
- // type = EAknCtContextPane;
- // resource = ;
- // }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_status_pane
-// Status panel text.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE LABEL r_appui_statuspane_text
- {
- txt = "STIF UI";
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_overriden_app_name
-// Application name.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE TITLE_PANE r_appui_overriden_app_name
- {
- txt = qtn_app_caption_string;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_navi_decorator
-// ?description
-//
-//-----------------------------------------------------------------------------
-//
-/*
-RESOURCE NAVI_DECORATOR r_appui_navi_decorator
- {
- type = ENaviDecoratorControlTabGroup;
- control = TAB_GROUP
- {
- tab_width = EAknTabWidthWithTwoTabs; // two tabs
- active = 0;
- tabs = {
- TAB
- {
- id = ETestCaseMenuTab; // from application hrh
- txt = qtn_testcase_menu_tab;
- },
- TAB
- {
- id = ETestModulesMenuTab; // from application hrh
- txt = qtn_testmodules_menu_tab;
- },
- TAB
- {
- id = ETestSetsMenuTab; // from application hrh
- txt = qtn_testsets_menu_tab;
- }
- };
- };
- }
-*/
-
-// MAIN MENU
-//-----------------------------------------------------------------------------
-//
-// r_appui_mainmenuview
-// Mainmenu view.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_appui_mainmenuview
- {
- menubar=r_appui_menubar_mainmenuview;
- cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_menubar_mainmenuview
-// Main menu menubar.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_appui_menubar_mainmenuview
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane=r_appui_mainmenuview_menu;
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_mainmenuview_menu
-// Main menu options menu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appui_mainmenuview_menu
- {
- items=
- {
- MENU_ITEM
- {
- command= EAknCmdOpen;
- txt = "Open";
- },
- MENU_ITEM
- {
- command = ECmdShowAbout;
- txt = "About";
- },
- MENU_ITEM
- {
- command = EAknSoftkeyExit;
- txt = "Exit";
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_main_menu_listbox
-// ListBox( Single )
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE LISTBOX r_main_menu_listbox
- {
- array_id = r_main_menu_items;
- flags = EAknListBoxSelectionList;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_main_menu_items
-// Items array for Main Menu
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_main_menu_items
- {
- items =
- {
- LBUF
- {
- txt = qtn_mainmenulist_test_cases;
- },
- LBUF
- {
- txt = qtn_mainmenulist_modules;
- },
- LBUF
- {
- txt = qtn_mainmenulist_test_sets;
- }
- };
- }
-
-
-
-// TEST CASES MENU
-//-----------------------------------------------------------------------------
-//
-// r_appui_testcasemenuview
-// Test case menu view.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_appui_testcasemenuview
- {
- menubar=r_appui_menubar_testcasemenuview;
- cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_menubar_testcasemenuview
-// Test case view menubar.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_appui_menubar_testcasemenuview
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane=r_appui_testcasemenuview_menu;
- }
- };
-
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_testcasemenuview_menu
-// Testcase view options menu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appui_testcasemenuview_menu
- {
- items=
- {
- MENU_ITEM
- {
- command= EAknCmdOpen;
- txt = "Open";
- },
- MENU_ITEM
- {
- command = EAknSoftkeyExit;
- txt = "Exit";
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_testcase_menu_listbox
-// ListBox( Single )
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE LISTBOX r_testcase_menu_listbox
- {
- array_id = r_testcase_menu_items;
- flags = EAknListBoxSelectionList;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_testcase_menu_items
-// Items array for Test Case Menu
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_testcase_menu_items
- {
- items =
- {
- LBUF
- {
- txt = qtn_testcasemenu_startcase; // "\tStart Case(s)";
- },
- LBUF
- {
- txt = qtn_testcasemenu_startedcases; // "\tStarted Cases";
- }
- };
- }
-
-
-
-// START CASES
-//-----------------------------------------------------------------------------
-//
-// r_appui_startcasesview
-// Startcases view.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_appui_startcasesview
- {
- hotkeys=r_appui_hotkeys;
- menubar=r_appui_menubar_startcasesview;
- cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_menubar_startcasesview
-// Startcases view menubar.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_appui_menubar_startcasesview
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane=r_appui_startcasesview_menu;
- //menu_pane=R_AVKON_MENUPANE_MARKABLE_LIST;
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_loadtestsetview_menu
-// loadtestset view options menu.
-//
-//-----------------------------------------------------------------------------
-RESOURCE MENU_PANE r_appui_loadtestsetview_menu
- {
- items=
- {
- MENU_ITEM
- {
- command=EAknCmdOpen;
- txt = qtn_start;
- },
- MENU_ITEM
- {
- command=EEikCmdExit;
- txt = qtn_exit;
- }
- };
- }
-//-----------------------------------------------------------------------------
-//
-// r_appui_loadtestsetview
-// Started cases view.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_appui_loadtestsetview
- {
- //hotkeys=r_appui_hotkeys;
- menubar=r_appui_menubar_startedcasesmenuview;
- cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_menubar_startedcasesmenuview
-// Started cases menubar.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_appui_menubar_loadtestsetview
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane=r_appui_loadtestsetview_menu;
- }
- };
-
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_startcasesview_menu
-// Startcases view options menu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appui_startcasesview_menu
- {
- items=
- {
- MENU_ITEM
- {
- command = ECmdFilterMenu;
- txt = qtn_filter_menu;
- cascade = r_appui_filtermenu;
- },
- /*
- MENU_ITEM
- {
- command=ECmdFilterByModule;
- txt = qtn_filter_by_modules;
- cascade = r_appui_filterbymodules_menu;
- },
- MENU_ITEM
- {
- command=ECmdFilterByTestCaseFile;
- txt = qtn_filter_by_test_case_file;
- cascade = r_appui_filter_by_testcasefile_menu;
- },
- MENU_ITEM
- {
- command=ECmdNOFiltering;
- txt = qtn_no_filtering;
- },
- */
- MENU_ITEM
- {
- command=ECmdMarkMenu;
- txt = qtn_markmenu_title;
- cascade = r_appui_markunmark_menu;
- },
- MENU_ITEM
- {
- command=ECmdStartCases;
- txt = qtn_start_test_cases;
- },
- MENU_ITEM
- {
- command=EEikCmdExit;
- txt = qtn_exit;
- }
- };
- }
-
-
-
-// STARTED CASES
-//-----------------------------------------------------------------------------
-//
-// r_appui_startedcasesmenuview
-// Started cases view.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_appui_startedcasesmenuview
- {
- //hotkeys=r_appui_hotkeys;
- menubar=r_appui_menubar_startedcasesmenuview;
- cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_menubar_startedcasesmenuview
-// Started cases menubar.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_appui_menubar_startedcasesmenuview
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane=r_appui_startedcasesmenuview_menu;
- }
- };
-
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_startedcasesmenuview_menu
-// Started cases view options menu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appui_startedcasesmenuview_menu
- {
- items=
- {
- MENU_ITEM
- {
- command= EAknCmdOpen;
- txt = "Open";
- },
- MENU_ITEM
- {
- command = EAknSoftkeyExit;
- txt = "Exit";
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_started_cases_menu_listbox
-// ListBox( Single )
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE LISTBOX r_started_cases_menu_listbox
- {
- array_id = r_startedcases_menu_items;
- flags = EAknListBoxSelectionList;
- }
-
-
-
-//-----------------------------------------------------------------------------
-//
-// r_startedcases_menu_items
-// Items array for Test Case Menu
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_startedcases_menu_items
- {
- items =
- {
- LBUF
- {
- txt = qtn_startedcases_allcases;
- },
- LBUF
- {
- txt = qtn_startedcases_ongoing;
- },
- LBUF
- {
- txt = qtn_startedcases_paused;
- },
- LBUF
- {
- txt = qtn_startedcases_passed;
- },
- LBUF
- {
- txt = qtn_startedcases_failed;
- },
- LBUF
- {
- txt = qtn_startedcases_crashed_aborted;
- },
- LBUF
- {
- txt = qtn_startedcases_statistics;
- }
- };
- }
-
-
-
-// SHOW STARTED CASES
-//-----------------------------------------------------------------------------
-//
-// r_appui_showstartedcasesview
-// Show started cases view.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_appui_showstartedcasesview
- {
- hotkeys=r_appui_hotkeys;
- menubar=r_appui_menubar_showstartedcasesview;
- cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_menubar_showstartedcasesview
-// Show started cases view menubar.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_appui_menubar_showstartedcasesview
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane=r_appui_showstartedcasesview_menu;
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_showstartedcasesview_menu
-// Show started cases view options menu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appui_showstartedcasesview_menu
- {
- items=
- {
- MENU_ITEM
- {
- command=ECmdViewOutput;
- txt = qtn_view_output;
- },
- MENU_ITEM
- {
- command = ECmdFilterMenu;
- txt = qtn_filter_menu;
- cascade = r_appui_filtermenu;
- },
- MENU_ITEM
- {
- command=ECmdShowSetMenu;
- txt = qtn_testcase_control_menu;
- cascade = r_testcase_control_submenu;
- },
- MENU_ITEM
- {
- command=EEikCmdExit;
- txt = qtn_exit;
- }
-
- /*
- MENU_ITEM
- {
- command=ECmdPauseTestCase;
- txt = qtn_pause_testcase;
- },
- MENU_ITEM
- {
- command=ECmdResumeTestCase;
- txt = qtn_resume_testcase;
- },
- MENU_ITEM
- {
- command=ECmdAbortTestCase;
- txt = qtn_abort_testcase;
- },
- */
-
- /*
- MENU_ITEM
- {
- command=ECmdFilterByModule;
- txt = qtn_filter_by_modules;
- cascade = r_appui_filterbymodules_menu;
- },
- MENU_ITEM
- {
- command=ECmdFilterByTestCaseFile;
- txt = qtn_filter_by_test_case_file;
- cascade = r_appui_filter_by_testcasefile_menu;
- },
- MENU_ITEM
- {
- command=ECmdNOFiltering;
- txt = qtn_no_filtering;
- },
- */
-
- /*
- MENU_ITEM
- {
- command=ECmdRemoveExecution;
- txt = qtn_remove_execution;
- },
- MENU_ITEM
- {
- command=ECmdRemoveAllExecutions;
- txt = qtn_remove_all_executions;
- },
- */
-
- };
- }
-
-
-// STATISTICS VIEW
-//-----------------------------------------------------------------------------
-//
-// r_appui_statisticsview
-// Statistics view.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_appui_statisticsview
- {
- menubar= r_appui_menubar_statisticsview;
- cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_menubar_statisticsview
-// Statistics view menubar.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_appui_menubar_statisticsview
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane=r_appui_statisticsview_menu;
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_statisticsview_menu
-// Statistics view options menu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appui_statisticsview_menu
- {
- items=
- {
- MENU_ITEM
- {
- command=ECmdFilterByModule;
- txt = qtn_filter_by_modules;
- cascade = r_appui_filterbymodules_menu;
- },
- MENU_ITEM
- {
- command=ECmdFilterByTestCaseFile;
- txt = qtn_filter_by_test_case_file;
- cascade = r_appui_filter_by_testcasefile_menu;
- },
- MENU_ITEM
- {
- command=ECmdNOFiltering;
- txt = qtn_no_filtering;
- },
-
- MENU_ITEM
- {
- command=EEikCmdExit;
- txt = qtn_exit;
- }
- };
- }
-
-
-// TESTCASE OUTPUT VIEW
-//-----------------------------------------------------------------------------
-//
-// r_appui_testcaseoutputview
-// Testcase output view.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_appui_testcaseoutputview
- {
- hotkeys=r_appui_hotkeys;
- menubar=r_appui_menubar_testcaseoutputview;
- cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_menubar_testcaseoutputview
-// Testcase output view menub bar.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_appui_menubar_testcaseoutputview
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane=r_appui_testcaseoutputview_menu;
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_testcaseoutputview_menu
-// Testcase output view options menu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appui_testcaseoutputview_menu
- {
- items=
- {
- MENU_ITEM
- {
- command=ECmdPauseTestCase;
- txt = qtn_pause_testcase;
- },
- MENU_ITEM
- {
- command=ECmdResumeTestCase;
- txt = qtn_resume_testcase;
- },
- MENU_ITEM
- {
- command=ECmdAbortTestCase;
- txt = qtn_abort_testcase;
- },
- MENU_ITEM
- {
- command=EEikCmdExit;
- txt = qtn_exit;
- }
- };
- }
-
-
-
-// MODULES MENU
-//-----------------------------------------------------------------------------
-//
-// r_appui_testmodulesmenuview
-// Test modules menu view.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_appui_testmodulesmenuview
- {
- hotkeys=r_appui_hotkeys;
- menubar=r_appui_menubar_testmodulesmenuview;
- cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_menubar_testmodulesmenuview
-// Test modules view menubar.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_appui_menubar_testmodulesmenuview
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane=r_appui_testmodulesmenuview_menu;
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_testmodulesmenuview_menu
-// Testmodules view options menu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appui_testmodulesmenuview_menu
- {
- items=
- {
- // MENU_ITEM
- // {
- // command=ECmdOpenModule;
- // txt = qtn_open_module;
- // },
- MENU_ITEM
- {
- command=ECmdAddModule;
- txt = qtn_add_module;
- },
- MENU_ITEM
- {
- command=ECmdRemoveModule;
- txt = qtn_remove_module;
- },
- MENU_ITEM
- {
- command=EAknCmdExit;
- txt = qtn_exit;
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-// r_testmodules_menu_listbox
-// ListBox( Single )
-//
-//-----------------------------------------------------------------------------
-//
-/*
-RESOURCE LISTBOX r_testmodules_menu_listbox
- {
- array_id = r_testmodules_menu_items;
- flags = EAknListBoxSelectionList;
- }
-*/
-
-//-----------------------------------------------------------------------------
-// r_testmodules_menu_items
-// Items array for Test Case Menu
-//
-//-----------------------------------------------------------------------------
-//
-/*
-RESOURCE ARRAY r_testmodules_menu_items
- {
- items =
- {
- LBUF
- {
- txt = "\tModule1";
- },
- LBUF
- {
- txt = "\tModule2";
- }
- };
- }
-*/
-
-
-// TEST SET BASE
-//-----------------------------------------------------------------------------
-//
-// r_appui_testsetbasemenuview
-// Testset base menu view.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_appui_testsetbasemenuview
- {
- menubar=r_appui_menubar_testsetbasemenuview;
- cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_menubar_testsetbasemenuview
-// Testset base menu view menubar.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_appui_menubar_testsetbasemenuview
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane=r_appui_testsetbasemenuview_menu;
- }
- };
-
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_testsetbasemenuview_menu
-// Testset base menu view options menu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appui_testsetbasemenuview_menu
- {
- items=
- {
- MENU_ITEM
- {
- command= ECmdCreateTestSet;
- txt = "Create test set";
- },
- MENU_ITEM
- {
- command= ECmdLoadTestSet;
- txt = "Load test set";
- },
- MENU_ITEM
- {
- command = EAknSoftkeyExit;
- txt = "Exit";
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_testsetbase_menu_listbox
-// ListBox( Single )
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE LISTBOX r_testsetbase_menu_listbox
- {
- array_id = r_testsetbase_menu_items;
- flags = EAknListBoxSelectionList;
- }
-
-
-
-//-----------------------------------------------------------------------------
-//
-// r_testsetbase_menu_items
-// Items array for Test Sets Base Menu
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_testsetbase_menu_items
- {
- items =
- {
- LBUF
- {
- txt = qtn_testsetbasemenu_createtestset;
- },
- LBUF
- {
- txt = qtn_testsetbasemenu_loadtestset;
- }
- };
- }
-
-
-// TESTSET MENU
-//-----------------------------------------------------------------------------
-//
-// r_appui_testsetmenuview
-// Test set menu view.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_appui_testsetmenuview
- {
- menubar=r_appui_menubar_testsetmenuview;
- cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_menubar_testsetmenuview
-// Test set menu view menubar.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_appui_menubar_testsetmenuview
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane=r_appui_testsetmenuview_menu;
- }
- };
-
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_testsetmenuview_menu
-// Test set menu view options menu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appui_testsetmenuview_menu
- {
- items=
- {
- MENU_ITEM
- {
- command= ECmdStartTestSet;
- txt = "Start testing";
- },
- MENU_ITEM
- {
- command= ECmdShowStartedTestSet;
- txt = "View started cases";
- },
- MENU_ITEM
- {
- command= ECmdSaveTestSet;
- txt = "Save test set";
- },
- MENU_ITEM
- {
- command= ECmdInsertTestCases;
- txt = "Insert test case(s)";
- },
- MENU_ITEM
- {
- command= ECmdRemoveTestCases;
- txt = "Remove test case";
- },
- MENU_ITEM
- {
- command = EAknSoftkeyExit;
- txt = "Exit";
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_testset_menu_listbox
-// ListBox( Single )
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE LISTBOX r_testset_menu_listbox
- {
- array_id = r_testset_menu_items;
- flags = EAknListBoxSelectionList;
- }
-
-
-
-//-----------------------------------------------------------------------------
-//
-// r_testset_menu_items
-// Items array for Test Sets Menu
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_testset_menu_items
- {
- items =
- {
- LBUF
- {
- txt = "";
- }
- };
- }
-
-
-// TESTSET STARTED CASES
-//-----------------------------------------------------------------------------
-//
-// r_test_set_startedcasesview
-// Test set started cases view.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_testset_startedcasesview
- {
- //hotkeys=r_appui_hotkeys;
- menubar=r_testset_menubar_startedcasesview;
- cba=R_AVKON_SOFTKEYS_OPTIONS_BACK;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_test_set_menubar_startedcasesview
-// Test set started cases view menubar.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_testset_menubar_startedcasesview
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane=r_testset_startedcasesview_menu;
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_testset_startedcasesview_menu
-// Test set started cases view options menu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_testset_startedcasesview_menu
- {
- items=
- {
- MENU_ITEM
- {
- txt = qtn_testset_started_menu;
- cascade = r_testset_startedcases_submenu;
- },
- MENU_ITEM
- {
- command=ECmdViewOutput;
- txt = qtn_view_output;
- },
- MENU_ITEM
- {
- command=ECmdShowSetMenu;
- txt = qtn_testcase_control_menu;
- cascade = r_testcase_control_submenu;
- },
- MENU_ITEM
- {
- command=EEikCmdExit;
- txt = qtn_exit;
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_testset_startedcases_submenu
-// Test set started cases view sub menu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_testset_startedcases_submenu
- {
- items=
- {
- MENU_ITEM
- {
- command = ECmdShowAllStartedCases;
- txt = qtn_testset_started_allcases;
- },
- MENU_ITEM
- {
- command = ECmdShowOngoingCases;
- txt = qtn_testset_started_ongoing;
- },
- MENU_ITEM
- {
- command = ECmdShowPausedCases;
- txt = qtn_testset_started_paused;
- },
- MENU_ITEM
- {
- command = ECmdShowPassedCases;
- txt = qtn_testset_started_passed;
- },
- MENU_ITEM
- {
- command = ECmdShowFailedCases;
- txt = qtn_testset_started_failed;
- },
- MENU_ITEM
- {
- command = ECmdShowCrashedAbortedCases;
- txt = qtn_testset_started_crashed_aborted;
- }
- };
- }
-
-
-// TESTSET INSERT CASES
-//-----------------------------------------------------------------------------
-//
-// r_insert_testcases_view
-// Insert test cases view.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_insert_testcases_view
- {
- //hotkeys=r_appui_hotkeys;
- menubar=r_insert_testcases_menubar;
- cba=R_AVKON_SOFTKEYS_OPTIONS_CANCEL;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_insert_testcases_menubar
-// Insert test cases view menubar.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_insert_testcases_menubar
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane=r_insert_testcases_menu;
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_insert_testcases_menu
-// Insert test cases view options menu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_insert_testcases_menu
- {
- items=
- {
- MENU_ITEM
- {
- command=ECmdInsertSelectedCases;
- txt = qtn_testsetinsert_add_selected;
- },
- MENU_ITEM
- {
- command = ECmdFilterMenu;
- txt = qtn_filter_menu;
- cascade = r_appui_filtermenu;
- },
- MENU_ITEM
- {
- command=ECmdMarkMenu;
- txt = qtn_markmenu_title;
- cascade = r_appui_markunmark_menu;
- },
- MENU_ITEM
- {
- command=EEikCmdExit;
- txt = qtn_exit;
- }
- };
- }
-
-
-
-// GENERAL
-// MARKMENU
-//-----------------------------------------------------------------------------
-//
-// r_appui_markunmark_menu
-// Submenu for marking items.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appui_markunmark_menu
- {
- items=
- {
- MENU_ITEM
- {
- command=EAknCmdMark;
- txt = qtn_markmenu_mark;
- },
- MENU_ITEM
- {
- command=EAknCmdUnmark;
- txt = qtn_markmenu_unmark;
- },
- MENU_ITEM
- {
- command=EAknMarkAll;
- txt = qtn_markmenu_markall;
- },
- MENU_ITEM
- {
- command=EAknUnmarkAll;
- txt = qtn_markmenu_unmarkall;
- }
- };
- }
-
-// TEST CASE CONTROL
-//-----------------------------------------------------------------------------
-//
-// r_testset_stertedcases_setmenu
-// Test set started cases view set menu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_testcase_control_submenu
- {
- items=
- {
- MENU_ITEM
- {
- command=ECmdPauseTestCase;
- txt = qtn_pause_testcase;
- },
- MENU_ITEM
- {
- command=ECmdResumeTestCase;
- txt = qtn_resume_testcase;
- },
- MENU_ITEM
- {
- command=ECmdAbortTestCase;
- txt = qtn_abort_testcase;
- }
- };
- }
-
-// FILTERING
-//-----------------------------------------------------------------------------
-//
-// r_appui_filtermenu
-// MenuPane for Filter submenu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appui_filtermenu
- {
- items=
- {
- MENU_ITEM
- {
- command=ECmdFilterByModule;
- txt = qtn_filter_by_modules;
- cascade = r_appui_filterbymodules_menu;
- },
- MENU_ITEM
- {
- command=ECmdFilterByTestCaseFile;
- txt = qtn_filter_by_test_case_file;
- cascade = r_appui_filter_by_testcasefile_menu;
- },
- MENU_ITEM
- {
- command=ECmdNOFiltering;
- txt = qtn_no_filtering;
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_filterbymodules_menu
-// MenuPane for Filter submenu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appui_filterbymodules_menu
- {
- items=
- {
- // items (modules) are added dynamically when
- // Filter by module submenu is opened
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_appui_filter_by_testcasefile_menu
-// MenuPane for Filter submenu.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_appui_filter_by_testcasefile_menu
- {
- items=
- {
- // Items (testcase files are added dynamically when
- // Filter by testcase file menu is opened
- };
- }
-
-
-// DIALOGS
-// START TEST CASES
-//-----------------------------------------------------------------------------
-//
-// r_start_testcase_list_query
-// Query dialog for starting single test case.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_LIST_QUERY r_start_testcase_list_query
- {
- flags = EGeneralQueryFlags;
- softkeys = R_AVKON_SOFTKEYS_OK_CANCEL;
- items =
- {
- DLG_LINE //AVKON_LIST_QUERY_DLG_LINE
- {
- type = EAknCtListQueryControl;
- id = EListQueryControl;
- control = AVKON_LIST_QUERY_CONTROL
- {
- listtype = EAknCtSinglePopupMenuListBox;
- listbox = LISTBOX //AVKON_LIST_QUERY_LIST
- {
- flags = EAknListBoxMenuList;
- height = 3;
- width = 3;
- array_id = r_start_testcase_listbox_item_array;
- };
- heading = qtn_starting_test_case;
- };
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_start_testcase_listbox_item_array
-// Listbox items in query dialog for starting single test case.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_start_testcase_listbox_item_array
- {
- items =
- {
- LBUF { txt = qtn_start_test; },
- LBUF { txt = qtn_start_test_output; }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_start_multiple_testcases_list_query
-// Query dialog for starting multiple test cases.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE AVKON_LIST_QUERY r_start_multiple_testcases_list_query
- {
- flags = EGeneralQueryFlags;
- softkeys = R_AVKON_SOFTKEYS_OK_CANCEL;
- items =
- {
- DLG_LINE //AVKON_LIST_QUERY_DLG_LINE
- {
- type = EAknCtListQueryControl;
- id = EListQueryControl;
- control = AVKON_LIST_QUERY_CONTROL
- {
- listtype = EAknCtSinglePopupMenuListBox;
- listbox = LISTBOX //AVKON_LIST_QUERY_LIST
- {
- flags = EAknListBoxMenuList;
- height = 3;
- width = 3;
- array_id = r_start_multiple_testcases_listbox_item_array;
- };
- heading = qtn_starting_test_cases;
- };
- }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_start_multiple_testcases_listbox_item_array
-// Listbox items in query dialog for starting single test case.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_start_multiple_testcases_listbox_item_array
- {
- items =
- {
- LBUF { txt = qtn_start_tests_parallel; },
- LBUF { txt = qtn_start_tests_serial; }
- };
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_general_confirmation_dialog
-// General confirmation dialog with empty label.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_general_confirmation_dialog
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_YES_NO;
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationQueryLayout;
- label = "";
- };
- }
- };
-
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_stifui_about_dialog
-// "About" dialog
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_stifui_about_dialog
-{
- flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
- buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
- items=
- {
- DLG_LINE
- {
- type = EAknCtPopupHeadingPane;
- id = EAknMessageQueryHeaderId;
- control = AVKON_HEADING
- {
- label = "About STIF";
- headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE;
- };
- },
- DLG_LINE
- {
- type = EAknCtMessageQuery;
- id = EAknMessageQueryContentId;
- control = AVKON_MESSAGE_QUERY
- {
-
- };
- }
- };
-}
-
-//-----------------------------------------------------------------------------
-//
-// r_memory_selection_dialog
-// Selection dialog for selectiong either C or E drive.
-// Not yet used.
-//
-//-----------------------------------------------------------------------------
-//
-/*
-RESOURCE MEMORYSELECTIONDIALOG r_memory_selection_dialog
- {
- title = "Choose memory:";
- softkey_1 = "Ok";
- softkey_2 = "Cancel";
- locations =
- {
- LOCATION { root_path = "C:\\"; },
- LOCATION { root_path = "E:\\"; //default_folder = "TestFramework\\";
- }
- };
- }
-*/
-
-//-----------------------------------------------------------------------------
-//
-// r_file_selection_dialog
-// Fileselection dialog.
-// Not yet used.
-//
-//-----------------------------------------------------------------------------
-//
-/*
-RESOURCE FILESELECTIONDIALOG r_file_selection_dialog
- {
- title = "Select-a-file:";
- root_path = "C:\\";
- filters =
- {
- FILTER
- {
- filter_type = EAttributeFilter; //EAttributeFilter;
- filter_style = EExclusiveFilter; //EExclusiveFilter;
- filter_data =
- {
- "SH",
- "R"
- }; // Excludes system, hidden and read-only attributes
- }
- };
- }
-*/
-
-
-// APPLICATION NAVIPANEL TITLES
-//-----------------------------------------------------------------------------
-//
-// r_navititle_main
-// Main menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_main
- {
- txt = qtn_navi_main;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_testcases
-// Test cases menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_testcases
- {
- txt = qtn_navi_testcases;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_startcases
-// Startcases menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_startcases
- {
- txt = qtn_navi_startcases;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_loadtestset
-// Startcases menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_loadtestset
- {
- txt = qtn_navi_load_test_set;
- }
-
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_startedcases
-// Started cases menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_startedcases
- {
- txt = qtn_navi_startedcases;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_testcase_output
-// Test case output view title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_testcase_output
- {
- txt = qtn_navi_testcase_output;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_modules
-// Modules menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_modules
- {
- txt = qtn_navi_modules;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_testset_base
-// Testset base menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_testset_base
- {
- txt = qtn_navi_testset_base;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_testset
-// Testset menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_testset
- {
- txt = qtn_navi_testset;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_testset_insert
-// Testset insert menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_testset_insert
- {
- txt = qtn_navi_testset_insert;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_started
-// Started cases view menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_started
- {
- txt = qtn_navi_started;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_started_all
-// All started cases view menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_started_all
- {
- txt = qtn_navi_started_all;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_started_ongoing
-// Ongoing cases view menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_started_ongoing
- {
- txt = qtn_navi_started_ongoing;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_started_paused
-// Paused cases view menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_started_paused
- {
- txt = qtn_navi_started_paused;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_started_passed
-// Passed cases view menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_started_passed
- {
- txt = qtn_navi_started_passed;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_started_failed
-// Failed cases view menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_started_failed
- {
- txt = qtn_navi_started_failed;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_started_crashed_aborted
-// Crashed cases view menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_started_crashed_aborted
- {
- txt = qtn_navi_started_crashed_aborted;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_navititle_started_stats
-// Statistics view menu title.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE NAVI_LABEL r_navititle_started_stats
- {
- txt = qtn_navi_started_stats;
- }
-
-
-// RESOURCE TEXTS
-//-----------------------------------------------------------------------------
-//
-// r_insert_confirmation_question
-// Insert test cases confirmation query text.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE STRING r_insert_confirmation_question
- {
- text = qtn_insert_confirmation;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_insert_nocases_text
-// Infomsg text to inform user that there´s no test cases selected when
-// trying to insert test cases.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE STRING r_insert_nocases_text
- {
- text = qtn_insert_none_selected;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_insert_confirmation_question
-// Overwrite existing test set confirmation query text.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE STRING r_overwrite_testset_question
- {
- text = qtn_owerwrite_testset_confirmation;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_insert_confirmation_question
-// Save test set confirmation query text.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE STRING r_save_testset_question
- {
- text = qtn_save_testset_confirmation;
- }
-
-//-----------------------------------------------------------------------------
-//
-// r_insert_confirmation_question
-// Loading test set failed text.
-//
-//-----------------------------------------------------------------------------
-//
-RESOURCE STRING r_load_testset_failed
- {
- text = qtn_load_testset_errornote;
- }
-
-
-// TEST CASE STATES
-RESOURCE STRING r_testcase_state_running
- {
- text = qtn_testcase_state_running;
- }
-
-RESOURCE STRING r_testcase_state_passed
- {
- text = qtn_testcase_state_passed;
- }
-
-RESOURCE STRING r_testcase_state_failed
- {
- text = qtn_testcase_state_failed;
- }
-
-RESOURCE STRING r_testcase_state_crashed_aborted
- {
- text = qtn_testcase_state_crashed_aborted;
- }
-
-RESOURCE STRING r_testcase_state_unknown
- {
- text = qtn_testcase_state_unknown;
- }
-
-RESOURCE LOCALISABLE_APP_INFO r_stifui_localisable_app_info
- {
- short_caption = qtn_app_short_caption_string;
- caption_and_icon =
- CAPTION_AND_ICON_INFO
- {
- caption = qtn_app_caption_string;
- };
- }
-
-// End of File
--- a/stifui/stifui/data/Stifui_reg.rss Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file defines StifUI resources.
-*
-*/
-
-#include <Stifui.rsg>
-#include <appinfo.rh>
-#if defined (__S60_)
- #include <data_caging_paths_strings.hrh>
-#endif
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x1028311D
-
-RESOURCE APP_REGISTRATION_INFO
- {
- app_file = "Stifui";
- localisable_resource_file = APP_RESOURCE_DIR"\\Stifui";
- localisable_resource_id = R_STIFUI_LOCALISABLE_APP_INFO;
- group_name = "RnD Tools";
- }
-
-// End of File
-
-
--- a/stifui/stifui/group/Stifui.mmp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: STIFUI MMP file.
-*
-*/
-
-#include <platform_paths.hrh>
-
-SMPSAFE
-
-TARGET Stifui.exe
-TARGETTYPE exe
-UID 0x100039ce 0x1028311D
-VENDORID 0x101FB657
-SECUREID 0x102073DC
-CAPABILITY AllFiles SwEvent CommDD
-
-START RESOURCE ../data/Stifui.rss
- HEADER
- TARGETPATH resource/apps
-END
-
-SOURCEPATH ../data
-START RESOURCE ./Stifui_reg.rss
- DEPENDS stifui.rsg
- TARGETPATH /private/10003a3f/apps
-END
-
-SOURCEPATH ../src
-
-
-SOURCE AppUIApp.cpp
-SOURCE AppUIAppUi.cpp
-SOURCE AppUIDocument.cpp
-SOURCE View.cpp
-SOURCE Container.cpp
-SOURCE UIStoreHandler.cpp
-
-SOURCE MainMenuView.cpp
-SOURCE MainMenuContainer.cpp
-
-SOURCE TestCaseMenuView.cpp
-SOURCE TestCaseMenuContainer.cpp
-
-SOURCE StartCasesView.cpp
-SOURCE StartCasesContainer.cpp
-
-SOURCE StartedCasesMenuView.cpp
-SOURCE StartedCasesMenuContainer.cpp
-
-SOURCE ShowStartedCasesView.cpp
-SOURCE ShowStartedCasesContainer.cpp
-
-SOURCE TestCaseOutputView.cpp
-SOURCE TestCaseOutputContainer.cpp
-
-SOURCE Testmodulesmenuview.cpp
-SOURCE TestModulesMenuContainer.cpp
-
-SOURCE StatisticsView.cpp
-SOURCE StatisticsContainer.cpp
-
-SOURCE TestSetBaseMenuView.cpp
-SOURCE TestSetBaseMenuContainer.cpp
-
-SOURCE TestSetMenuView.cpp
-SOURCE TestSetMenuContainer.cpp
-
-SOURCE TestSetInsertMenuView.cpp
-SOURCE TestSetInsertMenuContainer.cpp
-
-SOURCE TestSetStartedCasesView.cpp
-SOURCE TestSetStartedCasesContainer.cpp
-
-//SOURCE MenuListBox.cpp
-
-SOURCE MenuListBox.cpp CreatedTestSetMenuContainer.cpp CreatedTestSetMenuView.cpp
-
-USERINCLUDE ../inc
-
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY apparc.lib
-LIBRARY cone.lib
-LIBRARY eikcore.lib
-
-LIBRARY eikcoctl.lib
-LIBRARY avkon.lib
-
-LIBRARY stiftestengine.lib
-LIBRARY stiftestinterface.lib
-LIBRARY bafl.lib
-LIBRARY eikctl.lib // For adding icons
-LIBRARY StifTFwIf.lib
-LIBRARY efsrv.lib
-
-LIBRARY egul.lib
-LIBRARY aknskins.lib
-LIBRARY aknicon.lib
-
-START WINS
-// ?wins_specific_information
-END
-
-START MARM
-// ?marm_specific_information
-END
-
-EPOCHEAPSIZE 0x10000 0x500000
-EPOCSTACKSIZE 32768
-// End of file
--- a/stifui/stifui/group/bld.inf Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: bld.inf build information for STIF UI.
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-// Specify the platforms your component needs to be built for here.
-// ARM4 not supported in SDK
-
- DEFAULT
-
-
-PRJ_EXPORTS
-// None
-
-PRJ_TESTEXPORTS
-// None
-
-PRJ_MMPFILES
-
- Stifui.mmp
-
-PRJ_TESTMMPFILES
-// None
-
-// End of file
--- a/stifui/stifui/inc/AppUIApp.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CAppUIApp class declaration.
-*
-*/
-
-#ifndef APPUIAPP_H
-#define APPUIAPP_H
-
-// INCLUDES
-#include <aknapp.h>
-
-// CONSTANTS
-// UID of the application
-const TUid KUidAppUI = { 0x1028311D };
-
-// CLASS DECLARATION
-
-/**
-* CAppUIApp application class.
-* Provides factory to create concrete document object.
-*
-*/
-class CAppUIApp : public CAknApplication
- {
-
- public: // Functions from base classes
- private:
-
- /**
- * From CApaApplication, creates CAppUIDocument document object.
- * @return A pointer to the created document object.
- */
- CApaDocument* CreateDocumentL();
-
- /**
- * From CApaApplication, returns application's UID (KUidAppUI).
- * @return The value of KUidAppUI.
- */
- TUid AppDllUid() const;
- };
-
-#endif
-
-// End of File
-
-// End of File
--- a/stifui/stifui/inc/AppUIAppUi.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CAppUIAppUi class declaration.
-*
-*/
-
-#ifndef APPUIAPPUI_H
-#define APPUIAPPUI_H
-
-// INCLUDES
-#include <eikapp.h>
-#include <e32std.h>
-#include <aknViewAppUi.h>
-#include <akntabgrp.h>
-#include <aknnavide.h>
-#include <StifLogger.h>
-#include "Stifui.hrh"
-
-//#include "UIStoreIf.h"
-//#include "UIStore.h"
-//#include "UIEngine.h"
-//#include "SettingServerClient.h"
-
-#include <stifinternal/UIStoreIf.h>
-#include <stifinternal/UIStore.h>
-#include <stifinternal/UIEngine.h>
-#include <SettingServerClient.h>
-
-#include "UIStoreHandler.h"
-
-
-// FORWARD DECLARATIONS
-class CAppUIContainer;
-class CUIStoreHandler;
-
-// CONSTANTS
-//const ?type ?constant_var = ?constant;
-_LIT( KDefaultPathAndIni, "C:\\TestFramework\\TestFramework.ini" );
-
-// CLASS DECLARATION
-
-
-/**
- * Class contains static methods for calling different
- * types of message dialog boxes.
- */
-class TMessageBoxUtil
- {
- public:
-
- /**
- * Display message that executed funtion is not implemented yet.
- */
- static void ShowNotImplementedYetL();
-
- /**
- * Display error note.
- * @param aMessage Error message to display.
- */
- static void ShowErrorNoteL( const TDesC& aMessage );
- };
-
-
-/**
-* Application UI class.
-* Provides support for the following features:
-* - EIKON control architecture
-* - view architecture
-* - status pane
-*
-*/
-class CAppUIAppUi : public CAknViewAppUi
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CAppUIAppUi();
-
- public: // New functions
-
- /**
- * Returns pointer to UIStoreHandler object,
- * which handles test cases and test modules.
- * @return UIStoreHandler to CData object
- */
- CUIStore* UIStoreHandler();
-
- /**
- * Shows outputs of the test case.
- * @param aTestCase Pointer to started test case.
- */
- void ShowTestCaseOutput(CStartedTestCase* aTestCase);
-
- /**
- * Receives output update notification from CData.
- * @param aTestCase Pointer to started test case.
- * @param aStatus Status.
- */
- void OutputUpdateL( CStartedTestCase* aTestCase, TInt aStatus );
-
- /**
- * Sets pointer to selected test case for viewing output.
- * @param aStartedCase Pointer to started test case.
- */
- void SetStartedTestCase( CStartedTestCase* aStartedCase );
-
- /**
- * Returns pointer to started test case for viewing output.
- * @return Poiner to started test case.
- */
- CStartedTestCase* GetStartedTestCase( );
-
- /**
- * Saves position of focus of any specific view
- * @param aViewId ID of view under which the position will be stored
- * @param aPosition is a number to be stored
- */
- void SaveFocusPosition(TAppUIViewNumber aViewId, TInt aPosition);
-
- /**
- * Used to retrieve previous focus position in a specific view
- * @param aViewId - ID of view that the position should be retrieved for
- * @return the previous focus position
- */
- TInt GetFocusPosition(TAppUIViewNumber aViewId);
-
-
- public: // Functions from base classes
-
- private:
- /**
- * Initializes menu pane.
- * @param aResourceId Menu pane resource ID.
- * @param aMenuPane Menu pane pointer.
- */
- void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
-
- private:
- /**
- * From CEikAppUi, takes care of command handling.
- * @param aCommand command to be handled
- */
- void HandleCommandL(TInt aCommand);
-
- /**
- * From CEikAppUi, handles key events.
- * @param aKeyEvent Event to handled.
- * @param aType Type of the key event.
- * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed).
- */
- virtual TKeyResponse HandleKeyEventL(
- const TKeyEvent& aKeyEvent,TEventCode aType);
-
- private: //Data
- CUIStoreHandler* iUIStoreHandler;
- CStartedTestCase* iStartedTestCase;
- TInt iPreviousView; // For Back function
-
- RArray<TInt> iPreviousFocusPosition;
- // used to store positions in different views
-
- TBool iPreviousPositionListValid;
- // used to mark validity of iPreviousFocusPosition array
-
- public: //Data
-
- /**
- * Pointer to logger.
- */
- CStifLogger* iLogger;
-
- /**
- * Mode of view started cases.
- */
- TInt /*enum TShowStartedCasesMode*/ iShowStartedCasesMode;
-
- /**
- * Index of started test set.
- */
- TInt iStartedTestSet;
-
- /**
- * Handle to Setting server.
- */
- RSettingServer iSettingServer;
-
- public: // Friend classes
-
- protected: // Friend classes
-
- private: // Friend classes
-
- // For iExecutedTestCaseCount moving
- friend class CStartCasesView;
- friend class CStatisticsView;
- friend class CTestCaseOutputView;
- friend class CTestSetInsertMenuView;
- friend class CTestSetMenuView;
-
- };
-
-#endif
-
-// End of File
--- a/stifui/stifui/inc/AppUIDocument.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CAppUIDocument class declaration.
-*
-*/
-
-#ifndef APPUIDOCUMENT_H
-#define APPUIDOCUMENT_H
-
-// INCLUDES
-#include <AknDoc.h>
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CEikAppUi;
-
-// CLASS DECLARATION
-
-/**
-* CAppUIDocument application class.
-*/
-class CAppUIDocument : public CAknDocument
- {
- public: // Constructors and destructor
- /**
- * Two-phased constructor.
- */
- static CAppUIDocument* NewL(CEikApplication& aApp);
-
- /**
- * Destructor.
- */
- virtual ~CAppUIDocument();
-
- public: // New functions
-
- protected: // New functions
-
- protected: // Functions from base classes
-
- private:
-
- /**
- * Symbian OS default constructor.
- */
- CAppUIDocument(CEikApplication& aApp);
- void ConstructL();
-
- private:
-
- /**
- * From CEikDocument, create CAppUIAppUi "App UI" object.
- */
- CEikAppUi* CreateAppUiL();
- };
-
-#endif
-
-// End of File
-
-// End of File
--- a/stifui/stifui/inc/Container.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,263 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestCaseListBoxModel class
-* declaration
-*
-*/
-
-#ifndef CCONTAINER_H
-#define CCONTAINER_H
-
-#include <e32std.h>
-// Define *.mbm file name.
-_LIT(KListMbmFileName, "\\Resource\\Apps\\Stifui.mbm");
-
-// INCLUDES
-#include "View.h"
-
-#include <coecntrl.h>
-#include <eiklbo.h> // MEikListBoxObserver
-#include <bamdesca.h> // MDesCArray
-#include <aknsfld.h>
-
-//#include "RRefArray.h"
-//#include "UIEngine.h"
-//#include "UIStoreIf.h"
-//#include "UIStoreContainer.h"
-
-#include <stifinternal/RRefArray.h>
-#include <stifinternal/UIEngine.h>
-#include <stifinternal/UIStoreIf.h>
-#include <stifinternal/UIStoreContainer.h>
-
-// FORWARD DECLARATIONS
-class CEikTextListBox;
-class CDesC16Array;
-
-//class CTestSetInsertMenuView;
-class CEikColumnListBox;
-class CStartedTestCase;
-
-class CUIStoreHandler;
-class CUIStore;
-class CUIStoreIf;
-class CUIEngineContainer;
-class CUIEngine;
-
-// CLASS DECLARATION
-
-class CTestCaseListBoxModel : public CBase, public MDesCArray
- {
- public:
- /**
- * Destructor.
- */
- ~CTestCaseListBoxModel();
-
- /**
- * Two-phased constructor.
- * @param aTestCasesInView Array of test cases in view.
- * @return Pointer to created list box model.
- */
- static CTestCaseListBoxModel* NewL(
- RPointerArray<CTestInfo>* aTestCasesInView);
-
- public: // Functions from base classes
-
- /**
- * Returns the number of descriptor elements in the array.
- * @return The number of descriptor elements.
- */
- virtual TInt MdcaCount() const;
-
- /**
- * Indexes into a descriptor array.
- * @param aIndex The position of the descriptor element within the
- * array. The position is relative to zero; i.e. zero
- * implies the first descriptor element in the array.
- * This value must be non-negative and less than the
- * number of descriptors currently within the array
- * otherwise the operator panics with
- * EArrayIndexOutOfRange.
- * @return A non-modifiable pointer descriptor representing the
- * descriptor element located at position aIndex within
- * the array.
- */
- virtual TPtrC MdcaPoint(TInt aIndex) const;
-
- protected:
- /**
- * Symbian OS two phased constructor.
- * Completes the construction of the object.
- */
- void ConstructL();
-
- protected: //data
- RPointerArray<CTestInfo>* iTestCasesInView;
- HBufC* iBuffer;
-
- private: //data
-
- };
-
-/**
-* CContainer container control class.
-*
-*/
-class CContainer : public CCoeControl
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- * @param aRect Frame rectangle for container.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CContainer();
-
- public: // New functions
-
- /**
- * Show only testcases which are defined is specified module.
- * @param aModuleName Module which test cases are shown.
- */
- virtual void FilterCasesByModuleL(TName aModuleName);
-
- /**
- * Show only testcases which are defined in specified test case file.
- * @param aTestCaseFileName Test cases file name.
- */
- virtual void FilterCasesByTCFileNameL(TFileName aTestCaseFileName);
-
- /**
- * Remove possible filtering of test cases -> show all test cases.
- */
- virtual void NoFilteringL();
-
- /**
- * Returns pointers to selected test cases.
- * @param aSelectedTestCases Currently selected test case.
- */
- virtual void SelectedTestCases(RPointerArray<CTestInfo>& aSelectedTestCases);
-
- /**
- * Sets graphic icon using listbox as CEikColumnListBox.
- * @param aListBox Pointer to list box.
- */
- virtual void SetGraphicIconL( CEikColumnListBox* aListBox );
-
- /**
- * Appends graphics data.
- * @param aIcons Pointer array of icons.
- */
- virtual void GraphicIconL( CArrayPtr<CGulIcon>* aIcons );
-
- /**
- * Gets the index number of the current item in the view.
- * @return Index number of the current item.
- */
- virtual TInt CurrentItemIndex();
-
- /**
- * Sets the current item.
- * @param aIndex Index of the item to make current.
- */
- virtual void SetCurrentItemIndex(TInt aCurrentTestCase);
-
- /**
- * Inline function for getting pointer to list box.
- * @return Pointer to list box.
- */
- virtual inline CEikListBox* ListBox() { return (CEikListBox*)iListBox; };
-
-
-
- /**
- * Processes user commands.
- * @param aCommand ID of the command to respond to.
- */
- virtual void ProcessCommandL( TInt aCommand );
-
- /**
- * Processes user commands.
- * @param aCommand ID of the command to respond to.
- */
- virtual void SelectionListProcessCommandL( TInt aCommand );
-
- /**
- * Handles mark commands.
- * @param aCommand ID of the command to respond to.
- */
- virtual void HandleMarkCommandL( TInt aCommand );
-
-
-
- public: // Functions from base classes
-
- private: // Functions from base classes
-
- /**
- * From CoeControl,SizeChanged.
- * Called by framework when the view size is changed.
- */
- virtual void SizeChanged();
-
-
-
-
- /**
- * From CoeControl,CountComponentControls.
- * Gets a count of the component controls of this list box control.
- * This information is used for DrawNow().
- */
- virtual TInt CountComponentControls() const;
-
- /**
- * From CCoeControl,ComponentControl.
- * Gets a pointer to the specified component control.
- * @param aIndex Index of the component control to look up.
- * @return The control at aIndex.
- */
- virtual CCoeControl* ComponentControl(TInt aIndex) const;
-
-
-
- /**
- * From CCoeControl,Draw.
- * Draw a control, called by window server.
- * @param aRect The region of the control to be redrawn. Co-ordinates
- * are relative to the control's origin (top left corner).
- */
- virtual void Draw(const TRect& aRect) const;
-
- protected: //data
-
- CView* iParentView;
- CEikColumnListBox* iListBox;
- //CEikTextListBox* iListBox;
- CTestCaseListBoxModel* iListBoxModel;
- RPointerArray<CTestInfo> iTestCasesInView;
- CUIStore* iUIStore;
-
- private: //data
-
- };
-
-#endif // CTestSetInsertMenuContainer_H
-
-// End of File
--- a/stifui/stifui/inc/CreatedTestSetMenuContainer.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CCreatedTestSetMenuContainer
-* class declaration.
-*
-*/
-
-#ifndef CREATETESTSETMENUCONTAINER_H
-#define CREATETESTSETMENUCONTAINER_H
-
-// INCLUDES
-#include "Container.h"
-
-#include <coecntrl.h>
-#include <eiklbo.h> // MEikListBoxObserver
-#include <bamdesca.h> // MDesCArray
-#include <aknsfld.h>
-
-#include <stifinternal/RRefArray.h>
-#include <stifinternal/UIEngine.h>
-#include <stifinternal/UIStoreIf.h>
-#include <stifinternal/UIStoreContainer.h>
-
-// FORWARD DECLARATIONS
-class CEikTextListBox;
-class CDesC16Array;
-
-class CCreatedTestSetMenuView;
-class CEikColumnListBox;
-class CStartedTestCase;
-
-class CUIStoreHandler;
-class CUIStore;
-class CUIStoreIf;
-class CUIEngineContainer;
-class CUIEngine;
-
-// CLASS DECLARATION
-/**
-* CCreatedTestSetMenuContainer container control class.
-*
-*/
-class CCreatedTestSetMenuContainer : public CContainer//public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- * @param aRect Frame rectangle for container.
- */
- void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
-
- /**
- * Destructor.
- */
- ~CCreatedTestSetMenuContainer();
-
- public: // New functions
-
- /**
- * Stores current position of focus of iListBox to the CAppUiAppUi object
- */
- void SaveActiveLine();
-
- public: // Functions from base classes
-
- private: // Functions from base classes
-
- /**
- * From CoeControl,SizeChanged.
- * Called by framework when the view size is changed.
- */
- void SizeChanged();
-
- /**
- * From CoeControl,CountComponentControls.
- * Gets a count of the component controls of this list box control.
- * This information is used for DrawNow().
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl,ComponentControl.
- * Gets a pointer to the specified component control.
- * @param aIndex Index of the component control to look up.
- * @return The control at aIndex.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl,Draw.
- * Draw a control, called by window server.
- * @param aRect The region of the control to be redrawn. Co-ordinates
- * are relative to the control's origin (top left corner).
- */
- void Draw(const TRect& aRect) const;
-
- /**
- * From CCoeControl,OfferKeyEventL
- * Handles key events.
- * @param aKeyEvent The key event.
- * @param aType The type of key event.
- * @return Indicates whether or not the key event was used
- * by this control.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
- private: //data
-
- CCreatedTestSetMenuView* iParentView;
- };
-
-#endif // CREATETESTSETMENUCONTAINER_H
-
-// End of File
--- a/stifui/stifui/inc/CreatedTestSetMenuView.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CCreatedTestSetMenuView class
-* declaration.
-*
-*/
-
-#ifndef CREATEDTESTSETSETMENUVIEW_H
-#define CREATEDTESTSETSETMENUVIEW_H
-
-// INCLUDES
-#include "View.h"
-#include <eiklbo.h> // MEikListBoxObserver
-#include <aknnavide.h>
-
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CCreatedTestSetMenuContainer;
-
-
-// CLASS DECLARATION
-
-/**
-* CTestCaseMenuView view class.
-*
-*/
-class CCreatedTestSetMenuView : public CView, public MEikListBoxObserver //CAknView
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CCreatedTestSetMenuView();
-
- public: // Functions from base classes
-
- /**
- * Returns view´s id.
- * @return View id.
- */
- TUid Id() const;
-
- /**
- * Handles a command.
- * @param aCommand A command ID.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Handles client rect changes.
- */
- void HandleClientRectChange();
-
- /**
- * Handles a list box event.
- * @param aListBox A pointer to list box.
- * @param aEventType Type of list box event.
- */
- void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
-
- public: // New functions
-
-
-
- private:
-
- /**
- * Initializes view when activated.
- * @param aPrevViewId Id of the previous view (not used).
- * @param aCustomMessageId Custom message id (not used).
- * @param aCustomMessage Custom message (not used).
- */
- void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * Deactivates view.
- */
- void DoDeactivate();
-
-
- private: // New functions
-
- /**
- * Checks listbox selections and launches
- * query dialog to start test cases.
- * @param aListBox Pointer to listbox.
- */
- void CheckListBoxSelectionsL(CEikListBox* aListBox);
-
- private: // Data
- CAknNavigationDecorator* iNaviDecorator;
- CCreatedTestSetMenuContainer* iContainer;
- TInt iCurrentTestCase;
- TBufC<50> iCurrentTestSet;
- TBool iSaveNeeded;
- };
-
-#endif //CREATEDTESTSETSETMENUVIEW_H
-
-// End of File
--- a/stifui/stifui/inc/MainMenuContainer.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CMainMenuContainer class definition.
-*
-*/
-
-#ifndef CMAINMENUCONTAINER_H
-#define CMAINMENUCONTAINER_H
-
-// INCLUDES
-#include <coecntrl.h>
-#include <eiklbo.h>
-
-
-// FORWARD DECLARATIONS
-class CEikTextListBox;
-
-// CLASS DECLARATION
-
-/**
-* CMainMenuContainer container control class.
-*
-*/
-class CMainMenuContainer : public CCoeControl, public MEikListBoxObserver /* MCoeControlObserver */
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- * @param aRect Frame rectangle for container.
- */
- void ConstructL(const TRect& aRect);
-
- /**
- * Destructor.
- */
- ~CMainMenuContainer();
-
- public: // New functions
-
- /**
- * Get currently selected items index.
- * @return Current item index.
- */
- TInt GetActiveLine();
-
- /**
- * Makes the iListBox store its focus position to CAppUiAppUi object
- */
- void SaveActiveLine();
-
- public: // Functions from base classes
-
- /**
- * Method HandleSelectedListItemL handles valix index.
- * @param aIndex Current item index.
- */
- void HandleSelectedListItemL( TInt aIndex );
-
- private: // Functions from base classes
-
- /**
- * From CoeControl,SizeChanged.
- * Called by framework when the view size is changed.
- */
- void SizeChanged();
-
- /**
- * From CoeControl,CountComponentControls.
- * @return Number of controls indside this container.
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl,ComponentControl.
- * Gets the specified component of a compound control.
- * @param aIndex The index of the control to get.
- * @return The component control with an index of aIndex.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl,Draw.
- * Draw a control, called by window server.
- * @param aRect The region of the control to be redrawn. Co-ordinates
- * are relative to the control's origin (top left corner).
- */
- void Draw(const TRect& aRect) const;
-
- /**
- * Handles list box events.
- * @param aListBox The originating list box.
- * @param aEventType A code for the event. Further information may be
- * obtained by accessing the list box itself.
- */
- void HandleListBoxEventL(CEikListBox* aListBox,TListBoxEvent aEventType);
-
- /**
- * From CCoeControl,OfferKeyEventL
- * Handles key events.
- * @param aKeyEvent The key event.
- * @param aType The type of key event.
- * @return Indicates whether or not the key event was used
- * by this control.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
-
- private: //data
-
- CEikTextListBox* iListBox;
- };
-
-#endif
-
-// End of File
--- a/stifui/stifui/inc/MainMenuView.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CMainMenuView class declaration.
-*
-*/
-
-#ifndef MAINMENUVIEW_H
-#define MAINMENUVIEW_H
-
-// INCLUDES
-#include "View.h"
-#include <aknnavide.h>
-
-// CONSTANTS
-// UID of view
-const TUid KMainMenuViewId = {1};
-
-// FORWARD DECLARATIONS
-class CMainMenuContainer;
-
-// CLASS DECLARATION
-
-/**
-* CMainMenuView view class.
-*
-*/
-class CMainMenuView : public CView //CAknView
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CMainMenuView();
-
- public: // Functions from base classes
-
- /**
- * Returns view´s id.
- * @return View id.
- */
- TUid Id() const;
-
- /**
- * Handles a command.
- * @param aCommand A command ID.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Handles client rect changes.
- */
- void HandleClientRectChange();
-
- private:
-
- /**
- * Initializes view when activated.
- * @param aPrevViewId Id of the previous view (not used).
- * @param aCustomMessageId Custom message id (not used).
- * @param aCustomMessage Custom message (not used).
- */
- void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * Deactivates view.
- */
- void DoDeactivate();
-
- private: // Data
- CMainMenuContainer* iContainer;
- CAknNavigationDecorator* iNaviDecorator;
- };
-
-#endif
-
-// End of File
--- a/stifui/stifui/inc/MenuListBox.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CMenuListBox class declaration.
-*
-*/
-
-#ifndef MENULISTBOX_H_
-#define MENULISTBOX_H_
-
-// INCLUDES
-#include <eiktxlbx.h>
-#include "Stifui.hrh"
-#include "AppUIAppUi.h"
-#include <aknview.h>
-#include <aknlists.h>
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-
-// CLASS DECLARATION
-
-/**
-* CMenuListBox class. Has ability to store and retrieve previous focus position
-*/
-class CMenuListBox : public CAknSingleStyleListBox
- {
- public: // Constructors and destructor
-
- static CMenuListBox* NewL(TAppUIViewNumber aViewId);
-
- /**
- * Destructor.
- */
- virtual ~CMenuListBox();
-
- /**
- * Sets focus on last chosen position
- */
- void SetPreviousFocus();
-
- /**
- * Saves position of focus to CAppUiAppUi object
- */
- void SaveFocusPosition();
-
- private: // Constructors and destructor
-
- CMenuListBox(TAppUIViewNumber aViewId);
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- public: // Functions from base classes
-
- private:
-
- private: // Data
- const TAppUIViewNumber iViewId;
- };
-
-#endif /*MENULISTBOX_H_*/
--- a/stifui/stifui/inc/ShowStartedCasesContainer.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,252 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStartedTestsListBoxModel class
-* declaration.
-*
-*/
-
-#ifndef CSHOWSTARTEDCASESCONTAINER_H
-#define CSHOWSTARTEDCASESCONTAINER_H
-
-// INCLUDES
-#include "Container.h"
-
-#include <coecntrl.h>
-#include <eiklbo.h>
-#include <bamdesca.h> // MDesCArray
-
-//#include "RRefArray.h"
-#include <stifinternal/RRefArray.h>
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CEikTextListBox;
-class CAknSingleGraphicStyleListBox;
-class CDesC16ArrayFlat;
-class CStartedTestCase;
-class CUIStore;
-
-// CLASS DECLARATION
-
-class CStartedTestsListBoxModel : public CTestCaseListBoxModel //public CBase, public MDesCArray
- {
- public:
- /**
- * Destructor.
- */
- ~CStartedTestsListBoxModel();
-
- /**
- * Two-phased constructor.
- * @param aTestsInView Array of test cases in view.
- * @return Pointer to created list box model.
- */
- static CStartedTestsListBoxModel* NewL(
- RRefArray<CStartedTestCase>* aTestsInView);
-
- public: // Functions from base classes
-
- /**
- * Returns the number of descriptor elements in the array.
- * @return The number of descriptor elements.
- */
- TInt MdcaCount() const;
-
- /**
- * Indexes into a descriptor array.
- * @param aIndex The position of the descriptor element within the
- * array. The position is relative to zero; i.e. zero
- * implies the first descriptor element in the array.
- * This value must be non-negative and less than the
- * number of descriptors currently within the array
- * otherwise the operator panics with
- * EArrayIndexOutOfRange.
- * @return A non-modifiable pointer descriptor representing the
- * descriptor element located at position aIndex within
- * the array.
- */
- TPtrC MdcaPoint(TInt aIndex) const;
-
- private:
-
- /**
- * Symbian OS two phased constructor.
- * Completes the construction of the object.
- */
- void ConstructL();
-
- private: //data
- RRefArray<CStartedTestCase>* iTestCasesInView;
- };
-
-/**
-* CShowStartedCasesContainer container control class.
-*
-*/
-class CShowStartedCasesContainer : public CContainer //public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- * @param aRect Frame rectangle for container.
- * @return Observer for list box.
- */
- void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
-
- /**
- * Destructor.
- */
- ~CShowStartedCasesContainer();
-
- public: // New functions
-
- /**
- * Show only testcases which are defined is specified module.
- * @param aModuleName Module which test cases are shown.
- */
- void FilterCasesByModuleL(TName aModuleName);
-
- /**
- * Show only testcases which are defined in specified test case file.
- * @param aTestCaseFileName Test cases file name.
- */
- void FilterCasesByTCFileNameL(TFileName aTestCaseFileName);
-
- /**
- * Remove possible filtering of test cases -> show all test cases.
- */
- void NoFilteringL();
-
- /**
- * Returns reference to currently selected test case in view (listbox).
- * @return Currently selected test case.
- */
- CStartedTestCase* SelectedTestCase();
-
- /**
- * Constructs list box model without any filtering.
- */
- void ConstructListBoxModelL();
-
- /**
- * Draws the list box.
- */
- void DrawListBox();
-
- /**
- * Returns count of test cases in view.
- * @return Count of test cases in view.
- */
- TInt TestsInViewCount();
-
- /**
- * Handles the addition of an item to the model.
- */
- void HandleItemAdditionL();
-
- /**
- * Handles the removal of an item from the model.
- */
- void HandleItemRemovalL();
-
- /**
- * Returns pointer to currently selected test case.
- * @param Current test case.
- */
- CStartedTestCase* CurrentTestCase();
-
- /**
- * Sets the current item.
- * @param aIndex Index of the item to make current.
- */
- void SetCurrentItemIndex(TInt aIndex);
-
- /**
- * Resets the selection indices, top and current item indices,
- * the selection, and the horizontal scroll offset of this list box.
- * This function does not redraw the list box.
- */
- void ResetListBox();
-
- /**
- * Removes items from list box.
- */
- void RemoveSelectedExecutionsL();
-
- /**
- * Removes all started test cases from list box.
- */
- void RemoveAllExecutionsInViewL();
-
- /**
- * Stores current position of focus of iListBox to the CAppUiAppUi object
- */
- void SaveActiveLine();
-
- private: // New functions
-
- public: // Functions from base classes
-
- private: // Functions from base classes
-
- /**
- * From CoeControl,SizeChanged.
- * Called by framework when the view size is changed.
- */
- void SizeChanged();
-
- /**
- * From CoeControl,CountComponentControls.
- * Gets a count of the component controls of this list box control.
- * This information is used for DrawNow().
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl,ComponentControl.
- * Gets a pointer to the specified component control.
- * @param aIndex Index of the component control to look up.
- * @return The control at aIndex.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl,Draw.
- * Draw a control, called by window server.
- * @param aRect The region of the control to be redrawn. Co-ordinates
- * are relative to the control's origin (top left corner).
- */
- void Draw(const TRect& aRect) const;
-
- /**
- * From CCoeControl,OfferKeyEventL
- * Handles key events.
- * @param aKeyEvent The key event.
- * @param aType The type of key event.
- * @return Indicates whether or not the key event was used
- * by this control.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
- private: //data
-
- CStartedTestsListBoxModel* iListBoxModel;
- RRefArray<CStartedTestCase> iStartedTestsPtrs;
- };
-
-#endif // CSHOWSTARTEDCASESCONTAINER_H
-
-// End of File
--- a/stifui/stifui/inc/ShowStartedCasesView.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CShowStartedCasesView class
-* declaration.
-*
-*/
-
-#ifndef SHOWSTARTEDCASESVIEW_H
-#define SHOWSTARTEDCASESVIEW_H
-
-// INCLUDES
-#include "View.h"
-#include <eiklbo.h> // MEikListBoxObserver
-#include <aknnavide.h> //CAknNavigationDecorator
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CShowStartedCasesContainer;
-
-// CLASS DECLARATION
-
-/**
-* CShowStartedCasesView view class.
-*
-*/
-class CShowStartedCasesView : public CView, public MEikListBoxObserver
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CShowStartedCasesView();
-
- public: // Functions from base classes
-
- /**
- * Returns view´s id.
- * @return View id.
- */
- TUid Id() const;
-
- /**
- * Handles a command.
- * @param aCommand A command ID.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Handles client rect changes.
- */
- void HandleClientRectChange();
-
- /**
- * Handles a list box event.
- * @param aListBox A pointer to list box (not used).
- * @param aEventType Type of list box event.
- */
- void HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType);
-
- public: // New functions
-
- /**
- * Handles status changes of test cases in view.
- */
- void TestCaseStateChangedL();
-
- /**
- * Handles call to view test case´s output data.
- */
- void ViewTestCaseOutputL();
-
- private:
-
- /**
- * Initializes view when activated.
- * @param aPrevViewId Id of the previous view (not used).
- * @param aCustomMessageId Custom message id (not used).
- * @param aCustomMessage Custom message (not used).
- */
- void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * Deactivates view.
- */
- void DoDeactivate();
-
- /** From MEikMenuObserver
- * Initializes menu pane.
- * @param aResourceId Menu pane resource ID
- * @param aMenuPane Menu pane pointer
- */
- void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
-
- /**
- * Refreshes view name shown in the navi pane.
- */
- void RefreshNaviTitleL();
-
- private: // Data
- CShowStartedCasesContainer* iContainer;
- CAknNavigationDecorator* iNaviDecorator;
- TName iFilterModule;
- TFileName iFilterTestCaseFile;
- TInt iSelectedTestCase; // Which testcase was
- // selected when view
- // was active earlier.
- };
-
-#endif //SHOWSTARTEDCASESVIEW_H
-
-// End of File
--- a/stifui/stifui/inc/StartCasesContainer.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStartCasesContainer class
-* declaration.
-*
-*/
-
-#ifndef CSTARTCASESCONTAINER_H
-#define CSTARTCASESCONTAINER_H
-
-// INCLUDES
-#include "Container.h"
-
-#include <coecntrl.h>
-#include <eiklbo.h> // MEikListBoxObserver
-#include <bamdesca.h> // MDesCArray
-#include <aknsfld.h>
-
-//#include "RRefArray.h"
-//#include "UIEngine.h"
-//#include "UIStoreIf.h"
-//#include "UIStoreContainer.h"
-
-#include <stifinternal/RRefArray.h>
-#include <stifinternal/UIEngine.h>
-#include <stifinternal/UIStoreIf.h>
-#include <stifinternal/UIStoreContainer.h>
-
-// FORWARD DECLARATIONS
-class CEikTextListBox;
-class CDesC16Array;
-
-class CStartCasesView;
-class CEikColumnListBox;
-class CStartedTestCase;
-
-class CUIStoreHandler;
-class CUIStore;
-class CUIStoreIf;
-class CUIEngineContainer;
-class CUIEngine;
-
-// CLASS DECLARATION
-/**
-* CStartCasesContainer container control class.
-*
-*/
-class CStartCasesContainer : public CContainer//public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- * @param aRect Frame rectangle for container.
- */
- void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
-
- /**
- * Destructor.
- */
- ~CStartCasesContainer();
-
- public: // New functions
-
- /**
- * Stores current position of focus of iListBox to the CAppUiAppUi object
- */
- void SaveActiveLine();
-
- public: // Functions from base classes
-
- private: // Functions from base classes
-
- /**
- * From CoeControl,SizeChanged.
- * Called by framework when the view size is changed.
- */
- void SizeChanged();
-
- /**
- * From CoeControl,CountComponentControls.
- * Gets a count of the component controls of this list box control.
- * This information is used for DrawNow().
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl,ComponentControl.
- * Gets a pointer to the specified component control.
- * @param aIndex Index of the component control to look up.
- * @return The control at aIndex.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl,Draw.
- * Draw a control, called by window server.
- * @param aRect The region of the control to be redrawn. Co-ordinates
- * are relative to the control's origin (top left corner).
- */
- void Draw(const TRect& aRect) const;
-
- /**
- * From CCoeControl,OfferKeyEventL
- * Handles key events.
- * @param aKeyEvent The key event.
- * @param aType The type of key event.
- * @return Indicates whether or not the key event was used
- * by this control.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
- private: //data
-
- CStartCasesView* iParentView;
- };
-
-#endif // CSTARTCASESCONTAINER_H
-
-// End of File
--- a/stifui/stifui/inc/StartCasesView.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStartCasesView class declaration.
-*
-*/
-
-#ifndef STARTCASESVIEW_H
-#define STARTCASESVIEW_H
-
-// INCLUDES
-#include "View.h"
-#include <eiklbo.h> // MEikListBoxObserver
-#include <aknnavide.h>
-
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CStartCasesContainer;
-
-
-// CLASS DECLARATION
-
-/**
-* CTestCaseMenuView view class.
-*
-*/
-class CStartCasesView : public CView, public MEikListBoxObserver //CAknView
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CStartCasesView();
-
- public: // Functions from base classes
-
- /**
- * Returns view´s id.
- * @return View id.
- */
- TUid Id() const;
-
- /**
- * Handles a command.
- * @param aCommand A command ID.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Handles client rect changes.
- */
- void HandleClientRectChange();
-
- /**
- * Handles a list box event.
- * @param aListBox A pointer to list box.
- * @param aEventType Type of list box event.
- */
- void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
-
- public: // New functions
-
- /**
- * Starts test case.
- */
- void StartTestCaseL();
-
- /**
- * Starts multiple test cases.
- * @param aSelectedÍndexes Indexes of selected test cases.
- */
- void StartTestCasesL( RArray<TInt> aSelectedIndexes );
-
- private:
-
- /**
- * Initializes view when activated.
- * @param aPrevViewId Id of the previous view (not used).
- * @param aCustomMessageId Custom message id (not used).
- * @param aCustomMessage Custom message (not used).
- */
- void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * Deactivates view.
- */
- void DoDeactivate();
-
- /**
- * Initializes menu pane.
- * @param aResourceId Menu pane resource ID.
- * @param aMenuPane Menu pane pointer.
- */
- void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
-
- private: // New functions
-
- /**
- * Checks listbox selections and launches
- * query dialog to start test cases.
- * @param aListBox Pointer to listbox.
- */
- void CheckListBoxSelectionsL(CEikListBox* aListBox);
-
- private: // Data
- CAknNavigationDecorator* iNaviDecorator;
- CStartCasesContainer* iContainer;
- TInt iCurrentTestCase;
- };
-
-#endif //STARTCASESVIEW_H
-
-// End of File
--- a/stifui/stifui/inc/StartedCasesMenuContainer.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStartedCasesMenuContainer class
-* declaration.
-*
-*/
-
-#ifndef CSTARTEDCASESMENUCONTAINER_H
-#define CSTARTEDCASESMENUCONTAINER_H
-
-// INCLUDES
-#include <coecntrl.h>
-#include <eiklbo.h>
-
-
-// FORWARD DECLARATIONS
-class CEikTextListBox;
-
-// CLASS DECLARATION
-
-/**
-* CStartedCasesMenuContainer container control class.
-*
-*/
-class CStartedCasesMenuContainer : public CCoeControl , public MEikListBoxObserver /* MCoeControlObserver */
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- * @param aRect Frame rectangle for container.
- */
- void ConstructL(const TRect& aRect );
-
- /**
- * Destructor.
- */
- ~CStartedCasesMenuContainer();
-
- public: // New functions
-
- /**
- * Get currently selected items index.
- * @return Current item index.
- */
- TInt GetActiveLine();
-
- /**
- * Stores current position of focus of iListBox to the CAppUiAppUi object
- */
- void SaveActiveLine();
-
- public: // Functions from base classes
-
- /**
- * Method HandleSelectedListItemL handles valix index.
- * @param TInt aIndex
- * @return nothing
- */
- void HandleSelectedListItemL( TInt aIndex );
-
- private: // Functions from base classes
-
- /**
- * From CoeControl,SizeChanged.
- * Called by framework when the view size is changed.
- */
- void SizeChanged();
-
- /**
- * From CoeControl,CountComponentControls.
- * Gets a count of the component controls of this list box control.
- * This information is used for DrawNow().
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl,ComponentControl.
- * Gets a pointer to the specified component control.
- * @param aIndex Index of the component control to look up.
- * @return The control at aIndex.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl,Draw.
- * Draw a control, called by window server.
- * @param aRect The region of the control to be redrawn. Co-ordinates
- * are relative to the control's origin (top left corner).
- */
- void Draw(const TRect& aRect) const;
-
- /**
- * Handles list box events.
- * @param aListBox The originating list box.
- * @param aEventType A code for the event. Further information may be
- * obtained by accessing the list box itself.
- */
- void HandleListBoxEventL(CEikListBox* aListBox,TListBoxEvent aEventType);
-
- /**
- * From CCoeControl,OfferKeyEventL
- * Handles key events.
- * @param aKeyEvent The key event.
- * @param aType The type of key event.
- * @return Indicates whether or not the key event was used
- * by this control.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
-
- private: //data
-
- CEikTextListBox* iListBox;
- };
-
-#endif // CSTARTEDCASESMENUCONTAINER_H
-
-// End of File
--- a/stifui/stifui/inc/StartedCasesMenuView.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStartedCasesMenuView class
-* declaration.
-*
-*/
-
-#ifndef STARTEDCASESMENUVIEW_H
-#define STARTEDCASESMENUVIEW_H
-
-// INCLUDES
-#include <eiklbo.h> // MEikListBoxObserver
-#include <aknnavide.h>
-#include "View.h"
-
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CStartedCasesMenuContainer;
-
-// CLASS DECLARATION
-
-/**
-* CStartedCasesMenuView view class.
-*
-*/
-class CStartedCasesMenuView : public CView
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CStartedCasesMenuView();
-
- public: // Functions from base classes
-
- /**
- * Returns view´s id.
- * @return View id.
- */
- TUid Id() const;
-
- /**
- * Handles a command.
- * @param aCommand A command ID.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Handles client rect changes.
- */
- void HandleClientRectChange();
-
- private:
-
- /**
- * Initializes view when activated.
- * @param aPrevViewId Id of the previous view (not used).
- * @param aCustomMessageId Custom message id (not used).
- * @param aCustomMessage Custom message (not used).
- */
- void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * Deactivates view.
- */
- void DoDeactivate();
-
- private: // Data
- CAknNavigationDecorator* iNaviDecorator;
- CStartedCasesMenuContainer* iContainer;
- };
-
-#endif
-
-// End of File
--- a/stifui/stifui/inc/StatisticsContainer.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStatisticsContainer class
-* declaration.
-*
-*/
-
-#ifndef CSTATISTICSCONTAINER_H
-#define CSTATISTICSCONTAINER_H
-
-// INCLUDES
-#include "Container.h"
-
-#include <coecntrl.h>
-#include <eiklbo.h> // MEikListBoxObserver
-#include <bamdesca.h> // MDesCArray
-#include <aknsfld.h>
-
-// FORWARD DECLARATIONS
-class CEikTextListBox;
-class CDesC16Array;
-
-class CStartCasesView;
-class CEikColumnListBox;
-
-// CLASS DECLARATION
-/**
-* StatisticsContainer container control class.
-*
-*/
-class CStatisticsContainer : public CContainer//public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- * @param aRect Frame rectangle for container.
- */
- void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
-
- /**
- * Destructor.
- */
- ~CStatisticsContainer();
-
- public: // New functions
-
- /**
- * Stores current position of focus of iListBox to the CAppUiAppUi object
- */
- void SaveActiveLine();
-
- public: // Functions from base classes
-
- private: // Functions from base classes
-
- /**
- * From CoeControl,SizeChanged.
- * Called by framework when the view size is changed.
- */
- void SizeChanged();
-
- /**
- * From CoeControl,CountComponentControls.
- * Gets a count of the component controls of this list box control.
- * This information is used for DrawNow().
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl,ComponentControl.
- * Gets a pointer to the specified component control.
- * @param aIndex Index of the component control to look up.
- * @return The control at aIndex.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl,Draw.
- * Draw a control, called by window server.
- * @param aRect The region of the control to be redrawn. Co-ordinates
- * are relative to the control's origin (top left corner).
- */
- void Draw(const TRect& aRect) const;
-
- /**
- * From CCoeControl,OfferKeyEventL
- * Handles key events.
- * @param aKeyEvent The key event.
- * @param aType The type of key event.
- * @return Indicates whether or not the key event was used
- * by this control.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
- private: //data
-
- CStartCasesView* iParentView;
- CDesC16ArrayFlat* iTestCaseArray;
- };
-
-#endif // CSTATISTICSCONTAINER_H
-
-// End of File
--- a/stifui/stifui/inc/StatisticsView.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStatisticsView class declaration.
-*
-*/
-
-#ifndef STATISTICSVIEW_H
-#define STATISTICSVIEW_H
-
-// INCLUDES
-#include "View.h"
-#include <eiklbo.h> // MEikListBoxObserver
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CStatisticsContainer;
-
-// CLASS DECLARATION
-
-/**
-* CTestCaseMenuView view class.
-*
-*/
-class CStatisticsView : public CView, public MEikListBoxObserver //CAknView
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CStatisticsView();
-
- public: // Functions from base classes
-
- /**
- * Returns view´s id.
- * @return View id.
- */
- TUid Id() const;
-
- /**
- * Handles a command.
- * @param aCommand A command ID.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Handles client rect changes.
- */
- void HandleClientRectChange();
-
- /**
- * Handles a list box event.
- * @param aListBox A pointer to list box.
- * @param aEventType Type of list box event.
- */
- void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
-
- public: // New functions
-
- /**
- * Starts test case.
- */
- void StartTestCasesL();
-
- private:
-
- /**
- * Initializes view when activated.
- * @param aPrevViewId Id of the previous view (not used).
- * @param aCustomMessageId Custom message id (not used).
- * @param aCustomMessage Custom message (not used).
- */
- void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * Deactivates view.
- */
- void DoDeactivate();
-
- /** From MEikMenuObserver
- * Initializes menu pane.
- * @param aResourceId Menu pane resource ID
- * @param aMenuPane Menu pane pointer
- */
- void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
-
-
- private: // Data
- CAknNavigationDecorator* iNaviDecorator;
- CStatisticsContainer* iContainer;
- TInt iCurrentTestCase;
- };
-
-#endif //STATISTICSVIEW_H
-
-// End of File
--- a/stifui/stifui/inc/Stifui.hrh Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Const definitions file.
-*
-*/
-
-#ifndef STIF_UI_HRH
-#define STIF_UI_HRH
-
-enum TAppUICommandIds
- {
- EAppUIGoBack = 1,
- EAppUIGoToMainMenu,
- EAppUIGoToTestCaseMenu,
- EAppUIGoToModulesMenu,
- EAppUIGoToTestSetsMenu,
- ECmdGoToStartCasesView,
- ECmdGoToStartedCasesView,
- ECmdShowStartedTestSet,
- ECmdCreateTestSet,
- ECmdLoadTestSet,
- ECmdStartTestSet,
- ECmdSaveTestSet,
- ECmdInsertTestCases,
- ECmdRemoveTestCases,
- ECmdFilterCases,
- ECmdMarkMenu,
- ECmdInsertSelectedCases,
- ECmdShowSetMenu,
- ECmdStartCases,
- ECmdShowAllStartedCases,
- ECmdShowOngoingCases,
- ECmdShowPassedCases,
- ECmdShowFailedCases,
- ECmdShowPausedCases,
- ECmdShowCrashedAbortedCases,
- ECmdShowStatistics,
- ECmdViewOutput,
- ECmdPauseTestCase,
- ECmdResumeTestCase,
- ECmdAbortTestCase,
- ECmdRemoveExecution,
- ECmdRemoveAllExecutions,
- ECmdOpenModule,
- ECmdAddModule,
- ECmdRemoveModule,
- ECmdFilterMenu,
- ECmdShowAbout,
- ECmdFilterByModule = 0x1000,
- ECmdFilterByTestCaseFile = 0x2000,
- ECmdNOFiltering = 0x3000,
- ECmdGoToTestSetView
- };
-
-
-enum TAppUITabViewId
- {
- ETestCaseMenuTab = 1,
- ETestModulesMenuTab,
- ETestSetsMenuTab
- };
-
-// Application view ids.
-enum TAppUIViewNumber
- {
- EMainMenuViewId = 1,
- ETestCaseMenuViewId,
- EStartCaseMenuViewId,
- EStartedCasesMenuViewId,
- ETestModulesMenuViewId,
- ETestSetBaseMenuViewId,
- ETestSetMenuViewId,
- ETestSetInsertMenuViewId,
- ETestSetStartedCasesViewId,
- ETestSetsMenuViewId, /*???*/
- EShowStartedCasesViewId,
- EShowStatisticsViewId,
- ETestCaseOutputViewId,
- EStatisticsViewId,
- ECreatedTestSetMenuViewId
- };
-
-enum TPanic
- {
- EModuleIndexOutOfBound,
- EShowCasesOutOfSync
- };
-
-enum TShowStartedCasesMode
- {
- EShowAllStartedCases,
- EShowOngoingCases,
- EShowPausedCases,
- EShowPassedCases,
- EShowFailedCases,
- EShowCrashedAbortedCases,
- EShowStatistics
- };
-
-#endif // STIF_UI_HRH
-// End of File
--- a/stifui/stifui/inc/Stifui_loc.hrh Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains localized strings.
-*
-*/
-
-// LOCALISATION STRINGS
-
-//#define qtn_testcase_menu_tab "Cases"
-//#define qtn_testmodules_menu_tab "Modules"
-//#define qtn_testsets_menu_tab "Sets"
-
-// Main menu
-#define qtn_mainmenulist_test_cases "\tTest Cases"
-#define qtn_mainmenulist_modules "\tModules"
-#define qtn_mainmenulist_test_sets "\tTest Sets"
-
-// Test cases menu
-#define qtn_testcasemenu_startcase "\tStart Case(s)"
-#define qtn_testcasemenu_startedcases "\tStarted Cases"
-
-// Started cases menu
-#define qtn_startedcases_allcases "\tAll Started Cases"
-#define qtn_startedcases_ongoing "\tOngoing Cases"
-#define qtn_startedcases_paused "\tPaused Cases"
-#define qtn_startedcases_passed "\tPassed Cases"
-#define qtn_startedcases_failed "\tFailed Cases"
-#define qtn_startedcases_crashed_aborted "\tCrashed/Aborted Cases"
-#define qtn_startedcases_statistics "\tStatistics"
-
-// Modules menu
-#define qtn_open_module "Open module"
-#define qtn_add_module "Load all module(s)"
-#define qtn_remove_module "Remove module"
-
-// Test set menu.
-#define qtn_testsetbasemenu_createtestset "\tCreate test set"
-#define qtn_testsetbasemenu_loadtestset "\tLoad test set"
-#define qtn_owerwrite_testset_confirmation "Test set already created. Do you want to overwrite it?"
-#define qtn_save_testset_confirmation "Save current test?"//changes for STIF-451
-#define qtn_load_testset_errornote "Error loading test set."
-
-#define qtn_testsetinsert_add_selected "Add selected"
-#define qtn_insert_confirmation "Add selected test case(s) to test set?"
-#define qtn_insert_none_selected "No test cases selected."
-
-#define qtn_testset_started_menu "Show"
-#define qtn_testset_set_menu "Set"
-
-#define qtn_testset_started_allcases "Started Cases"
-#define qtn_testset_started_ongoing "Ongoing Cases"
-#define qtn_testset_started_paused "Paused Cases"
-#define qtn_testset_started_passed "Passed Cases"
-#define qtn_testset_started_failed "Failed Cases"
-#define qtn_testset_started_crashed_aborted "Crashed/Aborted Cases"
-
-#define qtn_filter_test_cases "Filter"
-#define qtn_by_module "By module"
-#define qtn_by_testcasefile "By test case file"
-
-// Test case operations and menu texts
-#define qtn_markmenu_title "Mark/Unmark"
-#define qtn_markmenu_mark "Mark"
-#define qtn_markmenu_unmark "Unmark"
-#define qtn_markmenu_markall "Mark All"
-#define qtn_markmenu_unmarkall "Unmark All"
-#define qtn_mark_test_case "Mark"
-#define qtn_unmark_test_case "Unmark"
-
-#define qtn_filter_menu "Filtering"
-#define qtn_filter_by_modules "Filter by module"
-#define qtn_filter_by_test_case_file "Filter by test case file"
-#define qtn_no_filtering "No filtering"
-
-
-//#define qtn_remove_execution "Remove execution"
-//#define qtn_remove_all_executions "Remove all executions"
-#define qtn_testcase_control_menu "Test case control"
-#define qtn_view_output "View ouput of case"
-#define qtn_pause_testcase "Pause"
-#define qtn_resume_testcase "Resume"
-#define qtn_abort_testcase "Abort"
-
-#define qtn_exit "Exit"
-
-// Start test cases queries.
-#define qtn_start_test_cases "Start Case(s)"
-#define qtn_starting_test_case "Start test?"
-#define qtn_starting_test_cases "Start tests?"
-
-#define qtn_start "Start"
-#define qtn_start_and_view_output "Start and view output"
-
-#define qtn_start_test "Start"
-#define qtn_start_test_output "Start&view output"
-#define qtn_start_tests_parallel "Parallel"
-#define qtn_start_tests_serial "Sequential"
-
-// example caption strings for app
-#define qtn_app_caption_string "STIF UI"
-#define qtn_appui_demo "Demo"
-
-#define qtn_app_short_caption_string "STIF UI"
-
-// Navipanel titles
-#define qtn_navi_load_test_set "Load Test Set"
-#define qtn_navi_main "Main menu"
-#define qtn_navi_testcases "Test cases menu"
-#define qtn_navi_startcases "Start cases"
-#define qtn_navi_startedcases "Started cases"
-#define qtn_navi_testcase_output "Test case output"
-#define qtn_navi_modules "Modules menu"
-#define qtn_navi_testset_base "Test set menu"
-#define qtn_navi_testset "Test set"
-#define qtn_navi_testset_insert "Insert test case"
-
-#define qtn_navi_started "Started cases"
-#define qtn_navi_started_all "All started cases"
-#define qtn_navi_started_ongoing "Ongoing cases"
-#define qtn_navi_started_paused "Paused cases"
-#define qtn_navi_started_passed "Passed cases"
-#define qtn_navi_started_failed "Failed cases"
-#define qtn_navi_started_crashed_aborted "Crashed/Aborted cases"
-#define qtn_navi_started_stats "Statistics"
-
-// Test case states
-#define qtn_testcase_state_running "Running"
-#define qtn_testcase_state_passed "Passed"
-#define qtn_testcase_state_failed "Failed"
-#define qtn_testcase_state_crashed_aborted "Crashed/Aborted"
-#define qtn_testcase_state_unknown "Undefined state!"
-
-// End of File
-
--- a/stifui/stifui/inc/TestCaseMenuContainer.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestCaseMenuContainer class
-* declaration.
-*
-*/
-
-#ifndef CTESTCASEMENUCONTAINER_H
-#define CTESTCASEMENUCONTAINER_H
-
-// INCLUDES
-#include <coecntrl.h>
-#include <eiklbo.h>
-
-
-// FORWARD DECLARATIONS
-class CEikTextListBox;
-
-// CLASS DECLARATION
-
-/**
-* CTestCaseMenuContainer container control class.
-*
-*/
-class CTestCaseMenuContainer : public CCoeControl, public MEikListBoxObserver /* MCoeControlObserver */
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- * @param aRect Frame rectangle for container.
- */
- void ConstructL(const TRect& aRect);
-
- /**
- * Destructor.
- */
- ~CTestCaseMenuContainer();
-
- public: // New functions
-
- /**
- * Get currently selected items index.
- * @return Current item index.
- */
- TInt GetActiveLine();
-
- /**
- * Stores current position of focus of iListBox to the CAppUiAppUi object
- */
- void SaveActiveLine();
-
- public: // Functions from base classes
-
- /**
- * Method HandleSelectedListItemL handles valix index.
- * @param TInt aIndex
- * @return nothing
- */
- void HandleSelectedListItemL( TInt aIndex );
-
- private: // Functions from base classes
-
- /**
- * From CoeControl,SizeChanged.
- * Called by framework when the view size is changed.
- */
- void SizeChanged();
-
- /**
- * From CoeControl,CountComponentControls.
- * Gets a count of the component controls of this list box control.
- * This information is used for DrawNow().
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl,ComponentControl.
- * Gets a pointer to the specified component control.
- * @param aIndex Index of the component control to look up.
- * @return The control at aIndex.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl,Draw.
- * Draw a control, called by window server.
- * @param aRect The region of the control to be redrawn. Co-ordinates
- * are relative to the control's origin (top left corner).
- */
- void Draw(const TRect& aRect) const;
-
- /**
- * Handles list box events.
- * @param aListBox The originating list box.
- * @param aEventType A code for the event. Further information may be
- * obtained by accessing the list box itself.
- */
- void HandleListBoxEventL(CEikListBox* aListBox,TListBoxEvent aEventType);
-
- /**
- * From CCoeControl,OfferKeyEventL
- * Handles key events.
- * @param aKeyEvent The key event.
- * @param aType The type of key event.
- * @return Indicates whether or not the key event was used
- * by this control.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
- private: //data
-
- CEikTextListBox* iListBox;
- };
-
-#endif // CTESTCASEMENUCONTAINER_H
-
-// End of File
--- a/stifui/stifui/inc/TestCaseMenuView.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestCaseMenuView class
-* declaration.
-*
-*/
-
-#ifndef TESTCASEMENUVIEW_H
-#define TESTCASEMENUVIEW_H
-
-// INCLUDES
-#include "View.h"
-#include <aknnavide.h>
-
-
-// CONSTANTS
-// UID of view
-const TUid KTestCaseMenuViewId = {2};
-
-// FORWARD DECLARATIONS
-class CTestCaseMenuContainer;
-
-// CLASS DECLARATION
-
-/**
-* CTestCaseMenuView view class.
-*
-*/
-class CTestCaseMenuView : public CView //CAknView
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CTestCaseMenuView();
-
- public: // Functions from base classes
-
- /**
- * Returns view´s id.
- * @return View id.
- */
- TUid Id() const;
-
- /**
- * Handles a command.
- * @param aCommand A command ID.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Handles client rect changes.
- */
- void HandleClientRectChange();
-
- private:
-
- /**
- * Initializes view when activated.
- * @param aPrevViewId Id of the previous view (not used).
- * @param aCustomMessageId Custom message id (not used).
- * @param aCustomMessage Custom message (not used).
- */
- void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * Deactivates view.
- */
- void DoDeactivate();
-
- private: // Data
- CAknNavigationDecorator* iNaviDecorator;
- CTestCaseMenuContainer* iContainer;
- };
-
-#endif
-
-// End of File
--- a/stifui/stifui/inc/TestCaseOutputContainer.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestOutputListBoxModel class
-* declaration.
-*
-*/
-
-#ifndef TESTCASEOUTPUTCONTAINER_H
-#define TESTCASEOUTPUTCONTAINER_H
-
-// INCLUDES
-#include <coecntrl.h>
-#include <eiklbo.h>
-#include <bamdesca.h> // MDesCArray
-
-// #include "RRefArray.h"
-#include <stifinternal/RRefArray.h>
-
-
-// Define *.mbm file name.
-_LIT(KMbmFileName, "\\Resource\\Apps\\Stifui.mbm");
-
-// FORWARD DECLARATIONS
-class CEikTextListBox;
-class CAknSingleGraphicStyleListBox;
-class CDesC16ArrayFlat;
-class CStartedTestCase;
-
-class CUIStore;
-
-// CLASS DECLARATION
-
-class CTestOutputListBoxModel : public CBase, public MDesCArray
- {
- public:
- /**
- * Destructor.
- */
- ~CTestOutputListBoxModel();
-
- /**
- * Two-phased constructor.
- * @param aStartedTestCase Pointer to started test case.
- * @return Pointer to created list box model.
- */
- static CTestOutputListBoxModel* NewL(CStartedTestCase* aStartedTestCase);
-
- public: // Functions from base classes
-
- /**
- * Returns the number of descriptor elements in the array.
- * @return The number of descriptor elements.
- */
- TInt MdcaCount() const;
-
- /**
- * Indexes into a descriptor array.
- * @param aIndex The position of the descriptor element within the
- * array. The position is relative to zero; i.e. zero
- * implies the first descriptor element in the array.
- * This value must be non-negative and less than the
- * number of descriptors currently within the array
- * otherwise the operator panics with
- * EArrayIndexOutOfRange.
- * @return A non-modifiable pointer descriptor representing the
- * descriptor element located at position aIndex within
- * the array.
- */
- TPtrC MdcaPoint(TInt aIndex) const;
-
- private:
- /**
- * Symbian OS two phased constructor.
- * Completes the construction of the object.
- */
- void ConstructL();
-
- private: //data
- CStartedTestCase* iStartedTestCase;
- HBufC* iBuffer;
-
- };
-
-/**
-* CTestCaseOutputContainer container control class.
-*
-*/
-class CTestCaseOutputContainer : public CCoeControl, public MEikListBoxObserver /* MCoeControlObserver */
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- * @param aRect Frame rectangle for container.
- */
- //void ConstructL(const TRect& aRect, TInt aExecutedTestCaseCount );
- void ConstructL(const TRect& aRect, CStartedTestCase* aStartedTestCase );
-
- /**
- * Destructor.
- */
- ~CTestCaseOutputContainer();
-
- public: // New functions
- /**
- * Handles addition of item to list box.
- */
- void OutputUpdateL();
-
- private:
-
- public: // Functions from base classes
-
- private: // Functions from base classes
-
- /**
- * From CoeControl,SizeChanged.
- * Called by framework when the view size is changed.
- */
- void SizeChanged();
-
- /**
- * From CoeControl,CountComponentControls.
- * Gets a count of the component controls of this list box control.
- * This information is used for DrawNow().
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl,ComponentControl.
- * Gets a pointer to the specified component control.
- * @param aIndex Index of the component control to look up.
- * @return The control at aIndex.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl,Draw.
- * Draw a control, called by window server.
- * @param aRect The region of the control to be redrawn. Co-ordinates
- * are relative to the control's origin (top left corner).
- */
- void Draw(const TRect& aRect) const;
-
- /**
- * Handles list box events.
- * @param aListBox The originating list box.
- * @param aEventType A code for the event. Further information may be
- * obtained by accessing the list box itself.
- */
- void HandleListBoxEventL(CEikListBox* aListBox,TListBoxEvent aEventType);
-
- /**
- * From CCoeControl,OfferKeyEventL
- * Handles key events.
- * @param aKeyEvent The key event.
- * @param aType The type of key event.
- * @return Indicates whether or not the key event was used
- * by this control.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
- private: //data
-
- CEikTextListBox* iListBox;
- CTestOutputListBoxModel* iListBoxModel;
- CUIStore* iUIStore;
-
- };
-
-#endif // TESTCASEOUTPUTCONTAINER_H
-
-// End of File
--- a/stifui/stifui/inc/TestCaseOutputView.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestCaseOutputView class
-* declaration.
-*
-*/
-
-#ifndef TESTCASEOUTPUTVIEW_H
-#define TESTCASEOUTPUTVIEW_H
-
-// INCLUDES
-#include "View.h"
-#include <aknnavide.h>
-
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CTestCaseOutputContainer;
-
-// CLASS DECLARATION
-
-/**
-* CTestCaseOutputView view class.
-*
-*/
-class CTestCaseOutputView : public CView
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CTestCaseOutputView();
-
- public: // Functions from base classes
-
- /**
- * Returns view´s id.
- * @return View id.
- */
- TUid Id() const;
-
- /**
- * Handles a command.
- * @param aCommand A command ID.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Handles client rect changes.
- */
- void HandleClientRectChange();
-
- public: // New functions
-
- /**
- * Receives output update notification from AppUI
- * @param aTestCase A pointer to started test case.
- */
- void OutputUpdateL( CStartedTestCase* aTestCase );
-
- /**
- * Prints test case state to title pane
- */
- void PrintTestCaseStateL();
-
- /**
- * Handles test case state changed notification
- */
- void TestCaseStateChangedL();
-
- private:
-
- /**
- * Initializes view when activated.
- * @param aPrevViewId Id of the previous view (not used).
- * @param aCustomMessageId Custom message id (not used).
- * @param aCustomMessage Custom message (not used).
- */
- void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * Deactivates view.
- */
- void DoDeactivate();
-
- /** From MEikMenuObserver
- * Initializes menu pane.
- * @param aResourceId Menu pane resource ID
- * @param aMenuPane Menu pane pointer
- */
- void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
-
-
- private: // Data
- CAknNavigationDecorator* iNaviDecorator;
- CTestCaseOutputContainer* iContainer;
- CStartedTestCase* iCurrentTestCase;
-
- };
-
-#endif //SHOWSTARTEDCASESVIEW_H
-
-// End of File
--- a/stifui/stifui/inc/TestModulesMenuContainer.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestModulesListBoxModel class
-* declaration.
-*
-*/
-
-#ifndef CTESTMODULESMENUCONTAINER_H
-#define CTESTMODULESMENUCONTAINER_H
-
-// INCLUDES
-#include <coecntrl.h>
-#include <eiklbo.h>
-
-// #include "RRefArray.h"
-#include <stifinternal/RRefArray.h>
-
-// FORWARD DECLARATIONS
-class CEikTextListBox;
-class CUIStore;
-
-// CLASS DECLARATION
-class CTestModulesListBoxModel : public CBase, public MDesCArray
- {
- public:
- /**
- * Destructor.
- */
- ~CTestModulesListBoxModel();
-
- /**
- * Two-phased constructor.
- * @param aTestModules Array of test modules names.
- * @return Pointer to created list box model.
- */
- static CTestModulesListBoxModel* NewL(RRefArray<TDesC> aTestModules);
-
- public: // Functions from base classes
-
- /**
- * Returns the number of descriptor elements in the array.
- * @return The number of descriptor elements.
- */
- TInt MdcaCount() const;
-
- /**
- * Indexes into a descriptor array.
- * @param aIndex The position of the descriptor element within the
- * array. The position is relative to zero; i.e. zero
- * implies the first descriptor element in the array.
- * This value must be non-negative and less than the
- * number of descriptors currently within the array
- * otherwise the operator panics with
- * EArrayIndexOutOfRange.
- * @return A non-modifiable pointer descriptor representing the
- * descriptor element located at position aIndex within
- * the array.
- */
- TPtrC MdcaPoint(TInt aIndex) const;
-
- private:
- /**
- * Symbian OS two phased constructor.
- * Completes the construction of the object.
- */
- void ConstructL();
-
- private: //data
- RRefArray<TDesC> iTestModules;
- HBufC* iBuffer;
- };
-
-/**
-* CTestModulesMenuContainer container control class.
-*
-*/
-class CTestModulesMenuContainer : public CCoeControl
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- * @param aRect Frame rectangle for container.
- */
- void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
-
- /**
- * Destructor.
- */
- ~CTestModulesMenuContainer();
-
- public: // New functions
-
- /**
- * Gets the index number of the current item in the view.
- * @return Index number of the current item.
- */
- TInt CurrentItemIndex();
-
- public: // New functions
-
- /**
- * Stores current position of focus of iListBox to the CAppUiAppUi object
- */
- void SaveActiveLine();
-
- private: // Functions from base classes
-
- /**
- * From CoeControl,SizeChanged.
- * Called by framework when the view size is changed.
- */
- void SizeChanged();
-
- /**
- * From CoeControl,CountComponentControls.
- * Gets a count of the component controls of this list box control.
- * This information is used for DrawNow().
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl,ComponentControl.
- * Gets a pointer to the specified component control.
- * @param aIndex Index of the component control to look up.
- * @return The control at aIndex.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl,Draw.
- * Draw a control, called by window server.
- * @param aRect The region of the control to be redrawn. Co-ordinates
- * are relative to the control's origin (top left corner).
- */
- void Draw(const TRect& aRect) const;
-
- /**
- * From CCoeControl,OfferKeyEventL
- * Handles key events.
- * @param aKeyEvent The key event.
- * @param aType The type of key event.
- * @return Indicates whether or not the key event was used
- * by this control.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
- private: //data
-
- CEikTextListBox* iListBox;
- CTestModulesListBoxModel* iListBoxModel;
- CUIStore* iUIStore;
- RRefArray<TDesC> iModules;
- };
-
-#endif // CTESTMODULESMENUCONTAINER_H
-
-// End of File
--- a/stifui/stifui/inc/TestModulesMenuView.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestModulesMenuView class
-* declaration.
-*
-*/
-
-#ifndef TESTMODULEMENUVIEW_H
-#define TESTMODULEMENUVIEW_H
-
-// INCLUDES
-#include "View.h"
-#include <eiklbo.h> // MEikListBoxObserver
-#include <aknnavide.h>
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CTestModulesMenuContainer;
-
-// CLASS DECLARATION
-
-/**
-* CTestModulesMenuView view class.
-*
-*/
-class CTestModulesMenuView : public CView, public MEikListBoxObserver
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CTestModulesMenuView();
-
- public: // Functions from base classes
-
- /**
- * Returns view´s id.
- * @return View id.
- */
- TUid Id() const;
-
- /**
- * Handles a command.
- * @param aCommand A command ID.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Handles client rect changes.
- */
- void HandleClientRectChange();
-
- /**
- * Handles a list box event.
- * @param aListBox A pointer to list box (not used).
- * @param aEventType Type of list box event.
- */
- void HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType);
-
- /**
- * Initializes menu pane.
- * @param aResourceId Menu pane resource ID.
- * @param aMenuPane Menu pane pointer.
- */
- void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
-
- private:
-
- /**
- * Initializes view when activated.
- * @param aPrevViewId Id of the previous view (not used).
- * @param aCustomMessageId Custom message id (not used).
- * @param aCustomMessage Custom message (not used).
- */
- void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * Deactivates view.
- */
- void DoDeactivate();
-
- private: // Data
- CAknNavigationDecorator* iNaviDecorator;
- CTestModulesMenuContainer* iContainer;
- };
-
-#endif // TESTMODULEMENUVIEW_H
-
-// End of File
--- a/stifui/stifui/inc/TestSetBaseMenuContainer.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetBaseMenuContainer
-* class declaration.
-*
-*/
-
-#ifndef CTestSetBaseMenuContainer_H
-#define CTestSetBaseMenuContainer_H
-
-// INCLUDES
-#include <coecntrl.h>
-#include <eiklbo.h>
-
-
-// FORWARD DECLARATIONS
-//class CEikLabel; // for example labels
-class CEikTextListBox;
-
-// CLASS DECLARATION
-
-/**
-* CTestSetBaseMenuContainer container control class.
-*
-*/
-class CTestSetBaseMenuContainer : public CCoeControl
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- * @param aRect Frame rectangle for container.
- * @return Observer for list box.
- */
- void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
-
- /**
- * Destructor.
- */
- ~CTestSetBaseMenuContainer();
-
- public: // New functions
-
- /**
- * Get currently selected items index.
- * @return Current item index.
- */
- TInt GetActiveLine();
-
- /**
- * Stores current position of focus of iListBox to the CAppUiAppUi object
- */
- void SaveActiveLine();
-
- public: // Functions from base classes
-
- /**
- * Method HandleSelectedListItemL handles valix index.
- * @param TInt aIndex
- * @return nothing
- */
- void HandleSelectedListItemL( TInt aIndex );
-
- private: // Functions from base classes
-
- /**
- * From CoeControl,SizeChanged.
- * Called by framework when the view size is changed.
- */
- void SizeChanged();
-
- /**
- * From CoeControl,CountComponentControls.
- * Gets a count of the component controls of this list box control.
- * This information is used for DrawNow().
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl,ComponentControl.
- * Gets a pointer to the specified component control.
- * @param aIndex Index of the component control to look up.
- * @return The control at aIndex.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl,Draw.
- * Draw a control, called by window server.
- * @param aRect The region of the control to be redrawn. Co-ordinates
- * are relative to the control's origin (top left corner).
- */
- void Draw(const TRect& aRect) const;
-
- /**
- * From CCoeControl,OfferKeyEventL
- * Handles key events.
- * @param aKeyEvent The key event.
- * @param aType The type of key event.
- * @return Indicates whether or not the key event was used
- * by this control.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
-
- private: //data
-
- CEikTextListBox* iListBox;
- };
-
-#endif // CTestSetBaseMenuContainer_H
-
-// End of File
--- a/stifui/stifui/inc/TestSetBaseMenuView.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetBaseMenuView class declaration.
-*
-*/
-
-#ifndef TESTSETBASEMENUVIEW_H
-#define TESTSETBASEMENUVIEW_H
-
-// INCLUDES
-#include "View.h"
-#include <eiklbo.h> // MEikListBoxObserver
-#include <aknnavide.h>
-
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CTestSetBaseMenuContainer;
-
-// CLASS DECLARATION
-
-/**
-* CTestSetBaseMenuView view class.
-*
-*/
-class CTestSetBaseMenuView : public CView, public MEikListBoxObserver
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CTestSetBaseMenuView();
-
- public: // Functions from base classes
-
- /**
- * Returns view´s id.
- * @return View id.
- */
- TUid Id() const;
-
- /**
- * Handles a command.
- * @param aCommand A command ID.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Handles client rect changes.
- */
- void HandleClientRectChange();
-
- /**
- * Handles a list box event.
- * @param aListBox A pointer to list box.
- * @param aEventType Type of list box event.
- */
- void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
-
- private:
-
- /**
- * Initializes view when activated.
- * @param aPrevViewId Id of the previous view (not used).
- * @param aCustomMessageId Custom message id (not used).
- * @param aCustomMessage Custom message (not used).
- */
- void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * Deactivates view.
- */
- void DoDeactivate();
-
- private: // Data
- CAknNavigationDecorator* iNaviDecorator;
- CTestSetBaseMenuContainer* iContainer;
- };
-
-#endif
-
-// End of File
--- a/stifui/stifui/inc/TestSetInsertMenuContainer.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetInsertMenuContainer
-* class definition.
-*
-*/
-
-#ifndef TESTSETINSERTMENUCONTAINER_H
-#define TESTSETINSERTMENUCONTAINER_H
-
-// INCLUDES
-#include "Container.h"
-
-#include <coecntrl.h>
-#include <eiklbo.h> // MEikListBoxObserver
-#include <bamdesca.h> // MDesCArray
-#include <aknsfld.h>
-
-//#include "RRefArray.h"
-//#include "UIEngine.h"
-//#include "UIStoreIf.h"
-//#include "UIStoreContainer.h"
-
-#include <stifinternal/RRefArray.h>
-#include <stifinternal/UIEngine.h>
-#include <stifinternal/UIStoreIf.h>
-#include <stifinternal/UIStoreContainer.h>
-
-
-
-// FORWARD DECLARATIONS
-class CEikTextListBox;
-class CDesC16Array;
-
-class CTestSetInsertMenuView;
-class CEikColumnListBox;
-class CStartedTestCase;
-
-class CUIStoreHandler;
-class CUIStore;
-class CUIStoreIf;
-class CUIEngineContainer;
-class CUIEngine;
-
-// CLASS DECLARATION
-/**
-* CTestSetInsertMenuContainer container control class.
-*
-*/
-class CTestSetInsertMenuContainer : public CContainer //public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- * @param aRect Frame rectangle for container.
- */
- void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
-
- /**
- * Destructor.
- */
- ~CTestSetInsertMenuContainer();
-
- public: // New functions
-
- /**
- * Stores current position of focus of iListBox to the CAppUiAppUi object
- */
- void SaveActiveLine();
-
- public: // Functions from base classes
-
- private: // Functions from base classes
-
- /**
- * From CoeControl,SizeChanged.
- * Called by framework when the view size is changed.
- */
- void SizeChanged();
-
- /**
- * From CoeControl,CountComponentControls.
- * Gets a count of the component controls of this list box control.
- * This information is used for DrawNow().
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl,ComponentControl.
- * Gets a pointer to the specified component control.
- * @param aIndex Index of the component control to look up.
- * @return The control at aIndex.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl,Draw.
- * Draw a control, called by window server.
- * @param aRect The region of the control to be redrawn. Co-ordinates
- * are relative to the control's origin (top left corner).
- */
- void Draw(const TRect& aRect) const;
-
- /**
- * From CCoeControl,OfferKeyEventL
- * Handles key events.
- * @param aKeyEvent The key event.
- * @param aType The type of key event.
- * @return Indicates whether or not the key event was used
- * by this control.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
- private: //data
-
- CTestSetInsertMenuView* iParentView;
- };
-
-#endif // CTestSetInsertMenuContainer_H
-
-// End of File
--- a/stifui/stifui/inc/TestSetInsertMenuView.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetInsertMenuView class
-* declaration.
-*
-*/
-
-#ifndef TESTSETINSERTMENUVIEW_H
-#define TESTSETINSERTMENUVIEW_H
-
-// INCLUDES
-#include "View.h"
-#include <eiklbo.h> // MEikListBoxObserver
-#include <aknnavide.h>
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CTestSetInsertMenuContainer;
-
-
-// CLASS DECLARATION
-
-/**
-* CTestCaseMenuView view class.
-*
-*/
-class CTestSetInsertMenuView : public CView, public MEikListBoxObserver //CAknView
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CTestSetInsertMenuView();
-
- public: // Functions from base classes
-
- /**
- * Returns view´s id.
- * @return View id.
- */
- TUid Id() const;
-
- /**
- * Handles a command.
- * @param aCommand A command ID.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Handles client rect changes.
- */
- void HandleClientRectChange();
-
- /**
- * Handles a list box event.
- * @param aListBox A pointer to list box.
- * @param aEventType Type of list box event.
- */
- void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
-
- public: // New functions
-
- /**
- * Adds selected test cases to the current test set.
- * @param aSelectedIndexes Indexes of selected test cases.
- */
- void AddCasesToTestSet( RArray<TInt> aSelectedIndexes );
-
- private:
-
- /**
- * Initializes view when activated.
- * @param aPrevViewId Id of the previous view (not used).
- * @param aCustomMessageId Custom message id (not used).
- * @param aCustomMessage Custom message (not used).
- */
- void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * Deactivates view.
- */
- void DoDeactivate();
-
- /**
- * Initializes menu pane.
- * @param aResourceId Menu pane resource ID.
- * @param aMenuPane Menu pane pointer.
- */
- void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
-
- /**
- * Show confirmation dialog for inserting test cases.
- */
- void ShowInsertCasesDialogL();
-
- private: // Data
- CAknNavigationDecorator* iNaviDecorator;
- CTestSetInsertMenuContainer* iContainer;
- TInt iCurrentTestCase;
- };
-
-#endif //TestSetInsertMenuView_H
-
-// End of File
--- a/stifui/stifui/inc/TestSetMenuContainer.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,209 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetMenuContainer class
-* declaration.
-*
-*/
-
-#ifndef TestSetMenuContainer_H
-#define TestSetMenuContainer_H
-
-// INCLUDES
-#include <coecntrl.h>
-#include <eiklbo.h> // MEikListBoxObserver
-#include <bamdesca.h> // MDesCArray
-#include <aknsfld.h>
-
-//#include "RRefArray.h"
-//#include "UIEngine.h"
-//#include "UIStoreIf.h"
-//#include "UIStoreContainer.h"
-
-#include <stifinternal/RRefArray.h>
-#include <stifinternal/UIEngine.h>
-#include <stifinternal/UIStoreIf.h>
-#include <stifinternal/UIStoreContainer.h>
-
-// FORWARD DECLARATIONS
-class CEikTextListBox;
-class CDesC16Array;
-
-class CTestSetMenuView;
-class CEikColumnListBox;
-class CTestCaseListBoxModel;
-
-class CUIStoreHandler;
-class CUIStore;
-class CUIStoreIf;
-class CUIEngineContainer;
-class CUIEngine;
-
-// CLASS DECLARATION
-/**
-* CTestSetMenuContainer container control class.
-*
-*/
-class CTestSetMenuContainer : public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- * @param aRect Frame rectangle for container.
- */
- void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
-
- /**
- * Destructor.
- */
- ~CTestSetMenuContainer();
-
- public: // New functions
- /**
- * Show only testcases which are defined is specified module.
- * @param aModuleName Module which test cases are shown.
- */
- void FilterCasesByModuleL(TName aModuleName);
-
- /**
- * Show only testcases which are defined in specified test case file.
- * @param aTestCaseFileName Test cases file name.
- */
- void FilterCasesByTCFileNameL(TFileName aTestCaseFileName);
-
- /**
- * Remove possible filtering of test cases -> show all test cases.
- */
- void NoFilteringL();
-
- /**
- * Returns pointers to selected test cases.
- * @param aSelectedTestCases Currently selected test case.
- */
- void SelectedTestCases(RPointerArray<CTestInfo>& aSelectedTestCases);
-
- /**
- * Sets graphic icon using listbox as CEikColumnListBox.
- * @param aListBox Pointer to list box.
- */
- void SetGraphicIconL( CEikColumnListBox* aListBox );
-
- /**
- * Appends graphics data.
- * @param aIcons Pointer array of icons.
- */
- void GraphicIconL( CArrayPtr<CGulIcon>* aIcons );
-
- /**
- * Gets the index number of the current item in the view.
- * @return Index number of the current item.
- */
- TInt CurrentItemIndex();
-
- /**
- * Sets the current item.
- * @param aIndex Index of the item to make current.
- */
- void SetCurrentItemIndex(TInt aCurrentTestCase);
-
- /**
- * Inline function for getting pointer to list box.
- * @return Pointer to list box.
- */
- inline CEikListBox* ListBox() { return (CEikListBox*)iListBox; };
-
- /**
- * Processes user commands.
- * @param aCommand ID of the command to respond to.
- */
- void ProcessCommandL( TInt aCommand );
-
- /**
- * Processes user commands.
- * @param aCommand ID of the command to respond to.
- */
- void SelectionListProcessCommandL( TInt aCommand );
-
- /**
- * Handles mark commands.
- * @param aCommand ID of the command to respond to.
- */
- void HandleMarkCommandL( TInt aCommand );
-
- /**
- * Removes items from list box.
- * @param aSelected Indexes of removed items.
- */
- void RemoveListBoxItemL( TInt aSelected );
-
- /**
- * Stores current position of focus of iListBox to the CAppUiAppUi object
- */
- void SaveActiveLine();
-
- public: // Functions from base classes
-
- private: // Functions from base classes
-
- /**
- * From CoeControl,SizeChanged.
- * Called by framework when the view size is changed.
- */
- void SizeChanged();
-
- /**
- * From CoeControl,CountComponentControls.
- * Gets a count of the component controls of this list box control.
- * This information is used for DrawNow().
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl,ComponentControl.
- * Gets a pointer to the specified component control.
- * @param aIndex Index of the component control to look up.
- * @return The control at aIndex.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl,Draw.
- * Draw a control, called by window server.
- * @param aRect The region of the control to be redrawn. Co-ordinates
- * are relative to the control's origin (top left corner).
- */
- void Draw(const TRect& aRect) const;
-
- /**
- * From CCoeControl,OfferKeyEventL
- * Handles key events.
- * @param aKeyEvent The key event.
- * @param aType The type of key event.
- * @return Indicates whether or not the key event was used
- * by this control.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
- private: //data
-
- CTestSetMenuView* iParentView;
- CEikColumnListBox* iListBox;
- CTestCaseListBoxModel* iListBoxModel;
- RPointerArray<CTestInfo> iTestCasesInView;
- CUIStore* iUIStore;
- };
-
-#endif // CTestSetMenuContainer_H
-
-// End of File
--- a/stifui/stifui/inc/TestSetMenuView.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetMenuView class declaration.
-*
-*/
-
-#ifndef TESTSETMENUVIEW_H
-#define TESTSETMENUVIEW_H
-
-// INCLUDES
-#include "View.h"
-#include <eiklbo.h> // MEikListBoxObserver
-#include <aknnavide.h>
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CTestSetMenuContainer;
-
-// CLASS DECLARATION
-/**
-* CTestCaseMenuView view class.
-*/
-class CTestSetMenuView : public CView, public MEikListBoxObserver
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CTestSetMenuView();
-
- public: // Functions from base classes
-
- /**
- * Returns view´s id.
- * @return View id.
- */
- TUid Id() const;
-
- /**
- * Handles a command.
- * @param aCommand A command ID.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Handles client rect changes.
- */
- void HandleClientRectChange();
-
- public: // From MEikListBoxObserver
-
- /**
- * Handles list box event.
- * @param aListBox Pointer to list box.
- * @param aEventType List box event.
- */
- void HandleListBoxEventL(CEikListBox* aListBox,
- TListBoxEvent aEventType);
-
- public: // New functions
-
- /**
- * Starts all cases in active test set.
- */
- void StartTestSetL();
-
- /**
- * Removes selected test cases from active test set.
- */
- void RemoveSelectedTestCasesL();
-
- /**
- * Creates new test set.
- * @param aTestSetName Name of the test set.
- * @return Symbian OS error code.
-. */
- TInt CreateTestSetL( const TDesC& aTestSetName );
-
- /**
- * Loads saved test set.
- * @param aTestSetName Name of the test set.
- * @return Symbian OS error code.
- */
- TInt LoadTestSetL( const TDesC& aTestSetName );
-
- /**
- * Saves current test set.
- * @return Symbian OS error code.
- */
- TInt SaveCurrentTestSetL();
-
- /**
- * Removes current test set.
- * @return Symbian OS error code.
- */
- TInt RemoveActiveTestSet();
-
- /**
- * Get name of the current test set.
- * @return Name of the current test set.
- */
- inline const TDesC& CurrentTestSet()
- { return iCurrentTestSet; }
-
- /**
- * Set save needed flag.
- */
- inline void SetSaveNeeded( TBool aSave )
- { iSaveNeeded = aSave; }
-
- private: // From AknView
-
- /**
- * Initializes view when activated.
- * @param aPrevViewId Id of the previous view (not used).
- * @param aCustomMessageId Custom message id (not used).
- * @param aCustomMessage Custom message (not used).
- */
- void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * Deactivates view.
- */
- void DoDeactivate();
-
- private: // From MEikMenuObserver
-
- /**
- * Initializes menu pane.
- * @param aResourceId Menu pane resource ID.
- * @param aMenuPane Menu pane pointer.
- */
- void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
-
- private: // Data
- CAknNavigationDecorator* iNaviDecorator;
- CTestSetMenuContainer* iContainer;
- CUIStore* iUIStore;
- TInt iCurrentTestCase;
- TInt iTestSetIndex;
- TBuf<50> iCurrentTestSet;
- TBool iSaveNeeded;
-
- };
-
-#endif // TESTSETMENUVIEW_H
-
-// End of File
\ No newline at end of file
--- a/stifui/stifui/inc/TestSetStartedCasesContainer.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,193 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetStartedCasesContainer
-* class declaration.
-*
-*/
-
-#ifndef TESTSETSTARTEDCASESCONTAINER_H
-#define TESTSETSTARTEDCASESCONTAINER_H
-
-// INCLUDES
-#include <coecntrl.h>
-#include <eiklbo.h>
-#include <bamdesca.h> // MDesCArray
-
-//#include "RRefArray.h"
-#include <stifinternal/RRefArray.h>
-
-
-// Define *.mbm file name.
-_LIT(KMbmFileName, "\\Resource\\Apps\\Stifui.mbm");
-
-// FORWARD DECLARATIONS
-class CEikTextListBox;
-class CAknSingleGraphicStyleListBox;
-class CDesC16ArrayFlat;
-class CStartedTestCase;
-
-class CUIStore;
-class CStartedTestsListBoxModel;
-
-// CLASS DECLARATION
-
-/**
-* CTestSetStartedCasesContainer container control class.
-*
-*/
-class CTestSetStartedCasesContainer : public CCoeControl /*, MEikListBoxObserver */ /* MCoeControlObserver */
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- * @param aRect Frame rectangle for container.
- */
- void ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver);
-
- /**
- * Destructor.
- */
- ~CTestSetStartedCasesContainer();
-
- public: // New functions
-
- /**
- * Returns reference to currently selected test case in view (listbox).
- * @return Currently selected test case.
- */
- CStartedTestCase* SelectedTestCase();
-
- /**
- * Constructs list box model.
- */
- void ConstructListBoxModelL();
-
- /**
- * Draws the list box.
- */
- void DrawListBox();
-
- /**
- * Returns count of test cases in view.
- * @return Count of test cases in view.
- */
- TInt TestsInViewCount();
-
- /**
- * Handles the addition of an item to the model.
- */
- void HandleItemAdditionL();
-
- /**
- * Handles the removal of an item from the model.
- */
- void HandleItemRemovalL();
-
- /**
- * Returns pointer to currently selected test case.
- * @param Current test case.
- */
- CStartedTestCase* CurrentTestCase();
-
- /**
- * Gets the index number of the current item in the view.
- * @return Index number of the current item.
- */
- TInt CurrentItemIndex();
-
- /**
- * Sets the current item.
- * @param aIndex Index of the item to make current.
- */
- void SetCurrentItemIndex(TInt aIndex);
-
- /**
- * Resets the selection indices, top and current item indices,
- * the selection, and the horizontal scroll offset of this list box.
- * This function does not redraw the list box.
- */
- void ResetListBox();
-
- /**
- * Removes items from list box.
- */
- void RemoveSelectedExecutionsL();
-
- /**
- * Removes all started test cases from list box.
- */
- void RemoveAllExecutionsInViewL();
-
- /**
- * Stores current position of focus of iListBox to the CAppUiAppUi object
- */
- void SaveActiveLine();
-
- private: // New functions
-
- public: // Functions from base classes
-
- private: // Functions from base classes
-
- /**
- * From CoeControl,SizeChanged.
- * Called by framework when the view size is changed.
- */
- void SizeChanged();
-
- /**
- * From CoeControl,CountComponentControls.
- * Gets a count of the component controls of this list box control.
- * This information is used for DrawNow().
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl,ComponentControl.
- * Gets a pointer to the specified component control.
- * @param aIndex Index of the component control to look up.
- * @return The control at aIndex.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl,Draw.
- * Draw a control, called by window server.
- * @param aRect The region of the control to be redrawn. Co-ordinates
- * are relative to the control's origin (top left corner).
- */
- void Draw(const TRect& aRect) const;
-
- /**
- * From CCoeControl,OfferKeyEventL
- * Handles key events.
- * @param aKeyEvent The key event.
- * @param aType The type of key event.
- * @return Indicates whether or not the key event was used
- * by this control.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
- private: //data
-
- CEikTextListBox* iListBox;
- CStartedTestsListBoxModel* iListBoxModel;
- RRefArray<CStartedTestCase> iStartedTestsPtrs;
- CUIStore* iUIStore;
- };
-
-#endif // CTestSetStartedCasesCONTAINER_H
-
-// End of File
--- a/stifui/stifui/inc/TestSetStartedCasesView.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetStartedCasesView class
-* declaration.
-*
-*/
-
-#ifndef TESTSETSTARTEDCASESVIEW_H
-#define TESTSETSTARTEDCASESVIEW_H
-
-// INCLUDES
-#include "View.h"
-#include <eiklbo.h> // MEikListBoxObserver
-#include <aknnavide.h> //CAknNavigationDecorator
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-class CTestSetStartedCasesContainer;
-
-// CLASS DECLARATION
-
-/**
-* CTestSetStartedCasesView view class.
-*
-*/
-class CTestSetStartedCasesView : public CView, public MEikListBoxObserver
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CTestSetStartedCasesView();
-
- public: // Functions from base classes
-
- /**
- * Returns view´s id.
- * @return View id.
- */
- TUid Id() const;
-
- /**
- * Handles a command.
- * @param aCommand A command ID.
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Handles client rect changes.
- */
- void HandleClientRectChange();
-
- /**
- * Handles a list box event.
- * @param aListBox A pointer to list box (not used).
- * @param aEventType Type of list box event.
- */
- void HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType);
-
- public: // New functions
-
- /**
- * Handles status changes of test cases in view.
- */
- void TestCaseStateChangedL();
-
- /**
- * Handles call to view test case´s output data.
- */
- void ViewTestCaseOutputL();
-
- private:
-
- /**
- * Initializes view when activated.
- * @param aPrevViewId Id of the previous view (not used).
- * @param aCustomMessageId Custom message id (not used).
- * @param aCustomMessage Custom message (not used).
- */
- void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * Deactivates view.
- */
- void DoDeactivate();
-
- /**
- * Initializes menu pane.
- * @param aResourceId Menu pane resource ID.
- * @param aMenuPane Menu pane pointer.
- */
- void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
-
- /**
- * Refreshes view name shown in the navi pane.
- */
- void RefreshNaviTitleL();
-
- private: // Data
- CAknNavigationDecorator* iNaviDecorator;
- CTestSetStartedCasesContainer* iContainer;
- TName iFilterModule;
- TFileName iFilterTestCaseFile;
- TInt iSelectedTestCase; // Which testcase was
- // selected when view
- // was active earlier.
- };
-
-#endif //TestSetStartedCasesVIEW_H
-
-// End of File
--- a/stifui/stifui/inc/UIStoreHandler.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CUIStoreHandler class declaration.
-*
-*/
-
-#ifndef UISTOREHANDLER_H
-#define UISTOREHANDLER_H
-
-// INCLUDES
-//#include "UIStoreIf.h"
-//#include "UIStore.h"
-//#include "UIEngine.h"
-
-#include <stifinternal/UIStoreIf.h>
-#include <stifinternal/UIStore.h>
-#include <stifinternal/UIEngine.h>
-
-#include "AppUIAppUi.h"
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// CLASS DECLARATION
-// None
-class CAppUIAppUi;
-
-// DESCRIPTION
-// CUIStoreHandler is a STIF Test Framework Series60 UI class.
-// CUIStoreHandler's methods purpose is to offer handle to UI Engine.
-// Because multible inheritance in not allowed in SOS we cannot
-// inheritance CUIStore class direct so we use this class.
-
-class CUIStoreHandler
- :public CUIStoreIf
- {
- public: // Enumerations
-
- private: // Enumerations
-
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- * @param aAppUIAppUI Pointer to application ui.
- * @return Pointer to UIStoreHandler.
- */
- static CUIStoreHandler* NewL( CAppUIAppUi* aAppUIAppUI );
-
- /**
- * Destructor.
- */
- ~CUIStoreHandler();
-
- public: // New functions
-
- /**
- * C++ default constructor.
- * @param aAppUIAppUI Pointer to application ui.
- */
- CUIStoreHandler( CAppUIAppUi* aAppUIAppUI );
-
- /**
- * Receives output update notify from started test case.
- * Checks if that test case is currently in output view then
- * sends notification to AppUI which handles notification onward.
- * @param aTestCase
- * @param aStatus
- */
- void Update( CStartedTestCase* aTestCase, TInt aStatus );
-
- public: // Functions from base classes
-
- protected: // New functions
-
- protected: // Functions from base classes
-
- private:
-
- /**
- * By default Symbian OS constructor is private.
- */
- void ConstructL();
-
- public: // Data
-
- /**
- * Returns the AppUI of the application
- * @return Pointer to the Application UI.
- */
- CAppUIAppUi* iAppUIAppUI;
-
- /**
- * Counter for executed test cases
- */
- TInt iExecutedTestCaseCount;
-
- protected: // Data
-
- private: // Data
-
- public: // Friend classes
-
- protected: // Friend classes
-
- private: // Friend classes
-
- };
-
-#endif // UISTOREHANDLER_H
-
-// End of File
--- a/stifui/stifui/inc/View.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CView class declaration.
-*
-*/
-
-#ifndef VIEW_H
-#define VIEW_H
-
-// INCLUDES
-#include <aknview.h>
-
-//#include "UIStoreIf.h"
-#include <stifinternal/UIStoreIf.h>
-
-// CONSTANTS
-
-// FORWARD DECLARATIONS
-//class CMainMenuContainer;
-
-// CLASS DECLARATION
-
-/**
-* CMainMenuView view class.
-*
-*/
-class CView : public CAknView
- {
- public: // Constructors and destructor
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- ~CView();
-
- public: // Functions from base classes
-
- /**
- * Returns view´s id.
- * @return View id.
- */
- virtual TUid Id() const;
-
- /**
- * Handles a command.
- * @param aCommand A command ID.
- */
- virtual void HandleCommandL( TInt aCommand );
-
- /**
- * Handles client rect changes.
- */
- virtual void HandleClientRectChange();
-
- private:
-
- /**
- * Initializes view when activated.
- * @param aPrevViewId Id of the previous view (not used).
- * @param aCustomMessageId Custom message id (not used).
- * @param aCustomMessage Custom message (not used).
- */
- virtual void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * Deactivates view.
- */
- virtual void DoDeactivate();
-
- protected: // Data
-
- /**
- * Pointer to UI Store.
- */
- CUIStore* iUIStore;
-
-
- private: // Data
-
- };
-
-#endif // VIEW_H
-
-// End of File
--- a/stifui/stifui/inc/version.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains STIF UI version declaration.
-*
-*/
-
-#ifndef VERSION_H_
-#define VERSION_H_
-
-#define STIFUI_MAJOR_VERSION 7
-#define STIFUI_MINOR_VERSION 3
-#define STIFUI_BUILD_VERSION 29
-
-#define STIFUI_REL_DATE "23th Mar 2010"
-
-#define TO_UNICODE(text) _L(text)
-
-#endif /*VERSION_H_*/
--- a/stifui/stifui/src/AppUIApp.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CAppUIApp class definition.
-*
-*/
-
-// INCLUDE FILES
-#include "AppUIApp.h"
-#include "AppUIDocument.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CSTIFAppUIApp::AppDllUid()
-// Returns application UID
-// ---------------------------------------------------------
-//
-TUid CAppUIApp::AppDllUid() const
- {
- return KUidAppUI;
- }
-
-
-// ---------------------------------------------------------
-// CSTIFAppUIApp::CreateDocumentL()
-// Creates CSTIFAppUIDocument object
-// ---------------------------------------------------------
-//
-CApaDocument* CAppUIApp::CreateDocumentL()
- {
- return CAppUIDocument::NewL( *this );
- }
-
-// ================= OTHER EXPORTED FUNCTIONS ==============
-//
-
- #include <eikstart.h>
- // ---------------------------------------------------------
- // NewApplication()
- // Exported function
- // Returns: CApaApplication:
- // ---------------------------------------------------------
- //
- LOCAL_C CApaApplication* NewApplication()
- {
- return new CAppUIApp;
- }
- // ---------------------------------------------------------
- // E32Main()
- // EXE Entry point
- // Returns: KErrNone: No error
- // ---------------------------------------------------------
- //
- GLDEF_C TInt E32Main()
- {
- return EikStart::RunApplication(NewApplication);
- }
-
-
-// End of File
--- a/stifui/stifui/src/AppUIAppUi.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,698 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains TMessageBoxUtil class definition.
-*
-*/
-
-// INCLUDE FILES
-#include "AppUIAppUi.h"
-
-#include "MainMenuView.h"
-#include "TestCaseMenuView.h"
-#include "StartCasesView.h"
-#include "TestModulesMenuView.h"
-#include "StartedCasesMenuView.h"
-#include "ShowStartedCasesView.h"
-#include "TestCaseOutputView.h"
-#include "StatisticsView.h"
-#include "TestSetBaseMenuView.h"
-#include "TestSetMenuView.h"
-#include "TestSetInsertMenuView.h"
-#include "TestSetStartedCasesView.h"
-#include <aknmessagequerydialog.h>
-#include "version.h"
-
-#include "CreatedTestSetMenuView.h"
-
-#include <Stifui.rsg>
-#include "Stifui.hrh"
-
-
-#include <StifTestInterface.h>
-
-#include <aknnotewrappers.h>
-#include <StringLoader.h>
-
-_LIT( KTestSet, "DefaultSet" );
-
-static const TInt KCopyrightChar = 169;
-
-// ----------------------------------------------------------
-// CMessageBoxUtil::ShowNotImplementedYetL
-// Displays message that executed funtion is not implemented yet.
-// ----------------------------------------------------------
-//
-void TMessageBoxUtil::ShowNotImplementedYetL()
- {
- _LIT(message, "Not implemented yet");
- CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
- informationNote->ExecuteLD(message);
- }
-
-// ----------------------------------------------------------
-// Display error note.
-// @param aMessage Error message to display.
-// ----------------------------------------------------------
-//
-void TMessageBoxUtil::ShowErrorNoteL( const TDesC& aMessage )
- {
- CAknErrorNote* errorNote = new (ELeave) CAknErrorNote(ETrue);
- // set timeout to 5 sec
- errorNote->SetTimeout( (CAknNoteDialog::TTimeout)5000000 );
- errorNote->ExecuteLD( aMessage );
- }
-
-// ================= MEMBER FUNCTIONS =======================
-//
-// ----------------------------------------------------------
-// CAppUIAppUi::ConstructL()
-// ?implementation_description
-// ----------------------------------------------------------
-//
-void CAppUIAppUi::ConstructL()
- {
- TInt error(0);
-
- BaseConstructL( EAknEnableSkin );
-
- // connection to setting server needs to be open as long as STIF Series 60 UI APP is alive
- TInt ret = iSettingServer.Connect();
- if ( ret != KErrNone )
- {
- User::Leave( ret );
- }
-
- iLogger = CStifLogger::NewL( _L("E\x3a\\"), _L("stif_tfw_ui"),
- CStifLogger::ETxt, CStifLogger::EFile,
- ETrue, EFalse, ETrue, EFalse, EFalse );
-
- iLogger->Log( _L("--- UI log starts ---") );
- iLogger->Log( _L(" ") );
- iLogger->Log( _L("appui: ConstructL") );
-
- // Create CData object which handles all test cases data and running of them
- iUIStoreHandler = CUIStoreHandler::NewL( this );
-
- // CUIStore open
- error = UIStoreHandler()->Open( KDefaultPathAndIni );
- if ( KErrNone != error )
- {
- User::Leave( error );
- }
-
- CMainMenuView* mainMenuView = new (ELeave) CMainMenuView;
- CleanupStack::PushL( mainMenuView );
- mainMenuView->ConstructL();
- AddViewL( mainMenuView ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop(); // MainMenuView
-
- iLogger->Log(_L("appui:mainview "));
-
- CCreatedTestSetMenuView* testCreatedTestSetMenuView = new (ELeave) CCreatedTestSetMenuView;
- CleanupStack::PushL( testCreatedTestSetMenuView );
- testCreatedTestSetMenuView->ConstructL();
- AddViewL( testCreatedTestSetMenuView ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop(); // testCaseMenuView
- CTestCaseMenuView* testCaseMenuView = new (ELeave) CTestCaseMenuView;
- CleanupStack::PushL( testCaseMenuView );
- testCaseMenuView->ConstructL();
- AddViewL( testCaseMenuView ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop(); // testCaseMenuView
-
- iLogger->Log(_L("appui:caseview "));
-
- CStartCasesView* startCasesView = new (ELeave) CStartCasesView;
- CleanupStack::PushL( startCasesView );
- startCasesView->ConstructL();
- AddViewL( startCasesView ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop(); // startCasesView
-
- iLogger->Log(_L("appui:startcaseview "));
-
- CStartedCasesMenuView* startedCasesMenuView = new (ELeave) CStartedCasesMenuView;
- CleanupStack::PushL( startedCasesMenuView );
- startedCasesMenuView->ConstructL();
- AddViewL( startedCasesMenuView ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop(); // startedCasesMenuView
-
- iLogger->Log(_L("appui:started cases view created"));
-
- CShowStartedCasesView* showStartedCasesView = new (ELeave) CShowStartedCasesView;
- CleanupStack::PushL( showStartedCasesView );
- showStartedCasesView->ConstructL();
- AddViewL( showStartedCasesView ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop(); // showStartedCasesView
-
- iLogger->Log(_L("appui: show started cases view created"));
-
- CTestCaseOutputView* testCaseOutputView = new (ELeave) CTestCaseOutputView;
- CleanupStack::PushL( testCaseOutputView );
- testCaseOutputView->ConstructL();
- AddViewL( testCaseOutputView ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop(); // testCaseOutputView
-
- iLogger->Log(_L("appui: test case output view created"));
-
- CTestModulesMenuView* testModulesMenuView = new (ELeave) CTestModulesMenuView;
- CleanupStack::PushL( testModulesMenuView );
- testModulesMenuView->ConstructL();
- AddViewL( testModulesMenuView ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop(); // testModulesMenuView
-
- iLogger->Log(_L("appui:modulesview "));
-
- CStatisticsView* statisticsMenuView = new (ELeave) CStatisticsView;
- CleanupStack::PushL( statisticsMenuView );
- statisticsMenuView->ConstructL();
- AddViewL( statisticsMenuView ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop(); // statisticsMenuView
-
- iLogger->Log(_L("appui:modulesview "));
-
- //
- CTestSetBaseMenuView* testSetBaseMenuView = new (ELeave) CTestSetBaseMenuView;
- CleanupStack::PushL( testSetBaseMenuView );
- testSetBaseMenuView->ConstructL();
- AddViewL( testSetBaseMenuView ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop(); // testSetBaseMenuView
-
- iLogger->Log(_L("appui:testsetsbaseview "));
-
- CTestSetMenuView* testSetMenuView = new (ELeave) CTestSetMenuView;
- CleanupStack::PushL( testSetMenuView );
- testSetMenuView->ConstructL();
- AddViewL( testSetMenuView ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop(); // testSetMenuView
-
- iLogger->Log(_L("appui:testsetsview "));
-
- CTestSetInsertMenuView* testSetInsertMenuView = new (ELeave) CTestSetInsertMenuView;
- CleanupStack::PushL( testSetInsertMenuView );
- testSetInsertMenuView->ConstructL();
- AddViewL( testSetInsertMenuView ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop(); // testSetInsertMenuView
-
- iLogger->Log(_L("appui:testsetinsertview "));
-
- CTestSetStartedCasesView* testSetStartedCasesView = new (ELeave) CTestSetStartedCasesView;
- CleanupStack::PushL( testSetStartedCasesView );
- testSetStartedCasesView->ConstructL();
- AddViewL( testSetStartedCasesView ); // transfer ownership to CAknViewAppUi
- CleanupStack::Pop(); // testSetStartedCasesView
-
- iLogger->Log(_L("appui:testsetStartedCasesView "));
-
-
- SetDefaultViewL( *mainMenuView );
-
- iLogger->Log(_L("appui:setdefview "));
-
- iStartedTestCase = NULL;
- iStartedTestSet = -1;
-
- iPreviousPositionListValid = ETrue;
- }
-
-// ----------------------------------------------------
-// CAppUIAppUi::~CAppUIAppUi()
-// Destructor
-// Frees reserved resources
-// ----------------------------------------------------
-//
-CAppUIAppUi::~CAppUIAppUi()
- {
-
- if ( iLogger )
- {
- iLogger->Log( _L(" ") );
- iLogger->Log( _L("--- UI log ends ---") );
- }
-
- delete iLogger;
- iSettingServer.Close();
- UIStoreHandler()->Close();
- delete iUIStoreHandler;
-
- // Closing of array of positions of focus in various menus
- iPreviousFocusPosition.Close();
- // iPreviousFocusPosition is no longer valid and cannot be used any more
- iPreviousPositionListValid = EFalse;
- //RemoveView(EMainMenuViewId);
- }
-
-// ------------------------------------------------------------------------------
-// CAppUIAppUi::Data( )
-// Just returns pointer to CUIStore object, which is created by CAppUIAppUi
-// ------------------------------------------------------------------------------
-//
-CUIStore* CAppUIAppUi::UIStoreHandler()
- {
- return &iUIStoreHandler->UIStore();
-
- }
-
-// ------------------------------------------------------------------------------
-// CAppUIAppUi::::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
-// This function is called by the EIKON framework just before it displays
-// a menu pane. Its default implementation is empty, and by overriding it,
-// the application can set the state of menu items dynamically according
-// to the state of application data.
-// ------------------------------------------------------------------------------
-//
-void CAppUIAppUi::DynInitMenuPaneL(
- TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
- {
-
- }
-
-// ----------------------------------------------------
-// CAppUIAppUi::HandleKeyEventL(
-// const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
-// ?implementation_description
-// ----------------------------------------------------
-//
-TKeyResponse CAppUIAppUi::HandleKeyEventL(
- const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
- {
- TInt currentView;
-
- if ( iView )
- {
- currentView = (iView->Id()).iUid;
-
-
- switch ( aKeyEvent.iCode )
- {
- case EKeyLeftArrow:
- {
- switch ( currentView )
- {
- case ETestModulesMenuViewId:
- {
- HandleCommandL( EAppUIGoToTestCaseMenu );
- break;
- }
- case ETestSetBaseMenuViewId:
- {
- HandleCommandL( EAppUIGoToModulesMenu );
- ActivateLocalViewL(TUid::Uid(ETestModulesMenuViewId));
- break;
- }
- }
- break;
- }
- case EKeyRightArrow:
- {
- switch ( currentView )
- {
- case ETestCaseMenuViewId:
- {
- HandleCommandL( EAppUIGoToModulesMenu ); // TestCaseMenu --> TestModuleMenu
- ActivateLocalViewL(TUid::Uid(ETestModulesMenuViewId));
- break;
- }
- case ETestModulesMenuViewId:
- {
- HandleCommandL( EAppUIGoToTestSetsMenu );
- ActivateLocalViewL(TUid::Uid(ETestSetBaseMenuViewId));
- break;
- }
- case ETestSetsMenuViewId:
- {
- break;
- }
-
- }
- break;
- }
-
- default:
- {
- return EKeyWasNotConsumed;
- //break;
- }
- }
- }
-
- return EKeyWasConsumed;
-
- }
-
-// ----------------------------------------------------
-// CAppUIAppUi::HandleCommandL(TInt aCommand)
-// ?implementation_description
-// ----------------------------------------------------
-//
-void CAppUIAppUi::HandleCommandL(TInt aCommand)
- {
- TInt currentView, newView;
- TInt error(0);
-
- currentView = (iView->Id()).iUid;
-
- switch ( aCommand )
- {
- case EEikCmdExit:
- case EAknSoftkeyExit:
- {
- PrepareToExit();
- Exit();
- newView = currentView;
- break;
- }
- case EAppUIGoBack:
- {
- switch ( currentView )
- {
- case ETestCaseMenuViewId:
- {
- newView = EMainMenuViewId; // Test Cases Menu --> Main Menu
- break;
- }
- case EStartCaseMenuViewId:
- {
- newView = ETestCaseMenuViewId; // Start Cases Menu --> Test Cases Menu
- //iTabGroup->SetActiveTabByIndex(0);
- break;
- }
- case ETestModulesMenuViewId:
- {
- newView = EMainMenuViewId; // Test Modules Menu --> Main Menu
- break;
- }
- case EStartedCasesMenuViewId:
- {
- newView = ETestCaseMenuViewId; // Started Cases Menu --> Test Case Menu
- break;
- }
- case EShowStartedCasesViewId:
- {
- newView = EStartedCasesMenuViewId; // Show started cases --> Started Cases Menu
- break;
- }
- case ETestCaseOutputViewId:
- {
- newView = iPreviousView; // Test case output view --> previous view
- break;
- }
- case EStatisticsViewId:
- {
- newView = EStartedCasesMenuViewId; // Statistic view --> Started Cases Menu
- break;
- }
- case ETestSetBaseMenuViewId:
- {
- newView = EMainMenuViewId; // Test Sets Base Menu --> Main Menu
- break;
- }
- case ETestSetMenuViewId:
- {
- newView = ETestSetBaseMenuViewId; // Test Sets Menu --> Test Sets Base Menu
- break;
- }
- case ETestSetInsertMenuViewId:
- {
- newView = ETestSetMenuViewId; // Test Set Insert Menu --> Test Sets Menu
- break;
- }
- case ETestSetStartedCasesViewId:
- {
- newView = ETestSetMenuViewId; // Test Set Started Cases Menu --> Test Sets Menu
- break;
- }
- default:
- {
- newView = currentView; // Back does not work. This should not happen ever
- break;
- }
- }
- break;
- }
- case EAppUIGoToMainMenu:
- {
- newView = EMainMenuViewId;
- break;
- }
- case EAppUIGoToTestCaseMenu:
- {
- newView = ETestCaseMenuViewId;
- break;
- }
- case ECmdGoToStartCasesView:
- {
- newView = EStartCaseMenuViewId;
- break;
- }
- case ECmdGoToStartedCasesView:
- {
- newView = EStartedCasesMenuViewId;
- break;
- }
- case EAppUIGoToModulesMenu:
- {
- newView = ETestModulesMenuViewId;
- //iTabGroup->SetActiveTabByIndex(1);
- break;
- }
- case EAppUIGoToTestSetsMenu:
- {
- newView = ETestSetBaseMenuViewId;
-
- //ShowNotImplementedYet();
- //newView = currentView;
- break;
- }
- case ECmdCreateTestSet:
- {
- CTestSetMenuView* testSetMenu = (CTestSetMenuView*)View( TUid::Uid(ETestSetMenuViewId) );
- error = testSetMenu->CreateTestSetL( KTestSet );
- if ( KErrNone == error || KErrAlreadyExists == error)
- {
- newView = ETestSetInsertMenuViewId;
- currentView = ETestSetMenuViewId; // Store previous view for Back function
- }
- else
- {
- newView = ETestSetMenuViewId;
- }
- break;
- }
- case ECmdLoadTestSet:
- {
- newView = ECreatedTestSetMenuViewId; /*ETestSetBaseMenuViewId;*/
- break;
- }
- case ECmdGoToTestSetView:
- {
-
- newView = ETestSetMenuViewId;
- break;
- }
- case ECmdInsertTestCases:
- {
- newView = ETestSetInsertMenuViewId;
- break;
- }
- case ECmdShowStartedTestSet:
- {
- newView = ETestSetStartedCasesViewId;
- iShowStartedCasesMode = EShowAllStartedCases;
- break;
- }
- case ECmdShowAllStartedCases:
- newView = EShowStartedCasesViewId;
- iShowStartedCasesMode = EShowAllStartedCases;
- break;
- case ECmdShowOngoingCases:
- newView = EShowStartedCasesViewId;
- iShowStartedCasesMode = EShowOngoingCases;
- break;
- case ECmdShowPassedCases:
- newView = EShowStartedCasesViewId;
- iShowStartedCasesMode = EShowPassedCases;
- break;
- case ECmdShowPausedCases:
- newView = EShowStartedCasesViewId;
- iShowStartedCasesMode = EShowPausedCases;
- break;
- case ECmdShowFailedCases:
- newView = EShowStartedCasesViewId;
- iShowStartedCasesMode = EShowFailedCases;
- break;
- case ECmdShowCrashedAbortedCases:
- newView = EShowStartedCasesViewId;
- iShowStartedCasesMode = EShowCrashedAbortedCases;
- break;
- case ECmdShowStatistics:
- newView = EStatisticsViewId;
- break;
- case ECmdViewOutput:
- newView = ETestCaseOutputViewId;
- break;
- case ECmdShowAbout:
- {
- CAknMessageQueryDialog* dlg = new (ELeave) CAknMessageQueryDialog;
- TBuf<200> version;
- version.Format(_L("STIF UI - Version %d.%d.%d - "), STIFUI_MAJOR_VERSION, STIFUI_MINOR_VERSION, STIFUI_BUILD_VERSION);
- version.Append(TO_UNICODE(STIFUI_REL_DATE));
- version.Append(_L("\n"));
-
- TInt stifMajorV;
- TInt stifMinorV;
- TInt stifBuildV;
- TBuf<30> relDate;
- TStifUtil::STIFVersion(stifMajorV, stifMinorV, stifBuildV, relDate);
-
- TBuf<40> stifVersion;
- stifVersion.Format(_L("STIF - Version %d.%d.%d - "), stifMajorV, stifMinorV, stifBuildV);
- stifVersion.Append(relDate);
- stifVersion.Append(_L("\n"));
-
- version.Append(stifVersion);
-
- version.Append(_L("Copyright "));
- version.Append( KCopyrightChar );
- version.Append(_L(" 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved."));
-
- dlg->SetMessageText(version);
- dlg->ExecuteLD(R_STIFUI_ABOUT_DIALOG);
- newView = currentView;
- break;
- }
- default:
- {
- TMessageBoxUtil::ShowNotImplementedYetL();
- newView = currentView;
- break;
- }
- }
-
- if( newView != currentView )
- {
- iPreviousView = currentView; // Store previous view for Back function
- ActivateLocalViewL( TUid::Uid(newView) );
-
- /*switch ( newView )
- {
- case EMainMenuViewId:
- case EStartedCasesMenuViewId:
- case EStartCaseMenuViewId:
- case ETestCaseOutputViewId:
- {
- //StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL);
- //iTabGroup->DimTab (ETestCaseMenuTab, ETrue);
- //iTabGroup->DimTab (ETestModulesMenuTab, ETrue);
- //iTabGroup->DimTab (ETestSetsMenuTab, ETrue);
-
- //StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_EMPTY);
- //StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_IDLE);
- break;
- }
- case ETestCaseMenuViewId:
- case ETestModulesMenuViewId:
- case ETestSetsMenuViewId:
- {
- //StatusPane()->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_USUAL);
- //iTabGroup->DimTab (ETestCaseMenuTab, EFalse);
- //iTabGroup->DimTab (ETestModulesMenuTab, EFalse);
- //iTabGroup->DimTab (ETestSetsMenuTab, EFalse);
- break;
- }
- default:
- {
- break;
- }
- }*/
- }
-
- }
-
-/**
-* Receives output update notification from UI Storehandler
-* @param
-* @return
-*/
-void CAppUIAppUi::OutputUpdateL( CStartedTestCase* aTestCase, TInt /* aStatus */ )
- {
- if( iView->Id().iUid == ETestCaseOutputViewId )
- {
- ( ( CTestCaseOutputView* )iView )->OutputUpdateL( aTestCase );
- }
- else if( iView->Id().iUid == EShowStartedCasesViewId )
- {
- ( ( CShowStartedCasesView* )iView )->TestCaseStateChangedL();
- }
- else if( iView->Id().iUid == ETestCaseOutputViewId )
- {
- ( ( CTestCaseOutputView* )iView )->TestCaseStateChangedL();
- }
- }
-
-/**
-* Sets index of selected test case for viewing test case output
-* @param
-* @return
-*/
-void CAppUIAppUi::SetStartedTestCase( CStartedTestCase* aStartedTestCase )
- {
- iStartedTestCase = aStartedTestCase;
- }
-
-/**
-* Returns index of selected test case for viewing test case output
-* @param
-* @return
-*/
-CStartedTestCase* CAppUIAppUi::GetStartedTestCase( )
- {
- return iStartedTestCase;
- }
-
-/**
- * Stores focus position of focus from a specyfic view to iPreviousFocusPosition object.
- * Value is than used to retrieve previous position of focus in the menu
- * @param aViewId - identification of view
- * @param aPosition - value to store for a specyfic view
- */
-void CAppUIAppUi::SaveFocusPosition(TAppUIViewNumber aViewId, TInt aPosition)
- {
- if(!iPreviousPositionListValid)
- {
- return;
- }
- for(TInt counter = iPreviousFocusPosition.Count(); counter <= aViewId; counter++)
- {
- iPreviousFocusPosition.Append(0);
- }
- iPreviousFocusPosition[aViewId] = aPosition;
- }
-
-/**
- * Restores focus position of focus for a specyfic view from iPreviousFocusPosition object.
- * @param aViewId - identification of view
- * @return - previous position of focus in the requested view
- */
-TInt CAppUIAppUi::GetFocusPosition(TAppUIViewNumber aViewId)
- {
- if(iPreviousFocusPosition.Count() > aViewId)
- {
- return iPreviousFocusPosition[aViewId];
- }
- else
- {
- return KErrNotFound;
- }
- }
-
-// End of File
--- a/stifui/stifui/src/AppUIDocument.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CAppUIDocument class definition.
-*
-*/
-
-// INCLUDE FILES
-#include "AppUIDocument.h"
-#include "AppUIAppUi.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// constructor
-CAppUIDocument::CAppUIDocument(CEikApplication& aApp)
-: CAknDocument(aApp)
- {
- }
-
-// destructor
-CAppUIDocument::~CAppUIDocument()
- {
- }
-
-// Symbian OS default constructor can leave.
-void CAppUIDocument::ConstructL()
- {
- }
-
-// Two-phased constructor.
-CAppUIDocument* CAppUIDocument::NewL(
- CEikApplication& aApp) // CAppUIApp reference
- {
- CAppUIDocument* self = new (ELeave) CAppUIDocument( aApp );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop();
-
- return self;
- }
-
-// ----------------------------------------------------
-// CAppUIDocument::CreateAppUiL()
-// constructs CAppUIAppUi
-// ----------------------------------------------------
-//
-CEikAppUi* CAppUIDocument::CreateAppUiL()
- {
- return new (ELeave) CAppUIAppUi;
- }
-
-// End of File
--- a/stifui/stifui/src/Container.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,410 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestCaseListBoxModel class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <aknlists.h> // ListBox
-#include <AknIconArray.h> // CAknIconArray
-#include <aknnotewrappers.h>
-
-#include <eikclbd.h> // CColumnListBoxData
-
-#include "Container.h"
-#include <Stifui.rsg>
-#include "Stifui.hrh"
-#include "AppUIAppUi.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CTestCaseListBoxModel::NewL
-//
-// Two-phased constructor.
-// ----------------------------------------------------------------------------
-//
-
-CTestCaseListBoxModel* CTestCaseListBoxModel::NewL(RPointerArray<CTestInfo>* aTestCasesInView)
- {
- CTestCaseListBoxModel* self = new ( ELeave ) CTestCaseListBoxModel();
- CleanupStack::PushL( self );
- self->iBuffer = HBufC::NewL( 130 );
- self->iTestCasesInView = aTestCasesInView;
- CleanupStack::Pop();
- return self;
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseListBoxModel::ConstructL
-//
-// Symbian OS two phased constructor.
-// ----------------------------------------------------------------------------
-//
-
-void CTestCaseListBoxModel::ConstructL()
- {
- //iBuffer = HBufC::NewLC( KMaxInfoName + KMaxName + 2 );
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseListBoxModel::~CTestCaseListBoxModel
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestCaseListBoxModel::~CTestCaseListBoxModel()
- {
- delete iBuffer;
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseListBoxModel::MdcaCount
-//
-// Returns the number of descriptor elements in the array.
-// ----------------------------------------------------------------------------
-//
-
-TInt CTestCaseListBoxModel::MdcaCount() const
- {
- return iTestCasesInView->Count();
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseListBoxModel::MdcaPoint
-//
-// Indexes into a descriptor array.
-// ----------------------------------------------------------------------------
-//
-TPtrC CTestCaseListBoxModel::MdcaPoint(TInt aIndex) const
- {
- CTestInfo* testCasePtr = (*iTestCasesInView)[aIndex];
- TPtr buffer( iBuffer->Des() );
- buffer.Zero();
- buffer.Append(_L("\t"));
- buffer.Append(testCasePtr->TestCaseTitle() );
- return *iBuffer;
- }
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CContainer::ConstructL
-//
-// Symbian OS two phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CContainer::ConstructL()
- {
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::~CContainer
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CContainer::~CContainer()
- {
- iTestCasesInView.Close(); // does not delete objects whose pointers are contained in the array
- delete iListBox;
- }
-
-
-// ----------------------------------------------------------------------------
-// CContainer::SetGraphicIconL
-//
-// Sets graphic icon using listbox as CEikColumnListBox.
-// ----------------------------------------------------------------------------
-//
-void CContainer::SetGraphicIconL( CEikColumnListBox* aListBox )
- {
- if ( aListBox )
- {
- // Creates gul icon.
- CAknIconArray* iconArray = new(ELeave) CAknIconArray(1);
- CleanupStack::PushL( iconArray );
-
- GraphicIconL( iconArray ); // Appends graphic data.
-
- // Sets graphics as ListBox icon.
- aListBox->ItemDrawer()->ColumnData()->SetIconArray( iconArray );
-
- CleanupStack::Pop();
- }
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::CurrentItemIndex
-//
-// Returns current item index in list box.
-// ----------------------------------------------------------------------------
-//
-TInt CContainer::CurrentItemIndex()
- {
- return iListBox->CurrentItemIndex();
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::SetCurrentItemIndex
-//
-// Sets current item index in list box.
-// ----------------------------------------------------------------------------
-//
-void CContainer::SetCurrentItemIndex(TInt aCurrentTestCase)
- {
- iListBox->SetCurrentItemIndexAndDraw(aCurrentTestCase);
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::GraphicIconL
-//
-// Appends graphics data.
-// ----------------------------------------------------------------------------
-//
-void CContainer::GraphicIconL( CArrayPtr<CGulIcon>* aIcons )
- {
- if ( aIcons )
- {
- CFbsBitmap* markBitmap = NULL;
- CFbsBitmap* markBitmapMask = NULL;
-
- TRgb defaultColor;
- defaultColor = CEikonEnv::Static()->Color(EColorControlText);
-
- AknsUtils::CreateColorIconL(AknsUtils::SkinInstance(),
- KAknsIIDQgnIndiMarkedAdd,
- KAknsIIDQsnIconColors,
- EAknsCIQsnIconColorsCG13,
- markBitmap,
- markBitmapMask,
- AknIconUtils::AvkonIconFileName(),
- EMbmAvkonQgn_indi_marked_add,
- EMbmAvkonQgn_indi_marked_add_mask,
- defaultColor );
-
- CGulIcon* markIcon = CGulIcon::NewL(markBitmap,markBitmapMask);
- aIcons->AppendL(markIcon);
- }
- }
-
-
-// ----------------------------------------------------------------------------
-// CContainer::SizeChanged
-//
-// Called by framework when the view size is changed.
-// ----------------------------------------------------------------------------
-//
-void CContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
- }
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::CountComponentControls
-//
-// Gets a count of the component controls of this list box control.
-// ----------------------------------------------------------------------------
-//
-TInt CContainer::CountComponentControls() const
- {
- return 1; // return nbr of controls inside this container
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::ComponentControl
-//
-// Gets a pointer to the specified component control.
-// ----------------------------------------------------------------------------
-//
-CCoeControl* CContainer::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::Draw
-//
-// Draw a control, called by window server.
-// ----------------------------------------------------------------------------
-//
-void CContainer::Draw(const TRect& /*aRect*/) const
- {
- // CWindowGc& gc = SystemGc();
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::SelectedTestCases
-//
-// Returns pointers to selected test cases.
-// ----------------------------------------------------------------------------
-//
-void CContainer::SelectedTestCases
- (RPointerArray<CTestInfo>& aSelectedTestCases)
- {
- aSelectedTestCases.Append( iTestCasesInView[iListBox->CurrentItemIndex()] );
- }
-
-
-// ----------------------------------------------------------------------------
-// CContainer::HandleMarkCommandL
-//
-// Handles mark commands.
-// ----------------------------------------------------------------------------
-//
-void CContainer::HandleMarkCommandL( TInt aCommand )
- {
- if (iListBox)
- {
- AknSelectionService::HandleMarkableListProcessCommandL( aCommand, iListBox );
- }
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::ProcessCommandL
-//
-// Processes user commands.
-// ----------------------------------------------------------------------------
-//
-void CContainer::ProcessCommandL( TInt aCommand )
- {
- AknSelectionService::HandleMarkableListProcessCommandL( aCommand, iListBox );
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::SelectionListProcessCommandL
-//
-// Processes user commands.
-// ----------------------------------------------------------------------------
-//
-void CContainer::SelectionListProcessCommandL( TInt aCommand )
- {
- AknSelectionService::HandleSelectionListProcessCommandL( aCommand, iListBox );
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::FilterCasesByModuleL
-//
-// Show only testcases which are defined is specified module.
-// ----------------------------------------------------------------------------
-//
-void CContainer::FilterCasesByModuleL( TName aModuleName )
- {
- iTestCasesInView.Reset(); // Clear testCasesInView pointer array
-
- RRefArray<CTestInfo> allCases;
- TInt ret = iUIStore->TestCases( allCases );
- if( KErrNone != ret )
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("FilterCasesByModuleL(): iUIStore->TestCases() fails"));
- allCases.Reset();
- allCases.Close();
- User::Leave( ret );
- }
- const TInt KTestCaseCount = allCases.Count();
- for( TInt i=0; i < KTestCaseCount; i++ )
- {
- if ( allCases[i].ModuleName() == aModuleName )
- {
- iTestCasesInView.Append( &( allCases[i] ) );
- }
- }
- allCases.Reset();
- allCases.Close();
-
- iListBox->Reset();
- iListBox->DrawNow();
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::FilterCasesByTCFileNameL
-//
-// Show only testcases which are defined is specified test case file.
-// ----------------------------------------------------------------------------
-//
-void CContainer::FilterCasesByTCFileNameL(
- TFileName aTestCaseFileName )
- {
-
- iTestCasesInView.Reset(); // Clear testCasesInView pointer array
-
- RRefArray<CTestInfo> allCases;
- TInt ret = iUIStore->TestCases( allCases );
- if( KErrNone != ret )
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("FilterCasesByModuleL(): iUIStore->TestCases() fails"));
- allCases.Reset();
- allCases.Close();
- User::Leave( ret );
- }
- const TInt KTestCaseCount = allCases.Count();
- for( TInt i=0; i < KTestCaseCount; i++ )
- {
- if ( allCases[i].TestCaseFile() == aTestCaseFileName )
- {
- iTestCasesInView.Append( &( allCases[i] ) );
- }
- }
-
- allCases.Reset();
- allCases.Close();
-
- iListBox->Reset();
- iListBox->DrawNow();
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::NoFilteringL
-//
-// Remove possible filtering of test cases -> show all test cases.
-// ----------------------------------------------------------------------------
-//
-void CContainer::NoFilteringL()
- {
- iTestCasesInView.Reset(); // Clear testCasesInView pointer array
-
- RRefArray<CTestInfo> allCases;
- TInt ret = iUIStore->TestCases( allCases );
- if( KErrNone != ret )
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("FilterCasesByModuleL(): iUIStore->TestCases() fails"));
- allCases.Reset();
- allCases.Close();
- User::Leave( ret );
- }
- const TInt KTestCaseCount = allCases.Count();
-
- // Add all cases to iTestCasesInView pointer array
- for( TInt i=0; i < KTestCaseCount; i++ )
- {
- iTestCasesInView.Append( &( allCases[i] ) );
- }
-
- allCases.Reset();
- allCases.Close();
-
- iListBox->Reset();
- iListBox->DrawNow();
- }
-
-// End of File
--- a/stifui/stifui/src/CreatedTestSetMenuContainer.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This fiole contains CreatedTestSetMenuContainer class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <aknlists.h> // ListBox
-#include <AknIconArray.h> // CAknIconArray
-#include <aknnotewrappers.h>
-
-#include <eikclbd.h> // CColumnListBoxData
-
-#include "CreatedTestSetMenuContainer.h"
-#include "StartCasesView.h"
-#include <Stifui.rsg>
-#include "Stifui.hrh"
-#include "AppUIAppUi.h"
-
-#include "Container.h"
-#include "MenuListBox.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CreatedTestSetMenuContainer::ConstructL
-//
-// Symbian OS two phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CCreatedTestSetMenuContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("CCreatedTestSetMenuContainer: ConstructL"));
-
- iParentView = (CCreatedTestSetMenuView*)aListBoxObserver;
- CreateWindowL();
-
- iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
-
- iTestCasesInView.Reset();
-
- iListBox = CMenuListBox::NewL(ECreatedTestSetMenuViewId);
- iListBox->SetContainerWindowL( *this );
- iListBox->SetListBoxObserver( aListBoxObserver /*this*/ ); //
- iListBox->ConstructL(this, EAknListBoxMarkableList /*EAknListBoxSelectionList*/);
-
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("CCreatedTestSetMenuContainer: ListBox constructed"));
-
- //Create Scroller control for ListBox and set its visibility
- iListBox->CreateScrollBarFrameL(ETrue);
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
- iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
-
- if ( iUIStore )
- {
- CDesCArray* items = static_cast<CDesCArray*> (iListBox->Model()->ItemTextArray());
-
- //Create list of available Test Set
- RRefArray<TDesC> allSet;
- RRefArray<CTestInfo> allCases;
- TInt ret = iUIStore->GetTestSetsList( allSet );
- if( KErrNone != ret )
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("iUIStore->GetTestSetsList() fails"));
- allSet.Reset();
- allSet.Close();
- User::Leave( ret );
- }
-
- const TInt KTestCaseCount = allSet.Count();
- for (TInt i=0; i <KTestCaseCount; i++)
- {
- _LIT(KItemFromat, "0\t%S\t\t");
-
- RBuf tmp;
- tmp.Create(allSet[i].Length() + 6);
- tmp.Format( KItemFromat, &allSet[i] );
- items->AppendL( tmp );
- tmp.Close();
- }
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("CCreatedTestSetMenuContainer: ListBox model"));
- iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
- iListBox->HandleItemAdditionL();
-
- allSet.Reset();
- allSet.Close();
- }
- else
- {
- User::Leave( KErrGeneral );
- }
-
- // Creates graphic.
- SetGraphicIconL( iListBox );
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("CCreatedTestSetMenuContainer: icons created"));
-
- iListBox->ActivateL();
- ((CMenuListBox*)iListBox)->SetPreviousFocus();
-
- SetRect(aRect);
- ActivateL();
- }
-
-// ----------------------------------------------------------------------------
-//CreatedTestSetMenuContainer::~CStartCasesContainer
-//
-// Destructor
-// ----------------------------------------------------------------------------
-//
-CCreatedTestSetMenuContainer::~CCreatedTestSetMenuContainer()
- {
- }
-
-// ----------------------------------------------------------------------------
-// CreatedTestSetMenuContainer::SizeChanged
-//
-// Called by framework when the view size is changed.
-// ----------------------------------------------------------------------------
-//
-void CCreatedTestSetMenuContainer::SizeChanged()
- {
-
- if ( iListBox )
- {
- iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
- }
- }
-
-// ----------------------------------------------------------------------------
-//CreatedTestSetMenuContainer::CountComponentControls
-//
-// Gets a count of the component controls of this list box control.
-// ----------------------------------------------------------------------------
-//
-TInt CCreatedTestSetMenuContainer::CountComponentControls() const
- {
- return 1; // return nbr of controls inside this container
- }
-
-// ----------------------------------------------------------------------------
-// CreatedTestSetMenuContainer::ComponentControl
-//
-// Gets a pointer to the specified component control.
-// ----------------------------------------------------------------------------
-//
-CCoeControl* CCreatedTestSetMenuContainer::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CreatedTestSetMenuContainer::Draw
-//
-// Draw a control, called by window server.
-// ----------------------------------------------------------------------------
-//
-void CCreatedTestSetMenuContainer::Draw(const TRect& /*aRect*/) const
- {
- }
-
-// ----------------------------------------------------------------------------
-// CreatedTestSetMenuContainer::OfferKeyEventL
-//
-// Handles key events.
-// ----------------------------------------------------------------------------
-//
-TKeyResponse CCreatedTestSetMenuContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType )
- {
- if (iListBox)
- {
-
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- else
- {
- return EKeyWasNotConsumed;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CreatedTestSetMenuContainer:::SaveActiveLine
-//
-// Makes the iListBox member save its focus position
-// ----------------------------------------------------------------------------
-//
-void CCreatedTestSetMenuContainer::SaveActiveLine()
- {
- ((CMenuListBox*)iListBox)->SaveFocusPosition();
- }
-
-// End of File
--- a/stifui/stifui/src/CreatedTestSetMenuView.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStartCasesView class definition.
-*
-*/
-
-// INCLUDE FILES
-#include <eikmenub.h>
-#include <aknViewAppUi.h>
-#include <aknlistquerydialog.h>
-#include <barsread.h> //TResourceReader
-#include <Stifui.rsg>
-#include "CreatedTestSetMenuView.h"
-#include "CreatedTestSetMenuContainer.h"
-#include "AppUIAppUi.h"
-#include "Stifui.hrh"
-#include "TestSetMenuView.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CStartCasesView::ConstructL
-//
-// Symbian OS two-phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CCreatedTestSetMenuView::ConstructL()
- {
- CView::ConstructL();
- BaseConstructL(R_APPUI_LOADTESTSETVIEW);
- iCurrentTestCase = 0;
-
- }
-
-// ----------------------------------------------------------------------------
-// CreatedTestSetMenuView::~CStartCasesView
-//
-// Destructor
-// ----------------------------------------------------------------------------
-//
-CCreatedTestSetMenuView::~CCreatedTestSetMenuView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CreatedTestSetMenuView::Id
-//
-// Returns view´s id.
-// ----------------------------------------------------------------------------
-//
-TUid CCreatedTestSetMenuView::Id() const
- {
- return TUid::Uid(ECreatedTestSetMenuViewId);
-
- }
-
-// ----------------------------------------------------------------------------
-// CreatedTestSetMenuView::HandleCommandL
-//
-// Handles a command.
-// ----------------------------------------------------------------------------
-//
-void CCreatedTestSetMenuView::HandleCommandL(TInt aCommand)
- {
- switch ( aCommand )
- {
- case EAknSoftkeyBack:
- {
- AppUi()->HandleCommandL(EAppUIGoToTestSetsMenu);
- break;
- }
- case EAknCmdOpen:
- {
- HandleListBoxEventL(iContainer->ListBox(), EEventEnterKeyPressed);
- break;
- }
- default:
- {
- AppUi()->HandleCommandL( aCommand );
- break;
- }
- }
-
- }
-
-// ----------------------------------------------------------------------------
-//CreatedTestSetMenuView::HandleClientRectChange
-//
-// Handles client rect changes.
-// ----------------------------------------------------------------------------
-//
-void CCreatedTestSetMenuView::HandleClientRectChange()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CreatedTestSetMenuView::DoActivateL
-//
-// Initializes view when activated.
-// ----------------------------------------------------------------------------
-//
-void CCreatedTestSetMenuView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- if (!iContainer)
- {
- ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("CreatedTestSetMenuView: DoActivateL"));
- iContainer = new (ELeave) CCreatedTestSetMenuContainer;
- iContainer->SetMopParent(this);
- iContainer->ConstructL( ClientRect(), this );
- ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("CreatedTestSetMenuView: container constructed"));
- AppUi()->AddToStackL( *this, iContainer );
- }
-
- iContainer->SetCurrentItemIndex(iCurrentTestCase);
-
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
-
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_LOADTESTSET);
- iNaviDecorator = np->CreateNavigationLabelL( reader );
- CleanupStack::PopAndDestroy(); // resource reader
- np->PushL(*iNaviDecorator);
-
- }
-
-// ----------------------------------------------------------------------------
-// CreatedTestSetMenuView::DoDeactivate
-//
-// Deactivates view.
-// ----------------------------------------------------------------------------
-//
-void CCreatedTestSetMenuView::DoDeactivate()
- {
- if ( iContainer )
- {
- iContainer->SaveActiveLine();
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-
-// ----------------------------------------------------------------------------
-// CreatedTestSetMenuView::HandleListBoxEventL
-//
-// Handles listbox events.
-// ----------------------------------------------------------------------------
-//
-void CCreatedTestSetMenuView::HandleListBoxEventL( CEikListBox* aListBox,
- TListBoxEvent aEventType )
- {
- if ( aEventType == MEikListBoxObserver::EEventEnterKeyPressed )
- {
- // Checking with item from list was selected
- CTextListBoxModel* tmp = (CTextListBoxModel*)aListBox->Model();
- TPtrC item = tmp->ItemText(aListBox->CurrentItemIndex());
- // Geting propper format of item from list (ex. 2008_8_10_13_16.set ).
- TPtrC substracted(item.Left(item.Length()-2));
- substracted.Set(substracted.Right(substracted.Length()-2));
- // Creating new view containing
- CTestSetMenuView* testSetMenu = (CTestSetMenuView*)AppUi()->View( TUid::Uid(ETestSetMenuViewId) );
- TInt error = testSetMenu->LoadTestSetL( substracted );
- AppUi()->HandleCommandL(ECmdGoToTestSetView);
-
- }
-
- }
-
-
-// End of File
--- a/stifui/stifui/src/MainMenuContainer.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,217 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CMainMenuContainer class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <aknlists.h> // ListBox
-
-#include <barsread.h> // for TResourceReader
-
-#include <aknnotewrappers.h>
-
-#include "MainMenuContainer.h"
-#include "Stifui.hrh"
-#include <Stifui.rsg>
-#include "MenuListBox.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CMainMenuContainer::ConstructL
-//
-// Symbian OS two phased constructor
-// ---------------------------------------------------------
-//
-void CMainMenuContainer::ConstructL(const TRect& aRect)
- {
- CreateWindowL();
-
- iListBox = CMenuListBox::NewL(EMainMenuViewId);
- iListBox->SetContainerWindowL( *this );
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC( reader, R_MAIN_MENU_LISTBOX );
- iListBox->SetListBoxObserver( this );
- iListBox->ConstructFromResourceL( reader );
- CleanupStack::PopAndDestroy(); // resource stuffs.
- iListBox->ActivateL(); // Sets control as ready to be drawn
-
- // retrieve previous position of focus for this view/continer and set focus to this value
- ((CMenuListBox*)iListBox)->SetPreviousFocus();
-
- SetRect(aRect);
- ActivateL();
- }
-
-
-// ---------------------------------------------------------
-// CMainMenuContainer::~CMainMenuContainer
-//
-// Destructor
-// ---------------------------------------------------------
-//
-CMainMenuContainer::~CMainMenuContainer()
- {
- if( iListBox )
- {
- delete iListBox;
- iListBox = NULL;
- }
- }
-
-// ---------------------------------------------------------
-// CMainMenuContainer::SizeChanged
-//
-// Called by framework when the view size is changed
-// ---------------------------------------------------------
-//
-void CMainMenuContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
- }
- }
-
-// ---------------------------------------------------------
-// CMainMenuContainer::CountComponentControls
-//
-// Returns number of controls indside this container.
-// ---------------------------------------------------------
-//
-TInt CMainMenuContainer::CountComponentControls() const
- {
- return 1;
- }
-
-// ---------------------------------------------------------
-// CMainMenuContainer::ComponentControl
-//
-// Gets the specified component of a compound control.
-// ---------------------------------------------------------
-//
-CCoeControl* CMainMenuContainer::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
- }
-
-// ---------------------------------------------------------
-// CMainMenuContainer::Draw
-//
-// Draw a control, called by window server.
-// ---------------------------------------------------------
-//
-void CMainMenuContainer::Draw(const TRect& /*aRect*/) const
- {
- }
-
-// ---------------------------------------------------------
-// CMainMenuContainer::HandleListBoxEventL
-//
-// Handles list box events.
-// ---------------------------------------------------------
-//
-void CMainMenuContainer::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType)
- {
-
- if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
- {
- HandleSelectedListItemL( aListBox->CurrentItemIndex() );
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CMainMenuContainer::HandleSelectedListItemL
-//
-// Method HandleSelectedListItemL handles valix index.
-// ----------------------------------------------------------------------------
-//
-void CMainMenuContainer::HandleSelectedListItemL( TInt aIndex )
- {
- TInt selection = aIndex;
-
- // Change active view.
- switch ( selection )
- {
- case 0:
- ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(EAppUIGoToTestCaseMenu);
- break;
- case 1:
- ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(EAppUIGoToModulesMenu);
- break;
- case 2:
- ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(EAppUIGoToTestSetsMenu);
- break;
- default:
- break;
- }
- }
-
-// ---------------------------------------------------------
-// CMainMenuContainer::OfferKeyEventL
-//
-// Handles key events.
-// ---------------------------------------------------------
-//
-TKeyResponse CMainMenuContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType)
-{
- if (aType != EEventKey)
- {
- return EKeyWasNotConsumed;
- }
-
- // Offers key events to list box
- if (iListBox)
- {
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- else
- {
- return EKeyWasNotConsumed;
- }
-}
-
-// ----------------------------------------------------------------------------
-// CMainMenuContainer:::GetActiveLine
-//
-// Get currently selected items index.
-// ----------------------------------------------------------------------------
-//
-TInt CMainMenuContainer::GetActiveLine()
- {
- return iListBox->CurrentItemIndex();
- }
-
-// ----------------------------------------------------------------------------
-// CMainMenuContainer:::SaveActiveLine
-//
-// Makes the iListBox member save its focus position
-// ----------------------------------------------------------------------------
-//
-void CMainMenuContainer::SaveActiveLine()
- {
- ((CMenuListBox*)iListBox)->SaveFocusPosition();
- }
-
-// End of File
--- a/stifui/stifui/src/MainMenuView.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CMainMenuView class definition.
-*
-*/
-
-// INCLUDE FILES
-#include <aknViewAppUi.h>
-#include <barsread.h> //TResourceReader
-#include <Stifui.rsg>
-#include "MainMenuView.h"
-#include "MainMenuContainer.h"
-#include "Stifui.hrh"
-#include "AppUIAppUi.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CMainMenuView::ConstructL
-//
-// Symbian OS two-phased constructor
-// ---------------------------------------------------------
-//
-void CMainMenuView::ConstructL()
- {
- BaseConstructL( R_APPUI_MAINMENUVIEW );
- }
-
-// ---------------------------------------------------------
-// CMainMenuView::~CMainMenuView
-//
-// Destructor
-// ---------------------------------------------------------
-//
-CMainMenuView::~CMainMenuView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ---------------------------------------------------------
-// TUid CMainMenuView::Id
-//
-// Returns view´s id.
-// ---------------------------------------------------------
-//
-TUid CMainMenuView::Id() const
- {
- return TUid::Uid(EMainMenuViewId); //KMainMenuViewId;
- }
-
-// ---------------------------------------------------------
-// CMainMenuView::HandleCommandL
-//
-// Handles a command.
-// ---------------------------------------------------------
-//
-void CMainMenuView::HandleCommandL(TInt aCommand)
- {
- switch ( aCommand )
- {
- case EAknSoftkeyBack:
- {
- AppUi()->HandleCommandL(EEikCmdExit);
- break;
- }
- case EAknCmdOpen:
- {
- TInt a = iContainer->GetActiveLine();
- iContainer->HandleSelectedListItemL( a );
- }
- break;
- default:
- {
- AppUi()->HandleCommandL( aCommand );
- break;
- }
- }
- }
-
-// ---------------------------------------------------------
-// CMainMenuView::HandleClientRectChange
-//
-// Handles client rect changes.
-// ---------------------------------------------------------
-//
-void CMainMenuView::HandleClientRectChange()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
- }
-
-// ---------------------------------------------------------
-// CMainMenuView::DoActivateL
-//
-// Initializes view when activated.
-// ---------------------------------------------------------
-//
-void CMainMenuView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- if (!iContainer)
- {
- iContainer = new (ELeave) CMainMenuContainer;
- iContainer->SetMopParent(this);
- iContainer->ConstructL( ClientRect() );
- AppUi()->AddToStackL( *this, iContainer );
- }
-
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
-
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_MAIN);
- iNaviDecorator = np->CreateNavigationLabelL( reader );
- CleanupStack::PopAndDestroy(); // resource reader
-
- np->PushL(*iNaviDecorator);
- }
-
-// ---------------------------------------------------------
-// CAppUIView::DoDeactivate
-//
-// Deactivates view.
-// ---------------------------------------------------------
-//
-void CMainMenuView::DoDeactivate()
- {
- if ( iContainer )
- {
- iContainer->SaveActiveLine();
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// End of File
-
-// End of File
--- a/stifui/stifui/src/MenuListBox.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CMenuListBox class definition.
-*
-*/
-
-// INCLUDE FILES
-#include "MenuListBox.h"
-#include <aknview.h>
-
-// ================= MEMBER FUNCTIONS =======================
-// ---------------------------------------------------------
-// CMainMenuView::CMenuListBox
-//
-// c++ constructor
-// ---------------------------------------------------------
-//
-CMenuListBox::CMenuListBox(TAppUIViewNumber aViewId)
- : CAknSingleStyleListBox(), iViewId(aViewId)
- {
- }
-
-// ---------------------------------------------------------
-// CMenuListBox::ConstructL
-//
-// Symbian OS two-phased constructor
-// ---------------------------------------------------------
-//
-void CMenuListBox::ConstructL()
- {
-
- }
-
-// ---------------------------------------------------------
-// CMenuListBox::~CMenuListBox
-//
-// Destructor
-// ---------------------------------------------------------
-//
-CMenuListBox::~CMenuListBox()
- {
-
- }
-
-// ---------------------------------------------------------
-// CMenuListBox::NewL
-//
-// Symbian OS public constructor
-// @param aViewId - id of view to identify position in array where focus position will be saved to
-// or retrieved from
-//
-// @return - pointer to an instance of CMenuListBOx
-// ---------------------------------------------------------
-//
-CMenuListBox* CMenuListBox::NewL(TAppUIViewNumber aViewId)
- {
- CMenuListBox* self = new(ELeave) CMenuListBox(aViewId);
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop(self);
- return self;
- }
-
-// ---------------------------------------------------------
-// CMenuListBox::SaveFocusPosition
-//
-// Saves current focus position to CAppUiAppUi object
-// ---------------------------------------------------------
-//
-void CMenuListBox::SaveFocusPosition()
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->SaveFocusPosition(iViewId, this->CurrentItemIndex());
- }
-
-// ---------------------------------------------------------
-// CMenuListBox::SetPreviousFocus
-//
-// Retrieves previous focus position from CAppUiAppUi object and sets focus
-// to that position
-// ---------------------------------------------------------
-//
-void CMenuListBox::SetPreviousFocus()
- {
- TInt previousPosition = ((CAppUIAppUi*)iCoeEnv->AppUi())->GetFocusPosition(iViewId);
- if(previousPosition != KErrNotFound)
- {
- if(previousPosition < this->Model()->NumberOfItems() && previousPosition != 0)
- {
- this->SetCurrentItemIndex(previousPosition);
- }
- if(previousPosition >= this->Model()->NumberOfItems())
- {
- this->SetCurrentItemIndex(0); // setting current item to first element if pervious position is grater then current.
- }
- this->SetTopItemIndex(0);
- }
- }
--- a/stifui/stifui/src/ShowStartedCasesContainer.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,648 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStartedTestsListBoxModel class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-
-#include <aknlists.h> // ListBox
-#include <AknIconArray.h> // CAknIconArray
-#include <badesca.h> // CDesCArray
-#include <eikclbd.h> // CColumnListBoxData
-#include <aknnotewrappers.h>
-
-#include <Stifui.rsg>
-
-//#include "UIStoreIf.h"
-//#include "UIStore.h"
-//#include "UIEngine.h"
-//#include "UIEngineContainer.h"
-
-#include <stifinternal/UIStoreIf.h>
-#include <stifinternal/UIStore.h>
-#include <stifinternal/UIEngine.h>
-#include <stifinternal/UIEngineContainer.h>
-
-#include "ShowStartedCasesContainer.h"
-
-#include "Stifui.hrh"
-#include "AppUIAppUi.h"
-#include "MenuListBox.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ---------------------------------------------------------
-// CStartedTestsListBoxModel::NewL
-//
-// Symbian OS two phased constructor
-// ---------------------------------------------------------
-//
-CStartedTestsListBoxModel* CStartedTestsListBoxModel::NewL
- ( RRefArray<CStartedTestCase>* aTestCasesInView )
- {
- CStartedTestsListBoxModel* self = new ( ELeave ) CStartedTestsListBoxModel();
- CleanupStack::PushL( self );
- self->iBuffer = HBufC::NewL( 130 );
- self->iTestCasesInView = aTestCasesInView;
- CleanupStack::Pop();
- return self;
-
- }
-
-// ---------------------------------------------------------
-// CStartedTestsListBoxModel::ConstructL
-//
-// Symbian OS two phased constructor
-// Completes the construction of the object.
-// ---------------------------------------------------------
-//
-
-void CStartedTestsListBoxModel::ConstructL()
- {
- }
-
-// ---------------------------------------------------------
-// CStartedTestsListBoxModel::~CStartedTestsListBoxModel
-//
-// Destructor
-// ---------------------------------------------------------
-//
-
-CStartedTestsListBoxModel::~CStartedTestsListBoxModel()
- {
- }
-
-// ---------------------------------------------------------
-// CStartedTestsListBoxModel::MdcaCount
-//
-// Returns the number of descriptor elements in the array.
-// ---------------------------------------------------------
-//
-
-TInt CStartedTestsListBoxModel::MdcaCount() const
- {
- return iTestCasesInView->Count();
-
- }
-
-// ---------------------------------------------------------
-// CStartedTestsListBoxModel::MdcaPoint
-//
-// Indexes into a descriptor array.
-// ---------------------------------------------------------
-//
-TPtrC CStartedTestsListBoxModel::MdcaPoint(TInt aIndex) const
- {
- TPtr buffer( iBuffer->Des() );
- buffer.Zero();
- switch ( (*iTestCasesInView)[aIndex].Status() )
- {
- case CUIStoreIf::EStatusRunning:
- {
- if( (*iTestCasesInView)[aIndex].UIEngineContainer().State() ==
- CUIEngineContainer::ERunning )
- {
- buffer.Append(_L("Running\t"));
- }
- else
- {
- buffer.Append(_L("Paused\t"));
- }
- break;
- }
- case CUIStoreIf::EStatusPassed:
- {
- buffer.Append(_L("Passed\t"));
- break;
- }
- case CUIStoreIf::EStatusFailed:
- {
- buffer.Append(_L("Failed\t"));
- break;
- }
- /*case ECrashed:
- buffer.Append(_L("Crashed\t"));
- break;*/
- case CUIStoreIf::EStatusAborted:
- {
- buffer.Append(_L("Aborted\t"));
- break;
- }
- default:
- {
- if((*iTestCasesInView)[aIndex].Status() & CUIStoreIf::EStatusPassed)
- {
- buffer.Append(_L("Passed\t"));
- }
- else if((*iTestCasesInView)[aIndex].Status() & CUIStoreIf::EStatusFailed)
- {
- buffer.Append(_L("Failed\t"));
- }
- else if((*iTestCasesInView)[aIndex].Status() & CUIStoreIf::EStatusAborted)
- {
- buffer.Append(_L("Aborted\t"));
- }
- else if((*iTestCasesInView)[aIndex].Status() & CUIStoreIf::EStatusCrashed)
- {
- buffer.Append(_L("Crashed\t"));
- }
- else
- {
- buffer.Append(_L("\t"));
- }
- break;
- }
- }
-
- buffer.Append((*iTestCasesInView)[aIndex].TestInfo().TestCaseTitle() );
-
- return *iBuffer;
-
- }
-
-
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::ConstructL
-//
-// Symbian OS two phased constructor
-// ---------------------------------------------------------
-//
-void CShowStartedCasesContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
- {
- CreateWindowL();
-
- iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
-
- const TInt KSelectedMode = ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
-
- if(KSelectedMode == EShowOngoingCases || KSelectedMode == EShowPausedCases
- || KSelectedMode == EShowCrashedAbortedCases || KSelectedMode == EShowAllStartedCases)
- {
- iListBox = new (ELeave) CAknSingleHeadingStyleListBox();
- }
- else
- {
- iListBox = CMenuListBox::NewL(EShowStartedCasesViewId); //CAknSingleStyleListBox();
- }
- iListBox->SetContainerWindowL( *this );
- iListBox->SetListBoxObserver( aListBoxObserver );
- iListBox->ConstructL(this, EAknListBoxSelectionList);
-
- //Create Scroller control for ListBox and set its visibility
- iListBox->CreateScrollBarFrameL(ETrue);
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
- iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
-
- if ( iUIStore )
- {
- ConstructListBoxModelL();
- iListBoxModel = CStartedTestsListBoxModel::NewL( &iStartedTestsPtrs );
- iListBox->Model()->SetItemTextArray(iListBoxModel);
- }
- else
- {
- //User::Leave( syy?? )
- }
- iListBox->ActivateL();
- if(KSelectedMode != EShowOngoingCases && KSelectedMode != EShowPausedCases
- && KSelectedMode != EShowCrashedAbortedCases && KSelectedMode != EShowAllStartedCases)
- {
- ((CMenuListBox*)iListBox)->SetPreviousFocus();
- }
-
- SetRect(aRect);
- ActivateL();
-
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::ConstructListBoxModelL
-//
-// Constructs list box model without any filtering.
-// ---------------------------------------------------------
-//
-void CShowStartedCasesContainer::ConstructListBoxModelL()
- {
- TInt ret( 0 );
- RRefArray<CStartedTestCase> startedTestCases;
- ret = iUIStore->StartedTestCases( startedTestCases );
- if( KErrNone != ret )
- {
- startedTestCases.Reset();
- startedTestCases.Close();
- User::Leave( ret );
- }
- CleanupClosePushL( startedTestCases ); // Closes the handle
-
- const TInt KStartedCaseCount = startedTestCases.Count();
-
- iStartedTestsPtrs.Reset(); // Remove all pointers (does not delete objects)
-
- const TInt KSelectedMode = ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
-
- // Loop through all started cases
- for( TInt i=0; i < KStartedCaseCount; i++ )
- {
- switch ( KSelectedMode )
- {
- case EShowAllStartedCases:
- {
- iStartedTestsPtrs.Append( startedTestCases[i] );
- break;
- }
- case EShowOngoingCases:
- {
- // Note: PAUSE IS ALSO RUNNIN STATUS
- if ( startedTestCases[i].Status() & CUIStoreIf::EStatusRunning )
- {
- iStartedTestsPtrs.Append(startedTestCases[i]);
- }
- break;
- }
- case EShowPassedCases:
- {
- if ( startedTestCases[i].Status() & CUIStoreIf::EStatusPassed )
- {
- iStartedTestsPtrs.Append( startedTestCases[i] );
- }
- break;
- }
- case EShowPausedCases:
- {
- if ( startedTestCases[i].Status() & CUIStoreIf::EStatusRunning )
- {
- if( startedTestCases[i].UIEngineContainer().State() == CUIEngineContainer::EPaused )
- {
- iStartedTestsPtrs.Append( startedTestCases[i] );
- }
- }
- break;
- }
- case EShowFailedCases:
- {
- if ( startedTestCases[i].Status() & CUIStoreIf::EStatusFailed )
- {
- iStartedTestsPtrs.Append( startedTestCases[i] );
- }
- break;
- }
- case EShowCrashedAbortedCases:
- {
- if ( startedTestCases[i].Status() & CUIStoreIf::EStatusAborted
- || startedTestCases[i].Status() & CUIStoreIf::EStatusCrashed)
- {
- iStartedTestsPtrs.Append( startedTestCases[i] );
- }
- break;
- }
- }
- }
- startedTestCases.Reset();
- startedTestCases.Close();
-
- CleanupStack::PopAndDestroy(); // startedTestCases
-
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::~CShowStartedCasesContainer
-//
-// Destructor
-// ---------------------------------------------------------
-//
-CShowStartedCasesContainer::~CShowStartedCasesContainer()
- {
- iStartedTestsPtrs.Close(); // does not delete objects whose pointers are contained in the array
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::SizeChanged
-//
-// Called by framework when the view size is changed
-// ---------------------------------------------------------
-//
-void CShowStartedCasesContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
- }
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::CountComponentControls
-//
-// Gets a count of the component controls of this list box control.
-// ---------------------------------------------------------
-//
-TInt CShowStartedCasesContainer::CountComponentControls() const
- {
- return 1; // return nbr of controls inside this container
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::ComponentControl
-//
-// Gets a pointer to the specified component control.
-// ---------------------------------------------------------
-//
-CCoeControl* CShowStartedCasesContainer::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::Draw
-//
-// Draw a control, called by window server.
-// ---------------------------------------------------------
-//
-void CShowStartedCasesContainer::Draw(const TRect& /*aRect*/) const
- {
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::OfferKeyEventL
-//
-// Handles key events.
-// ---------------------------------------------------------
-//
-TKeyResponse CShowStartedCasesContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType)
- {
- if (aType != EEventKey)
- {
- return EKeyWasNotConsumed;
- }
-
- if (iListBox)
- {
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- else
- {
- return EKeyWasNotConsumed;
- }
-
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::SelectedTestCase
-//
-// Returns reference to currently selected test case in view (listbox).
-// ---------------------------------------------------------
-//
-CStartedTestCase* CShowStartedCasesContainer::SelectedTestCase()
- {
- if ( iStartedTestsPtrs.Count() > 0 )
- {
- return &(iStartedTestsPtrs[ iListBox->CurrentItemIndex() ]);
- }
- else
- {
- return NULL;
- }
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::DrawListBox
-//
-// Refresh ListBox, if aSelectedTestCase is still found from ListBox
-// it is set as selected test case.
-// ---------------------------------------------------------
-//
-void CShowStartedCasesContainer::DrawListBox()
- {
- if ( iListBox )
- {
- iListBox->DrawNow();
- }
-
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::HandleItemAdditionL
-//
-// Refresh ListBox after new item was added to listbox model.
-// ---------------------------------------------------------
-//
-void CShowStartedCasesContainer::HandleItemAdditionL()
- {
- iListBox->HandleItemAdditionL();
-
- }
-
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::HandleItemRemovalL
-//
-// Refresh ListBox after item is removed from listbox model.
-// ---------------------------------------------------------
-//
-void CShowStartedCasesContainer::HandleItemRemovalL()
- {
- iListBox->HandleItemRemovalL();
-
- // HandleItemRemovalL "loses selection" if current item is removed
- // -> we have to check it and set one item as current item to make it possible for
- // user to select one item from items left after remove
- if ( iListBox->CurrentItemIndex() == -1 ) // No item selected
- if ( ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount() > 0 ) // there are items
- SetCurrentItemIndex(0);
-
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::TestsInViewCount
-//
-// Returns count of test cases in view.
-// ---------------------------------------------------------
-//
-TInt CShowStartedCasesContainer::TestsInViewCount()
- {
- return ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount();
-
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::CurrentTestCase
-//
-// Returns pointer to currently selected test case.
-// ---------------------------------------------------------
-//
-CStartedTestCase* CShowStartedCasesContainer::CurrentTestCase()
- {
- return &iStartedTestsPtrs[ iListBox->CurrentItemIndex() ];
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::SetCurrentItemIndex
-//
-// Sets the current item.
-// ---------------------------------------------------------
-//
-void CShowStartedCasesContainer::SetCurrentItemIndex(TInt aIndex)
- {
- TInt itemCount = ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount();
- if ( aIndex < itemCount )
- {
- iListBox->SetCurrentItemIndex(aIndex);
- }
- else
- {
- iListBox->SetCurrentItemIndex(itemCount);
- }
-
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::ResetListBox
-//
-// Resets the selection indices, top and current item indices,
-// the selection, and the horizontal scroll offset of this list box.
-// This function does not redraw the list box.
-// ---------------------------------------------------------
-//
-void CShowStartedCasesContainer::ResetListBox()
- {
- iListBox->Reset();
-
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::RemoveSelectedExecutionsL
-//
-// Removes items from list box.
-// ---------------------------------------------------------
-//
-void CShowStartedCasesContainer::RemoveSelectedExecutionsL()
- {
- TInt indexOfRemovedExecution = 0;
- iStartedTestsPtrs.Remove(indexOfRemovedExecution);
- HandleItemRemovalL();
-
- }
-
-// ---------------------------------------------------------
-// CShowStartedCasesContainer::RemoveAllExecutionsInViewL
-//
-// Removes all started test cases from list box.
-// ---------------------------------------------------------
-//
-void CShowStartedCasesContainer::RemoveAllExecutionsInViewL()
- {
- TInt exutionsInViewCount = iStartedTestsPtrs.Count();
- iStartedTestsPtrs.Reset(); //Empties the array, does not delete the objects whose pointers are contained in the array
- HandleItemRemovalL();
-
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::FilterCasesByModuleL
-//
-// Show only testcases which are defined is specified module.
-// ----------------------------------------------------------------------------
-//
-void CShowStartedCasesContainer::FilterCasesByModuleL(TName aModuleName)
- {
- //First the list box model have to be reconstructed to make sure that all
- //possible earlier filtering does not affect
- ConstructListBoxModelL();
-
- TInt i;
- const TInt KCurrentShowedCaseCount = iStartedTestsPtrs.Count();
-
- for ( i = KCurrentShowedCaseCount-1; i >= 0; i-- )
- {
- RRefArray<CStartedTestCase> startedTestCases;
- TInt ret = iUIStore->StartedTestCases( startedTestCases );
- if( ret != KErrNone )
- {
- startedTestCases.Reset();
- startedTestCases.Close();
- }
- if ( startedTestCases[i].TestInfo().ModuleName() != aModuleName )
- {
- iStartedTestsPtrs.Remove(i); // delete pointer to CStartedTestCase
- }
- startedTestCases.Reset();
- startedTestCases.Close();
- }
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::FilterCasesByTCFileNameL
-//
-// Show only testcases which are defined is specified test case file.
-// ----------------------------------------------------------------------------
-//
-void CShowStartedCasesContainer::FilterCasesByTCFileNameL(TFileName aTestCaseFileName)
- {
-
- //First the list box model have to be reconstructed to make sure that all
- //possible earlier filtering does not affect
- ConstructListBoxModelL();
-
- const TInt KCurrentShowedCaseCount = iStartedTestsPtrs.Count();
-
- for ( TInt i = KCurrentShowedCaseCount-1; i >= 0; i-- )
- {
- RRefArray<CStartedTestCase> startedTestCases;
- TInt ret = iUIStore->StartedTestCases( startedTestCases );
- if( ret != KErrNone )
- {
- startedTestCases.Reset();
- startedTestCases.Close();
- }
- if ( startedTestCases[i].TestInfo().TestCaseFile() != aTestCaseFileName )
- {
- iStartedTestsPtrs.Remove(i); // delete pointer to CStartedTestCase
- }
- startedTestCases.Reset();
- startedTestCases.Close();
- }
- }
-
-// ----------------------------------------------------------------------------
-// CContainer::NoFilteringL
-//
-// Remove possible filtering of test cases -> show all test cases.
-// ----------------------------------------------------------------------------
-//
-void CShowStartedCasesContainer::NoFilteringL()
- {
- ConstructListBoxModelL();
- }
-
-// ----------------------------------------------------------------------------
-// CShowStartedCasesContainer:::SaveActiveLine
-//
-// Makes the iListBox member save its focus position
-// ----------------------------------------------------------------------------
-//
-void CShowStartedCasesContainer::SaveActiveLine()
- {
- ((CMenuListBox*)iListBox)->SaveFocusPosition();
- }
-
-// End of File
--- a/stifui/stifui/src/ShowStartedCasesView.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,668 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CShowStartedCasesView class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <eikmenub.h>
-#include <aknViewAppUi.h>
-#include <barsread.h> //TResourceReader
-#include <Stifui.rsg>
-
-//#include "UIEngineContainer.h"
-#include <stifinternal/UIEngineContainer.h>
-
-#include "Stifui.hrh"
-#include "ShowStartedCasesView.h"
-#include "ShowStartedCasesContainer.h"
-#include "AppUIAppUi.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------------------------
-// CShowStartedCasesView::ConstructL
-//
-// Symbian OS two-phased constructor
-// ----------------------------------------------------------------------------
-//
-void CShowStartedCasesView::ConstructL()
- {
- CView::ConstructL();
- BaseConstructL( R_APPUI_SHOWSTARTEDCASESVIEW );
- iFilterModule.Zero();
- iFilterTestCaseFile.Zero();
- iSelectedTestCase=0;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CShowStartedCasesView::~CShowStartedCasesView()
-//
-// Destructor
-// ----------------------------------------------------------------------------
-//
-CShowStartedCasesView::~CShowStartedCasesView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// TUid CShowStartedCasesView::Id()
-//
-// Returns view´s id.
-// ----------------------------------------------------------------------------
-//
-TUid CShowStartedCasesView::Id() const
- {
- return TUid::Uid(EShowStartedCasesViewId);
- }
-
-// ----------------------------------------------------------------------------
-// CShowStartedCasesView::HandleCommandL(TInt aCommand)
-//
-// Handles a command.
-// ----------------------------------------------------------------------------
-//
-void CShowStartedCasesView::HandleCommandL(TInt aCommand)
- {
- if ( aCommand >= ECmdFilterByModule && aCommand < ECmdFilterByTestCaseFile )
- {
- TInt moduleNumber = aCommand - ECmdFilterByModule;
- RRefArray<TDesC> testModules;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( testModules );
- if( KErrNone != ret )
- {
- testModules.Reset();
- testModules.Close();
- User::Leave( ret );
- }
- iFilterModule = testModules[moduleNumber];
-
- iFilterTestCaseFile.Zero();
-
- iContainer->FilterCasesByModuleL(iFilterModule);
- //iContainer->ResetListBox();
- //iContainer->DrawListBox();
-
- testModules.Reset();
- testModules.Close();
-
- return;
- }
-
- else if ( aCommand >= ECmdFilterByTestCaseFile && aCommand < ECmdNOFiltering )
- {
- TInt testCaseFileNumber = aCommand - ECmdFilterByTestCaseFile;
- RRefArray<TDesC> testCaseFiles;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( testCaseFiles );
- if( KErrNone != ret )
- {
- testCaseFiles.Reset();
- testCaseFiles.Close();
- User::Leave( ret );
- }
-
- iFilterTestCaseFile = testCaseFiles[ testCaseFileNumber ];
- iFilterModule.Zero();
- //iContainer->FilterCasesByTCFileNameL(testCaseFileName);
- iContainer->FilterCasesByTCFileNameL(iFilterTestCaseFile);
- iContainer->ResetListBox();
- iContainer->DrawListBox();
-
- testCaseFiles.Reset();
- testCaseFiles.Close();
-
- return;
- }
-
- else if ( aCommand == ECmdNOFiltering )
- {
- iFilterModule.Zero();
- iFilterTestCaseFile.Zero();
- iContainer->NoFilteringL();
- iContainer->ResetListBox();
- iContainer->DrawListBox();
- return;
- }
-
- // Handle rest possible commands
- switch ( aCommand )
- {
- case ECmdViewOutput:
- {
- ViewTestCaseOutputL();
- break;
- }
- case ECmdRemoveExecution:
- {
- iContainer->RemoveSelectedExecutionsL();
- break;
- }
- case ECmdRemoveAllExecutions:
- {
- iContainer->RemoveAllExecutionsInViewL();
- break;
- }
- case ECmdPauseTestCase:
- {
- TInt index = iContainer->CurrentItemIndex();
- RRefArray<CStartedTestCase> runningTestCases;
- TShowStartedCasesMode currentMode = (TShowStartedCasesMode)((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
- TInt ret = KErrNone;
- if(currentMode == EShowAllStartedCases)
- ret = iUIStore->StartedTestCases(runningTestCases, CUIStoreIf::EStatusAll);
- else if(currentMode == EShowOngoingCases)
- ret = iUIStore->StartedTestCases(runningTestCases, CUIStoreIf::EStatusRunning);
- if( KErrNone != ret )
- {
- User::Leave( ret );
- }
- runningTestCases[index].UIEngineContainer().PauseTest();
- runningTestCases.Close();
- break;
- }
- case ECmdResumeTestCase:
- {
- TInt index = iContainer->CurrentItemIndex();
- RRefArray<CStartedTestCase> runningTestCases;
- TShowStartedCasesMode currentMode = (TShowStartedCasesMode)((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
- TInt ret = KErrNone;
- if(currentMode == EShowAllStartedCases)
- ret = iUIStore->StartedTestCases(runningTestCases, CUIStoreIf::EStatusAll);
- else if(currentMode == EShowOngoingCases || currentMode == EShowPausedCases)
- ret = iUIStore->StartedTestCases(runningTestCases, CUIStoreIf::EStatusRunning);
- if( KErrNone != ret )
- {
- User::Leave( ret );
- }
- TInt testCaseToControl = 0;
- if(currentMode == EShowAllStartedCases || currentMode == EShowOngoingCases)
- {
- testCaseToControl = index;
- }
- else if(currentMode == EShowPausedCases)
- {
- TInt pausedTestCasesCounter = 0;
- for(int i = 0; i < runningTestCases.Count(); i++)
- {
- if(runningTestCases[i].UIEngineContainer().State() == CUIEngineContainer::EPaused)
- {
- if(pausedTestCasesCounter == index)
- {
- testCaseToControl = i;
- break;
- }
- pausedTestCasesCounter++;
- }
- }
- }
-
- runningTestCases[testCaseToControl].UIEngineContainer().ResumeTest();
- runningTestCases.Close();
- break;
- }
- case ECmdAbortTestCase:
- {
- TInt index = iContainer->CurrentItemIndex();
- RRefArray<CStartedTestCase> runningTestCases;
- TShowStartedCasesMode currentMode = (TShowStartedCasesMode)((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
- TInt ret = KErrNone;
- if(currentMode == EShowAllStartedCases)
- ret = iUIStore->StartedTestCases(runningTestCases, CUIStoreIf::EStatusAll);
- else if(currentMode == EShowOngoingCases || currentMode == EShowPausedCases)
- ret = iUIStore->StartedTestCases(runningTestCases, CUIStoreIf::EStatusRunning);
-
- if( KErrNone != ret )
- {
- User::Leave( ret );
- }
- TInt testCaseToControl = 0;
-
- if(currentMode == EShowAllStartedCases || currentMode == EShowOngoingCases)
- {
- testCaseToControl = index;
- }
- else if(currentMode == EShowPausedCases)
- {
- TInt pausedTestCasesCounter = 0;
- for(int i = 0; i < runningTestCases.Count(); i++)
- {
- if(runningTestCases[i].UIEngineContainer().State() == CUIEngineContainer::EPaused)
- {
- if(pausedTestCasesCounter == index)
- {
- testCaseToControl = i;
- break;
- }
- pausedTestCasesCounter++;
- }
- }
- }
-
- runningTestCases[testCaseToControl].UIEngineContainer().CancelTest();
- runningTestCases.Close();
- break;
- }
- case EAknSoftkeyOk:
- {
- iEikonEnv->InfoMsg( _L("TestCase Menu ok") );
- break;
- }
- case EAknSoftkeyBack:
- {
- // Remove possible filterings so that they does not affect when coming again to this view
- iFilterModule.Zero();
- iFilterTestCaseFile.Zero();
- iSelectedTestCase=0; //Reset selected test case information
- AppUi()->HandleCommandL(EAppUIGoBack);
- break;
- }
- default:
- {
- AppUi()->HandleCommandL( aCommand );
- break;
- }
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CShowStartedCasesView::HandleListBoxEventL
-//
-// Handles listbox events.
-// ----------------------------------------------------------------------------
-//
-void CShowStartedCasesView::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
- {
- if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
- {
- ViewTestCaseOutputL();
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CShowStartedCasesView::ViewTestCaseOutputL
-//
-// Shows outputs of test case which is selected in Container.
-// ----------------------------------------------------------------------------
-//
-void CShowStartedCasesView::ViewTestCaseOutputL()
- {
- iSelectedTestCase = iContainer->CurrentItemIndex();
-
- // Sets index of selected test case to AppUi
- //( ( CAppUIAppUi* )AppUi() )->SetTestCaseIndex( iSelectedTestCase );
- ( ( CAppUIAppUi* )AppUi() )->SetStartedTestCase( iContainer->CurrentTestCase() );
-
- AppUi()->HandleCommandL(ECmdViewOutput);
- }
-
-
-// ----------------------------------------------------------------------------
-// CShowStartedCasesView::HandleClientRectChange()
-//
-// Handles client rect changes.
-// ----------------------------------------------------------------------------
-//
-void CShowStartedCasesView::HandleClientRectChange()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
- }
-
-// ----------------------------------------------------------------------------
-// CShowStartedCasesView::DoActivateL
-//
-// Initializes view when activated.
-// ----------------------------------------------------------------------------
-//
-void CShowStartedCasesView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- if (!iContainer)
- {
- iContainer = new (ELeave) CShowStartedCasesContainer;
- iContainer->SetMopParent(this);
- iContainer->ConstructL( ClientRect(), this );
- AppUi()->AddToStackL( *this, iContainer );
- }
-
- // Check if filtering by module or by test case file is selected
- if ( iFilterModule.Length() )
- {
- iContainer->FilterCasesByModuleL(iFilterModule);
- }
- else if ( iFilterTestCaseFile.Length() )
- {
- iContainer->FilterCasesByTCFileNameL(iFilterTestCaseFile);
- }
- if ( iSelectedTestCase )
- iContainer->SetCurrentItemIndex(iSelectedTestCase);
-
- RefreshNaviTitleL();
-
- iContainer->DrawListBox();
- }
-
-
-// ----------------------------------------------------------------------------
-// CShowStartedCasesView::RefreshNaviTitle
-//
-// Refreshes view name shown in the navi pane.
-// ----------------------------------------------------------------------------
-//
-void CShowStartedCasesView::RefreshNaviTitleL()
- {
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
- TResourceReader reader;
-
- switch ( ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode )
- {
- case EShowAllStartedCases:
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_ALL);
- break;
- case EShowOngoingCases:
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_ONGOING);
- break;
- case EShowPausedCases:
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_PAUSED);
- break;
- case EShowPassedCases:
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_PASSED);
- break;
- case EShowFailedCases:
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_FAILED);
- break;
- case EShowCrashedAbortedCases:
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_CRASHED_ABORTED);
- break;
- default:
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_TESTSET);
- break;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- iNaviDecorator = np->CreateNavigationLabelL( reader );
- CleanupStack::PopAndDestroy(); // resource reader
- np->PushL(*iNaviDecorator);
- }
-
-
-// ----------------------------------------------------------------------------
-// CShowStartedCasesView::DoDeactivate
-//
-// Deactivates view.
-// ----------------------------------------------------------------------------
-//
-void CShowStartedCasesView::DoDeactivate()
- {
- if ( iContainer )
- {
- TInt mode = ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
- if(mode != EShowOngoingCases && mode != EShowPausedCases
- && mode != EShowCrashedAbortedCases && mode != EShowAllStartedCases)
- {
- iContainer->SaveActiveLine();
- }
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
-
- }
-
-
-// ----------------------------------------------------------------------------
-// CShowStartedCasesView::DynInitMenuPaneL
-//
-// Initializes menu pane.
-// ----------------------------------------------------------------------------
-//
-void CShowStartedCasesView::DynInitMenuPaneL(
- TInt aResourceId, CEikMenuPane* aMenuPane)
- {
- // options menu
- if ( R_APPUI_SHOWSTARTEDCASESVIEW_MENU == aResourceId )
- {
- CStartedTestCase* startedTestCase = iContainer->SelectedTestCase();
- if ( NULL != startedTestCase )
- {
- aMenuPane->SetItemDimmed( ECmdFilterMenu, EFalse );
- switch ( startedTestCase->Status() )
- {
- // test case running
- case CUIStoreIf::EStatusRunning:
- {
- switch ( startedTestCase->UIEngineContainer().State() )
- {
- case CUIEngineContainer::ERunning:
- case CUIEngineContainer::EPaused:
- {
- aMenuPane->SetItemDimmed( ECmdShowSetMenu, EFalse );
- break;
- }
- //case CUIEngineContainer::ENotStarted:
- //case CUIEngineContainer::EExecuted:
- //case CUIEngineContainer::EFinished:
- default:
- {
- aMenuPane->SetItemDimmed( ECmdShowSetMenu, ETrue );
- }
- }
- break;
- }
-
- // test case not running
- //case CUIStoreIf::EStatusPassed:
- //case CUIStoreIf::EStatusFailed:
- //case CUIStoreIf::EStatusAborted:
- //case CUIStoreIf::EStatusExecuted
- default:
- {
- aMenuPane->SetItemDimmed( ECmdShowSetMenu, ETrue );
- }
- }
- }
- else
- {
- //aMenuPane->SetItemDimmed( ECmdFilterMenu, ETrue );
- aMenuPane->SetItemDimmed( ECmdViewOutput, ETrue );
- aMenuPane->SetItemDimmed( ECmdShowSetMenu, ETrue );
- }
- }
-
- // test case control menu
- if ( R_TESTCASE_CONTROL_SUBMENU == aResourceId )
- {
- CStartedTestCase* startedTestCase = iContainer->SelectedTestCase();
-
- if ( NULL != startedTestCase )
- {
- if ( startedTestCase->Status() == CUIStoreIf::EStatusRunning )
- {
- switch ( startedTestCase->UIEngineContainer().State() )
- {
- case CUIEngineContainer::ERunning:
- {
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, EFalse );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, EFalse );
- break;
- }
- case CUIEngineContainer::EPaused:
- {
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, EFalse );
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, EFalse );
- break;
- }
- //case CUIEngineContainer::ENotStarted:
- //case CUIEngineContainer::EExecuted:
- //case CUIEngineContainer::EFinished:
- default:
- {
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
- break;
- }
- }
- }
- else
- {
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
- }
- }
- else
- {
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
- }
- }
-
- // Test modules are added to filter by test module submenu if the submenu is opened
- if (R_APPUI_FILTERBYMODULES_MENU == aResourceId)
- {
- RRefArray<TDesC> testModules;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( testModules );
- if( KErrNone != ret )
- {
- testModules.Reset();
- testModules.Close();
- User::Leave( ret );
- }
- TInt moduleCount = testModules.Count();
-
- TInt i;
- CEikMenuPaneItem::SData item;
-
- item.iCommandId = ECmdFilterByModule;
- item.iFlags = 0;
- item.iCascadeId = 0;
-
- for (i = 0; i < moduleCount; i++)
- {
- item.iText = testModules[i];
- aMenuPane->AddMenuItemL(item);
- item.iCommandId++; // command IDs 0x1000 - 0x1FFF are reserved for modules in hrh file
- }
-
- testModules.Reset();
- testModules.Close();
-
- }
-
- // Test case files are added to filter by test case file submenu if the submenu is opened
- if (R_APPUI_FILTER_BY_TESTCASEFILE_MENU == aResourceId)
- {
- RRefArray<TDesC> testCaseFiles;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( testCaseFiles );
- if( KErrNone != ret )
- {
- testCaseFiles.Reset();
- testCaseFiles.Close();
- User::Leave( ret );
- }
- TInt testCaseFileCount = testCaseFiles.Count();
-
- TInt i;
- CEikMenuPaneItem::SData item;
-
- item.iCommandId = ECmdFilterByTestCaseFile;
- item.iFlags = 0;
- item.iCascadeId = 0;
-
- for (i = 0; i < testCaseFileCount; i++)
- {
- item.iText = testCaseFiles[i];
- // If there´s no test case file, don´t add item to menu.
- if ( testCaseFiles[i].Length() > 0 )
- {
- aMenuPane->AddMenuItemL(item);
- }
- item.iCommandId++; // command IDs 0x2000 - 0x2FFF are reserved for test case files in hrh file
- }
-
- testCaseFiles.Reset();
- testCaseFiles.Close();
-
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CShowStartedCasesView::TestCaseStateChangedL
-//
-// Handles status changes of test cases in view.
-// ----------------------------------------------------------------------------
-//
-void CShowStartedCasesView::TestCaseStateChangedL()
- {
- if ( iContainer )
- {
-
- //CStartedTestCase* currentlySelectedTest = iContainer->SelectedTestCase();
-
- TInt numOfTestsInViewBeforeStateChange = iContainer->TestsInViewCount();
-
- //((CStartedTestsListBoxModel*)iContainer->iListBox->Model())->MdcaCount();
-
- iContainer->ConstructListBoxModelL();
-
- // Check if filtering by module or by test case file is selected
- if ( iFilterModule.Length() )
- {
- iContainer->FilterCasesByModuleL(iFilterModule);
- }
- else if ( iFilterTestCaseFile.Length() )
- {
- iContainer->FilterCasesByTCFileNameL(iFilterTestCaseFile);
- }
-
- TInt numOfTestsInViewAfterStateChange = iContainer->TestsInViewCount();
- //((CStartedTestsListBoxModel*)iContainer->iListBox->Model())->MdcaCount();
-
- if ( numOfTestsInViewAfterStateChange >= numOfTestsInViewBeforeStateChange )
- iContainer->HandleItemAdditionL();
- else
- iContainer->HandleItemRemovalL();
-
- if(iContainer->CurrentItemIndex() < 0)
- {
- iContainer->SetCurrentItemIndex(0);
- }
- iContainer->DrawListBox();
-
- }
- }
-
-// End of File
--- a/stifui/stifui/src/StartCasesContainer.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,227 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStartCasesContainer class
-* definition
-*
-*/
-
-// INCLUDE FILES
-#include <aknlists.h> // ListBox
-#include <AknIconArray.h> // CAknIconArray
-#include <aknnotewrappers.h>
-
-#include <eikclbd.h> // CColumnListBoxData
-
-#include "StartCasesContainer.h"
-#include "StartCasesView.h"
-#include <Stifui.rsg>
-#include "Stifui.hrh"
-#include "AppUIAppUi.h"
-
-#include "Container.h"
-#include "MenuListBox.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CStartCasesContainer::ConstructL
-//
-// Symbian OS two phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CStartCasesContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: ConstructL"));
-
- iParentView = (CStartCasesView*)aListBoxObserver;
- CreateWindowL();
-
- iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
-
- iTestCasesInView.Reset();
- //((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: iTCInV Reset"));
-
- iListBox = CMenuListBox::NewL(EStartCaseMenuViewId);
- iListBox->SetContainerWindowL( *this );
- iListBox->SetListBoxObserver( aListBoxObserver /*this*/ ); // jos peritty MEikListBoxObserver:sta
- iListBox->ConstructL(this, EAknListBoxMarkableList /*EAknListBoxSelectionList*/);
-
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: ListBox constructed"));
-
- //Create Scroller control for ListBox and set its visibility
- iListBox->CreateScrollBarFrameL(ETrue);
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
- iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
-
- if ( iUIStore )
- {
- RRefArray<CTestInfo> allCases;
- TInt ret = iUIStore->TestCases( allCases );
- if( KErrNone != ret )
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("iUIStore->TestCases() fails"));
- allCases.Reset();
- allCases.Close();
- User::Leave( ret );
- }
-
- const TInt KTestCaseCount = allCases.Count();
- for (TInt i=0; i < KTestCaseCount; i++)
- {
- ret = iTestCasesInView.Append( &allCases[i] );
- if( ret != KErrNone )
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("Test case append fails with: %d"), ret );
- User::Leave( ret );
- }
- }
-
- iListBoxModel = CTestCaseListBoxModel::NewL(&iTestCasesInView);
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: ListBox model"));
-
- iListBox->Model()->SetItemTextArray(iListBoxModel);
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: ListBox model set"));
-
- allCases.Reset();
- allCases.Close();
- }
- else
- {
- User::Leave( KErrGeneral );
- }
-
- // Creates graphic.
- SetGraphicIconL( iListBox );
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: icons created"));
-
- iListBox->ActivateL();
- ((CMenuListBox*)iListBox)->SetPreviousFocus();
-
- SetRect(aRect);
- ActivateL();
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesContainer::~CStartCasesContainer
-//
-// Destructor
-// ----------------------------------------------------------------------------
-//
-CStartCasesContainer::~CStartCasesContainer()
- {
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesContainer::SizeChanged
-//
-// Called by framework when the view size is changed.
-// ----------------------------------------------------------------------------
-//
-void CStartCasesContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
- }
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesContainer::CountComponentControls
-//
-// Gets a count of the component controls of this list box control.
-// ----------------------------------------------------------------------------
-//
-TInt CStartCasesContainer::CountComponentControls() const
- {
- return 1; // return nbr of controls inside this container
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesContainer::ComponentControl
-//
-// Gets a pointer to the specified component control.
-// ----------------------------------------------------------------------------
-//
-CCoeControl* CStartCasesContainer::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesContainer::Draw
-//
-// Draw a control, called by window server.
-// ----------------------------------------------------------------------------
-//
-void CStartCasesContainer::Draw(const TRect& /*aRect*/) const
- {
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesContainer::OfferKeyEventL
-//
-// Handles key events.
-// ----------------------------------------------------------------------------
-//
-TKeyResponse CStartCasesContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType )
- {
- if (aType != EEventKey)
- {
- return EKeyWasNotConsumed;
- }
-
- if (iListBox)
- {
- //if multiple items selected
- if ( iListBox->SelectionIndexes()->Count() > 0 )
- {
- TUint mask = 0x40488;
-
- //if event is enter key,
- //don´t send it to listbox
- if ( aKeyEvent.iScanCode == 0xa7
- && ( aKeyEvent.iModifiers & mask ) == 0 )
- {
- iParentView->HandleListBoxEventL( iListBox, MEikListBoxObserver::EEventEnterKeyPressed );
- return EKeyWasConsumed;
- }
- }
-
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- else
- {
- return EKeyWasNotConsumed;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesContainer:::SaveActiveLine
-//
-// Makes the iListBox member save its focus position
-// ----------------------------------------------------------------------------
-//
-void CStartCasesContainer::SaveActiveLine()
- {
- ((CMenuListBox*)iListBox)->SaveFocusPosition();
- }
-
-// End of File
--- a/stifui/stifui/src/StartCasesView.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,474 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStartCasesView class definition.
-*
-*/
-
-// INCLUDE FILES
-#include <eikmenub.h>
-#include <aknViewAppUi.h>
-#include <aknlistquerydialog.h>
-#include <barsread.h> //TResourceReader
-#include <Stifui.rsg>
-#include "StartCasesView.h"
-#include "StartCasesContainer.h"
-#include "AppUIAppUi.h"
-#include "Stifui.hrh"
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CStartCasesView::ConstructL
-//
-// Symbian OS two-phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CStartCasesView::ConstructL()
- {
- CView::ConstructL();
- BaseConstructL( R_APPUI_STARTCASESVIEW );
- iCurrentTestCase = 0;
-
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesView::~CStartCasesView
-//
-// Destructor
-// ----------------------------------------------------------------------------
-//
-CStartCasesView::~CStartCasesView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesView::Id
-//
-// Returns view´s id.
-// ----------------------------------------------------------------------------
-//
-TUid CStartCasesView::Id() const
- {
- return TUid::Uid(EStartCaseMenuViewId);
-
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesView::HandleCommandL
-//
-// Handles a command.
-// ----------------------------------------------------------------------------
-//
-void CStartCasesView::HandleCommandL(TInt aCommand)
- {
- if ( aCommand >= ECmdFilterByModule && aCommand < ECmdFilterByTestCaseFile ) // 0x1000 - 0x1FFF
- {
- TInt moduleNumber = aCommand - ECmdFilterByModule;
- RRefArray<TDesC> allModules;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( allModules );
- if( KErrNone != ret )
- {
- allModules.Reset();
- allModules.Close();
- User::Leave( ret );
- }
- TName moduleName = allModules[ moduleNumber ];
-
- iContainer->FilterCasesByModuleL( moduleName );
-
- allModules.Reset();
- allModules.Close();
- }
- else if ( aCommand >= ECmdFilterByTestCaseFile && aCommand < ECmdNOFiltering )
- {
- TInt testCaseFileNumber = aCommand - ECmdFilterByTestCaseFile;
- RRefArray<TDesC> allTestCases;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( allTestCases );
- if( KErrNone != ret )
- {
- allTestCases.Reset();
- allTestCases.Close();
- User::Leave( ret );
- }
- TFileName testCaseFileName = allTestCases[ testCaseFileNumber ];
-
- iContainer->FilterCasesByTCFileNameL( testCaseFileName );
-
- allTestCases.Reset();
- allTestCases.Close();
- }
- else if ( aCommand == ECmdNOFiltering )
- {
- iContainer->NoFilteringL();
- }
- else if ( aCommand == EAknCmdMark || aCommand == EAknCmdUnmark
- || aCommand == EAknMarkAll || aCommand == EAknUnmarkAll )
- {
- iContainer->HandleMarkCommandL( aCommand );
- }
- else
- {
- switch ( aCommand )
- {
- case ECmdStartCases:
- {
- CheckListBoxSelectionsL( iContainer->ListBox() );
- break;
- }
- case EAknSoftkeyBack:
- {
- iCurrentTestCase = 0;
- AppUi()->HandleCommandL(EAppUIGoBack);
- break;
- }
- default:
- {
- AppUi()->HandleCommandL( aCommand );
- break;
- }
- }
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesView::HandleClientRectChange
-//
-// Handles client rect changes.
-// ----------------------------------------------------------------------------
-//
-void CStartCasesView::HandleClientRectChange()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesView::DoActivateL
-//
-// Initializes view when activated.
-// ----------------------------------------------------------------------------
-//
-void CStartCasesView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- if (!iContainer)
- {
- ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("StartCasesView: DoActivateL"));
- iContainer = new (ELeave) CStartCasesContainer;
- iContainer->SetMopParent(this);
- iContainer->ConstructL( ClientRect(), this );
- ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("StartCasesView: container constructed"));
- AppUi()->AddToStackL( *this, iContainer );
- }
-
- iContainer->SetCurrentItemIndex(iCurrentTestCase);
-
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
-
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTCASES);
- iNaviDecorator = np->CreateNavigationLabelL( reader );
- CleanupStack::PopAndDestroy(); // resource reader
- np->PushL(*iNaviDecorator);
-
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesView::DoDeactivate
-//
-// Deactivates view.
-// ----------------------------------------------------------------------------
-//
-void CStartCasesView::DoDeactivate()
- {
- if ( iContainer )
- {
- iContainer->SaveActiveLine();
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-
-// ----------------------------------------------------------------------------
-// CStartCasesView::DynInitMenuPaneL
-//
-// Initializes menu pane.
-// ----------------------------------------------------------------------------
-//
-void CStartCasesView::DynInitMenuPaneL(
- TInt aResourceId, CEikMenuPane* aMenuPane)
- {
-
- // Test modules are added to filter by test module submenu if the submenu is opened
- if (R_APPUI_FILTERBYMODULES_MENU == aResourceId)
- {
- RRefArray<TDesC> modules;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( modules );
- if( KErrNone != ret )
- {
- modules.Reset();
- modules.Close();
- User::Leave( ret );
- }
-
- TInt moduleCount = modules.Count();
-
- TInt i;
- CEikMenuPaneItem::SData item;
-
- item.iCommandId = ECmdFilterByModule;
- item.iFlags = 0;
- item.iCascadeId = 0;
-
- for (i = 0; i < moduleCount; i++)
- {
- //item.iText = modules[i].iModuleName;
- item.iText = modules[i];
- aMenuPane->AddMenuItemL(item);
- item.iCommandId++; // command IDs 0x1000 - 0x1FFF are reserved for modules in hrh file
- }
-
- modules.Reset();
- modules.Close();
-
- }
-
- // Test case files are added to filter by test case file submenu if the submenu is opened
- if (R_APPUI_FILTER_BY_TESTCASEFILE_MENU == aResourceId)
- {
- RRefArray<TDesC> testCaseFiles;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( testCaseFiles );
- if( KErrNone != ret )
- {
- testCaseFiles.Reset();
- testCaseFiles.Close();
- User::Leave( ret );
- }
-
- TInt testCaseFileCount = testCaseFiles.Count();
-
- TInt i;
- CEikMenuPaneItem::SData item;
-
- item.iCommandId = ECmdFilterByTestCaseFile;
- item.iFlags = 0;
- item.iCascadeId = 0;
-
- for (i = 0; i < testCaseFileCount; i++)
- {
- item.iText = testCaseFiles[i];
- // If there´s no test case file, don´t add item to menu.
- if ( testCaseFiles[i].Length() > 0 )
- {
- aMenuPane->AddMenuItemL(item);
- }
- item.iCommandId++; // command IDs 0x2000 - 0x2FFF are reserved for test case files in hrh file
- }
-
- testCaseFiles.Reset();
- testCaseFiles.Close();
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesView::HandleListBoxEventL
-//
-// Handles listbox events.
-// ----------------------------------------------------------------------------
-//
-void CStartCasesView::HandleListBoxEventL( CEikListBox* aListBox,
- TListBoxEvent aEventType )
- {
- if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
- {
- CheckListBoxSelectionsL( aListBox );
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesView::CheckListBoxSelectionsL
-//
-// Checks listbox selections and launches query dialog to start test cases.
-// ----------------------------------------------------------------------------
-//
-void CStartCasesView::CheckListBoxSelectionsL( CEikListBox* aListBox )
- {
- TInt i(0);
- TInt count = aListBox->SelectionIndexes()->Count();
-
- RArray<TInt> selectedIndices;
- CleanupClosePushL( selectedIndices );
-
- if ( count > 0 )
- {
- for( i = 0; i < count; i++ )
- {
- selectedIndices.InsertInOrder(
- (*aListBox->SelectionIndexes())[i] );
- }
- }
-
- // Check count of selected items.
- if ( count == 1 )
- {
- iCurrentTestCase = selectedIndices[0];
- StartTestCaseL();
- }
- else if (count > 1)
- {
- StartTestCasesL( selectedIndices );
- }
- else
- {
- iCurrentTestCase = iContainer->CurrentItemIndex();
- StartTestCaseL();
- }
-
- CleanupStack::PopAndDestroy();
-
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesView::StartTestCaseL
-//
-// Starts test case which is selected in containers list box.
-// First shows a list query if user wants just start test case or
-// if he wants to start test case and view test case output.
-// ----------------------------------------------------------------------------
-//
-void CStartCasesView::StartTestCaseL()
- {
- TInt selectedItem(0);
- CAknListQueryDialog* startDialog = new (ELeave) CAknListQueryDialog(&selectedItem);
- if ( startDialog->ExecuteLD(R_START_TESTCASE_LIST_QUERY) )
- {
- RRefArray<CTestInfo> testInfo;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCases( testInfo );
- if( KErrNone != ret )
- {
- testInfo.Reset();
- testInfo.Close();
- User::Leave( ret );
- }
- TInt testCaseNumber = iCurrentTestCase;
-
- TInt testCaseIndex( 0 );
-
- ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->StartTestCase( testInfo[testCaseNumber], testCaseIndex );
-
- if( KErrNone != ret )
- {
- User::Leave( ret );
- }
- testInfo.Reset();
- testInfo.Close();
-
- // Increment the counter value
- ((CAppUIAppUi*)AppUi())->iUIStoreHandler->iExecutedTestCaseCount++;
-
- if ( selectedItem == 1 ) // if view output was selected
- {
- CStartedTestCase* startedCase =
- &((CAppUIAppUi*)AppUi())->UIStoreHandler()->StartedTestCaseL(
- testCaseIndex );
- ((CAppUIAppUi*)AppUi())->SetStartedTestCase( startedCase );
-
- AppUi()->HandleCommandL( ECmdViewOutput );
-
- }
- }
- }
-
-// ----------------------------------------------------------------------------
-// CStartCasesView::StartTestCasesL
-//
-// Starts multiple test cases which are selected in containers list box.
-// Shows a list query if user wants to start cases parallel or sequential.
-// ----------------------------------------------------------------------------
-//
-void CStartCasesView::StartTestCasesL( RArray<TInt> aSelectedIndexes )
- {
- _LIT( KTempSet, "TempSet");
- TInt selectedItem(0);
- TInt i(0);
- TInt ret(0);
-
- CAknListQueryDialog* startDialog = new (ELeave) CAknListQueryDialog(&selectedItem);
- if ( startDialog->ExecuteLD(R_START_MULTIPLE_TESTCASES_LIST_QUERY) )
- {
- RRefArray<CTestInfo> testInfo;
- CleanupClosePushL( testInfo );
-
- ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->CreateTestSet( KTempSet );
-
- ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCases( testInfo );
- if( KErrNone != ret )
- {
- testInfo.Reset();
- testInfo.Close();
- User::Leave( ret );
- }
-
- for( i = 0; i < aSelectedIndexes.Count(); i++ )
- {
- ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->AddToTestSet( KTempSet,
- testInfo[ aSelectedIndexes[i] ] );
- if( KErrNone != ret )
- {
- User::Leave( ret );
- }
- // Increment the counter value
- ((CAppUIAppUi*)AppUi())->iUIStoreHandler->iExecutedTestCaseCount++;
- }
-
- //start cases
- if ( selectedItem == 0 )
- {
- ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->StartTestSet(
- ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestSetL( KTempSet ),
- i, CStartedTestSet::ESetParallel);
- }
- else if (selectedItem == 1)
- {
- ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->StartTestSet(
- ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestSetL( KTempSet ),
- i, CStartedTestSet::ESetSequential);
- }
-
- ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->RemoveTestSet( KTempSet );
-
- CleanupStack::PopAndDestroy();
- }
- }
-
-// End of File
--- a/stifui/stifui/src/StartedCasesMenuContainer.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,234 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStartedCasesMenuContainer
-* class definition.
-*
-*/
-
-// INCLUDE FILES
-#include "StartedCasesMenuContainer.h"
-#include "Stifui.hrh"
-#include <Stifui.rsg>
-
-#include <aknlists.h> //ListBox
-#include <barsread.h> // for TResourceReader
-
-#include <aknnotewrappers.h>
-
-#include "MenuListBox.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuContainer::ConstructL
-//
-// Symbian OS default constructor.
-// ----------------------------------------------------------------------------
-//
-void CStartedCasesMenuContainer::ConstructL(
- const TRect& aRect )
- {
- CreateWindowL();
-
- iListBox = CMenuListBox::NewL(EStartedCasesMenuViewId);
- iListBox->SetContainerWindowL( *this );
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC( reader, R_STARTED_CASES_MENU_LISTBOX );
- iListBox->SetListBoxObserver( this ); // jos peritty MEikListBoxObserver:sta
- //iListBox->SetObserver( this /*iMainMenuObserver*/ ); //jos peritty MCoeControlObserver:sta
- iListBox->ConstructFromResourceL( reader );
- CleanupStack::PopAndDestroy(); // resource stuffs.
-
- //Create Scroller control for ListBox and set its visibility
- iListBox->CreateScrollBarFrameL(ETrue);
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
-
- ((CMenuListBox*)iListBox)->SetPreviousFocus();
- iListBox->ActivateL();
-
- SetRect(aRect);
- ActivateL();
- }
-
-// Destructor
-CStartedCasesMenuContainer::~CStartedCasesMenuContainer()
- {
- if ( iListBox )
- {
- iListBox->Reset();
- delete iListBox;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuContainer::SizeChanged
-//
-// Called by framework when the view size is changed.
-// ----------------------------------------------------------------------------
-//
-void CStartedCasesMenuContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
- }
- }
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuContainer::CountComponentControls
-//
-// Gets a count of the component controls of this list box control.
-// ----------------------------------------------------------------------------
-//
-TInt CStartedCasesMenuContainer::CountComponentControls() const
- {
- return 1; // return nbr of controls inside this container
- }
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuContainer::ComponentControl
-//
-// Gets a pointer to the specified component control.
-// ----------------------------------------------------------------------------
-//
-CCoeControl* CStartedCasesMenuContainer::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuContainer::Draw
-//
-// Draw a control, called by window server.
-// ----------------------------------------------------------------------------
-//
-void CStartedCasesMenuContainer::Draw(const TRect& /*aRect*/) const
- {
- // CWindowGc& gc = SystemGc();
- }
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuContainer::HandleListBoxEventL
-//
-// Handles list box events.
-// ----------------------------------------------------------------------------
-//
-void CStartedCasesMenuContainer::HandleListBoxEventL(
- CEikListBox* aListBox,
- TListBoxEvent aEventType )
- {
-
- if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
- {
- HandleSelectedListItemL( aListBox->CurrentItemIndex() );
- }
- }
-
-
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuContainer::HandleSelectedListItemL
-//
-// Method HandleSelectedListItemL handles valid index.
-// ----------------------------------------------------------------------------
-//
-void CStartedCasesMenuContainer::HandleSelectedListItemL( TInt aIndex )
- {
- TInt selection = aIndex;
-
- switch ( selection )
- {
- case 0: ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdShowAllStartedCases);
- break;
- case 1: ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdShowOngoingCases);
- break;
- case 2: ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdShowPausedCases);
- break;
- case 3: ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdShowPassedCases);
- break;
- case 4: ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdShowFailedCases);
- break;
- case 5: ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdShowCrashedAbortedCases);
- break;
- case 6: ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdShowStatistics);
- break;
- default:
- break;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuContainer::OfferKeyEventL
-//
-// Handles key events.
-// ----------------------------------------------------------------------------
-//
-TKeyResponse CStartedCasesMenuContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType)
- {
- if (aType != EEventKey)
- {
- return EKeyWasNotConsumed;
- }
-
- switch ( aKeyEvent.iCode )
- {
- case EKeyLeftArrow:
- case EKeyRightArrow:
- { /* Left ja right key eventit valitetaan AppUille joka hoitaa siirtymisen toisiin nakymiin */
- return EKeyWasNotConsumed;
- //break;
- }
- default:
- {
- //Muut Key eventit valitetaan listboxille, joka hoitaa ne
- if (iListBox)
- {
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- }
- }
- return EKeyWasNotConsumed;
- }
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuContainer::GetActiveLine
-//
-// Get currently selected items index.
-// ----------------------------------------------------------------------------
-//
-TInt CStartedCasesMenuContainer::GetActiveLine()
- {
- return iListBox->CurrentItemIndex();
- }
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuContainer:::SaveActiveLine
-//
-// Makes the iListBox member save its focus position
-// ----------------------------------------------------------------------------
-//
-void CStartedCasesMenuContainer::SaveActiveLine()
- {
- ((CMenuListBox*)iListBox)->SaveFocusPosition();
- }
-
-
-// End of File
--- a/stifui/stifui/src/StartedCasesMenuView.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStartedCasesMenuView class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <aknViewAppUi.h>
-#include <barsread.h> //TResourceReader
-#include <Stifui.rsg>
-#include "StartedCasesMenuView.h"
-#include "StartedCasesMenuContainer.h"
-#include "Stifui.hrh"
-#include "AppUIAppUi.h"
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuView::ConstructL
-//
-// Symbian OS two-phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CStartedCasesMenuView::ConstructL()
- {
- CView::ConstructL();
- BaseConstructL( R_APPUI_STARTEDCASESMENUVIEW );
- }
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuView::~CStartedCasesMenuView
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CStartedCasesMenuView::~CStartedCasesMenuView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuView::Id
-//
-// Returns view´s id.
-// ----------------------------------------------------------------------------
-//
-TUid CStartedCasesMenuView::Id() const
- {
- return TUid::Uid(EStartedCasesMenuViewId); //KTestCaseMenuViewId;
- }
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuView::HandleCommandL
-//
-// Handles a command.
-// ----------------------------------------------------------------------------
-//
-void CStartedCasesMenuView::HandleCommandL(TInt aCommand)
- {
- switch ( aCommand )
- {
- case EAknSoftkeyBack:
- {
- AppUi()->HandleCommandL(EAppUIGoBack);
- break;
- }
- case EAknCmdOpen:
- {
- TInt a = iContainer->GetActiveLine();
- iContainer->HandleSelectedListItemL( a );
- }
- break;
- default:
- {
- AppUi()->HandleCommandL( aCommand );
- break;
- }
- }
- }
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuView::HandleClientRectChange
-//
-// Handles client rect changes.
-// ----------------------------------------------------------------------------
-//
-void CStartedCasesMenuView::HandleClientRectChange()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
- }
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuView::DoActivateL
-//
-// Initializes view when activated.
-// ----------------------------------------------------------------------------
-//
-void CStartedCasesMenuView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- if (!iContainer)
- {
- iContainer = new (ELeave) CStartedCasesMenuContainer;
- iContainer->SetMopParent(this);
- iContainer->ConstructL( ClientRect() );
- AppUi()->AddToStackL( *this, iContainer );
- }
-
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
-
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTEDCASES);
- iNaviDecorator = np->CreateNavigationLabelL( reader );
- CleanupStack::PopAndDestroy(); // resource reader
- np->PushL(*iNaviDecorator);
- }
-
-// ----------------------------------------------------------------------------
-// CStartedCasesMenuView::DoDeactivate
-//
-// Deactivates view.
-// ----------------------------------------------------------------------------
-//
-void CStartedCasesMenuView::DoDeactivate()
- {
- if ( iContainer )
- {
- iContainer->SaveActiveLine();
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// End of File
-
--- a/stifui/stifui/src/StatisticsContainer.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,297 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStatisticsContainer class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <aknlists.h> // ListBox
-#include <AknIconArray.h> // CAknIconArray
-#include <aknnotewrappers.h>
-
-#include <eikclbd.h> // CColumnListBoxData
-
-#include <Stifui.rsg>
-
-//#include "UIStoreIf.h"
-//#include "UIStore.h"
-//#include "UIEngine.h"
-//#include "UIEngineContainer.h"
-
-#include <stifinternal/UIStoreIf.h>
-#include <stifinternal/UIStore.h>
-#include <stifinternal/UIEngine.h>
-#include <stifinternal/UIEngineContainer.h>
-
-#include "StatisticsContainer.h"
-#include "Stifui.hrh"
-#include "AppUIAppUi.h"
-
-#include "MenuListBox.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CStatisticsContainer::ConstructL
-//
-// Symbian OS two phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CStatisticsContainer::ConstructL( const TRect& aRect,
- MEikListBoxObserver* aListBoxObserver )
- {
-
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(
- _L("StatisticsContainer: ConstructL"));
-
- CreateWindowL();
-
- iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
-
- //iTestCasesInView.Reset();
- //((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StatisticsContainer: iTCInV Reset"));
-
- iListBox = CMenuListBox::NewL(EStatisticsViewId);
- iListBox->SetContainerWindowL( *this );
- iListBox->SetListBoxObserver( aListBoxObserver /*this*/ ); // jos peritty MEikListBoxObserver:sta
- iListBox->ConstructL(this, EAknListBoxMarkableList /*EAknListBoxSelectionList*/);
-
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StatisticsContainer: ListBox constructed"));
-
- //Create Scroller control for ListBox and set its visibility
- iListBox->CreateScrollBarFrameL(ETrue);
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
-
- if ( iUIStore )
- {
- //RRefArray<CStartedTestCase> allStarted;
- RRefArray<CStartedTestCase> allStarted;
- TInt ret = iUIStore->StartedTestCases( allStarted );
- if( KErrNone != ret )
- {
- allStarted.Reset();
- allStarted.Close();
- User::Leave( ret );
- }
- TInt count = allStarted.Count();
- // TInt notstarted( 0 );
- TInt ongoing( 0 );
- TInt passed( 0 );
- TInt failed( 0 );
- TInt other( 0 );
- //TInt aborted( 0 );
- // TInt paused( 0 );
- //TInt crashed( 0 );
- //TInt executed( 0 );
- // TInt state( 0 );
-
- for( TInt a = 0; a < count; a++ )
- {
- switch ( allStarted[a].Status() )
- {
- case CUIStoreIf::EStatusRunning:
- {
- ongoing++;
- break;
- }
- case CUIStoreIf::EStatusExecuted | CUIStoreIf::EStatusPassed:
- {
- passed++;
- break;
- }
- case CUIStoreIf::EStatusExecuted |CUIStoreIf::EStatusFailed:
- {
- failed++;
- break;
- }
- //case CUIStoreIf::EStatusAborted:
- // {
- // aborted++;
- // break;
- // }
- /*case ECrashed:
- {
- crashed++;
- break;
- }
- */
- /*case EExecuted:
- {
- executed++;
- break;
- }
- */
- default:
- {
- other++;
- break;
- }
- }
- }
-
- allStarted.Reset();
- allStarted.Close();
-
- iTestCaseArray = new (ELeave) CDesC16ArrayFlat(6);
- iTestCaseArray->Reset();
-
- HBufC* tmpHBuf = HBufC::NewL( 40 );
- TPtr buffer( tmpHBuf->Des() );
-
- buffer = ( _L("\t") );
- buffer.AppendNum( ongoing );
- buffer.Append( _L(" Running") );
- iTestCaseArray->AppendL( buffer );
-
- buffer = ( _L("\t") );
- buffer.AppendNum( passed );
- buffer.Append( _L(" Passed") );
- iTestCaseArray->AppendL( buffer );
-
- buffer = ( _L("\t") );
- buffer.AppendNum( failed );
- buffer.Append( _L(" Failed") );
- iTestCaseArray->AppendL( buffer );
-
- buffer = ( _L("\t") );
- buffer.AppendNum( other );
- buffer.Append( _L(" Crashed/Aborted") );
- iTestCaseArray->AppendL( buffer );
-
- delete tmpHBuf;
-
- iListBox->Model()->SetItemTextArray( iTestCaseArray );
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StatisticsContainer: ListBox model set"));
- }
- else
- {
- //User::Leave( syy?? )
- }
-
- // Creates graphic.
- //SetGraphicIconL( iListBox );
- // ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StatisticsContainer: icons created"));
-
- iListBox->ActivateL();
- ((CMenuListBox*)iListBox)->SetPreviousFocus();
-
- SetRect(aRect);
- ActivateL();
-
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsContainer::~CStatisticsContainer
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CStatisticsContainer::~CStatisticsContainer()
- {
- //iTestCasesInView.Close(); // does not delete objects whose pointers are contained in the array
- //delete iListBox;
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsContainer::SizeChanged
-//
-// Called by framework when the view size is changed.
-// ----------------------------------------------------------------------------
-//
-void CStatisticsContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
- }
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsContainer::CountComponentControls
-//
-// Gets a count of the component controls of this list box control.
-// ----------------------------------------------------------------------------
-//
-TInt CStatisticsContainer::CountComponentControls() const
- {
- return 1; // return nbr of controls inside this container
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsContainer::ComponentControl
-//
-// Gets a pointer to the specified component control.
-// ----------------------------------------------------------------------------
-//
-
-CCoeControl* CStatisticsContainer::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsContainer::Draw
-//
-// Draw a control, called by window server.
-// ----------------------------------------------------------------------------
-//
-void CStatisticsContainer::Draw(const TRect& /*aRect*/) const
- {
- // CWindowGc& gc = SystemGc();
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsContainer::OfferKeyEventL
-//
-// Handles key events.
-// ----------------------------------------------------------------------------
-//
-TKeyResponse CStatisticsContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType)
- {
- if (aType != EEventKey)
- {
- return EKeyWasNotConsumed;
- }
-
- if (iListBox)
- {
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- else
- {
- return EKeyWasNotConsumed;
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsContainer::SaveActiveLine
-//
-// Makes the iListBox member save its focus position
-// ----------------------------------------------------------------------------
-//
-void CStatisticsContainer::SaveActiveLine()
- {
- ((CMenuListBox*)iListBox)->SaveFocusPosition();
- }
-
-// End of File
--- a/stifui/stifui/src/StatisticsView.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,350 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CStatisticsView class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <eikmenub.h>
-#include <aknViewAppUi.h>
-#include <aknlistquerydialog.h>
-#include <barsread.h> //TResourceReader
-#include <Stifui.rsg>
-#include "AppUIAppUi.h"
-#include "Stifui.hrh"
-#include "StatisticsView.h"
-#include "StatisticsContainer.h"
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CStatisticsView::ConstructL
-//
-// Symbian OS two-phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CStatisticsView::ConstructL()
- {
- CView::ConstructL();
- BaseConstructL( R_APPUI_STATISTICSVIEW );
- iCurrentTestCase = 0;
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsView::~CStatisticsView
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CStatisticsView::~CStatisticsView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsView::Id
-//
-// Returns view´s id.
-// ----------------------------------------------------------------------------
-//
-TUid CStatisticsView::Id() const
- {
- return TUid::Uid(EStatisticsViewId);
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsView::HandleCommandL
-//
-// Handles a command.
-// ----------------------------------------------------------------------------
-//
-void CStatisticsView::HandleCommandL(TInt aCommand)
- {
- if ( aCommand >= ECmdFilterByModule && aCommand < ECmdFilterByTestCaseFile ) // 0x1000 - 0x1FFF
- {
- TInt moduleNumber = aCommand - ECmdFilterByModule;
-
- RRefArray<TDesC> moduleName;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( moduleName );
- if( KErrNone != ret )
- {
- moduleName.Reset();
- moduleName.Close();
- User::Leave( ret );
- }
- //iFilterModule = testModules[moduleNumber];
-
- iContainer->FilterCasesByModuleL( moduleName[moduleNumber] );
-
- moduleName.Reset();
- moduleName.Close();
-
- return;
- }
-
- if ( aCommand >= ECmdFilterByTestCaseFile && aCommand < ECmdNOFiltering )
- {
- TInt testCaseFileNumber = aCommand - ECmdFilterByTestCaseFile;
- RRefArray<TDesC> testCaseFileName;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( testCaseFileName );
- if( KErrNone != ret )
- {
- testCaseFileName.Reset();
- testCaseFileName.Close();
- User::Leave( ret );
- }
-
- iContainer->FilterCasesByTCFileNameL( testCaseFileName[testCaseFileNumber] );
-
- testCaseFileName.Reset();
- testCaseFileName.Close();
-
- return;
- }
-
- if ( aCommand == ECmdNOFiltering )
- {
- iContainer->NoFilteringL();
- return;
- }
-
- switch ( aCommand )
- {
- case ECmdStartCases:
- {
- iCurrentTestCase = iContainer->CurrentItemIndex();
- StartTestCasesL();
- break;
- }
- case EAknSoftkeyBack:
- {
- AppUi()->HandleCommandL( EAppUIGoBack );
- break;
- }
- default:
- {
- AppUi()->HandleCommandL( aCommand );
- break;
- }
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsView::HandleClientRectChange
-//
-// Handles client rect changes.
-// ----------------------------------------------------------------------------
-//
-void CStatisticsView::HandleClientRectChange()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsView::DoActivateL
-//
-// Initializes view when activated.
-// ----------------------------------------------------------------------------
-//
-void CStatisticsView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- if (!iContainer)
- {
- ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("StatisticsView: DoActivateL"));
- //message = _L("eng.open ret:");
- //message.AppendNum( ret , EDecimal );
- //AppUi()->iLogger->Log( message );
- iContainer = new (ELeave) CStatisticsContainer;
- iContainer->SetMopParent(this);
- iContainer->ConstructL( ClientRect(), this );
- ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("StatisticsView: container constructed"));
- AppUi()->AddToStackL( *this, iContainer );
- }
- iContainer->SetCurrentItemIndex(iCurrentTestCase);
-
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
-
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_STATS);
- iNaviDecorator = np->CreateNavigationLabelL( reader );
- CleanupStack::PopAndDestroy(); // resource reader
- np->PushL(*iNaviDecorator);
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsView::DoDeactivate
-//
-// Deactivates view.
-// ----------------------------------------------------------------------------
-//
-void CStatisticsView::DoDeactivate()
- {
- if ( iContainer )
- {
- iContainer->SaveActiveLine();
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsView::DynInitMenuPaneL
-//
-// Initializes menu pane.
-// ----------------------------------------------------------------------------
-//
-void CStatisticsView::DynInitMenuPaneL(
- TInt aResourceId, CEikMenuPane* aMenuPane)
- {
-
- // Test modules are added to filter by test module submenu if the submenu is opened
- if (R_APPUI_FILTERBYMODULES_MENU == aResourceId)
- {
- RRefArray<TDesC> modules;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( modules );
- if( KErrNone != ret )
- {
- modules.Reset();
- modules.Close();
- User::Leave( ret );
- }
-
- TInt moduleCount = modules.Count();
-
- TInt i;
- CEikMenuPaneItem::SData item;
-
- item.iCommandId = ECmdFilterByModule;
- item.iFlags = 0;
- item.iCascadeId = 0;
-
- for (i = 0; i < moduleCount; i++)
- {
- item.iText = modules[i];
- aMenuPane->AddMenuItemL(item);
- item.iCommandId++; // command IDs 0x1000 - 0x1FFF are reserved for modules in hrh file
- }
-
- modules.Reset();
- modules.Close();
- }
-
- // Test case files are added to filter by test case file submenu if the submenu is opened
- if (R_APPUI_FILTER_BY_TESTCASEFILE_MENU == aResourceId)
- {
- RRefArray<TDesC> testCaseFiles;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( testCaseFiles );
- if( KErrNone != ret )
- {
- testCaseFiles.Reset();
- testCaseFiles.Close();
- User::Leave( ret );
- }
-
- TInt testCaseFileCount = testCaseFiles.Count();
-
- TInt i;
- CEikMenuPaneItem::SData item;
-
- item.iCommandId = ECmdFilterByTestCaseFile;
- item.iFlags = 0;
- item.iCascadeId = 0;
-
- for (i = 0; i < testCaseFileCount; i++)
- {
- item.iText = testCaseFiles[i];
- aMenuPane->AddMenuItemL(item);
- item.iCommandId++; // command IDs 0x2000 - 0x2FFF are reserved for test case files in hrh file
- }
-
- testCaseFiles.Reset();
- testCaseFiles.Close();
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsView::HandleListBoxEventL
-//
-// Handles a list box event.
-// ----------------------------------------------------------------------------
-//
-void CStatisticsView::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
- {
- if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
- {
- //iCurrentTestCase = aListBox->CurrentItemIndex();
- //iCurrentTestCase = iContainer->CurrentItemIndex();
- //StartTestCases();
- }
- }
-
-// ----------------------------------------------------------------------------
-// CStatisticsView::StartTestCases
-//
-// Starts test case(s) which is selected in containers list box.
-// First shows a list query if user wants just start test case or
-// if he wants to start test case and view test case output.
-// ----------------------------------------------------------------------------
-//
-void CStatisticsView::StartTestCasesL()
- {
- TInt selectedItem(0);
- CAknListQueryDialog* startDialog = new (ELeave) CAknListQueryDialog(&selectedItem);
- if ( startDialog->ExecuteLD(R_START_TESTCASE_LIST_QUERY) )
- {
- RRefArray<CTestInfo> testInfo;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCases( testInfo );
- if( KErrNone != ret )
- {
- testInfo.Reset();
- testInfo.Close();
- User::Leave( ret );
- }
- TInt testCaseNumber = testInfo[0].TestCaseNum();
- TInt testCaseIndex( 0 );
-
- //CUIEngineContainer* container = NULL;
- ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->StartTestCase( testInfo[testCaseNumber], testCaseIndex );
- if( KErrNone != ret )
- {
- User::Leave( ret );
- }
- testInfo.Reset();
- testInfo.Close();
-
- // Increment the counter value
- ((CAppUIAppUi*)AppUi())->iUIStoreHandler->iExecutedTestCaseCount++;
-
- }
-
- }
-
-// End of File
--- a/stifui/stifui/src/TestCaseMenuContainer.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestCaseMenuContainer class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include "TestCaseMenuContainer.h"
-#include "Stifui.hrh"
-#include <Stifui.rsg>
-
-#include <aknlists.h> //ListBox
-#include <barsread.h> // for TResourceReader
-
-#include <aknnotewrappers.h>
-
-#include "MenuListBox.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CTestCaseMenuContainer::ConstructL
-//
-// Symbian OS two phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseMenuContainer::ConstructL(const TRect& aRect)
- {
- CreateWindowL();
-
- iListBox = CMenuListBox::NewL(ETestCaseMenuViewId);
- iListBox->SetContainerWindowL( *this );
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC( reader, R_TESTCASE_MENU_LISTBOX );
- iListBox->SetListBoxObserver( this );
- iListBox->ConstructFromResourceL( reader );
- CleanupStack::PopAndDestroy(); // resource stuffs.
-
- // Create Scroller control for ListBox and set its visibility
- // !!! Not needed yet because there are only two items in list box.
- // If items are added later, scroller may be taken to use
- //iListBox->CreateScrollBarFrameL(ETrue);
- //iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
-
- iListBox->ActivateL();
- ((CMenuListBox*)iListBox)->SetPreviousFocus();
-
- SetRect(aRect);
- ActivateL();
- }
-
-// Destructor
-CTestCaseMenuContainer::~CTestCaseMenuContainer()
- {
- if ( iListBox )
- {
- iListBox->Reset();
- delete iListBox;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuContainer::SizeChanged
-//
-// Called by framework when the view size is changed.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseMenuContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuContainer::CountComponentControls
-//
-// Gets a count of the component controls of this list box control.
-// ----------------------------------------------------------------------------
-//
-TInt CTestCaseMenuContainer::CountComponentControls() const
- {
- return 1; // return nbr of controls inside this container
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuContainer::ComponentControl
-//
-// Gets a pointer to the specified component control.
-// ----------------------------------------------------------------------------
-//
-CCoeControl* CTestCaseMenuContainer::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuContainer::Draw
-//
-// Draw a control, called by window server.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseMenuContainer::Draw(const TRect& /*aRect*/) const
- {
- // CWindowGc& gc = SystemGc();
- }
-
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuContainer::HandleListBoxEventL
-//
-// Handles list box events.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseMenuContainer::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType)
- {
- if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
- {
- HandleSelectedListItemL( aListBox->CurrentItemIndex() );
-
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuContainer::HandleSelectedListItemL
-//
-// Method HandleSelectedListItemL handles valid index.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseMenuContainer::HandleSelectedListItemL( TInt aIndex )
- {
- TInt selection = aIndex;
-
- switch ( selection )
- {
- case 0:
- //Vaihda StartCasesView aktiiviseksi
- ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdGoToStartCasesView);
- break;
- case 1:
- ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(ECmdGoToStartedCasesView);
- break;
- default:
- break;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuContainer::OfferKeyEventL
-//
-// Handles key events.
-// ----------------------------------------------------------------------------
-//
-TKeyResponse CTestCaseMenuContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType)
- {
- if (aType != EEventKey)
- {
- return EKeyWasNotConsumed;
- }
-
- switch ( aKeyEvent.iCode )
- {
- case EKeyLeftArrow:
- case EKeyRightArrow:
- { /* Left ja right key eventit valitetaan AppUille joka hoitaa siirtymisen toisiin nakymiin */
- return EKeyWasNotConsumed;
- //break;
- }
- default:
- {
- //Muut Key eventit valitetaan listboxille, joka hoitaa ne
- if (iListBox)
- {
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- }
- }
- return EKeyWasNotConsumed;
-}
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuContainer::GetActiveLine
-//
-// Get currently selected items index.
-// ----------------------------------------------------------------------------
-//
-TInt CTestCaseMenuContainer::GetActiveLine()
- {
- return iListBox->CurrentItemIndex();
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuContainer::SaveActiveLine
-//
-// Makes the iListBox member save its focus position
-// ----------------------------------------------------------------------------
-//
-void CTestCaseMenuContainer::SaveActiveLine()
- {
- ((CMenuListBox*)iListBox)->SaveFocusPosition();
- }
-
-// End of File
--- a/stifui/stifui/src/TestCaseMenuView.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestCaseMenuView class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <aknViewAppUi.h>
-#include <barsread.h> //TResourceReader
-#include <Stifui.rsg>
-#include "TestCaseMenuView.h"
-#include "TestCaseMenuContainer.h"
-#include "Stifui.hrh"
-#include "AppUIAppUi.h" // loggerin kayttoa varten, muuten ei tarvittaisi
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CTestCaseMenuView::ConstructL
-//
-// Symbian OS two phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseMenuView::ConstructL()
- {
- CView::ConstructL();
- BaseConstructL( R_APPUI_TESTCASEMENUVIEW );
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuView::~CTestCaseMenuView
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestCaseMenuView::~CTestCaseMenuView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuView::Id
-//
-// Returns view´s id.
-// ----------------------------------------------------------------------------
-//
-TUid CTestCaseMenuView::Id() const
- {
- return TUid::Uid(ETestCaseMenuViewId); //KTestCaseMenuViewId;
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuView::HandleCommandL
-//
-// Handles a command.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseMenuView::HandleCommandL(TInt aCommand)
- {
- switch ( aCommand )
- {
- case EAknSoftkeyBack:
- {
- AppUi()->HandleCommandL(EAppUIGoBack);
- break;
- }
- case EAknCmdOpen:
- {
- TInt a = iContainer->GetActiveLine();
- iContainer->HandleSelectedListItemL( a );
- }
- break;
- default:
- {
- AppUi()->HandleCommandL( aCommand );
- break;
- }
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuView::HandleClientRectChange
-//
-// Handles client rect changes.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseMenuView::HandleClientRectChange()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuView::DoActivateL
-//
-// Initializes view when activated.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseMenuView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- if (!iContainer)
- {
- ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("TestCaseMenu: DoActivateL"));
- //message = _L("eng.open ret:");
- //message.AppendNum( ret , EDecimal );
- //AppUi->iLogger->Log( message );
- iContainer = new (ELeave) CTestCaseMenuContainer;
- iContainer->SetMopParent(this);
- iContainer->ConstructL( ClientRect() );
- ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("TestCaseMenu: container constructed"));
- AppUi()->AddToStackL( *this, iContainer );
- }
-
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
-
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_TESTCASES);
- iNaviDecorator = np->CreateNavigationLabelL( reader );
- CleanupStack::PopAndDestroy(); // resource reader
- np->PushL(*iNaviDecorator);
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseMenuView::DoDeactivate
-//
-// Deactivates view.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseMenuView::DoDeactivate()
- {
- if ( iContainer )
- {
- iContainer->SaveActiveLine();
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// End of File
--- a/stifui/stifui/src/TestCaseOutputContainer.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,328 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestCaseOutputContainer class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include "TestCaseOutputContainer.h"
-#include <Stifui.rsg>
-#include "Stifui.hrh"
-#include "AppUIAppUi.h"
-
-#include <aknlists.h> // ListBox
-#include <AknIconArray.h> // CAknIconArray
-#include <badesca.h> // CDesCArray
-#include <eikclbd.h> // CColumnListBoxData
-#include <aknnotewrappers.h>
-
-//#include "UIStoreIf.h"
-//#include "UIStore.h"
-//#include "UIEngine.h"
-//#include "UIEngineContainer.h"
-
-#include <stifinternal/UIStoreIf.h>
-#include <stifinternal/UIStore.h>
-#include <stifinternal/UIEngine.h>
-#include <stifinternal/UIEngineContainer.h>
-
-#include "MenuListBox.h"
-
-//#include <gdi.h>
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CTestCaseOutputContainer::ConstructL
-//
-// Symbian OS two phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseOutputContainer::ConstructL(const TRect& aRect, CStartedTestCase* aStartedTestCase ) //TInt aExecutedTestCaseCount )
- {
- CreateWindowL();
-
- iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
-
- iListBox = CMenuListBox::NewL(ETestCaseOutputViewId);
- iListBox->SetContainerWindowL( *this );
- iListBox->SetListBoxObserver( this );
- iListBox->ConstructL(this, EAknListBoxSelectionList);
-
- //Create Scroller control for ListBox and set its visibility
- iListBox->CreateScrollBarFrameL(ETrue);
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
-
- if( iUIStore )
- {
- iListBoxModel = CTestOutputListBoxModel::NewL( aStartedTestCase );
- iListBox->Model()->SetItemTextArray( iListBoxModel );
- }
- else
- {
- //User::Leave( syy?? )
- }
- iListBox->ActivateL();
- ((CMenuListBox*)iListBox)->SetPreviousFocus();
-
- SetRect(aRect);
- ActivateL();
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputContainer::~CTestCaseOutputContainer
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestCaseOutputContainer::~CTestCaseOutputContainer()
- {
- // Discard and destroy the font
- //CWindowGc* listBoxGc = iListBox->View()->ItemDrawer()->Gc();
- //listBoxGc->DiscardFont();
-
- //CWindowGc& gc = SystemGc();
- //gc.DiscardFont();
-
- //iCoeEnv->ScreenDevice()->ReleaseFont(iListBoxFont);
-
- delete iListBox;
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputContainer::SizeChanged
-//
-// Called by framework when the view size is changed.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseOutputContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputContainer::CountComponentControls
-//
-// Gets a count of the component controls of this list box control.
-// ----------------------------------------------------------------------------
-//
-TInt CTestCaseOutputContainer::CountComponentControls() const
- {
- return 1; // return nbr of controls inside this container
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputContainer::ComponentControl
-//
-// Gets a pointer to the specified component control.
-// ----------------------------------------------------------------------------
-//
-CCoeControl* CTestCaseOutputContainer::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputContainer::Draw
-//
-// Draw a control, called by window server.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseOutputContainer::Draw(const TRect& /*aRect*/) const
- {
- // CWindowGc& gc = SystemGc();
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputContainer::HandleListBoxEventL
-//
-// Handles list box events.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseOutputContainer::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
- {
- if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
- {
- //TBuf<200> outputLine;
- //CAknNoteDialog* outputLineNote = new (ELeave) CAknNoteDialog;
- //outputLineNote->SetTextL( iListBoxModel->MdcaPoint(iListBox->CurrentItemIndex()) );
- //outputLineNote->RunDlgLD();
-
-
-
- //CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
- //informationNote->SetTextL( iListBoxModel->MdcaPoint(iListBox->CurrentItemIndex()) );
- //informationNote->SetTextPluralityL( ETrue );
- //informationNote->SetTextL( _L("Number of cases: %d") );
- //informationNote->SetTextNumberL( count );
- //informationNote->ExecuteLD();
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputContainer::OfferKeyEventL
-//
-// Handles key events.
-// ----------------------------------------------------------------------------
-//
-TKeyResponse CTestCaseOutputContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType)
-{
- if (aType != EEventKey)
- {
- return EKeyWasNotConsumed;
- }
-
- if (iListBox)
- {
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- else
- {
- return EKeyWasNotConsumed;
- }
-
- /*
- switch ( aKeyEvent.iCode )
- {
- case EKeyLeftArrow:
- case EKeyRightArrow:
- { */ /* Left ja right key eventit valitetaan AppUille joka hoitaa siirtymisen toisiin nakymiin */
- /* return EKeyWasNotConsumed;
- break;
- }
- default:
- {
- //Muut Key eventit valitetaan listboxille, joka hoitaa ne
- if (iListBox)
- {
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- else
- {
- return EKeyWasNotConsumed;
- }
- break;
- }
- }*/
-}
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputContainer::OutputUpdateL
-//
-// Handles addition of item to list box.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseOutputContainer::OutputUpdateL()
- {
- if ( iListBox )
- {
- iListBox->HandleItemAdditionL();
- iListBox->DrawNow();
- }
- }
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ----------------------------------------------------------------------------
-// CTestOutputListBoxModel::NewL
-//
-// Two-phased constructor.
-// ----------------------------------------------------------------------------
-//
-CTestOutputListBoxModel* CTestOutputListBoxModel::NewL(CStartedTestCase* aStartedTestCase /*, HBufC* aBuffer*/)
- {
-
- CTestOutputListBoxModel* self = new ( ELeave ) CTestOutputListBoxModel();
- CleanupStack::PushL( self );
- //self->ConstructL();
- //self->iBuffer = aBuffer;
- self->iBuffer = HBufC::NewL( 150 );
- self->iStartedTestCase = aStartedTestCase;
- CleanupStack::Pop();
- return self;
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestOutputListBoxModel::ConstructL
-//
-// Symbian OS two phased constructor.
-// Completes the construction of the object.
-// ----------------------------------------------------------------------------
-//
-void CTestOutputListBoxModel::ConstructL()
- {
- //iBuffer = HBufC::NewLC( KMaxInfoName + KMaxName + 2 );
- }
-
-// ----------------------------------------------------------------------------
-// CTestOutputListBoxModel::~CTestCaseOutputContainer
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestOutputListBoxModel::~CTestOutputListBoxModel()
- {
- delete iBuffer;
- }
-
-// ----------------------------------------------------------------------------
-// CTestOutputListBoxModel::MdcaCount
-//
-// Returns the number of descriptor elements in the array.
-// ----------------------------------------------------------------------------
-//
-TInt CTestOutputListBoxModel::MdcaCount() const
- {
-
- TInt rows = iStartedTestCase->PrintArray().Count();
- return rows;
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestOutputListBoxModel::MdcaPoint
-//
-// Indexes into a descriptor array.
-// ----------------------------------------------------------------------------
-//
-TPtrC CTestOutputListBoxModel::MdcaPoint(TInt aIndex) const
- {
- const RPointerArray<CTestProgress> printArray = iStartedTestCase->PrintArray();
-
- TPtr buffer( iBuffer->Des() );
- buffer.Zero();
- buffer.Append(_L("\t"));
- buffer.Append(printArray[aIndex]->iDescription);
- buffer.Append(_L(" "));
- buffer.Append(printArray[aIndex]->iText);
-
- return *iBuffer;
-
- }
-
-// End of File
--- a/stifui/stifui/src/TestCaseOutputView.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,380 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestCaseOutputView class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <eikmenub.h>
-#include <aknViewAppUi.h>
-#include <akntitle.h>
-#include <barsread.h> //TResourceReader
-#include <Stifui.rsg>
-
-//#include "UIStoreIf.h"
-//#include "UIStore.h"
-//#include "UIEngine.h"
-//#include "UIEngineContainer.h"
-
-#include <stifinternal/UIStoreIf.h>
-#include <stifinternal/UIStore.h>
-#include <stifinternal/UIEngine.h>
-#include <stifinternal/UIEngineContainer.h>
-
-#include "TestCaseOutputView.h"
-#include "TestCaseOutputContainer.h"
-#include "AppUIAppUi.h"
-#include "Stifui.hrh"
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CTestCaseOutputView::ConstructL
-//
-// Symbian OS two-phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseOutputView::ConstructL()
- {
- CView::ConstructL();
- BaseConstructL( R_APPUI_TESTCASEOUTPUTVIEW );
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputView::~CTestCaseOutputView
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestCaseOutputView::~CTestCaseOutputView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
-
- iCurrentTestCase = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputView::Id
-//
-// Returns view´s id.
-// ----------------------------------------------------------------------------
-//
-TUid CTestCaseOutputView::Id() const
- {
- return TUid::Uid(ETestCaseOutputViewId);
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputView::HandleCommandL
-//
-// Handles a command.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseOutputView::HandleCommandL(TInt aCommand)
- {
- switch ( aCommand )
- {
- case EAknSoftkeyBack:
- {
- AppUi()->HandleCommandL(EAppUIGoBack);
- break;
- }
- case ECmdPauseTestCase:
- {
- /*
- TInt index( 0 );
- index = ( ( CAppUIAppUi* )AppUi() )->GetTestCaseIndex();
- CStartedTestCase* startedTestCase = NULL;
- TRAPD( ret, startedTestCase = &iUIStore->StartedTestCaseL( index ) );
- if( ret != KErrNone )
- {
- // Leave
- }
- */
- CStartedTestCase* startedTestCase =
- ( ( CAppUIAppUi* )AppUi() )->GetStartedTestCase();
- startedTestCase->UIEngineContainer().PauseTest();
- break;
- }
- case ECmdResumeTestCase:
- {
- /*
- TInt index( 0 );
- index = ( ( CAppUIAppUi* )AppUi() )->GetTestCaseIndex();
- CStartedTestCase* startedTestCase = NULL;
- TRAPD( ret, startedTestCase = &iUIStore->StartedTestCaseL( index ) );
- if( ret != KErrNone )
- {
- // Leave
- }
- */
- CStartedTestCase* startedTestCase =
- ( ( CAppUIAppUi* )AppUi() )->GetStartedTestCase();
- startedTestCase->UIEngineContainer().ResumeTest();
- break;
- }
- case ECmdAbortTestCase:
- {
- /*
- TInt index( 0 );
- index = ( ( CAppUIAppUi* )AppUi() )->GetTestCaseIndex();
- CStartedTestCase* startedTestCase = NULL;
- TRAPD( ret, startedTestCase = &iUIStore->StartedTestCaseL( index ) );
- if( ret != KErrNone )
- {
- // Leave
- }
- */
- CStartedTestCase* startedTestCase =
- ( ( CAppUIAppUi* )AppUi() )->GetStartedTestCase();
- startedTestCase->UIEngineContainer().CancelTest();
- break;
- }
- default:
- {
- AppUi()->HandleCommandL( aCommand );
- break;
- }
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputView::HandleClientRectChange
-//
-// Handles client rect changes.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseOutputView::HandleClientRectChange()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputView::DoActivateL
-//
-// Initializes view when activated.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseOutputView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- if (!iContainer)
- {
- iContainer = new (ELeave) CTestCaseOutputContainer;
- iContainer->SetMopParent(this);
-
- iCurrentTestCase = ( ( CAppUIAppUi* )AppUi() )->GetStartedTestCase();
- iContainer->ConstructL( ClientRect(), iCurrentTestCase );
-
- AppUi()->AddToStackL( *this, iContainer );
- }
- PrintTestCaseStateL();
-
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
-
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_TESTCASE_OUTPUT);
- iNaviDecorator = np->CreateNavigationLabelL( reader );
- CleanupStack::PopAndDestroy(); // resource reader
- np->PushL(*iNaviDecorator);
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputView::DoDeactivate
-//
-// Deactivates view.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseOutputView::DoDeactivate()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
-
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- // Because DoDeactivate method can't leave we must
- // catch unexpected leaves.
- TInt ret = KErrNone;
- TRAP( ret,
- CAknTitlePane* tp=(CAknTitlePane*)sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle));
- if ( tp != NULL )
- {
- tp->SetTextToDefaultL(); // Set application name.
- }
- ); // TRAPD end
-
- delete iNaviDecorator;
- iNaviDecorator = NULL;
-
- iCurrentTestCase = NULL;
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputView::DynInitMenuPaneL
-//
-// Initializes menu pane.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseOutputView::DynInitMenuPaneL(
- TInt aResourceId, CEikMenuPane* aMenuPane)
- {
- CStartedTestCase* startedTestCase =
- ( ( CAppUIAppUi* )AppUi() )->GetStartedTestCase();
-
- if (R_APPUI_TESTCASEOUTPUTVIEW_MENU == aResourceId)
- {
-
- if ( startedTestCase->Status() == CUIStoreIf::EStatusRunning )
- {
- if( startedTestCase->UIEngineContainer().State() == CUIEngineContainer::ENotStarted )
- {
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
- }
- else if( startedTestCase->UIEngineContainer().State() == CUIEngineContainer::ERunning )
- {
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, EFalse );
- }
- else if( startedTestCase->UIEngineContainer().State() == CUIEngineContainer::EPaused )
- {
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, EFalse );
- }
- else if( startedTestCase->UIEngineContainer().State() == CUIEngineContainer::EExecuted )
- {
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
- }
- else if( startedTestCase->UIEngineContainer().State() == CUIEngineContainer::EFinished )
- {
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
- }
-
- }
- else
- {
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
- }
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputView::OutputUpdate
-//
-// Receives output update notification from AppUI.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseOutputView::OutputUpdateL( CStartedTestCase* /*aTestCase*/ )
- {
- PrintTestCaseStateL();
- iContainer->OutputUpdateL();
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputView::TestCaseStateChangedL
-//
-// Receives test case state changed notification from AppUI.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseOutputView::TestCaseStateChangedL()
- {
- PrintTestCaseStateL();
- iContainer->OutputUpdateL();
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestCaseOutputView::PrintTestCaseState
-//
-// Prints test case state to title pane.
-// ----------------------------------------------------------------------------
-//
-void CTestCaseOutputView::PrintTestCaseStateL()
- {
- TBuf<50> statusMessage;
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CAknTitlePane* tp=(CAknTitlePane*)sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle));
-
- if ( iCurrentTestCase != NULL )
- {
- TUint status = iCurrentTestCase->Status();
-
- if( status & CUIStoreIf::EStatusRunning )
- {
- CEikonEnv::Static()->ReadResource( statusMessage,
- R_TESTCASE_STATE_RUNNING );
- }
- else if( status & CUIStoreIf::EStatusExecuted &&
- status & CUIStoreIf::EStatusPassed )
- {
- CEikonEnv::Static()->ReadResource( statusMessage,
- R_TESTCASE_STATE_PASSED );
- }
- else if( status & CUIStoreIf::EStatusExecuted &&
- status & CUIStoreIf::EStatusFailed )
- {
- CEikonEnv::Static()->ReadResource( statusMessage,
- R_TESTCASE_STATE_FAILED );
- }
- else if( status & CUIStoreIf::EStatusAborted )
- {
- CEikonEnv::Static()->ReadResource( statusMessage,
- R_TESTCASE_STATE_CRASHED_ABORTED );
- }
- else if( status & CUIStoreIf::EStatusCrashed )
- {
- CEikonEnv::Static()->ReadResource( statusMessage,
- R_TESTCASE_STATE_CRASHED_ABORTED );
- }
- else
- {
- CEikonEnv::Static()->ReadResource( statusMessage,
- R_TESTCASE_STATE_UNKNOWN );
- }
-
- tp->SetTextL( statusMessage );
- tp->DrawNow();
-
- }
-
- }
-
-// End of File
--- a/stifui/stifui/src/TestModulesMenuContainer.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,310 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestModulesListBoxModel class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <aknlists.h> // ListBox
-#include <barsread.h> // for TResourceReader
-#include <aknnotewrappers.h>
-
-#include "Stifui.hrh"
-#include <Stifui.rsg>
-
-//#include "UIStoreIf.h"
-//#include "UIStore.h"
-//#include "UIEngine.h"
-//#include "UIEngineContainer.h"
-
-#include <stifinternal/UIStoreIf.h>
-#include <stifinternal/UIStore.h>
-#include <stifinternal/UIEngine.h>
-#include <stifinternal/UIEngineContainer.h>
-
-#include "TestModulesMenuContainer.h"
-#include "AppUIAppUi.h"
-
-#include "MenuListBox.h"
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CTestModulesListBoxModel::NewL
-//
-// Two-phased constructor.
-// ----------------------------------------------------------------------------
-//
-CTestModulesListBoxModel* CTestModulesListBoxModel::NewL(RRefArray<TDesC> aTestModules)
- {
-
- CTestModulesListBoxModel* self = new ( ELeave ) CTestModulesListBoxModel();
- CleanupStack::PushL( self );
- self->iBuffer = HBufC::NewL( 130 );
- self->iTestModules = aTestModules;
- CleanupStack::Pop();
- return self;
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesListBoxModel::ConstructL
-//
-// Symbian OS two phased constructor.
-// Completes the construction of the object.
-// ----------------------------------------------------------------------------
-//
-void CTestModulesListBoxModel::ConstructL()
- {
- //iBuffer = HBufC::NewLC( KMaxInfoName + KMaxName + 2 );
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesListBoxModel::~CTestCaseOutputView
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestModulesListBoxModel::~CTestModulesListBoxModel()
- {
- delete iBuffer;
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesListBoxModel::MdcaCount
-//
-// Returns the number of descriptor elements in the array.
-// ----------------------------------------------------------------------------
-//
-TInt CTestModulesListBoxModel::MdcaCount() const
- {
- return iTestModules.Count();
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesListBoxModel::MdcaPoint
-//
-// Indexes into a descriptor array.
-// ----------------------------------------------------------------------------
-//
-TPtrC CTestModulesListBoxModel::MdcaPoint(TInt aIndex) const
- {
- TPtrC testModule = (iTestModules)[aIndex];
- TPtr buffer( iBuffer->Des() );
- buffer.Zero();
-
- buffer.Append(_L("\t"));
- buffer.Append( testModule );
-
- return *iBuffer;
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuContainer::ConstructL
-//
-// Symbian OS two phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CTestModulesMenuContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
- {
- _LIT( KErrMessage, "Error loading modules! Check Test engine log.");
- CreateWindowL();
-
- iListBox = CMenuListBox::NewL(ETestModulesMenuViewId);
- iListBox->SetContainerWindowL( *this );
- iListBox->SetListBoxObserver( aListBoxObserver /*this*/ ); // jos peritty MEikListBoxObserver:sta
- iListBox->ConstructL(this, EAknListBoxSelectionList /*EAknListBoxMarkableList*/ );
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: ListBox constructed"));
-
- //Create Scroller control for ListBox and set its visibility
- iListBox->CreateScrollBarFrameL(ETrue);
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
-
- iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
-
- if( iUIStore )
- {
- /*const CFixedFlatArray<TTestInfo>& allCases = iData->AllCases();
- const TInt KTestCaseCount = allCases.Count();
- for (TInt i=0; i < KTestCaseCount; i++)
- {
- iTestCasesInView.Append(&(allCases[i]));
- } */
-
- //RRefArray<TDesC> modules;
- TInt ret = iUIStore->Modules( iModules );
- if( ret != KErrNone )
- {
- //iModules.Reset();
- //iModules.Close();
- TMessageBoxUtil::ShowErrorNoteL( KErrMessage );
- }
-
- iListBoxModel = CTestModulesListBoxModel::NewL( iModules );
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: ListBox model"));
-
-
- iListBox->Model()->SetItemTextArray(iListBoxModel);
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("StartCasesContainer: ListBox model set"));
-
- }
- else
- {
- // General error becouse UIStore should be opened in AppUI when
- // program starts.
- User::Leave( KErrGeneral );
- }
-
- iListBox->ActivateL();
- ((CMenuListBox*)iListBox)->SetPreviousFocus();
- SetRect(aRect);
- ActivateL();
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuContainer::~CTestCaseOutputView
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestModulesMenuContainer::~CTestModulesMenuContainer()
- {
-
- iModules.Reset();
- iModules.Close();
-
- if( iListBox )
- {
- delete iListBox;
- iListBox = NULL;
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuContainer::SizeChanged
-//
-// Called by framework when the view size is changed.
-// ----------------------------------------------------------------------------
-//
-void CTestModulesMenuContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuContainer::CountComponentControls
-//
-// Gets a count of the component controls of this list box control.
-// ----------------------------------------------------------------------------
-//
-TInt CTestModulesMenuContainer::CountComponentControls() const
- {
- return 1; // return nbr of controls inside this container
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuContainer::ComponentControl
-//
-// Gets a pointer to the specified component control.
-// ----------------------------------------------------------------------------
-//
-CCoeControl* CTestModulesMenuContainer::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuContainer::Draw
-//
-// Draw a control, called by window server.
-// ----------------------------------------------------------------------------
-//
-void CTestModulesMenuContainer::Draw(const TRect& /*aRect*/) const
- {
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuContainer::OfferKeyEventL
-//
-// Handles key events.
-// ----------------------------------------------------------------------------
-//
-TKeyResponse CTestModulesMenuContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType)
- {
- if (aType != EEventKey)
- {
- return EKeyWasNotConsumed;
- }
-
- switch ( aKeyEvent.iCode )
- {
- case EKeyLeftArrow:
- case EKeyRightArrow:
- { /* Left ja right key eventit valitetaan AppUille joka hoitaa siirtymisen toisiin nakymiin */
- return EKeyWasNotConsumed;
- //break;
- }
- default:
- {
- //Muut Key eventit valitetaan listboxille, joka hoitaa ne
- if (iListBox)
- {
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- }
- }
- return EKeyWasNotConsumed;
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuContainer::CurrentItemIndex
-//
-// Returns current item index in list box.
-// ----------------------------------------------------------------------------
-//
-TInt CTestModulesMenuContainer::CurrentItemIndex()
- {
- return iListBox->CurrentItemIndex();
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuContainer::SaveActiveLine
-//
-// Makes the iListBox member save its focus position
-// ----------------------------------------------------------------------------
-//
-void CTestModulesMenuContainer::SaveActiveLine()
- {
- ((CMenuListBox*)iListBox)->SaveFocusPosition();
- }
-
-// End of File
--- a/stifui/stifui/src/TestSetBaseMenuContainer.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetBaseMenuContainer class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include "TestSetBaseMenuContainer.h"
-#include "Stifui.hrh"
-
-#include <Stifui.rsg>
-
-#include <aknlists.h> //ListBox
-#include <barsread.h> // for TResourceReader
-
-#include <aknnotewrappers.h>
-
-#include "MenuListBox.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuContainer::ConstructL
-//
-// Symbian OS two phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CTestSetBaseMenuContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
- {
- CreateWindowL();
-
- iListBox = CMenuListBox::NewL(ETestSetMenuViewId);
- iListBox->SetContainerWindowL( *this );
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC( reader, R_TESTSETBASE_MENU_LISTBOX );
- iListBox->SetListBoxObserver( aListBoxObserver );
- iListBox->ConstructFromResourceL( reader );
- CleanupStack::PopAndDestroy(); // resource stuffs.
-
- // Create Scroller control for ListBox and set its visibility
- // !!! Not needed yet because there are only two items in list box.
- // If items are added later, scroller may be taken to use
- //iListBox->CreateScrollBarFrameL(ETrue);
- //iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
-
- iListBox->ActivateL();
- ((CMenuListBox*)iListBox)->SetPreviousFocus();
-
- SetRect(aRect);
- ActivateL();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuContainer::~CTestSetBaseMenuContainer
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestSetBaseMenuContainer::~CTestSetBaseMenuContainer()
- {
- if ( iListBox )
- {
- iListBox->Reset();
- delete iListBox;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuContainer::SizeChanged
-//
-// Called by framework when the view size is changed.
-// ----------------------------------------------------------------------------
-//
-void CTestSetBaseMenuContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuContainer::CountComponentControls
-//
-// Gets a count of the component controls of this list box control.
-// ----------------------------------------------------------------------------
-//
-TInt CTestSetBaseMenuContainer::CountComponentControls() const
- {
- return 1; // return nbr of controls inside this container
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuContainer::ComponentControl
-//
-// Gets a pointer to the specified component control.
-// ----------------------------------------------------------------------------
-//
-CCoeControl* CTestSetBaseMenuContainer::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuContainer::Draw
-//
-// Draw a control, called by window server.
-// ----------------------------------------------------------------------------
-//
-void CTestSetBaseMenuContainer::Draw(const TRect& /*aRect*/) const
- {
- // CWindowGc& gc = SystemGc();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuContainer::OfferKeyEventL
-//
-// Handles key events..
-// ----------------------------------------------------------------------------
-//
-TKeyResponse CTestSetBaseMenuContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType)
- {
- if (aType != EEventKey)
- {
- return EKeyWasNotConsumed;
- }
-
- switch ( aKeyEvent.iCode )
- {
- case EKeyLeftArrow:
- case EKeyRightArrow:
- { /* Left ja right key eventit valitetaan AppUille joka hoitaa siirtymisen toisiin nakymiin */
- return EKeyWasNotConsumed;
- //break;
- }
- default:
- {
- //Muut Key eventit valitetaan listboxille, joka hoitaa ne
- if (iListBox)
- {
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- }
- }
- return EKeyWasNotConsumed;
-}
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuContainer::GetActiveLine
-//
-// Get currently selected items index.
-// ----------------------------------------------------------------------------
-//
-TInt CTestSetBaseMenuContainer::GetActiveLine()
- {
- return iListBox->CurrentItemIndex();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuContainer::SaveActiveLine
-//
-// Makes the iListBox member save its focus position
-// ----------------------------------------------------------------------------
-//
-void CTestSetBaseMenuContainer::SaveActiveLine()
- {
- ((CMenuListBox*)iListBox)->SaveFocusPosition();
- }
-// End of File
--- a/stifui/stifui/src/TestSetBaseMenuView.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetBaseMenuView class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <aknViewAppUi.h>
-#include <aknlists.h>
-#include <barsread.h> //TResourceReader
-#include <Stifui.rsg>
-#include "TestSetBaseMenuView.h"
-#include "TestSetBaseMenuContainer.h"
-#include "Stifui.hrh"
-#include "AppUIAppUi.h" // loggerin kayttoa varten, muuten ei tarvittaisi
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CTestSetBaseMenuView::ConstructL
-//
-// Symbian OS two-phased constructor.
-// ---------------------------------------------------------
-//
-void CTestSetBaseMenuView::ConstructL()
- {
- CView::ConstructL();
- BaseConstructL( R_APPUI_TESTSETBASEMENUVIEW );
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuView::~CTestSetBaseMenuView
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestSetBaseMenuView::~CTestSetBaseMenuView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuView::Id
-//
-// Returns view´s id.
-// ----------------------------------------------------------------------------
-//
-TUid CTestSetBaseMenuView::Id() const
- {
- return TUid::Uid(ETestSetBaseMenuViewId); //KTestSetBaseMenuViewId;
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuView::HandleCommandL
-//
-// Handles a command.
-// ----------------------------------------------------------------------------
-//
-void CTestSetBaseMenuView::HandleCommandL(TInt aCommand)
- {
- switch ( aCommand )
- {
- case EAknSoftkeyBack:
- {
- AppUi()->HandleCommandL(EAppUIGoBack);
- break;
- }
- case EAknCmdOpen:
- {
- break;
- }
- case ECmdCreateTestSet:
- {
- AppUi()->HandleCommandL(ECmdCreateTestSet);
- break;
- }
- case ECmdLoadTestSet:
- {
- AppUi()->HandleCommandL(ECmdLoadTestSet);
- break;
- }
- default:
- {
- AppUi()->HandleCommandL( aCommand );
- break;
- }
- }
- }
-
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuView::HandleListBoxEventL
-//
-// Handles a list box event.
-// ----------------------------------------------------------------------------
-//
-void CTestSetBaseMenuView::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType)
- {
- if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
- {
- switch ( aListBox->CurrentItemIndex() )
- {
- case 0:
- HandleCommandL( ECmdCreateTestSet );
- break;
- case 1:
- HandleCommandL( ECmdLoadTestSet );
- break;
- }
- }
- }
-
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuView::HandleClientRectChange
-//
-// Handles client rect changes.
-// ----------------------------------------------------------------------------
-//
-void CTestSetBaseMenuView::HandleClientRectChange()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuView::DoActivateL
-//
-// Initializes view when activated.
-// ----------------------------------------------------------------------------
-//
-void CTestSetBaseMenuView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- if (!iContainer)
- {
- ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("TestSetBaseMenu: DoActivateL"));
- //message = _L("eng.open ret:");
- //message.AppendNum( ret , EDecimal );
- //AppUi->iLogger->Log( message );
- iContainer = new (ELeave) CTestSetBaseMenuContainer;
- iContainer->SetMopParent(this);
- iContainer->ConstructL( ClientRect(), this );
- ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("TestSetBaseMenu: container constructed"));
- AppUi()->AddToStackL( *this, iContainer );
- }
-
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
-
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_TESTSET_BASE);
- iNaviDecorator = np->CreateNavigationLabelL( reader );
- CleanupStack::PopAndDestroy(); // resource reader
- np->PushL(*iNaviDecorator);
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetBaseMenuView::DoDeactivate
-//
-// Deactivates view.
-// ----------------------------------------------------------------------------
-//
-void CTestSetBaseMenuView::DoDeactivate()
- {
- if ( iContainer )
- {
- iContainer->SaveActiveLine();
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// End of File
--- a/stifui/stifui/src/TestSetInsertMenuContainer.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetInsertMenuContainer class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <aknlists.h> // ListBox
-#include <AknIconArray.h> // CAknIconArray
-#include <aknnotewrappers.h>
-
-#include <eikclbd.h> // CColumnListBoxData
-
-#include "TestSetInsertMenuContainer.h"
-#include "TestSetInsertMenuView.h"
-#include <Stifui.rsg>
-#include "Stifui.hrh"
-#include "AppUIAppUi.h"
-
-#include "MenuListBox.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuContainer::ConstructL
-//
-// Symbian OS two phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CTestSetInsertMenuContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetInsertMenuContainer: ConstructL"));
-
- iParentView = (CTestSetInsertMenuView*)aListBoxObserver;
- CreateWindowL();
-
- iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
-
- iTestCasesInView.Reset();
- //((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetInsertMenuContainer: iTCInV Reset"));
-
- iListBox = CMenuListBox::NewL(ETestSetInsertMenuViewId);
- iListBox->SetContainerWindowL( *this );
- iListBox->SetListBoxObserver( aListBoxObserver /*this*/ ); // jos peritty MEikListBoxObserver:sta
- iListBox->ConstructL(this, EAknListBoxMarkableList /*EAknListBoxSelectionList*/);
-
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetInsertMenuContainer: ListBox constructed"));
-
- //Create Scroller control for ListBox and set its visibility
- iListBox->CreateScrollBarFrameL(ETrue);
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
- iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
-
- if ( iUIStore )
- {
- RRefArray<CTestInfo> allCases;
- TInt ret = iUIStore->TestCases( allCases );
- if( KErrNone != ret )
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("iUIStore->TestCases() fails"));
- allCases.Reset();
- allCases.Close();
- User::Leave( ret );
- }
-
- const TInt KTestCaseCount = allCases.Count();
- for (TInt i=0; i < KTestCaseCount; i++)
- {
- iTestCasesInView.Append( &allCases[i] );
- }
-
- iListBoxModel = CTestCaseListBoxModel::NewL(&iTestCasesInView);
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetInsertMenuContainer: ListBox model"));
-
- iListBox->Model()->SetItemTextArray(iListBoxModel);
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetInsertMenuContainer: ListBox model set"));
-
- allCases.Reset();
- allCases.Close();
- }
- else
- {
- //User::Leave( syy?? )
- }
-
- // Creates graphic.
- SetGraphicIconL( iListBox );
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetInsertMenuContainer: icons created"));
-
- iListBox->ActivateL();
- ((CMenuListBox*)iListBox)->SetPreviousFocus();
-
- SetRect(aRect);
- ActivateL();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuContainer::~CTestSetInsertMenuContainer
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestSetInsertMenuContainer::~CTestSetInsertMenuContainer()
- {
- //iTestCasesInView.Close(); // does not delete objects whose pointers are contained in the array
- //delete iListBox;
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuContainer::SizeChanged
-//
-// Called by framework when the view size is changed.
-// ----------------------------------------------------------------------------
-//
-void CTestSetInsertMenuContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuContainer::CountComponentControls
-//
-// Gets a count of the component controls of this list box control.
-// ----------------------------------------------------------------------------
-//
-TInt CTestSetInsertMenuContainer::CountComponentControls() const
- {
- return 1; // return nbr of controls inside this container
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuContainer::ComponentControl
-//
-// Gets a pointer to the specified component control.
-// ----------------------------------------------------------------------------
-//
-CCoeControl* CTestSetInsertMenuContainer::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuContainer::Draw
-//
-// Draw a control, called by window server.
-// ----------------------------------------------------------------------------
-//
-void CTestSetInsertMenuContainer::Draw(const TRect& /*aRect*/) const
- {
- // CWindowGc& gc = SystemGc();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuContainer::OfferKeyEventL
-//
-// Handles key events.
-// ----------------------------------------------------------------------------
-//
-TKeyResponse CTestSetInsertMenuContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType )
- {
- if (aType != EEventKey)
- {
- return EKeyWasNotConsumed;
- }
-
- if (iListBox)
- {
- //if multiple items selected
- if ( iListBox->SelectionIndexes()->Count() > 0 )
- {
- TUint mask = 0x40488;
-
- //if event is enter key,
- //don´t send it to listbox
- if ( aKeyEvent.iScanCode == 0xa7
- && ( aKeyEvent.iModifiers & mask ) == 0 )
- {
- iParentView->HandleListBoxEventL( iListBox, MEikListBoxObserver::EEventEnterKeyPressed );
- return EKeyWasConsumed;
- }
- }
-
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- else
- {
- return EKeyWasNotConsumed;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuContainer::SaveActiveLine
-//
-// Makes the iListBox member save its focus position
-// ----------------------------------------------------------------------------
-//
-void CTestSetInsertMenuContainer::SaveActiveLine()
- {
- ((CMenuListBox*)iListBox)->SaveFocusPosition();
- }
-
-// End of File
--- a/stifui/stifui/src/TestSetInsertMenuView.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,399 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetInsertMenuView class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <eikmenub.h>
-#include <aknViewAppUi.h>
-#include <aknlistquerydialog.h>
-#include <aknnotewrappers.h>
-#include <barsread.h> //TResourceReader
-#include <Stifui.rsg>
-#include "TestSetInsertMenuView.h"
-#include "TestSetInsertMenuContainer.h"
-#include "TestSetMenuView.h"
-#include "AppUIAppUi.h"
-#include "Stifui.hrh"
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuView::ConstructL
-//
-// Symbian OS two-phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CTestSetInsertMenuView::ConstructL()
- {
- CView::ConstructL();
- BaseConstructL( R_INSERT_TESTCASES_VIEW );
- iCurrentTestCase = 0;
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuView::~CTestSetInsertMenuView
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestSetInsertMenuView::~CTestSetInsertMenuView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuView::Id
-//
-// Returns view´s id.
-// ----------------------------------------------------------------------------
-//
-TUid CTestSetInsertMenuView::Id() const
- {
- return TUid::Uid(ETestSetInsertMenuViewId);
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuView::HandleCommandL
-//
-// Handles a command.
-// ----------------------------------------------------------------------------
-//
-void CTestSetInsertMenuView::HandleCommandL(TInt aCommand)
- {
- if ( aCommand >= ECmdFilterByModule && aCommand < ECmdFilterByTestCaseFile ) // 0x1000 - 0x1FFF
- {
- TInt moduleNumber = aCommand - ECmdFilterByModule;
- RRefArray<TDesC> allModules;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( allModules );
- if( KErrNone != ret )
- {
- allModules.Reset();
- allModules.Close();
- User::Leave( ret );
- }
- TName moduleName = allModules[ moduleNumber ];
-
- iContainer->FilterCasesByModuleL( moduleName );
-
- allModules.Reset();
- allModules.Close();
- }
- else if ( aCommand >= ECmdFilterByTestCaseFile && aCommand < ECmdNOFiltering )
- {
- TInt testCaseFileNumber = aCommand - ECmdFilterByTestCaseFile;
- RRefArray<TDesC> allTestCases;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( allTestCases );
- if( KErrNone != ret )
- {
- allTestCases.Reset();
- allTestCases.Close();
- User::Leave( ret );
- }
- TFileName testCaseFileName = allTestCases[ testCaseFileNumber ];
-
- iContainer->FilterCasesByTCFileNameL( testCaseFileName );
-
- allTestCases.Reset();
- allTestCases.Close();
- }
- else if ( aCommand == ECmdNOFiltering )
- {
- iContainer->NoFilteringL();
- }
- else if ( aCommand == EAknCmdMark || aCommand == EAknCmdUnmark
- || aCommand == EAknMarkAll || aCommand == EAknUnmarkAll )
- {
- iContainer->HandleMarkCommandL( aCommand );
- }
- else
- {
- switch ( aCommand )
- {
- case ECmdInsertSelectedCases:
- {
- ShowInsertCasesDialogL();
- break;
- }
- case EAknSoftkeyCancel:
- {
- //iCurrentTestCase = 0;
- ( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(EAppUIGoToTestSetsMenu);
- break;
- }
- default:
- {
- AppUi()->HandleCommandL( aCommand );
- break;
- }
- }
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuView::HandleClientRectChange
-//
-// Handles client rect changes.
-// ----------------------------------------------------------------------------
-//
-void CTestSetInsertMenuView::HandleClientRectChange()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuView::DoActivateL
-//
-// Initializes view when activated.
-// ----------------------------------------------------------------------------
-//
-void CTestSetInsertMenuView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- if (!iContainer)
- {
- ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("TestSetInsertMenuView: DoActivateL"));
- //message = _L("eng.open ret:");
- //message.AppendNum( ret , EDecimal );
- //AppUi()->iLogger->Log( message );
- iContainer = new (ELeave) CTestSetInsertMenuContainer;
- iContainer->SetMopParent(this);
- iContainer->ConstructL( ClientRect(), this );
- ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("TestSetInsertMenuView: container constructed"));
- AppUi()->AddToStackL( *this, iContainer );
- }
-
- //testing
- iContainer->SetCurrentItemIndex(iCurrentTestCase);
-
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
-
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_TESTSET_INSERT);
- iNaviDecorator = np->CreateNavigationLabelL( reader );
- CleanupStack::PopAndDestroy(); // resource reader
- np->PushL(*iNaviDecorator);
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuView::DoDeactivate
-//
-// Deactivates view.
-// ----------------------------------------------------------------------------
-//
-void CTestSetInsertMenuView::DoDeactivate()
- {
- if ( iContainer )
- {
- iContainer->SaveActiveLine();
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuView::DynInitMenuPaneL
-//
-// Initializes menu pane.
-// ----------------------------------------------------------------------------
-//
-void CTestSetInsertMenuView::DynInitMenuPaneL(
- TInt aResourceId, CEikMenuPane* aMenuPane)
- {
-
- // Test modules are added to filter by test module submenu if the submenu is opened
- if (R_APPUI_FILTERBYMODULES_MENU == aResourceId)
- {
- RRefArray<TDesC> modules;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( modules );
- if( KErrNone != ret )
- {
- modules.Reset();
- modules.Close();
- User::Leave( ret );
- }
-
- TInt moduleCount = modules.Count();
-
- TInt i;
- CEikMenuPaneItem::SData item;
-
- item.iCommandId = ECmdFilterByModule;
- item.iFlags = 0;
- item.iCascadeId = 0;
-
- for (i = 0; i < moduleCount; i++)
- {
- //item.iText = modules[i].iModuleName;
- item.iText = modules[i];
- aMenuPane->AddMenuItemL(item);
- item.iCommandId++; // command IDs 0x1000 - 0x1FFF are reserved for modules in hrh file
- }
-
- modules.Reset();
- modules.Close();
-
- }
-
- // Test case files are added to filter by test case file submenu if the submenu is opened
- if (R_APPUI_FILTER_BY_TESTCASEFILE_MENU == aResourceId)
- {
- RRefArray<TDesC> testCaseFiles;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCaseFiles( testCaseFiles );
- if( KErrNone != ret )
- {
- testCaseFiles.Reset();
- testCaseFiles.Close();
- User::Leave( ret );
- }
-
- TInt testCaseFileCount = testCaseFiles.Count();
-
- TInt i;
- CEikMenuPaneItem::SData item;
-
- item.iCommandId = ECmdFilterByTestCaseFile;
- item.iFlags = 0;
- item.iCascadeId = 0;
-
- for (i = 0; i < testCaseFileCount; i++)
- {
- item.iText = testCaseFiles[i];
- aMenuPane->AddMenuItemL(item);
- item.iCommandId++; // command IDs 0x2000 - 0x2FFF are reserved for test case files in hrh file
- }
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuView::HandleListBoxEventL
-//
-// Handles listbox events.
-// ----------------------------------------------------------------------------
-//
-void CTestSetInsertMenuView::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
- {
-
- if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
- {
- ShowInsertCasesDialogL();
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuView::ShowInsertCasesDialogL
-//
-// Show confirmation dialog for inserting test cases.
-// ----------------------------------------------------------------------------
-//
-void CTestSetInsertMenuView::ShowInsertCasesDialogL()
- {
- TInt i(0);
- TBuf<50> message;
- CEikListBox* listBox = iContainer->ListBox();
- TInt count = listBox->SelectionIndexes()->Count();
-
- if ( count > 0 )
- {
- CEikonEnv::Static()->ReadResource( message, R_INSERT_CONFIRMATION_QUESTION );
-
- CAknQueryDialog * dlg = CAknQueryDialog::NewL(CAknQueryDialog::ENoTone);
- if ( dlg->ExecuteLD( R_GENERAL_CONFIRMATION_DIALOG, message ) )
- {
- CEikListBox* newListBox = iContainer->ListBox();
- TInt newCount = newListBox->SelectionIndexes()->Count();
- RArray<TInt> selectedIndices;
- CleanupClosePushL( selectedIndices );
- if ( newCount > 0 )
- {
- for( i = 0; i < newCount; i++ )
- {
- selectedIndices.InsertInOrder( (*newListBox->SelectionIndexes())[i] );
- }
-
- AddCasesToTestSet( selectedIndices );
- // Test cases added, set save needed flag to true.
- ((CTestSetMenuView*)AppUi()->View(
- TUid::Uid(ETestSetMenuViewId) ))->SetSaveNeeded(ETrue);
- }
- CleanupStack::PopAndDestroy();
-
- // Test cases added -> go to test set menu
- AppUi()->HandleCommandL(EAppUIGoBack);
- }
- }
- else
- {
- CAknWarningNote* dialog = new(ELeave)CAknWarningNote();
- CEikonEnv::Static()->ReadResource( message, R_INSERT_NOCASES_TEXT );
- dialog->ExecuteLD(message);
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetInsertMenuView::AddCasesToTestSet
-//
-// Adds selected test cases to the current test set.
-// ----------------------------------------------------------------------------
-//
-void CTestSetInsertMenuView::AddCasesToTestSet( RArray<TInt> aSelectedIndexes )
- {
- TInt ret(0);
- TInt i(0);
- RRefArray<CTestInfo> allCases;
- CTestSetMenuView* testSetMenuView =
- (CTestSetMenuView*)((CAppUIAppUi*)AppUi())->View( TUid::Uid(ETestSetMenuViewId) );
-
- ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->TestCases(allCases);
-
- for ( i = 0; i < aSelectedIndexes.Count(); i++ )
- {
- ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->AddToTestSet(
- testSetMenuView->CurrentTestSet(),
- allCases[ aSelectedIndexes[i] ] );
- }
- if( ret != KErrNone )
- {
- RDebug::Print( _L("AddCasesToTestSet failed with value: %d"), ret );
- }
-
- allCases.Reset();
- allCases.Close();
-
- }
-
-// End of File
--- a/stifui/stifui/src/TestSetMenuContainer.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,486 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetMenuContainer class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <aknlists.h> // ListBox
-#include <AknIconArray.h> // CAknIconArray
-#include <aknnotewrappers.h>
-
-#include <eikclbd.h> // CColumnListBoxData
-
-#include "TestSetMenuContainer.h"
-#include "TestSetMenuView.h"
-#include "StartCasesContainer.h"
-#include <Stifui.rsg>
-#include "Stifui.hrh"
-#include "AppUIAppUi.h"
-
-#include "MenuListBox.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::ConstructL
-//
-// Symbian OS two phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetMenuContainer: ConstructL"));
-
- iParentView = (CTestSetMenuView*)aListBoxObserver;
- CreateWindowL();
-
- iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
-
- iTestCasesInView.Reset();
- //((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetMenuContainer: iTCInV Reset"));
-
- iListBox = CMenuListBox::NewL(ETestSetMenuViewId);
- iListBox->SetContainerWindowL( *this );
- iListBox->SetListBoxObserver( aListBoxObserver /*this*/ ); // jos peritty MEikListBoxObserver:sta
- iListBox->ConstructL(this, EAknListBoxMarkableList /*EAknListBoxSelectionList*/);
-
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetMenuContainer: ListBox constructed"));
-
- //Create Scroller control for ListBox and set its visibility
- iListBox->CreateScrollBarFrameL(ETrue);
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
- iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
- iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
- iListBox->HandleItemAdditionL();
-
- if ( iUIStore )
- {
- //RRefArray<const CTestInfo> allCases;
- //CTestSetInfo* testSetInfo;
- //IMPORT_C const CTestSetInfo& TestSetL( const TDesC& aSetName );
-
- TPtrC ptr = iParentView->CurrentTestSet();
-
- const CTestSetInfo* testSetInfo =
- &iUIStore->TestSetL( ptr );
-
- //inline const RRefArray<const CTestInfo>& TestCases() const
- const RRefArray<const CTestInfo>* allCases = &testSetInfo->TestCases();
-
- /*if( ret != KErrNone )
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("iUIStore->TestCases() fails"));
- // Leave
- }
- */
-
- const TInt KTestCaseCount = allCases->Count();
- for (TInt i=0; i < KTestCaseCount; i++)
- {
- iTestCasesInView.Append( &allCases->operator[](i) );
- }
-
- iListBoxModel = CTestCaseListBoxModel::NewL(&iTestCasesInView);
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetMenuContainer: ListBox model"));
-
- iListBox->Model()->SetItemTextArray(iListBoxModel);
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetMenuContainer: ListBox model set"));
-
- }
- else
- {
- //User::Leave( syy?? )
- }
-
- // Creates graphic.
- SetGraphicIconL( iListBox );
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("TestSetMenuContainer: icons created"));
-
- iListBox->ActivateL();
- ((CMenuListBox*)iListBox)->SetPreviousFocus();
-
- SetRect(aRect);
- ActivateL();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::SetGraphicIconL
-//
-// Sets graphic icon using listbox as CEikColumnListBox.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::SetGraphicIconL( CEikColumnListBox* aListBox )
- {
- if ( aListBox )
- {
- // Creates gul icon.
- CAknIconArray* iconArray = new(ELeave) CAknIconArray(1);
- CleanupStack::PushL( iconArray );
-
- GraphicIconL( iconArray ); // Appends graphic data.
-
- // Sets graphics as ListBox icon.
- aListBox->ItemDrawer()->ColumnData()->SetIconArray( iconArray );
-
- CleanupStack::Pop();
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::CurrentItemIndex
-//
-// Returns current item index in list box.
-// ----------------------------------------------------------------------------
-//
-TInt CTestSetMenuContainer::CurrentItemIndex()
- {
- return iListBox->CurrentItemIndex();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::SetCurrentItemIndex
-//
-// Sets current item index in list box.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::SetCurrentItemIndex(TInt aCurrentTestCase)
- {
- iListBox->SetCurrentItemIndexAndDraw(aCurrentTestCase);
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::GraphicIconL
-//
-// Appends graphics data.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::GraphicIconL( CArrayPtr<CGulIcon>* aIcons )
- {
- if ( aIcons )
- {
- CFbsBitmap* markBitmap = NULL;
- CFbsBitmap* markBitmapMask = NULL;
-
- TRgb defaultColor;
- defaultColor = CEikonEnv::Static()->Color(EColorControlText);
-
- AknsUtils::CreateColorIconL(AknsUtils::SkinInstance(),
- KAknsIIDQgnIndiMarkedAdd,
- KAknsIIDQsnIconColors,
- EAknsCIQsnIconColorsCG13,
- markBitmap,
- markBitmapMask,
- AknIconUtils::AvkonIconFileName(),
- EMbmAvkonQgn_indi_marked_add,
- EMbmAvkonQgn_indi_marked_add_mask,
- defaultColor );
-
- CGulIcon* markIcon = CGulIcon::NewL(markBitmap,markBitmapMask);
- aIcons->AppendL(markIcon);
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::~CTestSetMenuContainer
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestSetMenuContainer::~CTestSetMenuContainer()
- {
- iTestCasesInView.Close(); // does not delete objects whose pointers are contained in the array
- delete iListBox;
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::SizeChanged
-//
-// Called by framework when the view size is changed.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::CountComponentControls
-//
-// Gets a count of the component controls of this list box control.
-// ----------------------------------------------------------------------------
-//
-TInt CTestSetMenuContainer::CountComponentControls() const
- {
- return 1; // return nbr of controls inside this container
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::ComponentControl
-//
-// Gets a pointer to the specified component control.
-// ----------------------------------------------------------------------------
-//
-CCoeControl* CTestSetMenuContainer::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::Draw
-//
-// Draw a control, called by window server.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::Draw(const TRect& /*aRect*/) const
- {
- // CWindowGc& gc = SystemGc();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::SelectedTestCases
-//
-// Returns pointers to selected test cases.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::SelectedTestCases
- (RPointerArray<CTestInfo>& aSelectedTestCases)
- {
- aSelectedTestCases.Append( iTestCasesInView[iListBox->CurrentItemIndex()] );
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::OfferKeyEventL
-//
-// Handles key events.
-// ----------------------------------------------------------------------------
-//
-TKeyResponse CTestSetMenuContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType )
- {
- if (aType != EEventKey)
- {
- return EKeyWasNotConsumed;
- }
-
- if (iListBox)
- {
- //if multiple items selected
- if ( iListBox->SelectionIndexes()->Count() > 0 )
- {
- TUint mask = 0x40488;
-
- //if event is enter key,
- //don´t send it to listbox
- if ( aKeyEvent.iScanCode == 0xa7
- && ( aKeyEvent.iModifiers & mask ) == 0 )
- {
- iParentView->HandleListBoxEventL( iListBox, MEikListBoxObserver::EEventEnterKeyPressed );
- return EKeyWasConsumed;
- }
- }
-
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- else
- {
- return EKeyWasNotConsumed;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::HandleMarkCommandL
-//
-// Handles mark commands.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::HandleMarkCommandL( TInt aCommand )
- {
- if (iListBox)
- {
- AknSelectionService::HandleMarkableListProcessCommandL( aCommand, iListBox );
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::ProcessCommandL
-//
-// Processes user commands.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::ProcessCommandL( TInt aCommand )
- {
- AknSelectionService::HandleMarkableListProcessCommandL( aCommand, iListBox );
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::SelectionListProcessCommandL
-//
-// Processes user commands.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::SelectionListProcessCommandL( TInt aCommand )
- {
- AknSelectionService::HandleSelectionListProcessCommandL( aCommand, iListBox );
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::FilterCasesByModuleL
-//
-// Show only testcases which are defined is specified module.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::FilterCasesByModuleL( TName aModuleName )
- {
- iTestCasesInView.Reset(); // Clear testCasesInView pointer array
-
- RRefArray<CTestInfo> allCases;
- TInt ret = iUIStore->TestCases( allCases );
- if( KErrNone != ret )
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("FilterCasesByModuleL(): iUIStore->TestCases() fails"));
- allCases.Reset();
- allCases.Close();
- User::Leave( ret );
- }
- const TInt KTestCaseCount = allCases.Count();
- for( TInt i=0; i < KTestCaseCount; i++ )
- {
- if ( allCases[i].ModuleName() == aModuleName )
- {
- iTestCasesInView.Append( &( allCases[i] ) );
- }
- }
- allCases.Reset();
- allCases.Close();
-
- iListBox->Reset();
- iListBox->DrawNow();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::FilterCasesByTCFileNameL
-//
-// Show only testcases which are defined is specified test case file.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::FilterCasesByTCFileNameL(
- TFileName aTestCaseFileName )
- {
-
- iTestCasesInView.Reset(); // Clear testCasesInView pointer array
-
- RRefArray<CTestInfo> allCases;
- TInt ret = iUIStore->TestCases( allCases );
- if( KErrNone != ret )
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("FilterCasesByModuleL(): iUIStore->TestCases() fails"));
- allCases.Reset();
- allCases.Close();
- User::Leave( ret );
- }
- const TInt KTestCaseCount = allCases.Count();
- for( TInt i=0; i < KTestCaseCount; i++ )
- {
- if ( allCases[i].TestCaseFile() == aTestCaseFileName )
- {
- iTestCasesInView.Append( &( allCases[i] ) );
- }
- }
-
- allCases.Reset();
- allCases.Close();
-
- iListBox->Reset();
- iListBox->DrawNow();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::NoFilteringL
-//
-// Remove possible filtering of test cases -> show all test cases.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::NoFilteringL()
- {
- iTestCasesInView.Reset(); // Clear testCasesInView pointer array
-
- RRefArray<CTestInfo> allCases;
- TInt ret = iUIStore->TestCases( allCases );
- if( KErrNone != ret )
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iLogger->Log(_L("FilterCasesByModuleL(): iUIStore->TestCases() fails"));
- allCases.Reset();
- allCases.Close();
- User::Leave( ret );
- }
- const TInt KTestCaseCount = allCases.Count();
-
- // Add all cases to iTestCasesInView pointer array
- for( TInt i=0; i < KTestCaseCount; i++ )
- {
- iTestCasesInView.Append( &( allCases[i] ) );
- }
-
- allCases.Reset();
- allCases.Close();
-
- iListBox->Reset();
- iListBox->DrawNow();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::RemoveListBoxItemsL
-//
-// Removes items from list box.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::RemoveListBoxItemL( TInt aSelected )
- {
- TInt currentItem(0);
- TBool remCurr(EFalse);
-
- currentItem = iListBox->CurrentItemIndex();
- if( aSelected == currentItem )
- {
- remCurr = ETrue;
- }
-
- iTestCasesInView.Remove( aSelected );
- AknListBoxUtils::HandleItemRemovalAndPositionHighlightL(iListBox, aSelected, remCurr);
- iListBox->HandleItemAdditionL();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuContainer::SaveActiveLine
-//
-// Makes the iListBox member save its focus position
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuContainer::SaveActiveLine()
- {
- ((CMenuListBox*)iListBox)->SaveFocusPosition();
- }
-
-// End of File
--- a/stifui/stifui/src/TestSetMenuView.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,554 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetMenuView class ddefinition.
-*
-*/
-
-// INCLUDE FILES
-#include <eikmenub.h>
-#include <aknViewAppUi.h>
-#include <aknlistquerydialog.h>
-#include <aknnotewrappers.h>
-#include <barsread.h> //TResourceReader
-#include <Stifui.rsg>
-#include "TestSetMenuView.h"
-#include "TestSetMenuContainer.h"
-#include "AppUIAppUi.h"
-#include "Stifui.hrh"
-
-
-
-// ================= MEMBER FUNCTIONS =========================================
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::ConstructL
-//
-// Symbian OS two-phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuView::ConstructL()
- {
- CView::ConstructL();
- BaseConstructL( R_APPUI_TESTSETMENUVIEW );
- iCurrentTestCase = 0;
- iSaveNeeded = ETrue;
- iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::~CTestSetMenuView
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestSetMenuView::~CTestSetMenuView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::Id
-//
-// Returns view´s id.
-// ----------------------------------------------------------------------------
-//
-TUid CTestSetMenuView::Id() const
- {
- return TUid::Uid(ETestSetMenuViewId);
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::HandleCommandL
-//
-// Handles a command.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuView::HandleCommandL(TInt aCommand)
- {
- if ( aCommand == EAknCmdMark || aCommand == EAknCmdUnmark
- || aCommand == EAknMarkAll || aCommand == EAknUnmarkAll )
- {
- iContainer->HandleMarkCommandL( aCommand );
- }
- else
- {
- switch ( aCommand )
- {
- case ECmdStartTestSet:
- {
- const CTestSetInfo& testSetInfo =
- iUIStore->TestSetL( iCurrentTestSet );
- const RRefArray<const CTestInfo>* allCases =
- &testSetInfo.TestCases();
-
- TInt testCaseCount = allCases->Count();
- if (testCaseCount > 0 )
- {
- StartTestSetL();
- }
- break;
- }
- case ECmdShowStartedTestSet:
- {
- AppUi()->HandleCommandL(ECmdShowStartedTestSet);
- break;
- }
- case ECmdSaveTestSet:
- {
- SaveCurrentTestSetL();
- break;
- }
- case ECmdInsertTestCases:
- {
- // iSaveNeeded is set from
- // CTestSetInsertMenuView::ShowInsertCasesDialog()
- //iSaveNeeded = ETrue;
- AppUi()->HandleCommandL(ECmdInsertTestCases);
- break;
- }
- case ECmdRemoveTestCases:
- {
- RemoveSelectedTestCasesL();
- break;
- }
- case EAknSoftkeyBack:
- {
- //iCurrentTestCase = 0;
- // AppUi()->HandleCommandL(ECmdLoadTestSet/*EAppUIGoToTestSetsMenu*/);
- //( (CEikAppUi*)iCoeEnv->AppUi() )->HandleCommandL(EAppUIGoToTestSetsMenu);
- SaveCurrentTestSetL();
- break;
- }
- default:
- {
- AppUi()->HandleCommandL( aCommand );
- break;
- }
- }
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::HandleClientRectChange
-//
-// Handles client rect changes.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuView::HandleClientRectChange()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::DoActivateL
-//
-// Initializes view when activated.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- if (!iContainer)
- {
- ((CAppUIAppUi*)AppUi())->iLogger->Log(
- _L("TestSetMenuView: DoActivateL") );
- iContainer = new (ELeave) CTestSetMenuContainer;
- iContainer->SetMopParent(this);
- iContainer->ConstructL( ClientRect(), this );
- ((CAppUIAppUi*)AppUi())->iLogger->Log(
- _L("TestSetMenuView: container constructed") );
- AppUi()->AddToStackL( *this, iContainer );
- }
-
- //testing
- iContainer->SetCurrentItemIndex(iCurrentTestCase);
-
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CAknNavigationControlContainer* np =
- (CAknNavigationControlContainer *)sp->ControlL(
- TUid::Uid(EEikStatusPaneUidNavi));
-
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_TESTSET );
- iNaviDecorator = np->CreateNavigationLabelL( reader );
- CleanupStack::PopAndDestroy(); // resource reader
- np->PushL(*iNaviDecorator);
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::DoDeactivate
-//
-// Deactivates view.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuView::DoDeactivate()
- {
- if ( iContainer )
- {
- iContainer->SaveActiveLine();
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::DynInitMenuPaneL
-//
-// Initializes menu pane.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuView::DynInitMenuPaneL(
- TInt aResourceId, CEikMenuPane* aMenuPane)
- {
-
- // Test modules are added to filter by test module submenu
- // if the submenu is opened
- if (R_APPUI_FILTERBYMODULES_MENU == aResourceId)
- {
- RRefArray<TDesC> modules;
- TInt ret = iUIStore->Modules( modules );
- if( KErrNone != ret )
- {
- modules.Reset();
- modules.Close();
- User::Leave( ret );
- }
-
- TInt moduleCount = modules.Count();
-
- TInt i;
- CEikMenuPaneItem::SData item;
-
- item.iCommandId = ECmdFilterByModule;
- item.iFlags = 0;
- item.iCascadeId = 0;
-
- for (i = 0; i < moduleCount; i++)
- {
- item.iText = modules[i];
- aMenuPane->AddMenuItemL(item);
- item.iCommandId++; // Command IDs 0x1000 - 0x1FFF are reserved
- // for modules in hrh file.
- }
-
- modules.Reset();
- modules.Close();
- }
-
- // Test case files are added to filter by test case file submenu
- // if the submenu is opened.
- if (R_APPUI_FILTER_BY_TESTCASEFILE_MENU == aResourceId)
- {
- RRefArray<TDesC> testCaseFiles;
- TInt ret = iUIStore->TestCaseFiles( testCaseFiles );
- if( KErrNone != ret )
- {
- testCaseFiles.Reset();
- testCaseFiles.Close();
- User::Leave( ret );
- }
-
- TInt testCaseFileCount = testCaseFiles.Count();
-
- TInt i;
- CEikMenuPaneItem::SData item;
-
- item.iCommandId = ECmdFilterByTestCaseFile;
- item.iFlags = 0;
- item.iCascadeId = 0;
-
- for (i = 0; i < testCaseFileCount; i++)
- {
- item.iText = testCaseFiles[i];
- aMenuPane->AddMenuItemL(item);
- item.iCommandId++; // Command IDs 0x2000 - 0x2FFF are reserved for
- // test case files in hrh file.
- }
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::HandleListBoxEventL
-//
-// Handles listbox events.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuView::HandleListBoxEventL(CEikListBox* /*aListBox*/,
- TListBoxEvent aEventType)
- {
-
- if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
- {
- const CTestSetInfo& testSetInfo =
- iUIStore->TestSetL( iCurrentTestSet );
- const RRefArray<const CTestInfo>* allCases = &testSetInfo.TestCases();
-
- TInt testCaseCount = allCases->Count();
- if (testCaseCount > 0 )
- {
- StartTestSetL();
- }
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::CreateTestSet
-//
-// Creates new test set.
-// ----------------------------------------------------------------------------
-//
-TInt CTestSetMenuView::CreateTestSetL( const TDesC& aTestSetName )
- {
- TInt error = 0;
- TBuf<100> message;
-
- _LIT(KPath, "c:\\TestFramework\\");
- RFs fs;
- User::LeaveIfError(fs.Connect());
- CleanupClosePushL(fs);
- TEntry entry;
- // we check if the c:\testframework directory exists
- // It is mandatory for this dir to exist if we want to save a test set.
- // This dir must be localised on the C drive of the device
- if(fs.Entry(KPath, entry) != KErrNone)
- { // if the dir does not exist
- TInt err = fs.MkDirAll(KPath); // we create it
- if(err != KErrNone)
- { // if of any reason it was impossible to create the dir - inform user about it
- CAknInformationNote* note = new (ELeave) CAknInformationNote(ETrue);
- note->ExecuteLD( _L("Could not create c:\\TestFramework dir!") );
- }
- }
- CleanupStack::PopAndDestroy(&fs); // close and remove RFs object
-
- error = iUIStore->LoadTestSet( aTestSetName );
-
- // If testset is either active or already created and saved.
- /* if ( KErrNone == error)// || KErrAlreadyExists == error )
- {
- CEikonEnv::Static()->ReadResource( message,
- R_OVERWRITE_TESTSET_QUESTION );
- CAknQueryDialog * dlg =
- CAknQueryDialog::NewL(CAknQueryDialog::ENoTone);
- // Confirm overwrite
- if ( dlg->ExecuteLD( R_GENERAL_CONFIRMATION_DIALOG, message ) )
- {
- error = iUIStore->RemoveTestSet( aTestSetName );
- error = iUIStore->CreateTestSet( aTestSetName );
- if ( error == KErrNone )
- {
- iCurrentTestSet = aTestSetName;
- iSaveNeeded = ETrue;
- }
- }
- // Else load saved default test set
- else
- {
- iSaveNeeded = EFalse;
- iCurrentTestSet = aTestSetName;
- error = KErrAlreadyExists;
- }
- }
- else if ( KErrNotFound == error )
- {
- error = iUIStore->CreateTestSet( aTestSetName );
- if ( KErrNone == error )
- {
- iCurrentTestSet = aTestSetName;
- iSaveNeeded = ETrue;
- }
- }
- else if ( KErrPathNotFound == error )
- {
- error = iUIStore->CreateTestSet( aTestSetName );
- iCurrentTestSet = aTestSetName;
- iSaveNeeded = EFalse;
- }
- else
- {
- ((CAppUIAppUi*)AppUi())->iLogger->Log(_L("Test set creation fails with error: %d"), error );
- CAknInformationNote* informationNote = new (ELeave) CAknInformationNote(ETrue);
- informationNote->ExecuteLD( _L("UNDEFINED ERROR!") );
- }*/
-
- error = iUIStore->CreateTestSet( aTestSetName );
- iCurrentTestSet = aTestSetName;
- iSaveNeeded = ETrue;
- return error;
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::LoadTestSetL
-//
-// Loads saved test set.
-// ----------------------------------------------------------------------------
-//
-TInt CTestSetMenuView::LoadTestSetL( const TDesC& aTestSetName )
- {
- TInt error = 0;
- TBuf<100> message;
- error = iUIStore->LoadTestSet( aTestSetName );
- if ( KErrNone == error || KErrAlreadyExists == error )
- {
- iCurrentTestSet = aTestSetName;
- iSaveNeeded = EFalse;
- }
- else
- {
- CEikonEnv::Static()->ReadResource( message,
- R_LOAD_TESTSET_FAILED );
-
- CAknInformationNote* informationNote = new (ELeave) CAknInformationNote(ETrue);
- informationNote->ExecuteLD(message);
- }
-
- return error;
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::SaveCurrentTestSet
-//
-// Saves current test set.
-// ----------------------------------------------------------------------------
-//
-TInt CTestSetMenuView::SaveCurrentTestSetL()
- {
- TInt error = 0;
- TBuf<100> message;
-
- CEikonEnv::Static()->ReadResource( message,
- R_SAVE_TESTSET_QUESTION );
-
- CAknQueryDialog * dlg =
- CAknQueryDialog::NewL(CAknQueryDialog::ENoTone);
-
- if ( dlg->ExecuteLD( R_GENERAL_CONFIRMATION_DIALOG, message ) )
- {
- error = iUIStore->SaveTestSet2( iCurrentTestSet );
- iSaveNeeded = EFalse;
-
- }
- AppUi()->HandleCommandL(EAppUIGoBack);
-
- return error;
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::RemoveActiveTestSet
-//
-// Removes current test set.
-// ----------------------------------------------------------------------------
-//
-TInt CTestSetMenuView::RemoveActiveTestSet()
- {
- TInt error = 0;
-
- error = iUIStore->RemoveTestSet( iCurrentTestSet );
-
- return error;
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::StartTestSetL
-//
-// Shows confirmation dialog and verify if user really want to start test set.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuView::StartTestSetL()
- {
- _LIT( KErrorStartingTestSet,
- "TestSetMenuView: StartTestSetL() fails (%d)" );
-
- TInt ret(KErrNone);
- TInt index(0);
- TInt selectedItem(0);
-
- // Default mode is parallel.
- CStartedTestSet::TSetType mode = CStartedTestSet::ESetParallel;
-
- CAknListQueryDialog* startDialog =
- new (ELeave) CAknListQueryDialog(&selectedItem);
-
- // Show confirmation dialog.
- if ( startDialog->ExecuteLD(R_START_MULTIPLE_TESTCASES_LIST_QUERY) )
- {
- index = ((CAppUIAppUi*)AppUi())->iStartedTestSet;
- // Check mode
- if ( 1 == selectedItem )
- {
- mode = CStartedTestSet::ESetSequential;
- }
-
- // Start test set cases.
- ret = iUIStore->StartTestSet(
- iUIStore->TestSetL( iCurrentTestSet ), index, mode );
-
- if ( ret != KErrNone )
- {
- ((CAppUIAppUi*)AppUi())->iStartedTestSet = -1;
- ((CAppUIAppUi*)AppUi())->iLogger->Log(
- KErrorStartingTestSet, ret );
- }
- else
- {
- ((CAppUIAppUi*)AppUi())->iStartedTestSet = index;
- }
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetMenuView::RemoveSelectedTestCasesL
-//
-// Removes marked test cases from test set.
-// ----------------------------------------------------------------------------
-//
-void CTestSetMenuView::RemoveSelectedTestCasesL()
- {
- TInt positionToRemove(0);
-
- const CTestSetInfo& testSetInfo = iUIStore->TestSetL( iCurrentTestSet );
- const RRefArray<const CTestInfo>* allCases = &testSetInfo.TestCases();
- CEikListBox* listBox = iContainer->ListBox();
-
- iSaveNeeded = ETrue;
- positionToRemove = listBox->CurrentItemIndex();
- // Remove selected test case from test set.
- TInt ret = iUIStore->RemoveFromTestSet(iCurrentTestSet, allCases->operator[](positionToRemove));
- iContainer->RemoveListBoxItemL(positionToRemove);
-
- if( ret != KErrNone )
- {
- RDebug::Print( _L("RemoveFromTestSet failed with value: %d"), ret );
- }
- }
-
-
-// End of File
--- a/stifui/stifui/src/TestSetStartedCasesContainer.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,466 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetStartedCasesContainer
-* class definition.
-*
-*/
-
-// INCLUDE FILES
-
-#include <aknlists.h> // ListBox
-#include <AknIconArray.h> // CAknIconArray
-#include <badesca.h> // CDesCArray
-#include <eikclbd.h> // CColumnListBoxData
-#include <aknnotewrappers.h>
-
-#include <Stifui.rsg>
-
-//#include "UIStoreIf.h"
-//#include "UIStore.h"
-//#include "UIEngine.h"
-//#include "UIEngineContainer.h"
-
-#include <stifinternal/UIStoreIf.h>
-#include <stifinternal/UIStore.h>
-#include <stifinternal/UIEngine.h>
-#include <stifinternal/UIEngineContainer.h>
-
-#include "TestSetStartedCasesContainer.h"
-#include "ShowStartedCasesContainer.h"
-#include "Stifui.hrh"
-#include "AppUIAppUi.h"
-
-#include "MenuListBox.h"
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::ConstructL
-//
-// Symbian OS two phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesContainer::ConstructL(const TRect& aRect, MEikListBoxObserver* aListBoxObserver)
- {
- CreateWindowL();
-
- iUIStore = ( (CAppUIAppUi*)iCoeEnv->AppUi() )->UIStoreHandler();
-
- iListBox = CMenuListBox::NewL(ETestSetStartedCasesViewId); /*CAknSingleStyleListBox();*/
- iListBox->SetContainerWindowL( *this );
- iListBox->SetListBoxObserver( aListBoxObserver );
- iListBox->ConstructL(this, EAknListBoxSelectionList);
-
- //Create Scroller control for ListBox and set its visibility
- iListBox->CreateScrollBarFrameL(ETrue);
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto);
-
- if ( iUIStore )
- {
-
- iListBoxModel = CStartedTestsListBoxModel::NewL( &iStartedTestsPtrs );
- iListBox->Model()->SetItemTextArray(iListBoxModel);
- ConstructListBoxModelL();
- iListBox->Model()->SetOwnershipType(ELbmOwnsItemArray);
- iListBox->HandleItemAdditionL();
-
- }
- else
- {
- //User::Leave( syy?? )
- }
- iListBox->ActivateL();
- ((CMenuListBox*)iListBox)->SetPreviousFocus();
-
- SetRect(aRect);
- ActivateL();
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::ConstructListBoxModelL
-//
-// Constructs list box model without any filtering.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesContainer::ConstructListBoxModelL()
- {
- TInt items(0);
- TInt index = ((CAppUIAppUi*)iCoeEnv->AppUi())->iStartedTestSet;
-
- // Check if there is started test sets and if there is,
- // show test set´s info.
- if ( index != -1 )
- {
- const RRefArray<CStartedTestCase>* startedTestCases;
- CStartedTestSet* startedTestSet =
- &iUIStore->StartedTestSetL( index );
- startedTestCases = &startedTestSet->TestCases();
-
- const TInt KStartedCaseCount = startedTestCases->Count();
-
- items = iStartedTestsPtrs.Count();
- iStartedTestsPtrs.Reset(); // Remove all pointers (does not delete objects)
- iListBox->HandleItemRemovalL();
-
- const TInt KSelectedMode = ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode;
-
- // Loop through all started cases
- for( TInt i=0; i < KStartedCaseCount; i++ )
- {
- switch ( KSelectedMode )
- {
- case EShowAllStartedCases:
- {
- iStartedTestsPtrs.Append( startedTestCases->operator[](i) );
- break;
- }
- case EShowOngoingCases:
- {
- // Note: PAUSE IS ALSO RUNNIN STATUS
- if ( startedTestCases->operator[](i).Status() & CUIStoreIf::EStatusRunning )
- {
- iStartedTestsPtrs.Append( startedTestCases->operator[](i) );
- }
- break;
- }
- case EShowPassedCases:
- {
- if ( startedTestCases->operator[](i).Status() & CUIStoreIf::EStatusPassed )
- {
- iStartedTestsPtrs.Append( startedTestCases->operator[](i) );
- }
- break;
- }
- case EShowPausedCases:
- {
- if ( startedTestCases->operator[](i).Status() & CUIStoreIf::EStatusRunning )
- {
- if( startedTestCases->operator[](i).UIEngineContainer().State() == CUIEngineContainer::EPaused )
- {
- iStartedTestsPtrs.Append( startedTestCases->operator[](i) );
- }
- }
- break;
- }
- case EShowFailedCases:
- {
- if ( startedTestCases->operator[](i).Status() & CUIStoreIf::EStatusFailed )
- {
- iStartedTestsPtrs.Append( startedTestCases->operator[](i) );
- }
- break;
- }
- case EShowCrashedAbortedCases:
- {
- if ( startedTestCases->operator[](i).Status() & CUIStoreIf::EStatusAborted
- ||
- startedTestCases->operator[](i).Status() & CUIStoreIf::EStatusCrashed)
- {
- iStartedTestsPtrs.Append( startedTestCases->operator[](i) );
- }
- break;
- }
- }
- }
-
- if ( items < iStartedTestsPtrs.Count() )
- {
- iListBox->HandleItemAdditionL();
- }
- else
- {
- iListBox->HandleItemRemovalL();
- }
-
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::~CTestSetStartedCasesContainer
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestSetStartedCasesContainer::~CTestSetStartedCasesContainer()
- {
- delete iListBox;
-
- iStartedTestsPtrs.Close(); // does not delete objects whose pointers are contained in the array
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::SizeChanged
-//
-// Called by framework when the view size is changed.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesContainer::SizeChanged()
- {
- if ( iListBox )
- {
- iListBox->SetRect( Rect() ); // Sets rectangle of listbox.
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::CountComponentControls
-//
-// Gets a count of the component controls of this list box control.
-// ----------------------------------------------------------------------------
-//
-TInt CTestSetStartedCasesContainer::CountComponentControls() const
- {
- return 1; // return nbr of controls inside this container
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::ComponentControl
-//
-// Gets a pointer to the specified component control.
-// ----------------------------------------------------------------------------
-//
-CCoeControl* CTestSetStartedCasesContainer::ComponentControl(TInt aIndex) const
- {
- switch ( aIndex )
- {
- case 0:
- return iListBox;
- default:
- return NULL;
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::Draw
-//
-// Draw a control, called by window server.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesContainer::Draw(const TRect& /*aRect*/) const
- {
- // CWindowGc& gc = SystemGc();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::OfferKeyEventL
-//
-// Handles key events.
-// ----------------------------------------------------------------------------
-//
-TKeyResponse CTestSetStartedCasesContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType)
- {
- if (aType != EEventKey)
- {
- return EKeyWasNotConsumed;
- }
-
- if (iListBox)
- {
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
- else
- {
- return EKeyWasNotConsumed;
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::SelectedTestCase
-//
-// Returns reference to currently selected test case in view (listbox).
-// ----------------------------------------------------------------------------
-//
-CStartedTestCase* CTestSetStartedCasesContainer::SelectedTestCase()
- {
- if ( iStartedTestsPtrs.Count() > 0 )
- {
- return &(iStartedTestsPtrs[ iListBox->CurrentItemIndex() ]);
- }
- else
- {
- return NULL;
- }
-/*
- //if ( iListBox->ItemExists(0) ) // Check that list box is not empty
- if ( ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount() ) // Check that list box is not empty
- {
- return &(iStartedTestsPtrs[ iListBox->CurrentItemIndex() ]);
- }
- else
- {
- return NULL;
- }
-*/
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::DrawListBox
-//
-// Draws the list box.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesContainer::DrawListBox()
- {
- if ( iListBox )
- {
- iListBox->DrawNow();
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::HandleItemAdditionL
-//
-// Handles the addition of an item to the model.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesContainer::HandleItemAdditionL()
- {
- iListBox->HandleItemAdditionL();
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::HandleItemRemovalL
-//
-// Handles the removal of an item from the model.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesContainer::HandleItemRemovalL()
- {
- //TInt itemIndexBeforeRemoval = iListBox->CurrentItemIndex();
-
- iListBox->HandleItemRemovalL();
-
- // HandleItemRemovalL "loses selection" if current item is removed
- // -> we have to check it and set one item as current item to make it possible for
- // user to select one item from items left after remove
- if ( iListBox->CurrentItemIndex() == -1 ) // No item selected
- if ( ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount() > 0 ) // there are items
- SetCurrentItemIndex(0);
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::TestsInViewCount
-//
-// Returns count of test cases in view.
-// ----------------------------------------------------------------------------
-//
-TInt CTestSetStartedCasesContainer::TestsInViewCount()
- {
- return ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount();
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::CurrentTestCase
-//
-// Returns pointer to currently selected test case.
-// ----------------------------------------------------------------------------
-//
-CStartedTestCase* CTestSetStartedCasesContainer::CurrentTestCase()
- {
- return &iStartedTestsPtrs[ iListBox->CurrentItemIndex() ];
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::CurrentItemIndex
-//
-// Gets the index number of the current item in the view.
-// ----------------------------------------------------------------------------
-//
-TInt CTestSetStartedCasesContainer::CurrentItemIndex()
- {
- return iListBox->CurrentItemIndex();
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::SetCurrentItemIndex
-//
-// Sets the current item.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesContainer::SetCurrentItemIndex(TInt aIndex)
- {
- TInt itemCount = ((CStartedTestsListBoxModel*)iListBox->Model())->MdcaCount();
- if ( aIndex < itemCount )
- {
- iListBox->SetCurrentItemIndex(aIndex);
- }
- else
- {
- iListBox->SetCurrentItemIndex(itemCount);
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::ResetListBox
-//
-// Resets the selection indices, top and current item indices,
-// the selection, and the horizontal scroll offset of this list box.
-// This function does not redraw the list box.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesContainer::ResetListBox()
- {
- iListBox->Reset();
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::RemoveSelectedExecutionsL
-//
-// Removes items from list box.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesContainer::RemoveSelectedExecutionsL()
- {
- TInt indexOfRemovedExecution = 0;
- iStartedTestsPtrs.Remove(indexOfRemovedExecution);
- HandleItemRemovalL();
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::RemoveAllExecutionsInViewL
-//
-// Removes all started test cases from list box.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesContainer::RemoveAllExecutionsInViewL()
- {
- TInt exutionsInViewCount = iStartedTestsPtrs.Count();
- iStartedTestsPtrs.Reset(); //Empties the array, does not delete the objects whose pointers are contained in the array
- HandleItemRemovalL();
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesContainer::SaveActiveLine
-//
-// Makes the iListBox member save its focus position
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesContainer::SaveActiveLine()
- {
- ((CMenuListBox*)iListBox)->SaveFocusPosition();
- }
-
-// End of File
--- a/stifui/stifui/src/TestSetStartedCasesView.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,485 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestSetStartedCasesView class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <eikmenub.h>
-#include <aknViewAppUi.h>
-#include <barsread.h> //TResourceReader
-#include <Stifui.rsg>
-
-//#include "UIEngineContainer.h"
-#include <stifinternal/UIEngineContainer.h>
-
-#include "Stifui.hrh"
-
-#include "TestSetStartedCasesView.h"
-#include "TestSetStartedCasesContainer.h"
-#include "AppUIAppUi.h"
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesView::ConstructL
-//
-// Symbian OS two-phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesView::ConstructL()
- {
- CView::ConstructL();
- BaseConstructL( R_TESTSET_STARTEDCASESVIEW );
- iFilterModule.Zero();
- iFilterTestCaseFile.Zero();
- iSelectedTestCase=0;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesView::~CTestSetStartedCasesView
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestSetStartedCasesView::~CTestSetStartedCasesView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesView::Id
-//
-// Returns view´s id.
-// ----------------------------------------------------------------------------
-//
-TUid CTestSetStartedCasesView::Id() const
- {
- return TUid::Uid(ETestSetStartedCasesViewId);
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesView::HandleCommandL
-//
-// Handles a command.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesView::HandleCommandL(TInt aCommand)
- {
- TBool refreshListBox = EFalse;
- // Handle rest possible commands
- switch ( aCommand )
- {
- case ECmdShowAllStartedCases:
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode = EShowAllStartedCases;
- refreshListBox = ETrue;
- break;
- }
- case ECmdShowOngoingCases:
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode = EShowOngoingCases;
- refreshListBox = ETrue;
- break;
- }
- case ECmdShowPausedCases:
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode = EShowPausedCases;
- refreshListBox = ETrue;
- break;
- }
- case ECmdShowPassedCases:
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode = EShowPassedCases;
- refreshListBox = ETrue;
- break;
- }
- case ECmdShowFailedCases:
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode = EShowFailedCases;
- refreshListBox = ETrue;
- break;
- }
- case ECmdShowCrashedAbortedCases:
- {
- ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode = EShowCrashedAbortedCases;
- refreshListBox = ETrue;
- break;
- }
- case ECmdShowStatistics:
- {
- //EShowStatistics
- TMessageBoxUtil::ShowNotImplementedYetL();
- break;
- }
- case ECmdViewOutput:
- {
- ViewTestCaseOutputL();
- break;
- }
- case ECmdPauseTestCase:
- {
- CStartedTestCase* startedTestCase = iContainer->SelectedTestCase();
- if ( NULL != startedTestCase )
- {
- startedTestCase->UIEngineContainer().PauseTest();
- }
- break;
- }
- case ECmdResumeTestCase:
- {
- CStartedTestCase* startedTestCase = iContainer->SelectedTestCase();
- if ( NULL != startedTestCase )
- {
- startedTestCase->UIEngineContainer().ResumeTest();
- }
- break;
- }
- case ECmdAbortTestCase:
- {
- CStartedTestCase* startedTestCase = iContainer->SelectedTestCase();
- if ( NULL != startedTestCase )
- {
- startedTestCase->UIEngineContainer().CancelTest();
- }
- break;
- }
- case EAknSoftkeyOk:
- {
- iEikonEnv->InfoMsg( _L("TestCase Menu ok") );
- break;
- }
- case EAknSoftkeyBack:
- {
- // Remove possible filterings so that they does not affect when coming again to this view
- iFilterModule.Zero();
- iFilterTestCaseFile.Zero();
- iSelectedTestCase=0; //Reset selected test case information
- AppUi()->HandleCommandL(EAppUIGoBack);
- break;
- }
- default:
- {
- AppUi()->HandleCommandL( aCommand );
- break;
- }
- }
-
- if ( refreshListBox )
- {
- RefreshNaviTitleL();
- iContainer->ConstructListBoxModelL();
- iContainer->DrawListBox();
- }
-
- }
-
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesView::RefreshNaviTitleL
-//
-// Refreshes view name shown in the navi pane.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesView::RefreshNaviTitleL()
- {
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
- TResourceReader reader;
-
- switch ( ((CAppUIAppUi*)iCoeEnv->AppUi())->iShowStartedCasesMode )
- {
- case EShowAllStartedCases:
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED);
- break;
- case EShowOngoingCases:
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_ONGOING);
- break;
- case EShowPausedCases:
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_PAUSED);
- break;
- case EShowPassedCases:
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_PASSED);
- break;
- case EShowFailedCases:
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_FAILED);
- break;
- case EShowCrashedAbortedCases:
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_STARTED_CRASHED_ABORTED);
- break;
- default:
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_TESTSET);
- break;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- iNaviDecorator = np->CreateNavigationLabelL( reader );
- CleanupStack::PopAndDestroy(); // resource reader
- np->PushL(*iNaviDecorator);
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesView::HandleListBoxEventL
-//
-// Handles listbox events.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesView::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
- {
- if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
- {
- ViewTestCaseOutputL();
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesView::ViewTestCaseOutput
-//
-// Shows outputs of test case which is selected in Container.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesView::ViewTestCaseOutputL()
- {
- iSelectedTestCase = iContainer->CurrentItemIndex();
-
- // Sets index of selected test case to AppUi
- ( ( CAppUIAppUi* )AppUi() )->SetStartedTestCase( iContainer->CurrentTestCase() );
-
- AppUi()->HandleCommandL(ECmdViewOutput);
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesView::HandleClientRectChange
-//
-// Handles client rect changes.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesView::HandleClientRectChange()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesView::DoActivateL
-//
-// Initializes view when activated.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- if (!iContainer)
- {
- iContainer = new (ELeave) CTestSetStartedCasesContainer;
- iContainer->SetMopParent(this);
- iContainer->ConstructL( ClientRect(), this );
- AppUi()->AddToStackL( *this, iContainer );
- }
-
- if ( iSelectedTestCase )
- iContainer->SetCurrentItemIndex(iSelectedTestCase);
-
- iContainer->DrawListBox();
-
- RefreshNaviTitleL();
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesView::DoDeactivate
-//
-// Deactivates view.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesView::DoDeactivate()
- {
- if ( iContainer )
- {
- iContainer->SaveActiveLine();
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesView::DynInitMenuPaneL
-//
-// Initializes menu pane.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesView::DynInitMenuPaneL(
- TInt aResourceId, CEikMenuPane* aMenuPane)
- {
-
- // options menu
- if ( R_TESTSET_STARTEDCASESVIEW_MENU == aResourceId )
- {
- CStartedTestCase* startedTestCase = iContainer->SelectedTestCase();
- if ( NULL != startedTestCase )
- {
- switch ( startedTestCase->Status() )
- {
- // test case running
- case CUIStoreIf::EStatusRunning:
- {
- switch ( startedTestCase->UIEngineContainer().State() )
- {
- case CUIEngineContainer::ERunning:
- case CUIEngineContainer::EPaused:
- {
- aMenuPane->SetItemDimmed( ECmdShowSetMenu, EFalse );
- break;
- }
- //case CUIEngineContainer::ENotStarted:
- //case CUIEngineContainer::EExecuted:
- //case CUIEngineContainer::EFinished:
- default:
- {
- aMenuPane->SetItemDimmed( ECmdShowSetMenu, ETrue );
- }
- }
- break;
- }
-
- // test case not running
- //case CUIStoreIf::EStatusPassed:
- //case CUIStoreIf::EStatusFailed:
- //case CUIStoreIf::EStatusAborted:
- //case CUIStoreIf::EStatusExecuted
- default:
- {
- aMenuPane->SetItemDimmed( ECmdShowSetMenu, ETrue );
- }
- }
- }
- else
- {
- aMenuPane->SetItemDimmed( ECmdViewOutput, ETrue );
- aMenuPane->SetItemDimmed( ECmdShowSetMenu, ETrue );
- }
- }
-
- // test case control menu
- if ( R_TESTCASE_CONTROL_SUBMENU == aResourceId )
- {
- CStartedTestCase* startedTestCase = iContainer->SelectedTestCase();
-
- if ( NULL != startedTestCase )
- {
- if ( startedTestCase->Status() == CUIStoreIf::EStatusRunning )
- {
- switch ( startedTestCase->UIEngineContainer().State() )
- {
- case CUIEngineContainer::ERunning:
- {
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, EFalse );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, EFalse );
- break;
- }
- case CUIEngineContainer::EPaused:
- {
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, EFalse );
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, EFalse );
- break;
- }
- //case CUIEngineContainer::ENotStarted:
- //case CUIEngineContainer::EExecuted:
- //case CUIEngineContainer::EFinished:
- default:
- {
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
- break;
- }
- }
- }
- else
- {
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
- }
- }
- else
- {
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
- }
- }
-
- }
-
-// ----------------------------------------------------------------------------
-// CTestSetStartedCasesView::TestCaseStateChangedL
-//
-// Handles status changes of test cases in view.
-// ----------------------------------------------------------------------------
-//
-void CTestSetStartedCasesView::TestCaseStateChangedL()
- {
- if ( iContainer )
- {
-
- //CStartedTestCase* currentlySelectedTest = iContainer->SelectedTestCase();
-
- TInt numOfTestsInViewBeforeStateChange = iContainer->TestsInViewCount();
-
- //((CStartedTestsListBoxModel*)iContainer->iListBox->Model())->MdcaCount();
-
- iContainer->ConstructListBoxModelL();
-
- // Check if filtering by module or by test case file is selected
- /*
- if ( iFilterModule.Length() )
- {
- iContainer->FilterCasesByModuleL(iFilterModule);
- }
- else if ( iFilterTestCaseFile.Length() )
- {
- iContainer->FilterCasesByTCFileNameL(iFilterTestCaseFile);
- }
- */
-
- TInt numOfTestsInViewAfterStateChange = iContainer->TestsInViewCount();
- //((CStartedTestsListBoxModel*)iContainer->iListBox->Model())->MdcaCount();
-
- if ( numOfTestsInViewAfterStateChange >= numOfTestsInViewBeforeStateChange )
- iContainer->HandleItemAdditionL();
- else
- iContainer->HandleItemRemovalL();
-
- iContainer->DrawListBox();
-
- }
- }
-
-// End of File
--- a/stifui/stifui/src/Testmodulesmenuview.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,280 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CTestModulesMenuView class
-* definition.
-*
-*/
-
-// INCLUDE FILES
-#include <aknViewAppUi.h>
-#include <Stifui.rsg>
-
-#include <barsread.h> //TResourceReader
-#include "TestModulesMenuView.h"
-#include "TestModulesMenuContainer.h"
-#include "Stifui.hrh"
-
-#include "AppUIAppUi.h" // For ShowNotImplementedYet() method
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CTestModulesMenuView::ConstructL
-//
-// Symbian OS two-phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CTestModulesMenuView::ConstructL()
- {
- CView::ConstructL();
- BaseConstructL( R_APPUI_TESTMODULESMENUVIEW );
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuView::~CTestCaseOutputView
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CTestModulesMenuView::~CTestModulesMenuView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuView::Id
-//
-// Returns view´s id.
-// ----------------------------------------------------------------------------
-//
-TUid CTestModulesMenuView::Id() const
- {
- return TUid::Uid(ETestModulesMenuViewId); //KTestCaseMenuViewId;
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuView::HandleCommandL
-//
-// Handles a command.
-// ----------------------------------------------------------------------------
-//
-void CTestModulesMenuView::HandleCommandL(TInt aCommand)
- {
- switch ( aCommand )
- {
- case EAknSoftkeyOk:
- {
- iEikonEnv->InfoMsg( _L("TestCase Menu ok") );
- break;
- }
- case EAknSoftkeyBack:
- {
- AppUi()->HandleCommandL(EAppUIGoBack);
- break;
- }
- // Next is removed from Stifui.rss file in
- // RESOURCE MENU_PANE r_appui_testmodulesmenuview_menu's
- // items section. If want back to use remeve comment there
- //case ECmdOpenModule:
- // {
- //TFileName fileName;
- //AknCommonDialogs::RunSelectDlgLD (fileName,
- // R_MEMORY_SELECTION_DIALOG,
- // R_FILE_SELECTION_DIALOG
- //
- //);
- // ShowNotImplementedYet();
- // break;
- // }
- case ECmdAddModule:
- {
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->LoadAllModules();
- if( KErrNone != ret )
- {
- iEikonEnv->InfoMsg( _L("Module adding fails!") );
- break;
- }
-
- AppUi()->HandleCommandL( EAppUIGoBack );
- //ShowNotImplementedYet();
- break;
- }
- case ECmdRemoveModule:
- {
- TInt moduleNumber = iContainer->CurrentItemIndex();
- RRefArray<TDesC> allModules;
- TInt ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->Modules( allModules );
- if( KErrNone != ret )
- {
- allModules.Reset();
- allModules.Close();
- User::Leave( ret );
- }
- // No modules exist...break...
- if( allModules.Count() == 0 )
- {
- iEikonEnv->InfoMsg( _L("No modules available!") );
- allModules.Reset();
- allModules.Close();
- break;
- }
- // Module found...remove module...
- ret = ((CAppUIAppUi*)AppUi())->UIStoreHandler()->RemoveTestModule(
- allModules[ moduleNumber ] );
- if( KErrNone != ret )
- {
- User::Leave( ret );
- }
- allModules.Reset();
- allModules.Close();
-
- //iContainer->UpdateView();
- AppUi()->HandleCommandL( EAppUIGoBack );
- //ShowNotImplementedYet();
- break;
- }
- default:
- {
- AppUi()->HandleCommandL( aCommand );
- break;
- }
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuView::DynInitMenuPaneL
-//
-// Initializes menu pane.
-// ----------------------------------------------------------------------------
-//
-void CTestModulesMenuView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* /* aMenuPane */)
- {
-
- if (R_APPUI_TESTMODULESMENUVIEW_MENU == aResourceId)
- {
- /*switch ( iData->StartedCaseInOutputView()->State() )
- {
- case ENotStarted:
- {
- aMenuPane->SetItemDimmed( ECmdOpenModule, ETrue );
- aMenuPane->SetItemDimmed( ECmdAddModule, ETrue );
- aMenuPane->SetItemDimmed( ECmdRemoveModule, ETrue );
- break;
- }
- case ERunning:
- {
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- break;
- }
- case EPaused:
- {
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- break;
- }
- case EPassed:
- case EFailed:
- case EAborted:
- case EExecuted:
- {
- aMenuPane->SetItemDimmed( ECmdPauseTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdResumeTestCase, ETrue );
- aMenuPane->SetItemDimmed( ECmdAbortTestCase, ETrue );
- break;
- }
- }*/
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuView::HandleClientRectChange
-//
-// Handles client rect changes.
-// ----------------------------------------------------------------------------
-//
-void CTestModulesMenuView::HandleClientRectChange()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuView::HandleListBoxEventL
-//
-// Handles listbox events.
-// ----------------------------------------------------------------------------
-//
-void CTestModulesMenuView::HandleListBoxEventL(CEikListBox* /*aListBox*/, TListBoxEvent aEventType)
- {
- if ( ( aEventType == EEventEnterKeyPressed ) || ( aEventType == EEventItemDoubleClicked ) )
- {
- // Open or edit test module or ???
- }
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuView::DoActivateL
-//
-// Initializes view when activated.
-// ----------------------------------------------------------------------------
-//
-void CTestModulesMenuView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- if (!iContainer)
- {
- iContainer = new (ELeave) CTestModulesMenuContainer;
- iContainer->SetMopParent(this);
- iContainer->ConstructL( ClientRect(), this);
- AppUi()->AddToStackL( *this, iContainer );
- }
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CAknNavigationControlContainer* np= (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
-
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader,R_NAVITITLE_MODULES);
- iNaviDecorator = np->CreateNavigationLabelL( reader );
- CleanupStack::PopAndDestroy(); // resource reader
- np->PushL(*iNaviDecorator);
- }
-
-// ----------------------------------------------------------------------------
-// CTestModulesMenuView::DoDeactivate
-//
-// Deactivates view.
-// ----------------------------------------------------------------------------
-//
-void CTestModulesMenuView::DoDeactivate()
- {
- if ( iContainer )
- {
- iContainer->SaveActiveLine();
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- delete iNaviDecorator;
- iNaviDecorator = NULL;
- }
-
-// End of File
-
--- a/stifui/stifui/src/UIStoreHandler.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This module contains implementation of
-* CUIStoreHandler class member functions.
-*
-*/
-
-// INCLUDE FILES
-#include "UIStoreHandler.h"
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-class CUIStore;
-
-// ==================== LOCAL FUNCTIONS =======================================
-// None
-
-// ================= MEMBER FUNCTIONS =========================================
-// ----------------------------------------------------------------------------
-// CUIStoreHandler::CUIStoreHandler
-//
-// Default constructor.
-// C++ default constructor can NOT contain any code, that might leave.
-// ----------------------------------------------------------------------------
-//
-CUIStoreHandler::CUIStoreHandler( CAppUIAppUi* aAppUIAppUI ) :
- iAppUIAppUI( aAppUIAppUI ),
- iExecutedTestCaseCount( 0 )
- {
-
- }
-
-// ----------------------------------------------------------------------------
-// CUIStoreHandler::ConstructL
-//
-// Symbian OS second phase constructor.
-// Symbian OS default constructor can leave.
-// ----------------------------------------------------------------------------
-//
-void CUIStoreHandler::ConstructL()
- {
- CUIStoreIf::ConstructL();
-
- }
-
-// ----------------------------------------------------------------------------
-// CUIStoreHandler::NewL
-//
-// Two-phased constructor.
-// ----------------------------------------------------------------------------
-//
-CUIStoreHandler* CUIStoreHandler::NewL( CAppUIAppUi* aAppUIAppUI )
- {
- // Create CUIStoreHandler object uistorehandler
- CUIStoreHandler* uistorehandler = new (ELeave) CUIStoreHandler( aAppUIAppUI );
-
- CleanupStack::PushL( uistorehandler );
- uistorehandler->ConstructL();
- CleanupStack::Pop( uistorehandler );
-
- return uistorehandler;
-
- }
-
-// ----------------------------------------------------------------------------
-// CUIStoreHandler::~CUIStoreHandler
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CUIStoreHandler::~CUIStoreHandler()
- {
-
- }
-
-// ----------------------------------------------------------------------------
-// CUIStoreHandler::Update
-//
-// Receives output update notify from started test case.
-// Checks if that test case is currently in output view then
-// sends notification to AppUI which handles notification onward.
-// ----------------------------------------------------------------------------
-//
-void CUIStoreHandler::Update( CStartedTestCase* aTestCase, TInt aStatus )
- {
- _LIT( KErrorMsg, "Error during output update" );
- TRAPD(err,iAppUIAppUI->OutputUpdateL( aTestCase, aStatus ));
- if ( err != KErrNone )
- {
- RDebug::Print( KErrorMsg );
- }
-
- //iAppUi->OutputUpdate();
- //if( aStatus == EPrintUpdate )
- // {
- //iAppUIAppUI->OutputUpdate( aTestCase );
- // }
- //else
- // {
- //iAppUIAppUI->TestCaseStateChanged();
- // }
-
- }
-
-// ================= OTHER EXPORTED FUNCTIONS =================================
-// None
-
-// End of File
--- a/stifui/stifui/src/View.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains CView class definition.
-*
-*/
-
-// INCLUDE FILES
-#include <aknViewAppUi.h>
-#include <Stifui.rsg>
-#include "AppUIAppUi.h"
-#include "View.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-// ----------------------------------------------------------------------------
-// CView::ConstructL
-//
-// Symbian OS two-phased constructor.
-// ----------------------------------------------------------------------------
-//
-void CView::ConstructL()
- {
- iUIStore = ( (CAppUIAppUi*)AppUi() )->UIStoreHandler();
- }
-
-// ----------------------------------------------------------------------------
-// CView::~CView
-//
-// Destructor.
-// ----------------------------------------------------------------------------
-//
-CView::~CView()
- {
- }
-
-// ----------------------------------------------------------------------------
-// CView::Id
-//
-// Returns view´s id.
-// ----------------------------------------------------------------------------
-//
-TUid CView::Id() const
- {
- return TUid::Uid(0);
- }
-
-// ----------------------------------------------------------------------------
-// CView::HandleCommandL
-//
-// Handles a command.
-// ----------------------------------------------------------------------------
-//
-void CView::HandleCommandL(TInt /*aCommand*/)
- {
- }
-
-// ----------------------------------------------------------------------------
-// CView::HandleClientRectChange
-//
-// Handles client rect changes.
-// ----------------------------------------------------------------------------
-//
-void CView::HandleClientRectChange()
- {
- }
-
-// ----------------------------------------------------------------------------
-// CView::DoActivateL
-//
-// Initializes view when activated.
-// ----------------------------------------------------------------------------
-//
-void CView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/ )
- {
- }
-
-// ----------------------------------------------------------------------------
-// CView::DoDeactivate
-//
-// Deactivates view.
-// ----------------------------------------------------------------------------
-//
-void CView::DoDeactivate()
- {
- }
-
-// End of File
--- a/stifui/uitestserverstarter/data/UITestServerStarter.rls Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains name of uitestserverstarter.
-*
-*/
-
-// LOCALISATION STRINGS
-
-// Caption string for app.
-#define qtn_caption_string "UITestServerStarter"
-
-// End of File
--- a/stifui/uitestserverstarter/data/UITestServerStarter.rss Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file defines UITestServerStarter resources.
-*
-*/
-
-// RESOURCE IDENTIFIER
-NAME UITE // 4 letter ID
-
-
-// INCLUDES
-#include <eikon.rh>
-#include <avkon.rsg>
-#include <avkon.rh>
-#include <appinfo.rh>
-#include "UITestServerStarter.hrh"
-#include "UITestServerStarter.rls"
-
-// RESOURCE DEFINITIONS
-// -----------------------------------------------------------------------------
-//
-// Define the resource file signature
-// This resource should be empty.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE
- {
- }
-
-// -----------------------------------------------------------------------------
-//
-// Default Document Name
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_default_document_name
- {
- buf="UITE";
- }
-
-// -----------------------------------------------------------------------------
-//
-// Define default menu and CBA key.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE EIK_APP_INFO
- {
- //menubar = r_menubar;
- cba = R_AVKON_SOFTKEYS_EXIT;
- }
-
-
-// -----------------------------------------------------------------------------
-//
-// r_menubar
-// Main menubar
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_BAR r_menubar
- {
- titles =
- {
- MENU_TITLE { menu_pane = r_menu; }
- };
- }
-
-
-// -----------------------------------------------------------------------------
-//
-// r_menu
-// Menu for "Options"
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE MENU_PANE r_menu
- {
- items =
- {
- MENU_ITEM
- {
- command = EAknSoftkeyExit;
- txt = qtn_exit;
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// About dialog resource.
-//
-// -----------------------------------------------------------------------------
-//
-// None
-
-// -----------------------------------------------------------------------------
-//
-// Resources for messages.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF32 r_caption_string { buf=qtn_caption_string; }
-
-// ----------------------------------------------------------------------------
-//
-// r_localisable_app_info
-//
-// ----------------------------------------------------------------------------
-//
-RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info
- {
- short_caption = qtn_caption_string;
- caption_and_icon =
- CAPTION_AND_ICON_INFO
- {
- caption = qtn_caption_string;
-
- number_of_icons = 1;
- icon_file = "\\resource\\apps\\UITestServerStarter.mif";
- };
- }
-
-// End of File
--- a/stifui/uitestserverstarter/data/UITestServerStarter_reg.rss Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file defines UITestServerStarter resources.
-*
-*/
-
-#include "UITestServerStarter.hrh"
-#include "UITestServerStarter.rls"
-#include <appinfo.rh>
-#include <UITestServerStarter.rsg>
-
-UID2 KUidAppRegistrationResourceFile
-UID3 _UID3
-
-RESOURCE APP_REGISTRATION_INFO
- {
- app_file="UITestServerStarter";
-// localisable_resource_file = qtn_loc_resource_file_1;
-// localisable_resource_id = R_LOCALISABLE_APP_INFO;
- hidden=KAppIsHidden;
- embeddability=KAppNotEmbeddable;
- }
-
--- a/stifui/uitestserverstarter/group/UITestServerStarter.mmp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: MMP file of UITestServerStarter.
-*
-*/
-
-#include <platform_paths.hrh>
-
-SMPSAFE
-
-TARGET UITestServerStarter.exe
-TARGETTYPE exe
-UID 0x100039CE 0x2000F8E8
-VENDORID 0x101FB657
-SECUREID 0x2000F8E8
-CAPABILITY ALL -TCB
-
-START RESOURCE ../data/UITestServerStarter.rss
- HEADER
- TARGETPATH resource/apps
-END
-
-SOURCEPATH ../data
-START RESOURCE UITestServerStarter_reg.rss
- DEPENDS uitestserverstarter.rsg
- TARGETPATH /private/10003a3f/apps
-END
-
-SOURCEPATH ../src
-
-SOURCE TestServerThreadStarter.cpp
-SOURCE UITestServerStarter.cpp
-SOURCE UITestServerStarterAppView.cpp
-SOURCE UITestServerStarterAppUi.cpp
-SOURCE AknUiEnvProxy.cpp
-SOURCE EventUtil.cpp
-SOURCE UITestServerStarterApplication.cpp
-SOURCE UITestServerStarterDocument.cpp
-SOURCE UITestServerStarterAppContainer.cpp
-
-USERINCLUDE ../inc
-
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY apparc.lib
-LIBRARY cone.lib
-LIBRARY eikcore.lib
-LIBRARY avkon.lib
-LIBRARY commonengine.lib
-LIBRARY efsrv.lib
-LIBRARY estor.lib
-LIBRARY aknnotify.lib
-LIBRARY hlplch.lib
-LIBRARY apgrfx.lib
-LIBRARY ws32.lib
-LIBRARY aknskins.lib
-LIBRARY aknskinsrv.lib
-
-LIBRARY stiftestserver.lib
-
-START WINS
-// ?wins_specific_information
-END
-
-START MARM
-// ?marm_specific_information
-END
-
-/* Test Server requires large stack. In case of change update also thread creation parameters
- in "void CTestServerThreadStarter::RunL" method.
-*/
-EPOCSTACKSIZE 40960
-EPOCHEAPSIZE 0x001000 0x400000
-
-// End of File
--- a/stifui/uitestserverstarter/group/bld.inf Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: bld.inf build information for UITestServerStarter.
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-// Specify the platforms your component needs to be built for here.
-// ARM4 not supported in SDK
-
- DEFAULT
-
-
-PRJ_EXPORTS
-// None
-
-PRJ_TESTEXPORTS
-// None
-
-PRJ_MMPFILES
-
- UITestServerStarter.mmp
-
-PRJ_TESTMMPFILES
-// None
-
-// End of file
--- a/stifui/uitestserverstarter/inc/AknUiEnvProxy.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains the header file of the Akn UI
-* Proxy class implementations.
-*
-*/
-
-#ifndef AKNUIENVPROXY_H_
-#define AKNUIENVPROXY_H_
-
-// INCLUDES
-#include <stifinternal/UiEnvProxy.h>
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-class CUITestServerStarterAppUi;
-
-// CLASS DECLARATION
-
-// DESCRIPTION
-// Akn implementation of UI Proxy interface.
-class CAknUiEnvProxy: public CUiEnvProxy
- {
- public: // Enumerations
- // None
-
- private: // Enumerations
- // None
-
- public: // Constructors and destructor
- /**
- * C++ destructor.
- */
- ~CAknUiEnvProxy();
-
- public: // New functions
- /**
- * NewL is first phase of two-phased constructor.
- */
- static CAknUiEnvProxy* NewL( CUITestServerStarterAppUi* aAppUi );
-
- public: // Functions from base classes
-
- /**
- * Parses key code.
- */
- virtual TInt ParseKeyCode( const TDesC& aKeyCodeName, TUint& aKeyCode ) const;
-
- /**
- * Parses key scan code.
- */
- virtual TInt ParseKeyScanCode( const TDesC& aKeyScanCodeName, TInt& aKeyScanCode ) const;
-
- /**
- * Parses key modifier.
- */
- virtual TInt ParseModifier( const TDesC& aModifierName, TUint& aModifier ) const;
-
- /**
- * Parse pointer event type
- */
- virtual TInt ParsePointerEventType( const TDesC& aPointerEventTypeName, TUint& aPointerEventType ) const;
-
- /**
- * Brings UI control container to foreground.
- */
- virtual void BringToForeground();
-
- /**
- * Sends UI control container to background.
- */
- virtual void SendToBackground();
-
- /**
- * Sends local key event to UI control.
- */
- virtual void PressKeyL( TRequestStatus* aStatus, TUint aKeyCode, TInt aKeyScanCode = 0,
- TUint aKeyModifiers = 0, TInt aKeyRepeats = 0 );
-
- /**
- * Sends global key event to UI control.
- */
- virtual void PressKeyL( TUint aKeyCode, TInt aKeyScanCode = 0,
- TUint aKeyModifiers = 0, TInt aKeyRepeats = 0 );
-
- /**
- * Sends text to UI control.
- */
- virtual void TypeTextL( TRequestStatus* aStatus, const TDesC& aText );
-
- /**
- * Sends global text to UI control.
- */
- virtual void TypeTextL( const TDesC& aText );
-
- /**
- * Send pointer event
- */
- virtual void SendPointerEventL( TUint aType, const TPoint& aPosition );
-
- /**
- * Send local pointer event
- */
- virtual void SendPointerEventL( TRequestStatus* aStatus, TUint aType, const TPoint& aPosition );
-
- protected: // New functions
- // None
-
- protected: // Functions from base classes
- // None
-
- private: // New functions
- /**
- * C++ default constructor.
- */
- CAknUiEnvProxy();
-
- /**
- * By default Symbian OS constructor is private.
- */
- void ConstructL( CUITestServerStarterAppUi* aAppUi );
-
- public: //Data
- // None
-
- protected: // Data
- // None
-
- private: // Data
- CUITestServerStarterAppUi* iAppUi; // Pointer to AppUi
-
- public: // Friend classes
- // None
-
- protected: // Friend classes
- // None
-
- private: // Friend classes
- // None
-};
-
-#endif // AKNUIENVPROXY_H_
-
-// End of File
--- a/stifui/uitestserverstarter/inc/EventUtil.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains TEventUtil class declaration.
-*
-*/
-
-#ifndef EVENTUTIL_H_
-#define EVENTUTIL_H_
-
-// INCLUDES
-#include <e32base.h>
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// CLASS DECLARATION
-
-// DESCRIPTION
-// Utility class for key codes parsing.
-class TEventUtil
- {
- private: // Enumerations
- // none
-
- public: // Enumerations
- enum TCustomPointerEventType { EButton1 = 1000, EButton2, EButton3 };
-
- public: // Constructors and destructor
-
- public: // Constructors and destructor
-
- public: // New functions
- /**
- * Returns descriptive key code name.
- */
- static TPtrC GetKeyCodeName( TUint aKeyCode );
-
- /**
- * Parses key code.
- */
- static TInt ParseKeyCode( const TDesC& aKeyCodeName, TUint& aKeyCode );
-
- /**
- * Returns descriptive key scan code name.
- */
- static TPtrC GetKeyScanCodeName( TInt aKeyScanCode );
-
- /**
- * Parses key scan code.
- */
- static TInt ParseKeyScanCode( const TDesC& aKeyScanCodeName, TInt& aKeyScanCode );
-
- /**
- * Returns descriptive key modifier name.
- */
- static TPtrC GetModifierName( TUint aModifier );
-
- /**
- * Parses key modifier.
- */
- static TInt ParseModifier( const TDesC& aModifierName, TUint& aModifier );
-
- /**
- * Parses pointer event type.
- */
- static TInt ParsePointerEventType( const TDesC& aPointerEventTypeName, TUint& aPointerEventType );
-
- public: // Functions from base classes
-
- protected: // New functions
-
- protected: // Functions from base classes
-
- private: // New functions
-
- public: // Data
-
- protected: // Data
-
- private: // Data
-
- public: // Friend classes
-
- protected: // Friend classes
-
- private: // Friend classes
-
- };
-
-#endif /*EVENTUTIL_H_*/
-
-// End of File
--- a/stifui/uitestserverstarter/inc/TestServerThreadStarter.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,132 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains the header file of the
-* TestServerThreadStarter class.
-*
-*/
-
-
-#ifndef TESTSERVERTHREADSTARTER_H_
-#define TESTSERVERTHREADSTARTER_H_
-
-// INCLUDES
-#include "e32base.h"
-
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-class CTestThreadContainerRunnerFactory;
-
-// CLASS DECLARATION
-
-// DESCRIPTION
-// Class used to create thread in which testserver execution code is placed.
-class CTestServerThreadStarter: public CActive
- {
- public: // Enumerations
- // None
-
- private: // Enumerations
- // None
-
- public: // Constructors and destructor
- /**
- * C++ destructor.
- */
- ~CTestServerThreadStarter();
-
- public: // New functions
- /**
- * NewL is first phase of two-phased constructor.
- */
- static CTestServerThreadStarter* NewL();
-
- /**
- * Performs testserver execution request.
- */
- TInt RunTestServerThread( CTestThreadContainerRunnerFactory* aTestThreadContainerRunnerFactory );
- public: // Functions from base classes
- /**
- * RunL derived from CActive handles the completed requests.
- */
- void RunL();
-
- /**
- * DoCancel derived from CActive handles the Cancel.
- */
- void DoCancel();
-
- protected: // New functions
- // None
-
- protected: // Functions from base classes
- // None
-
- private: // New functions
- /**
- * Thread function in which testserver execution code is placed.
- */
- static TInt TestServerStarterThreadFunction( TAny* aParameters );
-
- /**
- * C++ default constructor.
- */
- CTestServerThreadStarter();
-
- /**
- * By default Symbian OS constructor is private.
- */
- void ConstructL();
-
- public: //Data
- // None
-
- protected: // Data
- // None
-
- private: // Data
- RTimer iTimer; // Timer which complets testserver execution request
- CTestThreadContainerRunnerFactory* iTestThreadContainerRunnerFactory; // Pointer to test thread container
- // runner factory passed as a parameter
- // to function which executes testserver
- TThreadId iMainThreadId; // UITestServerStarter main thread id
- TInt iReturnCode; // TestServer execution return code
- RSemaphore iServerThreadStartedSemaphore; // Semaphore which indicates that testserver execution thread
- // was successfully created
- public: // Friend classes
- // None
-
- protected: // Friend classes
- // None
-
- private: // Friend classes
- // None
- };
-
-
-
-#endif // TESTSERVERTHREADSTARTER_H_
-
-// End of File
--- a/stifui/uitestserverstarter/inc/UITestServerStarter.hrh Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains UID3 definition.
-*
-*/
-
-#ifndef __UITESTSERVERSTARTER_HRH__
-#define __UITESTSERVERSTARTER_HRH__
-
-#define _UID3 0x2000F8E8
-
-#endif // __UITESTSERVERSTARTER_HRH__
--- a/stifui/uitestserverstarter/inc/UITestServerStarterAppContainer.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains the header file of the
-* UITestServerStarter AppUi container class.
-*
-*/
-
-#ifndef UITESTSERVERSTARTERAPPCONTAINER_H_
-#define UITESTSERVERSTARTERAPPCONTAINER_H_
-
-// INCLUDES
-#include <coecntrl.h>
-#include <coemop.h>
-
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-class CAknsBasicBackgroundControlContext;
-
-// CLASS DECLARATION
-
-// DESCRIPTION
-// UITestServerStarter standard AppUi container class.
-class CUITestServerStarterAppContainer: public CCoeControl
- {
- public: // Enumerations
- // None
-
- private: // Enumerations
- // None
-
- public: // Constructors and destructor
- /**
- * Virtual Destructor.
- */
- ~CUITestServerStarterAppContainer();
-
- private: // Constructors and destructor
- /**
- * C++ default constructor.
- */
- CUITestServerStarterAppContainer();
-
- /**
- * Perform the second phase construction of a
- * CUITestServerStarterAppView object.
- */
- void ConstructL( const TRect& aRect );
-
- public: // New functions
- /**
- * Two-phased constructor.
- * Create a CUITestServerStarterAppContainer object, which will draw itself to aRect.
- */
- static CUITestServerStarterAppContainer* NewL( const TRect& aRect );
-
- /**
- * Two-phased constructor.
- * Create a CUITestServerStarterAppContainer object, which will draw itself
- */
- static CUITestServerStarterAppContainer* NewLC( const TRect& aRect );
-
-
- /**
- * This function is used to allow controls to ask their owners
- * for access to other objects that they own
- */
- TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
- public: // Functions from base classes
- // None
-
- protected: // New functions
- // None
-
- protected: // Functions from base classes
- // None
-
- private: // New functions
- // None
-
- private: // Functions from base classes
-
- /**
- * Draws the control
- */
- void Draw( const TRect& aRect ) const;
-
- /**
- * Responds to changes to the size and position of the
- * contents of this control
- */
- void SizeChanged();
-
- //void HandleResourceChange( TInt aType );
- public: //Data
- // None
-
- protected: // Data
- // None
-
- private: // Data
- CAknsBasicBackgroundControlContext* iBgContext; // Skin background object context pointer
-
- public: // Friend classes
- // None
-
- protected: // Friend classes
- // None
-
- private: // Friend classes
- // None
- };
-
-#endif /*UITESTSERVERSTARTERAPPCONTAINER_H_*/
-
-// End of File
--- a/stifui/uitestserverstarter/inc/UITestServerStarterAppUi.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,172 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains the header file of the
-* UITestServerStarter AppUi class
-*
-*/
-
-#ifndef UITESTSERVERSTARTERAPPUI_H_
-#define UITESTSERVERSTARTERAPPUI_H_
-
-// INCLUDES
-#include <aknViewAppUi.h>
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-class CUITestServerStarterAppView;
-
-// CLASS DECLARATION
-
-// DESCRIPTION
-// UITestServerStarter AppUi class
-class CUITestServerStarterAppUi : public CAknViewAppUi
- {
- public: // Enumerations
- // None
-
- private: // Enumerations
- /**
- * Currently handled event type.
- */
- enum TEventType {
- ENone, // None
- EPressKey, // Press key event
- ETypeText, // Type text event
- EPointerEvent, // Pointer event
- };
-
- public: // Constructors and destructor
- /**
- * C++ default constructor. This needs to be public due to
- * the way the framework constructs the AppUi
- */
- CUITestServerStarterAppUi();
-
- /**
- * Virtual Destructor.
- */
- virtual ~CUITestServerStarterAppUi();
-
- public: // New functions
- /**
- * ConstructL.
- * 2nd phase constructor.
- */
- void ConstructL();
-
- /**
- * Prepares AppUi to recive type text event
- */
- virtual void PrepareToTypeText( TInt aTextLength );
-
- /**
- * Prepares AppUi to recive key press event
- */
- virtual void PrepareToPressKey();
-
- /**
- * Prepares AppUi to recive pointer event
- */
- virtual void PrepareToPointerEvent();
-
- /**
- * Notifies that key press event was recived.
- */
- virtual void KeyPressHandled();
-
- /**
- * Notifies that text type event was recived.
- */
- virtual void TextTypeHandled();
-
- /**
- * Notifies that pointer event was recived.
- */
- virtual void PointerEventHandled();
-
- /**
- * Requests notification when key press event is handled.
- */
- virtual void NotifyAboutHandledKeyPress( TRequestStatus* aStatus );
-
- /**
- * Requests notification when text type event is handled.
- */
- virtual void NotifyAboutHandledTextType( TRequestStatus* aStatus );
-
- /**
- * Requests notification when pointer event is handled.
- */
- virtual void NotifyAboutHandledPointerEvent( TRequestStatus* aStatus );
-
- public: // Functions from base classes
- /**
- * Overwritten version of CCoeAppUi::HandleWsEventL() method.
- */
- void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );
-
- protected: // New functions
- // None
-
- protected: // Functions from base classes
- // None
-
- private: // New functions
- // None
-
- private: // Functions from base classes
- /**
- * From CEikAppUi, HandleCommandL.
- * Takes care of command handling.
- * @param aCommand Command to be handled.
- */
- void HandleCommandL( TInt aCommand );
-
- public: //Data
- // None
-
- protected: // Data
- // None
-
- private: // Data
- CUITestServerStarterAppView* iAppView; // The application view owned by CUITestServerStarterAppUi
- TRequestStatus* iEventStatus; // Pointer to request statuc which is completed when
- // selected event is handled.
- TEventType iEventType; // Currently handled event type;
- TInt iTypeTextLength; // Length of text send by typetext testscripter keyword
-
- public: // Friend classes
- // None
-
- protected: // Friend classes
- // None
-
- private: // Friend classes
- // None
- };
-
-#endif // UITESTSERVERSTARTERAPPUI_H_
-
-// End of File
--- a/stifui/uitestserverstarter/inc/UITestServerStarterAppView.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains the header file of the
-* UITestServerStarter AppUi view class.
-*
-*/
-
-#ifndef UITESTSERVERSTARTERAPPVIEW_H_
-#define UITESTSERVERSTARTERAPPVIEW_H_
-
-// INCLUDES
-#include <aknview.h>
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-class CUITestServerStarterAppContainer;
-
-// CLASS DECLARATION
-
-// DESCRIPTION
-// UITestServerStarter standard AppUi view class.
-class CUITestServerStarterAppView : public CAknView
- {
- public: // Enumerations
- // None
-
- private: // Enumerations
- // None
-
- public: // Constructors and destructor
- /**
- * Virtual Destructor.
- */
- virtual ~CUITestServerStarterAppView();
-
- private: // Constructors and destructor
-
- /**
- * Perform the second phase construction of a
- * CUITestServerStarterAppView object.
- */
- void ConstructL();
-
- /**
- * C++ default constructor.
- */
- CUITestServerStarterAppView();
-
- public: // New functions
- /**
- * Two-phased constructor.
- * Create a CUITestServerStarterAppView object.
- */
- static CUITestServerStarterAppView* NewL();
-
- /**
- * Two-phased constructor.
- * Create a CUITestServerStarterAppView object
- */
- static CUITestServerStarterAppView* NewLC();
-
- public: // Functions from base classes
- /**
- * Return Uid
- */
- TUid Id() const;
-
- /**
- * Handle Commands
- */
- void HandleCommandL(TInt aCommand);
-
- /**
- * Handle size changes
- */
- void HandleClientRectChange();
-
- protected: // New functions
- // None
-
- protected: // Functions from base classes
- // None
-
- private: // New functions
- // None
-
- private: // Functions from base classes
- /**
- * From AknView, Activates view
- */
- void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
- const TDesC8& aCustomMessage);
-
- /**
- * From AknView, Deactivates view
- */
- void DoDeactivate();
-
- public: //Data
- // None
-
- protected: // Data
- // None
-
- private: // Data
- CUITestServerStarterAppContainer* iContainer; // View container
-
- public: // Friend classes
- // None
-
- protected: // Friend classes
- // None
-
- private: // Friend classes
- // None
- };
-
-#endif // UITESTSERVERSTARTERAPPVIEW_H_
-
-// End of File
--- a/stifui/uitestserverstarter/inc/UITestServerStarterApplication.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains the header file of the
-* CUITestServerStarterApplication class.
-*
-*/
-
-#ifndef UITESTSERVERSTARTERAPPLICATION_H_
-#define UITESTSERVERSTARTERAPPLICATION_H_
-
-
-// INCLUDES
-#include <aknapp.h>
-#include "UITestServerStarter.hrh"
-
-// CONSTANTS
-
-// UID for the application;
-const TUid KUidUITestServerStarterApp =
- {
- _UID3
- };
-
-const TUid KMainViewId = { 1982 };
-// CLASS DECLARATION
-
-// CLASS DECLARATION
-// DESCRIPTION
-/**
- * UITestServerStarterApplication application class.
- * Provides factory to create concrete document object.
- * An instance of CUITestServerStarterApplication is the application part of the
- * AVKON application framework for the CUITestServerStarterApplication application.
- */
-class CUITestServerStarterApplication : public CAknApplication
- {
- public: // Enumerations
- // None
-
- private: // Enumerations
- // None
-
- public: // Constructors and destructor
- /**
- * C++ destructor.
- */
-
- public:
- // Functions from base classes
-
- /**
- * From CApaApplication, AppDllUid.
- * @return Application's UID (KUidUITestServerStarterApplication).
- */
- TUid AppDllUid () const;
-
- protected: // Functions from base classes
-
- /**
- * From CApaApplication, CreateDocumentL.
- * Creates CUITestServerStarterDocument document object. The returned
- * pointer in not owned by the CUITestServerStarterApplication object.
- * @return A pointer to the created document object.
- */
- CApaDocument* CreateDocumentL ();
-
- virtual void PreDocConstructL();
-
-
- protected: // New functions
- // None
-
- protected: // Functions from base classes
- // None
-
- private: // New functions
- // None
-
- public: //Data
- // None
-
- protected: // Data
- // None
-
- private: // Data
- // None
-
- public: // Friend classes
- // None
-
- protected: // Friend classes
- // None
-
- private: // Friend classes
- // None
- };
-
-
-
-#endif /*UITESTSERVERSTARTERAPPLICATION_H_*/
--- a/stifui/uitestserverstarter/inc/UITestServerStarterDocument.h Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains the header file of the
-* UITestServerStarter Document class.
-*
-*/
-
-#ifndef UITESTSERVERSTARTERDOCUMENT_H_
-#define UITESTSERVERSTARTERDOCUMENT_H_
-
-// INCLUDES
-#include <AknDoc.h>
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-class CUITestServerStarterAppUi;
-class CEikApplication;
-
-// CLASS DECLARATION
-
-// DESCRIPTION
-/**
- * CClockTestDocument application class.
- * An instance of class CClockTestDocument is the Document part of the
- * AVKON application framework for the ClockTest example application.
- */
-class CUITestServerStarterDocument : public CAknDocument
- {
- public: // Enumerations
- // None
-
- private: // Enumerations
- // None
-
- private: // Constructors and destructor
- // None
- public: // New functions
-
- /**
- * NewL.
- * Two-phased constructor.
- * Construct a CUITestServerStarterDocument for the AVKON application aApp
- * using two phase construction, and return a pointer
- * to the created object.
- * @param aApp Application creating this document.
- * @return A pointer to the created instance of CUITestServerStarterDocument.
- */
- static CUITestServerStarterDocument* NewL (CEikApplication& aApp);
-
- /**
- * NewLC.
- * Two-phased constructor.
- * Construct a CUITestServerStarterDocument for the AVKON application aApp
- * using two phase construction, and return a pointer
- * to the created object.
- * @param aApp Application creating this document.
- * @return A pointer to the created instance of CUITestServerStarterDocument.
- */
- static CUITestServerStarterDocument* NewLC (CEikApplication& aApp);
-
- /**
- * ~CUITestServerStarterDocument
- * Virtual Destructor.
- */
- virtual ~CUITestServerStarterDocument();
-
- public: // Functions from base classes
-
- /**
- * CreateAppUiL
- * From CEikDocument, CreateAppUiL.
- * Create a CUITestServerStarterAppUi object and return a pointer to it.
- * The object returned is owned by the Uikon framework.
- * @return Pointer to created instance of AppUi.
- */
- CEikAppUi* CreateAppUiL ();
-
- protected: // New functions
- // None
-
- protected: // Functions from base classes
- // None
-
- private: // New functions
-
- /**
- * ConstructL
- * 2nd phase constructor.
- */
- void ConstructL ();
-
- /**
- * CUITestServerStarterDocument.
- * C++ default constructor.
- * @param aApp Application creating this document.
- */
- CUITestServerStarterDocument( CEikApplication& aApp );
-
- private: // Functions from base classes
- // None
-
- public: //Data
- // None
-
- protected: // Data
- // None
-
- private: // Data
- // None
-
- public: // Friend classes
- // None
-
- protected: // Friend classes
- // None
-
- private: // Friend classes
- // None
- };
-
-
-#endif /*UITESTSERVERSTARTERDOCUMENT_H_*/
--- a/stifui/uitestserverstarter/src/AknUiEnvProxy.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,674 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This module contains the implementation of
-* CAknUiEnvProxy class member functions.
-*
-*/
-
-// INCLUDE FILES
-#include "AknUiEnvProxy.h"
-#include "UITestServerStarterAppUi.h"
-#include "EventUtil.h"
-
-#include <coeaui.h>
-#include <eikenv.h>
-#include <apgtask.h>
-#include <w32std.h>
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// ================= MEMBER FUNCTIONS =========================================
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: NewL
-
- Description: NewL is first phase of two-phased constructor.
-
- NewL is first phase of two-phased constructor.
-
- Parameters: CUITestServerStarterAppUi* aAppUi: in: Pointer to CUITestServerStarterAppUi.
-
- Return Values: Pointer to new CAknUiEnvProxy object.
-
- Errors/Exceptions: Leaves if new or ConstructL leaves.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CAknUiEnvProxy* CAknUiEnvProxy::NewL( CUITestServerStarterAppUi* aAppUi )
- {
- CAknUiEnvProxy* self = new(ELeave)CAknUiEnvProxy();
- CleanupStack::PushL( self );
- self->ConstructL( aAppUi );
- CleanupStack::Pop( self );
- return self;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: ConstructL
-
- Description: ConstructL is second phase of two-phased constructor.
-
- Performs construction of CAknUiEnvProxy object.
-
- Parameters: CUITestServerStarterAppUi* aAppUi: in: Pointer to CUITestServerStarterAppUi.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CAknUiEnvProxy::ConstructL( CUITestServerStarterAppUi* aAppUi )
- {
- iAppUi = aAppUi;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: BringToForeground
-
- Description: Brings UI component container to foreground.
-
- Brings UI component container to foreground.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CAknUiEnvProxy::BringToForeground()
- {
- TApaTask task( CCoeEnv::Static()->WsSession() );
- task.SetWgId( CCoeEnv::Static()->RootWin().Identifier() );
- task.BringToForeground();
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: SendToBackground
-
- Description: Sends UI component container to background.
-
- Sends UI component container to background.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CAknUiEnvProxy::SendToBackground( )
- {
- TApaTask task( CCoeEnv::Static()->WsSession() );
- task.SetWgId( CCoeEnv::Static()->RootWin().Identifier() );
- task.SendToBackground();
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: PressKeyL
-
- Description: Sends local key press event to UI component.
-
- Sends key press event to UI component. UI component must be first added to
- AppUi stack to be able to recive this key event.
-
- Parameters: TRequestStatus* aStatus: out: Pointer to request status used to notify that
- key event was recived.
- TUint aKeyCode: in: Key code.
- TInt aKeyScanCode: in: Key scan code.
- TUint aKeyModifiers: in: Key modifiers
- TInt aKeyRepeats: in: Key press repeats count.
-
- Return Values: None.
-
- Errors/Exceptions: Leaves if some error occurs during key event sending.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CAknUiEnvProxy::PressKeyL( TRequestStatus* aStatus, TUint aKeyCode, TInt aKeyScanCode,
- TUint aKeyModifiers, TInt aKeyRepeats )
- {
- // Fill key event structure
- TWsEvent wsEvent;
- wsEvent.SetType(EEventKey);
- TKeyEvent* keyEvent = wsEvent.Key();
- keyEvent->iCode = aKeyCode;
- keyEvent->iScanCode = aKeyScanCode;
- keyEvent->iModifiers = aKeyModifiers;
- keyEvent->iRepeats = aKeyRepeats;
-
- // Send info to AppUi that we are going to send key event
- iAppUi->PrepareToPressKey();
-
- RWsSession& wsSession = CCoeEnv::Static()->WsSession();
- TInt wgId = CCoeEnv::Static()->RootWin().Identifier();
- // Send key event
- TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );
- User::LeaveIfError( ret );
-
- // Request notification when key press is handled
- *aStatus = KRequestPending;
- iAppUi->NotifyAboutHandledKeyPress( aStatus );
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: PressKeyL
-
- Description: Sends global key press event to UI component.
-
- Sends key press event to UI component which is currently focuused.
-
- Parameters: TUint aKeyCode: in: Key code.
- TInt aKeyScanCode: in: Key scan code.
- TUint aKeyModifiers: in: Key modifiers
- TInt aKeyRepeats: in: Key press repeats count.
-
- Return Values: None.
-
- Errors/Exceptions: Leaves if some error occurs during key event sending.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CAknUiEnvProxy::PressKeyL( TUint aKeyCode, TInt aKeyScanCode,
- TUint aKeyModifiers, TInt aKeyRepeats )
- {
- // Fill key event structure
- TWsEvent wsEvent;
- wsEvent.SetType(EEventKey);
- TKeyEvent* keyEvent = wsEvent.Key();
- keyEvent->iCode = aKeyCode;
- keyEvent->iScanCode = aKeyScanCode;
- keyEvent->iModifiers = aKeyModifiers;
- keyEvent->iRepeats = aKeyRepeats;
-
- RWsSession& wsSession = CCoeEnv::Static()->WsSession();
- TInt wgId = wsSession.GetFocusWindowGroup();
- TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );
- User::LeaveIfError( ret );
- }
-
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: TypeTextL
-
- Description: Sends text to UI component.
-
- Sends text to UI component. UI component must be first added to
- AppUi stack to be able to recive this key event.
-
- Parameters: TRequestStatus* aStatus: out: Pointer to request status used to notify that
- key event was recived.
- TPtrC aText: in: Text which will be send to UI component.
-
- Return Values: None.
-
- Errors/Exceptions: Leaves if some error occurs during key event sending.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CAknUiEnvProxy::TypeTextL( TRequestStatus* aStatus, const TDesC& aText )
- {
- TLex textParser( aText );
-
- // Send info to AppUi that we are going to send text
- iAppUi->PrepareToTypeText( aText.Length() );
-
- TInt wgId = CCoeEnv::Static()->RootWin().Identifier();
- RWsSession& wsSession = CCoeEnv::Static()->WsSession();
-
- TChar character = 0;
- while ( ( character = textParser.Get() ) != 0 )
- {
- // Fill key event structure
- TWsEvent wsEvent;
- wsEvent.SetType(EEventKey);
- TKeyEvent* keyEvent = wsEvent.Key();
- keyEvent->iCode = character;
- keyEvent->iScanCode = 0;
- keyEvent->iModifiers = 0;
- keyEvent->iRepeats = 0;
-
- // Send single character from text to UI component
- TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );
- User::LeaveIfError( ret );
- }
-
- // Request notification when send text is recived
- *aStatus = KRequestPending;
- iAppUi->NotifyAboutHandledTextType( aStatus );
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: TypeTextL
-
- Description: Sends global text to UI component.
-
- Sends global text to UI component. UI component must be focused to receive that event.
-
- Parameters: TPtrC aText: in: Text which will be send to UI component.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CAknUiEnvProxy::TypeTextL( const TDesC& aText )
- {
- TLex textParser( aText );
-
- RWsSession& wsSession = CCoeEnv::Static()->WsSession();
- TInt wgId = wsSession.GetFocusWindowGroup();
-
- TChar character = 0;
- while ( ( character = textParser.Get() ) != 0 )
- {
- // Fill key event structure
- TWsEvent wsEvent;
- wsEvent.SetType(EEventKey);
- TKeyEvent* keyEvent = wsEvent.Key();
- keyEvent->iCode = character;
- keyEvent->iScanCode = 0;
- keyEvent->iModifiers = 0;
- keyEvent->iRepeats = 0;
-
- // Send single character from text to UI component
- TInt ret = wsSession.SendEventToWindowGroup( wgId, wsEvent );
- User::LeaveIfError( ret );
- }
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: SendPointerEventL
-
- Description: Send pointer event
-
- Send pointer event.
-
- Parameters: TUint aType: in: KEvent type.
- const TPoint& aPosition: in: Position.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CAknUiEnvProxy::SendPointerEventL( TUint aType, const TPoint& aPosition )
- {
- RWsSession& wsSession = CCoeEnv::Static()->WsSession();
- TRawEvent pointerEvent;
-
- if ( aType < TEventUtil::EButton1 ) {
- pointerEvent.Set( ( TRawEvent::TType )aType, aPosition.iX, aPosition.iY );
- wsSession.SimulateRawEvent( pointerEvent );
- }
- else if ( ( aType >= TEventUtil::EButton1 ) && ( aType <= TEventUtil::EButton3 ) )
- {
- TRawEvent pointerEventDown;
- TRawEvent pointerEventUp;
-
- switch ( aType )
- {
- case TEventUtil::EButton1:
- {
- pointerEventDown.Set( TRawEvent::EButton1Down, aPosition.iX, aPosition.iY );
- pointerEventUp.Set( TRawEvent::EButton1Up, aPosition.iX, aPosition.iY );
- }
- break;
- case TEventUtil::EButton2:
- {
- pointerEventDown.Set( TRawEvent::EButton2Down, aPosition.iX, aPosition.iY );
- pointerEventUp.Set( TRawEvent::EButton2Up, aPosition.iX, aPosition.iY );
- }
- break;
- case TEventUtil::EButton3:
- {
- pointerEventDown.Set( TRawEvent::EButton3Down, aPosition.iX, aPosition.iY );
- pointerEventUp.Set( TRawEvent::EButton3Up, aPosition.iX, aPosition.iY );
- }
- break;
- default:
- User::Leave( KErrArgument );
- }
- wsSession.SimulateRawEvent( pointerEventDown );
- wsSession.SimulateRawEvent( pointerEventUp );
- }
- else
- {
- User::Leave( KErrArgument );
- }
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: SendPointerEventL
-
- Description: Send pointer event
-
- Send pointer event.
-
- Parameters: TRequestStatus* aStatus: in: Pointer to request status used to notify that
- pointer event was recived.
- TUint aType: in: KEvent type.
- const TPoint& aPosition: in: Position.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CAknUiEnvProxy::SendPointerEventL( TRequestStatus* aStatus, TUint aType, const TPoint& aPosition )
- {
- RWsSession& wsSession = CCoeEnv::Static()->WsSession();
-
- if ( aType < TEventUtil::EButton1 ) {
- TRawEvent pointerEvent;
- pointerEvent.Set( ( TRawEvent::TType )aType, aPosition.iX, aPosition.iY );
- // Send info to AppUi that we are going to send key event
- iAppUi->PrepareToPointerEvent();
- wsSession.SimulateRawEvent( pointerEvent );
- // Request notification when key press is handled
- *aStatus = KRequestPending;
- iAppUi->NotifyAboutHandledPointerEvent( aStatus );
- }
- else if ( ( aType >= TEventUtil::EButton1 ) && ( aType <= TEventUtil::EButton3 ) )
- {
- TRawEvent pointerEventDown;
- TRawEvent pointerEventUp;
- switch ( aType )
- {
- case TEventUtil::EButton1:
- {
- pointerEventDown.Set( TRawEvent::EButton1Down, aPosition.iX, aPosition.iY );
- pointerEventUp.Set( TRawEvent::EButton1Up, aPosition.iX, aPosition.iY );
- }
- break;
- case TEventUtil::EButton2:
- {
- pointerEventDown.Set( TRawEvent::EButton2Down, aPosition.iX, aPosition.iY );
- pointerEventUp.Set( TRawEvent::EButton2Up, aPosition.iX, aPosition.iY );
- }
- break;
- case TEventUtil::EButton3:
- {
- pointerEventDown.Set( TRawEvent::EButton3Down, aPosition.iX, aPosition.iY );
- pointerEventUp.Set( TRawEvent::EButton3Up, aPosition.iX, aPosition.iY );
- }
- break;
- default:
- User::Leave( KErrArgument );
- }
-
- CCoeEnv::Static()->RootWin().SimulatePointerEvent( pointerEventDown );
-
- // Send info to AppUi that we are going to send key event
- iAppUi->PrepareToPointerEvent();
-
- CCoeEnv::Static()->RootWin().SimulatePointerEvent( pointerEventUp );
-
- // Request notification when key press is handled
- *aStatus = KRequestPending;
- iAppUi->NotifyAboutHandledPointerEvent( aStatus );
- }
- else
- {
- User::Leave( KErrArgument );
- }
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: ParseKeyCode
-
- Description: Parses key code.
-
- Parses key code.
-
- Parameters: TDesC& aKeyCodeName: in: Key code name.
- TUint& aKeyCode: out: Parsed key code.
-
- Return Values: KErrNone if no error occures during parsing.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TInt CAknUiEnvProxy::ParseKeyCode( const TDesC& aKeyCodeName, TUint& aKeyCode ) const
- {
- return TEventUtil::ParseKeyCode( aKeyCodeName, aKeyCode );
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: ParseKeyScanCode
-
- Description: Parses key scan code.
-
- Parses key scan code.
-
- Parameters: TDesC& aKeyScanCodeName: in: Key scan code name.
- TUint& aKeyScanCode: out: Parsed key scan code.
-
- Return Values: KErrNone if no error occures during parsing.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TInt CAknUiEnvProxy::ParseKeyScanCode( const TDesC& aKeyScanCodeName, TInt& aKeyScanCode ) const
- {
- return TEventUtil::ParseKeyScanCode( aKeyScanCodeName, aKeyScanCode );
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: ParseModifier
-
- Description: Parses key modifier.
-
- Parses key modifier.
-
- Parameters: TDesC& aModifierName: in: Key modifier.
- TUint& aModifier: out: Parsed key modifier.
-
- Return Values: KErrNone if no error occures during parsing.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TInt CAknUiEnvProxy::ParseModifier( const TDesC& aModifierName, TUint& aModifier ) const
- {
- return TEventUtil::ParseModifier( aModifierName, aModifier );
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: ParsePointerEventType
-
- Description: Parses pointer event type.
-
- Parses key modifier.
-
- Parameters: const TDesC& aPointerEventTypeName: in: Pointer event type.
- TUint& aModifier: out: Parsed pointer event type.
-
- Return Values: KErrNone if no error occures during parsing.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TInt CAknUiEnvProxy::ParsePointerEventType( const TDesC& aPointerEventTypeName, TUint& aPointerEventType ) const
- {
- return TEventUtil::ParsePointerEventType( aPointerEventTypeName, aPointerEventType );
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: CAknUiEnvProxy
-
- Description: C++ constructor.
-
- C++ constructor.
-
- Parameters: None
-
- Return Values: None
-
- Errors/Exceptions: None
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CAknUiEnvProxy::CAknUiEnvProxy()
- {
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: ~CAknUiEnvProxy
-
- Description: C++ destructor.
-
- C++ destructor.
-
- Parameters: None
-
- Return Values: None
-
- Errors/Exceptions: None
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CAknUiEnvProxy::~CAknUiEnvProxy()
- {
- }
-
-// End of File
--- a/stifui/uitestserverstarter/src/EventUtil.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1100 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This module contains the implementation of
-* CAknUiEnvProxy class member functions.
-*
-*/
-
-// INCLUDE FILES
-#include "EventUtil.h"
-#include <e32def.h>
-#include <e32keys.h>
-#include <w32std.h>
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-
-/**
- * Key code names definition macro
- */
-#define DefineKeyCodeNames( varName ) \
- static TText* const varName[] = \
- { \
- (TText*)L"ekeynull", \
- (TText*)L"ekeybell", \
- (TText*)L"ekeybackspace", \
- (TText*)L"ekeytab", \
- (TText*)L"ekeylinefeed", \
- (TText*)L"ekeyverticaltab", \
- (TText*)L"ekeyformfeed", \
- (TText*)L"ekeyenter", \
- (TText*)L"ekeyescape", \
- (TText*)L"ekeyspace", \
- (TText*)L"ekeydelete", \
- (TText*)L"ekeyprintscreen", \
- (TText*)L"ekeypause", \
- (TText*)L"ekeyhome", \
- (TText*)L"ekeyend", \
- (TText*)L"ekeypageup", \
- (TText*)L"ekeypagedown", \
- (TText*)L"ekeyinsert", \
- (TText*)L"ekeyleftarrow", \
- (TText*)L"ekeyrightarrow", \
- (TText*)L"ekeyuparrow", \
- (TText*)L"ekeydownarrow", \
- (TText*)L"ekeyleftshift", \
- (TText*)L"ekeyrightshift", \
- (TText*)L"ekeyleftalt", \
- (TText*)L"ekeyrightalt", \
- (TText*)L"ekeyleftctrl", \
- (TText*)L"ekeyrightctrl", \
- (TText*)L"ekeyleftfunc", \
- (TText*)L"ekeyrightfunc", \
- (TText*)L"ekeycapslock", \
- (TText*)L"ekeynumlock", \
- (TText*)L"ekeyscrolllock", \
- (TText*)L"ekeyf1", \
- (TText*)L"ekeyf2", \
- (TText*)L"ekeyf3", \
- (TText*)L"ekeyf4", \
- (TText*)L"ekeyf5", \
- (TText*)L"ekeyf6", \
- (TText*)L"ekeyf7", \
- (TText*)L"ekeyf8", \
- (TText*)L"ekeyf9", \
- (TText*)L"ekeyf10", \
- (TText*)L"ekeyf11", \
- (TText*)L"ekeyf12", \
- (TText*)L"ekeyf13", \
- (TText*)L"ekeyf14", \
- (TText*)L"ekeyf15", \
- (TText*)L"ekeyf16", \
- (TText*)L"ekeyf17", \
- (TText*)L"ekeyf18", \
- (TText*)L"ekeyf19", \
- (TText*)L"ekeyf20", \
- (TText*)L"ekeyf21", \
- (TText*)L"ekeyf22", \
- (TText*)L"ekeyf23", \
- (TText*)L"ekeyf24", \
- (TText*)L"ekeyoff", \
- (TText*)L"ekeyinccontrast", \
- (TText*)L"ekeydeccontrast", \
- (TText*)L"ekeybacklighton", \
- (TText*)L"ekeybacklightoff", \
- (TText*)L"ekeybacklighttoggle", \
- (TText*)L"ekeysliderdown", \
- (TText*)L"ekeysliderup", \
- (TText*)L"ekeymenu", \
- (TText*)L"ekeydictaphoneplay", \
- (TText*)L"ekeydictaphonestop", \
- (TText*)L"ekeydictaphonerecord",\
- (TText*)L"ekeyhelp", \
- (TText*)L"ekeydial", \
- (TText*)L"ekeyscreendimension0",\
- (TText*)L"ekeyscreendimension1",\
- (TText*)L"ekeyscreendimension2",\
- (TText*)L"ekeyscreendimension3",\
- (TText*)L"ekeyincvolume", \
- (TText*)L"ekeydecvolume", \
- (TText*)L"ekeydevice0", \
- (TText*)L"ekeydevice1", \
- (TText*)L"ekeydevice2", \
- (TText*)L"ekeydevice3", \
- (TText*)L"ekeydevice4", \
- (TText*)L"ekeydevice5", \
- (TText*)L"ekeydevice6", \
- (TText*)L"ekeydevice7", \
- (TText*)L"ekeydevice8", \
- (TText*)L"ekeydevice9", \
- (TText*)L"ekeydevicea", \
- (TText*)L"ekeydeviceb", \
- (TText*)L"ekeydevicec", \
- (TText*)L"ekeydeviced", \
- (TText*)L"ekeydevicee", \
- (TText*)L"ekeydevicef", \
- (TText*)L"ekeyapplication0", \
- (TText*)L"ekeyapplication1", \
- (TText*)L"ekeyapplication2", \
- (TText*)L"ekeyapplication3", \
- (TText*)L"ekeyapplication4", \
- (TText*)L"ekeyapplication5", \
- (TText*)L"ekeyapplication6", \
- (TText*)L"ekeyapplication7", \
- (TText*)L"ekeyapplication8", \
- (TText*)L"ekeyapplication9", \
- (TText*)L"ekeyapplicationa", \
- (TText*)L"ekeyapplicationb", \
- (TText*)L"ekeyapplicationc", \
- (TText*)L"ekeyapplicationd", \
- (TText*)L"ekeyapplicatione", \
- (TText*)L"ekeyapplicationf", \
- (TText*)L"ekeyyes", \
- (TText*)L"ekeyno", \
- (TText*)L"ekeyincbrightness", \
- (TText*)L"ekeydecbrightness", \
- (TText*)L"ekeykeyboardextend", \
- (TText*)L"ekeydevice10", \
- (TText*)L"ekeydevice11", \
- (TText*)L"ekeydevice12", \
- (TText*)L"ekeydevice13", \
- (TText*)L"ekeydevice14", \
- (TText*)L"ekeydevice15", \
- (TText*)L"ekeydevice16", \
- (TText*)L"ekeydevice17", \
- (TText*)L"ekeydevice18", \
- (TText*)L"ekeydevice19", \
- (TText*)L"ekeydevice1a", \
- (TText*)L"ekeydevice1b", \
- (TText*)L"ekeydevice1c", \
- (TText*)L"ekeydevice1d", \
- (TText*)L"ekeydevice1e", \
- (TText*)L"ekeydevice1f", \
- (TText*)L"ekeyapplication10", \
- (TText*)L"ekeyapplication11", \
- (TText*)L"ekeyapplication12", \
- (TText*)L"ekeyapplication13", \
- (TText*)L"ekeyapplication14", \
- (TText*)L"ekeyapplication15", \
- (TText*)L"ekeyapplication16", \
- (TText*)L"ekeyapplication17", \
- (TText*)L"ekeyapplication18", \
- (TText*)L"ekeyapplication19", \
- (TText*)L"ekeyapplication1a", \
- (TText*)L"ekeyapplication1b", \
- (TText*)L"ekeyapplication1c", \
- (TText*)L"ekeyapplication1d", \
- (TText*)L"ekeyapplication1e", \
- (TText*)L"ekeyapplication1f", \
- }
-
-/**
- * Key codes definition macro
- */
-#define DefineKeyCodes( varName ) \
- static TUint const varName[] = \
- { \
- (TUint)EKeyNull, \
- (TUint)EKeyBell, \
- (TUint)EKeyBackspace, \
- (TUint)EKeyTab, \
- (TUint)EKeyLineFeed, \
- (TUint)EKeyVerticalTab, \
- (TUint)EKeyFormFeed, \
- (TUint)EKeyEnter, \
- (TUint)EKeyEscape, \
- (TUint)EKeySpace, \
- (TUint)EKeyDelete, \
- (TUint)EKeyPrintScreen, \
- (TUint)EKeyPause, \
- (TUint)EKeyHome, \
- (TUint)EKeyEnd, \
- (TUint)EKeyPageUp, \
- (TUint)EKeyPageDown, \
- (TUint)EKeyInsert, \
- (TUint)EKeyLeftArrow, \
- (TUint)EKeyRightArrow, \
- (TUint)EKeyUpArrow, \
- (TUint)EKeyDownArrow, \
- (TUint)EKeyLeftShift, \
- (TUint)EKeyRightShift, \
- (TUint)EKeyLeftAlt, \
- (TUint)EKeyRightAlt, \
- (TUint)EKeyLeftCtrl, \
- (TUint)EKeyRightCtrl, \
- (TUint)EKeyLeftFunc, \
- (TUint)EKeyRightFunc, \
- (TUint)EKeyCapsLock, \
- (TUint)EKeyNumLock, \
- (TUint)EKeyScrollLock, \
- (TUint)EKeyF1, \
- (TUint)EKeyF2, \
- (TUint)EKeyF3, \
- (TUint)EKeyF4, \
- (TUint)EKeyF5, \
- (TUint)EKeyF6, \
- (TUint)EKeyF7, \
- (TUint)EKeyF8, \
- (TUint)EKeyF9, \
- (TUint)EKeyF10, \
- (TUint)EKeyF11, \
- (TUint)EKeyF12, \
- (TUint)EKeyF13, \
- (TUint)EKeyF14, \
- (TUint)EKeyF15, \
- (TUint)EKeyF16, \
- (TUint)EKeyF17, \
- (TUint)EKeyF18, \
- (TUint)EKeyF19, \
- (TUint)EKeyF20, \
- (TUint)EKeyF21, \
- (TUint)EKeyF22, \
- (TUint)EKeyF23, \
- (TUint)EKeyF24, \
- (TUint)EKeyOff, \
- (TUint)EKeyIncContrast, \
- (TUint)EKeyDecContrast, \
- (TUint)EKeyBacklightOn, \
- (TUint)EKeyBacklightOff, \
- (TUint)EKeyBacklightToggle, \
- (TUint)EKeySliderDown, \
- (TUint)EKeySliderUp, \
- (TUint)EKeyMenu, \
- (TUint)EKeyDictaphonePlay, \
- (TUint)EKeyDictaphoneStop, \
- (TUint)EKeyDictaphoneRecord, \
- (TUint)EKeyHelp, \
- (TUint)EKeyDial, \
- (TUint)EKeyScreenDimension0, \
- (TUint)EKeyScreenDimension1, \
- (TUint)EKeyScreenDimension2, \
- (TUint)EKeyScreenDimension3, \
- (TUint)EKeyIncVolume, \
- (TUint)EKeyDecVolume, \
- (TUint)EKeyDevice0, \
- (TUint)EKeyDevice1, \
- (TUint)EKeyDevice2, \
- (TUint)EKeyDevice3, \
- (TUint)EKeyDevice4, \
- (TUint)EKeyDevice5, \
- (TUint)EKeyDevice6, \
- (TUint)EKeyDevice7, \
- (TUint)EKeyDevice8, \
- (TUint)EKeyDevice9, \
- (TUint)EKeyDeviceA, \
- (TUint)EKeyDeviceB, \
- (TUint)EKeyDeviceC, \
- (TUint)EKeyDeviceD, \
- (TUint)EKeyDeviceE, \
- (TUint)EKeyDeviceF, \
- (TUint)EKeyApplication0, \
- (TUint)EKeyApplication1, \
- (TUint)EKeyApplication2, \
- (TUint)EKeyApplication3, \
- (TUint)EKeyApplication4, \
- (TUint)EKeyApplication5, \
- (TUint)EKeyApplication6, \
- (TUint)EKeyApplication7, \
- (TUint)EKeyApplication8, \
- (TUint)EKeyApplication9, \
- (TUint)EKeyApplicationA, \
- (TUint)EKeyApplicationB, \
- (TUint)EKeyApplicationC, \
- (TUint)EKeyApplicationD, \
- (TUint)EKeyApplicationE, \
- (TUint)EKeyApplicationF, \
- (TUint)EKeyYes, \
- (TUint)EKeyNo, \
- (TUint)EKeyIncBrightness, \
- (TUint)EKeyDecBrightness, \
- (TUint)EKeyKeyboardExtend, \
- (TUint)EKeyDevice10, \
- (TUint)EKeyDevice11, \
- (TUint)EKeyDevice12, \
- (TUint)EKeyDevice13, \
- (TUint)EKeyDevice14, \
- (TUint)EKeyDevice15, \
- (TUint)EKeyDevice16, \
- (TUint)EKeyDevice17, \
- (TUint)EKeyDevice18, \
- (TUint)EKeyDevice19, \
- (TUint)EKeyDevice1A, \
- (TUint)EKeyDevice1B, \
- (TUint)EKeyDevice1C, \
- (TUint)EKeyDevice1D, \
- (TUint)EKeyDevice1E, \
- (TUint)EKeyDevice1F, \
- (TUint)EKeyApplication10, \
- (TUint)EKeyApplication11, \
- (TUint)EKeyApplication12, \
- (TUint)EKeyApplication13, \
- (TUint)EKeyApplication14, \
- (TUint)EKeyApplication15, \
- (TUint)EKeyApplication16, \
- (TUint)EKeyApplication17, \
- (TUint)EKeyApplication18, \
- (TUint)EKeyApplication19, \
- (TUint)EKeyApplication1A, \
- (TUint)EKeyApplication1B, \
- (TUint)EKeyApplication1C, \
- (TUint)EKeyApplication1D, \
- (TUint)EKeyApplication1E, \
- (TUint)EKeyApplication1F, \
- }
-
-/**
- * Key scan code names definition macro.
- */
-#define DefineKeyScanCodeNames( varName ) \
- static TText* const varName[] = \
- { \
- (TText*)L"estdkeynull", \
- (TText*)L"estdkeybackspace", \
- (TText*)L"estdkeytab", \
- (TText*)L"estdkeyenter", \
- (TText*)L"estdkeyescape", \
- (TText*)L"estdkeyspace", \
- (TText*)L"estdkeyprintscreen", \
- (TText*)L"estdkeypause", \
- (TText*)L"estdkeyhome", \
- (TText*)L"estdkeyend", \
- (TText*)L"estdkeypageup", \
- (TText*)L"estdkeypagedown", \
- (TText*)L"estdkeyinsert", \
- (TText*)L"estdkeydelete", \
- (TText*)L"estdkeyleftarrow", \
- (TText*)L"estdkeyrightarrow", \
- (TText*)L"estdkeyuparrow", \
- (TText*)L"estdkeydownarrow", \
- (TText*)L"estdkeyleftshift", \
- (TText*)L"estdkeyrightshift", \
- (TText*)L"estdkeyleftalt", \
- (TText*)L"estdkeyrightalt", \
- (TText*)L"estdkeyleftctrl", \
- (TText*)L"estdkeyrightctrl", \
- (TText*)L"estdkeyleftfunc", \
- (TText*)L"estdkeyrightfunc", \
- (TText*)L"estdkeycapslock", \
- (TText*)L"estdkeynumlock", \
- (TText*)L"estdkeyscrolllock", \
- (TText*)L"estdkeyf1", \
- (TText*)L"estdkeyf2", \
- (TText*)L"estdkeyf3", \
- (TText*)L"estdkeyf4", \
- (TText*)L"estdkeyf5", \
- (TText*)L"estdkeyf6", \
- (TText*)L"estdkeyf7", \
- (TText*)L"estdkeyf8", \
- (TText*)L"estdkeyf9", \
- (TText*)L"estdkeyf10", \
- (TText*)L"estdkeyf11", \
- (TText*)L"estdkeyf12", \
- (TText*)L"estdkeyf13", \
- (TText*)L"estdkeyf14", \
- (TText*)L"estdkeyf15", \
- (TText*)L"estdkeyf16", \
- (TText*)L"estdkeyf17", \
- (TText*)L"estdkeyf18", \
- (TText*)L"estdkeyf19", \
- (TText*)L"estdkeyf20", \
- (TText*)L"estdkeyf21", \
- (TText*)L"estdkeyf22", \
- (TText*)L"estdkeyf23", \
- (TText*)L"estdkeyf24", \
- (TText*)L"estdkeyxxx", \
- (TText*)L"estdkeycomma", \
- (TText*)L"estdkeyfullstop", \
- (TText*)L"estdkeyforwardslash", \
- (TText*)L"estdkeybackslash", \
- (TText*)L"estdkeysemicolon", \
- (TText*)L"estdkeysinglequote", \
- (TText*)L"estdkeyhash", \
- (TText*)L"estdkeysquarebracketleft", \
- (TText*)L"estdkeysquarebracketright", \
- (TText*)L"estdkeyminus", \
- (TText*)L"estdkeyequals", \
- (TText*)L"estdkeynkpforwardslash", \
- (TText*)L"estdkeynkpasterisk", \
- (TText*)L"estdkeynkpminus", \
- (TText*)L"estdkeynkpplus", \
- (TText*)L"estdkeynkpenter", \
- (TText*)L"estdkeynkp1", \
- (TText*)L"estdkeynkp2", \
- (TText*)L"estdkeynkp3", \
- (TText*)L"estdkeynkp4", \
- (TText*)L"estdkeynkp5", \
- (TText*)L"estdkeynkp6", \
- (TText*)L"estdkeynkp7", \
- (TText*)L"estdkeynkp8", \
- (TText*)L"estdkeynkp9", \
- (TText*)L"estdkeynkp0", \
- (TText*)L"estdkeynkpfullstop", \
- (TText*)L"estdkeymenu", \
- (TText*)L"estdkeybacklighton", \
- (TText*)L"estdkeybacklightoff", \
- (TText*)L"estdkeybacklighttoggle", \
- (TText*)L"estdkeyinccontrast", \
- (TText*)L"estdkeydeccontrast", \
- (TText*)L"estdkeysliderdown", \
- (TText*)L"estdkeysliderup", \
- (TText*)L"estdkeydictaphoneplay", \
- (TText*)L"estdkeydictaphonestop", \
- (TText*)L"estdkeydictaphonerecord", \
- (TText*)L"estdkeyhelp", \
- (TText*)L"estdkeyoff", \
- (TText*)L"estdkeydial", \
- (TText*)L"estdkeyincvolume", \
- (TText*)L"estdkeydecvolume", \
- (TText*)L"estdkeydevice0", \
- (TText*)L"estdkeydevice1", \
- (TText*)L"estdkeydevice2", \
- (TText*)L"estdkeydevice3", \
- (TText*)L"estdkeydevice4", \
- (TText*)L"estdkeydevice5", \
- (TText*)L"estdkeydevice6", \
- (TText*)L"estdkeydevice7", \
- (TText*)L"estdkeydevice8", \
- (TText*)L"estdkeydevice9", \
- (TText*)L"estdkeydevicea", \
- (TText*)L"estdkeydeviceb", \
- (TText*)L"estdkeydevicec", \
- (TText*)L"estdkeydeviced", \
- (TText*)L"estdkeydevicee", \
- (TText*)L"estdkeydevicef", \
- (TText*)L"estdkeyapplication0", \
- (TText*)L"estdkeyapplication1", \
- (TText*)L"estdkeyapplication2", \
- (TText*)L"estdkeyapplication3", \
- (TText*)L"estdkeyapplication4", \
- (TText*)L"estdkeyapplication5", \
- (TText*)L"estdkeyapplication6", \
- (TText*)L"estdkeyapplication7", \
- (TText*)L"estdkeyapplication8", \
- (TText*)L"estdkeyapplication9", \
- (TText*)L"estdkeyapplicationa", \
- (TText*)L"estdkeyapplicationb", \
- (TText*)L"estdkeyapplicationc", \
- (TText*)L"estdkeyapplicationd", \
- (TText*)L"estdkeyapplicatione", \
- (TText*)L"estdkeyapplicationf", \
- (TText*)L"estdkeyyes", \
- (TText*)L"estdkeyno", \
- (TText*)L"estdkeyincbrightness", \
- (TText*)L"estdkeydecbrightness", \
- (TText*)L"estdkeykeyboardextend", \
- (TText*)L"estdkeydevice10", \
- (TText*)L"estdkeydevice11", \
- (TText*)L"estdkeydevice12", \
- (TText*)L"estdkeydevice13", \
- (TText*)L"estdkeydevice14", \
- (TText*)L"estdkeydevice15", \
- (TText*)L"estdkeydevice16", \
- (TText*)L"estdkeydevice17", \
- (TText*)L"estdkeydevice18", \
- (TText*)L"estdkeydevice19", \
- (TText*)L"estdkeydevice1a", \
- (TText*)L"estdkeydevice1b", \
- (TText*)L"estdkeydevice1c", \
- (TText*)L"estdkeydevice1d", \
- (TText*)L"estdkeydevice1e", \
- (TText*)L"estdkeydevice1f", \
- (TText*)L"estdkeyapplication10", \
- (TText*)L"estdkeyapplication11", \
- (TText*)L"estdkeyapplication12", \
- (TText*)L"estdkeyapplication13", \
- (TText*)L"estdkeyapplication14", \
- (TText*)L"estdkeyapplication15", \
- (TText*)L"estdkeyapplication16", \
- (TText*)L"estdkeyapplication17", \
- (TText*)L"estdkeyapplication18", \
- (TText*)L"estdkeyapplication19", \
- (TText*)L"estdkeyapplication1a", \
- (TText*)L"estdkeyapplication1b", \
- (TText*)L"estdkeyapplication1c", \
- (TText*)L"estdkeyapplication1d", \
- (TText*)L"estdkeyapplication1e", \
- (TText*)L"estdkeyapplication1f", \
- }
-
-/**
- * Key scan codes definition macro.
- */
-#define DefineKeyScanCodes( varName ) \
- static TUint const varName[] = \
- { \
- (TUint)EStdKeyNull, \
- (TUint)EStdKeyBackspace, \
- (TUint)EStdKeyTab, \
- (TUint)EStdKeyEnter, \
- (TUint)EStdKeyEscape, \
- (TUint)EStdKeySpace, \
- (TUint)EStdKeyPrintScreen, \
- (TUint)EStdKeyPause, \
- (TUint)EStdKeyHome, \
- (TUint)EStdKeyEnd, \
- (TUint)EStdKeyPageUp, \
- (TUint)EStdKeyPageDown, \
- (TUint)EStdKeyInsert, \
- (TUint)EStdKeyDelete, \
- (TUint)EStdKeyLeftArrow, \
- (TUint)EStdKeyRightArrow, \
- (TUint)EStdKeyUpArrow, \
- (TUint)EStdKeyDownArrow, \
- (TUint)EStdKeyLeftShift, \
- (TUint)EStdKeyRightShift, \
- (TUint)EStdKeyLeftAlt, \
- (TUint)EStdKeyRightAlt, \
- (TUint)EStdKeyLeftCtrl, \
- (TUint)EStdKeyRightCtrl, \
- (TUint)EStdKeyLeftFunc, \
- (TUint)EStdKeyRightFunc, \
- (TUint)EStdKeyCapsLock, \
- (TUint)EStdKeyNumLock, \
- (TUint)EStdKeyScrollLock, \
- (TUint)EStdKeyF1, \
- (TUint)EStdKeyF2, \
- (TUint)EStdKeyF3, \
- (TUint)EStdKeyF4, \
- (TUint)EStdKeyF5, \
- (TUint)EStdKeyF6, \
- (TUint)EStdKeyF7, \
- (TUint)EStdKeyF8, \
- (TUint)EStdKeyF9, \
- (TUint)EStdKeyF10, \
- (TUint)EStdKeyF11, \
- (TUint)EStdKeyF12, \
- (TUint)EStdKeyF13, \
- (TUint)EStdKeyF14, \
- (TUint)EStdKeyF15, \
- (TUint)EStdKeyF16, \
- (TUint)EStdKeyF17, \
- (TUint)EStdKeyF18, \
- (TUint)EStdKeyF19, \
- (TUint)EStdKeyF20, \
- (TUint)EStdKeyF21, \
- (TUint)EStdKeyF22, \
- (TUint)EStdKeyF23, \
- (TUint)EStdKeyF24, \
- (TUint)EStdKeyXXX, \
- (TUint)EStdKeyComma, \
- (TUint)EStdKeyFullStop, \
- (TUint)EStdKeyForwardSlash, \
- (TUint)EStdKeyBackSlash, \
- (TUint)EStdKeySemiColon, \
- (TUint)EStdKeySingleQuote, \
- (TUint)EStdKeyHash, \
- (TUint)EStdKeySquareBracketLeft, \
- (TUint)EStdKeySquareBracketRight, \
- (TUint)EStdKeyMinus, \
- (TUint)EStdKeyEquals, \
- (TUint)EStdKeyNkpForwardSlash, \
- (TUint)EStdKeyNkpAsterisk, \
- (TUint)EStdKeyNkpMinus, \
- (TUint)EStdKeyNkpPlus, \
- (TUint)EStdKeyNkpEnter, \
- (TUint)EStdKeyNkp1, \
- (TUint)EStdKeyNkp2, \
- (TUint)EStdKeyNkp3, \
- (TUint)EStdKeyNkp4, \
- (TUint)EStdKeyNkp5, \
- (TUint)EStdKeyNkp6, \
- (TUint)EStdKeyNkp7, \
- (TUint)EStdKeyNkp8, \
- (TUint)EStdKeyNkp9, \
- (TUint)EStdKeyNkp0, \
- (TUint)EStdKeyNkpFullStop, \
- (TUint)EStdKeyMenu, \
- (TUint)EStdKeyBacklightOn, \
- (TUint)EStdKeyBacklightOff, \
- (TUint)EStdKeyBacklightToggle, \
- (TUint)EStdKeyIncContrast, \
- (TUint)EStdKeyDecContrast, \
- (TUint)EStdKeySliderDown, \
- (TUint)EStdKeySliderUp, \
- (TUint)EStdKeyDictaphonePlay, \
- (TUint)EStdKeyDictaphoneStop, \
- (TUint)EStdKeyDictaphoneRecord, \
- (TUint)EStdKeyHelp, \
- (TUint)EStdKeyOff, \
- (TUint)EStdKeyDial, \
- (TUint)EStdKeyIncVolume, \
- (TUint)EStdKeyDecVolume, \
- (TUint)EStdKeyDevice0, \
- (TUint)EStdKeyDevice1, \
- (TUint)EStdKeyDevice2, \
- (TUint)EStdKeyDevice3, \
- (TUint)EStdKeyDevice4, \
- (TUint)EStdKeyDevice5, \
- (TUint)EStdKeyDevice6, \
- (TUint)EStdKeyDevice7, \
- (TUint)EStdKeyDevice8, \
- (TUint)EStdKeyDevice9, \
- (TUint)EStdKeyDeviceA, \
- (TUint)EStdKeyDeviceB, \
- (TUint)EStdKeyDeviceC, \
- (TUint)EStdKeyDeviceD, \
- (TUint)EStdKeyDeviceE, \
- (TUint)EStdKeyDeviceF, \
- (TUint)EStdKeyApplication0, \
- (TUint)EStdKeyApplication1, \
- (TUint)EStdKeyApplication2, \
- (TUint)EStdKeyApplication3, \
- (TUint)EStdKeyApplication4, \
- (TUint)EStdKeyApplication5, \
- (TUint)EStdKeyApplication6, \
- (TUint)EStdKeyApplication7, \
- (TUint)EStdKeyApplication8, \
- (TUint)EStdKeyApplication9, \
- (TUint)EStdKeyApplicationA, \
- (TUint)EStdKeyApplicationB, \
- (TUint)EStdKeyApplicationC, \
- (TUint)EStdKeyApplicationD, \
- (TUint)EStdKeyApplicationE, \
- (TUint)EStdKeyApplicationF, \
- (TUint)EStdKeyYes, \
- (TUint)EStdKeyNo, \
- (TUint)EStdKeyIncBrightness, \
- (TUint)EStdKeyDecBrightness, \
- (TUint)EStdKeyKeyboardExtend, \
- (TUint)EStdKeyDevice10, \
- (TUint)EStdKeyDevice11, \
- (TUint)EStdKeyDevice12, \
- (TUint)EStdKeyDevice13, \
- (TUint)EStdKeyDevice14, \
- (TUint)EStdKeyDevice15, \
- (TUint)EStdKeyDevice16, \
- (TUint)EStdKeyDevice17, \
- (TUint)EStdKeyDevice18, \
- (TUint)EStdKeyDevice19, \
- (TUint)EStdKeyDevice1A, \
- (TUint)EStdKeyDevice1B, \
- (TUint)EStdKeyDevice1C, \
- (TUint)EStdKeyDevice1D, \
- (TUint)EStdKeyDevice1E, \
- (TUint)EStdKeyDevice1F, \
- (TUint)EStdKeyApplication10, \
- (TUint)EStdKeyApplication11, \
- (TUint)EStdKeyApplication12, \
- (TUint)EStdKeyApplication13, \
- (TUint)EStdKeyApplication14, \
- (TUint)EStdKeyApplication15, \
- (TUint)EStdKeyApplication16, \
- (TUint)EStdKeyApplication17, \
- (TUint)EStdKeyApplication18, \
- (TUint)EStdKeyApplication19, \
- (TUint)EStdKeyApplication1A, \
- (TUint)EStdKeyApplication1B, \
- (TUint)EStdKeyApplication1C, \
- (TUint)EStdKeyApplication1D, \
- (TUint)EStdKeyApplication1E, \
- (TUint)EStdKeyApplication1F, \
- }
-
-/**
- * Key modifier names definition macro.
- */
-#define DefineModifiers( varName ) \
- static TUint const varName[] = \
- { \
- (TUint)EModifierAutorepeatable, \
- (TUint)EModifierKeypad, \
- (TUint)EModifierLeftAlt, \
- (TUint)EModifierRightAlt, \
- (TUint)EModifierAlt, \
- (TUint)EModifierLeftCtrl, \
- (TUint)EModifierRightCtrl, \
- (TUint)EModifierCtrl, \
- (TUint)EModifierLeftShift, \
- (TUint)EModifierRightShift, \
- (TUint)EModifierShift, \
- (TUint)EModifierLeftFunc, \
- (TUint)EModifierRightFunc, \
- (TUint)EModifierFunc, \
- (TUint)EModifierCapsLock, \
- (TUint)EModifierNumLock, \
- (TUint)EModifierScrollLock, \
- (TUint)EModifierKeyUp, \
- (TUint)EModifierSpecial, \
- (TUint)EModifierDoubleClick, \
- (TUint)EModifierPureKeycode, \
- (TUint)EModifierKeyboardExtend, \
- (TUint)EModifierCancelRotation, \
- (TUint)EModifierRotateBy90, \
- (TUint)EModifierRotateBy180, \
- (TUint)EModifierRotateBy270, \
- (TUint)EModifierPointer3DButton1, \
- (TUint)EModifierPointer3DButton2, \
- (TUint)EModifierPointer3DButton3, \
- (TUint)EAllModifiers, \
- }
-
-/**
- * Key modifiers definition macro.
- */
-#define DefineModifierNames( varName ) \
- static TText* const varName[] = \
- { \
- (TText*)L"estdkeynull", \
- (TText*)L"emodifierautorepeatable", \
- (TText*)L"emodifierkeypad", \
- (TText*)L"emodifierleftalt", \
- (TText*)L"emodifierrightalt", \
- (TText*)L"emodifieralt", \
- (TText*)L"emodifierleftctrl", \
- (TText*)L"emodifierrightctrl", \
- (TText*)L"emodifierctrl", \
- (TText*)L"emodifierleftshift", \
- (TText*)L"emodifierrightshift", \
- (TText*)L"emodifiershift", \
- (TText*)L"emodifierleftfunc", \
- (TText*)L"emodifierrightfunc", \
- (TText*)L"emodifierfunc", \
- (TText*)L"emodifiercapslock", \
- (TText*)L"emodifiernumlock", \
- (TText*)L"emodifierscrolllock", \
- (TText*)L"emodifierkeyup", \
- (TText*)L"emodifierspecial", \
- (TText*)L"emodifierdoubleclick", \
- (TText*)L"emodifierpurekeycode", \
- (TText*)L"emodifierkeyboardextend", \
- (TText*)L"emodifiercancelrotation", \
- (TText*)L"emodifierrotateby90", \
- (TText*)L"emodifierrotateby180", \
- (TText*)L"emodifierrotateby270", \
- (TText*)L"emodifierpointer3dbutton1", \
- (TText*)L"emodifierpointer3dbutton2", \
- (TText*)L"emodifierpointer3dbutton3", \
- (TText*)L"eallmodifiers", \
- }
-
-
-/**
- * Pointer event type names definition macro
- */
-#define DefinePointerEventTypeNames( varName ) \
- static TText* const varName[] = \
- { \
- (TText*)L"epointermove", \
- (TText*)L"epointerswitchon", \
- (TText*)L"ebutton1down", \
- (TText*)L"ebutton1up", \
- (TText*)L"ebutton2down", \
- (TText*)L"ebutton2up", \
- (TText*)L"ebutton3down", \
- (TText*)L"ebutton3up", \
- (TText*)L"ebutton1", \
- (TText*)L"ebutton2", \
- (TText*)L"ebutton3", \
- }
-
-/**
- * Pointer event type codes definition macro.
- */
-#define DefinePointerEventTypes( varName ) \
- static TInt const varName[] = \
- { \
- (TUint)TRawEvent::EPointerMove, \
- (TUint)TRawEvent::EPointerSwitchOn, \
- (TUint)TRawEvent::EButton1Down, \
- (TUint)TRawEvent::EButton1Up, \
- (TUint)TRawEvent::EButton2Down, \
- (TUint)TRawEvent::EButton2Up, \
- (TUint)TRawEvent::EButton3Down, \
- (TUint)TRawEvent::EButton3Up, \
- (TUint)TEventUtil::EButton1, \
- (TUint)TEventUtil::EButton2, \
- (TUint)TEventUtil::EButton3, \
- }
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// ================= MEMBER FUNCTIONS =========================================
-
-/*
--------------------------------------------------------------------------------
-
- Class: TEventUtil
-
- Method: GetKeyCodeName
-
- Description: Gets key name.
-
- Returns selected key name.
-
- Parameters: TUint aKeyCode: out: Key code.
-
- Return Values: Key name.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TPtrC TEventUtil::GetKeyCodeName( TUint aKeyCode )
- {
- DefineKeyCodeNames( keyCodeNames );
- DefineKeyCodes( keyCodes );
- int keyCodeNamesCount = (sizeof( keyCodeNames )/sizeof(TText*));
-
- for ( int i = 0; i < keyCodeNamesCount; i++ ) {
- if ( keyCodes[ i ] == aKeyCode )
- {
- return keyCodeNames[ i ];
- }
- }
-
- return NULL;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: TEventUtil
-
- Method: GetKeyScanCodeName
-
- Description: Gets key scan code name.
-
- Returns selected key scan code name.
-
- Parameters: TUint aKeyCode: out: Key scan code.
-
- Return Values: Key scan code name.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TPtrC TEventUtil::GetKeyScanCodeName( TInt aKeyScanCode )
- {
- DefineKeyScanCodeNames( keyScanCodeNames );
- DefineKeyScanCodes( keyScanCodes );
- int keyScanCodeNamesCount = (sizeof( keyScanCodeNames )/sizeof(TText*));
-
- for ( int i = 0; i < keyScanCodeNamesCount; i++ ) {
- if ( keyScanCodes[ i ] == aKeyScanCode )
- {
- return keyScanCodeNames[ i ];
- }
- }
-
- return NULL;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: TEventUtil
-
- Method: GetModifierName
-
- Description: Gets key modifier name.
-
- Returns selected key modifier name.
-
- Parameters: TUint aModifier: out: Key modifier.
-
- Return Values: Key modifier name.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TPtrC TEventUtil::GetModifierName( TUint aModifier )
- {
- DefineModifierNames( modifierNames );
- DefineModifiers( modifiers );
- int modifierNamesCount = (sizeof( modifierNames )/sizeof(TText*));
-
- for ( int i = 0; i < modifierNamesCount; i++ ) {
- if ( modifiers[ i ] == aModifier )
- {
- return modifierNames[ i ];
- }
- }
-
- return NULL;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: TEventUtil
-
- Method: ParseKeyCode
-
- Description: Parses key code.
-
- Parses key code.
-
- Parameters: TDesC& aKeyCodeName: in: Key code name.
- TUint& aKeyCode: out: Parsed key code.
-
- Return Values: KErrNone if key code was parsed successfuly,
- KErrNotFound in other case.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TInt TEventUtil::ParseKeyCode( const TDesC& aKeyCodeName, TUint& aKeyCode )
- {
- DefineKeyCodeNames( keyCodeNames );
- DefineKeyCodes( keyCodes );
- int keyCodeNamesCount = (sizeof( keyCodeNames )/sizeof(TText*));
-
- TBuf<64> keyCodeNameLowerCase( aKeyCodeName );
- keyCodeNameLowerCase.LowerCase();
- for ( int i = 0; i < keyCodeNamesCount; i++ ) {
- if ( TPtrC( keyCodeNames[ i ] ).Compare( keyCodeNameLowerCase ) == 0 )
- {
- aKeyCode = keyCodes[ i ];
- return KErrNone;
- }
- }
-
- return KErrNotFound;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: TEventUtil
-
- Method: ParseKeyScanCode
-
- Description: Parses key scan code.
-
- Parses key scan code.
-
- Parameters: TDesC& aKeyScanCodeName: in: Key scan code name.
- TUint& aKeyScanCode: out: Parsed key scan code.
-
- Return Values: KErrNone if key scan code was parsed successfuly,
- KErrNotFound in other case.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TInt TEventUtil::ParseKeyScanCode( const TDesC& aKeyScanCodeName, TInt& aKeyScanCode )
- {
- DefineKeyScanCodeNames( keyScanCodeNames );
- DefineKeyScanCodes( keyScanCodes );
- int keyScanCodeNamesCount = (sizeof( keyScanCodeNames )/sizeof(TText*));
-
- TBuf<64> keyScanCodeNameLowerCase( aKeyScanCodeName );
- keyScanCodeNameLowerCase.LowerCase();
- for ( int i = 0; i < keyScanCodeNamesCount; i++ ) {
- if ( TPtrC( keyScanCodeNames[ i ] ).Compare( keyScanCodeNameLowerCase ) == 0 )
- {
- aKeyScanCode = keyScanCodes[ i ];
- return KErrNone;
- }
- }
-
- return KErrNotFound;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: TEventUtil
-
- Method: ParseModifier
-
- Description: Parses key modifier.
-
- Parses key modifier.
-
- Parameters: TDesC& aModifierName: in: Key modifier name.
- TUint& aModifier: out: Parsed key modifier.
-
- Return Values: KErrNone if key modifier was parsed successfuly,
- KErrNotFound in other case.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TInt TEventUtil::ParseModifier( const TDesC& aModifierName, TUint& aModifier )
- {
- DefineModifierNames( modifierNames );
- DefineModifiers( modifiers );
- int modifierNamesCount = (sizeof( modifierNames )/sizeof(TText*));
-
- TBuf<64> modifierNameLowerCase( aModifierName );
- modifierNameLowerCase.LowerCase();
- for ( int i = 0; i < modifierNamesCount; i++ ) {
- if ( TPtrC( modifierNames[ i ] ).Compare( modifierNameLowerCase ) == 0 )
- {
- aModifier = modifiers[ i ];
- return KErrNone;
- }
- }
-
- return KErrNotFound;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CAknUiEnvProxy
-
- Method: ParsePointerEventType
-
- Description: Parses pointer event type.
-
- Parses key modifier.
-
- Parameters: const TDesC& aPointerEventTypeName: in: Pointer event type.
- TUint& aModifier: out: Parsed pointer event type.
-
- Return Values: KErrNone if no error occures during parsing.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TInt TEventUtil::ParsePointerEventType( const TDesC& aPointerEventTypeName, TUint& aPointerEventType )
- {
- DefinePointerEventTypeNames( pointerEventTypeNames );
- DefinePointerEventTypes( pointerEventTypes );
- int pointerEventTypeNamesCount = (sizeof( pointerEventTypeNames )/sizeof(TText*));
-
- TBuf<64> pointerEventTypeNamesLowerCase( aPointerEventTypeName );
- pointerEventTypeNamesLowerCase.LowerCase();
- for ( int i = 0; i < pointerEventTypeNamesCount; i++ ) {
- if ( TPtrC( pointerEventTypeNames[ i ] ).Compare( pointerEventTypeNamesLowerCase ) == 0 )
- {
- aPointerEventType = pointerEventTypes[ i ];
- return KErrNone;
- }
- }
-
- return KErrNotFound;
- }
-
-// End of File
--- a/stifui/uitestserverstarter/src/TestServerThreadStarter.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,393 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This module contains the implementation of
-* CTestServerThreadStarter class member functions.
-*
-*/
-
-// INCLUDE FILES
-#include "TestServerThreadStarter.h"
-#include <stifinternal/TestServerClient.h>
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-/**
- * CTestServerThreadStarter thread heap size.
- */
-const TUint KDefaultHeapSize = 0x10000; // 64 K
-
-/**
- * CTestServerThreadStarter thread max heap size.
- */
-const TUint KMaxHeapSize = 0x20000; // 128 K
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-
-// ================= MEMBER FUNCTIONS =========================================
-
-/*
--------------------------------------------------------------------------------
-
- Class: CTestServerThreadStarter
-
- Method: TestServerStarterThreadFunction
-
- Description: CTestServerThreadStarter thread function.
-
- CTestServerThreadStarter thread function in which testserver creation code
- is executed.
-
- Parameters: TAny* aParameters: in: Pointer to CTestServerThreadStarter object
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TInt CTestServerThreadStarter::TestServerStarterThreadFunction( TAny* aParameters )
- {
- RDebug::Printf( "UITESTING: CTestServerThreadStarter::TestServerStarterThreadFunction" );
-
- CTestServerThreadStarter* testServerStarter = (CTestServerThreadStarter*)aParameters;
- TThreadId mainThreadId = testServerStarter->iMainThreadId;
- CTestThreadContainerRunnerFactory* testThreadContainerRunnerFactory =
- testServerStarter->iTestThreadContainerRunnerFactory;
-
- // Signal that all needed data is copied and main thread can continue its execution
- testServerStarter->iServerThreadStartedSemaphore.Signal();
-
- // Get module name from command line
- const TInt length = User().CommandLineLength();
-
- HBufC* cmdLine = HBufC::New( length );
-
- if ( cmdLine == NULL )
- {
- return KErrNoMemory;
- }
-
- TPtr moduleName = cmdLine->Des();
-
- User().CommandLine( moduleName );
-
- RDebug::Print(_L("CTestServerThreadStarter::TestServerStarterThreadFunction() Received data [%S]"), &moduleName);
-
- // Extract semaphore name passed in data
- TInt index = moduleName.Find(_L(" "));
- RDebug::Print(_L("CTestServerThreadStarter::TestServerStarterThreadFunction() Space separator found at position [%d]"), index);
- TPtrC semaphoreName = moduleName.Mid(index + 1);
- moduleName = moduleName.Left(index);
-
- RDebug::Print(_L("CTestServerThreadStarter::TestServerStarterThreadFunction() Extracted module name [%S] and sempahore name [%S]"), &moduleName, &semaphoreName);
-
- // Open start-up synchronization semaphore
- RSemaphore startup;
- RDebug::Print(_L(" Openingstart-up semaphore"));
- //TName semaphoreName = _L("startupSemaphore");
- //semaphoreName.Append( moduleName );
-
- TInt res = startup.OpenGlobal(semaphoreName);
- RDebug::Print(_L("Opening result %d"), res);
-
-
- TFileName serverName;
- TInt r = StartNewServer ( moduleName, serverName, EFalse, startup, true, testThreadContainerRunnerFactory );
-
- if ( r == KErrAlreadyExists )
- {
- // Ok, server was already started
- RDebug::Print(_L("UI TestServer already started, signaling semaphore and exiting"));
- startup.Signal();
-
- delete cmdLine;
-
- return KErrNone;
- }
- else
- {
- RDebug::Print(_L("UI TestServer is finished, code %d"), r);
- }
-
- delete cmdLine;
-
- //delete testThreadContainerRunnerFactory;
- testThreadContainerRunnerFactory = NULL;
-
- // Kill main thread to end UITestServerStarter application
- // when testserver is finished
- RThread mainThread;
- TInt ret = mainThread.Open( mainThreadId );
- if( ret != KErrNone )
- {
- User::Panic( _L("ThreadHandleOpenError"), ret );
- }
- mainThread.Kill( KErrNone );
-
- return r;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CTestServerThreadStarter
-
- Method: NewL
-
- Description: NewL is first phase of two-phased constructor.
-
- NewL is first phase of two-phased constructor.
-
- Parameters: None.
-
- Return Values: Pointer to new CTestServerThreadStarter object.
-
- Errors/Exceptions: Leaves if new or ConstructL leaves.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CTestServerThreadStarter* CTestServerThreadStarter::NewL( )
- {
- CTestServerThreadStarter* self = new(ELeave) CTestServerThreadStarter();
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CTestServerThreadStarter
-
- Method: CTestServerThreadStarter
-
- Description: Default constructor.
-
- Default constructor.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CTestServerThreadStarter::CTestServerThreadStarter()
-:CActive( EPriorityNormal )
- {
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CTestServerThreadStarter
-
- Method: NewL
-
- Description: Default destructor.
-
- Default destructor.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CTestServerThreadStarter::~CTestServerThreadStarter()
- {
- Cancel();
- iTimer.Close();
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CTestServerThreadStarter
-
- Method: ConstructL
-
- Description: Second phase of two-phased constructor.
-
- Second phase of two-phased constructor.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CTestServerThreadStarter::ConstructL()
- {
- TInt ret = iTimer.CreateLocal();
- if ( ret != KErrNone )
- {
- User::Leave( ret );
- }
-
- CActiveScheduler::Add( this );
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CTestServerThreadStarter
-
- Method: RunTestServerThread
-
- Description: Starts-up testserver.
-
- Starts-up testserver.
-
- Parameters: None.
-
- Return Values: KErrNone when there was no error.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TInt CTestServerThreadStarter::RunTestServerThread( CTestThreadContainerRunnerFactory* aTestThreadContainerRunnerFactory )
- {
- if ( IsActive() )
- {
- User::Panic( _L("E32USER-CBase"), 42 );
- }
-
- TInt ret = iServerThreadStartedSemaphore.CreateLocal( 0 );
- if ( ret != KErrNone )
- {
- User::Leave( ret );
- }
-
- iTestThreadContainerRunnerFactory = aTestThreadContainerRunnerFactory;
- iMainThreadId = RThread().Id();
- iReturnCode = KErrNone;
-
- iStatus = KRequestPending;
-
- SetActive();
- iTimer.After( iStatus, 0 );
-
- return KErrNone;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CTestServerThreadStarter
-
- Method: RunL
-
- Description: RunL derived from CActive handles the completed requests.
-
- RunL derived from CActive handles the completed requests.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: Leaves if one of the called method leavs.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CTestServerThreadStarter::RunL()
- {
- RThread testServerStarterThread;
- TInt ret = testServerStarterThread.Create( _L("testserverstarterthread"),
- TestServerStarterThreadFunction, 10 * KDefaultStackSize, 10 * KDefaultHeapSize, 10 * KMaxHeapSize, this );
-
- User::LeaveIfError( ret );
-
- testServerStarterThread.Resume();
- testServerStarterThread.Close();
-
- iServerThreadStartedSemaphore.Wait();
- iServerThreadStartedSemaphore.Close();
-
- // Delete CTestServerThreadStarter after testserver is started
- delete this;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CTestServerThreadStarter
-
- Method: DoCancel
-
- Description: DoCancel derived from CActive handles the Cancel.
-
- DoCancel derived from CActive handles the Cancel.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CTestServerThreadStarter::DoCancel()
- {
- if ( IsActive() )
- {
- iTimer.Cancel();
- }
- }
-
-// End of File
--- a/stifui/uitestserverstarter/src/UITestServerStarter.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This module contains the implementation of application
-* main function.
-*
-*/
-
-// INCLUDE FILES
-#include <eikstart.h>
-#include "UITestServerStarterAppUi.h"
-#include "UITestServerStarterApplication.h"
-#include <eikenv.h>
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-/**
- * Application factory function.
- */
-LOCAL_C CApaApplication* NewApplication()
- {
- return new CUITestServerStarterApplication;
- }
-
-// ================= MEMBER FUNCTIONS =========================================
-/**
- * Application main function.
- */
-GLDEF_C TInt E32Main()
- {
-
- RDebug::Printf( "UITESTING: UITestServerStarter - E32Main" );
-
- TInt ret = EikStart::RunApplication( NewApplication );
-
- RDebug::Printf( "UITESTING: UITestServerStarter - E32Main End" );
-
- return ret;
- }
-
-// End of File
--- a/stifui/uitestserverstarter/src/UITestServerStarterAppContainer.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,291 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This module contains the implementation of
-* CUITestServerStarterAppContainer class member functions.
-*
-*/
-
-// INCLUDE FILES
-#include "UITestServerStarterAppContainer.h"
-#include <AknsDrawUtils.h>
-#include <AknsBasicBackgroundControlContext.h>
-#include <AknDef.h>
-#include <AknUtils.h>
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-
-// ================= MEMBER FUNCTIONS =========================================
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppContainer
-
- Method: NewL
-
- Description: NewL is first phase of two-phased constructor.
-
- NewL is first phase of two-phased constructor.
-
- Parameters: const TRect& aRect: container rectangle.
-
- Return Values: Pointer to new CUITestServerStarterAppContainer object.
-
- Errors/Exceptions: Leave if one of the called functions leaves.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CUITestServerStarterAppContainer* CUITestServerStarterAppContainer::NewL( const TRect& aRect )
- {
- CUITestServerStarterAppContainer* self = NewLC( aRect );
- CleanupStack::Pop( self );
- return self;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppContainer
-
- Method: NewLC
-
- Description: NewL is first phase of two-phased constructor.
-
- NewL is first phase of two-phased constructor.
-
- Parameters: const TRect& aRect: container rect
-
- Return Values: Pointer to new CUITestServerStarterAppContainer object.
-
- Errors/Exceptions: Leave if one of the called functions leaves.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CUITestServerStarterAppContainer* CUITestServerStarterAppContainer::NewLC( const TRect& aRect )
- {
- CUITestServerStarterAppContainer* self =
- new(ELeave)CUITestServerStarterAppContainer;
- CleanupStack::PushL( self );
- self->ConstructL( aRect );
- return self;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppContainer
-
- Method: CUITestServerStarterAppContainer
-
- Description: C++ constructor.
-
- C++ constructor.
-
- Parameters: None
-
- Return Values: None
-
- Errors/Exceptions: None
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CUITestServerStarterAppContainer::CUITestServerStarterAppContainer()
- {
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppContainer
-
- Method: CUITestServerStarterAppContainer
-
- Description: C++ destructor.
-
- C++ destructor.
-
- Parameters: None
-
- Return Values: None
-
- Errors/Exceptions: None
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CUITestServerStarterAppContainer::~CUITestServerStarterAppContainer()
- {
- delete iBgContext;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppContainer
-
- Method: ConstructL
-
- Description: ConstructL is second phase of two-phased constructor.
-
- ConstructL is second phase of two-phased constructor.
-
- Parameters: const TRect& aRect: container rectangle.
-
- Return Values: None
-
- Errors/Exceptions: Leave if one of the called functions leaves.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppContainer::ConstructL( const TRect& aRect )
- {
- CreateWindowL();
-
- iBgContext = CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgAreaMain, aRect, ETrue );
-
- SetRect( aRect );
- ActivateL();
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppContainer
-
- Method: Draw
-
- Description: Draws the control.
-
- Draws the control.
-
- Parameters: const TRect& aRect: rectangle which should be redrawn.
-
- Return Values: None
-
- Errors/Exceptions: None
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppContainer::Draw( const TRect& aRect ) const
- {
- // Get the standard graphics context
- CWindowGc& gc = SystemGc();
-
- // Redraw the background using the default skin
- MAknsSkinInstance* skin = AknsUtils::SkinInstance();
- MAknsControlContext* controlContext = AknsDrawUtils::ControlContext( this );
- AknsDrawUtils::Background( skin, controlContext, this, gc, aRect );
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppContainer
-
- Method: SizeChanged
-
- Description: Responds to changes to the size and position of the contents of this control
-
- Responds to changes to the size and position of the
- contents of this control
-
- Parameters: None
-
- Return Values: None
-
- Errors/Exceptions: None
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppContainer::SizeChanged()
- {
- if ( iBgContext )
- {
- iBgContext->SetRect( Rect() );
- if ( &Window() )
- {
- iBgContext->SetParentPos( PositionRelativeToScreen() );
- }
- }
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppContainer
-
- Method: MopSupplyObject
-
- Description: This function is used to allow controls to ask their owners for access to other objects that they own
-
- This function is used to allow controls to ask their owners
- for access to other objects that they own
-
- Parameters: TTypeUid aId: requested object type id.
-
- Return Values: Pointer to requested object.
-
- Errors/Exceptions: None
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TTypeUid::Ptr CUITestServerStarterAppContainer::MopSupplyObject( TTypeUid aId )
- {
- if ( iBgContext )
- {
- return MAknsControlContext::SupplyMopObject( aId, iBgContext );
- }
- return CCoeControl::MopSupplyObject( aId );
- }
-
-
-// End of File
--- a/stifui/uitestserverstarter/src/UITestServerStarterAppUi.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,508 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This module contains the implementation of
-* CUITestServerStarterAppUi class member functions.
-*
-*/
-
-// INCLUDE FILES
-#include <avkon.hrh>
-#include <aknmessagequerydialog.h>
-#include <aknnotewrappers.h>
-#include <StringLoader.h>
-#include <f32file.h>
-#include <s32file.h>
-#include <hlplch.h>
-
-#include <UITestServerStarter.rsg>
-
-#include "UITestServerStarter.hrh"
-#include "UITestServerStarterAppUi.h"
-#include "UITestServerStarterAppView.h"
-
-#include "TestServerThreadStarter.h"
-#include <stifinternal/TestThreadContainerRunnerFactory.h>
-#include "AknUiEnvProxy.h"
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// ================= MEMBER FUNCTIONS =========================================
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppUi
-
- Method: ConstructL
-
- Description: ConstructL is second phase of two-phased constructor.
-
- ConstructL is second phase of two-phased constructor.
-
- Parameters: None
-
- Return Values: None.
-
- Errors/Exceptions: Leaves if one of called functions leave.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppUi::ConstructL()
- {
- RDebug::Printf( "UITESTING: CUITestServerStarterAppUi::ConstructL - Begin" );
-
- // Initialise app UI with standard value.
- BaseConstructL( ENoAppResourceFile || CAknAppUi::EAknEnableSkin );
-
- CEikonEnv::Static()->DisableExitChecks( true );
-
- // Create view object
- iAppView = CUITestServerStarterAppView::NewL();
-
- AddViewL( iAppView );
- SetDefaultViewL( *iAppView );
-
- CAknUiEnvProxy* uiEnvProxy = CAknUiEnvProxy::NewL( this );
-
- CTestThreadContainerRunnerFactory* testThreadContainerRunnerFactory =
- CTestThreadContainerRunnerFactory::NewL( RThread().Id(), CActiveScheduler::Current(), uiEnvProxy );
-
- RDebug::Printf( "UITESTING: CUITestServerStarterAppUi::ConstructL - Starting TestServer" );
- CTestServerThreadStarter* testServerThreadStarter = CTestServerThreadStarter::NewL( );
- testServerThreadStarter->RunTestServerThread( testThreadContainerRunnerFactory );
-
- RDebug::Printf( "UITESTING: CUITestServerStarterAppUi::ConstructL - Move to background" );
-
- TApaTask task( CCoeEnv::Static()->WsSession() );
- task.SetWgId( CCoeEnv::Static()->RootWin().Identifier() );
- task.SendToBackground();
-
- RDebug::Printf( "UITESTING: CUITestServerStarterAppUi::ConstructL - End" );
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppUi
-
- Method: CUITestServerStarterAppUi
-
- Description: C++ default constructor can NOT contain any code, that might leave.
-
- C++ default constructor can NOT contain any code, that might leave.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CUITestServerStarterAppUi::CUITestServerStarterAppUi()
- {
- // No implementation required
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppUi
-
- Method: ~CUITestServerStarterAppUi
-
- Description: C++ destructor.
-
- C++ destructor.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CUITestServerStarterAppUi::~CUITestServerStarterAppUi()
- {
- // No implementation required
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppUi
-
- Method: HandleCommandL
-
- Description: Handles user commands.
-
- Derived from CCoeAppUi. Handles user commands.
-
- Parameters: TInt aCommand: in: User command code.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppUi::HandleCommandL( TInt )
- {
- // No implementation required
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppUi
-
- Method: HandleWsEventL
-
- Description: Handles window server event.
-
- Derived from CCoeAppUi. Handles window server event.
-
- Parameters: const TWsEvent& aEvent: in: Event.
- CCoeControl* aDestination: in: Destination control.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppUi::HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination )
- {
- CAknAppUi::HandleWsEventL( aEvent, aDestination );
-
- if ( ( aEvent.Type() == EEventKey ) )
- {
- switch( iEventType )
- {
- case EPressKey:
- {
- if ( iEventStatus != NULL )
- {
- KeyPressHandled();
- }
- }
- break;
- case ETypeText:
- {
- iTypeTextLength--;
- if ( ( iEventStatus != NULL ) && ( iTypeTextLength == 0 ) )
- {
- TextTypeHandled();
- }
- }
- break;
- }
- }
- else if ( aEvent.Type() == EEventPointer )
- {
- if ( iEventType == EPointerEvent )
- {
- PointerEventHandled();
- }
- }
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppUi
-
- Method: PrepareToTypeText
-
- Description: Prepares AppUi to recive type text event
-
- Prepares AppUi to recive type text event
-
- Parameters: TInt aTextLength: in: Text length.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppUi::PrepareToTypeText( TInt aTextLength )
- {
- iTypeTextLength = aTextLength;
- iEventType = ETypeText;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppUi
-
- Method: PrepareToPressKey
-
- Description: Prepares AppUi to recive key press event
-
- Prepares AppUi to recive key press event
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppUi::PrepareToPressKey()
- {
- iEventType = EPressKey;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppUi
-
- Method: PrepareToPointerEvent
-
- Description: Prepares AppUi to recive pointer event
-
- Prepares AppUi to recive key press event
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppUi::PrepareToPointerEvent()
- {
- iEventType = EPointerEvent;
- }
-
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppUi
-
- Method: KeyPressHandled
-
- Description: Sends notification that key press was handled.
-
- Notifies client that key press was handled.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppUi::KeyPressHandled()
- {
- if ( ( iEventType == EPressKey ) && ( iEventStatus != NULL ) && ( iEventType == EPressKey ) )
- {
- iEventType = ENone;
- User::RequestComplete( iEventStatus, KErrNone );
- iEventStatus = NULL;
- }
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppUi
-
- Method: TextTypeHandled
-
- Description: Sends notification that type text was handled.
-
- Notifies client that type text was handled.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppUi::TextTypeHandled()
- {
- if ( ( iEventType == ETypeText ) && ( iEventStatus != NULL ) && ( iEventType == ETypeText ) )
- {
- iEventType = ENone;
- iTypeTextLength = 0;
- User::RequestComplete( iEventStatus, KErrNone );
- iEventStatus = NULL;
- }
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppUi
-
- Method: PointerEventHandled
-
- Description: Sends notification that pointer event was handled.
-
- Notifies client that pointer event was handled.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppUi::PointerEventHandled()
- {
- if ( ( iEventType == EPointerEvent ) && ( iEventStatus != NULL ) )
- {
- iEventType = ENone;
- User::RequestComplete( iEventStatus, KErrNone );
- iEventStatus = NULL;
- }
- }
-
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppUi
-
- Method: NotifyAboutHandledKeyPress
-
- Description: Requests notification of press key completion.
-
- Requests notification of press key completion.
-
- Parameters: TRequestStatus* aStatus: in: Request status pointer.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppUi::NotifyAboutHandledKeyPress( TRequestStatus* aStatus )
- {
- iEventStatus = aStatus;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppUi
-
- Method: NotifyAboutHandledTextType
-
- Description: Requests notification when text type event is handled.
-
- Requests notification when text type event is handled.
-
- Parameters: TRequestStatus* aStatus: in: Request status pointer.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppUi::NotifyAboutHandledTextType( TRequestStatus* aStatus )
- {
- iEventStatus = aStatus;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppUi
-
- Method: NotifyAboutHandledPointerEvent
-
- Description: Requests notification when pointer event is handled.
-
- Requests notification when pointer event is handled.
-
- Parameters: TRequestStatus* aStatus: in: Request status pointer.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppUi::NotifyAboutHandledPointerEvent( TRequestStatus* aStatus )
- {
- iEventStatus = aStatus;
- }
-
-
-// End of File
--- a/stifui/uitestserverstarter/src/UITestServerStarterAppView.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,345 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-* Description: This module contains the
-* implementation of CUITestServerStarterAppView class member
-* functions.
-*
-*/
-
-// INCLUDE FILES
-#include <coemain.h>
-#include <aknViewAppUi.h>
-#include "UITestServerStarterAppView.h"
-#include "UITestServerStarterApplication.h"
-#include "UITestServerStarterAppContainer.h"
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-
-// ================= MEMBER FUNCTIONS =========================================
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppView
-
- Method: NewL
-
- Description: NewL is first phase of two-phased constructor.
-
- NewL is first phase of two-phased constructor.
-
- Parameters: None
-
- Return Values: Pointer to new CUITestServerStarterAppView object.
-
- Errors/Exceptions: Leave if one of the called functions leaves.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CUITestServerStarterAppView* CUITestServerStarterAppView::NewL()
- {
- CUITestServerStarterAppView* self = CUITestServerStarterAppView::NewLC();
- CleanupStack::Pop( self );
- return self;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppView
-
- Method: NewLC
-
- Description: NewL is first phase of two-phased constructor.
-
- NewL is first phase of two-phased constructor.
-
- Parameters: None
-
- Return Values: Pointer to new CUITestServerStarterAppView object.
-
- Errors/Exceptions: Leave if one of the called functions leaves.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CUITestServerStarterAppView* CUITestServerStarterAppView::NewLC()
- {
- CUITestServerStarterAppView* self = new ( ELeave ) CUITestServerStarterAppView;
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppView
-
- Method: ConstructL
-
- Description: ConstructL is second phase of two-phased constructor.
-
- ConstructL is second phase of two-phased constructor.
-
- Parameters: None
-
- Return Values: None
-
- Errors/Exceptions: Leave if one of the called functions leaves.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppView::ConstructL()
- {
- BaseConstructL( 0 );
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppView
-
- Method: CUITestServerStarterAppView
-
- Description: C++ constructor.
-
- C++ constructor.
-
- Parameters: None
-
- Return Values: None
-
- Errors/Exceptions: None
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CUITestServerStarterAppView::CUITestServerStarterAppView()
- {
- // No implementation required
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppView
-
- Method: CUITestServerStarterAppView
-
- Description: C++ destructor.
-
- C++ destructor.
-
- Parameters: None
-
- Return Values: None
-
- Errors/Exceptions: None
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CUITestServerStarterAppView::~CUITestServerStarterAppView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- }
-
- delete iContainer;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppView
-
- Method: Id
-
- Description: Returns view Uid.
-
- Returns view Uid.
-
- Parameters: None
-
- Return Values: View Uid
-
- Errors/Exceptions: None
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TUid CUITestServerStarterAppView::Id() const
- {
- return KMainViewId;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppView
-
- Method: HandleCommandL
-
- Description: Handle Commands.
-
- Handle Commands.
-
- Parameters: TInt aCommand: command id
-
- Return Values: None
-
- Errors/Exceptions: None
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppView::HandleCommandL( TInt aCommand )
- {
- AppUi()->HandleCommandL( aCommand );
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppView
-
- Method: HandleClientRectChange
-
- Description: Handle size changes.
-
- Handle size changes.
-
- Parameters: None
-
- Return Values: None
-
- Errors/Exceptions: None
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppView::HandleClientRectChange()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppView
-
- Method: DoActivateL
-
- Description: From AknView, Activates view.
-
- From AknView, Activates view.
-
- Parameters: const TVwsViewId& aPrevViewId: previouse view id
- TUid aCustomMessageId: custom message id
- const TDesC8& aCustomMessage: custom message data
-
- Return Values: None
-
- Errors/Exceptions: None
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppView::DoActivateL(
- const TVwsViewId& /*aPrevViewId*/, TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- if ( !iContainer )
- {
- // Create view container
- iContainer = CUITestServerStarterAppContainer::NewL( ClientRect() );
- iContainer->SetMopParent( this );
- // Add container to view stack
- AppUi()->AddToStackL( *this, iContainer );
- }
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterAppView
-
- Method: DoDeactivate
-
- Description: From AknView, Deactivates view.
-
- From AknView, Deactivates view.
-
- Parameters: None
-
- Return Values: None
-
- Errors/Exceptions: None
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterAppView::DoDeactivate()
- {
- if ( iContainer )
- {
- // Remove container from view stack
- AppUi()->RemoveFromViewStack( *this, iContainer );
- }
-
- // Delete container since it's not longer needed.
- delete iContainer;
- iContainer = NULL;
- }
-
-// End of File
--- a/stifui/uitestserverstarter/src/UITestServerStarterApplication.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This module contains the implementation of
-* CUITestServerStarterApplication class member functions.
-*
-*/
-
-// INCLUDE FILES
-#include "UITestServerStarter.hrh"
-#include "UITestServerStarterDocument.h"
-#include "UITestServerStarterApplication.h"
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-
-// ================= MEMBER FUNCTIONS =========================================
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterApplication
-
- Method: CreateDocumentL
-
- Creates CUITestServerStarterDocument document object.
-
- Creates CUITestServerStarterDocument document object. The returned
- pointer in not owned by the CUITestServerStarterApplication object.
-
- Parameters: None
-
- Return Values: A pointer to the created document object.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CApaDocument* CUITestServerStarterApplication::CreateDocumentL ()
- {
- return (static_cast<CApaDocument*> (CUITestServerStarterDocument::NewL ( *this) ) );
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterApplication
-
- Method: AppDllUid
-
- Gets application Uid
-
- Gets application Uid
-
- Parameters: None
-
- Return Values: Application Uid.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-TUid CUITestServerStarterApplication::AppDllUid() const
- {
- return KUidUITestServerStarterApp;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: PreDocConstructL
-
- Method: AppDllUid
-
- Preconstructs document.
-
- Preconstructs document.
-
- Parameters: None
-
- Return Values: None
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterApplication::PreDocConstructL()
- {
- // This call allow us to run multiple instances of UI application in same time.
- CEikApplication::PreDocConstructL();
- }
-
-// End of File
--- a/stifui/uitestserverstarter/src/UITestServerStarterDocument.cpp Wed Apr 14 15:58:04 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,214 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This module contains the implementation of
-* CUITestServerStarterDocument class member functions.
-*
-*/
-
-// INCLUDE FILES
-#include "UITestServerStarterAppUi.h"
-#include "UITestServerStarterDocument.h"
-
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES
-// None
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-
-// ================= MEMBER FUNCTIONS =========================================
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterDocument
-
- Method: NewL
-
- Description: NewL is first phase of two-phased constructor.
-
- NewL is first phase of two-phased constructor.
-
- Parameters: CEikApplication& aApp: in: Reference to application..
-
- Return Values: Pointer to new CUITestServerStarterDocument object.
-
- Errors/Exceptions: Leave if one of the called functions leaves.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CUITestServerStarterDocument* CUITestServerStarterDocument::NewL( CEikApplication& aApp )
- {
- CUITestServerStarterDocument* self = NewLC (aApp);
- CleanupStack::Pop (self);
- return self;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterDocument
-
- Method: NewLC
-
- Description: NewL is first phase of two-phased constructor.
-
- NewL is first phase of two-phased constructor.
-
- Parameters: CEikApplication& aApp: in: Reference to application.
-
- Return Values: Pointer to new CUITestServerStarterDocument object.
-
- Errors/Exceptions: Leave if one of the called functions leaves.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CUITestServerStarterDocument* CUITestServerStarterDocument::NewLC (CEikApplication& aApp)
- {
- CUITestServerStarterDocument* self = new ( ELeave ) CUITestServerStarterDocument( aApp );
-
- CleanupStack::PushL (self);
- self->ConstructL ();
- return self;
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterDocument
-
- Method: ConstructL
-
- Description: This is second phase of two-phased constructor.
-
- This is second phase of two-phased constructor.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-void CUITestServerStarterDocument::ConstructL()
- {
- // No implementation required
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterDocument
-
- Method: CUITestServerStarterDocument
-
- Description: Constructor.
-
- Constructor.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CUITestServerStarterDocument::CUITestServerStarterDocument( CEikApplication& aApp ) :
- CAknDocument(aApp)
- {
- // No implementation required
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterDocument
-
- Method: ~CUITestServerStarterDocument
-
- Description: Destructor.
-
- Destructor.
-
- Parameters: None.
-
- Return Values: None.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CUITestServerStarterDocument::~CUITestServerStarterDocument ()
- {
- // No implementation required
- }
-
-/*
--------------------------------------------------------------------------------
-
- Class: CUITestServerStarterDocument
-
- Method: CreateAppUiL
-
- Description: Creates AppUi object.
-
- Creates AppUi object.
-
- Parameters: None.
-
- Return Values: Pointer to AppUi object.
-
- Errors/Exceptions: None.
-
- Status: Draft
-
--------------------------------------------------------------------------------
-*/
-CEikAppUi* CUITestServerStarterDocument::CreateAppUiL ()
- {
- return ( static_cast <CEikAppUi*>( new ( ELeave ) CUITestServerStarterAppUi ) );
- }
-
-// End of File