Qt API | Qtopia API | Qtopia Documentation | ![]() |
The FileSelector widget allows the user to select DocLnk objects. More...
#include <qtopia/fileselector.h>
This class presents a file selection dialog to the user. This widget is usually the first widget seen in a document-oriented application. The developer will most often create this widget in combination with a QWidgetStack and the appropriate editor and/or viewer widget for their application. This widget should be shown first and the user can the select which document they wish to operate on. Please refer to the implementation of texteditor for an example of how to tie these classes together.
Use setNewVisible() depending on whether the application can be used to create new files or not. Use setCloseVisible() depending on whether the user may leave the dialog without creating or selecting a document or not. The number of files in the view is available from fileCount(). To force the view to be updated call reread().
If the user presses the 'New Document' button the newSelected() signal is emitted. If the user selects an existing file the fileSelected() signal is emitted. The selected file's DocLnk is available from the selected() function. If the file selector is no longer necessary the closeMe() signal is emitted.
The typeChanged() and categoryChanged() signals are emitted when either a different file type or category are selected. Note that in Qtopia 1.5.0, there were no selectors for this, so these signals are never emitted on that platform.
See also FileManager and Qtopia Classes.
If newVisible is TRUE, the widget has a button to allow the user the create "new" documents; this is useful for applications that can create and edit documents but not suitable for applications that only provide viewing.
closeVisible is deprecated
See also DocLnkSet::DocLnkSet().
This signal is emitted when the user no longer needs to view the widget.
First availability: Qtopia 1.6
This signal is emitted when the user selects a document. f is the document.
This signal is emitted when the user selects a "new" document. f is a DocLnk for the document. You will need to set the type of the document after copying it.
Returns a copy of the selected DocLnk which must be deleted by the caller. This function is deprecated. It will be removed in Qtopia 2. Please switch to using selectedDocument() instead.
First availability: Qtopia 1.6
This function is deprecated.
This file is part of the Qtopia , copyright © 1995-2002 Trolltech, all rights reserved.
Copyright © 2001-2002 Trolltech | Trademarks | Qtopia version 1.7.1
|