comparison ui/mainwindow.cpp @ 956:879a634d0a40

(issue41) Add proxy support
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 27 Aug 2014 16:31:40 +0200
parents 7c89c5dc2200
children 423e31ac656e
comparison
equal deleted inserted replaced
955:0f7aeb12e5e9 956:879a634d0a40
41 #include "logging.h" 41 #include "logging.h"
42 #include "binverify.h" 42 #include "binverify.h"
43 #include "processhelp.h" 43 #include "processhelp.h"
44 #include "processwaitdialog.h" 44 #include "processwaitdialog.h"
45 #include "trayicon.h" 45 #include "trayicon.h"
46 #include "proxysettingsdlg.h"
46 47
47 // The amount of time in minutes stay silent if we have 48 // The amount of time in minutes stay silent if we have
48 // something to say 49 // something to say
49 #define NAG_INTERVAL_MINUTES 70 50 #define NAG_INTERVAL_MINUTES 70
50 51
526 527
527 QHBoxLayout *helpButtonLayout = new QHBoxLayout(); 528 QHBoxLayout *helpButtonLayout = new QHBoxLayout();
528 QPushButton *helpButton = new QPushButton(tr("Show Help")); 529 QPushButton *helpButton = new QPushButton(tr("Show Help"));
529 connect(helpButton, SIGNAL(clicked()), this, SLOT(showHelp())); 530 connect(helpButton, SIGNAL(clicked()), this, SLOT(showHelp()));
530 helpButtonLayout->addWidget(helpButton); 531 helpButtonLayout->addWidget(helpButton);
532 #ifdef USE_CURL
533 QPushButton *proxySettingsButton = new QPushButton(tr("Proxy settings"));
534 proxySettingsButton->setIcon(QIcon(":/img/preferences-network_16.png"));
535 connect(proxySettingsButton, SIGNAL(clicked()), this, SLOT(showProxySettings()));
536 helpButtonLayout->addWidget(proxySettingsButton);
537 #endif
531 helpButtonLayout->addStretch(); 538 helpButtonLayout->addStretch();
532 infoCenterLayout->addLayout(helpButtonLayout); 539 infoCenterLayout->addLayout(helpButtonLayout);
533 540
534 infoCenterLayout->insertStretch(8, 10); 541 infoCenterLayout->insertStretch(8, 10);
535 542
1391 mChangeCount = cnt; 1398 mChangeCount = cnt;
1392 emit changesChanged(QString("%1").arg(cnt)); 1399 emit changesChanged(QString("%1").arg(cnt));
1393 } 1400 }
1394 } 1401 }
1395 1402
1403 void MainWindow::showProxySettings()
1404 {
1405 ProxySettingsDlg *dlg = new ProxySettingsDlg(this);
1406 dlg->exec();
1407 }
1408
1396 void MainWindow::showHelp() 1409 void MainWindow::showHelp()
1397 { 1410 {
1398 char *inst_dir = get_install_dir(); 1411 char *inst_dir = get_install_dir();
1399 if (!inst_dir) { 1412 if (!inst_dir) {
1400 qDebug() << "Failed to find install dir"; 1413 qDebug() << "Failed to find install dir";

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