--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stifui/qt/inc/stfqtuicontroller.h Tue Apr 27 16:38:40 2010 +0300
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: QT C++ based Class.
+* Application's controller.
+*
+*/
+#ifndef STFQTUICONTROLLER_H_
+#define STFQTUICONTROLLER_H_
+
+#include "istfqtuicontroller.h"
+#include "istfqtuimodel.h"
+#include "stifexecutor.h"
+
+class StfQtUIController : public IStfQtUIController, public IStifCaseUpdateListener
+ {
+public:
+ StfQtUIController(IStfQtUIModel* aModel);
+ ~StfQtUIController();
+public: //Implement IStfQtUIController.
+ //for cases
+
+ bool OpenEngineIniFile(const QString& fileName);
+ QList<QString> GetModuleList();
+ QList<QString> GetCaseListByModule(const QString& moduleName);
+ CSTFCase GetCase(const QString& moduleName, const int index);
+ void RunCases(const QList<CSTFCase>& caseList, const TSTFCaseRunningType& type);
+ void AddCaseToSet(const QList<CSTFCase>& aCase, const QString& setName);
+
+ //for set
+ QList<QString> GetSetList();
+ QList<QString> GetCaseListBySet(const QString& setName);
+ void CreateSet(const QString& setName);
+ void DeleteSet(const QString& setName);
+ void RunSets(const QString& setName, const TSTFCaseRunningType& type);
+
+ //for Started
+ void PauseCase();
+ void ResumeCase();
+ void AbortCase();
+ bool ShowOutput();
+ void SetShowOutput(bool isShow);
+
+ //for staticstic
+ QList<CSTFCase> GetCasesByStatus(const TSTFCaseStatusType& type);
+
+ //listener
+ void AddStfEventListener(IStfEventListener* listener);
+ void RemoveStfEventListener(IStfEventListener* listener);
+
+public://implement IStifCaseUpdateListener
+ void OnGetCaseUpdated(CStartedTestCase* aCase, CSTFCase& stfcase, int flags);
+ void OnGetCaseOutput(CStartedTestCase* aCase, QString& msg);
+
+private: //Fire event
+ void FireOnGetOutput(QString message);
+ void FireOnSetListChanged();
+ void FireOnCaseOutputChanged(IStfEventListener::CaseOutputCommand cmd, int index, QString msg);
+
+private://help methods
+ CSTFModule GetModuleByName(const QString& moduleName);
+
+private:
+ CStifExecutor* executor;
+ IStfQtUIModel* model;
+ QList<IStfEventListener*> listenerList;
+ bool isShowOutput;
+
+
+
+ };
+
+
+
+
+#endif /* STFQTUICONTROLLER_H_ */