• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegraphics API Reference
  • KDE Home
  • Contact Us
 

okular

  • Okular
  • Part
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
Okular::Part Class Reference

#include <part.h>

Inheritance diagram for Okular::Part:
Inheritance graph
[legend]

Public Slots

Q_SCRIPTABLE QString currentDocument ()
 
Q_SCRIPTABLE uint currentPage ()
 
Q_SCRIPTABLE QString documentMetaData (const QString &metaData) const
 
Q_SCRIPTABLE Q_NOREPLY void enableStartWithPrint ()
 
void errorMessage (const QString &message, int duration=0)
 
Q_SCRIPTABLE Q_NOREPLY void goToPage (uint page)
 
void noticeMessage (const QString &message, int duration=-1)
 
Q_SCRIPTABLE Q_NOREPLY void openDocument (const QString &doc)
 
Q_SCRIPTABLE uint pages ()
 
void psTransformEnded (int, QProcess::ExitStatus)
 
Q_SCRIPTABLE Q_NOREPLY void reload ()
 
void restoreDocument (const KConfigGroup &group)
 
void saveDocumentRestoreInfo (KConfigGroup &group)
 
void slotDoFileDirty ()
 
void slotFileDirty (const QString &)
 
Q_SCRIPTABLE void slotFind ()
 
KConfigDialog * slotGeneratorPreferences ()
 
Q_SCRIPTABLE void slotGotoFirst ()
 
Q_SCRIPTABLE void slotGotoLast ()
 
Q_SCRIPTABLE void slotNextPage ()
 
Q_SCRIPTABLE void slotPreferences ()
 
Q_SCRIPTABLE void slotPreviousPage ()
 
void slotPrint ()
 
Q_SCRIPTABLE void slotPrintPreview ()
 
Q_SCRIPTABLE void slotTogglePresentation ()
 
void warningMessage (const QString &message, int duration=-1)
 

Signals

void enableCloseAction (bool enable)
 
void enablePrintAction (bool enable)
 
void mimeTypeChanged (KMimeType::Ptr mimeType)
 
void openSourceReference (const QString &absFileName, int line, int column)
 
void urlsDropped (const KUrl::List &urls)
 
void viewerMenuStateChange (bool enabled)
 

Public Member Functions

 Part (QWidget *parentWidget, QObject *parent, const QVariantList &args, KComponentData componentData)
 
 ~Part ()
 
bool areSourceLocationsShownGraphically () const
 
void clearLastShownSourceLocation ()
 
bool closeUrl ()
 
bool closeUrl (bool promptToSave)
 
bool isWatchFileModeEnabled () const
 
void notifyPageChanged (int page, int flags)
 
void notifySetup (const QVector< Okular::Page * > &pages, int setupFlags)
 
void notifyViewportChanged (bool smoothMove)
 
bool openDocument (const KUrl &url, uint page)
 
bool openNewFilesInTabs () const
 
bool queryClose ()
 
KUrl realUrl () const
 
bool saveAs (const KUrl &saveUrl)
 
bool saveFile ()
 
void setReadWrite (bool readwrite)
 
void setShowSourceLocationsGraphically (bool show)
 
void setWatchFileModeEnabled (bool enable)
 
void showSourceLocation (const QString &fileName, int line, int column, bool showGraphically=true)
 
void startPresentation ()
 
QStringList supportedMimeTypes () const
 
- Public Member Functions inherited from Okular::DocumentObserver
 DocumentObserver ()
 
virtual ~DocumentObserver ()
 
virtual bool canUnloadPixmap (int page) const
 
virtual void notifyContentsCleared (int flags)
 
virtual void notifyCurrentPageChanged (int previous, int current)
 
virtual void notifyVisibleRectsChanged ()
 
virtual void notifyZoom (int factor)
 
- Public Member Functions inherited from KDocumentViewer
virtual ~KDocumentViewer ()
 
virtual void goToPage (uint page)=0
 
- Public Member Functions inherited from Okular::ViewerInterface
virtual ~ViewerInterface ()
 
