/** * Copyright (C) 2002-2004 Scott Wheeler <wheeler@kde.org> * Copyright (C) 2009 Michael Pyne <mpyne@kde.org> * * 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. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */

// Since we want to ensure that the shutdown process for the PlaylistCollection// (a base class for PlaylistBox) has a chance to write the playlists to disk// before they are deleted we're explicitly deleting the PlaylistBox here.

////////////////////////////////////////////////////////////////////////////////// public slots////////////////////////////////////////////////////////////////////////////////voidPlaylistSplitter::setFocus(){m_searchWidget->setFocus();}

// Make sure none of the optional widgets are collapsible, this causes the// widget to be essentially invisible but logically shown.this->setChildrenCollapsible(false);m_editorSplitter->setChildrenCollapsible(false);

// Now that GUI setup is complete, add some auto-update signals.connect(CollectionList::instance(),SIGNAL(signalCollectionChanged()),m_editor,SLOT(slotUpdateCollection()));connect(m_playlistStack,SIGNAL(currentChanged(int)),this,SLOT(slotPlaylistChanged(int)));

splitterSizes=config.readEntry("EditorSplitterSizes",QList<int>());if(splitterSizes.isEmpty()){// If no sizes were saved, use default sizes for the playlist and the// editor, respectively. The values are just hints for the actual size,// m_editorSplitter will distribute the space according to their// relative weight.splitterSizes.append(300);splitterSizes.append(200);}m_editorSplitter->setSizes(splitterSizes);