author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/kdeui/ksqueezedtextlabel.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-p1.zip kdepimpi-p1.tar.gz kdepimpi-p1.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'microkde/kdeui/ksqueezedtextlabel.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kdeui/ksqueezedtextlabel.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/microkde/kdeui/ksqueezedtextlabel.h b/microkde/kdeui/ksqueezedtextlabel.h index 1634adc..487d0b0 100644 --- a/microkde/kdeui/ksqueezedtextlabel.h +++ b/microkde/kdeui/ksqueezedtextlabel.h | |||
@@ -1,70 +1,72 @@ | |||
1 | /* This file is part of the KDE libraries | 1 | /* This file is part of the KDE libraries |
2 | Copyright (C) 2000 Ronny Standtke <Ronny.Standtke@gmx.de> | 2 | Copyright (C) 2000 Ronny Standtke <Ronny.Standtke@gmx.de> |
3 | 3 | ||
4 | This library is free software; you can redistribute it and/or | 4 | This library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Library General Public | 5 | modify it under the terms of the GNU Library General Public |
6 | License version 2 as published by the Free Software Foundation. | 6 | License version 2 as published by the Free Software Foundation. |
7 | 7 | ||
8 | This library is distributed in the hope that it will be useful, | 8 | This library is distributed in the hope that it will be useful, |
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11 | Library General Public License for more details. | 11 | Library General Public License for more details. |
12 | 12 | ||
13 | You should have received a copy of the GNU Library General Public License | 13 | You should have received a copy of the GNU Library General Public License |
14 | along with this library; see the file COPYING.LIB. If not, write to | 14 | along with this library; see the file COPYING.LIB. If not, write to |
15 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 15 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
16 | Boston, MA 02111-1307, USA. | 16 | Boston, MA 02111-1307, USA. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #ifndef KSQUEEZEDTEXTLABEL_H | 19 | #ifndef KSQUEEZEDTEXTLABEL_H |
20 | #define KSQUEEZEDTEXTLABEL_H | 20 | #define KSQUEEZEDTEXTLABEL_H |
21 | 21 | ||
22 | #include <qlabel.h> | 22 | #include <qlabel.h> |
23 | //Added by qt3to4: | ||
24 | #include <QResizeEvent> | ||
23 | 25 | ||
24 | /** | 26 | /** |
25 | * A label class that squeezes its text into the label | 27 | * A label class that squeezes its text into the label |
26 | * | 28 | * |
27 | * If the text is too long to fit into the label it is divided into | 29 | * If the text is too long to fit into the label it is divided into |
28 | * remaining left and right parts which are separated by three dots. | 30 | * remaining left and right parts which are separated by three dots. |
29 | * | 31 | * |
30 | * Example: | 32 | * Example: |
31 | * http://www.kde.org/documentation/index.html could be squeezed to | 33 | * http://www.kde.org/documentation/index.html could be squeezed to |
32 | * http://www.kde...ion/index.html | 34 | * http://www.kde...ion/index.html |
33 | 35 | ||
34 | * @short A replacement for QLabel that squeezes its text | 36 | * @short A replacement for QLabel that squeezes its text |
35 | * @author Ronny Standtke <Ronny.Standtke@gmx.de> | 37 | * @author Ronny Standtke <Ronny.Standtke@gmx.de> |
36 | * @version $Id$ | 38 | * @version $Id$ |
37 | * | 39 | * |
38 | */ | 40 | */ |
39 | 41 | ||
40 | /* | 42 | /* |
41 | * @ref QLabel | 43 | * @ref QLabel |
42 | */ | 44 | */ |
43 | class KSqueezedTextLabel : public QLabel { | 45 | class KSqueezedTextLabel : public QLabel { |
44 | Q_OBJECT | 46 | Q_OBJECT |
45 | 47 | ||
46 | public: | 48 | public: |
47 | /** | 49 | /** |
48 | * Default constructor. | 50 | * Default constructor. |
49 | */ | 51 | */ |
50 | KSqueezedTextLabel( QWidget *parent, const char *name = 0 ); | 52 | KSqueezedTextLabel( QWidget *parent, const char *name = 0 ); |
51 | KSqueezedTextLabel( const QString &text, QWidget *parent, const char *name = 0 ); | 53 | KSqueezedTextLabel( const QString &text, QWidget *parent, const char *name = 0 ); |
52 | 54 | ||
53 | virtual QSize minimumSizeHint() const; | 55 | virtual QSize minimumSizeHint() const; |
54 | 56 | ||
55 | public slots: | 57 | public slots: |
56 | void setText( const QString & ); | 58 | void setText( const QString & ); |
57 | 59 | ||
58 | protected: | 60 | protected: |
59 | /** | 61 | /** |
60 | * used when widget is resized | 62 | * used when widget is resized |
61 | */ | 63 | */ |
62 | void resizeEvent( QResizeEvent * ); | 64 | void resizeEvent( QResizeEvent * ); |
63 | /** | 65 | /** |
64 | * does the dirty work | 66 | * does the dirty work |
65 | */ | 67 | */ |
66 | void squeezeTextToLabel(); | 68 | void squeezeTextToLabel(); |
67 | QString fullText; | 69 | QString fullText; |
68 | 70 | ||
69 | protected: | 71 | protected: |
70 | virtual void virtual_hook( int id, void* data ); | 72 | virtual void virtual_hook( int id, void* data ); |