Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 4964

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qcolordialog.cpp -->
  <title>Qt 4.8: QColorDialog Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QColorDialog</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QColorDialog Class Reference</h1>
<!-- $$$QColorDialog-brief -->
<p>The QColorDialog class provides a dialog widget for specifying colors. <a href="#details">More...</a></p>
<!-- @@@QColorDialog -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QColorDialog&gt;</span></pre><p><b>Inherits: </b><a href="qdialog.html">QDialog</a>.</p>
<ul>
<li><a href="qcolordialog-members.html">List of all members, including inherited members</a></li>
<li><a href="qcolordialog-obsolete.html">Obsolete members</a></li>
<li><a href="qcolordialog-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#ColorDialogOption-enum">ColorDialogOption</a></b> { ShowAlphaChannel, NoButtons, DontUseNativeDialog }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#ColorDialogOption-enum">ColorDialogOptions</a></b></td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="qcolordialog.html#currentColor-prop">currentColor</a></b> : QColor</li>
<li class="fn"><b><a href="qcolordialog.html#options-prop">options</a></b> : ColorDialogOptions</li>
</ul>
<ul>
<li class="fn">2 properties inherited from <a href="qdialog.html#properties">QDialog</a></li>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#QColorDialog">QColorDialog</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#QColorDialog-2">QColorDialog</a></b> ( const QColor &amp; <i>initial</i>, QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#dtor.QColorDialog">~QColorDialog</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QColor </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#currentColor-prop">currentColor</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#open">open</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#open-2">open</a></b> ( QObject * <i>receiver</i>, const char * <i>member</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ColorDialogOptions </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#options-prop">options</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QColor </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#selectedColor">selectedColor</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#currentColor-prop">setCurrentColor</a></b> ( const QColor &amp; <i>color</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#setOption">setOption</a></b> ( ColorDialogOption <i>option</i>, bool <i>on</i> = true )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#options-prop">setOptions</a></b> ( ColorDialogOptions <i>options</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#testOption">testOption</a></b> ( ColorDialogOption <i>option</i> ) const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#setVisible">setVisible</a></b> ( bool <i>visible</i> )</td></tr>
</table>
<ul>
<li class="fn">8 public functions inherited from <a href="qdialog.html#public-functions">QDialog</a></li>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#colorSelected">colorSelected</a></b> ( const QColor &amp; <i>color</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#currentColorChanged">currentColorChanged</a></b> ( const QColor &amp; <i>color</i> )</td></tr>
</table>
<ul>
<li class="fn">3 signals inherited from <a href="qdialog.html#signals">QDialog</a></li>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QRgb </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#customColor">customColor</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#customCount">customCount</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QColor </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#getColor">getColor</a></b> ( const QColor &amp; <i>initial</i>, QWidget * <i>parent</i>, const QString &amp; <i>title</i>, ColorDialogOptions <i>options</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QColor </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#getColor-2">getColor</a></b> ( const QColor &amp; <i>initial</i> = Qt::white, QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#setCustomColor">setCustomColor</a></b> ( int <i>index</i>, QRgb <i>color</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#setStandardColor">setStandardColor</a></b> ( int <i>index</i>, QRgb <i>color</i> )</td></tr>
</table>
<ul>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#changeEvent">changeEvent</a></b> ( QEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcolordialog.html#done">done</a></b> ( int <i>result</i> )</td></tr>
</table>
<ul>
<li class="fn">7 protected functions inherited from <a href="qdialog.html#protected-functions">QDialog</a></li>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">5 public slots inherited from <a href="qdialog.html#public-slots">QDialog</a></li>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">7 protected functions inherited from <a href="qdialog.html#protected-functions">QDialog</a></li>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QColorDialog-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QColorDialog class provides a dialog widget for specifying colors.</p>
<p>The color dialog's function is to allow users to choose colors. For example, you might use this in a drawing program to allow the user to set the brush color.</p>
<p>The static functions provide modal color dialogs.</p>
<p>The static <a href="qcolordialog.html#getColor">getColor</a>() function shows the dialog, and allows the user to specify a color. This function can also be used to let users choose a color with a level of transparency: pass the <a href="qcolordialog.html#ColorDialogOption-enum">ShowAlphaChannel</a> option as an additional argument.</p>
<p>The user can store <a href="qcolordialog.html#customCount">customCount</a>() different custom colors. The custom colors are shared by all color dialogs, and remembered during the execution of the program. Use <a href="qcolordialog.html#setCustomColor">setCustomColor</a>() to set the custom colors, and use <a href="qcolordialog.html#customColor">customColor</a>() to get them.</p>
<p>The <a href="dialogs-standarddialogs.html">Standard Dialogs</a> example shows how to use QColorDialog as well as other built-in Qt dialogs.</p>
<p class="centerAlign"><img src="images/plastique-colordialog.png" alt="A color dialog in the Plastique widget style." /></p></div>
<p><b>See also </b><a href="qcolor.html">QColor</a>, <a href="qfiledialog.html">QFileDialog</a>, <a href="qprintdialog.html">QPrintDialog</a>, <a href="qfontdialog.html">QFontDialog</a>, and <a href="dialogs-standarddialogs.html">Standard Dialogs Example</a>.</p>
<!-- @@@QColorDialog -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ColorDialogOption$$$ShowAlphaChannel$$$NoButtons$$$DontUseNativeDialog -->
<h3 class="flags"><a name="ColorDialogOption-enum"></a>enum QColorDialog::<span class="name">ColorDialogOption</span><br/>flags QColorDialog::<span class="name">ColorDialogOptions</span></h3>
<p>This enum specifies various options that affect the look and feel of a color dialog.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QColorDialog::ShowAlphaChannel</tt></td><td class="topAlign"><tt>0x00000001</tt></td><td class="topAlign">Allow the user to select the alpha component of a color.</td></tr>
<tr><td class="topAlign"><tt>QColorDialog::NoButtons</tt></td><td class="topAlign"><tt>0x00000002</tt></td><td class="topAlign">Don't display <b>OK</b> and <b>Cancel</b> buttons. (Useful for &quot;live dialogs&quot;.)</td></tr>
<tr><td class="topAlign"><tt>QColorDialog::DontUseNativeDialog</tt></td><td class="topAlign"><tt>0x00000004</tt></td><td class="topAlign">Use Qt's standard color dialog on the Mac instead of the operating system native color dialog.</td></tr>
</table>
<p>This enum was introduced or modified in Qt 4.5.</p>
<p>The ColorDialogOptions type is a typedef for <a href="qflags.html">QFlags</a>&lt;ColorDialogOption&gt;. It stores an OR combination of ColorDialogOption values.</p>
<p><b>See also </b><a href="qcolordialog.html#options-prop">options</a>, <a href="qcolordialog.html#setOption">setOption</a>(), <a href="qcolordialog.html#testOption">testOption</a>(), and <a href="qwidget.html#windowModality-prop">windowModality</a>().</p>
<!-- @@@ColorDialogOption -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$currentColor-prop$$$currentColor$$$setCurrentColorconstQColor&$$$currentColorChangedconstQColor& -->
<h3 class="fn"><a name="currentColor-prop"></a><span class="name">currentColor</span> : <span class="type"><a href="qcolor.html">QColor</a></span></h3>
<p>This property holds the currently selected color in the dialog.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QColor </td><td class="memItemRight bottomAlign"><span class="name"><b>currentColor</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCurrentColor</b></span> ( const QColor &amp; <i>color</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qcolordialog.html#currentColorChanged">currentColorChanged</a></b></span> ( const QColor &amp; <i>color</i> )</td></tr>
</table>
<!-- @@@currentColor -->
<!-- $$$options-prop$$$options$$$setOptionsColorDialogOptions -->
<h3 class="fn"><a name="options-prop"></a><span class="name">options</span> : <span class="type"><a href="qcolordialog.html#ColorDialogOption-enum">ColorDialogOptions</a></span></h3>
<p>This property holds the various options that affect the look and feel of the dialog.</p>
<p>By default, all options are disabled.</p>
<p>Options should be set before showing the dialog. Setting them while the dialog is visible is not guaranteed to have an immediate effect on the dialog (depending on the option and on the platform).</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> ColorDialogOptions </td><td class="memItemRight bottomAlign"><span class="name"><b>options</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setOptions</b></span> ( ColorDialogOptions <i>options</i> )</td></tr>
</table>
<p><b>See also </b><a href="qcolordialog.html#setOption">setOption</a>() and <a href="qcolordialog.html#testOption">testOption</a>().</p>
<!-- @@@options -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QColorDialog[overload1]$$$QColorDialogQWidget* -->
<h3 class="fn"><a name="QColorDialog"></a>QColorDialog::<span class="name">QColorDialog</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a color dialog with the given <i>parent</i>.</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@QColorDialog -->
<!-- $$$QColorDialog$$$QColorDialogconstQColor&QWidget* -->
<h3 class="fn"><a name="QColorDialog-2"></a>QColorDialog::<span class="name">QColorDialog</span> ( const <span class="type"><a href="qcolor.html">QColor</a></span> &amp; <i>initial</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a color dialog with the given <i>parent</i> and specified <i>initial</i> color.</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@QColorDialog -->
<!-- $$$~QColorDialog[overload1]$$$~QColorDialog -->
<h3 class="fn"><a name="dtor.QColorDialog"></a>QColorDialog::<span class="name">~QColorDialog</span> ()</h3>
<p>Destroys the color dialog.</p>
<!-- @@@~QColorDialog -->
<!-- $$$changeEvent[overload1]$$$changeEventQEvent* -->
<h3 class="fn"><a name="changeEvent"></a><span class="type">void</span> QColorDialog::<span class="name">changeEvent</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<!-- @@@changeEvent -->
<!-- $$$colorSelected[overload1]$$$colorSelectedconstQColor& -->
<h3 class="fn"><a name="colorSelected"></a><span class="type">void</span> QColorDialog::<span class="name">colorSelected</span> ( const <span class="type"><a href="qcolor.html">QColor</a></span> &amp; <i>color</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted just after the user has clicked <b>OK</b> to select a color to use. The chosen color is specified by <i>color</i>.</p>
<p><b>See also </b><a href="qml-color.html">color</a> and <a href="qcolordialog.html#currentColorChanged">currentColorChanged</a>().</p>
<!-- @@@colorSelected -->
<!-- $$$currentColorChanged[overload1]$$$currentColorChangedconstQColor& -->
<h3 class="fn"><a name="currentColorChanged"></a><span class="type">void</span> QColorDialog::<span class="name">currentColorChanged</span> ( const <span class="type"><a href="qcolor.html">QColor</a></span> &amp; <i>color</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the current color changes in the dialog. The current color is specified by <i>color</i>.</p>
<p><b>See also </b><a href="qml-color.html">color</a> and <a href="qcolordialog.html#colorSelected">colorSelected</a>().</p>
<!-- @@@currentColorChanged -->
<!-- $$$customColor[overload1]$$$customColorint -->
<h3 class="fn"><a name="customColor"></a><span class="type"><a href="qcolor.html#QRgb-typedef">QRgb</a></span> QColorDialog::<span class="name">customColor</span> ( <span class="type">int</span> <i>index</i> )<tt> [static]</tt></h3>
<p>Returns the custom color at the given <i>index</i> as a <a href="qcolor.html#QRgb-typedef">QRgb</a> value.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qcolordialog.html#setCustomColor">setCustomColor</a>().</p>
<!-- @@@customColor -->
<!-- $$$customCount[overload1]$$$customCount -->
<h3 class="fn"><a name="customCount"></a><span class="type">int</span> QColorDialog::<span class="name">customCount</span> ()<tt> [static]</tt></h3>
<p>Returns the number of custom colors supported by <a href="qcolordialog.html">QColorDialog</a>. All color dialogs share the same custom colors.</p>
<!-- @@@customCount -->
<!-- $$$done[overload1]$$$doneint -->
<h3 class="fn"><a name="done"></a><span class="type">void</span> QColorDialog::<span class="name">done</span> ( <span class="type">int</span> <i>result</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qdialog.html#done">QDialog::done</a>().</p>
<p>Closes the dialog and sets its result code to <i>result</i>. If this dialog is shown with <a href="qdialog.html#exec">exec</a>(), done() causes the local event loop to finish, and <a href="qdialog.html#exec">exec</a>() to return <i>result</i>.</p>
<p><b>See also </b><a href="qdialog.html#done">QDialog::done</a>().</p>
<!-- @@@done -->
<!-- $$$getColor[overload1]$$$getColorconstQColor&QWidget*constQString&ColorDialogOptions -->
<h3 class="fn"><a name="getColor"></a><span class="type"><a href="qcolor.html">QColor</a></span> QColorDialog::<span class="name">getColor</span> ( const <span class="type"><a href="qcolor.html">QColor</a></span> &amp; <i>initial</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>title</i>, <span class="type"><a href="qcolordialog.html#ColorDialogOption-enum">ColorDialogOptions</a></span> <i>options</i> = 0 )<tt> [static]</tt></h3>
<p>Pops up a modal color dialog with the given window <i>title</i> (or &quot;Select Color&quot; if none is specified), lets the user choose a color, and returns that color. The color is initially set to <i>initial</i>. The dialog is a child of <i>parent</i>. It returns an invalid (see <a href="qcolor.html#isValid">QColor::isValid</a>()) color if the user cancels the dialog.</p>
<p>The <i>options</i> argument allows you to customize the dialog.</p>
<p>On Symbian, this static function will use the native color dialog and not a <a href="qcolordialog.html">QColorDialog</a>. On Symbian the parameters <i>title</i> and <i>parent</i> has no relevance and the <i>options</i> parameter is only used to define if the native color dialog is used or not.</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@getColor -->
<!-- $$$getColor$$$getColorconstQColor&QWidget* -->
<h3 class="fn"><a name="getColor-2"></a><span class="type"><a href="qcolor.html">QColor</a></span> QColorDialog::<span class="name">getColor</span> ( const <span class="type"><a href="qcolor.html">QColor</a></span> &amp; <i>initial</i> = Qt::white, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )<tt> [static]</tt></h3>
<p>Pops up a modal color dialog, lets the user choose a color, and returns that color. The color is initially set to <i>initial</i>. The dialog is a child of <i>parent</i>. It returns an invalid (see <a href="qcolor.html#isValid">QColor::isValid</a>()) color if the user cancels the dialog.</p>
<p>On Symbian, this static function will use the native color dialog and not a <a href="qcolordialog.html">QColorDialog</a>.</p>
<!-- @@@getColor -->
<!-- $$$open[overload1]$$$open -->
<h3 class="fn"><a name="open"></a><span class="type">void</span> QColorDialog::<span class="name">open</span> ()</h3>
<p>Shows the dialog as a <a href="qdialog.html#modal-dialogs">window modal dialog</a>, returning immediately.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qdialog.html#open">QDialog::open</a>().</p>
<!-- @@@open -->
<!-- $$$open$$$openQObject*constchar* -->
<h3 class="fn"><a name="open-2"></a><span class="type">void</span> QColorDialog::<span class="name">open</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>receiver</i>, const <span class="type">char</span> * <i>member</i> )</h3>
<p>This is an overloaded function.</p>
<p>Opens the dialog and connects its <a href="qcolordialog.html#colorSelected">colorSelected</a>() signal to the slot specified by <i>receiver</i> and <i>member</i>.</p>
<p>The signal will be disconnected from the slot when the dialog is closed.</p>
<p>This function was introduced in Qt 4.5.</p>
<!-- @@@open -->
<!-- $$$selectedColor[overload1]$$$selectedColor -->
<h3 class="fn"><a name="selectedColor"></a><span class="type"><a href="qcolor.html">QColor</a></span> QColorDialog::<span class="name">selectedColor</span> () const</h3>
<p>Returns the color that the user selected by clicking the <b>OK</b> or equivalent button.</p>
<p><b>Note:</b> This color is not always the same as the color held by the <a href="qcolordialog.html#currentColor-prop">currentColor</a> property since the user can choose different colors before finally selecting the one to use.</p>
<!-- @@@selectedColor -->
<!-- $$$setCustomColor[overload1]$$$setCustomColorintQRgb -->
<h3 class="fn"><a name="setCustomColor"></a><span class="type">void</span> QColorDialog::<span class="name">setCustomColor</span> ( <span class="type">int</span> <i>index</i>, <span class="type"><a href="qcolor.html#QRgb-typedef">QRgb</a></span> <i>color</i> )<tt> [static]</tt></h3>
<p>Sets the custom color at <i>index</i> to the <a href="qcolor.html#QRgb-typedef">QRgb</a> <i>color</i> value.</p>
<p><b>Note:</b> This function does not apply to the Native Color Dialog on the Mac OS X platform. If you still require this function, use the <a href="qcolordialog.html#ColorDialogOption-enum">QColorDialog::DontUseNativeDialog</a> option.</p>
<p><b>See also </b><a href="qcolordialog.html#customColor">customColor</a>().</p>
<!-- @@@setCustomColor -->
<!-- $$$setOption[overload1]$$$setOptionColorDialogOptionbool -->
<h3 class="fn"><a name="setOption"></a><span class="type">void</span> QColorDialog::<span class="name">setOption</span> ( <span class="type"><a href="qcolordialog.html#ColorDialogOption-enum">ColorDialogOption</a></span> <i>option</i>, <span class="type">bool</span> <i>on</i> = true )</h3>
<p>Sets the given <i>option</i> to be enabled if <i>on</i> is true; otherwise, clears the given <i>option</i>.</p>
<p><b>See also </b><a href="qcolordialog.html#options-prop">options</a> and <a href="qcolordialog.html#testOption">testOption</a>().</p>
<!-- @@@setOption -->
<!-- $$$setStandardColor[overload1]$$$setStandardColorintQRgb -->
<h3 class="fn"><a name="setStandardColor"></a><span class="type">void</span> QColorDialog::<span class="name">setStandardColor</span> ( <span class="type">int</span> <i>index</i>, <span class="type"><a href="qcolor.html#QRgb-typedef">QRgb</a></span> <i>color</i> )<tt> [static]</tt></h3>
<p>Sets the standard color at <i>index</i> to the <a href="qcolor.html#QRgb-typedef">QRgb</a> <i>color</i> value.</p>
<p><b>Note:</b> This function does not apply to the Native Color Dialog on the Mac OS X platform. If you still require this function, use the <a href="qcolordialog.html#ColorDialogOption-enum">QColorDialog::DontUseNativeDialog</a> option.</p>
<!-- @@@setStandardColor -->
<!-- $$$setVisible[overload1]$$$setVisiblebool -->
<h3 class="fn"><a name="setVisible"></a><span class="type">void</span> QColorDialog::<span class="name">setVisible</span> ( <span class="type">bool</span> <i>visible</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#visible-prop">QWidget::setVisible</a>().</p>
<p>Changes the visibility of the dialog. If <i>visible</i> is true, the dialog is shown; otherwise, it is hidden.</p>
<!-- @@@setVisible -->
<!-- $$$testOption[overload1]$$$testOptionColorDialogOption -->
<h3 class="fn"><a name="testOption"></a><span class="type">bool</span> QColorDialog::<span class="name">testOption</span> ( <span class="type"><a href="qcolordialog.html#ColorDialogOption-enum">ColorDialogOption</a></span> <i>option</i> ) const</h3>
<p>Returns true if the given <i>option</i> is enabled; otherwise, returns false.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qcolordialog.html#options-prop">options</a> and <a href="qcolordialog.html#setOption">setOption</a>().</p>
<!-- @@@testOption -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>