00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __FILEITEM_H__
00019 #define __FILEITEM_H__
00020
00021 #include <qlistview.h>
00022 #include <qdatetime.h>
00023
00024 #include "RioExplorer.h"
00025
00026 class FileItem : public QListViewItem
00027 {
00028 private:
00029 QString fileName;
00030 QString owner;
00031 QString group;
00032 QString permissions;
00033 unsigned long long int size;
00034 QDateTime date;
00035 int type;
00036
00037 unsigned int VideoRate;
00038
00039
00040 bool UseVideoRate;
00041
00042 void autoSetIcon( void );
00043
00044
00045
00046 void setUpData( QString, int, bool );
00047 int compare( QListViewItem *, int, bool ) const;
00048
00049 public:
00050
00051
00052
00053 FileItem( QListView *, QString, int, bool );
00054 FileItem( QListViewItem *, QString, int, bool );
00055
00056
00057
00058
00059 void setProperties( QString, QString, QString,
00060 unsigned long long int,
00061 QDateTime, unsigned int );
00062 QString getFileName( void );
00063 bool isDir( void );
00064 QString getPermissions( void );
00065 bool canRead( void );
00066 bool isLink( void );
00067 bool isBrokenLink( void );
00068 unsigned long long int getSize( void );
00069 QDateTime getDate( void );
00070 QString getOwner( void );
00071 QString getGroup( void );
00072 int getType( void );
00073 unsigned int getExtType( void );
00074 CRioSession *getSession( void );
00075
00076
00077
00078
00079
00080 QString getPath( void );
00081
00082 static bool getPathUntil( unsigned int, QString, QString * );
00083
00084
00085 static const unsigned int COLUMN_FILENAME = 0;
00086 static const unsigned int COLUMN_SIZE = 1;
00087 static const unsigned int COLUMN_DATE = 2;
00088 static const unsigned int COLUMN_OWNER = 3;
00089 static const unsigned int COLUMN_GROUP = 4;
00090 static const unsigned int COLUMN_PERMISSIONS = 5;
00091
00092
00093 static const unsigned int COLUMN_VIDEORATE = 6;
00094
00095 static const unsigned int ICONID_DIRECTORY = 0;
00096 static const unsigned int ICONID_LOCKED_DIRECTORY = 1;
00097 static const unsigned int ICONID_LOCKED_FILE = 2;
00098 static const unsigned int ICONID_UNKNOWN_FILE = 3;
00099 static const unsigned int ICONID_MPG = 4;
00100 static const unsigned int ICONID_XML = 5;
00101 static const unsigned int ICONID_BROWSER = 6;
00102 static const unsigned int ICONID_RELATED_MEDIA = 7;
00103 static const unsigned int ICONID_INDEX = 8;
00104 static const unsigned int ICONID_TGIF = 9;
00105 static const unsigned int ICONID_ZIP_FILE = 10;
00106 static const unsigned int ICONID_DIR_LINK = 11;
00107 static const unsigned int ICONID_BROKEN_LINK = 12;
00108 static const unsigned int ICONID_UNKNOWN_FILE_LINK = 13;
00109 static const unsigned int ICONID_MPG_LINK = 14;
00110 static const unsigned int ICONID_BROWSER_LINK = 15;
00111 static const unsigned int ICONID_XML_LINK = 16;
00112 static const unsigned int ICONID_ZIP_FILE_LINK = 17;
00113
00114 };
00115
00116 #endif
00117