scidavis  2.3.0
About: SciDAVis is a free application for Scientific Data Analysis and Visualization (a fork off of QtiPlot).
  Fossies Dox: scidavis-2.3.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

SciDAVisObject< Base > Class Template Reference

#include <SciDAVisObject.h>

Inheritance diagram for SciDAVisObject< Base >:
[legend]
Collaboration diagram for SciDAVisObject< Base >:
[legend]

Public Member Functions

template<class... A>
 SciDAVisObject (A... args)
 
template<class T , class... A>
T & addChild (A... args)
 generic factory function to add a child object, to avoid bare pointers More...
 

Private Member Functions

void m_setParent (QObject *child, QObject *parent)
 
void m_setParent (QWidget *child, QWidget *parent)
 

Detailed Description

template<class Base>
class SciDAVisObject< Base >

Generic base class for Qt based classes in SciDAVis

Definition at line 7 of file SciDAVisObject.h.

Constructor & Destructor Documentation

◆ SciDAVisObject()

template<class Base >
template<class... A>
SciDAVisObject< Base >::SciDAVisObject ( A...  args)
inline

Definition at line 17 of file SciDAVisObject.h.

17 : Base(std::forward<A>(args)...) {}

Member Function Documentation

◆ addChild()

template<class Base >
template<class T , class... A>
T& SciDAVisObject< Base >::addChild ( A...  args)
inline

generic factory function to add a child object, to avoid bare pointers

Definition at line 21 of file SciDAVisObject.h.

21  {
22  T* child=new T(std::forward<A>(args)...);
23  m_setParent(child,this);
24  return *child;
25  }

Referenced by ApplicationWindow::addFolder(), ApplicationWindow::appendProject(), ApplicationWindow::loadProject(), and ApplicationWindow::moveFolder().

Here is the caller graph for this function:

◆ m_setParent() [1/2]

template<class Base >
void SciDAVisObject< Base >::m_setParent ( QObject *  child,
QObject *  parent 
)
inlineprivate

Definition at line 9 of file SciDAVisObject.h.

10  {child->setParent(parent);}

Referenced by SciDAVisObject< QTreeWidget >::addChild().

Here is the caller graph for this function:

◆ m_setParent() [2/2]

template<class Base >
void SciDAVisObject< Base >::m_setParent ( QWidget *  child,
QWidget *  parent 
)
inlineprivate

Definition at line 12 of file SciDAVisObject.h.

13  {child->setParent(parent,child->windowFlags());}

The documentation for this class was generated from the following file:
SciDAVisObject::m_setParent
void m_setParent(QObject *child, QObject *parent)
Definition: SciDAVisObject.h:9