<file>res/images/menu_bar_drop_shadow.png</file>
<file>res/images/own_location.png</file>
<file>res/images/panel_bar_tile.png</file>
+ <file>res/images/panel_context_button_bar_tile.png</file>
+ <file>res/images/panel_context_button_bar_top.png</file>
<file>res/images/profile_pic_border.png</file>
<file>res/images/refresh.png</file>
<file>res/images/refresh_s.png</file>
ui/panelbar.cpp \
ui/panelbase.cpp \
ui/panelcontentstack.cpp \
+ ui/panelcontextbuttonbar.cpp \
ui/paneltab.cpp \
ui/paneltabbar.cpp \
ui/tabbedpanel.cpp \
ui/panelbase.h \
ui/panelcommon.h \
ui/panelcontentstack.h \
+ ui/panelcontextbuttonbar.h \
ui/paneltab.h \
ui/paneltabbar.h \
ui/tabbedpanel.h \
--- /dev/null
+/*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Pekka Nissinen - pekka.nissinen@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 "panelcontextbuttonbar.h"
+
+const int CONTEXT_BUTTON_BAR_RECT_X = 0;
+const int CONTEXT_BUTTON_BAR_WIDTH = 78;
+const int CONTEXT_BUTTON_BAR_HEIGHT = 16;
+const int CONTEXT_BUTTON_BAR_TOP_HEIGHT = 32;
+
+PanelContextButtonBar::PanelContextButtonBar(QWidget *parent)
+ : QWidget(parent)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ m_barTile.load(":/res/images/panel_context_button_bar_tile.png");
+ m_barTop.load(":/res/images/panel_context_button_bar_top.png");
+
+ m_barRect.setRect(CONTEXT_BUTTON_BAR_RECT_X, CONTEXT_BUTTON_BAR_TOP_HEIGHT,
+ CONTEXT_BUTTON_BAR_WIDTH, CONTEXT_BUTTON_BAR_HEIGHT);
+
+ resize(CONTEXT_BUTTON_BAR_WIDTH, CONTEXT_BUTTON_BAR_HEIGHT + CONTEXT_BUTTON_BAR_TOP_HEIGHT);
+}
+
+void PanelContextButtonBar::paintEvent(QPaintEvent *event)
+{
+ qDebug() << __PRETTY_FUNCTION__;
+
+ Q_UNUSED(event);
+
+ const int CONTEXT_BUTTON_BAR_TOP_X = 0;
+ const int CONTEXT_BUTTON_BAR_TOP_Y = 0;
+
+ QPainter painter(this);
+
+ painter.drawPixmap(CONTEXT_BUTTON_BAR_TOP_X, CONTEXT_BUTTON_BAR_TOP_Y, m_barTop);
+ painter.drawTiledPixmap(m_barRect, m_barTile);
+
+}
--- /dev/null
+/*
+ Situare - A location system for Facebook
+ Copyright (C) 2010 Ixonos Plc. Authors:
+
+ Pekka Nissinen - pekka.nissinen@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 PANELCONTEXTBUTTONBAR_H
+#define PANELCONTEXTBUTTONBAR_H
+
+#include <QWidget>
+
+class PanelContextButtonBar : public QWidget
+{
+ Q_OBJECT
+
+public:
+ /**
+ * @brief Constructor
+ *
+ * @param parent Parent
+ */
+ PanelContextButtonBar(QWidget *parent = 0);
+
+/*******************************************************************************
+ * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
+ ******************************************************************************/
+protected:
+ /**
+ * @brief Draws the bar
+ *
+ * @param event Paint event
+ */
+ void paintEvent(QPaintEvent *event);
+
+/*******************************************************************************
+ * DATA MEMBERS
+ ******************************************************************************/
+private:
+ QPixmap m_barTile; ///< Pixmap for button bar
+ QPixmap m_barTop; ///< Pixmap for button bar top
+
+ QRect m_barRect; ///< Rect for the button bar
+};
+
+#endif // PANELCONTEXTBUTTONBAR_H
#include "panelbar.h"
#include "panelcontentstack.h"
+#include "panelcontextbuttonbar.h"
#include "paneltabbar.h"
#include "tabbedpanel.h"
m_panelBar = new PanelBar(this);
m_panelBar->move(PANEL_TAB_WIDTH, PANEL_TOP_Y);
+ // --- CONTEXT BUTTON BAR ---
+ m_panelContextButtonBar = new PanelContextButtonBar(this);
+ m_panelContextButtonBar->move(1, 300);
+
// --- PANEL CONTENT ---
m_panelContentStack = new PanelContentStack(this);
m_panelContentStack->move(PANEL_TAB_WIDTH + PANEL_BAR_WIDTH, PANEL_TOP_Y);
class PanelBar;
class PanelContentStack;
+class PanelContextButtonBar;
class PanelTabBar;
/**
private:
bool m_isOpen; ///< Boolean used to track the current state of the statemachine
- QPropertyAnimation *m_panelAnimation; ///< Animation for panel state changes
+ QPropertyAnimation *m_panelAnimation; ///< Animation for panel state changes
- QSignalTransition *m_panelTransitionClose; ///< Transition signal for closing the panel
- QSignalTransition *m_panelTransitionOpen; ///< Transition signal for opening the panel
+ QSignalTransition *m_panelTransitionClose; ///< Transition signal for closing the panel
+ QSignalTransition *m_panelTransitionOpen; ///< Transition signal for opening the panel
- QState *m_panelStateClosed; ///< State of the closed panel
- QState *m_panelStateOpened; ///< State of the opened panel
+ QState *m_panelStateClosed; ///< State of the closed panel
+ QState *m_panelStateOpened; ///< State of the opened panel
- QStateMachine *m_panelStateMachine; ///< State machine for sliding the panel
+ QStateMachine *m_panelStateMachine; ///< State machine for sliding the panel
- PanelBar *m_panelBar; ///< Widget for panel bar
- PanelContentStack *m_panelContentStack; ///< Stack for panel widgets
- PanelTabBar *m_panelTabBar; ///< Widget for panel tab bar
+ PanelBar *m_panelBar; ///< Widget for panel bar
+ PanelContentStack *m_panelContentStack; ///< Stack for panel widgets
+ PanelContextButtonBar * m_panelContextButtonBar;///< Widget for panel context button bar
+ PanelTabBar *m_panelTabBar; ///< Widget for panel tab bar
};
#endif // TABBEDPANEL_H