Merge branch 'master' into contact_dialog
[situare] / src / ui / panelbase.cpp
diff --git a/src/ui/panelbase.cpp b/src/ui/panelbase.cpp
new file mode 100644 (file)
index 0000000..a0ebc33
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+    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 <QVBoxLayout>
+
+#include "panelbase.h"
+
+PanelBase::PanelBase(QWidget *parent)
+    : QWidget(parent)
+{
+    qDebug() << __PRETTY_FUNCTION__;
+
+    const int CONTEXT_BUTTON_MARGIN_LEFT = 2;
+    const int CONTEXT_BUTTON_MARGIN_TOP = 10;
+    const int CONTEXT_BUTTON_MARGIN_RIGHT = 0;
+    const int CONTEXT_BUTTON_MARGIN_BOTTOM = 0;
+    const int CONTEXT_BUTTON_SPACING = 0;
+
+    m_contextButtons = new QWidget;
+
+    m_contextButtonLayout = new QVBoxLayout;
+    m_contextButtonLayout->setContentsMargins(CONTEXT_BUTTON_MARGIN_LEFT,
+                                              CONTEXT_BUTTON_MARGIN_TOP,
+                                              CONTEXT_BUTTON_MARGIN_RIGHT,
+                                              CONTEXT_BUTTON_MARGIN_BOTTOM);
+    m_contextButtonLayout->setSpacing(CONTEXT_BUTTON_SPACING);
+
+    m_contextButtons->setLayout(m_contextButtonLayout);
+}
+
+QWidget* PanelBase::contextButtons() const
+{
+    qDebug() << __PRETTY_FUNCTION__;
+
+    return m_contextButtons;
+}