⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smsetdlg.h

📁 include emccsoft s60_2x
💻 H
字号:
/*
 * NOKIA MOBILE PHONES
 * DIGITAL CONVERGENCE
 * LINDA SW
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *             Smsetdlg.h
 *             ----------------
 *
 *             SW Include Document - C++
 *
 *
 *
 *
 *
 *
 *
 *
 * Module name: Smum
 *
 * $Archive: /Linda_PDA_SW/smum/Inc/SMSETDLG.H $
 *
 * $Revision: 2 $
 *
 *
 * Copyright (c) 1999. Nokia Mobile Phones
 *
 *
 * Change History:
 *
 * $History: SMSETDLG.H $
 * 
 * *****************  Version 2  *****************
 * User: Wasilews     Date: 15.05.01   Time: 13:58
 * Updated in $/Linda_PDA_SW/smum/Inc
 * 
 * *****************  Version 20  *****************
 * User: Wasilews     Date: 2.02.01    Time: 13:59
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 19  *****************
 * User: Wasilews     Date: 25.10.00   Time: 18:02
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 18  *****************
 * User: Wasilews     Date: 4.10.00    Time: 12:55
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 17  *****************
 * User: Wasilews     Date: 4.10.00    Time: 12:26
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 16  *****************
 * User: Wasilews     Date: 23.08.00   Time: 15:10
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 15  *****************
 * User: Wasilews     Date: 10.08.00   Time: 13:41
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 14  *****************
 * User: Wasilews     Date: 30.03.00   Time: 10:10
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 13  *****************
 * User: Wasilews     Date: 29.03.00   Time: 14:11
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 12  *****************
 * User: Wasilews     Date: 22.03.00   Time: 18:18
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 11  *****************
 * User: Wasilews     Date: 21.03.00   Time: 18:08
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 10  *****************
 * User: Wasilews     Date: 20.03.00   Time: 18:31
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 7  *****************
 * User: Haraisan     Date: 6.03.00    Time: 16:14
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 6  *****************
 * User: Jumuhone     Date: 23.02.00   Time: 9:58
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 5  *****************
 * User: Jumuhone     Date: 19.02.00   Time: 13:06
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 4  *****************
 * User: Haraisan     Date: 16.02.00   Time: 15:56
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 3  *****************
 * User: Jumuhone     Date: 10.02.00   Time: 7:55
 * Updated in $/Linda_PDA_SW/Smum/Inc
 * 
 * *****************  Version 2  *****************
 * User: Jumuhone     Date: 7.12.99    Time: 13:15
 * Updated in $/Linda_PDA_SW/Smum/Inc
 *
 * ----------------------------------------------------------------------------
 */



/*
-----------------------------------------------------------------------------

    DESCRIPTION

    Smum settings dialog definitions.

    TSmumSCNameInfo - stores service centres name and number and creates
    string to be displayed in service centres dialog.

    CSmumSCArray - the array to manipulate and store service centres.

    CSmsSettingsDialog -  main dialog

    CSmsServiceCentresDialog - service centres dialog class to manipulate
    service centres (create, edit, delete).

    CSmsAddServiceCentreDialog - dialog to create new or edit old service
    centre.

    TSmsSettingsSCNames - wrapper class to take care of list of service centres from
    CSmsSettings, used by CSmsSettingsDialog.


-----------------------------------------------------------------------------
*/

#ifndef __SMSETDLG_H__
#define __SMSETDLG_H__

//    eikon includes
#if !defined(__EIKDIALG_H__)
#include <eikdialg.h>                    // CEikDialog
#endif // __EIKDIALG_H__

#if !defined(__E32DEF_H__)
#include <e32def.h>                      // ?description
#endif // __E32DEF_H__

// sms includes
#include "smsu.h"                       //  CSmsMtmUi


const TInt KSmumAddNewServiceCentre = -1;


class CEikColumnListBox;
class CSmsUiSettings;


//  CLASS DEFINITIONS

class TSmumSCNameInfo
    {
public:
    TSmumSCNameInfo(const TDesC& aName, const TDesC& aAddress, const CFont* aFont, TInt aWidthName, TInt aWidthAddress);
    TSmumSCNameInfo(const TDesC& aName);
    ~TSmumSCNameInfo();

    TPtrC Name() const;
    TPtrC Address() const;
    TPtrC NameAndAddress() const;

private:
    TBuf<2*KHumanReadableNameLength> iNameAndAddress;
    TBuf<KHumanReadableNameLength> iName;
    TBuf<KHumanReadableNameLength> iAddress;
    };


