summaryrefslogtreecommitdiff
path: root/qt4
diff options
context:
space:
mode:
authorPino Toscano <pino@kde.org>2009-05-12 01:53:43 +0200
committerPino Toscano <pino@kde.org>2009-05-12 01:54:38 +0200
commitfb0cb2add9443992f166acdf744fbec875faaabf (patch)
tree98042c98e1843d488391c4e17d21422556dcbba5 /qt4
parentb8bd44f1302f7b6a6923d41c98ec74c118a5abb8 (diff)
[Qt4] Add LinkDestination::destinationName() that returns the name of the current destination.
Diffstat (limited to 'qt4')
-rw-r--r--qt4/src/poppler-link.cc10
-rw-r--r--qt4/src/poppler-link.h7
2 files changed, 17 insertions, 0 deletions
diff --git a/qt4/src/poppler-link.cc b/qt4/src/poppler-link.cc
index 9d583cbe..231c5e39 100644
--- a/qt4/src/poppler-link.cc
+++ b/qt4/src/poppler-link.cc
@@ -34,6 +34,7 @@ class LinkDestinationPrivate : public QSharedData
LinkDestinationPrivate();
LinkDestination::Kind kind; // destination type
+ QString name;
int pageNum; // page number
double left, bottom; // position
double right, top;
@@ -192,6 +193,10 @@ class LinkMoviePrivate : public LinkPrivate
bool deleteDest = false;
LinkDest *ld = data.ld;
+ if ( data.namedDest )
+ {
+ d->name = QString::fromLatin1( data.namedDest->getCString() );
+ }
if ( data.namedDest && !ld )
{
deleteDest = true;
@@ -332,6 +337,11 @@ class LinkMoviePrivate : public LinkPrivate
return s;
}
+ QString LinkDestination::destinationName() const
+ {
+ return d->name;
+ }
+
LinkDestination& LinkDestination::operator=(const LinkDestination &other)
{
if ( this == &other )
diff --git a/qt4/src/poppler-link.h b/qt4/src/poppler-link.h
index bca464c3..6d42cbec 100644
--- a/qt4/src/poppler-link.h
+++ b/qt4/src/poppler-link.h
@@ -139,6 +139,13 @@ class POPPLER_QT4_EXPORT LinkDestination
QString toString() const;
/**
+ * Return the name of this destination.
+ *
+ * \since 0.12
+ */
+ QString destinationName() const;
+
+ /**
* Assignment operator.
*/
LinkDestination& operator=(const LinkDestination &other);