Forgotten.

This commit is contained in:
Jean-Paul Chaput 2008-07-07 14:53:12 +00:00
parent 2607d8d94c
commit 204758bf37
1 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,43 @@
// -*- C++ -*-
# include <QHBoxLayout>
# include "hurricane/viewer/DynamicLabel.h"
# include "hurricane/viewer/HMousePosition.h"
namespace Hurricane {
HMousePosition::HMousePosition ( QWidget* parent )
: QWidget(parent)
, _xPosition(NULL)
, _yPosition(NULL)
{
_xPosition = new DynamicLabel ();
_xPosition->setStaticText ( "X:" );
_xPosition->setDynamicText ( "N/A" );
_yPosition = new DynamicLabel ();
_yPosition->setStaticText ( "Y:" );
_yPosition->setDynamicText ( "N/A" );
QHBoxLayout* layout = new QHBoxLayout ();
layout->addWidget ( _xPosition );
layout->addWidget ( _yPosition );
layout->setContentsMargins ( 0, 0, 0, 0 );
setLayout ( layout );
}
void HMousePosition::setPosition ( const Point& position )
{
_xPosition->setDynamicText ( position.getX() );
_yPosition->setDynamicText ( position.getY() );
}
} // End of Hurricane namespace.