File indexing completed on 2024-04-28 04:32:45
0001 /* 0002 SPDX-FileCopyrightText: 2007 Pino Toscano <pino@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef OKULAR_SOURCEREFERENCE_H 0008 #define OKULAR_SOURCEREFERENCE_H 0009 0010 #include "okularcore_export.h" 0011 #include <QObject> 0012 class QString; 0013 0014 namespace Okular 0015 { 0016 /** 0017 * @short Defines a source reference 0018 * 0019 * A source reference is a reference to one of the source(s) of the loaded 0020 * document. 0021 */ 0022 class OKULARCORE_EXPORT SourceReference 0023 { 0024 public: 0025 /** 0026 * Creates a reference to the row @p row and column @p column of the 0027 * source @p fileName 0028 */ 0029 SourceReference(const QString &fileName, int row, int column = 0); 0030 0031 /** 0032 * Destroys the source reference. 0033 */ 0034 ~SourceReference(); 0035 0036 /** 0037 * Returns the filename of the source. 0038 */ 0039 QString fileName() const; 0040 0041 /** 0042 * Returns the row of the position in the source file. 0043 */ 0044 int row() const; 0045 0046 /** 0047 * Returns the column of the position in the source file. 0048 */ 0049 int column() const; 0050 0051 private: 0052 class Private; 0053 Private *const d; 0054 0055 Q_DISABLE_COPY(SourceReference) 0056 }; 0057 0058 } 0059 0060 #endif