summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/TODO5
-rw-r--r--libopie/ofileselector.h55
2 files changed, 45 insertions, 15 deletions
diff --git a/libopie/TODO b/libopie/TODO
index 98baf72..22d8088 100644
--- a/libopie/TODO
+++ b/libopie/TODO
@@ -1,13 +1,18 @@
- xmltree done
- tododb
- set Alarms
- OFileSelector
- DocLnk when not in Document Mode ( and vice versa )
- MultipleDocuments
- Move OFileSelectorItem to it's own files
- new Dirs created inside the listview
+ - implemenent the compability functions
+ - implement close and new icons
+ - have a persistent QWidgetStack so we can add plugins
+ - mode switching
+ - better Layout handling
- Clickable labels?
Harlekin you wanted them in the libs? \ No newline at end of file
diff --git a/libopie/ofileselector.h b/libopie/ofileselector.h
index 8173d76..5c38ac4 100644
--- a/libopie/ofileselector.h
+++ b/libopie/ofileselector.h
@@ -61,28 +61,50 @@ class QLabel;
class QWidgetStack;
class QHBoxLayout;
class QVBoxLayout;
class QPopupMenu;
class QFileInfo;
//
class OFileSelector : public QWidget {
Q_OBJECT
public:
enum Mode {OPEN=1, SAVE=2, FILESELECTOR=4, DIR=8 };
- enum Selector{NORMAL=1, EXTENDED = 2, EXTENDED_ALL =4 };
+ enum Selector{NORMAL=0, EXTENDED = 1, EXTENDED_ALL =2 };
enum View { DIRS = 1, FILES = 2, TREE = 4, ICON = 8 };
- OFileSelector(QWidget *wid, int mode, int selector, const QString &dirName, const QString &fileName = QString::null, const QStringList &mimetypes = QStringList() );
+
+ OFileSelector(QWidget *wid, int mode, int selector,
+ const QString &dirName,
+ const QString &fileName = QString::null,
+ const QStringList &mimetypes = QStringList() );
+
+
+ OFileSelector(const QString &mimeFilter, QWidget *parent,
+ const char *name, bool newVisible = TRUE,
+ bool closeVisible = FALSE ) { };
+
~OFileSelector() {};
+
+ // currently only for the FILESELECTOR Mode
+ void setNewVisible( bool /*b*/ ) { };
+ void setCloseVisible(bool /*b*/ ) { };
+
+ // end file selector mode
+ // deprecated
+ void reread() { reparse(); };
+ // make sure not to leak please
+ const DocLnk *selected();
+ // end deprecated
+
bool isToolbarVisible() const { return m_shTool; };
bool isPermissionBarVisible() const { return m_shPerm; };
bool isLineEditVisible()const { return m_shLne; };
bool isChooserVisible( )const { return m_shChooser; };
bool isYesCancelVisible()const { return m_shYesNo; };
void setYesCancelVisible( bool show );
void setToolbarVisible( bool show );
void setPermissionBarVisible( bool show );
void setLineEditVisible(bool show) ;
void setChooserVisible( bool chooser );
QCheckBox* permissionCheckbox();
@@ -171,35 +193,38 @@ class OFileSelector : public QWidget {
QVBoxLayout *m_lay;
QGridLayout *m_Oselector;
QHBoxLayout *m_boxToolbar;
QHBoxLayout *m_boxOk;
QHBoxLayout *m_boxName;
QHBoxLayout *m_boxView;
QPopupMenu *m_custom;
QLineEdit *m_edit;
QLabel *m_fnLabel;
- 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;
+
+ 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;
// implementation todo
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 initPics();
bool compliesMime(const QString &path, const QString &mime);
@@ -207,26 +232,26 @@ class OFileSelector : public QWidget {
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 crap see above
- // PopupMenu crap
+ // 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( );
};