advancedsearchdialog.h 2.1 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>
Laurent Montel's avatar
Laurent Montel committed
20 21
//Added by qt3to4:
#include <Q3ValueList>
Tim Beaulen's avatar
Tim Beaulen committed
22
#include "searchwidget.h"
23

24
class KLineEdit;
25
class KPushButton;
Laurent Montel's avatar
Laurent Montel committed
26
class Q3GroupBox;
27
class QRadioButton;
28

Tim Beaulen's avatar
Tim Beaulen committed
29 30

class AdvancedSearchDialog : public KDialog
31
{
32 33
    Q_OBJECT

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

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

47 48
    virtual ~AdvancedSearchDialog();

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

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

58
private:
59 60
    void updateButtons();

61
    QWidget *m_criteria;
62
    PlaylistSearch m_search;
63
    QString m_playlistName;
Laurent Montel's avatar
Laurent Montel committed
64
    Q3ValueList<SearchLine *> m_searchLines;
65
    KLineEdit *m_playlistNameLineEdit;
66 67
    QRadioButton *m_matchAnyButton;
    QRadioButton *m_matchAllButton;
68 69
    KPushButton *m_moreButton;
    KPushButton *m_fewerButton;
70 71 72
};

#endif
73 74

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