Qtopia library API Documentation

CategorySelect Class Reference

The CategorySelect widget allows users to select Categories with a combobox interface. More...

Inheritance diagram for CategorySelect:

Inheritance graph
[legend]
Collaboration diagram for CategorySelect:

Collaboration graph
[legend]
List of all members.

Public Slots

void slotNewCat (int id)

Signals

void signalSelected (int)

Public Member Functions

 CategorySelect (QWidget *parent=0, const char *name=0)
 CategorySelect (QWidget *parent, const char *name, int width)
 CategorySelect (const QArray< int > &vlCats, const QString &appName, QWidget *parent=0, const char *name=0, int width=0)
 CategorySelect (const QArray< int > &vlCats, const QString &appName, const QString &visibleName, QWidget *parent=0, const char *name=0, int width=0)
 ~CategorySelect ()
const QArray< int > & currentCategories () const
int currentCategory () const
void setCurrentCategory (int newCatUid)
QString setCategories (const QArray< int > &vlCats, const QString &appName)
QString setCategories (const QArray< int > &vlCats, const QString &appName, const QString &visibleName)
void setRemoveCategoryEdit (bool remove)
void setAllCategories (bool add)
void setFixedWidth (int width)

Detailed Description

The CategorySelect widget allows users to select Categories with a combobox interface.

CategorySelect is useful to provide a QComboBox of Categories for filtering (such as in the Contacts table view) or to allow the user to select multiple Categories. The allCategories variable sets whether the CategorySelect is in filtering or selecting mode.

In filtering mode, the All and Unfiled categories are added. The

In selecting mode, the CategorySelect may either be a QComboBox and a QToolButton or a QListView with checkable items depending on the screen size.

CategorySelect automatically updates itself if Categories has been changed elsewhere in the environment.

Signals and slots are provided to notify the application of the users selections. A QToolButton is also provided so that users can edit the Categories manually.

Definition at line 67 of file categoryselect.h.


Constructor & Destructor Documentation

CategorySelect::CategorySelect QWidget parent = 0,
const char *  name = 0
 

Constructs a category selector with parent parent, name name.

This constructor is provided to make Opie compatible with Sharp ROM.

Definition at line 330 of file categoryselect.cpp.

CategorySelect::CategorySelect QWidget parent,
const char *  name,
int  width
 

Constructs a category selector with parent parent, name name and fixed width width.

This constructor is provided to make integration with Qt Designer easier.

Definition at line 345 of file categoryselect.cpp.

CategorySelect::CategorySelect const QArray< int > &  vl,
const QString appName,
QWidget parent = 0,
const char *  name = 0,
int  width = 0
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

This constructor accepts an array vl of integers representing Categories. appName is used as the visible name string.

Definition at line 360 of file categoryselect.cpp.

References setCategories().

CategorySelect::CategorySelect const QArray< int > &  vl,
const QString appName,
const QString visibleName,
QWidget parent = 0,
const char *  name = 0,
int  width = 0
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

This constructor accepts an array vl of integers representing Categories. visibleName is the string used when the name of this widget is required to be displayed. width is an integer used as the fixed width of the widget.

Definition at line 379 of file categoryselect.cpp.

References setCategories().

CategorySelect::~CategorySelect  ) 
 

Destructs a CategorySelect widget.

Definition at line 393 of file categoryselect.cpp.


Member Function Documentation

const QArray< int > & CategorySelect::currentCategories  )  const
 

Returns a shallow copy of the categories in this CategorySelect.

Definition at line 520 of file categoryselect.cpp.

int CategorySelect::currentCategory  )  const
 

Return the value of the currently selected category.

Definition at line 506 of file categoryselect.cpp.

Referenced by slotNewCat().

QString CategorySelect::setCategories const QArray< int > &  rec,
const QString appName
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Resets the CategorySelect to select the vlCats for the Categories assoicated with appName.

This function should only be called if filtering on Categories and not selecting and therefore possibly allowing the user to edit Categories.

Definition at line 467 of file categoryselect.cpp.

Referenced by CategorySelect().

QString CategorySelect::setCategories const QArray< int > &  rec,
const QString appName,
const QString visibleName
 

Resets the CategorySelect to select the vlCats for the Categories assoicated with appName and displays the visibleName if the user is selecting and therefore editing new Categories.

Definition at line 479 of file categoryselect.cpp.

void CategorySelect::setRemoveCategoryEdit bool  remove  ) 
 

Hides the edit section of the CategorySelect widget if remove is TRUE.

Definition at line 528 of file categoryselect.cpp.

References QWidget::hide(), QWidget::setEnabled(), and QWidget::show().

void CategorySelect::setAllCategories bool  add  ) 
 

Changes this CategorySelect to the All category if all is TRUE.

Definition at line 542 of file categoryselect.cpp.

References QObject::tr().

void CategorySelect::setFixedWidth int  width  ) 
 

Sets the fixed width of the widget to width.

Reimplemented from QWidget.

Definition at line 556 of file categoryselect.cpp.

References QWidget::width().

void CategorySelect::slotNewCat int  newUid  )  [slot]
 

This slot is called when a new Category is available.

Definition at line 438 of file categoryselect.cpp.

References currentCategory().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for OPIE Version 1.5.5.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:14 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001