stifui/qt/inc/dlgoutput.h
branchRCL_3
changeset 18 48060abbbeaf
parent 17 d40e813b23c0
child 19 b3cee849fa46
equal deleted inserted replaced
17:d40e813b23c0 18:48060abbbeaf
     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 *              DlgOutput is a QT based dialog.
       
    16 *              Used to display case execution output and control the test case (pause/resume/abort).
       
    17 *
       
    18 */
       
    19 #ifndef DLGOUTPUT_H_
       
    20 #define DLGOUTPUT_H_
       
    21 
       
    22 #include <QDialog>
       
    23 #include <QHash>
       
    24 #include "istfqtuicontroller.h"
       
    25 
       
    26 
       
    27 QT_BEGIN_NAMESPACE
       
    28 class QTabWidget;
       
    29 class QGridLayout;
       
    30 class QPlainTextEdit;
       
    31 class QPushButton;
       
    32 QT_END_NAMESPACE
       
    33 
       
    34 class DlgOutput : public QDialog, public IStfEventListener {
       
    35     Q_OBJECT
       
    36 
       
    37 public:
       
    38     DlgOutput(IStfQtUIController* ctl, QWidget *parent = 0);
       
    39     ~DlgOutput();
       
    40     
       
    41 private:
       
    42     void CreateItem(QString index, QString item);
       
    43     void CloseItem(QString index);
       
    44     void ShowMessage(QString index, QString msg);
       
    45     
       
    46 private://implement IStfEventListener
       
    47     void OnGetMessage(const QString& ){};
       
    48     void OnSetListChanged(){};
       
    49     void OnCaseOutputChanged(const IStfEventListener::CaseOutputCommand& cmd, const QString& index, const QString& msg);
       
    50     
       
    51 private slots:
       
    52     void on_btnPause_clicked();
       
    53     void on_btnAbort_clicked();
       
    54     void on_btnClose_clicked();
       
    55     
       
    56     
       
    57 private:
       
    58     IStfQtUIController* controller;
       
    59     QTabWidget* tabMain;
       
    60     QPushButton* btnPause;
       
    61     QPushButton* btnAbort;
       
    62     QPushButton* btnClose;
       
    63     QHash<QString , QPlainTextEdit*> tabList;
       
    64     
       
    65 };
       
    66 
       
    67 
       
    68 #endif /* DLGOUTPUT_H_ */
       
    69 
       
    70 // End of File