mmsharing/livecommsui/lcuiengine/tsrc/ut_lcuieng/hbstubs/hbstubs.cpp
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     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:  
       
    15 *
       
    16 */
       
    17 
       
    18 // Orbit classes
       
    19 #include <hbinstance.h>
       
    20 #include <hbmainwindow.h>
       
    21 #include <hbwidget.h>
       
    22 #include <hbdialog.h>
       
    23 #include <hbaction.h>
       
    24 #include <hblabel.h>
       
    25 #include <hbprogressdialog.h>
       
    26 #include <hblineedit.h>
       
    27 #include <hbview.h>
       
    28 
       
    29 // Static data that simulates HbInstance and HbMainWindow
       
    30 static HbInstance* hbInstanceSingleton = 0;
       
    31 
       
    32 // HbInstance
       
    33 
       
    34 // -----------------------------------------------------------------------------
       
    35 // HbInstance::instance
       
    36 // -----------------------------------------------------------------------------
       
    37 //
       
    38 HbInstance* HbInstance::instance()
       
    39 {
       
    40 	if (!hbInstanceSingleton)
       
    41 		hbInstanceSingleton = new HbInstance;
       
    42 	return hbInstanceSingleton;
       
    43 }
       
    44 
       
    45 // -----------------------------------------------------------------------------
       
    46 // HbInstance::allMainWindows
       
    47 // -----------------------------------------------------------------------------
       
    48 //
       
    49 QList<HbMainWindow *> HbInstance::allMainWindows() const
       
    50 {
       
    51     return mAllMainWindows;
       
    52 }
       
    53 
       
    54 // -----------------------------------------------------------------------------
       
    55 // HbInstance::HbInstance
       
    56 // -----------------------------------------------------------------------------
       
    57 //
       
    58 HbInstance::HbInstance()
       
    59 {
       
    60     HbMainWindow *mainWindow = new HbMainWindow;
       
    61     mAllMainWindows.append(mainWindow);
       
    62 }
       
    63 
       
    64 // -----------------------------------------------------------------------------
       
    65 // HbInstance::~HbInstance
       
    66 // -----------------------------------------------------------------------------
       
    67 //
       
    68 HbInstance::~HbInstance()
       
    69 {
       
    70     mAllMainWindows.clear();
       
    71 }
       
    72 
       
    73 
       
    74 // HbMainWindow
       
    75 
       
    76 // -----------------------------------------------------------------------------
       
    77 // HbMainWindow::HbMainWindow
       
    78 // -----------------------------------------------------------------------------
       
    79 //
       
    80 HbMainWindow::HbMainWindow(QWidget *parent,Hb::WindowFlags windowFlags)
       
    81 : QGraphicsView(parent)
       
    82 {
       
    83     Q_UNUSED(windowFlags)
       
    84 }
       
    85 
       
    86 // -----------------------------------------------------------------------------
       
    87 // HbMainWindow::~HbMainWindow
       
    88 // -----------------------------------------------------------------------------
       
    89 //
       
    90 HbMainWindow::~HbMainWindow()
       
    91 {
       
    92 }
       
    93 
       
    94 // HbDialog
       
    95 
       
    96 // -----------------------------------------------------------------------------
       
    97 // HbDialog::HbDialog
       
    98 // -----------------------------------------------------------------------------
       
    99 //
       
   100 HbDialog::HbDialog(QGraphicsItem *parent) : HbWidget(parent)
       
   101 {
       
   102 }
       
   103 
       
   104 // -----------------------------------------------------------------------------
       
   105 // HbDialog::~HbDialog
       
   106 // -----------------------------------------------------------------------------
       
   107 //
       
   108 HbDialog::~HbDialog()
       
   109 {
       
   110 }
       
   111 
       
   112 // -----------------------------------------------------------------------------
       
   113 // HbDialog::open()
       
   114 // -----------------------------------------------------------------------------
       
   115 //
       
   116 void HbDialog::open(QObject* receiver, const char* member)
       
   117 {
       
   118     Q_UNUSED(receiver);
       
   119     Q_UNUSED(member);
       
   120 }
       
   121 
       
   122 // -----------------------------------------------------------------------------
       
   123 // HbDialog::setContentWidget
       
   124 // -----------------------------------------------------------------------------
       
   125 //
       
   126 void HbDialog::setContentWidget(QGraphicsWidget *contentWidget)
       
   127 {
       
   128     Q_UNUSED(contentWidget)    
       
   129 }
       
   130 
       
   131 // -----------------------------------------------------------------------------
       
   132 // HbDialog::itemChange
       
   133 // -----------------------------------------------------------------------------
       
   134 //
       
   135 QVariant HbDialog::itemChange(GraphicsItemChange change, const QVariant& value)
       
   136 {
       
   137     Q_UNUSED(change)
       
   138     return QVariant(value);
       
   139 }
       
   140 
       
   141 // -----------------------------------------------------------------------------
       
   142 // HbDialog::setTimeout
       
   143 // -----------------------------------------------------------------------------
       
   144 //
       
   145 void HbDialog::setTimeout(int timeout )
       
   146 {
       
   147     Q_UNUSED(timeout)
       
   148 }
       
   149 
       
   150 // -----------------------------------------------------------------------------
       
   151 // HbDialog::setDismissPolicy
       
   152 // -----------------------------------------------------------------------------
       
   153 //
       
   154 void HbDialog::setDismissPolicy( HbDialog::DismissPolicy dismissPolicy )
       
   155 {
       
   156     Q_UNUSED(dismissPolicy)
       
   157 }
       
   158 
       
   159 // HbAction
       
   160 
       
   161 // -----------------------------------------------------------------------------
       
   162 // HbAction::HbAction
       
   163 // -----------------------------------------------------------------------------
       
   164 //
       
   165 HbAction::HbAction(QObject *parent) 
       
   166 : QAction(parent), mIcon(QString())
       
   167 {
       
   168 }
       
   169 
       
   170 // -----------------------------------------------------------------------------
       
   171 // HbAction::HbAction
       
   172 // -----------------------------------------------------------------------------
       
   173 //
       
   174 HbAction::HbAction(const QString &text, QObject *parent) 
       
   175 : QAction(text,parent), mIcon(QString())
       
   176 {
       
   177 }
       
   178 
       
   179 // -----------------------------------------------------------------------------
       
   180 // HbAction::~HbAction
       
   181 // -----------------------------------------------------------------------------
       
   182 //
       
   183 HbAction::~HbAction()
       
   184 {
       
   185 }
       
   186 
       
   187 
       
   188 // HbLabel
       
   189 
       
   190 // -----------------------------------------------------------------------------
       
   191 // HbLabel::HbLabel
       
   192 // -----------------------------------------------------------------------------
       
   193 //
       
   194 HbLabel::HbLabel(QGraphicsItem *parent) : HbWidget(parent)
       
   195 {
       
   196 }
       
   197 
       
   198 // -----------------------------------------------------------------------------
       
   199 // HbLabel::HbLabel
       
   200 // -----------------------------------------------------------------------------
       
   201 //
       
   202 HbLabel::HbLabel(const QString &displayText, QGraphicsItem *parent) 
       
   203 : HbWidget(parent)
       
   204 {
       
   205     Q_UNUSED(displayText)
       
   206 }
       
   207 
       
   208 // -----------------------------------------------------------------------------
       
   209 // HbLabel::~HbLabel
       
   210 // -----------------------------------------------------------------------------
       
   211 //
       
   212 HbLabel::~HbLabel()
       
   213 {
       
   214 }
       
   215 
       
   216 
       
   217 // -----------------------------------------------------------------------------
       
   218 // HbProgressDialog
       
   219 
       
   220 // -----------------------------------------------------------------------------
       
   221 // HbProgressDialog::HbProgressDialog
       
   222 // -----------------------------------------------------------------------------
       
   223 //
       
   224 HbProgressDialog::HbProgressDialog(QGraphicsItem *parent) : HbDialog(parent)
       
   225 {
       
   226 }
       
   227 
       
   228 // -----------------------------------------------------------------------------
       
   229 // HbProgressDialog::itemChange
       
   230 // -----------------------------------------------------------------------------
       
   231 //
       
   232 QVariant HbProgressDialog::itemChange(GraphicsItemChange change, const QVariant& value)
       
   233 {
       
   234     Q_UNUSED(change)
       
   235     return QVariant(value);
       
   236 }
       
   237 
       
   238 
       
   239 // HbLineEdit
       
   240 
       
   241 // -----------------------------------------------------------------------------
       
   242 // HbLineEdit::HbLineEdit
       
   243 // -----------------------------------------------------------------------------
       
   244 //
       
   245 HbLineEdit::HbLineEdit(const QString &text, QGraphicsItem *parent) 
       
   246 : HbWidget(parent)
       
   247 {
       
   248     Q_UNUSED(text)
       
   249 }
       
   250 
       
   251 // -----------------------------------------------------------------------------
       
   252 // HbLineEdit::~HbLineEdit
       
   253 // -----------------------------------------------------------------------------
       
   254 //
       
   255 HbLineEdit::~HbLineEdit()
       
   256 {
       
   257 }
       
   258 
       
   259 // HbWidget
       
   260 
       
   261 // -----------------------------------------------------------------------------
       
   262 // HbWidget::HbWidget
       
   263 // -----------------------------------------------------------------------------
       
   264 //
       
   265 HbWidget::HbWidget(QGraphicsItem *parent, Qt::WindowFlags wFlags)
       
   266 : QGraphicsWidget(parent,wFlags)
       
   267 {
       
   268 }
       
   269 
       
   270 // -----------------------------------------------------------------------------
       
   271 // HbWidget::~HbWidget
       
   272 // -----------------------------------------------------------------------------
       
   273 //
       
   274 HbWidget::~HbWidget()
       
   275 {
       
   276 }
       
   277 
       
   278 // -----------------------------------------------------------------------------
       
   279 // HbWidget::clearActions
       
   280 // -----------------------------------------------------------------------------
       
   281 //
       
   282 void HbWidget::clearActions()
       
   283 {
       
   284 }
       
   285 
       
   286 // -----------------------------------------------------------------------------
       
   287 // HbWidget::itemChange
       
   288 // -----------------------------------------------------------------------------
       
   289 //
       
   290 QVariant HbWidget::itemChange(GraphicsItemChange change, const QVariant& value)
       
   291 {
       
   292     Q_UNUSED(change)
       
   293     return QVariant(value);
       
   294 }
       
   295 
       
   296 
       
   297 // HbView
       
   298 
       
   299 // -----------------------------------------------------------------------------
       
   300 // HbView::HbView
       
   301 // -----------------------------------------------------------------------------
       
   302 //
       
   303 HbView::HbView(QGraphicsItem *parent) : HbWidget(parent)
       
   304 {
       
   305 }
       
   306 
       
   307 // -----------------------------------------------------------------------------
       
   308 // HbView::~HbView
       
   309 // -----------------------------------------------------------------------------
       
   310 //
       
   311 HbView::~HbView()
       
   312 {
       
   313 }
       
   314 
       
   315 // -----------------------------------------------------------------------------
       
   316 // HbView::menu
       
   317 // -----------------------------------------------------------------------------
       
   318 //
       
   319 HbMenu* HbView::menu() const
       
   320 {
       
   321     return 0;
       
   322 }
       
   323 
       
   324 // -----------------------------------------------------------------------------
       
   325 // HbView::toolBar
       
   326 // -----------------------------------------------------------------------------
       
   327 //
       
   328 HbToolBar* HbView::toolBar() const
       
   329 {
       
   330     return 0;
       
   331 }
       
   332 
       
   333 // -----------------------------------------------------------------------------
       
   334 // HbView::setTitle
       
   335 // -----------------------------------------------------------------------------
       
   336 //
       
   337 void HbView::setTitle(const QString &title)
       
   338 {
       
   339     Q_UNUSED(title)
       
   340 }
       
   341 
       
   342 // -----------------------------------------------------------------------------
       
   343 // HbView::setContentFullScreen
       
   344 // -----------------------------------------------------------------------------
       
   345 //
       
   346 void HbView::setContentFullScreen(bool /*enable*/)
       
   347 {
       
   348 }
       
   349 
       
   350 // -----------------------------------------------------------------------------
       
   351 // HbView::navigationAction
       
   352 // -----------------------------------------------------------------------------
       
   353 //
       
   354 HbAction *HbView::navigationAction() const
       
   355 {
       
   356     return 0;
       
   357 }
       
   358 
       
   359 // -----------------------------------------------------------------------------
       
   360 // HbView::setNavigationAction
       
   361 // -----------------------------------------------------------------------------
       
   362 //
       
   363 void HbView::setNavigationAction(HbAction *action)
       
   364 {
       
   365     Q_UNUSED(action);
       
   366 }
       
   367 
       
   368 
       
   369 // -----------------------------------------------------------------------------
       
   370 // 
       
   371 // -----------------------------------------------------------------------------
       
   372 //
       
   373 QString hbTrId(const char *id, int n)
       
   374 {
       
   375     Q_UNUSED(n);
       
   376     return QString(id);
       
   377 }