videocollection/tsrc/stubs/inc/hbmainwindow.h
author hgs
Thu, 01 Apr 2010 23:22:15 +0300
changeset 34 bbb98528c666
child 35 3738fe97f027
permissions -rw-r--r--
201009
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 hbmainwindow
hgs
parents:
diff changeset
    15
* 
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
#ifndef HBMAINWINDOW_H
hgs
parents:
diff changeset
    19
#define HBMAINWINDOW_H
hgs
parents:
diff changeset
    20
hgs
parents:
diff changeset
    21
#include <QObject>
hgs
parents:
diff changeset
    22
#include "hbwidget.h"
hgs
parents:
diff changeset
    23
#include "hbaction.h"
hgs
parents:
diff changeset
    24
hgs
parents:
diff changeset
    25
class HbView;
hgs
parents:
diff changeset
    26
hgs
parents:
diff changeset
    27
class HbMainWindow : public QObject
hgs
parents:
diff changeset
    28
{
hgs
parents:
diff changeset
    29
    Q_OBJECT
hgs
parents:
diff changeset
    30
hgs
parents:
diff changeset
    31
public:
hgs
parents:
diff changeset
    32
hgs
parents:
diff changeset
    33
    /**
hgs
parents:
diff changeset
    34
     * constructor
hgs
parents:
diff changeset
    35
     */
hgs
parents:
diff changeset
    36
    HbMainWindow(QWidget *parent = 0, Hb::WindowFlags windowFlags = Hb::WindowFlagNone) :
hgs
parents:
diff changeset
    37
    mSoftKeyAction(0),
hgs
parents:
diff changeset
    38
    mOrientation(Qt::Vertical)
hgs
parents:
diff changeset
    39
    {
hgs
parents:
diff changeset
    40
        Q_UNUSED(parent);
hgs
parents:
diff changeset
    41
        Q_UNUSED(windowFlags);
hgs
parents:
diff changeset
    42
    }
hgs
parents:
diff changeset
    43
    
hgs
parents:
diff changeset
    44
    /**
hgs
parents:
diff changeset
    45
     * destructor
hgs
parents:
diff changeset
    46
     */
hgs
parents:
diff changeset
    47
    ~HbMainWindow(){};
hgs
parents:
diff changeset
    48
    
hgs
parents:
diff changeset
    49
    /**
hgs
parents:
diff changeset
    50
     * dummy
hgs
parents:
diff changeset
    51
     */
hgs
parents:
diff changeset
    52
    void addSoftKeyAction(Hb::SoftKeyId type, HbAction *action)
hgs
parents:
diff changeset
    53
    {
hgs
parents:
diff changeset
    54
        Q_UNUSED(type);
hgs
parents:
diff changeset
    55
        mSoftKeyAction = action;
hgs
parents:
diff changeset
    56
    }
hgs
parents:
diff changeset
    57
    
hgs
parents:
diff changeset
    58
    void removeSoftKeyAction(Hb::SoftKeyId type, HbAction *action)
hgs
parents:
diff changeset
    59
    {
hgs
parents:
diff changeset
    60
        Q_UNUSED(type);
hgs
parents:
diff changeset
    61
        if(mSoftKeyAction == action)
hgs
parents:
diff changeset
    62
        {
hgs
parents:
diff changeset
    63
            mSoftKeyAction = 0;
hgs
parents:
diff changeset
    64
        }
hgs
parents:
diff changeset
    65
    }
hgs
parents:
diff changeset
    66
    
hgs
parents:
diff changeset
    67
    
hgs
parents:
diff changeset
    68
    /**
hgs
parents:
diff changeset
    69
     * returns mSoftKeyAction
hgs
parents:
diff changeset
    70
     */
hgs
parents:
diff changeset
    71
    HbAction* softKeyAction(Hb::SoftKeyId type)
hgs
parents:
diff changeset
    72
    {
hgs
parents:
diff changeset
    73
        Q_UNUSED(type);
hgs
parents:
diff changeset
    74
        return mSoftKeyAction;
hgs
parents:
diff changeset
    75
    }
hgs
parents:
diff changeset
    76
    
hgs
parents:
diff changeset
    77
    HbView *addView(QGraphicsWidget *widget = 0);
hgs
parents:
diff changeset
    78
    
hgs
parents:
diff changeset
    79
    void removeView(QGraphicsWidget *widget);
hgs
parents:
diff changeset
    80
    
hgs
parents:
diff changeset
    81
    QList<HbView *> views() const;
hgs
parents:
diff changeset
    82
    
hgs
parents:
diff changeset
    83
    HbView *currentView() const;
hgs
parents:
diff changeset
    84
    
hgs
parents:
diff changeset
    85
    Qt::Orientation orientation() const
hgs
parents:
diff changeset
    86
    {
hgs
parents:
diff changeset
    87
        return mOrientation;
hgs
parents:
diff changeset
    88
    }
hgs
parents:
diff changeset
    89
    
hgs
parents:
diff changeset
    90
    void setOrientation(Qt::Orientation orientation, bool animate = true)
hgs
parents:
diff changeset
    91
    {
hgs
parents:
diff changeset
    92
        Q_UNUSED(animate);
hgs
parents:
diff changeset
    93
        mOrientation = orientation;
hgs
parents:
diff changeset
    94
    }
hgs
parents:
diff changeset
    95
    
hgs
parents:
diff changeset
    96
    void unsetOrientation(bool animate = true)
hgs
parents:
diff changeset
    97
    {
hgs
parents:
diff changeset
    98
        Q_UNUSED(animate);
hgs
parents:
diff changeset
    99
        mOrientation = Qt::Vertical;
hgs
parents:
diff changeset
   100
    }
hgs
parents:
diff changeset
   101
    
hgs
parents:
diff changeset
   102
    /**
hgs
parents:
diff changeset
   103
     * value to return from softKeyAction
hgs
parents:
diff changeset
   104
     */
hgs
parents:
diff changeset
   105
    HbAction *mSoftKeyAction;
hgs
parents:
diff changeset
   106
    
hgs
parents:
diff changeset
   107
    /**
hgs
parents:
diff changeset
   108
     * views
hgs
parents:
diff changeset
   109
     */
hgs
parents:
diff changeset
   110
    QList<HbView *> mViews;
hgs
parents:
diff changeset
   111
    
hgs
parents:
diff changeset
   112
    /**
hgs
parents:
diff changeset
   113
     * orientation
hgs
parents:
diff changeset
   114
     */
hgs
parents:
diff changeset
   115
    Qt::Orientation mOrientation;
hgs
parents:
diff changeset
   116
};
hgs
parents:
diff changeset
   117
#endif