summaryrefslogtreecommitdiff
path: root/library/categoryselect.cpp
Side-by-side diff
Diffstat (limited to 'library/categoryselect.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/categoryselect.cpp114
1 files changed, 111 insertions, 3 deletions
diff --git a/library/categoryselect.cpp b/library/categoryselect.cpp
index 21b3f91..8473aeb 100644
--- a/library/categoryselect.cpp
+++ b/library/categoryselect.cpp
@@ -2,2 +2,3 @@
** Copyright (C) 2001 Trolltech AS. All rights reserved.
+** Copyright (C) 2003 zecke introduce a needed symbol
**
@@ -33,2 +34,37 @@
+
+/*! \enum CategorySelect::SelectorWidget
+ Chooses a type of widget to use as the selection widget.
+
+ \value ComboBox
+ \value ListView
+*/
+
+/*!
+ \class CategorySelect
+ \brief 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.
+
+ \ingroup qtopiaemb
+*/
+
+
static QString categoryEdittingFileName()
@@ -251,3 +287,3 @@ int CategoryCombo::currentCategory() const
returnMe = currentItem();
-
+
if ( returnMe == (int)d->mAppCats.count() )
@@ -288,2 +324,22 @@ void CategoryCombo::slotValueChanged( int )
+/*!
+ Constructs a category selector with parent \a parent, name \a name.
+
+ This constructor is provided to make Opie compatible with Sharp ROM.
+*/
+CategorySelect::CategorySelect( QWidget* parent, const char* name )
+ : QHBox( parent, name ),
+ cmbCat( 0 ),
+ cmdCat( 0 ),
+ d( 0 )
+{
+ d = new CategorySelectPrivate();
+ init(0); // default argument
+}
+/*!
+ Constructs a category selector with parent \a parent, name \a name and
+ fixed width \a width.
+
+ This constructor is provided to make integration with Qt Designer easier.
+*/
CategorySelect::CategorySelect( QWidget *parent, const char *name,int width)
@@ -298,2 +354,7 @@ CategorySelect::CategorySelect( QWidget *parent, const char *name,int width)
+/*!
+ \overload
+ This constructor accepts an array \a vl of integers representing Categories.
+ \a appName is used as the visible name string.
+*/
CategorySelect::CategorySelect( const QArray<int> &vl,
@@ -310,2 +371,9 @@ CategorySelect::CategorySelect( const QArray<int> &vl,
+/*!
+ \overload
+
+ This constructor accepts an array \a vl of integers representing Categories.
+ \a visibleName is the string used when the name of this widget is required
+ to be displayed. \a width is an integer used as the fixed width of the widget.
+*/
CategorySelect::CategorySelect( const QArray<int> &vl,
@@ -321,2 +389,5 @@ CategorySelect::CategorySelect( const QArray<int> &vl,
+/*!
+ Destructs a CategorySelect widget.
+*/
CategorySelect::~CategorySelect()
@@ -326,2 +397,5 @@ CategorySelect::~CategorySelect()
+/*!
+ This slot is called when the user pushes the button to edit Categories.
+*/
void CategorySelect::slotDialog()
@@ -359,2 +433,6 @@ void CategorySelect::slotDialog()
+
+/*!
+ This slot is called when a new Category is available.
+*/
void CategorySelect::slotNewCat( int newUid )
@@ -378,2 +456,12 @@ void CategorySelect::slotNewCat( int newUid )
+/*!
+ \overload
+
+ Resets the CategorySelect to select the \a vlCats for
+ the Categories assoicated with \a appName.
+
+ This function should only be called if <i>filtering</i>
+ on Categories and not selecting and therefore possibly
+ allowing the user to edit Categories.
+*/
QString CategorySelect::setCategories( const QArray<int> &rec,
@@ -384,2 +472,8 @@ QString CategorySelect::setCategories( const QArray<int> &rec,
+/*!
+ Resets the CategorySelect to select the \a vlCats for
+ the Categories assoicated with \a appName and displays
+ the \a visibleName if the user is selecting and therefore editing
+ new Categories.
+ */
QString CategorySelect::setCategories( const QArray<int> &rec,
@@ -408,3 +502,5 @@ void CategorySelect::init(int width)
-
+/*!
+ Return the value of the currently selected category.
+ */
int CategorySelect::currentCategory() const
@@ -414,2 +510,3 @@ int CategorySelect::currentCategory() const
+
void CategorySelect::setCurrentCategory( int newCatUid )
@@ -419,3 +516,5 @@ void CategorySelect::setCurrentCategory( int newCatUid )
-
+/*!
+ Returns a shallow copy of the categories in this CategorySelect.
+ */
const QArray<int> &CategorySelect::currentCategories() const
@@ -425,2 +524,5 @@ const QArray<int> &CategorySelect::currentCategories() const
+/*!
+ Hides the edit section of the CategorySelect widget if \a remove is TRUE.
+ */
void CategorySelect::setRemoveCategoryEdit( bool remove )
@@ -436,2 +538,5 @@ void CategorySelect::setRemoveCategoryEdit( bool remove )
+/*!
+ Changes this CategorySelect to the All category if \a all is TRUE.
+ */
void CategorySelect::setAllCategories( bool add )
@@ -447,2 +552,5 @@ void CategorySelect::setAllCategories( bool add )
// 01.12.21 added
+/*!
+ Sets the fixed width of the widget to \a width.
+ */
void CategorySelect::setFixedWidth(int width)