Support badge on output panel buttons.

These are used to indicate number of issues and todos.

Change-Id: I320b6c0f5835570f0b5e5898fb140bd8266090c8
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Francois Ferrand
2012-06-14 16:33:10 +02:00
committed by Daniel Teske
parent 54569d5931
commit 8a57b7bcbf
6 changed files with 112 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ TodoOutputPane::TodoOutputPane(TodoItemsModel *todoItemsModel, QObject *parent)
createScopeButtons();
setScanningScope(ScanningScopeCurrentFile); // default
connect(m_todoItemsModel, SIGNAL(layoutChanged()), SIGNAL(navigateStateUpdate()));
connect(m_todoItemsModel, SIGNAL(layoutChanged()), SLOT(updateTodoCount()));
}
TodoOutputPane::~TodoOutputPane()
@@ -149,6 +150,7 @@ void TodoOutputPane::scopeButtonClicked(QAbstractButton* button)
emit scanningScopeChanged(ScanningScopeCurrentFile);
else if (button == m_wholeProjectButton)
emit scanningScopeChanged(ScanningScopeProject);
setBadgeNumber(m_todoItemsModel->rowCount());
}
void TodoOutputPane::todoTreeViewClicked(const QModelIndex &index)
@@ -167,6 +169,11 @@ void TodoOutputPane::todoTreeViewClicked(const QModelIndex &index)
emit todoItemClicked(item);
}
void TodoOutputPane::updateTodoCount()
{
setBadgeNumber(m_todoItemsModel->rowCount());
}
void TodoOutputPane::createTreeView()
{
m_todoTreeView = new QTreeView();