[QGIS Commit] r9839 - branches/Version-1_0/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Dec 17 06:06:13 EST 2008


Author: wonder
Date: 2008-12-17 06:06:13 -0500 (Wed, 17 Dec 2008)
New Revision: 9839

Removed:
   branches/Version-1_0/src/core/qgsline.cpp
   branches/Version-1_0/src/core/qgsline.h
Modified:
   branches/Version-1_0/src/core/CMakeLists.txt
Log:
removed legacy class QgsLine


Modified: branches/Version-1_0/src/core/CMakeLists.txt
===================================================================
--- branches/Version-1_0/src/core/CMakeLists.txt	2008-12-17 11:03:46 UTC (rev 9838)
+++ branches/Version-1_0/src/core/CMakeLists.txt	2008-12-17 11:06:13 UTC (rev 9839)
@@ -19,7 +19,6 @@
   qgshttptransaction.cpp
   qgslabel.cpp
   qgslabelattributes.cpp
-  qgsline.cpp
   qgslogger.cpp
   qgsmaplayer.cpp
   qgsmaplayerregistry.cpp
@@ -248,7 +247,6 @@
 qgshttptransaction.h
 qgslabel.h
 qgslabelattributes.h
-qgsline.h
 qgslogger.h
 qgsmaplayer.h
 qgsmaplayerregistry.h

Deleted: branches/Version-1_0/src/core/qgsline.cpp
===================================================================
--- branches/Version-1_0/src/core/qgsline.cpp	2008-12-17 11:03:46 UTC (rev 9838)
+++ branches/Version-1_0/src/core/qgsline.cpp	2008-12-17 11:06:13 UTC (rev 9839)
@@ -1,107 +0,0 @@
-/***************************************************************************
-                          qgsline  -  description
-                    A simple line composed of two endpoints
-                             -------------------
-    begin                : 2004-10-24
-    copyright            : (C) 2004 by Gary E.Sherman
-    email                : sherman at mrcc.com
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-/* $Id$ */
-
-#include "qgsline.h"
-
-QgsLine::QgsLine()
-{
-}
-
-// Create a line from two points
-QgsLine::QgsLine( QgsPoint &p1, QgsPoint &p2 ) : mBegin( p1 ), mEnd( p2 )
-{
-
-}
-
-//! Destructor
-QgsLine::~QgsLine()
-{
-}
-
-/// Sets the begin point of the line
-void QgsLine::setBegin( QgsPoint &p1 )
-{
-  mBegin = p1;
-}
-/// Sets the end point of the line
-void QgsLine::setEnd( QgsPoint &p2 )
-{
-  mEnd = p2;
-}
-
-/// Get the begin point of the line
-QgsPoint QgsLine::begin() const
-{
-  return mBegin;
-}
-
-/// Get the end point of the line
-QgsPoint QgsLine::end() const
-{
-  return mEnd;
-}
-
-//! String representation of the line
-QString QgsLine::toString() const
-{
-  return QString( "Not implemented" );
-}
-
-//! As above but with precision for string representaton of a line
-QString QgsLine::toString( int thePrecision ) const
-{
-  return QString( "Not implemented" );
-}
-
-/*! Return the well known text representation for the line.
- * The wkt is created without an SRID.
- * @return Well known text
- */
-QString QgsLine::wellKnownText()
-{
-  return QString( "Not implemented" );
-}
-
-
-//! Inequality operator
-bool QgsLine::operator!=( const QgsLine &other )
-{
-  // Note this function assumes that "flipped" lines are not equal,
-  // thus preserving the concept of direction
-  if (( mBegin != other.begin() ) || ( mEnd != other.end() ) )
-  {
-    return true;
-  }
-  else
-  {
-    return false;
-  }
-}
-
-/// Assignment
-QgsLine & QgsLine::operator=( const QgsLine & other )
-{
-  if ( &other != this )
-  {
-    mBegin = other.begin();
-    mEnd = other.end();
-  }
-
-  return *this;
-}

Deleted: branches/Version-1_0/src/core/qgsline.h
===================================================================
--- branches/Version-1_0/src/core/qgsline.h	2008-12-17 11:03:46 UTC (rev 9838)
+++ branches/Version-1_0/src/core/qgsline.h	2008-12-17 11:06:13 UTC (rev 9839)
@@ -1,123 +0,0 @@
-/***************************************************************************
-                          qgsline.h  -  description
-                    A simple line composed of two endpoints
-                             -------------------
-    begin                : 2004-10-24
-    copyright            : (C) 2004 by Gary E.Sherman
-    email                : sherman at mrcc.com
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-/* $Id$ */
-
-#ifndef QGSLINE_H
-#define QGSLINE_H
-
-#include <iostream>
-
-#include "qgspoint.h"
-/** \ingroup core
- * A simple line object composed of a begin and end point.
- *
- * Comparisons (==, !=) honor the direction of the line. This means that
- * flipped lines with the same coordinates are not considered to be equal.
- *
- * For example, (1,1 2,2) != (2,2 1,1)
- */
-class CORE_EXPORT QgsLine
-{
-  public:
-    //! Default constructor
-    QgsLine();
-
-    /*! Create a line from two points
-     * @param p1 begin point
-     * @param p2 end point
-     */
-    QgsLine( QgsPoint &p1, QgsPoint &p2 );
-
-    //! Destructor
-    ~QgsLine();
-
-    /*! Sets the begin point of the line
-     * @param p1 Beginning point of the line
-     */
-    void setBegin( QgsPoint &p1 );
-
-    /*! Sets the end point of the line
-     * @param p1 End point of the line
-     */
-    void setEnd( QgsPoint &p2 );
-
-    /*! Get the begin point of the line
-     * @return Begin point of the line
-     */
-    QgsPoint begin() const;
-
-    /*! Get the end point of the line
-     * @return End point of the line
-     */
-    QgsPoint end() const;
-
-    //! String representation of the line
-    QString toString() const;
-
-    //! As above but with precision for string representation of a line
-    QString toString( int thePrecision ) const;
-
-    /*! Return the well known text representation for the line.
-     * The wkt is created without an SRID.
-     * @return Well known text
-     */
-    QString wellKnownText();
-
-    //! Equality operator
-    bool operator==( const QgsLine &other );
-
-    //! Inequality operator
-    bool operator!=( const QgsLine &other );
-
-    /// Assignment
-    QgsLine & operator=( const QgsLine &other );
-
-  private:
-
-    //! Begin point
-    QgsPoint mBegin;
-
-    //! End point
-    QgsPoint mEnd;
-
-}; // class QgsLine
-
-
-inline bool operator==( const QgsLine &l1, const QgsLine &l2 )
-{
-  // Note this function assumes that "flipped" lines are not equal,
-  // thus preserving the concept of direction
-  if (( l1.begin() == l2.begin() ) && ( l1.end() == l2.end() ) )
-  {
-    return true;
-  }
-  else
-  {
-    return false;
-  }
-}
-//! Stream operator for writing the line
-inline std::ostream& operator << ( std::ostream& os, const QgsLine &l )
-{
-  os << l.toString().toLocal8Bit().data();
-  return os;
-}
-
-
-#endif //QGSLINE_H
-



More information about the QGIS-commit mailing list