|
|
|
#ifndef ENTER_COMBO_H
|
|
|
|
#define ENTER_COMBO_H
|
|
|
|
|
|
|
|
#include <tqcombobox.h>
|
|
|
|
#include <tqevent.h>
|
|
|
|
#include <tqkeycode.h>
|
|
|
|
#include <tqlineedit.h>
|
|
|
|
|
|
|
|
#undef KeyPress // X headers...
|
|
|
|
|
|
|
|
class EnterCombo : public TQComboBox {
|
|
|
|
Q_OBJECT
|
|
|
|
TQ_OBJECT
|
|
|
|
public:
|
|
|
|
EnterCombo ( TQWidget * tqparent=0, const char * name=0 )
|
|
|
|
: TQComboBox(TRUE, tqparent, name)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
EnterCombo ( bool rw, TQWidget * tqparent=0, const char * name=0 )
|
|
|
|
: TQComboBox(rw, tqparent, name)
|
|
|
|
{
|
|
|
|
TQKeyEvent ke(TQEvent::KeyPress, SHIFT|Key_Home, 0, 0);
|
|
|
|
keyPressEvent(&ke);
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void show(){
|
|
|
|
TQComboBox::show();
|
|
|
|
lineEdit()->selectAll();
|
|
|
|
}
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void enterPressed();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void keyPressEvent( TQKeyEvent *e );
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|