stifui/qt/inc/istfqtuicontroller.h
branchRCL_3
changeset 60 6646c35e558c
equal deleted inserted replaced
50:9b2cffad4b5e 60:6646c35e558c
       
     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 *              IStfQtUIController is interface of appliction controller.
       
    16 *              IStfEventListener is interface of Stf view observer.
       
    17 *
       
    18 */
       
    19 #ifndef ISTFQTUICONTROLLER_H
       
    20 #define ISTFQTUICONTROLLER_H
       
    21 #include "cstfmodule.h"
       
    22 #include "cstfcase.h"
       
    23 #include <QList>
       
    24 #include "istfqtuimodel.h"
       
    25 
       
    26 class IStfEventListener
       
    27 {
       
    28 public:
       
    29     enum CaseOutputCommand
       
    30         {
       
    31         ECreate,
       
    32         EOutput,
       
    33         EClose
       
    34         };
       
    35 public:
       
    36     virtual void OnGetMessage(const QString& aMessage) = 0;
       
    37     virtual void OnSetListChanged() = 0;
       
    38     virtual void OnCaseOutputChanged(const IStfEventListener::CaseOutputCommand& cmd, const QString& index, const QString& msg) = 0;
       
    39 };
       
    40 
       
    41 class IStfQtUIController
       
    42 {
       
    43 public:
       
    44     inline virtual ~IStfQtUIController(){}
       
    45     //for cases
       
    46     virtual bool OpenEngineIniFile(const QString& fileName) = 0;
       
    47     virtual QList<QString> GetModuleList() = 0;
       
    48     virtual QList<QString> GetCaseListByModule(const QString& moduleName) = 0;
       
    49     virtual CSTFCase GetCase(const QString& moduleName, const int index) = 0;
       
    50     virtual void RunCases(const QList<CSTFCase>& caseList, const TSTFCaseRunningType& type) = 0;
       
    51     virtual void RepeatRunCases(const QList<CSTFCase>& aCaseList, const bool aIsLoopInfinitely, const int aLoopTimes = 1) = 0;
       
    52     virtual bool AddCaseToSet(const QList<CSTFCase>& aCase, const QString& setName) = 0;
       
    53     
       
    54     //for set
       
    55     virtual QList<QString> GetSetList() = 0;
       
    56     virtual QList<QString> GetCaseListBySet(const QString& setName) = 0;
       
    57     virtual bool CreateSet(QString& setName) = 0;
       
    58     virtual bool DeleteSet(const QString& setName) = 0;
       
    59     virtual void RunSets(const QString& setName, const TSTFCaseRunningType& type) = 0;
       
    60     
       
    61     //for Started
       
    62     virtual void PauseCase() = 0;
       
    63     virtual void ResumeCase() = 0;
       
    64     virtual void AbortCase() = 0;
       
    65     virtual CSTFCase GetRunningCase(int index) = 0;
       
    66     virtual bool ShowOutput() = 0;
       
    67     virtual void SetShowOutput(bool isShow) = 0;
       
    68     
       
    69     //for staticstic
       
    70     virtual QList<CSTFCase> GetCasesByStatus(const TSTFCaseStatusType& type) = 0;
       
    71     
       
    72     //listener
       
    73     virtual void AddStfEventListener(IStfEventListener* listener) = 0;
       
    74     virtual void RemoveStfEventListener(IStfEventListener* listener) = 0;
       
    75     
       
    76     //for repeat execution setting
       
    77     virtual void InitRepeatSetting(const bool aIsLoopInfinitely, const int aLoopTimes) = 0;
       
    78     virtual void ResetRepeatSetting() = 0;
       
    79 
       
    80 };
       
    81 
       
    82 
       
    83 
       
    84 #endif // ISTFQTUICONTROLLER_H
       
    85 
       
    86 // End of File