author | alwin <alwin> | 2004-08-01 16:20:38 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-08-01 16:20:38 (UTC) |
commit | e9f9eb19567a2afa354c36490ee8f4b191cf9395 (patch) (unidiff) | |
tree | 264557433a4acf15e9bde6ab800d4a8df362d70e /libopie2/opiecore/okeyfilter.cpp | |
parent | 67e2e98457418bc491efd2d4567f851e77a0441a (diff) | |
download | opie-e9f9eb19567a2afa354c36490ee8f4b191cf9395.zip opie-e9f9eb19567a2afa354c36490ee8f4b191cf9395.tar.gz opie-e9f9eb19567a2afa354c36490ee8f4b191cf9395.tar.bz2 |
made interface binary clean eg. inst() returns a hidden class
documentation
Diffstat (limited to 'libopie2/opiecore/okeyfilter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/okeyfilter.cpp | 53 |
1 files changed, 39 insertions, 14 deletions
diff --git a/libopie2/opiecore/okeyfilter.cpp b/libopie2/opiecore/okeyfilter.cpp index d806dbd..b064272 100644 --- a/libopie2/opiecore/okeyfilter.cpp +++ b/libopie2/opiecore/okeyfilter.cpp | |||
@@ -35,13 +35,24 @@ namespace Core { | |||
35 | 35 | ||
36 | QValueList<QWSServer::KeyboardFilter*> OKeyFilter::filterList; | 36 | class OKeyFilterPrivate:public OKeyFilter, QWSServer::KeyboardFilter |
37 | QValueList<QWSServer::KeyboardFilter*> OKeyFilter::preFilterList; | 37 | { |
38 | static QValueList<QWSServer::KeyboardFilter*> filterList; | ||
39 | static QValueList<QWSServer::KeyboardFilter*> preFilterList; | ||
40 | protected: | ||
41 | OKeyFilterPrivate(const OKeyFilterPrivate&):OKeyFilter(),QWSServer::KeyboardFilter(){}; | ||
42 | virtual void addPreHandler(QWSServer::KeyboardFilter*); | ||
43 | virtual void remPreHandler(QWSServer::KeyboardFilter*); | ||
44 | |||
45 | public: | ||
46 | OKeyFilterPrivate(); | ||
47 | virtual ~OKeyFilterPrivate(); | ||
48 | virtual bool filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); | ||
49 | virtual void addHandler(QWSServer::KeyboardFilter*); | ||
50 | virtual void remHandler(QWSServer::KeyboardFilter*); | ||
51 | }; | ||
52 | |||
53 | QValueList<QWSServer::KeyboardFilter*> OKeyFilterPrivate::filterList; | ||
54 | QValueList<QWSServer::KeyboardFilter*> OKeyFilterPrivate::preFilterList; | ||
38 | 55 | ||
39 | OKeyFilter::OKeyFilter() | 56 | OKeyFilter::OKeyFilter() |
40 | :QWSServer::KeyboardFilter() | ||
41 | { | 57 | { |
42 | filterList.clear(); | ||
43 | preFilterList.clear(); | ||
44 | if ( isQWS( ) ) { | ||
45 | QWSServer::setKeyboardFilter ( this ); | ||
46 | } | ||
47 | } | 58 | } |
@@ -56,3 +67,3 @@ OKeyFilter* OKeyFilter::inst() | |||
56 | if (!ofilter) { | 67 | if (!ofilter) { |
57 | ofilter = new OKeyFilter; | 68 | ofilter = new OKeyFilterPrivate; |
58 | } | 69 | } |
@@ -61,3 +72,3 @@ OKeyFilter* OKeyFilter::inst() | |||
61 | 72 | ||
62 | bool OKeyFilter::filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) | 73 | bool OKeyFilterPrivate::filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) |
63 | { | 74 | { |
@@ -77,3 +88,3 @@ bool OKeyFilter::filter( int unicode, int keycode, int modifiers, bool isPress, | |||
77 | 88 | ||
78 | void OKeyFilter::addHandler(QWSServer::KeyboardFilter*aF) | 89 | void OKeyFilterPrivate::addHandler(QWSServer::KeyboardFilter*aF) |
79 | { | 90 | { |
@@ -86,3 +97,3 @@ void OKeyFilter::addHandler(QWSServer::KeyboardFilter*aF) | |||
86 | 97 | ||
87 | void OKeyFilter::remHandler(QWSServer::KeyboardFilter*aF) | 98 | void OKeyFilterPrivate::remHandler(QWSServer::KeyboardFilter*aF) |
88 | { | 99 | { |
@@ -96,3 +107,3 @@ void OKeyFilter::remHandler(QWSServer::KeyboardFilter*aF) | |||
96 | 107 | ||
97 | void OKeyFilter::addPreHandler(QWSServer::KeyboardFilter*aF) | 108 | void OKeyFilterPrivate::addPreHandler(QWSServer::KeyboardFilter*aF) |
98 | { | 109 | { |
@@ -105,3 +116,3 @@ void OKeyFilter::addPreHandler(QWSServer::KeyboardFilter*aF) | |||
105 | 116 | ||
106 | void OKeyFilter::remPreHandler(QWSServer::KeyboardFilter*aF) | 117 | void OKeyFilterPrivate::remPreHandler(QWSServer::KeyboardFilter*aF) |
107 | { | 118 | { |
@@ -115,2 +126,16 @@ void OKeyFilter::remPreHandler(QWSServer::KeyboardFilter*aF) | |||
115 | 126 | ||
127 | OKeyFilterPrivate::OKeyFilterPrivate() | ||
128 | :OKeyFilter(),QWSServer::KeyboardFilter() | ||
129 | { | ||
130 | filterList.clear(); | ||
131 | preFilterList.clear(); | ||
132 | if ( isQWS( ) ) { | ||
133 | QWSServer::setKeyboardFilter ( this ); | ||
134 | } | ||
135 | } | ||
136 | |||
137 | OKeyFilterPrivate::~OKeyFilterPrivate() | ||
138 | { | ||
139 | } | ||
140 | |||
116 | /* namespace Core */ | 141 | /* namespace Core */ |