1 /* This file is part of the KDE project
2  * Copyright (C) 2011 C. Boemann, KO GmbH <cbo@kogmbh.com>
3  * Copyright (C) 2011 C. Boemann <cbo@boemann.dk>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB.  If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 #ifndef KOPOINTEDAT_H
21 #define KOPOINTEDAT_H
22 
23 #include "kritatextlayout_export.h"
24 
25 #include <QString>
26 #include <QTextCursor>
27 #include <QPointF>
28 
29 class KoBookmark;
30 class QTextTable;
31 class KoInlineTextObjectManager;
32 class KoTextRangeManager;
33 class KoInlineNote;
34 
35 class KRITATEXTLAYOUT_EXPORT KoPointedAt
36 {
37 public:
38     KoPointedAt();
39     explicit KoPointedAt(KoPointedAt *other);
40 
41     void fillInLinks(const QTextCursor &cursor, KoInlineTextObjectManager *inlineManager, KoTextRangeManager *rangeManager);
42 
43     enum TableHit {
44           None
45         , ColumnDivider
46         , RowDivider
47     };
48     int position;
49     KoBookmark *bookmark {0};
50     QString externalHRef;
51     KoInlineNote *note {0};
52     int noteReference {0};
53     QTextTable *table {0};
54     TableHit tableHit {None};
55     int tableRowDivider {0};
56     int tableColumnDivider {0};
57     qreal tableLeadSize {0.0};
58     qreal tableTrailSize {0.0};
59     QPointF tableDividerPos;
60 
61 };
62 
63 #endif
64