34
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 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: stub hbinstance
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef HBINSTANCE_H
|
|
19 |
#define HBINSTANCE_H
|
|
20 |
|
|
21 |
|
|
22 |
#include "hbmainwindow.h"
|
|
23 |
#include "hbglobal.h"
|
|
24 |
|
|
25 |
#define hbInstance (HbInstance::instance())
|
|
26 |
|
|
27 |
class HbInstance
|
|
28 |
{
|
|
29 |
public:
|
|
30 |
|
|
31 |
/**
|
|
32 |
* returns static instance
|
|
33 |
*/
|
|
34 |
static HbInstance *instance()
|
|
35 |
{
|
|
36 |
static HbInstance __instance;
|
|
37 |
return &__instance;
|
|
38 |
}
|
|
39 |
|
|
40 |
/**
|
|
41 |
* returns list of windowses
|
|
42 |
*/
|
|
43 |
QList<HbMainWindow*> allMainWindows()
|
|
44 |
{
|
|
45 |
return mWindowses;
|
|
46 |
}
|
|
47 |
|
|
48 |
/**
|
|
49 |
* list of windowses
|
|
50 |
*/
|
|
51 |
QList<HbMainWindow*> mWindowses;
|
|
52 |
|
|
53 |
private:
|
|
54 |
/**
|
|
55 |
* no copy contructor
|
|
56 |
*/
|
|
57 |
Q_DISABLE_COPY(HbInstance)
|
|
58 |
|
|
59 |
/**
|
|
60 |
* default constuctor
|
|
61 |
*/
|
|
62 |
HbInstance(){};
|
|
63 |
|
|
64 |
/**
|
|
65 |
* destructor
|
|
66 |
*/
|
|
67 |
~HbInstance(){};
|
|
68 |
};
|
|
69 |
|
|
70 |
#endif
|