You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdenetwork/ksirc/KSOpenkSirc/enter_combo.h

39 lines
742 B

#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 {
TQ_OBJECT
public:
EnterCombo ( TQWidget * parent=0, const char * name=0 )
: TQComboBox(TRUE, parent, name)
{
}
EnterCombo ( bool rw, TQWidget * parent=0, const char * name=0 )
: TQComboBox(rw, parent, 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