certmanager/lib

kdhorizontalline.h
1/*
2 KD Tools - a set of useful widgets for TQt
3*/
4
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.
14**
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.
18**
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.
21**
22** See http://www.klaralvdalens-datakonsult.se/?page=products for
23** information about KD Tools Commercial License Agreements.
24**
25** Contact info@klaralvdalens-datakonsult.se if any conditions of this
26** licensing are not clear to you.
27**
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** TQt library by Trolltech AS, Norway (or with modified versions of TQt
31** that use the same license as TQt), 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** TQt. 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.
38**
39**********************************************************************/
40
41#ifndef __KDTOOLS__KDHORIZONTALLINE_H__
42#define __KDTOOLS__KDHORIZONTALLINE_H__
43
44#include <tqframe.h>
45#include <tqstring.h>
46
47class KDHorizontalLine : public TQFrame {
48 TQ_OBJECT
49
50 TQ_PROPERTY( TQString title READ title WRITE setTitle )
51public:
52 KDHorizontalLine( TQWidget * parent=0, const char * name=0, WFlags f=0 );
53 KDHorizontalLine( const TQString & title, TQWidget * parent=0, const char * name=0, WFlags f=0 );
54 ~KDHorizontalLine();
55
56 TQString title() const { return mTitle; }
57
59 void setFrameStyle( int style );
60
61 TQSize sizeHint() const;
62 TQSize minimumSizeHint() const;
63 TQSizePolicy sizePolicy() const;
64
65 static int indentHint();
66
67public slots:
68 virtual void setTitle( const TQString & title );
69
70protected:
71 void paintEvent( TQPaintEvent * );
72
73private:
74 void calculateFrame();
75
76private:
77 TQString mTitle;
78 TQt::AlignmentFlags mAlign;
79 int mLenVisible;
80};
81
82#endif /* __KDTOOLS__KDHORIZONTALLINE_H__ */
83