playlistsplitter.cpp 19.6 KB
Newer Older
1 2 3 4 5
/***************************************************************************
                          playlistsplitter.cpp  -  description
                             -------------------
    begin                : Fri Sep 13 2002
    copyright            : (C) 2002 by Scott Wheeler
6
    email                : wheeler@kde.org
7 8 9 10 11 12 13 14 15 16 17
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

18
#include <klocale.h>
19
#include <kiconloader.h>
20
#include <kapplication.h>
21
#include <kstandarddirs.h>
22
#include <kmessagebox.h>
23
#include <kdirwatch.h>
Nadeem Hasan's avatar
Nadeem Hasan committed
24
#include <klineeditdlg.h>
25 26
#include <kdebug.h>

27
#include <qtimer.h>
28

29
#include "playlistitem.h"
30
#include "playlistsplitter.h"
31
#include "collectionlist.h"
32
#include "directorylist.h"
33
#include "playlist.h"
34
#include "playlistsearch.h"
35

36 37
QStringList *PlaylistSplitter::m_mediaExtensions = 0;
QStringList *PlaylistSplitter::m_listExtensions = 0;
38 39

////////////////////////////////////////////////////////////////////////////////
40
// helper functions
41 42
////////////////////////////////////////////////////////////////////////////////

43
void processEvents()
44
{
45 46 47
    static int processed = 0;
    if(processed == 0)
        kapp->processEvents();
48
    processed = (processed + 1) % 5;
49 50
}

51
////////////////////////////////////////////////////////////////////////////////
52
// public methods
53 54
////////////////////////////////////////////////////////////////////////////////

55 56 57 58
PlaylistSplitter::PlaylistSplitter(QWidget *parent, bool restore, const char *name) : 
    QSplitter(Qt::Horizontal, parent, name),
    m_playingItem(0), m_searchWidget(0), m_dynamicList(0), m_restore(restore), 
    m_nextPlaylistItem(0)
59
{
60 61 62 63 64 65 66 67
    if(!m_mediaExtensions && !m_listExtensions) {
	m_mediaExtensions = new QStringList();
	m_listExtensions = new QStringList();

	m_mediaExtensions->append("mp3");
	m_mediaExtensions->append("ogg");
	m_listExtensions->append("m3u");
    }
68 69 70

    setupLayout();
    readConfig();
71 72

    m_editor->slotUpdateCollection();
73
}
74

75
PlaylistSplitter::~PlaylistSplitter()
76
{
Scott Wheeler's avatar
Scott Wheeler committed
77
    delete m_dirWatch;
78
    saveConfig();
79 80
}

81
QString PlaylistSplitter::uniquePlaylistName(const QString &startingWith, bool useParenthesis)
82
{
83
    if(!m_playlistBox)
84
	return QString::null;
85

86
    QStringList names = m_playlistBox->names();
87 88 89 90 91 92

    int playlistNumber = 1;

    // while the list contains more than zero instances of the generated 
    // string...

93 94 95 96
    if(useParenthesis) {
	while(names.contains(startingWith + " (" + QString::number(playlistNumber) + ")") != 0)
	    playlistNumber++;
	
97
	return startingWith + " (" + QString::number(playlistNumber) + ")";	
98 99 100 101 102 103
    }
    else
    {
	while(names.contains(startingWith + ' ' + QString::number(playlistNumber)) != 0)
	    playlistNumber++;
	
104
	return startingWith + " " + QString::number(playlistNumber);
105
    }
106 107
}

108
QString PlaylistSplitter::playNextFile(bool random, bool loopPlaylist)
109
{
110 111
    PlaylistItem *i;

112 113 114
    // Four basic cases here:  (1) We've asked for a specific next item, (2) play
    // the item that's after the currently playing item, (3) play the selected 
    // item or (4) play the first item in the list.
115

116
    // (1) we've asked for a specific next item
117
    if(m_nextPlaylistItem && m_nextPlaylistItem != m_playingItem) {
118 119 120
        i = m_nextPlaylistItem;
        m_nextPlaylistItem = 0;
    }
121
    // (2) play the item after the currently selected item
122
    else if(m_playingItem) {
123 124
        Playlist *p = static_cast<Playlist *>(m_playingItem->listView());
        i = p->nextItem(m_playingItem, random);
125
        if(!i && loopPlaylist)
126
            i = static_cast<PlaylistItem *>(p->firstChild());
127
    }
128 129
    // (3) play the selected item
    else if(playlistSelection().size() > 0) {
130
        i = playlistSelection().first();
131 132
        if(!i)
            i = static_cast<PlaylistItem *>(visiblePlaylist()->firstChild());
133
    }
134 135 136
    // (4) play the first item in the list
    else
        i = static_cast<PlaylistItem *>(visiblePlaylist()->firstChild());
137

138
    return play(i);
139 140
}

141
QString PlaylistSplitter::playPreviousFile(bool random)
142
{
143
    if(!m_playingItem)
144
	return QString::null;
145

146 147
    Playlist *p = static_cast<Playlist *>(m_playingItem->listView());
    PlaylistItem *i = p->previousItem(m_playingItem, random);
148

149
    return play(i);
150 151
}

152 153 154 155 156 157 158 159
QString PlaylistSplitter::playSelectedFile()
{
    if(playlistSelection().isEmpty())
	return QString::null;
    else
	return play(playlistSelection().first());
}

160 161 162 163
QString PlaylistSplitter::playFirstFile()
{
    Playlist *p = visiblePlaylist();
    PlaylistItem *i = static_cast<PlaylistItem *>(p->firstChild());
164

165
    return play(i);
166 167
}

168 169
void PlaylistSplitter::stop()
{
170 171
    m_nextPlaylistItem = 0;

172 173 174 175 176
    if(!m_playingItem)
	return;

    Playlist *p = static_cast<Playlist *>(m_playingItem->listView());

177 178 179
    if(p)
	p->setPlaying(m_playingItem, false);

180
    m_playingItem = 0;
181 182 183 184
}

QString PlaylistSplitter::playingArtist() const
{
185 186
    if(m_playingItem)
	return m_playingItem->text(PlaylistItem::ArtistColumn);
187
    else
188
	return QString::null;
189 190 191 192
}

QString PlaylistSplitter::playingTrack() const
{
193 194
    if(m_playingItem)
	return m_playingItem->text(PlaylistItem::TrackColumn);
195
    else
196
	return QString::null;
197 198 199 200
}

QString PlaylistSplitter::playingList() const
{
201 202
    if(m_playingItem)
	return static_cast<Playlist *>(m_playingItem->listView())->name();
203
    else
204
	return QString::null;
205 206
}

207
QString PlaylistSplitter::extensionsString(const QStringList &extensions, const QString &type) // static
208
{
209 210 211 212 213 214 215 216 217 218 219 220
    QStringList l;

    for(QStringList::ConstIterator it = extensions.begin(); it != extensions.end(); ++it)
	l.append(QString("*." + (*it)));

    // i.e. "*.m3u, *.mp3|Media Files"

    QString s = l.join(" ");

    if(type != QString::null)
	s += "|" + type + " (" + l.join(", ") + ")";

221
    return s;
222 223
}

224 225
void PlaylistSplitter::open(const QString &file) 
{
226 227 228
    if(file.isEmpty())
	return;

229
    if(visiblePlaylist() == m_collection || 
230 231 232 233 234 235
       KMessageBox::questionYesNo(this, 
				  i18n("Do you want to add this item to the current list or to the collection list?"), 
				  QString::null, 
				  KGuiItem(i18n("Current")), 
				  KGuiItem(i18n("Collection"))) == KMessageBox::No)
    {
236
	slotAddToPlaylist(file, m_collection);
237
    }
238
    else
239
	slotAddToPlaylist(file, visiblePlaylist());
240 241 242 243
}

void PlaylistSplitter::open(const QStringList &files) 
{
244 245 246
    if(files.isEmpty())
	return;
    
247
    if(visiblePlaylist() == m_collection || 
248 249 250 251 252 253
       KMessageBox::questionYesNo(this, 
				  i18n("Do you want to add these items to the current list or to the collection list?"), 
				  QString::null, 
				  KGuiItem(i18n("Current")), 
				  KGuiItem(i18n("Collection"))) == KMessageBox::No) 
    {
254
	slotAddToPlaylist(files, m_collection);
255
    }
256
    else
257
	slotAddToPlaylist(files, visiblePlaylist());
258 259 260 261
}

Playlist *PlaylistSplitter::createPlaylist(const QString &name)
{
262
    Playlist *p = new Playlist(m_playlistStack, name.latin1());
263 264
    setupPlaylist(p, true);
    return p;
265 266
}

267 268 269 270
////////////////////////////////////////////////////////////////////////////////
// public slots
////////////////////////////////////////////////////////////////////////////////

271
void PlaylistSplitter::slotOpen()
272
{
273 274
    QStringList files = KFileDialog::getOpenFileNames(
	QString::null, extensionsString((*m_mediaExtensions + *m_listExtensions), i18n("Media Files")));
275 276 277
    open(files);
}

278
void PlaylistSplitter::slotOpenDirectory()
279
{ 
280
    DirectoryList *l = new DirectoryList(m_directoryList, this, "directoryList");
281

282
    m_directoryQueue.clear();
283
    m_directoryQueueRemove.clear();
284

285 286 287 288
    connect(l, SIGNAL(signalDirectoryAdded(const QString &)), 
	    this, SLOT(slotQueueDirectory(const QString &)));
    connect(l, SIGNAL(signalDirectoryRemoved(const QString &)), 
	    this, SLOT(slotQueueDirectoryRemove(const QString &)));
289 290

    if(l->exec() == QDialog::Accepted) {
291
	open(m_directoryQueue);
292 293 294
	for(QStringList::Iterator it = m_directoryQueue.begin(); it !=  m_directoryQueue.end(); it++)
	    m_dirWatch->addDir(*it, false, true);
	    
295
	m_directoryList += m_directoryQueue;
296 297 298

	QStringList::Iterator it = m_directoryQueueRemove.begin();
	for(; it !=  m_directoryQueueRemove.end(); it++) {
299
	    m_dirWatch->removeDir(*it);
300
	    m_directoryList.remove(*it);
301
	}
302 303
    }
}
304

305
Playlist *PlaylistSplitter::slotCreatePlaylist()
306 307 308
{
    bool ok;

309
    // If this text is changed, please also change it in PlaylistBox::duplicate().
310

Nadeem Hasan's avatar
Nadeem Hasan committed
311 312 313
    QString name = KLineEditDlg::getText(i18n("Create New Playlist"), 
	i18n("Please enter a name for the new playlist:"),
	uniquePlaylistName(), &ok);
314
    if(ok)
315
	return createPlaylist(name);
316
    else
317
	return 0;
318 319
}

320
void PlaylistSplitter::slotSelectPlaying()
321
{
322
    if(!m_playingItem)
323 324
	return;

325
    Playlist *l = static_cast<Playlist *>(m_playingItem->listView());
326
	
327 328
    if(!l)
	return;
329

330
    l->clearSelection();
331 332
    l->setSelected(m_playingItem, true);
    l->ensureItemVisible(m_playingItem);
Nadeem Hasan's avatar
Nadeem Hasan committed
333

334 335
    if(l != visiblePlaylist())
	m_playlistBox->raise(l);
336 337
}

338
void PlaylistSplitter::slotDeleteSelectedItems()
339 340 341
{
    Playlist *p = visiblePlaylist();
    if(p)
342
	p->slotDeleteSelectedItems();
343 344
}

345 346 347 348 349
void PlaylistSplitter::slotAddToPlaylist(const QString &file, Playlist *list)
{
    KApplication::setOverrideCursor(Qt::waitCursor);
    addImpl(file, list);
    KApplication::restoreOverrideCursor();
Nadeem Hasan's avatar
Nadeem Hasan committed
350

351 352 353 354 355 356 357 358 359 360 361 362 363 364 365
    if(m_editor)
	m_editor->slotUpdateCollection();
}

void PlaylistSplitter::slotAddToPlaylist(const QStringList &files, Playlist *list)
{
    KApplication::setOverrideCursor(Qt::waitCursor);
    for(QStringList::ConstIterator it = files.begin(); it != files.end(); ++it)
        addImpl(*it, list);
    KApplication::restoreOverrideCursor();

    if(m_editor)
	m_editor->slotUpdateCollection();
}

366 367 368 369 370 371 372
void PlaylistSplitter::slotGuessTagInfo()
{
    visiblePlaylist()->slotGuessTagInfo();
    if(m_editor)
        m_editor->slotRefresh();
}

373 374 375 376 377 378 379
void PlaylistSplitter::slotRenameFile()
{
    visiblePlaylist()->slotRenameFile();
    if(m_editor)
        m_editor->slotRefresh();
}

380 381 382 383 384 385
////////////////////////////////////////////////////////////////////////////////
// private members
////////////////////////////////////////////////////////////////////////////////

void PlaylistSplitter::setupLayout()
{
386
    m_playlistBox = new PlaylistBox(this, "playlistBox");
387 388 389 390 391 392

    // Create a splitter to go between the playlists and the editor.

    QSplitter *editorSplitter = new QSplitter(Qt::Vertical, this, "editorSplitter");

    // Create the playlist and the editor.
393
    
394 395
    m_playlistStack = new QWidgetStack(editorSplitter, "playlistStack");
    m_editor = new TagEditor(editorSplitter, "tagEditor");
396 397 398

    // Make the editor as small as possible (or at least as small as recommended)

399
    editorSplitter->setResizeMode(m_editor, QSplitter::FollowSizeHint);
400 401 402 403

    // Make the connection that will update the selected playlist when a 
    // selection is made in the playlist box.

404 405
    connect(m_playlistBox, SIGNAL(signalCurrentChanged(const PlaylistList &)), 
	    this, SLOT(slotChangePlaylist(const PlaylistList &)));
406

407
    connect(m_playlistBox, SIGNAL(signalDoubleClicked()), this, SIGNAL(signalListBoxDoubleClicked()));
408 409 410 411

    // Create the collection list; this should always exist.  This has a 
    // slightly different creation process than normal playlists (since it in
    // fact is a subclass) so it is created here rather than by using 
412
    // slotCreatePlaylist().
413

414
    CollectionList::initialize(m_playlistStack, m_restore);
415 416
    m_collection = CollectionList::instance();
    setupPlaylist(m_collection, true, "folder_sound");
417
    connect(m_collection, SIGNAL(signalCollectionChanged()), m_editor, SLOT(slotUpdateCollection()));
418 419
    connect(m_collection, SIGNAL(signalRequestPlaylistCreation(const PlaylistItemList &)), 
	    this, SLOT(slotCreatePlaylist(const PlaylistItemList &)));
420

421 422 423 424 425 426 427 428 429

    // Create the search widget -- this must be done after the CollectionList is created.
    m_searchWidget = new SearchWidget(editorSplitter, CollectionList::instance(), "searchWidget");
    editorSplitter->moveToFirst(m_searchWidget);
    connect(m_searchWidget, SIGNAL(signalQueryChanged(const QString &, bool)),
	    this, SLOT(slotShowSearchResults(const QString &, bool)));
    connect(CollectionList::instance(), SIGNAL(signalVisibleColumnsChanged()),
	    this, SLOT(slotVisibleColumnsChanged()));

430
    // Show the collection on startup.
431
    m_playlistBox->setSelected(0, true);
432 433 434 435
}

void PlaylistSplitter::readConfig()
{
436 437 438 439
    KConfig *config = KGlobal::config();
    { // block for Playlists group
	KConfigGroupSaver saver(config, "Playlists");

440 441 442 443 444 445 446
	QValueList<int> splitterSizes = config->readIntListEntry("PlaylistSplitterSizes");
	if(splitterSizes.isEmpty()) {
	    splitterSizes.append(100);
	    splitterSizes.append(640);
	}
	setSizes(splitterSizes);
	
447
	if(m_restore) {
448 449 450 451

	    QString playlistsFile = KGlobal::dirs()->saveLocation("appdata") + "playlists";

	    QFile f(playlistsFile);
Nadeem Hasan's avatar
Nadeem Hasan committed
452

453 454 455
	    if(f.open(IO_ReadOnly)) {
		QDataStream s(&f);
		while(!s.atEnd()) {
456
		    Playlist *p = new Playlist(m_playlistStack);
457 458 459 460
		    s >> *p;

		    // check to see if we've alredy loaded this item before continuing

461
		    if(p->fileName().isEmpty() || !m_playlistFiles.insert(p->fileName()))
462 463 464 465
			setupPlaylist(p);
		    else
			delete p;
		}
466
	    }
467

468
	    m_directoryList = config->readListEntry("DirectoryList");
469
	    QTimer::singleShot(0, this, SLOT(slotScanDirectories()));
470 471

	    m_dirWatch = new KDirWatch();
472 473
	    connect(m_dirWatch, SIGNAL(dirty(const QString &)), 
		    this, SLOT(slotDirChanged(const QString &)));
474

475 476
	    QStringList::Iterator it = m_directoryList.begin();
            for(; it != m_directoryList.end(); ++it)
477 478 479
		m_dirWatch->addDir(*it, false, true);

	    m_dirWatch->startScan();
480
	}
481 482 483

	// restore the list of hidden and shown columns

484
	if(m_collection) {
485
	    for(int i = 0; i < m_collection->columns(); i++)
486
		m_columnNames.append(m_collection->columnText(i));
487
	}
488

489
    }
490
}
491 492 493 494

void PlaylistSplitter::saveConfig()
{
    KConfig *config = KGlobal::config();
495

496
    // Save the list of open playlists.
Nadeem Hasan's avatar
Nadeem Hasan committed
497

498
    if(m_restore && m_playlistBox) {
499 500 501

	// Start at item 1.  We want to skip the collection list.

502 503 504 505 506 507 508
	QString playlistsFile = KGlobal::dirs()->saveLocation("appdata") + "playlists";
	QFile f(playlistsFile);
	
	if(f.open(IO_WriteOnly)) {

	    QDataStream s(&f);

509
	    PlaylistList l = m_playlistBox->playlists();
510

511 512
	    for(PlaylistList::Iterator it = l.begin(); it != l.end(); it++)
		s << *(*it);
513

514
	    f.close();
515 516 517
	}
	{ // block for Playlists group
	    KConfigGroupSaver saver(config, "Playlists");
518
	    config->writeEntry("DirectoryList", m_directoryList);
519
	    config->writeEntry("SortColumn", m_collection->sortColumn());
520
	    config->writeEntry("PlaylistSplitterSizes", sizes());
521 522
	}
    }
523 524
}

525 526 527 528 529 530 531 532 533 534 535 536 537
void PlaylistSplitter::addImpl(const QString &file, Playlist *list)
{
    processEvents();
    QFileInfo fileInfo(QDir::cleanDirPath(file));
    if(fileInfo.exists()) {
        if(fileInfo.isDir()) {
            QDir dir(fileInfo.filePath());
            QStringList dirContents=dir.entryList();
            for(QStringList::Iterator it = dirContents.begin(); it != dirContents.end(); ++it)
                if(*it != "." && *it != "..")
                    addImpl(fileInfo.filePath() + QDir::separator() + *it, list);
        }
        else {
538
            QString extension = fileInfo.extension(false).lower();
539
            if(m_mediaExtensions->contains(extension) > 0)
540
		list->createItem(fileInfo);
541
	    else if(m_listExtensions->contains(extension) > 0)
542 543
		openPlaylist(fileInfo.absFilePath());
        }
Nadeem Hasan's avatar
Nadeem Hasan committed
544
    }
545 546
}

547
void PlaylistSplitter::setupPlaylist(Playlist *p, bool raise, const char *icon)
548
{
549 550 551 552 553 554 555 556 557 558 559 560
    connect(p, SIGNAL(signalSelectionChanged(const PlaylistItemList &)),
	    m_editor, SLOT(slotSetItems(const PlaylistItemList &)));
    connect(p, SIGNAL(signalDoubleClicked()),
	    this, SIGNAL(signalDoubleClicked()));
    connect(p, SIGNAL(signalNumberOfItemsChanged(Playlist *)),
	    this, SLOT(slotPlaylistCountChanged(Playlist *)));
    connect(p, SIGNAL(signalAboutToRemove(PlaylistItem *)), 
	    this, SLOT(slotPlaylistItemRemoved(PlaylistItem *)));
    connect(p, SIGNAL(signalFilesDropped(const QStringList &, Playlist *)), 
	    this, SLOT(slotAddToPlaylist(const QStringList &, Playlist *)));
    connect(p, SIGNAL(signalSetNext(PlaylistItem *)),
	    this, SLOT(slotSetNextItem(PlaylistItem *)));
561

562 563
    if(icon)
	m_playlistBox->createItem(p, icon, raise);
564

565
    if(raise)
566
	m_playlistStack->raiseWidget(p);
567 568
}

569 570 571
Playlist *PlaylistSplitter::openPlaylist(const QString &file)
{
    QFileInfo fileInfo(file);
572 573 574 575 576
    if(!fileInfo.exists() || 
       !fileInfo.isFile() || 
       !fileInfo.isReadable() || 
       m_playlistFiles.insert(fileInfo.absFilePath()))
    {
577
	return 0;
578
    }
579

580
    Playlist *p = new Playlist(file, m_playlistStack, fileInfo.baseName(true).latin1());
581
    setupPlaylist(p);
582
    return p;
583 584
}

585 586 587 588 589 590 591
QString PlaylistSplitter::play(PlaylistItem *item)
{
    stop();

    if(!item)
	return QString::null;

592 593 594 595
    Playlist *p = static_cast<Playlist *>(item->listView());

    p->setPlaying(item, true);

596 597 598 599 600
    m_playingItem = item;

    return item->absFilePath();
}

601 602 603 604
////////////////////////////////////////////////////////////////////////////////
// private slots
////////////////////////////////////////////////////////////////////////////////

605
void PlaylistSplitter::slotChangePlaylist(const PlaylistList &l)
606
{
607
    if(l.isEmpty())
608
	return;
609

610 611
    Playlist *current = m_dynamicList;

612 613
    if(m_searchWidget)
	m_searchWidget->clear();
614 615

    m_nextPlaylistItem = 0;
616 617 618 619 620 621 622 623 624 625 626 627 628
    if(l.count() == 1) {
	m_playlistStack->raiseWidget(l.first());
	m_editor->slotSetItems(playlistSelection());
	m_dynamicList = 0;
	emit signalPlaylistChanged();
    }
    else {
	m_dynamicList = new Playlist(m_playlistStack, i18n("Dynamic List"));
	setupPlaylist(m_dynamicList, true, 0);
	// unsorted...
	m_dynamicList->setSorting(m_dynamicList->columns() + 1);

	for(PlaylistList::ConstIterator it = l.begin(); it != l.end(); ++it) {
629 630
	    if(*it)
		m_dynamicList->createItems((*it)->items());
631 632 633 634 635
	}
    }

    if(current)
	delete current;
636 637
}

638
void PlaylistSplitter::slotPlaylistCountChanged(Playlist *p)
639
{
640 641
    if(p && p == m_playlistStack->visibleWidget())
	emit signalSelectedPlaylistCountChanged(p->childCount());
642 643
}

644
void PlaylistSplitter::slotPlaylistItemRemoved(PlaylistItem *item)
645
{
646 647
    if(item == m_playingItem)
	m_playingItem = 0;
648 649 650

    if(item == m_nextPlaylistItem)
	m_nextPlaylistItem = 0;
651 652
}

653
void PlaylistSplitter::slotCreatePlaylist(const PlaylistItemList &items)
654
{
655 656 657
    if(items.isEmpty())
	return;

658
    Playlist *playlist = slotCreatePlaylist();
659

660
    if(!playlist)
661
        return;
662

663
    playlist->createItems(items);
664 665
}

666 667 668 669 670 671 672 673 674 675
void PlaylistSplitter::slotShowSearchResults(const QString &query, bool caseSensitive)
{
    if(query.isEmpty()) {
	visiblePlaylist()->setItemsVisible(visiblePlaylist()->items(), true);
	return;
    }

    PlaylistList playlists;
    playlists.append(visiblePlaylist());

676
    PlaylistSearch::Component component(query, caseSensitive, m_searchWidget->searchedColumns(0));
677 678 679 680 681 682 683 684 685
    PlaylistSearch::ComponentList components;
    components.append(&component);

    PlaylistSearch search(playlists, components);

    Playlist::setItemsVisible(search.matchedItems(), true);    
    Playlist::setItemsVisible(search.unmatchedItems(), false);
}

686 687 688 689 690 691 692 693
void PlaylistSplitter::slotVisibleColumnsChanged()
{
    m_searchWidget->slotUpdateColumns();
    m_searchWidget->slotQueryChanged();
    if(m_searchWidget->searchedColumns(0).count() > 1)
	slotShowSearchResults(m_searchWidget->query(), m_searchWidget->caseSensitive());
}

694
#include "playlistsplitter.moc"
Nadeem Hasan's avatar
Nadeem Hasan committed
695 696

// vim:ts=8