~showard314/ubuntu/natty/qtiplot/Python2.7_fix

« back to all changes in this revision

Viewing changes to qtiplot/src/VectorCurve.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fathi Boudra
  • Date: 2008-04-04 15:11:55 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080404151155-rjp12ziov4tryj0o
Tags: 0.9.4-1
* New upstream release.
* Refresh patches.
* Remove 04_homepage_url patch. Merged upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
VectorCurve::VectorCurve(VectorStyle style, Table *t, const QString& xColName, const char *name,
36
36
                                const QString& endCol1, const QString& endCol2, int startRow, int endRow):
37
37
    DataCurve(t, xColName, name, startRow, endRow),
 
38
        pen(QPen(Qt::black, 1, Qt::SolidLine)),
 
39
        filledArrow (true),
38
40
        d_style (style),
39
 
        pen(QPen(Qt::black, 1, Qt::SolidLine)),
40
41
        d_headLength (4),
41
42
        d_headAngle (45),
42
43
        d_position (Tail),
43
 
        filledArrow (true),
44
44
        d_end_x_a (endCol1),
45
45
        d_end_y_m (endCol2)
46
46
{
47
47
        if (style == XYXY)
48
48
                setType(Graph::VectXYXY);
49
49
        else if (style == XYAM)
50
 
                setType(Graph::VectXYAM);
 
50
                setType(Graph::VectXYAM);
51
51
}
52
52
 
53
53
void VectorCurve::copy(const VectorCurve *vc)
90
90
        const double angle = vectorEnd->x(i);
91
91
        const double mag = vectorEnd->y(i);
92
92
 
93
 
        int xs, ys, xe, ye;
 
93
        int xs = 0, ys = 0, xe = 0, ye = 0;
94
94
        switch(d_position)
95
95
                {
96
96
                case Tail:
193
193
    vectorEnd=new QwtArrayData(x, y);
194
194
}
195
195
 
196
 
int VectorCurve::width()
 
196
double VectorCurve::width()
197
197
{
198
 
return pen.width ();
 
198
return pen.widthF();
199
199
}
200
200
 
201
 
void VectorCurve::setWidth(int w)
 
201
void VectorCurve::setWidth(double w)
202
202
{
203
 
pen.setWidth (w);
 
203
pen.setWidthF(w);
204
204
}
205
205
 
206
206
QColor VectorCurve::color()