Changeset 14392 for trunk/qt/filterbar.h


Ignore:
Timestamp:
Dec 21, 2014, 3:34:52 PM (8 years ago)
Author:
mikedld
Message:

Move filter text clearing button into line edit. Use Qt-provided button on Qt 5.2+.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/filterbar.h

    r14241 r14392  
    1313#include <QComboBox>
    1414#include <QItemDelegate>
     15#include <QLineEdit>
    1516#include <QWidget>
    1617
     
    5758};
    5859
     60class FilterBarLineEdit: public QLineEdit
     61{
     62    Q_OBJECT
     63
     64  public:
     65    FilterBarLineEdit (QWidget * parent = 0);
     66
     67  protected:
     68    virtual void resizeEvent (QResizeEvent * event);
     69
     70  private slots:
     71    void updateClearButtonVisibility ();
     72
     73  private:
     74    QToolButton * myClearButton;
     75};
    5976
    6077class FilterBar: public QWidget
     
    83100    QTimer * myRecountTimer;
    84101    bool myIsBootstrapping;
    85     QLineEdit * myLineEdit;
     102    FilterBarLineEdit * myLineEdit;
    86103
    87104  private slots:
Note: See TracChangeset for help on using the changeset viewer.