libtdepim

krsqueezedtextlabel.h
1/* This file has been copied from the KDE libraries and slightly modified.
2 This can be removed as soon as tdelibs provides the same functionality.
3
4 Copyright (C) 2000 Ronny Standtke <Ronny.Standtke@gmx.de>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
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 KRSQUEEZEDTEXTLABEL_H
22#define KRSQUEEZEDTEXTLABEL_H
23
24#include <tqlabel.h>
25#include <tdemacros.h>
26
38/*
39 * TQLabel
40 */
41class TDE_EXPORT KRSqueezedTextLabel : public TQLabel {
42 TQ_OBJECT
43
44
45public:
49 KRSqueezedTextLabel( TQWidget *parent, const char *name = 0 );
50 KRSqueezedTextLabel( const TQString &text, TQWidget *parent, const char *name = 0 );
51
52 virtual TQSize minimumSizeHint() const;
53 virtual TQSize sizeHint() const;
57 virtual void setAlignment( int );
58
59public slots:
60 void setText( const TQString & );
61
62protected:
66 void resizeEvent( TQResizeEvent * );
70 void squeezeTextToLabel();
71 TQString fullText;
72
73};
74
75#endif // KRSQUEEZEDTEXTLABEL_H
A replacement for TQLabel that squeezes its text.