Rough implementation of the item related buttons
[situare] / src / ui / panelbase.h
index 6f4dd0a..3da0f62 100644 (file)
@@ -3,6 +3,7 @@
     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
@@ -24,6 +25,8 @@
 
 #include <QWidget>
 
+class QHBoxLayout;
+class QListWidgetItem;
 class QVBoxLayout;
 
 class ImageButton;
@@ -32,6 +35,7 @@ class ImageButton;
  * @brief Base class for panels
  *
  * @author Pekka Nissinen - pekka.nissinen (at) ixonos.com
+ * @author Sami Rämö - sami.ramo (at) ixonos.com
  */
 class PanelBase : public QWidget
 {
@@ -45,16 +49,22 @@ public:
      */
     PanelBase(QWidget *parent = 0);
 
+protected:
+    void resizeEvent(QResizeEvent *event);
+
 /*******************************************************************************
  * MEMBER FUNCTIONS AND SLOTS
  ******************************************************************************/
 public:
     /**
-     * @brief Getter for the context buttons
+     * @brief Getter for the generic panel related context buttons
      *
      * @returns Pointer to context buttons widget
      */
-    QWidget* contextButtons() const;
+    QWidget* genericPanelButtons() const;
+
+protected slots:
+    void onListItemSelectionChanged();
 
 /*******************************************************************************
  * SIGNALS
@@ -71,9 +81,11 @@ signals:
  * DATA MEMBERS
  ******************************************************************************/
 protected:
-    QVBoxLayout *m_contextButtonLayout; ///< Layout for context buttons
+    QVBoxLayout *m_genericButtonsLayout;    ///< Layout for generic context buttons
+    QHBoxLayout *m_itemButtonsLayout;       ///< Layout for item related context buttons
 
 private:
-    QWidget *m_contextButtons;          ///< Widget for context buttons
+    QWidget *m_genericButtons;              ///< Widget for generic context buttons
+    QWidget *m_itemButtons;                 ///< Widget for item related context buttons
 };
 #endif // PANELBASE_H