comparison ui/mainwindow.cpp @ 507:20973a56d5ec

Use is_admin to determine if UAC icon should be painted on the button
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 28 Apr 2014 09:22:12 +0000
parents 077b4342d69b
children d1812e171d0c
comparison
equal deleted inserted replaced
506:bfcfbae151ab 507:20973a56d5ec
48 #include "aboutdialog.h" 48 #include "aboutdialog.h"
49 #include "statusdialog.h" 49 #include "statusdialog.h"
50 #include "certificateitemdelegate.h" 50 #include "certificateitemdelegate.h"
51 #include "separatoritemdelegate.h" 51 #include "separatoritemdelegate.h"
52 #include "installwrapper.h" 52 #include "installwrapper.h"
53 #include "util.h"
53 54
54 MainWindow::MainWindow(bool trayMode): 55 MainWindow::MainWindow(bool trayMode):
55 mTrayMode(trayMode) 56 mTrayMode(trayMode)
56 { 57 {
57 createActions(); 58 createActions();
411 bottomLayout->insertStretch(0, 10); 412 bottomLayout->insertStretch(0, 10);
412 bottomLayout->addWidget(installButton); 413 bottomLayout->addWidget(installButton);
413 bottomLayout->setAlignment(installButton, Qt::AlignBottom); 414 bottomLayout->setAlignment(installButton, Qt::AlignBottom);
414 bottomLayout->addWidget(quitButton); 415 bottomLayout->addWidget(quitButton);
415 bottomLayout->setAlignment(quitButton, Qt::AlignBottom); 416 bottomLayout->setAlignment(quitButton, Qt::AlignBottom);
417
418 #ifdef Q_OS_WIN
419 if (is_admin()) {
420 QIcon uacShield = QApplication::style()->standardIcon(QStyle::SP_VistaShield);
421 installButton->setIcon(uacShield);
422 }
423 #endif
416 424
417 // The certificate details 425 // The certificate details
418 QGroupBox *detailBox = new QGroupBox(tr("Details")); 426 QGroupBox *detailBox = new QGroupBox(tr("Details"));
419 QLabel *subjectCN = new QLabel(tr("Subject Common Name:")); 427 QLabel *subjectCN = new QLabel(tr("Subject Common Name:"));
420 QLabel *subjectOU = new QLabel(tr("Subject Organisation:")); 428 QLabel *subjectOU = new QLabel(tr("Subject Organisation:"));

http://wald.intevation.org/projects/trustbridge/