-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdescriptionfichier.cpp
More file actions
45 lines (38 loc) · 1.02 KB
/
descriptionfichier.cpp
File metadata and controls
45 lines (38 loc) · 1.02 KB
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
#include "descriptionfichier.h"
#include "ui_descriptionfichier.h"
DescriptionFichier::DescriptionFichier(QString titre, QString description, QString chemin, QWidget *parent) :
QWidget(parent),
ui(new Ui::DescriptionFichier)
{
ui->setupUi(this);
ui->Nom->setPlainText(titre);
ui->Description->setPlainText(description);
cheminFichier = chemin;
}
DescriptionFichier::~DescriptionFichier()
{
delete ui;
}
void DescriptionFichier::cocher(bool checked)
{
ui->Case->setChecked(checked);
}
bool DescriptionFichier::estCoche() const
{
return ui->Case->isChecked();
}
bool DescriptionFichier::contient(QString recherche)
{
return ui->Nom->toPlainText().toLower().contains(recherche) || ui->Description->toPlainText().toLower().contains(recherche);
}
void DescriptionFichier::on_Case_toggled()
{
if(ui->Case->isChecked())
{
emit coche(cheminFichier);
}
}
QString DescriptionFichier::getCheminFichier() const
{
return cheminFichier;
}