docs update, needs proofreading
[kdepim.git] / libkleo / ui / kdhorizontalline.h
bloba4e89c0dd28bfde5c423c6d177c5af7c70a572d6
1 /* -*- Mode: C++ -*-
2 KD Tools - a set of useful widgets for Qt
3 */
5 /****************************************************************************
6 ** Copyright (C) 2005 Klarälvdalens Datakonsult AB. All rights reserved.
7 **
8 ** This file is part of the KD Tools library.
9 **
10 ** This file may be distributed and/or modified under the terms of the
11 ** GNU General Public License version 2 as published by the Free Software
12 ** Foundation and appearing in the file LICENSE.GPL included in the
13 ** packaging of this file.
15 ** Licensees holding valid commercial KD Tools licenses may use this file in
16 ** accordance with the KD Tools Commercial License Agreement provided with
17 ** the Software.
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 ** See http://www.klaralvdalens-datakonsult.se/?page=products for
23 ** information about KD Tools Commercial License Agreements.
25 ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
26 ** licensing are not clear to you.
28 ** In addition, as a special exception, the copyright holders give
29 ** permission to link the code of this program with any edition of the
30 ** Qt library by Trolltech AS, Norway (or with modified versions of Qt
31 ** that use the same license as Qt), and distribute linked
32 ** combinations including the two. You must obey the GNU General
33 ** Public License in all respects for all of the code used other than
34 ** Qt. If you modify this file, you may extend this exception to your
35 ** version of the file, but you are not obligated to do so. If you do
36 ** not wish to do so, delete this exception statement from your
37 ** version.
39 **********************************************************************/
41 #ifndef __KDTOOLS__KDHORIZONTALLINE_H__
42 #define __KDTOOLS__KDHORIZONTALLINE_H__
44 #include "kleo/kleo_export.h"
46 #include <QtGui/QFrame>
48 class KLEO_EXPORT KDHorizontalLine : public QFrame {
49 Q_OBJECT
50 Q_PROPERTY( QString title READ title WRITE setTitle )
51 public:
52 explicit KDHorizontalLine( QWidget * parent=0, const char * name=0, Qt::WFlags f=0 );
53 explicit KDHorizontalLine( const QString & title, QWidget * parent=0, const char * name=0, Qt::WFlags f=0 );
54 ~KDHorizontalLine();
56 QString title() const { return mTitle; }
58 /*! \reimp to hard-code the frame shape */
59 void setFrameStyle( int style );
61 QSize sizeHint() const;
62 QSize minimumSizeHint() const;
63 QSizePolicy sizePolicy() const;
65 static int indentHint();
67 public Q_SLOTS:
68 virtual void setTitle( const QString & title );
70 protected:
71 void paintEvent( QPaintEvent * );
73 private:
74 void calculateFrame();
76 private:
77 QString mTitle;
78 Qt::Alignment mAlign;
79 int mLenVisible;
82 #endif /* __KDTOOLS__KDHORIZONTALLINE_H__ */