- Timestamp:
- 04/13/10 16:20:00 (13 years ago)
- Branches:
- master, qt5
- Children:
- 47d0a31
- Parents:
- 22232d9
- Location:
- src/gui
- Files:
-
- 7 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
src/gui/gui.pro
r22232d9 rad5c62f 46 46 tabcontainer.ui \ 47 47 mapwindow.ui \ 48 proxysettingsdialog.ui48 settingsdialog.ui 49 49 50 50 HEADERS += roomstabcontainer.h \ … … 64 64 tabcontainer.h \ 65 65 mapwindow.h \ 66 proxysettingsdialog.h66 settingsdialog.h 67 67 68 68 SOURCES += roomstabcontainer.cpp \ … … 82 82 tabcontainer.cpp \ 83 83 mapwindow.cpp \ 84 proxysettingsdialog.cpp84 settingsdialog.cpp 85 85 86 86 #maemo { -
src/gui/importschedulewidget.cpp
r22232d9 rad5c62f 20 20 21 21 #include <schedulexmlparser.h> 22 #include "proxysettingsdialog.h"23 22 24 23 #include <QDir> … … 52 51 connect(online, SIGNAL(clicked()), SLOT(downloadSchedule())); 53 52 54 connect(proxySettings, SIGNAL(clicked()), SLOT(setupProxy()));55 53 mNetworkAccessManager = new QNetworkAccessManager(this); 56 54 connect(mNetworkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkQueryFinished(QNetworkReply*))); … … 119 117 QNetworkRequest request; 120 118 request.setUrl(QUrl(SCHEDULE_URL)); 119 120 mNetworkAccessManager->setProxy(QNetworkProxy::applicationProxy()); 121 121 mNetworkAccessManager->get(request); 122 122 } … … 127 127 online->hide(); 128 128 progressBar->show(); 129 proxySettings->hide();129 // proxySettings->hide(); 130 130 131 131 int confId = mXmlParser->parseData(aData); … … 134 134 browse->show(); 135 135 online->show(); 136 proxySettings->show();136 // proxySettings->show(); 137 137 importScheduleLabel->setText("Import schedule: "); 138 138 … … 140 140 } 141 141 142 void ImportScheduleWidget::setupProxy()143 {144 ProxySettingsDialog dialog;145 dialog.exec();146 147 qDebug() << "Setting-up proxy: " << AppSettings::proxyAddress() << ":" << AppSettings::proxyPort();148 QNetworkProxy proxy(149 AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy,150 AppSettings::proxyAddress(),151 AppSettings::proxyPort(),152 PROXY_USERNAME,153 PROXY_PASSWD);154 QNetworkProxy::setApplicationProxy(proxy);155 156 mNetworkAccessManager->setProxy(QNetworkProxy::applicationProxy());157 }158 -
src/gui/importschedulewidget.h
r22232d9 rad5c62f 39 39 void networkQueryFinished(QNetworkReply *aReply); 40 40 void downloadSchedule(); 41 void setupProxy();42 41 signals: 43 42 void scheduleImported(int confId); -
src/gui/importschedulewidget.ui
r22232d9 rad5c62f 69 69 </item> 70 70 <item> 71 <widget class="QToolButton" name="proxySettings" > 72 <property name="text" > 73 <string>...</string> 74 </property> 75 <property name="icon" > 76 <iconset resource="../icons.qrc" > 77 <normaloff>:/icons/settings.png</normaloff>:/icons/settings.png</iconset> 78 </property> 79 <property name="autoRaise" > 80 <bool>true</bool> 81 </property> 82 </widget> 83 </item> 84 <item> 85 <widget class="QPushButton" name="browse" > 86 <property name="sizePolicy" > 87 <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > 71 <widget class="QPushButton" name="browse"> 72 <property name="sizePolicy"> 73 <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> 88 74 <horstretch>0</horstretch> 89 75 <verstretch>0</verstretch> -
src/gui/mainwindow.cpp
r22232d9 rad5c62f 38 38 #include "importschedulewidget.h" 39 39 #include "mapwindow.h" 40 #include "settingsdialog.h" 40 41 41 42 #include <tabcontainer.h> … … 86 87 connect(showMapButton, SIGNAL(clicked()), SLOT(conferenceMapClicked())); 87 88 88 connect(tabWidget, SIGNAL(infoIconClicked()), SLOT(aboutApp())); 89 connect(aboutAction, SIGNAL(triggered()), SLOT(aboutApp())); 90 connect(settingsAction, SIGNAL(triggered()), SLOT(setup())); 89 91 90 92 selectConference->setDuplicatesEnabled(false); … … 232 234 } 233 235 236 void MainWindow::setup() 237 { 238 SettingsDialog dialog; 239 dialog.exec(); 240 241 qDebug() << "Setting-up proxy: " << AppSettings::proxyAddress() << ":" << AppSettings::proxyPort(); 242 QNetworkProxy proxy( 243 AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy, 244 AppSettings::proxyAddress(), 245 AppSettings::proxyPort(), 246 PROXY_USERNAME, 247 PROXY_PASSWD); 248 QNetworkProxy::setApplicationProxy(proxy); 249 } -
src/gui/mainwindow.h
r22232d9 rad5c62f 38 38 void eventHasChanged(int aEventId, bool aReloadModel); 39 39 void conferenceChanged(int aIndex); 40 void setup(); 40 41 private: 41 42 void fillAndShowConferenceHeader(); -
src/gui/mainwindow.ui
r22232d9 rad5c62f 22 22 <layout class="QGridLayout" name="gridLayout" > 23 23 <item row="0" column="0" > 24 <widget class=" TabWidget" name="tabWidget" >24 <widget class="QTabWidget" name="tabWidget" > 25 25 <property name="currentIndex" > 26 26 <number>2</number> … … 306 306 </widget> 307 307 <widget class="QStatusBar" name="statusbar" /> 308 <widget class="QMenuBar" name="menuBar"> 309 <property name="geometry"> 310 <rect> 311 <x>0</x> 312 <y>0</y> 313 <width>903</width> 314 <height>25</height> 315 </rect> 316 </property> 317 <widget class="QMenu" name="menuMenu"> 318 <property name="title"> 319 <string>Menu</string> 320 </property> 321 <addaction name="settingsAction"/> 322 <addaction name="aboutAction"/> 323 </widget> 324 <addaction name="menuMenu"/> 325 </widget> 326 <action name="actionSettings"> 327 <property name="text"> 328 <string>Settings</string> 329 </property> 330 </action> 331 <action name="settingsAction"> 332 <property name="icon"> 333 <iconset resource="../icons.qrc"> 334 <normaloff>:/icons/settings.png</normaloff>:/icons/settings.png</iconset> 335 </property> 336 <property name="text"> 337 <string>Settings</string> 338 </property> 339 </action> 340 <action name="aboutAction"> 341 <property name="icon"> 342 <iconset resource="../icons.qrc"> 343 <normaloff>:/icons/info.png</normaloff>:/icons/info.png</iconset> 344 </property> 345 <property name="text"> 346 <string>About</string> 347 </property> 348 </action> 308 349 </widget> 309 350 <customwidgets> 310 <customwidget>311 <class>TabWidget</class>312 <extends>QTabWidget</extends>313 <header>tabwidget.h</header>314 <container>1</container>315 </customwidget>316 351 <customwidget> 317 352 <class>ImportScheduleWidget</class> -
src/gui/settingsdialog.cpp
r22232d9 rad5c62f 17 17 * fosdem-schedule. If not, see <http://www.gnu.org/licenses/>. 18 18 */ 19 #include " proxysettingsdialog.h"19 #include "settingsdialog.h" 20 20 21 21 #include <appsettings.h> 22 22 #include <QDebug> 23 23 24 ProxySettingsDialog::ProxySettingsDialog(QWidget *aParent)24 SettingsDialog::SettingsDialog(QWidget *aParent) 25 25 : QDialog(aParent) 26 26 { … … 39 39 } 40 40 41 void ProxySettingsDialog::connectionTypeChanged(bool aState)41 void SettingsDialog::connectionTypeChanged(bool aState) 42 42 { 43 43 aState ? proxyWidget->hide() : proxyWidget->show(); 44 44 } 45 45 46 void ProxySettingsDialog::saveDialogData()46 void SettingsDialog::saveDialogData() 47 47 { 48 48 // serialize dialog data -
src/gui/settingsdialog.h
r22232d9 rad5c62f 17 17 * fosdem-schedule. If not, see <http://www.gnu.org/licenses/>. 18 18 */ 19 #ifndef PROXYSETTINGSDIALOG_H20 #define PROXYSETTINGSDIALOG_H19 #ifndef SETTINGSDIALOG_H 20 #define SETTINGSDIALOG_H 21 21 22 22 #include <QDialog> 23 #include "ui_ proxysettingsdialog.h"23 #include "ui_settingsdialog.h" 24 24 25 class ProxySettingsDialog : public QDialog, Ui::ProxySettingsDialog25 class SettingsDialog : public QDialog, Ui::SettingsDialog 26 26 { 27 27 Q_OBJECT 28 28 public: 29 ProxySettingsDialog(QWidget *aParent = NULL);30 ~ ProxySettingsDialog() {}29 SettingsDialog(QWidget *aParent = NULL); 30 ~SettingsDialog() {} 31 31 private slots: 32 32 void connectionTypeChanged(bool aState); -
src/gui/settingsdialog.ui
r22232d9 rad5c62f 1 1 <ui version="4.0" > 2 <class> ProxySettingsDialog</class>3 <widget class="QDialog" name=" ProxySettingsDialog" >2 <class>SettingsDialog</class> 3 <widget class="QDialog" name="SettingsDialog" > 4 4 <property name="geometry" > 5 5 <rect> … … 17 17 </property> 18 18 <property name="windowTitle" > 19 <string> Proxy settings</string>19 <string>Settings</string> 20 20 </property> 21 21 <layout class="QVBoxLayout" name="verticalLayout" > 22 22 <item> 23 <widget class="QGroupBox" name="groupBox"> 24 <property name="title"> 25 <string>Proxy Settings</string> 26 </property> 27 <layout class="QVBoxLayout" name="verticalLayout_2"> 28 <item> 23 29 <widget class="QCheckBox" name="directConnection" > 24 30 <property name="text" > … … 71 77 <size> 72 78 <width>20</width> 73 <height>10</height>79 <height>24</height> 74 80 </size> 75 81 </property> … … 102 108 </layout> 103 109 </widget> 110 </item> 111 </layout> 112 </widget> 104 113 <resources/> 105 114 <connections/>
Note: See TracChangeset
for help on using the changeset viewer.