Isis 3 Programmer Reference
AbstractFilterSelector.h
1#ifndef AbstractFilterSelector_H
2#define AbstractFilterSelector_H
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12
13// parent
14#include <QWidget>
15
16// included because they are needed inside a templated method
17#include "AbstractFilter.h"
18
19
20class QComboBox;
21class QHBoxLayout;
22class QPushButton;
23class QReadWriteLock;
24
25namespace Isis {
26 class ControlNet;
27 class ControlMeasure;
28 class ControlPoint;
29
47 Q_OBJECT
48
49 signals:
50 void close(AbstractFilterSelector *);
51 void filterChanged();
52 void sizeChanged();
53
54
55 public:
58
59 template< typename Evaluatable >
60 bool evaluate(const Evaluatable *evaluatable) const {
61 return m_filter && m_filter->evaluate(evaluatable);
62 }
63
64 bool hasFilter() const;
65 bool hasFilter(bool (AbstractFilter:: *)() const) const;
66
67 QString getDescription(QString(AbstractFilter:: *)() const) const;
68
69 AbstractFilterSelector &operator=(const AbstractFilterSelector &other);
70
71
72 public slots:
73 void sendClose();
74
75
76 protected:
77 void nullify();
78 virtual void createSelector();
79 QComboBox *getSelector() const;
80 QHBoxLayout *getMainLayout() const;
81 AbstractFilter *getFilter() const;
82 void setFilter(AbstractFilter *);
83
84
85 protected slots:
86 virtual void changeFilter(int index) = 0;
87 virtual void deleteFilter();
88
89
90 // disable copying of this class which can't exist anyway ....uhhuh...yeah
91 private:
93
94
95 private:
96 QComboBox *m_selector;
97 QHBoxLayout *m_mainLayout;
98 QPushButton *m_closeButton;
99 AbstractFilter *m_filter;
100 };
101}
102
103#endif
Base class for control net filters.
Base class for filter selectors.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16