summaryrefslogtreecommitdiffstats
path: root/src/kbtaskview.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-24 11:49:27 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-24 11:49:27 -0500
commitc3f8ee64e905cdb103b5bfa07525fb4e85c31120 (patch)
tree46eabe44a1b3af79971dcafb743a104af8e18e69 /src/kbtaskview.cpp
downloadkasablanca-c3f8ee64e905cdb103b5bfa07525fb4e85c31120.tar.gz
kasablanca-c3f8ee64e905cdb103b5bfa07525fb4e85c31120.zip
Initial import of kasablanca 0.4.0.2
Diffstat (limited to 'src/kbtaskview.cpp')
-rw-r--r--src/kbtaskview.cpp64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/kbtaskview.cpp b/src/kbtaskview.cpp
new file mode 100644
index 0000000..d1f6cc1
--- /dev/null
+++ b/src/kbtaskview.cpp
@@ -0,0 +1,64 @@
+//
+// C++ Implementation: kbtaskview
+//
+// Description:
+//
+//
+// Author: Magnus Kulke <mkulke@magnusmachine>, (C) 2004
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+
+#include <klocale.h>
+
+#include <qptrlist.h>
+#include <qevent.h>
+
+#include "kbtaskview.h"
+#include "kbfileinfo.h"
+#include "kbtransferitem.h"
+
+KbTaskView::KbTaskView(QWidget *parent, const char *name)
+ : KListView(parent, name)
+{
+ addColumn(i18n("Task"));
+ addColumn(i18n("Progress"));
+ addColumn(i18n("Speed"));
+ addColumn(i18n("Percentage"));
+ addColumn(i18n("Remaining"));
+
+ setRootIsDecorated(true);
+ setSelectionMode(QListView::Extended);
+ setDragEnabled(true);
+ setAcceptDrops(true);
+
+ //connect(this, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)),
+ // this, SLOT(SLOT_DoubleClicked(QListViewItem*, const QPoint&, int)));
+}
+
+KbTaskView::~KbTaskView()
+{
+}
+
+QListViewItem* KbTaskView::LastChild()
+{
+ QListViewItem* last = NULL;
+ QListViewItem* it = lastItem();
+ while (it)
+ {
+ last = it;
+ it = it->parent();
+ }
+ return last;
+}
+
+void KbTaskView::SLOT_DoubleClicked(QListViewItem* item, const QPoint&, int)
+{
+ KbTransferItem *kti = static_cast<KbTransferItem*>(item);
+ qWarning("src: %s|%s", kti->SrcFileInfo()->filePath().latin1(), kti->SrcFileInfo()->fileName().latin1());
+ qWarning("dst: %s|%s", kti->DstFileInfo()->filePath().latin1(), kti->DstFileInfo()->fileName().latin1());
+}
+
+#include "kbtaskview.moc"