From 1f0ce8533cc837aa2d4155b5fc17d2004bed0197 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 5 Jun 2024 19:02:23 +0900 Subject: Rename template library nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- examples/qtl/qtl-qvaluelist.doc | 6 ++-- examples/qtl/qtl.pro | 2 +- examples/qtl/qvaluelistiterator.cpp | 57 ------------------------------------ examples/qtl/tqvaluelistiterator.cpp | 57 ++++++++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 61 deletions(-) delete mode 100644 examples/qtl/qvaluelistiterator.cpp create mode 100644 examples/qtl/tqvaluelistiterator.cpp (limited to 'examples/qtl') diff --git a/examples/qtl/qtl-qvaluelist.doc b/examples/qtl/qtl-qvaluelist.doc index e87908a83..663724125 100644 --- a/examples/qtl/qtl-qvaluelist.doc +++ b/examples/qtl/qtl-qvaluelist.doc @@ -1,15 +1,15 @@ -/*! \page qtl-qvaluelist-example.html +/*! \page qtl-tqvaluelist-example.html \ingroup examples \title A Tiny QTL Example -This tiny example shows a \l{QValueListIterator}. +This tiny example shows a \l{TQValueListIterator}.
Implementation: - \include qtl/qvaluelistiterator.cpp + \include qtl/tqvaluelistiterator.cpp */ diff --git a/examples/qtl/qtl.pro b/examples/qtl/qtl.pro index 7601f1796..151acc19b 100644 --- a/examples/qtl/qtl.pro +++ b/examples/qtl/qtl.pro @@ -3,5 +3,5 @@ TARGET = qtl CONFIG += qt console warn_on release -SOURCES = qvaluelistiterator.cpp +SOURCES = tqvaluelistiterator.cpp INTERFACES = diff --git a/examples/qtl/qvaluelistiterator.cpp b/examples/qtl/qvaluelistiterator.cpp deleted file mode 100644 index af4420bdb..000000000 --- a/examples/qtl/qvaluelistiterator.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. -** -** This file is part of an example program for TQt. This example -** program may be used, distributed and modified without limitation. -** -*****************************************************************************/ - -#include -#include -#include -#include - - -class Employee -{ -public: - Employee(): s(0) {} - Employee( const TQString& name, int salary ) - : n(name), s(salary) {} - - TQString name() const { return n; } - - int salary() const { return s; } - void setSalary( int salary ) { s = salary; } - - // this is here to support very old compilers - TQ_DUMMY_COMPARISON_OPERATOR( Employee ) - -private: - TQString n; - int s; -}; - - -int main( int, char** ) -{ - typedef TQValueList EmployeeList; - EmployeeList list; - - list.append( Employee("Bill", 50000) ); - list.append( Employee("Steve",80000) ); - list.append( Employee("Ron", 60000) ); - - Employee joe( "Joe", 50000 ); - list.append( joe ); - joe.setSalary( 4000 ); - - EmployeeList::ConstIterator it = list.begin(); - while( it != list.end() ) { - printf( "%s earns %d\n", (*it).name().latin1(), (*it).salary() ); - ++it; - } - - return 0; -} diff --git a/examples/qtl/tqvaluelistiterator.cpp b/examples/qtl/tqvaluelistiterator.cpp new file mode 100644 index 000000000..98a908997 --- /dev/null +++ b/examples/qtl/tqvaluelistiterator.cpp @@ -0,0 +1,57 @@ +/**************************************************************************** +** +** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved. +** +** This file is part of an example program for TQt. This example +** program may be used, distributed and modified without limitation. +** +*****************************************************************************/ + +#include +#include +#include +#include + + +class Employee +{ +public: + Employee(): s(0) {} + Employee( const TQString& name, int salary ) + : n(name), s(salary) {} + + TQString name() const { return n; } + + int salary() const { return s; } + void setSalary( int salary ) { s = salary; } + + // this is here to support very old compilers + TQ_DUMMY_COMPARISON_OPERATOR( Employee ) + +private: + TQString n; + int s; +}; + + +int main( int, char** ) +{ + typedef TQValueList EmployeeList; + EmployeeList list; + + list.append( Employee("Bill", 50000) ); + list.append( Employee("Steve",80000) ); + list.append( Employee("Ron", 60000) ); + + Employee joe( "Joe", 50000 ); + list.append( joe ); + joe.setSalary( 4000 ); + + EmployeeList::ConstIterator it = list.begin(); + while( it != list.end() ) { + printf( "%s earns %d\n", (*it).name().latin1(), (*it).salary() ); + ++it; + } + + return 0; +} -- cgit v1.2.1