void openSourceReference (const QString &absFileName, int line, int column)
 
void viewerMenuStateChange (bool enabled)
 

Protected Slots

void cannotQuit ()
 
void close ()
 
void enableTOC (bool enable)
 
void handleDroppedUrls (const KUrl::List &urls)
 
void loadCancelled (const QString &reason)
 
void openUrlFromBookmarks (const KUrl &url)
 
void openUrlFromDocument (const KUrl &url)
 
void setWindowTitleFromDocument ()
 
void slotAboutBackend ()
 
void slotAboutToShowContextMenu (KMenu *menu, QAction *action, QMenu *contextMenu)
 
void slotAddBookmark ()
 
void slotExportAs (QAction *)
 
void slotFindNext ()
 
void slotFindPrev ()
 
void slotGetNewStuff ()
 
void slotGoToPage ()
 
void slotHideFindBar ()
 
void slotHidePresentation ()
 
void slotHistoryBack ()
 
void slotHistoryNext ()
 
bool slotImportPSFile ()
 
void slotJobFinished (KJob *job)
 
void slotJobStarted (KIO::Job *job)
 
void slotNewConfig ()
 
void slotNextBookmark ()
 
void slotPreviousBookmark ()
 
void slotRebuildBookmarkMenu ()
 
void slotReload ()
 
void slotRenameBookmarkFromMenu ()
 
void slotRenameCurrentViewportBookmark ()
 
void slotSaveCopyAs ()
 
void slotSaveFileAs ()
 
void slotShowBottomBar ()
 
void slotShowEmbeddedFiles ()
 
void slotShowFindBar ()
 
void slotShowLeftPanel ()
 
void slotShowMenu (const Okular::Page *page, const QPoint &point)
 
void slotShowPresentation ()
 
void slotShowProperties ()
 
void updateBookmarksActions ()
 
void updateViewActions ()
 

Protected Member Functions

void displayInfoMessage (const QString &message, KMessageWidget::MessageType messageType=KMessageWidget::Information, int duration=-1)
 
void guiActivateEvent (KParts::GUIActivateEvent *event)
 
bool openFile ()
 
bool openUrl (const KUrl &url)
 

Additional Inherited Members

- Public Types inherited from Okular::DocumentObserver
enum  ChangedFlags {
  Pixmap = 1, Bookmark = 2, Highlights = 4, TextSelection = 8,
  Annotations = 16, BoundingBox = 32, NeedSaveAs = 64
}
 
enum  SetupFlags { DocumentChanged = 1, NewLayoutForPages = 2 }
 

Detailed Description

This is a "Part".

It that does all the real work in a KPart application.

Main Part

Author
Wilco Greven greve.nosp@m.n@kd.nosp@m.e.org
Version
0.2

Definition at line 96 of file part.h.

Constructor & Destructor Documentation

Okular::Part::Part ( QWidget *  parentWidget,
QObject *  parent,
const QVariantList &  args,
KComponentData  componentData 
)

If one element of 'args' contains one of the strings "Print/Preview" or "ViewerWidget", the part will be set up in the corresponding mode.

Additionally, it is possible to specify which config file should be used by adding a string containing "ConfigFileName=<file name>" to 'args'.

Definition at line 301 of file part.cpp.

Okular::Part::~Part ( )

Definition at line 847 of file part.cpp.

Member Function Documentation

bool Okular::Part::areSourceLocationsShownGraphically ( ) const
virtual

Returns true iff source locations are shown graphically.

Implements Okular::ViewerInterface.

Definition at line 953 of file part.cpp.

void Okular::Part::cannotQuit ( )
protectedslot

Definition at line 1661 of file part.cpp.

void Okular::Part::clearLastShownSourceLocation ( )
virtual

Clear the source location that was set last in the viewer.

Implements Okular::ViewerInterface.

Definition at line 930 of file part.cpp.

void Okular::Part::close ( )
protectedslot

Definition at line 1651 of file part.cpp.

bool Okular::Part::closeUrl ( )

Definition at line 1639 of file part.cpp.

