pqColorButtonEventTranslator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 #ifndef pqColorButtonEventTranslator_h
5 #define pqColorButtonEventTranslator_h
6 
7 #include "pqWidgetEventTranslator.h"
8 #include "pqWidgetsModule.h" // needed for EXPORT macro.
9 #include <QColor>
10 
16 class PQWIDGETS_EXPORT pqColorButtonEventTranslator : public pqWidgetEventTranslator
17 {
18  Q_OBJECT
19  typedef pqWidgetEventTranslator Superclass;
20 
21 public:
22  pqColorButtonEventTranslator(QObject* parent = nullptr);
23  ~pqColorButtonEventTranslator() override;
24 
28  using Superclass::translateEvent;
29  bool translateEvent(QObject* Object, QEvent* Event, bool& Error) override;
30 
31 private Q_SLOTS:
32  void onColorChosen(const QColor&);
33 
34 private: // NOLINT(readability-redundant-access-specifiers)
35  Q_DISABLE_COPY(pqColorButtonEventTranslator)
36 };
37 
38 #endif
pqColorButtonEventTranslator translates events on pqColorChooserButton or subclass so that they can b...
#define PQWIDGETS_EXPORT