Mercurial > trustbridge
comparison ui/mainwindow.cpp @ 1096:10f0efd197c7
(issue111) Rework header to be simpler and left bound.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 15 Sep 2014 10:53:21 +0200 |
parents | a0fb21625cf3 |
children | b033a7d26f2e |
comparison
equal
deleted
inserted
replaced
1095:a0fb21625cf3 | 1096:10f0efd197c7 |
---|---|
598 { | 598 { |
599 QWidget * theWidget = new QWidget; | 599 QWidget * theWidget = new QWidget; |
600 QVBoxLayout *updatesMainLayout = new QVBoxLayout; | 600 QVBoxLayout *updatesMainLayout = new QVBoxLayout; |
601 | 601 |
602 /* The header */ | 602 /* The header */ |
603 QGridLayout *updatesHeaderLayout = new QGridLayout; | 603 QVBoxLayout *updatesHeaderLayout = new QVBoxLayout; |
604 | |
604 | 605 |
605 /* Header 1: Update date and search button */ | 606 /* Header 1: Update date and search button */ |
606 QHBoxLayout *updateDateAndSearchButton = new QHBoxLayout; | 607 QHBoxLayout *updateDateAndSearchButton = new QHBoxLayout; |
607 mUpdatesHeader = | 608 mUpdatesHeader = |
608 new QLabel("<h2>" + tr("Certificates unchanged")+ "</h2>"); | 609 new QLabel("<h2>" + tr("Certificates unchanged")+ "</h2>"); |
628 searchUpdates->setIcon(QIcon(":/img/update-list.png")); | 629 searchUpdates->setIcon(QIcon(":/img/update-list.png")); |
629 connect(searchUpdates, SIGNAL(clicked()), this, SLOT(checkUpdates())); | 630 connect(searchUpdates, SIGNAL(clicked()), this, SLOT(checkUpdates())); |
630 updateDateAndSearchButton->addWidget(mLastUpdateCheckContents); | 631 updateDateAndSearchButton->addWidget(mLastUpdateCheckContents); |
631 updateDateAndSearchButton->addWidget(searchUpdates); | 632 updateDateAndSearchButton->addWidget(searchUpdates); |
632 | 633 |
633 // addWidget(*Widget, row, column, rowspan, colspan, [Qt::Alignment]) | 634 updatesHeaderLayout->addWidget(mUpdatesHeader); |
634 updatesHeaderLayout->addWidget(mUpdatesHeader, 0, 0, 1, 2); | 635 // TODO updatesHeaderLayout->addWidget(mLastUpdateCheck, 2, 0, 1, 1); |
635 updatesHeaderLayout->addWidget(mLastUpdateCheck, 2, 0, 1, 1); | 636 // TODO updatesHeaderLayout->addLayout(updateDateAndSearchButton, 2, 1, 1, 1); |
636 updatesHeaderLayout->addLayout(updateDateAndSearchButton, 2, 1, 1, 1); | 637 // TODO updatesHeaderLayout->addWidget(mLastCertUpdate, 3, 0, 1, 1); |
637 // updatesHeaderLayout->addWidget(mLastUpdateCheckContents, 2, 1, 1, 1); | 638 // TODO updatesHeaderLayout->addWidget(mLastCertUpdateContents, 3, 1, 1, 1); |
638 updatesHeaderLayout->addWidget(mLastCertUpdate, 3, 0, 1, 1); | |
639 updatesHeaderLayout->addWidget(mLastCertUpdateContents, 3, 1, 1, 1); | |
640 updatesHeaderLayout->setColumnStretch(3, 1); | |
641 | |
642 // updatesHeaderLayout->addWidget(searchUpdates, 1, 4, 1, 2, Qt::AlignRight); | |
643 updatesHeaderLayout->setRowMinimumHeight(4, 15); | |
644 | 639 |
645 /* Header 2: Action text and buttons */ | 640 /* Header 2: Action text and buttons */ |
646 mUpdatesTip = | 641 mUpdatesTip = |
647 new QLabel(tr("There are currently no changes for your certificate stores.")); | 642 new QLabel(tr("There are currently no changes for your certificate stores.")); |
648 mUpdatesTip->setWordWrap(true); | 643 mUpdatesTip->setWordWrap(true); |
663 #endif | 658 #endif |
664 connect(mQuitButton, SIGNAL(clicked()), this, SLOT(closeApp())); | 659 connect(mQuitButton, SIGNAL(clicked()), this, SLOT(closeApp())); |
665 connect(mInstallButton, SIGNAL(clicked()), this, SLOT(checkAndInstallCerts())); | 660 connect(mInstallButton, SIGNAL(clicked()), this, SLOT(checkAndInstallCerts())); |
666 | 661 |
667 // addWidget(*Widget, row, column, rowspan, colspan) | 662 // addWidget(*Widget, row, column, rowspan, colspan) |
668 updatesHeaderLayout->addWidget(mUpdatesTip, 5, 0, 1, 4); | 663 // TODO updatesHeaderLayout->addWidget(mUpdatesTip, 5, 0, 1, 4); |
669 updatesHeaderActionButtonLayout->addWidget(mInstallButton); | 664 updatesHeaderActionButtonLayout->addWidget(mInstallButton); |
670 updatesHeaderActionButtonLayout->addWidget(mQuitButton); | 665 updatesHeaderActionButtonLayout->addWidget(mQuitButton); |
671 updatesHeaderLayout->addLayout(updatesHeaderActionButtonLayout, 6, 0, 1, -1, Qt::AlignRight); | 666 updatesHeaderActionButtonLayout->addStretch(-1); |
672 updatesHeaderLayout->setRowMinimumHeight(7, 10); | 667 updatesHeaderLayout->addLayout(updatesHeaderActionButtonLayout); |
668 updatesHeaderLayout->addSpacing(20); | |
669 | |
670 /* The splitter line */ | |
671 QFrame *line = new QFrame(); | |
672 line->setFrameShape(QFrame::HLine); | |
673 line->setFrameShadow(QFrame::Sunken); | |
674 updatesHeaderLayout->addWidget(line); | |
673 | 675 |
674 /* The central panels. */ | 676 /* The central panels. */ |
675 QScrollArea *centralScrollArea = new QScrollArea; | 677 QScrollArea *centralScrollArea = new QScrollArea; |
676 QVBoxLayout *updatesCenterLayout = new QVBoxLayout; | 678 QVBoxLayout *updatesCenterLayout = new QVBoxLayout; |
677 QHBoxLayout *updatesNewLayout = new QHBoxLayout; | 679 QHBoxLayout *updatesNewLayout = new QHBoxLayout; |