Files
Sourcetrail/src/lib/component/controller/StatusBarController.cpp
T
Eberhard Graether 749b1647e4 ui: added loader animation gif to StatusBar
The loader animation can be activated by setting the showLoader flag on MessageStatus.
2015-04-28 20:26:31 +02:00

34 lines
692 B
C++

#include "component/controller/StatusBarController.h"
#include "utility/logging/logging.h"
#include "component/view/StatusBarView.h"
StatusBarController::StatusBarController()
{
}
StatusBarController::~StatusBarController()
{
}
StatusBarView* StatusBarController::getView()
{
return Controller::getView<StatusBarView>();
}
void StatusBarController::handleMessage(MessageStatus* message)
{
setStatus(message->status, message->isError, message->showLoader);
}
void StatusBarController::setStatus(const std::string& status, bool isError, bool showLoader)
{
if (!status.empty())
{
LOG_INFO_STREAM(<< "STATUS " << status);
getView()->showMessage(status, isError, showLoader);
}
}