ui/infotab.cpp \
ui/updatelocation/updatelocationdialog.cpp \
ui/updatelocation/texteditautoresizer.cpp \
- user/user.cpp
+ user/user.cpp \
+ ui/settingsdialog.cpp
HEADERS += ui/mainwindow.h \
ui/mapviewscreen.h \
ui/listviewscreen.h \
facebookservice/facebookcredentials.h \
facebookservice/facebookauthentication.h \
facebookservice/facebookcommon.h \
- user/user.h
+ user/user.h \
+ ui/settingsdialog.h
QT += network \
webkit
message(OpenGL built in)
message(Make sure you have OpenGL development headers installed)
message(install headers with: sudo apt-get install libgl-dev libglu-dev)
-
message(QJson built in)
message(Make sure you have QJson development headers installed)
message(install headers with: sudo apt-get install libqjson-dev)
}
-
-maemo5 {
+maemo5 {
message(QJson built in)
message(Make sure you have QJson development headers installed)
message(add: deb http://repository.maemo.org/extras-devel fremantle free non-free)
#include "mainwindow.h"
#include "listviewscreen.h"
#include "mapviewscreen.h"
+#include "settingsdialog.h"
#include "facebookservice/facebookauthentication.h"
#include "situareservice/situareservice.h"
qDebug() << __PRETTY_FUNCTION__;
delete m_toListViewAct;
delete m_toMapViewAct;
+ delete m_toSettingsAct;
delete m_situareViews;
}
m_toMapViewAct = new QAction(tr("Map"), this);
m_toMapViewAct->setObjectName(tr("Map"));
connect(m_toMapViewAct, SIGNAL(triggered()), this, SLOT(toMapView()));
+ m_toSettingsAct = new QAction(tr("Settings"), this);
+ m_toSettingsAct->setObjectName(tr("Settings"));
+ connect(m_toSettingsAct, SIGNAL(triggered()), this, SLOT(openSettingsDialog()));
m_viewMenu = menuBar()->addMenu(tr("View"));
m_viewMenu->addAction(m_toListViewAct);
m_viewMenu->addAction(m_toMapViewAct);
+ m_viewMenu->addAction(m_toSettingsAct);
m_viewMenu->setObjectName(tr("View Menu"));
}
}
}
+void MainWindow::openSettingsDialog()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+ SettingsDialog *dialog = new SettingsDialog(this);
+ dialog->show();
+}
+
void MainWindow::loginScreenClosed()
{
qDebug() << __PRETTY_FUNCTION__ << m_loggedIn;
public slots:
/**
+ * @brief Public slot, which open settings dialog
+ */
+ void openSettingsDialog();
+
+ /**
* @brief Public slot, which initiates toListViewAct action to switch view
*/
void toListView();
QStackedWidget *m_situareViews; ///< Stacked widget that hold both view widgets
QAction *m_toListViewAct; ///< Action to trigger switch to list view
QAction *m_toMapViewAct; ///< Action to trigger switch to map view
+ QAction *m_toSettingsAct; ///< Action to trigger switch to settings dialog
QMenu *m_viewMenu; ///< Object that hold the view menu items
};
void TextEditAutoResizer::textEditChanged()
{
+ qDebug() << __PRETTY_FUNCTION__;
QTextDocument *document = m_textEdit ? m_textEdit->document() : m_plainTextEdit->document();
QRect cursor = m_textEdit ? m_textEdit->cursorRect() : m_plainTextEdit->cursorRect();
*/
TextEditAutoResizer(QWidget *parent = 0);
+/*******************************************************************************
+ * MEMBER FUNCTIONS AND SLOTS
+ ******************************************************************************/
private slots:
/**
* @brief Private slot which indicate when textEdit has been changed
* @fn textEditChanged
*/
void textEditChanged();
-
+/*******************************************************************************
+ * DATA MEMBERS
+ ******************************************************************************/
private:
QFrame *m_edit; ///< Pointer to Frame
QPlainTextEdit *m_plainTextEdit; ///< Pointer to PlainTextEdit
UpdateLocationDialog::UpdateLocationDialog(QWidget *parent)
: QDialog(parent)
{
+ qDebug() << __PRETTY_FUNCTION__;
setWindowTitle(tr("Update Location"));
QScrollArea *scrollArea = new QScrollArea(this);
QTextEdit *m_textEdit = new QTextEdit;
QLineEdit *m_lineEdit = new QLineEdit;
- QCheckBox *m_checkBox = new QCheckBox(tr("Publish in Fabebook"));
+ QCheckBox *m_checkBox = new QCheckBox(tr("Publish in Facebook"));
+ m_checkBox->setChecked(true);
QPushButton *m_okButton = new QPushButton(tr("Send"));
QDialogButtonBox *m_buttonBox = new QDialogButtonBox(Qt::Vertical);
class QGroupBox;
class QLabel;
class QLineEdit;
-class QTextEdit;
class QPushButton;
class QScrollArea;
+class QTextEdit;
/**
* @brief Update Location UI
*/
UpdateLocationDialog(QWidget *parent = 0);
+/*******************************************************************************
+ * MEMBER FUNCTIONS AND SLOTS
+ ******************************************************************************/
private slots:
+/*******************************************************************************
+ * DATA MEMBERS
+ ******************************************************************************/
private:
QDialogButtonBox *m_buttonBox; ///< Pointer to DialogButtonBox
QCheckBox *m_checkBox; ///< Pointer to CheckBox