AW: [mythtv] Programming help.
Jochen Kühner
jochen.kuehner at gmx.de
Fri May 20 09:58:15 UTC 2005
I thougt of use of a RegExp
If only I get for Summer1.adf Summer2.adf and Giana 01.adf Giana 02.adf…
everytime the same
Filename! The rest is no prob!
_____
Von: mythtv-dev-bounces at mythtv.org [mailto:mythtv-dev-bounces at mythtv.org] Im
Auftrag von Jochen Kühner
Gesendet: Freitag, 20. Mai 2005 11:56
An: 'Development of mythtv'
Betreff: [mythtv] Programming help.
I’m currently working on e patch for mythgame to support amiga files.
Now I have a problem.
I very new to C++ so a experienced programmer could solve this fast!
…..
QStringList rom_extensions;
rom_extensions.append("adf");
QString GameName;
QString Genre(QObject::tr("Unknown"));
int Year = 0;
bool bRomFound;
MythProgressDialog pdial(QObject::tr("Looking for Amiga games..."),
List->count());
int progress = 0;
for (QFileInfoListIterator it(*List); it; ++it)
{
pdial.setProgress(progress);
progress++;
QFileInfo Info(*it.current());
{
for (QStringList::Iterator i = rom_extensions.begin(); i !=
rom_extensions.end();
{
if(Info.extension(false).lower() == *i)
{
GameName = Info.baseName(false);
bRomFound = true;
break;
}
}
}
cout << GameName << endl;
if(bRomFound)
{
…..
This procedure get all the amiga disk images. But the Problem is, that I
need only one if the File name is for Exampe: “Giana 01.adf” “Giana 02.adf”
“Giana 03.adf” or “Summer1.adf” “Summer2.adf”.
I need one filename (as best without the number) and a counter how many
files ther are
Like: fnm = “Giana 0” , counter = 3 Fnm=”Summer” counter = 2
Anyone a Idea how this could be solved very easy???
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-dev/attachments/20050520/545bda7a/attachment.htm
More information about the mythtv-dev
mailing list