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
25 class EditFilterDialog
: public KDialog
29 EditFilterDialog( QWidget
* parent
, bool metaBundleKeywords
, const QString
&text
= "" );
32 QString
filter() const;
35 void filterChanged( const QString
&filter
);
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
;
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 "-"
74 void exclusiveSelectOf( int which
);
75 QString
keywordConditionString(const QString
& keyword
) const;
76 void setMinMaxValueSpins();
79 void selectedKeyword(int index
);
81 void minSpinChanged(int value
);
82 void maxSpinChanged(int value
);
85 void textWanted( const QStringList
&completions
);
88 void chooseCondition(int index
);
89 void chooseOneValue();
90 void chooseMinMaxValue();
93 void slotCheckAtLeastOne();
94 void slotCheckExactly();
95 void slotCheckExclude();
100 void assignPrefixNOT();
103 virtual void slotDefault();
104 virtual void slotUser1();
105 virtual void slotUser2();
106 virtual void slotOk();
109 #endif /* AMAROK_EDITFILTERDIALOG_H */