promote RegularAreaRect from a typedef to a class, a bit more easy to eventually expand in the future

svn path=/trunk/KDE/kdegraphics/okular/; revision=686281
remotes/origin/KDE/4.0
Pino Toscano 19 years ago
parent ffd5ed0280
commit fbe8dbf108
  1. 21
      core/area.cpp
  2. 14
      core/area.h

@ -173,6 +173,27 @@ kdbgstream& operator<<( kdbgstream& str, const Okular::NormalizedRect& r )
return str;
}
RegularAreaRect::RegularAreaRect()
: RegularArea< NormalizedRect, QRect >(), d( 0 )
{
}
RegularAreaRect::RegularAreaRect( const RegularAreaRect& rar )
: RegularArea< NormalizedRect, QRect >( rar ), d( 0 )
{
}
RegularAreaRect::~RegularAreaRect()
{
}
RegularAreaRect& RegularAreaRect::operator=( const RegularAreaRect& rar )
{
RegularArea< NormalizedRect, QRect >::operator=( rar );
return *this;
}
HighlightAreaRect::HighlightAreaRect( const RegularAreaRect *area )
: RegularAreaRect(), s_id( -1 )
{

@ -676,7 +676,19 @@ void RegularArea<NormalizedShape, Shape>::transform( const QMatrix &matrix )
givePtr( (*this)[i] )->transform( matrix );
}
typedef RegularArea<NormalizedRect,QRect> RegularAreaRect;
class RegularAreaRect : public RegularArea< NormalizedRect, QRect >
{
public:
RegularAreaRect();
RegularAreaRect( const RegularAreaRect& rar );
~RegularAreaRect();
RegularAreaRect& operator=( const RegularAreaRect& rar );
private:
class Private;
Private * const d;
};
/**
* This class stores the coordinates of a highlighting area

Loading…
Cancel
Save