stifui/qt/inc/stfqtuimodel.h
branchRCL_3
changeset 14 404ad6c9bc20
child 19 4b22a598b890
equal deleted inserted replaced
13:87e9ebfbe96a 14:404ad6c9bc20
       
     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: QT C++ based Class.
       
    15 *              application data model.
       
    16 *
       
    17 */
       
    18 #include "istfqtuimodel.h"
       
    19 #include "stifexecutor.h"
       
    20 #include <QHash>
       
    21 
       
    22 class StfQtUIModel : public IStfQtUIModel
       
    23     {
       
    24 public:
       
    25     StfQtUIModel();
       
    26     virtual ~StfQtUIModel();
       
    27 public://implement IStfQtUIModel
       
    28     void ClearCasesStatus();
       
    29     QList<CSTFCase> GetCasesByStatus(const TSTFCaseStatusType& type);
       
    30     void AddRunningCase(const CStartedTestCase* startedCase, const CSTFCase& stfCase);
       
    31     void RemoveRunningCase(const CStartedTestCase* startedCase);
       
    32     void AddCaseByStatus(const TSTFCaseStatusType& type, const CSTFCase& aCase);
       
    33     void AddStifModelEventListener(IStifModelEventListener* listener);
       
    34     void RemoveStifModelEventListener(IStifModelEventListener* listener);
       
    35     void PauseCase();
       
    36     void ResumeCase();
       
    37     void AbortCase();
       
    38     
       
    39 private:
       
    40     void FireOnCaseStatisticChangedEvent();
       
    41     void FireOnRunningCaseChangedEvent();
       
    42     
       
    43 private:
       
    44     QList<IStifModelEventListener*> listenerList;
       
    45     QList<CSTFCase> executedCaseList;
       
    46     QList<CSTFCase> passedCaseList;
       
    47     QList<CSTFCase> failedCaseList;
       
    48     QList<CSTFCase> abortCaseList;
       
    49     QList<CSTFCase> crashedCaseList;
       
    50     QHash<const CStartedTestCase*, CSTFCase> runningCaseList;
       
    51     
       
    52     
       
    53     
       
    54     
       
    55     
       
    56     
       
    57     };