-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbomentry.cpp
More file actions
81 lines (64 loc) · 1.65 KB
/
bomentry.cpp
File metadata and controls
81 lines (64 loc) · 1.65 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#include "bomentry.h"
#include <QDebug>
BOMEntry::BOMEntry( int index, QString designator, QString partNumber, QString package, QPointF position, float rotation, bool mounted ) {
_index = index;
_designator = designator;
_partNumber = partNumber;
_package = package;
_position = position;
_rotation = rotation;
_mounted = mounted;
}
int BOMEntry::index() {
return _index;
}
QString BOMEntry::designator() {
return _designator;
}
QString BOMEntry::partNumber() {
return _partNumber;
}
QString BOMEntry::package() {
return _package;
}
QPointF BOMEntry::position() {
return _position;
}
float BOMEntry::rotation() {
return _rotation;
}
bool BOMEntry::mounted() {
return _mounted;
}
bool BOMEntry::assembled() {
return _assembled;
}
void BOMEntry::setDesignator(QString designator) {
_designator = designator;
}
void BOMEntry::setPartNumber(QString partNumber) {
_partNumber = partNumber;
}
void BOMEntry::setPackage(QString package) {
_package = package;
}
void BOMEntry::setPosition(QPointF position) {
_position = position;
}
void BOMEntry::setRotation(float rotation) {
_rotation = rotation;
}
void BOMEntry::setMounted(bool mounted) {
_mounted = mounted;
}
void BOMEntry::setAssembled(bool assembled) {
_assembled = assembled;
}
bool BOMEntry::matchSearchString(QString search ) {
if( (_designator.append(" ").contains( search, Qt::CaseInsensitive ) ) || (_partNumber.append(" ").contains( search, Qt::CaseInsensitive ) ) ) {
return true;
}
else {
return false;
}
}