Eneboo - Documentación para desarrolladores
Slots públicos | Señales | Métodos públicos | Propiedades
Referencia de la Clase QCompletionEdit

#include <qcompletionedit.h>

Diagrama de herencias de QCompletionEdit
QLineEdit QFrame QFrame QWidget QWidget QWidget QWidget QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject

Lista de todos los miembros.

Slots públicos

void setCompletionList (const QStringList &l)
void setAutoAdd (bool add)
void clear ()
void addCompletionEntry (const QString &entry)
void removeCompletionEntry (const QString &entry)
void setCaseSensitive (bool b)

Señales

void chosen (const QString &text)

Métodos públicos

 QCompletionEdit (QWidget *parent=0, const char *name=0)
bool autoAdd () const
QStringList completionList () const
bool eventFilter (QObject *o, QEvent *e)
bool isCaseSensitive () const

Propiedades

bool autoAdd
bool caseSensitive

Documentación del constructor y destructor

QCompletionEdit::QCompletionEdit ( QWidget parent = 0,
const char *  name = 0 
)

Documentación de las funciones miembro

void QCompletionEdit::addCompletionEntry ( const QString entry) [slot]
bool QCompletionEdit::autoAdd ( ) const
void QCompletionEdit::chosen ( const QString text) [signal]
void QCompletionEdit::clear ( void  ) [virtual, slot]

Clears the contents of the line edit.

Reimplementado de QLineEdit.

QStringList QCompletionEdit::completionList ( ) const
bool QCompletionEdit::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 QCompletionEdit::isCaseSensitive ( ) const
void QCompletionEdit::removeCompletionEntry ( const QString entry) [slot]
void QCompletionEdit::setAutoAdd ( bool  add) [slot]
void QCompletionEdit::setCaseSensitive ( bool  b) [slot]
void QCompletionEdit::setCompletionList ( const QStringList l) [slot]

Documentación de propiedades

bool QCompletionEdit::autoAdd [read, write]
bool QCompletionEdit::caseSensitive [read, write]

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'