-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeshinformationgroupbox.cpp
41 lines (35 loc) · 1.01 KB
/
meshinformationgroupbox.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (c) 2014 Andranik Abrahamyan
#include <QtGui/QtGui>
#include "meshinformationgroupbox.h"
MeshInformationGroupBox::MeshInformationGroupBox(QWidget *parent)
: QGroupBox(tr("Mesh Information"), parent)
{
QGridLayout *layout = new QGridLayout;
// Write labels and values
layout->addWidget(new QLabel("# Facets:"), 0, 0);
numFacets = new QLabel("");
numFacets->setAlignment(Qt::AlignRight);
layout->addWidget(numFacets, 0, 1);
layout->addWidget(new QLabel("# Points:"), 1, 0);
numPoints = new QLabel("");
numPoints->setAlignment(Qt::AlignRight);
layout->addWidget(numPoints, 1, 1);
setLayout(layout);
}
MeshInformationGroupBox::~MeshInformationGroupBox()
{}
void MeshInformationGroupBox::reset()
{
// Reset values
numFacets->setText("");
numPoints->setText("");
}
void MeshInformationGroupBox::setValues(const Stl_Stats stats)
{
QString data;
// Write values contained in stats
data.setNum(stats.numFacets);
numFacets->setText(data);
data.setNum(stats.numPoints);
numPoints->setText(data);
}