author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 21 Jun 2010 15:41:16 +0300 | |
branch | RCL_3 |
changeset 15 | 65b472535a0d |
parent 13 | 822c625f7adc |
child 17 | d40e813b23c0 |
permissions | -rw-r--r-- |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: QT C++ based Class. |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
#include <QtGui> |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
#include "frmmain.h" |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
#include "stfqtuicontroller.h" |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#include "stfqtuimodel.h" |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#include <QList> |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
#include "version.h" |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#include <QCursor> |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
24 |
#include <QDesktopWidget> |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
const QString SELECTITEMHEADER = " * "; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
const QString UNSELECTITEMHEADER = " "; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
29 |
FrmMain::FrmMain() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
{ |
15
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
31 |
lastItemSelected = NULL; |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
uiSetting = new UiSetting(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
createMenus(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
load(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
LoadSubMenu(); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
36 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
37 |
QFile file(uiSetting->ReadSetting(KStyleSheet)); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
38 |
bool rst = file.open(QFile::ReadOnly); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
39 |
if(rst) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
40 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
41 |
QString styleSheet = QLatin1String(file.readAll()); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
42 |
qApp->setStyleSheet(styleSheet); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
43 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
44 |
|
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
model = new StfQtUIModel(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
model->AddStifModelEventListener(this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
47 |
controller = new StfQtUIController(model); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
controller->AddStfEventListener(this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
49 |
loadContent(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
50 |
dlgOutput = new DlgOutput(controller); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
51 |
setSetting(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
52 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
53 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
54 |
FrmMain::~FrmMain() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
55 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
model->AbortCase(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
57 |
controller->RemoveStfEventListener(this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
58 |
model->RemoveStifModelEventListener(this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
59 |
|
15
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
60 |
//lastItemSelected does not own any memory, don't need to delete. |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
61 |
lastItemSelected = NULL; |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
62 |
delete uiSetting; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
63 |
delete dlgOutput; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
64 |
delete controller; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
65 |
delete model; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
66 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
67 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
68 |
void FrmMain::paintEvent(QPaintEvent* event) |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
69 |
{ |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
70 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
71 |
if(mainLayout != NULL) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
72 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
73 |
QDesktopWidget* desktop = QApplication::desktop(); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
74 |
QRect rect = desktop->screenGeometry(0); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
75 |
bool temp = false; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
76 |
if(rect.height() > rect.width()) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
77 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
78 |
temp = true; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
79 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
80 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
81 |
if(temp != layoutType) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
82 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
83 |
mainLayout->removeWidget(tabWidget); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
84 |
mainLayout->removeWidget(groupBox); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
85 |
if(temp) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
86 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
87 |
mainLayout->addWidget(tabWidget, 0, 0); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
88 |
mainLayout->addWidget(groupBox, 1, 0, Qt::AlignBottom); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
89 |
mainLayout->setRowStretch(0,4); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
90 |
mainLayout->setRowStretch(1,1); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
91 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
92 |
else |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
93 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
94 |
mainLayout->addWidget(tabWidget, 0, 0); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
95 |
mainLayout->addWidget(groupBox, 0, 1);//Qt::AlignRight |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
96 |
//groupBox->setFixedSize(60,0); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
97 |
mainLayout->setColumnStretch(0,1); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
98 |
mainLayout->setColumnStretch(1,1); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
99 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
100 |
layoutType = temp; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
101 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
102 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
103 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
104 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
105 |
event->accept(); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
106 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
107 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
108 |
void FrmMain::setSetting() |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
109 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
110 |
controller->SetShowOutput(uiSetting->ReadSetting(KShowOutput) == "true"); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
111 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
112 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
113 |
void FrmMain::OnGetMessage(const QString& aMessage) |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
114 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
115 |
txtOutput->appendPlainText(aMessage); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
116 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
117 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
118 |
void FrmMain::OnRunningCaseChanged() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
119 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
120 |
QList<CSTFCase> caseList = controller->GetCasesByStatus(EStatusRunning); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
121 |
lstStartedCases->clear(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
122 |
foreach(CSTFCase aCase, caseList) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
123 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
124 |
lstStartedCases->addItem(aCase.Name()); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
126 |
if (caseList.size() != 0) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
127 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
128 |
btnPauseCase->setEnabled(true); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
129 |
btnAbortCase->setEnabled(true); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
130 |
btnShowOutput->setEnabled(true); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
131 |
actPause->setEnabled(true); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
132 |
actAbort->setEnabled(true); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
133 |
actOutput->setEnabled(true); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
134 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
135 |
else |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
136 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
137 |
btnPauseCase->setEnabled(false); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
138 |
btnAbortCase->setEnabled(false); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
139 |
btnShowOutput->setEnabled(false); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
140 |
actPause->setEnabled(false); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
141 |
actAbort->setEnabled(false); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
142 |
actOutput->setEnabled(false); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
143 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
144 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
145 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
146 |
void FrmMain::OnCaseOutputChanged(const IStfEventListener::CaseOutputCommand& /*cmd*/, const QString& /*index*/, const QString& /*msg*/) |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
147 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
148 |
//nothing to do. |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
149 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
150 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
151 |
void FrmMain::OnSetListChanged() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
152 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
153 |
loadSetList(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
154 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
155 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
156 |
void FrmMain::OnCaseStatisticChanged() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
157 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
158 |
loadStatistic(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
159 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
160 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
161 |
void FrmMain::createMenus() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
162 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
163 |
//operateMenu = menuBar()->addMenu(tr("&Operation")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
164 |
actAbout = new QAction(tr("&About"), this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
165 |
connect(actAbout, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
166 |
SLOT(on_actAbout_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
167 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
168 |
actExit = new QAction(tr("&Exit"), this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
169 |
connect(actExit, SIGNAL(triggered()), this, SLOT(close())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
170 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
171 |
actOpenFile = new QAction(tr("&Open Ini File"), this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
172 |
connect(actOpenFile, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
173 |
SLOT(on_actOpenFile_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
174 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
175 |
menuRunCase = new QMenu(tr("Run Selected Case(s)"), this->menuBar()); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
176 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
177 |
actRunCaseSeq = new QAction(tr("Sequentially"), this); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
178 |
connect(actRunCaseSeq, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
179 |
SLOT(on_actRunCaseSeq_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
180 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
181 |
actRunCasePar = new QAction(tr("Parallel"), this); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
182 |
connect(actRunCasePar, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
183 |
SLOT(on_actRunCasePar_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
184 |
|
15
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
185 |
//////////////////// |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
186 |
actReapeatRunSeq = new QAction(tr("Repeat run sequentially"), this); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
187 |
connect(actReapeatRunSeq, SIGNAL(triggered()), this, |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
188 |
SLOT(on_actReapeatRunSeq_triggered())); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
189 |
|
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
190 |
actAddtoSet = new QAction(tr("Add cases to Set"), this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
191 |
connect(actAddtoSet, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
192 |
SLOT(on_actAddtoSet_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
193 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
194 |
actSelectAll = new QAction(tr("Select All"), this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
195 |
connect(actSelectAll, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
196 |
SLOT(on_actSelectAll_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
197 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
198 |
actExpandAll = new QAction(tr("Expand All"), this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
199 |
connect(actExpandAll, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
200 |
SLOT(on_actExpandAll_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
201 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
202 |
actCollapseAll = new QAction(tr("Collapse All"), this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
203 |
connect(actCollapseAll, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
204 |
SLOT(on_actCollapseAll_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
205 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
206 |
actSetting = new QAction(tr("Settings"), this); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
207 |
connect(actSetting, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
208 |
SLOT(on_actSetting_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
209 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
210 |
menuRunSet = new QMenu(tr("Run Case(s) in Selected Set"), this->menuBar()); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
211 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
212 |
actRunSetSeq = new QAction(tr("Sequentially"), this); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
213 |
connect(actRunSetSeq, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
214 |
SLOT(on_actRunSetSeq_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
215 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
216 |
actRunSetPar = new QAction(tr("Parallel"), this); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
217 |
connect(actRunSetPar, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
218 |
SLOT(on_actRunSetPar_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
219 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
220 |
actNewSet = new QAction(tr("Create New Set"), this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
221 |
connect(actNewSet, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
222 |
SLOT(on_actNewSet_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
223 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
224 |
actDelSet = new QAction(tr("Delete Set"), this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
225 |
connect(actDelSet, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
226 |
SLOT(on_actDelSet_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
227 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
228 |
actPause = new QAction(tr("Pause"), this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
229 |
actPause->setEnabled(false); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
230 |
connect(actPause, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
231 |
SLOT(on_actPause_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
232 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
233 |
actAbort = new QAction(tr("Abort"), this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
234 |
actAbort->setEnabled(false); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
235 |
connect(actAbort, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
236 |
SLOT(on_actAbort_triggered())); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
237 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
238 |
actOutput = new QAction(tr("Output"), this); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
239 |
actOutput->setEnabled(false); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
240 |
connect(actAbort, SIGNAL(triggered()), this, |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
241 |
SLOT(on_actOutput_triggered())); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
242 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
243 |
actClearStatistics = new QAction(tr("Clear Statistics"), this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
244 |
connect(actClearStatistics, SIGNAL(triggered()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
245 |
SLOT(on_actClearStatistics_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
246 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
247 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
248 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
249 |
void FrmMain::load() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
250 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
251 |
this->setContextMenuPolicy(Qt::NoContextMenu); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
252 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
253 |
this->setWindowTitle(QtUIName); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
254 |
centerWidget = new QWidget(this); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
255 |
this->setCentralWidget(centerWidget); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
256 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
257 |
mainLayout = new QGridLayout(this); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
258 |
mainLayout->setVerticalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
259 |
mainLayout->setHorizontalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
260 |
mainLayout->setSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
261 |
mainLayout->setMargin(2); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
262 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
263 |
this->centralWidget()->setContextMenuPolicy(Qt::NoContextMenu); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
264 |
|
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
265 |
//tab control |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
266 |
tabWidget = new QTabWidget(this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
267 |
tabWidget->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
268 |
tabCase = new QWidget(tabWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
269 |
tabCase->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
270 |
tabWidget->addTab(tabCase, tr("Cases")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
271 |
tabSet = new QWidget(tabWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
272 |
tabSet->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
273 |
tabWidget->addTab(tabSet, tr(" Set ")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
274 |
tabStarted = new QWidget(tabWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
275 |
tabStarted->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
276 |
tabWidget->addTab(tabStarted, tr("Running")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
277 |
tabStatistic = new QWidget(tabWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
278 |
tabStatistic->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
279 |
tabWidget->addTab(tabStatistic, tr("Statistics")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
280 |
connect(tabWidget, SIGNAL(currentChanged(int)), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
281 |
SLOT(onTabWidgetSelectIndexChanged())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
282 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
283 |
//output panel |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
284 |
groupBox = new QGroupBox(this); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
285 |
//groupBox->setFixedHeight(150); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
286 |
groupBox->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
287 |
groupBox->setTitle(tr("Information")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
288 |
txtOutput = new QPlainTextEdit(groupBox); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
289 |
txtOutput->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
290 |
txtOutput->setReadOnly(true); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
291 |
txtOutput->setFocusPolicy(Qt::NoFocus); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
292 |
//txtOutput->setEditFocus(false); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
293 |
QGridLayout *groupBoxLayout = new QGridLayout(this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
294 |
groupBoxLayout->setVerticalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
295 |
groupBoxLayout->setHorizontalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
296 |
groupBoxLayout->setSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
297 |
groupBoxLayout->setMargin(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
298 |
groupBoxLayout->addWidget(txtOutput, 0, 0); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
299 |
groupBox->setLayout(groupBoxLayout); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
300 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
301 |
QDesktopWidget* desktop = QApplication::desktop(); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
302 |
QRect rect = desktop->screenGeometry(0); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
303 |
if(rect.height() > rect.width()) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
304 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
305 |
mainLayout->addWidget(tabWidget, 0, 0); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
306 |
mainLayout->addWidget(groupBox, 1, 0, Qt::AlignBottom); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
307 |
mainLayout->setRowStretch(0,4); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
308 |
mainLayout->setRowStretch(1,1); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
309 |
layoutType = true; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
310 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
311 |
else |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
312 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
313 |
mainLayout->addWidget(tabWidget, 0, 0); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
314 |
mainLayout->addWidget(groupBox, 0, 1);//Qt::AlignRight |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
315 |
//groupBox->setFixedSize(60,0); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
316 |
mainLayout->setColumnStretch(0,1); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
317 |
mainLayout->setColumnStretch(1,1); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
318 |
layoutType = false; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
319 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
320 |
|
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
321 |
//Create MainLayout and MainWidget |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
322 |
this->centralWidget()->setLayout(mainLayout); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
323 |
mainLayout->addWidget(tabWidget, 0, 0); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
324 |
mainLayout->addWidget(groupBox, 1, 0, Qt::AlignBottom); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
325 |
mainLayout->setRowStretch(0,4); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
326 |
mainLayout->setRowStretch(1,1); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
327 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
328 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
329 |
//Tab page: Case |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
330 |
QGridLayout *tabCaseLayout = new QGridLayout(this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
331 |
tabCaseLayout->setVerticalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
332 |
tabCaseLayout->setHorizontalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
333 |
tabCaseLayout->setSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
334 |
tabCaseLayout->setMargin(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
335 |
treeModuleList = new QTreeWidget(tabCase); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
336 |
treeModuleList->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
337 |
treeModuleList->headerItem()->setText(0, tr("Module List")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
338 |
treeModuleList->setSelectionBehavior(QAbstractItemView::SelectRows); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
339 |
treeModuleList->setEditFocus(false); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
340 |
connect(treeModuleList, SIGNAL(itemClicked(QTreeWidgetItem* , int)), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
341 |
SLOT(on_treeModuleList_itemClicked(QTreeWidgetItem* , int))); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
342 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
343 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
344 |
QWidget *caseToolWidget = new QWidget(tabCase); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
345 |
caseToolWidget->setContextMenuPolicy(Qt::NoContextMenu); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
346 |
QGridLayout *caseToolWidgetLayout = new QGridLayout(this); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
347 |
QPushButton *btnRunCase = new QPushButton(tr("Run"), caseToolWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
348 |
btnRunCase->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
349 |
connect(btnRunCase, SIGNAL(clicked()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
350 |
SLOT(on_actRunCaseSeq_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
351 |
QPushButton *btnExpandAll = new QPushButton(tr("Expand"), caseToolWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
352 |
btnExpandAll->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
353 |
connect(btnExpandAll, SIGNAL(clicked()), this, |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
354 |
SLOT(on_actExpand_triggered())); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
355 |
QPushButton *btnCollapseAll = new QPushButton(tr("Collapse"), |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
356 |
caseToolWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
357 |
btnCollapseAll->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
358 |
connect(btnCollapseAll, SIGNAL(clicked()), this, |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
359 |
SLOT(on_actCollapse_triggered())); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
360 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
361 |
caseToolWidgetLayout->addWidget(btnRunCase, 0, 0); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
362 |
caseToolWidgetLayout->addWidget(btnExpandAll, 0, 1); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
363 |
caseToolWidgetLayout->addWidget(btnCollapseAll, 0, 2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
364 |
caseToolWidget->setLayout(caseToolWidgetLayout); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
365 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
366 |
tabCaseLayout->addWidget(caseToolWidget, 1, 0); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
367 |
tabCaseLayout->addWidget(treeModuleList, 0, 0); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
368 |
tabCase->setLayout(tabCaseLayout); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
369 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
370 |
//Tab page: Set |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
371 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
372 |
QGridLayout *tabSetLayout = new QGridLayout(this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
373 |
tabSetLayout->setVerticalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
374 |
tabSetLayout->setHorizontalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
375 |
tabSetLayout->setSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
376 |
tabSetLayout->setMargin(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
377 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
378 |
QGridLayout *tabSetMainLayout = new QGridLayout(this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
379 |
tabSetMainLayout->setVerticalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
380 |
tabSetMainLayout->setHorizontalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
381 |
tabSetMainLayout->setSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
382 |
tabSetMainLayout->setMargin(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
383 |
QWidget *tabSetMainWidget = new QWidget(tabSet); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
384 |
tabSetMainWidget->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
385 |
QLabel *lblSet = new QLabel(tr("Test Set:"), tabSetMainWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
386 |
lblSet->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
387 |
QLabel *lblCase = new QLabel(tr("Cases:"), tabSetMainWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
388 |
lblCase->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
389 |
cboSetList = new QComboBox(tabSetMainWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
390 |
cboSetList->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
391 |
cboSetList->setEditable(false); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
392 |
connect(cboSetList, SIGNAL(currentIndexChanged(QString)), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
393 |
SLOT(on_cboSetList_currentIndexChanged(QString))); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
394 |
lstSetCases = new QListWidget(tabSetMainWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
395 |
lstSetCases->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
396 |
tabSetMainLayout->addWidget(lblSet, 0, 0); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
397 |
tabSetMainLayout->addWidget(cboSetList, 0, 1); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
398 |
tabSetMainLayout->addWidget(lblCase, 1, 0, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
399 |
(Qt::AlignTop | Qt::AlignRight)); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
400 |
tabSetMainLayout->addWidget(lstSetCases, 1, 1); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
401 |
tabSetMainWidget->setLayout(tabSetMainLayout); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
402 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
403 |
QWidget *setToolWidget = new QWidget(tabSet); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
404 |
setToolWidget->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
405 |
QGridLayout *setToolWidgetLayout = new QGridLayout(this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
406 |
setToolWidgetLayout->setVerticalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
407 |
setToolWidgetLayout->setHorizontalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
408 |
setToolWidgetLayout->setSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
409 |
setToolWidgetLayout->setMargin(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
410 |
QPushButton *btnRunSetCase = new QPushButton(tr("Run"), setToolWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
411 |
btnRunSetCase->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
412 |
connect(btnRunSetCase, SIGNAL(clicked()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
413 |
SLOT(on_actRunSetSeq_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
414 |
QPushButton *btnNewSet = new QPushButton(tr("New Set"), setToolWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
415 |
btnNewSet->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
416 |
connect(btnNewSet, SIGNAL(clicked()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
417 |
SLOT(on_actNewSet_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
418 |
QPushButton *btnDelSet = new QPushButton(tr("Delete Set"), setToolWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
419 |
btnDelSet->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
420 |
connect(btnDelSet, SIGNAL(clicked()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
421 |
SLOT(on_actDelSet_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
422 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
423 |
setToolWidgetLayout->addWidget(btnRunSetCase, 0, 0); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
424 |
setToolWidgetLayout->addWidget(btnNewSet, 0, 1); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
425 |
setToolWidgetLayout->addWidget(btnDelSet, 0, 2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
426 |
setToolWidget->setLayout(setToolWidgetLayout); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
427 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
428 |
tabSetLayout->addWidget(tabSetMainWidget, 0, 0); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
429 |
tabSetLayout->addWidget(setToolWidget, 1, 0); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
430 |
tabSet->setLayout(tabSetLayout); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
431 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
432 |
//Tab Started |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
433 |
QGridLayout *tabStartedLayout = new QGridLayout(this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
434 |
tabStartedLayout->setVerticalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
435 |
tabStartedLayout->setHorizontalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
436 |
tabStartedLayout->setSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
437 |
tabStartedLayout->setMargin(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
438 |
lstStartedCases = new QListWidget(tabStarted); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
439 |
lstStartedCases->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
440 |
QWidget *startedToolWidget = new QWidget(tabStarted); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
441 |
startedToolWidget->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
442 |
QGridLayout *startedToolWidgetLayout = new QGridLayout(this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
443 |
startedToolWidgetLayout->setVerticalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
444 |
startedToolWidgetLayout->setHorizontalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
445 |
startedToolWidgetLayout->setSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
446 |
startedToolWidgetLayout->setMargin(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
447 |
btnPauseCase = new QPushButton(tr("Pause"), startedToolWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
448 |
btnPauseCase->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
449 |
connect(btnPauseCase, SIGNAL(clicked()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
450 |
SLOT(on_actPause_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
451 |
btnPauseCase->setEnabled(false); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
452 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
453 |
btnAbortCase = new QPushButton(tr("Abort"), startedToolWidget); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
454 |
btnAbortCase->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
455 |
connect(btnAbortCase, SIGNAL(clicked()), this, |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
456 |
SLOT(on_actAbort_triggered())); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
457 |
btnAbortCase->setEnabled(false); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
458 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
459 |
btnShowOutput = new QPushButton(tr("Output"), startedToolWidget); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
460 |
connect(btnShowOutput, SIGNAL(clicked()), this, |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
461 |
SLOT(on_actOutput_triggered())); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
462 |
btnShowOutput->setEnabled(false); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
463 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
464 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
465 |
startedToolWidgetLayout->addWidget(btnPauseCase, 0, 0); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
466 |
startedToolWidgetLayout->addWidget(btnAbortCase, 0, 1); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
467 |
startedToolWidgetLayout->addWidget(btnShowOutput, 0, 2); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
468 |
startedToolWidget->setLayout(startedToolWidgetLayout); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
469 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
470 |
tabStartedLayout->addWidget(lstStartedCases, 0, 0); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
471 |
tabStartedLayout->addWidget(startedToolWidget, 1, 0); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
472 |
tabStarted->setLayout(tabStartedLayout); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
473 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
474 |
//Tab Statistic |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
475 |
QGridLayout *tabStatisticLayout = new QGridLayout(this); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
476 |
tabStatisticLayout->setVerticalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
477 |
tabStatisticLayout->setHorizontalSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
478 |
tabStatisticLayout->setSpacing(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
479 |
tabStatisticLayout->setMargin(2); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
480 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
481 |
treeStatistic = new QTreeWidget(tabStatistic); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
482 |
treeStatistic->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
483 |
treeStatistic->headerItem()->setText(0, tr("Statistics")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
484 |
tabStatisticLayout->addWidget(treeStatistic, 0, 0); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
485 |
tabStatistic->setLayout(tabStatisticLayout); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
486 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
487 |
executedItems = new QTreeWidgetItem(treeStatistic); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
488 |
executedItems->setText(0, tr("Executed Cases(0)")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
489 |
passedItems = new QTreeWidgetItem(treeStatistic); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
490 |
passedItems->setText(0, tr("Passed Cases(0)")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
491 |
failedItems = new QTreeWidgetItem(treeStatistic); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
492 |
failedItems->setText(0, tr("Failed Cases(0)")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
493 |
crashedItems = new QTreeWidgetItem(treeStatistic); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
494 |
crashedItems->setText(0, tr("Crashed Cases(0)")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
495 |
abortedItems = new QTreeWidgetItem(treeStatistic); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
496 |
abortedItems->setText(0, tr("Aborted Cases(0)")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
497 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
498 |
//this->repaint(); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
499 |
|
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
500 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
501 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
502 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
503 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
504 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
505 |
void FrmMain::LoadSubMenu() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
506 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
507 |
menuBar()->clear(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
508 |
menuBar()->setContextMenuPolicy(Qt::NoContextMenu); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
509 |
if (tabWidget->currentIndex() == 0) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
510 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
511 |
//Cases Tab |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
512 |
menuBar()->addAction(actOpenFile); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
513 |
menuBar()->addMenu(menuRunCase); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
514 |
menuRunCase->addAction(actRunCaseSeq); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
515 |
menuRunCase->addAction(actRunCasePar); |
15
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
516 |
menuBar()->addAction(actReapeatRunSeq); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
517 |
menuBar()->addSeparator(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
518 |
menuBar()->addAction(actAddtoSet); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
519 |
menuBar()->addSeparator(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
520 |
menuBar()->addAction(actSelectAll); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
521 |
menuBar()->addAction(actExpandAll); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
522 |
menuBar()->addAction(actCollapseAll); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
523 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
524 |
else if (tabWidget->currentIndex() == 1) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
525 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
526 |
//Set Tab |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
527 |
menuBar()->addMenu(menuRunSet); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
528 |
menuRunSet->addAction(actRunSetSeq); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
529 |
menuRunSet->addAction(actRunSetPar); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
530 |
menuBar()->addSeparator(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
531 |
menuBar()->addAction(actNewSet); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
532 |
menuBar()->addAction(actDelSet); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
533 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
534 |
else if (tabWidget->currentIndex() == 2) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
535 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
536 |
//Started Tab |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
537 |
menuBar()->addAction(actPause); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
538 |
menuBar()->addAction(actAbort); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
539 |
menuBar()->addAction(actOutput); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
540 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
541 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
542 |
else |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
543 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
544 |
//Staticstic tab |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
545 |
menuBar()->addAction(actClearStatistics); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
546 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
547 |
menuBar()->addSeparator(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
548 |
menuBar()->addAction(actSetting); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
549 |
menuBar()->addAction(actAbout); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
550 |
menuBar()->addAction(actExit); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
551 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
552 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
553 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
554 |
void FrmMain::onTabWidgetSelectIndexChanged() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
555 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
556 |
LoadSubMenu(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
557 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
558 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
559 |
void FrmMain::loadContent() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
560 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
561 |
//Load ModuleList |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
562 |
loadModuleList(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
563 |
//Load SetList |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
564 |
loadSetList(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
565 |
//Load Statistic List |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
566 |
loadStatistic(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
567 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
568 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
569 |
void FrmMain::loadModuleList() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
570 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
571 |
treeModuleList->clear(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
572 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
573 |
QList<QString> moduleList = controller->GetModuleList(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
574 |
foreach(QString moduleName, moduleList) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
575 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
576 |
QTreeWidgetItem* item = new QTreeWidgetItem(treeModuleList); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
577 |
item->setText(0, UNSELECTITEMHEADER + moduleName); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
578 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
579 |
QList<QString> caseList = controller->GetCaseListByModule( |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
580 |
moduleName); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
581 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
582 |
foreach(QString caseName, caseList) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
583 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
584 |
QTreeWidgetItem* caseItem = new QTreeWidgetItem(item); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
585 |
caseItem->setText(0, UNSELECTITEMHEADER + caseName); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
586 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
587 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
588 |
if (moduleList.size() > 0) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
589 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
590 |
treeModuleList->setCurrentItem(treeModuleList->topLevelItem(0)); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
591 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
592 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
593 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
594 |
void FrmMain::reloadStatisticItem(QString name, QTreeWidgetItem* item, |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
595 |
TSTFCaseStatusType type) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
596 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
597 |
QList<CSTFCase> caseList = controller->GetCasesByStatus(type); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
598 |
while (item->childCount() != 0) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
599 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
600 |
item->removeChild(item->child(0)); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
601 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
602 |
item->setText(0, name + "(" + QString::number(caseList.size(), 10) + ")"); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
603 |
foreach(CSTFCase aCase, caseList) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
604 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
605 |
QTreeWidgetItem* child = new QTreeWidgetItem(item); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
606 |
child->setText(0, aCase.Name()); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
607 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
608 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
609 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
610 |
void FrmMain::loadStatistic() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
611 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
612 |
//executedItems; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
613 |
reloadStatisticItem("Executed Cases", executedItems, EStatusExecuted); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
614 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
615 |
//passedItems; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
616 |
reloadStatisticItem("Passed Cases", passedItems, EStatusPassed); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
617 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
618 |
//failedItems; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
619 |
reloadStatisticItem("Failed Cases", failedItems, EStatusFailed); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
620 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
621 |
//crashedItems; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
622 |
reloadStatisticItem("Crashed Cases", crashedItems, EStatusCrashed); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
623 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
624 |
//abortedItems; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
625 |
reloadStatisticItem("Aborted Cases", abortedItems, EStatusAborted); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
626 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
627 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
628 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
629 |
void FrmMain::loadSetList() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
630 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
631 |
cboSetList->clear(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
632 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
633 |
QList<QString> setList = controller->GetSetList(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
634 |
foreach(QString setName, setList) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
635 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
636 |
cboSetList->addItem(setName); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
637 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
638 |
// if (setList.size() > 0) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
639 |
// { |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
640 |
// //cboSetList->setCurrentIndex(0); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
641 |
// on_cboSetList_currentIndexChanged(setList.at(0)); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
642 |
// } |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
643 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
644 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
645 |
QList<CSTFCase> FrmMain::getSelectedCases() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
646 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
647 |
int index = 0; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
648 |
QTreeWidgetItem* item = treeModuleList->topLevelItem(index); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
649 |
QList<CSTFCase> caseList; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
650 |
while (item != 0) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
651 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
652 |
for (int i = 0; i < item->childCount(); i++) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
653 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
654 |
QTreeWidgetItem* child = item->child(i); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
655 |
if (child->text(0).startsWith(SELECTITEMHEADER)) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
656 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
657 |
CSTFCase aCase(child->text(0).remove(0,3), i); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
658 |
aCase.SetIndex(i); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
659 |
//aCase.SetModuleName(moduleBox->text()); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
660 |
aCase.SetModuleName(item->text(0).remove(0,3)); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
661 |
caseList.append(aCase); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
662 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
663 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
664 |
index++; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
665 |
item = treeModuleList->topLevelItem(index); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
666 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
667 |
return caseList; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
668 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
669 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
670 |
void FrmMain::on_cboSetList_currentIndexChanged(QString item) |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
671 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
672 |
lstSetCases->clear(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
673 |
QList<QString> list = controller->GetCaseListBySet(item); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
674 |
foreach(QString caseName, list) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
675 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
676 |
lstSetCases->addItem(caseName); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
677 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
678 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
679 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
680 |
void FrmMain::startRunning() |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
681 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
682 |
setSetting(); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
683 |
tabWidget->setCurrentWidget(tabStarted); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
684 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
685 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
686 |
void FrmMain::on_actRunCaseSeq_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
687 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
688 |
//run case seq |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
689 |
startRunning(); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
690 |
controller->RunCases(getSelectedCases(), Sequentially); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
691 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
692 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
693 |
void FrmMain::on_actRunCasePar_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
694 |
{ |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
695 |
startRunning(); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
696 |
controller->RunCases(getSelectedCases(), Parallel); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
697 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
698 |
|
15
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
699 |
void FrmMain::on_actReapeatRunSeq_triggered() |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
700 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
701 |
DlgRepeatRun dlgRepeatRun(this); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
702 |
int result = dlgRepeatRun.exec(); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
703 |
if(result == QDialog::Accepted) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
704 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
705 |
QList<CSTFCase> selectedCases = getSelectedCases(); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
706 |
if(selectedCases.count() > 0) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
707 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
708 |
startRunning(); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
709 |
controller->RepeatRunCases( selectedCases, |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
710 |
dlgRepeatRun.isRepeatInfinitely(), |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
711 |
dlgRepeatRun.GetLoopTimes() ); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
712 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
713 |
|
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
714 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
715 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
716 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
717 |
void FrmMain::on_actAddtoSet_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
718 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
719 |
QList<CSTFCase> list = getSelectedCases(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
720 |
if (list.size() == 0) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
721 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
722 |
QErrorMessage *errorMessageDialog = new QErrorMessage(this); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
723 |
errorMessageDialog->setAutoFillBackground(true); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
724 |
errorMessageDialog->showMessage(tr( |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
725 |
"<font color =black>Please select cases you want to added to set.</font>")); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
726 |
return; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
727 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
728 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
729 |
QList<QString> setList = controller->GetSetList(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
730 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
731 |
DlgSetSelector dlgSet(setList, this); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
732 |
int result = dlgSet.exec(); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
733 |
QString setName; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
734 |
if(result == QDialog::Accepted) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
735 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
736 |
setName = dlgSet.SelectName(); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
737 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
738 |
else |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
739 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
740 |
return; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
741 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
742 |
bool rst = false; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
743 |
if(setName == "") |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
744 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
745 |
setName = "temp.set"; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
746 |
rst = controller->CreateSet(setName); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
747 |
if(!rst) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
748 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
749 |
return; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
750 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
751 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
752 |
controller->AddCaseToSet(list, setName); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
753 |
// |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
754 |
// bool ok; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
755 |
// QString setName = QInputDialog::getItem(this, tr( |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
756 |
// "\r\nAdd select cases to Set"), tr("\r\n\r\nSets:"), setList, 0, false, &ok, Qt::Dialog); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
757 |
// if (ok && !setName.isEmpty()) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
758 |
// { |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
759 |
// if(setName == newSet) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
760 |
// { |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
761 |
// ok = controller->CreateSet(setName); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
762 |
// if(!ok) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
763 |
// { |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
764 |
// return; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
765 |
// } |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
766 |
// } |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
767 |
// controller->AddCaseToSet(list, setName); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
768 |
// } |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
769 |
tabWidget->setCurrentIndex(1); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
770 |
int index = -1; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
771 |
for(int i=0;i<cboSetList->count();i++) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
772 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
773 |
if(cboSetList->itemText(i) == setName) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
774 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
775 |
index = i; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
776 |
break; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
777 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
778 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
779 |
if(index != -1) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
780 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
781 |
cboSetList->setCurrentIndex(index); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
782 |
} |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
783 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
784 |
|
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
785 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
786 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
787 |
void FrmMain::on_actSelectAll_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
788 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
789 |
QString header = UNSELECTITEMHEADER; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
790 |
if(actSelectAll->text() == "Select All") |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
791 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
792 |
actSelectAll->setText("UnSelect All"); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
793 |
header = SELECTITEMHEADER; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
794 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
795 |
else |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
796 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
797 |
actSelectAll->setText("Select All"); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
798 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
799 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
800 |
int index = 0; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
801 |
QTreeWidgetItem* item = treeModuleList->topLevelItem(index); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
802 |
while (item != 0) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
803 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
804 |
item->setText(0, item->text(0).replace(0,3, header)); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
805 |
for (int i = 0; i < item->childCount(); i++) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
806 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
807 |
QTreeWidgetItem* child = item->child(i); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
808 |
child->setText(0,child->text(0).replace(0,3,header)); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
809 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
810 |
index++; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
811 |
item = treeModuleList->topLevelItem(index); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
812 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
813 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
814 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
815 |
void FrmMain::on_actExpandAll_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
816 |
{ |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
817 |
QTreeWidgetItem* item = treeModuleList->currentItem(); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
818 |
treeModuleList->expandAll(); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
819 |
if(item != NULL) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
820 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
821 |
treeModuleList->setCurrentItem(item); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
822 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
823 |
|
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
824 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
825 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
826 |
void FrmMain::on_actCollapseAll_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
827 |
{ |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
828 |
QTreeWidgetItem* item = treeModuleList->currentItem(); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
829 |
if(item != NULL) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
830 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
831 |
if(item->parent() != NULL) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
832 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
833 |
item = item->parent(); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
834 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
835 |
} |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
836 |
treeModuleList->collapseAll(); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
837 |
if(item != NULL) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
838 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
839 |
treeModuleList->setCurrentItem(item); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
840 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
841 |
|
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
842 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
843 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
844 |
void FrmMain::on_actSetting_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
845 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
846 |
DlgSetting dlgSet(uiSetting); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
847 |
int result = dlgSet.exec(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
848 |
if(result == QDialog::Accepted) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
849 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
850 |
setSetting(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
851 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
852 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
853 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
854 |
void FrmMain::on_actRunSetSeq_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
855 |
{ |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
856 |
startRunning(); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
857 |
QString setName = cboSetList->currentText(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
858 |
controller->RunSets(setName, Sequentially); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
859 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
860 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
861 |
void FrmMain::on_actRunSetPar_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
862 |
{ |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
863 |
startRunning(); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
864 |
QString setName = cboSetList->currentText(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
865 |
controller->RunSets(setName, Parallel); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
866 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
867 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
868 |
void FrmMain::on_actNewSet_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
869 |
{ |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
870 |
QString name; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
871 |
bool rst = controller->CreateSet(name); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
872 |
if(rst) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
873 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
874 |
QMessageBox::information(this, |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
875 |
tr("Create Set Successfully"), |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
876 |
"Create a new test set, named: " + name); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
877 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
878 |
int index = -1; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
879 |
for(int i=0;i<cboSetList->count();i++) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
880 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
881 |
if(cboSetList->itemText(i) == name) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
882 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
883 |
index = i; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
884 |
break; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
885 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
886 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
887 |
if(index != -1) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
888 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
889 |
cboSetList->setCurrentIndex(index); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
890 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
891 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
892 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
893 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
894 |
else |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
895 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
896 |
QMessageBox::information(this, |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
897 |
tr("Create Set Failed"), |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
898 |
tr("Please check the log for more information.")); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
899 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
900 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
901 |
|
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
902 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
903 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
904 |
void FrmMain::on_actDelSet_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
905 |
{ |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
906 |
QString setName = cboSetList->currentText(); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
907 |
QMessageBox msgBox(QMessageBox::Warning, tr("Delete a Set"), tr( |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
908 |
"Do you really want to delete the set?"), 0, this); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
909 |
msgBox.addButton(tr("&Delete"), QMessageBox::AcceptRole); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
910 |
msgBox.addButton(tr("&Cancel"), QMessageBox::RejectRole); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
911 |
if (msgBox.exec() == QMessageBox::AcceptRole) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
912 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
913 |
controller->DeleteSet(setName); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
914 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
915 |
|
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
916 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
917 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
918 |
void FrmMain::on_actPause_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
919 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
920 |
if (btnPauseCase->text() == "Pause") |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
921 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
922 |
controller->PauseCase(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
923 |
btnPauseCase->setText(tr("Resume")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
924 |
actPause->setText(tr("Resume")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
925 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
926 |
else |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
927 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
928 |
controller->ResumeCase(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
929 |
btnPauseCase->setText(tr("Pause")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
930 |
actPause->setText(tr("Pause")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
931 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
932 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
933 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
934 |
void FrmMain::on_actAbort_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
935 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
936 |
controller->AbortCase(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
937 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
938 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
939 |
void FrmMain::on_treeModuleList_itemClicked(QTreeWidgetItem* item, int /*column*/) |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
940 |
{ |
15
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
941 |
//Check if shift key is pressed |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
942 |
bool isShiftPressed = false; |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
943 |
Qt::KeyboardModifiers keyMod = QApplication::keyboardModifiers(); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
944 |
isShiftPressed=keyMod.testFlag(Qt::ShiftModifier); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
945 |
|
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
946 |
//Handle shift key. |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
947 |
//Shift not pressed. |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
948 |
if(!isShiftPressed) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
949 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
950 |
setItemClicked(item); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
951 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
952 |
//Shift pressed. |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
953 |
else |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
954 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
955 |
enum Direction |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
956 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
957 |
Item_NoDirection, |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
958 |
Item_Above, |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
959 |
Item_Below |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
960 |
}; |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
961 |
Direction direction = Item_NoDirection; |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
962 |
QTreeWidgetItem* tempItem = item; |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
963 |
//check direction of last selected item comparing current one. |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
964 |
while(tempItem) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
965 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
966 |
tempItem = treeModuleList->itemAbove(tempItem); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
967 |
if(tempItem == lastItemSelected) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
968 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
969 |
direction = Item_Above; |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
970 |
break; |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
971 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
972 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
973 |
if (direction != Item_Above) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
974 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
975 |
tempItem = item; |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
976 |
while(tempItem) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
977 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
978 |
tempItem = treeModuleList->itemBelow(tempItem); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
979 |
if(tempItem == lastItemSelected) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
980 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
981 |
direction = Item_Below; |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
982 |
break; |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
983 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
984 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
985 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
986 |
|
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
987 |
// Select all items between current item and last selected item. |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
988 |
tempItem = item; |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
989 |
if(direction != Item_NoDirection) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
990 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
991 |
while(tempItem) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
992 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
993 |
//check if this item been selected. |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
994 |
bool isItemSelected = false; |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
995 |
if ( tempItem->text(0).left(3).compare(SELECTITEMHEADER)==0 ) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
996 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
997 |
isItemSelected = true; |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
998 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
999 |
// If not selected, set to selected. |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1000 |
if (!isItemSelected ) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1001 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1002 |
setItemClicked(tempItem); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1003 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1004 |
|
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1005 |
//Go above/below |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1006 |
if (direction == Item_Above) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1007 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1008 |
tempItem = treeModuleList->itemAbove(tempItem); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1009 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1010 |
if (direction == Item_Below) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1011 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1012 |
tempItem = treeModuleList->itemBelow(tempItem); |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1013 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1014 |
|
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1015 |
if (tempItem == lastItemSelected) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1016 |
{ |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1017 |
break; |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1018 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1019 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1020 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1021 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1022 |
|
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1023 |
// Set current clicked item to last selected item. |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1024 |
lastItemSelected = item; |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1025 |
|
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1026 |
|
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1027 |
} |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1028 |
|
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1029 |
void FrmMain::setItemClicked(QTreeWidgetItem* item) |
65b472535a0d
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
13
diff
changeset
|
1030 |
{ |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1031 |
QString header = UNSELECTITEMHEADER; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1032 |
if(item->text(0).startsWith(UNSELECTITEMHEADER)) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1033 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1034 |
header = SELECTITEMHEADER; |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1035 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1036 |
item->setText(0 , item->text(0).replace(0, 3, header)); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1037 |
for(int i=0;i<item->childCount();i++) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1038 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1039 |
item->child(i)->setText(0, item->child(i)->text(0).replace(0, 3, header)); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1040 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1041 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1042 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1043 |
void FrmMain::on_actAbout_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1044 |
{ |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1045 |
QString str = QtUIName + "< >" + QtUIVersion; |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1046 |
str.append("<br>").append("engine version:"); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1047 |
|
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1048 |
str.append(QString::number(STIF_MAJOR_VERSION, 10)).append("."); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1049 |
str.append(QString::number(STIF_MINOR_VERSION, 10)).append("."); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1050 |
str.append(QString::number(STIF_BUILD_VERSION, 10)); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1051 |
str.append(" --").append(STIF_REL_DATE).append("<br>"); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1052 |
str.append("---"); |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1053 |
str.append("Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. "); |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1054 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1055 |
QErrorMessage *errorMessageDialog = new QErrorMessage(this); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1056 |
errorMessageDialog->showMessage("<font color =black size=12px><b>" + str + "</b></font>"); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1057 |
|
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1058 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1059 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1060 |
void FrmMain::on_actOpenFile_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1061 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1062 |
QString fileName = QFileDialog::getOpenFileName(this, tr( |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1063 |
"Select ini file"), tr("c:\\"), tr( |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1064 |
"Ini Files (*.ini);;All Files (*)")); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1065 |
if (!fileName.isEmpty()) |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1066 |
{ |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1067 |
bool result = controller->OpenEngineIniFile(fileName); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1068 |
if(result) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1069 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1070 |
this->loadModuleList(); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1071 |
QMessageBox::information(this, tr("Open INI File"), "Load Engine INI file successfully!"); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1072 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1073 |
else |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1074 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1075 |
QMessageBox::warning(this, tr("Open INI File"),"Failed to Load Engine INI file. Please check the file format and its path."); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1076 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1077 |
|
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1078 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1079 |
} |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1080 |
|
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1081 |
void FrmMain::on_actClearStatistics_triggered() |
9
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1082 |
{ |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1083 |
model->ClearCasesStatus(); |
404ad6c9bc20
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1084 |
} |
13
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1085 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1086 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1087 |
void FrmMain::on_actExpand_triggered() |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1088 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1089 |
QTreeWidgetItem* item = treeModuleList->currentItem(); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1090 |
if(item != NULL) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1091 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1092 |
item->setExpanded(true); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1093 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1094 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1095 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1096 |
void FrmMain::on_actCollapse_triggered() |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1097 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1098 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1099 |
QTreeWidgetItem* item = treeModuleList->currentItem(); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1100 |
if(item != NULL) |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1101 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1102 |
item->setExpanded(false); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1103 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1104 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1105 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1106 |
void FrmMain::on_actOutput_triggered() |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1107 |
{ |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1108 |
controller->SetShowOutput(true); |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1109 |
} |
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1110 |
|
822c625f7adc
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
9
diff
changeset
|
1111 |