view src/filterwidget.h @ 67:10569ebcf496

Added tag 0.9.2 for changeset 098a10fc2e83
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 22 May 2015 12:34:36 +0200
parents 098a10fc2e83
children 3916cb3c9105
line wrap: on
line source
#ifndef FILTERWIDGET_H
#define FILTERWIDGET_H
/* Copyright (C) 2015 by ETH Zürich
 * Software engineering by Intevation GmbH
 *
 * This file is Free Software under the GNU GPL (v>=2)
 * and comes with ABSOLUTELY NO WARRANTY!
 * See LICENSE.txt for details.
 */
#include <QWidget>
#include <QMap>

class QSortFilterProxyModel;
class QComboBox;
class QLineEdit;
/**
 * @class FilterWidget
 * @brief Generic Widget to apply a filter on SortFilterProxymodel
 */
class FilterWidget: public QWidget
{
    Q_OBJECT

public:
    /**@brief construct a filterwidget for the model model.*/
    FilterWidget (QSortFilterProxyModel *model,
            QWidget * parent = 0, Qt::WindowFlags f = 0);

Q_SIGNALS:
    void filterHasChanged();

protected:
    void setupGUI();

protected slots:
    void headersChanged();

    void filterChanged();

private:
    QSortFilterProxyModel *mModel;
    QComboBox *mCombo;
    QLineEdit *mEditLine;
    /* Maps the combo index to the model col index */
    QMap<int, int> mColFilterMap;
};
#endif // FILTERWIDGET_H
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)