videocollection/videocollectionwrapper/tsrc/testvideothumbnaildata_p/src/videothumbnaildatatester.cpp
author hgs
Fri, 06 Aug 2010 09:43:48 +0300
changeset 50 21fe8338c6bf
parent 34 bbb98528c666
child 58 d2b028fd1f7d
permissions -rw-r--r--
201031
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30
hgs
parents:
diff changeset
     1
/**
hgs
parents:
diff changeset
     2
* Copyright (c) 2009 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:   helper class to test VideoThumbnailData
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
// INCLUDES
hgs
parents:
diff changeset
    19
#define private public
hgs
parents:
diff changeset
    20
#include "videothumbnaildata_p.h"
hgs
parents:
diff changeset
    21
#undef private
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
#include "videothumbnaildatatester.h"
hgs
parents:
diff changeset
    24
hgs
parents:
diff changeset
    25
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    26
// VideoTnDataTester::VideoTnDataTester()
hgs
parents:
diff changeset
    27
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    28
//
hgs
parents:
diff changeset
    29
VideoThumbnailDataTester::VideoThumbnailDataTester()
hgs
parents:
diff changeset
    30
{
hgs
parents:
diff changeset
    31
    connect(this, SIGNAL(doBackgroundFetchingSignal()), this, SLOT(doBackgroundFetching()));
hgs
parents:
diff changeset
    32
    connect(this, SIGNAL(reportThumbnailsReadySignal()), this, SLOT(reportThumbnailsReadySlot()));
34
hgs
parents: 30
diff changeset
    33
    connect(this, SIGNAL(aboutToQuitSignal()), this, SLOT(aboutToQuitSlot()));
30
hgs
parents:
diff changeset
    34
}
hgs
parents:
diff changeset
    35
hgs
parents:
diff changeset
    36
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    37
// VideoThumbnailDataTester::~VideoThumbnailDataTester()
hgs
parents:
diff changeset
    38
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    39
//
hgs
parents:
diff changeset
    40
VideoThumbnailDataTester::~VideoThumbnailDataTester()
hgs
parents:
diff changeset
    41
{
hgs
parents:
diff changeset
    42
    disconnect(this, SIGNAL(doBackgroundFetchingSignal()), this, SLOT(doBackgroundFetching()));
hgs
parents:
diff changeset
    43
    disconnect(this, SIGNAL(reportThumbnailsReadySignal()), this, SLOT(reportThumbnailsReadySlot()));
34
hgs
parents: 30
diff changeset
    44
    disconnect(this, SIGNAL(aboutToQuitSignal()), this, SLOT(aboutToQuitSlot()));
30
hgs
parents:
diff changeset
    45
}
hgs
parents:
diff changeset
    46
hgs
parents:
diff changeset
    47
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    48
// VideoThumbnailDataTester::emitDoBackgroundFetching()
hgs
parents:
diff changeset
    49
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    50
//
hgs
parents:
diff changeset
    51
void VideoThumbnailDataTester::emitDoBackgroundFetching()
hgs
parents:
diff changeset
    52
{
hgs
parents:
diff changeset
    53
    emit doBackgroundFetchingSignal();
hgs
parents:
diff changeset
    54
}
hgs
parents:
diff changeset
    55
hgs
parents:
diff changeset
    56
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    57
// VideoThumbnailDataTester::emitDoBackgroundFetching()
hgs
parents:
diff changeset
    58
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    59
//
hgs
parents:
diff changeset
    60
void VideoThumbnailDataTester::emitReportThumbnailsReady()
hgs
parents:
diff changeset
    61
{
hgs
parents:
diff changeset
    62
    emit reportThumbnailsReadySignal();
hgs
parents:
diff changeset
    63
}
hgs
parents:
diff changeset
    64
hgs
parents:
diff changeset
    65
// -----------------------------------------------------------------------------
34
hgs
parents: 30
diff changeset
    66
// VideoThumbnailDataTester::emitAboutToQuit()
30
hgs
parents:
diff changeset
    67
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    68
//
34
hgs
parents: 30
diff changeset
    69
void VideoThumbnailDataTester::emitAboutToQuit()
30
hgs
parents:
diff changeset
    70
{
34
hgs
parents: 30
diff changeset
    71
    emit aboutToQuitSignal();
30
hgs
parents:
diff changeset
    72
}
hgs
parents:
diff changeset
    73
hgs
parents:
diff changeset
    74
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    75
// VideoThumbnailDataTester::initialize()
hgs
parents:
diff changeset
    76
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    77
//
hgs
parents:
diff changeset
    78
void VideoThumbnailDataTester::initialize()
hgs
parents:
diff changeset
    79
{
hgs
parents:
diff changeset
    80
    VideoThumbnailDataPrivate::initialize();
hgs
parents:
diff changeset
    81
}
hgs
parents:
diff changeset
    82
hgs
parents:
diff changeset
    83
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    84
// VideoThumbnailDataTester::cleanup()
hgs
parents:
diff changeset
    85
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    86
//
hgs
parents:
diff changeset
    87
void VideoThumbnailDataTester::cleanup()
hgs
parents:
diff changeset
    88
{
hgs
parents:
diff changeset
    89
    VideoThumbnailDataPrivate::cleanup();
hgs
parents:
diff changeset
    90
}
hgs
parents:
diff changeset
    91
hgs
parents:
diff changeset
    92
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    93
// VideoThumbnailDataTester::connectSignals()
hgs
parents:
diff changeset
    94
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
    95
//
hgs
parents:
diff changeset
    96
void VideoThumbnailDataTester::connectSignals()
hgs
parents:
diff changeset
    97
{
hgs
parents:
diff changeset
    98
    VideoThumbnailDataPrivate::connectSignals();
hgs
parents:
diff changeset
    99
}
hgs
parents:
diff changeset
   100
hgs
parents:
diff changeset
   101
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
   102
// VideoThumbnailDataTester::disconnectSignals()
hgs
parents:
diff changeset
   103
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
   104
//
hgs
parents:
diff changeset
   105
void VideoThumbnailDataTester::disconnectSignals()
hgs
parents:
diff changeset
   106
{
hgs
parents:
diff changeset
   107
    VideoThumbnailDataPrivate::disconnectSignals();
hgs
parents:
diff changeset
   108
}
hgs
parents:
diff changeset
   109
hgs
parents:
diff changeset
   110
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
   111
// VideoThumbnailDataTester::defaultThumbnail()
hgs
parents:
diff changeset
   112
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
   113
//
hgs
parents:
diff changeset
   114
const QIcon* VideoThumbnailDataTester::defaultThumbnail(TMPXItemId mediaId)
hgs
parents:
diff changeset
   115
{
hgs
parents:
diff changeset
   116
    return VideoThumbnailDataPrivate::defaultThumbnail(mediaId);
hgs
parents:
diff changeset
   117
}
hgs
parents:
diff changeset
   118
hgs
parents:
diff changeset
   119
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
   120
// VideoThumbnailDataTester::continueBackgroundFetch()
hgs
parents:
diff changeset
   121
// -----------------------------------------------------------------------------
hgs
parents:
diff changeset
   122
//
hgs
parents:
diff changeset
   123
void VideoThumbnailDataTester::continueBackgroundFetch()
hgs
parents:
diff changeset
   124
{
hgs
parents:
diff changeset
   125
    VideoThumbnailDataPrivate::continueBackgroundFetch();
hgs
parents:
diff changeset
   126
}
hgs
parents:
diff changeset
   127
34
hgs
parents: 30
diff changeset
   128
hgs
parents: 30
diff changeset
   129
// -----------------------------------------------------------------------------
hgs
parents: 30
diff changeset
   130
// VideoThumbnailDataTester::startFetchingThumbnails()
hgs
parents: 30
diff changeset
   131
// -----------------------------------------------------------------------------
hgs
parents: 30
diff changeset
   132
//
hgs
parents: 30
diff changeset
   133
int VideoThumbnailDataTester::startFetchingThumbnails(const QList<QModelIndex> &indexes, int priority)
hgs
parents: 30
diff changeset
   134
{
hgs
parents: 30
diff changeset
   135
    return VideoThumbnailDataPrivate::startFetchingThumbnails(indexes, priority);
hgs
parents: 30
diff changeset
   136
}
hgs
parents: 30
diff changeset
   137
hgs
parents: 30
diff changeset
   138
// -----------------------------------------------------------------------------
hgs
parents: 30
diff changeset
   139
// VideoThumbnailDataTester::continueBackgroundFetch()
hgs
parents: 30
diff changeset
   140
// -----------------------------------------------------------------------------
hgs
parents: 30
diff changeset
   141
//
hgs
parents: 30
diff changeset
   142
int VideoThumbnailDataTester::startFetchingThumbnail(TMPXItemId mediaId, int priority)
hgs
parents: 30
diff changeset
   143
{
hgs
parents: 30
diff changeset
   144
    return VideoThumbnailDataPrivate::startFetchingThumbnail(mediaId, priority);
hgs
parents: 30
diff changeset
   145
}
hgs
parents: 30
diff changeset
   146
30
hgs
parents:
diff changeset
   147
// End of file
hgs
parents:
diff changeset
   148