add mp3 and ogg torrent url info to JamendoAlbum
[amarok.git] / src / editfilterdialog.h
blob5bf4c5fb0165cfaf12b529c3421a15d54a7d5f06
1 // (c) 2006 Giovanni Venturi <giovanni@kde-it.org>
2 // See COPYING file for licensing information.
4 #ifndef AMAROK_EDITFILTERDIALOG_H
5 #define AMAROK_EDITFILTERDIALOG_H
7 #include <KDialog>
9 #include <QList>
10 #include <QVector>
13 class Q3GroupBox;
14 class QCheckBox;
15 class QComboBox;
16 class QLabel;
17 class QRadioButton;
18 class QSpinBox;
19 class QStringList;
20 class QVBoxLayout;
21 class QWidget;
23 class KLineEdit;
25 class EditFilterDialog : public KDialog
27 Q_OBJECT
28 public:
29 EditFilterDialog( QWidget* parent, bool metaBundleKeywords, const QString &text = "" );
30 ~EditFilterDialog();
32 QString filter() const;
34 signals:
35 void filterChanged( const QString &filter );
37 private:
38 QVBoxLayout *m_mainLay;
40 QCheckBox *m_prefixNOT;
41 QComboBox *m_comboKeyword;
42 KLineEdit *m_editKeyword;
44 Q3GroupBox *m_groupBox;
46 QComboBox *m_comboCondition;
47 QLabel *m_filesizeLabel;
48 QComboBox *m_comboUnitSize;
50 QRadioButton *m_minMaxRadio;
51 QSpinBox *m_spinMin1, *m_spinMin2;
52 QLabel *m_andLabel;
53 QSpinBox *m_spinMax1, *m_spinMax2;
55 Q3GroupBox *m_groupBox2;
56 QRadioButton *m_checkALL;
57 QRadioButton *m_checkAtLeastOne;
58 QRadioButton *m_checkExactly;
59 QRadioButton *m_checkExclude;
60 QList<QRadioButton*> m_actionCheck;
62 Q3GroupBox *m_groupBox3;
63 QRadioButton *m_checkAND;
64 QRadioButton *m_checkOR;
66 bool m_appended; // true if a filter appended
67 int m_selectedIndex; // the position of the selected keyword in the combobox
68 QVector<QString> m_vector; // the vector of the amarok filter keyword
69 QString m_filterText; // the resulting filter string
70 QString m_previousFilterText; // the previous resulting filter string
71 QString m_strPrefixNOT; // is empty if no NOT prefix is needed else it's "-"
73 private:
74 void exclusiveSelectOf( int which );
75 QString keywordConditionString(const QString& keyword) const;
76 void setMinMaxValueSpins();
78 private slots:
79 void selectedKeyword(int index);
81 void minSpinChanged(int value);
82 void maxSpinChanged(int value);
84 void textWanted();
85 void textWanted( const QStringList &completions );
86 void valueWanted();
88 void chooseCondition(int index);
89 void chooseOneValue();
90 void chooseMinMaxValue();
92 void slotCheckAll();
93 void slotCheckAtLeastOne();
94 void slotCheckExactly();
95 void slotCheckExclude();
97 void slotCheckAND();
98 void slotCheckOR();
100 void assignPrefixNOT();
102 protected slots:
103 virtual void slotDefault();
104 virtual void slotUser1();
105 virtual void slotUser2();
106 virtual void slotOk();
109 #endif /* AMAROK_EDITFILTERDIALOG_H */