Eneboo - Documentación para desarrolladores
Slots públicos | Métodos públicos | Métodos protegidos
Referencia de la Clase MenuBarEditor

#include <menubareditor.h>

Diagrama de herencias de MenuBarEditor
QMenuBar QFrame QMenuData QFrame QMenuData 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 cut ()
void copy ()
void paste ()

Métodos públicos

 MenuBarEditor (FormWindow *fw, QWidget *parent=0, const char *name=0)
 ~MenuBarEditor ()
FormWindowformWindow ()
MenuBarEditorItemcreateItem (int index=-1, bool addToCmdStack=TRUE)
void insertItem (MenuBarEditorItem *item, int index=-1)
void insertItem (QString text, PopupMenuEditor *menu, int index=-1)
void insertItem (QString text, QActionGroup *group, int index=-1)
void insertSeparator (int index=-1)
void removeItemAt (int index)
void removeItem (MenuBarEditorItem *item)
int findItem (MenuBarEditorItem *item)
int findItem (PopupMenuEditor *menu)
int findItem (QPoint &pos)
MenuBarEditorItemitem (int index=-1)
int count ()
int current ()
void cut (int index)
void copy (int index)
void paste (int index)
void exchange (int a, int b)
void showLineEdit (int index=-1)
void showItem (int index=-1)
void hideItem (int index=-1)
void focusItem (int index=-1)
void deleteItem (int index=-1)
QSize sizeHint () const
QSize minimumSize () const
QSize minimumSizeHint () const
int heightForWidth (int max_width) const
void show ()
void checkAccels (QMap< QChar, QWidgetList > &accels)

Métodos protegidos

bool eventFilter (QObject *o, QEvent *e)
void paintEvent (QPaintEvent *e)
void mousePressEvent (QMouseEvent *e)
void mouseDoubleClickEvent (QMouseEvent *e)
void mouseMoveEvent (QMouseEvent *e)
void dragEnterEvent (QDragEnterEvent *e)
void dragLeaveEvent (QDragLeaveEvent *e)
void dragMoveEvent (QDragMoveEvent *e)
void dropEvent (QDropEvent *e)
void keyPressEvent (QKeyEvent *e)
void focusOutEvent (QFocusEvent *e)
void resizeEvent (QResizeEvent *e)
void resizeInternals ()
void drawItems (QPainter &p)
void drawItem (QPainter &p, MenuBarEditorItem *i, int idx, QPoint &pos)
void drawSeparator (QPainter &p, QPoint &pos)
QSize itemSize (MenuBarEditorItem *i)
void addItemSizeToCoords (MenuBarEditorItem *i, int &x, int &y, int w)
QPoint itemPos (int index)
QPoint snapToItem (const QPoint &pos)
void dropInPlace (MenuBarEditorItem *i, const QPoint &pos)
void safeDec ()
void safeInc ()
void navigateLeft (bool ctrl)
void navigateRight (bool ctrl)
void enterEditMode ()
void leaveEditMode ()
QPixmap createTextPixmap (const QString &text)
int borderSize () const

Documentación del constructor y destructor

MenuBarEditor::MenuBarEditor ( FormWindow fw,
QWidget parent = 0,
const char *  name = 0 
)
MenuBarEditor::~MenuBarEditor ( )

Documentación de las funciones miembro

void MenuBarEditor::addItemSizeToCoords ( MenuBarEditorItem i,
int x,
int y,
int  w 
) [protected]
int MenuBarEditor::borderSize ( ) const [inline, protected]
void MenuBarEditor::checkAccels ( QMap< QChar, QWidgetList > &  accels)
void MenuBarEditor::copy ( int  index)
void MenuBarEditor::copy ( ) [slot]
int MenuBarEditor::count ( )
MenuBarEditorItem * MenuBarEditor::createItem ( int  index = -1,
bool  addToCmdStack = TRUE 
)
QPixmap MenuBarEditor::createTextPixmap ( const QString text) [protected]
int MenuBarEditor::current ( )
void MenuBarEditor::cut ( ) [slot]
void MenuBarEditor::cut ( int  index)
void MenuBarEditor::deleteItem ( int  index = -1)
void MenuBarEditor::dragEnterEvent ( QDragEnterEvent ) [protected, virtual]

This event handler is called when a drag is in progress and the mouse enters this widget.

See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.

Ver también:
QTextDrag, QImageDrag, QDragEnterEvent

Reimplementado de QWidget.

void MenuBarEditor::dragLeaveEvent ( QDragLeaveEvent ) [protected, virtual]

This event handler is called when a drag is in progress and the mouse leaves this widget.

See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.

Ver también:
QTextDrag, QImageDrag, QDragLeaveEvent

Reimplementado de QWidget.

void MenuBarEditor::dragMoveEvent ( QDragMoveEvent ) [protected, virtual]

This event handler is called when a drag is in progress and the mouse enters this widget, and whenever it moves within the widget.

See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.

Ver también:
QTextDrag, QImageDrag, QDragMoveEvent

Reimplementado de QWidget.

void MenuBarEditor::drawItem ( QPainter p,
MenuBarEditorItem i,
int  idx,
QPoint pos 
) [protected]
void MenuBarEditor::drawItems ( QPainter p) [protected]
void MenuBarEditor::drawSeparator ( QPainter p,
QPoint pos 
) [protected]
void MenuBarEditor::dropEvent ( QDropEvent ) [protected, virtual]

This event handler is called when the drag is dropped on this widget.

See the Drag-and-drop documentation for an overview of how to provide drag-and-drop in your application.

Ver también:
QTextDrag, QImageDrag, QDropEvent

Reimplementado de QWidget.

void MenuBarEditor::dropInPlace ( MenuBarEditorItem i,
const QPoint pos 
) [protected]
void MenuBarEditor::enterEditMode ( ) [protected]
bool MenuBarEditor::eventFilter ( QObject ,
QEvent  
) [protected, 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 QMenuBar.

void MenuBarEditor::exchange ( int  a,
int  b 
)
int MenuBarEditor::findItem ( MenuBarEditorItem item)
int MenuBarEditor::findItem ( QPoint pos)
int MenuBarEditor::findItem ( PopupMenuEditor menu)
void MenuBarEditor::focusItem ( int  index = -1)
void MenuBarEditor::focusOutEvent ( QFocusEvent ) [protected, virtual]

Reimplementado de QMenuBar.

FormWindow * MenuBarEditor::formWindow ( )
int MenuBarEditor::heightForWidth ( int  max_width) const [virtual]

Returns the height that the menu would resize itself to if its parent (and hence itself) resized to the given max_width. This can be useful for simple layout tasks in which the height of the menu bar is needed after items have been inserted. See showimg/showimg.cpp for an example of the usage.

Reimplementado de QMenuBar.

void MenuBarEditor::hideItem ( int  index = -1)
void MenuBarEditor::insertItem ( QString  text,
PopupMenuEditor menu,
int  index = -1 
)
void MenuBarEditor::insertItem ( QString  text,
QActionGroup group,
int  index = -1 
)
void MenuBarEditor::insertItem ( MenuBarEditorItem item,
int  index = -1 
)
void MenuBarEditor::insertSeparator ( int  index = -1)

Inserts a separator at position index, and returns the menu identifier number allocated to it. The separator becomes the last menu item if index is negative.

In a popup menu a separator is rendered as a horizontal line. In a Motif menu bar a separator is spacing, so the rest of the items (normally just "Help") are drawn right-justified. In a Windows menu bar separators are ignored (to comply with the Windows style guidelines).

Reimplementado de QMenuData.

MenuBarEditorItem * MenuBarEditor::item ( int  index = -1)
QPoint MenuBarEditor::itemPos ( int  index) [protected]
QSize MenuBarEditor::itemSize ( MenuBarEditorItem i) [protected]
void MenuBarEditor::keyPressEvent ( QKeyEvent e) [protected, virtual]

Reimplementado de QMenuBar.

void MenuBarEditor::leaveEditMode ( ) [protected]
QSize MenuBarEditor::minimumSize ( ) const [inline]

Reimplementado de QMenuBar.

QSize MenuBarEditor::minimumSizeHint ( ) const [inline, virtual]

Reimplementado de QMenuBar.

void MenuBarEditor::mouseDoubleClickEvent ( QMouseEvent e) [protected, virtual]

This event handler, for event e, can be reimplemented in a subclass to receive mouse double click events for the widget.

The default implementation generates a normal mouse press event.

Note that the widgets gets a mousePressEvent() and a mouseReleaseEvent() before the mouseDoubleClickEvent().

Ver también:
mousePressEvent(), mouseReleaseEvent() mouseMoveEvent(), event(), QMouseEvent

Reimplementado de QWidget.

void MenuBarEditor::mouseMoveEvent ( QMouseEvent e) [protected, virtual]

Reimplementado de QMenuBar.

void MenuBarEditor::mousePressEvent ( QMouseEvent e) [protected, virtual]

Reimplementado de QMenuBar.

void MenuBarEditor::navigateLeft ( bool  ctrl) [protected]
void MenuBarEditor::navigateRight ( bool  ctrl) [protected]
void MenuBarEditor::paintEvent ( QPaintEvent event) [protected, virtual]

Processes the paint event event.

Paints the frame and the contents.

Opens the painter on the frame and calls drawFrame(), then drawContents().

Reimplementado de QFrame.

void MenuBarEditor::paste ( ) [slot]
void MenuBarEditor::paste ( int  index)
void MenuBarEditor::removeItem ( MenuBarEditorItem item)
void MenuBarEditor::removeItemAt ( int  index)

Removes the menu item at position index.

Ver también:
removeItem(), clear()

Reimplementado de QMenuData.

void MenuBarEditor::resizeEvent ( QResizeEvent e) [inline, protected, virtual]

Reimplementado de QMenuBar.

void MenuBarEditor::resizeInternals ( ) [protected]
void MenuBarEditor::safeDec ( ) [protected]
void MenuBarEditor::safeInc ( ) [protected]
void MenuBarEditor::show ( ) [virtual]

Reimplements QWidget::show() in order to set up the correct keyboard accelerators and to raise itself to the top of the widget stack.

Reimplementado de QMenuBar.

void MenuBarEditor::showItem ( int  index = -1)
void MenuBarEditor::showLineEdit ( int  index = -1)
QSize MenuBarEditor::sizeHint ( ) const [virtual]

Reimplementado de QMenuBar.

QPoint MenuBarEditor::snapToItem ( const QPoint pos) [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'