summaryrefslogtreecommitdiffstats
path: root/doc/html/designer-manual-4.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/designer-manual-4.html')
-rw-r--r--doc/html/designer-manual-4.html24
1 files changed, 12 insertions, 12 deletions
diff --git a/doc/html/designer-manual-4.html b/doc/html/designer-manual-4.html
index e7871d8d..4da64452 100644
--- a/doc/html/designer-manual-4.html
+++ b/doc/html/designer-manual-4.html
@@ -120,7 +120,7 @@ body { background: #ffffff; color: black; }
<p>The situation is different for variables. If you add these to Members, Class Variables, they will be included as private variables in the class definition. If you type them at the top of the <tt>.ui.h</tt> file they will be form-global variables.</p>
</blockquote>
<p>We'll start by adding some includes.</p>
-<pre> #include &lt;<a href="qcolor-h.html">ntqcolor.h</a>&gt;
+<pre> #include &lt;<a href="tqcolor-h.html">tqcolor.h</a>&gt;
#include &lt;<a href="tqmap-h.html">tqmap.h</a>&gt;
#include &lt;<a href="tqstring-h.html">tqstring.h</a>&gt;
</pre>
@@ -151,9 +151,9 @@ 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 "ntqcolordialog.h". Click <b>Add</b> again, and enter "ntqlabel.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 "ntqlabel.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>You should now have added the following declarations to your includes (in implementation):</p>
-<ul><li><p>"ntqcolordialog.h"</p>
+<ul><li><p>"tqcolordialog.h"</p>
<li><p>"ntqlabel.h"</p>
<li><p>"ntqlineedit.h"</p>
<li><p>"colornameform.h"</p>
@@ -161,7 +161,7 @@ body { background: #ffffff; color: black; }
<h5><a name="1-3-1"></a>editAdd()</h5>
<pre> void MainForm::editAdd()
{
- <a href="ntqcolor.html">TQColor</a> color = white;
+ <a href="tqcolor.html">TQColor</a> color = white;
if ( ! m_colors.isEmpty() ) {
<a href="tqwidget.html">TQWidget</a> *visible = colorWidgetStack-&gt;visibleWidget();
if ( <a href="tqwidget.html#visible-prop">visible</a> == tablePage )
@@ -170,8 +170,8 @@ body { background: #ffffff; color: black; }
else
color = colorIconView-&gt;currentItem()-&gt;text();
}
- color = TQColorDialog::<a href="ntqcolordialog.html#getColor">getColor</a>( color, this );
- if ( color.<a href="ntqcolor.html#isValid">isValid</a>() ) {
+ color = TQColorDialog::<a href="tqcolordialog.html#getColor">getColor</a>( color, this );
+ if ( color.<a href="tqcolor.html#isValid">isValid</a>() ) {
<a href="ntqpixmap.html">TQPixmap</a> pixmap( 80, 10 );
pixmap.<a href="ntqpixmap.html#fill">fill</a>( color );
ColorNameForm *colorForm = new ColorNameForm( this, "color", TRUE );
@@ -186,7 +186,7 @@ body { background: #ffffff; color: black; }
colorTable-&gt;insertRows( row, 1 );
colorTable-&gt;setText( row, COL_NAME, name );
colorTable-&gt;setPixmap( row, COL_NAME, pixmap );
- colorTable-&gt;setText( row, COL_HEX, color.<a href="ntqcolor.html#name">name</a>().upper() );
+ colorTable-&gt;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-&gt;<a href="qchecktableitem.html#setChecked">setChecked</a>( isWebColor( color ) );
@@ -201,7 +201,7 @@ body { background: #ffffff; color: black; }
}
}
</pre>
- <p>The code for this function is quite long, but it isn't difficult. We start by setting a default color to white. If there are any colors in the <tt>m_colors</tt> map we set the default color to be the current color showing in the current view. We then invoke TQt's static <a href="ntqcolordialog.html#getColor">getColor()</a> dialog, passing it the default color. (If the user cancels an invalid color is returned.)</p>
+ <p>The code for this function is quite long, but it isn't difficult. We start by setting a default color to white. If there are any colors in the <tt>m_colors</tt> map we set the default color to be the current color showing in the current view. We then invoke TQt's static <a href="tqcolordialog.html#getColor">getColor()</a> dialog, passing it the default color. (If the user cancels an invalid color is returned.)</p>
<p>If the user chose a color we want to show their chosen color in our custom dialog, so we create a pixmap and fill it with their chosen color. We create an instance of our ColorNameForm as a modal dialog (third argument is TRUE). We then call its <tt>setColors()</tt> function to set the colors in the <tt>m_colors</tt> map (so that the <tt>validate()</tt> function will work correctly). We set its colorLabel's pixmap to the pixmap we've just created, i.e. to a rectangle in the user's chosen color.</p>
<p>We execute (<tt>exec()</tt>) the dialog. If the user clicks OK (and the color name they've entered is valid), the call will return a true value. In this case we retrieve the name they've entered from the line edit and create a new entry in the <tt>m_colors</tt> map using the name the user has given and the color they chose.</p>
<p>At this point we could simply mark the views "dirty" and call repopulate. Instead we'll add the new color to each view directly and save the overhead of a full update (which might be considerable if we have thousands of colors).</p>
@@ -487,21 +487,21 @@ body { background: #ffffff; color: black; }
<li><p>"tqclipboard.h"</p>
<li><p>"ntqmessagebox.h"</p>
<li><p>"tqstatusbar.h"</p>
-<li><p>"ntqpainter.h"</p>
+<li><p>"tqpainter.h"</p>
<li><p>"tqstring.h"</p>
-<li><p>"ntqcolor.h"</p>
+<li><p>"tqcolor.h"</p>
<li><p>"ntqapplication.h"</p>
<li><p>"tqfiledialog.h"</p>
<li><p>"tqfile.h"</p>
<li><p>"tqregexp.h"</p>
-<li><p>"ntqcolordialog.h"</p>
+<li><p>"tqcolordialog.h"</p>
<li><p>"colornameform.h"</p>
<li><p>"ntqcheckbox.h"</p>
<li><p>"ntqradiobutton.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>
-<pre> #include &lt;<a href="qcolor-h.html">ntqcolor.h</a>&gt;
+<pre> #include &lt;<a href="tqcolor-h.html">tqcolor.h</a>&gt;
#include &lt;<a href="tqmap-h.html">tqmap.h</a>&gt;
#include &lt;<a href="tqstring-h.html">tqstring.h</a>&gt;