|
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 |
|
55 |
|
56 private: |
|
57 IStfQtUIController* controller; |
|
58 QTabWidget* tabMain; |
|
59 QPushButton* btnPause; |
|
60 QPushButton* btnAbort; |
|
61 QHash<QString , QPlainTextEdit*> tabList; |
|
62 |
|
63 private: |
|
64 void on_btnClose_clicked(); |
|
65 |
|
66 |
|
67 }; |
|
68 |
|
69 |
|
70 #endif /* DLGOUTPUT_H_ */ |