Eneboo - Documentación para desarrolladores
Tipos públicos | Métodos públicos | Métodos protegidos | Atributos protegidos
Referencia de la Clase ListDnd

#include <listdnd.h>

Diagrama de herencias de ListDnd
QObject Qt Qt ListBoxDnd ListViewDnd

Lista de todos los miembros.

Tipos públicos

enum  DragMode {
  None = 0, External = 1, Internal = 2, Both = 3,
  Move = 4, NullDrop = 8
}

Métodos públicos

 ListDnd (QScrollView *eventSource, const char *name=0)
void setDragMode (int mode)
int dragMode () const
bool eventFilter (QObject *, QEvent *event)

Métodos protegidos

virtual bool dragEnterEvent (QDragEnterEvent *event)
virtual bool dragLeaveEvent (QDragLeaveEvent *)
virtual bool dragMoveEvent (QDragMoveEvent *event)
virtual bool dropEvent (QDropEvent *event)
virtual bool mousePressEvent (QMouseEvent *event)
virtual bool mouseMoveEvent (QMouseEvent *event)
virtual void updateLine (const QPoint &dragPos)
virtual bool canDecode (QDragEnterEvent *event)

Atributos protegidos

QScrollView * src
QWidget * line
QPoint mousePressPos
QPoint dragPos
bool dragInside
bool dragDelete
bool dropConfirmed
int dMode

Documentación de las enumeraciones miembro de la clase

Valores de enumeraciones:
None 
External 
Internal 
Both 
Move 
NullDrop 

Reimplementado en ListViewDnd.


Documentación del constructor y destructor

ListDnd::ListDnd ( QScrollView *  eventSource,
const char *  name = 0 
)

Documentación de las funciones miembro

bool ListDnd::canDecode ( QDragEnterEvent *  event) [protected, virtual]

Reimplementado en ListBoxDnd y ListViewDnd.

bool ListDnd::dragEnterEvent ( QDragEnterEvent *  event) [protected, virtual]
bool ListDnd::dragLeaveEvent ( QDragLeaveEvent *  ) [protected, virtual]
int ListDnd::dragMode ( ) const
bool ListDnd::dragMoveEvent ( QDragMoveEvent *  event) [protected, virtual]
bool ListDnd::dropEvent ( QDropEvent *  event) [protected, virtual]

Reimplementado en ListBoxDnd y ListViewDnd.

bool ListDnd::eventFilter ( QObject *  ,
QEvent *   
) [virtual]

Filters events if this object has been installed as an event filter for the watched object.

In your reimplementation of this function, if you want to filter the event e, out, i.e. stop it being handled further, return TRUE; otherwise return FALSE.

Example:

    class MyMainWindow : public QMainWindow
    {
    public:
        MyMainWindow( QWidget *parent = 0, const char *name = 0 );

    protected:
        bool eventFilter( QObject *obj, QEvent *ev );

    private:
        QTextEdit *textEdit;
    };

    MyMainWindow::MyMainWindow( QWidget *parent, const char *name )
        : QMainWindow( parent, name )
    {
        textEdit = new QTextEdit( this );
        setCentralWidget( textEdit );
        textEdit->installEventFilter( this );
    }

    bool MyMainWindow::eventFilter( QObject *obj, QEvent *ev )
    {
        if ( obj == textEdit ) {
            if ( e->type() == QEvent::KeyPress ) {
                QKeyEvent *k = (QKeyEvent*)ev;
                qDebug( "Ate key press %d", k->key() );
                return TRUE;
            } else {
                return FALSE;
            }
        } else {
            // pass the event on to the parent class
            return QMainWindow::eventFilter( obj, ev );
        }
    }

Notice in the example above that unhandled events are passed to the base class's eventFilter() function, since the base class might have reimplemented eventFilter() for its own internal purposes.

Atención:
If you delete the receiver object in this function, be sure to return TRUE. Otherwise, Qt will forward the event to the deleted object and the program might crash.
Ver también:
installEventFilter()

Reimplementado de QObject.

bool ListDnd::mouseMoveEvent ( QMouseEvent *  event) [protected, virtual]

Reimplementado en ListBoxDnd y ListViewDnd.

bool ListDnd::mousePressEvent ( QMouseEvent *  event) [protected, virtual]
void ListDnd::setDragMode ( int  mode)
void ListDnd::updateLine ( const QPoint &  dragPos) [protected, virtual]

Reimplementado en ListBoxDnd y ListViewDnd.


Documentación de los datos miembro

int ListDnd::dMode [protected]
QPoint ListDnd::dragPos [protected]
QWidget* ListDnd::line [protected]
QScrollView* ListDnd::src [protected]

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'