DzAuthor Class Reference
[Core Objects]

Encapsulates authorship information. More...

List of all members.

Methods

String getEmail ()
String getName ()
String getUrl ()


Detailed Description

Encapsulates authorship information.

The DzAuthor class is used to get authorship data for native files, and the current instance of the application.

See also:
DzApp::getCurrentAuthor(), DzInFile::getAuthor()
Todo:
Examples: Script vs. Plugin


Member Function Documentation

String DzAuthor::getEmail (  ) 

Returns:
The author's email
Example:
    // open a DAZ Studio native file
    QString     filename( dzApp->getDocumentsPath() + "/Content/SomeFile.daz" );
    DzInFile    dazFile( filename );

    if( dazFile.open() == DZ_NO_ERROR ){
        // get the author of the file
        DzAuthor    *author = dazFile.getAuthor();

        if( author ){
            // get the email of the file's author
            QString email = author->getEmail();

            // write the info to the log file
            dzApp->log( QString( "The author of %1 can be contacted by emailing %2" ).arg( filename )
                .arg( email ) );
        }
    }

String DzAuthor::getName (  ) 

Returns:
The author's name
Example:
    // get the current author
    DzAuthor    *author = dzApp->getCurrentAuthor();

    if( author ){
        // get the name of the current author
        QString name = author->getName();

        // write the author's name to the log file
        dzApp->log( QString( "Current author: %1" ).arg( name ) );
    }

String DzAuthor::getUrl (  ) 

Returns:
The author's url
Example:
    // get the current author
    const DzAuthor  *author = dzApp->getCurrentAuthor();

    if( author ){
        // get the name of the current author
        QString url = author->getUrl();

        // write the author's url to the log file
        dzApp->log( QString( "Current author's website: %1" ).arg( url ) );
    }


Generated on Thu Sep 24 12:21:10 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.