author | zecke <zecke> | 2002-09-15 21:22:18 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-15 21:22:18 (UTC) |
commit | 568c816cc66f1566b8be6ff8d246e7b1465ae61e (patch) (side-by-side diff) | |
tree | 3c1d1f9ac7421ae27b18f580670ac1e1b8bf8a92 /libopie/ofileselector/ofileselector.h | |
parent | f2594358208bb2ea826bbea6afb0b3aa35947378 (diff) | |
download | opie-568c816cc66f1566b8be6ff8d246e7b1465ae61e.zip opie-568c816cc66f1566b8be6ff8d246e7b1465ae61e.tar.gz opie-568c816cc66f1566b8be6ff8d246e7b1465ae61e.tar.bz2 |
ok basicly all old functions are available again
what's now missing is the code switching Listers
and views
toggling the toolbar
filter
Diffstat (limited to 'libopie/ofileselector/ofileselector.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/ofileselector/ofileselector.h | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/libopie/ofileselector/ofileselector.h b/libopie/ofileselector/ofileselector.h index 12af732..a7b363f 100644 --- a/libopie/ofileselector/ofileselector.h +++ b/libopie/ofileselector/ofileselector.h @@ -47,48 +47,49 @@ #include <qpe/applnk.h> #include <qlistview.h> /** This is OPIEs FileDialog Widget. You can use it * as a dropin replacement of the fileselector and * or use any of the new features. * This is also a complete FileSave and FileLoad widget * If you look for a Dialog check OFileDialog * */ class DocLnk; class QCheckBox; class QComboBox; class QPushButton; class QGridLayout; class QLineEdit; class QLabel; class QWidgetStack; class QHBoxLayout; class QVBoxLayout; class QPopupMenu; class QFileInfo; class QHBox; class OFileView; +class OLister; // /* the mimetypes one name and a list of mimetypes */ typedef QMap< QString, QStringList> MimeTypes; /** * FIXME later */ struct OPopupMenuFactory { OPopupMenuFactory() {} }; /** * Opie the default OFileSelector * It features multiple views. */ class OFileSelector : public QWidget { Q_OBJECT /* friends are evil but I don't want to make the * methods public */ @@ -316,161 +317,159 @@ class OFileSelector : public QWidget { */ QString selectedPath() const; /** * return the completed paths */ QStringList selectedPaths() const; /** * the current directory */ QString directory()const; /** * fileCount */ int fileCount(); DocLnk selectedDocument()const; QValueList<DocLnk> selectedDocuments()const; OFileView* currentView(); OFileView* currentView()const; + OLister* currentLister()const; int filter(); int sorting(); QPixmap pixmap( const QString& ); signals: void fileSelected( const DocLnk & ); void fileSelected( const QString & ); void dirSelected(const QString &dir ); void dirSelected( const QDir& ); void closeMe(); void ok(); void cancel(); void contextMenu(); private slots: void slotOk(); void slotCancel(); void slotViewCheck(const QString & ); void slotMimeCheck(const QString & ); void slotLocationActivated(const QString & ); void slotInsertLocationPath(const QString &, int); void locationComboChanged(); private: void init(); void updateMimes(); private: FileSelector* m_select; int m_mode, m_selector; - QComboBox *m_location, *m_mimeCheck, *m_viewCheck; - QPushButton *m_homeButton, *m_docButton, *m_hideButton, *m_ok, *m_cancel; - QPushButton *m_reread, *m_up, *m_new, *m_close; + QComboBox *m_location, + *m_mimeCheck, + *m_viewCheck; + + QPushButton *m_homeButton, + *m_docButton, + *m_hideButton, + *m_ok, *m_cancel; + QPushButton *m_reread, + *m_up, + *m_new, + *m_close; QListView *m_View; QCheckBox *m_checkPerm; QWidget *m_pseudo; QVBoxLayout *m_pseudoLayout; - QString m_currentDir; - QString m_name; -// QStringList m_mimetypes; + QString m_currentDir; + QString m_name; QMap<QString, QStringList> m_mimetypes; QWidgetStack *m_stack; QVBoxLayout *m_lay; QGridLayout *m_Oselector; QHBox *m_boxToolbar; - QHBox *m_boxOk; // (no layout anymore) wait - QHBox *m_boxName; // (no Layout anymore) wait + QHBox *m_boxOk; + QHBox *m_boxName; QHBox *m_boxView; QPopupMenu *m_custom; QLineEdit *m_edit; QLabel *m_fnLabel; bool m_shClose : 1; bool m_shNew : 1; bool m_shTool : 1; bool m_shPerm : 1; bool m_shLne : 1; bool m_shChooser : 1; bool m_shYesNo : 1; bool m_boCheckPerm : 1; bool m_autoMime : 1; bool m_case : 1; bool m_dir : 1; bool m_files : 1; bool m_showPopup : 1; void initVars(); - virtual void addFile(const QString &mime, QFileInfo *info, bool symlink = FALSE ); - virtual void addDir( const QString &mime, QFileInfo *info , bool symlink = FALSE ); - virtual void addSymlink(const QString &, QFileInfo *, bool = FALSE ){}; + void delItems(); void initializeName(); void initializeYes(); void initializeChooser(); void initializeListView(); void initializePerm(); void initPics(); bool compliesMime(const QString &path, const QString &mime); bool compliesMime(const QString& mime ); /** * Updates the QComboBox with the current mimetypes */ void updateMimeCheck(); /** * Returns the current mimetype */ QString currentMimeType()const; class OFileSelectorPrivate; OFileSelectorPrivate *d; static QMap<QString,QPixmap> *m_pixmaps; private slots: void slotFileSelected(const QString & ); // not really meant to be a slot void slotFileBridgeSelected( const DocLnk & ); - virtual void slotSelectionChanged(); - virtual void slotCurrentChanged(QListViewItem* ); - virtual void slotClicked( int, QListViewItem *item, const QPoint &, int); - virtual void slotRightButton(int, QListViewItem *, const QPoint &, int ); - virtual void slotContextMenu( QListViewItem *item); // listview above // popup below - virtual void slotChangedDir(); - virtual void slotOpen(); - virtual void slotRescan(); - virtual void slotRename(); virtual void slotDelete(); virtual void cdUP(); virtual void slotHome(); virtual void slotDoc(); virtual void slotNavigate( ); /* for OLister */ private: /* for OFileView */ private: void internFileSelected( const QString& ); void internFileSelected( const DocLnk& ); void internContextMenu(); void internChangedDir( const QString& ); void internChangedDir( const QDir& ) ; }; #endif |