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 Member Functions

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

Resource * resource ()
 Return selected resource.


Static Public Member Functions

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(), QListBox::insertItem(), KButtonBox::layout(), KDialog::marginHint(), KStdAccel::name(), QDialog::reject(), resource(), KABC::AddressBook::resources(), KDialog::setCaption(), QListBox::setCurrentItem(), and QGroupBox::setTitle().


Member Function Documentation

Resource * ResourceSelectDialog::resource  ) 
 

Return selected resource.

Definition at line 78 of file resourceselectdialog.cpp.

References QListBox::currentItem().

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.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 27 22:16:09 2005 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001