UIQ Technology
 Developer Library

UIQ 3 SDK

UIQ developer portal

FEEDBACK 

[Index] [Spacer] [Previous] [Next]



How to create the application class

The application class defines the properties of the application, such as its UID and caption, and creates a new document. To create an application class, derive from CQikApplication and overload its two pure virtual functions:

The definition of a minimal application class and the implementation of its functions are given in the example below.

class CExampleApplication : public CQikApplication
     {
     private:
     
     //CreateDocumentL calls for NewL in CExampleDocument
     CApaDocument* CreateDocumentL();

     //Returns the UID of the application.
     TUid AppDllUid() const;        
     };

// 1. Gets the application UID
TUid CExampleApplication::AppDllUid() const
    {
    return KUidApp; // The same UID as is declared in the mmp file.
    }

// 2. Gets a new document object.
CApaDocument* CExampleApplication::CreateDocumentL()
    {
    return new (ELeave) CExampleDocument(*this);
    }

Terms and conditions of use of the material