Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Properties | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Attributes
qSlicerRelativePathMapper Class Reference

#include <Base/QTCore/qSlicerRelativePathMapper.h>

Inheritance diagram for qSlicerRelativePathMapper:
Inheritance graph
[legend]
Collaboration diagram for qSlicerRelativePathMapper:
Collaboration graph
[legend]

Properties

QString path
 
QStringList paths
 
QByteArray propertyName
 This property contains the name of the object mapped property. More...
 
QString relativePath
 
QStringList relativePaths
 

Public Slots

void setPath (const QString &path)
 
void setPaths (const QStringList &path)
 
void setRelativePath (const QString &path)
 
void setRelativePaths (const QStringList &paths)
 

Signals

void pathChanged (const QString &value)
 
void pathsChanged (const QStringList &value)
 
void relativePathChanged (const QString &value)
 
void relativePathsChanged (const QStringList &value)
 

Public Member Functions

QString path () const
 
QStringList paths () const
 
QByteArray propertyName () const
 
 qSlicerRelativePathMapper (QObject *targetObject, const QByteArray &propertyName, const QByteArray &signal)
 
QString relativePath () const
 
QStringList relativePaths () const
 
QObject * targetObject () const
 The mapped object (the mapper parent) More...
 
virtual ~qSlicerRelativePathMapper ()
 

Protected Slots

void emitPathChanged ()
 
void emitPathsChanged ()
 

Protected Attributes

QScopedPointer< qSlicerRelativePathMapperPrivate > d_ptr
 

Detailed Description

Example: ctkDirectoryButton* directorySelector = new ctkDirectoryButton; qSlicerRelativePathMapper* makeRelative = new qSlicerRelativePathMapper("directory", SIGNAL("directoryChanged(QString)"), directorySelector); makeRelative->setPath("some/folder"); // -> directorySelector->directory() == "applicationhome/some/folder" makeRelative->setPath("/some/absolute/folder"); // -> directorySelector->directory() == "/some/absolute/folder"

Python example: relativePathMapper = slicer.qSlicerRelativePathMapper(directorySelector, "directory", "directoryChanged(QString)") parent.registerProperty( "settingsPropertyName", relativePathMapper, "relativePath", qt.SIGNAL("relativePathChanged(QString)"))

Definition at line 47 of file qSlicerRelativePathMapper.h.

Property Documentation

◆ path

QString qSlicerRelativePathMapper::path
readwrite

Definition at line 53 of file qSlicerRelativePathMapper.h.

◆ paths

QStringList qSlicerRelativePathMapper::paths
readwrite

Definition at line 54 of file qSlicerRelativePathMapper.h.

◆ propertyName

QByteArray qSlicerRelativePathMapper::propertyName
read

This property contains the name of the object mapped property.

Definition at line 51 of file qSlicerRelativePathMapper.h.

◆ relativePath

QString qSlicerRelativePathMapper::relativePath
readwrite

Definition at line 56 of file qSlicerRelativePathMapper.h.

◆ relativePaths

QStringList qSlicerRelativePathMapper::relativePaths
readwrite

Definition at line 57 of file qSlicerRelativePathMapper.h.

Constructor & Destructor Documentation

◆ qSlicerRelativePathMapper()

qSlicerRelativePathMapper::qSlicerRelativePathMapper ( QObject *  targetObject,
const QByteArray &  propertyName,
const QByteArray &  signal 
)

Map the property property of the object. The mapper becomes a child of object and will be destructed when object is destructed. property and object must be valid and non empty. If signal is 0, pathChanged(bool) and relativePathChanged(bool) won't be fired.

◆ ~qSlicerRelativePathMapper()

virtual qSlicerRelativePathMapper::~qSlicerRelativePathMapper ( )
virtual

Member Function Documentation

◆ emitPathChanged

void qSlicerRelativePathMapper::emitPathChanged ( )
protectedslot

◆ emitPathsChanged

void qSlicerRelativePathMapper::emitPathsChanged ( )
protectedslot

◆ path()

QString qSlicerRelativePathMapper::path ( ) const

◆ pathChanged

void qSlicerRelativePathMapper::pathChanged ( const QString &  value)
signal

◆ paths()

QStringList qSlicerRelativePathMapper::paths ( ) const

◆ pathsChanged

void qSlicerRelativePathMapper::pathsChanged ( const QStringList &  value)
signal

◆ propertyName()

QByteArray qSlicerRelativePathMapper::propertyName ( ) const

◆ relativePath()

QString qSlicerRelativePathMapper::relativePath ( ) const

◆ relativePathChanged

void qSlicerRelativePathMapper::relativePathChanged ( const QString &  value)
signal

◆ relativePaths()

QStringList qSlicerRelativePathMapper::relativePaths ( ) const

◆ relativePathsChanged

void qSlicerRelativePathMapper::relativePathsChanged ( const QStringList &  value)
signal

◆ setPath

void qSlicerRelativePathMapper::setPath ( const QString &  path)
slot

◆ setPaths

void qSlicerRelativePathMapper::setPaths ( const QStringList &  path)
slot

◆ setRelativePath

void qSlicerRelativePathMapper::setRelativePath ( const QString &  path)
slot

◆ setRelativePaths

void qSlicerRelativePathMapper::setRelativePaths ( const QStringList &  paths)
slot

◆ targetObject()

QObject* qSlicerRelativePathMapper::targetObject ( ) const

The mapped object (the mapper parent)

Member Data Documentation

◆ d_ptr

QScopedPointer<qSlicerRelativePathMapperPrivate> qSlicerRelativePathMapper::d_ptr
protected

Definition at line 94 of file qSlicerRelativePathMapper.h.


The documentation for this class was generated from the following file: