advancedsearchdialog.h 2.06 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>
Tim Beaulen's avatar
Tim Beaulen committed
21
#include "searchwidget.h"
22

23
class KLineEdit;
24
class KPushButton;
25
class QRadioButton;
26

Tim Beaulen's avatar
Tim Beaulen committed
27 28

class AdvancedSearchDialog : public KDialog
29
{
30 31
    Q_OBJECT

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

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

45 46
    virtual ~AdvancedSearchDialog();

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

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

56
private:
57 58
    void updateButtons();

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

#endif
71 72

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