Updated the README file with some contributor tips.
[basket4.git] / src / focusedwidgets.h
blob657d1d4116629b2010f17e699907564e454af38b
1 /***************************************************************************
2 * Copyright (C) 2003 by Sébastien Laoût *
3 * slaout@linux62.org *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #ifndef FOCUSEDWIDGETS_H
22 #define FOCUSEDWIDGETS_H
24 #include <ktextedit.h>
25 #include <kcolorcombo.h>
26 #include <kfontcombo.h>
27 #include <kcombobox.h>
28 #include <klineedit.h>
29 #include <kapplication.h>
30 #include <qclipboard.h>
31 //Added by qt3to4:
32 #include <Q3PopupMenu>
33 #include <QKeyEvent>
34 #include <QEvent>
35 #include <QWheelEvent>
37 class FocusedTextEdit : public KTextEdit
39 Q_OBJECT
40 public:
41 FocusedTextEdit(bool disableUpdatesOnKeyPress, QWidget *parent = 0, const char *name = 0);
42 ~FocusedTextEdit();
43 void paste();
44 QTextCursor* textCursor() const;
45 protected:
46 void adaptClipboardText(QClipboard::Mode mode);
47 void keyPressEvent(QKeyEvent *event);
48 void wheelEvent(QWheelEvent *event);
49 void enterEvent(QEvent *event);
50 Q3PopupMenu* createPopupMenu(const QPoint &pos);
51 signals:
52 void escapePressed();
53 void mouseEntered();
54 private:
55 bool m_disableUpdatesOnKeyPress;
58 // TODO: Rename to EscapableKColorCombo
59 class FocusedColorCombo : public KColorCombo
61 Q_OBJECT
62 public:
63 FocusedColorCombo(QWidget *parent = 0, const char *name = 0);
64 ~FocusedColorCombo();
65 protected:
66 void keyPressEvent(QKeyEvent *event);
67 signals:
68 void escapePressed();
69 void returnPressed2();
72 // TODO: Rename to EscapableKFontCombo
73 class FocusedFontCombo : public KFontCombo
75 Q_OBJECT
76 public:
77 FocusedFontCombo(QWidget *parent = 0, const char *name = 0);
78 ~FocusedFontCombo();
79 protected:
80 void keyPressEvent(QKeyEvent *event);
81 signals:
82 void escapePressed();
83 void returnPressed2();
86 // TODO: Rename to EscapableKComboBox
87 class FocusedComboBox : public KComboBox
89 Q_OBJECT
90 public:
91 FocusedComboBox(QWidget *parent = 0, const char *name = 0);
92 ~FocusedComboBox();
93 protected:
94 void keyPressEvent(QKeyEvent *event);
95 signals:
96 void escapePressed();
97 void returnPressed2();
100 // TODO: Rename to EscapableKLineEdit
101 class FocusedLineEdit : public KLineEdit
103 Q_OBJECT
104 public:
105 FocusedLineEdit(QWidget *parent = 0, const char *name = 0);
106 ~FocusedLineEdit();
107 protected:
108 void keyPressEvent(QKeyEvent *event);
109 void enterEvent(QEvent *event);
110 signals:
111 void escapePressed();
112 void mouseEntered();
115 #endif // FOCUSEDWIDGETS_H