#include <musicindexgenerator.h>
Public Slots | |
void | createIndexes () |
Public Methods | |
MusicIndexGenerator (const KURL &_base, QWidget *_parent, QString &_htmlTemplate, QString &_coverTemplate) | |
MusicIndexGenerator (const KURL &_base, QWidget *_parent) | |
virtual | ~MusicIndexGenerator () |
void | createHTML () |
void | createCover () |
void | setCDName (const QString &_newVal) |
const QString & | getCDName () |
void | setbase (const KURL &_newVal) |
const KURL & | getbase () |
QString | dirName (const QString &path) |
QString | dirName (const KIO::UDSEntry &path) |
bool | isMusic (const QString &path) |
bool | isMusic (const KIO::UDSEntry &path) |
void | createText () |
Static Public Methods | |
QString | baseName (const QString &path) |
Public Attributes | |
bool | userAccepted |
bool | dialogFinished |
bool | haveAllFilesInfo |
Private Slots | |
void | buildMusicListFase1 (KIO::Job *job, const KIO::UDSEntryList &list) |
void | buildMusicListFase2 (KIO::Job *job) |
void | prepareCDLayout () |
void | createCoverStage2 (KIO::Job *) |
void | collectCoverFiles (KIO::Job *job, const KIO::UDSEntryList &list) |
void | updateFromDialog () |
void | setDialogFinished () |
void | createAll () |
Private Methods | |
void | subConstructor (const KURL &_base, QString &_htmlTemplate, QString &_coverTemplate) |
QString | clean (QString s) |
QString | nicePlayingTime (unsigned long secs) |
void | userDialog () |
QStringList | getSubItems (const QString &rel) |
void | infoBuilderFinished () |
Private Attributes | |
QString | CDName |
KURL | base |
MusicList | musicList |
FoldersInfo | foldersInfo |
QStringList | fileNames |
QString | htmlTemplate |
QString | coverTemplate |
QString | root |
QStringList | coverFiles |
QString | coverTemplateDir |
QString | coverFilenameExtension |
QString | coverFolderTemplate |
QString | coverListFolderTemplate |
QString | coverListSongTemplate |
DialogIndexerInfo * | dialogIndexerInfo |
QWidget * | parent |
|
|
|
|
|
|
|
Create the nice HTML index |
|
Create the KWord document with full music files listing to be printed and used as CD cover. Additionally, runs KWord to let the user make final adjustements and generate PDF. |
|
Write property of QString CDName. |
|
Read property of QString CDName. |
|
Write property of KURL base. |
|
Read property of KURL base. |
|
Returns the basename of a full path, similar to the basename(1) unix command. baseName("/dir1/dir2/file.txt") == "file.txt" |
|
Returns the dirname of a full path, similar to the dirname(1) unix command. dirName("/dir1/dir2/file.txt") == "/dir1/dir2" |
|
|
|
|
|
|
|
Create the text indexes in info/ folder collections.txt: Only the folder names musicdb.txt: Full music files listing with file size, duration and quality music.txt: Almost human readable listing of files per folder |
|
The real constructor. All other constructors actually call this method |
|
Cleans a raw filename to a nicer representations, substituting _s to spaces, "/" to " :: ", removing file extensions, etc |
|
Returns the string for the playing time represented as hh:mm:ss |
|
Details of creating the user supplied info dialog. |
|
Return the list of all resources inside the rel directories. Same functionality as KStandardDirs::findAllResources, but didn't worked for a konqueror plugin. |
|
Called when all files info was retrieved, and now we are ready to generate indexes. |
|
Called after each sub-folder list job finishes. It will build the musicList and folderList vars. |
|
|
|
Given a folder, will create all necessary static files for a nice CD. Like images, the basic diretories resource and info, CD icon, Windows autorun.inf, etc |
|
Second stage of the cover creation. Will be called after the template copy job finishes. |
|
|
|
Called when the user accepts the DialogIndexerInfo. Will update some internal vars to correctly generate the indexes. |
|
Called when the user finished interacting the the dialog. |
|
The starting point to create all music indexes, prepare CD layout, and destructors. |
|
Encapsulates all index files creation methods |
|
The CD title, to be used in cover, HTML, etc |
|
The base folder we'll index |
|
Holds a list of all MP3/Ogg files in a subdirectory |
|
Holds the folders statistical info |
|
An internal filenames list, used in the process of creating the complex structure for the indexes. |
|
Name of the template to use for the HTML index |
|
Name of the template to use for the CD cover |
|
A string representation of the CD root directory. |
|
The list of template files that instegrates the KWord file for the cover. |
|
Point the the template dir we'll use for the cover |
|
The cover filename extension. Since KOffice and OpenOffice docs are all zip files, the template-based cover-generation engine is the same, so we need the filename extension to generate a correct filename, based on the template. |
|
A KWord template for a table of contents entry |
|
A KWord template for a folder entry in the long song list |
|
A KWord template for a song entry in the long song list |
|
The dialog to ask user some questions regarding how to build the indexes. |
|
|
|
True if the user clicked OK in the dialog. |
|
True if user finished to interact with the dialog. |
|
True if all music files info-gathering engines are over. |