libtdepim

clicklineedit.h
1 /*
2  This file is part of libtdepim.
3  Copyright (c) 2004 Daniel Molkentin <molkentin@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library 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 GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef CLICKLINEEDIT_H
22 #define CLICKLINEEDIT_H
23 
24 #include <klineedit.h>
25 #include <kdemacros.h>
26 
27 namespace KPIM {
28 
36 class TDE_EXPORT ClickLineEdit : public KLineEdit
37 {
38  TQ_OBJECT
39 
40  TQ_PROPERTY( TQString clickMessage READ clickMessage WRITE setClickMessage )
41  public:
42  ClickLineEdit( TQWidget *parent, const TQString &msg = TQString(), const char* name = 0 );
43  ~ClickLineEdit();
44 
45  void setClickMessage( const TQString &msg );
46  TQString clickMessage() const { return mClickMessage; }
47 
48  virtual void setText( const TQString& txt );
49 
50  protected:
51  virtual void drawContents( TQPainter *p );
52  virtual void focusInEvent( TQFocusEvent *ev );
53  virtual void focusOutEvent( TQFocusEvent *ev );
54 
55  private:
56  TQString mClickMessage;
57  bool mDrawClickMsg;
58 
59 };
60 
61 }
62 
63 #endif // CLICKLINEEDIT_H
64 
65 
This class provides a KLineEdit which contains a greyed-out hinting text as long as the user didn't e...
Definition: clicklineedit.h:37
TDEPIM classes for drag and drop of mails.