- Timestamp:
- 01/29/10 15:16:05 (13 years ago)
- Branches:
- master, qt5
- Children:
- 6645e1f
- Parents:
- 5007fde
- Location:
- src/gui
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/gui.pro
r5007fde ra023fd2 45 45 conflictsdialog.ui \ 46 46 tabcontainer.ui \ 47 mapwindow.ui 47 mapwindow.ui \ 48 proxysettingsdialog.ui 48 49 49 50 HEADERS += roomstabcontainer.h \ … … 62 63 tabwidget.h \ 63 64 tabcontainer.h \ 64 mapwindow.h 65 mapwindow.h \ 66 proxysettingsdialog.h 65 67 66 68 SOURCES += roomstabcontainer.cpp \ … … 79 81 tabwidget.cpp \ 80 82 tabcontainer.cpp \ 81 mapwindow.cpp 83 mapwindow.cpp \ 84 proxysettingsdialog.cpp 82 85 83 86 maemo { -
src/gui/importschedulewidget.cpp
r5007fde ra023fd2 2 2 3 3 #include <schedulexmlparser.h> 4 #include "proxysettingsdialog.h" 4 5 5 6 #include <QDir> … … 10 11 #include <QNetworkReply> 11 12 #include <QDebug> 13 #include <appsettings.h> 12 14 13 15 const QString SCHEDULE_URL = "http://fosdem.org/2010/schedule/xml"; 16 17 const QString PROXY_USERNAME; 18 const QString PROXY_PASSWD; 14 19 15 20 ImportScheduleWidget::ImportScheduleWidget(QWidget *aParent) … … 29 34 connect(online, SIGNAL(clicked()), SLOT(downloadSchedule())); 30 35 36 connect(proxySettings, SIGNAL(clicked()), SLOT(setupProxy())); 31 37 mNetworkAccessManager = new QNetworkAccessManager(this); 32 38 connect(mNetworkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkQueryFinished(QNetworkReply*))); … … 81 87 void ImportScheduleWidget::networkQueryFinished(QNetworkReply *aReply) 82 88 { 83 qDebug() << "ImportScheduleWidget::networkQueryFinished()";84 85 89 if ( aReply->error() != QNetworkReply::NoError ) 86 90 { … … 95 99 void ImportScheduleWidget::downloadSchedule() 96 100 { 97 qDebug() << "downloading schedule";98 99 101 QNetworkRequest request; 100 102 request.setUrl(QUrl(SCHEDULE_URL)); … … 107 109 online->hide(); 108 110 progressBar->show(); 111 proxySettings->hide(); 109 112 110 113 int confId = mXmlParser->parseData(aData); … … 113 116 browse->show(); 114 117 online->show(); 118 proxySettings->show(); 115 119 importScheduleLabel->setText("Import schedule: "); 116 120 … … 118 122 } 119 123 124 void ImportScheduleWidget::setupProxy() 125 { 126 ProxySettingsDialog dialog; 127 dialog.exec(); 128 129 qDebug() << "Setting-up proxy: " << AppSettings::proxyAddress() << ":" << AppSettings::proxyPort(); 130 QNetworkProxy proxy( 131 AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy, 132 AppSettings::proxyAddress(), 133 AppSettings::proxyPort(), 134 PROXY_USERNAME, 135 PROXY_PASSWD); 136 QNetworkProxy::setApplicationProxy(proxy); 137 138 mNetworkAccessManager->setProxy(QNetworkProxy::applicationProxy()); 139 } 140 -
src/gui/importschedulewidget.h
r5007fde ra023fd2 21 21 void networkQueryFinished(QNetworkReply *aReply); 22 22 void downloadSchedule(); 23 void setupProxy(); 23 24 signals: 24 25 void scheduleImported(int confId); -
src/gui/importschedulewidget.ui
r5007fde ra023fd2 6 6 <x>0</x> 7 7 <y>0</y> 8 <width>6 34</width>8 <width>662</width> 9 9 <height>66</height> 10 10 </rect> … … 69 69 </item> 70 70 <item> 71 <widget class="QToolButton" name="proxySettings" > 72 <property name="text" > 73 <string>...</string> 74 </property> 75 <property name="autoRaise" > 76 <bool>true</bool> 77 </property> 78 </widget> 79 </item> 80 <item> 71 81 <widget class="QPushButton" name="browse" > 72 82 <property name="sizePolicy" > -
src/gui/mainwindow.cpp
r5007fde ra023fd2 22 22 23 23 #include <tabcontainer.h> 24 25 const QString PROXY_URL("192.168.0.252"); 26 const quint16 PROXY_PORT = 4040; 24 #include <appsettings.h> 25 27 26 const QString PROXY_USERNAME; 28 27 const QString PROXY_PASSWD; 29 const bool DIRECT_CONNECTION = false;30 28 31 29 MainWindow::MainWindow(int aEventId, QWidget *aParent) … … 34 32 setupUi(this); 35 33 36 qDebug() << "Setting-up proxy: " << PROXY_URL << ":" << PROXY_PORT; 37 QNetworkProxy proxy(DIRECT_CONNECTION ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy, 38 PROXY_URL, PROXY_PORT, PROXY_USERNAME, PROXY_PASSWD); 34 qDebug() << "Setting-up proxy: " << AppSettings::proxyAddress() << ":" << AppSettings::proxyPort(); 35 QNetworkProxy proxy( 36 AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy, 37 AppSettings::proxyAddress(), 38 AppSettings::proxyPort(), 39 PROXY_USERNAME, 40 PROXY_PASSWD); 39 41 QNetworkProxy::setApplicationProxy(proxy); 40 42
Note: See TracChangeset
for help on using the changeset viewer.