1 | Index: libs/libmyth/xmlparse.cpp
|
---|
2 | ===================================================================
|
---|
3 | --- libs/libmyth/xmlparse.cpp (revision 13509)
|
---|
4 | +++ libs/libmyth/xmlparse.cpp (working copy)
|
---|
5 | @@ -2555,8 +2555,9 @@
|
---|
6 | QPoint selectPoint(0,0);
|
---|
7 | QPoint upArrowPoint(0,0);
|
---|
8 | QPoint downArrowPoint(0,0);
|
---|
9 | + QPoint leftArrowPoint(0,0);
|
---|
10 | + QPoint rightArrowPoint(0,0);
|
---|
11 |
|
---|
12 | -
|
---|
13 |
|
---|
14 | //
|
---|
15 | // A Map to store the geometry of
|
---|
16 | @@ -2694,6 +2695,14 @@
|
---|
17 | }
|
---|
18 | else if (imgname.lower() == "leftarrow")
|
---|
19 | {
|
---|
20 | + QString imgpoint = "";
|
---|
21 | + imgpoint = info.attribute("location", "");
|
---|
22 | + if (!imgpoint.isNull() && !imgpoint.isEmpty())
|
---|
23 | + {
|
---|
24 | + leftArrowPoint = parsePoint(imgpoint);
|
---|
25 | + leftArrowPoint.setX((int)(leftArrowPoint.x() *
|
---|
26 | wmult));
|
---|
27 | + leftArrowPoint.setY((int)(leftArrowPoint.y() *
|
---|
28 | hmult));
|
---|
29 | + }
|
---|
30 | leftarrow_img = gContext->LoadScalePixmap(file);
|
---|
31 | if (!leftarrow_img)
|
---|
32 | {
|
---|
33 | @@ -2702,6 +2711,14 @@
|
---|
34 | }
|
---|
35 | else if (imgname.lower() == "rightarrow")
|
---|
36 | {
|
---|
37 | + QString imgpoint = "";
|
---|
38 | + imgpoint = info.attribute("location", "");
|
---|
39 | + if (!imgpoint.isNull() && !imgpoint.isEmpty())
|
---|
40 | + {
|
---|
41 | + rightArrowPoint = parsePoint(imgpoint);
|
---|
42 | + rightArrowPoint.setX((int)(rightArrowPoint.x()
|
---|
43 | * wmult));
|
---|
44 | + rightArrowPoint.setY((int)(rightArrowPoint.y()
|
---|
45 | * hmult));
|
---|
46 | + }
|
---|
47 | rightarrow_img = gContext->LoadScalePixmap(file);
|
---|
48 | if (!rightarrow_img)
|
---|
49 | {
|
---|
50 | @@ -2837,6 +2854,8 @@
|
---|
51 |
|
---|
52 | mtl->setUpArrowOffset(upArrowPoint);
|
---|
53 | mtl->setDownArrowOffset(downArrowPoint);
|
---|
54 | + mtl->setLeftArrowOffset(leftArrowPoint);
|
---|
55 | + mtl->setRightArrowOffset(rightArrowPoint);
|
---|
56 | mtl->setArrowImages(*uparrow_img, *downarrow_img, *leftarrow_img,
|
---|
57 | *rightarrow_img);
|
---|
58 |
|
---|
59 | Index: libs/libmyth/uitypes.cpp
|
---|
60 | ===================================================================
|
---|
61 | --- libs/libmyth/uitypes.cpp (revision 13509)
|
---|
62 | +++ libs/libmyth/uitypes.cpp (working copy)
|
---|
63 | @@ -3310,6 +3310,10 @@
|
---|
64 | upArrowOffset.setY(0);
|
---|
65 | downArrowOffset.setX(0);
|
---|
66 | downArrowOffset.setY(0);
|
---|
67 | + leftArrowOffset.setX(0);
|
---|
68 | + leftArrowOffset.setY(0);
|
---|
69 | + rightArrowOffset.setX(0);
|
---|
70 | + rightArrowOffset.setY(0);
|
---|
71 | incSearch = "";
|
---|
72 | }
|
---|
73 |
|
---|
74 | @@ -3616,14 +3620,14 @@
|
---|
75 | //
|
---|
76 | if (i == bins && hotspot_node->childCount() > 0)
|
---|
77 | {
|
---|
78 | - p->drawPixmap(x_location +
|
---|
79 | (*highlight_map[i]).width() - right_arrow_image.width(),
|
---|
80 | - y_location -
|
---|
81 | QFontMetrics(tmpfont->face).height() + right_arrow_image.height() / 2,
|
---|
82 | + p->drawPixmap(x_location +
|
---|
83 | (*highlight_map[i]).width() - right_arrow_image.width() +
|
---|
84 | rightArrowOffset.x(),
|
---|
85 | + y_location + rightArrowOffset.y()
|
---|
86 | - QFontMetrics(tmpfont->face).height() + right_arrow_image.height() / 2
|
---|
87 | ,
|
---|
88 | right_arrow_image);
|
---|
89 | }
|
---|
90 | if (i == 1 &&
|
---|
91 | hotspot_node->getParent()->getParent())
|
---|
92 | {
|
---|
93 | - p->drawPixmap(x_location,
|
---|
94 | - y_location -
|
---|
95 | QFontMetrics(tmpfont->face).height() + left_arrow_image.height() / 2,
|
---|
96 | + p->drawPixmap(x_location + leftArrowOffset.x(),
|
---|
97 | + y_location + leftArrowOffset.y()
|
---|
98 | - QFontMetrics(tmpfont->face).height() + left_arrow_image.height() / 2,
|
---|
99 | left_arrow_image);
|
---|
100 | }
|
---|
101 | }
|
---|
102 | Index: libs/libmyth/uitypes.h
|
---|
103 | ===================================================================
|
---|
104 | --- libs/libmyth/uitypes.h (revision 13509)
|
---|
105 | +++ libs/libmyth/uitypes.h (working copy)
|
---|
106 | @@ -1045,6 +1045,10 @@
|
---|
107 | ~UIManagedTreeListType();
|
---|
108 | void setUpArrowOffset(QPoint& pt) { upArrowOffset = pt;}
|
---|
109 | void setDownArrowOffset(QPoint& pt) { downArrowOffset = pt;}
|
---|
110 | +void setLeftArrowOffset(QPoint& pt) {leftArrowOffset = pt;}
|
---|
111 | +void setRightArrowOffset(QPoint& pt) {rightArrowOffset = pt;}
|
---|
112 | +
|
---|
113 | +
|
---|
114 | void setSelectPoint(QPoint& pt) { selectPoint = pt;}
|
---|
115 | void setSelectPadding(int pad) {selectPadding = pad;}
|
---|
116 | void setArea(QRect an_area) { area = an_area; }
|
---|
117 | @@ -1150,6 +1154,8 @@
|
---|
118 | QPoint selectPoint;
|
---|
119 | QPoint upArrowOffset;
|
---|
120 | QPoint downArrowOffset;
|
---|
121 | + QPoint leftArrowOffset;
|
---|
122 | + QPoint rightArrowOffset;
|
---|
123 | QString incSearch;
|
---|
124 | bool bIncSearchContains;
|
---|
125 | };
|
---|
126 |
|
---|