Methods | |
String | getEmail () |
String | getName () |
String | getUrl () |
The DzAuthor class is used to get authorship data for native files, and the current instance of the application.
String DzAuthor::getEmail | ( | ) |
// 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 | ( | ) |
// 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 | ( | ) |
// 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 ) ); }