@@ -442,28 +442,55 void tst_QBarSet::customize() | |||
|
442 | 442 | *set1 << 1 << 2 << 1 << 3; |
|
443 | 443 | *set2 << 2 << 1 << 3 << 1; |
|
444 | 444 | |
|
445 | // Remove sets from series | |
|
446 | series->remove(set1); | |
|
447 | series->remove(set2); | |
|
448 | ||
|
445 | 449 | // Test pen |
|
446 | 450 | QVERIFY(set1->pen() != QPen()); |
|
447 | 451 | QVERIFY(set2->pen() == QPen()); |
|
448 | 452 | QPen pen(QColor(128,128,128,128)); |
|
449 | 453 | set1->setPen(pen); |
|
450 | QVERIFY(set1->pen() == pen); | |
|
451 | QVERIFY(set2->pen() == QPen()); | |
|
454 | ||
|
455 | // Add sets back to series | |
|
456 | series->append(set1); | |
|
457 | series->append(set2); | |
|
458 | ||
|
459 | QVERIFY(set1->pen() == pen); // Should be customized | |
|
460 | QVERIFY(set2->pen() != QPen()); // Should be decorated by theme | |
|
461 | ||
|
462 | // Remove sets from series | |
|
463 | series->remove(set1); | |
|
464 | series->remove(set2); | |
|
452 | 465 | |
|
453 | 466 | // Test brush |
|
467 | set2->setBrush(QBrush()); | |
|
454 | 468 | QVERIFY(set1->brush() != QBrush()); |
|
455 | 469 | QVERIFY(set2->brush() == QBrush()); |
|
456 | 470 | QBrush brush(QColor(128,128,128,128)); |
|
457 | 471 | set1->setBrush(brush); |
|
458 | QVERIFY(set1->brush() == brush); | |
|
459 | QVERIFY(set2->brush() == QBrush()); | |
|
472 | ||
|
473 | // Add sets back to series | |
|
474 | series->append(set1); | |
|
475 | series->append(set2); | |
|
476 | ||
|
477 | QVERIFY(set1->brush() == brush); // Should be customized | |
|
478 | QVERIFY(set2->brush() != QBrush()); // Should be decorated by theme | |
|
479 | ||
|
480 | // Remove sets from series | |
|
481 | series->remove(set1); | |
|
482 | series->remove(set2); | |
|
460 | 483 | |
|
461 | 484 | // Test label brush |
|
485 | set2->setLabelBrush(QBrush()); | |
|
462 | 486 | QVERIFY(set1->labelBrush() != QBrush()); |
|
463 | 487 | QVERIFY(set2->labelBrush() == QBrush()); |
|
464 | 488 | set1->setLabelBrush(brush); |
|
465 | QVERIFY(set1->labelBrush() == brush); | |
|
466 | QVERIFY(set2->labelBrush() == QBrush()); | |
|
489 | ||
|
490 | series->append(set1); | |
|
491 | series->append(set2); | |
|
492 | QVERIFY(set1->labelBrush() == brush); // Should be customized | |
|
493 | QVERIFY(set2->labelBrush() != QBrush()); // Should be decorated by theme | |
|
467 | 494 | |
|
468 | 495 | // Test label font |
|
469 | 496 | // Note: QFont empty constructor creates font with application's default font, so the font may or may not be the |
@@ -480,8 +507,12 void tst_QBarSet::customize() | |||
|
480 | 507 | // Test adding data to the sets |
|
481 | 508 | *set1 << 1 << 2 << 1 << 3; |
|
482 | 509 | *set2 << 2 << 1 << 3 << 1; |
|
510 | ||
|
483 | 511 | } |
|
484 | 512 | |
|
513 | ||
|
514 | ||
|
515 | ||
|
485 | 516 | QTEST_MAIN(tst_QBarSet) |
|
486 | 517 | |
|
487 | 518 | #include "tst_qbarset.moc" |
General Comments 0
You need to be logged in to leave comments.
Login now