diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2020-05-05 08:24:07 +0200 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2020-05-05 08:31:33 +0200 |
commit | 0b786367b18f7583ae340125e52b043f833da5ce (patch) | |
tree | 4d83190083a14f5775514409eb6f2bdeeb833383 /src | |
parent | 8a75a61f0ef8bced0d705fee27fbee2f04c7106a (diff) |
Hide internal state type
Diffstat (limited to 'src')
-rw-r--r-- | src/widget/wsearchlineedit.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/widget/wsearchlineedit.h b/src/widget/wsearchlineedit.h index 5b6d507f21..d81d1ff04c 100644 --- a/src/widget/wsearchlineedit.h +++ b/src/widget/wsearchlineedit.h @@ -13,11 +13,6 @@ class SkinContext; class WSearchLineEdit : public QLineEdit, public WBaseWidget { Q_OBJECT public: - enum class State { - Active, - Inactive, - }; - // Delay for triggering a search while typing static constexpr int kMinDebouncingTimeoutMillis = 100; static constexpr int kDefaultDebouncingTimeoutMillis = 300; @@ -27,10 +22,6 @@ class WSearchLineEdit : public QLineEdit, public WBaseWidget { // placeholder text Q_PROPERTY(bool active READ isActive); - bool isActive() const { - return m_state == State::Active ? true : false; - } - // TODO(XXX): Replace with a public slot static void setDebouncingTimeoutMillis(int debouncingTimeoutMillis); @@ -71,7 +62,6 @@ class WSearchLineEdit : public QLineEdit, public WBaseWidget { // configuration value changes. static int s_debouncingTimeoutMillis; - void switchState(State state); void updateEditBox(const QString& text); void refreshEditBox(); @@ -95,5 +85,15 @@ class WSearchLineEdit : public QLineEdit, public WBaseWidget { QTimer m_debouncingTimer; + enum class State { + Active, + Inactive, + }; State m_state; + + void switchState(State state); + + bool isActive() const { + return m_state == State::Active ? true : false; + } }; |