Better wording
[kdepim.git] / kleopatra / utils / kdlogtextwidget.h
bloba0af7db932abed17f38e9f10acb4f2bfcdfce2d8
1 /****************************************************************************
2 ** Copyright (C) 2001-2010 Klaralvdalens Datakonsult AB. All rights reserved.
3 **
4 ** This file is part of the KD Tools library.
5 **
6 ** Licensees holding valid commercial KD Tools licenses may use this file in
7 ** accordance with the KD Tools Commercial License Agreement provided with
8 ** the Software.
9 **
11 ** This file may be distributed and/or modified under the terms of the
12 ** GNU Lesser General Public License version 2 and version 3 as published by the
13 ** Free Software Foundation and appearing in the file LICENSE.LGPL included.
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 ** Contact info@kdab.com if any conditions of this licensing are not
19 ** clear to you.
21 **********************************************************************/
23 #ifndef __KDTOOLSGUI_KDLOGTEXTWIDGET_H__
24 #define __KDTOOLSGUI_KDLOGTEXTWIDGET_H__
26 #include <utils/kdtoolsglobal.h>
27 #include <utils/pimpl_ptr.h>
28 #include <QtGui/QAbstractScrollArea>
30 class QString;
31 class QStringList;
32 class QColor;
34 class KDLogTextWidget : public QAbstractScrollArea {
35 Q_OBJECT
36 Q_PROPERTY( uint historySize READ historySize WRITE setHistorySize )
37 Q_PROPERTY( QString text READ text )
38 Q_PROPERTY( QStringList lines READ lines WRITE setLines )
39 Q_PROPERTY( uint minimumVisibleLines READ minimumVisibleLines WRITE setMinimumVisibleLines )
40 Q_PROPERTY( uint minimumVisibleColumns READ minimumVisibleColumns WRITE setMinimumVisibleColumns )
41 Q_PROPERTY( bool alternatingRowColors READ alternatingRowColors WRITE setAlternatingRowColors )
42 Q_CLASSINFO( "description", "High-speed text display widget" )
43 public:
44 explicit KDLogTextWidget( QWidget * parent=0 );
45 ~KDLogTextWidget();
47 void setHistorySize( unsigned int size );
48 unsigned int historySize() const;
50 QString text() const;
52 void setLines( const QStringList & list );
53 QStringList lines() const;
55 void setMinimumVisibleLines( unsigned int num );
56 unsigned int minimumVisibleLines() const;
58 void setMinimumVisibleColumns( unsigned int num );
59 unsigned int minimumVisibleColumns() const;
61 void setAlternatingRowColors( bool on );
62 bool alternatingRowColors() const;
64 /*! \reimp */ QSize minimumSizeHint() const;
65 /*! \reimp */ QSize sizeHint() const;
67 public Q_SLOTS:
68 void clear();
69 void message( const QString & msg, const QColor & color );
70 void message( const QString & msg );
72 protected:
73 /*! \reimp */ void paintEvent( QPaintEvent * );
74 /*! \reimp */ void timerEvent( QTimerEvent * );
75 /*! \reimp */ void resizeEvent( QResizeEvent * );
76 /*! \reimp */ void changeEvent( QEvent * );
78 private:
79 class Private;
80 kdtools::pimpl_ptr<Private> d;
83 #endif /* __KDTOOLSGUI_KDLOGTEXTWIDGET_H__ */