#include </home/clem/local/src/opie/library/fileselector.h>
Collaboration diagram for FileSelector:

Signals | |
| void | fileSelected (const DocLnk &) |
| void | newSelected (const DocLnk &) |
| void | closeMe () |
Public Member Functions | |
| FileSelector (const QString &mimefilter, QWidget *parent, const char *name=0, bool newVisible=TRUE, bool closeVisible=TRUE) | |
| ~FileSelector () | |
| void | setNewVisible (bool b) |
| void | setCloseVisible (bool b) QPE_DEPRECATED |
| void | setTypeComboVisible (bool b=TRUE) |
| void | setCategorySelectVisible (bool b=TRUE) |
| void | reread () |
| int | fileCount () |
| DocLnk | selectedDocument () const |
| QValueList< DocLnk > | fileList () const |
Private Slots | |
| void | createNew () |
| void | fileClicked (int, QListViewItem *, const QPoint &, int) |
| void | filePressed (int, QListViewItem *, const QPoint &, int) |
| void | fileClicked (QListViewItem *) |
| void | typeSelected (const QString &type) |
| void | catSelected (int) |
| void | cardMessage (const QCString &, const QByteArray &) |
Private Member Functions | |
| void | updateView () |
| void | updateWhatsThis () |
| const DocLnk * | selected () QPE_DEPRECATED |
Private Attributes | |
| FileSelectorView * | view |
| QString | filter |
| QToolButton * | buttonNew |
| QToolButton * | buttonClose |
| FileSelectorPrivate * | d |
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.
Definition at line 49 of file fileselector.h.
|
||||||||||||||||||||||||
|
|
Destroys the widget. Definition at line 348 of file fileselector.cpp. References d. |
|
||||||||||||
|
Definition at line 425 of file fileselector.cpp. References reread(). Referenced by FileSelector(). |
|
|
Definition at line 419 of file fileselector.cpp. References FileSelectorPrivate::catId, d, and updateView(). Referenced by FileSelector(). |
|
|
This signal is emitted when the user no longer needs to view the widget. Referenced by createNew(), fileClicked(), and FileSelector(). |
|
|
Calling this function is the programmatic equivalent of the user pressing the "new" button.
Definition at line 369 of file fileselector.cpp. References closeMe(), f, and newSelected(). Referenced by fileClicked(). |
|
|
Definition at line 398 of file fileselector.cpp. References closeMe(), createNew(), d, fileSelected(), and FileSelectorPrivate::newDocItem. |
|
||||||||||||||||||||
|
Definition at line 376 of file fileselector.cpp. References Qt::LeftButton. Referenced by FileSelector(). |
|
|
Returns the number of files in the view. If this is zero, an editor application might bypass the selector and immediately start with a "new" document. Definition at line 358 of file fileselector.cpp. References DocLnkSet::children(), d, and FileSelectorPrivate::files. Referenced by ODocumentFileView::fileCount(), and Opie::Ui::Internal::ODocumentFileView::fileCount(). |
|
|
Definition at line 74 of file fileselector.h. References QValueList< T >::append(), FileSelectorItem::file(), list, and view. |
|
||||||||||||||||||||
|
Definition at line 385 of file fileselector.cpp. References d, l, FileSelectorPrivate::newDocItem, prop, reread(), and Qt::RightButton. Referenced by FileSelector(). |
|
|
This signal is emitted when the user selects a document. f is the document. Referenced by fileClicked(). |
|
|
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. Referenced by createNew(). |
|
|
Rereads the list of documents. Definition at line 517 of file fileselector.cpp. References AppLnkSet::clear(), d, FileSelectorPrivate::files, filter, Global::findDocuments(), TypeCombo::reread(), FileSelectorPrivate::typeCombo, and updateView(). Referenced by cardMessage(), PlayListWidget::deletePlaylist(), filePressed(), FileSelector(), ODocumentFileView::reread(), Opie::Ui::Internal::ODocumentFileView::reread(), TableViewerWindow::selectDocument(), MainWindow::selectorShow(), MainWindow::slotImportExcelOpen(), and PlayListWidget::tabChanged(). |
|
|
Returns the selected DocLnk. The caller is responsible for deleting the returned value. Definition at line 436 of file fileselector.cpp. References d, FileSelectorItem::file(), FileSelectorPrivate::newDocItem, NULL, and view. Referenced by FileSelector(). |
|
|
|
Definition at line 507 of file fileselector.cpp. References FileSelectorPrivate::catSelect, and d. |
|
|
If b is TRUE a "close" or "no document" button is visible; if b is FALSE this button is not visible and the user is unable to leave the dialog without creating or selecting a document. This function is deprecated. Definition at line 487 of file fileselector.cpp. References d, and FileSelectorPrivate::toolbar. Referenced by FileSelector(), ODocumentFileView::reread(), Opie::Ui::Internal::ODocumentFileView::reread(), and TableViewerWindow::TableViewerWindow(). |
|
|
If b is TRUE a "new document" entry is visible; if b is FALSE this entry is not visible and the user is unable to create new documents from the dialog. Definition at line 471 of file fileselector.cpp. References d, FileSelectorPrivate::showNew, updateView(), and updateWhatsThis(). Referenced by ODocumentFileView::reread(), Opie::Ui::Internal::ODocumentFileView::reread(), and TableViewerWindow::TableViewerWindow(). |
|
|
Definition at line 498 of file fileselector.cpp. References d, and FileSelectorPrivate::typeCombo. |
|
|
Definition at line 410 of file fileselector.cpp. References QValueList< T >::append(), QValueList< T >::begin(), QValueList< T >::clear(), d, QValueList< T >::end(), FALSE, FileSelectorPrivate::mimeFilters, QStringList::split(), TRUE, and updateView(). Referenced by FileSelector(). |
|
|
Definition at line 525 of file fileselector.cpp. References QValueList< T >::begin(), FileSelectorPrivate::catId, DocLnkSet::children(), QValueList< T >::count(), d, QValueList< T >::end(), FALSE, FileSelectorItem::file(), FileSelectorPrivate::files, FileSelectorPrivate::mimeFilters, FileSelectorPrivate::newDocItem, FileSelectorPrivate::showNew, TRUE, and view. Referenced by catSelected(), reread(), setNewVisible(), and typeSelected(). |
|
|
Definition at line 568 of file fileselector.cpp. References add, d, remove(), FileSelectorPrivate::showNew, text, and tr. Referenced by FileSelector(), and setNewVisible(). |
|
|
Definition at line 112 of file fileselector.h. Referenced by FileSelector(). |
|
|
Definition at line 112 of file fileselector.h. |
|
|
Definition at line 113 of file fileselector.h. Referenced by catSelected(), fileClicked(), fileCount(), filePressed(), FileSelector(), reread(), selected(), setCategorySelectVisible(), setCloseVisible(), setNewVisible(), setTypeComboVisible(), typeSelected(), updateView(), updateWhatsThis(), and ~FileSelector(). |
|
|
Definition at line 111 of file fileselector.h. Referenced by reread(), ODocumentFileView::reread(), and Opie::Ui::Internal::ODocumentFileView::reread(). |
|
|
Definition at line 110 of file fileselector.h. Referenced by fileList(), FileSelector(), selected(), and updateView(). |
1.4.2