This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
YASMIN/ui/debug/InfoWidget.cpp
2016-09-28 12:16:45 +02:00

68 lines
1.9 KiB
C++

#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);
}