summaryrefslogtreecommitdiffstats
path: root/doc/html/designer-manual-3.html
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-06-02 23:07:22 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-06-02 23:22:42 +0900
commit8ac0e970e4464d9f8f73c0fb34a178ff135be8c3 (patch)
treeb95884617b9a37accc843676d5d42be4116a3f54 /doc/html/designer-manual-3.html
parent68b81013e8668f50fc18b7e26a520ec93a7a1251 (diff)
downloadtqt3-8ac0e970e4464d9f8f73c0fb34a178ff135be8c3.tar.gz
tqt3-8ac0e970e4464d9f8f73c0fb34a178ff135be8c3.zip
Rename ntqwidget* related files to equivalent tqwidget*
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/designer-manual-3.html')
-rw-r--r--doc/html/designer-manual-3.html26
1 files changed, 13 insertions, 13 deletions
diff --git a/doc/html/designer-manual-3.html b/doc/html/designer-manual-3.html
index c5fcbeef4..ec01038ff 100644
--- a/doc/html/designer-manual-3.html
+++ b/doc/html/designer-manual-3.html
@@ -36,7 +36,7 @@ body { background: #ffffff; color: black; }
<p align="center"><img align="middle" src="mw-colortool1.png" alt="The Color Tool application" width="605" height="501">
</p>
<p>The <tt>colortool</tt> application is a multiplatform application that allows users to create, edit and save lists of colors. Each color has a user defined name and an RGB (Red, Green, Blue) value.</p>
-<p>This application presents the user with a view of a set of colors and their names. We will provide two views (using a <a href="ntqwidgetstack.html">TQWidgetStack</a>) which the user can switch between. The tabular view will show each color as a small square followed by its name and hex value. It will also provide the option of an indicator to show whether or not the color is one of the 216 standard web colors. The iconic view will show each color as a circular color swatch with the name of the color beneath.</p>
+<p>This application presents the user with a view of a set of colors and their names. We will provide two views (using a <a href="tqwidgetstack.html">TQWidgetStack</a>) which the user can switch between. The tabular view will show each color as a small square followed by its name and hex value. It will also provide the option of an indicator to show whether or not the color is one of the 216 standard web colors. The iconic view will show each color as a circular color swatch with the name of the color beneath.</p>
<p>The application will read and write files in the format used by the X Consortium for the <tt>rgb.txt</tt> file. This will allow users to create their own color files and to load, edit and save <tt>rgb.txt</tt> format files.</p>
<p>We will provide a simple search option so that users can quickly locate a color; this is particularly useful when hundreds or thousands of colors are shown. The search will be provided in a modeless dialog so that the user can conduct a search but still interact with the main form. We will also enable the user to add and delete colors, and to set some user options. To provide these facilities, we must create some modal dialogs.</p>
<p>Finally, we must ensure that the application loads user options at start up and saves user options at termination. We will also include the view and the size and position of the main window with these options, so that the application will always start with the size, position and view it had when the user last used it.</p>
@@ -205,7 +205,7 @@ body { background: #ffffff; color: black; }
<p>Click the viewActionGroup action group in the Action Editor, and drag it to the View menu; drop it on this menu (when the horizontal red line appears beneath the View menu). Because we dragged the action group, <em>all</em> its actions (in our case the viewTableAction and viewIconsAction) are added to the relevant menu. We'll also make the view actions available on the toolbar. Click the viewActionGroup once again, and drag it to the toolbar; drop it the right of the separator at the far right of the toolbar, and drop it on the toolbar's edge. (Again, a vertical red line will indicate the position.)</p>
<p>Don't forget that you can preview to see things in action with <b>Ctrl+T</b>, and to click <b>File|Save</b> (or press <b>Ctrl+S</b>) regularly! If you preview now you will find that if you click the view toolbar buttons and menu options that both the toolbar buttons and the menu items automatically stay in sync.</p>
<h3><a name="5"></a>Creating the Main Widget</h3>
-<p>Most main-window style applications consist of a menu bar, a toolbar, a status bar and a central widget. We've already created a menu bar and toolbar, and since we've created a <a href="ntqmainwindow.html">TQMainWindow</a> (via the main window wizard), we also have a status bar. Widgets commonly used as an application's main widget are <a href="ntqlistview.html">TQListView</a> (which provides a tree view), <a href="ntqtable.html">TQTable</a> and <a href="ntqtextedit.html">TQTextEdit</a>. Since we want to provide our users with two different views of the same data, we'll use a <a href="ntqwidgetstack.html">TQWidgetStack</a> as our main widget. The <a href="ntqwidgetstack.html">TQWidgetStack</a> has no visual representation of its own; you place one or more widgets on each <a href="ntqwidgetstack.html">TQWidgetStack</a> "page", as if each page was a form in its own right, and then provide the user with some mechanism for switching between pages. (This is similar in principle to using a <a href="ntqtabwidget.html">TQTabWidget</a>.) We want to provide our users with two views: a tabular view that lists colors and their names, and an icon-based view that shows color swatches. In our example we only place a single widget on each <a href="ntqwidgetstack.html">TQWidgetStack</a> page; but this merely reflects the application's design -- we could have placed any number of widgets on each page.</p>
+<p>Most main-window style applications consist of a menu bar, a toolbar, a status bar and a central widget. We've already created a menu bar and toolbar, and since we've created a <a href="ntqmainwindow.html">TQMainWindow</a> (via the main window wizard), we also have a status bar. Widgets commonly used as an application's main widget are <a href="ntqlistview.html">TQListView</a> (which provides a tree view), <a href="ntqtable.html">TQTable</a> and <a href="ntqtextedit.html">TQTextEdit</a>. Since we want to provide our users with two different views of the same data, we'll use a <a href="tqwidgetstack.html">TQWidgetStack</a> as our main widget. The <a href="tqwidgetstack.html">TQWidgetStack</a> has no visual representation of its own; you place one or more widgets on each <a href="tqwidgetstack.html">TQWidgetStack</a> "page", as if each page was a form in its own right, and then provide the user with some mechanism for switching between pages. (This is similar in principle to using a <a href="ntqtabwidget.html">TQTabWidget</a>.) We want to provide our users with two views: a tabular view that lists colors and their names, and an icon-based view that shows color swatches. In our example we only place a single widget on each <a href="tqwidgetstack.html">TQWidgetStack</a> page; but this merely reflects the application's design -- we could have placed any number of widgets on each page.</p>
<p>Click the Toolbox's Containers button, then click WidgetStack. Click approximately in the middle of the form to place the widget stack. Change the widget stack's <em>name</em> property to "colorWidgetStack".</p>
<p align="center"><img align="middle" src="mw-addmainwidg.png" width="641" height="394">
</p>
@@ -340,7 +340,7 @@ body { background: #ffffff; color: black; }
<h4><a name="6-8"></a>clearData()</h4>
<pre> void MainForm::clearData( bool fillWithDefaults )
{
- <a href="ntqwidget.html#setCaption">setCaption</a>( "Color Tool" );
+ <a href="tqwidget.html#setCaption">setCaption</a>( "Color Tool" );
m_colors.clear();
m_comments.clear();
@@ -646,11 +646,11 @@ body { background: #ffffff; color: black; }
}
file.<a href="ntqfile.html#close">close</a>();
m_filename = filename;
- <a href="ntqwidget.html#setCaption">setCaption</a>( TQString( "Color Tool -- %1" ).arg( m_filename ) );
+ <a href="tqwidget.html#setCaption">setCaption</a>( TQString( "Color Tool -- %1" ).arg( m_filename ) );
statusBar()-&gt;message( TQString( "Loaded '%1'" ).
arg( m_filename ), 3000 );
- <a href="ntqwidget.html">TQWidget</a> *visible = colorWidgetStack-&gt;visibleWidget();
- m_icons_dirty = ! ( m_table_dirty = ( <a href="ntqwidget.html#visible-prop">visible</a> == tablePage ) );
+ <a href="tqwidget.html">TQWidget</a> *visible = colorWidgetStack-&gt;visibleWidget();
+ m_icons_dirty = ! ( m_table_dirty = ( <a href="tqwidget.html#visible-prop">visible</a> == tablePage ) );
populate();
m_icons_dirty = ! ( m_table_dirty = ( visible != tablePage ) );
m_changed = FALSE;
@@ -737,7 +737,7 @@ Captures: cap(1) cap(2) cap(3) cap(4)
arg( it.key() ) &lt;&lt; "\n";
}
file.<a href="ntqfile.html#close">close</a>();
- <a href="ntqwidget.html#setCaption">setCaption</a>( TQString( "Color Tool -- %1" ).arg( m_filename ) );
+ <a href="tqwidget.html#setCaption">setCaption</a>( TQString( "Color Tool -- %1" ).arg( m_filename ) );
statusBar()-&gt;message( TQString( "Saved %1 colors to '%2'" ).
arg( m_colors.count() ).
arg( m_filename ), 3000 );
@@ -767,10 +767,10 @@ Captures: cap(1) cap(2) cap(3) cap(4)
<pre> void MainForm::editCut()
{
<a href="ntqstring.html">TQString</a> name;
- <a href="ntqwidget.html">TQWidget</a> *visible = colorWidgetStack-&gt;visibleWidget();
+ <a href="tqwidget.html">TQWidget</a> *visible = colorWidgetStack-&gt;visibleWidget();
statusBar()-&gt;message( TQString( "Deleting '%1'" ).arg( <a href="tqobject.html#name-prop">name</a> ) );
- if ( <a href="ntqwidget.html#visible-prop">visible</a> == tablePage &amp;&amp; colorTable-&gt;numRows() ) {
+ if ( <a href="tqwidget.html#visible-prop">visible</a> == tablePage &amp;&amp; colorTable-&gt;numRows() ) {
int row = colorTable-&gt;currentRow();
<a href="tqobject.html#name-prop">name</a> = colorTable-&gt;text( row, 0 );
colorTable-&gt;removeRow( colorTable-&gt;currentRow() );
@@ -780,7 +780,7 @@ Captures: cap(1) cap(2) cap(3) cap(4)
colorTable-&gt;setCurrentCell( colorTable-&gt;numRows() - 1, 0 );
m_icons_dirty = TRUE;
}
- else if ( <a href="ntqwidget.html#visible-prop">visible</a> == iconsPage &amp;&amp; colorIconView-&gt;currentItem() ) {
+ else if ( <a href="tqwidget.html#visible-prop">visible</a> == iconsPage &amp;&amp; colorIconView-&gt;currentItem() ) {
<a href="qiconviewitem.html">TQIconViewItem</a> *item = colorIconView-&gt;currentItem();
<a href="tqobject.html#name-prop">name</a> = item-&gt;<a href="qtableitem.html#text">text</a>();
if ( colorIconView-&gt;count() == 1 )
@@ -811,13 +811,13 @@ Captures: cap(1) cap(2) cap(3) cap(4)
<pre> void MainForm::editCopy()
{
<a href="ntqstring.html">TQString</a> text;
- <a href="ntqwidget.html">TQWidget</a> *visible = colorWidgetStack-&gt;visibleWidget();
+ <a href="tqwidget.html">TQWidget</a> *visible = colorWidgetStack-&gt;visibleWidget();
- if ( <a href="ntqwidget.html#visible-prop">visible</a> == tablePage &amp;&amp; colorTable-&gt;numRows() ) {
+ if ( <a href="tqwidget.html#visible-prop">visible</a> == tablePage &amp;&amp; colorTable-&gt;numRows() ) {
int row = colorTable-&gt;currentRow();
text = colorTable-&gt;text( row, 0 );
}
- else if ( <a href="ntqwidget.html#visible-prop">visible</a> == iconsPage &amp;&amp; colorIconView-&gt;currentItem() ) {
+ else if ( <a href="tqwidget.html#visible-prop">visible</a> == iconsPage &amp;&amp; colorIconView-&gt;currentItem() ) {
<a href="qiconviewitem.html">TQIconViewItem</a> *item = colorIconView-&gt;currentItem();
text = item-&gt;<a href="qtableitem.html#text">text</a>();
}