phonesettings/cpphonesettingsplugins/tsrc/mocks/mock_hbabstractitemview.cpp
branchRCL_3
changeset 61 41a7f70b3818
equal deleted inserted replaced
58:40a3f856b14d 61:41a7f70b3818
       
     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 #include <QDebug>
       
    18 #include <smcmockclassincludes.h>
       
    19 #include <hbabstractitemview.h>
       
    20 #include <hbscrollarea.h>
       
    21 
       
    22 // ============================ MEMBER FUNCTIONS ===============================
       
    23 
       
    24 // -----------------------------------------------------------------------------
       
    25 // HbAbstractItemView::HbAbstractItemView
       
    26 // -----------------------------------------------------------------------------
       
    27 //
       
    28 HbAbstractItemView::HbAbstractItemView( 
       
    29         HbAbstractItemViewPrivate & /*dd*/,
       
    30         HbAbstractItemContainer * /*container*/,
       
    31         HbModelIterator *,
       
    32         QGraphicsItem * parent )
       
    33     : HbScrollArea(parent)
       
    34     {
       
    35     
       
    36     }
       
    37 
       
    38 
       
    39 // -----------------------------------------------------------------------------
       
    40 // HbAbstractItemView::~HbAbstractItemView
       
    41 // -----------------------------------------------------------------------------
       
    42 //
       
    43 HbAbstractItemView::~HbAbstractItemView(  )
       
    44     {
       
    45     
       
    46     }
       
    47 
       
    48 
       
    49 // -----------------------------------------------------------------------------
       
    50 // HbAbstractItemView::setModel
       
    51 // -----------------------------------------------------------------------------
       
    52 //
       
    53 void HbAbstractItemView::setModel( 
       
    54         QAbstractItemModel * ,
       
    55         HbAbstractViewItem *  )
       
    56     {
       
    57 
       
    58     }
       
    59 
       
    60 
       
    61 // -----------------------------------------------------------------------------
       
    62 // HbAbstractItemView::model
       
    63 // -----------------------------------------------------------------------------
       
    64 //
       
    65 QAbstractItemModel * HbAbstractItemView::model(  ) const
       
    66     {
       
    67   
       
    68     }
       
    69 
       
    70 
       
    71 // -----------------------------------------------------------------------------
       
    72 // HbAbstractItemView::setItemPrototype
       
    73 // -----------------------------------------------------------------------------
       
    74 //
       
    75 void HbAbstractItemView::setItemPrototype( 
       
    76         HbAbstractViewItem *  )
       
    77     {
       
    78 
       
    79     }
       
    80 
       
    81 
       
    82 // -----------------------------------------------------------------------------
       
    83 // HbAbstractItemView::setItemPrototypes
       
    84 // -----------------------------------------------------------------------------
       
    85 //
       
    86 void HbAbstractItemView::setItemPrototypes( 
       
    87         const QList<HbAbstractViewItem *> &  )
       
    88     {
       
    89   
       
    90     }
       
    91 
       
    92 
       
    93 // -----------------------------------------------------------------------------
       
    94 // HbAbstractItemView::itemPrototypes
       
    95 // -----------------------------------------------------------------------------
       
    96 //
       
    97 QList <HbAbstractViewItem * > HbAbstractItemView::itemPrototypes(  ) const
       
    98     {
       
    99     return QList <HbAbstractViewItem * >();
       
   100     }
       
   101 
       
   102 
       
   103 // -----------------------------------------------------------------------------
       
   104 // HbAbstractItemView::setSelectionModel
       
   105 // -----------------------------------------------------------------------------
       
   106 //
       
   107 void HbAbstractItemView::setSelectionModel( 
       
   108         QItemSelectionModel *  )
       
   109     {
       
   110   
       
   111     }
       
   112 
       
   113 
       
   114 // -----------------------------------------------------------------------------
       
   115 // HbAbstractItemView::selectionModel
       
   116 // -----------------------------------------------------------------------------
       
   117 //
       
   118 QItemSelectionModel * HbAbstractItemView::selectionModel(  ) const
       
   119     {
       
   120     return 0;
       
   121     }
       
   122 
       
   123 
       
   124 // -----------------------------------------------------------------------------
       
   125 // HbAbstractItemView::currentIndex
       
   126 // -----------------------------------------------------------------------------
       
   127 //
       
   128 QModelIndex HbAbstractItemView::currentIndex(  ) const
       
   129     {
       
   130     return QModelIndex();
       
   131     }
       
   132 
       
   133 
       
   134 // -----------------------------------------------------------------------------
       
   135 // HbAbstractItemView::rootIndex
       
   136 // -----------------------------------------------------------------------------
       
   137 //
       
   138 QModelIndex HbAbstractItemView::rootIndex(  ) const
       
   139     {
       
   140     return QModelIndex();
       
   141     }
       
   142 
       
   143 
       
   144 // -----------------------------------------------------------------------------
       
   145 // HbAbstractItemView::setSelectionMode
       
   146 // -----------------------------------------------------------------------------
       
   147 //
       
   148 void HbAbstractItemView::setSelectionMode( 
       
   149         SelectionMode )
       
   150     {
       
   151 
       
   152     }
       
   153 
       
   154 
       
   155 // -----------------------------------------------------------------------------
       
   156 // HbAbstractItemView::selectionMode
       
   157 // -----------------------------------------------------------------------------
       
   158 //
       
   159 HbAbstractItemView::SelectionMode HbAbstractItemView::selectionMode(  ) const
       
   160     {
       
   161     return NoSelection;
       
   162     }
       
   163 
       
   164 
       
   165 // -----------------------------------------------------------------------------
       
   166 // HbAbstractItemView::setItemRecycling
       
   167 // -----------------------------------------------------------------------------
       
   168 //
       
   169 void HbAbstractItemView::setItemRecycling( 
       
   170         bool enabled )
       
   171     {
       
   172     SMC_MOCK_METHOD1( void, bool, enabled )
       
   173     }
       
   174 
       
   175 
       
   176 // -----------------------------------------------------------------------------
       
   177 // HbAbstractItemView::itemRecycling
       
   178 // -----------------------------------------------------------------------------
       
   179 //
       
   180 bool HbAbstractItemView::itemRecycling(  ) const
       
   181     {
       
   182     SMC_MOCK_METHOD0( bool )
       
   183     }
       
   184 
       
   185 
       
   186 // -----------------------------------------------------------------------------
       
   187 // HbAbstractItemView::isVisible
       
   188 // -----------------------------------------------------------------------------
       
   189 //
       
   190 bool HbAbstractItemView::isVisible( 
       
   191         const QModelIndex & index ) const
       
   192     {
       
   193 
       
   194     }
       
   195 
       
   196 
       
   197 // -----------------------------------------------------------------------------
       
   198 // HbAbstractItemView::isVisible
       
   199 // -----------------------------------------------------------------------------
       
   200 //
       
   201 /*bool HbAbstractItemView::isVisible( 
       
   202         const QModelIndex & ) const
       
   203     {
       
   204     return false;
       
   205     }
       
   206 */
       
   207 
       
   208 // -----------------------------------------------------------------------------
       
   209 // HbAbstractItemView::currentViewItem
       
   210 // -----------------------------------------------------------------------------
       
   211 //
       
   212 HbAbstractViewItem * HbAbstractItemView::currentViewItem(  ) const
       
   213     {
       
   214     SMC_MOCK_METHOD0( HbAbstractViewItem * )
       
   215     }
       
   216 
       
   217 
       
   218 // -----------------------------------------------------------------------------
       
   219 // HbAbstractItemView::itemByIndex
       
   220 // -----------------------------------------------------------------------------
       
   221 //
       
   222 HbAbstractViewItem * HbAbstractItemView::itemByIndex( 
       
   223         const QModelIndex & index ) const
       
   224     {
       
   225 
       
   226     }
       
   227 
       
   228 
       
   229 // -----------------------------------------------------------------------------
       
   230 // HbAbstractItemView::scrollTo
       
   231 // -----------------------------------------------------------------------------
       
   232 //
       
   233 void HbAbstractItemView::scrollTo( 
       
   234         const QModelIndex & index,
       
   235         ScrollHint hint )
       
   236     {
       
   237 
       
   238     }
       
   239 
       
   240 
       
   241 // -----------------------------------------------------------------------------
       
   242 // HbAbstractItemView::visibleItems
       
   243 // -----------------------------------------------------------------------------
       
   244 //
       
   245 QList <HbAbstractViewItem * > HbAbstractItemView::visibleItems(  ) const
       
   246     {
       
   247  
       
   248     }
       
   249 
       
   250 // -----------------------------------------------------------------------------
       
   251 // HbAbstractItemView::layoutName
       
   252 // -----------------------------------------------------------------------------
       
   253 //
       
   254 QString HbAbstractItemView::layoutName(  ) const
       
   255     {
       
   256  
       
   257     }
       
   258 
       
   259 
       
   260 // -----------------------------------------------------------------------------
       
   261 // HbAbstractItemView::setLayoutName
       
   262 // -----------------------------------------------------------------------------
       
   263 //
       
   264 void HbAbstractItemView::setLayoutName( 
       
   265         const QString & layoutName )
       
   266     {
       
   267    
       
   268     }
       
   269 
       
   270 
       
   271 // -----------------------------------------------------------------------------
       
   272 // HbAbstractItemView::setUniformItemSizes
       
   273 // -----------------------------------------------------------------------------
       
   274 //
       
   275 void HbAbstractItemView::setUniformItemSizes( 
       
   276         bool enable )
       
   277     {
       
   278     SMC_MOCK_METHOD1( void, bool, enable )
       
   279     }
       
   280 
       
   281 
       
   282 // -----------------------------------------------------------------------------
       
   283 // HbAbstractItemView::uniformItemSizes
       
   284 // -----------------------------------------------------------------------------
       
   285 //
       
   286 bool HbAbstractItemView::uniformItemSizes(  ) const
       
   287     {
       
   288     SMC_MOCK_METHOD0( bool )
       
   289     }
       
   290 
       
   291 
       
   292 // -----------------------------------------------------------------------------
       
   293 // HbAbstractItemView::setCurrentIndex
       
   294 // -----------------------------------------------------------------------------
       
   295 //
       
   296 void HbAbstractItemView::setCurrentIndex( 
       
   297         const QModelIndex & index,
       
   298         QItemSelectionModel::SelectionFlags selectionFlag )
       
   299     {
       
   300     
       
   301     }
       
   302 
       
   303 
       
   304 // -----------------------------------------------------------------------------
       
   305 // HbAbstractItemView::setRootIndex
       
   306 // -----------------------------------------------------------------------------
       
   307 //
       
   308 void HbAbstractItemView::setRootIndex( 
       
   309         const QModelIndex & index )
       
   310     {
       
   311    
       
   312     }
       
   313 
       
   314 
       
   315 // -----------------------------------------------------------------------------
       
   316 // HbAbstractItemView::reset
       
   317 // -----------------------------------------------------------------------------
       
   318 //
       
   319 void HbAbstractItemView::reset(  )
       
   320     {
       
   321     SMC_MOCK_METHOD0( void )
       
   322     }
       
   323 
       
   324 
       
   325 // -----------------------------------------------------------------------------
       
   326 // HbAbstractItemView::selectAll
       
   327 // -----------------------------------------------------------------------------
       
   328 //
       
   329 void HbAbstractItemView::selectAll(  )
       
   330     {
       
   331     SMC_MOCK_METHOD0( void )
       
   332     }
       
   333 
       
   334 
       
   335 // -----------------------------------------------------------------------------
       
   336 // HbAbstractItemView::clearSelection
       
   337 // -----------------------------------------------------------------------------
       
   338 //
       
   339 void HbAbstractItemView::clearSelection(  )
       
   340     {
       
   341     SMC_MOCK_METHOD0( void )
       
   342     }
       
   343 
       
   344 
       
   345 // -----------------------------------------------------------------------------
       
   346 // HbAbstractItemView::pressed
       
   347 // -----------------------------------------------------------------------------
       
   348 //
       
   349 void HbAbstractItemView::pressed( 
       
   350         const QModelIndex & index )
       
   351     {
       
   352     
       
   353     }
       
   354 
       
   355 
       
   356 // -----------------------------------------------------------------------------
       
   357 // HbAbstractItemView::released
       
   358 // -----------------------------------------------------------------------------
       
   359 //
       
   360 void HbAbstractItemView::released( 
       
   361         const QModelIndex & index )
       
   362     {
       
   363     
       
   364     }
       
   365 
       
   366 
       
   367 // -----------------------------------------------------------------------------
       
   368 // HbAbstractItemView::activated
       
   369 // -----------------------------------------------------------------------------
       
   370 //
       
   371 void HbAbstractItemView::activated( 
       
   372         const QModelIndex & index )
       
   373     {
       
   374     
       
   375     }
       
   376 
       
   377 
       
   378 // -----------------------------------------------------------------------------
       
   379 // HbAbstractItemView::longPressed
       
   380 // -----------------------------------------------------------------------------
       
   381 //
       
   382 void HbAbstractItemView::longPressed( 
       
   383         HbAbstractViewItem * item,
       
   384         const QPointF & coords )
       
   385     {
       
   386     
       
   387     }
       
   388 
       
   389 
       
   390 // -----------------------------------------------------------------------------
       
   391 // HbAbstractItemView::selectionCommand
       
   392 // -----------------------------------------------------------------------------
       
   393 //
       
   394 QItemSelectionModel::SelectionFlags HbAbstractItemView::selectionCommand( 
       
   395         const HbAbstractViewItem *item, 
       
   396         const QEvent *event )
       
   397     {
       
   398     
       
   399     }
       
   400 
       
   401 
       
   402 // -----------------------------------------------------------------------------
       
   403 // HbAbstractItemView::event
       
   404 // -----------------------------------------------------------------------------
       
   405 //
       
   406 bool HbAbstractItemView::event( 
       
   407         QEvent * e )
       
   408     {
       
   409     
       
   410     }
       
   411 
       
   412 
       
   413 
       
   414 // -----------------------------------------------------------------------------
       
   415 // HbAbstractItemView::emitActivated
       
   416 // -----------------------------------------------------------------------------
       
   417 //
       
   418 void HbAbstractItemView::emitActivated( 
       
   419         const QModelIndex & modelIndex )
       
   420     {
       
   421    
       
   422     }
       
   423 
       
   424 
       
   425 // -----------------------------------------------------------------------------
       
   426 // HbAbstractItemView::emitPressed
       
   427 // -----------------------------------------------------------------------------
       
   428 //
       
   429 void HbAbstractItemView::emitPressed( 
       
   430         const QModelIndex & modelIndex )
       
   431     {
       
   432    
       
   433     }
       
   434 
       
   435 
       
   436 // -----------------------------------------------------------------------------
       
   437 // HbAbstractItemView::emitReleased
       
   438 // -----------------------------------------------------------------------------
       
   439 //
       
   440 void HbAbstractItemView::emitReleased( 
       
   441         const QModelIndex & modelIndex )
       
   442     {
       
   443     
       
   444     }
       
   445 
       
   446 
       
   447 // -----------------------------------------------------------------------------
       
   448 // HbAbstractItemView::scrollByAmount
       
   449 // -----------------------------------------------------------------------------
       
   450 //
       
   451 bool HbAbstractItemView::scrollByAmount( 
       
   452         const QPointF & delta )
       
   453     {
       
   454    
       
   455     }
       
   456 
       
   457 // -----------------------------------------------------------------------------
       
   458 // HbAbstractItemView::itemChange
       
   459 // -----------------------------------------------------------------------------
       
   460 //
       
   461 QVariant HbAbstractItemView::itemChange( 
       
   462         GraphicsItemChange change,
       
   463         const QVariant & value )
       
   464     {
       
   465     
       
   466     }
       
   467 
       
   468 
       
   469 // -----------------------------------------------------------------------------
       
   470 // HbAbstractItemView::dataChanged
       
   471 // -----------------------------------------------------------------------------
       
   472 //
       
   473 void HbAbstractItemView::dataChanged( 
       
   474         const QModelIndex & topLeft,
       
   475         const QModelIndex & bottomRight )
       
   476     {
       
   477     
       
   478     }
       
   479 
       
   480 
       
   481 // -----------------------------------------------------------------------------
       
   482 // HbAbstractItemView::orientationChanged
       
   483 // -----------------------------------------------------------------------------
       
   484 //
       
   485 void HbAbstractItemView::orientationChanged( 
       
   486         Qt::Orientation newOrientation )
       
   487     {
       
   488     
       
   489     }
       
   490 
       
   491 
       
   492 // -----------------------------------------------------------------------------
       
   493 // HbAbstractItemView::orientationAboutToBeChanged
       
   494 // -----------------------------------------------------------------------------
       
   495 //
       
   496 void HbAbstractItemView::orientationAboutToBeChanged(  )
       
   497     {
       
   498     SMC_MOCK_METHOD0( void )
       
   499     }
       
   500 
       
   501 
       
   502 // -----------------------------------------------------------------------------
       
   503 // HbAbstractItemView::currentIndexChanged
       
   504 // -----------------------------------------------------------------------------
       
   505 //
       
   506 void HbAbstractItemView::currentIndexChanged( 
       
   507         const QModelIndex & current,
       
   508         const QModelIndex & previous )
       
   509     {
       
   510     
       
   511     }
       
   512 
       
   513 
       
   514 // -----------------------------------------------------------------------------
       
   515 // HbAbstractItemView::currentSelectionChanged
       
   516 // -----------------------------------------------------------------------------
       
   517 //
       
   518 void HbAbstractItemView::currentSelectionChanged( 
       
   519         const QItemSelection & selected,
       
   520         const QItemSelection & deselected )
       
   521     {
       
   522     
       
   523     }
       
   524 
       
   525 
       
   526 // -----------------------------------------------------------------------------
       
   527 // HbAbstractItemView::rowsAboutToBeInserted
       
   528 // -----------------------------------------------------------------------------
       
   529 //
       
   530 void HbAbstractItemView::rowsAboutToBeInserted( 
       
   531         const QModelIndex & index,
       
   532         int start,
       
   533         int end )
       
   534     {
       
   535     
       
   536     }
       
   537 
       
   538 
       
   539 // -----------------------------------------------------------------------------
       
   540 // HbAbstractItemView::rowsInserted
       
   541 // -----------------------------------------------------------------------------
       
   542 //
       
   543 void HbAbstractItemView::rowsInserted( 
       
   544         const QModelIndex & parent,
       
   545         int start,
       
   546         int end )
       
   547     {
       
   548     
       
   549     }
       
   550 
       
   551 
       
   552 // -----------------------------------------------------------------------------
       
   553 // HbAbstractItemView::rowsAboutToBeRemoved
       
   554 // -----------------------------------------------------------------------------
       
   555 //
       
   556 void HbAbstractItemView::rowsAboutToBeRemoved( 
       
   557         const QModelIndex & index,
       
   558         int start,
       
   559         int end )
       
   560     {
       
   561     
       
   562     }
       
   563 
       
   564 
       
   565 // -----------------------------------------------------------------------------
       
   566 // HbAbstractItemView::rowsRemoved
       
   567 // -----------------------------------------------------------------------------
       
   568 //
       
   569 void HbAbstractItemView::rowsRemoved( 
       
   570         const QModelIndex & parent,
       
   571         int start,
       
   572         int end )
       
   573     {
       
   574     
       
   575     }
       
   576 
       
   577 
       
   578 // -----------------------------------------------------------------------------
       
   579 // HbAbstractItemView::columnsAboutToBeInserted
       
   580 // -----------------------------------------------------------------------------
       
   581 //
       
   582 void HbAbstractItemView::columnsAboutToBeInserted( 
       
   583         const QModelIndex & index,
       
   584         int start,
       
   585         int end )
       
   586     {
       
   587     
       
   588     }
       
   589 
       
   590 
       
   591 // -----------------------------------------------------------------------------
       
   592 // HbAbstractItemView::columnsInserted
       
   593 // -----------------------------------------------------------------------------
       
   594 //
       
   595 void HbAbstractItemView::columnsInserted( 
       
   596         const QModelIndex & parent,
       
   597         int start,
       
   598         int end )
       
   599     {
       
   600     
       
   601     }
       
   602 
       
   603 
       
   604 // -----------------------------------------------------------------------------
       
   605 // HbAbstractItemView::columnsAboutToBeRemoved
       
   606 // -----------------------------------------------------------------------------
       
   607 //
       
   608 void HbAbstractItemView::columnsAboutToBeRemoved( 
       
   609         const QModelIndex & index,
       
   610         int start,
       
   611         int end )
       
   612     {
       
   613     
       
   614     }
       
   615 
       
   616 
       
   617 // -----------------------------------------------------------------------------
       
   618 // HbAbstractItemView::columnsRemoved
       
   619 // -----------------------------------------------------------------------------
       
   620 //
       
   621 void HbAbstractItemView::columnsRemoved( 
       
   622         const QModelIndex & parent,
       
   623         int start,
       
   624         int end )
       
   625     {
       
   626     
       
   627     }
       
   628 
       
   629 
       
   630