/***************************************************************************
 * songpropertiesdialog.cpp
 *
 * This file is part of KTabEdit, a KDE tabulature editor
 *
 * copyright (C) 2007 the KTabEdit development team <mrgwen@gmail.com>
 ***************************************************************************/

/***************************************************************************
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * See the file COPYING for more information.
 ***************************************************************************/
 
#include "songpropertiesdialog.h"

#include "tablature/songkey.h"
#include "tablature/tablyrics.h"
#include "tablature/tabproperties.h"

SongPropertiesDialog::SongPropertiesDialog(const TabProperties* tabProperties)
{
	m_ui.setupUi(this);
	
	m_ui.title->setText(tabProperties->title());
	m_ui.author->setText(tabProperties->author());
	m_ui.transcriber->setText(tabProperties->transcriber());
	m_ui.comments->setText(tabProperties->instructions());
	m_ui.tempo->setValue(tabProperties->tempo());
}

SongPropertiesDialog::~SongPropertiesDialog()
{
}

TabProperties* SongPropertiesDialog::properties() const
{
	TabProperties* properties = new TabProperties();
	
	properties->setTitle(m_ui.title->text());
	properties->setAuthor(m_ui.author->text());
	properties->setTranscriber(m_ui.transcriber->text());
	properties->setInstructions(m_ui.comments->text());
	properties->setTempo(m_ui.tempo->value());
	
	return properties;
}

#include "songpropertiesdialog.moc"
