aimsgui  5.1.2
aims::gui::QPythonPrinter Class Reference

Prints elements and attributes of a GenericObject (Python-like) object into a QTreeWidget tree. More...

#include <aims/listview/qpython.h>

Collaboration diagram for aims::gui::QPythonPrinter:

Public Types

typedef QTreeWidgetItem *(* Helper) (const carto::GenericObject &obj, QTreeWidgetItem *parent, QPythonPrinter &qp, const QString &attname, const QString &attype, bool viewinternal)
 
typedef std::map< std::string, HelperHelperSet
 

Public Member Functions

 QPythonPrinter (QTreeWidgetItem *parent, const carto::SyntaxSet &syntax=carto::SyntaxSet(), const HelperSet &helpers=HelperSet())
 
 QPythonPrinter (QTreeWidget *parent, const carto::SyntaxSet &syntax=carto::SyntaxSet(), const HelperSet &helpers=HelperSet())
 
virtual ~QPythonPrinter ()
 
virtual QTreeWidgetItem * write (const carto::GenericObject &object, bool writeInternals=false)
 
virtual void write (const carto::GenericObject &object, QTreeWidgetItem *parent, const std::string &syntax, const std::string &semantic, bool writeInternals)
 
bool isInternal (const std::string &syntax, const std::string &semantic)
 
int valueColumn () const
 
int attributeColumn () const
 
int typeColumn () const
 
void setValueColumn (int c)
 
void setPropertyColumn (int c)
 
void setTypeColumn (int c)
 

Protected Member Functions

virtual void initHelpers ()
 

Protected Attributes

carto::SyntaxSet _rules
 
HelperSet _helpers
 
QTreeWidget * _lview
 
QTreeWidgetItem * _lvitem
 
int _valcol
 
int _attcol
 
int _typcol
 

Detailed Description

Prints elements and attributes of a GenericObject (Python-like) object into a QTreeWidget tree.

Definition at line 54 of file qpython.h.

Member Typedef Documentation

◆ Helper

typedef QTreeWidgetItem*(* aims::gui::QPythonPrinter::Helper) (const carto::GenericObject &obj, QTreeWidgetItem *parent, QPythonPrinter &qp, const QString &attname, const QString &attype, bool viewinternal)

Definition at line 57 of file qpython.h.

◆ HelperSet

typedef std::map<std::string, Helper> aims::gui::QPythonPrinter::HelperSet

Definition at line 63 of file qpython.h.

Constructor & Destructor Documentation

◆ QPythonPrinter() [1/2]

aims::gui::QPythonPrinter::QPythonPrinter ( QTreeWidgetItem *  parent,
const carto::SyntaxSet syntax = carto::SyntaxSet(),
const HelperSet helpers = HelperSet() 
)

◆ QPythonPrinter() [2/2]

aims::gui::QPythonPrinter::QPythonPrinter ( QTreeWidget *  parent,
const carto::SyntaxSet syntax = carto::SyntaxSet(),
const HelperSet helpers = HelperSet() 
)

◆ ~QPythonPrinter()

virtual aims::gui::QPythonPrinter::~QPythonPrinter ( )
virtual

Member Function Documentation

◆ attributeColumn()

int aims::gui::QPythonPrinter::attributeColumn ( ) const
inline

Definition at line 81 of file qpython.h.

References _attcol.

◆ initHelpers()

virtual void aims::gui::QPythonPrinter::initHelpers ( )
protectedvirtual

◆ isInternal()

bool aims::gui::QPythonPrinter::isInternal ( const std::string &  syntax,
const std::string &  semantic 
)

◆ setPropertyColumn()

void aims::gui::QPythonPrinter::setPropertyColumn ( int  c)
inline

Definition at line 84 of file qpython.h.

References _attcol.

◆ setTypeColumn()

void aims::gui::QPythonPrinter::setTypeColumn ( int  c)
inline

Definition at line 85 of file qpython.h.

References _typcol.

◆ setValueColumn()

void aims::gui::QPythonPrinter::setValueColumn ( int  c)
inline

Definition at line 83 of file qpython.h.

References _valcol.

◆ typeColumn()

int aims::gui::QPythonPrinter::typeColumn ( ) const
inline

Definition at line 82 of file qpython.h.

References _typcol.

◆ valueColumn()

int aims::gui::QPythonPrinter::valueColumn ( ) const
inline

Definition at line 80 of file qpython.h.

References _valcol.

◆ write() [1/2]

virtual QTreeWidgetItem* aims::gui::QPythonPrinter::write ( const carto::GenericObject object,
bool  writeInternals = false 
)
virtual

◆ write() [2/2]

virtual void aims::gui::QPythonPrinter::write ( const carto::GenericObject object,
QTreeWidgetItem *  parent,
const std::string &  syntax,
const std::string &  semantic,
bool  writeInternals 
)
virtual

Member Data Documentation

◆ _attcol

int aims::gui::QPythonPrinter::_attcol
protected

Definition at line 95 of file qpython.h.

Referenced by attributeColumn(), and setPropertyColumn().

◆ _helpers

HelperSet aims::gui::QPythonPrinter::_helpers
protected

Definition at line 91 of file qpython.h.

◆ _lview

QTreeWidget* aims::gui::QPythonPrinter::_lview
protected

Definition at line 92 of file qpython.h.

◆ _lvitem

QTreeWidgetItem* aims::gui::QPythonPrinter::_lvitem
protected

Definition at line 93 of file qpython.h.

◆ _rules

carto::SyntaxSet aims::gui::QPythonPrinter::_rules
protected

Definition at line 90 of file qpython.h.

◆ _typcol

int aims::gui::QPythonPrinter::_typcol
protected

Definition at line 96 of file qpython.h.

Referenced by setTypeColumn(), and typeColumn().

◆ _valcol

int aims::gui::QPythonPrinter::_valcol
protected

Definition at line 94 of file qpython.h.

Referenced by setValueColumn(), and valueColumn().


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