diff options
Diffstat (limited to 'doc/html/designer-manual-4.html')
-rw-r--r-- | doc/html/designer-manual-4.html | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/html/designer-manual-4.html b/doc/html/designer-manual-4.html index da13d9d8b..a38c2e628 100644 --- a/doc/html/designer-manual-4.html +++ b/doc/html/designer-manual-4.html @@ -151,11 +151,11 @@ body { background: #ffffff; color: black; } <h4><a name="1-3"></a>Using the Dialog</h4> <p>The ColorNameForm dialog will be called from the main form. The caller will firstly call one of TQt's static "choose a color" dialogs, and if the user chooses a color, will then invoke our custom dialog. Since we're going to use a "choose a color" dialog we will need the appropriate header file. We'll also be accessing the dialog's colorLabel (to set it to the chosen color), and the dialog's line edit (to retrieve the color name), so we'll need appropriate headers for these too.</p> <p>Click "MainForm" in the Project Overview window so that Object Explorer shows the main form's objects.</p> -<p>Click Object Explorer's Members tab. Right click "Includes (in Implementation)", then click <b>Edit</b> to invoke the <em>Edit Includes (in Implementation)</em> dialog. Click <b>Add</b> then enter "tqcolordialog.h". Click <b>Add</b> again, and enter "tqlabel.h". Similarly add "ntqlineedit.h". We also need to include the header for the form we've just created, so add "colornameform.h", and since it is our last entry press <b>Enter</b>, then click <b>Close</b>.</p> +<p>Click Object Explorer's Members tab. Right click "Includes (in Implementation)", then click <b>Edit</b> to invoke the <em>Edit Includes (in Implementation)</em> dialog. Click <b>Add</b> then enter "tqcolordialog.h". Click <b>Add</b> again, and enter "tqlabel.h". Similarly add "tqlineedit.h". We also need to include the header for the form we've just created, so add "colornameform.h", and since it is our last entry press <b>Enter</b>, then click <b>Close</b>.</p> <p>You should now have added the following declarations to your includes (in implementation):</p> <ul><li><p>"tqcolordialog.h"</p> <li><p>"tqlabel.h"</p> -<li><p>"ntqlineedit.h"</p> +<li><p>"tqlineedit.h"</p> <li><p>"colornameform.h"</p> </ul><p>Now we're ready to enter the <tt>editAdd()</tt> slot's code. Click "mainform.ui.h" in the Project Overview to invoke the code editor.</p> <h5><a name="1-3-1"></a>editAdd()</h5> @@ -188,8 +188,8 @@ body { background: #ffffff; color: black; } colorTable->setPixmap( row, COL_NAME, pixmap ); colorTable->setText( row, COL_HEX, color.<a href="tqcolor.html#name">name</a>().upper() ); if ( m_show_web ) { - <a href="qchecktableitem.html">TQCheckTableItem</a> *item = new <a href="qchecktableitem.html">TQCheckTableItem</a>( colorTable, "" ); - item-><a href="qchecktableitem.html#setChecked">setChecked</a>( isWebColor( color ) ); + <a href="tqchecktableitem.html">TQCheckTableItem</a> *item = new <a href="tqchecktableitem.html">TQCheckTableItem</a>( colorTable, "" ); + item-><a href="tqchecktableitem.html#setChecked">setChecked</a>( isWebColor( color ) ); colorTable->setItem( row, COL_WEB, item ); } colorTable->setCurrentCell( row, 0 ); @@ -397,11 +397,11 @@ body { background: #ffffff; color: black; } } </pre> <p>We create a new options form, passing it TRUE to make it modal. We set the radio buttons depending on the current setting of the <tt>m_clip_as</tt> variable. We set the check box to correspond with the <tt>m_show_web</tt> variable. We execute the form, and if the user clicks <b>OK</b>, we reflect their choices back into the relevant main form variables. If the user changed the <tt>m_show_web</tt> variable (by clicking the webCheckBox), we mark the table as "dirty" since it will need updating. We then call <tt>populate()</tt> which will update the table view if required.</p> -<p>Because we use our OptionsForm and access its radio buttons and checkbox we must add "optionsform.h", "ntqradiobutton.h" and "ntqcheckbox.h" to our includes in implementation. (Click Object Explorer's Members tab, right click "Includes (in Implementation)", then click <b>Edit</b>. Click <b>Add</b> and enter "optionsform.h"; click <b>Add</b> again and enter "ntqradiobutton.h"; click <b>Add</b> again and enter "ntqcheckbox.h". Press <b>Enter</b>, then click <b>Close</b>.)</p> +<p>Because we use our OptionsForm and access its radio buttons and checkbox we must add "optionsform.h", "tqradiobutton.h" and "tqcheckbox.h" to our includes in implementation. (Click Object Explorer's Members tab, right click "Includes (in Implementation)", then click <b>Edit</b>. Click <b>Add</b> and enter "optionsform.h"; click <b>Add</b> again and enter "tqradiobutton.h"; click <b>Add</b> again and enter "tqcheckbox.h". Press <b>Enter</b>, then click <b>Close</b>.)</p> <p>You should now have added the following declarations to your includes (in implementation):</p> <ul><li><p>"optionsform.h"</p> -<li><p>"ntqcheckbox.h"</p> -<li><p>"ntqradiobutton.h"</p> +<li><p>"tqcheckbox.h"</p> +<li><p>"tqradiobutton.h"</p> </ul><p>Now the user can change options to suit their own preferences. But these option settings will be lost when they exit the application. We'll finish off by adding functions to load and save the user's settings.</p> <h3><a name="4"></a>Saving and Loading Settings</h3> <p>Logically we think of loading settings first, e.g. at application start up, and of saving settings last, e.g. at application termination. But we will code saving settings first, since then we'll know what it is that we must load.</p> @@ -482,7 +482,7 @@ body { background: #ffffff; color: black; } <ul><li><p>"findform.h"</p> </ul><p>Includes (in Implementation):</p> <ul><li><p>"optionsform.h"</p> -<li><p>"ntqlineedit.h"</p> +<li><p>"tqlineedit.h"</p> <li><p>"tqlabel.h"</p> <li><p>"tqclipboard.h"</p> <li><p>"ntqmessagebox.h"</p> @@ -496,8 +496,8 @@ body { background: #ffffff; color: black; } <li><p>"tqregexp.h"</p> <li><p>"tqcolordialog.h"</p> <li><p>"colornameform.h"</p> -<li><p>"ntqcheckbox.h"</p> -<li><p>"ntqradiobutton.h"</p> +<li><p>"tqcheckbox.h"</p> +<li><p>"tqradiobutton.h"</p> <li><p>"tqsettings.h"</p> </ul><h4><a name="6-2"></a>ColorNameForm Members</h4> <p>We put all the ColorNameForm declarations in the source code file. The file <tt>colornameform.ui.h</tt> should begin with the following declarations:</p> |