Moved setting the visibility of the buttons to ListItemContextButtonBar
[situare] / src / ui / listitemcontextbuttonbar.cpp
index 48487b3..722f123 100644 (file)
@@ -32,6 +32,19 @@ ListItemContextButtonBar::ListItemContextButtonBar(QWidget *parent) :
     qDebug() << __PRETTY_FUNCTION__;
 }
 
+void ListItemContextButtonBar::hideContextButtonBar()
+{
+    qDebug() << __PRETTY_FUNCTION__;
+
+}
+
+void ListItemContextButtonBar::onListItemSelectionChanged(bool itemIsSelected)
+{
+    qDebug() << __PRETTY_FUNCTION__;
+
+    m_contextButtons->setVisible(itemIsSelected);
+}
+
 void ListItemContextButtonBar::setContextButtons(QWidget *contextButtons)
 {
     qDebug() << __PRETTY_FUNCTION__;
@@ -54,3 +67,9 @@ void ListItemContextButtonBar::setContextButtons(QWidget *contextButtons)
     const int Y = 0;
     move(PANEL_TAB_BAR_WIDTH + PANEL_BAR_WIDTH + FROM_PANEL_CONTENTS_LEFT, Y);
 }
+
+void ListItemContextButtonBar::showContextButtonBar()
+{
+    qDebug() << __PRETTY_FUNCTION__;
+
+}