00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00018
00019
00020
00021
#ifndef QMYLISTBOX_H
00022
#define QMYLISTBOX_H
00023
00024
00025
00027
#include <qlistbox.h>
00028
00029
00030
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