kabc Library API Documentation

KABC::ResourceSelectDialog Class Reference

Dialog for selecting a resource. More...

#include <resourceselectdialog.h>

Inheritance diagram for KABC::ResourceSelectDialog:

KDialog List of all members.

Public Methods

 ResourceSelectDialog (AddressBook *ab, QWidget *parent=0, const char *name=0)
 Constructor.

Resource * resource ()
 Return selected resource.


Static Public Methods

Resource * getResource (AddressBook *ab, QWidget *parent=0)
 Open a dialog showing the available resources and return the resource the user has selected.


Detailed Description

Dialog for selecting a resource.

Example:

 KABC::Resource *res = KABC::ResourceSelectDialog::getResource();
 if ( !( res ) ) {
   // no resource selected
 } else {
   // do something with resource
 }
 

Definition at line 49 of file resourceselectdialog.h.


Constructor & Destructor Documentation

ResourceSelectDialog::ResourceSelectDialog AddressBook   ab,
QWidget   parent = 0,
const char *    name = 0
 

Constructor.

Parameters:
ab  The address book you want to select the resource from
parent  The parent widget
name  The name of the dialog

Definition at line 35 of file resourceselectdialog.cpp.

References QDialog::accept(), KButtonBox::addButton(), KButtonBox::addStretch(), QPtrList::at(), QPtrList::count(), QMap< int, Resource * >::insert(), KButtonBox::layout(), KDialog::marginHint(), QDialog::reject(), resource(), KABC::AddressBook::resources(), KDialog::setCaption(), and QGroupBox::setTitle().


Member Function Documentation

Resource * ResourceSelectDialog::resource  
 

Return selected resource.

Definition at line 78 of file resourceselectdialog.cpp.

Referenced by getResource(), and ResourceSelectDialog().

Resource * ResourceSelectDialog::getResource AddressBook   ab,
QWidget   parent = 0
[static]
 

Open a dialog showing the available resources and return the resource the user has selected.

Returns 0, if the dialog was canceled.

Definition at line 86 of file resourceselectdialog.cpp.

References QPtrList::count(), QDialog::exec(), QPtrList::first(), QPtrList::next(), resource(), and KABC::AddressBook::resources().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:22:10 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001