videocollection/tsrc/stubs/inc/hblabel.h
author hgs
Thu, 24 Jun 2010 09:49:13 +0300
changeset 41 229f037ce963
parent 34 bbb98528c666
permissions -rw-r--r--
201025
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34
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:  stub hblabel for testing video collection ui uitils
hgs
parents:
diff changeset
    15
* 
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
#ifndef HBLABEL_H
hgs
parents:
diff changeset
    19
#define HBLABEL_H
hgs
parents:
diff changeset
    20
hgs
parents:
diff changeset
    21
#include <QString>
hgs
parents:
diff changeset
    22
#include "hbwidget.h"
hgs
parents:
diff changeset
    23
hgs
parents:
diff changeset
    24
class HbLabel : public HbWidget
hgs
parents:
diff changeset
    25
{
hgs
parents:
diff changeset
    26
    Q_OBJECT
hgs
parents:
diff changeset
    27
public:
hgs
parents:
diff changeset
    28
hgs
parents:
diff changeset
    29
    /**
hgs
parents:
diff changeset
    30
     * Contructor.
hgs
parents:
diff changeset
    31
     */       
hgs
parents:
diff changeset
    32
    HbLabel() {initializeCount++;}
hgs
parents:
diff changeset
    33
    
hgs
parents:
diff changeset
    34
    /**
hgs
parents:
diff changeset
    35
     * Contructor.
hgs
parents:
diff changeset
    36
     */ 
hgs
parents:
diff changeset
    37
    HbLabel(const QString&,  QGraphicsItem *parent = 0) : HbWidget(parent){initializeCount++;}
hgs
parents:
diff changeset
    38
      
hgs
parents:
diff changeset
    39
    /**
hgs
parents:
diff changeset
    40
     * Destructor.
hgs
parents:
diff changeset
    41
     */   
hgs
parents:
diff changeset
    42
    virtual ~HbLabel(){initializeCount--;}
hgs
parents:
diff changeset
    43
    
hgs
parents:
diff changeset
    44
    /**
hgs
parents:
diff changeset
    45
     * counter to make sure alloc dealloc match
hgs
parents:
diff changeset
    46
     */
hgs
parents:
diff changeset
    47
    static int initializeCount;
hgs
parents:
diff changeset
    48
    
hgs
parents:
diff changeset
    49
    /**
hgs
parents:
diff changeset
    50
     * set text
hgs
parents:
diff changeset
    51
     */
hgs
parents:
diff changeset
    52
    void setPlainText(QString txt);
hgs
parents:
diff changeset
    53
    
hgs
parents:
diff changeset
    54
    /**
hgs
parents:
diff changeset
    55
     * sets alignment flag
hgs
parents:
diff changeset
    56
     */
hgs
parents:
diff changeset
    57
    void setAlignment(Qt::AlignmentFlag alignment);
hgs
parents:
diff changeset
    58
hgs
parents:
diff changeset
    59
    /**
hgs
parents:
diff changeset
    60
     * clears text
hgs
parents:
diff changeset
    61
     */
hgs
parents:
diff changeset
    62
    void clear();
hgs
parents:
diff changeset
    63
	
hgs
parents:
diff changeset
    64
	int count() const { return 0;}
hgs
parents:
diff changeset
    65
    
hgs
parents:
diff changeset
    66
    QGraphicsLayoutItem *itemAt(int index) const 
hgs
parents:
diff changeset
    67
    {
hgs
parents:
diff changeset
    68
        Q_UNUSED(index);
hgs
parents:
diff changeset
    69
        return 0;
hgs
parents:
diff changeset
    70
    }
hgs
parents:
diff changeset
    71
    void removeAt(int index) { Q_UNUSED(index); }
hgs
parents:
diff changeset
    72
    
hgs
parents:
diff changeset
    73
    void removeItem(QGraphicsLayoutItem* item){Q_UNUSED(item);}
hgs
parents:
diff changeset
    74
    
hgs
parents:
diff changeset
    75
    int indexOf(const QGraphicsLayoutItem* item) const
hgs
parents:
diff changeset
    76
    {
hgs
parents:
diff changeset
    77
        Q_UNUSED(item);
hgs
parents:
diff changeset
    78
        return 0;
hgs
parents:
diff changeset
    79
    }
hgs
parents:
diff changeset
    80
    
hgs
parents:
diff changeset
    81
    QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const
hgs
parents:
diff changeset
    82
       {
hgs
parents:
diff changeset
    83
           Q_UNUSED(which);
hgs
parents:
diff changeset
    84
           Q_UNUSED(constraint);
hgs
parents:
diff changeset
    85
           return QSizeF();
hgs
parents:
diff changeset
    86
       }
hgs
parents:
diff changeset
    87
    
hgs
parents:
diff changeset
    88
    /**
hgs
parents:
diff changeset
    89
     * text setted 
hgs
parents:
diff changeset
    90
     */
hgs
parents:
diff changeset
    91
	 QString mPlainTxt;
hgs
parents:
diff changeset
    92
    
hgs
parents:
diff changeset
    93
    /**
hgs
parents:
diff changeset
    94
     * alinment setted
hgs
parents:
diff changeset
    95
     */
hgs
parents:
diff changeset
    96
    Qt::AlignmentFlag mAlignment;
hgs
parents:
diff changeset
    97
    
hgs
parents:
diff changeset
    98
};
hgs
parents:
diff changeset
    99
hgs
parents:
diff changeset
   100
#endif