Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
sauimone
- Wed, 21 Mar 2012 08:50:46
Show More
0
src/barchart/barchartitem.cpp
src/barchart/barchartitem.cpp
+11
-5
@@
-110,6
+110,12
void BarChartItem::layoutChanged()
110
qreal tW = mWidth ;
110
qreal tW = mWidth ;
111
qreal tH = mHeight ;
111
qreal tH = mHeight ;
112
qreal tM = mSeries -> max ();
112
qreal tM = mSeries -> max ();
113
114
// Domain:
115
if ( mDomainMaxY > tM ) {
116
tM = mDomainMaxY ;
117
}
118
113
qreal scale = ( tH / tM );
119
qreal scale = ( tH / tM );
114
qreal tC = categoryCount + 1 ;
120
qreal tC = categoryCount + 1 ;
115
qreal categoryWidth = tW / tC ;
121
qreal categoryWidth = tW / tC ;
@@
-222,11
+228,11
void BarChartItem::handleModelChanged(int index)
222
228
223
void BarChartItem :: handleDomainChanged ( qreal minX , qreal maxX , qreal minY , qreal maxY )
229
void BarChartItem :: handleDomainChanged ( qreal minX , qreal maxX , qreal minY , qreal maxY )
224
{
230
{
225
// TODO:
231
mDomainMinX = minX ;
226
Q_UNUSED ( minX )
232
mDomainMaxX = maxX ;
227
Q_UNUSED ( maxX )
233
mDomainMinY = minY ;
228
Q_UNUSED ( minY )
234
mDomainMaxY = maxY ;
229
Q_UNUSED ( maxY )
235
layoutChanged ();
230
236
231
/*
237
/*
232
int count = mSeries->categoryCount();
238
int count = mSeries->categoryCount();
0
src/barchart/barchartitem_p.h
src/barchart/barchartitem_p.h
+5
0
@@
-57,6
+57,11
protected:
57
int mWidth ;
57
int mWidth ;
58
qreal mBarWidth ;
58
qreal mBarWidth ;
59
59
60
qreal mDomainMinX ;
61
qreal mDomainMaxX ;
62
qreal mDomainMinY ;
63
qreal mDomainMaxY ;
64
60
bool mLayoutSet ; // True, if component has been laid out.
65
bool mLayoutSet ; // True, if component has been laid out.
61
66
62
// Not owned.
67
// Not owned.
0
src/barchart/stackedbarchartitem.cpp
src/barchart/stackedbarchartitem.cpp
+5
0
@@
-39,6
+39,11
void StackedBarChartItem::layoutChanged()
39
39
40
// Use temporary qreals for accurancy (we might get some compiler warnings... :)
40
// Use temporary qreals for accurancy (we might get some compiler warnings... :)
41
qreal maxSum = mSeries -> maxCategorySum ();
41
qreal maxSum = mSeries -> maxCategorySum ();
42
// Domain:
43
if ( mDomainMaxY > maxSum ) {
44
maxSum = mDomainMaxY ;
45
}
46
42
qreal h = mHeight ;
47
qreal h = mHeight ;
43
qreal scale = ( h / maxSum );
48
qreal scale = ( h / maxSum );
44
qreal tW = mWidth ;
49
qreal tW = mWidth ;
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
g 0-9
Goto bookmarked items from 0-9
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository access permissions settings
t s
Toggle sidebar on some pages