Removed disabled button states, don't open panel without buttons
[situare] / src / ui / friendlistpanel.h
index 2d3bfdc..6a2723e 100644 (file)
 #ifndef FRIENDLISTPANEL_H
 #define FRIENDLISTPANEL_H
 
-#include <QWidget>
+#include "panelbase.h"
 
 class QLabel;
 class QLineEdit;
 class QPushButton;
 
 class FriendListItemDelegate;
-class GeoCoordinate;
 class FriendListView;
+class GeoCoordinate;
+class ImageButton;
 class User;
 
 /**
@@ -46,7 +47,7 @@ class User;
  * @author Jussi Laitinen - jussi.laitinen (at) ixonos.com
  * @author Sami Rämö - sami.ramo (at) ixonos.com
  */
-class FriendListPanel : public QWidget
+class FriendListPanel : public PanelBase
 {
     Q_OBJECT
 
@@ -168,13 +169,6 @@ private slots:
     void routeToSelectedFriend();
 
     /**
-    * @brief Sets route button disabled.
-    *
-    * Disabled if there isn't any list item selected.
-    */
-    void setRouteButtonDisabled();
-
-    /**
      * @brief Slot to show friends in list.
      *
      * Shows only friends that are on userIDs list
@@ -209,31 +203,24 @@ signals:
     */
     void routeToFriend(const GeoCoordinate &coordinates);
 
-    /**
-     * @brief Signal for requesting a panel to be opened
-     *
-     * @param widget Pointer to the widget that emitted the signal
-     */
-    void showPanelRequested(QWidget *widget);
-
 /*******************************************************************************
  * DATA MEMBERS
  ******************************************************************************/
 private:
-    bool m_mainWindowIsTopmost;         ///< Is the MainWindow the topmost one
-    bool m_somePanelIsOpen;             ///< Is any panel tab open
+    bool m_mainWindowIsTopmost;                 ///< Is the MainWindow the topmost one
+    bool m_somePanelIsOpen;                     ///< Is any panel tab open
 
-    QLabel *m_friendListLabel;          ///< Friend list label
+    QLabel *m_headerLabel;                      ///< Show how many friends are selected
 
-    QLineEdit *m_filterField;           ///< Text field for the filter text
+    QLineEdit *m_filterField;                   ///< Text field for the filter text
 
-    QPushButton *m_clearFilterButton;   ///< Button to clear list filtering
-    QPushButton *m_filterClearButton;   ///< Button for clearing the filtering
-    QPushButton *m_routeButton;         ///< Button to route to friend
+    QPushButton *m_clearTextFilteringButton;    ///< Button for clearing the text filtering
 
-    QWidget *m_friendListHeaderWidget;  ///< Friend list header widget
+    QWidget *m_headerWidget;                    ///< Friend list header widget
 
-    FriendListView *m_friendListView;   ///< Friend list view
+    FriendListView *m_friendListView;           ///< Friend list view
+    ImageButton *m_clearGroupFilteringButton;   ///< Button for clearing friend group filtering
+    ImageButton *m_routeButton;                 ///< Button for routing to selected friend
 };
 
 #endif // FRIENDLISTPANEL_H