#include "InfoWidget.h"

#include <QLabel>
#include <QGridLayout>

#include <Indoor/Assertions.h>

InfoWidget::InfoWidget(QWidget *parent) : QWidget(parent) {

	//setMinimumHeight(32);
	//setMaximumHeight(32);

	QGridLayout* lay = new QGridLayout(this);
	int row = 0;
	int col = 0;

	lblActivity = new QLabel();
	lblActivity->setText("-");
	//lblActivity->setStyleSheet("QLabel { color : white; }");
	//lblActivity->setFont(QFont("courier", 9));
	lay->addWidget(lblActivity, row, col, 1,1,Qt::AlignLeft);		++row;
	lblActivity->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);

	lblFilterTime = new QLabel();
	lblFilterTime->setText("-");
	//lblFilterTime->setStyleSheet("QLabel { color : white; }");
	//lblFilterTime->setFont(QFont("courier", 9));
	lay->addWidget(lblFilterTime, row, col, 1,1,Qt::AlignLeft);		++row;
	lblFilterTime->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);

//	lblMapViewTime = new QLabel();
//	lblMapViewTime->setText("-");
//	//lblMapViewTime->setStyleSheet("QLabel { color : white; }");
//	//lblMapViewTime->setFont(QFont("courier", 9));
//	lay->addWidget(lblMapViewTime, row, col, 1,1,Qt::AlignLeft);	++row;
//	lblMapViewTime->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);

	col = 1;
	row = 0;

	lblLog = new QLabel(this);
	lblLog->setText("-");
	//lblLog->setStyleSheet("QLabel { color : white; }");
	lblLog->setFont(QFont("Arial", 8));
	lay->addWidget(lblLog, row, col, 3, 1);
	lblLog->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);



}

void InfoWidget::showActivity(const QString& act) {
	lblActivity->setText("Activity: " + act);
}

void InfoWidget::showFilterTime(const QString& act) {
	lblFilterTime->setText("Filtering: " + act);
}

void InfoWidget::showMapViewTime(const QString& act) {
	lblMapViewTime->setText("MapView: " + act);
}

void InfoWidget::showLog(const QString& info) {
	lblLog->setText(info);
}

