-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparticuleliste.cpp
More file actions
48 lines (38 loc) · 911 Bytes
/
Copy pathparticuleliste.cpp
File metadata and controls
48 lines (38 loc) · 911 Bytes
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
42
43
44
45
46
47
48
#include "particuleliste.h"
#include "ui_particuleliste.h"
ParticuleListe::ParticuleListe(int y, QWidget *parent) :
QWidget(parent),
ui(new Ui::ParticuleListe)
{
ui->setupUi(this);
couleur = QColor(0, 0, 0);
move(0, y);
}
ParticuleListe::~ParticuleListe()
{
delete ui;
}
void ParticuleListe::setCouleur(QColor fond)
{
couleur = fond;
}
void ParticuleListe::setFormule(QString formule)
{
ui->Formule->setText(formule);
}
void ParticuleListe::setValeur(QString valeur)
{
ui->Valeur->setText(valeur);
}
bool ParticuleListe::getVisible()
{
return ui->Visible->isChecked();
}
void ParticuleListe::paintEvent(QPaintEvent *event)
{
QWidget::paintEvent(event);
QPainter dessin;
dessin.begin(this);
dessin.eraseRect(0, 0, 1000, 1000); //Efface tout
dessin.fillRect(0, 0, width(), height(), couleur);
}