Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

QMyListBox.h

Go to the documentation of this file.
00001 
00002 //
00003 //  Filename    : QMyListBox.h
00004 //  Class       : QMyListBox
00005 //
00006 //  Author(s)   : Markus Janich
00007 //
00008 //  Description : Class QMyListBox
00009 //  Purpose     : Adds edit mode to the standard QListBox of Qt
00010 //
00011 //  Date        : March 2001
00012 //
00013 //  Updates     :    who    | date   | what
00014 //                ----------+--------+-------------------------------------
00015 //                          |        |
00016 //
00018 
00019 
00020 
00021 #ifndef QMYLISTBOX_H
00022 #define QMYLISTBOX_H
00023 
00024 
00025 // Qt
00027 #include <qlistbox.h>
00028 
00029 
00030 // Forward declarations
00032 class QLineEdit;
00033 
00034 
00035 
00042 class QMyListBox : public QListBox {
00043   Q_OBJECT 
00044 
00045 public:
00046   QMyListBox(QWidget *parent=0, const char *name=0, WFlags f=0);
00047 
00049   void enableEditMode(bool fOnOff = true);
00050 
00051 
00052 signals:
00055   void sigReturnPressed(int);
00056 
00057 protected slots:
00058 
00061   void sltCatchPressed(QListBoxItem *pqItem);
00064   void sltEditItem(QListBoxItem *pqItem);
00066   void sltChangeItem();
00067 
00068 protected:
00071   void resizeEvent(QResizeEvent *pqEvent);
00072 
00073 private:
00074 
00075   bool m_firstMousePress;
00076   bool m_fEditable;
00077   QListBoxItem *m_pqItem;
00078   QLineEdit *m_pqEditField;
00079   int m_nItemIndex;
00080 };
00081 
00082 #endif  // QMYLISTBOX_H

Generated on Wed Sep 14 04:50:34 2005 for QGLViewer by  doxygen 1.4.4