2021-05-24 07:25:56 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2007 Pino Toscano <pino@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2007-01-02 17:45:32 +00:00
|
|
|
|
|
|
|
#ifndef OKULAR_SOURCEREFERENCE_H
|
|
|
|
#define OKULAR_SOURCEREFERENCE_H
|
|
|
|
|
2014-10-27 21:35:06 +00:00
|
|
|
#include "okularcore_export.h"
|
|
|
|
#include <QObject>
|
2007-01-02 17:45:32 +00:00
|
|
|
class QString;
|
|
|
|
|
|
|
|
namespace Okular
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @short Defines a source reference
|
|
|
|
*
|
|
|
|
* A source reference is a reference to one of the source(s) of the loaded
|
|
|
|
* document.
|
|
|
|
*/
|
2014-10-27 21:35:06 +00:00
|
|
|
class OKULARCORE_EXPORT SourceReference
|
2007-01-02 17:45:32 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* Creates a reference to the row @p row and column @p column of the
|
|
|
|
* source @p fileName
|
|
|
|
*/
|
|
|
|
SourceReference(const QString &fileName, int row, int column = 0);
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2007-01-02 17:45:32 +00:00
|
|
|
/**
|
|
|
|
* Destroys the source reference.
|
|
|
|
*/
|
|
|
|
~SourceReference();
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2007-01-02 17:45:32 +00:00
|
|
|
/**
|
|
|
|
* Returns the filename of the source.
|
|
|
|
*/
|
|
|
|
QString fileName() const;
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2007-01-02 17:45:32 +00:00
|
|
|
/**
|
|
|
|
* Returns the row of the position in the source file.
|
|
|
|
*/
|
|
|
|
int row() const;
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2007-01-02 17:45:32 +00:00
|
|
|
/**
|
|
|
|
* Returns the column of the position in the source file.
|
|
|
|
*/
|
|
|
|
int column() const;
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2007-01-02 17:45:32 +00:00
|
|
|
private:
|
|
|
|
class Private;
|
|
|
|
Private *const d;
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2007-01-05 16:40:07 +00:00
|
|
|
Q_DISABLE_COPY(SourceReference)
|
2007-01-02 17:45:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|