[mythtv] MythGallery addition of copy to USB drive

Remko Christ trisooma at xs4all.nl
Wed Jan 21 11:38:06 UTC 2009


Hi,

when coding in C++ (or C for that matter) the function definitions are
usually found in *.h files. Check out Galleryutil.h......

Good luck in your efforts,

Trisooma

> Hi,
>
> I'm looking at adding the above functionality to Mythgallery but
> haven't done any coding in C++ before (have done quite a bit of vb and
> hta scripting).
>
> I've had a look at the code for the existing copy function but there's
> one thing I'm not sure about..
>
> In the following section of Iconview.cpp it mentions
> GalleryUtil::CopyMove, but in Galleryutil.cpp there is no
> GalleryUtil::CopyMove only GalleryUtil::Copy & GalleryUtil::Move.
>
> void IconView::CopyMarkedFiles(bool move)
> {
>     if (m_itemMarked.isEmpty())
>         return;
>
>     QStringList::iterator it;
>     QFileInfo fi;
>     QFileInfo dest;
>     int count = 0;
>
>     QString msg = (move) ?
>         tr("Moving marked images...") :
>         tr("Copying marked images...");
>
>     MythProgressDialog *progress =
>         new MythProgressDialog(msg, m_itemMarked.count());
>
>     for (it = m_itemMarked.begin(); it != m_itemMarked.end(); it++)
>     {
>         fi.setFile(*it);
>         dest.setFile(QDir(m_currDir), fi.fileName());
>
>         if (fi.exists())
>             GalleryUtil::CopyMove(fi, dest, move);
>
>         progress->setProgress(++count);
>     }
>
>     progress->Close();
>     progress->deleteLater();
>
>     LoadDirectory(m_currDir, true);
> }
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
>




More information about the mythtv-dev mailing list