Brief description of class still missing. More...
#include <TapeCoordinateItem.h>
Public Member Functions | |
void | add (const QString &name) |
virtual int | columnCount (const QModelIndex &parent) const |
virtual QVariant | data (const QModelIndex &index, int role) const |
Qt::ItemFlags | flags (const QModelIndex &index) const |
virtual QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
int | indexOf (const QString &name) const |
const QList< TapePoint > & | points () const |
virtual int | rowCount (const QModelIndex &parent) const |
virtual bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
void | setPoint (const QString &name, const Point2D &p) |
TapeCoordinateItem (QObject *parent=0) |
Brief description of class still missing.
Full description of class still missing
TapeCoordinateItem::TapeCoordinateItem | ( | QObject * | parent = 0 | ) |
void TapeCoordinateItem::add | ( | const QString & | name | ) |
int TapeCoordinateItem::columnCount | ( | const QModelIndex & | parent | ) | const [virtual] |
QVariant TapeCoordinateItem::data | ( | const QModelIndex & | index, |
int | role | ||
) | const [virtual] |
Qt::ItemFlags TapeCoordinateItem::flags | ( | const QModelIndex & | index | ) | const |
QVariant TapeCoordinateItem::headerData | ( | int | section, |
Qt::Orientation | orientation, | ||
int | role | ||
) | const [virtual] |
int TapeCoordinateItem::indexOf | ( | const QString & | name | ) | const |
References TRACE.
Referenced by setPoint().
{ TRACE; for(int i=_points.count()-1; i>=0; i--) { if(name==_points.at(i).name()) { return i; } } return -1; }
const QList<TapePoint>& TapeCoordinateItem::points | ( | ) | const [inline] |
{return _points;}
int TapeCoordinateItem::rowCount | ( | const QModelIndex & | parent | ) | const [virtual] |
bool TapeCoordinateItem::setData | ( | const QModelIndex & | index, |
const QVariant & | value, | ||
int | role = Qt::EditRole |
||
) | [virtual] |
References TapePoint::setType(), QGpCoreTools::Point2D::setX(), QGpCoreTools::Point2D::setY(), and TRACE.
{ TRACE; if(role!=Qt::EditRole) { return false; } TapePoint& p=_points[index.row()]; switch(index.column()) { case 0: return false; case 1: p.setX(value.toDouble()); return true; case 2: p.setY(value.toDouble()); return true; case 3: p.setType(value.toString()); return true; default: break; } return false; }
void TapeCoordinateItem::setPoint | ( | const QString & | name, |
const Point2D & | p | ||
) |