pqColorDialogEventTranslator.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 pqColorDialogEventTranslator_h
5 #define pqColorDialogEventTranslator_h
6 
7 #include "pqWidgetEventTranslator.h"
8 #include "pqWidgetsModule.h" // needed for EXPORT macro.
9 #include <QColor>
10 
15 class PQWIDGETS_EXPORT pqColorDialogEventTranslator : public pqWidgetEventTranslator
16 {
17  Q_OBJECT
18  typedef pqWidgetEventTranslator Superclass;
19 
20 public:
21  pqColorDialogEventTranslator(QObject* parent = nullptr);
22  ~pqColorDialogEventTranslator() override;
23 
27  using Superclass::translateEvent;
28  bool translateEvent(QObject* Object, QEvent* Event, bool& Error) override;
29 
30 private Q_SLOTS:
31  void onColorChosen(const QColor&);
32  void onFinished(int);
33 
34 private: // NOLINT(readability-redundant-access-specifiers)
35  Q_DISABLE_COPY(pqColorDialogEventTranslator)
36 };
37 
38 #endif
#define PQWIDGETS_EXPORT
pqColorDialogEventTranslator translates events on QColorDialog that they can be recorded in tests in ...