Kexi API Documentation (2.0 alpha)

KexiDBWidgetContextMenuExtender Class Reference

#include <kexidbutils.h>

List of all members.


Detailed Description

Used for extending editor widgets' context menu.

Definition at line 31 of file kexidbutils.h.

Public Member Functions

 KexiDBWidgetContextMenuExtender (QObject *parent, KexiDataItemInterface *iface)
 ~KexiDBWidgetContextMenuExtender ()
void createTitle (QPopupMenu *menu)
 Creates title for context menu menu.
void updatePopupMenuActions ()
 Enables or disables context menu actions that can modify the value.

Static Public Member Functions

static bool updateContextMenuTitleForDataItem (QPopupMenu *menu, KexiDataItemInterface *iface, const QString &icon=QString::null)

Protected Attributes

KexiDataItemInterfacem_iface
QGuardedPtr< QPopupMenu > m_contextMenu
bool m_contextMenuHasTitle
 true if KPopupTitle has been added to the context menu.


Constructor & Destructor Documentation

KexiDBWidgetContextMenuExtender::KexiDBWidgetContextMenuExtender QObject *  parent,
KexiDataItemInterface iface
 

Definition at line 38 of file kexidbutils.cpp.

KexiDBWidgetContextMenuExtender::~KexiDBWidgetContextMenuExtender  ) 
 

Definition at line 45 of file kexidbutils.cpp.


Member Function Documentation

void KexiDBWidgetContextMenuExtender::createTitle QPopupMenu *  menu  ) 
 

Creates title for context menu menu.

Definition at line 49 of file kexidbutils.cpp.

References KexiFormPart::library(), m_contextMenu, m_contextMenuHasTitle, m_iface, updatePopupMenuActions(), and KexiImageContextMenu::updateTitle().

Referenced by KexiDBTextEdit::createPopupMenu(), and KexiDBLineEdit::createPopupMenu().

static bool KexiDBWidgetContextMenuExtender::updateContextMenuTitleForDataItem QPopupMenu *  menu,
KexiDataItemInterface iface,
const QString icon = QString::null
[static]
 

Updates title for context menu based on data item iface caption or name Used in createTitle(QPopupMenu *menu) and KexiDBImageBox.

Returns:
true is the title has been added.

void KexiDBWidgetContextMenuExtender::updatePopupMenuActions  ) 
 

Enables or disables context menu actions that can modify the value.

The menu has to be previously provided by createTitle().

Definition at line 70 of file kexidbutils.cpp.

References KexiDataItemInterface::isReadOnly(), m_contextMenu, m_contextMenuHasTitle, and m_iface.

Referenced by createTitle(), and KexiDBLineEdit::setReadOnly().


Member Data Documentation

QGuardedPtr<QPopupMenu> KexiDBWidgetContextMenuExtender::m_contextMenu [protected]
 

Definition at line 52 of file kexidbutils.h.

Referenced by createTitle(), and updatePopupMenuActions().

bool KexiDBWidgetContextMenuExtender::m_contextMenuHasTitle [protected]
 

true if KPopupTitle has been added to the context menu.

Definition at line 53 of file kexidbutils.h.

Referenced by createTitle(), and updatePopupMenuActions().

KexiDataItemInterface* KexiDBWidgetContextMenuExtender::m_iface [protected]
 

Definition at line 51 of file kexidbutils.h.

Referenced by createTitle(), and updatePopupMenuActions().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:50:33 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003