: SidePanel(parent)
{
qDebug() << __PRETTY_FUNCTION__;
- setType(SidePanel::FriendsPanel);
+ setType(SidePanel::FriendPanel);
m_friendListView = new FriendListView(this);
QScrollArea *friendListScroll = new QScrollArea(this);
friendListScroll->widget()->setAutoFillBackground(false);
m_panelVBox->addWidget(friendListScroll);
- setObjectName("FriendsPanel");
+ setObjectName("FriendPanel");
}
void FriendListPanel::friendInfoReceived(QList<User *> &friendList)
setMask(QPixmap(":/res/images/sliding_bar_left_test.png").mask());
}
else if(side == RIGHT) {
- setObjectName("FriendsPanelSlidingBar");
+ setObjectName("FriendPanelSlidingBar");
setStyleSheet(QString(
- "#FriendsPanelSlidingBar{background-image: url(:/res/images/sliding_bar_right_test.png)}"));
+ "#FriendPanelSlidingBar{background-image: url(:/res/images/sliding_bar_right_test.png)}"));
setMask(QPixmap(":/res/images/sliding_bar_right_test.png").mask());
}
else {
m_panelBase->resize(USERPANEL_WIDTH, SLIDINGBAR_HEIGHT + MARGIN_CORRECTION);
resize(USERPANEL_WIDTH + SLIDINGBAR_WIDTH,SLIDINGBAR_HEIGHT + MARGIN_CORRECTION);
}
- else if(currentType == SidePanel::FriendsPanel)
+ else if(currentType == SidePanel::FriendPanel)
{
resize(FRIENDPANEL_WIDTH + SLIDINGBAR_WIDTH, size.height() + MARGIN_CORRECTION);
m_panelBase->resize(FRIENDPANEL_WIDTH, size.height() + MARGIN_CORRECTION);
USERPANEL_CLOSED_X, PANEL_TOP_Y));
m_panelStateOpened->assignProperty(this, "pos", QPoint(
USERPANEL_OPENED_X, PANEL_TOP_Y));
+ setObjectName("UserPanel");
}
- else if (type == SidePanel::FriendsPanel) {
+ else if (type == SidePanel::FriendPanel) {
currentType = type;
m_panelBase->move(TOP_CORNER_X + SLIDINGBAR_WIDTH,PANEL_TOP_Y);
m_panelBase->resize(FRIENDPANEL_WIDTH, FRIENDPANEL_HEIGHT);
FRIENDPANEL_CLOSED_X, PANEL_TOP_Y));
m_panelStateOpened->assignProperty(this, "pos", QPoint(
FRIENDPANEL_OPENED_X, PANEL_TOP_Y));
+ setObjectName("FriendPanel");
}
else {
qFatal("Illegal type set for SidePanel::setType");
/**
* @brief Enumerator for the panel type
- * Defines values: UserPanel, FriendsPanel
+ * Defines values: UserPanel, FriendPanel
*
* @sa setType
*/
- enum PanelType {UserPanel, FriendsPanel};
+ enum PanelType {UserPanel, FriendPanel};
/******************************************************************************
* MEMBER FUNCTIONS AND SLOTS
******************************************************************************/
/**
* @brief Type setter for the panel. Also sets panel visible
*
- * Use to set panel type as UserPanel or FriendsPanel. Panel type determines
+ * Use to set panel type as UserPanel or FriendPanel. Panel type determines
* which side the panel will be rendered. UserPanel will always be rendered
- * on the left side of the screen and FriendsPanel on the right side.
+ * on the left side of the screen and FriendPanel on the right side.
*
- * @param type Type of the panel, either UserPanel or FriendsPanel
+ * @param type Type of the panel, either UserPanel or FriendPanel
* @sa PanelType
*/
void setType(SidePanel::PanelType type);
--- /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 <QtTest/QtTest>
+
+class TestSidePanel : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testPanelTypes();
+ void testPanelToggling();
+};
--- /dev/null
+
+SOURCES += \
+ testsidepanel.cpp
+
+HEADERS += \
+ ../../../src/ui/sidepanel.h \
+ ../../../src/ui/panelsliderbar.h \
+ ../../../src/ui/panelcommon.h \
+ ../../../src/map/mapcommon.h