bool Okular::Part::closeUrl ( bool  promptToSave)

Definition at line 1567 of file part.cpp.

QString Okular::Part::currentDocument ( )
slot

Definition at line 1156 of file part.cpp.

uint Okular::Part::currentPage ( )
slot

Definition at line 1150 of file part.cpp.

void Okular::Part::displayInfoMessage ( const QString &  message,
KMessageWidget::MessageType  messageType = KMessageWidget::Information,
int  duration = -1 
)
protected

Definition at line 2795 of file part.cpp.

QString Okular::Part::documentMetaData ( const QString &  metaData) const
slot

Definition at line 1162 of file part.cpp.

void Okular::Part::enableCloseAction ( bool  enable)
signal
void Okular::Part::enablePrintAction ( bool  enable)
signal
void Okular::Part::enableStartWithPrint ( )
slot

Definition at line 2568 of file part.cpp.

void Okular::Part::enableTOC ( bool  enable)
protectedslot

Definition at line 1928 of file part.cpp.

void Okular::Part::errorMessage ( const QString &  message,
int  duration = 0 
)
slot

Definition at line 2822 of file part.cpp.

void Okular::Part::goToPage ( uint  page)
slot

Definition at line 1131 of file part.cpp.

void Okular::Part::guiActivateEvent ( KParts::GUIActivateEvent *  event)
protected

Definition at line 1644 of file part.cpp.

void Okular::Part::handleDroppedUrls ( const KUrl::List &  urls)
protectedslot

Definition at line 1008 of file part.cpp.

bool Okular::Part::isWatchFileModeEnabled ( ) const
virtual

Returns true iff the watch file mode is enabled.

Implements Okular::ViewerInterface.

Definition at line 935 of file part.cpp.

void Okular::Part::loadCancelled ( const QString &  reason)
protectedslot

Definition at line 1041 of file part.cpp.

void Okular::Part::mimeTypeChanged ( KMimeType::Ptr  mimeType)
signal
void Okular::Part::noticeMessage ( const QString &  message,
int  duration = -1 
)
slot

Definition at line 2832 of file part.cpp.

void Okular::Part::notifyPageChanged ( int  page,
int  flags 
)
virtual

This method is called whenever the content on page described by the passed flags has been changed.

Reimplemented from Okular::DocumentObserver.

Definition at line 1117 of file part.cpp.

void Okular::Part::notifySetup ( const QVector< Okular::Page * > &  pages,
int  setupFlags 
)
virtual

This method is called whenever the document is initialized or reconstructed.

Parameters
pagesThe vector of pages of the document.
setupFlagsthe flags with the information about the setup

Reimplemented from Okular::DocumentObserver.

Definition at line 1101 of file part.cpp.

void Okular::Part::notifyViewportChanged ( bool  smoothMove)
virtual

This method is called whenever the viewport has been changed.

Parameters
smoothMoveIf true, the move shall be animated.

Reimplemented from Okular::DocumentObserver.

Definition at line 1112 of file part.cpp.

bool Okular::Part::openDocument ( const KUrl &  url,
uint  page 
)
virtual

Open the document at the specified url at page page.

Implements KDocumentViewer.

Definition at line 884 of file part.cpp.

void Okular::Part::openDocument ( const QString &  doc)
slot

Definition at line 1138 of file part.cpp.

bool Okular::Part::openFile ( )
protected

Definition at line 1330 of file part.cpp.

bool Okular::Part::openNewFilesInTabs ( ) const
virtual

Should the shell that supports tabs pen new files in tabs?

Implements Okular::ViewerInterface.

Definition at line 963 of file part.cpp.

void Okular::Part::openSourceReference ( const QString &  absFileName,
int  line,
int  column 
)
signal
bool Okular::Part::openUrl ( const KUrl &  url)
protected

Definition at line 1498 of file part.cpp.

void Okular::Part::openUrlFromBookmarks ( const KUrl &  url)
protectedslot

Definition at line 992 of file part.cpp.

void Okular::Part::openUrlFromDocument ( const KUrl &  url)
protectedslot

