|
AlbumShaper
1.0a3
|
#include <photoDescEdit.h>


Signals | |
| void | finished () |
Public Member Functions | |
| TextEdit (QWidget *parent=0, const char *name=0) | |
| void | paintNow () |
Protected Member Functions | |
| void | keyPressEvent (QKeyEvent *e) |
| void | focusOutEvent (QFocusEvent *) |
| QPopupMenu * | createPopupMenu (const QPoint &pos) |
Private Slots | |
| void | contextMenuHiding () |
Private Attributes | |
| QPopupMenu * | contextMenu |
Definition at line 126 of file photoDescEdit.h.
| TextEdit::TextEdit | ( | QWidget * | parent = 0, |
| const char * | name = 0 |
||
| ) |
Definition at line 565 of file photoDescEdit.cpp.
References contextMenu.
: QTextEdit(parent,name) { setHScrollBarMode( QScrollView::AlwaysOff ); setTextFormat( Qt::PlainText ); contextMenu = NULL; }
| void TextEdit::contextMenuHiding | ( | ) | [private, slot] |
Definition at line 612 of file photoDescEdit.cpp.
References contextMenu.
Referenced by createPopupMenu().
{
//clear context menu handle since it's disappearing
disconnect( ((QObject*)contextMenu), SIGNAL(aboutToHide()),
this, SLOT(contextMenuHiding()) );
contextMenu = NULL;
}
| QPopupMenu * TextEdit::createPopupMenu | ( | const QPoint & | pos | ) | [protected] |
Definition at line 603 of file photoDescEdit.cpp.
References contextMenu, and contextMenuHiding().
{
//when context menu's are created store their handle
contextMenu = QTextEdit::createPopupMenu( pos );
connect( ((QObject*)contextMenu), SIGNAL(aboutToHide()),
this, SLOT(contextMenuHiding()) );
return contextMenu;
}
| void TextEdit::finished | ( | ) | [signal] |
Referenced by focusOutEvent(), and keyPressEvent().
| void TextEdit::focusOutEvent | ( | QFocusEvent * | ) | [protected] |
Definition at line 596 of file photoDescEdit.cpp.
References contextMenu, and finished().
{
//if user right clicked on text field a context menu is popping up so ignore focusOut.
//otherwise user has clicked off photo description so close
if( contextMenu == NULL ) emit finished();
}
| void TextEdit::keyPressEvent | ( | QKeyEvent * | e | ) | [protected] |
Definition at line 578 of file photoDescEdit.cpp.
References finished().
{
//finish when user hits escape
if( e->key() == Qt::Key_Escape )
{
emit finished();
}
//if Ctrl+A then select all text, otherwise, apply base class key press rules
else if( (e->state() & Qt::ControlButton) && e->key() == Qt::Key_A )
{
selectAll();
}
else
{
QTextEdit::keyPressEvent( e );
}
}
| void TextEdit::paintNow | ( | ) |
Definition at line 572 of file photoDescEdit.cpp.
Referenced by PhotoDescEdit::PhotoDescEdit().
{
constPolish();
repaint( rect(), false );
}
QPopupMenu* TextEdit::contextMenu [private] |
Definition at line 135 of file photoDescEdit.h.
Referenced by contextMenuHiding(), createPopupMenu(), focusOutEvent(), and TextEdit().
1.7.5.1