From 47d455dd55be855e4cc691c32f687f723d9247ee Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kviewshell/hyperlink.h | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 kviewshell/hyperlink.h (limited to 'kviewshell/hyperlink.h') diff --git a/kviewshell/hyperlink.h b/kviewshell/hyperlink.h new file mode 100644 index 00000000..bd07fef5 --- /dev/null +++ b/kviewshell/hyperlink.h @@ -0,0 +1,78 @@ +// -*- C++ -*- +// +// Class: hyperlink +// +// Part of KDVI- A previewer for TeX DVI files. +// +// (C) 2004-2005 Stefan Kebekus. Distributed under the GPL. + +#ifndef _hyperlink_h_ +#define _hyperlink_h_ + +#include +#include + + +/** Represents a named, rectangular region in a rendered documentPage + + This trivial class is used in the documentPage class to represent + a hyperlink in a rendered documentPage. + + @author Stefan Kebekus + @version 1.0.0 +*/ + +class Hyperlink +{ +public: + /** \brief Default Constructor + + The default constructor leaves all fields uninitialized. + */ + Hyperlink() {} + + /** \brief Constructor + + Trivial constructor leaves that initialized all members. + + @param bl value for the baseline field + @param re value for the box + @param lT valus for the text field + */ + Hyperlink(Q_UINT32 bl, const QRect& re, const QString& lT): baseline(bl), box(re), linkText(lT) {} + + /** \brief Base line of a hyperlink + + This field specifies the Y-coordinate of the base line of the + bounding box in the same coordinates that were used when the + associated documentPage was rendered by the + documentRenderer.drawPage() method. It is used to underline + hyperlinks in blue. Note that this field does generally differ from + the Y-coordinate of the bottom of the bounding box, e.g. if the text + in the box contains characters with underlengths, such as 'y', 'j' + or 'g'. + */ + Q_UINT32 baseline; + + /** \brief Bounding box of the text or hyperlink + + This rectangle specifies where on the page the hyperlink is + found. It uses the same coordinates that were used when the + associated documentPage was rendered by the + documentRenderer.drawPage() method. The box is used to determine if + the mouse pointer hovers over the link. + */ + QRect box; + + /** \brief Name of the region + + This field contains the name of the target, + e.g. "http://www.kde.org". If the Hyperlink class is used to + represent text, then the text is stored here. + */ + QString linkText; +}; + + + +#endif -- cgit v1.2.3