Fix crash on logout
[kdenetwork.git] / ksirc / ahistlineedit.h
blob98b76edb226b7d2228f87d3bea33ec2c1c5879f6
1 #ifndef AHISTLINEEDIT_H
2 #define AHISTLINEEDIT_H
4 #include <q3textedit.h>
5 #include <qstringlist.h>
6 #include <qsize.h>
7 //Added by qt3to4:
8 #include <QFocusEvent>
9 #include <QKeyEvent>
10 #include <QEvent>
11 #include <QPaintEvent>
13 class aHistLineEdit : public Q3TextEdit
15 Q_OBJECT
16 public:
17 aHistLineEdit(QWidget *parent = 0, const char *name = 0);
19 int cursorPosition () const;
20 void setCursorPosition(int);
22 QString text() const;
24 signals:
25 // Don't use returnPressed from the textEdit
26 void gotReturnPressed();
27 void gotFocus();
28 void lostFocus();
29 void pasteText(const QString&);
30 void notTab();
31 void resized();
33 public slots:
34 virtual void paste();
35 virtual void slotMaybeResize();
37 protected:
38 bool processKeyEvent( QKeyEvent * );
39 virtual void keyPressEvent ( QKeyEvent * );
40 virtual void focusInEvent ( QFocusEvent * );
41 virtual void focusOutEvent ( QFocusEvent * );
42 // virtual void mousePressEvent ( QMouseEvent * );
44 virtual bool eventFilter( QObject *o, QEvent *e );
46 virtual void paintEvent ( QPaintEvent * );
48 private:
50 void doEnterKey();
52 QStringList hist;
53 QStringList::Iterator current;
54 void ColourPickerPopUp();
55 int m_height;
57 bool m_drawrect;
61 #endif