summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager
authorkorovkin <korovkin>2006-03-20 21:43:19 (UTC)
committer korovkin <korovkin>2006-03-20 21:43:19 (UTC)
commit14fc21051eb3ff92527fd9ddeaf117009bd74af2 (patch) (side-by-side diff)
treea4a949967e4452d8943ddfb04c92e5fbcd42b04e /noncore/net/opietooth/manager
parent39fedaa847ed64b2c0113a75d0f1de29da5876db (diff)
downloadopie-14fc21051eb3ff92527fd9ddeaf117009bd74af2.zip
opie-14fc21051eb3ff92527fd9ddeaf117009bd74af2.tar.gz
opie-14fc21051eb3ff92527fd9ddeaf117009bd74af2.tar.bz2
Added file size.
Diffstat (limited to 'noncore/net/opietooth/manager') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/filelistitem.cpp5
-rw-r--r--noncore/net/opietooth/manager/filelistitem.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/filelistitem.cpp b/noncore/net/opietooth/manager/filelistitem.cpp
index 86fcc54..a6d6bb5 100644
--- a/noncore/net/opietooth/manager/filelistitem.cpp
+++ b/noncore/net/opietooth/manager/filelistitem.cpp
@@ -59,13 +59,18 @@ QString FileListItem::key(int, bool) const
str = "0";
else
str = "1";
str += m_name;
return str;
}
enum dtype FileListItem::gettype()
{
return type;
}
+int FileListItem::getsize()
+{
+ return m_size;
+}
+
//eof
diff --git a/noncore/net/opietooth/manager/filelistitem.h b/noncore/net/opietooth/manager/filelistitem.h
index a45d196..d4019bf 100644
--- a/noncore/net/opietooth/manager/filelistitem.h
+++ b/noncore/net/opietooth/manager/filelistitem.h
@@ -17,22 +17,23 @@
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();
+ virtual int getsize();
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