From 42957a3f812a1db64a9ae452baa2d3fbc35f2466 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 12 Aug 2024 22:02:11 +0900 Subject: Rename more widget nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/designer-manual-3.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/html/designer-manual-3.html') diff --git a/doc/html/designer-manual-3.html b/doc/html/designer-manual-3.html index 56b9ec9b3..bcd31a737 100644 --- a/doc/html/designer-manual-3.html +++ b/doc/html/designer-manual-3.html @@ -205,7 +205,7 @@ body { background: #ffffff; color: black; }

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, all 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.)

Don't forget that you can preview to see things in action with Ctrl+T, and to click File|Save (or press Ctrl+S) 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.

Creating the Main Widget

-

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 TQMainWindow (via the main window wizard), we also have a status bar. Widgets commonly used as an application's main widget are TQListView (which provides a tree view), TQTable and TQTextEdit. Since we want to provide our users with two different views of the same data, we'll use a TQWidgetStack as our main widget. The TQWidgetStack has no visual representation of its own; you place one or more widgets on each TQWidgetStack "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 TQTabWidget.) 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 TQWidgetStack page; but this merely reflects the application's design -- we could have placed any number of widgets on each page.

+

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 TQMainWindow (via the main window wizard), we also have a status bar. Widgets commonly used as an application's main widget are TQListView (which provides a tree view), TQTable and TQTextEdit. Since we want to provide our users with two different views of the same data, we'll use a TQWidgetStack as our main widget. The TQWidgetStack has no visual representation of its own; you place one or more widgets on each TQWidgetStack "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 TQTabWidget.) 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 TQWidgetStack page; but this merely reflects the application's design -- we could have placed any number of widgets on each page.

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 name property to "colorWidgetStack".

@@ -518,7 +518,7 @@ body { background: #ffffff; color: black; }

changedIconColor()

    void MainForm::changedIconColor( TQIconViewItem *item )
     {
-        changedColor( item->text() );
+        changedColor( item->text() );
     }
 

This slot is connected for the same purpose as changedTableColor(), above. It also calls changedColor() with the name of the current color. (If you're cutting and pasting the code don't forget to name the TQIconViewItem parameter "item".)

@@ -782,7 +782,7 @@ Captures: cap(1) cap(2) cap(3) cap(4) } else if ( visible == iconsPage && colorIconView->currentItem() ) { TQIconViewItem *item = colorIconView->currentItem(); - name = item->text(); + name = item->text(); if ( colorIconView->count() == 1 ) colorIconView->clear(); else { @@ -819,7 +819,7 @@ Captures: cap(1) cap(2) cap(3) cap(4) } else if ( visible == iconsPage && colorIconView->currentItem() ) { TQIconViewItem *item = colorIconView->currentItem(); - text = item->text(); + text = item->text(); } if ( ! text.isNull() ) { TQColor color = m_colors[text]; -- cgit v1.2.1