source: trunk/doc/html/qdial-h.html

Last change on this file was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 6.3 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/include/qdial.h:1 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>qdial.h Include File</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qdial.h</h1>
33
34<p>This is the verbatim text of the qdial.h include file. It is provided only for illustration; the copyright remains with Trolltech.
35<hr>
36<pre>
37/****************************************************************************
38** $Id: qdial-h.html 2051 2007-02-21 10:04:20Z chehrlic $
39**
40** Definition of the dial widget
41**
42** Created : 990104
43**
44** Copyright (C) 1999-2007 Trolltech ASA. All rights reserved.
45**
46** This file is part of the widgets module of the Qt GUI Toolkit.
47**
48** This file may be distributed under the terms of the Q Public License
49** as defined by Trolltech ASA of Norway and appearing in the file
50** LICENSE.QPL included in the packaging of this file.
51**
52** This file may be distributed and/or modified under the terms of the
53** GNU General Public License version 2 as published by the Free Software
54** Foundation and appearing in the file LICENSE.GPL included in the
55** packaging of this file.
56**
57** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
58** licenses may use this file in accordance with the Qt Commercial License
59** Agreement provided with the Software.
60**
61** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
62** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
63**
64** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
65** information about Qt Commercial License Agreements.
66** See http://www.trolltech.com/qpl/ for QPL licensing information.
67** See http://www.trolltech.com/gpl/ for GPL licensing information.
68**
69** Contact info@trolltech.com if any conditions of this licensing are
70** not clear to you.
71**
72**********************************************************************/
73
74
75#ifndef QDIAL_H
76#define QDIAL_H
77
78#ifndef QT_H
79#include "qwidget.h"
80#include "qrangecontrol.h"
81#endif // QT_H
82
83#ifndef QT_NO_DIAL
84
85class QDialPrivate;
86
87class Q_EXPORT QDial: public QWidget, public QRangeControl
88{
89 Q_OBJECT
90 Q_PROPERTY( bool tracking READ tracking WRITE setTracking )
91 Q_PROPERTY( bool wrapping READ wrapping WRITE setWrapping )
92 Q_PROPERTY( int notchSize READ notchSize )
93 Q_PROPERTY( double notchTarget READ notchTarget WRITE setNotchTarget )
94 Q_PROPERTY( bool notchesVisible READ notchesVisible WRITE setNotchesVisible )
95 Q_PROPERTY( int minValue READ minValue WRITE setMinValue )
96 Q_PROPERTY( int maxValue READ maxValue WRITE setMaxValue )
97 Q_PROPERTY( int lineStep READ lineStep WRITE setLineStep )
98 Q_PROPERTY( int pageStep READ pageStep WRITE setPageStep )
99 Q_PROPERTY( int value READ value WRITE setValue )
100
101public:
102 QDial( QWidget* parent=0, const char* name=0, WFlags f = 0 );
103 QDial( int minValue, int maxValue, int pageStep, int value,
104 QWidget* parent=0, const char* name=0 );
105 ~QDial();
106
107 bool tracking() const;
108
109 bool wrapping() const;
110
111 int notchSize() const;
112
113 virtual void setNotchTarget( double );
114 double notchTarget() const;
115
116 bool notchesVisible() const;
117
118 QSize sizeHint() const;
119 QSize minimumSizeHint() const;
120
121 int minValue() const;
122 int maxValue() const;
123 void setMinValue( int );
124 void setMaxValue( int );
125 int lineStep() const;
126 int pageStep() const;
127 void setLineStep( int );
128 void setPageStep( int );
129 int value() const;
130
131public slots:
132 virtual void setValue( int );
133 void addLine();
134 void subtractLine();
135 void addPage();
136 void subtractPage();
137 virtual void setNotchesVisible( bool b );
138 virtual void setWrapping( bool on );
139 virtual void setTracking( bool enable );
140
141signals:
142 void valueChanged( int value );
143 void dialPressed();
144 void dialMoved( int value );
145 void dialReleased();
146
147protected:
148 void resizeEvent( QResizeEvent * );
149 void paintEvent( QPaintEvent * );
150
151 void keyPressEvent( QKeyEvent * );
152 void mousePressEvent( QMouseEvent * );
153 void mouseReleaseEvent( QMouseEvent * );
154 void mouseMoveEvent( QMouseEvent * );
155#ifndef QT_NO_WHEELEVENT
156 void wheelEvent( QWheelEvent * );
157#endif
158 void focusInEvent( QFocusEvent * );
159 void focusOutEvent( QFocusEvent * );
160
161 void valueChange();
162 void rangeChange();
163
164 virtual void repaintScreen( const QRect *cr = 0 );
165
166private:
167 QDialPrivate * d;
168
169 int valueFromPoint( const QPoint &amp; ) const;
170 double angle( const QPoint &amp;, const QPoint &amp; ) const;
171 QPointArray calcArrow( double &amp;a ) const;
172 QRect calcDial() const;
173 int calcBigLineSize() const;
174 void calcLines();
175
176private: // Disabled copy constructor and operator=
177#if defined(Q_DISABLE_COPY)
178 QDial( const QDial &amp; );
179 QDial &amp;operator=( const QDial &amp; );
180#endif
181
182};
183
184#endif // QT_NO_DIAL
185
186#endif
187</pre>
188<!-- eof -->
189<p><address><hr><div align=center>
190<table width=100% cellspacing=0 border=0><tr>
191<td>Copyright &copy; 2007
192<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
193<td align=right><div align=right>Qt 3.3.8</div>
194</table></div></address></body>
195</html>
Note: See TracBrowser for help on using the repository browser.