WIP #34: added channel map manager and new editor window. Removed a

number of unused classes.  Removed playlist manager from a number of
classes and replaced with the alias, channel and channel map models.
Updated playlist manager to no longer retain a playlist except for when
loading to models or when storing from models.  Extracted version 1 to
version 2 playlist conversion and changed playlist manager to keep the
original version 1 playlist and create a new version 2 (playlist_v2.xml)
file.  On startup, try to load a v2, and if not, look for a v1 to
convert.  Otherwise, don't create a playlist and one will be created
once the user adds items to the models.
This commit is contained in:
denny
2016-03-06 07:48:14 -05:00
parent 8aebdd1c26
commit 2394ac2fa9
75 changed files with 2154 additions and 5008 deletions

View File

@@ -74,6 +74,7 @@ import controller.channel.ChannelEventListener;
import controller.channel.ChannelModel;
import controller.channel.ChannelProcessingManager;
import controller.channel.ChannelSelectionManager;
import controller.channel.map.ChannelMapModel;
public class SDRTrunk
{
@@ -117,26 +118,27 @@ public class SDRTrunk
ThreadPoolManager threadPoolManager = new ThreadPoolManager();
SourceManager sourceManager = new SourceManager( mSettingsManager, threadPoolManager );
ChannelModel channelModel = new ChannelModel();
AliasModel aliasModel = new AliasModel();
PlaylistManager playlistManager = new PlaylistManager( threadPoolManager,
aliasModel, channelModel );
RecorderManager recorderManager = new RecorderManager( threadPoolManager );
ChannelModel channelModel = new ChannelModel();
ChannelMapModel channelMapModel = new ChannelMapModel();
EventLogManager eventLogManager = new EventLogManager();
RecorderManager recorderManager = new RecorderManager( threadPoolManager );
SourceManager sourceManager = new SourceManager( mSettingsManager,
threadPoolManager );
ChannelProcessingManager channelProcessingManager =
new ChannelProcessingManager( channelModel, eventLogManager,
playlistManager, recorderManager, sourceManager, threadPoolManager );
channelModel.addListener( channelProcessingManager );
new ChannelProcessingManager( channelModel, channelMapModel,
aliasModel, eventLogManager, recorderManager,
sourceManager, threadPoolManager );
channelProcessingManager.addAudioPacketListener( recorderManager );
channelModel.addListener( channelProcessingManager );
ChannelSelectionManager channelSelectionManager =
new ChannelSelectionManager( channelModel );
channelModel.addListener( channelSelectionManager );
@@ -152,27 +154,22 @@ public class SDRTrunk
ConfigurationControllerModel configurationControllerModel =
new ConfigurationControllerModel( channelModel, channelProcessingManager,
playlistManager, mSettingsManager, sourceManager );
mSettingsManager, sourceManager );
mControllerPanel = new ControllerPanel( audioManager, configurationControllerModel,
aliasModel, channelModel, channelProcessingManager, mapService, playlistManager,
mSettingsManager, sourceManager );
aliasModel, channelModel, channelMapModel, channelProcessingManager,
mapService, mSettingsManager, sourceManager );
mSpectralPanel = new SpectralDisplayPanel( configurationControllerModel,
channelModel, channelProcessingManager, playlistManager, mSettingsManager );
channelModel, channelProcessingManager, mSettingsManager );
mTitle = getTitle();
//TODO: move this to the end once we add the alias model, otherwise the
//configuration tree won't load correctly
//Initialize the playlist manager to load the saved playlist
PlaylistManager playlistManager = new PlaylistManager( threadPoolManager,
aliasModel, channelModel, channelMapModel );
playlistManager.init();
mLog.info( "starting main application gui" );
//Initialize the GUI
initGUI();
if( mLogChannelAndMemoryUsage )
{
Runnable cml = new ChannelMemoryLogger();
@@ -181,6 +178,11 @@ public class SDRTrunk
ThreadType.DECODER, cml, 5, TimeUnit.SECONDS );
}
mLog.info( "starting main application gui" );
//Initialize the GUI
initGUI();
//Start the gui
EventQueue.invokeLater( new Runnable()
{