Okular

sourcereference.h
1 /*
2  SPDX-FileCopyrightText: 2007 Pino Toscano <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #ifndef OKULAR_SOURCEREFERENCE_H
8 #define OKULAR_SOURCEREFERENCE_H
9 
10 #include "okularcore_export.h"
11 #include <QObject>
12 class QString;
13 
14 namespace Okular
15 {
16 /**
17  * @short Defines a source reference
18  *
19  * A source reference is a reference to one of the source(s) of the loaded
20  * document.
21  */
22 class OKULARCORE_EXPORT SourceReference
23 {
24 public:
25  /**
26  * Creates a reference to the row @p row and column @p column of the
27  * source @p fileName
28  */
29  SourceReference(const QString &fileName, int row, int column = 0);
30 
31  /**
32  * Destroys the source reference.
33  */
34  ~SourceReference();
35 
36  /**
37  * Returns the filename of the source.
38  */
39  QString fileName() const;
40 
41  /**
42  * Returns the row of the position in the source file.
43  */
44  int row() const;
45 
46  /**
47  * Returns the column of the position in the source file.
48  */
49  int column() const;
50 
51 private:
52  class Private;
53  Private *const d;
54 
55  Q_DISABLE_COPY(SourceReference)
56 };
57 
58 }
59 
60 #endif
The documentation to the global Okular namespace.
Definition: action.h:16
Defines a source reference.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 30 2023 03:54:23 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.