videocollection/videocollectionview/inc/videocollectionuiloaderdef.h
changeset 17 69946d1824c4
child 20 b9e04db066d4
equal deleted inserted replaced
15:cf5481c2bc0b 17:69946d1824c4
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef VIDEOCOLLECTIONUILOADERDEF_H
       
    19 #define VIDEOCOLLECTIONUILOADERDEF_H
       
    20 
       
    21 // Constants
       
    22 static const char* DOCML_VIDEOCOLLECTIONVIEW_FILE         = ":/layout/collectionview.docml";
       
    23 static const char* DOCML_VIDEOCOLLECTIONVIEW_SECTION_LIST = "listsSection";
       
    24 static const char* DOCML_VIDEOCOLLECTIONVIEW_SECTION_HINT = "hintSection";
       
    25 static const char* DOCML_NAME_VIEW                        = "view";
       
    26 
       
    27 // Videocollection View
       
    28 static const char* DOCML_NAME_VC_HEADINGBANNER            = "vc:mBanner";
       
    29 static const char* DOCML_NAME_VC_COLLECTIONWIDGET         = "vc:mCollectionWidget";
       
    30 static const char* DOCML_NAME_VC_COLLECTIONCONTENTWIDGET  = "vc:mCollectionContentWidget";
       
    31 static const char* DOCML_NAME_VC_VIDEOLISTWIDGET          = "vc:mListWidget";
       
    32 static const char* DOCML_NAME_VC_VIDEOHINTWIDGET          = "vc:mHintWidget";
       
    33 
       
    34 // Videocollection Options Menu
       
    35 static const char* DOCML_NAME_OPTIONS_MENU                = "vc:mOptionsMenu";
       
    36 static const char* DOCML_NAME_SORT_MENU                   = "vc:mSortBy";
       
    37 
       
    38 static const char* DOCML_NAME_SORT_BY_DATE                = "vc:mDate";
       
    39 static const char* DOCML_NAME_SORT_BY_NAME                = "vc:mName";
       
    40 static const char* DOCML_NAME_SORT_BY_NUMBER_OF_ITEMS     = "vc:mNumberOfItems";
       
    41 static const char* DOCML_NAME_SORT_BY_SIZE                = "vc:mSize";
       
    42 
       
    43 static const char* DOCML_NAME_ADD_TO_COLLECTION           = "vc:mAddtoCollection";
       
    44 static const char* DOCML_NAME_CREATE_COLLECTION           = "vc:mCreateNewCollection";
       
    45 static const char* DOCML_NAME_DELETE_MULTIPLE             = "vc:mDeleteMultiple";
       
    46 
       
    47 // Videocollection hint widget
       
    48 static const char* DOCML_NAME_HINT_BUTTON                 = "vc:mHintButton";
       
    49 static const char* DOCML_NAME_HINT_LABEL                  = "vc:mHintTextLabel";
       
    50 static const char* DOCML_NAME_NO_VIDEOS_LABEL             = "vc:mNoVideosLabel";
       
    51 
       
    52 // video multiselection dialog
       
    53 static const char* DOCML_VIDEOSELECTIONDIALOG_FILE        = ":/layout/videolistselectiondialog.docml";
       
    54 static const char* DOCML_NAME_DIALOG                      = "mMultiSelectionDialog";
       
    55 static const char* DOCML_NAME_DLG_HEADINGLBL              = "mHeadingLabel";
       
    56 static const char* DOCML_NAME_CHECK_CONTAINER             = "mCheckBoxContainer";
       
    57 static const char* DOCML_NAME_MARKALL                     = "mCheckMarkAll";
       
    58 static const char* DOCML_NAME_LBL_SELECTION               = "mSelectionCount";
       
    59 static const char* DOCML_NAME_LIST_CONTAINER              = "mListContainer";
       
    60 
       
    61 // async loading timeout
       
    62 static const int ASYNC_FIND_TIMEOUT                       = 50; // ms
       
    63 
       
    64 // Effect constants
       
    65 static const char* EFFECT_SLIDE_IN_TO_LEFT_FILENAME       = ":/effects/slide_in_to_left_and_fade_in.fxml";
       
    66 static const char* EFFECT_SLIDE_OUT_TO_LEFT_FILENAME      = ":/effects/slide_out_to_left_and_fade_out.fxml";
       
    67 
       
    68 static const char* EFFECT_SLIDE_IN_TO_LEFT                = "slide_in_to_left_and_fade_in";
       
    69 static const char* EFFECT_SLIDE_OUT_TO_LEFT               = "slide_out_to_left_and_fade_out";
       
    70 
       
    71 /** VideoCollectionUiLoader parameter class */ 
       
    72 class VideoCollectionUiLoaderParam
       
    73 {
       
    74 public:
       
    75     enum // Loading phases
       
    76     {
       
    77         LoadPhasePrimary,
       
    78         LoadPhaseSecondary
       
    79     };
       
    80     
       
    81 public:
       
    82     VideoCollectionUiLoaderParam(const QString& name,
       
    83         const char *docml,
       
    84         bool isWidget,
       
    85         int loadPhase):
       
    86         mName(name),
       
    87         mIsWidget(isWidget),
       
    88         mReceiver(0),
       
    89         mDocml(docml),
       
    90         mSection(0),
       
    91         mMember(0),
       
    92         mPhase(loadPhase)
       
    93     {
       
    94         // members already set
       
    95     }
       
    96     
       
    97     VideoCollectionUiLoaderParam(const QString& name,
       
    98         const char *docml,
       
    99         const char *section,
       
   100         bool isWidget,
       
   101         int loadPhase):
       
   102         mName(name),
       
   103         mIsWidget(isWidget),
       
   104         mReceiver(0),
       
   105         mDocml(docml),
       
   106         mSection(section),
       
   107         mMember(0),
       
   108         mPhase(loadPhase)
       
   109     {
       
   110         // members already set
       
   111     }
       
   112     
       
   113     VideoCollectionUiLoaderParam(const QString& name,
       
   114         const char *docml,
       
   115         const char *section,
       
   116         bool isWidget,
       
   117         int loadPhase,
       
   118         QObject *receiver,
       
   119         const char *member):
       
   120         mName(name),
       
   121         mIsWidget(isWidget),
       
   122         mReceiver(receiver),
       
   123         mDocml(docml),
       
   124         mSection(section),
       
   125         mMember(member),
       
   126         mPhase(loadPhase)
       
   127     {
       
   128         // members already set
       
   129     }
       
   130     
       
   131     bool operator==(const VideoCollectionUiLoaderParam &param) const
       
   132     {
       
   133         return mName == param.mName && mDocml == param.mDocml && mSection == param.mSection;
       
   134     }
       
   135     
       
   136     bool operator==(const QString &name) const
       
   137     {
       
   138         return mName == name;
       
   139     }
       
   140     
       
   141 public:
       
   142     QString mName;
       
   143     bool mIsWidget;
       
   144     QObject *mReceiver;
       
   145     const char *mDocml;
       
   146     const char *mSection;
       
   147     const char *mMember;
       
   148     int mPhase;
       
   149 };
       
   150 
       
   151 #endif//VIDEOCOLLECTIONUILOADERDEF_H