-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblock.cpp
89 lines (72 loc) · 1.2 KB
/
block.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
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
82
83
84
85
86
87
88
89
#include "block.h"
Block::Block(int block, const QString & data, GalFile * parent) :
QObject(parent)
{
_file = parent;
_blockNumber = block;
setData(data);
}
Block::Block(int block, GalFile * parent) :
QObject(parent)
{
_file = parent;
_blockNumber = block;
}
void Block::addSpot(Spot * spot)
{
_spots.append(spot);
}
Spot * Block::spot(int column,int row)
{
}
SpotList * Block::spots()
{
return &_spots;
}
const QStringList & Block::columnNames()
{
return _file->columnnames();
}
void Block::setData(const QString &data)
{
QStringList dataL = data.split(",");
_xOrigin = dataL[0].toInt();
_yOrigin= dataL[1].toInt();
_diameter = dataL[2].toInt();
_xCount = dataL[3].toInt();
_xSpacing = dataL[4].toInt();
_yCount = dataL[5].toInt();
_ySpacing = dataL[6].toInt();
}
int Block::blockNumber()
{
return _blockNumber;
}
int Block::xOrigin()
{
return _xOrigin;
}
int Block::yOrigin()
{
return _yOrigin;
}
int Block::diameter()
{
return _diameter;
}
int Block::xCount()
{
return _xCount;
}
int Block::yCount()
{
return _yCount;
}
int Block::xSpacing()
{
return _xSpacing;
}
int Block::ySpacing()
{
return _ySpacing;
}