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