#include <photoDescEdit.h>
Inheritance diagram for TextEdit:


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 565 of file photoDescEdit.cpp. References contextMenu. 00565 : QTextEdit(parent,name) 00566 { 00567 setHScrollBarMode( QScrollView::AlwaysOff ); 00568 setTextFormat( Qt::PlainText ); 00569 contextMenu = NULL; 00570 }
|
|
|
Definition at line 612 of file photoDescEdit.cpp. References contextMenu. Referenced by createPopupMenu(). 00613 {
00614 //clear context menu handle since it's disappearing
00615 disconnect( ((QObject*)contextMenu), SIGNAL(aboutToHide()),
00616 this, SLOT(contextMenuHiding()) );
00617 contextMenu = NULL;
00618 }
|
|
|
Definition at line 603 of file photoDescEdit.cpp. References contextMenu, and contextMenuHiding(). 00604 {
00605 //when context menu's are created store their handle
00606 contextMenu = QTextEdit::createPopupMenu( pos );
00607 connect( ((QObject*)contextMenu), SIGNAL(aboutToHide()),
00608 this, SLOT(contextMenuHiding()) );
00609 return contextMenu;
00610 }
|
|
|
Referenced by focusOutEvent(), and keyPressEvent(). |
|
|
Definition at line 596 of file photoDescEdit.cpp. References contextMenu, and finished(). 00597 {
00598 //if user right clicked on text field a context menu is popping up so ignore focusOut.
00599 //otherwise user has clicked off photo description so close
00600 if( contextMenu == NULL ) emit finished();
00601 }
|
|
|
Definition at line 578 of file photoDescEdit.cpp. References finished(). 00579 {
00580 //finish when user hits escape
00581 if( e->key() == Qt::Key_Escape )
00582 {
00583 emit finished();
00584 }
00585 //if Ctrl+A then select all text, otherwise, apply base class key press rules
00586 else if( (e->state() & Qt::ControlButton) && e->key() == Qt::Key_A )
00587 {
00588 selectAll();
00589 }
00590 else
00591 {
00592 QTextEdit::keyPressEvent( e );
00593 }
00594 }
|
|
|
Definition at line 572 of file photoDescEdit.cpp. Referenced by PhotoDescEdit::PhotoDescEdit(). 00573 {
00574 constPolish();
00575 repaint( rect(), false );
00576 }
|
|
|
Definition at line 135 of file photoDescEdit.h. Referenced by contextMenuHiding(), createPopupMenu(), focusOutEvent(), and TextEdit(). |
1.3.9.1