Merge branch 'master' into contact_dialog
[situare] / src / ui / panelbase.h
diff --git a/src/ui/panelbase.h b/src/ui/panelbase.h
new file mode 100644 (file)
index 0000000..6f4dd0a
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+    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 PANELBASE_H
+#define PANELBASE_H
+
+#include <QWidget>
+
+class QVBoxLayout;
+
+class ImageButton;
+
+/**
+ * @brief Base class for panels
+ *
+ * @author Pekka Nissinen - pekka.nissinen (at) ixonos.com
+ */
+class PanelBase : public QWidget
+{
+    Q_OBJECT
+
+public:
+    /**
+     * @brief Constructor
+     *
+     * @param parent Parent
+     */
+    PanelBase(QWidget *parent = 0);
+
+/*******************************************************************************
+ * MEMBER FUNCTIONS AND SLOTS
+ ******************************************************************************/
+public:
+    /**
+     * @brief Getter for the context buttons
+     *
+     * @returns Pointer to context buttons widget
+     */
+    QWidget* contextButtons() const;
+
+/*******************************************************************************
+ * SIGNALS
+ ******************************************************************************/
+signals:
+    /**
+     * @brief Signal for requesting a panel to be opened
+     *
+     * @param widget Pointer to the widget that emitted the signal
+     */
+    void openPanelRequested(QWidget *widget);
+
+/*******************************************************************************
+ * DATA MEMBERS
+ ******************************************************************************/
+protected:
+    QVBoxLayout *m_contextButtonLayout; ///< Layout for context buttons
+
+private:
+    QWidget *m_contextButtons;          ///< Widget for context buttons
+};
+#endif // PANELBASE_H