summaryrefslogtreecommitdiffstats
path: root/doc/html/designer-manual-3.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/designer-manual-3.html')
-rw-r--r--doc/html/designer-manual-3.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/html/designer-manual-3.html b/doc/html/designer-manual-3.html
index 257d954f4..56b9ec9b3 100644
--- a/doc/html/designer-manual-3.html
+++ b/doc/html/designer-manual-3.html
@@ -391,8 +391,8 @@ body { background: #ffffff; color: black; }
colorTable->setPixmap( row, COL_NAME, pixmap );
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 ) );
+ <a href="tqchecktableitem.html">TQCheckTableItem</a> *item = new <a href="tqchecktableitem.html">TQCheckTableItem</a>( colorTable, "" );
+ item-&gt;<a href="tqchecktableitem.html#setChecked">setChecked</a>( isWebColor( color ) );
colorTable-&gt;setItem( row, COL_WEB, item );
}
row++;
@@ -423,7 +423,7 @@ body { background: #ffffff; color: black; }
</pre>
<p>This function is at the heart of the application. It visually presents the data to the user. If the table is "dirty" (e.g. if the user has added or deleted colors in the icon view, or has opened a color file) we will populate the table. We start by deleting the contents of every cell. Next we change the number of rows to equal the number of colors in the colors map. For each color we want to display a little square that shows the color, so we create a pixmap of the required size.</p>
<p>We now create an iterator for our colors map, and iterate over every color. The colors map has the user's color names as its keys, and <a href="tqcolor.html">TQColor</a> instances as values. We retrieve the color and fill our pixmap with that color. We then set the "Name" column (column <tt>COL_NAME</tt>), to have the color's name (<tt>it.key()</tt>) and the pixmap we've just filled with that color. <a href="tqcolor.html">TQColor</a>'s <tt>name()</tt> function returns a string that is the hex representation of a color, e.g. "#12AB2F"; we retrieve this and set the second ("Hex") column to this value.</p>
-<p>If the user wants to see if which colors are web colors we create a <a href="qchecktableitem.html">TQCheckTableItem</a>, and check it if it is a web color. (We'll cover <tt>isWebColor()</tt> shortly.) We then insert this <a href="qchecktableitem.html">TQCheckTableItem</a> into the "Web" column.</p>
+<p>If the user wants to see if which colors are web colors we create a <a href="tqchecktableitem.html">TQCheckTableItem</a>, and check it if it is a web color. (We'll cover <tt>isWebColor()</tt> shortly.) We then insert this <a href="tqchecktableitem.html">TQCheckTableItem</a> into the "Web" column.</p>
<p>Having populated the table we call <tt>adjustColumn()</tt> to ensure that each column is just wide enough to show its widest entry, and show or hide the "Web" column depending on the user's preference.</p>
<p>Finally we set <tt>m_table_dirty</tt> to FALSE, since it is now up-to-date.</p>
<p>If the icon view is "dirty" we <tt>clear()</tt> it of any existing data. We then iterate over each color in our colors map. For each color we create a new <a href="tqiconviewitem.html">TQIconViewItem</a>; we label the item with the user's color name and provide a pixmap (generated by <tt>colorSwatch()</tt>, covered shortly) in the relevant color. Finally we set <tt>m_icons_dirty</tt> to "FALSE", since it is now up-to-date.</p>