QString m_title;
QString m_author;
+ QString m_authorContact;
QString m_license;
QString m_comment;
QString m_version;
QString KEduVocDocument::title() const
{
- if ( d->m_lessonContainer->name().isEmpty() )
+ if ( d->m_title.isEmpty() )
return d->m_url.fileName();
else
return d->m_title;
}
-
void KEduVocDocument::setTitle( const QString & title )
{
d->m_title = title;
d->m_lessonContainer->setName(title);
}
-
QString KEduVocDocument::author() const
{
return d->m_author;
}
+void KEduVocDocument::setAuthor( const QString & s )
+{
+ d->m_author = s.simplified();
+}
+
+QString KEduVocDocument::authorContact() const
+{
+ return d->m_authorContact;
+}
+
+void KEduVocDocument::setAuthorContact( const QString & s )
+{
+ d->m_authorContact = s.simplified();
+}
QString KEduVocDocument::license() const
{
}
-void KEduVocDocument::setAuthor( const QString & s )
-{
- d->m_author = s.simplified();
-}
+
void KEduVocDocument::setLicense( const QString & s )
/** @returns the author of the file */
QString author() const;
+ /** set the author contact info
+ * @param contact email/contact info to set */
+ void setAuthorContact( const QString & authorContact );
+
+ /** @returns the author contact information */
+ QString authorContact() const;
+
/** set the license of the file
* @param license license to set */
void setLicense( const QString & license );
m_doc->setAuthor( currentElement.text() );
}
+ currentElement = informationElement.firstChildElement( KVTML_AUTHORCONTACT );
+ if ( !currentElement.isNull() ) {
+ m_doc->setAuthorContact( currentElement.text() );
+ }
+
// read the license
currentElement = informationElement.firstChildElement( KVTML_LICENSE );
if ( !currentElement.isNull() ) {
informationElement.appendChild( newTextElement( KVTML_AUTHOR, m_doc->author() ) );
}
+ // author contact (mail/homepage)
+ if ( !m_doc->authorContact().isEmpty() ) {
+ informationElement.appendChild( newTextElement( KVTML_AUTHORCONTACT, m_doc->authorContact() ) );
+ }
+
// license
if ( !m_doc->license().isEmpty() ) {
informationElement.appendChild( newTextElement( KVTML_LICENSE, m_doc->license() ) );
#define KVTML_GENERATOR "generator"
#define KVTML_TITLE "title"
#define KVTML_AUTHOR "author"
+#define KVTML_AUTHORCONTACT "contact"
#define KVTML_LICENSE "license"
#define KVTML_COMMENT "comment"
#define KVTML_CATEGORY "category"