Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

VirtualModule Class Reference

#include </home/clem/local/src/opie/examples/networksettings/examplemodule.h>

Inheritance diagram for VirtualModule:

Inheritance graph
[legend]
Collaboration diagram for VirtualModule:

Collaboration graph
[legend]
List of all members.

Signals

void updateInterface (Interface *i)

Public Member Functions

 VirtualModule ()
 ~VirtualModule ()
const QString type ()
void setProfile (const QString &)
bool isOwner (Interface *)
QWidget * configure (Interface *)
QWidget * information (Interface *)
QList< InterfacegetInterfaces ()
void possibleNewInterfaces (QMap< QString, QString > &)
InterfaceaddNewInterface (const QString &)
bool remove (Interface *iface)
QString getPixmapName (Interface *)
void receive (const QCString &msg, const QByteArray &ar)

Private Attributes

QList< Interfacem_interfaces

Constructor & Destructor Documentation

VirtualModule::VirtualModule  ) 
 

Definition at line 12 of file examplemodule.cpp.

References m_interfaces, Interface::setHardwareName(), and Interface::setInterfaceName().

VirtualModule::~VirtualModule  ) 
 

Definition at line 25 of file examplemodule.cpp.

References m_interfaces.


Member Function Documentation

Interface * VirtualModule::addNewInterface const QString  )  [virtual]
 

Attempts to create a new interface from name you gave possibleNewInterfaces()

Returns:
Interface* NULL if it was unable to be created.
Parameters:
name the type of interface to create
See also:
possibleNewInterfaces

Implements Module.

Definition at line 58 of file examplemodule.cpp.

QWidget * VirtualModule::configure Interface  )  [virtual]
 

Create and return the Configure Module

Parameters:
Interface *i the interface to configure.
Returns:
QWidget* pointer to this modules configure.
See also:
InterfaceSetupImp

Reimplemented from Module.

Definition at line 39 of file examplemodule.cpp.

References l.

QList< Interface > VirtualModule::getInterfaces  )  [virtual]
 

Get all active (up or down) interfaces managed by this module. At the end of initialisation you will be asked to return your interfaces Return all of your interfaces even the ones you claimed by isOnwer. Here you can also return your 'virtual' Interface Objects

Returns:
QList<Interface> A list of interfaces that exsist that havn't been called by isOwner()

Implements Module.

Definition at line 48 of file examplemodule.cpp.

References m_interfaces.

QString VirtualModule::getPixmapName Interface  )  [inline, virtual]
 

get the icon name for this device.

Parameters:
Interface* can be used in determining the icon.
Returns:
QString the icon name (minus .png, .gif etc)

Implements Module.

Definition at line 24 of file examplemodule.h.

References QString::fromLatin1().

QWidget * VirtualModule::information Interface iface  )  [virtual]
 

Create, and return the Information Module.

An default Implementation is InterfaceInformationImp

Parameters:
Interface *i the interface to get info on.
Returns:
QWidget* pointer to this modules info.
See also:
InterfaceInformationImp

Reimplemented from Module.

Definition at line 44 of file examplemodule.cpp.

bool VirtualModule::isOwner Interface iface  )  [virtual]
 

Check to see if the interface i is owned by this module. See if you can handle it. And if you can claim ownership by returning true. For physical devices you will be asked if you want to own the device. But you can also create new

See also:
Interface Implementations.
If you want to own the Interface add it to your internal interface list

Parameters:
Interface* interface to check against
Returns:
bool true if i is owned by this module, false otherwise.
See also:
getInterfaces

Reimplemented from Module.

Definition at line 34 of file examplemodule.cpp.

References m_interfaces.

void VirtualModule::possibleNewInterfaces QMap< QString, QString > &   )  [virtual]
 

Adds possible new interfaces to the list (Example: usb(ppp), ir(ppp), modem ppp) Both strings need to be translated. The first string is a Shortcut like PPP and the second argument is a description.

list.insert(

Parameters:
list A reference to the list of supported additionns.

Implements Module.

Definition at line 52 of file examplemodule.cpp.

References QMap< Key, T >::insert(), and tr.

void VirtualModule::receive const QCString msg,
const QByteArray ar
[inline, virtual]
 

get dcop calls

Implements Module.

Definition at line 25 of file examplemodule.h.

bool VirtualModule::remove Interface iface  )  [virtual]
 

Attempts to remove the interface, doesn't delete i

Returns:
bool true if successful, false otherwise.

Implements Module.

Definition at line 72 of file examplemodule.cpp.

void VirtualModule::setProfile const QString  )  [inline, virtual]
 

The current profile has been changed and the module should do any neccesary changes also. As of Opie1.0 profiles are disabled.

Parameters:
newProfile what the profile should be changed to.

Implements Module.

Definition at line 16 of file examplemodule.h.

const QString VirtualModule::type  )  [inline, virtual]
 

The type of the plugin and the name of the qcop call

Implements Module.

Definition at line 15 of file examplemodule.h.

References QString::fromLatin1().

void VirtualModule::updateInterface Interface i  )  [signal]
 

Emit this Signal once you change the Interface you're operating on

Parameters:
i The Interface

Reimplemented from Module.


Member Data Documentation

QList<Interface> VirtualModule::m_interfaces [private]
 

Definition at line 27 of file examplemodule.h.

Referenced by getInterfaces(), isOwner(), VirtualModule(), and ~VirtualModule().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:55:20 2005 for OPIE by  doxygen 1.4.2