~ubuntu-branches/ubuntu/feisty/kid3/feisty

« back to all changes in this revision

Viewing changes to kid3/mp3file.h

  • Committer: Bazaar Package Importer
  • Author(s): Aurelien Jarno
  • Date: 2004-09-26 00:22:06 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040926002206-ynj1sr1mjdqnd2x5
Tags: 0.5-1
New upstream version (closes: bug#273073).

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
         */
48
48
        QString getFilename(void) const { return new_filename; }
49
49
        /**
 
50
         * Get directory name.
 
51
         *
 
52
         * @return directory name
 
53
         */
 
54
        QString getDirname(void) const { return dirname; }
 
55
        /**
50
56
         * Read tags from file.
51
57
         *
52
58
         * @param force TRUE to force reading even if tags were already read.
55
61
        /**
56
62
         * Write tags to file and rename it if necessary.
57
63
         *
58
 
         * @param force TRUE to force writing even if file was not changed.
 
64
         * @param force   TRUE to force writing even if file was not changed.
 
65
         * @param renamed will be set to TRUE if the file was renamed,
 
66
         *                i.e. the file name is no longer valid, else *renamed
 
67
         *                is left unchanged
59
68
         *
60
 
         * @return TRUE if the file was renamed, i.e. the file name is no longer valid.
 
69
         * @return TRUE if ok, FALSE if the file could not be written or renamed.
61
70
         */
62
 
        bool writeTags(bool force);
 
71
        bool writeTags(bool force, bool *renamed);
63
72
        /**
64
73
         * Remove all ID3v1 tags.
65
74
         */
392
401
         */
393
402
        void getTagsFromFilename(StandardTags *st);
394
403
        /**
 
404
         * Create string with tags according to format string.
 
405
         *
 
406
         * @param st  tags to use to build filename
 
407
         * @param fmt format string containing the following codes:
 
408
         *            %s title (song)
 
409
         *            %l album
 
410
         *            %a artist
 
411
         *            %c comment
 
412
         *            %y year
 
413
         *            %t track
 
414
         *            %g genre
 
415
         *
 
416
         * @return format string with format codes replaced by tags.
 
417
         */
 
418
        static QString formatWithTags(const StandardTags *st, QString fmt);
 
419
        /**
395
420
         * Get filename from tags.
396
 
         * Supported formats:
397
 
         * artist - album/track song.mp3
398
421
         *
399
422
         * @param st  tags to use to build filename
400
423
         * @param fmt format string containing the following codes:
448
471
         */
449
472
        int width(const QListBox* lb) const;
450
473
 
 
474
        /**
 
475
         * Get technical detail information.
 
476
         *
 
477
         * @return string with detail information,
 
478
         *         "" if no information available.
 
479
         */
 
480
        QString getDetailInfo() const;
 
481
 
 
482
        /**
 
483
         * Get duration of file.
 
484
         *
 
485
         * @return duration in seconds,
 
486
         *         0 if unknown.
 
487
         */
 
488
        unsigned getDuration() const;
 
489
 
 
490
        /**
 
491
         * Format a time string "h:mm:ss".
 
492
         * If the time is less than an hour, the hour is not put into the
 
493
         * string and the minute is not padded with zeroes.
 
494
         *
 
495
         * @param seconds time in seconds
 
496
         *
 
497
         * @return string with the time in hours, minutes and seconds.
 
498
         */
 
499
        static QString formatTime(unsigned seconds);
 
500
 
451
501
        /** ID3v2 tags */
452
502
        ID3_Tag *tagV2;
453
503
        /** TRUE if ID3v2 tags were changed */
487
537
        static QPixmap *modifiedPixmap;
488
538
        /** pointer to empty pixmap */
489
539
        static QPixmap *nullPixmap;
 
540
        /** pointer to V1V2 pixmap */
 
541
        static QPixmap *v1v2Pixmap;
 
542
        /** pointer to V1 pixmap */
 
543
        static QPixmap *v1Pixmap;
 
544
        /** pointer to V2 pixmap */
 
545
        static QPixmap *v2Pixmap;
 
546
        /** pointer to "no tag" pixmap */
 
547
        static QPixmap *notagPixmap;
490
548
};
491
549
 
492
550
#endif // MP3FILE_H