27#include <koffice_export.h>
35class KOFFICEUI_EXPORT KoGuides :
public TQObject
46 KoGuides( KoView *view, KoZoomHandler *zoomHandler );
58 void paintGuides( TQPainter &painter );
60 typedef int SnapStatus;
61 static const SnapStatus SNAP_NONE, SNAP_HORIZ, SNAP_VERT, SNAP_BOTH;
80 bool mousePressEvent( TQMouseEvent *e );
95 bool mouseMoveEvent( TQMouseEvent *e );
104 bool mouseReleaseEvent( TQMouseEvent *e );
113 bool keyPressEvent( TQKeyEvent *e );
123 void setGuideLines(
const TQValueList<double> &horizontalPos,
const TQValueList<double> &verticalPos );
133 void setAutoGuideLines(
const TQValueList<double> &horizontalPos,
const TQValueList<double> &verticalPos );
144 void getGuideLines( TQValueList<double> &horizontalPos, TQValueList<double> &verticalPos )
const;
160 void snapToGuideLines( KoRect &rect,
int snap, SnapStatus &snapStatus, KoPoint &diff );
172 void snapToGuideLines( KoPoint &pos,
int snap, SnapStatus &snapStatus, KoPoint &diff );
181 void repaintSnapping(
const KoRect &snappedRect );
190 void repaintSnapping(
const KoPoint &snappedPoint, SnapStatus snapStatus );
198 void repaintAfterSnapping( );
207 void diffNextGuide( KoRect &rect, KoPoint &diff );
221 void moveGuide(
const TQPoint &pos,
bool horizontal,
int rulerWidth );
233 void addGuide(
const TQPoint &pos,
bool horizontal,
int rulerWidth );
243 void guideLinesChanged( KoView * view );
250 void moveGuides(
bool state );
261 void paintGuides(
bool state );
267 void slotChangePosition();
278 KoGuideLine( TQt::Orientation o,
double pos,
bool a =
false )
285 TQt::Orientation orientation;
303 void add( TQt::Orientation o, TQPoint &pos );
310 void select( KoGuideLine *guideLine );
317 void unselect( KoGuideLine *guideLine );
330 void removeSelected();
353 KoGuideLine *
find( KoPoint &p,
double diff );
363 void moveSelectedBy( TQPoint &p );
372 KoPoint mapFromScreen(
const TQPoint & pos );
381 TQPoint mapToScreen(
const KoPoint & pos );
392 bool virtuallyEqual(
double a,
double b ) {
return TQABS( a - b ) < 1E-4; }
397 KoZoomHandler * m_zoomHandler;
408 TQValueList<KoGuideLine *> m_guideLines[GL_END];
413 bool m_mouseSelected;
A point whose coordinates are floating-point values ( "double"s ).
A rect whose coordinates are floating-point values ( "double"s ).
This class is used to display a KoDocument.
This class handles the zooming and DPI stuff (conversions between pt values and pixels).
TDEAction * find(const TQObject *recvr, const char *slot, TDEActionCollection *parent, const char *name=0)