QVBoxLayout *friendListPanelLayout = new QVBoxLayout();
friendListPanelLayout->setMargin(0);
friendListPanelLayout->setSpacing(0);
+///< @todo magic
friendListPanelLayout->setContentsMargins(PANEL_MARGIN_LEFT, 0, PANEL_MARGIN_RIGHT, 0);
setLayout(friendListPanelLayout);
QHBoxLayout *filterLayout = new QHBoxLayout();
+///< @todo magic
filterLayout->setContentsMargins(FRIENDPANEL_FILTER_MARGIN_LEFT, 0,
FRIENDPANEL_FILTER_MARGIN_RIGHT, 0);
m_friendListLabel->setText(tr("Selected: %1").arg(userIDs.count()));
-// openPanel();
m_friendListHeaderWidget->show();
m_friendListView->filter(userIDs);
}
* @author Kaj Wallin - kaj.wallin (at) ixonos.com
* @author Henri Lampela - henri.lampela (at) ixonos.com
* @author Pekka Nissinen - pekka.nissinen (at) ixonos.com
- *
- * @class FriendListPanel friendlistpanel.h "ui/friendlistpanel.h"
*/
class FriendListPanel : public QWidget
{
* DATA MEMBERS
******************************************************************************/
private:
- QWidget *m_friendListHeaderWidget; ///< Friend list header widget
-
QLabel *m_friendListLabel; ///< Friend list label
QPushButton *m_clearFilterButton; ///< Button to clear list filtering
- ListView *m_friendListView; ///< Friend list view
+ QWidget *m_friendListHeaderWidget; ///< Friend list header widget
+
FriendListItemDelegate *m_friendListItemDelegate; ///< Friend list item delegate
+ ListView *m_friendListView; ///< Friend list view
};
#endif // FRIENDLISTPANEL_H
USA.
*/
+#include "math.h"
+
#include <QDebug>
#include <QPainter>
#include <QSettings>
#include "common.h"
-#include "math.h"
#include "panelcommon.h"
#include "indicatorbutton.h"
Copyright (C) 2010 Ixonos Plc. Authors:
Katri Kaikkonen - katri.kaikkonen@ixonos.com
+ Kaj Wallin - kaj.wallin@ixonos.com
Sami Rämö - sami.ramo@ixonos.com
Situare is free software; you can redistribute it and/or
*
* @author Katri Kaikkonen - katri.kaikkonen (at) ixonos.com
* @author Sami Rämö - sami.ramo (at) ixonos.com
- *
- * @class IndicatorButton indicatorbutton.h "ui/indicatorbutton.h"
*/
class IndicatorButton : public QToolButton
{
QPoint(DIRECTION_INDICATOR_POSITION_X,
DIRECTION_INDICATOR_POSITION_Y)).toPoint();
- if((savedLocation.x() > DEFAULT_SCREEN_WIDTH) || (savedLocation.y() > DEFAULT_SCREEN_HEIGHT)) {
+ if ((savedLocation.x() > DEFAULT_SCREEN_WIDTH) || (savedLocation.y() > DEFAULT_SCREEN_HEIGHT)) {
savedLocation.rx() = DIRECTION_INDICATOR_POSITION_X;
savedLocation.ry() = DIRECTION_INDICATOR_POSITION_Y;
}
if (newLocation.x() < 0)
newLocation.rx() = 0;
- else if (newLocation.x() > m_screenSize.width() - width() - PANEL_BAR_WIDTH)
+ else if (newLocation.x() > (m_screenSize.width() - width() - PANEL_BAR_WIDTH))
newLocation.rx() = m_screenSize.width() - width() - PANEL_BAR_WIDTH;
if (newLocation.y() < 0)
newLocation.ry() = 0;
- else if (newLocation.y() > m_screenSize.height() - height())
+ else if (newLocation.y() > (m_screenSize.height() - height()))
newLocation.ry() = m_screenSize.height() - height();
move(newLocation);
m_dragStartTimer->stop();
Q_UNUSED(event);
- if(m_isDraggable) {
+ if (m_isDraggable) {
setDraggable(false);
QSettings settings(DIRECTORY_NAME, FILE_NAME);
painter.fillPath(backgroundPath, QBrush(*m_normalColor));
}
- if(m_isDraggable) {
+ if (m_isDraggable) {
const int ROUNDING_RADIUS = 9;
QPainterPath backgroundPath;
int oldHeight = 0;
int oldWidth = 0;
- if(m_screenSize.height() < 0)
+ if (m_screenSize.height() < 0)
oldHeight = DEFAULT_NON_FULLSCREEN_HEIGHT;
else
oldHeight = m_screenSize.height();
- if(m_screenSize.width() < 0)
+ if (m_screenSize.width() < 0)
oldWidth = DEFAULT_SCREEN_WIDTH;
else
oldWidth = m_screenSize.width();
if (resizedPosition.x() < 0)
resizedPosition.rx() = 0;
- else if(resizedPosition.x() > newSize.width() - rect().width() - PANEL_BAR_WIDTH)
+ else if (resizedPosition.x() > (newSize.width() - rect().width() - PANEL_BAR_WIDTH))
resizedPosition.rx() = newSize.width() - rect().width() - PANEL_BAR_WIDTH;
if (resizedPosition.y() < 0)
resizedPosition.ry() = 0;
- else if(resizedPosition.y() > newSize.height() - rect().height())
+ else if (resizedPosition.y() > (newSize.height() - rect().height()))
resizedPosition.ry() = newSize.height() - rect().height();
- if(pos().y() + rect().center().y() > oldHeight / 2)
+ if ((pos().y() + rect().center().y()) > (oldHeight / 2))
resizedPosition.ry() = newSize.height() - (oldHeight - pos().y());
- if(pos().x() + rect().center().x() > oldWidth / 2)
+ if ((pos().x() + rect().center().x()) > (oldWidth / 2))
resizedPosition.rx() = newSize.width() - (oldWidth - pos().x());
move(resizedPosition);
m_isDraggable = mode;
- if(mode) {
+ if (mode) {
emit draggingModeTriggered();
grabMouse();
m_forceReleaseTimer->start();
m_distance = distance;
- if(m_distance < MIN_TO_METERS)
+ if (m_distance < MIN_TO_METERS)
{
m_distanceText.setNum(10);
m_distanceText.prepend("< ");
m_distanceText.append(UNIT_METER);
}
- else if(m_distance < MAX_TO_METERS)
+ else if (m_distance < MAX_TO_METERS)
{
m_distanceText.setNum(m_distance, 'f', 0);
m_distanceText.append(UNIT_METER);
}
- else if(m_distance < MAX_TO_KM_WITH_DESIMAL)
+ else if (m_distance < MAX_TO_KM_WITH_DESIMAL)
{
m_distanceText.setNum(m_distance / M_TO_KM, 'f', 1);
m_distanceText.append(UNIT_KILOMETER);
#include <QtAlgorithms>
#include <QtWebKit>
+///< @todo sort
#include "facebookservice/facebookauthentication.h"
#include "map/mapcommon.h"
#include "map/mapview.h"
m_refresh(false),
m_progressIndicatorCount(0),
m_ownLocationCrosshair(0),
- m_email(),
+ m_email(), ///< @todo WTF?!?!?!?
m_password(),
m_webView(0),
m_fullScreenButton(0),
{
qDebug() << __PRETTY_FUNCTION__ << size.width() << "x" << size.height();
- if(m_fullScreenButton)
+ if (m_fullScreenButton) {
m_fullScreenButton->move(size.width() - m_fullScreenButton->size().width(),
size.height() - m_fullScreenButton->size().height());
+ }
}
void MainWindow::drawMapScale(const QSize &size)
const int LEFT_SCALE_MARGIN = 10;
const int BOTTOM_SCALE_MARGIN = 2;
-// qDebug() << __PRETTY_FUNCTION__ << size.width() << "x" << size.height();
m_mapScale->move(LEFT_SCALE_MARGIN,
size.height() - m_mapScale->size().height() - BOTTOM_SCALE_MARGIN);
{
qDebug() << __PRETTY_FUNCTION__;
+///< @todo check how this is called and can this method be removed
+
drawFullScreenButton(m_viewPortSize);
// if(m_loggedIn) {
{
qDebug() << __PRETTY_FUNCTION__;
+///< @todo can this be removed?
+
// if(!m_loggedIn) {
// m_friendsListPanel->closePanel();
// m_friendsListPanel->hide();
class MapScale;
class MapScene;
class MapView;
-class TabbedPanel;
class SettingsDialog;
class SceneCoordinate;
class SituareService;
+class TabbedPanel;
class User;
class UserInfoPanel;
class ZoomButtonPanel;
*
* @var FRIENDPANEL_FILTER_MARGIN_LEFT
*/
+///< @todo not really commom
const int FRIENDPANEL_FILTER_MARGIN_LEFT = PANEL_MARGIN_LEFT + 4;
/**
*
* @var FRIENDPANEL_FILTER_MARGIN_RIGHT
*/
+///< @todo not really common
const int FRIENDPANEL_FILTER_MARGIN_RIGHT = PANEL_MARGIN_RIGHT + MAEMO5_SCROLLBAR_WIDTH + 4;
const int SHOW_ALL_BUTTON_RIGHT_MARGIN = 39; ///< Show all button right margin
* Removes a tab and its widget from the panel at index position. The widget itself is not
* deleted.
*
- * TODO: Fix tab drawing order
+ * @todo: Fix tab drawing order
*
* @param index Index of the tab
*/
QPainter painter(this);
QRect topRect = QRect(0, MARGIN, BACKGROUND_WIDTH, BACKGROUND_TOP_HEIGHT);
+///< @todo Overlaps with topRect?
QRect middleRect = QRect(0, topRect.bottom(), BACKGROUND_WIDTH,
this->height() - BACKGROUND_TOP_HEIGHT - BACKGROUND_BOTTOM_HEIGHT);
+///< @todo Overlaps with middleRect
QRect bottomRect = QRect(topRect.left(), middleRect.bottom(), BACKGROUND_WIDTH,
BACKGROUND_BOTTOM_HEIGHT);
/**
* @brief UserInfo shows user's data in expandable item.
- *
- * @class UserInfo userinfo.h "ui/userinfo.h"
*/
class UserInfo : public QWidget
{
*
* @param parent Parent
*/
- UserInfo(QWidget *parent=0);
+ UserInfo(QWidget *parent = 0);
/**
* @brief Desctructor
* @author Kaj Wallin - kaj.wallin (at) ixonos.com
* @author Katri Kaikkonen - katri.kaikkonen (at) ixonos.com
* @author Pekka Nissinen - pekka.nissinen (at) ixonos.com
- *
- * @class UserInfoPanel
*/
class UserInfoPanel : public QWidget
{
******************************************************************************/
private:
UserInfo *m_userInfo; ///< Instance of the user info view
-
};
#endif // USERPANEL_H
else if(resizedPosition.y() > (newSize.height() - rect().height()))
resizedPosition.ry() = newSize.height() - rect().height();
-
- if((pos().y() + rect().center().y()) > (oldHeight/2))
+ if((pos().y() + rect().center().y()) > (oldHeight / 2))
resizedPosition.ry() = newSize.height() - (oldHeight - pos().y());
- if((pos().x() + rect().center().x()) > (oldWidth/2))
+ if((pos().x() + rect().center().x()) > (oldWidth / 2))
resizedPosition.rx() = newSize.width() - (oldWidth - pos().x());
move(resizedPosition);