2007-01-02 17:45:32 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#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
|