Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QDocumentSelectorService class provides an interface for low-privilege applications to open to user selected documents. More...
#include <QDocumentSelectorService>
Inherits QObject.
The QDocumentSelectorService class provides an interface for low-privilege applications to open to user selected documents.
Applications with insufficient permissions to access the Qt Extended Document System directly may use the document selector service to request that a server application open files on their behalf. Rather that opening a document specified by the application, the server displays a document selector for the user to select a document which is then opened and read access granted to the application.
Documents may also write to files by requesting permission to either save an already open document or create a new document. In both cases the user must confirm they wish to save the document before the server will open it in write-only mode.
Only one document may be opened by the service at a time. The currently opened document may be retrieved using the selectedDocument() method and the selectedDocumentData() method returns a QIODevice through the the document may be read from or written to.
See also QDocumentSelector.
Contructs a new document selector service with the given parent.
Destroys the document selector service.
Closes the selected document QIODevice and clears the selected document.
If the service is displaying a dialog that will also be closed.
To close the document without clearing the selection close the QIODevice returned by selectedDocumentData() instead.
Signals that a document has been opened and it may be read from or written to using data.
After this signal has been emitted the values of document and data may be acquired from the selectedDocument() and selectedDocumentData() methods.
Returns the services document selector's content filter.
See also setFilter().
Attempts to create a new document.
The user will be prompted with a suggested name and the type to save the document as. Returns true if the user accepts and the document was succesfully created; false otherwise.
If successful the documentOpened() signal will be emitted with the document QContent and a pointer to the document QIODevice opened in write-only mode. These can also be obtained from the selectedDocument() and selectedDocumentData() methods respectively upon return.
The dialog displayed will parented off the given widget.
See also selectedDocument() and selectedDocumentData().
This is an overloaded member function, provided for convenience.
Attempts to create a new document.
The user will be prompted with a suggested name and possible mime types to save the document as. Returns true if the user accepts and the document was succesfully created; false otherwise.
If successful the documentOpened() signal will be emitted with the document QContent and a pointer to the document QIODevice opened in write-only mode. These can also be obtained from the selectedDocument() and selectedDocumentData() methods respectively upon return.
The dialog displayed will parented off the given widget.
See also selectedDocument() and selectedDocumentData().
Prompts the user to select a document to open in read-only mode. Returns true if the user selects a document and it is successfully opened; false otherwise.
The content displayed in the selector may be altered by setting the content filter with setFilter() and the sort order with sortOrder().
If successful the documentOpened() signal will be emitted with the document QContent and a pointer to the document QIODevice opened in read-only mode. These can also be obtained from the selectedDocument() and selectedDocumentData() methods respectively upon return.
The dialog displayed will parented off the given widget.
See also selectedDocument() and selectedDocumentData().
Tries to open the last opened document in write only mode so changes can be saved.
The user will be prompted before the document is opened. Returns true if the user accepts and the document was succesfully opened; false otherwise.
If successful the documentOpened() signal will be emitted with the document QContent and a pointer to the document QIODevice opened in write-only mode. These can also be obtained from the selectedDocument() and selectedDocumentData() methods respectively upon return.
The dialog displayed will parented off the given widget.
See also selectedDocument() and selectedDocumentData().
Returns the last selected document.
Returns a pointer to the data of the selected document.
The service retains ownership of the returned QIODevice.
See also selectedDocument().
Sets the service document selector's content filter.
See also filter().
Sets the sort criteria of the service document selector.
See also sortCriteria().
Returns the sort mode of the service document selector.
See also setSortCriteria().
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |