You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1009 B
C++
61 lines
1009 B
C++
/*!
|
|
\file common.cpp
|
|
|
|
*/
|
|
|
|
#include "common.h"
|
|
|
|
|
|
QString generateReadList(const QList<IMAGEFORMAT>& imageFormats)
|
|
{
|
|
QString all("all supported files (");
|
|
QString readList;
|
|
|
|
for(int z = 0;z < imageFormats.count();z++)
|
|
{
|
|
IMAGEFORMAT i = imageFormats[z];
|
|
|
|
if(i.read)
|
|
{
|
|
all.append(i.extension);
|
|
all.append(" ");
|
|
|
|
readList.append(";;");
|
|
readList.append(i.description);
|
|
readList.append(" (");
|
|
readList.append(i.extension);
|
|
readList.append(")");
|
|
}
|
|
}
|
|
|
|
readList.prepend(all);
|
|
return(readList);
|
|
}
|
|
|
|
QString generateWriteList(const QList<IMAGEFORMAT>& imageFormats)
|
|
{
|
|
QString all("all supported files (");
|
|
QString writeList;
|
|
|
|
for(int z = 0;z < imageFormats.count();z++)
|
|
{
|
|
IMAGEFORMAT i = imageFormats[z];
|
|
|
|
if(i.write)
|
|
{
|
|
all.append(i.extension);
|
|
all.append(" ");
|
|
|
|
writeList.append(";;");
|
|
writeList.append(i.description);
|
|
writeList.append(" (");
|
|
writeList.append(i.extension);
|
|
writeList.append(")");
|
|
}
|
|
}
|
|
|
|
writeList.prepend(all);
|
|
return(writeList);
|
|
}
|
|
|