summaryrefslogtreecommitdiffstats
path: root/kviewshell/hyperlink.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit47d455dd55be855e4cc691c32f687f723d9247ee (patch)
tree52e236aaa2576bdb3840ebede26619692fed6d7d /kviewshell/hyperlink.h
downloadtdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz
tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip
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
Diffstat (limited to 'kviewshell/hyperlink.h')
-rw-r--r--kviewshell/hyperlink.h78
1 files changed, 78 insertions, 0 deletions
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 <qrect.h>
+#include <qstring.h>
+
+
+/** 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 <kebekus@kde.org>
+ @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