conflictsdialog.ui \
tabcontainer.ui \
mapwindow.ui \
- proxysettingsdialog.ui
+ settingsdialog.ui
HEADERS += roomstabcontainer.h \
nowtabcontainer.h \
tabwidget.h \
tabcontainer.h \
mapwindow.h \
- proxysettingsdialog.h
+ settingsdialog.h
SOURCES += roomstabcontainer.cpp \
nowtabcontainer.cpp \
tabwidget.cpp \
tabcontainer.cpp \
mapwindow.cpp \
- proxysettingsdialog.cpp
+ settingsdialog.cpp
#maemo {
# FORMS += alarmdialog.ui
#include "importschedulewidget.h"
#include <schedulexmlparser.h>
-#include "proxysettingsdialog.h"
#include <QDir>
#include <QFile>
importAction->hide();
connect(online, SIGNAL(clicked()), SLOT(downloadSchedule()));
- connect(proxySettings, SIGNAL(clicked()), SLOT(setupProxy()));
mNetworkAccessManager = new QNetworkAccessManager(this);
connect(mNetworkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkQueryFinished(QNetworkReply*)));
mNetworkAccessManager->setProxy(QNetworkProxy::applicationProxy());
{
QNetworkRequest request;
request.setUrl(QUrl(SCHEDULE_URL));
+
+ mNetworkAccessManager->setProxy(QNetworkProxy::applicationProxy());
mNetworkAccessManager->get(request);
}
browse->hide();
online->hide();
progressBar->show();
- proxySettings->hide();
+ // proxySettings->hide();
int confId = mXmlParser->parseData(aData);
progressBar->hide();
browse->show();
online->show();
- proxySettings->show();
+ // proxySettings->show();
importScheduleLabel->setText("Import schedule: ");
emit(scheduleImported(confId));
}
-void ImportScheduleWidget::setupProxy()
-{
- ProxySettingsDialog dialog;
- dialog.exec();
-
- qDebug() << "Setting-up proxy: " << AppSettings::proxyAddress() << ":" << AppSettings::proxyPort();
- QNetworkProxy proxy(
- AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy,
- AppSettings::proxyAddress(),
- AppSettings::proxyPort(),
- PROXY_USERNAME,
- PROXY_PASSWD);
- QNetworkProxy::setApplicationProxy(proxy);
-
- mNetworkAccessManager->setProxy(QNetworkProxy::applicationProxy());
-}
-
void showParsingProgress(int progress);
void networkQueryFinished(QNetworkReply *aReply);
void downloadSchedule();
- void setupProxy();
signals:
void scheduleImported(int confId);
private:
</widget>
</item>
<item>
- <widget class="QToolButton" name="proxySettings" >
- <property name="text" >
- <string>...</string>
- </property>
- <property name="icon" >
- <iconset resource="../icons.qrc" >
- <normaloff>:/icons/settings.png</normaloff>:/icons/settings.png</iconset>
- </property>
- <property name="autoRaise" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="browse" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <widget class="QPushButton" name="browse">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
#include "daynavigatorwidget.h"
#include "importschedulewidget.h"
#include "mapwindow.h"
+#include "settingsdialog.h"
#include <tabcontainer.h>
#include <appsettings.h>
// event conference map button clicked
connect(showMapButton, SIGNAL(clicked()), SLOT(conferenceMapClicked()));
- connect(tabWidget, SIGNAL(infoIconClicked()), SLOT(aboutApp()));
+ connect(aboutAction, SIGNAL(triggered()), SLOT(aboutApp()));
+ connect(settingsAction, SIGNAL(triggered()), SLOT(setup()));
selectConference->setDuplicatesEnabled(false);
int confCount = Conference::getAll().count();
setWindowTitle(Conference::getById(Conference::activeConference()).title());
}
+void MainWindow::setup()
+{
+ SettingsDialog dialog;
+ dialog.exec();
+
+ qDebug() << "Setting-up proxy: " << AppSettings::proxyAddress() << ":" << AppSettings::proxyPort();
+ QNetworkProxy proxy(
+ AppSettings::isDirectConnection() ? QNetworkProxy::NoProxy : QNetworkProxy::HttpProxy,
+ AppSettings::proxyAddress(),
+ AppSettings::proxyPort(),
+ PROXY_USERNAME,
+ PROXY_PASSWD);
+ QNetworkProxy::setApplicationProxy(proxy);
+}
void conferenceMapClicked();
void eventHasChanged(int aEventId, bool aReloadModel);
void conferenceChanged(int aIndex);
+ void setup();
private:
void fillAndShowConferenceHeader();
void initTabs();
<widget class="QWidget" name="centralwidget" >
<layout class="QGridLayout" name="gridLayout" >
<item row="0" column="0" >
- <widget class="TabWidget" name="tabWidget" >
+ <widget class="QTabWidget" name="tabWidget" >
<property name="currentIndex" >
<number>2</number>
</property>
</layout>
</widget>
<widget class="QStatusBar" name="statusbar" />
+ <widget class="QMenuBar" name="menuBar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>903</width>
+ <height>25</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menuMenu">
+ <property name="title">
+ <string>Menu</string>
+ </property>
+ <addaction name="settingsAction"/>
+ <addaction name="aboutAction"/>
+ </widget>
+ <addaction name="menuMenu"/>
+ </widget>
+ <action name="actionSettings">
+ <property name="text">
+ <string>Settings</string>
+ </property>
+ </action>
+ <action name="settingsAction">
+ <property name="icon">
+ <iconset resource="../icons.qrc">
+ <normaloff>:/icons/settings.png</normaloff>:/icons/settings.png</iconset>
+ </property>
+ <property name="text">
+ <string>Settings</string>
+ </property>
+ </action>
+ <action name="aboutAction">
+ <property name="icon">
+ <iconset resource="../icons.qrc">
+ <normaloff>:/icons/info.png</normaloff>:/icons/info.png</iconset>
+ </property>
+ <property name="text">
+ <string>About</string>
+ </property>
+ </action>
</widget>
<customwidgets>
- <customwidget>
- <class>TabWidget</class>
- <extends>QTabWidget</extends>
- <header>tabwidget.h</header>
- <container>1</container>
- </customwidget>
<customwidget>
<class>ImportScheduleWidget</class>
<extends>QWidget</extends>
+++ /dev/null
-/*
- * Copyright (C) 2010 Ixonos Plc.
- *
- * This file is part of fosdem-schedule.
- *
- * fosdem-schedule is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 2 of the License, or (at your option)
- * any later version.
- *
- * fosdem-schedule is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * fosdem-schedule. If not, see <http://www.gnu.org/licenses/>.
- */
-#include "proxysettingsdialog.h"
-
-#include <appsettings.h>
-#include <QDebug>
-
-ProxySettingsDialog::ProxySettingsDialog(QWidget *aParent)
- : QDialog(aParent)
-{
- setupUi(this);
-
- // deserialize dialog data
- address->setText(AppSettings::proxyAddress());
- port->setValue(AppSettings::proxyPort());
- directConnection->setChecked(AppSettings::isDirectConnection());
-
- connect(okButton, SIGNAL(clicked()), SLOT(saveDialogData()));
- connect(directConnection, SIGNAL(clicked(bool)), SLOT(connectionTypeChanged(bool)));
-
- if(directConnection->isChecked())
- proxyWidget->hide();
-}
-
-void ProxySettingsDialog::connectionTypeChanged(bool aState)
-{
- aState ? proxyWidget->hide() : proxyWidget->show();
-}
-
-void ProxySettingsDialog::saveDialogData()
-{
- // serialize dialog data
- AppSettings::setProxyAddress(address->text());
- AppSettings::setProxyPort(port->value());
- AppSettings::setDirectConnection(directConnection->isChecked());
-
- close();
-}
-
+++ /dev/null
-/*
- * Copyright (C) 2010 Ixonos Plc.
- *
- * This file is part of fosdem-schedule.
- *
- * fosdem-schedule is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 2 of the License, or (at your option)
- * any later version.
- *
- * fosdem-schedule is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * fosdem-schedule. If not, see <http://www.gnu.org/licenses/>.
- */
-#ifndef PROXYSETTINGSDIALOG_H
-#define PROXYSETTINGSDIALOG_H
-
-#include <QDialog>
-#include "ui_proxysettingsdialog.h"
-
-class ProxySettingsDialog : public QDialog, Ui::ProxySettingsDialog
-{
- Q_OBJECT
-public:
- ProxySettingsDialog(QWidget *aParent = NULL);
- ~ProxySettingsDialog() {}
-private slots:
- void connectionTypeChanged(bool aState);
- void saveDialogData();
-};
-
-#endif /* PROXYSETTINGSDIALOG_H */
-
+++ /dev/null
-<ui version="4.0" >
- <class>ProxySettingsDialog</class>
- <widget class="QDialog" name="ProxySettingsDialog" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>469</width>
- <height>146</height>
- </rect>
- </property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="windowTitle" >
- <string>Proxy settings</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout" >
- <item>
- <widget class="QCheckBox" name="directConnection" >
- <property name="text" >
- <string>Direct connection</string>
- </property>
- <property name="checked" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QWidget" native="1" name="proxyWidget" >
- <layout class="QHBoxLayout" name="horizontalLayout_3" >
- <item>
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>Address: </string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="address" />
- </item>
- <item>
- <widget class="QLabel" name="label_2" >
- <property name="text" >
- <string>Port:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="port" >
- <property name="maximum" >
- <number>9999</number>
- </property>
- <property name="value" >
- <number>8080</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer" >
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>10</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout" >
- <item>
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="okButton" >
- <property name="text" >
- <string>OK</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
--- /dev/null
+/*
+ * Copyright (C) 2010 Ixonos Plc.
+ *
+ * This file is part of fosdem-schedule.
+ *
+ * fosdem-schedule is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * fosdem-schedule is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * fosdem-schedule. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "settingsdialog.h"
+
+#include <appsettings.h>
+#include <QDebug>
+
+SettingsDialog::SettingsDialog(QWidget *aParent)
+ : QDialog(aParent)
+{
+ setupUi(this);
+
+ // deserialize dialog data
+ address->setText(AppSettings::proxyAddress());
+ port->setValue(AppSettings::proxyPort());
+ directConnection->setChecked(AppSettings::isDirectConnection());
+
+ connect(okButton, SIGNAL(clicked()), SLOT(saveDialogData()));
+ connect(directConnection, SIGNAL(clicked(bool)), SLOT(connectionTypeChanged(bool)));
+
+ if(directConnection->isChecked())
+ proxyWidget->hide();
+}
+
+void SettingsDialog::connectionTypeChanged(bool aState)
+{
+ aState ? proxyWidget->hide() : proxyWidget->show();
+}
+
+void SettingsDialog::saveDialogData()
+{
+ // serialize dialog data
+ AppSettings::setProxyAddress(address->text());
+ AppSettings::setProxyPort(port->value());
+ AppSettings::setDirectConnection(directConnection->isChecked());
+
+ close();
+}
+
--- /dev/null
+/*
+ * Copyright (C) 2010 Ixonos Plc.
+ *
+ * This file is part of fosdem-schedule.
+ *
+ * fosdem-schedule is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * fosdem-schedule is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * fosdem-schedule. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef SETTINGSDIALOG_H
+#define SETTINGSDIALOG_H
+
+#include <QDialog>
+#include "ui_settingsdialog.h"
+
+class SettingsDialog : public QDialog, Ui::SettingsDialog
+{
+ Q_OBJECT
+public:
+ SettingsDialog(QWidget *aParent = NULL);
+ ~SettingsDialog() {}
+private slots:
+ void connectionTypeChanged(bool aState);
+ void saveDialogData();
+};
+
+#endif /* PROXYSETTINGSDIALOG_H */
+
--- /dev/null
+<ui version="4.0" >
+ <class>SettingsDialog</class>
+ <widget class="QDialog" name="SettingsDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>469</width>
+ <height>146</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="MinimumExpanding" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle" >
+ <string>Settings</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>Proxy Settings</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QCheckBox" name="directConnection" >
+ <property name="text" >
+ <string>Direct connection</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QWidget" native="1" name="proxyWidget" >
+ <layout class="QHBoxLayout" name="horizontalLayout_3" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Address: </string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="address" />
+ </item>
+ <item>
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Port:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="port" >
+ <property name="maximum" >
+ <number>9999</number>
+ </property>
+ <property name="value" >
+ <number>8080</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>20</width>
+ <height>24</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout" >
+ <item>
+ <spacer name="horizontalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton" >
+ <property name="text" >
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>