Isis 3 Programmer Reference
AbstractFilterSelector.h
1 #ifndef AbstractFilterSelector_H
2 #define AbstractFilterSelector_H
3 
4 
5 // parent
6 #include <QWidget>
7 
8 // included because they are needed inside a templated method
9 #include "AbstractFilter.h"
10 
11 
12 class QComboBox;
13 class QHBoxLayout;
14 class QPushButton;
15 class QReadWriteLock;
16 
17 namespace Isis {
18  class ControlNet;
19  class ControlMeasure;
20  class ControlPoint;
21 
39  Q_OBJECT
40 
41  signals:
42  void close(AbstractFilterSelector *);
43  void filterChanged();
44  void sizeChanged();
45 
46 
47  public:
49  virtual ~AbstractFilterSelector();
50 
51  template< typename Evaluatable >
52  bool evaluate(const Evaluatable *evaluatable) const {
53  return m_filter && m_filter->evaluate(evaluatable);
54  }
55 
56  bool hasFilter() const;
57  bool hasFilter(bool (AbstractFilter:: *)() const) const;
58 
59  QString getDescription(QString(AbstractFilter:: *)() const) const;
60 
61  AbstractFilterSelector &operator=(const AbstractFilterSelector &other);
62 
63 
64  public slots:
65  void sendClose();
66 
67 
68  protected:
69  void nullify();
70  virtual void createSelector();
71  QComboBox *getSelector() const;
72  QHBoxLayout *getMainLayout() const;
73  AbstractFilter *getFilter() const;
74  void setFilter(AbstractFilter *);
75 
76 
77  protected slots:
78  virtual void changeFilter(int index) = 0;
79  virtual void deleteFilter();
80 
81 
82  // disable copying of this class which can't exist anyway ....uhhuh...yeah
83  private:
85 
86 
87  private:
88  QComboBox *m_selector;
89  QHBoxLayout *m_mainLayout;
90  QPushButton *m_closeButton;
91  AbstractFilter *m_filter;
92  };
93 }
94 
95 #endif
Base class for filter selectors.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Base class for control net filters.