Faith::Object Class Reference

An object that can receive events, and have slots/signals. More...

#include <faith/object.h>

Inheritance diagram for Faith::Object:

Faith::Application Faith::Clipboard Faith::GListItemSet Faith::ServerSocket Faith::Socket Faith::SocketNotifier Faith::Timer Faith::Widget List of all members.

Public Slots

void deleteLater ()

Public Member Functions

 Object (Object *parent=0, const char *name=0)
virtual ~Object ()
bool isA (const char *type) const
bool isWidgetType () const
const char * name () const
Objectparent ()
const Objectparent () const
bool connect (const Faith::Object *from, Signal signal, Slot slot)
void blockSignals (bool on)
bool signalsBlocked () const
int startTimer (int msecs)
void killTimer (int id)
void killTimers ()
virtual bool event (Event *event)
void installEventFilter (Faith::Object *filter)
void removeEventFilter (Faith::Object *filter)

Static Public Member Functions

static bool connect (const Faith::Object *from, Signal signal, Faith::Object *to, Slot slot)

Protected Member Functions

void faith_magna_slot_begin (Faith_CalledSlot *slot)
void faith_magna_slot_end (Faith_CalledSlot *slot)
virtual void timerEvent (Faith::TimerEvent *)
virtual void userEvent (Faith::Event *)
virtual bool eventFilter (Faith::Object *filtered, Faith::Event *e)
std::set< Faith::Object
* >::iterator 
beginChildren ()
std::set< Faith::Object
* >::iterator 
endChildren ()

Protected Attributes

void ** faith_callbacks_magna

Classes

struct  Faith_CalledSlot

Detailed Description

An object that can receive events, and have slots/signals.

An Object is something that can have slots and signals, can get Events from the event loop.

When you delete an Object, all of its children are also automatically deleted as well. This means of course that it's not necessary to always delete an Object


Constructor & Destructor Documentation

Faith::Object::Object ( Object parent = 0,
const char *  name = 0 
)

construct a Faith::Object with the given parent and name

the name can be retrieved with name(), and the parent with parent().

Deleting this object's parent will delete this object as well

virtual Faith::Object::~Object (  )  [virtual]


Member Function Documentation

std::set<Faith::Object*>::iterator Faith::Object::beginChildren (  )  [protected]

void Faith::Object::blockSignals ( bool  on  ) 

will block signals when on is true This works all stacky, if you call this function with true twice, you have to call it with false twice for the signals to become unblocked again

bool Faith::Object::connect ( const Faith::Object from,
Signal  signal,
Slot  slot 
)

Connects the signal signal on the object from to the slot slot on this object

static bool Faith::Object::connect ( const Faith::Object from,
Signal  signal,
Faith::Object to,
Slot  slot 
) [inline, static]

Connects the signal signal on the object from to the slot slot on the objcet to

void Faith::Object::deleteLater (  )  [slot]

causes this object to be deleted when we reenter the event loop

std::set<Faith::Object*>::iterator Faith::Object::endChildren (  )  [protected]

virtual bool Faith::Object::event ( Event event  )  [virtual]

calls one of various actual event functions here.

This is called by Application, and receives all events destined to this object, unless filtered with installEventFilter

Reimplemented in Faith::Widget.

virtual bool Faith::Object::eventFilter ( Faith::Object filtered,
Faith::Event e 
) [protected, virtual]

process a filtered object's events.

You should reimplement this function if you have installed a filter on another widget and directed it at this object.

This function is called in an undefined order in relationship to when the event filter was installed.

Returns:
whether the event should not continue to the filtered object. Return true to keep the event from reaching filtered, and also being sent to further filters.

Reimplemented in Faith::ComboBox, and Faith::MenuBar.

void Faith::Object::faith_magna_slot_begin ( Faith_CalledSlot slot  )  [protected]

void Faith::Object::faith_magna_slot_end ( Faith_CalledSlot slot  )  [protected]

void Faith::Object::installEventFilter ( Faith::Object filter  ) 

Install a filter on this object, pointing its events to filter.

See also:
eventFilter

removeEventFilter

bool Faith::Object::isA ( const char *  type  )  const [inline]

returns true if this class inherits, or is, type (requires Magna)

bool Faith::Object::isWidgetType (  )  const [inline]

same as Faith::isA("Faith::Widget") except faster

void Faith::Object::killTimer ( int  id  ) 

kill the timer with the given id

See also:
startTimer

void Faith::Object::killTimers (  ) 

kill all timers

See also:
killTimer(int)

const char* Faith::Object::name (  )  const [inline]

Returns:
the name of the object as set in the constructor

const Object* Faith::Object::parent (  )  const [inline]

Object* Faith::Object::parent (  )  [inline]

Returns:
the parent object, if any

void Faith::Object::removeEventFilter ( Faith::Object filter  ) 

the given object should no longer be this object's filter.

See also:
installEventFilter

bool Faith::Object::signalsBlocked (  )  const

Returns:
true if no signals will be emitted

int Faith::Object::startTimer ( int  msecs  ) 

Create a timer, this will call timerEvent regularly,

Returns:
the id >0, or 0 on error
See also:
killTimer

timerEvent

virtual void Faith::Object::timerEvent ( Faith::TimerEvent  )  [inline, protected, virtual]

Receives timer events as created by startTimer

Reimplemented in Faith::Timer, and Faith::LineEdit.

virtual void Faith::Object::userEvent ( Faith::Event  )  [inline, protected, virtual]

called when this object receives an event with the EventUser type


Member Data Documentation

void** Faith::Object::faith_callbacks_magna [mutable, protected]


The documentation for this class was generated from the following file:
Generated on Fri Sep 1 00:23:09 2006 for Faith by  doxygen 1.4.7