/***************************************************************************
 * trackeditviewbuilder.cpp: implementation of TrackEditViewBuilder class
 *
 * This file is part of KTabEdit, a KDE tabulature editor
 *
 * copyright (C) 2003-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 "trackeditviewbuilder.h"

#include "tabbeateffects.h"
#include "tabchord.h"
#include "tabduration.h"

#include "tabbend.h"
#include "tabdynamic.h"

#include "tabgracenotetransition.h"
#include "tabgracenote.h"

#include "tabexception.h"
#include "tabharmonic.h"
#include "tabslide.h"
#include "tabtrill.h"
#include "tabnoteeffect.h"

#include "tabnote.h"

#include "songkey.h"
#include "timesignature.h"

#include "tabmixtablechanges.h"
#include "tabtimes.h"
#include "tabbarproperties.h"

#include "tabbar.h"

#include "trackmidiproperties.h"
#include "trackproperties.h"

#include "tabtrack.h"

#include "trackeditview.h"

SongView::TrackEditViewBuilder::TrackEditViewBuilder(TSE3::MidiScheduler* midiScheduler, KCommandHistory* commandHistory,
													 const TabProperties& tabProperties)
: mMidiScheduler(midiScheduler),
  mCommandHistory(commandHistory),
  mTabProperties(tabProperties)
{
}

SongView::TrackEditViewBuilder::~TrackEditViewBuilder()
{
}

TrackEditView* SongView::TrackEditViewBuilder::trackEditView(TabTrack* tabTrack)
{
	if (tabTrack == 0) {
		kdDebug() << "[TrackEditViewBuilder::trackEditView] tabTrack == 0\n";
		throw std::exception();
	}
	
	return new TrackEditView(mMidiScheduler, mTabProperties, tabTrack, mCommandHistory);
}
