Public Member Functions

QwtPlotDict::PrivateData::ItemList Class Reference

List of all members.

Public Member Functions

void insertItem (QwtPlotItem *item)
void removeItem (QwtPlotItem *item)

Detailed Description

Definition at line 19 of file qwt_plot_dict.cpp.


Member Function Documentation

void QwtPlotDict::PrivateData::ItemList::insertItem ( QwtPlotItem item ) [inline]

Definition at line 25 of file qwt_plot_dict.cpp.

References QwtPlotItem::z().

        {
            if ( item == NULL )
                return;

            // Unfortunately there is no inSort operation
            // for lists in Qt4. The implementation below
            // is slow, but there shouldn't be many plot items.

#ifdef __GNUC__
#endif

#if QT_VERSION < 0x040000
            QValueListIterator<QwtPlotItem *> it;
#else
            QList<QwtPlotItem *>::Iterator it;
#endif
            for ( it = begin(); it != end(); ++it )
            {
                if ( *it == item )
                    return;

                if ( (*it)->z() > item->z() )
                {
                    insert(it, item);
                    return;
                }
            }
            append(item);
        }
void QwtPlotDict::PrivateData::ItemList::removeItem ( QwtPlotItem item ) [inline]

Definition at line 56 of file qwt_plot_dict.cpp.

        {
            if ( item == NULL )
                return;

            int i = 0;

#if QT_VERSION < 0x040000
            QValueListIterator<QwtPlotItem *> it;
#else
            QList<QwtPlotItem *>::Iterator it;
#endif
            for ( it = begin(); it != end(); ++it )
            {
                if ( item == *it )
                {
#if QT_VERSION < 0x040000
                    remove(it);
#else
                    removeAt(i);
#endif
                    return;
                }
                i++;
            }
        }

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines