summaryrefslogtreecommitdiff
path: root/libopie/ofileselector/olister.h
Side-by-side diff
Diffstat (limited to 'libopie/ofileselector/olister.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/ofileselector/olister.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/libopie/ofileselector/olister.h b/libopie/ofileselector/olister.h
index 0885525..79d5409 100644
--- a/libopie/ofileselector/olister.h
+++ b/libopie/ofileselector/olister.h
@@ -7,6 +7,9 @@
#include <qstringlist.h>
+class QComboBox;
class OPixmapProvider;
class OFileSelector;
+
+class OListerCmbAccess;
/**
* lister is something like KIO but very
@@ -16,4 +19,5 @@ class OFileSelector;
* @see OLocalLister for a filesystem based implementation
*/
+
class OLister {
public:
@@ -28,5 +32,18 @@ public:
void setPixmapProvider( OPixmapProvider* );
+
+ /* some way a slot */
+ void fileSelected( const QString& dir, const QString& file, const QString& extra ) = 0;
+ void changeDir( const QString& dir, const QString& file, const QString& extra ) = 0;
protected:
+ /**
+ * I hate too big classes
+ * this is a way to group
+ * access to a ComboBox
+ * which might exist or
+ * not in a secure way
+ */
+ OListerCmbAccess* comboBox();
+
bool showFiles()const;
bool showDirs()const;
@@ -34,8 +51,11 @@ protected:
void addFile( const QString& mine,
QFileInfo*,
+ const QString& extra = QString::null,
bool isSymlink = FALSE );
+
void addFile( const QString& mine,
const QString& path,
const QString& file,
+ const QString& extra = QString::null,
bool isSymlink = FALSE );
void addDir( const QString& mine,
@@ -45,11 +65,14 @@ protected:
const QString& path,
const QString& dir,
+ const QString& extra = QString::null,
bool isSymlink = FALSE );
void addSymlink( const QString& mine,
QFileInfo* info,
+ const QString& extra = QString::null,
bool isSymlink = FALSE);
void addSymlink( const QString& mine,
const QString& path,
const QString& name,
+ const QString& extra = QString::null,
bool isSymlink = FALSE );
OFileSelector* view();
@@ -58,5 +81,43 @@ private:
OFileSelector* m_view;
OPixmapProvider* m_prov;
+ OListerCmbAccess* m_acc;
+
+ class Private;
+ Private *d;
+};
+
+class OListerCmbAccess {
+ friend class OLister;
+public:
+ OListerCmbAccess( QComboBox* = 0l);
+ ~OListerCmbAccess();
+
+ /**
+ * clears the combobox
+ */
+ void clear();
+
+ /**
+ * set's @param add to be the current Item
+ * if the item is not present it'll be removed
+ */
+ void setCurrentItem( const QString& add, bool FORECE_ADD = TRUE );
+
+ /**
+ * inserts the the String at
+ * a non predictable position... The position is determined
+ * by the QComboBox code
+ */
+ void insert( const QString& );
+
+ /**
+ *
+ */
+ QString currentText()const;
+private:
+ class Private;
+ Private* d;
+ QComboBox* m_cmb;
};