1*bb02e0acSNicolas Bonnefon /* 2*bb02e0acSNicolas Bonnefon * Copyright (C) 2009, 2010 Nicolas Bonnefon and other contributors 3*bb02e0acSNicolas Bonnefon * 4*bb02e0acSNicolas Bonnefon * This file is part of glogg. 5*bb02e0acSNicolas Bonnefon * 6*bb02e0acSNicolas Bonnefon * glogg is free software: you can redistribute it and/or modify 7*bb02e0acSNicolas Bonnefon * it under the terms of the GNU General Public License as published by 8*bb02e0acSNicolas Bonnefon * the Free Software Foundation, either version 3 of the License, or 9*bb02e0acSNicolas Bonnefon * (at your option) any later version. 10*bb02e0acSNicolas Bonnefon * 11*bb02e0acSNicolas Bonnefon * glogg is distributed in the hope that it will be useful, 12*bb02e0acSNicolas Bonnefon * but WITHOUT ANY WARRANTY; without even the implied warranty of 13*bb02e0acSNicolas Bonnefon * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*bb02e0acSNicolas Bonnefon * GNU General Public License for more details. 15*bb02e0acSNicolas Bonnefon * 16*bb02e0acSNicolas Bonnefon * You should have received a copy of the GNU General Public License 17*bb02e0acSNicolas Bonnefon * along with glogg. If not, see <http://www.gnu.org/licenses/>. 18*bb02e0acSNicolas Bonnefon */ 19*bb02e0acSNicolas Bonnefon 20*bb02e0acSNicolas Bonnefon #ifndef FILTERSDIALOG_H 21*bb02e0acSNicolas Bonnefon #define FILTERSDIALOG_H 22*bb02e0acSNicolas Bonnefon 23*bb02e0acSNicolas Bonnefon #include <QDialog> 24*bb02e0acSNicolas Bonnefon 25*bb02e0acSNicolas Bonnefon #include "filterset.h" 26*bb02e0acSNicolas Bonnefon #if QT_VERSION > 0x040400 27*bb02e0acSNicolas Bonnefon #include "ui_filtersdialog.h" 28*bb02e0acSNicolas Bonnefon #else 29*bb02e0acSNicolas Bonnefon #include "ui_filtersdialog_old.h" 30*bb02e0acSNicolas Bonnefon #endif 31*bb02e0acSNicolas Bonnefon 32*bb02e0acSNicolas Bonnefon class FiltersDialog : public QDialog, public Ui::FiltersDialog 33*bb02e0acSNicolas Bonnefon { 34*bb02e0acSNicolas Bonnefon Q_OBJECT 35*bb02e0acSNicolas Bonnefon 36*bb02e0acSNicolas Bonnefon public: 37*bb02e0acSNicolas Bonnefon FiltersDialog( QWidget* parent = 0 ); 38*bb02e0acSNicolas Bonnefon 39*bb02e0acSNicolas Bonnefon signals: 40*bb02e0acSNicolas Bonnefon // Is emitted when new settings must be used 41*bb02e0acSNicolas Bonnefon void optionsChanged(); 42*bb02e0acSNicolas Bonnefon 43*bb02e0acSNicolas Bonnefon private slots: 44*bb02e0acSNicolas Bonnefon void on_addFilterButton_clicked(); 45*bb02e0acSNicolas Bonnefon void on_removeFilterButton_clicked(); 46*bb02e0acSNicolas Bonnefon void on_buttonBox_clicked( QAbstractButton* button ); 47*bb02e0acSNicolas Bonnefon void on_upFilterButton_clicked(); 48*bb02e0acSNicolas Bonnefon void on_downFilterButton_clicked(); 49*bb02e0acSNicolas Bonnefon // Update the property (pattern, color...) fields from the 50*bb02e0acSNicolas Bonnefon // selected Filter. 51*bb02e0acSNicolas Bonnefon void updatePropertyFields(); 52*bb02e0acSNicolas Bonnefon // Update the selected Filter from the values in the property fields. 53*bb02e0acSNicolas Bonnefon void updateFilterProperties(); 54*bb02e0acSNicolas Bonnefon 55*bb02e0acSNicolas Bonnefon private: 56*bb02e0acSNicolas Bonnefon // Temporary filterset modified by the dialog 57*bb02e0acSNicolas Bonnefon // it is copied from the one in Config() 58*bb02e0acSNicolas Bonnefon FilterSet filterSet; 59*bb02e0acSNicolas Bonnefon 60*bb02e0acSNicolas Bonnefon // Index of the row currently selected or -1 if none. 61*bb02e0acSNicolas Bonnefon int selectedRow_; 62*bb02e0acSNicolas Bonnefon 63*bb02e0acSNicolas Bonnefon void populateColors(); 64*bb02e0acSNicolas Bonnefon void populateFilterList(); 65*bb02e0acSNicolas Bonnefon }; 66*bb02e0acSNicolas Bonnefon 67*bb02e0acSNicolas Bonnefon #endif 68