Definition at line 977 of file part.cpp.

uint Okular::Part::pages ( )
slot

Definition at line 1144 of file part.cpp.

void Okular::Part::psTransformEnded ( int  exit,
QProcess::ExitStatus  status 
)
slot

Definition at line 2776 of file part.cpp.

bool Okular::Part::queryClose ( )

Definition at line 1544 of file part.cpp.

KUrl Okular::Part::realUrl ( ) const

Definition at line 909 of file part.cpp.

void Okular::Part::reload ( )
slot

Definition at line 2560 of file part.cpp.

void Okular::Part::restoreDocument ( const KConfigGroup &  group)
slot

Definition at line 2757 of file part.cpp.

bool Okular::Part::saveAs ( const KUrl &  saveUrl)

Definition at line 2230 of file part.cpp.

void Okular::Part::saveDocumentRestoreInfo ( KConfigGroup &  group)
slot

Definition at line 2769 of file part.cpp.

bool Okular::Part::saveFile ( )

Definition at line 2178 of file part.cpp.

void Okular::Part::setReadWrite ( bool  readwrite)

Definition at line 3002 of file part.cpp.

void Okular::Part::setShowSourceLocationsGraphically ( bool  b)
virtual

Allows to control whether source locations are shown graphically, or not.

Implements Okular::ViewerInterface.

Definition at line 958 of file part.cpp.

void Okular::Part::setWatchFileModeEnabled ( bool  b)
virtual

Allows to enable or disable the watch file mode.

Implements Okular::ViewerInterface.

Definition at line 940 of file part.cpp.

void Okular::Part::setWindowTitleFromDocument ( )
protectedslot

Definition at line 1058 of file part.cpp.

void Okular::Part::showSourceLocation ( const QString &  fileName,
int  line,
int  column,
bool  showGraphically = true 
)
virtual

Show the specified source location centrally in the viewer.

Parameters
fileNamesource file name
linein the source file, starts from 0
columnin the source file, starts from 0
showGraphicallycontrols whether the given source location will be shown graphically in the viewer (if that feature is globally activated)

Implements Okular::ViewerInterface.

Definition at line 919 of file part.cpp.

void Okular::Part::slotAboutBackend ( )
protectedslot

Definition at line 2573 of file part.cpp.

void Okular::Part::slotAboutToShowContextMenu ( KMenu *  menu,
QAction *  action,
QMenu *  contextMenu 
)
protectedslot

Definition at line 2102 of file part.cpp.

void Okular::Part::slotAddBookmark ( )
protectedslot

Definition at line 2059 of file part.cpp.

void Okular::Part::slotDoFileDirty ( )
slot

Definition at line 1729 of file part.cpp.

void Okular::Part::slotExportAs ( QAction *  act)
protectedslot

Definition at line 2599 of file part.cpp.

void Okular::Part::slotFileDirty ( const QString &  path)
slot

Definition at line 1685 of file part.cpp.

void Okular::Part::slotFind ( )
slot

Definition at line 2146 of file part.cpp.

void Okular::Part::slotFindNext ( )
protectedslot

Definition at line 2161 of file part.cpp.

void Okular::Part::slotFindPrev ( )
protectedslot

Definition at line 2170 of file part.cpp.

KConfigDialog * Okular::Part::slotGeneratorPreferences ( )
slot

Definition at line 1076 of file part.cpp.

void Okular::Part::slotGetNewStuff ( )
protectedslot

Definition at line 2321 of file part.cpp.

void Okular::Part::slotGotoFirst ( )
slot

Definition at line 2023 of file part.cpp.

void Okular::Part::slotGotoLast ( )
slot

Definition at line 2032 of file part.cpp.

void Okular::Part::slotGoToPage ( )
protectedslot

Definition at line 2001 of file part.cpp.

void Okular::Part::slotHideFindBar ( )
protectedslot

Definition at line 1951 of file part.cpp.

void Okular::Part::slotHidePresentation ( )
protectedslot

Definition at line 2542 of file part.cpp.

