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