demos/shared/hoverpoints.cpp File Reference

#include "arthurwidgets.h"
#include "hoverpoints.h"

Include dependency graph for hoverpoints.cpp:

Go to the source code of this file.

Defines

#define printf

Functions

static QPointF bound_point (const QPointF &point, const QRectF &bounds, int lock)
static bool x_less_than (const QPointF &p1, const QPointF &p2)
static bool y_less_than (const QPointF &p1, const QPointF &p2)


Define Documentation

#define printf

Definition at line 31 of file hoverpoints.cpp.

Referenced by QPainterPath::arcTo(), QIODevice::atEnd(), QApplication::beep(), QPainter::begin(), QFTOutlineMapper::beginOutline(), QFTOutlineMapper::clipElements(), QIODevice::close(), QFTOutlineMapper::closeSubpath(), QPainterPath::closeSubpath(), QFTOutlineMapper::convertElements(), QFTOutlineMapper::convertPath(), QPainterPath::cubicTo(), QFTOutlineMapper::curveTo(), QPainterPrivate::draw_helper(), QPainter::drawArc(), QWindowsXPStylePrivate::drawBackgroundDirectly(), QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QPainter::drawChord(), QPainter::drawConvexPolygon(), QPainter::drawEllipse(), QPainter::drawLines(), QPainter::drawPath(), QPainter::drawPie(), QPainter::drawPixmap(), QPainter::drawPoints(), QPainter::drawPolygon(), QPainter::drawPolyline(), QPainter::drawRects(), QPainter::drawRoundRect(), QPainter::drawText(), QPainter::drawTextItem(), QPainter::drawTiledPixmap(), QPainter::end(), ProjectPorter::error(), QDesigner::initialize(), QStroker::joinPoints(), QPainterPath::lineTo(), QFTOutlineMapper::lineTo(), listInterface(), listObjects(), main(), QFTOutlineMapper::moveTo(), QPainterPath::moveTo(), nextArg(), QIODevice::open(), parseCmdLine(), placeCall(), ProjectPorter::portFiles(), ProjectPorter::portProject(), QIODevice::pos(), printAllServices(), QTest::qInvokeTestMethod(), QIODevice::QIODevice(), QTest::qParseArgs(), QTest::qPrintTestSlots(), qt_Ksc5601ToUnicode(), qt_UnicodeToKsc5601(), QTest::qToInt(), QPainterPath::quadTo(), QIODevice::read(), QIODevice::readAll(), QIODevice::readLine(), QIODevice::readLineData(), QIODevice::reset(), QPainter::resetMatrix(), QPainter::restore(), QPainter::rotate(), QPainter::save(), QPainter::scale(), QIODevice::seek(), QPainter::setBackground(), QPainter::setBackgroundMode(), QPainter::setBrush(), QPainter::setBrushOrigin(), QPainter::setClipPath(), QPainter::setClipping(), QPainter::setClipRegion(), QPainter::setFont(), QIODevice::setOpenMode(), QPainter::setPen(), QPainter::setRenderHint(), QPainter::setViewport(), QPainter::setViewTransformEnabled(), QPainter::setWindow(), QPainter::setWorldMatrixEnabled(), QPainter::shear(), showHelp(), showVersion(), Ping::start(), QAbstractTestLogger::startLogging(), QPainterPath::toFillPolygons(), QPainter::translate(), QIODevice::ungetChar(), usage(), FileWriter::writeFile(), FileWriter::writeFileVerbously(), and QIODevice::~QIODevice().


Function Documentation

static QPointF bound_point ( const QPointF point,
const QRectF bounds,
int  lock 
) [static]

Definition at line 227 of file hoverpoints.cpp.

References QRectF::bottom(), QTextStream::left(), QRectF::left(), HoverPoints::LockToBottom, HoverPoints::LockToLeft, HoverPoints::LockToRight, HoverPoints::LockToTop, p, QTextStream::right(), QRectF::right(), and QRectF::top().

Referenced by HoverPoints::movePoint(), and HoverPoints::setPoints().

00228 {
00229     QPointF p = point;
00230 
00231     double left = bounds.left();
00232     double right = bounds.right();
00233     double top = bounds.top();
00234     double bottom = bounds.bottom();
00235 
00236     if (p.x() < left || (lock & HoverPoints::LockToLeft)) p.setX(left);
00237     else if (p.x() > right || (lock & HoverPoints::LockToRight)) p.setX(right);
00238 
00239     if (p.y() < top || (lock & HoverPoints::LockToTop)) p.setY(top);
00240     else if (p.y() > bottom || (lock & HoverPoints::LockToBottom)) p.setY(bottom);
00241 
00242     return p;
00243 }

Here is the call graph for this function:

static bool x_less_than ( const QPointF p1,
const QPointF p2 
) [inline, static]

Definition at line 268 of file hoverpoints.cpp.

References QPointF::x().

00269 {
00270     return p1.x() < p2.x();
00271 }

Here is the call graph for this function:

static bool y_less_than ( const QPointF p1,
const QPointF p2 
) [inline, static]

Definition at line 274 of file hoverpoints.cpp.

References QPointF::y().

Referenced by HoverPoints::firePointChange().

00275 {
00276     return p1.y() < p2.y();
00277 }

Here is the call graph for this function:


Generated on Thu Mar 15 12:04:26 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1