Copyright (C) 2010 Ixonos Plc. Authors:
Pekka Nissinen - pekka.nissinen@ixonos.com
+ Sami Rämö - sami.ramo@ixonos.com
Situare is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
#ifndef PANELBASE_H
#define PANELBASE_H
-#include <QPaintEvent>
-#include <QPixmap>
#include <QWidget>
+class QHBoxLayout;
+class QListWidgetItem;
+class QVBoxLayout;
+
+class ImageButton;
+
/**
- * @brief Base class for panel inner content
- *
- * @author Pekka Nissinen - pekka.nissinen@ixonos.com
+ * @brief Base class for panels
*
- * @class PanelBase panelbase.h "ui/panelbase.h"
+ * @author Pekka Nissinen - pekka.nissinen (at) ixonos.com
+ * @author Sami Rämö - sami.ramo (at) ixonos.com
*/
class PanelBase : public QWidget
{
*/
PanelBase(QWidget *parent = 0);
+protected:
+ void resizeEvent(QResizeEvent *event);
+
/*******************************************************************************
- * BASE CLASS INHERITED AND REIMPLEMENTED MEMBER FUNCTIONS
+ * MEMBER FUNCTIONS AND SLOTS
******************************************************************************/
-protected:
+public:
+ /**
+ * @brief Getter for the generic panel related context buttons
+ *
+ * @returns Pointer to context buttons widget
+ */
+ QWidget* genericPanelButtons() const;
+
+protected slots:
+ void onListItemSelectionChanged();
+
+/*******************************************************************************
+ * SIGNALS
+ ******************************************************************************/
+signals:
/**
- * @brief Draws the panel content base
+ * @brief Signal for requesting a panel to be opened
*
- * @param * QPaintEvent unused
+ * @param widget Pointer to the widget that emitted the signal
*/
- void paintEvent(QPaintEvent *);
+ void openPanelRequested(QWidget *widget);
/*******************************************************************************
* DATA MEMBERS
- *******************************************************************************/
+ ******************************************************************************/
+protected:
+ QVBoxLayout *m_genericButtonsLayout; ///< Layout for generic context buttons
+ QHBoxLayout *m_itemButtonsLayout; ///< Layout for item related context buttons
+
private:
- QPixmap m_menuDropShadowTile; ///< Pixmap for menu drop shadow
+ QWidget *m_genericButtons; ///< Widget for generic context buttons
+ QWidget *m_itemButtons; ///< Widget for item related context buttons
};
-
#endif // PANELBASE_H