mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/hbstubs.cpp
branchRCL_3
changeset 23 bc78a40cd63c
parent 22 73a1feb507fb
child 24 6c57ef9392d2
equal deleted inserted replaced
22:73a1feb507fb 23: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 <hbmenu.h>
       
    24 #include <hbaction.h>
       
    25 #include <hblabel.h>
       
    26 #include <hbicon.h>
       
    27 #include <hbmessagebox.h>
       
    28 #include <hbprogressdialog.h>
       
    29 #include <hbpushbutton.h>
       
    30 #include <hbabstractbutton.h>
       
    31 #include <hbaction.h>
       
    32 #include <hbframedrawer.h>
       
    33 
       
    34 #include <hbtoolbar.h>
       
    35 #include <hbview.h>
       
    36 #include <hbdocumentloader.h>
       
    37 #include <hbtransparentwindow.h>
       
    38 #include <hbgesture.h>
       
    39 #include <hbgesturefilter.h>
       
    40 #include <hbeffect.h>
       
    41 #include <hblineedit.h>
       
    42 #include <QCoreApplication>
       
    43 #include <QGesture>
       
    44 #include <QWidget.h>
       
    45 #include <hbtapgesture.h>
       
    46 
       
    47 // Helper Class
       
    48 #include "hbstub_helper.h"
       
    49 
       
    50 // LC UI
       
    51 #include "lcuidefs.h"
       
    52 
       
    53 
       
    54 
       
    55 // Static data that simulates HbInstance and HbMainWindow
       
    56 static HbInstance* hbInstanceSingleton = 0;
       
    57 
       
    58 // Static data for hbeffects
       
    59 bool HbEffect::mRunning;
       
    60     
       
    61 // No Gesture default state.    
       
    62 Qt::GestureState testState = Qt::NoGesture;
       
    63 
       
    64 HbTapGesture::TapStyleHint testStyleHint = HbTapGesture::Tap;
       
    65 
       
    66 // Title Bar and Status Bar Flags
       
    67 bool titlebarVisible = true;
       
    68 bool statusBarVisible = true;
       
    69 
       
    70 // -----------------------------------------------------------------------------
       
    71 // QCoreApplication::quit
       
    72 // -----------------------------------------------------------------------------
       
    73 // 
       
    74 void QCoreApplication::quit()
       
    75 {
       
    76 }
       
    77 
       
    78 // -----------------------------------------------------------------------------
       
    79 // QCoreApplication::exit
       
    80 // -----------------------------------------------------------------------------
       
    81 //
       
    82 void QCoreApplication::exit(int /*retcode*/)
       
    83 {
       
    84 }
       
    85 
       
    86 
       
    87 // HbInstance
       
    88 
       
    89 // -----------------------------------------------------------------------------
       
    90 // HbInstance::instance
       
    91 // -----------------------------------------------------------------------------
       
    92 //
       
    93 HbInstance* HbInstance::instance()
       
    94 {
       
    95 	if (!hbInstanceSingleton)
       
    96 		hbInstanceSingleton = new HbInstance;
       
    97 	return hbInstanceSingleton;
       
    98 }
       
    99 
       
   100 // -----------------------------------------------------------------------------
       
   101 // HbInstance::allMainWindows
       
   102 // -----------------------------------------------------------------------------
       
   103 //
       
   104 QList<HbMainWindow *> HbInstance::allMainWindows() const
       
   105 {
       
   106     return mAllMainWindows;
       
   107 }
       
   108 
       
   109 
       
   110 // -----------------------------------------------------------------------------
       
   111 // HbInstance::HbInstance
       
   112 // -----------------------------------------------------------------------------
       
   113 //
       
   114 HbInstance::HbInstance()
       
   115 {
       
   116     HbMainWindow *mainWindow = new HbMainWindow;
       
   117     mAllMainWindows.append(mainWindow);
       
   118     mScene = new QGraphicsScene;
       
   119 }
       
   120 
       
   121 // -----------------------------------------------------------------------------
       
   122 // HbInstance::~HbInstance
       
   123 // -----------------------------------------------------------------------------
       
   124 //
       
   125 HbInstance::~HbInstance()
       
   126 {
       
   127     mAllMainWindows.clear();
       
   128     delete mScene;
       
   129 }
       
   130 
       
   131 // -----------------------------------------------------------------------------
       
   132 // HbInstance::HbInstance
       
   133 // -----------------------------------------------------------------------------
       
   134 //
       
   135 Qt::Orientation HbInstance::orientation() const
       
   136 {
       
   137     return mOrientation;
       
   138 }
       
   139 
       
   140 // -----------------------------------------------------------------------------
       
   141 // HbInstance::HbInstance
       
   142 // -----------------------------------------------------------------------------
       
   143 //
       
   144 void HbInstance::setOrientation(Qt::Orientation orientation)
       
   145 {
       
   146     mOrientation = orientation;
       
   147 }
       
   148 
       
   149 // -----------------------------------------------------------------------------
       
   150 // HbInstance::HbInstance
       
   151 // -----------------------------------------------------------------------------
       
   152 //
       
   153 QGraphicsScene* HbInstance::scene() const
       
   154 {
       
   155     return mScene;
       
   156 }
       
   157 
       
   158 // HbMainWindow
       
   159 
       
   160 // -----------------------------------------------------------------------------
       
   161 // HbMainWindow::HbMainWindow
       
   162 // -----------------------------------------------------------------------------
       
   163 //
       
   164 HbMainWindow::HbMainWindow(QWidget *parent,Hb::WindowFlags windowFlags)
       
   165 : QGraphicsView(parent), mCurrentView(0), mViewCount(0)
       
   166 {
       
   167     Q_UNUSED(windowFlags)
       
   168 }
       
   169 
       
   170 // -----------------------------------------------------------------------------
       
   171 // HbMainWindow::~HbMainWindow
       
   172 // -----------------------------------------------------------------------------
       
   173 //
       
   174 HbMainWindow::~HbMainWindow()
       
   175 {
       
   176 }
       
   177 
       
   178 // -----------------------------------------------------------------------------
       
   179 // HbMainWindow::addView
       
   180 // -----------------------------------------------------------------------------
       
   181 //
       
   182 HbView* HbMainWindow::addView(QGraphicsWidget *widget)
       
   183 {
       
   184     Q_UNUSED(widget)
       
   185     mTestViews.append(static_cast<HbView*>( widget ) );
       
   186     return 0;
       
   187 }
       
   188 
       
   189 // -----------------------------------------------------------------------------
       
   190 // HbMainWindow::removeView
       
   191 // -----------------------------------------------------------------------------
       
   192 //
       
   193 QGraphicsWidget* HbMainWindow::removeView(int index)
       
   194 {
       
   195     Q_UNUSED(index)
       
   196     if ( index >= 0 && index < mTestViews.count() ){
       
   197         return mTestViews.takeAt(index);
       
   198     }
       
   199     return mCurrentView;
       
   200 }
       
   201 
       
   202 // -----------------------------------------------------------------------------
       
   203 // HbMainWindow::removeView
       
   204 // -----------------------------------------------------------------------------
       
   205 //
       
   206 void HbMainWindow::removeView(QGraphicsWidget *widget)
       
   207 {
       
   208     for(int i = 0; i < mTestViews.count(); i++ ){
       
   209         if ( mTestViews.at(i) == widget ){
       
   210             mTestViews.takeAt(i);
       
   211         }
       
   212     }
       
   213 }
       
   214 
       
   215 // -----------------------------------------------------------------------------
       
   216 // HbMainWindow::currentView
       
   217 // -----------------------------------------------------------------------------
       
   218 //
       
   219 HbView* HbMainWindow::currentView() const
       
   220 {
       
   221     return mCurrentView;
       
   222 }
       
   223 
       
   224 // -----------------------------------------------------------------------------
       
   225 // HbMainWindow::setCurrentView
       
   226 // -----------------------------------------------------------------------------
       
   227 //
       
   228 void HbMainWindow::setCurrentView(HbView *view, bool animate)
       
   229 {
       
   230 	mCurrentView = view;
       
   231     Q_UNUSED(animate)
       
   232 }
       
   233 
       
   234 // -----------------------------------------------------------------------------
       
   235 // HbMainWindow::viewCount
       
   236 // -----------------------------------------------------------------------------
       
   237 //
       
   238 int HbMainWindow::viewCount() const
       
   239 {
       
   240     return mTestViews.count();
       
   241 }
       
   242 
       
   243 // -----------------------------------------------------------------------------
       
   244 // HbMainWindow::viewCount
       
   245 // -----------------------------------------------------------------------------
       
   246 //
       
   247 void HbMainWindow::setOrientation(Qt::Orientation orientation, bool animate)
       
   248 {
       
   249     Q_UNUSED(animate);
       
   250     mOrientation = orientation;
       
   251 }
       
   252 
       
   253 // -----------------------------------------------------------------------------
       
   254 // HbMainWindow::viewCount
       
   255 // -----------------------------------------------------------------------------
       
   256 //
       
   257 Qt::Orientation HbMainWindow::orientation() const
       
   258 {
       
   259     return mOrientation;
       
   260 }
       
   261 
       
   262 // -----------------------------------------------------------------------------
       
   263 // HbMainWindow::views
       
   264 // -----------------------------------------------------------------------------
       
   265 //
       
   266 QList<HbView *> HbMainWindow::views() const
       
   267 {
       
   268     return mTestViews;
       
   269 }
       
   270 
       
   271 // -----------------------------------------------------------------------------
       
   272 // HbMainWindow::sceneRect
       
   273 // -----------------------------------------------------------------------------
       
   274 //
       
   275 QRectF HbMainWindow::sceneRect() const
       
   276 {
       
   277     return QRectF( 0, 0, 360, 640 );
       
   278 }
       
   279 
       
   280 // -----------------------------------------------------------------------------
       
   281 // HbMainWindow::windowSurface
       
   282 // -----------------------------------------------------------------------------
       
   283 //
       
   284 QWindowSurface* HbMainWindow::windowSurface() const
       
   285 {
       
   286     return mSurface;
       
   287 }
       
   288 
       
   289 
       
   290 
       
   291 
       
   292 // HbWidget
       
   293 
       
   294 // -----------------------------------------------------------------------------
       
   295 // HbWidget::HbWidget
       
   296 // -----------------------------------------------------------------------------
       
   297 //
       
   298 HbWidget::HbWidget(QGraphicsItem *parent, Qt::WindowFlags wFlags)
       
   299 : QGraphicsWidget(parent,wFlags)
       
   300 {
       
   301     
       
   302 }
       
   303 
       
   304 // -----------------------------------------------------------------------------
       
   305 // HbWidget::~HbWidget
       
   306 // -----------------------------------------------------------------------------
       
   307 //
       
   308 HbWidget::~HbWidget()
       
   309 {
       
   310     
       
   311 }
       
   312 
       
   313 // -----------------------------------------------------------------------------
       
   314 // HbWidget::clearActions
       
   315 // -----------------------------------------------------------------------------
       
   316 //
       
   317 void HbWidget::clearActions()
       
   318 {
       
   319 }
       
   320 
       
   321 // -----------------------------------------------------------------------------
       
   322 // HbWidget::itemChange
       
   323 // -----------------------------------------------------------------------------
       
   324 //
       
   325 QVariant HbWidget::itemChange(GraphicsItemChange change, const QVariant& value)
       
   326 {
       
   327     Q_UNUSED(change)
       
   328     return QVariant(value);
       
   329 }
       
   330 
       
   331 // -----------------------------------------------------------------------------
       
   332 // HbWidget::mainWindow
       
   333 // -----------------------------------------------------------------------------
       
   334 //
       
   335 HbMainWindow* HbWidget::mainWindow() const
       
   336 {   
       
   337    
       
   338 }
       
   339 
       
   340 // HbDialog
       
   341 
       
   342 // -----------------------------------------------------------------------------
       
   343 // HbDialog::HbDialog
       
   344 // -----------------------------------------------------------------------------
       
   345 //
       
   346 HbDialog::HbDialog(QGraphicsItem *parent) : HbWidget(parent)
       
   347 {
       
   348 	resize(10,10); // Just some values for height and width
       
   349     mDismissPolicy = NoDismiss;
       
   350     mUnfadedItems = Hb::NoItem;
       
   351 }
       
   352 
       
   353 // -----------------------------------------------------------------------------
       
   354 // HbDialog::~HbDialog
       
   355 // -----------------------------------------------------------------------------
       
   356 //
       
   357 HbDialog::~HbDialog()
       
   358 {
       
   359 }
       
   360 
       
   361 // -----------------------------------------------------------------------------
       
   362 // HbDialog::timeout
       
   363 // -----------------------------------------------------------------------------
       
   364 //
       
   365 int HbDialog::timeout() const
       
   366 {
       
   367     return mTimeout;
       
   368 }
       
   369 
       
   370 // -----------------------------------------------------------------------------
       
   371 // HbDialog::setTimeout
       
   372 // -----------------------------------------------------------------------------
       
   373 //
       
   374 void HbDialog::setTimeout(int timeout)
       
   375 {
       
   376     mTimeout = timeout;
       
   377 }
       
   378 
       
   379 // -----------------------------------------------------------------------------
       
   380 // HbDialog::setTimeout
       
   381 // -----------------------------------------------------------------------------
       
   382 //
       
   383 void HbDialog::setTimeout(HbDialog::DefaultTimeout timeout)
       
   384 {
       
   385     // Timeout Values from the current implementation of orbit.
       
   386     switch (timeout)
       
   387         {
       
   388         case HbDialog::NoTimeout:
       
   389         mTimeout = 0;
       
   390         break;
       
   391         case HbDialog::ConfirmationNoteTimeout:
       
   392         mTimeout = 1500;
       
   393         break;
       
   394         case HbDialog::StandardTimeout:
       
   395         mTimeout = 3000;
       
   396         break;
       
   397         case HbDialog::ContextMenuTimeout:
       
   398         mTimeout = 6000;
       
   399         break;
       
   400         }
       
   401 }
       
   402 
       
   403 // -----------------------------------------------------------------------------
       
   404 // HbDialog::setHeadingWidget
       
   405 // -----------------------------------------------------------------------------
       
   406 //
       
   407 void HbDialog::setHeadingWidget(QGraphicsWidget *headingWidget)
       
   408 {
       
   409     Q_UNUSED(headingWidget)    
       
   410 }
       
   411 
       
   412 // -----------------------------------------------------------------------------
       
   413 // HbDialog::setContentWidget
       
   414 // -----------------------------------------------------------------------------
       
   415 //
       
   416 void HbDialog::setContentWidget(QGraphicsWidget *contentWidget)
       
   417 {
       
   418     Q_UNUSED(contentWidget)    
       
   419 }
       
   420 
       
   421 // -----------------------------------------------------------------------------
       
   422 // HbDialog::unfadedItems
       
   423 // -----------------------------------------------------------------------------
       
   424 //
       
   425 Hb::SceneItems HbDialog::unfadedItems() const
       
   426 {
       
   427     return mUnfadedItems;
       
   428 }
       
   429 
       
   430 // -----------------------------------------------------------------------------
       
   431 // HbDialog::setUnfadedItems
       
   432 // -----------------------------------------------------------------------------
       
   433 //
       
   434 void HbDialog::setUnfadedItems(Hb::SceneItems unfadedItems)
       
   435 {
       
   436 	mUnfadedItems = unfadedItems;
       
   437 }
       
   438 
       
   439 // -----------------------------------------------------------------------------
       
   440 // HbDialog::dismissPolicy
       
   441 // -----------------------------------------------------------------------------
       
   442 //
       
   443 HbDialog::DismissPolicy HbDialog::dismissPolicy() const
       
   444 {
       
   445     return mDismissPolicy;
       
   446 }
       
   447 
       
   448 // -----------------------------------------------------------------------------
       
   449 // HbDialog::setDismissPolicy
       
   450 // -----------------------------------------------------------------------------
       
   451 //
       
   452 void HbDialog::setDismissPolicy(HbDialog::DismissPolicy dismissPolicy)
       
   453 {
       
   454     mDismissPolicy = dismissPolicy;
       
   455 }
       
   456 
       
   457 // -----------------------------------------------------------------------------
       
   458 // HbDialog::itemChange
       
   459 // -----------------------------------------------------------------------------
       
   460 //
       
   461 QVariant HbDialog::itemChange(GraphicsItemChange change, const QVariant& value)
       
   462 {
       
   463     Q_UNUSED(change)
       
   464     return QVariant(value);
       
   465 }
       
   466 
       
   467 
       
   468 // HbMenu
       
   469 
       
   470 // -----------------------------------------------------------------------------
       
   471 // HbMenu::HbMenu
       
   472 // -----------------------------------------------------------------------------
       
   473 //
       
   474 HbMenu::HbMenu(QGraphicsItem *parent) : HbDialog(parent)
       
   475 {
       
   476     mIsEmpty = true;
       
   477 }
       
   478 
       
   479 // -----------------------------------------------------------------------------
       
   480 // HbMenu::~HbMenu
       
   481 // -----------------------------------------------------------------------------
       
   482 //
       
   483 HbMenu::~HbMenu()
       
   484 {
       
   485 }
       
   486 
       
   487 // -----------------------------------------------------------------------------
       
   488 // HbMenu::open
       
   489 // -----------------------------------------------------------------------------
       
   490 //
       
   491 void HbMenu::open(QObject* receiver, const char* member)
       
   492 {
       
   493     Q_UNUSED(receiver);
       
   494     Q_UNUSED(member);
       
   495 }
       
   496 
       
   497 // -----------------------------------------------------------------------------
       
   498 // HbMenu::addAction
       
   499 // -----------------------------------------------------------------------------
       
   500 //
       
   501 HbAction* HbMenu::addAction(const QString &text)
       
   502 {
       
   503     Q_UNUSED(text)
       
   504     mIsEmpty = false;
       
   505     return 0;
       
   506 }
       
   507 
       
   508 // -----------------------------------------------------------------------------
       
   509 // HbMenu::isEmpty
       
   510 // -----------------------------------------------------------------------------
       
   511 //
       
   512 bool HbMenu::isEmpty() const
       
   513 {
       
   514 	return mIsEmpty;
       
   515 }
       
   516 
       
   517 
       
   518 // HbAction
       
   519 
       
   520 // -----------------------------------------------------------------------------
       
   521 // HbAction::HbAction
       
   522 // -----------------------------------------------------------------------------
       
   523 //
       
   524 HbAction::HbAction(QObject *parent) 
       
   525 : QAction(parent), mIcon(QString())
       
   526 {
       
   527 }
       
   528 
       
   529 // -----------------------------------------------------------------------------
       
   530 // HbAction::HbAction
       
   531 // -----------------------------------------------------------------------------
       
   532 //
       
   533 HbAction::HbAction(const QString &text, QObject *parent) 
       
   534 : QAction(text,parent), mIcon(QString())
       
   535 {    
       
   536 }
       
   537 
       
   538 // -----------------------------------------------------------------------------
       
   539 // HbAction::~HbAction
       
   540 // -----------------------------------------------------------------------------
       
   541 //
       
   542 HbAction::~HbAction()
       
   543 {
       
   544 }
       
   545 
       
   546 // -----------------------------------------------------------------------------
       
   547 // HbAction::setIcon
       
   548 // -----------------------------------------------------------------------------
       
   549 //
       
   550 void HbAction::setIcon(const HbIcon &icon) 
       
   551 {
       
   552     mIcon = icon;
       
   553 }
       
   554 
       
   555 // -----------------------------------------------------------------------------
       
   556 // HbAction::icon
       
   557 // -----------------------------------------------------------------------------
       
   558 //
       
   559 HbIcon HbAction::icon() const
       
   560 {
       
   561     return mIcon;
       
   562 }
       
   563 
       
   564 // -----------------------------------------------------------------------------
       
   565 // HbAction::HbAction
       
   566 // -----------------------------------------------------------------------------
       
   567 //
       
   568 HbAction::HbAction(Hb::NavigationAction action, QObject* parent)
       
   569     : QAction ( parent ),mIcon(QString())
       
   570 {
       
   571     Q_UNUSED(action);
       
   572 }
       
   573 
       
   574 // HbLabel
       
   575 
       
   576 // -----------------------------------------------------------------------------
       
   577 // HbLabel::HbLabel
       
   578 // -----------------------------------------------------------------------------
       
   579 //
       
   580 HbLabel::HbLabel(QGraphicsItem *parent) : HbWidget(parent)
       
   581 {
       
   582 }
       
   583 
       
   584 // -----------------------------------------------------------------------------
       
   585 // HbLabel::HbLabel
       
   586 // -----------------------------------------------------------------------------
       
   587 //
       
   588 HbLabel::HbLabel(const QString &displayText, QGraphicsItem *parent) 
       
   589 : HbWidget(parent)
       
   590 {
       
   591     Q_UNUSED(displayText)
       
   592 }
       
   593 
       
   594 // -----------------------------------------------------------------------------
       
   595 // HbLabel::~HbLabel
       
   596 // -----------------------------------------------------------------------------
       
   597 //
       
   598 HbLabel::~HbLabel()
       
   599 {
       
   600 }
       
   601 
       
   602 // -----------------------------------------------------------------------------
       
   603 // HbLabel::setGeometry
       
   604 // -----------------------------------------------------------------------------
       
   605 //
       
   606 void HbLabel::setGeometry(const QRectF &rect)
       
   607 {
       
   608     Q_UNUSED(rect)
       
   609 }
       
   610 
       
   611 // -----------------------------------------------------------------------------
       
   612 // HbLabel::clear
       
   613 // -----------------------------------------------------------------------------
       
   614 //
       
   615 void HbLabel::clear()
       
   616 {
       
   617 }
       
   618 
       
   619 // -----------------------------------------------------------------------------
       
   620 // HbLabel::setPlainText
       
   621 // -----------------------------------------------------------------------------
       
   622 //
       
   623 void HbLabel::setPlainText(const QString &text)
       
   624 {
       
   625     Q_UNUSED(text)
       
   626 }
       
   627 
       
   628 // -----------------------------------------------------------------------------
       
   629 // HbLabel::setText
       
   630 // -----------------------------------------------------------------------------
       
   631 //
       
   632 void HbLabel::setIcon(const HbIcon &icon)
       
   633 {
       
   634     Q_UNUSED(icon)
       
   635 }
       
   636 
       
   637 
       
   638 // HbIcon
       
   639 
       
   640 // -----------------------------------------------------------------------------
       
   641 // HbIcon::HbIcon
       
   642 // -----------------------------------------------------------------------------
       
   643 //
       
   644 HbIcon::HbIcon(const QString &iconName)
       
   645 {
       
   646     mName = iconName;
       
   647 }
       
   648 
       
   649 // -----------------------------------------------------------------------------
       
   650 // HbIcon::~HbIcon
       
   651 // -----------------------------------------------------------------------------
       
   652 //
       
   653 HbIcon::~HbIcon()
       
   654 {
       
   655 }
       
   656 
       
   657 // -----------------------------------------------------------------------------
       
   658 // HbIcon::operator==
       
   659 // -----------------------------------------------------------------------------
       
   660 //
       
   661 bool HbIcon::operator==(const HbIcon &other) const
       
   662 {
       
   663 	return (other.mName == mName);
       
   664 }
       
   665 
       
   666 
       
   667 // HbProgressDialog
       
   668 
       
   669 // -----------------------------------------------------------------------------
       
   670 // HbProgressDialog::HbProgressDialog
       
   671 // -----------------------------------------------------------------------------
       
   672 //
       
   673 HbProgressDialog::HbProgressDialog(QGraphicsItem *parent) : HbDialog(parent)
       
   674 {
       
   675 }
       
   676 
       
   677 // -----------------------------------------------------------------------------
       
   678 // HbProgressDialog::itemChange
       
   679 // -----------------------------------------------------------------------------
       
   680 //
       
   681 QVariant HbProgressDialog::itemChange(GraphicsItemChange change, const QVariant& value)
       
   682 {
       
   683     Q_UNUSED(change)
       
   684     return QVariant(value);
       
   685 }
       
   686 
       
   687 // -----------------------------------------------------------------------------
       
   688 // HbProgressDialog::setText
       
   689 // -----------------------------------------------------------------------------
       
   690 //
       
   691 void HbProgressDialog::setText(const QString &text)
       
   692 {
       
   693     Q_UNUSED(text)
       
   694 }
       
   695 
       
   696 // -----------------------------------------------------------------------------
       
   697 // HbToolBar::HbToolBar
       
   698 // -----------------------------------------------------------------------------
       
   699 //
       
   700 HbToolBar::HbToolBar(QGraphicsItem *parent) : HbWidget(parent)
       
   701 {
       
   702 }
       
   703 
       
   704 // -----------------------------------------------------------------------------
       
   705 // HbToolBar::~HbToolBar
       
   706 // -----------------------------------------------------------------------------
       
   707 //
       
   708 HbToolBar::~HbToolBar()
       
   709 {
       
   710 }
       
   711 
       
   712 
       
   713 // HbView
       
   714 
       
   715 // -----------------------------------------------------------------------------
       
   716 // HbView::HbView
       
   717 // -----------------------------------------------------------------------------
       
   718 //
       
   719 HbView::HbView(QGraphicsItem *parent) : HbWidget(parent)
       
   720 {
       
   721     mMenu = new HbMenu(this);
       
   722     mToolBar = new HbToolBar(this);
       
   723     mDockWidgetVisible = true;
       
   724 }
       
   725 
       
   726 // -----------------------------------------------------------------------------
       
   727 // HbView::~HbView
       
   728 // -----------------------------------------------------------------------------
       
   729 //
       
   730 HbView::~HbView()
       
   731 {
       
   732 }
       
   733 
       
   734 // -----------------------------------------------------------------------------
       
   735 // HbView::menu
       
   736 // -----------------------------------------------------------------------------
       
   737 //
       
   738 HbMenu* HbView::menu() const
       
   739 {
       
   740     return mMenu;
       
   741 }
       
   742 
       
   743 // -----------------------------------------------------------------------------
       
   744 // HbView::toolBar
       
   745 // -----------------------------------------------------------------------------
       
   746 //
       
   747 HbToolBar* HbView::toolBar() const
       
   748 {
       
   749     return mToolBar;
       
   750 }
       
   751 
       
   752 // -----------------------------------------------------------------------------
       
   753 // HbView::setTitle
       
   754 // -----------------------------------------------------------------------------
       
   755 //
       
   756 void HbView::setTitle(const QString &title)
       
   757 {
       
   758     Q_UNUSED(title)
       
   759 }
       
   760 
       
   761 // -----------------------------------------------------------------------------
       
   762 // HbView::showItems
       
   763 // -----------------------------------------------------------------------------
       
   764 //
       
   765 void HbView::showItems(Hb::SceneItems items)
       
   766 {
       
   767     if ( items == Hb::DockWidgetItem ) {
       
   768         mDockWidgetVisible = true;
       
   769     } 
       
   770 }
       
   771 
       
   772 // -----------------------------------------------------------------------------
       
   773 // HbView::hideItems
       
   774 // -----------------------------------------------------------------------------
       
   775 //
       
   776 void HbView::hideItems(Hb::SceneItems items)
       
   777 {
       
   778     if ( items == Hb::DockWidgetItem ) {
       
   779         mDockWidgetVisible = false;
       
   780     }
       
   781 }
       
   782 
       
   783 
       
   784 // -----------------------------------------------------------------------------
       
   785 // HbView::isItemVisible
       
   786 // -----------------------------------------------------------------------------
       
   787 //
       
   788 bool HbView::isItemVisible(Hb::SceneItem items)  const
       
   789 {
       
   790     if ( items == Hb::DockWidgetItem ) {
       
   791         return mDockWidgetVisible;
       
   792     }
       
   793     return false;
       
   794 }
       
   795 
       
   796 // -----------------------------------------------------------------------------
       
   797 // HbView::setTitleBarVisible
       
   798 // -----------------------------------------------------------------------------
       
   799 //
       
   800 void HbView::setTitleBarVisible(bool visible)
       
   801 {
       
   802     titlebarVisible = visible;
       
   803 }
       
   804 
       
   805 
       
   806 // -----------------------------------------------------------------------------
       
   807 // HbView::setStatusBarVisible
       
   808 // -----------------------------------------------------------------------------
       
   809 //
       
   810 void HbView::setStatusBarVisible(bool visible)
       
   811 {
       
   812     statusBarVisible = visible;
       
   813 }
       
   814 
       
   815 
       
   816 // -----------------------------------------------------------------------------
       
   817 // HbView::setContentFullScreen
       
   818 // -----------------------------------------------------------------------------
       
   819 //
       
   820 void HbView::setContentFullScreen(bool /*enable*/)
       
   821 {
       
   822 }
       
   823 
       
   824 // -----------------------------------------------------------------------------
       
   825 // HbView::navigationAction
       
   826 // -----------------------------------------------------------------------------
       
   827 //
       
   828 HbAction *HbView::navigationAction() const
       
   829 {
       
   830     return 0;
       
   831 }
       
   832 
       
   833 // -----------------------------------------------------------------------------
       
   834 // HbView::setNavigationAction
       
   835 // -----------------------------------------------------------------------------
       
   836 //
       
   837 void HbView::setNavigationAction(HbAction *action)
       
   838 {
       
   839     Q_UNUSED(action);
       
   840 }
       
   841 
       
   842 // HbDocumentLoader
       
   843 
       
   844 // -----------------------------------------------------------------------------
       
   845 // HbDocumentLoader::HbDocumentLoader
       
   846 // -----------------------------------------------------------------------------
       
   847 //
       
   848 HbDocumentLoader::HbDocumentLoader()
       
   849 {
       
   850     mLabel = new HbLabel;
       
   851     mAction = new HbAction;
       
   852     mReturnSendVideo = true;
       
   853     mPushButton = new HbPushButton();
       
   854     
       
   855 }
       
   856 
       
   857 // -----------------------------------------------------------------------------
       
   858 // HbDocumentLoader::~HbDocumentLoader
       
   859 // -----------------------------------------------------------------------------
       
   860 //
       
   861 HbDocumentLoader::~HbDocumentLoader()
       
   862 {
       
   863     delete mAction;
       
   864     delete mLabel;
       
   865     delete mPushButton;
       
   866 }
       
   867 
       
   868 // -----------------------------------------------------------------------------
       
   869 // HbDocumentLoader::load
       
   870 // -----------------------------------------------------------------------------
       
   871 //
       
   872 QObjectList HbDocumentLoader::load( const QString &fileName, 
       
   873         const QString &section , bool *ok )
       
   874 {
       
   875     Q_UNUSED(fileName)
       
   876     if ( section == lcLayoutLandscapeDefaultId ||
       
   877          section == lcLayoutLandscapeSwappedId ||
       
   878          section == lcLayoutFullscreenId ||
       
   879          section == lcLayoutLandscapeDialpadId ) {
       
   880         mLayoutSection = section;
       
   881         *ok = true;
       
   882     } else {
       
   883         *ok = false;
       
   884     }
       
   885     return QObjectList();  
       
   886 }
       
   887 
       
   888 // -----------------------------------------------------------------------------
       
   889 // HbDocumentLoader::load
       
   890 // -----------------------------------------------------------------------------
       
   891 //
       
   892 QObjectList HbDocumentLoader::load(const QString &fileName, bool *ok)
       
   893 {
       
   894 	*ok = true;
       
   895     Q_UNUSED(fileName)
       
   896     return QObjectList();
       
   897 }
       
   898 
       
   899 // -----------------------------------------------------------------------------
       
   900 // HbDocumentLoader::findWidget
       
   901 // -----------------------------------------------------------------------------
       
   902 //
       
   903 QGraphicsWidget* HbDocumentLoader::findWidget(const QString &name)
       
   904 {
       
   905         if ( !mReturnSendVideo && name == lcWidgetSendVideoId ) {
       
   906             return 0;
       
   907         }
       
   908 	foreach(QGraphicsWidget* widget, mWidgets) {
       
   909 		if (widget->objectName() == name)
       
   910 			return widget;
       
   911 	}
       
   912 	if (name == lcLabelRecipientId ||
       
   913 	    name == lcLabelDurationId ||
       
   914 	    name == lcIconContactId ||	    
       
   915 	    name == lcWidgetSendVideoId2 ||
       
   916 	    name == lcWidgetRecvVideoId2 ) {
       
   917 		return mLabel;
       
   918 	}
       
   919 	QString dummy = "";
       
   920 	QGraphicsWidget* createdWidget = 
       
   921 		static_cast<QGraphicsWidget*>(createObject(dummy,name));
       
   922     if (createdWidget) {
       
   923         createdWidget->setPos(QPointF(10,20));
       
   924         mWidgets.append(createdWidget);
       
   925     }
       
   926     return createdWidget;
       
   927 }
       
   928 
       
   929 // -----------------------------------------------------------------------------
       
   930 // HbDocumentLoader::findObject
       
   931 // -----------------------------------------------------------------------------
       
   932 //
       
   933 QObject* HbDocumentLoader::findObject(const QString &name) const
       
   934 {
       
   935 	if (name == lcActMuteId ||
       
   936 	    name == lcActSpeakerId ) {
       
   937 		return mAction;
       
   938 	}
       
   939 	if( name == lcButtonEndCall ){
       
   940         return mPushButton;
       
   941 	}
       
   942         foreach(HbAction* action, mActions) {
       
   943                 if (action->objectName() == name)
       
   944                         return action;
       
   945         }
       
   946 
       
   947     return 0;
       
   948 }
       
   949 
       
   950 // -----------------------------------------------------------------------------
       
   951 // HbDocumentLoader::setObjectTree
       
   952 // -----------------------------------------------------------------------------
       
   953 //
       
   954 bool HbDocumentLoader::setObjectTree( QObjectList roots )
       
   955 {
       
   956     Q_UNUSED(roots)
       
   957     return true;
       
   958 }
       
   959 
       
   960 // -----------------------------------------------------------------------------
       
   961 // HbDocumentLoader::reset
       
   962 // -----------------------------------------------------------------------------
       
   963 //
       
   964 void HbDocumentLoader::reset()
       
   965 {
       
   966 }
       
   967 
       
   968 // -----------------------------------------------------------------------------
       
   969 // HbDocumentLoader::createObject
       
   970 // -----------------------------------------------------------------------------
       
   971 //
       
   972 QObject* HbDocumentLoader::createObject(
       
   973     const QString& type, 
       
   974     const QString& name)
       
   975 {
       
   976     Q_UNUSED(type)
       
   977     Q_UNUSED(name)
       
   978     return 0;
       
   979 }
       
   980 
       
   981 
       
   982 // HbTransparentWindow
       
   983 
       
   984 // -----------------------------------------------------------------------------
       
   985 // HbTransparentWindow::HbTransparentWindow
       
   986 // -----------------------------------------------------------------------------
       
   987 //
       
   988 HbTransparentWindow::HbTransparentWindow(QGraphicsItem *parent)
       
   989 {
       
   990     Q_UNUSED(parent)
       
   991 }
       
   992 
       
   993 // -----------------------------------------------------------------------------
       
   994 // HbTransparentWindow::~HbTransparentWindow
       
   995 // -----------------------------------------------------------------------------
       
   996 //
       
   997 HbTransparentWindow::~HbTransparentWindow()
       
   998 {
       
   999 }
       
  1000 
       
  1001 // -----------------------------------------------------------------------------
       
  1002 // HbGesture::HbGesture
       
  1003 // -----------------------------------------------------------------------------
       
  1004 //
       
  1005 HbGesture::HbGesture( Direction direction, int minDistance, QObject *parent )
       
  1006     : QObject(parent)
       
  1007 {
       
  1008     Q_UNUSED(direction)
       
  1009     Q_UNUSED(minDistance)
       
  1010 }
       
  1011 
       
  1012 // -----------------------------------------------------------------------------
       
  1013 // HbGesture::~HbGesture
       
  1014 // -----------------------------------------------------------------------------
       
  1015 //
       
  1016 HbGesture::~HbGesture()
       
  1017 {
       
  1018 }
       
  1019 
       
  1020 // -----------------------------------------------------------------------------
       
  1021 // HbGesturSeceneFilter::HbGestureSceneFilter
       
  1022 // -----------------------------------------------------------------------------
       
  1023 //
       
  1024 HbGestureSceneFilter::HbGestureSceneFilter( Qt::MouseButton button, QGraphicsItem *parent ) 
       
  1025     : HbWidget(parent)
       
  1026 {
       
  1027     Q_UNUSED(button)
       
  1028 }
       
  1029 
       
  1030 // -----------------------------------------------------------------------------
       
  1031 // HbGestureSceneFilter::~HbGestureSceneFilter
       
  1032 // -----------------------------------------------------------------------------
       
  1033 //
       
  1034 HbGestureSceneFilter::~HbGestureSceneFilter()
       
  1035 {
       
  1036     qDeleteAll(gestures);
       
  1037     gestures.clear();
       
  1038 }
       
  1039 
       
  1040 // -----------------------------------------------------------------------------
       
  1041 // HbGestureSceneFilter::addGesture
       
  1042 // -----------------------------------------------------------------------------
       
  1043 //
       
  1044 void HbGestureSceneFilter::addGesture( HbGesture *gesture )
       
  1045 {
       
  1046     gestures.append(gesture);
       
  1047 }
       
  1048 
       
  1049 
       
  1050 // -----------------------------------------------------------------------------
       
  1051 // HbEffect::HbEffect
       
  1052 // -----------------------------------------------------------------------------
       
  1053 //
       
  1054 HbEffect::HbEffect(  )
       
  1055 {
       
  1056     mRunning = false;
       
  1057 }
       
  1058 
       
  1059 // -----------------------------------------------------------------------------
       
  1060 // HbEffect::start
       
  1061 // -----------------------------------------------------------------------------
       
  1062 //
       
  1063 bool HbEffect::start( QGraphicsItem *item, 
       
  1064                             const QString &itemType, 
       
  1065                             const QString &effectEvent,
       
  1066                             QObject *receiver,
       
  1067                             const char *member,
       
  1068                             const QVariant &userData )
       
  1069 {
       
  1070     Q_UNUSED(item)
       
  1071     Q_UNUSED(itemType)
       
  1072     Q_UNUSED(effectEvent)
       
  1073     Q_UNUSED(receiver)
       
  1074     Q_UNUSED(member)
       
  1075     Q_UNUSED(userData)
       
  1076     return true;
       
  1077 }
       
  1078 
       
  1079 // -----------------------------------------------------------------------------
       
  1080 // HbEffect::add
       
  1081 // -----------------------------------------------------------------------------
       
  1082 //
       
  1083 bool HbEffect::add( const QString &itemType, const QString &filePath, const QString &effectEvent )
       
  1084 {
       
  1085     Q_UNUSED(itemType)
       
  1086     Q_UNUSED(filePath)
       
  1087     Q_UNUSED(effectEvent)
       
  1088     return true;
       
  1089 }
       
  1090 
       
  1091 // -----------------------------------------------------------------------------
       
  1092 // HbEffect::effectRunning
       
  1093 // -----------------------------------------------------------------------------
       
  1094 //
       
  1095 bool HbEffect::effectRunning(QGraphicsItem *item, const QString &effectEvent )
       
  1096 {
       
  1097     Q_UNUSED(item)
       
  1098     Q_UNUSED(effectEvent)
       
  1099     return mRunning;
       
  1100 }
       
  1101 
       
  1102 
       
  1103 // -----------------------------------------------------------------------------
       
  1104 // HbPushButton::HbPushButton
       
  1105 // -----------------------------------------------------------------------------
       
  1106 //
       
  1107 HbPushButton::HbPushButton(QGraphicsItem *parent) : HbAbstractButton(parent)
       
  1108 {
       
  1109 }
       
  1110 
       
  1111 
       
  1112 // -----------------------------------------------------------------------------
       
  1113 // HbPushButton::HbPushButton
       
  1114 // -----------------------------------------------------------------------------
       
  1115 //
       
  1116 HbPushButton::HbPushButton(const QString &text, QGraphicsItem *parent)
       
  1117     : HbAbstractButton(parent)
       
  1118 {
       
  1119     Q_UNUSED(text)
       
  1120 }
       
  1121 
       
  1122 
       
  1123 
       
  1124 // -----------------------------------------------------------------------------
       
  1125 // HbPushButton::~HbPushButton
       
  1126 // -----------------------------------------------------------------------------
       
  1127 //
       
  1128 HbPushButton::~HbPushButton()
       
  1129 {
       
  1130 }
       
  1131 
       
  1132 // -----------------------------------------------------------------------------
       
  1133 // HbPushButton::setFrameBackground
       
  1134 // -----------------------------------------------------------------------------
       
  1135 //
       
  1136 void HbPushButton::setFrameBackground( HbFrameDrawer *backgroundFrameDrawer )
       
  1137 {
       
  1138     delete backgroundFrameDrawer;
       
  1139 }
       
  1140 
       
  1141 // -----------------------------------------------------------------------------
       
  1142 // HbAbstractButton::HbAbstractButton
       
  1143 // -----------------------------------------------------------------------------
       
  1144 //
       
  1145 HbAbstractButton::HbAbstractButton(QGraphicsItem *parent) : HbWidget(parent)
       
  1146 {
       
  1147 }
       
  1148 
       
  1149 // -----------------------------------------------------------------------------
       
  1150 // HbAbstractButton::~HbAbstractButton
       
  1151 // -----------------------------------------------------------------------------
       
  1152 //
       
  1153 HbAbstractButton::~HbAbstractButton()
       
  1154 {
       
  1155 }
       
  1156 
       
  1157 // -----------------------------------------------------------------------------
       
  1158 // HbFrameDrawer::HbFrameDrawer
       
  1159 // -----------------------------------------------------------------------------
       
  1160 //
       
  1161 HbFrameDrawer::HbFrameDrawer(const QString &frameGraphicsName, FrameType type, bool cacheFlag)
       
  1162 {
       
  1163     Q_UNUSED(frameGraphicsName);
       
  1164     Q_UNUSED(type);
       
  1165     Q_UNUSED(cacheFlag);
       
  1166 }
       
  1167 
       
  1168 // -----------------------------------------------------------------------------
       
  1169 // HbFrameDrawer::~HbFrameDrawer
       
  1170 // -----------------------------------------------------------------------------
       
  1171 //
       
  1172 HbFrameDrawer::~HbFrameDrawer()
       
  1173 {
       
  1174     
       
  1175 }
       
  1176 
       
  1177 // -----------------------------------------------------------------------------
       
  1178 // HbLineEdit::HbLineEdit
       
  1179 // -----------------------------------------------------------------------------
       
  1180 //
       
  1181 HbLineEdit::HbLineEdit(QGraphicsItem *parent)
       
  1182 {
       
  1183     Q_UNUSED(parent);
       
  1184 }
       
  1185 
       
  1186 // -----------------------------------------------------------------------------
       
  1187 // HbLineEdit::HbLineEdit
       
  1188 // -----------------------------------------------------------------------------
       
  1189 //
       
  1190 HbLineEdit::HbLineEdit(const QString &text, QGraphicsItem *parent)
       
  1191 {
       
  1192     Q_UNUSED(parent);
       
  1193     mText = text;
       
  1194 }
       
  1195 
       
  1196 // -----------------------------------------------------------------------------
       
  1197 // HbLineEdit::~HbLineEdit
       
  1198 // -----------------------------------------------------------------------------
       
  1199 //
       
  1200 HbLineEdit::~HbLineEdit()
       
  1201 {
       
  1202     
       
  1203 }
       
  1204 
       
  1205 // -----------------------------------------------------------------------------
       
  1206 // HbLineEdit::setText
       
  1207 // -----------------------------------------------------------------------------
       
  1208 //
       
  1209 void HbLineEdit::setText(const QString &text)
       
  1210 {
       
  1211     mText = text;
       
  1212 }
       
  1213 
       
  1214 // -----------------------------------------------------------------------------
       
  1215 // HbLineEdit::text
       
  1216 // -----------------------------------------------------------------------------
       
  1217 //
       
  1218 QString HbLineEdit::text() const
       
  1219 {
       
  1220     return mText;
       
  1221 }
       
  1222 
       
  1223 // -----------------------------------------------------------------------------
       
  1224 // QGesture
       
  1225 // -----------------------------------------------------------------------------
       
  1226 //
       
  1227 
       
  1228 Qt::GestureState QGesture::state() const
       
  1229 {
       
  1230     return testState;
       
  1231 }
       
  1232 
       
  1233 
       
  1234 // -----------------------------------------------------------------------------
       
  1235 // HbTapGesture::HbTapGesture
       
  1236 // -----------------------------------------------------------------------------
       
  1237 //
       
  1238 
       
  1239 HbTapGesture::HbTapGesture(QObject *paren) 
       
  1240 {
       
  1241     Q_UNUSED(paren);
       
  1242 }
       
  1243 
       
  1244 
       
  1245 // -----------------------------------------------------------------------------
       
  1246 // HbTapGesture::~HbTapGesture
       
  1247 // -----------------------------------------------------------------------------
       
  1248 //
       
  1249 
       
  1250 HbTapGesture::~HbTapGesture()
       
  1251 {
       
  1252 }
       
  1253 
       
  1254 
       
  1255 // -----------------------------------------------------------------------------
       
  1256 // 
       
  1257 // -----------------------------------------------------------------------------
       
  1258 //
       
  1259 HbTapGesture::TapStyleHint HbTapGesture::tapStyleHint() const
       
  1260 {
       
  1261     return testStyleHint;
       
  1262 }
       
  1263 
       
  1264 // -----------------------------------------------------------------------------
       
  1265 // HbMessageBox::setStandardButtons
       
  1266 // -----------------------------------------------------------------------------
       
  1267 //
       
  1268 void HbMessageBox::setStandardButtons(int buttons)
       
  1269 {
       
  1270     Q_UNUSED(buttons);
       
  1271 }
       
  1272 
       
  1273 // -----------------------------------------------------------------------------
       
  1274 // HbMessageBox::standardButtons
       
  1275 // -----------------------------------------------------------------------------
       
  1276 //
       
  1277 int HbMessageBox::standardButtons() const
       
  1278 {
       
  1279    return HbMessageBox::NoButton;
       
  1280 }
       
  1281 
       
  1282 // -----------------------------------------------------------------------------
       
  1283 // Stub Helper
       
  1284 // -----------------------------------------------------------------------------
       
  1285 //
       
  1286 void HbStubHelper::setGestureState(int state)
       
  1287 {
       
  1288     testState = static_cast<Qt::GestureState> (state);
       
  1289 }
       
  1290 
       
  1291 
       
  1292 void HbStubHelper::setGestureStyleHint(int style) 
       
  1293 {
       
  1294     testStyleHint = static_cast<HbTapGesture::TapStyleHint> (style);
       
  1295 }
       
  1296 
       
  1297 void HbStubHelper::reset()
       
  1298 {
       
  1299     testState = Qt::NoGesture;
       
  1300 }
       
  1301 
       
  1302 bool HbStubHelper::isTitleBarVisible()
       
  1303 {
       
  1304     return titlebarVisible;
       
  1305 }
       
  1306 
       
  1307 bool HbStubHelper::isStatusBarVisible()
       
  1308 {
       
  1309     return statusBarVisible;
       
  1310 }
       
  1311 
       
  1312 
       
  1313 // end of file