Qtopia Home - Classes - Annotated - Functions - Qt Embedded |
|
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-2003 Trolltech AS. All rights reserved.
**
** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** 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/gpl/ for GPL licensing information.
**
** 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 *);
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 © 2001-2004 Trolltech | Trademarks | Qtopia version 2.0.1
|