void ListItemContextButtonBar::changeButtons()
{
- qWarning() << __PRETTY_FUNCTION__;
+ qDebug() << __PRETTY_FUNCTION__;
Q_ASSERT(m_animation->state() == QAbstractAnimation::Stopped);
void ListItemContextButtonBar::hideContextButtonBar()
{
- qWarning() << __PRETTY_FUNCTION__;
+ qDebug() << __PRETTY_FUNCTION__;
m_state = StateClosing;
m_animation->setDirection(QAbstractAnimation::Backward);
void ListItemContextButtonBar::onAnimationFinished()
{
- qWarning() << __PRETTY_FUNCTION__;
+ qDebug() << __PRETTY_FUNCTION__;
if (m_animation->direction() == QAbstractAnimation::Backward) {
m_state = StateHidden;
void ListItemContextButtonBar::onListItemSelectionChanged(bool itemIsSelected)
{
- qWarning() << __PRETTY_FUNCTION__;
-
- /// @todo m_waitForOpen is not cleared if item selection is removed while waiting
+ qDebug() << __PRETTY_FUNCTION__;
- if (m_newContextButtons)
- m_waitForOpen = true;
- else if (itemIsSelected && (m_state != StateVisible))
- showContextButtonBar();
- else if (!itemIsSelected && (m_state != StateHidden))
- hideContextButtonBar();
+ if (itemIsSelected) {
+ if (m_newContextButtons)
+ m_waitForOpen = true;
+ else if (m_state != StateVisible)
+ showContextButtonBar();
+ } else {
+ if (m_newContextButtons)
+ m_waitForOpen = false;
+ else if (m_state != StateHidden)
+ hideContextButtonBar();
+ }
}
void ListItemContextButtonBar::setContextButtons(QWidget *contextButtons)
{
- qWarning() << __PRETTY_FUNCTION__;
+ qDebug() << __PRETTY_FUNCTION__;
m_newContextButtons = contextButtons;
m_waitForOpen = false;
void ListItemContextButtonBar::showContextButtonBar()
{
- qWarning() << __PRETTY_FUNCTION__;
+ qDebug() << __PRETTY_FUNCTION__;
m_state = StateOpening;
m_animation->setDirection(QAbstractAnimation::Forward);