class TSmsSettingSCNames : public MDesCArray
    {
public:
    TSmsSettingSCNames(const CSmsSettings& aSmsSettings, TInt aNoCentresResourceId, CCoeEnv& aCoeEnv);
    ~TSmsSettingSCNames();

private: // from MDesCArray
    TInt MdcaCount() const;
    TPtrC MdcaPoint(TInt aIndex) const;

private:
    const CSmsSettings&                 iSmsSettings;
    TBuf<KHumanReadableNameLength>      iNoCentresText;
    };


class CSmumSCArray : public CArrayFixFlat<TSmumSCNameInfo>, public MDesCArray
    {
public:
    CSmumSCArray(TInt aGranularity, TInt aNoCentresResourceId, CCoeEnv& aCoeEnv);
    ~CSmumSCArray();

    TSmumSCNameInfo& SCNameInfo(TInt aIndex);

private: // from MDesCArray
    TInt MdcaCount() const;
    TPtrC MdcaPoint(TInt aIndex) const;

private:
    TBuf<KHumanReadableNameLength>  iNoCentresText;
    };


class CSmsSettingsDialog : public CEikDialog
    {
public:
    //    Construction
    ~CSmsSettingsDialog();
    static CSmsSettingsDialog* NewL(CSmsSettings& aSettings);
    //
        // from CCoeControl
    void GetHelpContext(TCoeHelpContext& aContext) const;
    
    
    
    // --- From CEikDialog ---
private:
    void PreLayoutDynInitL();
    TBool OkToExitL(TInt aButtonId);



private:
    CSmsSettingsDialog(CSmsSettings& aSettings);

    void LaunchServiceCentresDialogL();
    void OpeningSettingsDialog();
    void ClosingSettingsDialog() const;

private:
    // --- Data ---
    CSmsSettings&       iSettings;

    TSmsSettingSCNames  iSCNameList;
    };

class CSmsServiceCentresDialog : public CEikDialog
    {
public:
    //
    //    Construction
    CSmsServiceCentresDialog(CSmsSettings& aSettings);
    ~CSmsServiceCentresDialog();

    //
    // --- From CEikDialog ---
    void PostLayoutDynInitL();
    TBool OkToExitL(TInt aButtonId);

        // from CCoeControl
    void GetHelpContext(TCoeHelpContext& aContext) const;

public:
    CEikColumnListBox* ListBox() const;

private:
    void ServiceCentreListEmptyL(TBool aEmpty); // For configuring the CBA and columns in listbox if ServiceCentre-list is empty
    void FindDefaultName( TDes& name);
    void ClosingSCentresDlgL();
    void DeleteSCentresDlgL();
    void NewSCentreDlgL();
    void EditSCentreDlgL();

private:
    CSmsSettings&   iSettings;
    CSmumSCArray    iSCAddressesList;
    const CFont*    iNormalFont;
    TInt            iWidth0;
    TInt            iWidth2;

    enum 
        {
        KProgressStringMaxLen = 255
        };
    
    };


class CSmsAddServiceCentreDialog : public CEikDialog
    {
    public:
    //
    //    Construction
    CSmsAddServiceCentreDialog(TDes& aName, TDes& aNumber, TInt aIndex, TBool aNew, CSmumSCArray* aSCAddresses);
    ~CSmsAddServiceCentreDialog();

    IMPORT_C static CSmsAddServiceCentreDialog* NewL(TDes& aName, TDes& aNumber);
    IMPORT_C static CSmsAddServiceCentreDialog* NewL(TDes& aName, TDes& aNumber, 
        TInt aIndex, TBool aNew, CSmumSCArray* aSCAddresses);
    
    // from CCoeControl
    void GetHelpContext(TCoeHelpContext& aContext) const;

    //
    // --- From CEikDialog ---
private:
    void PreLayoutDynInitL();
    TBool OkToExitL(TInt aButtonId);

private:
    TBool FindDuplicateNameFromCentres(); // returns ETrue if name already exists in settings
    void  RemoveIllegalCharacters(TDes& aNumber);    // remove everything but 0-9 and '+'
private:
    TDes&           iName;
    TDes&           iNumber;
    TInt            iIndex; // index of the centre to be edited, set to -1 when creating new
    TBool           iType;
    CSmumSCArray*   iSCAddressesList; // needed for checking that user cannot create duplicate centres
    };




#endif // __SMSETDLG_H__



//  End of File

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -