📄 wsexampleappui.h
字号:
//
//============================================================================
// Name : CWSExampleAppUi from WSExampleAppUi.h
// Part of : WSExample
// Created : 10/08/2005 by Forum Nokia
// Implementation notes: Declares UI class for application.
//
// Version : 1.0
// Copyright: Nokia Corporation
//============================================================================
//
#ifndef WSEXAMPLEAPPUI_H
#define WSEXAMPLEAPPUI_H
// INCLUDES
#include <eikapp.h>
#include <eikdoc.h>
#include <e32std.h>
#include <coeccntx.h>
#include <aknappui.h>
#include <eikdialg.h>
// FORWARD DECLARATIONS
class CWSExampleDialog;
class CWSEngine;
// CLASS DECLARATION
enum TCurrentlyShowing
{
EShowingNothing = 1,
EShowingCity,
EShowingCountry
};
class CWSExampleAppUi : public CAknAppUi
{
public: // // Constructors and destructor
void ConstructL();
~CWSExampleAppUi();
private:
// ---------------------------------------------------------
// CWSExampleAppUi::DynInitMenuPaneL()
// Alters the menu according to what information is
// currently showing in the listbox.
// ---------------------------------------------------------
void DynInitMenuPaneL( TInt aResourceId,CEikMenuPane* aMenuPane );
// ---------------------------------------------------------
// CWSExampleAppUi::FillListBoxL()
// Fill main dialog listbox with city information
// ---------------------------------------------------------
void FillListBoxL( TCityData& aCityData );
// ---------------------------------------------------------
// CWSExampleAppUi::FillListBoxL()
// Fill main dialog listbox with country information
// ---------------------------------------------------------
void FillListBoxL( TCountryData& aCountryData );
// ---------------------------------------------------------
// CWSExampleAppUi::ShowInfoL()
// Briefly shows small information note which contain
// aText as message.
// ---------------------------------------------------------
void ShowInfoL( const TPtrC aText );
// ---------------------------------------------------------
// CWSExampleAppUi::QueryTextL()
// Shows a dialog with aPrompt note and waits for text
// input which is then copied to aReturn
// ---------------------------------------------------------
TBool QueryTextL( const TPtrC aPrompt, TDes& aReturn );
// ---------------------------------------------------------
// CWSExampleAppUi::AskPopupChoiseL()
// Shows a popupmenu list containing aList information
// On return to aReturn is copied the chosen text and
// if aIndex != NULL the index # of the chosen item
// is copied to.
// ---------------------------------------------------------
TBool AskPopupChoiseL( const TPtrC aPrompt,
CDesC16ArrayFlat* aList, TDes& aReturn, TInt* aIndex=NULL );
// ---------------------------------------------------------
// CWSExampleAppUi::CreateCityUIL()
// Ask all the information about new city and create
// the new city into world server database.
// ---------------------------------------------------------
void CreateCityUIL();
// ---------------------------------------------------------
// CWSExampleAppUi::DistanceUIL()
// Calculate distance between currently selected city and
// the city which is asked from user in this method.
// ---------------------------------------------------------
void DistanceUIL();
// ---------------------------------------------------------
// CWSExampleAppUi::CreateCountryUIL()
// Create new country and capital city for it into
// world server database.
// ---------------------------------------------------------
void CreateCountryUIL();
// ---------------------------------------------------------
// CWSExampleAppUi::AskNumberL()
// Ask numerical input from user
// ---------------------------------------------------------
TInt AskNumberL( const TPtrC aPrompt, TInt& aReturn );
// ---------------------------------------------------------
// CWSExampleAppUi::AskDLSZoneL()
// Ask for daylight saving zone
// ---------------------------------------------------------
TInt AskDLSZoneL( TDaylightSavingZone& aDLSZone );
// ---------------------------------------------------------
// CWSExampleAppUi::SearchCitiesL()
// Search a city and show it in the listbox
// ---------------------------------------------------------
void SearchCitiesL();
// ---------------------------------------------------------
// CWSExampleAppUi::SearchCountriesL()
// Search for a country and show it in the listbox
// ---------------------------------------------------------
void SearchCountriesL();
// ---------------------------------------------------------
// CWSExampleAppUi::ImportDataFileL()
// Import world server data file
// ---------------------------------------------------------
void ImportDataFileL();
// ---------------------------------------------------------
// CWSExampleAppUi::ExportDataFileL()
// Export world server data file
// ---------------------------------------------------------
void ExportDataFileL();
// ---------------------------------------------------------
// CWSExampleAppUi::ResetDBL()
// Reset world server database to rom version
// ---------------------------------------------------------
void ResetDBL();
// ---------------------------------------------------------
// CWSExampleAppUi::DeleteCityL()
// Delete city from world server database
// ---------------------------------------------------------
void DeleteCityL();
// ---------------------------------------------------------
// CWSExampleAppUi::DeleteCountryL()
// Delete country from world server database
// ---------------------------------------------------------
void DeleteCountryL();
// ---------------------------------------------------------
// CWSExampleAppUi::HandleCommandL()
// Normal menu command handling
// ---------------------------------------------------------
void HandleCommandL( TInt aCommand );
// ---------------------------------------------------------
// CWSExampleAppUi::HandleKeyEventL()
// Standard key press information forwasion.
// ---------------------------------------------------------
virtual TKeyResponse HandleKeyEventL(
const TKeyEvent& aKeyEvent,TEventCode aType);
private: //Data
CWSExampleDialog* iAppDialog;
CWSEngine* iWSConnection;
// what the dialog currently is showing in
// the listbox.
TCurrentlyShowing iShowing;
// Last searched city
TCityData iCurrentCity;
// Last searched country
TCountryData iCurrentCountry;
};
#endif
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -