advancedsearchdialog.h 2.08 KB
Newer Older
1 2
/***************************************************************************
    begin                : Thu Jul 31 00:31:51 2003
3
    copyright            : (C) 2003 - 2004 by Scott Wheeler
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
    email                : wheeler@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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef ADVANCEDSEARCHDIALOG_H
#define ADVANCEDSEARCHDIALOG_H

Tim Beaulen's avatar
Tim Beaulen committed
19
#include <kdialog.h>
20
#include <QList>
21 22

#include "playlistsearch.h"
23

24
class KLineEdit;
25
class KPushButton;
26
class QRadioButton;
27
class SearchLine;
Tim Beaulen's avatar
Tim Beaulen committed
28 29

class AdvancedSearchDialog : public KDialog
30
{
31 32
    Q_OBJECT

33
public:
34 35 36 37
    struct Result
    {
        DialogCode result;
        PlaylistSearch search;
38
        QString playlistName;
39 40
    };

41
    explicit AdvancedSearchDialog(const QString &defaultName,
42
                         const PlaylistSearch &defaultSearch = PlaylistSearch(),
43 44 45
                         QWidget *parent = 0,
                         const char *name = 0);

46 47
    virtual ~AdvancedSearchDialog();

48 49 50 51 52
public slots:
    Result exec();

protected slots:
    virtual void accept();
53
    virtual void clear();
54 55
    virtual void more();
    virtual void fewer();
56

57
private:
58 59
    void updateButtons();

60
    QWidget *m_criteria;
61
    PlaylistSearch m_search;
62
    QString m_playlistName;
63
    QList<SearchLine *> m_searchLines;
64
    KLineEdit *m_playlistNameLineEdit;
65 66
    QRadioButton *m_matchAnyButton;
    QRadioButton *m_matchAllButton;
67 68
    KPushButton *m_moreButton;
    KPushButton *m_fewerButton;
69 70 71
};

#endif
72 73

// vim: set et sw=4 tw=0 sta: