diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-06-08 15:05:55 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-06-12 19:18:55 +0900 |
commit | 7bc57326e69b9c3f0eaeda63e4a49b67ba611426 (patch) | |
tree | 015fd18fdc62bce380935d546b677aa965b090c6 /doc/man/man3/tqdict.3qt | |
parent | ccbc1c3572fd0e26480c1432fff55d2909545538 (diff) | |
download | tqt3-7bc57326e69b9c3f0eaeda63e4a49b67ba611426.tar.gz tqt3-7bc57326e69b9c3f0eaeda63e4a49b67ba611426.zip |
Rename style nt* related files to equivalent tq*
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/man/man3/tqdict.3qt')
-rw-r--r-- | doc/man/man3/tqdict.3qt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/man/man3/tqdict.3qt b/doc/man/man3/tqdict.3qt index ded30babd..f88563863 100644 --- a/doc/man/man3/tqdict.3qt +++ b/doc/man/man3/tqdict.3qt @@ -155,7 +155,7 @@ Example #2: .PP .nf .br - TQStringList styleList = QStyleFactory::styles(); + TQStringList styleList = TQStyleFactory::styles(); .br styleList.sort(); .br @@ -196,7 +196,7 @@ Example #2: } .br .fi -In the example we are using the dictionary to provide fast random access to the keys, and we don't care what the values are. The example is used to generate a menu of QStyles, each with a unique accelerator key (or no accelerator if there are no unused letters left). +In the example we are using the dictionary to provide fast random access to the keys, and we don't care what the values are. The example is used to generate a menu of TQStyles, each with a unique accelerator key (or no accelerator if there are no unused letters left). .PP We first obtain the list of available styles, then sort them so that the menu items will be ordered alphabetically. Next we create a dictionary of int pointers. The keys in the dictionary are each one character long, representing letters that have been used for accelerators. We iterate through our list of style names. If the first letter of the style name is in the dictionary, i.e. has been used, we iterate over all the characters in the style name to see if we can find a letter that hasn't been used. If we find an unused letter we put the accelerator ampersand (&) in front of it and add that letter to the dictionary. If we can't find an unused letter the style will simply have no accelerator. If the first letter of the style name is not in the dictionary we use it for the accelerator and add it to the dictionary. Finally we create a QAction for each style. .PP |