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
758 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 {
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