void Okular::Part::slotHistoryBack ( )
protectedslot

Definition at line 2047 of file part.cpp.

void Okular::Part::slotHistoryNext ( )
protectedslot

Definition at line 2053 of file part.cpp.

bool Okular::Part::slotImportPSFile ( )
protectedslot

Definition at line 1180 of file part.cpp.

void Okular::Part::slotJobFinished ( KJob *  job)
protectedslot

Definition at line 1033 of file part.cpp.

void Okular::Part::slotJobStarted ( KIO::Job *  job)
protectedslot

Definition at line 1022 of file part.cpp.

void Okular::Part::slotNewConfig ( )
protectedslot

Definition at line 2356 of file part.cpp.

void Okular::Part::slotNextBookmark ( )
protectedslot

Definition at line 2134 of file part.cpp.

void Okular::Part::slotNextPage ( )
slot

Definition at line 2016 of file part.cpp.

void Okular::Part::slotPreferences ( )
slot

Definition at line 2333 of file part.cpp.

void Okular::Part::slotPreviousBookmark ( )
protectedslot

Definition at line 2122 of file part.cpp.

void Okular::Part::slotPreviousPage ( )
slot

Definition at line 2009 of file part.cpp.

void Okular::Part::slotPrint ( )
slot

Definition at line 2653 of file part.cpp.

void Okular::Part::slotPrintPreview ( )
slot

Definition at line 2386 of file part.cpp.

void Okular::Part::slotRebuildBookmarkMenu ( )
protectedslot

Definition at line 1939 of file part.cpp.

void Okular::Part::slotReload ( )
protectedslot

Definition at line 2643 of file part.cpp.

void Okular::Part::slotRenameBookmarkFromMenu ( )
protectedslot

Definition at line 2086 of file part.cpp.

void Okular::Part::slotRenameCurrentViewportBookmark ( )
protectedslot

Definition at line 2097 of file part.cpp.

void Okular::Part::slotSaveCopyAs ( )
protectedslot

Definition at line 2275 of file part.cpp.

void Okular::Part::slotSaveFileAs ( )
protectedslot

Definition at line 2184 of file part.cpp.

void Okular::Part::slotShowBottomBar ( )
protectedslot

Definition at line 1676 of file part.cpp.

void Okular::Part::slotShowEmbeddedFiles ( )
protectedslot

Definition at line 2525 of file part.cpp.

void Okular::Part::slotShowFindBar ( )
protectedslot

Definition at line 1944 of file part.cpp.

void Okular::Part::slotShowLeftPanel ( )
protectedslot

Definition at line 1667 of file part.cpp.

void Okular::Part::slotShowMenu ( const Okular::Page *  page,
const QPoint &  point 
)
protectedslot

Definition at line 2420 of file part.cpp.

void Okular::Part::slotShowPresentation ( )
protectedslot

Definition at line 2533 of file part.cpp.

void Okular::Part::slotShowProperties ( )
protectedslot

Definition at line 2517 of file part.cpp.

void Okular::Part::slotTogglePresentation ( )
slot

Definition at line 2549 of file part.cpp.

void Okular::Part::startPresentation ( )
virtual

Start the presentation mode.

Implements KDocumentViewer.

Definition at line 897 of file part.cpp.

QStringList Okular::Part::supportedMimeTypes ( ) const
virtual

Return a list with the supported mimetypes.

Implements KDocumentViewer.

Definition at line 903 of file part.cpp.

void Okular::Part::updateBookmarksActions ( )
protectedslot

Definition at line 1899 of file part.cpp.

void Okular::Part::updateViewActions ( )
protectedslot

Definition at line 1814 of file part.cpp.

void Okular::Part::urlsDropped ( const KUrl::List &  urls)
signal
void Okular::Part::viewerMenuStateChange ( bool  enabled)
signal
void Okular::Part::warningMessage ( const QString &  message,
int  duration = -1 
)
slot

Definition at line 2827 of file part.cpp.


The documentation for this class was generated from the following files:
  • part.h
  • part.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:19:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okular

Skip menu "okular"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal