diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-18 20:56:45 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-08-18 20:56:45 +0000 |
commit | c851eb75951d64470bfa479ffc801f950dab1c6f (patch) | |
tree | 9e8a2cd7ba762042b4e1708fef696dad2e33e733 /kicker/kicker/ui/clicklineedit.h | |
parent | a5edd20f0de599dbe7f7f00a184b78ac5156a846 (diff) | |
download | tdebase-c851eb75951d64470bfa479ffc801f950dab1c6f.tar.gz tdebase-c851eb75951d64470bfa479ffc801f950dab1c6f.zip |
Added search function to Kicker
Closes bug 221
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1165317 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kicker/kicker/ui/clicklineedit.h')
-rw-r--r-- | kicker/kicker/ui/clicklineedit.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/kicker/kicker/ui/clicklineedit.h b/kicker/kicker/ui/clicklineedit.h new file mode 100644 index 000000000..cadafae4c --- /dev/null +++ b/kicker/kicker/ui/clicklineedit.h @@ -0,0 +1,63 @@ +/* + This file is part of libkdepim. + Copyright (c) 2004 Daniel Molkentin <molkentin@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#ifndef CLICKLINEEDIT_H +#define CLICKLINEEDIT_H + +#include <klineedit.h> + + +namespace KPIM { + +/** + This class provides a KLineEdit which contains a greyed-out hinting + text as long as the user didn't enter any text + + @short LineEdit with customizable "Click here" text + @author Daniel Molkentin +*/ +class KDE_EXPORT ClickLineEdit : public KLineEdit +{ + Q_OBJECT + public: + ClickLineEdit( TQWidget *parent, const TQString &msg = TQString::null, const char* name = 0 ); + ~ClickLineEdit(); + + void setClickMessage( const TQString &msg ); + TQString clickMessage() const { return mClickMessage; } + + virtual void setText( const TQString& txt ); + + protected: + virtual void drawContents( TQPainter *p ); + virtual void focusInEvent( TQFocusEvent *ev ); + virtual void focusOutEvent( TQFocusEvent *ev ); + + private: + TQString mClickMessage; + bool mDrawClickMsg; + +}; + +} + +#endif // CLICKLINEEDIT_H + + |