Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

TextEdit Class Reference

#include <photoDescEdit.h>

Inheritance diagram for TextEdit:

[legend]
Collaboration diagram for TextEdit:
[legend]
List of all members.

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

Constructor & Destructor Documentation

TextEdit::TextEdit QWidget parent = 0,
const char *  name = 0
 

Definition at line 565 of file photoDescEdit.cpp.

References contextMenu, and TextEdit().

Referenced by TextEdit().

00565 : QTextEdit(parent,name) 00566 { 00567 setHScrollBarMode( QScrollView::AlwaysOff ); 00568 setTextFormat( Qt::PlainText ); 00569 contextMenu = NULL; 00570 }


Member Function Documentation

void TextEdit::contextMenuHiding  )  [private, slot]
 

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 }

QPopupMenu * TextEdit::createPopupMenu const QPoint &  pos  )  [protected]
 

Definition at line 603 of file photoDescEdit.cpp.

References contextMenu, contextMenuHiding(), and createPopupMenu().

Referenced by createPopupMenu().

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 }

void TextEdit::finished  )  [signal]
 

Referenced by focusOutEvent(), and keyPressEvent().

void TextEdit::focusOutEvent QFocusEvent *   )  [protected]
 

Definition at line 596 of file photoDescEdit.cpp.

References contextMenu, finished(), and focusOutEvent().

Referenced by focusOutEvent().

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 }

void TextEdit::keyPressEvent QKeyEvent *  e  )  [protected]
 

Definition at line 578 of file photoDescEdit.cpp.

References finished(), and keyPressEvent().

Referenced by keyPressEvent().

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 }

void TextEdit::paintNow  ) 
 

Definition at line 572 of file photoDescEdit.cpp.

Referenced by PhotoDescEdit::PhotoDescEdit().

00573 { 00574 constPolish(); 00575 repaint( rect(), false ); 00576 }


Member Data Documentation

QPopupMenu* TextEdit::contextMenu [private]
 

Definition at line 135 of file photoDescEdit.h.

Referenced by contextMenuHiding(), createPopupMenu(), focusOutEvent(), and TextEdit().


The documentation for this class was generated from the following files:
Generated on Sun Mar 4 19:43:10 2007 for AlbumShaper by doxygen 1.3.7