pqColorChooserButtonWithPalettes.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 pqColorChooserButtonWithPalettes_h
5 #define pqColorChooserButtonWithPalettes_h
6 
7 #include "pqColorChooserButton.h"
8 #include "pqComponentsModule.h"
9 #include "vtkWeakPointer.h"
10 #include <QPointer>
11 
12 class QActionGroup;
13 class vtkSMSettingsProxy;
14 class vtkSMProxy;
15 
16 //============================================================================
36 {
37  Q_OBJECT
39 
40 public:
41  pqColorChooserButtonWithPalettes(QWidget* parent = nullptr);
43 
44 private Q_SLOTS:
49  void updateMenu();
50 
54  void actionTriggered(QAction*);
55 
56 private: // NOLINT(readability-redundant-access-specifiers)
57  Q_DISABLE_COPY(pqColorChooserButtonWithPalettes)
58 
59 
62  vtkSMSettingsProxy* colorPalette() const;
63  QPointer<QActionGroup> ActionGroup;
65 };
66 
67 //============================================================================
74 {
75  Q_OBJECT;
76  typedef QObject Superclass;
77 
78 public:
80  pqColorChooserButtonWithPalettes* button, vtkSMProxy* smproxy, const char* smproperty);
81  ~pqColorPaletteLinkHelper() override;
82 
83 private:
87  void setSelectedPaletteColor(const QString& colorName);
88 
93  QString selectedPaletteColor() const;
94 
95  Q_DISABLE_COPY(pqColorPaletteLinkHelper)
96 
98  QString SMPropertyName;
100 };
101 
102 #endif
pqColorChooserButton is a QToolButton subclass suitable for showing a a button that allows the use to...
#define PQCOMPONENTS_EXPORT
proxy subclass responsible for linking settings proxies and settings classes on the VTK side...
pqColorPaletteLinkHelper is designed to be used with pqColorChooserButtonWithPalettes to manage setti...
pqColorChooserButtonWithPalettes extends pqColorChooserButton to add support for a menu that allows t...
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140