+situare (0.7-0) unstable; urgency=low
+ * Situare Beta Release (Intermediate build)
+
+ -- Kaj Wallin <kaj.wallin@ixonos.com> Mon, 16 Jun 2010 08:20:00 +0300
+
situare (0.6-2) unstable; urgency=low
* Situare Beta Release
ui/userinfopanel.cpp \
ui/zoombutton.cpp \
ui/zoombuttonpanel.cpp \
- user/user.cpp
+ user/user.cpp \
+ ui/fullscreenbutton.cpp
HEADERS += common.h \
engine/engine.h \
facebookservice/facebookauthentication.h \
ui/sidepanelbase.h \
ui/zoombutton.h \
ui/zoombuttonpanel.h \
- user/user.h
+ user/user.h \
+ ui/fullscreenbutton.h
QT += network \
webkit
DEFINES += QT_NO_DEBUG_OUTPUT
--- /dev/null
+ /*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Kaj Wallin - kaj.wallin@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 "fullscreenbutton.h"
+#include "math.h"
+
+const int ROUNDING_RADIUS = 5; ///< Roundness of the rounded edge
+const qreal OPACITY = 0.13; ///< Opacity of the background in percents
+
+FullScreenButton::FullScreenButton(QWidget *parent) :
+ QToolButton(parent)
+{
+ setIcon(QIcon::fromTheme(QLatin1String("general_fullsize")));
+ setFixedSize(sizeHint());
+
+ QPalette pal = palette();
+ QColor backgroundColor = pal.color(backgroundRole());
+ backgroundColor.setAlpha(floor(OPACITY * 255)); //
+ pal.setColor(backgroundRole(), backgroundColor);
+ setPalette(pal);
+
+ setAutoFillBackground(true);
+
+ // Create mask to round the top left corner of the background
+ QRegion maskbase(rect());
+ QRegion cookiecutterbase(QRect(QPoint(0,0),QPoint(ROUNDING_RADIUS, ROUNDING_RADIUS)));
+ QRegion cookiecuttersplice(QRect(0,0,2*ROUNDING_RADIUS, 2*ROUNDING_RADIUS),QRegion::Ellipse);
+ QRegion cookiecutter = cookiecutterbase.subtract(cookiecuttersplice);
+ QRegion mask = maskbase.subtract(cookiecutter);
+
+ setMask(mask);
+}
--- /dev/null
+ /*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Kaj Wallin - kaj.wallin@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 FULLSCREENBUTTON_H
+#define FULLSCREENBUTTON_H
+
+#include <QToolButton>
+
+/**
+* @brief Fullscreen button class
+*
+* @author Kaj Wallin - kaj.wallin (at) ixonos.com
+*
+* @class FullScreenButton fullscreenbutton.h "ui/fullscreenbutton.h"
+*/
+class FullScreenButton : public QToolButton
+{
+ Q_OBJECT
+public:
+ /**
+ * @brief Constructor
+ *
+ * @param parent Parent widget
+ */
+ FullScreenButton(QWidget *parent = 0);
+};
+
+#endif // FULLSCREENBUTTON_H
#include "map/mapview.h"
#include "common.h"
#include "friendlistpanel.h"
+#include "fullscreenbutton.h"
#include "logindialog.h"
#include "mapscale.h"
#include "settingsdialog.h"
{
qDebug() << __PRETTY_FUNCTION__;
#ifdef Q_WS_MAEMO_5
- m_fullScreenButton = new QToolButton(this);
- m_fullScreenButton->setIcon(QIcon::fromTheme(QLatin1String("general_fullsize")));
- m_fullScreenButton->setFixedSize(m_fullScreenButton->sizeHint());
+ m_fullScreenButton = new FullScreenButton(this);
connect(m_fullScreenButton, SIGNAL(clicked()),
this, SLOT(toggleFullScreen()));
#endif // Q_WS_MAEMO_5
qDebug() << __PRETTY_FUNCTION__ << size.width() << "x" << size.height();
if(m_fullScreenButton) {
- m_fullScreenButton->move(size.width() - m_fullScreenButton->size().width()
- - PANEL_PEEK_AMOUNT,
- size.height() - m_fullScreenButton->size().height());
+ if(m_loggedIn) {
+ m_fullScreenButton->move(size.width() - m_fullScreenButton->size().width()
+ - PANEL_PEEK_AMOUNT,
+ size.height() - m_fullScreenButton->size().height());
+ } else {
+ m_fullScreenButton->move(size.width() - m_fullScreenButton->size().width(),
+ size.height() - m_fullScreenButton->size().height());
+ }
}
}
if (visibility && m_loggedIn) {
m_ownLocationCrosshair->show();
m_drawOwnLocationCrosshair = true;
- drawOwnLocationCrosshair(QSize(m_viewPortWidth, m_viewPortHeight));
+ drawOwnLocationCrosshair(m_viewPortSize);
} else {
m_ownLocationCrosshair->hide();
m_drawOwnLocationCrosshair = false;
{
qDebug() << __PRETTY_FUNCTION__;
- m_viewPortWidth = size.width();
- m_viewPortHeight = size.height();
+ m_viewPortSize = size;
}
void MainWindow::showEnableAutomaticUpdateLocationDialog(const QString &text)
m_userPanelSidebar->hide();
setOwnLocationCrosshairVisibility(false);
}
+ drawFullScreenButton(m_viewPortSize);
}
const QString MainWindow::username()
class QNetworkReply;
class FacebookAuthentication;
+class FullScreenButton;
class FriendListPanel;
class MapScale;
class MapScene;
bool m_loggedIn; ///< Indicates login state
bool m_refresh; ///< Indicates when webpage is refreshed
- int m_viewPortHeight; ///< Height of view port
- int m_viewPortWidth; ///< Width of view port
QAction *m_autoCenteringAct; ///< Action to auto center map using gps position
QAction *m_gpsToggleAct; ///< Action to trigger gps toggle
QMessageBox *m_automaticUpdateLocationDialog; ///< Automatic update location dialog
+ QSize m_viewPortSize; ///< Size of the viewport
+
QString m_email; ///< Placeholder for email
QString m_password; ///< Placeholder for password
- QToolButton *m_fullScreenButton; ///< Instance of the fullscreen toggle button
+ FullScreenButton *m_fullScreenButton; ///< Instance of the fullscreen toggle button
QWebView *m_webView; ///< Shows facebook login page