TreeFrogFramework  1.18
Public Member Functions | Protected Member Functions | List of all members
TAbstractController Class Referenceabstract

#include <tabstractcontroller.h>

Inheritance diagram for TAbstractController:
Inheritance graph
[legend]

Public Member Functions

 TAbstractController ()
 
virtual ~TAbstractController ()
 
virtual QString name () const =0
 
virtual QString activeAction () const =0
 

Protected Member Functions

QVariant variant (const QString &name) const
 
void exportVariant (const QString &name, const QVariant &value, bool overwrite=true)
 
void exportValidationErrors (const TFormValidator &validator, const QString &prefix=QString("err_"))
 
bool hasVariant (const QString &name) const
 
void exportVariants (const QVariantMap &map)
 
const QVariantMap & allVariants () const
 
QString viewClassName (const QString &action=QString()) const
 
QString viewClassName (const QString &contoller, const QString &action) const
 

Detailed Description

The TAbstractController class is the abstract base class of controllers, providing functionality common to controllers.

Constructor & Destructor Documentation

TAbstractController::TAbstractController ( )

Constructor.

virtual TAbstractController::~TAbstractController ( )
inlinevirtual

Member Function Documentation

QString TAbstractController::activeAction ( ) const
pure virtual

This function is reimplemented in subclasses to return a active action name.

Implemented in TActionController, and TActionMailer.

const QVariantMap & TAbstractController::allVariants ( ) const
inlineprotected

Returns all the exported variables.

Internal use only.

void TAbstractController::exportValidationErrors ( const TFormValidator validator,
const QString &  prefix = QString("err_") 
)
protected

Exports validation error messages with the prefix prefix each.

void TAbstractController::exportVariant ( const QString &  name,
const QVariant &  value,
bool  overwrite = true 
)
protected

Exports a new variable with the name name and a value of value for views.

Internal use only.

void TAbstractController::exportVariants ( const QVariantMap &  map)
protected

Exports the map.

Internal use only.

bool TAbstractController::hasVariant ( const QString &  name) const
inlineprotected

Returns true if a variable with the name is exported for views; otherwise returns false.

Internal use only.

QString TAbstractController::name ( ) const
pure virtual

This function is reimplemented in subclasses to return a controller name.

Implemented in TActionController, and TActionMailer.

QVariant TAbstractController::variant ( const QString &  name) const
inlineprotected

Returns the exported variable with the value associated with the name.

QString TAbstractController::viewClassName ( const QString &  action = QString()) const
protected

Returns a class name of a view for the action action of the active controller.

Internal use only.

QString TAbstractController::viewClassName ( const QString &  contoller,
const QString &  action 
) const
protected

Returns a class name of a view for the action action of the controller controller.

Internal use only.


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