Commit abff17f4 authored by Scott Wheeler's avatar Scott Wheeler

Return the playlist name along with the other data.

svn path=/trunk/kdemultimedia/juk/; revision=241058
parent 99783134
......@@ -36,7 +36,9 @@
// public methods
////////////////////////////////////////////////////////////////////////////////
AdvancedSearchDialog::AdvancedSearchDialog(QWidget *parent, const char *name) :
AdvancedSearchDialog::AdvancedSearchDialog(const QString &defaultName,
QWidget *parent,
const char *name) :
KDialogBase(parent, name, true, i18n("Create Search Playlist"), Ok|Cancel)
{
makeVBoxMainWidget();
......@@ -45,7 +47,7 @@ AdvancedSearchDialog::AdvancedSearchDialog(QWidget *parent, const char *name) :
box->setSpacing(5);
new QLabel(i18n("Playlist name:"), box);
new KLineEdit(box);
m_playlistNameLineEdit = new KLineEdit(defaultName, box);
QVGroupBox *criteriaGroupBox = new QVGroupBox(i18n("Search Criteria"), mainWidget());
......@@ -105,6 +107,8 @@ void AdvancedSearchDialog::accept()
PlaylistSearch::SearchMode m = PlaylistSearch::SearchMode(!m_matchAnyButton->isChecked());
m_search.setSearchMode(m);
m_playlistName = m_playlistNameLineEdit->text();
KDialogBase::accept();
}
......
......@@ -22,6 +22,7 @@
#include "playlistsearch.h"
class KLineEdit;
class QGroupBox;
class QRadioButton;
class SearchLine;
......@@ -35,9 +36,13 @@ public:
{
DialogCode result;
PlaylistSearch search;
QString playlistName;
};
AdvancedSearchDialog(QWidget *parent = 0, const char *name = 0);
AdvancedSearchDialog(const QString &defaultName,
QWidget *parent = 0,
const char *name = 0);
virtual ~AdvancedSearchDialog();
public slots:
......@@ -49,7 +54,9 @@ protected slots:
private:
QWidget *m_criteria;
PlaylistSearch m_search;
QString m_playlistName;
QValueList<SearchLine *> m_searchLines;
KLineEdit *m_playlistNameLineEdit;
QRadioButton *m_matchAnyButton;
QRadioButton *m_matchAllButton;
};
......
......@@ -399,7 +399,8 @@ void PlaylistSplitter::slotSetSearchVisible(bool visible)
void PlaylistSplitter::slotAdvancedSearch()
{
AdvancedSearchDialog *d = new AdvancedSearchDialog(this);
AdvancedSearchDialog *d =
new AdvancedSearchDialog(uniquePlaylistName(i18n("Search Playlist")), this);
d->exec();
delete d;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment