Qtopia Home - Classes - Hierachy - Annotated - Functions - Licenses - Reference |
|
This is the verbatim text of the contextmenu.h include file. It is provided only for illustration; the copyright remains with Trolltech.
/**********************************************************************
** Copyright (C) 2000-2005 Trolltech AS. All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** Licensees holding a valid license agreement from Trolltech or any of its
** authorized distributors may use this file in accordance with
** the License Agreement provided with the Licensed Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
** information about Trolltech's Commercial License Agreements.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
#ifndef CONTEXT_MENU_H
#define CONTEXT_MENU_H
#include <qpopupmenu.h>
#ifdef QTOPIA_PHONE
class QPopupMenu;
class ContextMenuData;
class QAction;
class ContextMenu : public QPopupMenu
{
Q_OBJECT
public:
enum EditingState {
Modal=1, NonModal=2
};
ContextMenu(QWidget *parent=0, const char *name=0, int state=0);
~ContextMenu();
void setEnableHelp(bool b);
void addTo(QWidget *w, int state=0);
void removeFrom(QWidget *w, int state=0);
void insertAction(QAction *, int idx=-1);
void addAction(QAction *);
void popup();
void popup(const QPoint &pos);
virtual bool helpExists() const;
static int key();
static ContextMenu *menuFor(QWidget *w, int state=0);
public slots:
virtual void help();
protected:
bool eventFilter(QObject *o, QEvent *e);
void keyPressEvent(QKeyEvent *);
void keyReleaseEvent(QKeyEvent *);
void mouseReleaseEvent(QMouseEvent *);
private slots:
void editMenuActivated(int);
void widgetDestroyed();
private:
void init();
static ContextMenu *internalMenuFor(QWidget *w, int state);
static ContextMenu *createEditMenu(QWidget *w, int state);
private:
ContextMenuData *d;
friend class QPEApplication;
};
#endif
#endif
| Copyright © 2005 Trolltech | Trademarks | Qtopia version 2.2.0
|