phoneplugins/infowidgetplugin/tsrc/ut_infowidgetlayoutmanager/inc/ut_infowidgetlayoutmanager.h
changeset 45 6b911d05207e
child 50 377c906a8701
equal deleted inserted replaced
37:ba76fc04e6c2 45:6b911d05207e
       
     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 #ifndef UT_INFOWIDGETLAYOUTMANAGER_H
       
    19 #define UT_INFOWIDGETLAYOUTMANAGER_H
       
    20 
       
    21 #include <QtTest/QtTest>
       
    22 #include <mockservice.h>
       
    23 
       
    24 class InfoWidgetLayoutManager;
       
    25 class InfoWidgetDocumentLoader;
       
    26 
       
    27 class UT_InfoWidgetLayoutManager : public QObject, public MockService
       
    28 {
       
    29     Q_OBJECT
       
    30 
       
    31 public:  
       
    32     UT_InfoWidgetLayoutManager();
       
    33     ~UT_InfoWidgetLayoutManager();
       
    34 
       
    35 private:     
       
    36     void fillDisplayContainers();
       
    37     void fillCurrentWidgetsContainer();
       
    38     void fillParams(const QString & fileName, bool * ok);
       
    39     
       
    40 private slots:
       
    41     void init();
       
    42     void cleanup();
       
    43 
       
    44     void t_currentDisplayRole();
       
    45     void t_currentWidgetRoles();
       
    46     void t_layoutRows(); 
       
    47     void t_setLayoutRows();
       
    48     void t_rowHeight();
       
    49     void t_layoutInfoDisplay();
       
    50     void t_layoutSettingsDialog();
       
    51     void t_widgetRoles();
       
    52     void t_loadWidgets();
       
    53     void t_loadWidget();
       
    54     void t_loadObject();
       
    55     void t_getWidget();
       
    56     void t_contentWidget();
       
    57     void t_reloadWidgets();
       
    58     void t_removeWidget();
       
    59     void t_destroyWidgets();
       
    60     void t_textFitsToRect(); 
       
    61     void t_marqueeItems(); 
       
    62             
       
    63     // InfoWidgetDocumentLoader tests 
       
    64     void t_createObject();
       
    65     
       
    66 private:    
       
    67     InfoWidgetLayoutManager *m_layoutManager;
       
    68     InfoWidgetDocumentLoader *m_documentLoader;
       
    69     
       
    70     QPointer<QGraphicsWidget> m_graphicsWidgetPtr;
       
    71 
       
    72     bool loadResultInfoWidgetDocml;  
       
    73     bool loadResultSettingsDialogDocml;
       
    74     
       
    75     QObjectList objectListInfoDisplayWidgets;
       
    76     QObjectList objectListSettingsDialogWidgets;
       
    77 
       
    78     
       
    79 };
       
    80 
       
    81 #endif // UT_INFOWIDGETLAYOUTMANAGER_H