class FileEntry
{
public:
double size;
bool selected;
int index;
{
name = pName;
absolutePath =pAbsolutePath;
relativePath=pRelativePath;
size=pSize;
typ=pTyp;
createDate=pCreateDate;
selected=pSelected;
index = pIndex;
}
};
bool lessSize(const FileEntry& a, const FileEntry& b)
{
return a.size < b.size;
}
void DoSelection()
{
QList<FileEntry> tmpList;
tmpList.
append(FileEntry
("A",
"A",
"A",
2.2,
"A",
QDateTime(),
false,
1));
tmpList.
append(FileEntry
("A",
"A",
"A",
2.2,
"A",
QDateTime(),
false,
1));
qsort(tmpList.begin(),tmpList.end(),lessSize);
}
class FileEntry
{
public:
QString name;
QString absolutePath;
QString relativePath;
double size;
QString typ;
QDateTime createDate;
bool selected;
int index;
FileEntry(QString pName, QString pAbsolutePath,QString pRelativePath,double pSize,QString pTyp,QDateTime pCreateDate,bool pSelected,int pIndex)
{
name = pName;
absolutePath =pAbsolutePath;
relativePath=pRelativePath;
size=pSize;
typ=pTyp;
createDate=pCreateDate;
selected=pSelected;
index = pIndex;
}
};
bool lessSize(const FileEntry& a, const FileEntry& b)
{
return a.size < b.size;
}
void DoSelection()
{
QList<FileEntry> tmpList;
tmpList.append(FileEntry("A","A","A",2.2,"A",QDateTime(),false,1));
tmpList.append(FileEntry("A","A","A",2.2,"A",QDateTime(),false,1));
qsort(tmpList.begin(),tmpList.end(),lessSize);
}
To copy to clipboard, switch view to plain text mode
Bookmarks