pqConnect.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 pqConnect_h
6 #define pqConnect_h
7 
8 #include "pqWidgetsModule.h"
9 
10 class QObject;
11 
24 {
25  pqConnect(const char* Signal, const QObject* Receiver, const char* Method);
26 
27  const char* Signal;
28  const QObject* Receiver;
29  const char* Method;
30 };
31 
35 template <typename T>
36 T* operator<<(T* LHS, const pqConnect& RHS)
37 {
38  LHS->connect(LHS, RHS.Signal, RHS.Receiver, RHS.Method);
39  return LHS;
40 }
41 
42 #endif // !pqConnect_h
const char * Signal
Definition: pqConnect.h:27
T * operator<<(T *LHS, const pqConnect &RHS)
Makes a Qt connection.
Definition: pqConnect.h:36
#define PQWIDGETS_EXPORT
const char * Method
Definition: pqConnect.h:29
const QObject * Receiver
Definition: pqConnect.h:28
Using pqConnect, you can create and initialize Qt objects without having to create a bunch of tempora...
Definition: pqConnect.h:23