#include <qpainter.h>
#include <qpixmap.h>
#include <qevent.h>
#include <qframe.h>
#include <qcursor.h>
#include <qobjectlist.h>
#include "qwt_picker.h"
#include "qwt_array.h"
#include "qwt_panner.h"
Go to the source code of this file.
Classes | |
class | QwtPanner::PrivateData |
Functions | |
static QMemArray< QwtPicker * > | activePickers (QWidget *w) |
static QMemArray<QwtPicker *> activePickers | ( | QWidget * | w ) | [static] |
Definition at line 24 of file qwt_panner.cpp.
References int(), and QwtPicker::isEnabled.
Referenced by QwtPanner::widgetMousePressEvent().
{ QwtArray<QwtPicker *> pickers; #if QT_VERSION >= 0x040000 QObjectList children = w->children(); for ( int i = 0; i < children.size(); i++ ) { QObject *obj = children[i]; if ( obj->inherits("QwtPicker") ) { QwtPicker *picker = (QwtPicker *)obj; if ( picker->isEnabled() ) pickers += picker; } } #else QObjectList *children = (QObjectList *)w->children(); if ( children ) { for ( QObjectListIterator it(*children); it.current(); ++it ) { QObject *obj = (QObject *)it.current(); if ( obj->inherits("QwtPicker") ) { QwtPicker *picker = (QwtPicker *)obj; if ( picker->isEnabled() ) { pickers.resize(pickers.size() + 1); pickers[int(pickers.size()) - 1] = picker; } } } } #endif return pickers; }