1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Qt Toolkit - QFontDialog Class</title><style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }body { background: white; color: black; }
--></style>
</head><body bgcolor="#ffffff">
<table width="100%">
<tr><td><a href="index.html">
<img width="100" height="100" src="qtlogo.png"
alt="Home" border="0"><img width="100"
height="100" src="face.png" alt="Home" border="0">
</a><td valign=top><div align=right><img src="dochead.png" width="472" height="27"><br>
<a href="classes.html"><b>Classes</b></a>
-<a href="annotated.html">Annotated</a>
- <a href="hierarchy.html">Tree</a>
-<a href="functions.html">Functions</a>
-<a href="index.html">Home</a>
-<a href="topicals.html"><b>Structure</b></a>
</div>
</table>
<h1 align=center>QFontDialog Class Reference</h1><br clear="all">
<p>
The QFontDialog class provides a dialog widget for selecting a text font.
<a href="#details">More...</a>
<p>
<code>#include <<a href="qfontdialog-h.html">qfontdialog.h</a>></code>
<p>
Inherits <a href="qdialog.html">QDialog</a>.
<p><a href="qfontdialog-members.html">List of all member functions.</a>
<h2>Signals</h2>
<ul>
<li><div class="fn">void<a href="#6a37ea"><b>fontSelected</b></a>(constQFont&font)</div>
<li><div class="fn">void<a href="#35a205"><b>fontHighlighted</b></a>(constQFont&font)</div>
</ul>
<h2>Static Public Members</h2>
<ul>
<li><div class="fn">QFont<a href="#5eb535"><b>getFont</b></a>(bool*ok, constQFont&def, QWidget*parent=0, constchar*name=0)</div>
<li><div class="fn">QFont<a href="#4a9cc8"><b>getFont</b></a>(bool*ok, QWidget*parent=0, constchar*name=0)</div>
</ul>
<h2>Protected Members</h2>
<ul>
<li><div class="fn">virtualbool<a href="#c9a592"><b>eventFilter</b></a>(QObject*, QEvent*)</div>
<li><div class="fn">QListBox*<a href="#fca5a4"><b>familyListBox</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#860aab"><b>updateFamilies</b></a>()</div>
<li><div class="fn">QListBox*<a href="#afa785"><b>styleListBox</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#2fea07"><b>updateStyles</b></a>()</div>
<li><div class="fn">QListBox*<a href="#9949b3"><b>sizeListBox</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#3d5051"><b>updateSizes</b></a>()</div>
<li><div class="fn">QComboBox*<a href="#d00b1b"><b>scriptCombo</b></a>()const</div>
<li><div class="fn">virtualvoid<a href="#fc4f47"><b>updateScripts</b></a>()</div>
</ul>
<h2>Protected Slots</h2>
<ul>
<li><div class="fn">void<a href="#8fa2fd"><b>sizeChanged</b></a>(constQString&)</div>
</ul>
<hr><h2><a name="details"></a>Detailed Description</h2>
The QFontDialog class provides a dialog widget for selecting a text font.
<p>
This dialog can be used to let the user choose a font with attributes and so on.
Normally you may use the static convenience function <a href="#4a9cc8">getFont</a>().
<p><img src=qfontdlg-m.png> <img src=qfontdlg-w.png>
<hr><h2>Member Function Documentation</h2>
<h3 class="fn">bool<a name="c9a592"></a>QFontDialog::eventFilter(<a href="qobject.html">QObject</a>*o, <a href="qevent.html">QEvent</a>*e) <code>[virtualprotected]</code></h3>
<p>Event filter to make up, down, pageup and pagedown work correctly
in the line edits.
<p>Reimplemented from <a href="qobject.html#bd20fe">QObject.</a>
<h3 class="fn"><a href="qlistbox.html">QListBox</a>*<a name="fca5a4"></a>QFontDialog::familyListBox()const <code>[protected]</code></h3>
<p>Returns a pointer to the "font family" list box. This is usable
mainly if you reimplement updateFontFamilies();.
<h3 class="fn">void<a name="35a205"></a>QFontDialog::fontHighlighted(const<a href="qfont.html">QFont</a>&) <code>[signal]</code></h3>
<p>This signal is emitted, when the user changed a setting in the dialog.
<h3 class="fn">void<a name="6a37ea"></a>QFontDialog::fontSelected(const<a href="qfont.html">QFont</a>&) <code>[signal]</code></h3>
<p>This signal is emitted, when the user has chosen a font and clicked ok.
<h3 class="fn"><a href="qfont.html">QFont</a><a name="4a9cc8"></a>QFontDialog::getFont(bool*ok, <a href="qwidget.html">QWidget</a>*parent=0,constchar*name=0) <code>[static]</code></h3>
<p>Opens a modal font dialog and returns the font selected by the user.
<p>The <em>ok</em> parameter is set to TRUE if the user clicked OK, and FALSE if
the user clicked Cancel.
<p>If the user clicks Cancel the Qt default font is returned.
<p>This static function is less capable than the full QFontDialog object,
but is convenient and easy to use.
<p>Example:
<pre> // start at the current working directory and with *.cpp as filter
bool ok;
<a href="qfont.html">QFont</a> f = QFontDialog::getFont( &ok, this );
if ( ok ) {
// the user selected a valid font
} else {
// the user cancelled the dialog
}
</pre>
<h3 class="fn"><a href="qfont.html">QFont</a><a name="5eb535"></a>QFontDialog::getFont(bool*ok, const<a href="qfont.html">QFont</a>&initial, <a href="qwidget.html">QWidget</a>*parent=0, constchar*name=0) <code>[static]</code></h3>
<p>Opens a modal font dialog and returns the font selected by the user.
<p><em>initial</em> is the initial selected font.
<p>The <em>ok</em> parameter is set to TRUE if the user clicked OK, and FALSE if
the user clicked Cancel.
<p>If the user clicks Cancel the <em>initial</em> font is returned.
<p>This static function is less capable than the full QFontDialog object,
but is convenient and easy to use.
<p>Example:
<pre> // start at the current working directory and with *.cpp as filter
bool ok;
<a href="qfont.html">QFont</a> f = QFontDialog::getFont( &ok, QFont( "Times", 12 ), this );
if ( ok ) {
// the user selected a valid font
} else {
// the user cancelled the dialog
}
</pre>
<p>Another example:
<pre> mywidget.setFont( <a href="#4a9cc8">QFontDialog::getFont</a>( 0, mywidget.font() ) );
</pre>
<h3 class="fn"><a href="qcombobox.html">QComboBox</a>*<a name="d00b1b"></a>QFontDialog::scriptCombo()const <code>[protected]</code></h3>
<p>Returns a pointer to the "font style" list box. This is usable
mainly if you reimplement updateFontStyles();.
<h3 class="fn">void<a name="8fa2fd"></a>QFontDialog::sizeChanged(const<a href="qstring.html">QString</a>&s) <code>[protectedslot]</code></h3>
<p>This slot is called if the user changes the font size.
<h3 class="fn"><a href="qlistbox.html">QListBox</a>*<a name="9949b3"></a>QFontDialog::sizeListBox()const <code>[protected]</code></h3>
<p>Returns a pointer to the "font size" list box. This is usable
mainly if you reimplement updateFontSizes();.
<h3 class="fn"><a href="qlistbox.html">QListBox</a>*<a name="afa785"></a>QFontDialog::styleListBox()const <code>[protected]</code></h3>
<p>Returns a pointer to the "font style" list box. This is usable
mainly if you reimplement updateFontStyles();.
<h3 class="fn">void<a name="860aab"></a>QFontDialog::updateFamilies() <code>[virtualprotected]</code></h3>
<p>Update the contents of the "font family" list box. This
function can be reimplemented if you have special requirements.
<h3 class="fn">void<a name="fc4f47"></a>QFontDialog::updateScripts() <code>[virtualprotected]</code></h3>
<p>Update the contents of the "font script" combo box. This
function can be reimplemented if you have special requirements.
<h3 class="fn">void<a name="3d5051"></a>QFontDialog::updateSizes() <code>[virtualprotected]</code></h3>
<p>Update the contents of the "font size" list box. This
function can be reimplemented if you have special requirements.
<h3 class="fn">void<a name="2fea07"></a>QFontDialog::updateStyles() <code>[virtualprotected]</code></h3>
<p>Update the contents of the "font style" list box. This
function can be reimplemented if you have special requirements.
<hr><p>
Search the documentation, FAQ, qt-interest archive and more (uses
<a href="http://www.trolltech.com">www.trolltech.com</a>):<br>
<form method=post action="http://www.trolltech.com/search.cgi">
<input type=hidden name="version" value="2.3.2"><nobr>
<input size="50" name="search"><input type=submit value="Search">
</nobr></form><hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>,
copyright © 1995-2001
<a href="http://www.trolltech.com">Trolltech</a>, all rights reserved.<p><address><hr><div align="center">
<table width="100%" cellspacing="0" border="0"><tr>
<td>Copyright 2001 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 2.3.2</div>
</table></div></address></body></html>
|