|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: TabWidget class to select, run tests and show the result. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <QPushButton> |
|
19 #include <QWidget> |
|
20 #include <QTreeWidget> |
|
21 #include <QTreeWidgetItem> |
|
22 #include <QTableWidget> |
|
23 #include <QGridLayout> |
|
24 #include <QLabel> |
|
25 #include <QProgressBar> |
|
26 #include <QPalette> |
|
27 #include <QTableWidgetItem> |
|
28 #include <QHeaderView> |
|
29 #include "tabwidgettestrun.h" |
|
30 #include "widgettestrunner.h" |
|
31 #include "settings.h" |
|
32 #include "testitemlist.h" |
|
33 #include "dialogmsg.h" |
|
34 |
|
35 static const QString TOTAL = "Total: %1"; |
|
36 static const QString PASSED = "Passed: %1"; |
|
37 static const QString FAILED = "Failed: %1"; |
|
38 static const QString ERRORSUMMARY = "Error summary"; |
|
39 static const QString NAME = "Case Name"; |
|
40 static const QString REASON = "Reason"; |
|
41 static const int FONTPIXELSIZE = 12; |
|
42 static const int FONTPIXELSIZE_ITEM = 15; |
|
43 static const int FONTPIXELSIZE_SUBITEM = 10; |
|
44 static const QString CASELIST = "Cases List"; |
|
45 static const QString UNMARKED = " "; |
|
46 static const QString MARKED = "* "; |
|
47 static const QString PARTIALLY_MARKED = "# "; |
|
48 static const int MARK_LEN = MARKED.length(); |
|
49 static const QString CPP_SCOPE_OP = "::"; |
|
50 static const QString EXPAND = "Expand"; |
|
51 static const QString EXPAND_ALL = "Expand All"; |
|
52 static const QString COLLAPSE = "Collapse"; |
|
53 static const QString COLLAPSE_ALL = "Collapse All"; |
|
54 |
|
55 TabWidgetTestRun::TabWidgetTestRun(QWidget* parent) : |
|
56 QTabWidget(parent) |
|
57 { |
|
58 setContextMenuPolicy(Qt::NoContextMenu); |
|
59 listTestItems = new TestItemList(); |
|
60 listSelectedTestItems = new TestItemList(); |
|
61 load(); |
|
62 dlgErrMsg = new DialogMsg(this); |
|
63 connect(testRunner, SIGNAL(errorOccurred(const QString)), dlgErrMsg, SLOT(showMsg(const QString))); |
|
64 } |
|
65 |
|
66 TabWidgetTestRun::~TabWidgetTestRun() |
|
67 { |
|
68 delete listTestItems; |
|
69 listTestItems = NULL; |
|
70 delete listSelectedTestItems; |
|
71 listSelectedTestItems = NULL; |
|
72 } |
|
73 |
|
74 void TabWidgetTestRun::createTestsTab() |
|
75 { |
|
76 tabTests = new QWidget(this); |
|
77 createTreeWidgetTests(); |
|
78 this->addTab(tabTests, tr("Test Cases")); |
|
79 } |
|
80 |
|
81 void TabWidgetTestRun::createExecutionTab() |
|
82 { |
|
83 tabRunner = new QTabWidget(this); |
|
84 createExecutionWidgets(); |
|
85 this->addTab(tabRunner, tr("Execution")); |
|
86 } |
|
87 |
|
88 void TabWidgetTestRun::createExecutionWidgets() |
|
89 { |
|
90 labelTotal = new QLabel(tabRunner); |
|
91 labelTotal->setText(TOTAL.arg(0)); |
|
92 labelPassed = new QLabel(tabRunner); |
|
93 labelPassed->setText(PASSED.arg(0)); |
|
94 labelFailed = new QLabel(tabRunner); |
|
95 labelFailed->setText(FAILED.arg(0)); |
|
96 |
|
97 labelErrorSummary = new QLabel(tabRunner); |
|
98 labelErrorSummary->setText(ERRORSUMMARY); |
|
99 tblWdgtErrorSummary = new QTableWidget(tabRunner); |
|
100 tblWdgtErrorSummary->setColumnCount(2); |
|
101 tblWdgtErrorSummary->setColumnWidth(0, 200); |
|
102 |
|
103 QTableWidgetItem* itemName = new QTableWidgetItem(); |
|
104 tblWdgtErrorSummary->setHorizontalHeaderItem(0, itemName); |
|
105 QTableWidgetItem* itemReason = new QTableWidgetItem(); |
|
106 tblWdgtErrorSummary->setHorizontalHeaderItem(1, itemReason); |
|
107 tblWdgtErrorSummary->horizontalHeaderItem(0)->setText(NAME); |
|
108 tblWdgtErrorSummary->horizontalHeaderItem(1)->setText(REASON); |
|
109 tblWdgtErrorSummary->setShowGrid(true); |
|
110 tblWdgtErrorSummary->setSortingEnabled(false); |
|
111 tblWdgtErrorSummary->horizontalHeader()->setStretchLastSection(true); |
|
112 testRunner = new WidgetTestRunner(tabRunner); |
|
113 testRunner->setHidden(true); |
|
114 progressBarExecuting = new QProgressBar(tabRunner); |
|
115 progressBarExecuting->setHidden(true); |
|
116 } |
|
117 |
|
118 void TabWidgetTestRun::setTabPageExecutionLayout() |
|
119 { |
|
120 QWidget* labelsWidget = new QWidget(tabRunner); |
|
121 QGridLayout* labelsLayout = new QGridLayout(tabRunner); |
|
122 |
|
123 labelsLayout->addWidget(labelPassed, 0, 0); |
|
124 labelsLayout->addWidget(labelFailed, 0, 1); |
|
125 labelsLayout->addWidget(labelTotal, 0, 2); |
|
126 labelsWidget->setLayout(labelsLayout); |
|
127 |
|
128 QGridLayout* layout = new QGridLayout(tabRunner); |
|
129 layout->addWidget(labelsWidget, 0, 0); |
|
130 layout->addWidget(progressBarExecuting, 1, 0); |
|
131 layout->addWidget(labelErrorSummary, 2, 0); |
|
132 layout->addWidget(tblWdgtErrorSummary, 3, 0); |
|
133 tabRunner->setLayout(layout); |
|
134 } |
|
135 |
|
136 void TabWidgetTestRun::load() |
|
137 { |
|
138 createTestsTab(); |
|
139 setupTestsTabEventHandlers(); |
|
140 setTabPageTestsLayout(); |
|
141 createExecutionTab(); |
|
142 setTabPageExecutionLayout(); |
|
143 setupRunnerEventHandlers(); |
|
144 } |
|
145 |
|
146 void TabWidgetTestRun::createTreeWidgetTests() |
|
147 { |
|
148 treeWdgtTests = new QTreeWidget(tabTests); |
|
149 treeWdgtTests->headerItem()->setText(0, CASELIST); |
|
150 btnRun = new QPushButton(tr("Run"), tabTests); |
|
151 btnExpandCollapse = new QPushButton(tr("Expand"), tabTests); |
|
152 // Disable buttons on startup |
|
153 btnRun->setEnabled(false); |
|
154 |
|
155 btnExpandCollapse->setEnabled(false); |
|
156 } |
|
157 |
|
158 void TabWidgetTestRun::setTabPageTestsLayout() |
|
159 { |
|
160 QWidget* btnsWidget = new QWidget(tabTests); |
|
161 QGridLayout* btnsLayout = new QGridLayout(tabTests); |
|
162 btnsLayout->addWidget(btnRun, 0, 0); |
|
163 btnsLayout->addWidget(btnExpandCollapse, 0, 1); |
|
164 btnsWidget->setLayout(btnsLayout); |
|
165 |
|
166 QGridLayout* layout = new QGridLayout(tabTests); |
|
167 layout->addWidget(treeWdgtTests, 0, 0); |
|
168 layout->addWidget(btnsWidget, 1, 0); |
|
169 |
|
170 tabTests->setLayout(layout); |
|
171 } |
|
172 |
|
173 void TabWidgetTestRun::setTotal(int num) |
|
174 { |
|
175 labelTotal->setText(TOTAL.arg(num)); |
|
176 labelTotal->repaint(); |
|
177 } |
|
178 |
|
179 void TabWidgetTestRun::setPassed(int num) |
|
180 { |
|
181 labelPassed->setText(PASSED.arg(num)); |
|
182 labelPassed->repaint(); |
|
183 } |
|
184 |
|
185 void TabWidgetTestRun::setFailed(QString name, QString reason, int num) |
|
186 { |
|
187 labelFailed->setText(FAILED.arg(num)); |
|
188 labelFailed->repaint(); |
|
189 int curRow = tblWdgtErrorSummary->rowCount(); |
|
190 tblWdgtErrorSummary->insertRow(curRow); |
|
191 QTableWidgetItem* itemName = new QTableWidgetItem(name); |
|
192 QTableWidgetItem* itemReason = new QTableWidgetItem(reason); |
|
193 tblWdgtErrorSummary->setItem(curRow, 0, itemName); |
|
194 tblWdgtErrorSummary->setItem(curRow, 1, itemReason); |
|
195 QFont font; |
|
196 font.setPixelSize(FONTPIXELSIZE); |
|
197 itemName->setFont(font); |
|
198 itemReason->setFont(font); |
|
199 } |
|
200 |
|
201 void TabWidgetTestRun::resetTreeWidget() |
|
202 { |
|
203 for(int i = treeWdgtTests->topLevelItemCount() -1; i >= 0; --i) |
|
204 { |
|
205 delete treeWdgtTests->topLevelItem(i); |
|
206 } |
|
207 treeWdgtTests->clear(); |
|
208 } |
|
209 |
|
210 void TabWidgetTestRun::resetTestItemList() |
|
211 { |
|
212 listTestItems->removeAll(); |
|
213 listSelectedTestItems->removeAll(); |
|
214 } |
|
215 |
|
216 void TabWidgetTestRun::addTests(QStringList testCases) |
|
217 { |
|
218 resetTestItemList(); |
|
219 resetTreeWidget(); |
|
220 QFont font, subItemFont; |
|
221 font.setPixelSize(FONTPIXELSIZE_ITEM); |
|
222 subItemFont.setPixelSize(FONTPIXELSIZE_SUBITEM); |
|
223 QStringList fetchedCaseNames; |
|
224 QTreeWidgetItem* item = NULL; |
|
225 QTreeWidgetItem* subItem = NULL; |
|
226 foreach (QString dllName, testCases) |
|
227 { |
|
228 if (listTestItems->exists(dllName)) |
|
229 { |
|
230 continue; |
|
231 } |
|
232 |
|
233 fetchedCaseNames.clear(); |
|
234 if (testRunner->listTestCases(dllName, fetchedCaseNames) != 0) |
|
235 { |
|
236 continue; |
|
237 } |
|
238 item = new QTreeWidgetItem(treeWdgtTests); |
|
239 item->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsSelectable |
|
240 | Qt::ItemIsEnabled); |
|
241 item->setText(0, UNMARKED + dllName); |
|
242 item->setFont(0, font); |
|
243 |
|
244 foreach(QString testCase, fetchedCaseNames) |
|
245 { |
|
246 subItem = new QTreeWidgetItem(item); |
|
247 subItem->setText(0, UNMARKED + testCase/*getFuncName(testCase)*/); |
|
248 subItem->setFont(0, subItemFont); |
|
249 } |
|
250 listTestItems->addItemExclusively(dllName, fetchedCaseNames); |
|
251 } |
|
252 |
|
253 if (treeWdgtTests->topLevelItemCount() > 0) |
|
254 { |
|
255 treeWdgtTests->setCurrentItem(treeWdgtTests->topLevelItem(0)); |
|
256 treeWdgtTests->resizeColumnToContents(0); |
|
257 if (this->currentWidget() != tabTests) |
|
258 { |
|
259 this->setCurrentWidget(tabTests); |
|
260 } |
|
261 treeWdgtTests->setFocus(); |
|
262 btnRun->setEnabled(false); |
|
263 btnExpandCollapse->setEnabled(true); |
|
264 emit this->testsAdded(); |
|
265 } |
|
266 } |
|
267 |
|
268 QString TabWidgetTestRun::getFuncName(const QString& caseName) |
|
269 { |
|
270 int index = caseName.indexOf(CPP_SCOPE_OP, 0); |
|
271 return caseName.right(caseName.length() - index - CPP_SCOPE_OP.length()); |
|
272 } |
|
273 |
|
274 void TabWidgetTestRun::setupRunnerEventHandlers() |
|
275 { |
|
276 connect(this, SIGNAL(currentChanged(int)), this, |
|
277 SLOT(changeCurrentTab(int))); |
|
278 connect(btnRun, SIGNAL(clicked()), this, SLOT(runTests())); |
|
279 connect(btnExpandCollapse, SIGNAL(clicked()), this, |
|
280 SLOT(expandCollapseItem())); |
|
281 connect(this, SIGNAL(testRun()), testRunner, SLOT(runTests())); |
|
282 connect(testRunner, SIGNAL(testExecuted(int)), progressBarExecuting, |
|
283 SLOT(setValue(int))); |
|
284 connect(testRunner, SIGNAL(testPassed(int)), this, SLOT(setPassed(int))); |
|
285 connect(testRunner, SIGNAL(testFailed(QString, QString, int)), this, |
|
286 SLOT(setFailed(QString, QString, int))); |
|
287 } |
|
288 |
|
289 void TabWidgetTestRun::runTests() |
|
290 { |
|
291 if (this->currentWidget() != tabRunner) |
|
292 { |
|
293 this->setCurrentWidget(tabRunner); |
|
294 } |
|
295 tblWdgtErrorSummary->clearContents(); |
|
296 tblWdgtErrorSummary->setRowCount(0); |
|
297 testRunner->addTestDllNames(listSelectedTestItems->items()); |
|
298 testRunner->addTestCaseNames(listSelectedTestItems->subItems()); |
|
299 progressBarExecuting->setEnabled(true); |
|
300 progressBarExecuting->show(); |
|
301 progressBarExecuting->setMaximum( |
|
302 listSelectedTestItems->subItems().count()); |
|
303 progressBarExecuting->setValue(0); |
|
304 labelTotal->setText(TOTAL.arg(listSelectedTestItems->subItems().count())); |
|
305 labelPassed->setText(PASSED.arg(0)); |
|
306 labelFailed->setText(FAILED.arg(0)); |
|
307 emit this->testRun(); |
|
308 progressBarExecuting->setEnabled(false); |
|
309 } |
|
310 |
|
311 void TabWidgetTestRun::changeCurrentTab(int index) |
|
312 { |
|
313 if (this->widget(index) == tabTests) |
|
314 { |
|
315 treeWdgtTests->setFocus(); |
|
316 emit this->currentTabChangedToTests(!listTestItems->empty()); |
|
317 } |
|
318 else |
|
319 { |
|
320 tblWdgtErrorSummary->setFocus(); |
|
321 emit this->currentTabChangedToExecution(); |
|
322 } |
|
323 } |
|
324 |
|
325 void TabWidgetTestRun::setupTestsTabEventHandlers() |
|
326 { |
|
327 connect(treeWdgtTests, SIGNAL(itemClicked(QTreeWidgetItem* , int)), this, |
|
328 SLOT(selectDeselectTestCases(QTreeWidgetItem* , int))); |
|
329 connect(treeWdgtTests, |
|
330 SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), |
|
331 this, SLOT(changeCurItem(QTreeWidgetItem*, QTreeWidgetItem*))); |
|
332 connect(treeWdgtTests, SIGNAL(itemExpanded(QTreeWidgetItem*)), this, |
|
333 SLOT(setBtnExpandCollapseEnabled(QTreeWidgetItem*))); |
|
334 connect(treeWdgtTests, SIGNAL(itemCollapsed(QTreeWidgetItem*)), this, |
|
335 SLOT(setBtnExpandCollapseEnabled(QTreeWidgetItem*))); |
|
336 } |
|
337 |
|
338 void TabWidgetTestRun::changeCurItem(QTreeWidgetItem* cur, QTreeWidgetItem*/* prev*/) |
|
339 { |
|
340 if (cur != NULL) |
|
341 { |
|
342 setBtnExpandCollapseEnabled(cur); |
|
343 emit this->selectedTestsChanged(listSelectedTestItems->empty(), |
|
344 isAllCasesSelected(), |
|
345 cur->text(treeWdgtTests->currentColumn()).contains(MARKED)); |
|
346 } |
|
347 } |
|
348 |
|
349 void TabWidgetTestRun::selectCurrentCase() |
|
350 { |
|
351 QString itemName = treeWdgtTests->currentItem()->text( |
|
352 treeWdgtTests->currentColumn()); |
|
353 if (itemName.contains(UNMARKED)) |
|
354 { |
|
355 selectDeselectTestCases(treeWdgtTests->currentItem(), |
|
356 treeWdgtTests->currentColumn()); |
|
357 } |
|
358 } |
|
359 |
|
360 void TabWidgetTestRun::selectAllCases() |
|
361 { |
|
362 for (int i = 0; i < treeWdgtTests->topLevelItemCount(); ++i) |
|
363 { |
|
364 QString itemName = treeWdgtTests->topLevelItem(i)->text( |
|
365 treeWdgtTests->currentColumn()); |
|
366 if (itemName.contains(UNMARKED) |
|
367 || itemName.contains(PARTIALLY_MARKED)) |
|
368 { |
|
369 // Deselect current first |
|
370 if (itemName.contains(PARTIALLY_MARKED)) |
|
371 { |
|
372 deselectCase(treeWdgtTests->topLevelItem(i), |
|
373 treeWdgtTests->currentColumn()); |
|
374 } |
|
375 selectDeselectTestCases(treeWdgtTests->topLevelItem(i), |
|
376 treeWdgtTests->currentColumn()); |
|
377 } |
|
378 } |
|
379 } |
|
380 |
|
381 void TabWidgetTestRun::deselectCase(QTreeWidgetItem* item, int column) |
|
382 { |
|
383 QString itemName = item->text(column); |
|
384 if (itemName.contains(MARKED) || itemName.contains(PARTIALLY_MARKED)) |
|
385 { |
|
386 selectDeselectTestCases(item, column); |
|
387 } |
|
388 } |
|
389 |
|
390 void TabWidgetTestRun::deselectCurrentCase() |
|
391 { |
|
392 deselectCase(treeWdgtTests->currentItem(), treeWdgtTests->currentColumn()); |
|
393 } |
|
394 |
|
395 void TabWidgetTestRun::deselectAllCases() |
|
396 { |
|
397 for (int i = 0; i < treeWdgtTests->topLevelItemCount(); ++i) |
|
398 { |
|
399 QString itemName = treeWdgtTests->topLevelItem(i)->text( |
|
400 treeWdgtTests->currentColumn()); |
|
401 if (itemName.contains(MARKED) || itemName.contains(PARTIALLY_MARKED)) |
|
402 { |
|
403 selectDeselectTestCases(treeWdgtTests->topLevelItem(i), |
|
404 treeWdgtTests->currentColumn()); |
|
405 } |
|
406 } |
|
407 } |
|
408 |
|
409 void TabWidgetTestRun::saveSettings(const Settings* settings) |
|
410 { |
|
411 testRunner->saveSettings(settings); |
|
412 } |
|
413 |
|
414 QString& TabWidgetTestRun::removeMark(QString& src) |
|
415 { |
|
416 return src.remove(MARKED).remove(UNMARKED).remove(PARTIALLY_MARKED); |
|
417 } |
|
418 |
|
419 void TabWidgetTestRun::selectDeselectTestCases(QTreeWidgetItem* item, |
|
420 int column) |
|
421 { |
|
422 QString itemName = item->text(column); |
|
423 QTreeWidgetItem* subItem; |
|
424 QString subName; |
|
425 if (treeWdgtTests->indexOfTopLevelItem(item) != -1) |
|
426 { |
|
427 // Top level item |
|
428 // Marked. Unmark them. |
|
429 if (itemName.contains(MARKED) || itemName.contains(PARTIALLY_MARKED)) |
|
430 { |
|
431 item->setText(column, itemName.replace(0, MARK_LEN, UNMARKED)); |
|
432 listSelectedTestItems->removeItem(removeMark(itemName)); |
|
433 for (int i = 0; i < item->childCount(); ++i) |
|
434 { |
|
435 subItem = item->child(i); |
|
436 subName = subItem->text(column); |
|
437 if (subName.contains(MARKED)) |
|
438 { |
|
439 subItem->setText(column, subName.replace(0, MARK_LEN, |
|
440 UNMARKED)); |
|
441 } |
|
442 } |
|
443 } |
|
444 // Unmarked. Mark them. |
|
445 else |
|
446 { |
|
447 QStringList subNames; |
|
448 for (int i = 0; i < item->childCount(); ++i) |
|
449 { |
|
450 subItem = item->child(i); |
|
451 subName = subItem->text(column); |
|
452 subItem->setText(column, subName.replace(0, MARK_LEN, MARKED)); |
|
453 subNames << removeMark(subName); |
|
454 } |
|
455 item->setText(column, itemName.replace(0, MARK_LEN, MARKED)); |
|
456 listSelectedTestItems->addItemExclusively(removeMark(itemName), |
|
457 subNames); |
|
458 } |
|
459 } |
|
460 else |
|
461 { |
|
462 // Child item |
|
463 // Marked. Unmark it. |
|
464 QTreeWidgetItem* parentItem = item->parent(); |
|
465 QString parentItemName = parentItem->text(column); |
|
466 if (itemName.contains(MARKED)) |
|
467 { |
|
468 item->setText(column, itemName.replace(0, MARK_LEN, UNMARKED)); |
|
469 listSelectedTestItems->removeOneSubItem( |
|
470 removeMark(parentItemName), removeMark(itemName)); |
|
471 int i = 0; |
|
472 for (; i < parentItem->childCount(); ++i) |
|
473 { |
|
474 if (parentItem->child(i)->text(column).contains(MARKED)) |
|
475 { |
|
476 parentItem->setText(column, |
|
477 parentItem->text(column).replace(0, MARK_LEN, |
|
478 PARTIALLY_MARKED)); |
|
479 break; |
|
480 } |
|
481 } |
|
482 if (i == parentItem->childCount()) |
|
483 { |
|
484 parentItem->setText(column, parentItem->text(column).replace( |
|
485 0, MARK_LEN, UNMARKED)); |
|
486 } |
|
487 } |
|
488 // Unmakred. Mark it. |
|
489 else |
|
490 { |
|
491 item->setText(column, itemName.replace(0, MARK_LEN, MARKED)); |
|
492 listSelectedTestItems->addOneSubItem(removeMark(parentItemName), |
|
493 removeMark(itemName)); |
|
494 int i = 0; |
|
495 for (; i < parentItem->childCount(); ++i) |
|
496 { |
|
497 if (parentItem->child(i)->text(column).contains(UNMARKED)) |
|
498 break; |
|
499 } |
|
500 if (i < parentItem->childCount()) |
|
501 { |
|
502 parentItem->setText(column, parentItem->text(column).replace( |
|
503 0, MARK_LEN, PARTIALLY_MARKED)); |
|
504 } |
|
505 else |
|
506 { |
|
507 parentItem->setText(column, parentItem->text(column).replace( |
|
508 0, MARK_LEN, MARKED)); |
|
509 } |
|
510 } |
|
511 } |
|
512 btnRun->setEnabled(!listSelectedTestItems->empty()); |
|
513 emit this->selectedTestsChanged(listSelectedTestItems->empty(), |
|
514 isAllCasesSelected(), item->text(column).contains(MARKED)); |
|
515 } |
|
516 |
|
517 void TabWidgetTestRun::setBtnExpandCollapseEnabled(QTreeWidgetItem* item) |
|
518 { |
|
519 if (treeWdgtTests->indexOfTopLevelItem(item) == -1) |
|
520 { |
|
521 btnExpandCollapse->setEnabled(false); |
|
522 } |
|
523 else |
|
524 { |
|
525 btnExpandCollapse->setEnabled(true); |
|
526 if (item == treeWdgtTests->currentItem()) |
|
527 { |
|
528 btnExpandCollapse->setText(item->isExpanded() ? COLLAPSE : EXPAND); |
|
529 } |
|
530 } |
|
531 } |
|
532 |
|
533 void TabWidgetTestRun::expandCollapseItem() |
|
534 { |
|
535 QTreeWidgetItem* cur = treeWdgtTests->currentItem(); |
|
536 cur->setExpanded(!cur->isExpanded()); |
|
537 btnExpandCollapse->setText(cur->isExpanded() ? COLLAPSE : EXPAND); |
|
538 } |
|
539 |
|
540 bool TabWidgetTestRun::isAllCasesSelected() |
|
541 { |
|
542 return listSelectedTestItems->isEqual(listTestItems); |
|
543 } |
|
544 |
|
545 void TabWidgetTestRun::pressLeftArrow() |
|
546 { |
|
547 // TODO |
|
548 } |
|
549 |
|
550 void TabWidgetTestRun::pressRightArrow() |
|
551 { |
|
552 // TODO |
|
553 } |
|
554 |
|
555 void TabWidgetTestRun::pressUpArrow() |
|
556 { |
|
557 // TODO |
|
558 } |
|
559 |
|
560 void TabWidgetTestRun::pressDownArrow() |
|
561 { |
|
562 // TODO |
|
563 } |
|
564 |
|
565 void TabWidgetTestRun::pressEnter() |
|
566 { |
|
567 // TODO |
|
568 } |