Eneboo - Documentación para desarrolladores
Tipos públicos | Slots públicos | Métodos públicos | Amigas
Referencia de la Clase PopupMenuEditorItem

#include <popupmenueditor.h>

Diagrama de herencias de PopupMenuEditorItem
QObject Qt Qt

Lista de todos los miembros.

Tipos públicos

enum  ItemType { Unknown = -1, Separator = 0, Action = 1 }

Slots públicos

void selfDestruct ()

Métodos públicos

 PopupMenuEditorItem (QAction *action, PopupMenuEditor *menu, QObject *parent=0, const char *name=0)
 PopupMenuEditorItem (PopupMenuEditorItem *item, PopupMenuEditor *menu, QObject *parent=0, const char *name=0)
 ~PopupMenuEditorItem ()
void init ()
ItemType type () const
QActionaction () const
void setVisible (bool enable)
bool isVisible () const
void setSeparator (bool enable)
bool isSeparator () const
void setRemovable (bool enable)
bool isRemovable () const
void showMenu (int x, int y)
void hideMenu ()
void focusOnMenu ()
PopupMenuEditorsubMenu () const
int count () const
bool eventFilter (QObject *, QEvent *event)

Amigas

class PopupMenuEditor

Documentación de las enumeraciones miembro de la clase

Valores de enumeraciones:
Unknown 
Separator 
Action 

Documentación del constructor y destructor

PopupMenuEditorItem::PopupMenuEditorItem ( QAction action,
PopupMenuEditor menu,
QObject parent = 0,
const char *  name = 0 
)
PopupMenuEditorItem::PopupMenuEditorItem ( PopupMenuEditorItem item,
PopupMenuEditor menu,
QObject parent = 0,
const char *  name = 0 
)
PopupMenuEditorItem::~PopupMenuEditorItem ( )

Documentación de las funciones miembro

QAction* PopupMenuEditorItem::action ( ) const [inline]
int PopupMenuEditorItem::count ( ) const
bool PopupMenuEditorItem::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.

void PopupMenuEditorItem::focusOnMenu ( )
void PopupMenuEditorItem::hideMenu ( )
void PopupMenuEditorItem::init ( )
bool PopupMenuEditorItem::isRemovable ( ) const [inline]
bool PopupMenuEditorItem::isSeparator ( ) const [inline]
bool PopupMenuEditorItem::isVisible ( ) const
void PopupMenuEditorItem::selfDestruct ( ) [slot]
void PopupMenuEditorItem::setRemovable ( bool  enable) [inline]
void PopupMenuEditorItem::setSeparator ( bool  enable) [inline]
void PopupMenuEditorItem::setVisible ( bool  enable)
void PopupMenuEditorItem::showMenu ( int  x,
int  y 
)
PopupMenuEditor* PopupMenuEditorItem::subMenu ( ) const [inline]
PopupMenuEditorItem::ItemType PopupMenuEditorItem::type ( ) const

Documentación de las funciones relacionadas y clases amigas

friend class PopupMenuEditor [friend]

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'