kviewshell
DjVuMultiPage Class Reference
Well-documented minimal implementation of a KMultiPage. More...
#include <djvumultipage.h>
Public Member Functions | |
DjVuMultiPage (QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const QStringList &args=QStringList()) | |
virtual QStringList | fileFormats () const |
virtual bool | isModified () const |
virtual bool | isReadWrite () const |
virtual void | print () |
virtual void | setFile (bool r) |
virtual void | slotSave () |
virtual | ~DjVuMultiPage () |
Static Public Member Functions | |
static KAboutData * | createAboutData () |
Protected Member Functions | |
virtual void | enableActions (bool) |
Detailed Description
Well-documented minimal implementation of a KMultiPage.This class provides a well-documented reference implementation of a KMultiPage, suitable as a starting point for a real-world implementation. In a real application, this class would contain the GUI elements that the plugin adds to the GUI of the kviewshell. Our implementation adds nothing, and does only the minimal initialization required.
Definition at line 87 of file djvumultipage.h.
Constructor & Destructor Documentation
DjVuMultiPage::DjVuMultiPage | ( | QWidget * | parentWidget, | |
const char * | widgetName, | |||
QObject * | parent, | |||
const char * | name, | |||
const QStringList & | args = QStringList() | |||
) |
Constructor.
The constructor needs to initialize several members of the kmultipage. Please have a look at the constructor's source code to see how to adjust this for your implementation.
Definition at line 50 of file djvumultipage.cpp.
DjVuMultiPage::~DjVuMultiPage | ( | ) | [virtual] |
Member Function Documentation
KAboutData * DjVuMultiPage::createAboutData | ( | ) | [static] |
Author information.
This member returns a structure that contains information about the authors of the implementation
Definition at line 92 of file djvumultipage.cpp.
void DjVuMultiPage::enableActions | ( | bool | b | ) | [protected, virtual] |
QStringList DjVuMultiPage::fileFormats | ( | ) | const [virtual] |
List of file formats for file saving.
This method returns the list of supported file formats for saving the file.
Implements KMultiPage.
Definition at line 125 of file djvumultipage.cpp.
bool DjVuMultiPage::isModified | ( | ) | const [virtual] |
Flag to indicate the document was modified since last saved.
KMultiPage implementations that offer functionality that modifies the document (e.g. remove or insert pages) must re-implement this method to return
- Returns:
- 'true' if the document was modified since it was last saved
Reimplemented from KMultiPage.
Definition at line 302 of file djvumultipage.cpp.
bool DjVuMultiPage::isReadWrite | ( | ) | const [virtual] |
Definition at line 296 of file djvumultipage.cpp.
void DjVuMultiPage::print | ( | ) | [virtual] |
Re-implementation of the print method.
Reimplemented from KMultiPage.
Definition at line 195 of file djvumultipage.cpp.
void DjVuMultiPage::setFile | ( | bool | success | ) | [virtual] |
Update GUI after loading or closing of a file.
This method is called by openFile() when a new file was loaded, and by closeURL() when a file is closed so that the kmultipage implementation can update its own GUI, enable/disable actions, prepare info texts, etc. At the time the method is executed, the file has already been loaded into the renderer using renderer.setFile(), or closed using renderer.clear() and the standard KMultiPage GUI is set up. The filename can be accessed via m_file.
The default implementation does nothing.
- Parameters:
-
success the return value of renderer.setFile() which indicates if the file could be successfully loaded by the renderer, or not. Note that setFile() is called even if the renderer returned 'false', so that the implemtation can then disable menu items, etc.
Reimplemented from KMultiPage.
Definition at line 120 of file djvumultipage.cpp.
void DjVuMultiPage::slotSave | ( | ) | [virtual] |
Opens a file requestor and starts a basic copy KIO-Job.
A multipage implementation that wishes to offer saving in various formats must re-implement this slot.
Reimplemented from KMultiPage.
Definition at line 308 of file djvumultipage.cpp.
The documentation for this class was generated from the following files: