diff --git a/dviwin.h b/dviwin.h index 902dd4953..a91851641 100644 --- a/dviwin.h +++ b/dviwin.h @@ -121,6 +121,8 @@ public: double paper_width; // paper width in centimeters double paper_height; // paper height in centimeters + /** Reference part of the URL which describes the filename. */ + QString reference; public slots: @@ -274,9 +276,6 @@ private: QString export_fileName; QString export_tmpFileName; QString export_errorString; - - /** Reference part of the URL which describes the filename. */ - QString reference; }; diff --git a/kdvi_multipage.cpp b/kdvi_multipage.cpp index 50e481bf6..bd888b819 100644 --- a/kdvi_multipage.cpp +++ b/kdvi_multipage.cpp @@ -123,6 +123,15 @@ bool KDVIMultiPage::openFile() } +void KDVIMultiPage::jumpToReference(QString reference) +{ + kdError() << "Reference: " << reference << endl; + if (window != 0) { + window->reference = reference; + window->all_fonts_loaded(); // In spite of its name, this method tries to parse the reference. + } +} + void KDVIMultiPage::contents_of_dviwin_changed(void) { emit previewChanged(true); diff --git a/kdvi_multipage.h b/kdvi_multipage.h index 88b2634ac..782020d3a 100644 --- a/kdvi_multipage.h +++ b/kdvi_multipage.h @@ -46,7 +46,10 @@ public: KDVIMultiPage(QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name); virtual ~KDVIMultiPage(); - + // Methods which are associated with the DCOP functionality of the + // kmultipage. This method can be implemented by the multipage, + // e.g. to jump to a certain location. + void jumpToReference(QString reference); // Interface definition start ------------------------------------------------