Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9a5869cb authored by Scott Wheeler's avatar Scott Wheeler

Added a dataChanged() signal to filelist and implemented the needed changes

in FileListItem to accomodate that.

svn path=/trunk/kdemultimedia/juk/; revision=157161
parent f4fa86f2
......@@ -16,6 +16,7 @@
***************************************************************************/
#include <klocale.h>
#include <kdebug.h>
#include <qfileinfo.h>
#include <qdir.h>
......@@ -57,6 +58,7 @@ void FileList::append(QString item)
QApplication::setOverrideCursor(Qt::waitCursor);
appendImpl(item);
QApplication::restoreOverrideCursor();
emit(dataChanged());
}
void FileList::append(QStringList *items)
......@@ -65,6 +67,7 @@ void FileList::append(QStringList *items)
for(QStringList::Iterator it = items->begin(); it != items->end(); ++it)
appendImpl(*it);
QApplication::restoreOverrideCursor();
emit(dataChanged());
}
void FileList::append(FileListItem *item)
......@@ -73,6 +76,7 @@ void FileList::append(FileListItem *item)
members.append(item->absFilePath());
(void) new FileListItem(*item, this);
}
emit(dataChanged());
}
void FileList::append(QPtrList<QListViewItem> *items)
......@@ -82,6 +86,7 @@ void FileList::append(QPtrList<QListViewItem> *items)
append(dynamic_cast<FileListItem *>(it.current()));
++it;
}
// the emit(dataChanged()) is handled in the above function
}
void FileList::remove(QPtrList<QListViewItem> *items)
......@@ -150,9 +155,6 @@ void FileList::appendImpl(QString item)
}
}
////////////////////////////////////////////////////////////////////////////////
// private slots
////////////////////////////////////////////////////////////////////////////////
void FileList::processEvents()
{
......
......@@ -50,6 +50,9 @@ private:
QStringList members;
void processEvents();
int processed;
signals:
void dataChanged();
};
#endif
......@@ -28,6 +28,7 @@ FileListItem::FileListItem(QFileInfo &file, FileList *parent) : QObject(parent),
{
data = new FileListItemData(file);
refresh();
connect(this, SIGNAL(refreshed()), parent, SIGNAL(dataChanged()));
}
FileListItem::FileListItem(FileListItem &item, FileList *parent) : QObject(parent), KListViewItem(parent)
......@@ -37,6 +38,7 @@ FileListItem::FileListItem(FileListItem &item, FileList *parent) : QObject(paren
addSibling(&item);
refresh();
connect(this, SIGNAL(refreshed()), parent, SIGNAL(dataChanged()));
}
FileListItem::~FileListItem()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment