File indexing completed on 2024-05-12 04:34:00
0001 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; c-brace-offset: 0; -*- 0002 // 0003 // Class: textBox 0004 // 0005 // Part of KDVI- A previewer for TeX DVI files. 0006 // 0007 // SPDX-FileCopyrightText: 2004-2005 Stefan Kebekus 0008 // SPDX-License-Identifier: GPL-2.0-or-later 0009 0010 #ifndef _textbox_h_ 0011 #define _textbox_h_ 0012 0013 #include <QRect> 0014 #include <QString> 0015 0016 /** Represents a rectangular region in a RenderedDocumentPage that contains text 0017 0018 This trivial class is used in the RenderedDocumentPage class to 0019 give a non-graphical representation of text in a rendered document 0020 page. This is used, e.g. by text search and the text selection 0021 functions that need to know the contents and the position of text 0022 on a page 0023 0024 @author Stefan Kebekus <kebekus@kde.org> 0025 @version 1.0.0 0026 */ 0027 0028 class TextBox 0029 { 0030 public: 0031 /** \brief Default Constructor 0032 0033 The default constructor leaves all fields uninitialized. 0034 */ 0035 TextBox() 0036 { 0037 } 0038 0039 /** \brief Constructor 0040 0041 Trivial constructor leaves that initialized all members. 0042 0043 @param re value for the box 0044 @param lT valus for the text field 0045 */ 0046 TextBox(const QRect re, const QString &lT) 0047 : box(re) 0048 , text(lT) 0049 { 0050 } 0051 0052 /** \brief Bounding box of the text or hyperlink 0053 0054 This rectangle specifies where on the page the text or hyperlink is 0055 found. It uses the same coordinates that were used when the 0056 associated documentPage was rendered by the 0057 documentRenderer.drawPage() method. The contents of the box is 0058 graphically inverted to indicate marked text. 0059 */ 0060 QRect box; 0061 0062 /** \brief Name of the region 0063 0064 The text associated with the box is stored here. 0065 */ 0066 QString text; 0067 }; 0068 0069 #endif