pqSetData.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 
5 #ifndef pqSetData_h
6 #define pqSetData_h
7 
8 #include "pqWidgetsModule.h"
9 #include <QVariant>
10 
23 {
24  pqSetData(const QVariant& Data);
25  const QVariant Data;
26 
27 private:
28  void operator=(const pqSetData&);
29 };
30 
34 template <typename T>
35 T* operator<<(T* LHS, const pqSetData& RHS)
36 {
37  LHS->setData(RHS.Data);
38  return LHS;
39 }
40 
41 #endif // !pqSetData_h
Using pqSetData, you can create and initialize Qt objects without having to create a bunch of tempora...
Definition: pqSetData.h:22
T * operator<<(T *LHS, const pqSetData &RHS)
Sets custom data for a Qt object.
Definition: pqSetData.h:35
#define PQWIDGETS_EXPORT
const QVariant Data
Definition: pqSetData.h:25