-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnormal_placer.cpp
More file actions
51 lines (40 loc) · 870 Bytes
/
normal_placer.cpp
File metadata and controls
51 lines (40 loc) · 870 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
49
50
51
#include "stdafx.h"
#include "normal_placer.h"
namespace fv
{
normal_placer::normal_placer(const QList<pixmap_widget*>& icons) : placer(icons)
{
}
normal_placer::~normal_placer()
{
}
int normal_placer::shift_index() const
{
return index();
}
QSizeF normal_placer::calculate_icon_size() const
{
auto sz = placement_rect().width() / icons().count();
return QSizeF(sz, sz);
}
qreal normal_placer::get_zvalue(int icon_num, qreal shift_value) const
{
return icon_num;
}
QPointF normal_placer::get_pos(int icon_num, qreal shift_value) const
{
return QPointF(icon_num * icon_size().width(), 0);
}
qreal normal_placer::get_scale(int icon_num, qreal shift_value) const
{
return 1.;
}
qreal normal_placer::get_opacity(int icon_num, qreal shift_value) const
{
return 1.;
}
qreal normal_placer::get_rotate_y(int icon_num, qreal shift_value) const
{
return 0.;
}
}