summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/filelistitem.h
Side-by-side diff
Diffstat (limited to 'noncore/net/opietooth/manager/filelistitem.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/filelistitem.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/filelistitem.h b/noncore/net/opietooth/manager/filelistitem.h
new file mode 100644
index 0000000..a45d196
--- a/dev/null
+++ b/noncore/net/opietooth/manager/filelistitem.h
@@ -0,0 +1,38 @@
+/* $Id$ */
+/* Directory tree entry */
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+#ifndef FILELISTITEM_H
+#define FILELISTITEM_H
+
+#include <qlistview.h>
+#include <sys/stat.h>
+#include <client.h>
+
+enum dtype { IS_DIR = 0, IS_FILE = 1 };
+
+namespace OpieTooth {
+
+ class FileListItem : public QListViewItem {
+ Q_OBJECT
+ public:
+ FileListItem(QListView * parent, stat_entry_t* ent, int size = 0);
+ FileListItem(QListViewItem * parent, stat_entry_t* ent, int size = 0);
+ virtual QString key ( int, bool ) const;
+ virtual enum dtype gettype();
+ protected:
+ void init(stat_entry_t* ent, int size);
+ protected:
+ QString m_name; //name
+ int m_size; //file (not directory) size
+ enum dtype type; //type: file or directory
+ };
+};
+
+#endif