SituareEngine::SituareEngine(QMainWindow *parent)
: QObject(parent),
- m_autoCenteringEnabled(false),
+// m_autoCenteringEnabled(false),
m_automaticUpdateFirstStart(true),
m_automaticUpdateRequest(false),
m_userMoved(false),
QSettings settings(DIRECTORY_NAME, FILE_NAME);
settings.setValue(SETTINGS_GPS_ENABLED, m_gps->isRunning());
- settings.setValue(SETTINGS_AUTO_CENTERING_ENABLED, m_autoCenteringEnabled);
+// settings.setValue(SETTINGS_AUTO_CENTERING_ENABLED, m_autoCenteringEnabled);
}
-void SituareEngine::changeAutoCenteringSetting(bool enabled)
-{
- qDebug() << __PRETTY_FUNCTION__;
+//void SituareEngine::changeAutoCenteringSetting(bool enabled)
+//{
+// qDebug() << __PRETTY_FUNCTION__;
- m_autoCenteringEnabled = enabled;
- enableAutoCentering(enabled);
-}
+// m_autoCenteringEnabled = enabled;
+// enableAutoCentering(enabled);
+//}
-void SituareEngine::disableAutoCentering()
-{
- qDebug() << __PRETTY_FUNCTION__;
+//void SituareEngine::disableAutoCentering()
+//{
+// qDebug() << __PRETTY_FUNCTION__;
- changeAutoCenteringSetting(false);
- m_ui->buildInformationBox(tr("Auto centering disabled"));
-}
+// changeAutoCenteringSetting(false);
+// m_ui->buildInformationBox(tr("Auto centering disabled"));
+//}
void SituareEngine::displayStateChanged(bool enabled)
{
m_gps->enablePowerSave(!enabled);
- if (m_autoCenteringEnabled)
- enableAutoCentering(enabled);
+// if (m_autoCenteringEnabled)
+// enableAutoCentering(enabled);
}
-void SituareEngine::enableAutoCentering(bool enabled)
-{
- qDebug() << __PRETTY_FUNCTION__;
+//void SituareEngine::enableAutoCentering(bool enabled)
+//{
+// qDebug() << __PRETTY_FUNCTION__;
- m_ui->setAutoCenteringButtonEnabled(enabled);
- m_mapEngine->setAutoCentering(enabled);
+// m_ui->setAutoCenteringButtonEnabled(enabled);
+// m_mapEngine->setAutoCentering(enabled);
- if (enabled)
- m_gps->requestLastPosition();
-}
+// if (enabled)
+// m_gps->requestLastPosition();
+//}
void SituareEngine::enableGPS(bool enabled)
{
if (enabled && !m_gps->isRunning()) {
m_gps->start();
- enableAutoCentering(m_autoCenteringEnabled);
+// enableAutoCentering(m_autoCenteringEnabled);
m_gps->requestLastPosition();
if(m_ui->loginState())
}
else if (!enabled && m_gps->isRunning()) {
m_gps->stop();
- enableAutoCentering(false);
+// enableAutoCentering(false);
enableAutomaticLocationUpdate(false);
}
}
QSettings settings(DIRECTORY_NAME, FILE_NAME);
QVariant gpsEnabled = settings.value(SETTINGS_GPS_ENABLED);
- QVariant autoCenteringEnabled = settings.value(SETTINGS_AUTO_CENTERING_ENABLED);
+// QVariant autoCenteringEnabled = settings.value(SETTINGS_AUTO_CENTERING_ENABLED);
if (m_gps->isInitialized()) {
connect(m_gps, SIGNAL(position(QPointF,qreal)),
this, SLOT(setFirstStartZoomLevel(QPointF,qreal)));
- changeAutoCenteringSetting(true);
+// changeAutoCenteringSetting(true);
enableGPS(true);
m_ui->buildInformationBox(tr("GPS enabled"));
m_ui->buildInformationBox(tr("Auto centering enabled"));
} else { // Normal start
- changeAutoCenteringSetting(autoCenteringEnabled.toBool());
+// changeAutoCenteringSetting(autoCenteringEnabled.toBool());
enableGPS(gpsEnabled.toBool());
if (gpsEnabled.toBool())
m_ui->buildInformationBox(tr("GPS enabled"));
- if (gpsEnabled.toBool() && autoCenteringEnabled.toBool())
+ if (gpsEnabled.toBool()) /*&& autoCenteringEnabled.toBool())*/
m_ui->buildInformationBox(tr("Auto centering enabled"));
}
} else {
Q_UNUSED(latLonCoordinate);
Q_UNUSED(accuracy);
- if (m_autoCenteringEnabled) // autocentering is disabled when map is scrolled
- m_mapEngine->setZoomLevel(DEFAULT_ZOOM_LEVEL_WHEN_GPS_IS_AVAILABLE);
+// if (m_autoCenteringEnabled) // autocentering is disabled when map is scrolled
+// m_mapEngine->setZoomLevel(DEFAULT_ZOOM_LEVEL_WHEN_GPS_IS_AVAILABLE);
disconnect(m_gps, SIGNAL(position(QPointF,qreal)),
this, SLOT(setFirstStartZoomLevel(QPointF,qreal)));
m_mapEngine, SLOT(zoomOut()));
// signals from menu buttons
- connect(m_ui, SIGNAL(autoCenteringTriggered(bool)),
- this, SLOT(changeAutoCenteringSetting(bool)));
+// connect(m_ui, SIGNAL(autoCenteringTriggered(bool)),
+// this, SLOT(changeAutoCenteringSetting(bool)));
connect(m_ui, SIGNAL(gpsTriggered(bool)),
this, SLOT(enableGPS(bool)));
connect(m_mapEngine, SIGNAL(zoomLevelChanged(int)),
m_ui, SIGNAL(zoomLevelChanged(int)));
- connect(m_mapEngine, SIGNAL(mapScrolledManually()),
- this, SLOT(disableAutoCentering()));
+// connect(m_mapEngine, SIGNAL(mapScrolledManually()),
+// this, SLOT(disableAutoCentering()));
connect(m_mapEngine, SIGNAL(maxZoomLevelReached()),
m_ui, SIGNAL(maxZoomLevelReached()));
*
* @param enabled true if enabled, false otherwise
*/
- void changeAutoCenteringSetting(bool enabled);
+// void changeAutoCenteringSetting(bool enabled);
/**
* @brief Slot for disabling automatic centering when map is scrolled manually
*/
- void disableAutoCentering();
+// void disableAutoCentering();
/**
* @brief Slot for display state changed.
*
* @param enabled true if auto centering was enabled, false otherwise
*/
- void enableAutoCentering(bool enabled);
+// void enableAutoCentering(bool enabled);
/**
* @brief Slot for gps enabling.
* DATA MEMBERS
******************************************************************************/
private:
- bool m_autoCenteringEnabled; ///< Auto centering flag
+// bool m_autoCenteringEnabled; ///< Auto centering flag
bool m_automaticUpdateFirstStart; ///< Automatic location update first start flag
bool m_automaticUpdateRequest; ///< Flag for automatic update request
bool m_userMoved; ///< Flag for user move
ui/zoombuttonpanel.cpp \
user/user.cpp \
ui/fullscreenbutton.cpp \
- engine/mce.cpp
+ engine/mce.cpp \
+ ui/indicatorbutton.cpp
HEADERS += common.h \
engine/engine.h \
facebookservice/facebookauthentication.h \
ui/zoombuttonpanel.h \
user/user.h \
ui/fullscreenbutton.h \
- engine/mce.h
+ engine/mce.h \
+ ui/indicatorbutton.h
QT += network \
webkit
--- /dev/null
+/*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Kaj Wallin - kaj.wallin@ixonos.com
+ Katri Kaikkonen - katri.kaikkonen@ixonos.com
+
+ Situare is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2 as published by the Free Software Foundation.
+
+ Situare 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 Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+*/
+#include <QDebug>
+#include <QPainter>
+#include <QSettings>
+
+#include "indicatorbutton.h"
+#include "math.h"
+#include "common.h"
+#include "panelcommon.h"
+
+const int ROUNDING_RADIUS = 9; ///< Roundness of the rounded edge
+const qreal OPACITY = 0.13; ///< Opacity of the background in percents
+const int BUTTON_WIDTH = 66; ///< Button width
+const int BUTTON_HEIGHT = 66; ///< Button height
+
+IndicatorButton::IndicatorButton(QWidget *parent)
+ : QToolButton(parent),
+ m_isDraggable(false)
+{
+ setIcon(QIcon::fromTheme(QLatin1String("general_fullsize")));
+ setFixedSize(BUTTON_WIDTH, BUTTON_HEIGHT);
+
+ QPalette pal = palette();
+ QColor backgroundColor = pal.color(backgroundRole());
+ backgroundColor.setAlpha(floor(OPACITY * 255));
+ pal.setColor(backgroundRole(), backgroundColor);
+ setPalette(pal);
+
+ setAutoFillBackground(true);
+
+ m_dragStartTimer = new QTimer(this);
+ m_dragStartTimer->setSingleShot(true);
+ m_dragStartTimer->setInterval(DRAG_INIT_TIME);
+
+ m_forceReleaseTimer = new QTimer(this);
+ m_forceReleaseTimer->setSingleShot(true);
+ m_forceReleaseTimer->setInterval(FORCE_RELEASE_TIME);
+
+ connect(this, SIGNAL(pressed()),
+ m_dragStartTimer, SLOT(start()));
+ connect(this, SIGNAL(released()),
+ m_dragStartTimer, SLOT(stop()));
+
+ connect(m_dragStartTimer, SIGNAL(timeout()),
+ this, SLOT(timerExpired()));
+ connect(m_forceReleaseTimer, SIGNAL(timeout()),
+ this, SLOT(forceMouseRelease()));
+
+ connect(this, SIGNAL(triggered(bool)),
+ this, SIGNAL(autoCenteringTriggered(bool)));
+
+ // Create mask to round the corners of the background
+ QRegion maskbase(rect());
+
+ // left top corner
+ QRegion leftTopBase(QRect(0, 0, ROUNDING_RADIUS, ROUNDING_RADIUS));
+ QRegion leftTopRounding(QRect(0, 0, 2 * ROUNDING_RADIUS, 2 * ROUNDING_RADIUS), QRegion::Ellipse);
+ QRegion leftTopClipped = leftTopBase.subtract(leftTopRounding);
+
+ // right top corner
+ QRegion rightTopBase(QRect(rect().width() - ROUNDING_RADIUS, 0,
+ rect().width(), ROUNDING_RADIUS));
+ QRegion rightTopRounding(QRect(rect().width() - 2 * ROUNDING_RADIUS, 0,
+ 2 * ROUNDING_RADIUS, 2 * ROUNDING_RADIUS), QRegion::Ellipse);
+ QRegion rightTopClipped = rightTopBase.subtract(rightTopRounding);
+
+ // left bottom corner
+ QRegion leftBottomBase(QRect(0, rect().height() - ROUNDING_RADIUS,
+ ROUNDING_RADIUS, rect().height()));
+ QRegion leftBottomRounding(QRect(0, rect().height() - 2 * ROUNDING_RADIUS,
+ 2 * ROUNDING_RADIUS, 2 * ROUNDING_RADIUS), QRegion::Ellipse);
+ QRegion leftBottomClipped = leftBottomBase.subtract(leftBottomRounding);
+
+ // right bottom corner
+ QRegion rightBottomBase(QRect(rect().width() - ROUNDING_RADIUS, rect().height()- ROUNDING_RADIUS,
+ rect().height() - ROUNDING_RADIUS, rect().width()- ROUNDING_RADIUS));
+ QRegion rightBottomRounding(QRect(rect().width() - 2 * ROUNDING_RADIUS, rect().height() - 2 * ROUNDING_RADIUS,
+ 2 * ROUNDING_RADIUS, 2 * ROUNDING_RADIUS), QRegion::Ellipse);
+ QRegion rightBottomClipped = rightBottomBase.subtract(rightBottomRounding);
+
+ QRegion cutter = leftTopClipped.unite(rightTopClipped.unite(leftBottomClipped.unite(rightBottomClipped)));
+
+ QRegion mask = maskbase.subtract(cutter);
+
+ setMask(mask);
+}
+
+void IndicatorButton::mousePressEvent(QMouseEvent *event)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ if (event->button() == Qt::LeftButton) {
+ m_dragPosition = event->pos();
+ }
+ m_dragStartTimer->start();
+ QWidget::mousePressEvent(event);
+}
+
+void IndicatorButton::mouseMoveEvent(QMouseEvent *event)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ if(m_isDraggable) {
+ if (event->buttons() & Qt::LeftButton) {
+ QPoint newLocation = mapToParent(event->pos()) - m_dragPosition;
+
+ if (newLocation.x() < SIDEBAR_WIDTH)
+ newLocation.rx() = SIDEBAR_WIDTH;
+ else if (newLocation.x() > m_screenSize.width() - width() - SIDEBAR_WIDTH)
+ newLocation.rx() = m_screenSize.width() - width() - SIDEBAR_WIDTH;
+
+ if (newLocation.y() < 0)
+ newLocation.ry() = 0;
+ else if (newLocation.y() > m_screenSize.height() - height())
+ newLocation.ry() = m_screenSize.height() - height();
+
+ move(newLocation);
+ }
+ } else
+ if(!rect().contains(event->pos()))
+ m_dragStartTimer->stop();
+
+ QWidget::mouseMoveEvent(event);
+}
+
+void IndicatorButton::mouseReleaseEvent(QMouseEvent *event)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ m_dragStartTimer->stop();
+
+ Q_UNUSED(event);
+ if(m_isDraggable) {
+ setDraggable(false);
+// QSettings settings(DIRECTORY_NAME, FILE_NAME);
+// settings.setValue(ZOOMPANEL_POSITION, pos());
+ releaseMouse();
+ }
+ QWidget::mouseReleaseEvent(event);
+}
+
+void IndicatorButton::setDraggable(bool mode, QPoint eventPosition)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ m_isDraggable = mode;
+
+ if(mode) {
+ setAutoFillBackground(true);
+ grabMouse();
+ m_forceReleaseTimer->start();
+ m_dragPosition = eventPosition;
+ } else {
+ setAutoFillBackground(false);
+ releaseMouse();
+ m_forceReleaseTimer->stop();
+
+ }
+}
+
+const QPoint& IndicatorButton::eventPosition()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ return m_eventPosition;
+}
+
+void IndicatorButton::forceMouseRelease()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ releaseMouse();
+ setDraggable(false);
+}
+
+void IndicatorButton::timerExpired()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ if(this->isDown())
+ m_dragPosition = this->eventPosition();
+
+ setDraggable(true, m_dragPosition);
+}
--- /dev/null
+/*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Kaj Wallin - kaj.wallin@ixonos.com
+ Katri Kaikkonen - katri.kaikkonen@ixonos.com
+
+ Situare is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ version 2 as published by the Free Software Foundation.
+
+ Situare 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 Situare; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA.
+*/
+
+#ifndef INDICATORBUTTON_H
+#define INDICATORBUTTON_H
+
+#include <QWidget>
+#include <QToolButton>
+#include <QTimer>
+#include <QMouseEvent>
+#include <QPaintEvent>
+#include "../user/user.h"
+
+/**
+* @brief Indicator button class
+*
+* @class IndicatorButton indicatorbutton.h "ui/indicatorbutton.h"
+*/
+class IndicatorButton : public QToolButton
+{
+ Q_OBJECT
+
+public:
+ /**
+ * @brief Constructor
+ *
+ * @param parent Parent widget
+ */
+ IndicatorButton(QWidget *parent = 0);
+
+/*******************************************************************************
+* BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
+******************************************************************************/
+protected:
+
+ /**
+ * @brief Move event for the zoom button panel
+ *
+ * @param event Event
+ */
+ void mouseMoveEvent(QMouseEvent *event);
+
+ /**
+ * @brief Press event for the zoom button panel
+ *
+ * @param event Event
+ */
+ void mousePressEvent(QMouseEvent *event);
+
+ /**
+ * @brief Event handler for mouse release events
+ *
+ * @param event Mouse event
+ */
+ void mouseReleaseEvent(QMouseEvent *event);
+
+
+/*******************************************************************************
+* MEMBER FUNCTIONS AND SLOTS
+******************************************************************************/
+
+public slots:
+
+ /**
+ * @brief Relative position of the event inside the widget
+ */
+ const QPoint& eventPosition();
+
+ /**
+ * @brief Toggle zoom panel draggability
+ */
+ void setDraggable(bool mode, QPoint eventPosition = QPoint(0,0));
+
+// /**
+// * @brief Slot to redraw the panel after window resize event
+// *
+// * @param size Size of the new screen
+// */
+// void screenResized(const QSize &size);
+
+private slots:
+ /**
+ * @brief Safeguard slot to release mouse grab if something goes horribly wrong
+ */
+ void forceMouseRelease();
+
+ /**
+ * @brief Slot that handles drag initialization once timer has timed out
+ */
+ void timerExpired();
+
+/*******************************************************************************
+ * SIGNALS
+ ******************************************************************************/
+signals:
+ /**
+ * @brief Automatic centering setting changed by user
+ *
+ * @param enabled True if automatic centering is enabled, otherwise false
+ */
+ void autoCenteringTriggered(bool enabled);
+
+/*******************************************************************************
+* DATA MEMBERS
+******************************************************************************/
+private:
+ bool m_isDraggable; ///< Boolean for tracking the draggability state
+
+ QPoint m_dragPosition; ///< Location from where the widget is grabbed
+ QPoint m_eventPosition; ///< Position of mousePressEvent
+
+ QSize m_screenSize; ///< Store for the screen size
+
+ QTimer *m_dragStartTimer; ///< Timer to init draggability of the zoom panel
+ QTimer *m_forceReleaseTimer; ///< Timer to run forceMouseRelease;
+
+};
+
+#endif // INDICATORBUTTON_H
#include "common.h"
#include "friendlistpanel.h"
#include "fullscreenbutton.h"
+#include "indicatorbutton.h"
#include "logindialog.h"
#include "mapscale.h"
#include "settingsdialog.h"
m_email(),
m_password(),
m_fullScreenButton(0),
+ m_indicatorButton(0),
m_webView(0),
m_mapScale(0),
m_cookieJar(0)
m_osmLicense->stackUnder(m_zoomButtonPanel);
}
m_ownLocationCrosshair->stackUnder(m_osmLicense);
- m_mapScale->stackUnder(m_ownLocationCrosshair);
+ m_indicatorButton->stackUnder(m_ownLocationCrosshair);
+ m_mapScale->stackUnder(m_indicatorButton);
m_mapView->stackUnder(m_mapScale);
+
grabZoomKeys(true);
// Set default screen size
this, SIGNAL(findFriend(QPointF)));
}
+void MainWindow::buildIndicatorButton()
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ m_indicatorButton = new IndicatorButton(this);
+
+ connect(m_indicatorButton, SIGNAL(triggered(bool)),
+ this, SIGNAL(autoCenteringTriggered(bool)));
+
+}
+
void MainWindow::buildInformationBox(const QString &message, bool modal)
{
qDebug() << __PRETTY_FUNCTION__;
buildOsmLicense();
buildManualLocationCrosshair();
buildFullScreenButton();
+ buildIndicatorButton();
buildMapScale();
connect(m_mapView, SIGNAL(viewScrolled(QPoint)),
this, SIGNAL(gpsTriggered(bool)));
// automatic centering
- m_autoCenteringAct = new QAction(tr("Auto centering"), this);
- m_autoCenteringAct->setCheckable(true);
- connect(m_autoCenteringAct, SIGNAL(triggered(bool)),
- this, SIGNAL(autoCenteringTriggered(bool)));
+// m_autoCenteringAct = new QAction(tr("Auto centering"), this);
+// m_autoCenteringAct->setCheckable(true);
+// connect(m_autoCenteringAct, SIGNAL(triggered(bool)),
+// this, SIGNAL(autoCenteringTriggered(bool)));
// build the actual menu
m_viewMenu = menuBar()->addMenu(tr("Main"));
m_viewMenu->addAction(m_loginAct);
m_viewMenu->addAction(m_toSettingsAct);
m_viewMenu->addAction(m_gpsToggleAct);
- m_viewMenu->addAction(m_autoCenteringAct);
+// m_viewMenu->addAction(m_autoCenteringAct);
m_viewMenu->setObjectName(tr("Menu"));
}
}
}
+void MainWindow::drawIndicatorButton(const QSize &size)
+{
+ qDebug() << __PRETTY_FUNCTION__ << size.width() << "x" << size.height();
+
+ const int LEFT_SCALE_MARGIN = 10;
+ const int BOTTOM_SCALE_MARGIN = 80;
+
+ if(m_indicatorButton) {
+ if(m_loggedIn) {
+ m_indicatorButton->move(PANEL_PEEK_AMOUNT + LEFT_SCALE_MARGIN,
+ size.height() - m_mapScale->size().height() - BOTTOM_SCALE_MARGIN);
+
+ } else {
+ m_indicatorButton->move(PANEL_PEEK_AMOUNT + LEFT_SCALE_MARGIN,
+ size.height() - m_mapScale->size().height() - BOTTOM_SCALE_MARGIN);
+ }
+ }
+}
+
void MainWindow::drawMapScale(const QSize &size)
{
const int LEFT_SCALE_MARGIN = 10;
settings.setValue(COOKIES, list);
}
-void MainWindow::setAutoCenteringButtonEnabled(bool enabled)
-{
- qDebug() << __PRETTY_FUNCTION__;
+//void MainWindow::setAutoCenteringButtonEnabled(bool enabled)
+//{
+// qDebug() << __PRETTY_FUNCTION__;
- m_autoCenteringAct->setChecked(enabled);
-}
+// m_autoCenteringAct->setChecked(enabled);
+//}
void MainWindow::setGPSButtonEnabled(bool enabled)
{
setOwnLocationCrosshairVisibility(!enabled);
- m_autoCenteringAct->setVisible(enabled);
+// m_autoCenteringAct->setVisible(enabled);
+}
+
+void MainWindow::setIndicatorButtonEnabled(bool enabled)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ m_indicatorButton->setChecked(enabled);
+
+ connect(m_autoCenteringAct, SIGNAL(triggered(bool)),
+ this, SIGNAL(autoCenteringTriggered(bool)));
}
void MainWindow::setMapViewScene(QGraphicsScene *scene)
qDebug() << __PRETTY_FUNCTION__;
drawFullScreenButton(m_viewPortSize);
+ drawIndicatorButton(m_viewPortSize);
if(m_loggedIn) {
if(!m_friendsListPanel->isVisible()) {
m_friendsListPanel->show();
m_friendsListPanelSidebar->show();
+ m_indicatorButton->show();
}
if(!m_userPanel->isVisible()) {
}
}
+//void MainWindow::showIndicatorButton(bool gps, bool autoCentering)
+//{
+// qDebug() << __PRETTY_FUNCTION__;
+
+//}
+
void MainWindow::startLoginProcess()
{
qDebug() << __PRETTY_FUNCTION__;
class FacebookAuthentication;
class FullScreenButton;
class FriendListPanel;
+class IndicatorButton;
class MapScale;
class MapScene;
class MapView;
*
* @param enabled true if shoud be enabled, false otherwise
*/
- void setAutoCenteringButtonEnabled(bool enabled);
+// void setAutoCenteringButtonEnabled(bool enabled);
/**
* @brief Enable / disable GPS button.
void setGPSButtonEnabled(bool enabled);
/**
+ * @brief Enable / disable direction indicator button.
+ *
+ * @param enabled true if shoud be enabled, false otherwise
+ */
+ void setIndicatorButtonEnabled(bool enabled);
+
+ /**
* @brief Set scene for MapView
*
* @param scene Scene to be set
const QString username();
public slots:
+
+ /**
+ * @brief Build direction indicator button and connect slots
+ */
+ void buildIndicatorButton();
+
/**
* @brief Builds information box with message.
*
void drawFullScreenButton(const QSize &size);
/**
+ * @brief Slot for drawing the direction indicator button
+ *
+ * @param size Size of the screen
+ */
+ void drawIndicatorButton(const QSize &size);
+
+
+ /**
* @brief Slot for drawing the map distance scale
*
* @param size Size of the screen
*
* @param enabled True if automatic centering is enabled, otherwise false
*/
- void autoCenteringTriggered(bool enabled);
+// void autoCenteringTriggered(bool enabled);
/**
* @brief Signal that indicates when user has cancelled login process
QString m_password; ///< Placeholder for password
FullScreenButton *m_fullScreenButton; ///< Instance of the fullscreen toggle button
+ IndicatorButton * m_indicatorButton; ///< Instance of direction indicator button
QWebView *m_webView; ///< Shows facebook login page
const QString ZOOMPANEL_POSITION = "Zoom_Panel_Position";
+// Direction indicator button settings
+//const int DIRECTION_INDICATOR_POSITION_X = 30 + PANEL_PEEK_AMOUNT; ///< Horizontal position of zoom panel
+//const int DIRECTION_INDICATOR_POSITION_Y = 30; ///< Vertical position of zoom panel
+
+//const QString DIRECTION_INDICATOR_BUTTON_POSITION = "Direction_indicator_Position";
+
#endif // PANELCOMMON_H
Copyright (C) 2010 Ixonos Plc. Authors:
Kaj Wallin - kaj.wallin@ixonos.com
+ Katri Kaikkonen - katri.kaikkonen@ixonos.com
Situare is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License