All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Public Member Functions
QGpGuiTools::GeographicalReference Class Reference

Brief description of class still missing. More...

#include <GeographicalReference.h>

List of all members.

Public Member Functions

 GeographicalReference (QWidget *parent=0)
Point2D reference () const
void save ()
void setReference (const Point2D &p)
 ~GeographicalReference ()

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

Description of constructor still missing

References QGpCoreTools::NamedPoint::fromString(), QGpCoreTools::NamedPoint::name(), QGpCoreTools::NamedPoint::setName(), and TRACE.

    : QWidget(parent)
  {
    TRACE;
    setupUi(this);

    refName->addItem(QString::null);
    QSettings * reg=settings();
    QStringList list=reg->childKeys();
    qSort(list);
    NamedPoint p;
    for(QStringList::iterator it=list.begin(); it!=list.end(); it++) {
      if(p.fromString(reg->value(*it).toString())) {
        p.setName(*it);
        _references.append(p);
        refName->addItem(p.name());
      }
    }
    delete reg;
  }

Description of destructor still missing

References TRACE.

  {
    TRACE;
  }

Member Function Documentation

References QGpCoreTools::Point2D::setX(), and QGpCoreTools::Point2D::setY().

Referenced by save(), and QGpGuiTools::CoordinateFile::write().

  {
    Point2D p;
    p.setX(refLongitude->text().toDouble());
    p.setY(refLatitude->text().toDouble());
    return p;
  }

References reference(), and QGpCoreTools::Point2D::toString().

Referenced by QGpGuiTools::CoordinateFile::write().

  {
    if(!refName->currentText().isEmpty()) {
      Point2D p=reference();
      QSettings * reg=settings();
      reg->setValue(refName->currentText(), p.toString(20));
      delete reg;
    }
  }

References QGpCoreTools::Point2D::x(), and QGpCoreTools::Point2D::y().

  {
    refLongitude->setText(QString::number(p.x(), 'f', 10));
    refLatitude->setText(QString::number(p.y(), 'f', 10));
  }

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines