summaryrefslogtreecommitdiffstats
path: root/src/directorylist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/directorylist.h')
-rw-r--r--src/directorylist.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/directorylist.h b/src/directorylist.h
index 3aaaf0b..79f3b9c 100644
--- a/src/directorylist.h
+++ b/src/directorylist.h
@@ -37,8 +37,6 @@ Q_OBJECT
friend class Collection::Item;
public:
- static CollectionSetup* instance() { return s_instance; }
-
CollectionSetup( TQWidget *parent, bool recursive, bool fullMode = true, TQStringList dirs = TQStringList() );
TQStringList dirs() const { return m_dirs; }
@@ -59,8 +57,6 @@ public slots:
void slotRecursiveToggled(bool on);
private:
- static CollectionSetup* s_instance;
-
TQListView *m_view;
bool m_recursive;
TQCheckBox *m_monitor;
@@ -74,11 +70,11 @@ class Item : public TQObject, public TQCheckListItem
{
Q_OBJECT
public:
- Item( TQListView *parent, const TQString &name, const TQString &path, const TQString &icon=TQString::null );
- Item( TQListViewItem *parent, const KURL &url );
+ Item( TQListView *parent, CollectionSetup *collection, const TQString &name, const TQString &path, const TQString &icon=TQString::null );
+ Item( TQListViewItem *parent, CollectionSetup *collection, const KURL &url );
TQCheckListItem *parent() const { return (TQCheckListItem*)TQListViewItem::parent(); }
- bool isDisabled() const { return CollectionSetup::instance()->recursive() && parent() && parent()->isOn(); }
+ bool isDisabled() const { return collectionSetup->recursive() && parent() && parent()->isOn(); }
TQString fullPath() const;
void setOpen( bool b ); // reimpl.
@@ -91,6 +87,7 @@ public slots:
void completed() { if( childCount() == 0 ) { setExpandable( false ); repaint(); } }
private:
+ CollectionSetup *collectionSetup;
KDirLister m_lister;
KURL m_url;
bool m_listed;
@@ -101,11 +98,11 @@ class DeviceItem : public TQObject, public TQCheckListItem
{
Q_OBJECT
public:
- DeviceItem( TQListView *parent );
- DeviceItem( TQListViewItem *parent, const TQString &name, const KURL &url );
+ DeviceItem( TQListView *parent, CollectionSetup *collection );
+ DeviceItem( TQListViewItem *parent, CollectionSetup *collection, const TQString &name, const KURL &url );
TQCheckListItem *parent() const { return (TQCheckListItem*)TQListViewItem::parent(); }
- bool isDisabled() const { return CollectionSetup::instance()->recursive() && parent() && parent()->isOn(); }
+ bool isDisabled() const { return collectionSetup->recursive() && parent() && parent()->isOn(); }
TQString fullPath() const;
void setOpen( bool b ); // reimpl.
@@ -116,8 +113,9 @@ class DeviceItem : public TQObject, public TQCheckListItem
public slots:
void newItems( const KFileItemList& );
void completed() { if( childCount() == 0 ) { setExpandable( false ); repaint(); } }
- private:
+ private:
void mountDevice(const TQString & device);
+ CollectionSetup *collectionSetup;
KDirLister m_lister;
KURL m_url;
bool m_listed;