summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/libpng/INSTALL2
-rw-r--r--src/3rdparty/libpng/README2
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sco201
-rw-r--r--src/3rdparty/libpng/scripts/makefile.watcom109
-rw-r--r--src/dialogs/tqdialog.h2
-rw-r--r--src/inputmethod/tqinputcontextfactory.cpp2
-rw-r--r--src/kernel/tqfontengine_x11.cpp2
-rw-r--r--src/kernel/tqiconset.cpp2
-rw-r--r--src/kernel/tqiconset.h4
-rw-r--r--src/kernel/tqmetaobject.cpp4
-rw-r--r--src/kernel/tqobjectdefs.h2
-rw-r--r--src/kernel/tqpixmap.h4
-rw-r--r--src/kernel/tqrichtext.cpp3
-rw-r--r--src/kernel/tqrichtext_p.h2
-rw-r--r--src/kernel/tqscriptengine.cpp2
-rw-r--r--src/kernel/tqscriptengine_x11.cpp8
-rw-r--r--src/kernel/tqtranslator.cpp1
-rw-r--r--src/kernel/tqwidget.h2
-rw-r--r--src/network/tqdns.h2
-rw-r--r--src/sql/tqsqlextension_p.h1
-rw-r--r--src/sql/tqsqlquery.h2
-rw-r--r--src/sql/tqsqlrecord.cpp1
-rw-r--r--src/tools/tqasciicache.h2
-rw-r--r--src/tools/tqasciidict.h2
-rw-r--r--src/tools/tqcache.h2
-rw-r--r--src/tools/tqdict.h2
-rw-r--r--src/tools/tqglobal.h133
-rw-r--r--src/tools/tqintcache.h2
-rw-r--r--src/tools/tqintdict.h2
-rw-r--r--src/tools/tqmap.h53
-rw-r--r--src/tools/tqmemarray.h2
-rw-r--r--src/tools/tqpair.h6
-rw-r--r--src/tools/tqptrdict.h2
-rw-r--r--src/tools/tqptrlist.h2
-rw-r--r--src/tools/tqptrqueue.h2
-rw-r--r--src/tools/tqptrstack.h2
-rw-r--r--src/tools/tqptrvector.h2
-rw-r--r--src/tools/tqsettings.cpp2
-rw-r--r--src/tools/tqsettings.h2
-rw-r--r--src/tools/tqsettings_p.h2
-rw-r--r--src/tools/tqtl.h12
-rw-r--r--src/tools/tqvaluelist.h40
-rw-r--r--src/tools/tqvaluevector.h24
-rw-r--r--src/tqmoc/tqmoc.y2
-rw-r--r--src/tqmoc/tqmoc_yacc.cpp2
-rw-r--r--src/widgets/tqaction.cpp140
-rw-r--r--src/widgets/tqaction.h4
-rw-r--r--src/widgets/tqbutton.cpp106
-rw-r--r--src/widgets/tqbuttongroup.cpp24
-rw-r--r--src/widgets/tqcheckbox.cpp16
-rw-r--r--src/widgets/tqcheckbox.h2
-rw-r--r--src/widgets/tqcombobox.cpp196
-rw-r--r--src/widgets/tqdatetimeedit.cpp292
-rw-r--r--src/widgets/tqdial.cpp74
-rw-r--r--src/widgets/tqdialogbuttons.cpp4
-rw-r--r--src/widgets/tqdialogbuttons_p.h6
-rw-r--r--src/widgets/tqdockarea.cpp160
-rw-r--r--src/widgets/tqdockarea.h4
-rw-r--r--src/widgets/tqdockwindow.cpp158
-rw-r--r--src/widgets/tqdockwindow.h2
-rw-r--r--src/widgets/tqeffects.cpp56
-rw-r--r--src/widgets/tqframe.cpp4
-rw-r--r--src/widgets/tqframe.h4
-rw-r--r--src/widgets/tqgrid.cpp4
-rw-r--r--src/widgets/tqgridview.cpp4
-rw-r--r--src/widgets/tqgridview.h2
-rw-r--r--src/widgets/tqgroupbox.cpp30
-rw-r--r--src/widgets/tqhbox.cpp10
-rw-r--r--src/widgets/tqheader.cpp110
-rw-r--r--src/widgets/tqheader.h6
-rw-r--r--src/widgets/tqiconview.cpp818
-rw-r--r--src/widgets/tqiconview.h20
-rw-r--r--src/widgets/tqlabel.cpp20
-rw-r--r--src/widgets/tqlcdnumber.cpp36
-rw-r--r--src/widgets/tqlcdnumber.h4
-rw-r--r--src/widgets/tqlineedit.cpp222
-rw-r--r--src/widgets/tqlistbox.cpp387
-rw-r--r--src/widgets/tqlistbox.h12
-rw-r--r--src/widgets/tqlistview.cpp710
-rw-r--r--src/widgets/tqlistview.h8
-rw-r--r--src/widgets/tqmainwindow.cpp230
-rw-r--r--src/widgets/tqmainwindow.h16
-rw-r--r--src/widgets/tqmenubar.cpp136
-rw-r--r--src/widgets/tqmenubar.h10
-rw-r--r--src/widgets/tqmenudata.cpp80
-rw-r--r--src/widgets/tqmultilineedit.cpp38
-rw-r--r--src/widgets/tqmultilineedit.h24
-rw-r--r--src/widgets/tqpopupmenu.cpp160
-rw-r--r--src/widgets/tqpopupmenu.h6
-rw-r--r--src/widgets/tqprogressbar.cpp46
-rw-r--r--src/widgets/tqpushbutton.cpp48
-rw-r--r--src/widgets/tqradiobutton.cpp12
-rw-r--r--src/widgets/tqscrollbar.cpp18
-rw-r--r--src/widgets/tqscrollbar.h2
-rw-r--r--src/widgets/tqscrollview.cpp160
-rw-r--r--src/widgets/tqscrollview.h8
-rw-r--r--src/widgets/tqslider.cpp12
-rw-r--r--src/widgets/tqslider.h2
-rw-r--r--src/widgets/tqspinbox.cpp60
-rw-r--r--src/widgets/tqspinwidget.cpp36
-rw-r--r--src/widgets/tqsplitter.cpp68
-rw-r--r--src/widgets/tqsplitter.h10
-rw-r--r--src/widgets/tqstatusbar.cpp24
-rw-r--r--src/widgets/tqstatusbar.h2
-rw-r--r--src/widgets/tqsyntaxhighlighter.cpp4
-rw-r--r--src/widgets/tqsyntaxhighlighter_p.h4
-rw-r--r--src/widgets/tqtabbar.cpp64
-rw-r--r--src/widgets/tqtabwidget.cpp30
-rw-r--r--src/widgets/tqtabwidget.h2
-rw-r--r--src/widgets/tqtextbrowser.cpp24
-rw-r--r--src/widgets/tqtextbrowser.h2
-rw-r--r--src/widgets/tqtextedit.cpp592
-rw-r--r--src/widgets/tqtextedit.h10
-rw-r--r--src/widgets/tqtextview.cpp6
-rw-r--r--src/widgets/tqtitlebar.cpp32
-rw-r--r--src/widgets/tqtoolbar.cpp50
-rw-r--r--src/widgets/tqtoolbar.h4
-rw-r--r--src/widgets/tqtoolbox.cpp14
-rw-r--r--src/widgets/tqtoolbutton.cpp82
-rw-r--r--src/widgets/tqtooltip.cpp90
-rw-r--r--src/widgets/tqvalidator.cpp6
-rw-r--r--src/widgets/tqvbox.cpp2
-rw-r--r--src/widgets/tqwhatsthis.cpp64
-rw-r--r--src/widgets/tqwhatsthis.h2
-rw-r--r--src/widgets/tqwidgetinterface_p.h4
-rw-r--r--src/widgets/tqwidgetplugin.cpp32
-rw-r--r--src/widgets/tqwidgetresizehandler.cpp64
-rw-r--r--src/widgets/tqwidgetstack.cpp10
-rw-r--r--src/xml/tqdom.h4
-rw-r--r--src/xml/tqsvgdevice.cpp3
-rw-r--r--src/xml/tqxml.cpp3
131 files changed, 3097 insertions, 3632 deletions
diff --git a/src/3rdparty/libpng/INSTALL b/src/3rdparty/libpng/INSTALL
index 7a7a0a11d..6960aae82 100644
--- a/src/3rdparty/libpng/INSTALL
+++ b/src/3rdparty/libpng/INSTALL
@@ -92,7 +92,6 @@ include
makefile.so9 => Solaris 9 makefile (gcc, creates libpng12.so.0.1.2.5)
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
- makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile
makefile.amiga => Amiga makefile
@@ -108,7 +107,6 @@ include
not use assembler code)
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
pngos2.def => OS/2 module definition file used by makefile.os2
- makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
makevms.com => VMS build script
descrip.mms => VMS makefile for MMS or MMK
SCOPTIONS.ppc => Used with smakefile.ppc
diff --git a/src/3rdparty/libpng/README b/src/3rdparty/libpng/README
index f1589fa77..9ffb3e2ec 100644
--- a/src/3rdparty/libpng/README
+++ b/src/3rdparty/libpng/README
@@ -216,7 +216,6 @@ Files in this distribution:
(gcc, creates libpng12.so.0.1.2.5)
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
- makefile.sco => For Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile
makefile.amiga => Amiga makefile
@@ -234,7 +233,6 @@ Files in this distribution:
later (does not use assembler code)
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
pngos2.def => OS/2 module definition file used by makefile.os2
- makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
makevms.com => VMS build script
SCOPTIONS.ppc => Used with smakefile.ppc
mangle => Directory containing scripts to build libpng12m.so:
diff --git a/src/3rdparty/libpng/scripts/makefile.sco b/src/3rdparty/libpng/scripts/makefile.sco
deleted file mode 100644
index 2f3b47938..000000000
--- a/src/3rdparty/libpng/scripts/makefile.sco
+++ /dev/null
@@ -1,201 +0,0 @@
-# makefile for Unixware 7 with Native cc
-# Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx
-# force ELF build dynamic linking, SONAME setting in lib and RPATH in app
-# Copyright (C) 2002 Glenn Randers-Pehrson
-# Copyright (C) 1998 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-# For conditions of distribution and use, see copyright notice in png.h
-
-CC=cc
-
-# where make install puts libpng.a, libpng.so*, and png.h
-prefix=/usr/local
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-CFLAGS= -dy -belf -I$(ZLIBINC) -O3
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
-
-#RANLIB=ranlib
-RANLIB=echo
-
-PNGMAJ = 0
-PNGMIN = 1.2.5
-PNGVER = $(PNGMAJ).$(PNGMIN)
-LIBNAME = libpng12
-
-INCPATH=$(prefix)/include/libpng
-LIBPATH=$(prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
-
-all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- ar rc $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo ccopts=\"-belf\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng12 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
- ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
-
-$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
- ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
-
-$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
- $(CC) -G -Wl,-h,$(LIBNAME).so.$(PNGMAJ) -o $(LIBNAME).so.$(PNGVER) \
- $(OBJSDLL)
-
-libpng.so.3.$(PNGMIN): $(OBJSDLL)
- $(CC) -G -Wl,-h,libpng.so.3 -o libpng.so.3.$(PNGMIN) \
- $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBNAME).so
- LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
- -@/bin/rm -f $(DI)/png.h
- -@/bin/rm -f $(DI)/pngconf.h
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
- -@/bin/rm -f $(DI)/libpng
- (cd $(DI); ln -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@/bin/rm -f $(DL)/libpng.a
- (cd $(DL); ln -f -s $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc \
- libpng.so.3.$(PNGMIN)
- -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
- -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGVER)* $(DL)/$(LIBNAME).so
- -@/bin/rm -f $(DL)/libpng.so
- -@/bin/rm -f $(DL)/libpng.so.3
- -@/bin/rm -f $(DL)/libpng.so.3.$(PNGMIN)*
- cp $(LIBNAME).so.$(PNGVER) $(DL)
- cp libpng.so.3.$(PNGMIN) $(DL)
- chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
- chmod 755 $(DL)/libpng.so.3.$(PNGMIN)
- (cd $(DL); \
- ln -f -s libpng.so.3.$(PNGMIN) libpng.so.3; \
- ln -f -s libpng.so.3 libpng.so; \
- ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
- ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
- -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
- -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
- -@/bin/rm -f $(DM)/man3/libpng.3
- -@/bin/rm -f $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
- -@/bin/rm -f $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
- -@/bin/rm -f $(DB)/libpng-config
- -@/bin/rm -f $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location.
-
-test-installed:
- $(CC) $(CFLAGS) \
- `$(BINPATH)/libpng12-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/libpng12-config --ldflags`
- ./pngtesti pngtest.png
-
-clean:
- /bin/rm -f *.o libpng.a pngtest pngout.png libpng-config \
- $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti \
- libpng.so.3.$(PNGMIN) \
- libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h
-pngerror.o pngerror.pic.o: png.h pngconf.h
-pngrio.o pngrio.pic.o: png.h pngconf.h
-pngwio.o pngwio.pic.o: png.h pngconf.h
-pngmem.o pngmem.pic.o: png.h pngconf.h
-pngset.o pngset.pic.o: png.h pngconf.h
-pngget.o pngget.pic.o: png.h pngconf.h
-pngread.o pngread.pic.o: png.h pngconf.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h
-pngpread.o pngpread.pic.o: png.h pngconf.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.watcom b/src/3rdparty/libpng/scripts/makefile.watcom
deleted file mode 100644
index 5e860fc06..000000000
--- a/src/3rdparty/libpng/scripts/makefile.watcom
+++ /dev/null
@@ -1,109 +0,0 @@
-# Makefile for libpng
-# Watcom C/C++ 10.0 and later, 32-bit protected mode, flat memory model
-
-# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
-# copyright 1995 Guy Eric Schalnat, Group 42, Inc.
-# For conditions of distribution and use, see copyright notice in png.h
-
-# To use, do "wmake /f scripts\makefile.watcom"
-
-
-# ---------------------- Watcom C/C++ 10.0 and later -----------------------
-
-# Where the zlib library and include files are located
-ZLIBLIB=..\zlib
-ZLIBINC=..\zlib
-
-# Target OS
-OS=DOS
-#OS=NT
-
-# Target CPU
-CPU=6 # Pentium Pro
-#CPU=5 # Pentium
-
-# Calling convention
-CALLING=r # registers
-#CALLING=s # stack
-
-# Uncomment next to put error messages in a file
-#ERRFILE=>>pngerrs
-
-# --------------------------------------------------------------------------
-
-
-CC=wcc386
-CFLAGS=-$(CPU)$(CALLING) -fp$(CPU) -fpi87 -oneatx -mf -bt=$(OS) -i=$(ZLIBINC) -zq
-LD=wcl386
-LDFLAGS=-zq
-
-O=.obj
-
-OBJS1=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
-OBJS2=pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
-OBJS3=pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
-
-
-all: test
-
-png$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngset$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngget$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngread$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngpread$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrtran$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrutil$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngerror$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngmem$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrio$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwio$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngtest$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngtrans$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwrite$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwtran$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwutil$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
- wlib -b -c -n -q libpng.lib $(OBJS1)
- wlib -b -c -q libpng.lib $(OBJS2)
- wlib -b -c -q libpng.lib $(OBJS3)
-
-pngtest.exe: pngtest.obj libpng.lib
- $(LD) $(LDFLAGS) pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib
-
-test: pngtest.exe .symbolic
- pngtest.exe
-
-
-# End of makefile for libpng
diff --git a/src/dialogs/tqdialog.h b/src/dialogs/tqdialog.h
index 786be4cf5..35bd0e40c 100644
--- a/src/dialogs/tqdialog.h
+++ b/src/dialogs/tqdialog.h
@@ -60,7 +60,7 @@ friend class TQPushButton;
TQ_PROPERTY( bool modal READ isModal WRITE setModal )
public:
- Q_EXPLICIT TQDialog( TQWidget* parent=0, const char* name=0, bool modal=false,
+ explicit TQDialog( TQWidget* parent=0, const char* name=0, bool modal=false,
WFlags f=0 );
~TQDialog();
diff --git a/src/inputmethod/tqinputcontextfactory.cpp b/src/inputmethod/tqinputcontextfactory.cpp
index 6ed340c60..ec723bc92 100644
--- a/src/inputmethod/tqinputcontextfactory.cpp
+++ b/src/inputmethod/tqinputcontextfactory.cpp
@@ -74,7 +74,7 @@ static void create_manager()
return;
#endif
- manager = new TQPluginManager<TQInputContextFactoryInterface>( IID_QInputContextFactory, TQApplication::libraryPaths(), "/inputmethods", FALSE );
+ manager = new TQPluginManager<TQInputContextFactoryInterface>( IID_QInputContextFactory, TQApplication::libraryPaths(), "/inputmethods", false );
TQ_CHECK_PTR( manager );
cleanup_manager.set( &manager );
diff --git a/src/kernel/tqfontengine_x11.cpp b/src/kernel/tqfontengine_x11.cpp
index 9276a5a93..1a7b95ebb 100644
--- a/src/kernel/tqfontengine_x11.cpp
+++ b/src/kernel/tqfontengine_x11.cpp
@@ -1705,7 +1705,7 @@ void TQFontEngineXft::draw( TQPainter *p, int x, int y, const TQTextEngine *engi
col.color.alpha = 0xffff;
col.pixel = pen.pixel();
#ifdef FONTENGINE_DEBUG
- tqDebug("===== drawing %d glyphs reverse=%s ======", si->num_glyphs, si->analysis.bidiLevel % 2?"TRUE":"FALSE" );
+ tqDebug("===== drawing %d glyphs reverse=%s ======", si->num_glyphs, si->analysis.bidiLevel % 2?"true":"false" );
p->save();
p->setBrush( TQt::white );
glyph_metrics_t ci = boundingBox( glyphs, advances, offsets, si->num_glyphs );
diff --git a/src/kernel/tqiconset.cpp b/src/kernel/tqiconset.cpp
index d22116207..71b71ffee 100644
--- a/src/kernel/tqiconset.cpp
+++ b/src/kernel/tqiconset.cpp
@@ -156,8 +156,6 @@ public:
delete factory;
factory = newFactory;
}
-
- TQ_DUMMY_COMPARISON_OPERATOR( TQIconSetPrivate )
};
TQIconSetIcon *TQIconSetPrivate::icon( const TQIconSet *iconSet,
diff --git a/src/kernel/tqiconset.h b/src/kernel/tqiconset.h
index 7caa24b74..798c4bbe5 100644
--- a/src/kernel/tqiconset.h
+++ b/src/kernel/tqiconset.h
@@ -89,10 +89,6 @@ public:
static void setIconSize( Size which, const TQSize& size );
static const TQSize& iconSize( Size which );
-#ifndef Q_QDOC
- TQ_DUMMY_COMPARISON_OPERATOR(TQIconSet)
-#endif
-
private:
void normalize( Size& which, const TQSize& pixSize );
TQPixmap *createScaled( Size size, const TQPixmap *suppliedPix ) const;
diff --git a/src/kernel/tqmetaobject.cpp b/src/kernel/tqmetaobject.cpp
index 4464f716d..d2119851c 100644
--- a/src/kernel/tqmetaobject.cpp
+++ b/src/kernel/tqmetaobject.cpp
@@ -164,11 +164,7 @@ public:
Internal dictionary for fast access to class members
*****************************************************************************/
-#if defined(Q_CANNOT_DELETE_CONSTANT)
-typedef TQMetaData TQConstMetaData;
-#else
typedef const TQMetaData TQConstMetaData;
-#endif
class TQ_EXPORT TQMemberDict : public TQAsciiDict<TQConstMetaData>
{
diff --git a/src/kernel/tqobjectdefs.h b/src/kernel/tqobjectdefs.h
index 69d44d6bc..871ba47a3 100644
--- a/src/kernel/tqobjectdefs.h
+++ b/src/kernel/tqobjectdefs.h
@@ -169,6 +169,6 @@ TQ_EXPORT void *tqt_find_obj_child( TQObject *, const char *, const char * );
TQ_EXPORT void *tqt_inheritedBy( TQMetaObject *super, const TQObject *cls );
template <typename T>
-TQ_INLINE_TEMPLATES T tqt_cast(const TQObject *object)
+T tqt_cast(const TQObject *object)
{ return (T)tqt_inheritedBy( ((T)0)->staticMetaObject(), object ); }
#endif // TQOBJECTDEFS_H
diff --git a/src/kernel/tqpixmap.h b/src/kernel/tqpixmap.h
index 0a89e98bf..4af4a451b 100644
--- a/src/kernel/tqpixmap.h
+++ b/src/kernel/tqpixmap.h
@@ -168,10 +168,6 @@ public:
void x11SetScreen( int screen );
#endif
-#ifndef Q_QDOC
- TQ_DUMMY_COMPARISON_OPERATOR(TQPixmap)
-#endif
-
protected:
TQPixmap( int w, int h, const uchar *data, bool isXbitmap );
int metric( int ) const;
diff --git a/src/kernel/tqrichtext.cpp b/src/kernel/tqrichtext.cpp
index eddb23761..a4a80e0dd 100644
--- a/src/kernel/tqrichtext.cpp
+++ b/src/kernel/tqrichtext.cpp
@@ -1567,8 +1567,6 @@ struct TQ_EXPORT TQTextDocumentTag {
liststyle = t.liststyle;
return *this;
}
-
- TQ_DUMMY_COMPARISON_OPERATOR(TQTextDocumentTag)
};
@@ -6584,7 +6582,6 @@ struct TQPixmapInt
TQPixmapInt() : ref( 0 ) {}
TQPixmap pm;
int ref;
- TQ_DUMMY_COMPARISON_OPERATOR(TQPixmapInt)
};
static TQMap<TQString, TQPixmapInt> *pixmap_map = 0;
diff --git a/src/kernel/tqrichtext_p.h b/src/kernel/tqrichtext_p.h
index 2d75c779b..d2219b562 100644
--- a/src/kernel/tqrichtext_p.h
+++ b/src/kernel/tqrichtext_p.h
@@ -760,7 +760,6 @@ struct TQ_EXPORT TQTextDocumentSelection
{
TQTextCursor startCursor, endCursor;
bool swapped;
- TQ_DUMMY_COMPARISON_OPERATOR(TQTextDocumentSelection)
};
#if defined(Q_TEMPLATEDLL)
@@ -1128,7 +1127,6 @@ struct TQ_EXPORT TQTextParagraphSelection
{
TQTextParagraphSelection() : start(0), end(0) { }
int start, end;
- TQ_DUMMY_COMPARISON_OPERATOR(TQTextParagraphSelection)
};
struct TQ_EXPORT TQTextLineStart
diff --git a/src/kernel/tqscriptengine.cpp b/src/kernel/tqscriptengine.cpp
index 963d2bb3b..e9431463c 100644
--- a/src/kernel/tqscriptengine.cpp
+++ b/src/kernel/tqscriptengine.cpp
@@ -98,7 +98,7 @@ private:
};
template <class T>
-TQ_INLINE_TEMPLATES TQVarLengthArray<T>::TQVarLengthArray(int asize)
+TQVarLengthArray<T>::TQVarLengthArray(int asize)
: s(asize) {
if (s > Prealloc) {
ptr = reinterpret_cast<T *>(malloc(s * sizeof(T)));
diff --git a/src/kernel/tqscriptengine_x11.cpp b/src/kernel/tqscriptengine_x11.cpp
index 7d997457c..6d5429cb0 100644
--- a/src/kernel/tqscriptengine_x11.cpp
+++ b/src/kernel/tqscriptengine_x11.cpp
@@ -1835,7 +1835,7 @@ static bool indic_shape(TQShaperItem *item)
bool invalid;
int send = indic_nextSyllableBoundary(item->script, *item->string, sstart, end, &invalid);
IDEBUG("syllable from %d, length %d, invalid=%s", sstart, send-sstart,
- invalid ? "TRUE" : "FALSE");
+ invalid ? "true" : "false");
syllable.from = sstart;
syllable.length = send-sstart;
syllable.glyphs = item->glyphs + first_glyph;
@@ -2151,7 +2151,7 @@ static bool tibetan_shape(TQShaperItem *item)
bool invalid;
int send = tibetan_nextSyllableBoundary(*(item->string), sstart, end, &invalid);
IDEBUG("syllable from %d, length %d, invalid=%s", sstart, send-sstart,
- invalid ? "TRUE" : "FALSE");
+ invalid ? "true" : "false");
syllable.from = sstart;
syllable.length = send-sstart;
syllable.glyphs = item->glyphs + first_glyph;
@@ -2781,7 +2781,7 @@ static bool khmer_shape(TQShaperItem *item)
bool invalid;
int send = khmer_nextSyllableBoundary(*item->string, sstart, end, &invalid);
KHDEBUG("syllable from %d, length %d, invalid=%s", sstart, send-sstart,
- invalid ? "TRUE" : "FALSE");
+ invalid ? "true" : "false");
syllable.from = sstart;
syllable.length = send-sstart;
syllable.glyphs = item->glyphs + first_glyph;
@@ -3288,7 +3288,7 @@ static bool myanmar_shape(TQShaperItem *item)
bool invalid;
int send = myanmar_nextSyllableBoundary(*item->string, sstart, end, &invalid);
MMDEBUG("syllable from %d, length %d, invalid=%s", sstart, send-sstart,
- invalid ? "TRUE" : "FALSE");
+ invalid ? "true" : "false");
syllable.from = sstart;
syllable.length = send-sstart;
syllable.glyphs = item->glyphs + first_glyph;
diff --git a/src/kernel/tqtranslator.cpp b/src/kernel/tqtranslator.cpp
index 59444c327..2d22dfff1 100644
--- a/src/kernel/tqtranslator.cpp
+++ b/src/kernel/tqtranslator.cpp
@@ -182,7 +182,6 @@ public:
bool operator<( const Offset&k ) const {
return ( h != k.h ) ? h < k.h : o < k.o;
}
- TQ_DUMMY_COMPARISON_OPERATOR(TQTranslatorPrivate::Offset)
uint h;
uint o;
};
diff --git a/src/kernel/tqwidget.h b/src/kernel/tqwidget.h
index ce26e00cb..c7a9733bb 100644
--- a/src/kernel/tqwidget.h
+++ b/src/kernel/tqwidget.h
@@ -139,7 +139,7 @@ class TQ_EXPORT TQWidget : public TQObject, public TQPaintDevice
TQ_PROPERTY( double windowOpacity READ windowOpacity WRITE setWindowOpacity DESIGNABLE false )
public:
- Q_EXPLICIT TQWidget( TQWidget* parent=0, const char* name=0, WFlags f=0, NFlags n=0 );
+ explicit TQWidget( TQWidget* parent=0, const char* name=0, WFlags f=0, NFlags n=0 );
~TQWidget();
WId winId() const;
diff --git a/src/network/tqdns.h b/src/network/tqdns.h
index 703edb229..65058c4f3 100644
--- a/src/network/tqdns.h
+++ b/src/network/tqdns.h
@@ -97,7 +97,6 @@ public:
:name(n), priority(p) {}
TQString name;
TQ_UINT16 priority;
- TQ_DUMMY_COMPARISON_OPERATOR(MailServer)
};
TQValueList<MailServer> mailServers() const;
@@ -109,7 +108,6 @@ public:
TQ_UINT16 priority;
TQ_UINT16 weight;
TQ_UINT16 port;
- TQ_DUMMY_COMPARISON_OPERATOR(Server)
};
TQValueList<Server> servers() const;
diff --git a/src/sql/tqsqlextension_p.h b/src/sql/tqsqlextension_p.h
index 76cb27337..2723b0d4b 100644
--- a/src/sql/tqsqlextension_p.h
+++ b/src/sql/tqsqlextension_p.h
@@ -75,7 +75,6 @@ struct TQSqlParam {
TQSqlParam( const TQVariant& v = TQVariant(), TQSql::ParameterType t = TQSql::In ): value( v ), typ( t ) {}
TQVariant value;
TQSql::ParameterType typ;
- TQ_DUMMY_COMPARISON_OPERATOR(TQSqlParam)
};
struct Holder {
diff --git a/src/sql/tqsqlquery.h b/src/sql/tqsqlquery.h
index 70c6f4b20..bfd36941f 100644
--- a/src/sql/tqsqlquery.h
+++ b/src/sql/tqsqlquery.h
@@ -74,7 +74,7 @@ class TQ_EXPORT TQSqlQuery
public:
TQSqlQuery( TQSqlResult * r );
TQSqlQuery( const TQString& query = TQString::null, TQSqlDatabase* db = 0 );
- Q_EXPLICIT TQSqlQuery( TQSqlDatabase* db );
+ explicit TQSqlQuery( TQSqlDatabase* db );
TQSqlQuery( const TQSqlQuery& other );
TQSqlQuery& operator=( const TQSqlQuery& other );
virtual ~TQSqlQuery();
diff --git a/src/sql/tqsqlrecord.cpp b/src/sql/tqsqlrecord.cpp
index 72b8e4867..ad8773a9d 100644
--- a/src/sql/tqsqlrecord.cpp
+++ b/src/sql/tqsqlrecord.cpp
@@ -68,7 +68,6 @@ public:
{
return !field.name().isNull();
}
- TQ_DUMMY_COMPARISON_OPERATOR(info)
TQSqlField field;
bool nogen;
};
diff --git a/src/tools/tqasciicache.h b/src/tools/tqasciicache.h
index dff7aaec9..84b8f4b37 100644
--- a/src/tools/tqasciicache.h
+++ b/src/tools/tqasciicache.h
@@ -84,11 +84,9 @@ private:
void deleteItem( Item d );
};
-#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
template<> inline void TQAsciiCache<void>::deleteItem( TQPtrCollection::Item )
{
}
-#endif
template<class type> inline void TQAsciiCache<type>::deleteItem( TQPtrCollection::Item d )
{
diff --git a/src/tools/tqasciidict.h b/src/tools/tqasciidict.h
index f285dd473..e6d607be4 100644
--- a/src/tools/tqasciidict.h
+++ b/src/tools/tqasciidict.h
@@ -89,11 +89,9 @@ private:
void deleteItem( Item d );
};
-#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
template<> inline void TQAsciiDict<void>::deleteItem( TQPtrCollection::Item )
{
}
-#endif
template<class type> inline void TQAsciiDict<type>::deleteItem( TQPtrCollection::Item d )
{
diff --git a/src/tools/tqcache.h b/src/tools/tqcache.h
index d6f605203..f41e2bed2 100644
--- a/src/tools/tqcache.h
+++ b/src/tools/tqcache.h
@@ -82,11 +82,9 @@ private:
void deleteItem( Item d );
};
-#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
template<> inline void TQCache<void>::deleteItem( TQPtrCollection::Item )
{
}
-#endif
template<class type> inline void TQCache<type>::deleteItem( TQPtrCollection::Item d )
{
diff --git a/src/tools/tqdict.h b/src/tools/tqdict.h
index 55723c83a..1d7bfd694 100644
--- a/src/tools/tqdict.h
+++ b/src/tools/tqdict.h
@@ -89,11 +89,9 @@ private:
void deleteItem( Item d );
};
-#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
template<> inline void TQDict<void>::deleteItem( Item )
{
}
-#endif
template<class type> inline void TQDict<type>::deleteItem( TQPtrCollection::Item d )
{
diff --git a/src/tools/tqglobal.h b/src/tools/tqglobal.h
index 941416ee8..8bac4e993 100644
--- a/src/tools/tqglobal.h
+++ b/src/tools/tqglobal.h
@@ -184,7 +184,6 @@
SYM - Symantec C++ for both PC and Macintosh
MPW - MPW C++
MSVC - Microsoft Visual C/C++, Intel C++ for Windows
- WAT - Watcom C++
GNU - GNU C++
COMEAU - Comeau C++
EDG - Edison Design Group C++
@@ -207,10 +206,6 @@
/* Symantec C++ is now Digital Mars */
#if defined(__DMC__) || defined(__SC__)
# define Q_CC_SYM
-/* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */
-# if defined(__SC__) && __SC__ < 0x750
-# define Q_NO_EXPLICIT_KEYWORD
-# endif
# define Q_NO_USING_KEYWORD
# if !defined(_CPPUNWIND)
# define Q_NO_EXCEPTIONS
@@ -218,15 +213,10 @@
#elif defined(applec)
# define Q_CC_MPW
-# define Q_NO_BOOL_TYPE
-# define Q_NO_EXPLICIT_KEYWORD
# define Q_NO_USING_KEYWORD
#elif defined(_MSC_VER)
# define Q_CC_MSVC
-/* proper support of bool for _MSC_VER >= 1100 */
-# define Q_CANNOT_DELETE_CONSTANT
-# define TQ_INLINE_TEMPLATES inline
/* Visual C++.Net issues for _MSC_VER >= 1300 */
# if _MSC_VER >= 1300
# define Q_CC_MSVC_NET
@@ -244,33 +234,9 @@
# define Q_NO_USING_KEYWORD /* ### check "using" status */
# endif
-#elif defined(__WATCOMC__)
-# define Q_CC_WAT
-# if defined(Q_OS_QNX4)
-/* compiler flags */
-# define TQ_TYPENAME
-# define Q_NO_BOOL_TYPE
-# define Q_CANNOT_DELETE_CONSTANT
-# define mutable
-/* ??? */
-# define Q_BROKEN_TEMPLATE_SPECIALIZATION
-/* no template classes in TQVariant */
-# define TQT_NO_TEMPLATE_VARIANT
-/* Wcc does not fill in functions needed by valuelists, maps, and
- valuestacks implicitly */
-# define TQ_FULL_TEMPLATE_INSTANTIATION
-/* can we just compare the structures? */
-# define TQ_FULL_TEMPLATE_INSTANTIATION_MEMCMP
-/* these are not useful to our customers */
-# define TQT_NO_SQL
-# endif
-
#elif defined(__GNUC__)
# define Q_CC_GNU
# define Q_C_CALLBACKS
-# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7
-# define TQ_FULL_TEMPLATE_INSTANTIATION
-# endif
/* GCC 2.95 knows "using" but does not support it correctly */
# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95
# define Q_NO_USING_KEYWORD
@@ -319,15 +285,9 @@
but it is not defined on older compilers like C Set 3.1 */
#elif defined(__xlC__)
# define Q_CC_XLC
-# define TQ_FULL_TEMPLATE_INSTANTIATION
# if __xlC__ < 0x400
-# define Q_NO_BOOL_TYPE
-# define Q_NO_EXPLICIT_KEYWORD
# define Q_NO_USING_KEYWORD
# define TQ_TYPENAME
-# define TQ_INLINE_TEMPLATES inline
-# define Q_BROKEN_TEMPLATE_SPECIALIZATION
-# define Q_CANNOT_DELETE_CONSTANT
# endif
/* Compilers with EDG front end are similar. To detect them we test:
@@ -335,16 +295,6 @@
__EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */
#elif defined(__EDG) || defined(__EDG__)
# define Q_CC_EDG
-/* From the EDG documentation (does not seem to apply to Compaq C++):
- _BOOL
- Defined in C++ mode when bool is a keyword. The name of this
- predefined macro is specified by a configuration flag. _BOOL
- is the default.
- __BOOL_DEFINED
- Defined in Microsoft C++ mode when bool is a keyword. */
-# if !defined(_BOOL) && !defined(__BOOL_DEFINED)
-# define Q_NO_BOOL_TYPE
-# endif
/* The Comeau compiler is based on EDG and does define __EDG__ */
# if defined(__COMO__)
@@ -383,10 +333,6 @@
/* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */
# elif defined(__USLC__) && defined(__SCO_VERSION__)
# define Q_CC_USLC
-/* The latest UDK 7.1.1b does not need this, but previous versions do */
-# if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010)
-# define TQ_INLINE_TEMPLATES inline
-# endif
# define Q_NO_USING_KEYWORD /* ### check "using" status */
/* Never tested! */
@@ -400,12 +346,8 @@
# define Q_CC_MIPS
# if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */
# define TQ_TYPENAME
-# define Q_BROKEN_TEMPLATE_SPECIALIZATION
-# define Q_NO_EXPLICIT_KEYWORD
-# define TQ_INLINE_TEMPLATES inline
# elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */
# define TQ_TYPENAME
-# define Q_BROKEN_TEMPLATE_SPECIALIZATION
# endif
# define Q_NO_USING_KEYWORD /* ### check "using" status */
# if defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 740)
@@ -417,10 +359,7 @@
#elif defined(__USLC__)
# define Q_CC_USLC
# define TQ_TYPENAME
-# define Q_NO_BOOL_TYPE
-# define Q_NO_EXPLICIT_KEYWORD
# define Q_NO_USING_KEYWORD
-# define TQ_INLINE_TEMPLATES inline
/* Never tested! */
#elif defined(__HIGHC__)
@@ -428,22 +367,13 @@
#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C)
# define Q_CC_SUN
-/* 5.0 compiler or better
- 'bool' is enabled by default but can be disabled using -features=nobool
- in which case _BOOL is not defined
- this is the default in 4.2 compatibility mode triggered by -compat=4 */
# if __SUNPRO_CC >= 0x500
-# if !defined(_BOOL)
-# define Q_NO_BOOL_TYPE
-# endif
# if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4)
# define Q_NO_USING_KEYWORD
# endif
# define Q_C_CALLBACKS
/* 4.2 compiler or older */
# else
-# define Q_NO_BOOL_TYPE
-# define Q_NO_EXPLICIT_KEYWORD
# define Q_NO_USING_KEYWORD
# endif
@@ -453,10 +383,6 @@
# define Q_CC_HPACC
# else
# define Q_CC_HP
-# define Q_NO_BOOL_TYPE
-# define TQ_FULL_TEMPLATE_INSTANTIATION
-# define Q_BROKEN_TEMPLATE_SPECIALIZATION
-# define Q_NO_EXPLICIT_KEYWORD
# endif
# define Q_NO_USING_KEYWORD /* ### check "using" status */
@@ -531,15 +457,6 @@
// Useful type definitions for TQt
//
-#if defined(Q_NO_BOOL_TYPE)
-#if defined(Q_CC_HP)
-// bool is an unsupported reserved keyword in later versions
-#define bool int
-#else
-typedef int bool;
-#endif
-#endif
-
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned uint;
@@ -550,34 +467,6 @@ typedef const char *pcchar;
//
-// Constant bool values
-//
-
-#ifndef TRUE
-const bool FALSE = false;
-const bool TRUE = true;
-#endif
-
-//
-// Proper for-scoping
-// ### turn on in 4.0
-
-#if 0 && defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
-# define for if(0){}else for
-#endif
-
-//
-// Use the "explicit" keyword on platforms that support it.
-//
-
-#if !defined(Q_NO_EXPLICIT_KEYWORD)
-# define Q_EXPLICIT explicit
-#else
-# define Q_EXPLICIT
-#endif
-
-
-//
// Utility macros and inline functions
//
@@ -808,10 +697,6 @@ TQ_EXPORT int qWinVersion();
#define QT_WA_INLINE( uni, ansi ) ( uni )
#endif
-#ifndef TQ_INLINE_TEMPLATES
-# define TQ_INLINE_TEMPLATES
-#endif
-
#ifndef TQ_TYPENAME
# define TQ_TYPENAME typename
#endif
@@ -934,24 +819,6 @@ TQ_EXPORT const char *tqInstallPathShare();
#endif /* __cplusplus */
-/*
- compilers which follow outdated template instantiation rules
- require a class to have a comparison operator to exist when
- a TQValueList of this type is instantiated. It's not actually
- used in the list, though. Hence the dummy implementation.
- Just in case other code relies on it we better trigger a warning
- mandating a real implementation.
-*/
-#ifdef TQ_FULL_TEMPLATE_INSTANTIATION
-# define TQ_DUMMY_COMPARISON_OPERATOR(C) \
- bool operator==( const C& ) const { \
- tqWarning( #C"::operator==( const "#C"& ) got called." ); \
- return false; \
- }
-#else
-# define TQ_DUMMY_COMPARISON_OPERATOR(C)
-#endif
-
#endif /* TQGLOBAL_H */
/*
diff --git a/src/tools/tqintcache.h b/src/tools/tqintcache.h
index 32903d537..9f7d52ce9 100644
--- a/src/tools/tqintcache.h
+++ b/src/tools/tqintcache.h
@@ -83,11 +83,9 @@ private:
void deleteItem( Item d );
};
-#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
template<> inline void TQIntCache<void>::deleteItem( TQPtrCollection::Item )
{
}
-#endif
template<class type> inline void TQIntCache<type>::deleteItem( TQPtrCollection::Item d )
{
diff --git a/src/tools/tqintdict.h b/src/tools/tqintdict.h
index 8427e4467..2b5d62d8e 100644
--- a/src/tools/tqintdict.h
+++ b/src/tools/tqintdict.h
@@ -86,11 +86,9 @@ private:
void deleteItem( Item d );
};
-#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
template<> inline void TQIntDict<void>::deleteItem( TQPtrCollection::Item )
{
}
-#endif
template<class type> inline void TQIntDict<type>::deleteItem( TQPtrCollection::Item d )
{
diff --git a/src/tools/tqmap.h b/src/tools/tqmap.h
index 8689e17ee..9b1888856 100644
--- a/src/tools/tqmap.h
+++ b/src/tools/tqmap.h
@@ -167,7 +167,7 @@ public:
};
template <class K, class T>
-TQ_INLINE_TEMPLATES int TQMapIterator<K,T>::inc()
+int TQMapIterator<K,T>::inc()
{
TQMapNodeBase* tmp = node;
if ( tmp->right ) {
@@ -188,7 +188,7 @@ TQ_INLINE_TEMPLATES int TQMapIterator<K,T>::inc()
}
template <class K, class T>
-TQ_INLINE_TEMPLATES int TQMapIterator<K,T>::dec()
+int TQMapIterator<K,T>::dec()
{
TQMapNodeBase* tmp = node;
if (tmp->color == TQMapNodeBase::Red &&
@@ -283,7 +283,7 @@ public:
};
template <class K, class T>
-TQ_INLINE_TEMPLATES int TQMapConstIterator<K,T>::inc()
+int TQMapConstIterator<K,T>::inc()
{
TQMapNodeBase* tmp = node;
if ( tmp->right ) {
@@ -304,7 +304,7 @@ TQ_INLINE_TEMPLATES int TQMapConstIterator<K,T>::inc()
}
template <class K, class T>
-TQ_INLINE_TEMPLATES int TQMapConstIterator<K,T>::dec()
+int TQMapConstIterator<K,T>::dec()
{
TQMapNodeBase* tmp = node;
if (tmp->color == TQMapNodeBase::Red &&
@@ -432,14 +432,14 @@ protected:
template <class Key, class T>
-TQ_INLINE_TEMPLATES TQMapPrivate<Key,T>::TQMapPrivate() {
+TQMapPrivate<Key,T>::TQMapPrivate() {
header = new Node;
header->color = TQMapNodeBase::Red; // Mark the header
header->parent = 0;
header->left = header->right = header;
}
template <class Key, class T>
-TQ_INLINE_TEMPLATES TQMapPrivate<Key,T>::TQMapPrivate( const TQMapPrivate< Key, T >* _map ) : TQMapPrivateBase( _map ) {
+TQMapPrivate<Key,T>::TQMapPrivate( const TQMapPrivate< Key, T >* _map ) : TQMapPrivateBase( _map ) {
header = new Node;
header->color = TQMapNodeBase::Red; // Mark the header
if ( _map->header->parent == 0 ) {
@@ -454,7 +454,7 @@ TQ_INLINE_TEMPLATES TQMapPrivate<Key,T>::TQMapPrivate( const TQMapPrivate< Key,
}
template <class Key, class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr TQMapPrivate<Key,T>::copy( TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr p )
+TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr TQMapPrivate<Key,T>::copy( TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr p )
{
if ( !p )
return 0;
@@ -476,7 +476,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr TQMapPrivate<Key,T>
}
template <class Key, class T>
-TQ_INLINE_TEMPLATES void TQMapPrivate<Key,T>::clear()
+void TQMapPrivate<Key,T>::clear()
{
clear( (NodePtr)(header->parent) );
header->color = TQMapNodeBase::Red;
@@ -486,7 +486,7 @@ TQ_INLINE_TEMPLATES void TQMapPrivate<Key,T>::clear()
}
template <class Key, class T>
-TQ_INLINE_TEMPLATES void TQMapPrivate<Key,T>::clear( TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr p )
+void TQMapPrivate<Key,T>::clear( TQ_TYPENAME TQMapPrivate<Key,T>::NodePtr p )
{
while ( p != 0 ) {
clear( (NodePtr)p->right );
@@ -497,7 +497,7 @@ TQ_INLINE_TEMPLATES void TQMapPrivate<Key,T>::clear( TQ_TYPENAME TQMapPrivate<Ke
}
template <class Key, class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::ConstIterator TQMapPrivate<Key,T>::find(const Key& k) const
+TQ_TYPENAME TQMapPrivate<Key,T>::ConstIterator TQMapPrivate<Key,T>::find(const Key& k) const
{
TQMapNodeBase* y = header; // Last node
TQMapNodeBase* x = header->parent; // Root node.
@@ -520,7 +520,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::ConstIterator TQMapPrivate<
}
template <class Key, class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insertSingle( const Key& k )
+TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insertSingle( const Key& k )
{
// Search correct position in the tree
TQMapNodeBase* y = header;
@@ -551,7 +551,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T
template <class Key, class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k )
+TQ_TYPENAME TQMapPrivate<Key,T>::Iterator TQMapPrivate<Key,T>::insert( TQMapNodeBase* x, TQMapNodeBase* y, const Key& k )
{
NodePtr z = new Node( k );
if (y == header || x != 0 || k < key(y) ) {
@@ -733,13 +733,6 @@ public:
void remove( iterator it ) { detach(); sh->remove( it ); }
void remove( const Key& k );
-#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
- bool operator==( const TQMap<Key,T>& ) const { return false; }
-#ifndef TQT_NO_STL
- bool operator==( const std::map<Key,T>& ) const { return false; }
-#endif
-#endif
-
protected:
/**
* Helpers
@@ -754,7 +747,7 @@ private:
};
template<class Key, class T>
-TQ_INLINE_TEMPLATES TQMap<Key,T>& TQMap<Key,T>::operator= ( const TQMap<Key,T>& m )
+TQMap<Key,T>& TQMap<Key,T>::operator= ( const TQMap<Key,T>& m )
{
m.sh->ref();
if ( sh->deref() )
@@ -764,7 +757,7 @@ TQ_INLINE_TEMPLATES TQMap<Key,T>& TQMap<Key,T>::operator= ( const TQMap<Key,T>&
}
template<class Key, class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::insert_pair TQMap<Key,T>::insert( const TQ_TYPENAME TQMap<Key,T>::value_type& x )
+TQ_TYPENAME TQMap<Key,T>::insert_pair TQMap<Key,T>::insert( const TQ_TYPENAME TQMap<Key,T>::value_type& x )
{
detach();
size_type n = size();
@@ -778,7 +771,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::insert_pair TQMap<Key,T>::insert(
}
template<class Key, class T>
-TQ_INLINE_TEMPLATES void TQMap<Key,T>::erase( const Key& k )
+void TQMap<Key,T>::erase( const Key& k )
{
detach();
iterator it( sh->find( k ).node );
@@ -787,7 +780,7 @@ TQ_INLINE_TEMPLATES void TQMap<Key,T>::erase( const Key& k )
}
template<class Key, class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::size_type TQMap<Key,T>::count( const Key& k ) const
+TQ_TYPENAME TQMap<Key,T>::size_type TQMap<Key,T>::count( const Key& k ) const
{
const_iterator it( sh->find( k ).node );
if ( it != end() ) {
@@ -802,7 +795,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::size_type TQMap<Key,T>::count( con
}
template<class Key, class T>
-TQ_INLINE_TEMPLATES T& TQMap<Key,T>::operator[] ( const Key& k )
+T& TQMap<Key,T>::operator[] ( const Key& k )
{
detach();
TQMapNode<Key,T>* p = sh->find( k ).node;
@@ -812,7 +805,7 @@ TQ_INLINE_TEMPLATES T& TQMap<Key,T>::operator[] ( const Key& k )
}
template<class Key, class T>
-TQ_INLINE_TEMPLATES void TQMap<Key,T>::clear()
+void TQMap<Key,T>::clear()
{
if ( sh->count == 1 )
sh->clear();
@@ -823,7 +816,7 @@ TQ_INLINE_TEMPLATES void TQMap<Key,T>::clear()
}
template<class Key, class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::iterator TQMap<Key,T>::insert( const Key& key, const T& value, bool overwrite )
+TQ_TYPENAME TQMap<Key,T>::iterator TQMap<Key,T>::insert( const Key& key, const T& value, bool overwrite )
{
detach();
size_type n = size();
@@ -834,7 +827,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQMap<Key,T>::iterator TQMap<Key,T>::insert( con
}
template<class Key, class T>
-TQ_INLINE_TEMPLATES void TQMap<Key,T>::remove( const Key& k )
+void TQMap<Key,T>::remove( const Key& k )
{
detach();
iterator it( sh->find( k ).node );
@@ -843,7 +836,7 @@ TQ_INLINE_TEMPLATES void TQMap<Key,T>::remove( const Key& k )
}
template<class Key, class T>
-TQ_INLINE_TEMPLATES void TQMap<Key,T>::detachInternal()
+void TQMap<Key,T>::detachInternal()
{
sh->deref(); sh = new TQMapPrivate<Key,T>( sh );
}
@@ -851,7 +844,7 @@ TQ_INLINE_TEMPLATES void TQMap<Key,T>::detachInternal()
#ifndef TQT_NO_DATASTREAM
template<class Key, class T>
-TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQMap<Key,T>& m ) {
+TQDataStream& operator>>( TQDataStream& s, TQMap<Key,T>& m ) {
m.clear();
TQ_UINT32 c;
s >> c;
@@ -867,7 +860,7 @@ TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQMap<Key,T>& m )
template<class Key, class T>
-TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQMap<Key,T>& m ) {
+TQDataStream& operator<<( TQDataStream& s, const TQMap<Key,T>& m ) {
s << (TQ_UINT32)m.size();
TQMapConstIterator<Key,T> it = m.begin();
for( ; it != m.end(); ++it )
diff --git a/src/tools/tqmemarray.h b/src/tools/tqmemarray.h
index 39898a47a..2f7aab38c 100644
--- a/src/tools/tqmemarray.h
+++ b/src/tools/tqmemarray.h
@@ -59,7 +59,7 @@ protected:
public:
TQMemArray() {}
- TQMemArray( int size ) : TQGArray(size*sizeof(type)) {} // ### 4.0 Q_EXPLICIT
+ TQMemArray( int size ) : TQGArray(size*sizeof(type)) {} // ### 4.0 explicit
TQMemArray( const TQMemArray<type> &a ) : TQGArray(a) {}
~TQMemArray() {}
TQMemArray<type> &operator=(const TQMemArray<type> &a)
diff --git a/src/tools/tqpair.h b/src/tools/tqpair.h
index 8d487e38b..588c809c2 100644
--- a/src/tools/tqpair.h
+++ b/src/tools/tqpair.h
@@ -72,20 +72,20 @@ struct TQPair
};
template <class T1, class T2>
-TQ_INLINE_TEMPLATES bool operator==( const TQPair<T1, T2>& x, const TQPair<T1, T2>& y )
+bool operator==( const TQPair<T1, T2>& x, const TQPair<T1, T2>& y )
{
return x.first == y.first && x.second == y.second;
}
template <class T1, class T2>
-TQ_INLINE_TEMPLATES bool operator<( const TQPair<T1, T2>& x, const TQPair<T1, T2>& y )
+bool operator<( const TQPair<T1, T2>& x, const TQPair<T1, T2>& y )
{
return x.first < y.first ||
( !( y.first < x.first ) && x.second < y.second );
}
template <class T1, class T2>
-TQ_INLINE_TEMPLATES TQPair<T1, T2> qMakePair( const T1& x, const T2& y )
+TQPair<T1, T2> qMakePair( const T1& x, const T2& y )
{
return TQPair<T1, T2>( x, y );
}
diff --git a/src/tools/tqptrdict.h b/src/tools/tqptrdict.h
index c14c132c1..999f9f8cb 100644
--- a/src/tools/tqptrdict.h
+++ b/src/tools/tqptrdict.h
@@ -86,11 +86,9 @@ private:
void deleteItem( Item d );
};
-#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
template<> inline void TQPtrDict<void>::deleteItem( TQPtrCollection::Item )
{
}
-#endif
template<class type>
inline void TQPtrDict<type>::deleteItem( TQPtrCollection::Item d )
diff --git a/src/tools/tqptrlist.h b/src/tools/tqptrlist.h
index ef63382c6..b43dd7c18 100644
--- a/src/tools/tqptrlist.h
+++ b/src/tools/tqptrlist.h
@@ -143,11 +143,9 @@ private:
void deleteItem( Item d );
};
-#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
template<> inline void TQPtrList<void>::deleteItem( TQPtrCollection::Item )
{
}
-#endif
template<class type> inline void TQPtrList<type>::deleteItem( TQPtrCollection::Item d )
{
diff --git a/src/tools/tqptrqueue.h b/src/tools/tqptrqueue.h
index 2cebf08f8..82a9af53d 100644
--- a/src/tools/tqptrqueue.h
+++ b/src/tools/tqptrqueue.h
@@ -76,11 +76,9 @@ private:
void deleteItem( Item d );
};
-#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
template<> inline void TQPtrQueue<void>::deleteItem( TQPtrCollection::Item )
{
}
-#endif
template<class type> inline void TQPtrQueue<type>::deleteItem( TQPtrCollection::Item d )
{
diff --git a/src/tools/tqptrstack.h b/src/tools/tqptrstack.h
index 229f03ef9..d3a0f3862 100644
--- a/src/tools/tqptrstack.h
+++ b/src/tools/tqptrstack.h
@@ -76,11 +76,9 @@ private:
void deleteItem( Item d );
};
-#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
template<> inline void TQPtrStack<void>::deleteItem( TQPtrCollection::Item )
{
}
-#endif
template<class type> inline void TQPtrStack<type>::deleteItem( TQPtrCollection::Item d )
{
diff --git a/src/tools/tqptrvector.h b/src/tools/tqptrvector.h
index bf2846209..5d497d996 100644
--- a/src/tools/tqptrvector.h
+++ b/src/tools/tqptrvector.h
@@ -98,11 +98,9 @@ private:
void deleteItem( Item d );
};
-#if !defined(Q_BROKEN_TEMPLATE_SPECIALIZATION)
template<> inline void TQPtrVector<void>::deleteItem( TQPtrCollection::Item )
{
}
-#endif
template<class type> inline void TQPtrVector<type>::deleteItem( TQPtrCollection::Item d )
{
diff --git a/src/tools/tqsettings.cpp b/src/tools/tqsettings.cpp
index 2f846731d..76b3faa61 100644
--- a/src/tools/tqsettings.cpp
+++ b/src/tools/tqsettings.cpp
@@ -1324,7 +1324,6 @@ TQString TQSettings::readEntry(const TQString &key, const TQString &def, bool *o
}
-#if !defined(Q_NO_BOOL_TYPE)
/*!
Writes the boolean entry \a value into key \a key. The \a key is
created if it doesn't exist. Any previous value is overwritten by \a
@@ -1356,7 +1355,6 @@ bool TQSettings::writeEntry(const TQString &key, bool value)
TQString s(value ? "true" : "false");
return writeEntry(key, s);
}
-#endif
/*!
diff --git a/src/tools/tqsettings.h b/src/tools/tqsettings.h
index 82966746e..440e16d6f 100644
--- a/src/tools/tqsettings.h
+++ b/src/tools/tqsettings.h
@@ -73,9 +73,7 @@ public:
~TQSettings();
-#if !defined(Q_NO_BOOL_TYPE)
bool writeEntry( const TQString &, bool );
-#endif
bool writeEntry( const TQString &, double );
bool writeEntry( const TQString &, int );
bool writeEntry( const TQString &, const char * );
diff --git a/src/tools/tqsettings_p.h b/src/tools/tqsettings_p.h
index 75318492d..fffeb3256 100644
--- a/src/tools/tqsettings_p.h
+++ b/src/tools/tqsettings_p.h
@@ -116,9 +116,7 @@ public:
void sysInit();
void sysClear();
-#if !defined(Q_NO_BOOL_TYPE)
bool sysWriteEntry( const TQString &, bool );
-#endif
bool sysWriteEntry( const TQString &, double );
bool sysWriteEntry( const TQString &, int );
bool sysWriteEntry( const TQString &, const TQString & );
diff --git a/src/tools/tqtl.h b/src/tools/tqtl.h
index c70f198f2..858a48ce0 100644
--- a/src/tools/tqtl.h
+++ b/src/tools/tqtl.h
@@ -149,7 +149,7 @@ inline void tqSwap( T& _value1, T& _value2 )
template <class InputIterator>
-TQ_INLINE_TEMPLATES void qBubbleSort( InputIterator b, InputIterator e )
+void qBubbleSort( InputIterator b, InputIterator e )
{
// Goto last element;
InputIterator last = e;
@@ -190,7 +190,7 @@ inline void qBubbleSort( Container &c )
template <class Value>
-TQ_INLINE_TEMPLATES void qHeapSortPushDown( Value* heap, int first, int last )
+void qHeapSortPushDown( Value* heap, int first, int last )
{
int r = first;
while ( r <= last / 2 ) {
@@ -219,7 +219,7 @@ TQ_INLINE_TEMPLATES void qHeapSortPushDown( Value* heap, int first, int last )
template <class InputIterator, class Value>
-TQ_INLINE_TEMPLATES void qHeapSortHelper( InputIterator b, InputIterator e, Value, uint n )
+void qHeapSortHelper( InputIterator b, InputIterator e, Value, uint n )
{
// Create the heap
InputIterator insert = b;
@@ -250,7 +250,7 @@ TQ_INLINE_TEMPLATES void qHeapSortHelper( InputIterator b, InputIterator e, Valu
template <class InputIterator>
-TQ_INLINE_TEMPLATES void qHeapSort( InputIterator b, InputIterator e )
+void qHeapSort( InputIterator b, InputIterator e )
{
// Empty ?
if ( b == e )
@@ -271,7 +271,7 @@ TQ_INLINE_TEMPLATES void qHeapSort( InputIterator b, InputIterator e )
template <class Container>
-TQ_INLINE_TEMPLATES void qHeapSort( Container &c )
+void qHeapSort( Container &c )
{
if ( c.begin() == c.end() )
return;
@@ -285,7 +285,7 @@ template <class Container>
class TQBackInsertIterator
{
public:
- Q_EXPLICIT TQBackInsertIterator( Container &c )
+ explicit TQBackInsertIterator( Container &c )
: container( &c )
{
}
diff --git a/src/tools/tqvaluelist.h b/src/tools/tqvaluelist.h
index d0beab5ed..f770214b7 100644
--- a/src/tools/tqvaluelist.h
+++ b/src/tools/tqvaluelist.h
@@ -250,13 +250,13 @@ public:
};
template <class T>
-TQ_INLINE_TEMPLATES TQValueListPrivate<T>::TQValueListPrivate()
+TQValueListPrivate<T>::TQValueListPrivate()
{
node = new Node(); node->next = node->prev = node; nodes = 0;
}
template <class T>
-TQ_INLINE_TEMPLATES TQValueListPrivate<T>::TQValueListPrivate( const TQValueListPrivate<T>& _p )
+TQValueListPrivate<T>::TQValueListPrivate( const TQValueListPrivate<T>& _p )
: TQShared()
{
node = new Node(); node->next = node->prev = node; nodes = 0;
@@ -268,7 +268,7 @@ TQ_INLINE_TEMPLATES TQValueListPrivate<T>::TQValueListPrivate( const TQValueList
}
template <class T>
-TQ_INLINE_TEMPLATES TQValueListPrivate<T>::~TQValueListPrivate() {
+TQValueListPrivate<T>::~TQValueListPrivate() {
NodePtr p = node->next;
while( p != node ) {
NodePtr x = p->next;
@@ -279,7 +279,7 @@ TQ_INLINE_TEMPLATES TQValueListPrivate<T>::~TQValueListPrivate() {
}
template <class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::Iterator TQValueListPrivate<T>::insert( TQ_TYPENAME TQValueListPrivate<T>::Iterator it, const T& x )
+TQ_TYPENAME TQValueListPrivate<T>::Iterator TQValueListPrivate<T>::insert( TQ_TYPENAME TQValueListPrivate<T>::Iterator it, const T& x )
{
NodePtr p = new Node( x );
p->next = it.node;
@@ -291,7 +291,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::Iterator TQValueListPriva
}
template <class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::Iterator TQValueListPrivate<T>::remove( TQ_TYPENAME TQValueListPrivate<T>::Iterator it )
+TQ_TYPENAME TQValueListPrivate<T>::Iterator TQValueListPrivate<T>::remove( TQ_TYPENAME TQValueListPrivate<T>::Iterator it )
{
Q_ASSERT ( it.node != node );
NodePtr next = it.node->next;
@@ -304,7 +304,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::Iterator TQValueListPriva
}
template <class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::NodePtr TQValueListPrivate<T>::find( TQ_TYPENAME TQValueListPrivate<T>::NodePtr start, const T& x ) const
+TQ_TYPENAME TQValueListPrivate<T>::NodePtr TQValueListPrivate<T>::find( TQ_TYPENAME TQValueListPrivate<T>::NodePtr start, const T& x ) const
{
ConstIterator first( start );
ConstIterator last( node );
@@ -317,7 +317,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::NodePtr TQValueListPrivat
}
template <class T>
-TQ_INLINE_TEMPLATES int TQValueListPrivate<T>::findIndex( TQ_TYPENAME TQValueListPrivate<T>::NodePtr start, const T& x ) const
+int TQValueListPrivate<T>::findIndex( TQ_TYPENAME TQValueListPrivate<T>::NodePtr start, const T& x ) const
{
ConstIterator first( start );
ConstIterator last( node );
@@ -332,7 +332,7 @@ TQ_INLINE_TEMPLATES int TQValueListPrivate<T>::findIndex( TQ_TYPENAME TQValueLis
}
template <class T>
-TQ_INLINE_TEMPLATES uint TQValueListPrivate<T>::contains( const T& x ) const
+uint TQValueListPrivate<T>::contains( const T& x ) const
{
uint result = 0;
Iterator first = Iterator( node->next );
@@ -346,7 +346,7 @@ TQ_INLINE_TEMPLATES uint TQValueListPrivate<T>::contains( const T& x ) const
}
template <class T>
-TQ_INLINE_TEMPLATES bool TQValueListPrivate<T>::containsYesNo( const T& x ) const
+bool TQValueListPrivate<T>::containsYesNo( const T& x ) const
{
Iterator first = Iterator( node->next );
Iterator last = Iterator( node );
@@ -359,7 +359,7 @@ TQ_INLINE_TEMPLATES bool TQValueListPrivate<T>::containsYesNo( const T& x ) cons
}
template <class T>
-TQ_INLINE_TEMPLATES uint TQValueListPrivate<T>::remove( const T& _x )
+uint TQValueListPrivate<T>::remove( const T& _x )
{
const T x = _x;
uint result = 0;
@@ -376,7 +376,7 @@ TQ_INLINE_TEMPLATES uint TQValueListPrivate<T>::remove( const T& _x )
}
template <class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::NodePtr TQValueListPrivate<T>::at( size_type i ) const
+TQ_TYPENAME TQValueListPrivate<T>::NodePtr TQValueListPrivate<T>::at( size_type i ) const
{
Q_ASSERT( i <= nodes );
NodePtr p = node->next;
@@ -386,7 +386,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueListPrivate<T>::NodePtr TQValueListPrivat
}
template <class T>
-TQ_INLINE_TEMPLATES void TQValueListPrivate<T>::clear()
+void TQValueListPrivate<T>::clear()
{
nodes = 0;
NodePtr p = node->next;
@@ -596,7 +596,7 @@ private:
};
template <class T>
-TQ_INLINE_TEMPLATES bool TQValueList<T>::operator== ( const TQValueList<T>& l ) const
+bool TQValueList<T>::operator== ( const TQValueList<T>& l ) const
{
if ( size() != l.size() )
return false;
@@ -609,13 +609,13 @@ TQ_INLINE_TEMPLATES bool TQValueList<T>::operator== ( const TQValueList<T>& l )
}
template <class T>
-TQ_INLINE_TEMPLATES void TQValueList<T>::clear()
+void TQValueList<T>::clear()
{
if ( sh->count == 1 ) sh->clear(); else { sh->deref(); sh = new TQValueListPrivate<T>(); }
}
template <class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueList<T>::iterator TQValueList<T>::erase( TQ_TYPENAME TQValueList<T>::iterator first, TQ_TYPENAME TQValueList<T>::iterator last )
+TQ_TYPENAME TQValueList<T>::iterator TQValueList<T>::erase( TQ_TYPENAME TQValueList<T>::iterator first, TQ_TYPENAME TQValueList<T>::iterator last )
{
while ( first != last )
erase( first++ );
@@ -624,14 +624,14 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueList<T>::iterator TQValueList<T>::erase(
template <class T>
-TQ_INLINE_TEMPLATES void TQValueList<T>::insert( TQ_TYPENAME TQValueList<T>::iterator pos, size_type n, const T& x )
+void TQValueList<T>::insert( TQ_TYPENAME TQValueList<T>::iterator pos, size_type n, const T& x )
{
for ( ; n > 0; --n )
insert( pos, x );
}
template <class T>
-TQ_INLINE_TEMPLATES TQValueList<T> TQValueList<T>::operator+ ( const TQValueList<T>& l ) const
+TQValueList<T> TQValueList<T>::operator+ ( const TQValueList<T>& l ) const
{
TQValueList<T> l2( *this );
for( const_iterator it = l.begin(); it != l.end(); ++it )
@@ -640,7 +640,7 @@ TQ_INLINE_TEMPLATES TQValueList<T> TQValueList<T>::operator+ ( const TQValueList
}
template <class T>
-TQ_INLINE_TEMPLATES TQValueList<T>& TQValueList<T>::operator+= ( const TQValueList<T>& l )
+TQValueList<T>& TQValueList<T>::operator+= ( const TQValueList<T>& l )
{
TQValueList<T> copy = l;
for( const_iterator it = copy.begin(); it != copy.end(); ++it )
@@ -650,7 +650,7 @@ TQ_INLINE_TEMPLATES TQValueList<T>& TQValueList<T>::operator+= ( const TQValueLi
#ifndef TQT_NO_DATASTREAM
template <class T>
-TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueList<T>& l )
+TQDataStream& operator>>( TQDataStream& s, TQValueList<T>& l )
{
l.clear();
TQ_UINT32 c;
@@ -665,7 +665,7 @@ TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueList<T>& l
}
template <class T>
-TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQValueList<T>& l )
+TQDataStream& operator<<( TQDataStream& s, const TQValueList<T>& l )
{
s << (TQ_UINT32)l.size();
TQValueListConstIterator<T> it = l.begin();
diff --git a/src/tools/tqvaluevector.h b/src/tools/tqvaluevector.h
index 3cae4b71d..791095b93 100644
--- a/src/tools/tqvaluevector.h
+++ b/src/tools/tqvaluevector.h
@@ -121,7 +121,7 @@ private:
};
template <class T>
-TQ_INLINE_TEMPLATES TQValueVectorPrivate<T>::TQValueVectorPrivate( const TQValueVectorPrivate<T>& x )
+TQValueVectorPrivate<T>::TQValueVectorPrivate( const TQValueVectorPrivate<T>& x )
: TQShared()
{
size_t i = x.size();
@@ -142,7 +142,7 @@ TQ_INLINE_TEMPLATES TQValueVectorPrivate<T>::TQValueVectorPrivate( const TQValue
}
template <class T>
-TQ_INLINE_TEMPLATES TQValueVectorPrivate<T>::TQValueVectorPrivate( size_t size )
+TQValueVectorPrivate<T>::TQValueVectorPrivate( size_t size )
{
if ( size > 0 ) {
start = new T[size];
@@ -156,7 +156,7 @@ TQ_INLINE_TEMPLATES TQValueVectorPrivate<T>::TQValueVectorPrivate( size_t size )
}
template <class T>
-TQ_INLINE_TEMPLATES void TQValueVectorPrivate<T>::insert( pointer pos, const T& x )
+void TQValueVectorPrivate<T>::insert( pointer pos, const T& x )
{
const size_t lastSize = size();
const size_t n = lastSize !=0 ? 2*lastSize : 1;
@@ -173,7 +173,7 @@ TQ_INLINE_TEMPLATES void TQValueVectorPrivate<T>::insert( pointer pos, const T&
}
template <class T>
-TQ_INLINE_TEMPLATES void TQValueVectorPrivate<T>::insert( pointer pos, size_t n, const T& x )
+void TQValueVectorPrivate<T>::insert( pointer pos, size_t n, const T& x )
{
if ( size_t( end - finish ) >= n ) {
// enough room
@@ -213,7 +213,7 @@ TQ_INLINE_TEMPLATES void TQValueVectorPrivate<T>::insert( pointer pos, size_t n,
}
template <class T>
-TQ_INLINE_TEMPLATES void TQValueVectorPrivate<T>::reserve( size_t n )
+void TQValueVectorPrivate<T>::reserve( size_t n )
{
const size_t lastSize = size();
pointer tmp = growAndCopy( n, start, finish );
@@ -223,7 +223,7 @@ TQ_INLINE_TEMPLATES void TQValueVectorPrivate<T>::reserve( size_t n )
}
template <class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVectorPrivate<T>::pointer TQValueVectorPrivate<T>::growAndCopy( size_t n, pointer s, pointer f )
+TQ_TYPENAME TQValueVectorPrivate<T>::pointer TQValueVectorPrivate<T>::growAndCopy( size_t n, pointer s, pointer f )
{
pointer newStart = new T[n];
tqCopy( s, f, newStart );
@@ -491,21 +491,21 @@ private:
};
template <class T>
-TQ_INLINE_TEMPLATES TQValueVector<T>::TQValueVector( size_type n, const T& val )
+TQValueVector<T>::TQValueVector( size_type n, const T& val )
{
sh = new TQValueVectorPrivate<T>( n );
tqFill( begin(), end(), val );
}
template <class T>
-TQ_INLINE_TEMPLATES void TQValueVector<T>::detachInternal()
+void TQValueVector<T>::detachInternal()
{
sh->deref();
sh = new TQValueVectorPrivate<T>( *sh );
}
template <class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVector<T>::iterator TQValueVector<T>::insert( iterator pos, const T& x )
+TQ_TYPENAME TQValueVector<T>::iterator TQValueVector<T>::insert( iterator pos, const T& x )
{
size_type offset = pos - sh->start;
detach();
@@ -530,7 +530,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVector<T>::iterator TQValueVector<T>::ins
}
template <class T>
-TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVector<T>::iterator TQValueVector<T>::insert( iterator pos, size_type n, const T& x )
+TQ_TYPENAME TQValueVector<T>::iterator TQValueVector<T>::insert( iterator pos, size_type n, const T& x )
{
if ( n != 0 ) {
size_type offset = pos - sh->start;
@@ -544,7 +544,7 @@ TQ_INLINE_TEMPLATES TQ_TYPENAME TQValueVector<T>::iterator TQValueVector<T>::ins
#ifndef TQT_NO_DATASTREAM
template<class T>
-TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueVector<T>& v )
+TQDataStream& operator>>( TQDataStream& s, TQValueVector<T>& v )
{
v.clear();
TQ_UINT32 c;
@@ -560,7 +560,7 @@ TQ_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueVector<T>&
}
template<class T>
-TQ_INLINE_TEMPLATES TQDataStream& operator<<( TQDataStream& s, const TQValueVector<T>& v )
+TQDataStream& operator<<( TQDataStream& s, const TQValueVector<T>& v )
{
s << (TQ_UINT32)v.size();
// ### use typename TQValueVector<T>::const_iterator once all supported
diff --git a/src/tqmoc/tqmoc.y b/src/tqmoc/tqmoc.y
index 9df3d1ac7..193ed76f7 100644
--- a/src/tqmoc/tqmoc.y
+++ b/src/tqmoc/tqmoc.y
@@ -2339,7 +2339,7 @@ int generateEnums()
(const char*)it2.current()->name,
it2.current()->count(),
i,
- it2.current()->set ? "TRUE" : "FALSE" );
+ it2.current()->set ? "true" : "false" );
}
fprintf( out, "\n };\n" );
fprintf( out, "#endif // TQT_NO_PROPERTIES\n" );
diff --git a/src/tqmoc/tqmoc_yacc.cpp b/src/tqmoc/tqmoc_yacc.cpp
index b67bfc22b..0b70f42d3 100644
--- a/src/tqmoc/tqmoc_yacc.cpp
+++ b/src/tqmoc/tqmoc_yacc.cpp
@@ -5214,7 +5214,7 @@ int generateEnums()
(const char*)it2.current()->name,
it2.current()->count(),
i,
- it2.current()->set ? "TRUE" : "FALSE" );
+ it2.current()->set ? "true" : "false" );
}
fprintf( out, "\n };\n" );
fprintf( out, "#endif // TQT_NO_PROPERTIES\n" );
diff --git a/src/widgets/tqaction.cpp b/src/widgets/tqaction.cpp
index 63a7896c5..8a590cced 100644
--- a/src/widgets/tqaction.cpp
+++ b/src/widgets/tqaction.cpp
@@ -83,7 +83,7 @@
they are invoked. Use setToggleAction() to set an action's toggled
status. To see if an action is a toggle action use
isToggleAction(). A toggle action may be "on", isOn() returns
- TRUE, or "off", isOn() returns FALSE.
+ true, or "off", isOn() returns false.
Actions are added to widgets (menus or toolbars) using addTo(),
and removed using removeFrom().
@@ -181,17 +181,17 @@ TQActionPrivate::TQActionPrivate(TQAction *act)
#ifndef TQT_NO_ACCEL
key( 0 ), accel( 0 ), accelid( 0 ),
#endif
- enabled( TRUE ), visible( TRUE ), toggleaction( FALSE ), on( FALSE ),
- forceDisabled( FALSE ), forceInvisible( FALSE ),
+ enabled( true ), visible( true ), toggleaction( false ), on( false ),
+ forceDisabled( false ), forceInvisible( false ),
#ifndef TQT_NO_TOOLTIP
tipGroup( 0 ),
#endif
d_group( 0 ), action(act)
{
- menuitems.setAutoDelete( TRUE );
- comboitems.setAutoDelete( TRUE );
+ menuitems.setAutoDelete( true );
+ comboitems.setAutoDelete( true );
#ifndef TQT_NO_TOOLTIP
- tipGroup.setDelay( FALSE );
+ tipGroup.setDelay( false );
#endif
}
@@ -298,7 +298,7 @@ void TQActionPrivate::update( uint upd )
if ( !whatsthis.isEmpty() )
mi->popup->setWhatsThis( mi->id, whatsthis );
if ( toggleaction ) {
- mi->popup->setCheckable( TRUE );
+ mi->popup->setCheckable( true );
mi->popup->setItemChecked( mi->id, on );
}
}
@@ -321,7 +321,7 @@ void TQActionPrivate::update( uint upd )
if ( upd & EverythingElse ) {
btn->setToggleButton( toggleaction );
if ( !text.isEmpty() )
- btn->setTextLabel( text, FALSE );
+ btn->setTextLabel( text, false );
#ifndef TQT_NO_TOOLTIP
TQToolTip::remove( btn );
TQToolTip::add( btn, toolTip(), &tipGroup, statusTip() );
@@ -413,7 +413,7 @@ TQAction::TQAction( TQObject* parent, const char* name )
/*! \obsolete
Constructs an action called \a name with parent \a parent.
- If \a toggle is TRUE the action will be a toggle action, otherwise
+ If \a toggle is true the action will be a toggle action, otherwise
it will be a command action.
If \a parent is a TQActionGroup, the new action inserts itself into
@@ -452,7 +452,7 @@ TQAction::TQAction( TQObject* parent, const char* name, bool toggle )
used for tool tips and status tips unless you provide text for
these using setToolTip() and setStatusTip().
- Call setToggleAction(TRUE) to make the action a toggle action.
+ Call setToggleAction(true) to make the action a toggle action.
\warning To prevent recursion, don't create an action as a child
of a widget that the action is later added to.
@@ -488,7 +488,7 @@ TQAction::TQAction( const TQIconSet& icon, const TQString& menuText, TQKeySequen
used for tool tips and status tips unless you provide text for
these using setToolTip() and setStatusTip().
- Call setToggleAction(TRUE) to make the action a toggle action.
+ Call setToggleAction(true) to make the action a toggle action.
\warning To prevent recursion, don't create an action as a child
of a widget that the action is later added to.
@@ -508,7 +508,7 @@ TQAction::TQAction( const TQString& menuText, TQKeySequence accel,
This constructor creates an action with the following properties:
the description \a text, the icon or iconset \a icon, the menu
text \a menuText and keyboard accelerator \a accel. It is a child
- of \a parent and called \a name. If \a toggle is TRUE the action
+ of \a parent and called \a name. If \a toggle is true the action
will be a toggle action, otherwise it will be a command action.
If \a parent is a TQActionGroup, the action automatically becomes
@@ -539,7 +539,7 @@ TQAction::TQAction( const TQString& text, const TQIconSet& icon, const TQString&
This constructor results in an icon-less action with the
description \a text, the menu text \a menuText and the keyboard
accelerator \a accel. Its parent is \a parent and it is called \a
- name. If \a toggle is TRUE the action will be a toggle action,
+ name. If \a toggle is true the action will be a toggle action,
otherwise it will be a command action.
The action automatically becomes a member of \a parent if \a
@@ -617,7 +617,7 @@ TQIconSet TQAction::iconSet() const
\property TQAction::text
\brief the action's descriptive text
- If \l TQMainWindow::usesTextLabel is TRUE, the text appears as a
+ If \l TQMainWindow::usesTextLabel is true, the text appears as a
label in the relevant tool button. It also serves as the default
text in menus and tool tips if these have not been specifically
defined. There is no default text.
@@ -806,14 +806,14 @@ TQKeySequence TQAction::accel() const
A toggle action is one which has an on/off state. For example a
Bold toolbar button is either on or off. An action which is not a
toggle action is a command action; a command action is simply
- executed, e.g. file save. This property's default is FALSE.
+ executed, e.g. file save. This property's default is false.
In some situations, the state of one toggle action should depend
on the state of others. For example, "Left Align", "Center" and
"Right Align" toggle actions are mutually exclusive. To achieve
exclusive toggling, add the relevant toggle actions to a
TQActionGroup with the \l TQActionGroup::exclusive property set to
- TRUE.
+ true.
*/
void TQAction::setToggleAction( bool enable )
{
@@ -821,7 +821,7 @@ void TQAction::setToggleAction( bool enable )
return;
if ( !enable )
- d->on = FALSE;
+ d->on = false;
d->toggleaction = enable;
d->update();
@@ -871,10 +871,10 @@ void TQAction::toggle()
\property TQAction::on
\brief whether a toggle action is on
- This property is always on (TRUE) for command actions and
+ This property is always on (true) for command actions and
\l{TQActionGroup}s; setOn() has no effect on them. For action's
- where isToggleAction() is TRUE, this property's default value is
- off (FALSE).
+ where isToggleAction() is true, this property's default value is
+ off (false).
\sa toggleAction
*/
@@ -929,7 +929,7 @@ bool TQAction::isEnabled() const
}
/*!
- Disables the action if \a disable is TRUE; otherwise
+ Disables the action if \a disable is true; otherwise
enables the action.
See the \l enabled documentation for more information.
@@ -943,8 +943,8 @@ void TQAction::setDisabled( bool disable )
\property TQAction::visible
\brief whether the action can be seen (e.g. in menus and toolbars)
- If \e visible is TRUE the action can be seen (e.g. in menus and
- toolbars) and chosen by the user; if \e visible is FALSE the
+ If \e visible is true the action can be seen (e.g. in menus and
+ toolbars) and chosen by the user; if \e visible is false the
action cannot be seen or chosen by the user.
Actions which are not visible are \e not grayed out; they do not
@@ -963,8 +963,8 @@ void TQAction::setVisible( bool visible )
}
/*
- Returns TRUE if the action is visible (e.g. in menus and
- toolbars); otherwise returns FALSE.
+ Returns true if the action is visible (e.g. in menus and
+ toolbars); otherwise returns false.
*/
bool TQAction::isVisible() const
{
@@ -997,9 +997,9 @@ void TQAction::toolButtonToggled( bool on )
An action added to a tool bar is automatically displayed as a tool
button; an action added to a pop up menu appears as a menu option.
- addTo() returns TRUE if the action was added successfully and
- FALSE otherwise. (If \a w is not a TQToolBar or TQPopupMenu the
- action will not be added and FALSE will be returned.)
+ addTo() returns true if the action was added successfully and
+ false otherwise. (If \a w is not a TQToolBar or TQPopupMenu the
+ action will not be added and false will be returned.)
\sa removeFrom()
*/
@@ -1065,9 +1065,9 @@ bool TQAction::addTo( TQWidget* w )
d->update( TQActionPrivate::State | TQActionPrivate::EverythingElse );
} else {
tqWarning( "TQAction::addTo(), unknown object" );
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*!
@@ -1121,7 +1121,7 @@ void TQAction::showStatusText( const TQString& text )
TQStatusBar *bar = 0;
while ( par && !bar ) {
lpar = par;
- bar = (TQStatusBar*)par->child( 0, "TQStatusBar", FALSE );
+ bar = (TQStatusBar*)par->child( 0, "TQStatusBar", false );
par = par->parent();
}
if ( !bar && lpar ) {
@@ -1178,8 +1178,8 @@ void TQAction::clearStatusText()
/*!
Removes the action from widget \a w.
- Returns TRUE if the action was removed successfully; otherwise
- returns FALSE.
+ Returns true if the action was removed successfully; otherwise
+ returns false.
\sa addTo()
*/
@@ -1225,9 +1225,9 @@ bool TQAction::removeFrom( TQWidget* w )
}
} else {
tqWarning( "TQAction::removeFrom(), unknown object" );
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*!
@@ -1270,8 +1270,8 @@ void TQAction::objectDestroyed()
This signal is emitted when a toggle action changes state; command
actions and \l{TQActionGroup}s don't emit toggled().
- The \a on argument denotes the new state: If \a on is TRUE the
- toggle action is switched on, and if \a on is FALSE the toggle
+ The \a on argument denotes the new state: If \a on is true the
+ toggle action is switched on, and if \a on is false the toggle
action is switched off.
To trigger a user command depending on whether a toggle action has
@@ -1293,16 +1293,16 @@ void TQActionGroupPrivate::update( const TQActionGroup* that )
{
for ( TQPtrListIterator<TQAction> it( actions ); it.current(); ++it ) {
if ( that->isEnabled() && !it.current()->d->forceDisabled ) {
- it.current()->setEnabled( TRUE );
+ it.current()->setEnabled( true );
} else if ( !that->isEnabled() && it.current()->isEnabled() ) {
- it.current()->setEnabled( FALSE );
- it.current()->d->forceDisabled = FALSE;
+ it.current()->setEnabled( false );
+ it.current()->d->forceDisabled = false;
}
if ( that->isVisible() && !it.current()->d->forceInvisible ) {
- it.current()->setVisible( TRUE );
+ it.current()->setVisible( true );
} else if ( !that->isVisible() && it.current()->isVisible() ) {
- it.current()->setVisible( FALSE );
- it.current()->d->forceInvisible = FALSE;
+ it.current()->setVisible( false );
+ it.current()->d->forceInvisible = false;
}
}
for ( TQPtrListIterator<TQComboBox> cb( comboboxes ); cb.current(); ++cb ) {
@@ -1415,7 +1415,7 @@ void TQActionGroupPrivate::update( const TQActionGroup* that )
The setExclusive() function is used to ensure that only one action
is active at any one time: it should be used with actions which
- have their \c toggleAction set to TRUE.
+ have their \c toggleAction set to true.
Action group actions appear as individual menu options and toolbar
buttons. For exclusive action groups use setUsesDropDown() to
@@ -1432,15 +1432,15 @@ void TQActionGroupPrivate::update( const TQActionGroup* that )
/*!
Constructs an action group called \a name, with parent \a parent.
- The action group is exclusive by default. Call setExclusive(FALSE) to make
+ The action group is exclusive by default. Call setExclusive(false) to make
the action group non-exclusive.
*/
TQActionGroup::TQActionGroup( TQObject* parent, const char* name )
: TQAction( parent, name )
{
d = new TQActionGroupPrivate;
- d->exclusive = TRUE;
- d->dropdown = FALSE;
+ d->exclusive = true;
+ d->dropdown = false;
d->selected = 0;
d->separatorAction = 0;
TQAction::d->d_group = d;
@@ -1451,7 +1451,7 @@ TQActionGroup::TQActionGroup( TQObject* parent, const char* name )
/*!
Constructs an action group called \a name, with parent \a parent.
- If \a exclusive is TRUE only one toggle action in the group will
+ If \a exclusive is true only one toggle action in the group will
ever be active.
\sa exclusive
@@ -1461,7 +1461,7 @@ TQActionGroup::TQActionGroup( TQObject* parent, const char* name, bool exclusive
{
d = new TQActionGroupPrivate;
d->exclusive = exclusive;
- d->dropdown = FALSE;
+ d->dropdown = false;
d->selected = 0;
d->separatorAction = 0;
TQAction::d->d_group = d;
@@ -1503,10 +1503,10 @@ TQActionGroup::~TQActionGroup()
}
delete d->separatorAction;
- d->menubuttons.setAutoDelete( TRUE );
- d->comboboxes.setAutoDelete( TRUE );
- d->menuitems.setAutoDelete( TRUE );
- d->popupmenus.setAutoDelete( TRUE );
+ d->menubuttons.setAutoDelete( true );
+ d->comboboxes.setAutoDelete( true );
+ d->menuitems.setAutoDelete( true );
+ d->popupmenus.setAutoDelete( true );
delete d;
}
@@ -1514,7 +1514,7 @@ TQActionGroup::~TQActionGroup()
\property TQActionGroup::exclusive
\brief whether the action group does exclusive toggling
- If exclusive is TRUE only one toggle action in the action group
+ If exclusive is true only one toggle action in the action group
can ever be active at any one time. If the user chooses another
toggle action in the group the one they chose becomes active and
the one that was active becomes inactive.
@@ -1552,7 +1552,7 @@ bool TQActionGroup::isExclusive() const
\link TQAction::setEnabled()\endlink, and
\link TQAction::setDisabled()\endlink functions to have no effect.
- This property's default is FALSE.
+ This property's default is false.
*/
void TQActionGroup::setUsesDropDown( bool enable )
@@ -1633,12 +1633,12 @@ void TQActionGroup::addSeparator()
/*!
Adds this action group to the widget \a w.
- If isExclusive() is FALSE or usesDropDown() is FALSE, the actions within
+ If isExclusive() is false or usesDropDown() is false, the actions within
the group are added to the widget individually. For example, if the widget
is a menu, the actions will appear as individual menu options, and
if the widget is a toolbar, the actions will appear as toolbar buttons.
- If both isExclusive() and usesDropDown() are TRUE, the actions
+ If both isExclusive() and usesDropDown() are true, the actions
are presented either in a combobox (if \a w is a toolbar) or in a
submenu (if \a w is a menu).
@@ -1657,7 +1657,7 @@ bool TQActionGroup::addTo( TQWidget* w )
if ( !d->exclusive ) {
TQPtrListIterator<TQAction> it( d->actions);
if ( !it.current() )
- return TRUE;
+ return true;
TQAction *defAction = it.current();
@@ -1700,9 +1700,9 @@ bool TQActionGroup::addTo( TQWidget* w )
++it;
}
d->update( this );
- return TRUE;
+ return true;
} else {
- TQComboBox *box = new TQComboBox( FALSE, w, "qt_actiongroup_combo" );
+ TQComboBox *box = new TQComboBox( false, w, "qt_actiongroup_combo" );
addedTo( box, w );
connect( box, TQ_SIGNAL(destroyed()), TQ_SLOT(objectDestroyed()) );
d->comboboxes.append( box );
@@ -1716,7 +1716,7 @@ bool TQActionGroup::addTo( TQWidget* w )
#endif
int onIndex = 0;
- bool foundOn = FALSE;
+ bool foundOn = false;
for ( TQPtrListIterator<TQAction> it( d->actions); it.current(); ++it ) {
TQAction *action = it.current();
if ( !foundOn )
@@ -1730,7 +1730,7 @@ bool TQActionGroup::addTo( TQWidget* w )
connect( box, TQ_SIGNAL(activated(int)), this, TQ_SLOT( internalComboBoxActivated(int)) );
connect( box, TQ_SIGNAL(highlighted(int)), this, TQ_SLOT( internalComboBoxHighlighted(int)) );
d->update( this );
- return TRUE;
+ return true;
}
}
} else
@@ -1769,7 +1769,7 @@ bool TQActionGroup::addTo( TQWidget* w )
// #### do an addedTo( index, popup, action), need to find out index
it.current()->addTo( popup );
}
- return TRUE;
+ return true;
}
for ( TQPtrListIterator<TQAction> it( d->actions); it.current(); ++it ) {
@@ -1777,7 +1777,7 @@ bool TQActionGroup::addTo( TQWidget* w )
it.current()->addTo( w );
}
- return TRUE;
+ return true;
}
/*! \reimp
@@ -1817,7 +1817,7 @@ bool TQActionGroup::removeFrom( TQWidget* w )
}
}
- return TRUE;
+ return true;
}
/*! \internal
@@ -1832,7 +1832,7 @@ void TQActionGroup::childToggled( bool b )
d->selected = s;
for ( TQPtrListIterator<TQAction> it( d->actions); it.current(); ++it ) {
if ( it.current()->isToggleAction() && it.current() != s )
- it.current()->setOn( FALSE );
+ it.current()->setOn( false );
}
emit activated();
emit selected( s );
@@ -1842,7 +1842,7 @@ void TQActionGroup::childToggled( bool b )
} else {
if ( s == d->selected ) {
// at least one has to be selected
- s->setOn( TRUE );
+ s->setOn( true );
}
}
}
@@ -1874,7 +1874,7 @@ void TQActionGroup::setToggleAction( bool toggle )
for ( TQPtrListIterator<TQAction> it( d->actions); it.current(); ++it )
it.current()->setToggleAction( toggle );
- TQAction::setToggleAction( TRUE );
+ TQAction::setToggleAction( true );
d->update( this );
}
@@ -2010,10 +2010,10 @@ void TQActionGroup::internalComboBoxActivated( int index )
d->selected = a;
for ( TQPtrListIterator<TQAction> it( d->actions); it.current(); ++it ) {
if ( it.current()->isToggleAction() && it.current() != a )
- it.current()->setOn( FALSE );
+ it.current()->setOn( false );
}
if ( a->isToggleAction() )
- a->setOn( TRUE );
+ a->setOn( true );
emit activated();
if ( a->isToggleAction() )
diff --git a/src/widgets/tqaction.h b/src/widgets/tqaction.h
index 809e55034..1916157e5 100644
--- a/src/widgets/tqaction.h
+++ b/src/widgets/tqaction.h
@@ -82,9 +82,9 @@ public:
TQObject* parent, const char* name = 0 );
TQAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, TQKeySequence accel,
- TQObject* parent, const char* name = 0, bool toggle = FALSE ); // obsolete
+ TQObject* parent, const char* name = 0, bool toggle = false ); // obsolete
TQAction( const TQString& text, const TQString& menuText, TQKeySequence accel, TQObject* parent,
- const char* name = 0, bool toggle = FALSE ); // obsolete
+ const char* name = 0, bool toggle = false ); // obsolete
#endif
TQAction( TQObject* parent, const char* name , bool toggle ); // obsolete
~TQAction();
diff --git a/src/widgets/tqbutton.cpp b/src/widgets/tqbutton.cpp
index bcf9c2ada..6ffea91e3 100644
--- a/src/widgets/tqbutton.cpp
+++ b/src/widgets/tqbutton.cpp
@@ -165,7 +165,7 @@ TQTimer *TQButton::timer()
\e pressed and then released into the \e on state. When the user
clicks it again (to toggle it off), the button moves first to the
\e pressed state, then to the \e off state (isOn() and isDown()
- are both FALSE).
+ are both false).
Default buttons (as used in many dialogs) are provided by
TQPushButton::setDefault() and TQPushButton::setAutoDefault().
@@ -271,18 +271,18 @@ TQTimer *TQButton::timer()
\property TQButton::down
\brief whether the button is pressed
- If this property is TRUE, the button is pressed down. The signals
+ If this property is true, the button is pressed down. The signals
pressed() and clicked() are not emitted if you set this property
- to TRUE. The default is FALSE.
+ to true. The default is false.
*/
/*!
\property TQButton::exclusiveToggle
\brief whether the button is an exclusive toggle
- If this property is TRUE and the button is in a TQButtonGroup, the
+ If this property is true and the button is in a TQButtonGroup, the
button can only be toggled off by another one being toggled on.
- The default is FALSE.
+ The default is false.
*/
/*!
@@ -295,7 +295,7 @@ TQTimer *TQButton::timer()
/*!
\fn void TQButton::setOn( bool on )
- Sets the state of this button to On if \a on is TRUE; otherwise to
+ Sets the state of this button to On if \a on is true; otherwise to
Off.
\sa toggleState
@@ -332,14 +332,14 @@ TQTimer *TQButton::timer()
\property TQButton::toggleButton
\brief whether the button is a toggle button
- The default value is FALSE.
+ The default value is false.
*/
/*!
\fn TQButton::setToggleButton( bool b )
- If \a b is TRUE, this button becomes a toggle button; if \a b is
- FALSE, this button becomes a command button.
+ If \a b is true, this button becomes a toggle button; if \a b is
+ false, this button becomes a command button.
\sa toggleButton
*/
@@ -374,12 +374,12 @@ TQButton::TQButton( TQWidget *parent, const char *name, WFlags f )
{
bpixmap = 0;
toggleTyp = SingleShot; // button is simple
- buttonDown = FALSE; // button is up
+ buttonDown = false; // button is up
stat = Off; // button is off
- mlbDown = FALSE; // mouse left button up
- autoresize = FALSE; // not auto resizing
- animation = FALSE; // no pending animateClick
- repeat = FALSE; // not in autorepeat mode
+ mlbDown = false; // mouse left button up
+ autoresize = false; // not auto resizing
+ animation = false; // no pending animateClick
+ repeat = false; // not in autorepeat mode
d = 0;
#ifndef TQT_NO_BUTTONGROUP
if ( ::tqt_cast<TQButtonGroup*>(parent) ) {
@@ -441,7 +441,7 @@ TQButton::~TQButton()
\fn void TQButton::toggled( bool on )
This signal is emitted whenever a toggle button changes status. \a
- on is TRUE if the button is on, or FALSE if the button is off.
+ on is true if the button is on, or false if the button is off.
This may be the result of a user action, toggle() slot activation,
or because setOn() was called.
@@ -499,7 +499,7 @@ void TQButton::setPixmap( const TQPixmap &pixmap )
pixmap.height() != bpixmap->height();
*bpixmap = pixmap;
} else {
- newSize = TRUE;
+ newSize = true;
bpixmap = new TQPixmap( pixmap );
TQ_CHECK_PTR( bpixmap );
}
@@ -549,7 +549,7 @@ void TQButton::setAutoRepeat( bool enable )
{
repeat = (uint)enable;
if ( repeat && mlbDown )
- timer()->start( AUTO_REPEAT_DELAY, TRUE );
+ timer()->start( AUTO_REPEAT_DELAY, true );
}
/*!
@@ -569,9 +569,9 @@ void TQButton::animateClick()
{
if ( !isEnabled() || animation )
return;
- animation = TRUE;
- buttonDown = TRUE;
- repaint( FALSE );
+ animation = true;
+ buttonDown = true;
+ repaint( false );
emit pressed();
TQTimer::singleShot( 100, this, TQ_SLOT(animateTimeout()) );
}
@@ -580,8 +580,8 @@ void TQButton::emulateClick()
{
if ( !isEnabled() || animation )
return;
- animation = TRUE;
- buttonDown = TRUE;
+ animation = true;
+ buttonDown = true;
emit pressed();
animateTimeout();
}
@@ -590,10 +590,10 @@ void TQButton::setDown( bool enable )
{
if ( d )
timer()->stop();
- mlbDown = FALSE; // the safe setting
+ mlbDown = false; // the safe setting
if ( (bool)buttonDown != enable ) {
buttonDown = enable;
- repaint( FALSE );
+ repaint( false );
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::StateChanged );
#endif
@@ -620,7 +620,7 @@ void TQButton::setState( ToggleState s )
stat = s;
if ( autoMask() )
updateMask();
- repaint( FALSE );
+ repaint( false );
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::StateChanged );
#endif
@@ -633,8 +633,8 @@ void TQButton::setState( ToggleState s )
/*!
- Returns TRUE if \a pos is inside the clickable button rectangle;
- otherwise returns FALSE.
+ Returns true if \a pos is inside the clickable button rectangle;
+ otherwise returns false.
By default, the clickable area is the entire widget. Subclasses
may reimplement it, though.
@@ -690,7 +690,7 @@ void TQButton::keyPressEvent( TQKeyEvent *e )
break;
case Key_Space:
if ( !e->isAutoRepeat() ) {
- setDown( TRUE );
+ setDown( true );
#ifndef TQT_NO_PUSHBUTTON
if ( ::tqt_cast<TQPushButton*>(this) )
emit pressed();
@@ -708,7 +708,7 @@ void TQButton::keyPressEvent( TQKeyEvent *e )
#endif
{
TQFocusEvent::setReason(TQFocusEvent::Backtab);
- focusNextPrevChild( FALSE );
+ focusNextPrevChild( false );
TQFocusEvent::resetReason();
}
break;
@@ -721,13 +721,13 @@ void TQButton::keyPressEvent( TQKeyEvent *e )
#endif
{
TQFocusEvent::setReason(TQFocusEvent::Tab);
- focusNextPrevChild( TRUE );
+ focusNextPrevChild( true );
TQFocusEvent::resetReason();
}
break;
case Key_Escape:
if ( buttonDown ) {
- buttonDown = FALSE;
+ buttonDown = false;
update();
break;
}
@@ -743,7 +743,7 @@ void TQButton::keyReleaseEvent( TQKeyEvent * e)
switch ( e->key() ) {
case Key_Space:
if ( buttonDown && !e->isAutoRepeat() ) {
- buttonDown = FALSE;
+ buttonDown = false;
nextState();
emit released();
emit clicked();
@@ -763,19 +763,19 @@ void TQButton::mousePressEvent( TQMouseEvent *e )
}
bool hit = hitButton( e->pos() );
if ( hit ) { // mouse press on button
- mlbDown = TRUE; // left mouse button down
- buttonDown = TRUE;
+ mlbDown = true; // left mouse button down
+ buttonDown = true;
if ( autoMask() )
updateMask();
- repaint( FALSE );
+ repaint( false );
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::StateChanged );
#endif
TQGuardedPtr<TQTimer> t = timer();
emit pressed();
if ( t && repeat )
- t->start( AUTO_REPEAT_DELAY, TRUE );
+ t->start( AUTO_REPEAT_DELAY, true );
}
}
@@ -786,12 +786,12 @@ void TQButton::mouseReleaseEvent( TQMouseEvent *e)
// clean up apperance if left button has been pressed
if (mlbDown || buttonDown) {
- mlbDown = FALSE;
- buttonDown = FALSE;
+ mlbDown = false;
+ buttonDown = false;
if ( autoMask() )
updateMask();
- repaint( FALSE );
+ repaint( false );
}
e->ignore();
@@ -803,8 +803,8 @@ void TQButton::mouseReleaseEvent( TQMouseEvent *e)
timer()->stop();
const bool oldButtonDown = buttonDown;
- mlbDown = FALSE; // left mouse button up
- buttonDown = FALSE;
+ mlbDown = false; // left mouse button up
+ buttonDown = false;
if ( hitButton( e->pos() ) ) { // mouse release on button
nextState();
#if defined(QT_ACCESSIBILITY_SUPPORT)
@@ -813,7 +813,7 @@ void TQButton::mouseReleaseEvent( TQMouseEvent *e)
emit released();
emit clicked();
} else {
- repaint( FALSE );
+ repaint( false );
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::StateChanged );
#endif
@@ -831,8 +831,8 @@ void TQButton::mouseMoveEvent( TQMouseEvent *e )
}
if ( hitButton(e->pos()) ) { // mouse move in button
if ( !buttonDown ) {
- buttonDown = TRUE;
- repaint( FALSE );
+ buttonDown = true;
+ repaint( false );
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::StateChanged );
#endif
@@ -840,8 +840,8 @@ void TQButton::mouseMoveEvent( TQMouseEvent *e )
}
} else { // mouse move outside button
if ( buttonDown ) {
- buttonDown = FALSE;
- repaint( FALSE );
+ buttonDown = false;
+ repaint( false );
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::StateChanged );
#endif
@@ -874,7 +874,7 @@ void TQButton::focusInEvent( TQFocusEvent * e)
/*! \reimp */
void TQButton::focusOutEvent( TQFocusEvent * e )
{
- buttonDown = FALSE;
+ buttonDown = false;
TQWidget::focusOutEvent( e );
}
@@ -891,7 +891,7 @@ void TQButton::autoRepeatTimeout()
emit pressed();
}
if ( t )
- t->start( AUTO_REPEAT_PERIOD, TRUE );
+ t->start( AUTO_REPEAT_PERIOD, true );
}
}
@@ -902,8 +902,8 @@ void TQButton::animateTimeout()
{
if ( !animation )
return;
- animation = FALSE;
- buttonDown = FALSE;
+ animation = false;
+ buttonDown = false;
nextState();
emit released();
emit clicked();
@@ -922,7 +922,7 @@ void TQButton::nextState()
}
if ( autoMask() )
updateMask();
- repaint( FALSE );
+ repaint( false );
if ( t ) {
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::StateChanged );
@@ -937,7 +937,7 @@ void TQButton::nextState()
void TQButton::enabledChange( bool e )
{
if ( !isEnabled() )
- setDown( FALSE );
+ setDown( false );
TQWidget::enabledChange( e );
}
@@ -976,7 +976,7 @@ bool TQButton::isExclusiveToggle() const
( group()->isRadioButtonExclusive() &&
::tqt_cast<TQRadioButton*>(this) ) );
#else
- return FALSE;
+ return false;
#endif
}
diff --git a/src/widgets/tqbuttongroup.cpp b/src/widgets/tqbuttongroup.cpp
index 9b495279c..44567ffc6 100644
--- a/src/widgets/tqbuttongroup.cpp
+++ b/src/widgets/tqbuttongroup.cpp
@@ -98,16 +98,16 @@
\property TQButtonGroup::exclusive
\brief whether the button group is exclusive
- If this property is TRUE, then the buttons in the group are
+ If this property is true, then the buttons in the group are
toggled, and to untoggle a button you must click on another button
- in the group. The default value is FALSE.
+ in the group. The default value is false.
*/
/*!
\property TQButtonGroup::radioButtonExclusive
\brief whether the radio buttons in the group are exclusive
- If this property is TRUE (the default), the \link TQRadioButton
+ If this property is true (the default), the \link TQRadioButton
radiobuttons\endlink in the group are treated exclusively.
*/
@@ -197,9 +197,9 @@ void TQButtonGroup::init()
{
buttons = new TQButtonList;
TQ_CHECK_PTR( buttons );
- buttons->setAutoDelete( TRUE );
- excl_grp = FALSE;
- radio_excl = TRUE;
+ buttons->setAutoDelete( true );
+ excl_grp = false;
+ radio_excl = true;
}
/*! \reimp */
@@ -445,12 +445,12 @@ void TQButtonGroup::buttonToggled( bool on )
if ( !excl_grp && !::tqt_cast<TQRadioButton*>(bt) )
return;
TQButtonItem * i = buttons->first();
- bool hasTabFocus = FALSE;
+ bool hasTabFocus = false;
- while( i != 0 && hasTabFocus == FALSE ) {
+ while( i != 0 && hasTabFocus == false ) {
if ( ( excl_grp || ::tqt_cast<TQRadioButton*>(i->button) ) &&
(i->button->focusPolicy() & TabFocus) )
- hasTabFocus = TRUE;
+ hasTabFocus = true;
i = buttons->next();
}
@@ -460,7 +460,7 @@ void TQButtonGroup::buttonToggled( bool on )
i->button->isToggleButton() &&
i->button->isOn() &&
( excl_grp || ::tqt_cast<TQRadioButton*>(i->button) ) )
- i->button->setOn( FALSE );
+ i->button->setOn( false );
if ( ( excl_grp || ::tqt_cast<TQRadioButton*>(i->button) ) &&
i->button->isToggleButton() &&
hasTabFocus )
@@ -479,7 +479,7 @@ void TQButtonGroup::setButton( int id )
{
TQButton * b = find( id );
if ( b )
- b->setOn( TRUE );
+ b->setOn( true );
}
void TQButtonGroup::setRadioButtonExclusive( bool on)
@@ -583,7 +583,7 @@ void TQButtonGroup::moveFocus( int key )
candidate->setFocusPolicy( (FocusPolicy)(candidate->focusPolicy()|
TabFocus) );
}
- buttoncand->setOn( TRUE );
+ buttoncand->setOn( true );
buttoncand->animateClick();
buttoncand->animateTimeout(); // ### crude l&f hack
}
diff --git a/src/widgets/tqcheckbox.cpp b/src/widgets/tqcheckbox.cpp
index 6b0cc48a6..488e187dc 100644
--- a/src/widgets/tqcheckbox.cpp
+++ b/src/widgets/tqcheckbox.cpp
@@ -100,7 +100,7 @@
\property TQCheckBox::checked
\brief whether the checkbox is checked
- The default is unchecked, i.e. FALSE.
+ The default is unchecked, i.e. false.
*/
/*!
@@ -114,7 +114,7 @@
\property TQCheckBox::tristate
\brief whether the checkbox is a tri-state checkbox
- The default is two-state, i.e. tri-state is FALSE.
+ The default is two-state, i.e. tri-state is false.
*/
/*!
@@ -127,7 +127,7 @@
TQCheckBox::TQCheckBox( TQWidget *parent, const char *name )
: TQButton( parent, name, WNoAutoErase | WMouseNoMask )
{
- setToggleButton( TRUE );
+ setToggleButton( true );
setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
}
@@ -142,7 +142,7 @@ TQCheckBox::TQCheckBox( const TQString &text, TQWidget *parent, const char *name
: TQButton( parent, name, WNoAutoErase | WMouseNoMask )
{
setText( text );
- setToggleButton( TRUE );
+ setToggleButton( true );
setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
}
@@ -153,7 +153,7 @@ TQCheckBox::TQCheckBox( const TQString &text, TQWidget *parent, const char *name
*/
void TQCheckBox::setNoChange()
{
- setTristate(TRUE);
+ setTristate(true);
setState( NoChange );
}
@@ -176,7 +176,7 @@ TQSize TQCheckBox::sizeHint() const
constPolish();
TQPainter p(this);
- TQSize sz = style().itemRect(&p, TQRect(0, 0, 1, 1), ShowPrefix, FALSE,
+ TQSize sz = style().itemRect(&p, TQRect(0, 0, 1, 1), ShowPrefix, false,
pixmap(), text()).size();
return (style().sizeFromContents(TQStyle::CT_CheckBox, this, sz).
@@ -220,7 +220,7 @@ void TQCheckBox::drawButton( TQPainter *paint )
drawButtonLabel( p );
return;
}
- bool use_pm = TRUE;
+ bool use_pm = true;
TQPainter pmpaint;
int wx = 0, wy = 0;
if ( use_pm ) {
@@ -310,7 +310,7 @@ void TQCheckBox::resizeEvent( TQResizeEvent *e )
TQButton::resizeEvent(e);
if ( isVisible() ) {
TQPainter p(this);
- TQSize isz = style().itemRect(&p, TQRect(0, 0, 1, 1), ShowPrefix, FALSE,
+ TQSize isz = style().itemRect(&p, TQRect(0, 0, 1, 1), ShowPrefix, false,
pixmap(), text()).size();
TQSize wsz = (style().sizeFromContents(TQStyle::CT_CheckBox, this, isz).
expandedTo(TQApplication::globalStrut()));
diff --git a/src/widgets/tqcheckbox.h b/src/widgets/tqcheckbox.h
index 1e7acc2df..cd0450ab6 100644
--- a/src/widgets/tqcheckbox.h
+++ b/src/widgets/tqcheckbox.h
@@ -62,7 +62,7 @@ public:
void setNoChange();
- void setTristate(bool y=TRUE);
+ void setTristate(bool y=true);
bool isTristate() const;
TQSize sizeHint() const;
diff --git a/src/widgets/tqcombobox.cpp b/src/widgets/tqcombobox.cpp
index 278b555e6..b5c2593f0 100644
--- a/src/widgets/tqcombobox.cpp
+++ b/src/widgets/tqcombobox.cpp
@@ -89,8 +89,8 @@
The other constructor creates a new-style combobox in Motif style,
and can create both read-only and editable comboboxes:
\code
- TQComboBox *c1 = new TQComboBox( FALSE, this, "read-only combobox" );
- TQComboBox *c2 = new TQComboBox( TRUE, this, "editable combobox" );
+ TQComboBox *c1 = new TQComboBox( false, this, "read-only combobox" );
+ TQComboBox *c2 = new TQComboBox( true, this, "editable combobox" );
\endcode
New-style comboboxes use a list box in both Motif and Windows
@@ -247,7 +247,7 @@
\brief whether auto-completion is enabled
This property can only be set for editable comboboxes, for
- non-editable comboboxes it has no effect. It is FALSE by default.
+ non-editable comboboxes it has no effect. It is false by default.
*/
/*!
@@ -261,8 +261,8 @@
\brief whether auto resize is enabled
\obsolete
- If this property is set to TRUE then the combobox will resize itself
- whenever its contents change. The default is FALSE.
+ If this property is set to true then the combobox will resize itself
+ whenever its contents change. The default is false.
*/
/*!
@@ -293,9 +293,9 @@
is not \c NoInsertion), then what happens is this:
\list
\i If the text is not already in the list, the text is inserted.
- \i If the text is in the list and this property is TRUE (the
+ \i If the text is in the list and this property is true (the
default), the text is inserted.
- \i If the text is in the list and this property is FALSE, the text
+ \i If the text is in the list and this property is false, the text
is \e not inserted; instead the item which has matching text becomes
the current item.
\endlist
@@ -309,8 +309,8 @@
\property TQComboBox::editable
\brief whether the combobox is editable
- This property's default is FALSE. Note that the combobox will be
- cleared if this property is set to TRUE for a 1.x Motif style
+ This property's default is false. Note that the combobox will be
+ cleared if this property is set to true for a 1.x Motif style
combobox. To avoid this, use setEditable() before inserting any
items. Also note that the 1.x version of Motif didn't have any
editable comboboxes, so the combobox will change it's appearance
@@ -365,7 +365,7 @@ class TQComboBoxPopupItem : public TQCustomMenuItem
TQSize sc; // Size cache optimization
public:
TQComboBoxPopupItem(TQListBoxItem *i) : TQCustomMenuItem(), li(i), sc(0, 0) { }
- virtual bool fullSpan() const { return TRUE; }
+ virtual bool fullSpan() const { return true; }
virtual void paint( TQPainter*, const TQColorGroup&, bool, bool, int, int, int, int);
virtual TQSize sizeHint() { if (sc.isNull()) sc = TQSize(li->width(li->listBox()), TQMAX(25, li->height(li->listBox()))); return sc; }
};
@@ -382,9 +382,9 @@ void TQComboBoxPopupItem::paint( TQPainter* p, const TQColorGroup&, bool,
class TQComboBoxData
{
public:
- TQComboBoxData( TQComboBox *cb ): ed( 0 ), usingLBox( FALSE ), pop( 0 ), lBox( 0 ), combo( cb )
+ TQComboBoxData( TQComboBox *cb ): ed( 0 ), usingLBox( false ), pop( 0 ), lBox( 0 ), combo( cb )
{
- duplicatesEnabled = TRUE;
+ duplicatesEnabled = true;
cb->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
}
@@ -393,7 +393,7 @@ public:
inline TQComboBoxPopup * popup() { return pop; }
void updateLinedGeometry();
void setListBox( TQListBox *l );
- void setPopupMenu( TQComboBoxPopup * pm, bool isPopup=TRUE );
+ void setPopupMenu( TQComboBoxPopup * pm, bool isPopup=true );
int current;
int maxCount;
@@ -442,8 +442,8 @@ void TQComboBoxData::updateLinedGeometry()
void TQComboBoxData::setListBox( TQListBox *l )
{
lBox = l;
- usingLBox = TRUE;
- l->setMouseTracking( TRUE );
+ usingLBox = true;
+ l->setMouseTracking( true );
#ifdef TQ_WS_X11
l->x11SetWindowType( TQWidget::X11WindowTypeCombo );
l->x11SetWindowTransient( combo->topLevelWidget());
@@ -454,7 +454,7 @@ void TQComboBoxData::setPopupMenu( TQComboBoxPopup * pm, bool isPopup )
{
pop = pm;
if(isPopup)
- usingLBox = FALSE;
+ usingLBox = false;
#ifdef TQ_WS_X11
if( pm ) {
pm->x11SetWindowType( TQWidget::X11WindowTypeCombo );
@@ -533,15 +533,15 @@ TQComboBox::TQComboBox( TQWidget *parent, const char *name )
d->maxCount = INT_MAX;
d->sizeLimit = 10;
d->p = AtBottom;
- d->autoresize = FALSE;
- d->poppedUp = FALSE;
- d->arrowDown = FALSE;
- d->arrowPressed = FALSE;
- d->discardNextMousePress = FALSE;
- d->shortClick = FALSE;
- d->useCompletion = FALSE;
+ d->autoresize = false;
+ d->poppedUp = false;
+ d->arrowDown = false;
+ d->arrowPressed = false;
+ d->discardNextMousePress = false;
+ d->shortClick = false;
+ d->useCompletion = false;
d->completeAt = 0;
- d->completeNow = FALSE;
+ d->completeNow = false;
d->completionTimer = new TQTimer( this );
setFocusPolicy( TabFocus );
@@ -553,7 +553,7 @@ TQComboBox::TQComboBox( TQWidget *parent, const char *name )
Constructs a combobox with a maximum size and either Motif 2.0 or
Windows look and feel.
- The input field can be edited if \a rw is TRUE, otherwise the user
+ The input field can be edited if \a rw is true, otherwise the user
may only choose one of the items in the combobox.
The \a parent and \a name arguments are passed on to the TQWidget
@@ -568,19 +568,19 @@ TQComboBox::TQComboBox( bool rw, TQWidget *parent, const char *name )
setUpListBox();
if(d->popup() && style().styleHint(TQStyle::SH_ComboBox_Popup, this))
- d->popup()->setItemChecked(d->current, FALSE);
+ d->popup()->setItemChecked(d->current, false);
d->current = 0;
d->maxCount = INT_MAX;
setSizeLimit(10);
d->p = AtBottom;
- d->autoresize = FALSE;
- d->poppedUp = FALSE;
- d->arrowDown = FALSE;
- d->discardNextMousePress = FALSE;
- d->shortClick = FALSE;
- d->useCompletion = FALSE;
+ d->autoresize = false;
+ d->poppedUp = false;
+ d->arrowDown = false;
+ d->discardNextMousePress = false;
+ d->shortClick = false;
+ d->useCompletion = false;
d->completeAt = 0;
- d->completeNow = FALSE;
+ d->completeNow = false;
d->completionTimer = new TQTimer( this );
setFocusPolicy( StrongFocus );
@@ -905,7 +905,7 @@ void TQComboBox::clear()
}
if(d->popup() && style().styleHint(TQStyle::SH_ComboBox_Popup, this))
- d->popup()->setItemChecked(d->current, FALSE);
+ d->popup()->setItemChecked(d->current, false);
d->current = 0;
if ( d->ed ) {
d->ed->setText( TQString::fromLatin1("") );
@@ -1057,7 +1057,7 @@ void TQComboBox::setCurrentItem( int index )
return;
if(d->popup() && style().styleHint(TQStyle::SH_ComboBox_Popup, this))
- d->popup()->setItemChecked(d->current, FALSE);
+ d->popup()->setItemChecked(d->current, false);
d->current = index;
d->completeAt = 0;
if ( d->ed ) {
@@ -1140,7 +1140,7 @@ void TQComboBox::internalActivate( int index )
if ( d->current != index ) {
if ( !d->usingListBox() || listBox()->item( index )->isSelectable() ) {
if(d->popup() && style().styleHint(TQStyle::SH_ComboBox_Popup, this))
- d->popup()->setItemChecked(d->current, FALSE);
+ d->popup()->setItemChecked(d->current, false);
d->current = index;
currentChanged();
}
@@ -1149,7 +1149,7 @@ void TQComboBox::internalActivate( int index )
popDownListBox();
else
d->popup()->removeEventFilter( this );
- d->poppedUp = FALSE;
+ d->poppedUp = false;
TQString t( text( index ) );
if ( d->ed ) {
@@ -1181,7 +1181,7 @@ void TQComboBox::internalHighlight( int index )
*/
void TQComboBox::internalClickTimeout()
{
- d->shortClick = FALSE;
+ d->shortClick = false;
}
/*!
@@ -1248,7 +1248,7 @@ void TQComboBox::paintEvent( TQPaintEvent * )
flags |= TQStyle::Style_MouseOver;
if ( width() < 5 || height() < 5 ) {
- qDrawShadePanel( &p, rect(), g, FALSE, 2,
+ qDrawShadePanel( &p, rect(), g, false, 2,
&g.brush( TQColorGroup::Button ) );
return;
}
@@ -1270,11 +1270,11 @@ void TQComboBox::paintEvent( TQPaintEvent * )
xPos = w;
x0 = 4;
}
- qDrawShadePanel( &p, rect(), g, FALSE,
+ qDrawShadePanel( &p, rect(), g, false,
style().pixelMetric(TQStyle::PM_DefaultFrameWidth, this),
&g.brush( TQColorGroup::Button ) );
qDrawShadePanel( &p, xPos, (height() - buttonH)/2,
- buttonW, buttonH, g, FALSE,
+ buttonW, buttonH, g, false,
style().pixelMetric(TQStyle::PM_DefaultFrameWidth, this) );
TQRect clip( x0, 2, w - 2 - 4 - 5, height() - 4 );
TQString str = d->popup()->text( this->d->current );
@@ -1288,7 +1288,7 @@ void TQComboBox::paintEvent( TQPaintEvent * )
TQPixmap pm = ( pix ? *pix : iconSet->pixmap() );
p.setClipRect( clip );
p.drawPixmap( 4, (height()-pm.height())/2, pm );
- p.setClipping( FALSE );
+ p.setClipping( false );
}
if ( hasFocus() )
@@ -1352,7 +1352,7 @@ void TQComboBox::paintEvent( TQPaintEvent * )
( re.height() - pix->height() ) / 2, *pix );
}
}
- p.setClipping( FALSE );
+ p.setClipping( false );
}
}
@@ -1365,7 +1365,7 @@ void TQComboBox::mousePressEvent( TQMouseEvent *e )
if ( e->button() != LeftButton )
return;
if ( d->discardNextMousePress ) {
- d->discardNextMousePress = FALSE;
+ d->discardNextMousePress = false;
return;
}
TQRect arrowRect = style().querySubControlMetrics( TQStyle::CC_ComboBox, this,
@@ -1377,24 +1377,24 @@ void TQComboBox::mousePressEvent( TQMouseEvent *e )
arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) );
if ( count() && ( !editable() || arrowRect.contains( e->pos() ) ) ) {
- d->arrowPressed = FALSE;
+ d->arrowPressed = false;
if ( d->usingListBox() ) {
- listBox()->blockSignals( TRUE );
+ listBox()->blockSignals( true );
tqApp->sendEvent( listBox(), e ); // trigger the listbox's autoscroll
listBox()->setCurrentItem(d->current);
- listBox()->blockSignals( FALSE );
+ listBox()->blockSignals( false );
popup();
if ( arrowRect.contains( e->pos() ) ) {
- d->arrowPressed = TRUE;
- d->arrowDown = TRUE;
- repaint( FALSE );
+ d->arrowPressed = true;
+ d->arrowDown = true;
+ repaint( false );
}
} else {
popup();
}
TQTimer::singleShot( 200, this, TQ_SLOT(internalClickTimeout()));
- d->shortClick = TRUE;
+ d->shortClick = true;
}
}
@@ -1468,7 +1468,7 @@ void TQComboBox::keyPressEvent( TQKeyEvent *e )
d->completeAt = ct.length();
}
}
- d->completionTimer->start( 400, TRUE );
+ d->completionTimer->start( 400, true );
} else {
e->ignore();
return;
@@ -1487,7 +1487,7 @@ void TQComboBox::keyPressEvent( TQKeyEvent *e )
void TQComboBox::focusInEvent( TQFocusEvent * e )
{
TQWidget::focusInEvent( e );
- d->completeNow = FALSE;
+ d->completeNow = false;
d->completeAt = 0;
}
@@ -1497,7 +1497,7 @@ void TQComboBox::focusInEvent( TQFocusEvent * e )
void TQComboBox::focusOutEvent( TQFocusEvent * e )
{
TQWidget::focusOutEvent( e );
- d->completeNow = FALSE;
+ d->completeNow = false;
d->completeAt = 0;
}
@@ -1560,7 +1560,7 @@ void TQComboBox::popup()
if(d->usingListBox()) {
if(!d->popup()) {
TQComboBoxPopup *p = new TQComboBoxPopup( this, "in-combo" );
- d->setPopupMenu( p, FALSE );
+ d->setPopupMenu( p, false );
p->setFont( font() );
connect( p, TQ_SIGNAL(activated(int)), TQ_SLOT(internalActivate(int)) );
connect( p, TQ_SIGNAL(highlighted(int)), TQ_SLOT(internalHighlight(int)) );
@@ -1582,15 +1582,15 @@ void TQComboBox::popup()
}
d->popup()->installEventFilter( this );
if(d->popup() && style().styleHint(TQStyle::SH_ComboBox_Popup, this))
- d->popup()->setItemChecked(this->d->current, TRUE);
+ d->popup()->setItemChecked(this->d->current, true);
d->popup()->popup( mapToGlobal( TQPoint(0,0) ), this->d->current );
update();
} else {
// Send all listbox events to eventFilter():
TQListBox* lb = d->listBox();
- lb->triggerUpdate( TRUE );
+ lb->triggerUpdate( true );
lb->installEventFilter( this );
- d->mouseWasInsidePopup = FALSE;
+ d->mouseWasInsidePopup = false;
int w = lb->variableWidth() ? lb->sizeHint().width() : width();
int h = listHeight( lb, d->sizeLimit ) + 2;
TQRect screen = TQApplication::desktop()->availableGeometry( this );
@@ -1624,7 +1624,7 @@ void TQComboBox::popup()
lb->raise();
bool block = lb->signalsBlocked();
- lb->blockSignals( TRUE );
+ lb->blockSignals( true );
TQListBoxItem* currentLBItem = 0;
if ( editable() && currentText() != text( currentItem() ) )
currentLBItem = lb->findItem( currentText() );
@@ -1637,7 +1637,7 @@ void TQComboBox::popup()
// set the current item to also be the selected item if it isn't already
if ( currentLBItem && currentLBItem->isSelectable() && !currentLBItem->isSelected() )
- lb->setSelected( currentLBItem, TRUE );
+ lb->setSelected( currentLBItem, true );
lb->blockSignals( block );
lb->setVScrollBarMode(TQScrollView::Auto);
@@ -1651,7 +1651,7 @@ void TQComboBox::popup()
#endif
lb->show();
}
- d->poppedUp = TRUE;
+ d->poppedUp = true;
}
@@ -1683,10 +1683,10 @@ void TQComboBox::popDownListBox()
d->listBox()->hide();
d->listBox()->setCurrentItem( d->current );
if ( d->arrowDown ) {
- d->arrowDown = FALSE;
- repaint( FALSE );
+ d->arrowDown = false;
+ repaint( false );
}
- d->poppedUp = FALSE;
+ d->poppedUp = false;
update();
}
@@ -1736,16 +1736,16 @@ void TQComboBox::currentChanged()
bool TQComboBox::eventFilter( TQObject *object, TQEvent *event )
{
if ( !event )
- return TRUE;
+ return true;
else if ( object == d->ed ) {
if ( event->type() == TQEvent::KeyPress ) {
bool isAccepted = ( (TQKeyEvent*)event )->isAccepted();
keyPressEvent( (TQKeyEvent *)event );
if ( ((TQKeyEvent *)event)->isAccepted() ) {
- d->completeNow = FALSE;
- return TRUE;
+ d->completeNow = false;
+ return true;
} else if ( ((TQKeyEvent *)event)->key() != Key_End ) {
- d->completeNow = TRUE;
+ d->completeNow = true;
d->completeAt = d->ed->cursorPosition();
}
if ( isAccepted )
@@ -1760,7 +1760,7 @@ bool TQComboBox::eventFilter( TQObject *object, TQEvent *event )
} else if ( event->type() == TQEvent::FocusOut ) {
focusOutEvent( (TQFocusEvent *)event );
} else if ( d->useCompletion && d->completeNow ) {
- d->completeNow = FALSE;
+ d->completeNow = false;
if ( !d->ed->text().isNull() &&
d->ed->cursorPosition() > d->completeAt &&
d->ed->cursorPosition() == (int)d->ed->text().length() ) {
@@ -1786,7 +1786,7 @@ bool TQComboBox::eventFilter( TQObject *object, TQEvent *event )
if ( !d->mouseWasInsidePopup ) {
TQPoint pos = e->pos();
if ( d->listBox()->rect().contains( pos ) )
- d->mouseWasInsidePopup = TRUE;
+ d->mouseWasInsidePopup = true;
// Check if arrow button should toggle
if ( d->arrowPressed ) {
TQPoint comboPos;
@@ -1797,24 +1797,24 @@ bool TQComboBox::eventFilter( TQObject *object, TQEvent *event )
arrowRect = TQStyle::visualRect(arrowRect, this);
if ( arrowRect.contains( comboPos ) ) {
if ( !d->arrowDown ) {
- d->arrowDown = TRUE;
- repaint( FALSE );
+ d->arrowDown = true;
+ repaint( false );
}
} else {
if ( d->arrowDown ) {
- d->arrowDown = FALSE;
- repaint( FALSE );
+ d->arrowDown = false;
+ repaint( false );
}
}
}
} else if ((e->state() & ( RightButton | LeftButton | MidButton ) ) == 0 &&
style().styleHint(TQStyle::SH_ComboBox_ListMouseTracking, this)) {
- TQWidget *mouseW = TQApplication::widgetAt( e->globalPos(), TRUE );
+ TQWidget *mouseW = TQApplication::widgetAt( e->globalPos(), true );
if ( mouseW == d->listBox()->viewport() ) { //###
TQMouseEvent m( TQEvent::MouseMove, e->pos(), e->globalPos(),
LeftButton, LeftButton );
TQApplication::sendEvent( object, &m ); //### Evil
- return TRUE;
+ return true;
}
}
@@ -1825,15 +1825,15 @@ bool TQComboBox::eventFilter( TQObject *object, TQEvent *event )
e->pos(), e->button(), e->state() ) ;
// will hide popup
TQApplication::sendEvent( object, &tmp );
- return TRUE;
+ return true;
} else {
if ( d->mouseWasInsidePopup ) {
popDownListBox();
} else {
- d->arrowPressed = FALSE;
+ d->arrowPressed = false;
if ( d->arrowDown ) {
- d->arrowDown = FALSE;
- repaint( FALSE );
+ d->arrowDown = false;
+ repaint( false );
}
}
}
@@ -1842,12 +1842,12 @@ bool TQComboBox::eventFilter( TQObject *object, TQEvent *event )
case TQEvent::MouseButtonPress:
if ( !d->listBox()->rect().contains( e->pos() ) ) {
TQPoint globalPos = d->listBox()->mapToGlobal(e->pos());
- if ( TQApplication::widgetAt( globalPos, TRUE ) == this ) {
- d->discardNextMousePress = TRUE;
+ if ( TQApplication::widgetAt( globalPos, true ) == this ) {
+ d->discardNextMousePress = true;
// avoid popping up again
}
popDownListBox();
- return TRUE;
+ return true;
}
break;
case TQEvent::KeyPress:
@@ -1860,13 +1860,13 @@ bool TQComboBox::eventFilter( TQObject *object, TQEvent *event )
case Key_Escape:
if ( d->poppedUp ) {
popDownListBox();
- return TRUE;
+ return true;
}
break;
case Key_Enter:
case Key_Return:
// work around TQDialog's enter handling
- return FALSE;
+ return false;
default:
break;
}
@@ -1887,14 +1887,14 @@ bool TQComboBox::eventFilter( TQObject *object, TQEvent *event )
e->pos(), e->button(), e->state() ) ;
// highlight item, but don't pop down:
TQApplication::sendEvent( object, &tmp );
- return TRUE;
+ return true;
}
break;
case TQEvent::MouseButtonDblClick:
case TQEvent::MouseButtonPress:
if ( !d->popup()->rect().contains( e->pos() ) ) {
- d->poppedUp = FALSE;
- d->arrowDown = FALSE;
+ d->poppedUp = false;
+ d->arrowDown = false;
// remove filter, event will take down popup:
d->popup()->removeEventFilter( this );
// ### uglehack!
@@ -1905,7 +1905,7 @@ bool TQComboBox::eventFilter( TQObject *object, TQEvent *event )
}
break;
case TQEvent::Hide:
- d->poppedUp = FALSE;
+ d->poppedUp = false;
break;
default:
break;
@@ -1995,11 +1995,11 @@ void TQComboBox::returnPressed()
return;
int c = 0;
- bool doInsert = TRUE;
+ bool doInsert = true;
if ( !d->duplicatesEnabled ) {
for ( int i = 0; i < count(); ++i ) {
if ( s == text( i ) ) {
- doInsert = FALSE;
+ doInsert = false;
c = i;
break;
}
@@ -2059,7 +2059,7 @@ void TQComboBox::setEnabled( bool enable )
} else {
d->popup()->removeEventFilter( this );
d->popup()->close();
- d->poppedUp = FALSE;
+ d->poppedUp = false;
}
}
TQWidget::setEnabled( enable );
@@ -2125,10 +2125,10 @@ void TQComboBox::setListBox( TQListBox * newListBox )
delete d->listBox();
} else {
delete d->popup();
- d->setPopupMenu(0, FALSE);
+ d->setPopupMenu(0, false);
}
- newListBox->reparent( this, WType_Popup, TQPoint(0,0), FALSE );
+ newListBox->reparent( this, WType_Popup, TQPoint(0,0), false );
d->setListBox( newListBox );
d->listBox()->setFont( font() );
d->listBox()->setPalette( palette() );
@@ -2211,7 +2211,7 @@ void TQComboBox::setEditText( const TQString &newText )
void TQComboBox::setAutoCompletion( bool enable )
{
d->useCompletion = enable;
- d->completeNow = FALSE;
+ d->completeNow = false;
}
@@ -2299,18 +2299,18 @@ void TQComboBox::setLineEdit( TQLineEdit *edit )
d->ed = edit;
if ( edit->parent() != this )
- edit->reparent( this, TQPoint(0,0), FALSE );
+ edit->reparent( this, TQPoint(0,0), false );
connect (edit, TQ_SIGNAL( textChanged(const TQString&) ),
this, TQ_SIGNAL( textChanged(const TQString&) ) );
connect( edit, TQ_SIGNAL(returnPressed()), TQ_SLOT(returnPressed()) );
- edit->setFrame( FALSE );
+ edit->setFrame( false );
d->updateLinedGeometry();
edit->installEventFilter( this );
setFocusProxy( edit );
setFocusPolicy( StrongFocus );
- setInputMethodEnabled( TRUE );
+ setInputMethodEnabled( true );
if ( !d->usingListBox() )
setUpListBox();
diff --git a/src/widgets/tqdatetimeedit.cpp b/src/widgets/tqdatetimeedit.cpp
index 3820c5604..4159f66e8 100644
--- a/src/widgets/tqdatetimeedit.cpp
+++ b/src/widgets/tqdatetimeedit.cpp
@@ -60,7 +60,7 @@
class TQ_EXPORT TQNumberSection
{
public:
- TQNumberSection( int selStart = 0, int selEnd = 0, bool separat = TRUE, int actual = -1 )
+ TQNumberSection( int selStart = 0, int selEnd = 0, bool separat = true, int actual = -1 )
: selstart( selStart ), selend( selEnd ), act( actual ), sep( separat )
{}
int selectionStart() const { return selstart; }
@@ -70,7 +70,6 @@ public:
int width() const { return selend - selstart; }
int index() const { return act; }
bool separator() const { return sep; }
- TQ_DUMMY_COMPARISON_OPERATOR( TQNumberSection )
private:
int selstart :12;
int selend :12;
@@ -80,7 +79,7 @@ private:
static TQString *lDateSep = 0;
static TQString *lTimeSep = 0;
-static bool lAMPM = FALSE;
+static bool lAMPM = false;
static TQString *lAM = 0;
static TQString *lPM = 0;
static TQDateEdit::Order lOrder = TQDateEdit::YMD;
@@ -217,11 +216,11 @@ class TQDateTimeEditorPrivate
{
public:
TQDateTimeEditorPrivate()
- : frm( TRUE ),
- parag( new TQTextParagraph( 0, 0, 0, FALSE ) ),
+ : frm( true ),
+ parag( new TQTextParagraph( 0, 0, 0, false ) ),
focusSec(0)
{
- parag->formatter()->setWrapEnabled( FALSE );
+ parag->formatter()->setWrapEnabled( false );
cursor = new TQTextCursor( 0 );
cursor->setParagraph( parag );
offset = 0;
@@ -278,13 +277,13 @@ public:
bool setFocusSection( int idx )
{
if ( idx > (int)sections.count()-1 || idx < 0 )
- return FALSE;
+ return false;
if ( idx != focusSec ) {
focusSec = idx;
applyFocusSelection();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool inSectionSelection( int idx )
@@ -292,9 +291,9 @@ public:
for ( uint i = 0; i < sections.count(); ++i ) {
if ( idx >= sections[i].selectionStart() &&
idx <= sections[i].selectionEnd() )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void paint( const TQString& txt, bool focus, TQPainter& p,
@@ -340,7 +339,7 @@ public:
yoff = 0;
p.translate( xoff, yoff );
- parag->paint( p, cg, 0, TRUE );
+ parag->paint( p, cg, 0, true );
if ( frm )
p.translate( -xoff, -yoff );
}
@@ -575,7 +574,7 @@ void TQDateTimeEditor::mousePressEvent( TQMouseEvent *e )
int sec = sectionAt( p );
if ( sec != -1 ) {
cw->setFocusSection( sec );
- repaint( rect(), FALSE );
+ repaint( rect(), false );
}
}
@@ -591,37 +590,37 @@ bool TQDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
case Key_Right:
if ( d->focusSection() < (int)d->sectionCount()-1 ) {
if ( cw->setFocusSection( focusSection()+1 ) )
- repaint( rect(), FALSE );
+ repaint( rect(), false );
}
- return TRUE;
+ return true;
case Key_Left:
if ( d->focusSection() > 0 ) {
if ( cw->setFocusSection( focusSection()-1 ) )
- repaint( rect(), FALSE );
+ repaint( rect(), false );
}
- return TRUE;
+ return true;
case Key_Up:
cw->stepUp();
- return TRUE;
+ return true;
case Key_Down:
cw->stepDown();
- return TRUE;
+ return true;
case Key_Backspace:
if ( ::tqt_cast<TQDateEdit*>(cw) )
((TQDateEdit*)cw)->removeFirstNumber( d->focusSection() );
else if ( ::tqt_cast<TQTimeEdit*>(cw) )
((TQTimeEdit*)cw)->removeFirstNumber( d->focusSection() );
- return TRUE;
+ return true;
case Key_Delete:
cw->removeLastNumber( d->focusSection() );
- return TRUE;
+ return true;
case Key_Tab:
case Key_BackTab: {
if ( ke->state() == TQt::ControlButton )
- return FALSE;
+ return false;
TQWidget *w = this;
- bool hadDateEdit = FALSE;
+ bool hadDateEdit = false;
while ( w ) {
if ( ( ::tqt_cast<TQDateTimeSpinWidget*>(w) && qstrcmp( w->name(), "qt_spin_widget" ) != 0 ) ||
::tqt_cast<TQDateTimeEdit*>(w) )
@@ -637,10 +636,10 @@ bool TQDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
TQDateTimeEdit *ed = (TQDateTimeEdit*)w;
if ( hadDateEdit && ke->key() == Key_Tab ) {
ed->timeEdit()->setFocus();
- return TRUE;
+ return true;
} else if ( !hadDateEdit && ke->key() == Key_BackTab ) {
ed->dateEdit()->setFocus();
- return TRUE;
+ return true;
} else {
while ( w && !::tqt_cast<TQDateTimeEdit*>(w) )
w = w->parentWidget();
@@ -648,7 +647,7 @@ bool TQDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
}
tqApp->sendEvent( w, e );
- return TRUE;
+ return true;
}
} break;
default:
@@ -657,9 +656,9 @@ bool TQDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
// do the same thing as KEY_RIGHT when the user presses the separator key
if ( d->focusSection() < 2 ) {
if ( cw->setFocusSection( focusSection()+1 ) )
- repaint( rect(), FALSE );
+ repaint( rect(), false );
}
- return TRUE;
+ return true;
} else if ( !txt.isEmpty() && ::tqt_cast<TQTimeEdit*>(cw) && focusSection() == (int) d->sectionCount()-1 ) {
// the first character of the AM/PM indicator toggles if the section has focus
TQTimeEdit *te = (TQTimeEdit*)cw;
@@ -678,12 +677,12 @@ bool TQDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
int num = txt[0].digitValue();
if ( num != -1 ) {
cw->addNumber( d->focusSection(), num );
- return TRUE;
+ return true;
}
}
}
}
- return FALSE;
+ return false;
}
@@ -864,13 +863,13 @@ public:
dateEdit->setRange( TQDate::currentDate().addDays( -365 ),
TQDate::currentDate().addDays( 365 ) );
dateEdit->setOrder( TQDateEdit::MDY );
- dateEdit->setAutoAdvance( TRUE );
+ dateEdit->setAutoAdvance( true );
\endcode
Here we've created a new TQDateEdit object initialised with today's
date and restricted the valid date range to today plus or minus
365 days. We've set the order to month, day, year. If the auto
- advance property is TRUE (as we've set it here) when the user
+ advance property is true (as we've set it here) when the user
completes a section of the date, e.g. enters two digits for the
month, they are automatically taken to the next section.
@@ -969,13 +968,13 @@ void TQDateEdit::init()
d->dayCache = 0;
setOrder( localOrder() );
setFocusSection( 0 );
- d->overwrite = TRUE;
- d->adv = FALSE;
+ d->overwrite = true;
+ d->adv = false;
d->timerId = 0;
- d->typing = FALSE;
+ d->typing = false;
d->min = TQDate( 1752, 9, 14 );
d->max = TQDate( 8000, 12, 31 );
- d->changed = FALSE;
+ d->changed = false;
setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
@@ -1249,7 +1248,7 @@ void TQDateEdit::setOrder( TQDateEdit::Order order )
break;
}
if ( isVisible() )
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
@@ -1265,28 +1264,28 @@ TQDateEdit::Order TQDateEdit::order() const
void TQDateEdit::stepUp()
{
int sec = d->ed->focusSection();
- bool accepted = FALSE;
+ bool accepted = false;
if ( sec == d->yearSection ) {
if ( !outOfRange( d->y+1, d->m, d->d ) ) {
- accepted = TRUE;
+ accepted = true;
setYear( d->y+1 );
}
} else if ( sec == d->monthSection ) {
if ( !outOfRange( d->y, d->m+1, d->d ) ) {
- accepted = TRUE;
+ accepted = true;
setMonth( d->m+1 );
}
} else if ( sec == d->daySection ) {
if ( !outOfRange( d->y, d->m, d->d+1 ) ) {
- accepted = TRUE;
+ accepted = true;
setDay( d->d+1 );
}
}
if ( accepted ) {
- d->changed = FALSE;
+ d->changed = false;
emit valueChanged( date() );
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
@@ -1298,28 +1297,28 @@ void TQDateEdit::stepUp()
void TQDateEdit::stepDown()
{
int sec = d->ed->focusSection();
- bool accepted = FALSE;
+ bool accepted = false;
if ( sec == d->yearSection ) {
if ( !outOfRange( d->y-1, d->m, d->d ) ) {
- accepted = TRUE;
+ accepted = true;
setYear( d->y-1 );
}
} else if ( sec == d->monthSection ) {
if ( !outOfRange( d->y, d->m-1, d->d ) ) {
- accepted = TRUE;
+ accepted = true;
setMonth( d->m-1 );
}
} else if ( sec == d->daySection ) {
if ( !outOfRange( d->y, d->m, d->d-1 ) ) {
- accepted = TRUE;
+ accepted = true;
setDay( d->d-1 );
}
}
if ( accepted ) {
- d->changed = FALSE;
+ d->changed = false;
emit valueChanged( date() );
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
/*!
@@ -1421,8 +1420,8 @@ void TQDateEdit::setDate( const TQDate& date )
d->dayCache = d->d;
emit valueChanged( date );
}
- d->changed = FALSE;
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->changed = false;
+ d->ed->repaint( d->ed->rect(), false );
}
TQDate TQDateEdit::date() const
@@ -1434,8 +1433,8 @@ TQDate TQDateEdit::date() const
/*! \internal
- Returns TRUE if \a y, \a m, \a d is out of range, otherwise returns
- FALSE.
+ Returns true if \a y, \a m, \a d is out of range, otherwise returns
+ false.
\sa setRange()
@@ -1444,15 +1443,10 @@ TQDate TQDateEdit::date() const
bool TQDateEdit::outOfRange( int y, int m, int d ) const
{
if ( TQDate::isValid( y, m, d ) ) {
- TQDate currentDate( y, m, d );
- if ( currentDate > maxValue() ||
- currentDate < minValue() ) {
- //## outOfRange should set overwrite?
- return TRUE;
- }
- return FALSE;
+ TQDate currentDate( y, m, d );
+ return currentDate < minValue() || currentDate > maxValue();
}
- return FALSE; /* assume ok */
+ return false; /* assume ok */
}
/*! \reimp
@@ -1464,14 +1458,14 @@ void TQDateEdit::addNumber( int sec, int num )
if ( sec == -1 )
return;
killTimer( d->timerId );
- bool overwrite = FALSE;
- bool accepted = FALSE;
- d->typing = TRUE;
+ bool overwrite = false;
+ bool accepted = false;
+ d->typing = true;
TQString txt;
if ( sec == d->yearSection ) {
txt = TQString::number( d->y );
if ( d->overwrite || txt.length() == 4 ) {
- accepted = TRUE;
+ accepted = true;
d->y = num;
} else {
txt += TQString::number( num );
@@ -1484,22 +1478,22 @@ void TQDateEdit::addNumber( int sec, int num )
else if ( outOfRange( val, d->m, d->d ) )
txt = TQString::number( d->y );
else {
- accepted = TRUE;
+ accepted = true;
d->y = val;
}
} else {
- accepted = TRUE;
+ accepted = true;
d->y = txt.toInt();
}
if ( d->adv && txt.length() == 4 ) {
d->ed->setFocusSection( d->ed->focusSection()+1 );
- overwrite = TRUE;
+ overwrite = true;
}
}
} else if ( sec == d->monthSection ) {
txt = TQString::number( d->m );
if ( d->overwrite || txt.length() == 2 ) {
- accepted = TRUE;
+ accepted = true;
d->m = num;
} else {
txt += TQString::number( num );
@@ -1509,18 +1503,18 @@ void TQDateEdit::addNumber( int sec, int num )
if ( outOfRange( d->y, temp, d->d ) )
txt = TQString::number( d->m );
else {
- accepted = TRUE;
+ accepted = true;
d->m = temp;
}
if ( d->adv && txt.length() == 2 ) {
d->ed->setFocusSection( d->ed->focusSection()+1 );
- overwrite = TRUE;
+ overwrite = true;
}
}
} else if ( sec == d->daySection ) {
txt = TQString::number( d->d );
if ( d->overwrite || txt.length() == 2 ) {
- accepted = TRUE;
+ accepted = true;
d->d = num;
d->dayCache = d->d;
} else {
@@ -1531,23 +1525,23 @@ void TQDateEdit::addNumber( int sec, int num )
if ( outOfRange( d->y, d->m, temp ) )
txt = TQString::number( d->d );
else {
- accepted = TRUE;
+ accepted = true;
d->d = temp;
d->dayCache = d->d;
}
if ( d->adv && txt.length() == 2 ) {
d->ed->setFocusSection( d->ed->focusSection()+1 );
- overwrite = TRUE;
+ overwrite = true;
}
}
}
if ( accepted ) {
- d->changed = FALSE;
+ d->changed = false;
emit valueChanged( date() );
}
d->overwrite = overwrite;
d->timerId = startTimer( tqApp->doubleClickInterval()*4 );
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
@@ -1559,8 +1553,8 @@ bool TQDateEdit::setFocusSection( int s )
{
if ( s != d->ed->focusSection() ) {
killTimer( d->timerId );
- d->overwrite = TRUE;
- d->typing = FALSE;
+ d->overwrite = true;
+ d->typing = false;
fix(); // will emit valueChanged if necessary
}
return d->ed->setFocusSection( s );
@@ -1587,7 +1581,7 @@ bool TQDateEdit::setFocusSection( int s )
void TQDateEdit::fix()
{
- bool changed = FALSE;
+ bool changed = false;
int currentYear = TQDate::currentDate().year();
int year = d->y;
if ( year < 100 ) {
@@ -1600,17 +1594,17 @@ void TQDateEdit::fix()
if ( year >= currentYear + 30 )
year -= 100;
}
- changed = TRUE;
+ changed = true;
} else if ( year < 1000 ) {
int currentMillennium = currentYear / 10;
year += currentMillennium * 10;
- changed = TRUE;
+ changed = true;
} else if (d->d == 0) {
d->d = 1;
- changed = TRUE;
+ changed = true;
} else if (d->m == 0) {
d->m = 1;
- changed = TRUE;
+ changed = true;
}
if ( outOfRange( year, d->m, d->d ) ) {
if ( minValue().isValid() && date() < minValue() ) {
@@ -1625,12 +1619,12 @@ void TQDateEdit::fix()
d->m = maxValue().month();
d->y = maxValue().year();
}
- changed = TRUE;
+ changed = true;
} else if ( changed )
setYear( year );
if ( changed ) {
emit valueChanged( date() );
- d->changed = FALSE;
+ d->changed = false;
}
}
@@ -1642,7 +1636,7 @@ void TQDateEdit::fix()
bool TQDateEdit::event( TQEvent *e )
{
if( e->type() == TQEvent::FocusOut ) {
- d->typing = FALSE;
+ d->typing = false;
fix();
// the following can't be done in fix() because fix() called
// from all over the place and it will break the old behaviour
@@ -1654,11 +1648,11 @@ bool TQDateEdit::event( TQEvent *e )
if ( TQDate::isValid( d->y, d->m, d->d ) )
break;
}
- d->changed = TRUE;
+ d->changed = true;
}
if ( d->changed ) {
emit valueChanged( date() );
- d->changed = FALSE;
+ d->changed = false;
}
} else if ( e->type() == TQEvent::LocaleChange ) {
readLocaleSettings();
@@ -1694,7 +1688,7 @@ void TQDateEdit::removeFirstNumber( int sec )
d->d = txt.toInt();
d->dayCache = d->d;
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
/*! \reimp
@@ -1720,7 +1714,7 @@ void TQDateEdit::removeLastNumber( int sec )
d->d = txt.toInt();
d->dayCache = d->d;
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
/*!
@@ -1728,9 +1722,9 @@ void TQDateEdit::removeLastNumber( int sec )
\brief whether the editor automatically advances to the next
section
- If autoAdvance is TRUE, the editor will automatically advance
+ If autoAdvance is true, the editor will automatically advance
focus to the next date section if a user has completed a section.
- The default is FALSE.
+ The default is false.
*/
void TQDateEdit::setAutoAdvance( bool advance )
@@ -1749,7 +1743,7 @@ bool TQDateEdit::autoAdvance() const
void TQDateEdit::timerEvent( TQTimerEvent * )
{
- d->overwrite = TRUE;
+ d->overwrite = true;
}
/*!
@@ -1856,9 +1850,9 @@ void TQTimeEdit::init()
connect( d->controls, TQ_SIGNAL( stepUpPressed() ), TQ_SLOT( stepUp() ) );
connect( d->controls, TQ_SIGNAL( stepDownPressed() ), TQ_SLOT( stepDown() ) );
- d->ed->appendSection( TQNumberSection( 0,0, TRUE, 0 ) );
- d->ed->appendSection( TQNumberSection( 0,0, TRUE, 1 ) );
- d->ed->appendSection( TQNumberSection( 0,0, TRUE, 2 ) );
+ d->ed->appendSection( TQNumberSection( 0,0, true, 0 ) );
+ d->ed->appendSection( TQNumberSection( 0,0, true, 1 ) );
+ d->ed->appendSection( TQNumberSection( 0,0, true, 2 ) );
d->ed->setSeparator( localTimeSep() );
d->h = 0;
@@ -1867,15 +1861,15 @@ void TQTimeEdit::init()
d->display = Hours | Minutes | Seconds;
if ( lAMPM ) {
d->display |= AMPM;
- d->ed->appendSection( TQNumberSection( 0,0, FALSE, 3 ) );
+ d->ed->appendSection( TQNumberSection( 0,0, false, 3 ) );
}
- d->adv = FALSE;
- d->overwrite = TRUE;
+ d->adv = false;
+ d->overwrite = true;
d->timerId = 0;
- d->typing = FALSE;
+ d->typing = false;
d->min = TQTime( 0, 0, 0 );
d->max = TQTime( 23, 59, 59 );
- d->changed = FALSE;
+ d->changed = false;
setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed );
@@ -1955,13 +1949,13 @@ void TQTimeEdit::setDisplay( uint display )
d->ed->clearSections();
d->display = display;
if ( d->display & Hours )
- d->ed->appendSection( TQNumberSection( 0,0, TRUE, 0 ) );
+ d->ed->appendSection( TQNumberSection( 0,0, true, 0 ) );
if ( d->display & Minutes )
- d->ed->appendSection( TQNumberSection( 0,0, TRUE, 1 ) );
+ d->ed->appendSection( TQNumberSection( 0,0, true, 1 ) );
if ( d->display & Seconds )
- d->ed->appendSection( TQNumberSection( 0,0, TRUE, 2 ) );
+ d->ed->appendSection( TQNumberSection( 0,0, true, 2 ) );
if ( d->display & AMPM )
- d->ed->appendSection( TQNumberSection( 0,0, FALSE, 3 ) );
+ d->ed->appendSection( TQNumberSection( 0,0, false, 3 ) );
d->ed->setFocusSection( 0 );
d->ed->update();
@@ -1994,8 +1988,8 @@ void TQTimeEdit::setTime( const TQTime& time )
d->s = time.second();
emit valueChanged( time );
}
- d->changed = FALSE;
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->changed = false;
+ d->ed->repaint( d->ed->rect(), false );
}
TQTime TQTimeEdit::time() const
@@ -2010,9 +2004,9 @@ TQTime TQTimeEdit::time() const
\brief whether the editor automatically advances to the next
section
- If autoAdvance is TRUE, the editor will automatically advance
+ If autoAdvance is true, the editor will automatically advance
focus to the next time section if a user has completed a section.
- The default is FALSE.
+ The default is false.
*/
void TQTimeEdit::setAutoAdvance( bool advance )
@@ -2059,10 +2053,10 @@ TQString TQTimeEdit::separator() const
bool TQTimeEdit::event( TQEvent *e )
{
if ( e->type() == TQEvent::FocusOut ) {
- d->typing = FALSE;
+ d->typing = false;
if ( d->changed ) {
emit valueChanged( time() );
- d->changed = FALSE;
+ d->changed = false;
}
} else if ( e->type() == TQEvent::LocaleChange ) {
readLocaleSettings();
@@ -2077,7 +2071,7 @@ bool TQTimeEdit::event( TQEvent *e )
void TQTimeEdit::timerEvent( TQTimerEvent * )
{
- d->overwrite = TRUE;
+ d->overwrite = true;
}
@@ -2091,7 +2085,7 @@ void TQTimeEdit::stepUp()
return;
}
int sec = d->ed->mapSection( d->ed->focusSection() );
- bool accepted = TRUE;
+ bool accepted = true;
switch( sec ) {
case 0:
do {
@@ -2115,17 +2109,17 @@ void TQTimeEdit::stepUp()
setHour( d->h-12 );
break;
default:
- accepted = FALSE;
+ accepted = false;
#ifdef QT_CHECK_RANGE
tqWarning( "TQTimeEdit::stepUp: Focus section out of range!" );
#endif
break;
}
if ( accepted ) {
- d->changed = FALSE;
+ d->changed = false;
emit valueChanged( time() );
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
@@ -2140,7 +2134,7 @@ void TQTimeEdit::stepDown()
}
int sec = d->ed->mapSection( d->ed->focusSection() );
- bool accepted = TRUE;
+ bool accepted = true;
switch( sec ) {
case 0:
do {
@@ -2167,17 +2161,17 @@ void TQTimeEdit::stepDown()
setHour( d->h+12 );
break;
default:
- accepted = FALSE;
+ accepted = false;
#ifdef QT_CHECK_RANGE
tqWarning( "TQTimeEdit::stepDown: Focus section out of range!" );
#endif
break;
}
if ( accepted ) {
- d->changed = FALSE;
+ d->changed = false;
emit valueChanged( time() );
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
@@ -2210,15 +2204,15 @@ bool TQTimeEdit::setFocusSection( int sec )
{
if ( sec != d->ed->focusSection() ) {
killTimer( d->timerId );
- d->overwrite = TRUE;
- d->typing = FALSE;
+ d->overwrite = true;
+ d->typing = false;
TQString txt = sectionText( sec );
txt = txt.rightJustify( 2, TQDATETIMEEDIT_HIDDEN_CHAR );
int offset = sec*2+sec*separator().length() + txt.length();
d->ed->setSectionSelection( sec, offset - txt.length(), offset );
if ( d->changed ) {
emit valueChanged( time() );
- d->changed = FALSE;
+ d->changed = false;
}
}
return d->ed->setFocusSection( sec );
@@ -2319,20 +2313,16 @@ TQString TQTimeEdit::sectionText( int sec )
/*! \internal
- Returns TRUE if \a h, \a m, and \a s are out of range.
+ Returns true if \a h, \a m, and \a s are out of range.
*/
bool TQTimeEdit::outOfRange( int h, int m, int s ) const
{
if ( TQTime::isValid( h, m, s ) ) {
- TQTime currentTime( h, m, s );
- if ( currentTime > maxValue() ||
- currentTime < minValue() )
- return TRUE;
- else
- return FALSE;
+ TQTime currentTime( h, m, s );
+ return currentTime < minValue() || currentTime > maxValue();
}
- return TRUE;
+ return true;
}
/*! \reimp
@@ -2345,9 +2335,9 @@ void TQTimeEdit::addNumber( int sec, int num )
return;
sec = d->ed->mapSection( sec );
killTimer( d->timerId );
- bool overwrite = FALSE;
- bool accepted = FALSE;
- d->typing = TRUE;
+ bool overwrite = false;
+ bool accepted = false;
+ d->typing = true;
TQString txt;
switch( sec ) {
@@ -2361,7 +2351,7 @@ void TQTimeEdit::addNumber( int sec, int num )
if ( d->display & AMPM && d->h > 11 )
num += 12;
if ( !outOfRange( num, d->m, d->s ) ) {
- accepted = TRUE;
+ accepted = true;
d->h = num;
}
} else {
@@ -2373,19 +2363,19 @@ void TQTimeEdit::addNumber( int sec, int num )
if ( d->h < 12 ) {
temp = 0;
}
- accepted = TRUE;
+ accepted = true;
} else if ( outOfRange( temp + 12, d->m, d->s ) ) {
txt = TQString::number( d->h );
} else {
if ( d->h > 11 ) {
temp += 12;
}
- accepted = TRUE;
+ accepted = true;
}
} else if ( !(d->display & AMPM) && outOfRange( temp, d->m, d->s ) ) {
txt = TQString::number( d->h );
} else {
- accepted = TRUE;
+ accepted = true;
}
if ( accepted )
@@ -2393,7 +2383,7 @@ void TQTimeEdit::addNumber( int sec, int num )
if ( d->adv && txt.length() == 2 ) {
setFocusSection( d->ed->focusSection()+1 );
- overwrite = TRUE;
+ overwrite = true;
}
}
break;
@@ -2402,7 +2392,7 @@ void TQTimeEdit::addNumber( int sec, int num )
txt = TQString::number( d->m );
if ( d->overwrite || txt.length() == 2 ) {
if ( !outOfRange( d->h, num, d->s ) ) {
- accepted = TRUE;
+ accepted = true;
d->m = num;
}
} else {
@@ -2413,12 +2403,12 @@ void TQTimeEdit::addNumber( int sec, int num )
if ( outOfRange( d->h, temp, d->s ) )
txt = TQString::number( d->m );
else {
- accepted = TRUE;
+ accepted = true;
d->m = temp;
}
if ( d->adv && txt.length() == 2 ) {
setFocusSection( d->ed->focusSection()+1 );
- overwrite = TRUE;
+ overwrite = true;
}
}
break;
@@ -2427,7 +2417,7 @@ void TQTimeEdit::addNumber( int sec, int num )
txt = TQString::number( d->s );
if ( d->overwrite || txt.length() == 2 ) {
if ( !outOfRange( d->h, d->m, num ) ) {
- accepted = TRUE;
+ accepted = true;
d->s = num;
}
} else {
@@ -2438,12 +2428,12 @@ void TQTimeEdit::addNumber( int sec, int num )
if ( outOfRange( d->h, d->m, temp ) )
txt = TQString::number( d->s );
else {
- accepted = TRUE;
+ accepted = true;
d->s = temp;
}
if ( d->adv && txt.length() == 2 ) {
setFocusSection( d->ed->focusSection()+1 );
- overwrite = TRUE;
+ overwrite = true;
}
}
break;
@@ -2459,7 +2449,7 @@ void TQTimeEdit::addNumber( int sec, int num )
emit valueChanged( time() );
d->overwrite = overwrite;
d->timerId = startTimer( tqApp->doubleClickInterval()*4 );
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
@@ -2499,7 +2489,7 @@ void TQTimeEdit::removeFirstNumber( int sec )
d->s = txt.toInt();
break;
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
/*! \reimp
@@ -2534,7 +2524,7 @@ void TQTimeEdit::removeLastNumber( int sec )
d->s = txt.toInt();
break;
}
- d->ed->repaint( d->ed->rect(), FALSE );
+ d->ed->repaint( d->ed->rect(), false );
}
/*! \reimp
@@ -2726,7 +2716,7 @@ void TQDateTimeEdit::init()
d = new TQDateTimeEditPrivate();
de = new TQDateEdit( this, "qt_datetime_dateedit" );
te = new TQTimeEdit( this, "qt_datetime_timeedit" );
- d->adv = FALSE;
+ d->adv = false;
connect( de, TQ_SIGNAL( valueChanged(const TQDate&) ),
this, TQ_SLOT( newValue(const TQDate&) ) );
connect( te, TQ_SIGNAL( valueChanged(const TQTime&) ),
@@ -2801,7 +2791,7 @@ void TQDateTimeEdit::newValue( const TQTime& )
/*!
Sets the auto advance property of the editor to \a advance. If set
- to TRUE, the editor will automatically advance focus to the next
+ to true, the editor will automatically advance focus to the next
date or time section if the user has completed a section.
*/
@@ -2812,7 +2802,7 @@ void TQDateTimeEdit::setAutoAdvance( bool advance )
}
/*!
- Returns TRUE if auto-advance is enabled, otherwise returns FALSE.
+ Returns true if auto-advance is enabled, otherwise returns false.
\sa setAutoAdvance()
*/
diff --git a/src/widgets/tqdial.cpp b/src/widgets/tqdial.cpp
index b1e523956..fa8900d3f 100644
--- a/src/widgets/tqdial.cpp
+++ b/src/widgets/tqdial.cpp
@@ -65,11 +65,11 @@ class TQDialPrivate
public:
TQDialPrivate()
{
- wrapping = FALSE;
- tracking = TRUE;
- doNotEmit = FALSE;
+ wrapping = false;
+ tracking = true;
+ doNotEmit = false;
target = 3.7;
- mousePressed = FALSE;
+ mousePressed = false;
}
bool wrapping;
@@ -100,7 +100,7 @@ public:
widget.
Both API- and UI-wise, the dial is very similar to a \link TQSlider
- slider. \endlink Indeed, when wrapping() is FALSE (the default)
+ slider. \endlink Indeed, when wrapping() is false (the default)
there is no real difference between a slider and a dial. They
have the same signals, slots and member functions, all of which do
the same things. Which one you use depends only on your taste
@@ -108,8 +108,8 @@ public:
The dial initially emits valueChanged() signals continuously while
the slider is being moved; you can make it emit the signal less
- often by calling setTracking(FALSE). dialMoved() is emitted
- continuously even when tracking() is FALSE.
+ often by calling setTracking(false). dialMoved() is emitted
+ continuously even when tracking() is false.
The slider also emits dialPressed() and dialReleased() signals
when the mouse button is pressed and released. But note that the
@@ -152,9 +152,9 @@ TQDial::TQDial( TQWidget *parent, const char *name, WFlags f )
: TQWidget( parent, name, f | WNoAutoErase ), TQRangeControl()
{
d = new TQDialPrivate;
- d->eraseAreaValid = FALSE;
- d->showNotches = FALSE;
- d->onlyOutside = FALSE;
+ d->eraseAreaValid = false;
+ d->showNotches = false;
+ d->onlyOutside = false;
setFocusPolicy( TQWidget::WheelFocus );
}
@@ -175,9 +175,9 @@ TQDial::TQDial( int minValue, int maxValue, int pageStep, int value,
TQRangeControl( minValue, maxValue, 1, pageStep, value )
{
d = new TQDialPrivate;
- d->eraseAreaValid = FALSE;
- d->showNotches = FALSE;
- d->onlyOutside = FALSE;
+ d->eraseAreaValid = false;
+ d->showNotches = false;
+ d->onlyOutside = false;
setFocusPolicy( TQWidget::WheelFocus );
}
@@ -200,14 +200,14 @@ void TQDial::setTracking( bool enable )
\property TQDial::tracking
\brief whether tracking is enabled
- If TRUE (the default), tracking is enabled. This means that the
+ If true (the default), tracking is enabled. This means that the
arrow can be moved using the mouse; otherwise the arrow cannot be
moved with the mouse.
*/
bool TQDial::tracking() const
{
- return d ? d->tracking : TRUE;
+ return d ? d->tracking : true;
}
void TQDial::setValue( int newValue )
@@ -263,7 +263,7 @@ void TQDial::repaintScreen( const TQRect *cr )
TQPainter p;
p.begin( this );
- bool resetClipping = FALSE;
+ bool resetClipping = false;
// calculate clip-region for erasing background
if ( cr ) {
@@ -273,7 +273,7 @@ void TQDial::repaintScreen( const TQRect *cr )
double a;
reg = reg.subtract( calcArrow( a ) );
p.setClipRegion( reg );
- resetClipping = TRUE;
+ resetClipping = true;
}
TQRect br( calcDial() );
@@ -329,7 +329,7 @@ void TQDial::repaintScreen( const TQRect *cr )
TQPointArray arrow( calcArrow( a ) );
TQRect ea( arrow.boundingRect() );
d->eraseArea = ea;
- d->eraseAreaValid = TRUE;
+ d->eraseAreaValid = true;
p.setPen( NoPen );
p.setBrush( colorGroup().brush( TQColorGroup::Button ) );
@@ -368,7 +368,7 @@ void TQDial::repaintScreen( const TQRect *cr )
// draw focus rect around the dial
if ( hasFocus() ) {
- p.setClipping( FALSE );
+ p.setClipping( false );
br.setWidth( br.width() + 2 );
br.setHeight( br.height() + 2 );
if ( d->showNotches ) {
@@ -429,7 +429,7 @@ void TQDial::keyPressEvent( TQKeyEvent * e )
void TQDial::mousePressEvent( TQMouseEvent * e )
{
- d->mousePressed = TRUE;
+ d->mousePressed = true;
setValue( valueFromPoint( e->pos() ) );
emit dialPressed();
}
@@ -441,7 +441,7 @@ void TQDial::mousePressEvent( TQMouseEvent * e )
void TQDial::mouseReleaseEvent( TQMouseEvent * e )
{
- d->mousePressed = FALSE;
+ d->mousePressed = false;
setValue( valueFromPoint( e->pos() ) );
emit dialReleased();
}
@@ -457,10 +457,10 @@ void TQDial::mouseMoveEvent( TQMouseEvent * e )
return;
if ( !d->tracking || (e->state() & LeftButton) == 0 )
return;
- d->doNotEmit = TRUE;
+ d->doNotEmit = true;
setValue( valueFromPoint( e->pos() ) );
emit dialMoved( value() );
- d->doNotEmit = FALSE;
+ d->doNotEmit = false;
}
@@ -480,9 +480,9 @@ void TQDial::wheelEvent( TQWheelEvent *e )
void TQDial::focusInEvent( TQFocusEvent * )
{
- d->onlyOutside = TRUE;
+ d->onlyOutside = true;
repaintScreen();
- d->onlyOutside = FALSE;
+ d->onlyOutside = false;
}
@@ -492,9 +492,9 @@ void TQDial::focusInEvent( TQFocusEvent * )
void TQDial::focusOutEvent( TQFocusEvent * )
{
- d->onlyOutside = TRUE;
+ d->onlyOutside = true;
repaintScreen();
- d->onlyOutside = FALSE;
+ d->onlyOutside = false;
}
/*!
@@ -604,7 +604,7 @@ void TQDial::setWrapping( bool enable )
return;
d->lines.resize( 0 );
d->wrapping = enable;
- d->eraseAreaValid = FALSE;
+ d->eraseAreaValid = false;
repaintScreen();
}
@@ -613,11 +613,11 @@ void TQDial::setWrapping( bool enable )
\property TQDial::wrapping
\brief whether wrapping is enabled
- If TRUE, wrapping is enabled. This means that the arrow can be
+ If true, wrapping is enabled. This means that the arrow can be
turned around 360°. Otherwise there is some space at the bottom of
the dial which is skipped by the arrow.
- This property's default is FALSE.
+ This property's default is false.
*/
bool TQDial::wrapping() const
@@ -662,10 +662,10 @@ void TQDial::setNotchTarget( double target )
{
d->lines.resize( 0 );
d->target = target;
- d->eraseAreaValid = FALSE;
- d->onlyOutside = TRUE;
+ d->eraseAreaValid = false;
+ d->onlyOutside = true;
repaintScreen();
- d->onlyOutside = FALSE;
+ d->onlyOutside = false;
}
@@ -742,17 +742,17 @@ void TQDial::subtractPage()
void TQDial::setNotchesVisible( bool b )
{
d->showNotches = b;
- d->eraseAreaValid = FALSE;
- d->onlyOutside = TRUE;
+ d->eraseAreaValid = false;
+ d->onlyOutside = true;
repaintScreen();
- d->onlyOutside = FALSE;
+ d->onlyOutside = false;
}
/*!
\property TQDial::notchesVisible
\brief whether the notches are shown
- If TRUE, the notches are shown. If FALSE (the default) notches are
+ If true, the notches are shown. If false (the default) notches are
not shown.
*/
bool TQDial::notchesVisible() const
diff --git a/src/widgets/tqdialogbuttons.cpp b/src/widgets/tqdialogbuttons.cpp
index 0704cc0e0..8638dc0e3 100644
--- a/src/widgets/tqdialogbuttons.cpp
+++ b/src/widgets/tqdialogbuttons.cpp
@@ -88,7 +88,7 @@ TQDialogButtons::init(TQ_UINT32 buttons, Orientation orient)
buttons = None;
}
d = new TQDialogButtonsPrivate;
- d->questionMode = FALSE;
+ d->questionMode = false;
d->orient = orient;
d->def = (Button)style().styleHint(TQStyle::SH_DialogButtons_DefaultButton, this);
d->enabled = d->visible = buttons;
@@ -171,7 +171,7 @@ TQDialogButtons::addWidget(TQWidget *w)
lay = (TQBoxLayout*)d->custom->layout();
}
if(w->parent() != d->custom)
- w->reparent(d->custom, 0, TQPoint(0, 0), TRUE);
+ w->reparent(d->custom, 0, TQPoint(0, 0), true);
lay->addWidget(w);
}
diff --git a/src/widgets/tqdialogbuttons_p.h b/src/widgets/tqdialogbuttons_p.h
index a5667245f..f0c9225ee 100644
--- a/src/widgets/tqdialogbuttons_p.h
+++ b/src/widgets/tqdialogbuttons_p.h
@@ -55,7 +55,7 @@ TQDialogButtons : public TQWidget
public:
enum Button { None=0, Accept=0x01, Reject=0x02, Help=0x04, Apply=0x08, All=0x10, Abort=0x20, Retry=0x40, Ignore=0x80 };
#ifndef TQT_NO_DIALOG
- TQDialogButtons(TQDialog *parent, bool autoConnect = TRUE, TQ_UINT32 buttons = Accept | Reject,
+ TQDialogButtons(TQDialog *parent, bool autoConnect = true, TQ_UINT32 buttons = Accept | Reject,
Orientation orient = Horizontal, const char *name = NULL);
#endif // TQT_NO_DIALOG
TQDialogButtons(TQWidget *parent, TQ_UINT32 buttons = Accept | Reject,
@@ -68,8 +68,8 @@ public:
void setButtonEnabled(Button button, bool enabled);
bool isButtonEnabled(Button) const;
- inline void showButton(Button b) { setButtonVisible(b, TRUE) ; }
- inline void hideButton(Button b) { setButtonVisible(b, FALSE); }
+ inline void showButton(Button b) { setButtonVisible(b, true) ; }
+ inline void hideButton(Button b) { setButtonVisible(b, false); }
virtual void setButtonVisible(Button, bool visible);
bool isButtonVisible(Button) const;
TQ_UINT32 visibleButtons() const;
diff --git a/src/widgets/tqdockarea.cpp b/src/widgets/tqdockarea.cpp
index 9bb4d4a12..9a2e429cc 100644
--- a/src/widgets/tqdockarea.cpp
+++ b/src/widgets/tqdockarea.cpp
@@ -58,8 +58,6 @@ struct TQ_EXPORT DockData
DockData( TQDockWindow *dw, const TQRect &r ) : w( dw ), rect( r ) {}
TQDockWindow *w;
TQRect rect;
-
- TQ_DUMMY_COMPARISON_OPERATOR( DockData )
};
static int fix_x( TQDockWindow* w, int width = -1 ) {
@@ -151,7 +149,7 @@ bool TQDockAreaLayout::hasHeightForWidth() const
void TQDockAreaLayout::init()
{
- dirty = TRUE;
+ dirty = true;
cached_width = 0;
cached_height = 0;
cached_hfw = -1;
@@ -160,7 +158,7 @@ void TQDockAreaLayout::init()
void TQDockAreaLayout::invalidate()
{
- dirty = TRUE;
+ dirty = true;
cached_width = 0;
cached_height = 0;
}
@@ -225,12 +223,12 @@ static void set_geometry( TQDockWindow *w, int pos, int sectionpos, int extent,
w->setGeometry( sectionpos, pos, strut, extent );
}
-static int size_extent( const TQSize &s, TQt::Orientation o, bool swap = FALSE )
+static int size_extent( const TQSize &s, TQt::Orientation o, bool swap = false )
{
return o == TQt::Horizontal ? ( swap ? s.height() : s.width() ) : ( swap ? s.width() : s.height() );
}
-static int point_pos( const TQPoint &p, TQt::Orientation o, bool swap = FALSE )
+static int point_pos( const TQPoint &p, TQt::Orientation o, bool swap = false )
{
return o == TQt::Horizontal ? ( swap ? p.y() : p.x() ) : ( swap ? p.x() : p.y() );
}
@@ -322,7 +320,7 @@ int TQDockAreaLayout::layoutItems( const TQRect &rect, bool testonly )
if ( !dockWindows || !dockWindows->first() )
return 0;
- dirty = FALSE;
+ dirty = false;
// some corrections
TQRect r = rect;
@@ -410,7 +408,7 @@ int TQDockAreaLayout::layoutItems( const TQRect &rect, bool testonly )
lines.remove( lines.at( lines.count() - 1 ) );
it.toFirst();
- bool hadResizable = FALSE;
+ bool hadResizable = false;
while ( ( dw = it.current() ) != 0 ) {
++it;
if ( !dw->isVisibleTo( parentWidget ) )
@@ -429,7 +427,7 @@ int TQDockAreaLayout::heightForWidth( int w ) const
if ( cached_width != w ) {
TQDockAreaLayout * mthis = (TQDockAreaLayout*)this;
mthis->cached_width = w;
- int h = mthis->layoutItems( TQRect( 0, 0, w, 0 ), TRUE );
+ int h = mthis->layoutItems( TQRect( 0, 0, w, 0 ), true );
mthis->cached_hfw = h;
return h;
}
@@ -442,7 +440,7 @@ int TQDockAreaLayout::widthForHeight( int h ) const
if ( cached_height != h ) {
TQDockAreaLayout * mthis = (TQDockAreaLayout*)this;
mthis->cached_height = h;
- int w = mthis->layoutItems( TQRect( 0, 0, 0, h ), TRUE );
+ int w = mthis->layoutItems( TQRect( 0, 0, 0, h ), true );
mthis->cached_wfh = w;
return w;
}
@@ -580,7 +578,7 @@ TQDockArea::TQDockArea( Orientation o, HandlePosition h, TQWidget *parent, const
TQDockArea::~TQDockArea()
{
- dockWindows->setAutoDelete( TRUE );
+ dockWindows->setAutoDelete( true );
delete dockWindows;
dockWindows = 0;
}
@@ -599,7 +597,7 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, int index )
int dockWindowIndex = findDockWindow( w );
if ( dockWindowIndex == -1 ) {
dockWindow = w;
- dockWindow->reparent( this, TQPoint( 0, 0 ), TRUE );
+ dockWindow->reparent( this, TQPoint( 0, 0 ), true );
w->installEventFilter( this );
updateLayout();
setSizePolicy( TQSizePolicy( orientation() == Horizontal ? TQSizePolicy::Expanding : TQSizePolicy::Minimum,
@@ -607,7 +605,7 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, int index )
dockWindows->append( w );
} else {
if ( w->parent() != this )
- w->reparent( this, TQPoint( 0, 0 ), TRUE );
+ w->reparent( this, TQPoint( 0, 0 ), true );
if ( index == - 1 ) {
dockWindows->removeRef( w );
dockWindows->append( w );
@@ -625,8 +623,8 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, int index )
}
/*!
- Returns TRUE if the dock area contains the dock window \a w;
- otherwise returns FALSE. If \a index is not 0 it will be set as
+ Returns true if the dock area contains the dock window \a w;
+ otherwise returns false. If \a index is not 0 it will be set as
follows: if the dock area contains the dock window \a *index is
set to \a w's index position; otherwise \a *index is set to -1.
*/
@@ -666,12 +664,12 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
{
invalidateFixedSizes();
int mse = -10;
- bool hasResizable = FALSE;
+ bool hasResizable = false;
for ( TQDockWindow *dw = dockWindows->first(); dw; dw = dockWindows->next() ) {
if ( dw->isHidden() )
continue;
if ( dw->isResizeEnabled() )
- hasResizable = TRUE;
+ hasResizable = true;
if ( orientation() != TQt::Horizontal )
mse = TQMAX( TQMAX( dw->fixedExtent().width(), dw->width() ), mse );
else
@@ -688,23 +686,23 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
int dockWindowIndex = findDockWindow( w );
TQPtrList<TQDockWindow> lineStarts = layout->lineStarts();
TQValueList<TQRect> lines = layout->lineList();
- bool wasAloneInLine = FALSE;
+ bool wasAloneInLine = false;
TQPoint pos = mapFromGlobal( p );
TQRect lr = *lines.at( lineOf( dockWindowIndex ) );
if ( dockWindowIndex != -1 ) {
if ( lineStarts.find( w ) != -1 &&
( ( dockWindowIndex < (int)dockWindows->count() - 1 && lineStarts.find( dockWindows->at( dockWindowIndex + 1 ) ) != -1 ) ||
dockWindowIndex == (int)dockWindows->count() - 1 ) )
- wasAloneInLine = TRUE;
+ wasAloneInLine = true;
dockWindow = dockWindows->take( dockWindowIndex );
if ( !wasAloneInLine ) { // only do the pre-layout if the widget isn't the only one in its line
if ( lineStarts.findRef( dockWindow ) != -1 && dockWindowIndex < (int)dockWindows->count() )
- dockWindows->at( dockWindowIndex )->setNewLine( TRUE );
- layout->layoutItems( TQRect( 0, 0, width(), height() ), TRUE );
+ dockWindows->at( dockWindowIndex )->setNewLine( true );
+ layout->layoutItems( TQRect( 0, 0, width(), height() ), true );
}
} else {
dockWindow = w;
- dockWindow->reparent( this, TQPoint( 0, 0 ), TRUE );
+ dockWindow->reparent( this, TQPoint( 0, 0 ), true );
if ( swap )
dockWindow->resize( dockWindow->height(), dockWindow->width() );
w->installEventFilter( this );
@@ -733,39 +731,39 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
dockWindows->append( dockWindow );
} else {
int dockLine = -1;
- bool insertLine = FALSE;
+ bool insertLine = false;
int i = 0;
TQRect lineRect;
// find the line which we touched with the mouse
for ( TQValueList<TQRect>::Iterator it = lines.begin(); it != lines.end(); ++it, ++i ) {
- if ( point_pos( pos, orientation(), TRUE ) >= point_pos( (*it).topLeft(), orientation(), TRUE ) &&
- point_pos( pos, orientation(), TRUE ) <= point_pos( (*it).topLeft(), orientation(), TRUE ) +
- size_extent( (*it).size(), orientation(), TRUE ) ) {
+ if ( point_pos( pos, orientation(), true ) >= point_pos( (*it).topLeft(), orientation(), true ) &&
+ point_pos( pos, orientation(), true ) <= point_pos( (*it).topLeft(), orientation(), true ) +
+ size_extent( (*it).size(), orientation(), true ) ) {
dockLine = i;
lineRect = *it;
break;
}
}
if ( dockLine == -1 ) { // outside the dock...
- insertLine = TRUE;
- if ( point_pos( pos, orientation(), TRUE ) < 0 ) // insert as first line
+ insertLine = true;
+ if ( point_pos( pos, orientation(), true ) < 0 ) // insert as first line
dockLine = 0;
else
dockLine = (int)lines.count(); // insert after the last line ### size_t/int cast
} else { // inside the dock (we have found a dockLine)
- if ( point_pos( pos, orientation(), TRUE ) <
- point_pos( lineRect.topLeft(), orientation(), TRUE ) + 4 ) { // mouse was at the very beginning of the line
- insertLine = TRUE; // insert a new line before that with the docking widget
- } else if ( point_pos( pos, orientation(), TRUE ) >
- point_pos( lineRect.topLeft(), orientation(), TRUE ) +
- size_extent( lineRect.size(), orientation(), TRUE ) - 4 ) { // mouse was at the very and of the line
- insertLine = TRUE; // insert a line after that with the docking widget
+ if ( point_pos( pos, orientation(), true ) <
+ point_pos( lineRect.topLeft(), orientation(), true ) + 4 ) { // mouse was at the very beginning of the line
+ insertLine = true; // insert a new line before that with the docking widget
+ } else if ( point_pos( pos, orientation(), true ) >
+ point_pos( lineRect.topLeft(), orientation(), true ) +
+ size_extent( lineRect.size(), orientation(), true ) - 4 ) { // mouse was at the very and of the line
+ insertLine = true; // insert a line after that with the docking widget
dockLine++;
}
}
if ( !insertLine && wasAloneInLine && lr.contains( pos ) ) // if we are alone in a line and just moved in there, re-insert it
- insertLine = TRUE;
+ insertLine = true;
#if defined(TQDOCKAREA_DEBUG)
tqDebug( "insert in line %d, and insert that line: %d", dockLine, insertLine );
@@ -774,20 +772,20 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
TQDockWindow *dw = 0;
if ( dockLine >= (int)lines.count() ) { // insert after last line
dockWindows->append( dockWindow );
- dockWindow->setNewLine( TRUE );
+ dockWindow->setNewLine( true );
#if defined(TQDOCKAREA_DEBUG)
tqDebug( "insert at the end" );
#endif
} else if ( dockLine == 0 && insertLine ) { // insert before first line
dockWindows->insert( 0, dockWindow );
- dockWindows->at( 1 )->setNewLine( TRUE );
+ dockWindows->at( 1 )->setNewLine( true );
#if defined(TQDOCKAREA_DEBUG)
tqDebug( "insert at the begin" );
#endif
} else { // insert somewhere in between
// make sure each line start has a new line
for ( dw = lineStarts.first(); dw; dw = lineStarts.next() )
- dw->setNewLine( TRUE );
+ dw->setNewLine( true );
// find the index of the first widget in the search line
int searchLine = dockLine;
@@ -809,8 +807,8 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
#endif
if ( !insertLine ) { // if we insert the docking widget in the existing line
// find the index for the widget
- bool inc = TRUE;
- bool firstTime = TRUE;
+ bool inc = true;
+ bool firstTime = true;
for ( dw = dockWindows->current(); dw; dw = dockWindows->next() ) {
if ( orientation() == Horizontal )
dw->setFixedExtentWidth( -1 );
@@ -820,11 +818,11 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
break;
if ( point_pos( pos, orientation() ) <
point_pos( fix_pos( dw ), orientation() ) + size_extent( dw->size(), orientation() ) / 2 ) {
- inc = FALSE;
+ inc = false;
}
if ( inc )
index++;
- firstTime = FALSE;
+ firstTime = false;
}
#if defined(TQDOCKAREA_DEBUG)
tqDebug( "insert at index: %d", index );
@@ -837,12 +835,12 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
#if defined(TQDOCKAREA_DEBUG)
tqDebug( "get rid of the old newline and get me one" );
#endif
- dockWindows->at( index )->setNewLine( FALSE );
- dockWindow->setNewLine( TRUE );
+ dockWindows->at( index )->setNewLine( false );
+ dockWindow->setNewLine( true );
} else if ( wasAloneInLine && lr.contains( pos ) ) {
- dockWindow->setNewLine( TRUE );
+ dockWindow->setNewLine( true );
} else { // if we are somewhere in a line, get rid of the newline
- dockWindow->setNewLine( FALSE );
+ dockWindow->setNewLine( false );
}
} else { // insert in a new line, so make sure the dock widget and the widget which will be after it have a newline
#if defined(TQDOCKAREA_DEBUG)
@@ -854,12 +852,12 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
#endif
TQDockWindow* nldw = dockWindows->at( index );
if ( nldw )
- nldw->setNewLine( TRUE );
+ nldw->setNewLine( true );
}
#if defined(TQDOCKAREA_DEBUG)
tqDebug( "give me a newline" );
#endif
- dockWindow->setNewLine( TRUE );
+ dockWindow->setNewLine( true );
}
// finally insert the widget
dockWindows->insert( index, dockWindow );
@@ -880,8 +878,8 @@ void TQDockArea::moveDockWindow( TQDockWindow *w, const TQPoint &p, const TQRect
/*!
Removes the dock window \a w from the dock area. If \a
- makeFloating is TRUE, \a w gets floated, and if \a swap is TRUE,
- the orientation of \a w gets swapped. If \a fixNewLines is TRUE
+ makeFloating is true, \a w gets floated, and if \a swap is true,
+ the orientation of \a w gets swapped. If \a fixNewLines is true
(the default) newlines in the area will be fixed.
You should never need to call this function yourself. Use
@@ -899,10 +897,10 @@ void TQDockArea::removeDockWindow( TQDockWindow *w, bool makeFloating, bool swap
dockWindows->remove( i );
TQPtrList<TQDockWindow> lineStarts = layout->lineStarts();
if ( fixNewLines && lineStarts.findRef( dockWindow ) != -1 && i < (int)dockWindows->count() )
- dockWindows->at( i )->setNewLine( TRUE );
+ dockWindows->at( i )->setNewLine( true );
if ( makeFloating ) {
TQWidget *p = parentWidget() ? parentWidget() : topLevelWidget();
- dockWindow->reparent( p, WType_Dialog | WStyle_Customize | WStyle_NoBorder | WStyle_Tool, TQPoint( 0, 0 ), FALSE );
+ dockWindow->reparent( p, WType_Dialog | WStyle_Customize | WStyle_NoBorder | WStyle_Tool, TQPoint( 0, 0 ), false );
}
if ( swap )
dockWindow->resize( dockWindow->height(), dockWindow->width() );
@@ -932,11 +930,11 @@ bool TQDockArea::eventFilter( TQObject *o, TQEvent *e )
o->removeEventFilter( this );
TQApplication::sendEvent( o, e );
if ( ( (TQCloseEvent*)e )->isAccepted() )
- removeDockWindow( (TQDockWindow*)o, FALSE, FALSE );
- return TRUE;
+ removeDockWindow( (TQDockWindow*)o, false, false );
+ return true;
}
}
- return FALSE;
+ return false;
}
/*! \internal
@@ -984,8 +982,8 @@ TQPtrList<TQDockWindow> TQDockArea::dockWindowList() const
/*!
Lines up the dock windows in this dock area to minimize wasted
- space. If \a keepNewLines is TRUE, only space within lines is
- cleaned up. If \a keepNewLines is FALSE the number of lines might
+ space. If \a keepNewLines is true, only space within lines is
+ cleaned up. If \a keepNewLines is false the number of lines might
be changed.
*/
@@ -994,7 +992,7 @@ void TQDockArea::lineUp( bool keepNewLines )
for ( TQDockWindow *dw = dockWindows->first(); dw; dw = dockWindows->next() ) {
dw->setOffset( 0 );
if ( !keepNewLines )
- dw->setNewLine( FALSE );
+ dw->setNewLine( false );
}
layout->activate();
}
@@ -1027,7 +1025,7 @@ void TQDockArea::dockWindow( TQDockWindow *dockWindow, DockWindowData *data )
if ( !data )
return;
- dockWindow->reparent( this, TQPoint( 0, 0 ), FALSE );
+ dockWindow->reparent( this, TQPoint( 0, 0 ), false );
dockWindow->installEventFilter( this );
dockWindow->dockArea = this;
dockWindow->updateGui();
@@ -1043,7 +1041,7 @@ void TQDockArea::dockWindow( TQDockWindow *dockWindow, DockWindowData *data )
index = 0;
(void)dockWindows->at( index );
}
- bool firstTime = TRUE;
+ bool firstTime = true;
int offset = data->offset;
for ( TQDockWindow *dw = dockWindows->current(); dw; dw = dockWindows->next() ) {
if ( !firstTime && lineStarts.find( dw ) != -1 )
@@ -1052,14 +1050,14 @@ void TQDockArea::dockWindow( TQDockWindow *dockWindow, DockWindowData *data )
point_pos( fix_pos( dw ), orientation() ) + size_extent( dw->size(), orientation() ) / 2 )
break;
index++;
- firstTime = FALSE;
+ firstTime = false;
}
if ( index >= 0 && index < (int)dockWindows->count() &&
dockWindows->at( index )->newLine() && lineOf( index ) == data->line ) {
- dockWindows->at( index )->setNewLine( FALSE );
- dockWindow->setNewLine( TRUE );
+ dockWindows->at( index )->setNewLine( false );
+ dockWindow->setNewLine( true );
} else {
- dockWindow->setNewLine( FALSE );
+ dockWindow->setNewLine( false );
}
dockWindows->insert( index, dockWindow );
@@ -1076,8 +1074,8 @@ void TQDockArea::dockWindow( TQDockWindow *dockWindow, DockWindowData *data )
}
/*!
- Returns TRUE if dock window \a dw could be docked into the dock
- area; otherwise returns FALSE.
+ Returns true if dock window \a dw could be docked into the dock
+ area; otherwise returns false.
\sa setAcceptDockWindow()
*/
@@ -1085,25 +1083,25 @@ void TQDockArea::dockWindow( TQDockWindow *dockWindow, DockWindowData *data )
bool TQDockArea::isDockWindowAccepted( TQDockWindow *dw )
{
if ( !dw )
- return FALSE;
+ return false;
if ( forbiddenWidgets.findRef( dw ) != -1 )
- return FALSE;
+ return false;
TQMainWindow *mw = ::tqt_cast<TQMainWindow*>(parentWidget());
if ( !mw )
- return TRUE;
+ return true;
if ( !mw->hasDockWindow( dw ) )
- return FALSE;
+ return false;
if ( !mw->isDockEnabled( this ) )
- return FALSE;
+ return false;
if ( !mw->isDockEnabled( dw, this ) )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
/*!
- If \a accept is TRUE, dock window \a dw can be docked in the dock
- area. If \a accept is FALSE, dock window \a dw cannot be docked in
+ If \a accept is true, dock window \a dw can be docked in the dock
+ area. If \a accept is false, dock window \a dw cannot be docked in
the dock area.
\sa isDockWindowAccepted()
@@ -1208,17 +1206,17 @@ bool TQDockArea::isLastDockWindow( TQDockWindow *dw )
{
int i = dockWindows->find( dw );
if ( i == -1 || i >= (int)dockWindows->count() - 1 )
- return TRUE;
+ return true;
TQDockWindow *w = 0;
if ( ( w = dockWindows->at( ++i ) ) ) {
if ( orientation() == Horizontal && dw->y() < w->y() )
- return TRUE;
+ return true;
if ( orientation() == Vertical && dw->x() < w->x() )
- return TRUE;
+ return true;
} else {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
#ifndef TQT_NO_TEXTSTREAM
diff --git a/src/widgets/tqdockarea.h b/src/widgets/tqdockarea.h
index a0a319a45..ef92e0726 100644
--- a/src/widgets/tqdockarea.h
+++ b/src/widgets/tqdockarea.h
@@ -88,7 +88,7 @@ protected:
private:
void init();
- int layoutItems( const TQRect&, bool testonly = FALSE );
+ int layoutItems( const TQRect&, bool testonly = false );
TQt::Orientation orient;
bool dirty;
int cached_width, cached_height;
@@ -123,7 +123,7 @@ public:
~TQDockArea();
void moveDockWindow( TQDockWindow *w, const TQPoint &globalPos, const TQRect &rect, bool swap );
- void removeDockWindow( TQDockWindow *w, bool makeFloating, bool swap, bool fixNewLines = TRUE );
+ void removeDockWindow( TQDockWindow *w, bool makeFloating, bool swap, bool fixNewLines = true );
void moveDockWindow( TQDockWindow *w, int index = -1 );
bool hasDockWindow( TQDockWindow *w, int *index = 0 );
diff --git a/src/widgets/tqdockwindow.cpp b/src/widgets/tqdockwindow.cpp
index fa20b1745..a0d71ec8c 100644
--- a/src/widgets/tqdockwindow.cpp
+++ b/src/widgets/tqdockwindow.cpp
@@ -61,9 +61,9 @@
#define MAC_DRAG_HACK
#endif
#ifdef TQ_WS_MACX
-static bool default_opaque = TRUE;
+static bool default_opaque = true;
#else
-static bool default_opaque = FALSE;
+static bool default_opaque = false;
#endif
class TQDockWindowPrivate
@@ -103,7 +103,7 @@ private:
TQDockWindowResizeHandle::TQDockWindowResizeHandle( TQt::Orientation o, TQWidget *parent,
TQDockWindow *w, const char * )
- : TQWidget( parent, "qt_dockwidget_internal" ), mousePressed( FALSE ), unclippedPainter( 0 ), dockWindow( w )
+ : TQWidget( parent, "qt_dockwidget_internal" ), mousePressed( false ), unclippedPainter( 0 ), dockWindow( w )
{
setOrientation( o );
}
@@ -137,7 +137,7 @@ void TQDockWindowResizeHandle::mousePressEvent( TQMouseEvent *e )
if ( e->button() != LeftButton )
return;
e->accept();
- mousePressed = TRUE;
+ mousePressed = true;
if ( !dockWindow->opaqueMoving() )
startLineDraw();
lastPos = firstPos = e->globalPos();
@@ -185,7 +185,7 @@ void TQDockWindowResizeHandle::mouseMoveEvent( TQMouseEvent *e )
lastPos = e->globalPos();
if ( dockWindow->opaqueMoving() ) {
mouseReleaseEvent( e );
- mousePressed = TRUE;
+ mousePressed = true;
firstPos = e->globalPos();
}
if ( !dockWindow->opaqueMoving() )
@@ -237,7 +237,7 @@ void TQDockWindowResizeHandle::mouseReleaseEvent( TQMouseEvent *e )
}
TQApplication::postEvent( dockWindow->area(), new TQEvent( TQEvent::LayoutHint ) );
- mousePressed = FALSE;
+ mousePressed = false;
}
void TQDockWindowResizeHandle::paintEvent( TQPaintEvent * )
@@ -260,7 +260,7 @@ void TQDockWindowResizeHandle::startLineDraw()
int scr = TQApplication::desktop()->screenNumber( this );
TQWidget *paint_on = TQApplication::desktop()->screen( scr );
#endif
- unclippedPainter = new TQPainter( paint_on, TRUE );
+ unclippedPainter = new TQPainter( paint_on, true );
unclippedPainter->setPen( TQPen( gray, orientation() == Horizontal ? height() : width() ) );
unclippedPainter->setRasterOp( XorROP );
}
@@ -388,9 +388,9 @@ private:
TQDockWindowHandle::TQDockWindowHandle( TQDockWindow *dw )
: TQWidget( dw, "qt_dockwidget_internal", WNoAutoErase ), dockWindow( dw ),
- closeButton( 0 ), opaque( default_opaque ), mousePressed( FALSE )
+ closeButton( 0 ), opaque( default_opaque ), mousePressed( false )
{
- ctrlDown = FALSE;
+ ctrlDown = false;
timer = new TQTimer( this );
connect( timer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( minimize() ) );
#ifdef TQ_WS_WIN
@@ -422,7 +422,7 @@ void TQDockWindowHandle::keyPressEvent( TQKeyEvent *e )
if ( !mousePressed )
return;
if ( e->key() == Key_Control ) {
- ctrlDown = TRUE;
+ ctrlDown = true;
dockWindow->handleMove( mapFromGlobal(TQCursor::pos()) - offset, TQCursor::pos(), !opaque );
}
}
@@ -432,7 +432,7 @@ void TQDockWindowHandle::keyReleaseEvent( TQKeyEvent *e )
if ( !mousePressed )
return;
if ( e->key() == Key_Control ) {
- ctrlDown = FALSE;
+ ctrlDown = false;
dockWindow->handleMove( mapFromGlobal(TQCursor::pos()) - offset, TQCursor::pos(), !opaque );
}
}
@@ -448,8 +448,8 @@ void TQDockWindowHandle::mousePressEvent( TQMouseEvent *e )
if ( e->button() != LeftButton )
return;
e->accept();
- hadDblClick = FALSE;
- mousePressed = TRUE;
+ hadDblClick = false;
+ mousePressed = true;
offset = e->pos();
dockWindow->startRectDraw( mapToGlobal( e->pos() ), !opaque );
if ( !opaque )
@@ -468,24 +468,24 @@ void TQDockWindowHandle::mouseMoveEvent( TQMouseEvent *e )
void TQDockWindowHandle::mouseReleaseEvent( TQMouseEvent *e )
{
- ctrlDown = FALSE;
+ ctrlDown = false;
tqApp->removeEventFilter( dockWindow );
if ( oldFocus )
oldFocus->setFocus();
if ( !mousePressed )
return;
dockWindow->endRectDraw( !opaque );
- mousePressed = FALSE;
+ mousePressed = false;
#ifdef TQ_WS_MAC
releaseMouse();
#endif
if ( !hadDblClick && offset == e->pos() ) {
- timer->start( TQApplication::doubleClickInterval(), TRUE );
+ timer->start( TQApplication::doubleClickInterval(), true );
} else if ( !hadDblClick ) {
dockWindow->updatePosition( e->globalPos() );
}
if ( opaque )
- dockWindow->titleBar->mousePressed = FALSE;
+ dockWindow->titleBar->mousePressed = false;
}
void TQDockWindowHandle::minimize()
@@ -567,16 +567,16 @@ void TQDockWindowHandle::mouseDoubleClickEvent( TQMouseEvent *e )
e->accept();
timer->stop();
emit doubleClicked();
- hadDblClick = TRUE;
+ hadDblClick = true;
}
TQDockWindowTitleBar::TQDockWindowTitleBar( TQDockWindow *dw )
: TQTitleBar( 0, dw, "qt_dockwidget_internal" ), dockWindow( dw ),
- mousePressed( FALSE ), hadDblClick( FALSE ), opaque( default_opaque )
+ mousePressed( false ), hadDblClick( false ), opaque( default_opaque )
{
setWFlags( getWFlags() | WStyle_Tool );
- ctrlDown = FALSE;
- setMouseTracking( TRUE );
+ ctrlDown = false;
+ setMouseTracking( true );
setFixedHeight( style().pixelMetric( TQStyle::PM_TitleBarHeight, this ) );
connect( this, TQ_SIGNAL(doClose()), dockWindow, TQ_SLOT(hide()) );
}
@@ -586,7 +586,7 @@ void TQDockWindowTitleBar::keyPressEvent( TQKeyEvent *e )
if ( !mousePressed )
return;
if ( e->key() == Key_Control ) {
- ctrlDown = TRUE;
+ ctrlDown = true;
dockWindow->handleMove( mapFromGlobal( TQCursor::pos() ) - offset, TQCursor::pos(), !opaque );
}
}
@@ -596,7 +596,7 @@ void TQDockWindowTitleBar::keyReleaseEvent( TQKeyEvent *e )
if ( !mousePressed )
return;
if ( e->key() == Key_Control ) {
- ctrlDown = FALSE;
+ ctrlDown = false;
dockWindow->handleMove( mapFromGlobal( TQCursor::pos() ) - offset, TQCursor::pos(), !opaque );
}
}
@@ -625,8 +625,8 @@ void TQDockWindowTitleBar::mousePressEvent( TQMouseEvent *e )
e->accept();
bool oldPressed = mousePressed;
- mousePressed = TRUE;
- hadDblClick = FALSE;
+ mousePressed = true;
+ hadDblClick = false;
offset = e->pos();
dockWindow->startRectDraw( mapToGlobal( e->pos() ), !opaque );
// grabMouse resets the Windows mouse press count, so we never receive a double click on Windows
@@ -658,7 +658,7 @@ void TQDockWindowTitleBar::mouseReleaseEvent( TQMouseEvent *e )
return;
}
- ctrlDown = FALSE;
+ ctrlDown = false;
tqApp->removeEventFilter( dockWindow );
if ( oldFocus )
oldFocus->setFocus();
@@ -671,12 +671,12 @@ void TQDockWindowTitleBar::mouseReleaseEvent( TQMouseEvent *e )
if ( !mousePressed )
return;
dockWindow->endRectDraw( !opaque );
- mousePressed = FALSE;
+ mousePressed = false;
if ( !hadDblClick )
dockWindow->updatePosition( e->globalPos() );
if ( opaque ) {
- dockWindow->horHandle->mousePressed = FALSE;
- dockWindow->verHandle->mousePressed = FALSE;
+ dockWindow->horHandle->mousePressed = false;
+ dockWindow->verHandle->mousePressed = false;
}
}
@@ -698,7 +698,7 @@ void TQDockWindowTitleBar::updateGui()
void TQDockWindowTitleBar::mouseDoubleClickEvent( TQMouseEvent * )
{
emit doubleClicked();
- hadDblClick = TRUE;
+ hadDblClick = true;
}
/*!
@@ -876,7 +876,7 @@ void TQDockWindowTitleBar::mouseDoubleClickEvent( TQMouseEvent * )
\fn void TQDockWindow::visibilityChanged( bool visible )
This signal is emitted when the visibility of the dock window
- relatively to its dock area is changed. If \a visible is TRUE, the
+ relatively to its dock area is changed. If \a visible is true, the
TQDockWindow is now visible to the dock area, otherwise it has been
hidden.
@@ -914,7 +914,7 @@ TQDockWindow::TQDockWindow( TQWidget* parent, const char* name, WFlags f )
: TQFrame( parent, name, f | WType_Dialog | WStyle_Customize | WStyle_NoBorder )
{
curPlace = InDock;
- isToolbar = FALSE;
+ isToolbar = false;
init();
}
@@ -939,7 +939,7 @@ TQDockWindow::TQDockWindow( Place p, TQWidget *parent, const char *name, WFlags
: TQFrame( parent, name, f | WType_Dialog | WStyle_Customize | WStyle_NoBorder )
{
curPlace = p;
- isToolbar = FALSE;
+ isToolbar = false;
init();
}
@@ -972,9 +972,9 @@ void TQDockWindow::init()
unclippedPainter = 0;
dockArea = 0;
tmpDockArea = 0;
- resizeEnabled = FALSE;
- moveEnabled = TRUE;
- nl = FALSE;
+ resizeEnabled = false;
+ moveEnabled = true;
+ nl = false;
opaque = default_opaque;
cMode = Never;
offs = 0;
@@ -984,7 +984,7 @@ void TQDockWindow::init()
lastSize = TQSize( -1, -1 );
widgetResizeHandler = new TQWidgetResizeHandler( this );
- widgetResizeHandler->setMovingEnabled( FALSE );
+ widgetResizeHandler->setMovingEnabled( false );
titleBar = new TQDockWindowTitleBar( this );
verHandle = new TQDockWindowHandle( this );
@@ -1059,8 +1059,8 @@ void TQDockWindow::init()
}
updateGui();
- stretchable[ Horizontal ] = FALSE;
- stretchable[ Vertical ] = FALSE;
+ stretchable[ Horizontal ] = false;
+ stretchable[ Vertical ] = false;
connect( titleBar, TQ_SIGNAL( doubleClicked() ), this, TQ_SLOT( dock() ) );
connect( verHandle, TQ_SIGNAL( doubleClicked() ), this, TQ_SLOT( undock() ) );
@@ -1119,7 +1119,7 @@ TQDockWindow::~TQDockWindow()
{
tqApp->removeEventFilter( this );
if ( area() )
- area()->removeDockWindow( this, FALSE, FALSE );
+ area()->removeDockWindow( this, false, false );
TQDockArea *a = area();
if ( !a && dockWindowData )
a = ( (TQDockArea::DockWindowData*)dockWindowData )->area;
@@ -1158,7 +1158,7 @@ void TQDockWindow::swapRect( TQRect &r, TQt::Orientation o, const TQPoint &offse
TQWidget *TQDockWindow::areaAt( const TQPoint &gp )
{
- TQWidget *w = tqApp->widgetAt( gp, TRUE );
+ TQWidget *w = tqApp->widgetAt( gp, true );
if ( w && ( w == this || w == titleBar ) && parentWidget() )
w = parentWidget()->childAt( parentWidget()->mapFromGlobal( gp ) );
@@ -1175,7 +1175,7 @@ TQWidget *TQDockWindow::areaAt( const TQPoint &gp )
if ( a && a->isDockWindowAccepted( this ) )
return a;
}
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
return 0;
}
@@ -1273,8 +1273,8 @@ void TQDockWindow::updateGui()
verHandle->hide();
#ifdef TQ_WS_MAC
if(horHandle->mousePressed) {
- horHandle->mousePressed = FALSE;
- verHandle->mousePressed = TRUE;
+ horHandle->mousePressed = false;
+ verHandle->mousePressed = true;
verHandle->grabMouse();
}
#endif
@@ -1287,8 +1287,8 @@ void TQDockWindow::updateGui()
horHandle->updateGui();
#ifdef TQ_WS_MAC
if(verHandle->mousePressed) {
- verHandle->mousePressed = FALSE;
- horHandle->mousePressed = TRUE;
+ verHandle->mousePressed = false;
+ horHandle->mousePressed = true;
horHandle->grabMouse();
}
#endif
@@ -1350,7 +1350,7 @@ void TQDockWindow::updateGui()
#else
hbox->setMargin( 2 );
#endif
- widgetResizeHandler->setActive( FALSE );
+ widgetResizeHandler->setActive( false );
}
}
@@ -1360,10 +1360,10 @@ void TQDockWindow::updatePosition( const TQPoint &globalPos )
lastSize = size();
bool doAdjustSize = curPlace != state && state == OutsideDock;
- bool doUpdate = TRUE;
- bool doOrientationChange = TRUE;
+ bool doUpdate = true;
+ bool doOrientationChange = true;
if ( state != curPlace && state == InDock ) {
- doUpdate = FALSE;
+ doUpdate = false;
curPlace = state;
updateGui();
TQApplication::sendPostedEvents();
@@ -1372,22 +1372,22 @@ void TQDockWindow::updatePosition( const TQPoint &globalPos )
if ( state == InDock ) {
if ( tmpDockArea ) {
- bool differentDocks = FALSE;
+ bool differentDocks = false;
if ( dockArea && dockArea != tmpDockArea ) {
- differentDocks = TRUE;
+ differentDocks = true;
delete (TQDockArea::DockWindowData*)dockWindowData;
dockWindowData = dockArea->dockWindowData( this );
- dockArea->removeDockWindow( this, FALSE, FALSE );
+ dockArea->removeDockWindow( this, false, false );
}
dockArea = tmpDockArea;
if ( differentDocks ) {
if ( doUpdate ) {
- doUpdate = FALSE;
+ doUpdate = false;
curPlace = state;
updateGui();
}
emit orientationChanged( tmpDockArea->orientation() );
- doOrientationChange = FALSE;
+ doOrientationChange = false;
} else {
updateGui();
}
@@ -1402,7 +1402,7 @@ void TQDockWindow::updatePosition( const TQPoint &globalPos )
return;
delete (TQDockArea::DockWindowData*)dockWindowData;
dockWindowData = dockArea->dockWindowData( this );
- dockArea->removeDockWindow( this, TRUE,
+ dockArea->removeDockWindow( this, true,
startOrientation != Horizontal && ::tqt_cast<TQToolBar*>(this) );
}
dockArea = 0;
@@ -1479,7 +1479,7 @@ void TQDockWindow::startRectDraw( const TQPoint &so, bool drawRect )
int scr = TQApplication::desktop()->screenNumber( this );
TQWidget *paint_on = TQApplication::desktop()->screen( scr );
#endif
- unclippedPainter = new TQPainter( paint_on, TRUE );
+ unclippedPainter = new TQPainter( paint_on, true );
unclippedPainter->setPen( TQPen( gray, curPlace == OutsideDock ? 3 : 1 ) );
unclippedPainter->setRasterOp( XorROP );
currRect = TQRect( realWidgetPos( this ), size() );
@@ -1549,9 +1549,9 @@ void TQDockWindow::drawContents( TQPainter *p )
when floating.
A dock window is both horizontally and vertically stretchable if
- you call setResizeEnabled(TRUE).
+ you call setResizeEnabled(true).
- This property is FALSE by default.
+ This property is false by default.
\sa setVerticallyStretchable() setHorizontallyStretchable()
*/
@@ -1569,7 +1569,7 @@ void TQDockWindow::setResizeEnabled( bool b )
area, move the dock window to another dock area, or float the dock
window.
- This property is TRUE by default.
+ This property is true by default.
*/
void TQDockWindow::setMovingEnabled( bool b )
@@ -1611,8 +1611,8 @@ void TQDockWindow::setCloseMode( int m )
}
/*!
- Returns TRUE if the dock window has a close button; otherwise
- returns FALSE. The result depends on the dock window's \l Place
+ Returns true if the dock window has a close button; otherwise
+ returns false. The result depends on the dock window's \l Place
and its \l CloseMode.
\sa setCloseMode()
@@ -1634,11 +1634,11 @@ int TQDockWindow::closeMode() const
\brief whether the dock window is horizontally stretchable.
A dock window is horizontally stretchable if you call
- setHorizontallyStretchable(TRUE) or setResizeEnabled(TRUE).
+ setHorizontallyStretchable(true) or setResizeEnabled(true).
\sa setResizeEnabled()
- \bug Strecthability is broken. You must call setResizeEnabled(TRUE) to get
+ \bug Strecthability is broken. You must call setResizeEnabled(true) to get
proper behavior and even then TQDockWindow does not limit stretchablilty.
*/
@@ -1652,11 +1652,11 @@ void TQDockWindow::setHorizontallyStretchable( bool b )
\brief whether the dock window is vertically stretchable.
A dock window is vertically stretchable if you call
- setVerticallyStretchable(TRUE) or setResizeEnabled(TRUE).
+ setVerticallyStretchable(true) or setResizeEnabled(true).
\sa setResizeEnabled()
- \bug Strecthability is broken. You must call setResizeEnabled(TRUE) to get
+ \bug Strecthability is broken. You must call setResizeEnabled(true) to get
proper behavior and even then TQDockWindow does not limit stretchablilty.
*/
@@ -1685,7 +1685,7 @@ bool TQDockWindow::isVerticallyStretchable() const
\sa setResizeEnabled()
- \bug Strecthability is broken. You must call setResizeEnabled(TRUE) to get
+ \bug Strecthability is broken. You must call setResizeEnabled(true) to get
proper behavior and even then TQDockWindow does not limit stretchablilty.
*/
@@ -1771,7 +1771,7 @@ void TQDockWindow::setFixedExtentHeight( int h )
\brief whether the dock window prefers to start a new line in the
dock area.
- The default is FALSE, i.e. the dock window doesn't require a new
+ The default is false, i.e. the dock window doesn't require a new
line in the dock area.
*/
@@ -1873,7 +1873,7 @@ void TQDockWindow::undock( TQWidget *w )
if ( dockArea ) {
delete (TQDockArea::DockWindowData*)dockWindowData;
dockWindowData = dockArea->dockWindowData( this );
- dockArea->removeDockWindow( this, TRUE, orientation() != Horizontal && ::tqt_cast<TQToolBar*>(this) );
+ dockArea->removeDockWindow( this, true, orientation() != Horizontal && ::tqt_cast<TQToolBar*>(this) );
}
dockArea = 0;
if ( lastPos != TQPoint( -1, -1 ) && lastPos.x() > 0 && lastPos.y() > 0 )
@@ -1895,7 +1895,7 @@ void TQDockWindow::undock( TQWidget *w )
show();
}
} else {
- reparent( w, 0, TQPoint( 0, 0 ), FALSE );
+ reparent( w, 0, TQPoint( 0, 0 ), false );
move( -width() - 5, -height() - 5 );
resize( 1, 1 );
show();
@@ -1919,7 +1919,7 @@ void TQDockWindow::undock( TQWidget *w )
void TQDockWindow::removeFromDock( bool fixNewLines )
{
if ( dockArea )
- dockArea->removeDockWindow( this, FALSE, FALSE, fixNewLines );
+ dockArea->removeDockWindow( this, false, false, fixNewLines );
}
/*!
@@ -1984,7 +1984,7 @@ void TQDockWindow::showEvent( TQShowEvent *e )
\brief whether the dock window will be shown normally whilst it is
being moved.
- If this property is FALSE, (the default), the dock window will be
+ If this property is false, (the default), the dock window will be
represented by an outline rectangle whilst it is being moved.
\warning Currently opaque moving has some problems and we do not
@@ -2048,7 +2048,7 @@ void TQDockWindow::updateSplitterVisibility( bool visible )
bool TQDockWindow::eventFilter( TQObject * o, TQEvent *e )
{
if ( !o->isWidgetType() )
- return FALSE;
+ return false;
if ( e->type() == TQEvent::KeyPress &&
( horHandle->mousePressed ||
@@ -2058,17 +2058,17 @@ bool TQDockWindow::eventFilter( TQObject * o, TQEvent *e )
if ( ke->key() == Key_Escape ) {
horHandle->mousePressed =
verHandle->mousePressed =
- titleBar->mousePressed = FALSE;
+ titleBar->mousePressed = false;
endRectDraw( !opaque );
tqApp->removeEventFilter( this );
- return TRUE;
+ return true;
}
} else if ( ((TQWidget*)o)->topLevelWidget() != this && place() == OutsideDock && isTopLevel() ) {
if ( (e->type() == TQEvent::WindowDeactivate ||
e->type() == TQEvent::WindowActivate ) )
event( e );
}
- return FALSE;
+ return false;
}
/*! \reimp */
@@ -2078,19 +2078,19 @@ bool TQDockWindow::event( TQEvent *e )
case TQEvent::WindowDeactivate:
if ( place() == OutsideDock && isTopLevel() && parentWidget()
&& parentWidget()->isActiveWindow() )
- return TRUE;
+ return true;
case TQEvent::Hide:
if ( !isHidden() )
break;
// fall through
case TQEvent::HideToParent:
- emit visibilityChanged( FALSE );
+ emit visibilityChanged( false );
break;
case TQEvent::Show:
if ( e->spontaneous() )
break;
case TQEvent::ShowToParent:
- emit visibilityChanged( TRUE );
+ emit visibilityChanged( true );
break;
default:
break;
diff --git a/src/widgets/tqdockwindow.h b/src/widgets/tqdockwindow.h
index 896b8709f..4b1247f6b 100644
--- a/src/widgets/tqdockwindow.h
+++ b/src/widgets/tqdockwindow.h
@@ -184,7 +184,7 @@ private:
void endRectDraw( bool drawRect );
void updatePosition( const TQPoint &globalPos );
TQWidget *areaAt( const TQPoint &gp );
- void removeFromDock( bool fixNewLines = TRUE );
+ void removeFromDock( bool fixNewLines = true );
void swapRect( TQRect &r, TQt::Orientation o, const TQPoint &offset, TQDockArea *area );
void init();
diff --git a/src/widgets/tqeffects.cpp b/src/widgets/tqeffects.cpp
index 0ff1b11d4..c249c8f2f 100644
--- a/src/widgets/tqeffects.cpp
+++ b/src/widgets/tqeffects.cpp
@@ -110,7 +110,7 @@ TQAlphaWidget::TQAlphaWidget( TQWidget* w, WFlags f )
"qt internal alpha effect widget", f )
{
#if 1 //ndef TQ_WS_WIN
- setEnabled( FALSE );
+ setEnabled( false );
#endif
pm.setOptimization( TQPixmap::BestOptim );
@@ -144,7 +144,7 @@ void TQAlphaWidget::run( int time )
elapsed = 0;
checkTime.start();
- showWidget = TRUE;
+ showWidget = true;
tqApp->installEventFilter( this );
widget->setWState( WState_Visible );
@@ -164,7 +164,7 @@ void TQAlphaWidget::run( int time )
mixed = back.copy();
pm = mixed;
show();
- setEnabled(FALSE);
+ setEnabled(false);
connect( &anim, TQ_SIGNAL(timeout()), this, TQ_SLOT(render()));
anim.start( 1 );
@@ -196,15 +196,15 @@ bool TQAlphaWidget::eventFilter( TQObject* o, TQEvent* e )
break;
#endif
case TQEvent::MouseButtonDblClick:
- setEnabled(TRUE);
- showWidget = FALSE;
+ setEnabled(true);
+ showWidget = false;
render();
break;
case TQEvent::KeyPress:
{
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Escape )
- showWidget = FALSE;
+ showWidget = false;
else
duration = 0;
render();
@@ -225,7 +225,7 @@ void TQAlphaWidget::closeEvent( TQCloseEvent *e )
if ( !q_blend )
return;
- showWidget = FALSE;
+ showWidget = false;
render();
TQWidget::closeEvent( e );
@@ -256,7 +256,7 @@ void TQAlphaWidget::render()
if ( widget ) {
if ( !showWidget ) {
#ifdef TQ_WS_WIN
- setEnabled(TRUE);
+ setEnabled(true);
setFocus();
#endif
widget->hide();
@@ -292,7 +292,7 @@ void TQAlphaWidget::render()
widget->clearWState( WState_ForceHide );
alphaBlend();
pm = mixed;
- repaint( FALSE );
+ repaint( false );
}
}
@@ -382,7 +382,7 @@ TQRollEffect::TQRollEffect( TQWidget* w, WFlags f, DirFlags orient )
"qt internal roll effect widget", f ), orientation(orient)
{
#if 1 //ndef TQ_WS_WIN
- setEnabled( FALSE );
+ setEnabled( false );
#endif
widget = (TQAccessWidget*) w;
Q_ASSERT( widget );
@@ -418,7 +418,7 @@ void TQRollEffect::paintEvent( TQPaintEvent* )
int y = orientation & DownScroll ? TQMIN(0, currentHeight - totalHeight) : 0;
bitBlt( this, x, y, &pm,
- 0, 0, pm.width(), pm.height(), CopyROP, TRUE );
+ 0, 0, pm.width(), pm.height(), CopyROP, true );
}
/*
@@ -437,9 +437,9 @@ bool TQRollEffect::eventFilter( TQObject* o, TQEvent* e )
case TQEvent::Close:
if ( o != widget || done )
break;
- setEnabled(TRUE);
- showWidget = FALSE;
- done = TRUE;
+ setEnabled(true);
+ showWidget = false;
+ done = true;
scroll();
break;
case TQEvent::MouseButtonPress:
@@ -450,17 +450,17 @@ bool TQRollEffect::eventFilter( TQObject* o, TQEvent* e )
case TQEvent::MouseButtonDblClick:
if ( done )
break;
- setEnabled(TRUE);
- showWidget = FALSE;
- done = TRUE;
+ setEnabled(true);
+ showWidget = false;
+ done = true;
scroll();
break;
case TQEvent::KeyPress:
{
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Escape )
- showWidget = FALSE;
- done = TRUE;
+ showWidget = false;
+ done = true;
scroll();
break;
}
@@ -479,8 +479,8 @@ void TQRollEffect::closeEvent( TQCloseEvent *e )
if ( done )
return;
- showWidget = FALSE;
- done = TRUE;
+ showWidget = false;
+ done = true;
scroll();
TQWidget::closeEvent( e );
@@ -517,12 +517,12 @@ void TQRollEffect::run( int time )
resize( TQMIN( currentWidth, totalWidth ), TQMIN( currentHeight, totalHeight ) );
show();
- setEnabled(FALSE);
+ setEnabled(false);
tqApp->installEventFilter( this );
- showWidget = TRUE;
- done = FALSE;
+ showWidget = true;
+ done = false;
anim.start( 1 );
checkTime.start();
}
@@ -567,7 +567,7 @@ void TQRollEffect::scroll()
if ( orientation & DownScroll || orientation & UpScroll )
h = TQMIN( currentHeight, totalHeight );
- setUpdatesEnabled( FALSE );
+ setUpdatesEnabled( false );
if ( orientation & UpScroll )
y = widget->geometry().y() + TQMAX( 0, totalHeight - currentHeight );
if ( orientation & LeftScroll )
@@ -576,8 +576,8 @@ void TQRollEffect::scroll()
move( x, y );
resize( w, h );
- setUpdatesEnabled( TRUE );
- repaint( FALSE );
+ setUpdatesEnabled( true );
+ repaint( false );
}
if ( done ) {
anim.stop();
@@ -585,7 +585,7 @@ void TQRollEffect::scroll()
if ( widget ) {
if ( !showWidget ) {
#ifdef TQ_WS_WIN
- setEnabled(TRUE);
+ setEnabled(true);
setFocus();
#endif
widget->hide();
diff --git a/src/widgets/tqframe.cpp b/src/widgets/tqframe.cpp
index e6f5f80bc..afe2d992c 100644
--- a/src/widgets/tqframe.cpp
+++ b/src/widgets/tqframe.cpp
@@ -246,7 +246,7 @@ void TQFrame::setFrameStyle( int style )
clearWState( WState_OwnSizePolicy );
}
fstyle = (short)style;
- updateFrameWidth( TRUE );
+ updateFrameWidth( true );
}
/*!
@@ -747,7 +747,7 @@ void TQFrame::frameChanged()
*/
void TQFrame::styleChange( TQStyle& old )
{
- updateFrameWidth( TRUE );
+ updateFrameWidth( true );
TQWidget::styleChange( old );
}
diff --git a/src/widgets/tqframe.h b/src/widgets/tqframe.h
index db565f474..19901013f 100644
--- a/src/widgets/tqframe.h
+++ b/src/widgets/tqframe.h
@@ -70,7 +70,7 @@ public:
TQRect contentsRect() const;
#ifndef Q_QDOC
- bool lineShapesOk() const { return TRUE; }
+ bool lineShapesOk() const { return true; }
#endif
TQSize sizeHint() const;
@@ -121,7 +121,7 @@ protected:
void styleChange( TQStyle& );
private:
- void updateFrameWidth(bool=FALSE);
+ void updateFrameWidth(bool=false);
TQRect frect;
int fstyle;
short lwidth;
diff --git a/src/widgets/tqgrid.cpp b/src/widgets/tqgrid.cpp
index 19e7e2964..51c3b6266 100644
--- a/src/widgets/tqgrid.cpp
+++ b/src/widgets/tqgrid.cpp
@@ -85,7 +85,7 @@ TQGrid::TQGrid( int n, Orientation orient, TQWidget *parent, const char *name,
nRows = n;
}
lay = new TQGridLayout( this, nRows, nCols, 0, 0, name );
- lay->setAutoAdd( TRUE );
+ lay->setAutoAdd( true );
}
@@ -99,7 +99,7 @@ TQGrid::TQGrid( int n, TQWidget *parent, const char *name, WFlags f )
: TQFrame( parent, name, f )
{
lay = new TQGridLayout( this, -1, n, 0, 0, name );
- lay->setAutoAdd( TRUE );
+ lay->setAutoAdd( true );
}
diff --git a/src/widgets/tqgridview.cpp b/src/widgets/tqgridview.cpp
index 7598ffb26..182fe2665 100644
--- a/src/widgets/tqgridview.cpp
+++ b/src/widgets/tqgridview.cpp
@@ -188,7 +188,7 @@ TQRect TQGridView::cellGeometry( int row, int column )
/*!
Repaints cell (\a row, \a column).
- If \a erase is TRUE, TQt erases the area of the cell before the
+ If \a erase is true, TQt erases the area of the cell before the
paintCell() call; otherwise no erasing takes place.
\sa TQWidget::repaint()
@@ -343,7 +343,7 @@ void TQGridView::dimensionChange( int, int ) {}
\code
p->setClipRect( cellRect(), TQPainter::CoordPainter );
//... your drawing code
- p->setClipping( FALSE );
+ p->setClipping( false );
\endcode
*/
diff --git a/src/widgets/tqgridview.h b/src/widgets/tqgridview.h
index 1ec47a823..bb18ee508 100644
--- a/src/widgets/tqgridview.h
+++ b/src/widgets/tqgridview.h
@@ -78,7 +78,7 @@ public:
int rowAt( int y ) const;
int columnAt( int x ) const;
- void repaintCell( int row, int column, bool erase=TRUE );
+ void repaintCell( int row, int column, bool erase=true );
void updateCell( int row, int column );
void ensureCellVisible( int row, int column );
diff --git a/src/widgets/tqgroupbox.cpp b/src/widgets/tqgroupbox.cpp
index b969f18ac..845c689ad 100644
--- a/src/widgets/tqgroupbox.cpp
+++ b/src/widgets/tqgroupbox.cpp
@@ -199,7 +199,7 @@ void TQGroupBox::init()
dir = Horizontal;
marg = 11;
spac = 5;
- bFlat = FALSE;
+ bFlat = false;
}
void TQGroupBox::setTextSpacer()
@@ -384,7 +384,7 @@ void TQGroupBox::paintEvent( TQPaintEvent *event )
TQPoint p1( fr.x(), fr.y() + 1 );
TQPoint p2( fr.x() + fr.width(), p1.y() );
// ### This should probably be a style primitive.
- qDrawShadeLine( &paint, p1, p2, colorGroup(), TRUE,
+ qDrawShadeLine( &paint, p1, p2, colorGroup(), true,
lineWidth(), midLineWidth() );
} else {
drawFrame(&paint);
@@ -611,10 +611,10 @@ void TQGroupBox::childEvent( TQChildEvent *c )
return;
if ( d->checkbox->isChecked() ) {
if ( !w->testWState( WState_ForceDisabled ) )
- w->setEnabled( TRUE );
+ w->setEnabled( true );
} else {
if ( w->isEnabled() ) {
- w->setEnabled( FALSE );
+ w->setEnabled( false );
((TQGroupBox*)w)->clearWState( WState_ForceDisabled );
}
}
@@ -825,7 +825,7 @@ void TQGroupBox::setFlat( bool b )
\property TQGroupBox::checkable
\brief Whether the group box has a checkbox in its title.
- If this property is TRUE, the group box has a checkbox. If the
+ If this property is true, the group box has a checkbox. If the
checkbox is checked (which is the default), the group box's
children are enabled.
@@ -844,8 +844,8 @@ void TQGroupBox::setCheckable( bool b )
d->checkbox = new TQCheckBox( title(), this, "qt_groupbox_checkbox" );
if (TQButtonGroup *meAsButtonGroup = ::tqt_cast<TQButtonGroup*>(this))
meAsButtonGroup->remove(d->checkbox);
- setChecked( TRUE );
- setChildrenEnabled( TRUE );
+ setChecked( true );
+ setChildrenEnabled( true );
connect( d->checkbox, TQ_SIGNAL( toggled(bool) ),
this, TQ_SLOT( setChildrenEnabled(bool) ) );
connect( d->checkbox, TQ_SIGNAL( toggled(bool) ),
@@ -854,7 +854,7 @@ void TQGroupBox::setCheckable( bool b )
}
d->checkbox->show();
} else {
- setChildrenEnabled( TRUE );
+ setChildrenEnabled( true );
delete d->checkbox;
d->checkbox = 0;
}
@@ -869,7 +869,7 @@ bool TQGroupBox::isCheckable() const
#ifndef TQT_NO_CHECKBOX
return ( d->checkbox != 0 );
#else
- return FALSE;
+ return false;
#endif
}
@@ -879,7 +879,7 @@ bool TQGroupBox::isChecked() const
#ifndef TQT_NO_CHECKBOX
return d->checkbox && d->checkbox->isChecked();
#else
- return FALSE;
+ return false;
#endif
}
@@ -888,8 +888,8 @@ bool TQGroupBox::isChecked() const
\fn void TQGroupBox::toggled( bool on )
If the group box has a check box (see \l isCheckable()) this signal
- is emitted when the check box is toggled. \a on is TRUE if the check
- box is checked; otherwise it is FALSE.
+ is emitted when the check box is toggled. \a on is true if the check
+ box is checked; otherwise it is false.
*/
/*!
@@ -929,10 +929,10 @@ void TQGroupBox::setChildrenEnabled( bool b )
TQWidget *w = (TQWidget*)o;
if ( b ) {
if ( !w->testWState( WState_ForceDisabled ) )
- w->setEnabled( TRUE );
+ w->setEnabled( true );
} else {
if ( w->isEnabled() ) {
- w->setEnabled( FALSE );
+ w->setEnabled( false );
((TQGroupBox*)w)->clearWState( WState_ForceDisabled );
}
}
@@ -950,7 +950,7 @@ void TQGroupBox::setEnabled(bool on)
#ifndef TQT_NO_CHECKBOX
// we are being enabled - disable children
if ( !d->checkbox->isChecked() )
- setChildrenEnabled( FALSE );
+ setChildrenEnabled( false );
#endif
}
diff --git a/src/widgets/tqhbox.cpp b/src/widgets/tqhbox.cpp
index cb0e0281c..d82500044 100644
--- a/src/widgets/tqhbox.cpp
+++ b/src/widgets/tqhbox.cpp
@@ -74,12 +74,12 @@ TQHBox::TQHBox( TQWidget *parent, const char *name, WFlags f )
:TQFrame( parent, name, f )
{
lay = new TQHBoxLayout( this, frameWidth(), frameWidth(), name );
- lay->setAutoAdd( TRUE );
+ lay->setAutoAdd( true );
}
/*!
- Constructs a horizontal hbox if \a horizontal is TRUE, otherwise
+ Constructs a horizontal hbox if \a horizontal is true, otherwise
constructs a vertical hbox (also known as a vbox).
This constructor is provided for the TQVBox class. You should never
@@ -95,7 +95,7 @@ TQHBox::TQHBox( bool horizontal, TQWidget *parent , const char *name, WFlags f )
lay = new TQBoxLayout( this,
horizontal ? TQBoxLayout::LeftToRight : TQBoxLayout::Down,
frameWidth(), frameWidth(), name );
- lay->setAutoAdd( TRUE );
+ lay->setAutoAdd( true );
}
/*!\reimp
@@ -131,8 +131,8 @@ TQSize TQHBox::sizeHint() const
}
/*!
- Sets the stretch factor of widget \a w to \a stretch. Returns TRUE if
- \a w is found. Otherwise returns FALSE.
+ Sets the stretch factor of widget \a w to \a stretch. Returns true if
+ \a w is found. Otherwise returns false.
\sa TQBoxLayout::setStretchFactor() \link layout.html Layouts\endlink
*/
diff --git a/src/widgets/tqheader.cpp b/src/widgets/tqheader.cpp
index 540a90508..9ea079d8e 100644
--- a/src/widgets/tqheader.cpp
+++ b/src/widgets/tqheader.cpp
@@ -54,8 +54,8 @@ public:
TQHeaderData(int n)
{
count = n;
- labels.setAutoDelete( TRUE );
- iconsets.setAutoDelete( TRUE );
+ labels.setAutoDelete( true );
+ iconsets.setAutoDelete( true );
sizes.resize(n);
positions.resize(n);
labels.resize(n);
@@ -73,18 +73,18 @@ public:
positions[i] = p;
p += sizes[i];
}
- clicks_default = TRUE;
- resize_default = TRUE;
+ clicks_default = true;
+ resize_default = true;
clicks.fill( clicks_default );
resize.fill( resize_default );
- move = TRUE;
+ move = true;
sortSection = -1;
- sortDirection = TRUE;
- positionsDirty = TRUE;
+ sortDirection = true;
+ positionsDirty = true;
lastPos = 0;
fullSize = -2;
- pos_dirty = FALSE;
- is_a_table_header = FALSE;
+ pos_dirty = false;
+ is_a_table_header = false;
focusIdx = 0;
}
@@ -157,14 +157,14 @@ public:
sections in the header.
The orientation of the header is set with setOrientation(). If
- setStretchEnabled() is TRUE, the sections will expand to take up
+ setStretchEnabled() is true, the sections will expand to take up
the full width (height for vertical headers) of the header. The
user can resize the sections manually if setResizeEnabled() is
- TRUE. Call adjustHeaderSize() to have the sections resize to
+ true. Call adjustHeaderSize() to have the sections resize to
occupy the full width (or height).
A section can be moved with moveSection(). If setMovingEnabled()
- is TRUE (the default)the user may drag a section from one position
+ is true (the default)the user may drag a section from one position
to another. If a section is moved, the index positions at which
sections were added (with addLabel()), may not be the same after the
move. You don't have to worry about this in practice because the
@@ -271,7 +271,7 @@ void TQHeader::showEvent( TQShowEvent *e )
/*!
\fn void TQHeader::clicked( int section )
- If isClickEnabled() is TRUE, this signal is emitted when the user
+ If isClickEnabled() is true, this signal is emitted when the user
clicks section \a section.
\sa pressed(), released()
@@ -378,7 +378,7 @@ int TQHeader::count() const
otherwise it is only emitted when the mouse button is released at
the end of resizing.
- Tracking defaults to FALSE.
+ Tracking defaults to false.
*/
@@ -391,14 +391,14 @@ void TQHeader::init( int n )
cachedPos = 0; // unused
d = new TQHeaderData( n );
d->height = 0;
- d->heightDirty = TRUE;
+ d->heightDirty = true;
offs = 0;
if( reverse() )
offs = d->lastPos - width();
oldHandleIdx = oldHIdxSize = handleIdx = 0;
- setMouseTracking( TRUE );
- trackingIsOn = FALSE;
+ setMouseTracking( true );
+ trackingIsOn = false;
setBackgroundMode( PaletteButton );
setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) );
}
@@ -612,7 +612,7 @@ void TQHeader::keyPressEvent( TQKeyEvent *e )
//resize
int step = e->state() & ShiftButton ? dir : 10*dir;
int c = d->positions[i] + d->sizes[s] + step;
- handleColumnResize( i, c, TRUE );
+ handleColumnResize( i, c, true );
} else if ( e->state() & (AltButton|MetaButton) && d->move ) {
//move section
int i2 = ( i + count() + dir ) % count();
@@ -639,7 +639,7 @@ void TQHeader::keyReleaseEvent( TQKeyEvent *e )
case Key_Space:
//double check that this wasn't started with the mouse
if ( state == Pressed && handleIdx == d->focusIdx ) {
- repaint(sRect( handleIdx ), FALSE);
+ repaint(sRect( handleIdx ), false);
int section = d->i2s[d->focusIdx];
emit released( section );
emit sectionClicked( handleIdx );
@@ -723,16 +723,16 @@ void TQHeader::mouseReleaseEvent( TQMouseEvent *e )
} else {
handleIdx = oldHandleIdx;
}
- repaint(sRect( handleIdx ), FALSE);
+ repaint(sRect( handleIdx ), false);
if ( oldOldHandleIdx != handleIdx )
- repaint(sRect(oldOldHandleIdx ), FALSE );
+ repaint(sRect(oldOldHandleIdx ), false );
} break;
case Sliding: {
int c = orient == Horizontal ? e->pos().x() : e->pos().y();
c += offset();
if ( reverse() )
c = d->lastPos - c;
- handleColumnResize( handleIdx, c - d->pressDelta, TRUE );
+ handleColumnResize( handleIdx, c - d->pressDelta, true );
} break;
case Moving: {
#ifndef TQT_NO_CURSOR
@@ -755,9 +755,9 @@ void TQHeader::mouseReleaseEvent( TQMouseEvent *e )
} else {
handleIdx = oldHandleIdx;
}
- repaint(sRect( handleIdx ), FALSE );
+ repaint(sRect( handleIdx ), false );
if(oldOldHandleIdx != handleIdx)
- repaint(sRect(oldOldHandleIdx ), FALSE );
+ repaint(sRect(oldOldHandleIdx ), false );
}
break;
}
@@ -808,7 +808,7 @@ void TQHeader::mouseMoveEvent( TQMouseEvent *e )
}
break;
case Sliding:
- handleColumnResize( handleIdx, c, FALSE, FALSE );
+ handleColumnResize( handleIdx, c, false, false );
break;
case Moving: {
int newPos = findLine( pos );
@@ -992,7 +992,7 @@ void TQHeader::setLabel( int section, const TQString &s, int size )
}
-bool tqt_qheader_label_return_null_strings = FALSE;
+bool tqt_qheader_label_return_null_strings = false;
/*!
Returns the text for section \a section. If the section does not
exist, a TQString::null is returned.
@@ -1154,7 +1154,7 @@ void TQHeader::setSectionSizeAndHeight( int section, int size )
only for users with many columns and '\n's in their headers
at the same time.
*/
- d->heightDirty = TRUE;
+ d->heightDirty = true;
}
}
@@ -1239,7 +1239,7 @@ TQSize TQHeader::sizeHint() const
sectionSizeHint( i, fm ).height() : sectionSizeHint( i, fm ).width();
d->height = TQMAX( d->height, h );
}
- d->heightDirty = FALSE;
+ d->heightDirty = false;
}
if ( orient == Horizontal ) {
@@ -1373,7 +1373,7 @@ void TQHeader::setCellSize( int section, int s )
/*!
- If \a enable is TRUE the user may resize section \a section;
+ If \a enable is true the user may resize section \a section;
otherwise the section may not be manually resized.
If \a section is negative (the default) then the \a enable value
@@ -1382,9 +1382,9 @@ void TQHeader::setCellSize( int section, int s )
Example:
\code
// Allow resizing of all current and future sections
- header->setResizeEnabled(TRUE);
+ header->setResizeEnabled(true);
// Disable resizing of section 3, (the fourth section added)
- header->setResizeEnabled(FALSE, 3);
+ header->setResizeEnabled(false, 3);
\endcode
If the user resizes a section, a sizeChange() signal is emitted.
@@ -1408,7 +1408,7 @@ void TQHeader::setResizeEnabled( bool enable, int section )
\property TQHeader::moving
\brief whether the header sections can be moved
- If this property is TRUE (the default) the user can move sections.
+ If this property is true (the default) the user can move sections.
If the user moves a section the indexChange() signal is emitted.
\sa setClickEnabled(), setResizeEnabled()
@@ -1421,7 +1421,7 @@ void TQHeader::setMovingEnabled( bool enable )
/*!
- If \a enable is TRUE, any clicks on section \a section will result
+ If \a enable is true, any clicks on section \a section will result
in clicked() signals being emitted; otherwise the section will
ignore clicks.
@@ -1812,12 +1812,12 @@ void TQHeader::moveSection( int section, int toIndex )
}
/*!
- Returns TRUE if section \a section is clickable; otherwise returns
- FALSE.
+ Returns true if section \a section is clickable; otherwise returns
+ false.
If \a section is out of range (negative or larger than count() -
- 1): returns TRUE if all sections are clickable; otherwise returns
- FALSE.
+ 1): returns true if all sections are clickable; otherwise returns
+ false.
\sa setClickEnabled()
*/
@@ -1830,18 +1830,18 @@ bool TQHeader::isClickEnabled( int section ) const
for ( int i = 0; i < count(); ++i ) {
if ( !d->clicks[ i ] )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*!
- Returns TRUE if section \a section is resizeable; otherwise
- returns FALSE.
+ Returns true if section \a section is resizeable; otherwise
+ returns false.
If \a section is -1 then this function applies to all sections,
- i.e. returns TRUE if all sections are resizeable; otherwise
- returns FALSE.
+ i.e. returns true if all sections are resizeable; otherwise
+ returns false.
\sa setResizeEnabled()
*/
@@ -1854,9 +1854,9 @@ bool TQHeader::isResizeEnabled( int section ) const
for ( int i = 0; i < count();++i ) {
if ( !d->resize[ i ] )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
bool TQHeader::isMovingEnabled() const
@@ -1879,7 +1879,7 @@ bool TQHeader::reverse () const
#if 0
return ( orient == TQt::Horizontal && TQApplication::reverseLayout() );
#else
- return FALSE;
+ return false;
#endif
}
@@ -1908,7 +1908,7 @@ void TQHeader::resizeEvent( TQResizeEvent *e )
Adjusts the size of the sections to fit the size of the header as
completely as possible. Only sections for which isStretchEnabled()
- is TRUE will be resized.
+ is true will be resized.
*/
void TQHeader::adjustHeaderSize( int diff )
@@ -1931,7 +1931,7 @@ void TQHeader::adjustHeaderSize( int diff )
if ( ns < 20 )
ns = 20;
setCellSize( sec, ns );
- repaint( FALSE );
+ repaint( false );
emit sizeChange( sec, os, ns );
} else if ( d->fullSize == -1 ) {
int df = diff / count();
@@ -1951,7 +1951,7 @@ void TQHeader::adjustHeaderSize( int diff )
if ( ns < 20 )
ns = 20;
setCellSize( sec, ns );
- repaint( FALSE );
+ repaint( false );
emit sizeChange( sec, os, ns );
}
}
@@ -1963,14 +1963,14 @@ int TQHeader::headerWidth() const
{
if ( d->pos_dirty ) {
( (TQHeader*)this )->calculatePositions();
- d->pos_dirty = FALSE;
+ d->pos_dirty = false;
}
return d->lastPos;
}
void TQHeader::calculatePositions( bool onlyVisible, int start )
{
- d->positionsDirty = FALSE;
+ d->positionsDirty = false;
d->lastPos = count() > 0 ? d->positions[start] : 0;
for ( int i = start; i < count(); i++ ) {
d->positions[i] = d->lastPos;
@@ -1991,13 +1991,13 @@ void TQHeader::calculatePositions( bool onlyVisible, int start )
/*!
- If \a b is TRUE, section \a section will be resized when the
+ If \a b is true, section \a section will be resized when the
header is resized, so that the sections take up the full width (or
height for vertical headers) of the header; otherwise section \a
section will be set to be unstretchable and will not resize when
the header is resized.
- If \a section is -1, and if \a b is TRUE, then all sections will
+ If \a section is -1, and if \a b is true, then all sections will
be resized equally when the header is resized so that they take up
the full width (or height for vertical headers) of the header;
otherwise all the sections will be set to be unstretchable and
@@ -2023,8 +2023,8 @@ bool TQHeader::isStretchEnabled() const
/*!
\overload
- Returns TRUE if section \a section will resize to take up the full
- width (or height) of the header; otherwise returns FALSE. If at
+ Returns true if section \a section will resize to take up the full
+ width (or height) of the header; otherwise returns false. If at
least one section has stretch enabled the sections will always
take up the full width of the header.
diff --git a/src/widgets/tqheader.h b/src/widgets/tqheader.h
index d51a8e18f..1489f143b 100644
--- a/src/widgets/tqheader.h
+++ b/src/widgets/tqheader.h
@@ -121,7 +121,7 @@ public:
void moveSection( int section, int toIndex );
virtual void moveCell( int, int); // obsolete, do not use
- void setSortIndicator( int section, bool ascending = TRUE ); // obsolete, do not use
+ void setSortIndicator( int section, bool ascending = true ); // obsolete, do not use
inline void setSortIndicator( int section, SortOrder order )
{ setSortIndicator( section, (order == Ascending) ); }
int sortIndicatorSection() const;
@@ -175,8 +175,8 @@ private:
int findLine( int );
int handleAt( int p );
bool reverse() const;
- void calculatePositions( bool onlyVisible = FALSE, int start = 0 );
- void handleColumnResize(int, int, bool, bool = TRUE );
+ void calculatePositions( bool onlyVisible = false, int start = 0 );
+ void handleColumnResize(int, int, bool, bool = true );
TQSize sectionSizeHint( int section, const TQFontMetrics& fm ) const;
void setSectionSizeAndHeight( int section, int size );
diff --git a/src/widgets/tqiconview.cpp b/src/widgets/tqiconview.cpp
index fa705ccc8..c2fa5dfbc 100644
--- a/src/widgets/tqiconview.cpp
+++ b/src/widgets/tqiconview.cpp
@@ -123,7 +123,7 @@ static TQPixmap *qiv_buffer_pixmap = 0;
#if !defined(TQ_WS_X11)
static TQPixmap *qiv_selection = 0;
#endif
-static bool optimize_layout = FALSE;
+static bool optimize_layout = false;
static TQCleanupHandler<TQPixmap> qiv_cleanup_pixmap;
@@ -268,7 +268,7 @@ public:
struct ItemContainer {
ItemContainer( ItemContainer *pr, ItemContainer *nx, const TQRect &r )
: p( pr ), n( nx ), rect( r ) {
- items.setAutoDelete( FALSE );
+ items.setAutoDelete( false );
if ( p )
p->n = this;
if ( n )
@@ -339,8 +339,8 @@ void TQIconViewToolTip::maybeTip( const TQPoint &pos )
if ( !item || item->tmpText == item->itemText )
return;
- TQRect r( item->textRect( FALSE ) );
- TQRect r2 = item->pixmapRect( FALSE );
+ TQRect r( item->textRect( false ) );
+ TQRect r2 = item->pixmapRect( false );
/* this probably should be | r, but TQToolTip does not handle that
* well */
@@ -399,7 +399,7 @@ TQIconViewItemLineEdit::TQIconViewItemLineEdit( const TQString &text, TQWidget *
setWrapColumnOrWidth( item->iconView()->maxItemWidth() -
( item->iconView()->itemTextPos() == TQIconView::Bottom ?
0 : item->pixmapRect().width() ) );
- document()->formatter()->setAllowBreakInWords( TRUE );
+ document()->formatter()->setAllowBreakInWords( true );
resize( 200, 200 ); // ### some size, there should be a forceReformat()
setTextFormat( PlainText );
setText( text );
@@ -640,21 +640,19 @@ TQByteArray TQIconDrag::encodedData( const char* mime ) const
}
/*!
- Returns TRUE if \a e can be decoded by the TQIconDrag, otherwise
- return FALSE.
+ Returns true if \a e can be decoded by the TQIconDrag, otherwise
+ return false.
*/
bool TQIconDrag::canDecode( TQMimeSource* e )
{
- if ( e->provides( "application/x-qiconlist" ) )
- return TRUE;
- return FALSE;
+ return e->provides( "application/x-qiconlist" );
}
/*!
Decodes the data which is stored (encoded) in \a e and, if
successful, fills the \a list of icon drag items with the decoded
- data. Returns TRUE if there was some data, FALSE otherwise.
+ data. Returns true if there was some data, false otherwise.
*/
bool TQIconDragPrivate::decode( TQMimeSource* e, TQValueList<TQIconDragDataItem> &lst )
@@ -698,10 +696,10 @@ bool TQIconDragPrivate::decode( TQMimeSource* e, TQValueList<TQIconDragDataItem>
if ( i > 8 )
i = 0;
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
TQIconDragData::TQIconDragData()
@@ -761,7 +759,7 @@ void TQIconDragData::setTextRect( const TQRect &r )
\endcode
By default the text of an icon view item may not be edited by the
- user but calling setRenameEnabled(TRUE) will allow the user to
+ user but calling setRenameEnabled(true) will allow the user to
perform in-place editing of the item's text.
When the icon view is deleted all items in it are deleted
@@ -928,12 +926,12 @@ void TQIconViewItem::init( TQIconViewItem *after
d->container1 = 0;
d->container2 = 0;
prev = next = 0;
- allow_rename = FALSE;
- allow_drag = TRUE;
- allow_drop = TRUE;
- visible = TRUE;
- selected = FALSE;
- selectable = TRUE;
+ allow_rename = false;
+ allow_drag = true;
+ allow_drop = true;
+ visible = true;
+ selected = false;
+ selectable = true;
#ifndef TQT_NO_TEXTEDIT
renameBox = 0;
#endif
@@ -942,8 +940,8 @@ void TQIconViewItem::init( TQIconViewItem *after
#endif
if ( view ) {
itemKey = itemText;
- dirty = TRUE;
- wordWrapDirty = TRUE;
+ dirty = true;
+ wordWrapDirty = true;
itemRect = TQRect( -1, -1, 0, 0 );
calcRect();
view->insertItem( this, after );
@@ -988,7 +986,7 @@ int TQIconViewItem::rtti() const
}
/*!
- If \a b is TRUE, the item is made visible; otherwise it is hidden.
+ If \a b is true, the item is made visible; otherwise it is hidden.
*/
void TQIconViewItem::setVisible( bool b )
@@ -1004,7 +1002,7 @@ void TQIconViewItem::setVisible( bool b )
}
/*!
- Returns TRUE if the item is visible; otherwise returns FALSE.
+ Returns true if the item is visible; otherwise returns false.
\sa setVisible()
*/
@@ -1026,7 +1024,7 @@ void TQIconViewItem::setText( const TQString &text )
if ( text == itemText )
return;
- wordWrapDirty = TRUE;
+ wordWrapDirty = true;
itemText = text;
if ( itemKey.isEmpty() )
itemKey = itemText;
@@ -1040,7 +1038,7 @@ void TQIconViewItem::setText( const TQString &text )
view->visibleWidthSB(), view->visibleHeightSB() ).
intersects( oR ) )
view->repaintContents( oR.x() - 1, oR.y() - 1,
- oR.width() + 2, oR.height() + 2, FALSE );
+ oR.width() + 2, oR.height() + 2, false );
}
}
@@ -1073,7 +1071,7 @@ void TQIconViewItem::setKey( const TQString &k )
void TQIconViewItem::setPixmap( const TQPixmap &icon )
{
- if (isVisible() == FALSE)
+ if (isVisible() == false)
return;
if ( itemIcon && itemIcon == unknown_icon )
@@ -1092,7 +1090,7 @@ void TQIconViewItem::setPixmap( const TQPixmap &icon )
view->visibleWidthSB(), view->visibleHeightSB() ).
intersects( oR ) )
view->repaintContents( oR.x() - 1, oR.y() - 1,
- oR.width() + 2, oR.height() + 2, FALSE );
+ oR.width() + 2, oR.height() + 2, false );
}
}
@@ -1128,7 +1126,7 @@ void TQIconViewItem::setPicture( const TQPicture &icon )
view->visibleWidthSB(), view->visibleHeightSB() ).
intersects( oR ) )
view->repaintContents( oR.x() - 1, oR.y() - 1,
- oR.width() + 2, oR.height() + 2, FALSE );
+ oR.width() + 2, oR.height() + 2, false );
}
}
#endif
@@ -1137,7 +1135,7 @@ void TQIconViewItem::setPicture( const TQPicture &icon )
\overload
Sets \a text as the text of the icon view item. If \a recalc is
- TRUE, the icon view's layout is recalculated. If \a redraw is TRUE
+ true, the icon view's layout is recalculated. If \a redraw is true
(the default), the icon view is repainted.
\sa text()
@@ -1148,7 +1146,7 @@ void TQIconViewItem::setText( const TQString &text, bool recalc, bool redraw )
if ( text == itemText )
return;
- wordWrapDirty = TRUE;
+ wordWrapDirty = true;
itemText = text;
if ( recalc )
@@ -1161,7 +1159,7 @@ void TQIconViewItem::setText( const TQString &text, bool recalc, bool redraw )
\overload
Sets \a icon as the item's icon in the icon view. If \a recalc is
- TRUE, the icon view's layout is recalculated. If \a redraw is TRUE
+ true, the icon view's layout is recalculated. If \a redraw is true
(the default), the icon view is repainted.
<b>Note:</b> Pixmaps with individual dimensions larger than 300 pixels may
@@ -1174,7 +1172,7 @@ void TQIconViewItem::setText( const TQString &text, bool recalc, bool redraw )
void TQIconViewItem::setPixmap( const TQPixmap &icon, bool recalc, bool redraw )
{
- if (isVisible() == FALSE)
+ if (isVisible() == false)
return;
if ( itemIcon && itemIcon == unknown_icon )
@@ -1196,7 +1194,7 @@ void TQIconViewItem::setPixmap( const TQPixmap &icon, bool recalc, bool redraw )
view->visibleWidthSB(), view->visibleHeightSB() ).
intersects( oR ) )
view->repaintContents( oR.x() - 1, oR.y() - 1,
- oR.width() + 2, oR.height() + 2, FALSE );
+ oR.width() + 2, oR.height() + 2, false );
}
} else {
repaint();
@@ -1207,9 +1205,9 @@ void TQIconViewItem::setPixmap( const TQPixmap &icon, bool recalc, bool redraw )
}
/*!
- If \a allow is TRUE, the user can rename the icon view item by
+ If \a allow is true, the user can rename the icon view item by
clicking on the text (or pressing F2) while the item is selected
- (in-place renaming). If \a allow is FALSE, in-place renaming is
+ (in-place renaming). If \a allow is false, in-place renaming is
not possible.
*/
@@ -1219,9 +1217,9 @@ void TQIconViewItem::setRenameEnabled( bool allow )
}
/*!
- If \a allow is TRUE, the icon view permits the user to drag the
+ If \a allow is true, the icon view permits the user to drag the
icon view item either to another position within the icon view or
- to somewhere outside of it. If \a allow is FALSE, the item cannot
+ to somewhere outside of it. If \a allow is false, the item cannot
be dragged.
*/
@@ -1231,7 +1229,7 @@ void TQIconViewItem::setDragEnabled( bool allow )
}
/*!
- If \a allow is TRUE, the icon view lets the user drop something on
+ If \a allow is true, the icon view lets the user drop something on
this icon view item.
*/
@@ -1306,8 +1304,8 @@ TQPicture *TQIconViewItem::picture() const
#endif
/*!
- Returns TRUE if the item can be renamed by the user with in-place
- renaming; otherwise returns FALSE.
+ Returns true if the item can be renamed by the user with in-place
+ renaming; otherwise returns false.
\sa setRenameEnabled()
*/
@@ -1318,8 +1316,8 @@ bool TQIconViewItem::renameEnabled() const
}
/*!
- Returns TRUE if the user is allowed to drag the icon view item;
- otherwise returns FALSE.
+ Returns true if the user is allowed to drag the icon view item;
+ otherwise returns false.
\sa setDragEnabled()
*/
@@ -1330,8 +1328,8 @@ bool TQIconViewItem::dragEnabled() const
}
/*!
- Returns TRUE if the user is allowed to drop something onto the
- item; otherwise returns FALSE.
+ Returns true if the user is allowed to drop something onto the
+ item; otherwise returns false.
\sa setDropEnabled()
*/
@@ -1402,12 +1400,12 @@ int TQIconViewItem::index() const
\overload
This variant is equivalent to calling the other variant with \e cb
- set to FALSE.
+ set to false.
*/
void TQIconViewItem::setSelected( bool s )
{
- setSelected( s, FALSE );
+ setSelected( s, false );
}
/*!
@@ -1415,21 +1413,21 @@ void TQIconViewItem::setSelected( bool s )
unselect other items, depending on TQIconView::selectionMode() and
\a cb.
- If \a s is FALSE, the item is unselected.
+ If \a s is false, the item is unselected.
- If \a s is TRUE and TQIconView::selectionMode() is \c Single, the
+ If \a s is true and TQIconView::selectionMode() is \c Single, the
item is selected and the item previously selected is unselected.
- If \a s is TRUE and TQIconView::selectionMode() is \c Extended, the
- item is selected. If \a cb is TRUE, the selection state of the
- other items is left unchanged. If \a cb is FALSE (the default) all
+ If \a s is true and TQIconView::selectionMode() is \c Extended, the
+ item is selected. If \a cb is true, the selection state of the
+ other items is left unchanged. If \a cb is false (the default) all
other items are unselected.
- If \a s is TRUE and TQIconView::selectionMode() is \c Multi, the
+ If \a s is true and TQIconView::selectionMode() is \c Multi, the
item is selected.
Note that \a cb is used only if TQIconView::selectionMode() is \c
- Extended; cb defaults to FALSE.
+ Extended; cb defaults to false.
All items whose selection status changes repaint themselves.
*/
@@ -1444,7 +1442,7 @@ void TQIconViewItem::setSelected( bool s, bool cb )
if ( view->d->selectionMode == TQIconView::Single && this != view->d->currentItem ) {
TQIconViewItem *o = view->d->currentItem;
if ( o && o->selected )
- o->selected = FALSE;
+ o->selected = false;
view->d->currentItem = this;
if ( o )
o->repaint();
@@ -1452,16 +1450,16 @@ void TQIconViewItem::setSelected( bool s, bool cb )
}
if ( !s ) {
- selected = FALSE;
+ selected = false;
} else {
if ( view->d->selectionMode == TQIconView::Single && view->d->currentItem ) {
- view->d->currentItem->selected = FALSE;
+ view->d->currentItem->selected = false;
}
if ( ( view->d->selectionMode == TQIconView::Extended && !cb ) ||
view->d->selectionMode == TQIconView::Single ) {
bool b = view->signalsBlocked();
- view->blockSignals( TRUE );
- view->selectAll( FALSE );
+ view->blockSignals( true );
+ view->selectAll( false );
view->blockSignals( b );
}
selected = s;
@@ -1479,8 +1477,8 @@ void TQIconViewItem::setSelected( bool s, bool cb )
}
/*!
- Sets this item to be selectable if \a enable is TRUE (the default)
- or unselectable if \a enable is FALSE.
+ Sets this item to be selectable if \a enable is true (the default)
+ or unselectable if \a enable is false.
The user is unable to select a non-selectable item using either
the keyboard or the mouse. (The application programmer can select
@@ -1495,7 +1493,7 @@ void TQIconViewItem::setSelectable( bool enable )
}
/*!
- Returns TRUE if the item is selected; otherwise returns FALSE.
+ Returns true if the item is selected; otherwise returns false.
\sa setSelected()
*/
@@ -1506,7 +1504,7 @@ bool TQIconViewItem::isSelected() const
}
/*!
- Returns TRUE if the item is selectable; otherwise returns FALSE.
+ Returns true if the item is selectable; otherwise returns false.
\sa setSelectable()
*/
@@ -1534,12 +1532,12 @@ void TQIconViewItem::repaint()
bool TQIconViewItem::move( int x, int y )
{
if ( x == this->x() && y == this->y() )
- return FALSE;
+ return false;
itemRect.setRect( x, y, itemRect.width(), itemRect.height() );
checkRect();
if ( view )
view->updateItemContainer( this );
- return TRUE;
+ return true;
}
/*!
@@ -1644,9 +1642,9 @@ TQPoint TQIconViewItem::pos() const
/*!
Returns the bounding rectangle of the item's text.
- If \a relative is TRUE, (the default), the returned rectangle is
+ If \a relative is true, (the default), the returned rectangle is
relative to the origin of the item's rectangle. If \a relative is
- FALSE, the returned rectangle is relative to the origin of the
+ false, the returned rectangle is relative to the origin of the
icon view's contents coordinate system.
*/
@@ -1661,8 +1659,8 @@ TQRect TQIconViewItem::textRect( bool relative ) const
/*!
Returns the bounding rectangle of the item's icon.
- If \a relative is TRUE, (the default), the rectangle is relative to
- the origin of the item's rectangle. If \a relative is FALSE, the
+ If \a relative is true, (the default), the rectangle is relative to
+ the origin of the item's rectangle. If \a relative is false, the
returned rectangle is relative to the origin of the icon view's
contents coordinate system.
*/
@@ -1676,14 +1674,14 @@ TQRect TQIconViewItem::pixmapRect( bool relative ) const
}
/*!
- Returns TRUE if the item contains the point \a pnt (in contents
- coordinates); otherwise returns FALSE.
+ Returns true if the item contains the point \a pnt (in contents
+ coordinates); otherwise returns false.
*/
bool TQIconViewItem::contains( const TQPoint& pnt ) const
{
- TQRect textArea = textRect( FALSE );
- TQRect pixmapArea = pixmapRect( FALSE );
+ TQRect textArea = textRect( false );
+ TQRect pixmapArea = pixmapRect( false );
if ( iconView()->itemTextPos() == TQIconView::Bottom )
textArea.setTop( pixmapArea.bottom() );
else
@@ -1692,29 +1690,29 @@ bool TQIconViewItem::contains( const TQPoint& pnt ) const
}
/*!
- Returns TRUE if the item intersects the rectangle \a r (in
- contents coordinates); otherwise returns FALSE.
+ Returns true if the item intersects the rectangle \a r (in
+ contents coordinates); otherwise returns false.
*/
bool TQIconViewItem::intersects( const TQRect& r ) const
{
- return ( textRect( FALSE ).intersects( r ) ||
- pixmapRect( FALSE ).intersects( r ) );
+ return ( textRect( false ).intersects( r ) ||
+ pixmapRect( false ).intersects( r ) );
}
/*!
\fn bool TQIconViewItem::acceptDrop( const TQMimeSource *mime ) const
- Returns TRUE if you can drop things with a TQMimeSource of \a mime
- onto this item; otherwise returns FALSE.
+ Returns true if you can drop things with a TQMimeSource of \a mime
+ onto this item; otherwise returns false.
- The default implementation always returns FALSE. You must subclass
+ The default implementation always returns false. You must subclass
TQIconViewItem and reimplement acceptDrop() to accept drops.
*/
bool TQIconViewItem::acceptDrop( const TQMimeSource * ) const
{
- return FALSE;
+ return false;
}
#ifndef TQT_NO_TEXTEDIT
@@ -1738,7 +1736,7 @@ void TQIconViewItem::rename()
oldRect = rect();
renameBox = new TQIconViewItemLineEdit( itemText, view->viewport(), this, "qt_renamebox" );
iconView()->ensureItemVisible( this );
- TQRect tr( textRect( FALSE ) );
+ TQRect tr( textRect( false ) );
view->addChild( renameBox, tr.x() + ( tr.width() / 2 - renameBox->width() / 2 ), tr.y() - 3 );
renameBox->selectAll();
view->viewport()->setFocusProxy( renameBox );
@@ -1786,13 +1784,13 @@ void TQIconViewItem::renameItem()
return;
if ( !view->d->wordWrapIconText ) {
- wordWrapDirty = TRUE;
+ wordWrapDirty = true;
calcRect();
}
TQRect r = itemRect;
setText( renameBox->text() );
- view->repaintContents( oldRect.x() - 1, oldRect.y() - 1, oldRect.width() + 2, oldRect.height() + 2, FALSE );
- view->repaintContents( r.x() - 1, r.y() - 1, r.width() + 2, r.height() + 2, FALSE );
+ view->repaintContents( oldRect.x() - 1, oldRect.y() - 1, oldRect.width() + 2, oldRect.height() + 2, false );
+ view->repaintContents( r.x() - 1, r.y() - 1, r.width() + 2, r.height() + 2, false );
removeRenameBox();
view->emitRenamed( this );
@@ -1809,8 +1807,8 @@ void TQIconViewItem::cancelRenameItem()
TQRect r = itemRect;
calcRect();
- view->repaintContents( oldRect.x() - 1, oldRect.y() - 1, oldRect.width() + 2, oldRect.height() + 2, FALSE );
- view->repaintContents( r.x() - 1, r.y() - 1, r.width() + 2, r.height() + 2, FALSE );
+ view->repaintContents( oldRect.x() - 1, oldRect.y() - 1, oldRect.width() + 2, oldRect.height() + 2, false );
+ view->repaintContents( r.x() - 1, r.y() - 1, r.width() + 2, r.height() + 2, false );
if ( !renameBox )
return;
@@ -1854,7 +1852,7 @@ void TQIconViewItem::calcRect( const TQString &text_ )
if ( !view ) // #####
return;
- wordWrapDirty = TRUE;
+ wordWrapDirty = true;
int pw = 0;
int ph = 0;
@@ -1970,30 +1968,30 @@ void TQIconViewItem::paintItem( TQPainter *p, const TQColorGroup &cg )
if ( isSelected() ) {
p->setBrush( TQBrush( cg.highlight(), TQBrush::Dense4Pattern ) );
p->setPen( TQPen( cg.highlight(), TQBrush::Dense4Pattern ) );
- p->drawRoundRect( pixmapRect( FALSE ),
- 1000 / pixmapRect( FALSE ).width(),
- 1000 / pixmapRect( FALSE ).height() );
+ p->drawRoundRect( pixmapRect( false ),
+ 1000 / pixmapRect( false ).width(),
+ 1000 / pixmapRect( false ).height() );
}
p->drawPicture( x()-pic->boundingRect().x(), y()-pic->boundingRect().y(), *pic );
if ( isSelected() ) {
p->setBrush( TQBrush( cg.highlight() ) );
p->setPen( TQPen( cg.highlight() ) );
- p->drawRoundRect( textRect( FALSE ),
- 1000 / textRect( FALSE ).width(),
- 1000 / textRect( FALSE ).height() );
+ p->drawRoundRect( textRect( false ),
+ 1000 / textRect( false ).width(),
+ 1000 / textRect( false ).height() );
p->setPen( TQPen( cg.highlightedText() ) );
} else if ( view->d->itemTextBrush != NoBrush ) {
p->setBrush( view->d->itemTextBrush );
p->setPen( TQPen( view->d->itemTextBrush.color() ) );
- p->drawRoundRect( textRect( FALSE ),
- 1000 / textRect( FALSE ).width(),
- 1000 / textRect( FALSE ).height() );
+ p->drawRoundRect( textRect( false ),
+ 1000 / textRect( false ).width(),
+ 1000 / textRect( false ).height() );
}
int align = view->itemTextPos() == TQIconView::Bottom ? AlignHCenter : AlignAuto;
if ( view->d->wordWrapIconText )
align |= WordBreak | BreakAnywhere;
- p->drawText( textRect( FALSE ), align, view->d->wordWrapIconText ? itemText : tmpText );
+ p->drawText( textRect( false ), align, view->d->wordWrapIconText ? itemText : tmpText );
p->restore();
return;
}
@@ -2048,22 +2046,22 @@ void TQIconViewItem::paintItem( TQPainter *p, const TQColorGroup &cg )
if ( isSelected() ) {
p->setBrush( TQBrush( cg.highlight() ) );
p->setPen( TQPen( cg.highlight() ) );
- p->drawRoundRect( textRect( FALSE ),
- 1000 / textRect( FALSE ).width(),
- 1000 / textRect( FALSE ).height() );
+ p->drawRoundRect( textRect( false ),
+ 1000 / textRect( false ).width(),
+ 1000 / textRect( false ).height() );
p->setPen( TQPen( cg.highlightedText() ) );
} else if ( view->d->itemTextBrush != NoBrush ) {
p->setBrush( view->d->itemTextBrush );
p->setPen( TQPen( view->d->itemTextBrush.color() ) );
- p->drawRoundRect( textRect( FALSE ),
- 1000 / textRect( FALSE ).width(),
- 1000 / textRect( FALSE ).height() );
+ p->drawRoundRect( textRect( false ),
+ 1000 / textRect( false ).width(),
+ 1000 / textRect( false ).height() );
}
int align = AlignHCenter;
if ( view->d->wordWrapIconText )
align |= WordBreak | BreakAnywhere;
- p->drawText( textRect( FALSE ), align,
+ p->drawText( textRect( false ), align,
view->d->wordWrapIconText ? itemText : tmpText );
p->restore();
@@ -2185,7 +2183,7 @@ void TQIconViewItem::calcTmpText()
{
if ( !view || view->d->wordWrapIconText || !wordWrapDirty )
return;
- wordWrapDirty = FALSE;
+ wordWrapDirty = false;
int w = iconView()->maxItemWidth() - ( iconView()->itemTextPos() == TQIconView::Bottom ? 0 :
pixmapRect().width() );
@@ -2216,14 +2214,14 @@ void TQIconViewItem::checkRect()
int w = itemRect.width();
int h = itemRect.height();
- bool changed = FALSE;
+ bool changed = false;
if ( x < 0 ) {
x = 0;
- changed = TRUE;
+ changed = true;
}
if ( y < 0 ) {
y = 0;
- changed = TRUE;
+ changed = true;
}
if ( changed )
@@ -2274,7 +2272,7 @@ void TQIconViewItem::checkRect()
populate, along with the label text and a TQPixmap.
When an item is inserted the TQIconView allocates a position for it.
- Existing items are rearranged if autoArrange() is TRUE. The
+ Existing items are rearranged if autoArrange() is true. The
default arrangement is \c LeftToRight -- the TQIconView fills
the \e top-most row from left to right, then moves one row \e down
and fills that row from left to right and so on. The
@@ -2376,9 +2374,7 @@ void TQIconViewItem::checkRect()
\code
bool MyIconViewItem::acceptDrop( const TQMimeSource *mime ) const
{
- if ( mime->provides( "text/plain" ) )
- return TRUE;
- return FALSE;
+ return mime->provides( "text/plain" );
}
void MyIconViewItem::dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& )
@@ -2723,29 +2719,29 @@ TQIconView::TQIconView( TQWidget *parent, const char *name, WFlags f )
}
d = new TQIconViewPrivate;
- d->dragging = FALSE;
+ d->dragging = false;
d->firstItem = 0;
d->lastItem = 0;
d->count = 0;
- d->mousePressed = FALSE;
+ d->mousePressed = false;
d->selectionMode = Single;
d->currentItem = 0;
d->highlightedItem = 0;
d->rubber = 0;
- d->canStartRubber = FALSE;
+ d->canStartRubber = false;
d->backBuffer = 0;
d->scrollTimer = 0;
d->startDragItem = 0;
d->tmpCurrentItem = 0;
d->rastX = d->rastY = -1;
d->spacing = 5;
- d->cleared = FALSE;
+ d->cleared = false;
d->arrangement = LeftToRight;
d->resizeMode = Fixed;
- d->dropped = FALSE;
+ d->dropped = false;
d->adjustTimer = new TQTimer( this, "iconview adjust timer" );
- d->isIconDrag = FALSE;
- d->inMenuMode = FALSE;
+ d->isIconDrag = false;
+ d->inMenuMode = false;
#ifndef TQT_NO_DRAGANDDROP
d->iconDragData.clear();
#endif
@@ -2756,31 +2752,31 @@ TQIconView::TQIconView( TQWidget *parent, const char *name, WFlags f )
d->maxItemTextLength = 255;
d->inputTimer = new TQTimer( this, "iconview input timer" );
d->currInputString = TQString::null;
- d->dirty = FALSE;
- d->rearrangeEnabled = TRUE;
+ d->dirty = false;
+ d->rearrangeEnabled = true;
d->itemTextPos = Bottom;
- d->reorderItemsWhenInsert = TRUE;
+ d->reorderItemsWhenInsert = true;
#ifndef TQT_NO_CURSOR
d->oldCursor = arrowCursor;
#endif
- d->resortItemsWhenInsert = FALSE;
- d->sortDirection = TRUE;
- d->wordWrapIconText = TRUE;
+ d->resortItemsWhenInsert = false;
+ d->sortDirection = true;
+ d->wordWrapIconText = true;
d->cachedContentsX = d->cachedContentsY = -1;
- d->clearing = FALSE;
+ d->clearing = false;
d->fullRedrawTimer = new TQTimer( this, "iconview full redraw timer" );
d->itemTextBrush = NoBrush;
- d->drawAllBack = TRUE;
+ d->drawAllBack = true;
d->fm = new TQFontMetrics( font() );
d->minLeftBearing = d->fm->minLeftBearing();
d->minRightBearing = d->fm->minRightBearing();
d->firstContainer = d->lastContainer = 0;
- d->containerUpdateLocked = FALSE;
- d->firstSizeHint = FALSE;
+ d->containerUpdateLocked = false;
+ d->firstSizeHint = false;
d->selectAnchor = 0;
d->renamingItem = 0;
- d->drawActiveSelection = TRUE;
- d->drawDragShapes = FALSE;
+ d->drawActiveSelection = true;
+ d->drawDragShapes = false;
d->backrubber = 0;
connect( d->adjustTimer, TQ_SIGNAL( timeout() ),
@@ -2792,11 +2788,11 @@ TQIconView::TQIconView( TQWidget *parent, const char *name, WFlags f )
connect( this, TQ_SIGNAL( contentsMoving(int,int) ),
this, TQ_SLOT( movedContents(int,int) ) );
- setAcceptDrops( TRUE );
- viewport()->setAcceptDrops( TRUE );
+ setAcceptDrops( true );
+ viewport()->setAcceptDrops( true );
- setMouseTracking( TRUE );
- viewport()->setMouseTracking( TRUE );
+ setMouseTracking( true );
+ viewport()->setMouseTracking( true );
viewport()->setBackgroundMode( PaletteBase);
setBackgroundMode( PaletteBackground, PaletteBase );
@@ -2806,7 +2802,7 @@ TQIconView::TQIconView( TQWidget *parent, const char *name, WFlags f )
#ifndef TQT_NO_TOOLTIP
d->toolTip = new TQIconViewToolTip( viewport(), this );
#endif
- d->showTips = TRUE;
+ d->showTips = true;
}
/*!
@@ -2822,7 +2818,7 @@ void TQIconView::styleChange( TQStyle& old )
TQIconViewItem *item = d->firstItem;
for ( ; item; item = item->next ) {
- item->wordWrapDirty = TRUE;
+ item->wordWrapDirty = true;
item->calcRect();
}
@@ -2845,7 +2841,7 @@ void TQIconView::setFont( const TQFont & f )
TQIconViewItem *item = d->firstItem;
for ( ; item; item = item->next ) {
- item->wordWrapDirty = TRUE;
+ item->wordWrapDirty = true;
item->calcRect();
}
}
@@ -2863,7 +2859,7 @@ void TQIconView::setPalette( const TQPalette & p )
TQIconViewItem *item = d->firstItem;
for ( ; item; item = item->next ) {
- item->wordWrapDirty = TRUE;
+ item->wordWrapDirty = true;
item->calcRect();
}
}
@@ -2875,7 +2871,7 @@ void TQIconView::setPalette( const TQPalette & p )
TQIconView::~TQIconView()
{
TQIconViewItem *tmp, *item = d->firstItem;
- d->clearing = TRUE;
+ d->clearing = true;
TQIconViewPrivate::ItemContainer *c = d->firstContainer, *tmpc;
while ( c ) {
tmpc = c->n;
@@ -2958,7 +2954,7 @@ void TQIconView::insertItem( TQIconViewItem *item, TQIconViewItem *after )
d->cachedW = TQMAX( d->cachedW, item->x() + item->width() );
d->cachedH = TQMAX( d->cachedH, item->y() + item->height() );
- d->updateTimer->start( 0, TRUE );
+ d->updateTimer->start( 0, true );
} else {
insertInGrid( item );
@@ -2967,11 +2963,11 @@ void TQIconView::insertItem( TQIconViewItem *item, TQIconViewItem *after )
item->width(), item->height());
}
} else if ( !autoArrange() ) {
- item->dirty = FALSE;
+ item->dirty = false;
}
d->count++;
- d->dirty = TRUE;
+ d->dirty = true;
}
/*!
@@ -3033,10 +3029,10 @@ void TQIconView::slotUpdate()
w += d->spacing;
else
h += d->spacing;
- viewport()->setUpdatesEnabled( FALSE );
+ viewport()->setUpdatesEnabled( false );
resizeContents( w, h );
- viewport()->setUpdatesEnabled( TRUE );
- viewport()->repaint( FALSE );
+ viewport()->setUpdatesEnabled( true );
+ viewport()->repaint( false );
}
int cx = d->cachedContentsX == -1 ? contentsX() : d->cachedContentsX;
@@ -3089,7 +3085,7 @@ void TQIconView::takeItem( TQIconViewItem *item )
}
}
if ( item->isSelected() ) {
- item->selected = FALSE;
+ item->selected = false;
emit selectionChanged();
}
@@ -3115,7 +3111,7 @@ void TQIconView::takeItem( TQIconViewItem *item )
d->selectAnchor = d->currentItem;
if ( !d->clearing )
- repaintContents( r.x(), r.y(), r.width(), r.height(), TRUE );
+ repaintContents( r.x(), r.y(), r.width(), r.height(), true );
item->view = 0;
item->prev = 0;
@@ -3211,20 +3207,20 @@ void TQIconView::setCurrentItem( TQIconViewItem *item )
if ( !item || item == d->currentItem )
return;
- setMicroFocusHint( item->x(), item->y(), item->width(), item->height(), FALSE );
+ setMicroFocusHint( item->x(), item->y(), item->width(), item->height(), false );
TQIconViewItem *old = d->currentItem;
d->currentItem = item;
emit currentChanged( d->currentItem );
if ( d->selectionMode == Single ) {
- bool changed = FALSE;
+ bool changed = false;
if ( old && old->selected ) {
- old->selected = FALSE;
- changed = TRUE;
+ old->selected = false;
+ changed = true;
}
if ( item && !item->selected && item->isSelectable() && d->selectionMode != NoSelection ) {
- item->selected = TRUE;
- changed = TRUE;
+ item->selected = true;
+ changed = true;
emit selectionChanged( item );
}
if ( changed )
@@ -3241,21 +3237,21 @@ void TQIconView::setCurrentItem( TQIconViewItem *item )
unselect other items, depending on TQIconView::selectionMode() and
\a cb.
- If \a s is FALSE, \a item is unselected.
+ If \a s is false, \a item is unselected.
- If \a s is TRUE and TQIconView::selectionMode() is \c Single, \a
+ If \a s is true and TQIconView::selectionMode() is \c Single, \a
item is selected, and the item which was selected is unselected.
- If \a s is TRUE and TQIconView::selectionMode() is \c Extended, \a
- item is selected. If \a cb is TRUE, the selection state of the
- icon view's other items is left unchanged. If \a cb is FALSE (the
+ If \a s is true and TQIconView::selectionMode() is \c Extended, \a
+ item is selected. If \a cb is true, the selection state of the
+ icon view's other items is left unchanged. If \a cb is false (the
default) all other items are unselected.
- If \a s is TRUE and TQIconView::selectionMode() is \c Multi \a item
+ If \a s is true and TQIconView::selectionMode() is \c Multi \a item
is selected.
Note that \a cb is used only if TQIconView::selectionMode() is \c
- Extended. \a cb defaults to FALSE.
+ Extended. \a cb defaults to false.
All items whose selection status is changed repaint themselves.
*/
@@ -3297,34 +3293,34 @@ void TQIconView::doAutoScroll()
int minx = contentsWidth(), miny = contentsHeight();
int maxx = 0, maxy = 0;
- bool changed = FALSE;
+ bool changed = false;
bool block = signalsBlocked();
TQRect rr;
- blockSignals( TRUE );
- viewport()->setUpdatesEnabled( FALSE );
- bool alreadyIntersected = FALSE;
+ blockSignals( true );
+ viewport()->setUpdatesEnabled( false );
+ bool alreadyIntersected = false;
TQRect nr = d->rubber->normalize();
TQRect rubberUnion = nr.unite( oldRubber.normalize() );
TQIconViewPrivate::ItemContainer *c = d->firstContainer;
for ( ; c; c = c->n ) {
if ( c->rect.intersects( rubberUnion ) ) {
- alreadyIntersected = TRUE;
+ alreadyIntersected = true;
TQIconViewItem *item = c->items.first();
for ( ; item; item = c->items.next() ) {
if ( d->selectedItems.find( item ) )
continue;
if ( !item->intersects( nr ) ) {
if ( item->isSelected() ) {
- item->setSelected( FALSE );
- changed = TRUE;
+ item->setSelected( false );
+ changed = true;
rr = rr.unite( item->rect() );
}
} else if ( item->intersects( nr ) ) {
if ( !item->isSelected() && item->isSelectable() ) {
- item->setSelected( TRUE, TRUE );
- changed = TRUE;
+ item->setSelected( true, true );
+ changed = true;
rr = rr.unite( item->rect() );
}
@@ -3339,7 +3335,7 @@ void TQIconView::doAutoScroll()
break;
}
}
- viewport()->setUpdatesEnabled( TRUE );
+ viewport()->setUpdatesEnabled( true );
blockSignals( block );
// static bool drawAll;
@@ -3366,7 +3362,7 @@ void TQIconView::doAutoScroll()
allRect = TQRect( point.x(), point.y(), allRect.width(), allRect.height() );
allRect &= viewport()->rect();
- d->dragging = FALSE;
+ d->dragging = false;
TQPainter p( d->backrubber );
p.translate( -contentsX(), -contentsY() );
@@ -3406,7 +3402,7 @@ void TQIconView::doAutoScroll()
p.end();
// drawAll = false;
- d->dragging = TRUE;
+ d->dragging = true;
bitBlt( viewport(), allRect.topLeft(), d->backrubber, allRect );
if ( changed ) {
@@ -3421,7 +3417,7 @@ void TQIconView::doAutoScroll()
connect( d->scrollTimer, TQ_SIGNAL( timeout() ),
this, TQ_SLOT( doAutoScroll() ) );
- d->scrollTimer->start( 100, FALSE );
+ d->scrollTimer->start( 100, false );
} else if ( TQRect( 50, 50, viewport()->width()-100, viewport()->height()-100 ).contains( vp ) &&
d->scrollTimer ) {
disconnect( d->scrollTimer, TQ_SIGNAL( timeout() ),
@@ -3444,7 +3440,7 @@ void TQIconView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
TQIconViewPrivate::ItemContainer *c = d->firstContainer;
TQRegion remaining( TQRect( cx, cy, cw, ch ) );
- bool alreadyIntersected = FALSE;
+ bool alreadyIntersected = false;
while ( c ) {
if ( c->rect.intersects( r ) ) {
p->save();
@@ -3487,7 +3483,7 @@ void TQIconView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
p->restore();
}
}
- alreadyIntersected = TRUE;
+ alreadyIntersected = true;
} else {
if ( alreadyIntersected )
break;
@@ -3534,7 +3530,7 @@ void TQIconView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
function. If you want to sort or rearrange the items, use
iconview->sort(iconview->sortDirection()).
- If \a update is TRUE (the default), the viewport is repainted as
+ If \a update is true (the default), the viewport is repainted as
well.
\sa TQIconView::setGridX(), TQIconView::setGridY(), TQIconView::sort()
@@ -3545,15 +3541,15 @@ void TQIconView::arrangeItemsInGrid( bool update )
if ( !d->firstItem || !d->lastItem )
return;
- d->containerUpdateLocked = TRUE;
+ d->containerUpdateLocked = true;
int w = 0, h = 0, y = d->spacing;
TQIconViewItem *item = d->firstItem;
- while (item && (item->isVisible() == FALSE)) {
+ while (item && (item->isVisible() == false)) {
item = item->next;
}
- bool changedLayout = FALSE;
+ bool changedLayout = false;
while ( item ) {
bool changed;
TQIconViewItem *next = makeRowLayout( item, y, changed );
@@ -3570,14 +3566,14 @@ void TQIconView::arrangeItemsInGrid( bool update )
break;
item = item->next;
- while (item && (item->isVisible() == FALSE)) {
+ while (item && (item->isVisible() == false)) {
item = item->next;
}
}
if ( d->lastItem && d->arrangement == TopToBottom ) {
item = d->lastItem;
- while (item && (item->isVisible() == FALSE)) {
+ while (item && (item->isVisible() == false)) {
item = item->prev;
}
int x = 0;
@@ -3587,15 +3583,15 @@ void TQIconView::arrangeItemsInGrid( bool update )
w = TQMAX( w, item->x() + item->width() );
h = TQMAX( h, item->y() + item->height() );
item = item->prev;
- while (item && (item->isVisible() == FALSE)) {
+ while (item && (item->isVisible() == false)) {
item = item->prev;
}
}
}
- d->containerUpdateLocked = FALSE;
+ d->containerUpdateLocked = false;
TQIconViewItem *lastVisibleItem = d->lastItem;
- while (lastVisibleItem->prev && (lastVisibleItem->isVisible() == FALSE)) {
+ while (lastVisibleItem->prev && (lastVisibleItem->isVisible() == false)) {
lastVisibleItem = lastVisibleItem->prev;
}
@@ -3608,22 +3604,22 @@ void TQIconView::arrangeItemsInGrid( bool update )
h += d->spacing;
bool ue = isUpdatesEnabled();
- viewport()->setUpdatesEnabled( FALSE );
+ viewport()->setUpdatesEnabled( false );
int vw = visibleWidth();
int vh = visibleHeight();
resizeContents( w, h );
- bool doAgain = FALSE;
+ bool doAgain = false;
if ( d->arrangement == LeftToRight )
doAgain = visibleWidth() != vw;
if ( d->arrangement == TopToBottom )
doAgain = visibleHeight() != vh;
if ( doAgain ) // in the case that the visibleExtend changed because of the resizeContents (scrollbar show/hide), redo layout again
- arrangeItemsInGrid( FALSE );
+ arrangeItemsInGrid( false );
viewport()->setUpdatesEnabled( ue );
d->dirty = !isVisible();
rebuildContainers();
if ( update && ( !optimize_layout || changedLayout ) )
- repaintContents( contentsX(), contentsY(), viewport()->width(), viewport()->height(), FALSE );
+ repaintContents( contentsX(), contentsY(), viewport()->width(), viewport()->height(), false );
}
/*!
@@ -3631,12 +3627,12 @@ void TQIconView::arrangeItemsInGrid( bool update )
grid is invalid (see TQSize::isValid()), arrangeItemsInGrid()
calculates a valid grid itself and uses that.
- If \a update is TRUE (the default) the viewport is repainted.
+ If \a update is true (the default) the viewport is repainted.
*/
void TQIconView::arrangeItemsInGrid( const TQSize &grid, bool update )
{
- d->containerUpdateLocked = TRUE;
+ d->containerUpdateLocked = true;
TQSize grid_( grid );
if ( !grid_.isValid() ) {
int w = 0, h = 0;
@@ -3659,14 +3655,14 @@ void TQIconView::arrangeItemsInGrid( const TQSize &grid, bool update )
ny * grid_.height() );
w = TQMAX( w, item->x() + item->width() );
h = TQMAX( h, item->y() + item->height() );
- item->dirty = FALSE;
+ item->dirty = false;
}
- d->containerUpdateLocked = FALSE;
+ d->containerUpdateLocked = false;
resizeContents( w, h );
rebuildContainers();
if ( update )
- repaintContents( contentsX(), contentsY(), viewport()->width(), viewport()->height(), FALSE );
+ repaintContents( contentsX(), contentsY(), viewport()->width(), viewport()->height(), false );
}
/*!
@@ -3696,7 +3692,7 @@ void TQIconView::showEvent( TQShowEvent * )
if ( d->resortItemsWhenInsert )
sort( d->sortDirection );
if ( autoArrange() )
- arrangeItemsInGrid( FALSE );
+ arrangeItemsInGrid( false );
}
TQScrollView::show();
}
@@ -3828,13 +3824,13 @@ TQIconViewItem *TQIconView::findItem( const TQString &text, ComparisonFlags comp
void TQIconView::clearSelection()
{
- selectAll( FALSE );
+ selectAll( false );
}
/*!
In Multi and Extended modes, this function sets all items to be
- selected if \a select is TRUE, and to be unselected if \a select
- is FALSE.
+ selected if \a select is true, and to be unselected if \a select
+ is false.
In Single and NoSelection modes, this function only changes the
selection status of currentItem().
@@ -3852,25 +3848,25 @@ void TQIconView::selectAll( bool select )
}
bool b = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
TQIconViewItem *item = d->firstItem;
TQIconViewItem *i = d->currentItem;
- bool changed = FALSE;
+ bool changed = false;
bool ue = viewport()->isUpdatesEnabled();
- viewport()->setUpdatesEnabled( FALSE );
+ viewport()->setUpdatesEnabled( false );
TQRect rr;
for ( ; item; item = item->next ) {
if (item->isVisible()) {
if ( select != item->isSelected() ) {
- item->setSelected( select, TRUE );
+ item->setSelected( select, true );
rr = rr.unite( item->rect() );
- changed = TRUE;
+ changed = true;
}
}
else {
- if ( FALSE != item->isSelected() ) {
- item->setSelected( FALSE, TRUE );
- changed = TRUE;
+ if ( false != item->isSelected() ) {
+ item->setSelected( false, true );
+ changed = true;
}
}
}
@@ -3898,15 +3894,15 @@ void TQIconView::invertSelection()
return;
bool b = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
TQIconViewItem *item = d->firstItem;
for ( ; item; item = item->next ) {
if (item->isVisible()) {
- item->setSelected( !item->isSelected(), TRUE );
+ item->setSelected( !item->isSelected(), true );
}
else {
- if ( FALSE != item->isSelected() ) {
- item->setSelected( FALSE, TRUE );
+ if ( false != item->isSelected() ) {
+ item->setSelected( false, true );
}
}
}
@@ -3925,7 +3921,7 @@ void TQIconView::repaintItem( TQIconViewItem *item )
if ( TQRect( contentsX(), contentsY(), visibleWidth(), visibleHeight() ).
intersects( TQRect( item->x() - 1, item->y() - 1, item->width() + 2, item->height() + 2 ) ) )
- repaintContents( item->x() - 1, item->y() - 1, item->width() + 2, item->height() + 2, FALSE );
+ repaintContents( item->x() - 1, item->y() - 1, item->width() + 2, item->height() + 2, false );
}
/*!
@@ -3994,10 +3990,10 @@ TQIconViewItem* TQIconView::findFirstVisibleItem( const TQRect &r ) const
{
TQIconViewPrivate::ItemContainer *c = d->firstContainer;
TQIconViewItem *i = 0;
- bool alreadyIntersected = FALSE;
+ bool alreadyIntersected = false;
for ( ; c; c = c->n ) {
if ( c->rect.intersects( r ) ) {
- alreadyIntersected = TRUE;
+ alreadyIntersected = true;
TQIconViewItem *item = c->items.first();
for ( ; item; item = c->items.next() ) {
if ( r.intersects( item->rect() ) ) {
@@ -4035,10 +4031,10 @@ TQIconViewItem* TQIconView::findLastVisibleItem( const TQRect &r ) const
{
TQIconViewPrivate::ItemContainer *c = d->firstContainer;
TQIconViewItem *i = 0;
- bool alreadyIntersected = FALSE;
+ bool alreadyIntersected = false;
for ( ; c; c = c->n ) {
if ( c->rect.intersects( r ) ) {
- alreadyIntersected = TRUE;
+ alreadyIntersected = true;
TQIconViewItem *item = c->items.first();
for ( ; item; item = c->items.next() ) {
if ( r.intersects( item->rect() ) ) {
@@ -4071,16 +4067,16 @@ TQIconViewItem* TQIconView::findLastVisibleItem( const TQRect &r ) const
void TQIconView::clear()
{
setContentsPos( 0, 0 );
- d->clearing = TRUE;
+ d->clearing = true;
bool block = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
clearSelection();
blockSignals( block );
setContentsPos( 0, 0 );
d->currentItem = 0;
if ( !d->firstItem ) {
- d->clearing = FALSE;
+ d->clearing = false;
return;
}
@@ -4104,14 +4100,14 @@ void TQIconView::clear()
setCurrentItem( 0 );
d->highlightedItem = 0;
d->tmpCurrentItem = 0;
- d->drawDragShapes = FALSE;
+ d->drawDragShapes = false;
resizeContents( 0, 0 );
// maybe we don�t need this update, so delay it
- d->fullRedrawTimer->start( 0, TRUE );
+ d->fullRedrawTimer->start( 0, true );
- d->cleared = TRUE;
- d->clearing = FALSE;
+ d->cleared = true;
+ d->clearing = false;
}
/*!
@@ -4187,11 +4183,11 @@ void TQIconView::setItemTextPos( ItemTextPos pos )
TQIconViewItem *item = d->firstItem;
for ( ; item; item = item->next ) {
- item->wordWrapDirty = TRUE;
+ item->wordWrapDirty = true;
item->calcRect();
}
- arrangeItemsInGrid( TRUE );
+ arrangeItemsInGrid( true );
}
TQIconView::ItemTextPos TQIconView::itemTextPos() const
@@ -4232,10 +4228,10 @@ void TQIconView::setArrangement( Arrangement am )
d->arrangement = am;
- viewport()->setUpdatesEnabled( FALSE );
+ viewport()->setUpdatesEnabled( false );
resizeContents( viewport()->width(), viewport()->height() );
- viewport()->setUpdatesEnabled( TRUE );
- arrangeItemsInGrid( TRUE );
+ viewport()->setUpdatesEnabled( true );
+ arrangeItemsInGrid( true );
}
TQIconView::Arrangement TQIconView::arrangement() const
@@ -4308,7 +4304,7 @@ int TQIconView::maxItemTextLength() const
\property TQIconView::itemsMovable
\brief whether the user is allowed to move items around in the icon view
- The default is TRUE.
+ The default is true.
*/
void TQIconView::setItemsMovable( bool b )
@@ -4325,7 +4321,7 @@ bool TQIconView::itemsMovable() const
\property TQIconView::autoArrange
\brief whether the icon view rearranges its items when a new item is inserted.
- The default is TRUE.
+ The default is true.
Note that if the icon view is not visible at the time of
insertion, TQIconView defers all position-related work until it is
@@ -4343,14 +4339,14 @@ bool TQIconView::autoArrange() const
}
/*!
- If \a sort is TRUE, this function sets the icon view to sort items
- when a new item is inserted. If \a sort is FALSE, the icon view
+ If \a sort is true, this function sets the icon view to sort items
+ when a new item is inserted. If \a sort is false, the icon view
will not be sorted.
- Note that autoArrange() must be TRUE for sorting to take place.
+ Note that autoArrange() must be true for sorting to take place.
- If \a ascending is TRUE (the default), items are sorted in
- ascending order. If \a ascending is FALSE, items are sorted in
+ If \a ascending is true (the default), items are sorted in
+ ascending order. If \a ascending is false, items are sorted in
descending order.
TQIconViewItem::compare() is used to compare pairs of items. The
@@ -4371,7 +4367,7 @@ void TQIconView::setSorting( bool sort, bool ascending )
\property TQIconView::sorting
\brief whether the icon view sorts on insertion
- The default is FALSE, i.e. no sorting on insertion.
+ The default is false, i.e. no sorting on insertion.
To set the sorting, use setSorting().
*/
@@ -4385,8 +4381,8 @@ bool TQIconView::sorting() const
\property TQIconView::sortDirection
\brief whether the sort direction for inserting new items is ascending;
- The default is TRUE (i.e. ascending). This sort direction is only
- meaningful if both sorting() and autoArrange() are TRUE.
+ The default is true (i.e. ascending). This sort direction is only
+ meaningful if both sorting() and autoArrange() are true.
To set the sort direction, use setSorting()
*/
@@ -4400,9 +4396,9 @@ bool TQIconView::sortDirection() const
\property TQIconView::wordWrapIconText
\brief whether the item text will be word-wrapped if it is too long
- The default is TRUE.
+ The default is true.
- If this property is FALSE, icon text that is too long is
+ If this property is false, icon text that is too long is
truncated, and an ellipsis (...) appended to indicate that
truncation has occurred. The full text can still be seen by the
user if they hover the mouse because the full text is shown in a
@@ -4416,10 +4412,10 @@ void TQIconView::setWordWrapIconText( bool b )
d->wordWrapIconText = b;
for ( TQIconViewItem *item = d->firstItem; item; item = item->next ) {
- item->wordWrapDirty = TRUE;
+ item->wordWrapDirty = true;
item->calcRect();
}
- arrangeItemsInGrid( TRUE );
+ arrangeItemsInGrid( true );
}
bool TQIconView::wordWrapIconText() const
@@ -4431,8 +4427,8 @@ bool TQIconView::wordWrapIconText() const
\property TQIconView::showToolTips
\brief whether the icon view will display a tool tip with the complete text for any truncated item text
- The default is TRUE. Note that this has no effect if
- setWordWrapIconText() is TRUE, as it is by default.
+ The default is true. Note that this has no effect if
+ setWordWrapIconText() is true, as it is by default.
*/
void TQIconView::setShowToolTips( bool b )
@@ -4460,8 +4456,8 @@ void TQIconView::contentsMousePressEventEx( TQMouseEvent *e )
delete d->rubber;
d->rubber = 0;
- repaintContents( r, FALSE );
- d->dragging = FALSE;
+ repaintContents( r, false );
+ d->dragging = false;
delete d->backrubber;
d->backrubber = 0;
@@ -4498,10 +4494,10 @@ void TQIconView::contentsMousePressEventEx( TQMouseEvent *e )
if ( e->button() == LeftButton && !( e->state() & ShiftButton ) &&
!( e->state() & ControlButton ) && item && item->isSelected() &&
- item->textRect( FALSE ).contains( e->pos() ) ) {
+ item->textRect( false ).contains( e->pos() ) ) {
if ( !item->renameEnabled() ) {
- d->mousePressed = TRUE;
+ d->mousePressed = true;
#ifndef TQT_NO_TEXTEDIT
} else {
ensureItemVisible( item );
@@ -4516,17 +4512,17 @@ void TQIconView::contentsMousePressEventEx( TQMouseEvent *e )
if ( item && item->isSelectable() ) {
if ( d->selectionMode == Single )
- item->setSelected( TRUE, e->state() & ControlButton );
+ item->setSelected( true, e->state() & ControlButton );
else if ( d->selectionMode == Multi )
item->setSelected( !item->isSelected(), e->state() & ControlButton );
else if ( d->selectionMode == Extended ) {
if ( e->state() & ShiftButton ) {
- d->pressedSelected = FALSE;
+ d->pressedSelected = false;
bool block = signalsBlocked();
- blockSignals( TRUE );
- viewport()->setUpdatesEnabled( FALSE );
+ blockSignals( true );
+ viewport()->setUpdatesEnabled( false );
TQRect r;
- bool select = TRUE;
+ bool select = true;
if ( d->currentItem )
r = TQRect( TQMIN( d->currentItem->x(), item->x() ),
TQMIN( d->currentItem->y(), item->y() ),
@@ -4544,16 +4540,16 @@ void TQIconView::contentsMousePressEventEx( TQMouseEvent *e )
r.setHeight( d->currentItem->y() - item->y() + d->currentItem->height() );
r = r.normalize();
TQIconViewPrivate::ItemContainer *c = d->firstContainer;
- bool alreadyIntersected = FALSE;
+ bool alreadyIntersected = false;
TQRect redraw;
for ( ; c; c = c->n ) {
if ( c->rect.intersects( r ) ) {
- alreadyIntersected = TRUE;
+ alreadyIntersected = true;
TQIconViewItem *i = c->items.first();
for ( ; i; i = c->items.next() ) {
if ( r.intersects( i->rect() ) ) {
redraw = redraw.unite( i->rect() );
- i->setSelected( select, TRUE );
+ i->setSelected( select, true );
}
}
} else {
@@ -4562,35 +4558,35 @@ void TQIconView::contentsMousePressEventEx( TQMouseEvent *e )
}
}
redraw = redraw.unite( item->rect() );
- viewport()->setUpdatesEnabled( TRUE );
- repaintContents( redraw, FALSE );
+ viewport()->setUpdatesEnabled( true );
+ repaintContents( redraw, false );
}
blockSignals( block );
- viewport()->setUpdatesEnabled( TRUE );
- item->setSelected( select, TRUE );
+ viewport()->setUpdatesEnabled( true );
+ item->setSelected( select, true );
emit selectionChanged();
} else if ( e->state() & ControlButton ) {
- d->pressedSelected = FALSE;
+ d->pressedSelected = false;
item->setSelected( !item->isSelected(), e->state() & ControlButton );
} else {
- item->setSelected( TRUE, e->state() & ControlButton );
+ item->setSelected( true, e->state() & ControlButton );
}
}
} else if ( ( d->selectionMode != Single || e->button() == RightButton )
&& !( e->state() & ControlButton ) )
- selectAll( FALSE );
+ selectAll( false );
setCurrentItem( item );
- d->canStartRubber = FALSE;
+ d->canStartRubber = false;
if ( e->button() == LeftButton ) {
if ( !item && ( d->selectionMode == Multi || d->selectionMode == Extended ) ) {
- d->canStartRubber = TRUE;
+ d->canStartRubber = true;
d->rubberStartX = e->x();
d->rubberStartY = e->y();
}
- d->mousePressed = TRUE;
+ d->mousePressed = true;
}
emit_signals:
@@ -4619,7 +4615,7 @@ void TQIconView::contentsContextMenuEvent( TQContextMenuEvent *e )
TQRect r = item ? item->rect() : TQRect( 0, 0, visibleWidth(), visibleHeight() );
emit contextMenuRequested( item, viewport()->mapToGlobal( contentsToViewport( r.center() ) ) );
} else {
- d->mousePressed = FALSE;
+ d->mousePressed = false;
TQIconViewItem *item = findItem( e->pos() );
emit contextMenuRequested( item, e->globalPos() );
}
@@ -4634,21 +4630,21 @@ void TQIconView::contentsMouseReleaseEvent( TQMouseEvent *e )
TQIconViewItem *item = findItem( e->pos() );
d->selectedItems.clear();
- bool emitClicked = TRUE;
- d->mousePressed = FALSE;
+ bool emitClicked = true;
+ d->mousePressed = false;
d->startDragItem = 0;
- d->canStartRubber = FALSE;
+ d->canStartRubber = false;
if ( d->rubber ) {
TQRect r(d->rubber->normalize());
if ( ( d->rubber->topLeft() - d->rubber->bottomRight() ).manhattanLength() >
TQApplication::startDragDistance() )
- emitClicked = FALSE;
+ emitClicked = false;
delete d->rubber;
d->rubber = 0;
- repaintContents(r, FALSE);
- d->dragging = FALSE;
+ repaintContents(r, false);
+ d->dragging = false;
delete d->backrubber;
d->backrubber = 0;
d->currentItem = d->tmpCurrentItem;
@@ -4668,11 +4664,11 @@ void TQIconView::contentsMouseReleaseEvent( TQMouseEvent *e )
d->currentItem == d->pressedItem &&
d->pressedSelected && d->currentItem ) {
bool block = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
clearSelection();
blockSignals( block );
if ( d->currentItem->isSelectable() ) {
- d->currentItem->selected = TRUE;
+ d->currentItem->selected = true;
repaintItem( d->currentItem );
}
emit selectionChanged();
@@ -4704,7 +4700,7 @@ void TQIconView::contentsMouseMoveEvent( TQMouseEvent *e )
}
if ( d->mousePressed && e->state() == NoButton )
- d->mousePressed = FALSE;
+ d->mousePressed = false;
if ( d->startDragItem )
item = d->startDragItem;
@@ -4712,12 +4708,12 @@ void TQIconView::contentsMouseMoveEvent( TQMouseEvent *e )
if ( d->mousePressed && item && item == d->currentItem &&
( item->isSelected() || d->selectionMode == NoSelection ) && item->dragEnabled() ) {
if ( !d->startDragItem ) {
- d->currentItem->setSelected( TRUE, TRUE );
+ d->currentItem->setSelected( true, true );
d->startDragItem = item;
}
if ( ( d->dragStartPos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() ) {
- d->mousePressed = FALSE;
- d->cleared = FALSE;
+ d->mousePressed = false;
+ d->cleared = false;
#ifndef TQT_NO_DRAGANDDROP
startDrag();
#endif
@@ -4726,7 +4722,7 @@ void TQIconView::contentsMouseMoveEvent( TQMouseEvent *e )
}
} else if ( d->mousePressed && ((!d->currentItem && d->rubber) || d->canStartRubber) ) {
if ( d->canStartRubber ) {
- d->canStartRubber = FALSE;
+ d->canStartRubber = false;
d->tmpCurrentItem = d->currentItem;
d->currentItem = 0;
repaintItem( d->tmpCurrentItem );
@@ -4752,8 +4748,8 @@ void TQIconView::contentsMouseDoubleClickEvent( TQMouseEvent *e )
{
TQIconViewItem *item = findItem( e->pos() );
if ( item ) {
- selectAll( FALSE );
- item->setSelected( TRUE, TRUE );
+ selectAll( false );
+ item->setSelected( true, true );
emit doubleClicked( item );
}
}
@@ -4765,14 +4761,14 @@ void TQIconView::contentsMouseDoubleClickEvent( TQMouseEvent *e )
#ifndef TQT_NO_DRAGANDDROP
void TQIconView::contentsDragEnterEvent( TQDragEnterEvent *e )
{
- d->dragging = TRUE;
- d->drawDragShapes = TRUE;
+ d->dragging = true;
+ d->drawDragShapes = true;
d->tmpCurrentItem = 0;
initDragEnter( e );
d->oldDragPos = e->pos();
- d->oldDragAcceptAction = FALSE;
+ d->oldDragAcceptAction = false;
drawDragShapes( e->pos() );
- d->dropped = FALSE;
+ d->dropped = false;
}
/*!
@@ -4790,7 +4786,7 @@ void TQIconView::contentsDragMoveEvent( TQDragMoveEvent *e )
}
drawDragShapes( d->oldDragPos );
- d->dragging = FALSE;
+ d->dragging = false;
TQIconViewItem *old = d->tmpCurrentItem;
d->tmpCurrentItem = 0;
@@ -4807,10 +4803,10 @@ void TQIconView::contentsDragMoveEvent( TQDragMoveEvent *e )
if ( !item->rect().contains(d->oldDragPos) )
item->dragEntered();
if (item->acceptDrop(e) || (item->isSelected() && e->source() == viewport())) {
- d->oldDragAcceptAction = TRUE;
+ d->oldDragAcceptAction = true;
e->acceptAction();
} else {
- d->oldDragAcceptAction = FALSE;
+ d->oldDragAcceptAction = false;
e->ignore();
}
@@ -4822,7 +4818,7 @@ void TQIconView::contentsDragMoveEvent( TQDragMoveEvent *e )
p.end();
} else {
e->acceptAction();
- d->oldDragAcceptAction = TRUE;
+ d->oldDragAcceptAction = true;
if ( old ) {
old->dragLeft();
repaintItem( old );
@@ -4831,7 +4827,7 @@ void TQIconView::contentsDragMoveEvent( TQDragMoveEvent *e )
d->oldDragPos = e->pos();
drawDragShapes( e->pos() );
- d->dragging = TRUE;
+ d->dragging = true;
}
/*!
@@ -4842,7 +4838,7 @@ void TQIconView::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
if ( !d->dropped )
drawDragShapes( d->oldDragPos );
- d->dragging = FALSE;
+ d->dragging = false;
if ( d->tmpCurrentItem ) {
repaintItem( d->tmpCurrentItem );
@@ -4850,7 +4846,7 @@ void TQIconView::contentsDragLeaveEvent( TQDragLeaveEvent * )
}
d->tmpCurrentItem = 0;
- d->isIconDrag = FALSE;
+ d->isIconDrag = false;
d->iconDragData.clear();
}
@@ -4860,8 +4856,8 @@ void TQIconView::contentsDragLeaveEvent( TQDragLeaveEvent * )
void TQIconView::contentsDropEvent( TQDropEvent *e )
{
- d->dropped = TRUE;
- d->dragging = FALSE;
+ d->dropped = true;
+ d->dragging = false;
drawDragShapes( d->oldDragPos );
if ( d->tmpCurrentItem )
@@ -4880,7 +4876,7 @@ void TQIconView::contentsDropEvent( TQDropEvent *e )
int h = d->currentItem->y() + d->currentItem->height() + 1;
repaintItem( d->currentItem );
- repaintContents( r.x(), r.y(), r.width(), r.height(), FALSE );
+ repaintContents( r.x(), r.y(), r.width(), r.height(), false );
int dx = d->currentItem->x() - r.x();
int dy = d->currentItem->y() - r.y();
@@ -4896,11 +4892,11 @@ void TQIconView::contentsDropEvent( TQDropEvent *e )
w = TQMAX( w, item->x() + item->width() + 1 );
h = TQMAX( h, item->y() + item->height() + 1 );
}
- repaintContents( rr, FALSE );
- bool fullRepaint = FALSE;
+ repaintContents( rr, false );
+ bool fullRepaint = false;
if ( w > contentsWidth() ||
h > contentsHeight() )
- fullRepaint = TRUE;
+ fullRepaint = true;
int oldw = contentsWidth();
int oldh = contentsHeight();
@@ -4909,8 +4905,8 @@ void TQIconView::contentsDropEvent( TQDropEvent *e )
if ( fullRepaint ) {
- repaintContents( oldw, 0, contentsWidth() - oldw, contentsHeight(), FALSE );
- repaintContents( 0, oldh, contentsWidth(), contentsHeight() - oldh, FALSE );
+ repaintContents( oldw, 0, contentsWidth() - oldw, contentsHeight(), false );
+ repaintContents( 0, oldh, contentsWidth(), contentsHeight() - oldh, false );
}
e->acceptAction();
} else if ( !i && ( e->source() != viewport() || d->cleared ) ) {
@@ -4934,7 +4930,7 @@ void TQIconView::contentsDropEvent( TQDropEvent *e )
}
i->dropped( e, lst );
}
- d->isIconDrag = FALSE;
+ d->isIconDrag = false;
}
#endif
@@ -4987,14 +4983,14 @@ void TQIconView::resizeEvent( TQResizeEvent* e )
{
TQScrollView::resizeEvent( e );
if ( d->resizeMode == Adjust ) {
- optimize_layout = TRUE;
+ optimize_layout = true;
adjustItems();
- optimize_layout = FALSE;
+ optimize_layout = false;
#if 0 // no need for timer delay anymore
d->oldSize = e->oldSize();
if ( d->adjustTimer->isActive() )
d->adjustTimer->stop();
- d->adjustTimer->start( 0, TRUE );
+ d->adjustTimer->start( 0, true );
#endif
}
}
@@ -5008,7 +5004,7 @@ void TQIconView::adjustItems()
{
d->adjustTimer->stop();
if ( d->resizeMode == Adjust )
- arrangeItemsInGrid( TRUE );
+ arrangeItemsInGrid( true );
}
/*!
@@ -5023,11 +5019,11 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
if ( !d->currentItem ) {
setCurrentItem( d->firstItem );
if ( d->selectionMode == Single )
- d->currentItem->setSelected( TRUE, TRUE );
+ d->currentItem->setSelected( true, true );
return;
}
- bool selectCurrent = TRUE;
+ bool selectCurrent = true;
switch ( e->key() ) {
case Key_Escape:
@@ -5048,7 +5044,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
if ( !d->firstItem )
break;
- selectCurrent = FALSE;
+ selectCurrent = false;
TQIconViewItem *item = 0;
TQIconViewPrivate::ItemContainer *c = d->firstContainer;
@@ -5062,15 +5058,15 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
if ( d->arrangement == LeftToRight ) {
// we use pixmap so the items textlength are ignored
// find topmost, leftmost item
- if ( i->pixmapRect( FALSE ).y() < item->pixmapRect( FALSE ).y() ||
- ( i->pixmapRect( FALSE ).y() == item->pixmapRect( FALSE ).y() &&
- i->pixmapRect( FALSE ).x() < item->pixmapRect( FALSE ).x() ) )
+ if ( i->pixmapRect( false ).y() < item->pixmapRect( false ).y() ||
+ ( i->pixmapRect( false ).y() == item->pixmapRect( false ).y() &&
+ i->pixmapRect( false ).x() < item->pixmapRect( false ).x() ) )
item = i;
} else {
// find leftmost, topmost item
- if ( i->pixmapRect( FALSE ).x() < item->pixmapRect( FALSE ).x() ||
- ( i->pixmapRect( FALSE ).x() == item->pixmapRect( FALSE ).x() &&
- i->pixmapRect( FALSE ).y() < item->pixmapRect( FALSE ).y() ) )
+ if ( i->pixmapRect( false ).x() < item->pixmapRect( false ).x() ||
+ ( i->pixmapRect( false ).x() == item->pixmapRect( false ).x() &&
+ i->pixmapRect( false ).y() < item->pixmapRect( false ).y() ) )
item = i;
}
}
@@ -5084,7 +5080,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
setCurrentItem( item );
ensureItemVisible( item );
handleItemChange( old, e->state() & ShiftButton,
- e->state() & ControlButton, TRUE );
+ e->state() & ControlButton, true );
}
} break;
@@ -5093,7 +5089,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
if ( !d->lastItem )
break;
- selectCurrent = FALSE;
+ selectCurrent = false;
TQIconViewItem *item = 0;
TQIconViewPrivate::ItemContainer *c = d->lastContainer;
@@ -5106,15 +5102,15 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
} else {
if ( d->arrangement == LeftToRight ) {
// find bottommost, rightmost item
- if ( i->pixmapRect( FALSE ).bottom() > item->pixmapRect( FALSE ).bottom() ||
- ( i->pixmapRect( FALSE ).bottom() == item->pixmapRect( FALSE ).bottom() &&
- i->pixmapRect( FALSE ).right() > item->pixmapRect( FALSE ).right() ) )
+ if ( i->pixmapRect( false ).bottom() > item->pixmapRect( false ).bottom() ||
+ ( i->pixmapRect( false ).bottom() == item->pixmapRect( false ).bottom() &&
+ i->pixmapRect( false ).right() > item->pixmapRect( false ).right() ) )
item = i;
} else {
// find rightmost, bottommost item
- if ( i->pixmapRect( FALSE ).right() > item->pixmapRect( FALSE ).right() ||
- ( i->pixmapRect( FALSE ).right() == item->pixmapRect( FALSE ).right() &&
- i->pixmapRect( FALSE ).bottom() > item->pixmapRect( FALSE ).bottom() ) )
+ if ( i->pixmapRect( false ).right() > item->pixmapRect( false ).right() ||
+ ( i->pixmapRect( false ).right() == item->pixmapRect( false ).right() &&
+ i->pixmapRect( false ).bottom() > item->pixmapRect( false ).bottom() ) )
item = i;
}
}
@@ -5128,7 +5124,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
setCurrentItem( item );
ensureItemVisible( item );
handleItemChange( old, e->state() & ShiftButton,
- e->state() & ControlButton, TRUE );
+ e->state() & ControlButton, true );
}
} break;
@@ -5137,7 +5133,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
if ( d->selectionMode == Single)
break;
- d->currentItem->setSelected( !d->currentItem->isSelected(), TRUE );
+ d->currentItem->setSelected( !d->currentItem->isSelected(), true );
} break;
case Key_Enter:
@@ -5148,7 +5144,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
case Key_Right: {
d->currInputString = TQString::null;
- selectCurrent = FALSE;
+ selectCurrent = false;
Direction dir = DirRight;
TQIconViewItem *item = findItem(dir, d->currentItem);
if (item) {
@@ -5161,7 +5157,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
case Key_Left: {
d->currInputString = TQString::null;
- selectCurrent = FALSE;
+ selectCurrent = false;
Direction dir = DirLeft;
TQIconViewItem *item = findItem(dir, d->currentItem);
if (item) {
@@ -5174,7 +5170,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
case Key_Down: {
d->currInputString = TQString::null;
- selectCurrent = FALSE;
+ selectCurrent = false;
Direction dir = DirDown;
TQIconViewItem *item = findItem(dir, d->currentItem);
if (item) {
@@ -5187,7 +5183,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
case Key_Up: {
d->currInputString = TQString::null;
- selectCurrent = FALSE;
+ selectCurrent = false;
Direction dir = DirUp;
TQIconViewItem *item = findItem(dir, d->currentItem);
if (item) {
@@ -5200,7 +5196,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
case Key_Next: {
d->currInputString = TQString::null;
- selectCurrent = FALSE;
+ selectCurrent = false;
TQRect r;
if ( d->arrangement == LeftToRight )
r = TQRect( 0, d->currentItem->y() + visibleHeight(), contentsWidth(), visibleHeight() );
@@ -5223,7 +5219,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
case Key_Prior: {
d->currInputString = TQString::null;
- selectCurrent = FALSE;
+ selectCurrent = false;
TQRect r;
if ( d->arrangement == LeftToRight )
r = TQRect( 0, d->currentItem->y() - visibleHeight(), contentsWidth(), visibleHeight() );
@@ -5246,7 +5242,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
default:
if ( !e->text().isEmpty() && e->text()[ 0 ].isPrint() ) {
- selectCurrent = FALSE;
+ selectCurrent = false;
TQIconViewItem *i = d->currentItem;
if ( !i )
i = d->firstItem;
@@ -5272,28 +5268,28 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
if ( i ) {
setCurrentItem( i );
if ( d->selectionMode == Extended ) {
- bool changed = FALSE;
+ bool changed = false;
bool block = signalsBlocked();
- blockSignals( TRUE );
- selectAll( FALSE );
+ blockSignals( true );
+ selectAll( false );
blockSignals( block );
if ( !i->selected && i->isSelectable() ) {
- changed = TRUE;
- i->selected = TRUE;
+ changed = true;
+ i->selected = true;
repaintItem( i );
}
if ( changed )
emit selectionChanged();
}
}
- d->inputTimer->start( 400, TRUE );
+ d->inputTimer->start( 400, true );
} else {
- selectCurrent = FALSE;
+ selectCurrent = false;
d->currInputString = TQString::null;
if ( e->state() & ControlButton ) {
switch ( e->key() ) {
case Key_A:
- selectAll( TRUE );
+ selectAll( true );
break;
}
}
@@ -5307,7 +5303,7 @@ void TQIconView::keyPressEvent( TQKeyEvent *e )
if ( d->currentItem && !d->currentItem->isSelected() &&
d->selectionMode == Single && selectCurrent ) {
- d->currentItem->setSelected( TRUE );
+ d->currentItem->setSelected( true );
}
ensureItemVisible( d->currentItem );
@@ -5509,8 +5505,8 @@ TQIconViewItem* TQIconView::findItem(Direction dir, const TQIconViewItem *fromIt
void TQIconView::focusInEvent( TQFocusEvent* )
{
- d->mousePressed = FALSE;
- d->inMenuMode = FALSE;
+ d->mousePressed = false;
+ d->inMenuMode = false;
if ( d->currentItem ) {
repaintItem( d->currentItem );
} else if ( d->firstItem && TQFocusEvent::reason() != TQFocusEvent::Mouse ) {
@@ -5523,7 +5519,7 @@ void TQIconView::focusInEvent( TQFocusEvent* )
repaintSelectedItems();
if ( d->currentItem )
- setMicroFocusHint( d->currentItem->x(), d->currentItem->y(), d->currentItem->width(), d->currentItem->height(), FALSE );
+ setMicroFocusHint( d->currentItem->x(), d->currentItem->y(), d->currentItem->width(), d->currentItem->height(), false );
}
/*!
@@ -5586,21 +5582,21 @@ TQDragObject *TQIconView::dragObject()
if ( d->selectionMode == NoSelection ) {
TQIconViewItem *item = d->currentItem;
drag->append( TQIconDragItem(),
- TQRect( item->pixmapRect( FALSE ).x() - orig.x(),
- item->pixmapRect( FALSE ).y() - orig.y(),
+ TQRect( item->pixmapRect( false ).x() - orig.x(),
+ item->pixmapRect( false ).y() - orig.y(),
item->pixmapRect().width(), item->pixmapRect().height() ),
- TQRect( item->textRect( FALSE ).x() - orig.x(),
- item->textRect( FALSE ).y() - orig.y(),
+ TQRect( item->textRect( false ).x() - orig.x(),
+ item->textRect( false ).y() - orig.y(),
item->textRect().width(), item->textRect().height() ) );
} else {
for ( TQIconViewItem *item = d->firstItem; item; item = item->next ) {
if ( item->isSelected() ) {
drag->append( TQIconDragItem(),
- TQRect( item->pixmapRect( FALSE ).x() - orig.x(),
- item->pixmapRect( FALSE ).y() - orig.y(),
+ TQRect( item->pixmapRect( false ).x() - orig.x(),
+ item->pixmapRect( false ).y() - orig.y(),
item->pixmapRect().width(), item->pixmapRect().height() ),
- TQRect( item->textRect( FALSE ).x() - orig.x(),
- item->textRect( FALSE ).y() - orig.y(),
+ TQRect( item->textRect( false ).x() - orig.x(),
+ item->textRect( false ).y() - orig.y(),
item->textRect().width(), item->textRect().height() ) );
}
}
@@ -5622,7 +5618,7 @@ void TQIconView::startDrag()
d->dragStart = TQPoint( orig.x() - d->startDragItem->x(),
orig.y() - d->startDragItem->y() );
d->startDragItem = 0;
- d->mousePressed = FALSE;
+ d->mousePressed = false;
d->pressedItem = 0;
d->pressedSelected = 0;
@@ -5653,7 +5649,7 @@ void TQIconView::insertInGrid( TQIconViewItem *item )
// #### make this efficient - but it's not too dramatic
int y = d->spacing;
- item->dirty = FALSE;
+ item->dirty = false;
if ( item == d->firstItem ) {
bool dummy;
makeRowLayout( item, y, dummy );
@@ -5671,7 +5667,7 @@ void TQIconView::insertInGrid( TQIconViewItem *item )
begin = begin->next;
}
- item->dirty = FALSE;
+ item->dirty = false;
} else {
TQRegion r( TQRect( 0, 0, TQMAX( contentsWidth(), visibleWidthSB() ),
TQMAX( contentsHeight(), visibleHeightSB() ) ) );
@@ -5685,7 +5681,7 @@ void TQIconView::insertInGrid( TQIconViewItem *item )
TQMemArray<TQRect> rects = r.rects();
TQMemArray<TQRect>::Iterator it = rects.begin();
- bool foundPlace = FALSE;
+ bool foundPlace = false;
for ( ; it != rects.end(); ++it ) {
TQRect rect = *it;
if ( rect.width() >= item->width() &&
@@ -5696,7 +5692,7 @@ void TQIconView::insertInGrid( TQIconViewItem *item )
if ( rect.height() >= item->height() + d->spacing )
sy = d->spacing;
item->move( rect.x() + sx, rect.y() + sy );
- foundPlace = TRUE;
+ foundPlace = true;
break;
}
}
@@ -5706,7 +5702,7 @@ void TQIconView::insertInGrid( TQIconViewItem *item )
resizeContents( TQMAX( contentsWidth(), item->x() + item->width() ),
TQMAX( contentsHeight(), item->y() + item->height() ) );
- item->dirty = FALSE;
+ item->dirty = false;
}
}
@@ -5749,7 +5745,7 @@ void TQIconView::drawDragShapes( const TQPoint &pos )
return;
if ( !d->drawDragShapes ) {
- d->drawDragShapes = TRUE;
+ d->drawDragShapes = true;
return;
}
@@ -5801,7 +5797,7 @@ void TQIconView::initDragEnter( TQDropEvent *e )
{
if ( TQIconDrag::canDecode( e ) ) {
TQIconDragPrivate::decode( e, d->iconDragData );
- d->isIconDrag = TRUE;
+ d->isIconDrag = true;
} else if ( TQUriDrag::canDecode( e ) ) {
TQStrList lst;
TQUriDrag::decode( e, lst );
@@ -5839,13 +5835,13 @@ bool TQIconView::eventFilter( TQObject * o, TQEvent * e )
switch( e->type() ) {
case TQEvent::FocusIn:
focusInEvent( (TQFocusEvent*)e );
- return TRUE;
+ return true;
case TQEvent::FocusOut:
focusOutEvent( (TQFocusEvent*)e );
- return TRUE;
+ return true;
case TQEvent::Enter:
enterEvent( e );
- return TRUE;
+ return true;
case TQEvent::Paint:
if ( o == viewport() ) {
if ( d->dragging ) {
@@ -5858,7 +5854,7 @@ bool TQIconView::eventFilter( TQObject * o, TQEvent * e )
bufferedPaintEvent( (TQPaintEvent*)e );
}
}
- return TRUE;
+ return true;
default:
// nothing
break;
@@ -5920,12 +5916,12 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
TQIconViewItem *end = 0;
// Find the first visible item
- while (begin->next && (begin->isVisible() == FALSE)) {
+ while (begin->next && (begin->isVisible() == false)) {
begin = begin->next;
}
bool reverse = TQApplication::reverseLayout();
- changed = FALSE;
+ changed = false;
if ( d->arrangement == LeftToRight ) {
@@ -5939,7 +5935,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
x += d->spacing + item->width();
if ( x > visibleWidthSB() && item != begin ) {
item = item->prev;
- while (item && (item->isVisible() == FALSE)) {
+ while (item && (item->isVisible() == false)) {
item = item->prev;
}
break;
@@ -5948,7 +5944,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
ih = TQMAX( ih, item->pixmapRect().height() );
TQIconViewItem *old = item;
item = item->next;
- while (item && (item->isVisible() == FALSE)) {
+ while (item && (item->isVisible() == false)) {
item = item->next;
}
if ( !item ) {
@@ -5964,7 +5960,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
// now move the items
item = begin;
for (;;) {
- item->dirty = FALSE;
+ item->dirty = false;
int x;
if ( item == begin ) {
if ( reverse )
@@ -6006,7 +6002,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
}
if ( x > visibleWidthSB() && item != begin ) {
item = item->prev;
- while (item && (item->isVisible() == FALSE)) {
+ while (item && (item->isVisible() == false)) {
item = item->prev;
}
break;
@@ -6015,7 +6011,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
ih = TQMAX( ih, item->pixmapRect().height() );
TQIconViewItem *old = item;
item = item->next;
- while (item && (item->isVisible() == FALSE)) {
+ while (item && (item->isVisible() == false)) {
item = item->next;
}
if ( !item ) {
@@ -6033,7 +6029,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
i = 0;
sp = 0;
for (;;) {
- item->dirty = FALSE;
+ item->dirty = false;
int r = calcGridNum( item->width(), d->rastX );
if ( item == begin ) {
if ( d->itemTextPos == Bottom )
@@ -6058,7 +6054,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
if ( item == end )
break;
item = item->next;
- while (item && (item->isVisible() == FALSE)) {
+ while (item && (item->isVisible() == false)) {
item = item->next;
}
}
@@ -6078,7 +6074,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
y += d->spacing + item->height();
if ( y > visibleHeightSB() && item != begin ) {
item = item->prev;
- while (item && (item->isVisible() == FALSE)) {
+ while (item && (item->isVisible() == false)) {
item = item->prev;
}
break;
@@ -6086,7 +6082,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
w = TQMAX( w, item->width() );
TQIconViewItem *old = item;
item = item->next;
- while (item && (item->isVisible() == FALSE)) {
+ while (item && (item->isVisible() == false)) {
item = item->next;
}
if ( !item ) {
@@ -6103,7 +6099,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
item = begin;
TQIconViewItem *prevVisibleItem = NULL;
for (;;) {
- item->dirty = FALSE;
+ item->dirty = false;
if ( d->itemTextPos == Bottom ) {
if ( item == begin )
changed = item->move( x + ( w - item->width() ) / 2, d->spacing ) || changed;
@@ -6120,7 +6116,7 @@ TQIconViewItem *TQIconView::makeRowLayout( TQIconViewItem *begin, int &y, bool &
break;
prevVisibleItem = item;
item = item->next;
- while (item && (item->isVisible() == FALSE)) {
+ while (item && (item->isVisible() == false)) {
item = item->next;
}
}
@@ -6160,7 +6156,7 @@ TQIconViewItem *TQIconView::rowBegin( TQIconViewItem * ) const
/*!
Sorts and rearranges all the items in the icon view. If \a
- ascending is TRUE, the items are sorted in increasing order,
+ ascending is true, the items are sorted in increasing order,
otherwise they are sorted in decreasing order.
TQIconViewItem::compare() is used to compare pairs of items. The
@@ -6225,7 +6221,7 @@ void TQIconView::sort( bool ascending )
delete [] items;
- arrangeItemsInGrid( TRUE );
+ arrangeItemsInGrid( true );
}
/*!
@@ -6243,11 +6239,11 @@ TQSize TQIconView::sizeHint() const
( (TQIconView*)this )->resizeContents( TQMAX( 400, contentsWidth() ),
TQMAX( 400, contentsHeight() ) );
if ( autoArrange() )
- ( (TQIconView*)this )->arrangeItemsInGrid( FALSE );
- d->firstSizeHint = FALSE;
+ ( (TQIconView*)this )->arrangeItemsInGrid( false );
+ d->firstSizeHint = false;
}
- d->dirty = TRUE; // ######## warwick: I'm sure this is wrong. Fixed in 2.3.
+ d->dirty = true; // ######## warwick: I'm sure this is wrong. Fixed in 2.3.
int extra = style().pixelMetric(TQStyle::PM_ScrollBarExtent,
verticalScrollBar()) + 2*frameWidth();
TQSize s( TQMIN(400, contentsWidth() + extra),
@@ -6310,7 +6306,7 @@ void TQIconView::updateItemContainer( TQIconViewItem *item )
}
const TQRect irect = item->rect();
- bool contains = FALSE;
+ bool contains = false;
for (;;) {
if ( c->rect.intersects( irect ) ) {
contains = c->rect.contains( irect );
@@ -6460,33 +6456,33 @@ void TQIconView::handleItemChange( TQIconViewItem *old, bool shift,
{
if ( d->selectionMode == Single ) {
bool block = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
if ( old )
- old->setSelected( FALSE );
+ old->setSelected( false );
blockSignals( block );
- d->currentItem->setSelected( TRUE, TRUE );
+ d->currentItem->setSelected( true, true );
} else if ( d->selectionMode == Extended ) {
if ( shift ) {
if ( !d->selectAnchor ) {
if ( old && !old->selected && old->isSelectable() ) {
- old->selected = TRUE;
+ old->selected = true;
repaintItem( old );
}
- d->currentItem->setSelected( TRUE, TRUE );
+ d->currentItem->setSelected( true, true );
} else {
TQIconViewItem *from = d->selectAnchor, *to = d->currentItem;
if ( !from || !to )
return;
// checking if it's downwards and if we span rows
- bool downwards = FALSE;
- bool spanning = FALSE;
+ bool downwards = false;
+ bool spanning = false;
if ( d->arrangement == LeftToRight) {
if ( from->rect().center().y() < to->rect().center().y() )
- downwards = TRUE;
+ downwards = true;
} else {
if ( from->rect().center().x() < to->rect().center().x() )
- downwards = TRUE;
+ downwards = true;
}
TQRect fr = from->rect();
@@ -6494,11 +6490,11 @@ void TQIconView::handleItemChange( TQIconViewItem *old, bool shift,
if ( d->arrangement == LeftToRight ) {
fr.moveTopLeft( TQPoint( tr.x(), fr.y() ) );
if ( !tr.intersects( fr ) )
- spanning = TRUE;
+ spanning = true;
} else {
fr.moveTopLeft( TQPoint( fr.x(), tr.y() ) );
if ( !tr.intersects( fr ) )
- spanning = TRUE;
+ spanning = true;
}
@@ -6532,31 +6528,31 @@ void TQIconView::handleItemChange( TQIconViewItem *old, bool shift,
// finding contained items and selecting them
TQIconViewItem *item = 0;
- bool changed = FALSE;
+ bool changed = false;
bool midValid = midRect.isValid();
bool topValid = topRect.isValid();
bool bottomValid = bottomRect.isValid();
TQRect selectedRect, unselectedRect;
for ( item = d->firstItem; item; item = item->next ) {
- bool contained = FALSE;
+ bool contained = false;
TQPoint itemCenter = item->rect().center();
if ( midValid && midRect.contains( itemCenter ) )
- contained = TRUE;
+ contained = true;
if ( !contained && topValid && topRect.contains( itemCenter ) )
- contained = TRUE;
+ contained = true;
if ( !contained && bottomValid && bottomRect.contains( itemCenter ) )
- contained = TRUE;
+ contained = true;
if ( contained ) {
if ( !item->selected && item->isSelectable() ) {
- changed = TRUE;
- item->selected = TRUE;
+ changed = true;
+ item->selected = true;
selectedRect = selectedRect.unite( item->rect() );
}
} else if ( item->selected && !control ) {
- item->selected = FALSE;
+ item->selected = false;
unselectedRect = unselectedRect.unite( item->rect() );
- changed = TRUE;
+ changed = true;
}
}
@@ -6580,14 +6576,14 @@ void TQIconView::handleItemChange( TQIconViewItem *old, bool shift,
emit selectionChanged();
}
} else if ( !control ) {
- blockSignals( TRUE );
- selectAll( FALSE );
- blockSignals( FALSE );
- d->currentItem->setSelected( TRUE, TRUE );
+ blockSignals( true );
+ selectAll( false );
+ blockSignals( false );
+ d->currentItem->setSelected( true, true );
}
} else {
if ( shift )
- d->currentItem->setSelected( !d->currentItem->isSelected(), TRUE );
+ d->currentItem->setSelected( !d->currentItem->isSelected(), true );
}
}
@@ -6629,8 +6625,8 @@ void TQIconView::windowActivationChange( bool oldActive )
}
/*!
- Returns TRUE if an iconview item is being renamed; otherwise
- returns FALSE.
+ Returns true if an iconview item is being renamed; otherwise
+ returns false.
*/
bool TQIconView::isRenaming() const
@@ -6638,7 +6634,7 @@ bool TQIconView::isRenaming() const
#ifndef TQT_NO_TEXTEDIT
return d->renamingItem && d->renamingItem->renameBox;
#else
- return FALSE;
+ return false;
#endif
}
diff --git a/src/widgets/tqiconview.h b/src/widgets/tqiconview.h
index 1be94b651..8f0b58661 100644
--- a/src/widgets/tqiconview.h
+++ b/src/widgets/tqiconview.h
@@ -180,8 +180,8 @@ public:
int height() const;
TQSize size() const;
TQPoint pos() const;
- TQRect textRect( bool relative = TRUE ) const;
- TQRect pixmapRect( bool relative = TRUE ) const;
+ TQRect textRect( bool relative = true ) const;
+ TQRect pixmapRect( bool relative = true ) const;
bool contains( const TQPoint& pnt ) const;
bool intersects( const TQRect& r ) const;
@@ -198,8 +198,8 @@ public:
#ifndef TQT_NO_PICTURE
virtual void setPicture( const TQPicture &icon );
#endif
- virtual void setText( const TQString &text, bool recalc, bool redraw = TRUE );
- virtual void setPixmap( const TQPixmap &icon, bool recalc, bool redraw = TRUE );
+ virtual void setText( const TQString &text, bool recalc, bool redraw = true );
+ virtual void setPixmap( const TQPixmap &icon, bool recalc, bool redraw = true );
virtual void setKey( const TQString &k );
virtual int rtti() const;
@@ -322,7 +322,7 @@ public:
TQIconViewItem *lastItem() const;
TQIconViewItem *currentItem() const;
virtual void setCurrentItem( TQIconViewItem *item );
- virtual void setSelected( TQIconViewItem *item, bool s, bool cb = FALSE );
+ virtual void setSelected( TQIconViewItem *item, bool s, bool cb = false );
uint count() const;
@@ -370,7 +370,7 @@ public:
virtual void setShowToolTips( bool b );
bool showToolTips() const;
- void setSorting( bool sort, bool ascending = TRUE );
+ void setSorting( bool sort, bool ascending = true );
bool sorting() const;
bool sortDirection() const;
@@ -384,7 +384,7 @@ public:
TQSize minimumSizeHint() const;
TQSize sizeHint() const;
- virtual void sort( bool ascending = TRUE );
+ virtual void sort( bool ascending = true );
virtual void setFont( const TQFont & );
virtual void setPalette( const TQPalette & );
@@ -392,8 +392,8 @@ public:
bool isRenaming() const;
public slots:
- virtual void arrangeItemsInGrid( const TQSize &grid, bool update = TRUE );
- virtual void arrangeItemsInGrid( bool update = TRUE );
+ virtual void arrangeItemsInGrid( const TQSize &grid, bool update = true );
+ virtual void arrangeItemsInGrid( bool update = true );
virtual void setContentsPos( int x, int y );
virtual void updateContents();
@@ -478,7 +478,7 @@ private:
void drawContents( TQPainter* );
TQIconViewItem* findItemByName( TQIconViewItem *start );
void handleItemChange( TQIconViewItem *old, bool shift,
- bool control, bool homeend = FALSE);
+ bool control, bool homeend = false);
int calcGridNum( int w, int x ) const;
TQIconViewItem *rowBegin( TQIconViewItem *item ) const;
diff --git a/src/widgets/tqlabel.cpp b/src/widgets/tqlabel.cpp
index 4550cda3e..c2b89f77b 100644
--- a/src/widgets/tqlabel.cpp
+++ b/src/widgets/tqlabel.cpp
@@ -229,8 +229,8 @@ void TQLabel::init()
#endif
align = AlignAuto | AlignVCenter | ExpandTabs;
extraMargin = -1;
- autoresize = FALSE;
- scaledcontents = FALSE;
+ autoresize = false;
+ scaledcontents = false;
textformat = TQt::AutoText;
#ifndef TQT_NO_RICHTEXT
doc = 0;
@@ -282,7 +282,7 @@ void TQLabel::setText( const TQString &text )
bool useRichText = (textformat == RichText ||
( ( textformat == AutoText ) && TQStyleSheet::mightBeRichText(ltext) ) );
#else
- bool useRichText = TRUE;
+ bool useRichText = true;
#endif
#ifndef TQT_NO_ACCEL
// ### Setting accelerators for rich text labels will not work.
@@ -333,7 +333,7 @@ void TQLabel::clear()
If no pixmap has been set this will return an invalid pixmap.
Setting the pixmap clears any previous content, and resizes the
- label if \l TQLabel::autoResize() is TRUE. The buddy accelerator,
+ label if \l TQLabel::autoResize() is true. The buddy accelerator,
if any, is disabled.
*/
void TQLabel::setPixmap( const TQPixmap &pixmap )
@@ -425,7 +425,7 @@ void TQLabel::setNum( double num )
labels. The \c BreakAnywhere flag is not supported in TQLabel.
If the label has a buddy, the \c ShowPrefix flag is forced to
- TRUE.
+ true.
The default alignment is \c{AlignAuto | AlignVCenter | ExpandTabs}
if the label doesn't have a buddy and \c{AlignAuto | AlignVCenter
@@ -489,7 +489,7 @@ void TQLabel::setIndent( int indent )
\obsolete
- Returns TRUE if auto-resizing is enabled, or FALSE if auto-resizing
+ Returns true if auto-resizing is enabled, or false if auto-resizing
is disabled.
Auto-resizing is disabled by default.
@@ -498,8 +498,8 @@ void TQLabel::setIndent( int indent )
*/
/*! \obsolete
- Enables auto-resizing if \a enable is TRUE, or disables it if \a
- enable is FALSE.
+ Enables auto-resizing if \a enable is true, or disables it if \a
+ enable is false.
When auto-resizing is enabled the label will resize itself to fit
the contents whenever the contents change. The top-left corner is
@@ -670,7 +670,7 @@ void TQLabel::resizeEvent( TQResizeEvent* e )
TQFrame::resizeEvent( e );
#ifdef TQT_NO_RICHTEXT
- static const bool doc = FALSE;
+ static const bool doc = false;
#endif
// optimize for standard labels
@@ -1154,7 +1154,7 @@ void TQLabel::fontChange( const TQFont & )
When enabled and the label shows a pixmap, it will scale the
pixmap to fill the available space.
- This property's default is FALSE.
+ This property's default is false.
\sa setScaledContents()
*/
diff --git a/src/widgets/tqlcdnumber.cpp b/src/widgets/tqlcdnumber.cpp
index e6dbf453c..ca768057a 100644
--- a/src/widgets/tqlcdnumber.cpp
+++ b/src/widgets/tqlcdnumber.cpp
@@ -130,10 +130,10 @@ static TQString int2string( int num, int base, int ndigits, bool *oflow )
TQString s;
bool negative;
if ( num < 0 ) {
- negative = TRUE;
+ negative = true;
num = -num;
} else {
- negative = FALSE;
+ negative = false;
}
switch( base ) {
case TQLCDNumber::HEX:
@@ -189,7 +189,7 @@ static TQString double2string( double num, int base, int ndigits, bool *oflow )
bool of = num >= 2147483648.0 || num < -2147483648.0;
if ( of ) { // oops, integer overflow
if ( oflow )
- *oflow = TRUE;
+ *oflow = true;
return s;
}
s = int2string( (int)num, base, ndigits, 0 );
@@ -344,7 +344,7 @@ void TQLCDNumber::init()
setFrameStyle( TQFrame::Box | TQFrame::Raised );
val = 0;
base = DEC;
- smallPoint = FALSE;
+ smallPoint = false;
setNumDigits( ndigits );
setSegmentStyle( Outline );
d = 0;
@@ -365,7 +365,7 @@ TQLCDNumber::~TQLCDNumber()
\brief the current number of digits displayed
Corresponds to the current number of digits. If \l
- TQLCDNumber::smallDecimalPoint is FALSE, the decimal point occupies
+ TQLCDNumber::smallDecimalPoint is false, the decimal point occupies
one digit position.
\sa numDigits, smallDecimalPoint
@@ -427,8 +427,8 @@ void TQLCDNumber::setNumDigits( int numDigits )
/*!
\overload
- Returns TRUE if \a num is too big to be displayed in its entirety;
- otherwise returns FALSE.
+ Returns true if \a num is too big to be displayed in its entirety;
+ otherwise returns false.
\sa display(), numDigits(), smallDecimalPoint()
*/
@@ -442,8 +442,8 @@ bool TQLCDNumber::checkOverflow( int num ) const
/*!
- Returns TRUE if \a num is too big to be displayed in its entirety;
- otherwise returns FALSE.
+ Returns true if \a num is too big to be displayed in its entirety;
+ otherwise returns false.
\sa display(), numDigits(), smallDecimalPoint()
*/
@@ -563,7 +563,7 @@ void TQLCDNumber::display( int num )
void TQLCDNumber::display( const TQString &s )
{
val = 0;
- bool ok = FALSE;
+ bool ok = false;
double v = s.toDouble( &ok );
if ( ok )
val = v;
@@ -626,9 +626,9 @@ void TQLCDNumber::setBinMode()
\property TQLCDNumber::smallDecimalPoint
\brief the style of the decimal point
- If TRUE the decimal point is drawn between two digit positions.
+ If true the decimal point is drawn between two digit positions.
Otherwise it occupies a digit position of its own, i.e. is drawn
- in a digit position. The default is FALSE.
+ in a digit position. The default is false.
The inter-digit space is made slightly wider when the decimal
point is drawn between the digits.
@@ -651,9 +651,9 @@ void TQLCDNumber::setSmallDecimalPoint( bool b )
void TQLCDNumber::drawContents( TQPainter *p )
{
if ( smallPoint )
- drawString( digitStr, *p, &points, FALSE );
+ drawString( digitStr, *p, &points, false );
else
- drawString( digitStr, *p, 0, FALSE );
+ drawString( digitStr, *p, 0, false );
}
@@ -680,7 +680,7 @@ void TQLCDNumber::internalSetString( const TQString& s )
buffer = s.right( ndigits ).rightJustify( ndigits, ' ' );
} else {
int index = -1;
- bool lastWasPoint = TRUE;
+ bool lastWasPoint = true;
newPoints.clearBit(0);
for ( i=0; i<len; i++ ) {
if ( s[i] == '.' ) {
@@ -691,14 +691,14 @@ void TQLCDNumber::internalSetString( const TQString& s )
buffer[index] = ' '; // 2 points in a row, add space
}
newPoints.setBit(index); // set decimal point
- lastWasPoint = TRUE;
+ lastWasPoint = true;
} else {
if ( index == ndigits - 1 )
break;
index++;
buffer[index] = s[i];
newPoints.clearBit(index); // decimal point default off
- lastWasPoint = FALSE;
+ lastWasPoint = false;
}
}
if ( index < ((int) ndigits) - 1 ) {
@@ -819,7 +819,7 @@ void TQLCDNumber::drawDigit( const TQPoint &pos, TQPainter &p, int segLen,
if ( updates[i][0] == draw )
drawSegment( pos, updates[i][1], p, segLen );
if (updates[i][0] == erase)
- drawSegment( pos, updates[i][1], p, segLen, TRUE );
+ drawSegment( pos, updates[i][1], p, segLen, true );
}
}
diff --git a/src/widgets/tqlcdnumber.h b/src/widgets/tqlcdnumber.h
index 83b92a0e0..f178a3423 100644
--- a/src/widgets/tqlcdnumber.h
+++ b/src/widgets/tqlcdnumber.h
@@ -111,11 +111,11 @@ private:
void internalDisplay( const TQString &);
void internalSetString( const TQString& s );
void drawString( const TQString& s, TQPainter &, TQBitArray * = 0,
- bool = TRUE );
+ bool = true );
//void drawString( const TQString &, TQPainter &, TQBitArray * = 0 ) const;
void drawDigit( const TQPoint &, TQPainter &, int, char,
char = ' ' );
- void drawSegment( const TQPoint &, char, TQPainter &, int, bool = FALSE );
+ void drawSegment( const TQPoint &, char, TQPainter &, int, bool = false );
int ndigits;
double val;
diff --git a/src/widgets/tqlineedit.cpp b/src/widgets/tqlineedit.cpp
index 94cc54bc8..8f7e944d0 100644
--- a/src/widgets/tqlineedit.cpp
+++ b/src/widgets/tqlineedit.cpp
@@ -125,7 +125,7 @@ struct TQLineEditPrivate : public TQt
int hscroll;
TQChar passwordChar; // obsolete
- void finishChange( int validateFromState = -1, bool setModified = TRUE );
+ void finishChange( int validateFromState = -1, bool setModified = true );
const TQValidator* validator;
struct MaskInputData {
@@ -138,12 +138,12 @@ struct TQLineEditPrivate : public TQt
TQChar blank;
MaskInputData *maskData;
inline int nextMaskBlank( int pos ) {
- int c = findInMask( pos, TRUE, FALSE );
+ int c = findInMask( pos, true, false );
separator |= ( c != pos );
return ( c != -1 ? c : maxLength );
}
inline int prevMaskBlank( int pos ) {
- int c = findInMask( pos, FALSE, FALSE );
+ int c = findInMask( pos, false, false );
separator |= ( c != pos );
return ( c != -1 ? c : 0 );
}
@@ -165,10 +165,10 @@ struct TQLineEditPrivate : public TQt
TQValueVector<Command> history;
void addCommand( const Command& cmd );
void insert( const TQString& s );
- void del( bool wasBackspace = FALSE );
+ void del( bool wasBackspace = false );
void remove( int pos );
- inline void separate() { separator = TRUE; }
+ inline void separate() { separator = true; }
inline void undo( int until = -1 ) {
if ( !isUndoAvailable() )
return;
@@ -201,7 +201,7 @@ struct TQLineEditPrivate : public TQt
}
}
modified = ( undoState != 0 );
- textDirty = TRUE;
+ textDirty = true;
}
inline void redo() {
if ( !isRedoAvailable() )
@@ -231,7 +231,7 @@ struct TQLineEditPrivate : public TQt
break;
}
}
- textDirty = TRUE;
+ textDirty = true;
}
inline bool isUndoAvailable() const { return !readOnly && undoState; }
inline bool isRedoAvailable() const { return !readOnly && undoState < (int)history.size(); }
@@ -246,16 +246,16 @@ struct TQLineEditPrivate : public TQt
inline void deselect() { selDirty |= (selend > selstart); selstart = selend = 0; }
void removeSelectedText();
#ifndef TQT_NO_CLIPBOARD
- void copy( bool clipboard = TRUE ) const;
+ void copy( bool clipboard = true ) const;
#endif
inline bool inSelection( int x ) const
- { if ( selstart >= selend ) return FALSE;
+ { if ( selstart >= selend ) return false;
int pos = xToPos( x, TQTextItem::OnCharacters ); return pos >= selstart && pos < selend; }
// masking
void parseInputMask( const TQString &maskFields );
bool isValidInput( TQChar key, TQChar mask ) const;
- TQString maskString( uint pos, const TQString &str, bool clear = FALSE ) const;
+ TQString maskString( uint pos, const TQString &str, bool clear = false ) const;
TQString clearString( uint pos, uint len ) const;
TQString stripString( const TQString &str ) const;
int findInMask( int pos, bool forward, bool findSeparator, TQChar searchChar = TQChar() ) const;
@@ -270,7 +270,7 @@ struct TQLineEditPrivate : public TQt
// complex text layout
TQTextLayout textLayout;
void updateTextLayout();
- void moveCursor( int pos, bool mark = FALSE );
+ void moveCursor( int pos, bool mark = false );
void setText( const TQString& txt );
int xToPosInternal( int x, TQTextItem::CursorPosition ) const;
int xToPos( int x, TQTextItem::CursorPosition = TQTextItem::BetweenCharacters ) const;
@@ -323,7 +323,7 @@ struct TQLineEditPrivate : public TQt
By default, TQLineEdits have a frame as specified by the Windows
and Motif style guides; you can turn it off by calling
- setFrame(FALSE).
+ setFrame(false).
The default key bindings are described below. The line edit also
provides a context menu (usually invoked by a right mouse click)
@@ -476,7 +476,7 @@ TQLineEdit::~TQLineEdit()
Note that setting this property clears the selection, clears the
undo/redo history, moves the cursor to the end of the line and
- resets the \c modified property to FALSE. The text is not
+ resets the \c modified property to false. The text is not
validated when inserted with setText().
The text is truncated to maxLength() length.
@@ -495,8 +495,8 @@ void TQLineEdit::setText( const TQString& text)
{
resetInputContext();
d->setText( text );
- d->modified = FALSE;
- d->finishChange( -1, FALSE );
+ d->modified = false;
+ d->finishChange( -1, false );
}
@@ -757,9 +757,9 @@ bool TQLineEdit::validateAndSet( const TQString &newText, int newPos,
d->selend = TQMAX( newMarkAnchor, newMarkDrag );
d->updateMicroFocusHint();
update();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -789,9 +789,9 @@ void TQLineEdit::setAlignment( int flag )
/*!
- Moves the cursor forward \a steps characters. If \a mark is TRUE
+ Moves the cursor forward \a steps characters. If \a mark is true
each character moved over is added to the selection; if \a mark is
- FALSE the selection is cleared.
+ false the selection is cleared.
\sa cursorBackward()
*/
@@ -811,9 +811,9 @@ void TQLineEdit::cursorForward( bool mark, int steps )
/*!
- Moves the cursor back \a steps characters. If \a mark is TRUE each
+ Moves the cursor back \a steps characters. If \a mark is true each
character moved over is added to the selection; if \a mark is
- FALSE the selection is cleared.
+ false the selection is cleared.
\sa cursorForward()
*/
@@ -823,7 +823,7 @@ void TQLineEdit::cursorBackward( bool mark, int steps )
}
/*!
- Moves the cursor one word forward. If \a mark is TRUE, the word is
+ Moves the cursor one word forward. If \a mark is true, the word is
also selected.
\sa cursorWordBackward()
@@ -834,7 +834,7 @@ void TQLineEdit::cursorWordForward( bool mark )
}
/*!
- Moves the cursor one word backward. If \a mark is TRUE, the word
+ Moves the cursor one word backward. If \a mark is true, the word
is also selected.
\sa cursorWordForward()
@@ -899,7 +899,7 @@ void TQLineEdit::del()
/*!
Moves the text cursor to the beginning of the line unless it is
- already there. If \a mark is TRUE, text is selected towards the
+ already there. If \a mark is true, text is selected towards the
first position; otherwise, any selected text is unselected if the
cursor is moved.
@@ -913,7 +913,7 @@ void TQLineEdit::home( bool mark )
/*!
Moves the text cursor to the end of the line unless it is already
- there. If \a mark is TRUE, text is selected towards the last
+ there. If \a mark is true, text is selected towards the last
position; otherwise, any selected text is unselected if the cursor
is moved.
@@ -931,18 +931,18 @@ void TQLineEdit::end( bool mark )
\brief whether the line edit's contents has been modified by the user
The modified flag is never read by TQLineEdit; it has a default value
- of FALSE and is changed to TRUE whenever the user changes the line
+ of false and is changed to true whenever the user changes the line
edit's contents.
This is useful for things that need to provide a default value but
do not start out knowing what the default should be (perhaps it
depends on other fields on the form). Start the line edit without
the best default, and when the default is known, if modified()
- returns FALSE (the user hasn't entered any text), insert the
+ returns false (the user hasn't entered any text), insert the
default value.
Calling clearModified() or setText() resets the modified flag to
- FALSE.
+ false.
*/
bool TQLineEdit::isModified() const
@@ -951,13 +951,13 @@ bool TQLineEdit::isModified() const
}
/*!
- Resets the modified flag to FALSE.
+ Resets the modified flag to false.
\sa isModified()
*/
void TQLineEdit::clearModified()
{
- d->modified = FALSE;
+ d->modified = false;
d->history.clear();
d->undoState = 0;
}
@@ -974,8 +974,8 @@ void TQLineEdit::setEdited( bool on ) { d->modified = on; }
\property TQLineEdit::hasSelectedText
\brief whether there is any text selected
- hasSelectedText() returns TRUE if some or all of the text has been
- selected by the user; otherwise returns FALSE.
+ hasSelectedText() returns true if some or all of the text has been
+ selected by the user; otherwise returns false.
\sa selectedText()
*/
@@ -1021,9 +1021,9 @@ bool TQLineEdit::getSelection( int *start, int *end )
if ( d->hasSelectedText() && start && end ) {
*start = d->selstart;
*end = d->selend;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -1098,25 +1098,25 @@ bool TQLineEdit::hasAcceptableInput() const
TQString text = d->text;
int cursor = d->cursor;
if ( d->validator && d->validator->validate( text, cursor ) != TQValidator::Acceptable )
- return FALSE;
+ return false;
#endif
if ( !d->maskData )
- return TRUE;
+ return true;
if ( d->text.length() != (uint)d->maxLength )
- return FALSE;
+ return false;
for ( uint i=0; i < (uint)d->maxLength; i++) {
if ( d->maskData[i].separator ) {
if ( d->text[(int)i] != d->maskData[i].maskChar )
- return FALSE;
+ return false;
} else {
if ( !d->isValidInput( d->text[(int)i], d->maskData[i].maskChar ) )
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
@@ -1199,7 +1199,7 @@ void TQLineEdit::setInputMask( const TQString &inputMask )
void TQLineEdit::selectAll()
{
d->selstart = d->selend = d->cursor = 0;
- d->moveCursor( d->text.length(), TRUE );
+ d->moveCursor( d->text.length(), true );
}
/*!
@@ -1262,7 +1262,7 @@ void TQLineEdit::undo()
{
resetInputContext();
d->undo();
- d->finishChange( -1, FALSE );
+ d->finishChange( -1, false );
}
/*!
@@ -1433,7 +1433,7 @@ bool TQLineEdit::event( TQEvent * e )
#ifndef TQT_NO_DRAGANDDROP
} else if ( timerId == d->dndTimer ) {
if( !d->drag() )
- return TRUE;
+ return true;
#endif
} else if ( timerId == d->tripleClickTimer ) {
killTimer( d->tripleClickTimer );
@@ -1499,7 +1499,7 @@ void TQLineEdit::mouseMoveEvent( TQMouseEvent * e )
} else
#endif
{
- d->moveCursor( d->xToPos( e->pos().x() ), TRUE );
+ d->moveCursor( d->xToPos( e->pos().x() ), true );
}
}
}
@@ -1523,7 +1523,7 @@ void TQLineEdit::mouseReleaseEvent( TQMouseEvent* e )
#ifndef TQT_NO_CLIPBOARD
if (TQApplication::clipboard()->supportsSelection() ) {
if ( e->button() == LeftButton ) {
- d->copy( FALSE );
+ d->copy( false );
} else if ( !d->readOnly && e->button() == MidButton ) {
d->deselect();
insert( TQApplication::clipboard()->text( TQClipboard::Selection ) );
@@ -1546,7 +1546,7 @@ void TQLineEdit::mouseDoubleClickEvent( TQMouseEvent* e )
int end = d->textLayout.nextCursorPosition( d->cursor, TQTextLayout::SkipWords );
while ( end > d->cursor && d->text[end-1].isSpace() )
--end;
- d->moveCursor( end, TRUE );
+ d->moveCursor( end, true );
d->tripleClickTimer = startTimer( TQApplication::doubleClickInterval() );
d->tripleClick = e->pos();
}
@@ -1574,7 +1574,7 @@ void TQLineEdit::mouseDoubleClickEvent( TQMouseEvent* e )
void TQLineEdit::keyPressEvent( TQKeyEvent * e )
{
- d->setCursorVisible( TRUE );
+ d->setCursorVisible( true );
if ( e->key() == Key_Enter || e->key() == Key_Return ) {
const TQValidator * v = d->validator;
if ( hasAcceptableInput() ) {
@@ -1620,7 +1620,7 @@ void TQLineEdit::keyPressEvent( TQKeyEvent * e )
return;
}
}
- bool unknown = FALSE;
+ bool unknown = false;
if ( e->state() & ControlButton ) {
switch ( e->key() ) {
case Key_A:
@@ -1688,13 +1688,13 @@ void TQLineEdit::keyPressEvent( TQKeyEvent * e )
#endif
case Key_Delete:
if ( !d->readOnly ) {
- cursorWordForward( TRUE );
+ cursorWordForward( true );
del();
}
break;
case Key_Backspace:
if ( !d->readOnly ) {
- cursorWordBackward( TRUE );
+ cursorWordBackward( true );
del();
}
break;
@@ -1725,7 +1725,7 @@ void TQLineEdit::keyPressEvent( TQKeyEvent * e )
redo();
break;
default:
- unknown = TRUE;
+ unknown = true;
}
} else { // ### check for *no* modifier
switch ( e->key() ) {
@@ -1771,7 +1771,7 @@ void TQLineEdit::keyPressEvent( TQKeyEvent * e )
if ( !d->readOnly && e->state() & ShiftButton )
paste();
else
- unknown = TRUE;
+ unknown = true;
break;
#endif
case Key_F14: // Undo key on Sun keyboards
@@ -1794,7 +1794,7 @@ void TQLineEdit::keyPressEvent( TQKeyEvent * e )
break;
#endif
default:
- unknown = TRUE;
+ unknown = true;
}
}
if ( e->key() == Key_Direction_L || e->key() == Key_Direction_R ) {
@@ -1827,10 +1827,10 @@ bool TQLineEdit::sendMouseEventToInputContext( TQMouseEvent *e )
TQWidget::sendMouseEventToInputContext( -1, e->type(),
e->button(), e->state() );
}
- return TRUE;
+ return true;
}
#endif
- return FALSE;
+ return false;
}
@@ -1875,7 +1875,7 @@ void TQLineEdit::imEndEvent( TQIMEvent *e )
}
d->text.remove( d->imstart, d->imend - d->imstart );
d->cursor = d->imselstart = d->imselend = d->imend = d->imstart;
- d->textDirty = TRUE;
+ d->textDirty = true;
insert( e->text() );
}
@@ -1893,7 +1893,7 @@ void TQLineEdit::focusInEvent( TQFocusEvent* )
d->cursorTimer = cft ? startTimer( cft/2 ) : -1;
}
if( !hasSelectedText() || style().styleHint( TQStyle::SH_BlinkCursorWhenTextSelected ) )
- d->setCursorVisible( TRUE );
+ d->setCursorVisible( true );
if ( d->hasIMSelection() )
d->cursor = d->imselstart;
d->updateMicroFocusHint();
@@ -1907,7 +1907,7 @@ void TQLineEdit::focusOutEvent( TQFocusEvent* )
if ( TQFocusEvent::reason() != TQFocusEvent::ActiveWindow &&
TQFocusEvent::reason() != TQFocusEvent::Popup )
deselect();
- d->setCursorVisible( FALSE );
+ d->setCursorVisible( false );
if ( d->cursorTimer > 0 )
killTimer( d->cursorTimer );
d->cursorTimer = 0;
@@ -2059,7 +2059,7 @@ void TQLineEdit::drawContents( TQPainter *p )
p->setPen( paletteBackgroundColor() );
p->drawTextItem( topLeft, ti, textflags );
p->restore();
- supressCursor = TRUE;
+ supressCursor = true;
}
// overwrite cursor
@@ -2073,7 +2073,7 @@ void TQLineEdit::drawContents( TQPainter *p )
p->setPen( paletteBackgroundColor() );
p->drawTextItem( topLeft, ti, textflags );
p->restore();
- supressCursor = TRUE;
+ supressCursor = true;
}
}
@@ -2087,7 +2087,7 @@ void TQLineEdit::drawContents( TQPainter *p )
TQPoint to = from + TQPoint( 0, lineRect.height() );
p->drawLine( from, to );
if ( hasRightToLeft ) {
- bool rtl = ci.isValid() ? ci.isRightToLeft() : TRUE;
+ bool rtl = ci.isValid() ? ci.isRightToLeft() : true;
to = from + TQPoint( (rtl ? -2 : 2), 2 );
p->drawLine( from, to );
from.ry() += 4;
@@ -2106,7 +2106,7 @@ void TQLineEdit::dragMoveEvent( TQDragMoveEvent *e )
if ( !d->readOnly && TQTextDrag::canDecode(e) ) {
e->acceptAction();
d->cursor = d->xToPos( e->pos().x() );
- d->cursorVisible = TRUE;
+ d->cursorVisible = true;
update();
}
}
@@ -2121,7 +2121,7 @@ void TQLineEdit::dragEnterEvent( TQDragEnterEvent * e )
void TQLineEdit::dragLeaveEvent( TQDragLeaveEvent *)
{
if ( d->cursorVisible ) {
- d->cursorVisible = FALSE;
+ d->cursorVisible = false;
update();
}
}
@@ -2144,7 +2144,7 @@ void TQLineEdit::dropEvent( TQDropEvent* e )
int selStart = d->cursor;
int oldSelStart = d->selstart;
int oldSelEnd = d->selend;
- d->cursorVisible = FALSE;
+ d->cursorVisible = false;
e->acceptAction();
insert( str );
if ( e->source() == this ) {
@@ -2174,7 +2174,7 @@ bool TQLineEditPrivate::drag()
TQGuardedPtr<TQLineEdit> gptr = q;
bool r = tdo->drag();
if ( !gptr )
- return FALSE;
+ return false;
// ### fix the check TQDragObject::target() != q in TQt4 (should not be needed)
if ( r && !readOnly && TQDragObject::target() != q ) {
@@ -2185,7 +2185,7 @@ bool TQLineEditPrivate::drag()
#ifndef TQT_NO_CURSOR
q->setCursor( readOnly ? arrowCursor : ibeamCursor );
#endif
- return TRUE;
+ return true;
}
#endif // TQT_NO_DRAGANDDROP
@@ -2268,9 +2268,9 @@ TQPopupMenu *TQLineEdit::createPopupMenu()
popup->setItemEnabled( id - IdCopy, d->hasSelectedText() );
popup->setItemEnabled( id - IdPaste, !d->readOnly && !TQApplication::clipboard()->text().isEmpty() );
#else
- popup->setItemVisible( id - IdCut, FALSE );
- popup->setItemVisible( id - IdCopy, FALSE );
- popup->setItemVisible( id - IdPaste, FALSE );
+ popup->setItemVisible( id - IdCut, false );
+ popup->setItemVisible( id - IdCopy, false );
+ popup->setItemVisible( id - IdPaste, false );
#endif
popup->setItemEnabled( id - IdClear, !d->readOnly && !d->text.isEmpty() );
popup->setItemEnabled( id - IdSelectAll, !d->text.isEmpty() && !d->allSelected() );
@@ -2350,15 +2350,15 @@ void TQLineEditPrivate::init( const TQString& txt )
q->setCursor( readOnly ? arrowCursor : ibeamCursor );
#endif
q->setFocusPolicy( TQWidget::StrongFocus );
- q->setInputMethodEnabled( TRUE );
+ q->setInputMethodEnabled( true );
// Specifies that this widget can use more, but is able to survive on
// less, horizontal space; and is fixed vertically.
q->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
q->setBackgroundMode( PaletteBase );
- q->setKeyCompression( TRUE );
- q->setMouseTracking( TRUE );
- q->setAcceptDrops( TRUE );
- q->setFrame( TRUE );
+ q->setKeyCompression( true );
+ q->setMouseTracking( true );
+ q->setAcceptDrops( true );
+ q->setFrame( true );
text = txt;
updateTextLayout();
cursor = text.length();
@@ -2464,15 +2464,15 @@ void TQLineEditPrivate::moveCursor( int pos, bool mark )
cursor = pos;
q->update();
} else {
- setCursorVisible( FALSE );
+ setCursorVisible( false );
cursor = pos;
- setCursorVisible( TRUE );
+ setCursorVisible( true );
}
updateMicroFocusHint();
if ( mark && !q->style().styleHint( TQStyle::SH_BlinkCursorWhenTextSelected ) )
- setCursorVisible( FALSE );
+ setCursorVisible( false );
if ( mark || selDirty ) {
- selDirty = FALSE;
+ selDirty = false;
emit q->selectionChanged();
}
}
@@ -2483,7 +2483,7 @@ void TQLineEditPrivate::finishChange( int validateFromState, bool setModified )
if ( textDirty ) {
// do validation
bool wasValidInput = validInput;
- validInput = TRUE;
+ validInput = true;
#ifndef TQT_NO_VALIDATOR
if ( validator && validateFromState >= 0 ) {
TQString textCopy = text;
@@ -2502,16 +2502,16 @@ void TQLineEditPrivate::finishChange( int validateFromState, bool setModified )
if ( validateFromState >= 0 && wasValidInput && !validInput ) {
undo( validateFromState );
history.resize( undoState );
- validInput = TRUE;
- textDirty = setModified = FALSE;
+ validInput = true;
+ textDirty = setModified = false;
}
updateTextLayout();
updateMicroFocusHint();
lineDirty |= textDirty;
if ( setModified )
- modified = TRUE;
+ modified = true;
if ( textDirty ) {
- textDirty = FALSE;
+ textDirty = false;
emit q->textChanged( maskData ? stripString(text) : text );
}
#if defined(QT_ACCESSIBILITY_SUPPORT)
@@ -2519,7 +2519,7 @@ void TQLineEditPrivate::finishChange( int validateFromState, bool setModified )
#endif
}
if ( selDirty ) {
- selDirty = FALSE;
+ selDirty = false;
emit q->selectionChanged();
}
if ( lineDirty || !setModified )
@@ -2531,7 +2531,7 @@ void TQLineEditPrivate::setText( const TQString& txt )
deselect();
TQString oldText = text;
if ( maskData ) {
- text = maskString( 0, txt, TRUE );
+ text = maskString( 0, txt, true );
text += clearString( text.length(), maxLength - text.length() );
} else {
text = txt.isEmpty() ? txt : txt.left( maxLength );
@@ -2564,7 +2564,7 @@ void TQLineEditPrivate::addCommand( const Command& cmd )
} else {
history.resize( undoState + 1);
}
- separator = FALSE;
+ separator = false;
history[ undoState++ ] = cmd;
}
@@ -2585,7 +2585,7 @@ void TQLineEditPrivate::insert( const TQString& s )
for ( int i = 0; i < (int) s.left(remaining).length(); ++i )
addCommand( Command( Insert, cursor++, s.at(i) ) );
}
- textDirty = TRUE;
+ textDirty = true;
}
void TQLineEditPrivate::del( bool wasBackspace )
@@ -2598,7 +2598,7 @@ void TQLineEditPrivate::del( bool wasBackspace )
} else {
text.remove( cursor, 1 );
}
- textDirty = TRUE;
+ textDirty = true;
}
}
@@ -2628,7 +2628,7 @@ void TQLineEditPrivate::removeSelectedText()
if ( cursor > selstart )
cursor -= TQMIN( cursor, selend ) - selstart;
deselect();
- textDirty = TRUE;
+ textDirty = true;
}
}
@@ -2672,17 +2672,17 @@ void TQLineEditPrivate::parseInputMask( const TQString &maskFields )
MaskInputData::Casemode m = MaskInputData::NoCaseMode;
c = 0;
bool s;
- bool escape = FALSE;
+ bool escape = false;
int index = 0;
for ( i = 0; i < inputMask.length(); i++ ) {
c = inputMask.at(i);
if ( escape ) {
- s = TRUE;
+ s = true;
maskData[ index ].maskChar = c;
maskData[ index ].separator = s;
maskData[ index ].caseMode = m;
index++;
- escape = FALSE;
+ escape = false;
} else if ( c == '<' || c == '>' || c == '!') {
switch ( c ) {
case '<':
@@ -2708,12 +2708,12 @@ void TQLineEditPrivate::parseInputMask( const TQString &maskFields )
case 'D':
case 'd':
case '#':
- s = FALSE;
+ s = false;
break;
case '\\':
- escape = TRUE;
+ escape = true;
default:
- s = TRUE;
+ s = true;
break;
}
@@ -2735,58 +2735,58 @@ bool TQLineEditPrivate::isValidInput( TQChar key, TQChar mask ) const
switch ( mask ) {
case 'A':
if ( key.isLetter() && key != blank )
- return TRUE;
+ return true;
break;
case 'a':
if ( key.isLetter() || key == blank )
- return TRUE;
+ return true;
break;
case 'N':
if ( key.isLetterOrNumber() && key != blank )
- return TRUE;
+ return true;
break;
case 'n':
if ( key.isLetterOrNumber() || key == blank )
- return TRUE;
+ return true;
break;
case 'X':
if ( key.isPrint() && key != blank )
- return TRUE;
+ return true;
break;
case 'x':
if ( key.isPrint() || key == blank )
- return TRUE;
+ return true;
break;
case '9':
if ( key.isNumber() && key != blank )
- return TRUE;
+ return true;
break;
case '0':
if ( key.isNumber() || key == blank )
- return TRUE;
+ return true;
break;
case 'D':
if ( key.isNumber() && key.digitValue() > 0 && key != blank )
- return TRUE;
+ return true;
break;
case 'd':
if ( (key.isNumber() && key.digitValue() > 0) || key == blank )
- return TRUE;
+ return true;
break;
case '#':
if ( key.isNumber() || key == '+' || key == '-' || key == blank )
- return TRUE;
+ return true;
break;
default:
break;
}
- return FALSE;
+ return false;
}
/*
Applies the inputMask on \a str starting from position \a pos in the mask. \a clear
- specifies from where characters should be gotten when a separator is met in \a str - TRUE means
- that blanks will be used, FALSE that previous input is used.
+ specifies from where characters should be gotten when a separator is met in \a str - true means
+ that blanks will be used, false that previous input is used.
Calling this when no inputMask is set is undefined.
*/
TQString TQLineEditPrivate::maskString( uint pos, const TQString &str, bool clear) const
@@ -2822,7 +2822,7 @@ TQString TQLineEditPrivate::maskString( uint pos, const TQString &str, bool clea
++i;
} else {
// search for separator first
- int n = findInMask( i, TRUE, TRUE, str[(int)strIndex] );
+ int n = findInMask( i, true, true, str[(int)strIndex] );
if ( n != -1 ) {
if ( str.length() != 1 || i == 0 || (i > 0 && (!maskData[i-1].separator || maskData[i-1].maskChar != str[(int)strIndex])) ) {
s += fill.mid( i, n-i+1 );
@@ -2830,7 +2830,7 @@ TQString TQLineEditPrivate::maskString( uint pos, const TQString &str, bool clea
}
} else {
// search for valid blank if not
- n = findInMask( i, TRUE, FALSE, str[(int)strIndex] );
+ n = findInMask( i, true, false, str[(int)strIndex] );
if ( n != -1 ) {
s += fill.mid( i, n-i );
switch ( maskData[ n ].caseMode ) {
diff --git a/src/widgets/tqlistbox.cpp b/src/widgets/tqlistbox.cpp
index c5032d1d4..e32fd57f1 100644
--- a/src/widgets/tqlistbox.cpp
+++ b/src/widgets/tqlistbox.cpp
@@ -69,20 +69,20 @@ public:
columnMode( TQListBox::FixedNumber ), numRows( 1 ), numColumns( 1 ),
currentRow( 0 ), currentColumn( 0 ),
mousePressRow( -1 ), mousePressColumn( -1 ),
- mouseMoveRow( -1 ), mouseMoveColumn( -1 ), mouseInternalPress( FALSE ),
+ mouseMoveRow( -1 ), mouseMoveColumn( -1 ), mouseInternalPress( false ),
scrollTimer( 0 ), updateTimer( 0 ), visibleTimer( 0 ),
selectionMode( TQListBox::Single ),
count( 0 ),
listBox( lb ), currInputString( TQString::null ),
- rowModeWins( FALSE ),
- ignoreMoves( FALSE ),
- layoutDirty( TRUE ),
- mustPaintAll( TRUE ),
- dragging( FALSE ),
- dirtyDrag ( FALSE ),
- variableHeight( TRUE /* !!! ### FALSE */ ),
- variableWidth( FALSE ),
- inMenuMode( FALSE )
+ rowModeWins( false ),
+ ignoreMoves( false ),
+ layoutDirty( true ),
+ mustPaintAll( true ),
+ dragging( false ),
+ dirtyDrag ( false ),
+ variableHeight( true /* !!! ### false */ ),
+ variableWidth( false ),
+ inMenuMode( false )
{}
int findItemByName( int item, const TQString &text );
~TQListBoxPrivate();
@@ -191,8 +191,8 @@ TQListBoxPrivate::~TQListBoxPrivate()
\obsolete
- Returns TRUE if vScrollBarMode() is \c Auto; otherwise returns
- FALSE.
+ Returns true if vScrollBarMode() is \c Auto; otherwise returns
+ false.
*/
/*!
@@ -200,7 +200,7 @@ TQListBoxPrivate::~TQListBoxPrivate()
\obsolete
- If \a enable is TRUE sets setVScrollBarMode() to \c AlwaysOn;
+ If \a enable is true sets setVScrollBarMode() to \c AlwaysOn;
otherwise sets setVScrollBarMode() to \c AlwaysOff.
*/
@@ -209,8 +209,8 @@ TQListBoxPrivate::~TQListBoxPrivate()
\obsolete
- Returns FALSE if vScrollBarMode() is \c AlwaysOff; otherwise
- returns TRUE.
+ Returns false if vScrollBarMode() is \c AlwaysOff; otherwise
+ returns true.
*/
/*!
@@ -218,7 +218,7 @@ TQListBoxPrivate::~TQListBoxPrivate()
\obsolete
- If \a enable is TRUE sets setVScrollBarMode() to \c AlwaysOn;
+ If \a enable is true sets setVScrollBarMode() to \c AlwaysOn;
otherwise sets setVScrollBarMode() to \c AlwaysOff.
*/
@@ -227,8 +227,8 @@ TQListBoxPrivate::~TQListBoxPrivate()
\obsolete
- Returns TRUE if hScrollBarMode() is \c Auto; otherwise returns
- FALSE.
+ Returns true if hScrollBarMode() is \c Auto; otherwise returns
+ false.
*/
/*!
@@ -236,7 +236,7 @@ TQListBoxPrivate::~TQListBoxPrivate()
\obsolete
- If \a enable is TRUE sets setHScrollBarMode() to \c AlwaysOn;
+ If \a enable is true sets setHScrollBarMode() to \c AlwaysOn;
otherwise sets setHScrollBarMode() to \c AlwaysOff.
*/
@@ -245,8 +245,8 @@ TQListBoxPrivate::~TQListBoxPrivate()
\obsolete
- Returns FALSE if vScrollBarMode() is \c AlwaysOff; otherwise
- returns TRUE.
+ Returns false if vScrollBarMode() is \c AlwaysOff; otherwise
+ returns true.
*/
/*!
@@ -254,7 +254,7 @@ TQListBoxPrivate::~TQListBoxPrivate()
\obsolete
- If \a enable is TRUE sets setHScrollBarMode() to \c AlwaysOn;
+ If \a enable is true sets setHScrollBarMode() to \c AlwaysOn;
otherwise sets setHScrollBarMode() to \c AlwaysOff.
*/
@@ -348,9 +348,9 @@ TQListBoxPrivate::~TQListBoxPrivate()
TQListBoxItem::TQListBoxItem( TQListBox* listbox )
{
lbox = listbox;
- s = FALSE;
- dirty = TRUE;
- custom_highlight = FALSE;
+ s = false;
+ dirty = true;
+ custom_highlight = false;
p = n = 0;
// just something that'll look noticeable in the debugger
@@ -369,9 +369,9 @@ TQListBoxItem::TQListBoxItem( TQListBox* listbox )
TQListBoxItem::TQListBoxItem( TQListBox* listbox, TQListBoxItem *after )
{
lbox = listbox;
- s = FALSE;
- dirty = TRUE;
- custom_highlight = FALSE;
+ s = false;
+ dirty = true;
+ custom_highlight = false;
p = n = 0;
// just something that'll be noticeable in the debugger
@@ -397,7 +397,7 @@ TQListBoxItem::~TQListBoxItem()
Defines whether the list box item is responsible for drawing
itself in a highlighted state when being selected.
- If \a b is FALSE (the default), the list box will draw some
+ If \a b is false (the default), the list box will draw some
default highlight indicator before calling paint().
\sa selected(), paint()
@@ -473,7 +473,7 @@ const TQPixmap *TQListBoxItem::pixmap() const
}
/*!
- If \a b is TRUE (the default) then this item can be selected by
+ If \a b is true (the default) then this item can be selected by
the user; otherwise this item cannot be selected by the user.
\sa isSelectable()
@@ -491,8 +491,8 @@ void TQListBoxItem::setSelectable( bool b )
}
/*!
- Returns TRUE if this item is selectable (the default); otherwise
- returns FALSE.
+ Returns true if this item is selectable (the default); otherwise
+ returns false.
\sa setSelectable()
*/
@@ -500,10 +500,10 @@ void TQListBoxItem::setSelectable( bool b )
bool TQListBoxItem::isSelectable() const
{
if ( !listBox() )
- return TRUE;
+ return true;
bool *sel = listBox()->d->selectable.find( ( (TQListBoxItem*)this ) );
if ( !sel )
- return TRUE;
+ return true;
else
return *sel;
}
@@ -841,7 +841,7 @@ int TQListBoxPixmap::rtti() const
If multiple rows are used, each row can be as high as necessary
(the normal setting), or you can request that all items will have
- the same height by calling setVariableHeight(FALSE). The same
+ the same height by calling setVariableHeight(false). The same
applies to a column's width, see setVariableWidth().
The TQListBox's items are TQListBoxItem objects. TQListBox provides
@@ -1007,15 +1007,15 @@ TQListBox::TQListBox( TQWidget *parent, const char *name, WFlags f )
d->visibleTimer = new TQTimer( this, "listbox visible timer" );
d->inputTimer = new TQTimer( this, "listbox input timer" );
d->resizeTimer = new TQTimer( this, "listbox resize timer" );
- d->clearing = FALSE;
+ d->clearing = false;
d->pressedItem = 0;
d->selectAnchor = 0;
- d->select = FALSE;
+ d->select = false;
d->rubber = 0;
- d->selectable.setAutoDelete( TRUE );
+ d->selectable.setAutoDelete( true );
- setMouseTracking( TRUE );
- viewport()->setMouseTracking( TRUE );
+ setMouseTracking( true );
+ viewport()->setMouseTracking( true );
connect( d->updateTimer, TQ_SIGNAL(timeout()),
this, TQ_SLOT(refreshSlot()) );
@@ -1269,7 +1269,7 @@ TQListBox::~TQListBox()
void TQListBox::setFont( const TQFont &font )
{
TQScrollView::setFont( font );
- triggerUpdate( TRUE );
+ triggerUpdate( true );
}
@@ -1453,7 +1453,7 @@ void TQListBox::insertItem( const TQListBoxItem *lbi, int index )
item->n = d->head;
item->p = 0;
d->head = item;
- item->dirty = TRUE;
+ item->dirty = true;
if ( item->n )
item->n->p = item;
} else {
@@ -1482,7 +1482,7 @@ void TQListBox::insertItem( const TQListBoxItem *lbi, int index )
emit highlighted( index );
}
- triggerUpdate( TRUE );
+ triggerUpdate( true );
}
/*!
@@ -1512,7 +1512,7 @@ void TQListBox::insertItem( const TQListBoxItem *lbi, const TQListBoxItem *after
item->n = d->head;
item->p = 0;
d->head = item;
- item->dirty = TRUE;
+ item->dirty = true;
if ( item->n )
item->n->p = item;
} else {
@@ -1538,7 +1538,7 @@ void TQListBox::insertItem( const TQListBoxItem *lbi, const TQListBoxItem *after
emit highlighted( index( d->current ) );
}
- triggerUpdate( TRUE );
+ triggerUpdate( true );
}
/*!
@@ -1604,7 +1604,7 @@ void TQListBox::removeItem( int index )
{
bool wasVisible = itemVisible( currentItem() );
delete item( index );
- triggerUpdate( TRUE );
+ triggerUpdate( true );
if ( wasVisible )
ensureCurrentVisible();
}
@@ -1620,8 +1620,8 @@ void TQListBox::clear()
{
setContentsPos( 0, 0 );
bool blocked = signalsBlocked();
- blockSignals( TRUE );
- d->clearing = TRUE;
+ blockSignals( true );
+ d->clearing = true;
d->current = 0;
d->tmpCurrent = 0;
TQListBoxItem * i = d->head;
@@ -1644,9 +1644,9 @@ void TQListBox::clear()
d->selectable.clear();
clearSelection();
blockSignals( blocked );
- triggerUpdate( TRUE );
+ triggerUpdate( true );
d->last = 0;
- d->clearing = FALSE;
+ d->clearing = false;
}
@@ -1845,21 +1845,21 @@ void TQListBox::setCurrentItem( TQListBoxItem * i )
TQRect mfrect = itemRect( i );
if ( mfrect.isValid() )
- setMicroFocusHint( mfrect.x(), mfrect.y(), mfrect.width(), mfrect.height(), FALSE );
+ setMicroFocusHint( mfrect.x(), mfrect.y(), mfrect.width(), mfrect.height(), false );
TQListBoxItem * o = d->current;
d->current = i;
int ind = index( i );
if ( i && selectionMode() == Single ) {
- bool changed = FALSE;
+ bool changed = false;
if ( o && o->s ) {
- changed = TRUE;
- o->s = FALSE;
+ changed = true;
+ o->s = false;
}
if ( i && !i->s && d->selectionMode != NoSelection && i->isSelectable() ) {
- i->s = TRUE;
- changed = TRUE;
+ i->s = true;
+ changed = true;
emit selectionChanged( i );
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( viewport(), ind+1, TQAccessible::StateChanged );
@@ -1880,7 +1880,7 @@ void TQListBox::setCurrentItem( TQListBoxItem * i )
if ( i )
updateItem( i );
// scroll after the items are redrawn
- d->visibleTimer->start( 1, TRUE );
+ d->visibleTimer->start( 1, true );
TQString tmp;
if ( i )
@@ -1978,22 +1978,23 @@ int TQListBox::index( const TQListBoxItem * lbi ) const
/*!
- Returns TRUE if the item at position \a index is at least partly
- visible; otherwise returns FALSE.
+ Returns true if the item at position \a index is at least partly
+ visible; otherwise returns false.
*/
bool TQListBox::itemVisible( int index )
{
TQListBoxItem * i = item( index );
- return i ? itemVisible( i ) : FALSE;
+ return i ? itemVisible( i ) : false;
+ return i && itemVisible( i );
}
/*!
\overload
- Returns TRUE if \a item is at least partly visible; otherwise
- returns FALSE.
+ Returns true if \a item is at least partly visible; otherwise
+ returns false.
*/
bool TQListBox::itemVisible( const TQListBoxItem * item )
@@ -2020,7 +2021,7 @@ void TQListBox::mousePressEvent( TQMouseEvent *e )
void TQListBox::mousePressEventEx( TQMouseEvent *e )
{
- d->mouseInternalPress = TRUE;
+ d->mouseInternalPress = true;
TQListBoxItem * i = itemAt( e->pos() );
if ( !i && !d->current && d->head ) {
@@ -2032,7 +2033,7 @@ void TQListBox::mousePressEventEx( TQMouseEvent *e )
&& !( e->state() & ControlButton ) )
clearSelection();
- d->select = d->selectionMode == Multi ? ( i ? !i->isSelected() : FALSE ) : TRUE;
+ d->select = d->selectionMode != Multi || ( i && !i->isSelected());
d->pressedSelected = i && i->s;
if ( i )
@@ -2043,7 +2044,7 @@ void TQListBox::mousePressEventEx( TQMouseEvent *e )
case Single:
if ( !i->s || i != d->current ) {
if ( i->isSelectable() )
- setSelected( i, TRUE );
+ setSelected( i, true );
else
setCurrentItem( i );
}
@@ -2054,34 +2055,34 @@ void TQListBox::mousePressEventEx( TQMouseEvent *e )
!(e->state() & TQMouseEvent::ControlButton) ) {
if ( !i->isSelected() ) {
bool b = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
clearSelection();
blockSignals( b );
}
- setSelected( i, TRUE );
- d->dragging = TRUE; // always assume dragging
+ setSelected( i, true );
+ d->dragging = true; // always assume dragging
} else if ( e->state() & ShiftButton ) {
- d->pressedSelected = FALSE;
+ d->pressedSelected = false;
TQListBoxItem *oldCurrent = item( currentItem() );
bool down = index( oldCurrent ) < index( i );
TQListBoxItem *lit = down ? oldCurrent : i;
bool select = d->select;
bool blocked = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
for ( ;; lit = lit->n ) {
if ( !lit ) {
- triggerUpdate( FALSE );
+ triggerUpdate( false );
break;
}
if ( down && lit == i ) {
setSelected( i, select );
- triggerUpdate( FALSE );
+ triggerUpdate( false );
break;
}
if ( !down && lit == oldCurrent ) {
setSelected( oldCurrent, select );
- triggerUpdate( FALSE );
+ triggerUpdate( false );
break;
}
setSelected( lit, select );
@@ -2090,7 +2091,7 @@ void TQListBox::mousePressEventEx( TQMouseEvent *e )
emit selectionChanged();
} else if ( e->state() & ControlButton ) {
setSelected( i, !i->isSelected() );
- d->pressedSelected = FALSE;
+ d->pressedSelected = false;
}
setCurrentItem( i );
}
@@ -2105,7 +2106,7 @@ void TQListBox::mousePressEventEx( TQMouseEvent *e )
break;
}
} else {
- bool unselect = TRUE;
+ bool unselect = true;
if ( e->button() == LeftButton ) {
if ( d->selectionMode == Multi ||
d->selectionMode == Extended ) {
@@ -2118,8 +2119,8 @@ void TQListBox::mousePressEventEx( TQMouseEvent *e )
d->rubber = new TQRect( e->x(), e->y(), 0, 0 );
if ( d->selectionMode == Extended && !( e->state() & ControlButton ) )
- selectAll( FALSE );
- unselect = FALSE;
+ selectAll( false );
+ unselect = false;
}
if ( unselect && ( e->button() == RightButton ||
( selectionMode() == Multi || selectionMode() == Extended ) ) )
@@ -2137,7 +2138,7 @@ void TQListBox::mousePressEventEx( TQMouseEvent *e )
d->mousePressColumn = -1;
d->mousePressRow = -1;
}
- d->ignoreMoves = FALSE;
+ d->ignoreMoves = false;
d->pressedItem = i;
@@ -2155,7 +2156,7 @@ void TQListBox::mouseReleaseEvent( TQMouseEvent *e )
{
if ( d->selectionMode == Extended &&
d->dragging ) {
- d->dragging = FALSE;
+ d->dragging = false;
if (d->current != d->pressedItem) {
updateSelection(); // when we drag, we get an update after we release
}
@@ -2172,16 +2173,16 @@ void TQListBox::mouseReleaseEvent( TQMouseEvent *e )
mouseMoveEvent( e );
delete d->scrollTimer;
d->scrollTimer = 0;
- d->ignoreMoves = FALSE;
+ d->ignoreMoves = false;
if ( d->selectionMode == Extended &&
d->current == d->pressedItem &&
d->pressedSelected && d->current ) {
bool block = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
clearSelection();
blockSignals( block );
- d->current->s = TRUE;
+ d->current->s = true;
emit selectionChanged();
}
@@ -2191,7 +2192,7 @@ void TQListBox::mouseReleaseEvent( TQMouseEvent *e )
d->pressedItem = 0;
d->mousePressRow = -1;
d->mousePressColumn = -1;
- d->mouseInternalPress = FALSE;
+ d->mouseInternalPress = false;
if ( emitClicked ) {
emit clicked( i );
emit clicked( i, e->globalPos() );
@@ -2206,12 +2207,12 @@ void TQListBox::mouseReleaseEvent( TQMouseEvent *e )
void TQListBox::mouseDoubleClickEvent( TQMouseEvent *e )
{
- bool ok = TRUE;
+ bool ok = true;
TQListBoxItem *i = itemAt( e->pos() );
if ( !i || selectionMode() == NoSelection )
- ok = FALSE;
+ ok = false;
- d->ignoreMoves = TRUE;
+ d->ignoreMoves = true;
if ( d->current && ok ) {
TQListBoxItem * i = d->current;
@@ -2309,7 +2310,7 @@ void TQListBox::mouseMoveEvent( TQMouseEvent *e )
d->scrollTimer = new TQTimer( this );
connect( d->scrollTimer, TQ_SIGNAL(timeout()),
this, TQ_SLOT(doAutoScroll()) );
- d->scrollTimer->start( 100, FALSE );
+ d->scrollTimer->start( 100, false );
doAutoScroll();
} else if ( !d->scrollTimer ) {
// or just select the required bits
@@ -2336,14 +2337,14 @@ void TQListBox::updateSelection()
( d->current == d->pressedItem && d->pressedSelected ) ||
(d->dirtyDrag && !d->dragging) ) ) {
if (d->dirtyDrag && !d->dragging) // emit after dragging stops
- d->dirtyDrag = FALSE;
+ d->dirtyDrag = false;
else
clearSelection(); // dont reset drag-selected items
d->pressedItem = 0;
if ( i && i->isSelectable() ) {
bool block = signalsBlocked();
- blockSignals( TRUE );
- i->s = TRUE;
+ blockSignals( true );
+ i->s = true;
blockSignals( block );
emit selectionChanged();
#if defined(QT_ACCESSIBILITY_SUPPORT)
@@ -2352,13 +2353,13 @@ void TQListBox::updateSelection()
TQAccessible::updateAccessibility( viewport(), ind+1, TQAccessible::SelectionAdd );
#endif
}
- triggerUpdate( FALSE );
+ triggerUpdate( false );
} else {
int c = TQMIN( d->mouseMoveColumn, d->mousePressColumn );
int r = TQMIN( d->mouseMoveRow, d->mousePressRow );
int c2 = TQMAX( d->mouseMoveColumn, d->mousePressColumn );
int r2 = TQMAX( d->mouseMoveRow, d->mousePressRow );
- bool changed = FALSE;
+ bool changed = false;
while( c <= c2 ) {
TQListBoxItem * i = item( c*numRows()+r );
int rtmp = r;
@@ -2369,8 +2370,8 @@ void TQListBox::updateSelection()
TQAccessible::updateAccessibility( viewport(), ind+1, TQAccessible::StateChanged );
TQAccessible::updateAccessibility( viewport(), ind+1, d->select ? TQAccessible::SelectionAdd : TQAccessible::SelectionRemove );
#endif
- i->dirty = TRUE;
- d->dirtyDrag = changed = TRUE;
+ i->dirty = true;
+ d->dirtyDrag = changed = true;
}
i = i->n;
rtmp++;
@@ -2383,7 +2384,7 @@ void TQListBox::updateSelection()
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( viewport(), 0, TQAccessible::Selection );
#endif
- triggerUpdate( FALSE );
+ triggerUpdate( false );
}
}
if ( i )
@@ -2453,12 +2454,12 @@ void TQListBox::keyPressEvent( TQKeyEvent *e )
if ( !old ) {
setCurrentItem( d->head );
if ( d->selectionMode == Single )
- setSelected( d->head, TRUE );
+ setSelected( d->head, true );
e->ignore();
return;
}
- bool selectCurrent = FALSE;
+ bool selectCurrent = false;
switch ( e->key() ) {
case Key_Up:
{
@@ -2559,7 +2560,7 @@ void TQListBox::keyPressEvent( TQKeyEvent *e )
break;
case Key_Prior:
{
- selectCurrent = TRUE;
+ selectCurrent = true;
d->currInputString = TQString::null;
int i;
if ( numColumns() == 1 ) {
@@ -2583,7 +2584,7 @@ void TQListBox::keyPressEvent( TQKeyEvent *e )
break;
case Key_Space:
{
- selectCurrent = TRUE;
+ selectCurrent = true;
d->currInputString = TQString::null;
toggleCurrentItem();
if ( selectionMode() == Extended && d->current->isSelected() )
@@ -2595,7 +2596,7 @@ void TQListBox::keyPressEvent( TQKeyEvent *e )
case Key_Return:
case Key_Enter:
{
- selectCurrent = TRUE;
+ selectCurrent = true;
d->currInputString = TQString::null;
if ( currentItem() >= 0 && selectionMode() != NoSelection ) {
TQString tmp = item( currentItem() )->text();
@@ -2611,7 +2612,7 @@ void TQListBox::keyPressEvent( TQKeyEvent *e )
break;
case Key_Home:
{
- selectCurrent = TRUE;
+ selectCurrent = true;
d->currInputString = TQString::null;
setCurrentItem( 0 );
handleItemChange( old, e->state() & ShiftButton, e->state() & ControlButton );
@@ -2621,7 +2622,7 @@ void TQListBox::keyPressEvent( TQKeyEvent *e )
break;
case Key_End:
{
- selectCurrent = TRUE;
+ selectCurrent = true;
d->currInputString = TQString::null;
int i = (int)count() - 1;
setCurrentItem( i );
@@ -2652,27 +2653,27 @@ void TQListBox::keyPressEvent( TQKeyEvent *e )
if ( curItem >= 0 )
setCurrentItem( curItem );
if ( curItem >= 0 && selectionMode() == TQListBox::Extended ) {
- bool changed = FALSE;
+ bool changed = false;
bool block = signalsBlocked();
- blockSignals( TRUE );
- selectAll( FALSE );
+ blockSignals( true );
+ selectAll( false );
blockSignals( block );
TQListBoxItem *i = item( curItem );
if ( !i->s && i->isSelectable() ) {
- changed = TRUE;
- i->s = TRUE;
+ changed = true;
+ i->s = true;
updateItem( i );
}
if ( changed )
emit selectionChanged();
}
- d->inputTimer->start( 400, TRUE );
+ d->inputTimer->start( 400, true );
} else {
d->currInputString = TQString::null;
if ( e->state() & ControlButton ) {
switch ( e->key() ) {
case Key_A:
- selectAll( TRUE );
+ selectAll( true );
break;
}
} else {
@@ -2685,7 +2686,7 @@ void TQListBox::keyPressEvent( TQKeyEvent *e )
if (selfCheck && selectCurrent && selectionMode() == Single &&
d->current && !d->current->s ) {
updateItem( d->current );
- setSelected( d->current, TRUE );
+ setSelected( d->current, true );
}
}
@@ -2696,7 +2697,7 @@ void TQListBox::focusInEvent( TQFocusEvent* )
{
d->mousePressRow = -1;
d->mousePressColumn = -1;
- d->inMenuMode = FALSE;
+ d->inMenuMode = false;
if ( TQFocusEvent::reason() != TQFocusEvent::Mouse && !d->current && d->head ) {
d->current = d->head;
TQListBoxItem *i = d->current;
@@ -2717,7 +2718,7 @@ void TQListBox::focusInEvent( TQFocusEvent* )
updateItem( currentItem() );
TQRect mfrect = itemRect( d->current );
if ( mfrect.isValid() )
- setMicroFocusHint( mfrect.x(), mfrect.y(), mfrect.width(), mfrect.height(), FALSE );
+ setMicroFocusHint( mfrect.x(), mfrect.y(), mfrect.width(), mfrect.height(), false );
}
}
@@ -2767,8 +2768,8 @@ void TQListBox::updateItem( TQListBoxItem * i )
{
if ( !i )
return;
- i->dirty = TRUE;
- d->updateTimer->start( 0, TRUE );
+ i->dirty = true;
+ d->updateTimer->start( 0, true );
}
@@ -2791,11 +2792,11 @@ void TQListBox::setSelectionMode( SelectionMode mode )
&& ( mode == TQListBox::Single || mode == TQListBox::NoSelection ) ){
clearSelection();
if ( ( mode == TQListBox::Single ) && currentItem() )
- setSelected( currentItem(), TRUE );
+ setSelected( currentItem(), true );
}
d->selectionMode = mode;
- triggerUpdate( TRUE );
+ triggerUpdate( true );
}
@@ -2813,11 +2814,11 @@ TQListBox::SelectionMode TQListBox::selectionMode() const
Consider using the \l TQListBox::selectionMode property instead of
this property.
- When setting this property, Multi selection mode is used if set to TRUE and
- to Single selection mode if set to FALSE.
+ When setting this property, Multi selection mode is used if set to true and
+ to Single selection mode if set to false.
- When getting this property, TRUE is returned if the list box is in
- Multi selection mode or Extended selection mode, and FALSE if it is
+ When getting this property, true is returned if the list box is in
+ Multi selection mode or Extended selection mode, and false if it is
in Single selection mode or NoSelection mode.
\sa selectionMode
@@ -2865,7 +2866,7 @@ void TQListBox::toggleCurrentItem()
/*!
\overload
- If \a select is TRUE the item at position \a index is selected;
+ If \a select is true the item at position \a index is selected;
otherwise the item is deselected.
*/
@@ -2876,14 +2877,14 @@ void TQListBox::setSelected( int index, bool select )
/*!
- Selects \a item if \a select is TRUE or unselects it if \a select
- is FALSE, and repaints the item appropriately.
+ Selects \a item if \a select is true or unselects it if \a select
+ is false, and repaints the item appropriately.
If the list box is a \c Single selection list box and \a select is
- TRUE, setSelected() calls setCurrentItem().
+ true, setSelected() calls setCurrentItem().
If the list box is a \c Single selection list box, \a select is
- FALSE, setSelected() calls clearSelection().
+ false, setSelected() calls clearSelection().
\sa setMultiSelection(), setCurrentItem(), clearSelection(), currentItem()
*/
@@ -2901,7 +2902,7 @@ void TQListBox::setSelected( TQListBoxItem * item, bool select )
if ( d->current != item ) {
TQListBoxItem *o = d->current;
if ( d->current && d->current->s )
- d->current->s = FALSE;
+ d->current->s = false;
d->current = item;
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( viewport(), ind+1, TQAccessible::Focus );
@@ -2945,17 +2946,17 @@ void TQListBox::setSelected( TQListBoxItem * item, bool select )
/*!
- Returns TRUE if item \a i is selected; otherwise returns FALSE.
+ Returns true if item \a i is selected; otherwise returns false.
*/
bool TQListBox::isSelected( int i ) const
{
if ( selectionMode() == Single && i != currentItem() )
- return FALSE;
+ return false;
TQListBoxItem * lbi = item( i );
if ( !lbi )
- return FALSE; // should not happen
+ return false; // should not happen
return lbi->s;
}
@@ -2963,13 +2964,13 @@ bool TQListBox::isSelected( int i ) const
/*!
\overload
- Returns TRUE if item \a i is selected; otherwise returns FALSE.
+ Returns true if item \a i is selected; otherwise returns false.
*/
bool TQListBox::isSelected( const TQListBoxItem * i ) const
{
if ( !i )
- return FALSE;
+ return false;
return i->s;
}
@@ -3002,13 +3003,13 @@ TQListBoxItem* TQListBox::selectedItem() const
void TQListBox::clearSelection()
{
- selectAll( FALSE );
+ selectAll( false );
}
/*!
In \c Multi and \c Extended modes, this function sets all items to
- be selected if \a select is TRUE, and to be unselected if \a
- select is FALSE.
+ be selected if \a select is true, and to be unselected if \a
+ select is false.
In \c Single and \c NoSelection modes, this function only changes
the selection status of currentItem().
@@ -3018,7 +3019,7 @@ void TQListBox::selectAll( bool select )
{
if ( selectionMode() == Multi || selectionMode() == Extended ) {
bool b = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
for ( int i = 0; i < (int)count(); i++ )
setSelected( i, select );
blockSignals( b );
@@ -3041,7 +3042,7 @@ void TQListBox::invertSelection()
return;
bool b = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
for ( int i = 0; i < (int)count(); i++ )
setSelected( i, !item( i )->isSelected() );
blockSignals( b );
@@ -3106,15 +3107,15 @@ TQSize TQListBox::minimumSizeHint() const
/*!
Ensures that a single paint event will occur at the end of the
- current event loop iteration. If \a doLayout is TRUE, the layout
+ current event loop iteration. If \a doLayout is true, the layout
is also redone.
*/
void TQListBox::triggerUpdate( bool doLayout )
{
if ( doLayout )
- d->layoutDirty = d->mustPaintAll = TRUE;
- d->updateTimer->start( 0, TRUE );
+ d->layoutDirty = d->mustPaintAll = true;
+ d->updateTimer->start( 0, true );
}
@@ -3122,9 +3123,9 @@ void TQListBox::setColumnMode( LayoutMode mode )
{
if ( mode == Variable )
return;
- d->rowModeWins = FALSE;
+ d->rowModeWins = false;
d->columnMode = mode;
- triggerUpdate( TRUE );
+ triggerUpdate( true );
}
@@ -3134,17 +3135,17 @@ void TQListBox::setColumnMode( int columns )
columns = 1;
d->columnMode = FixedNumber;
d->numColumns = columns;
- d->rowModeWins = FALSE;
- triggerUpdate( TRUE );
+ d->rowModeWins = false;
+ triggerUpdate( true );
}
void TQListBox::setRowMode( LayoutMode mode )
{
if ( mode == Variable )
return;
- d->rowModeWins = TRUE;
+ d->rowModeWins = true;
d->rowMode = mode;
- triggerUpdate( TRUE );
+ triggerUpdate( true );
}
@@ -3154,8 +3155,8 @@ void TQListBox::setRowMode( int rows )
rows = 1;
d->rowMode = FixedNumber;
d->numRows = rows;
- d->rowModeWins = TRUE;
- triggerUpdate( TRUE );
+ d->rowModeWins = true;
+ triggerUpdate( true );
}
/*!
@@ -3339,7 +3340,7 @@ void TQListBox::doLayout() const
break;
}
- d->layoutDirty = FALSE;
+ d->layoutDirty = false;
int w = d->columnPos[(int)d->columnPos.size()-1];
int h = d->rowPos[(int)d->rowPos.size()-1];
TQSize s( viewportSize( w, h ) );
@@ -3442,7 +3443,7 @@ int TQListBox::currentRow() const
if ( !d->current )
return -1;
if ( d->currentRow < 0 )
- d->layoutDirty = TRUE;
+ d->layoutDirty = true;
if ( d->layoutDirty )
doLayout();
return d->currentRow;
@@ -3459,7 +3460,7 @@ int TQListBox::currentColumn() const
if ( !d->current )
return -1;
if ( d->currentColumn < 0 )
- d->layoutDirty = TRUE;
+ d->layoutDirty = true;
if ( d->layoutDirty )
doLayout();
return d->currentColumn;
@@ -3678,7 +3679,7 @@ void TQListBox::setVariableHeight( bool enable )
return;
d->variableHeight = enable;
- triggerUpdate( TRUE );
+ triggerUpdate( true );
}
@@ -3706,7 +3707,7 @@ void TQListBox::setVariableWidth( bool enable )
return;
d->variableWidth = enable;
- triggerUpdate( TRUE );
+ triggerUpdate( true );
}
@@ -3717,7 +3718,7 @@ void TQListBox::refreshSlot()
{
if ( d->mustPaintAll ||
d->layoutDirty ) {
- d->mustPaintAll = FALSE;
+ d->mustPaintAll = false;
bool currentItemVisible = itemVisible( currentItem() );
doLayout();
if ( hasFocus() &&
@@ -3729,7 +3730,7 @@ void TQListBox::refreshSlot()
d->rowPos[d->currentRow] < contentsY() ||
d->rowPos[d->currentRow+1] > contentsY()+visibleHeight() ) )
ensureCurrentVisible();
- viewport()->repaint( FALSE );
+ viewport()->repaint( false );
return;
}
@@ -3764,9 +3765,9 @@ void TQListBox::refreshSlot()
}
if ( r.isEmpty() )
- viewport()->repaint( FALSE );
+ viewport()->repaint( false );
else
- viewport()->repaint( r, FALSE );
+ viewport()->repaint( r, false );
}
@@ -3828,7 +3829,7 @@ void TQListBox::viewportPaintEvent( TQPaintEvent * e )
if ( i->dirty ) {
// reset dirty flag only if the entire item was painted
if ( itemPaintRegion == TQRegion( itemRect ) )
- i->dirty = FALSE;
+ i->dirty = false;
}
i = i->n;
}
@@ -4037,11 +4038,11 @@ void TQListBox::resizeEvent( TQResizeEvent *e )
if ( currentItemVisible )
ensureCurrentVisible();
if ( d->current )
- viewport()->repaint( itemRect( d->current ), FALSE );
+ viewport()->repaint( itemRect( d->current ), false );
} else if ( ( d->columnMode == FitToWidth || d->rowMode == FitToHeight ) && !(isVisible()) ) {
TQScrollView::resizeEvent( e );
} else if ( d->layoutDirty ) {
- d->resizeTimer->start( 100, TRUE );
+ d->resizeTimer->start( 100, true );
resizeContents( contentsWidth() - ( e->oldSize().width() - e->size().width() ),
contentsHeight() - ( e->oldSize().height() - e->size().height() ) );
TQScrollView::resizeEvent( e );
@@ -4056,7 +4057,7 @@ void TQListBox::resizeEvent( TQResizeEvent *e )
void TQListBox::adjustItems()
{
- triggerUpdate( TRUE );
+ triggerUpdate( true );
ensureCurrentVisible();
}
@@ -4137,10 +4138,10 @@ long TQListBox::maxItemWidth() const
void TQListBox::showEvent( TQShowEvent * )
{
- d->ignoreMoves = FALSE;
+ d->ignoreMoves = false;
d->mousePressRow = -1;
d->mousePressColumn = -1;
- d->mustPaintAll = FALSE;
+ d->mustPaintAll = false;
ensureCurrentVisible();
}
@@ -4150,7 +4151,7 @@ void TQListBox::showEvent( TQShowEvent * )
\obsolete
Returns the vertical pixel-coordinate in \a *yPos, of the list box
- item at position \a index in the list. Returns FALSE if the item is
+ item at position \a index in the list. Returns false if the item is
outside the visible area.
*/
bool TQListBox::itemYPos( int index, int *yPos ) const
@@ -4158,10 +4159,10 @@ bool TQListBox::itemYPos( int index, int *yPos ) const
tqObsolete( "TQListBox", "itemYPos" );
TQListBoxItem* i = item(index);
if ( !i )
- return FALSE;
+ return false;
if ( yPos )
*yPos = i->y;
- return TRUE;
+ return true;
}
#endif
@@ -4169,7 +4170,7 @@ bool TQListBox::itemYPos( int index, int *yPos ) const
/*!
\fn bool TQListBoxItem::isSelected() const
- Returns TRUE if the item is selected; otherwise returns FALSE.
+ Returns true if the item is selected; otherwise returns false.
\sa TQListBox::isSelected(), isCurrent()
*/
@@ -4180,8 +4181,8 @@ bool TQListBox::itemYPos( int index, int *yPos ) const
*/
/*!
- Returns TRUE if the item is the current item; otherwise returns
- FALSE.
+ Returns true if the item is the current item; otherwise returns
+ false.
\sa TQListBox::currentItem(), TQListBox::item(), isSelected()
*/
@@ -4260,7 +4261,7 @@ void TQListBox::takeItem( const TQListBoxItem * item )
if ( item->s )
emit selectionChanged();
((TQListBoxItem *)item)->lbox = 0;
- triggerUpdate( TRUE );
+ triggerUpdate( true );
}
/*!
@@ -4404,20 +4405,20 @@ void TQListBox::doRubberSelection( const TQRect &old, const TQRect &rubber )
{
TQListBoxItem *i = d->head;
TQRect ir, pr;
- bool changed = FALSE;
+ bool changed = false;
for ( ; i; i = i->n ) {
ir = itemRect( i );
if ( ir == TQRect( 0, 0, -1, -1 ) )
continue;
if ( i->isSelected() && !ir.intersects( rubber ) && ir.intersects( old ) ) {
- i->s = FALSE;
+ i->s = false;
pr = pr.unite( ir );
- changed = TRUE;
+ changed = true;
} else if ( !i->isSelected() && ir.intersects( rubber ) ) {
if ( i->isSelectable() ) {
- i->s = TRUE;
+ i->s = true;
pr = pr.unite( ir );
- changed = TRUE;
+ changed = true;
}
}
}
@@ -4427,13 +4428,13 @@ void TQListBox::doRubberSelection( const TQRect &old, const TQRect &rubber )
TQAccessible::updateAccessibility( viewport(), 0, TQAccessible::Selection );
#endif
}
- viewport()->repaint( pr, TRUE );
+ viewport()->repaint( pr, true );
}
/*!
- Returns TRUE if the user is selecting items using a rubber band
- rectangle; otherwise returns FALSE.
+ Returns true if the user is selecting items using a rubber band
+ rectangle; otherwise returns false.
*/
bool TQListBox::isRubberSelecting() const
@@ -4500,7 +4501,7 @@ static int cmpListBoxItems( const void *n1, const void *n2 )
#endif
/*!
- If \a ascending is TRUE sorts the items in ascending order;
+ If \a ascending is true sorts the items in ascending order;
otherwise sorts in descending order.
To compare the items, the text (TQListBoxItem::text()) of the items
@@ -4530,7 +4531,7 @@ void TQListBox::sort( bool ascending )
item = items[ i ].item;
if ( item ) {
item->p = prev;
- item->dirty = TRUE;
+ item->dirty = true;
if ( item->p )
item->p->n = item;
item->n = 0;
@@ -4544,7 +4545,7 @@ void TQListBox::sort( bool ascending )
item = items[ i ].item;
if ( item ) {
item->p = prev;
- item->dirty = TRUE;
+ item->dirty = true;
if ( item->p )
item->p->n = item;
item->n = 0;
@@ -4573,17 +4574,17 @@ void TQListBox::handleItemChange( TQListBoxItem *old, bool shift, bool control )
} else if ( d->selectionMode == Extended ) {
if ( shift ) {
selectRange( d->selectAnchor ? d->selectAnchor : old,
- d->current, FALSE, TRUE, d->selectAnchor && !control );
+ d->current, false, true, d->selectAnchor && !control );
} else if ( !control ) {
bool block = signalsBlocked();
- blockSignals( TRUE );
- selectAll( FALSE );
+ blockSignals( true );
+ selectAll( false );
blockSignals( block );
- setSelected( d->current, TRUE );
+ setSelected( d->current, true );
}
} else if ( d->selectionMode == Multi ) {
if ( shift )
- selectRange( old, d->current, TRUE, FALSE );
+ selectRange( old, d->current, true, false );
}
}
@@ -4615,19 +4616,19 @@ void TQListBox::selectRange( TQListBoxItem *from, TQListBoxItem *to, bool invert
from = from->next();
}
- bool changed = FALSE;
+ bool changed = false;
if ( clearSel ) {
for ( i = d->head; i && i != from; i = i->n ) {
if ( i->s ) {
- i->s = FALSE;
- changed = TRUE;
+ i->s = false;
+ changed = true;
updateItem( i );
}
}
for ( i = to->n; i; i = i->n ) {
if ( i->s ) {
- i->s = FALSE;
- changed = TRUE;
+ i->s = false;
+ changed = true;
updateItem( i );
}
}
@@ -4636,15 +4637,15 @@ void TQListBox::selectRange( TQListBoxItem *from, TQListBoxItem *to, bool invert
for ( i = from; i; i = i->next() ) {
if ( !invert ) {
if ( !i->s && i->isSelectable() ) {
- i->s = TRUE;
- changed = TRUE;
+ i->s = true;
+ changed = true;
updateItem( i );
}
} else {
bool sel = !i->s;
if ( ( (bool)i->s != sel && sel && i->isSelectable() ) || !sel ) {
i->s = sel;
- changed = TRUE;
+ changed = true;
updateItem( i );
}
}
diff --git a/src/widgets/tqlistbox.h b/src/widgets/tqlistbox.h
index cfc2b7682..cb8de82d4 100644
--- a/src/widgets/tqlistbox.h
+++ b/src/widgets/tqlistbox.h
@@ -170,9 +170,9 @@ public:
void viewportPaintEvent( TQPaintEvent * );
#ifndef TQT_NO_COMPAT
- bool dragSelect() const { return TRUE; }
+ bool dragSelect() const { return true; }
void setDragSelect( bool ) {}
- bool autoScroll() const { return TRUE; }
+ bool autoScroll() const { return true; }
void setAutoScroll( bool ) {}
bool autoScrollBar() const { return vScrollBarMode() == Auto; }
void setAutoScrollBar( bool enable ) { setVScrollBarMode( enable ? Auto : AlwaysOff ); }
@@ -182,9 +182,9 @@ public:
void setAutoBottomScrollBar( bool enable ) { setHScrollBarMode( enable ? Auto : AlwaysOff ); }
bool bottomScrollBar() const { return hScrollBarMode() != AlwaysOff; }
void setBottomScrollBar( bool enable ) { setHScrollBarMode( enable ? AlwaysOn : AlwaysOff ); }
- bool smoothScrolling() const { return FALSE; }
+ bool smoothScrolling() const { return false; }
void setSmoothScrolling( bool ) {}
- bool autoUpdate() const { return TRUE; }
+ bool autoUpdate() const { return true; }
void setAutoUpdate( bool ) {}
void setFixedVisibleLines( int lines ) { setRowMode( lines ); }
int inSort( const TQListBoxItem * );
@@ -203,7 +203,7 @@ public:
TQListBoxItem *firstItem() const;
- void sort( bool ascending = TRUE );
+ void sort( bool ascending = true );
public slots:
void clear();
@@ -296,7 +296,7 @@ private:
void drawRubber();
void doRubberSelection( const TQRect &old, const TQRect &rubber );
void handleItemChange( TQListBoxItem *old, bool shift, bool control );
- void selectRange( TQListBoxItem *from, TQListBoxItem *to, bool invert, bool includeFirst, bool clearSel = FALSE );
+ void selectRange( TQListBoxItem *from, TQListBoxItem *to, bool invert, bool includeFirst, bool clearSel = false );
void emitChangedSignal( bool );
diff --git a/src/widgets/tqlistview.cpp b/src/widgets/tqlistview.cpp
index 6d8cc3b37..3144d8f99 100644
--- a/src/widgets/tqlistview.cpp
+++ b/src/widgets/tqlistview.cpp
@@ -157,7 +157,7 @@ struct TQListViewPrivate
class ItemColumnInfo {
public:
- ItemColumnInfo(): pm( 0 ), next( 0 ), truncated( FALSE ), dirty( FALSE ), allow_rename( FALSE ), width( 0 ) {}
+ ItemColumnInfo(): pm( 0 ), next( 0 ), truncated( false ), dirty( false ), allow_rename( false ), width( 0 ) {}
~ItemColumnInfo() { delete pm; delete next; }
TQString text, tmpText;
TQPixmap * pm;
@@ -170,7 +170,7 @@ struct TQListViewPrivate
class ViewColumnInfo {
public:
- ViewColumnInfo(): align(TQt::AlignAuto), sortable(TRUE), next( 0 ) {}
+ ViewColumnInfo(): align(TQt::AlignAuto), sortable(true), next( 0 ) {}
~ViewColumnInfo() { delete next; }
int align;
bool sortable;
@@ -233,9 +233,9 @@ struct TQListViewPrivate
bool allColumnsShowFocus :1;
bool select :1;
- // TRUE if the widget should take notice of mouseReleaseEvent
+ // true if the widget should take notice of mouseReleaseEvent
bool buttonDown :1;
- // TRUE if the widget should ignore a double-click
+ // true if the widget should ignore a double-click
bool ignoreDoubleClick :1;
bool clearing :1;
@@ -472,8 +472,8 @@ static TQString qEllipsisText( const TQString &org, const TQFontMetrics &fm, int
Space when the item is the current item.
\endtable
- Some subclasses call setExpandable(TRUE) even when they have no
- children, and populate themselves when setup() or setOpen(TRUE) is
+ Some subclasses call setExpandable(true) even when they have no
+ children, and populate themselves when setup() or setOpen(true) is
called. The \c dirview/dirview.cpp example program uses this
technique to start up quickly: The files and subdirectories in a
directory aren't inserted into the tree until they're actually
@@ -737,7 +737,7 @@ void TQListViewItem::init()
{
ownHeight = 0;
maybeTotalHeight = -1;
- open = FALSE;
+ open = false;
nChildren = 0;
parentItem = 0;
@@ -748,21 +748,21 @@ void TQListViewItem::init()
selected = 0;
lsc = Unsorted;
- lso = TRUE; // unsorted in ascending order :)
- configured = FALSE;
- expandable = FALSE;
- selectable = TRUE;
- is_root = FALSE;
- allow_drag = FALSE;
- allow_drop = FALSE;
- visible = TRUE;
+ lso = true; // unsorted in ascending order :)
+ configured = false;
+ expandable = false;
+ selectable = true;
+ is_root = false;
+ allow_drag = false;
+ allow_drop = false;
+ visible = true;
renameBox = 0;
- enabled = TRUE;
- mlenabled = FALSE;
+ enabled = true;
+ mlenabled = false;
}
/*!
- If \a b is TRUE, the item is made visible; otherwise it is hidden.
+ If \a b is true, the item is made visible; otherwise it is hidden.
If the item is not visible, itemAbove() and itemBelow() will never
return this item, although you still can reach it by using e.g.
@@ -779,7 +779,7 @@ void TQListViewItem::setVisible( bool b )
if ( b && parent() && !parent()->isVisible() )
return;
visible = b;
- configured = FALSE;
+ configured = false;
setHeight( 0 );
invalidateHeight();
if ( parent() )
@@ -793,7 +793,7 @@ void TQListViewItem::setVisible( bool b )
}
/*!
- Returns TRUE if the item is visible; otherwise returns FALSE.
+ Returns true if the item is visible; otherwise returns false.
\sa setVisible()
*/
@@ -804,7 +804,7 @@ bool TQListViewItem::isVisible() const
}
/*!
- If \a b is TRUE, this item can be in-place renamed in the column
+ If \a b is true, this item can be in-place renamed in the column
\a col by the user; otherwise it cannot be renamed in-place.
*/
@@ -827,15 +827,15 @@ void TQListViewItem::setRenameEnabled( int col, bool b )
}
/*!
- Returns TRUE if this item can be in-place renamed in column \a
- col; otherwise returns FALSE.
+ Returns true if this item can be in-place renamed in column \a
+ col; otherwise returns false.
*/
bool TQListViewItem::renameEnabled( int col ) const
{
TQListViewPrivate::ItemColumnInfo * l = (TQListViewPrivate::ItemColumnInfo*)columns;
if ( !l )
- return FALSE;
+ return false;
while( col && l ) {
l = l->next;
@@ -843,12 +843,12 @@ bool TQListViewItem::renameEnabled( int col ) const
}
if ( !l )
- return FALSE;
+ return false;
return (bool)l->allow_rename;
}
/*!
- If \a b is TRUE the item is enabled; otherwise it is disabled.
+ If \a b is true the item is enabled; otherwise it is disabled.
Disabled items are drawn differently (e.g. grayed-out) and are not
accessible by the user.
*/
@@ -859,7 +859,7 @@ void TQListViewItem::setEnabled( bool b )
return;
enabled = b;
if ( !enabled )
- selected = FALSE;
+ selected = false;
TQListView *lv = listView();
if ( lv ) {
lv->triggerUpdate();
@@ -870,7 +870,7 @@ void TQListViewItem::setEnabled( bool b )
}
/*!
- Returns TRUE if this item is enabled; otherwise returns FALSE.
+ Returns true if this item is enabled; otherwise returns false.
\sa setEnabled()
*/
@@ -1048,7 +1048,7 @@ TQListViewItem::~TQListViewItem()
/*!
- If \a b is TRUE each of the item's columns may contain multiple
+ If \a b is true each of the item's columns may contain multiple
lines of text; otherwise each of them may only contain a single
line.
*/
@@ -1059,8 +1059,8 @@ void TQListViewItem::setMultiLinesEnabled( bool b )
}
/*!
- Returns TRUE if the item can display multiple lines of text in its
- columns; otherwise returns FALSE.
+ Returns true if the item can display multiple lines of text in its
+ columns; otherwise returns false.
*/
bool TQListViewItem::multiLinesEnabled() const
@@ -1069,7 +1069,7 @@ bool TQListViewItem::multiLinesEnabled() const
}
/*!
- If \a allow is TRUE, the list view starts a drag (see
+ If \a allow is true, the list view starts a drag (see
TQListView::dragObject()) when the user presses and moves the mouse
on this item.
*/
@@ -1081,7 +1081,7 @@ void TQListViewItem::setDragEnabled( bool allow )
}
/*!
- If \a allow is TRUE, the list view accepts drops onto the item;
+ If \a allow is true, the list view accepts drops onto the item;
otherwise drops are not allowed.
*/
@@ -1091,7 +1091,7 @@ void TQListViewItem::setDropEnabled( bool allow )
}
/*!
- Returns TRUE if this item can be dragged; otherwise returns FALSE.
+ Returns true if this item can be dragged; otherwise returns false.
\sa setDragEnabled()
*/
@@ -1102,7 +1102,7 @@ bool TQListViewItem::dragEnabled() const
}
/*!
- Returns TRUE if this item accepts drops; otherwise returns FALSE.
+ Returns true if this item accepts drops; otherwise returns false.
\sa setDropEnabled(), acceptDrop()
*/
@@ -1113,16 +1113,16 @@ bool TQListViewItem::dropEnabled() const
}
/*!
- Returns TRUE if the item can accept drops of type TQMimeSource \a
- mime; otherwise returns FALSE.
+ Returns true if the item can accept drops of type TQMimeSource \a
+ mime; otherwise returns false.
- The default implementation does nothing and returns FALSE. A
+ The default implementation does nothing and returns false. A
subclass must reimplement this to accept drops.
*/
bool TQListViewItem::acceptDrop( const TQMimeSource * ) const
{
- return FALSE;
+ return false;
}
#ifndef TQT_NO_DRAGANDDROP
@@ -1197,7 +1197,7 @@ void TQListViewItem::insertItem( TQListViewItem * newChild )
newChild->parentItem = this;
lsc = Unsorted;
newChild->ownHeight = 0;
- newChild->configured = FALSE;
+ newChild->configured = false;
if ( lv && !lv->d->focusItem ) {
lv->d->focusItem = lv->firstChild();
@@ -1254,7 +1254,7 @@ void TQListViewItem::takeItem( TQListViewItem * item )
else
lv->currentItem()->okRename( lv->currentItem()->renameCol );
}
- bool emit_changed = FALSE;
+ bool emit_changed = false;
if ( lv && !lv->d->clearing ) {
if ( lv->d->oldFocusItem == this )
lv->d->oldFocusItem = 0;
@@ -1292,8 +1292,8 @@ void TQListViewItem::takeItem( TQListViewItem * item )
c = c->parentItem;
if ( c == item ) {
if ( lv->selectedItem() ) {
- // for Single, setSelected( FALSE ) when selectedItem() is taken
- lv->selectedItem()->setSelected( FALSE );
+ // for Single, setSelected( false ) when selectedItem() is taken
+ lv->selectedItem()->setSelected( false );
// we don't emit selectionChanged( 0 )
emit lv->selectionChanged();
}
@@ -1303,7 +1303,7 @@ void TQListViewItem::takeItem( TQListViewItem * item )
lv->d->focusItem = item->itemAbove();
else
lv->d->focusItem = 0;
- emit_changed = TRUE;
+ emit_changed = true;
}
}
@@ -1346,7 +1346,7 @@ void TQListViewItem::takeItem( TQListViewItem * item )
item->siblingItem = 0;
item->ownHeight = 0;
item->maybeTotalHeight = -1;
- item->configured = FALSE;
+ item->configured = false;
if ( emit_changed ) {
emit lv->currentChanged( lv->d->focusItem );
@@ -1409,8 +1409,8 @@ int TQListViewItem::compare( TQListViewItem *i, int col, bool ascending ) const
/*!
Sorts this item's children using column \a column. This is done in
- ascending order if \a ascending is TRUE and in descending order if
- \a ascending is FALSE.
+ ascending order if \a ascending is true and in descending order if
+ \a ascending is false.
Asks some of the children to sort their children. (TQListView and
TQListViewItem ensure that all on-screen objects are properly
@@ -1522,9 +1522,9 @@ void TQListViewItem::invalidateHeight()
/*!
Opens or closes an item, i.e. shows or hides an item's children.
- If \a o is TRUE all child items are shown initially. The user can
+ If \a o is true all child items are shown initially. The user can
hide them by clicking the <b>-</b> icon to the left of the item.
- If \a o is FALSE, the children of this item are initially hidden.
+ If \a o is false, the children of this item are initially hidden.
The user can show them by clicking the <b>+</b> icon to the left
of the item.
@@ -1563,11 +1563,11 @@ void TQListViewItem::setOpen( bool o )
// first invisible child is unconfigured
TQListViewItem * c = l->childItem;
while( c ) {
- c->configured = FALSE;
+ c->configured = false;
c = c->siblingItem;
}
}
- l->configured = TRUE;
+ l->configured = true;
l->setup();
l = (l == this) ? 0 : l->siblingItem;
if ( !l && !s.isEmpty() )
@@ -1664,8 +1664,8 @@ void TQListViewItem::activate()
behavior is undefined.
If activate() was caused by a mouse press, the function sets \a
- pos to where the user clicked and returns TRUE; otherwise it
- returns FALSE and does not change \a pos.
+ pos to where the user clicked and returns true; otherwise it
+ returns false and does not change \a pos.
\a pos is relative to the top-left corner of this item.
@@ -1686,16 +1686,16 @@ bool TQListViewItem::activatedPos( TQPoint &pos )
/*!
\fn bool TQListViewItem::isSelectable() const
- Returns TRUE if the item is selectable (as it is by default);
- otherwise returns FALSE
+ Returns true if the item is selectable (as it is by default);
+ otherwise returns false
\sa setSelectable()
*/
/*!
- Sets this item to be selectable if \a enable is TRUE (the
- default) or not to be selectable if \a enable is FALSE.
+ Sets this item to be selectable if \a enable is true (the
+ default) or not to be selectable if \a enable is false.
The user is not able to select a non-selectable item using either
the keyboard or the mouse. This also applies for the application
@@ -1713,24 +1713,24 @@ void TQListViewItem::setSelectable( bool enable )
/*!
\fn bool TQListViewItem::isExpandable() const
- Returns TRUE if this item is expandable even when it has no
- children; otherwise returns FALSE.
+ Returns true if this item is expandable even when it has no
+ children; otherwise returns false.
*/
/*!
Sets this item to be expandable even if it has no children if \a
- enable is TRUE, and to be expandable only if it has children if \a
- enable is FALSE (the default).
+ enable is true, and to be expandable only if it has children if \a
+ enable is false (the default).
The dirview example uses this in the canonical fashion. It checks
whether the directory is empty in setup() and calls
- setExpandable(TRUE) if not; in setOpen() it reads the contents of
+ setExpandable(true) if not; in setOpen() it reads the contents of
the directory and inserts items accordingly. This strategy means
that dirview can display the entire file system without reading
very much at startup.
Note that root items are not expandable by the user unless
- TQListView::setRootIsDecorated() is set to TRUE.
+ TQListView::setRootIsDecorated() is set to true.
\sa setSelectable()
*/
@@ -1768,14 +1768,14 @@ void TQListViewItem::enforceSortOrder() const
/*!
\fn bool TQListViewItem::isSelected() const
- Returns TRUE if this item is selected; otherwise returns FALSE.
+ Returns true if this item is selected; otherwise returns false.
\sa setSelected() TQListView::setSelected() TQListView::selectionChanged()
*/
/*!
- If \a s is TRUE this item is selected; otherwise it is deselected.
+ If \a s is true this item is selected; otherwise it is deselected.
This function does not maintain any invariants or repaint anything
-- TQListView::setSelected() does that.
@@ -1789,10 +1789,7 @@ void TQListViewItem::setSelected( bool s )
TQListView *lv = listView();
if ( lv && lv->selectionMode() != TQListView::NoSelection) {
- if ( s && isSelectable() )
- selected = TRUE;
- else
- selected = FALSE;
+ selected = s && isSelectable();
#if defined(QT_ACCESSIBILITY_SUPPORT)
if ( old != (bool)selected ) {
@@ -1827,7 +1824,7 @@ int TQListViewItem::totalHeight() const
return maybeTotalHeight;
TQListViewItem * that = (TQListViewItem *)this;
if ( !that->configured ) {
- that->configured = TRUE;
+ that->configured = true;
that->setup(); // ### virtual non-const function called in const
}
that->maybeTotalHeight = that->ownHeight;
@@ -1903,7 +1900,7 @@ void TQListViewItem::setText( int column, const TQString &text )
newLc = text.contains( TQChar( '\n' ) ) + 1;
}
- l->dirty = TRUE;
+ l->dirty = true;
l->text = text;
if ( column == (int)lsc )
lsc = Unsorted;
@@ -1915,7 +1912,7 @@ void TQListViewItem::setText( int column, const TQString &text )
TQListView * lv = listView();
if ( lv ) {
- lv->d->useDoubleBuffer = TRUE;
+ lv->d->useDoubleBuffer = true;
lv->triggerUpdate();
#if defined(QT_ACCESSIBILITY_SUPPORT)
if ( lv->isVisible() )
@@ -1986,7 +1983,7 @@ void TQListViewItem::setPixmap( int column, const TQPixmap & pm )
}
TQListView *lv = listView();
if ( lv ) {
- lv->d->useDoubleBuffer = TRUE;
+ lv->d->useDoubleBuffer = true;
lv->triggerUpdate();
}
}
@@ -2078,23 +2075,23 @@ void TQListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg,
// if the column width changed and this item was not painted since this change
if ( ci && ( ci->width != width || ci->text != t || ci->dirty ) ) {
ci->text = t;
- ci->dirty = FALSE;
+ ci->dirty = false;
ci->width = width;
- ci->truncated = FALSE;
+ ci->truncated = false;
// if we have to do the ellipsis thingy calc the truncated text
int pw = lv->itemMargin()*2 - lv->d->minLeftBearing - lv->d->minRightBearing;
pw += pixmap( column ) ? pixmap( column )->width() + lv->itemMargin() : 0;
if ( !mlenabled && fm.width( t ) + pw > width ) {
// take care of arabic shaping in width calculation (lars)
- ci->truncated = TRUE;
+ ci->truncated = true;
ci->tmpText = qEllipsisText( t, fm, width - pw, align );
} else if ( mlenabled && fm.width( t ) + pw > width ) {
#ifndef TQT_NO_STRINGLIST
- TQStringList list = TQStringList::split( TQChar('\n'), t, TRUE );
+ TQStringList list = TQStringList::split( TQChar('\n'), t, true );
for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
TQString z = *it;
if ( fm.width( z ) + pw > width ) {
- ci->truncated = TRUE;
+ ci->truncated = true;
*it = qEllipsisText( z, fm, width - pw, align );
}
}
@@ -2146,7 +2143,7 @@ void TQListViewItem::paintCell( TQPainter * p, const TQColorGroup & cg,
#if 0
bool reverse = TQApplication::reverseLayout();
#else
- bool reverse = FALSE;
+ bool reverse = false;
#endif
int iconWidth = 0;
@@ -2299,7 +2296,7 @@ TQListViewPrivate::Root::Root( TQListView * parent )
{
lv = parent;
setHeight( 0 );
- setOpen( TRUE );
+ setOpen( true );
}
@@ -2339,7 +2336,7 @@ void TQListViewItem::ignoreDoubleClick()
{
TQListView *lv = listView();
if ( lv )
- lv->d->ignoreDoubleClick = TRUE;
+ lv->d->ignoreDoubleClick = true;
}
@@ -2471,7 +2468,7 @@ void TQListViewItem::ignoreDoubleClick()
just using column 0.
\row \i \l setRootIsDecorated()
\i Sets whether root items should show open/close decoration to their left.
- The default is FALSE.
+ The default is false.
\row \i \l setTreeStepSize()
\i Sets how many pixels an item's children are indented
relative to their parent. The default is 20. This is
@@ -2657,42 +2654,42 @@ void TQListView::init()
d->margin = 1;
d->selectionMode = TQListView::Single;
d->sortcolumn = 0;
- d->ascending = TRUE;
- d->allColumnsShowFocus = FALSE;
+ d->ascending = true;
+ d->allColumnsShowFocus = false;
d->fontMetricsHeight = fontMetrics().height();
- d->h->setTracking(TRUE);
- d->buttonDown = FALSE;
- d->ignoreDoubleClick = FALSE;
- d->column.setAutoDelete( TRUE );
+ d->h->setTracking(true);
+ d->buttonDown = false;
+ d->ignoreDoubleClick = false;
+ d->column.setAutoDelete( true );
d->iterators = 0;
d->scrollTimer = 0;
- d->sortIndicator = FALSE;
- d->clearing = FALSE;
+ d->sortIndicator = false;
+ d->clearing = false;
d->minLeftBearing = fontMetrics().minLeftBearing();
d->minRightBearing = fontMetrics().minRightBearing();
d->ellipsisWidth = fontMetrics().width( "..." ) * 2;
d->highlighted = 0;
d->pressedItem = 0;
d->selectAnchor = 0;
- d->select = TRUE;
- d->useDoubleBuffer = FALSE;
+ d->select = true;
+ d->useDoubleBuffer = false;
d->startDragItem = 0;
- d->toolTips = TRUE;
+ d->toolTips = true;
#ifndef TQT_NO_TOOLTIP
d->toolTip = new TQListViewToolTip( viewport(), this );
#endif
- d->updateHeader = FALSE;
- d->fullRepaintOnComlumnChange = FALSE;
+ d->updateHeader = false;
+ d->fullRepaintOnComlumnChange = false;
d->resizeMode = NoColumn;
d->defRenameAction = Reject;
- d->pressedEmptyArea = FALSE;
- d->startEdit = TRUE;
- d->ignoreEditAfterFocus = FALSE;
- d->inMenuMode = FALSE;
- d->pressedSelected = FALSE;
+ d->pressedEmptyArea = false;
+ d->startEdit = true;
+ d->ignoreEditAfterFocus = false;
+ d->inMenuMode = false;
+ d->pressedSelected = false;
- setMouseTracking( TRUE );
- viewport()->setMouseTracking( TRUE );
+ setMouseTracking( true );
+ viewport()->setMouseTracking( true );
connect( d->timer, TQ_SIGNAL(timeout()),
this, TQ_SLOT(updateContents()) );
@@ -2720,9 +2717,9 @@ void TQListView::init()
// will access d->r
TQListViewPrivate::Root * r = new TQListViewPrivate::Root( this );
- r->is_root = TRUE;
+ r->is_root = true;
d->r = r;
- d->r->setSelectable( FALSE );
+ d->r->setSelectable( false );
viewport()->setFocusProxy( this );
viewport()->setFocusPolicy( WheelFocus );
@@ -2734,11 +2731,11 @@ void TQListView::init()
\property TQListView::showSortIndicator
\brief whether the list view header should display a sort indicator.
- If this property is TRUE, an arrow is drawn in the header of the
+ If this property is true, an arrow is drawn in the header of the
list view to indicate the sort order of the list view contents.
The arrow will be drawn in the correct column and will point up or
down, depending on the current sort direction. The default is
- FALSE (don't show an indicator).
+ false (don't show an indicator).
\sa TQHeader::setSortIndicator()
*/
@@ -2764,7 +2761,7 @@ bool TQListView::showSortIndicator() const
\property TQListView::showToolTips
\brief whether this list view should show tooltips for truncated column texts
- The default is TRUE.
+ The default is true.
*/
void TQListView::setShowToolTips( bool b )
@@ -2797,11 +2794,11 @@ void TQListView::setResizeMode( ResizeMode m )
{
d->resizeMode = m;
if ( m == NoColumn )
- header()->setStretchEnabled( FALSE );
+ header()->setStretchEnabled( false );
else if ( m == AllColumns )
- header()->setStretchEnabled( TRUE );
+ header()->setStretchEnabled( true );
else
- header()->setStretchEnabled( TRUE, header()->count() - 1 );
+ header()->setStretchEnabled( true, header()->count() - 1 );
}
TQListView::ResizeMode TQListView::resizeMode() const
@@ -2880,7 +2877,7 @@ void TQListView::drawContentsOffset( TQPainter * p, int ox, int oy,
}
if ( d->dirtyItems->count() ) {
// there are still items left that need repainting
- d->dirtyItemTimer->start( 0, TRUE );
+ d->dirtyItemTimer->start( 0, true );
} else {
// we're painting all items that need to be painted
delete d->dirtyItems;
@@ -3118,7 +3115,7 @@ void TQListView::buildDrawableList() const
TQPtrList<TQListViewPrivate::DrawableItem> * dl;
dl = new TQPtrList<TQListViewPrivate::DrawableItem>;
- dl->setAutoDelete( TRUE );
+ dl->setAutoDelete( true );
if ( d->drawables )
delete ((TQListView *)this)->d->drawables;
((TQListView *)this)->d->drawables = dl;
@@ -3196,7 +3193,7 @@ void TQListView::setTreeStepSize( int size )
{
if ( size != d->levelWidth ) {
d->levelWidth = size;
- viewport()->repaint( FALSE );
+ viewport()->repaint( false );
}
}
@@ -3226,12 +3223,12 @@ void TQListView::insertItem( TQListViewItem * i )
void TQListView::clear()
{
bool wasUpdatesEnabled = viewport()->isUpdatesEnabled();
- viewport()->setUpdatesEnabled( FALSE );
+ viewport()->setUpdatesEnabled( false );
setContentsPos( 0, 0 );
viewport()->setUpdatesEnabled( wasUpdatesEnabled );
bool block = signalsBlocked();
- blockSignals( TRUE );
- d->clearing = TRUE;
+ blockSignals( true );
+ d->clearing = true;
clearSelection();
if ( d->iterators ) {
TQListViewItemIterator *i = d->iterators->first();
@@ -3254,7 +3251,7 @@ void TQListView::clear()
d->startDragItem = 0;
// if it's down its downness makes no sense, so undown it
- d->buttonDown = FALSE;
+ d->buttonDown = false;
TQListViewItem *c = (TQListViewItem *)d->r->firstChild();
TQListViewItem *n;
@@ -3267,12 +3264,12 @@ void TQListView::clear()
delete d->r;
d->r = 0;
TQListViewPrivate::Root * r = new TQListViewPrivate::Root( this );
- r->is_root = TRUE;
+ r->is_root = true;
d->r = r;
- d->r->setSelectable( FALSE );
+ d->r->setSelectable( false );
blockSignals( block );
triggerUpdate();
- d->clearing = FALSE;
+ d->clearing = false;
}
/*!
@@ -3410,7 +3407,7 @@ void TQListView::removeColumn( int index )
d->h->removeLabel( index );
if (d->resizeMode == LastColumn)
- d->h->setStretchEnabled( TRUE, d->h->count() - 1 );
+ d->h->setStretchEnabled( true, d->h->count() - 1 );
updateGeometries();
if ( d->column.count() == 0 )
@@ -3619,10 +3616,10 @@ void TQListView::updateContents()
{
if ( d->updateHeader )
header()->adjustHeaderSize();
- d->updateHeader = FALSE;
+ d->updateHeader = false;
if ( !isVisible() ) {
// Not in response to a setText/setPixmap any more.
- d->useDoubleBuffer = FALSE;
+ d->useDoubleBuffer = false;
return;
}
@@ -3630,11 +3627,11 @@ void TQListView::updateContents()
delete d->drawables;
d->drawables = 0;
}
- viewport()->setUpdatesEnabled( FALSE );
+ viewport()->setUpdatesEnabled( false );
updateGeometries();
- viewport()->setUpdatesEnabled( TRUE );
- viewport()->repaint( FALSE );
- d->useDoubleBuffer = FALSE;
+ viewport()->setUpdatesEnabled( true );
+ viewport()->repaint( false );
+ d->useDoubleBuffer = false;
}
@@ -3670,17 +3667,17 @@ void TQListView::updateGeometries()
void TQListView::handleSizeChange( int section, int os, int ns )
{
bool upe = viewport()->isUpdatesEnabled();
- viewport()->setUpdatesEnabled( FALSE );
+ viewport()->setUpdatesEnabled( false );
int sx = horizontalScrollBar()->value();
bool sv = horizontalScrollBar()->isVisible();
updateGeometries();
bool fullRepaint = d->fullRepaintOnComlumnChange || sx != horizontalScrollBar()->value()
|| sv != horizontalScrollBar()->isVisible();
- d->fullRepaintOnComlumnChange = FALSE;
+ d->fullRepaintOnComlumnChange = false;
viewport()->setUpdatesEnabled( upe );
if ( fullRepaint ) {
- viewport()->repaint( FALSE );
+ viewport()->repaint( false );
return;
}
@@ -3692,7 +3689,7 @@ void TQListView::handleSizeChange( int section, int os, int ns )
if ( left < visibleWidth() )
viewport()->scroll( dx, 0, TQRect( left, 0, visibleWidth() - left, visibleHeight() ) );
viewport()->repaint( left - 4 - d->ellipsisWidth, 0, 4 + d->ellipsisWidth,
- visibleHeight(), FALSE ); // border between the items and ellipses width
+ visibleHeight(), false ); // border between the items and ellipses width
// map auto to left for now. Need to fix this once we support
// reverse layout on the listview.
@@ -3742,7 +3739,7 @@ void TQListView::updateDirtyItems()
if ( !ir.isEmpty() ) { // rectangle to be repainted
if ( ir.x() < 0 )
ir.moveBy( -ir.x(), 0 );
- viewport()->repaint( ir, FALSE );
+ viewport()->repaint( ir, false );
}
}
@@ -3762,7 +3759,7 @@ void TQListView::makeVisible()
void TQListView::resizeEvent( TQResizeEvent *e )
{
TQScrollView::resizeEvent( e );
- d->fullRepaintOnComlumnChange = TRUE;
+ d->fullRepaintOnComlumnChange = true;
d->h->resize( visibleWidth(), d->h->height() );
}
@@ -3801,12 +3798,12 @@ void TQListView::triggerUpdate()
{
if ( !isVisible() || !isUpdatesEnabled() ) {
// Not in response to a setText/setPixmap any more.
- d->useDoubleBuffer = FALSE;
+ d->useDoubleBuffer = false;
return; // it will update when shown, or something.
}
- d->timer->start( 0, TRUE );
+ d->timer->start( 0, true );
}
@@ -3828,12 +3825,12 @@ bool TQListView::eventFilter( TQObject * o, TQEvent * e )
switch( me2.type() ) {
case TQEvent::MouseButtonDblClick:
if ( me2.button() == RightButton )
- return TRUE;
+ return true;
break;
case TQEvent::MouseMove:
if ( me2.state() & RightButton ) {
viewportMouseMoveEvent( &me2 );
- return TRUE;
+ return true;
}
break;
default:
@@ -3845,10 +3842,10 @@ bool TQListView::eventFilter( TQObject * o, TQEvent * e )
switch( e->type() ) {
case TQEvent::FocusIn:
focusInEvent( fe );
- return TRUE;
+ return true;
case TQEvent::FocusOut:
focusOutEvent( fe );
- return TRUE;
+ return true;
default:
// nothing
break;
@@ -3860,23 +3857,23 @@ bool TQListView::eventFilter( TQObject * o, TQEvent * e )
if ( ke->key() == Key_Return ||
ke->key() == Key_Enter ) {
currentItem()->okRename( currentItem()->renameCol );
- return TRUE;
+ return true;
} else if ( ke->key() == Key_Escape ) {
currentItem()->cancelRename( currentItem()->renameCol );
- return TRUE;
+ return true;
}
} else if ( e->type() == TQEvent::FocusOut ) {
if ( ( (TQFocusEvent*)e )->reason() != TQFocusEvent::Popup ) {
TQCustomEvent *e = new TQCustomEvent( 9999 );
TQApplication::postEvent( o, e );
- return TRUE;
+ return true;
}
} else if ( e->type() == 9999 ) {
if ( d->defRenameAction == Reject )
currentItem()->cancelRename( currentItem()->renameCol );
else
currentItem()->okRename( currentItem()->renameCol );
- return TRUE;
+ return true;
}
}
}
@@ -3991,8 +3988,8 @@ TQListViewItem * TQListViewItem::itemBelow()
/*!
\fn bool TQListViewItem::isOpen () const
- Returns TRUE if this list view item has children \e and they are
- not explicitly hidden; otherwise returns FALSE.
+ Returns true if this list view item has children \e and they are
+ not explicitly hidden; otherwise returns false.
\sa setOpen()
*/
@@ -4059,7 +4056,7 @@ int TQListViewItem::height() const
{
TQListViewItem * that = (TQListViewItem *)this;
if ( !that->configured ) {
- that->configured = TRUE;
+ that->configured = true;
that->setup(); // ### virtual non-const function called in const
}
@@ -4260,12 +4257,12 @@ void TQListView::contentsMousePressEventEx( TQMouseEvent * e )
return;
if ( !d->ignoreEditAfterFocus )
- d->startEdit = TRUE;
- d->ignoreEditAfterFocus = FALSE;
+ d->startEdit = true;
+ d->ignoreEditAfterFocus = false;
if ( currentItem() && currentItem()->renameBox &&
!itemRect( currentItem() ).contains( e->pos() ) ) {
- d->startEdit = FALSE;
+ d->startEdit = false;
if ( d->defRenameAction == Reject )
currentItem()->cancelRename( currentItem()->renameCol );
else
@@ -4276,15 +4273,15 @@ void TQListView::contentsMousePressEventEx( TQMouseEvent * e )
d->dragStartPos = e->pos();
TQPoint vp = contentsToViewport( e->pos() );
- d->ignoreDoubleClick = FALSE;
- d->buttonDown = TRUE;
+ d->ignoreDoubleClick = false;
+ d->buttonDown = true;
TQListViewItem * i = itemAt( vp );
d->pressedEmptyArea = e->y() > contentsHeight();
if ( i && !i->isEnabled() )
return;
if ( d->startEdit && ( i != currentItem() || (i && !i->isSelected()) ) )
- d->startEdit = FALSE;
+ d->startEdit = false;
TQListViewItem *oldCurrent = currentItem();
if ( e->button() == RightButton && (e->state() & ControlButton ) )
@@ -4317,7 +4314,7 @@ void TQListView::contentsMousePressEventEx( TQMouseEvent * e )
TQStyleOption(i) );
if( ctrl == TQStyle::SC_ListViewExpand &&
e->type() == style().styleHint(TQStyle::SH_ListViewExpand_SelectMouseType, this)) {
- d->buttonDown = FALSE;
+ d->buttonDown = false;
if ( e->button() == LeftButton ) {
bool close = i->isOpen();
setOpen( i, !close );
@@ -4329,11 +4326,11 @@ void TQListView::contentsMousePressEventEx( TQMouseEvent * e )
emit currentChanged( d->focusItem );
}
if ( close ) {
- bool newCurrent = FALSE;
+ bool newCurrent = false;
TQListViewItem *ci = d->focusItem;
while ( ci ) {
if ( ci->parent() && ci->parent() == i ) {
- newCurrent = TRUE;
+ newCurrent = true;
break;
}
ci = ci->parent();
@@ -4343,17 +4340,17 @@ void TQListView::contentsMousePressEventEx( TQMouseEvent * e )
}
}
}
- d->ignoreDoubleClick = TRUE;
- d->buttonDown = FALSE;
+ d->ignoreDoubleClick = true;
+ d->buttonDown = false;
goto emit_signals;
}
}
}
- d->select = d->selectionMode == Multi ? !i->isSelected() : TRUE;
+ d->select = d->selectionMode == Multi ? !i->isSelected() : true;
{// calculate activatedP
- activatedByClick = TRUE;
+ activatedByClick = true;
TQPoint topLeft = itemRect( i ).topLeft(); //### inefficient?
activatedP = vp - topLeft;
int xdepth = treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0))
@@ -4364,7 +4361,7 @@ void TQListView::contentsMousePressEventEx( TQMouseEvent * e )
activatedP.rx() -= xdepth;
}
i->activate();
- activatedByClick = FALSE;
+ activatedByClick = false;
if ( i != d->focusItem )
setCurrentItem( i );
@@ -4375,30 +4372,30 @@ void TQListView::contentsMousePressEventEx( TQMouseEvent * e )
if ( i->isSelectable() && selectionMode() != NoSelection ) {
if ( selectionMode() == Single )
- setSelected( i, TRUE );
+ setSelected( i, true );
else if ( selectionMode() == Multi )
setSelected( i, d->select );
else if ( selectionMode() == Extended ) {
- bool changed = FALSE;
+ bool changed = false;
if ( !(e->state() & (ControlButton | ShiftButton)) ) {
if ( !i->isSelected() ) {
bool blocked = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
clearSelection();
blockSignals( blocked );
- i->setSelected( TRUE );
- changed = TRUE;
+ i->setSelected( true );
+ changed = true;
}
} else {
if ( e->state() & ShiftButton )
- d->pressedSelected = FALSE;
+ d->pressedSelected = false;
if ( (e->state() & ControlButton) && !(e->state() & ShiftButton) && i ) {
i->setSelected( !i->isSelected() );
- changed = TRUE;
- d->pressedSelected = FALSE;
+ changed = true;
+ d->pressedSelected = false;
} else if ( !oldCurrent || !i || oldCurrent == i ) {
if ( (bool)i->selected != d->select ) {
- changed = TRUE;
+ changed = true;
i->setSelected( d->select );
}
// Shift pressed in Extended mode ---
@@ -4407,7 +4404,7 @@ void TQListView::contentsMousePressEventEx( TQMouseEvent * e )
}
}
if ( changed ) {
- d->useDoubleBuffer = TRUE;
+ d->useDoubleBuffer = true;
triggerUpdate();
emit selectionChanged();
@@ -4483,7 +4480,7 @@ void TQListView::contentsMouseReleaseEventEx( TQMouseEvent * e )
{
d->startDragItem = 0;
bool emitClicked = !d->pressedItem || d->buttonDown;
- d->buttonDown = FALSE;
+ d->buttonDown = false;
// delete and disconnect autoscroll timer, if we have one
if ( d->scrollTimer ) {
disconnect( d->scrollTimer, TQ_SIGNAL(timeout()),
@@ -4501,10 +4498,10 @@ void TQListView::contentsMouseReleaseEventEx( TQMouseEvent * e )
d->pressedSelected && d->focusItem &&
e->button() == LeftButton) {
bool block = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
clearSelection();
blockSignals( block );
- d->focusItem->setSelected( TRUE );
+ d->focusItem->setSelected( true );
emit selectionChanged();
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( viewport(), 0, TQAccessible::Selection );
@@ -4539,18 +4536,18 @@ void TQListView::contentsMouseReleaseEventEx( TQMouseEvent * e )
emit currentChanged( d->focusItem );
}
if ( close ) {
- bool newCurrent = FALSE;
+ bool newCurrent = false;
TQListViewItem *ci = d->focusItem;
while ( ci ) {
if ( ci->parent() && ci->parent() == i ) {
- newCurrent = TRUE;
+ newCurrent = true;
break;
}
ci = ci->parent();
}
if ( newCurrent )
setCurrentItem( i );
- d->ignoreDoubleClick = TRUE;
+ d->ignoreDoubleClick = true;
}
}
}
@@ -4567,7 +4564,7 @@ void TQListView::contentsMouseReleaseEventEx( TQMouseEvent * e )
( rootIsDecorated() ? 1 : 0 ) ) * treeStepSize() - 1 );
if ( r.contains( e->pos() ) &&
!( e->state() & ( ShiftButton | ControlButton ) ) )
- d->renameTimer->start( TQApplication::doubleClickInterval(), TRUE );
+ d->renameTimer->start( TQApplication::doubleClickInterval(), true );
}
// Check if we are clicking at the root decoration.
int rootColumnPos = d->h->sectionPos( 0 );
@@ -4608,16 +4605,16 @@ void TQListView::contentsMouseReleaseEventEx( TQMouseEvent * e )
void TQListView::contentsMouseDoubleClickEvent( TQMouseEvent * e )
{
d->renameTimer->stop();
- d->startEdit = FALSE;
+ d->startEdit = false;
if ( !e || e->button() != LeftButton )
return;
// ensure that the following mouse moves and eventual release is
// ignored.
- d->buttonDown = FALSE;
+ d->buttonDown = false;
if ( d->ignoreDoubleClick ) {
- d->ignoreDoubleClick = FALSE;
+ d->ignoreDoubleClick = false;
return;
}
@@ -4637,9 +4634,9 @@ void TQListView::contentsMouseDoubleClickEvent( TQMouseEvent * e )
if ( !i->isOpen() ) {
if ( i->isExpandable() || i->childCount() )
- setOpen( i, TRUE );
+ setOpen( i, true );
} else {
- setOpen( i, FALSE );
+ setOpen( i, false );
}
// we emit the 'old' obsolete doubleClicked only if the item is not null and enabled
@@ -4655,7 +4652,7 @@ void TQListView::contentsMouseMoveEvent( TQMouseEvent * e )
if ( !e )
return;
- bool needAutoScroll = FALSE;
+ bool needAutoScroll = false;
TQPoint vp = contentsToViewport(e->pos());
@@ -4689,11 +4686,11 @@ void TQListView::contentsMouseMoveEvent( TQMouseEvent * e )
d->pressedItem->dragEnabled() ) {
if ( !d->startDragItem ) {
- setSelected( d->pressedItem, TRUE );
+ setSelected( d->pressedItem, true );
d->startDragItem = d->pressedItem;
}
if ( ( d->dragStartPos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() ) {
- d->buttonDown = FALSE;
+ d->buttonDown = false;
#ifndef TQT_NO_DRAGANDDROP
startDrag();
#endif
@@ -4703,7 +4700,7 @@ void TQListView::contentsMouseMoveEvent( TQMouseEvent * e )
// check, if we need to scroll
if ( vp.y() > visibleHeight() || vp.y() < 0 )
- needAutoScroll = TRUE;
+ needAutoScroll = true;
// if we need to scroll and no autoscroll timer is started,
// connect the timer
@@ -4711,7 +4708,7 @@ void TQListView::contentsMouseMoveEvent( TQMouseEvent * e )
d->scrollTimer = new TQTimer( this );
connect( d->scrollTimer, TQ_SIGNAL(timeout()),
this, TQ_SLOT(doAutoScroll()) );
- d->scrollTimer->start( 100, FALSE );
+ d->scrollTimer->start( 100, false );
// call it once manually
doAutoScroll( vp );
}
@@ -4745,7 +4742,7 @@ void TQListView::doAutoScroll()
Handles auto-scrolling when the mouse button is pressed
and the mouse is outside the widget.
- If cursorPos is (0,0) (isNull == TRUE) it uses the current TQCursor::pos, otherwise it uses cursorPos
+ If cursorPos is (0,0) (isNull == true) it uses the current TQCursor::pos, otherwise it uses cursorPos
*/
void TQListView::doAutoScroll( const TQPoint &cursorPos )
{
@@ -4802,7 +4799,7 @@ void TQListView::doAutoScroll( const TQPoint &cursorPos )
setSelected( c, d->select );
} else if ( d->selectionMode == Extended ) {
if ( selectRange( c, oldCurrent, d->selectAnchor ) ) {
- d->useDoubleBuffer = TRUE;
+ d->useDoubleBuffer = true;
triggerUpdate();
emit selectionChanged();
}
@@ -4810,7 +4807,7 @@ void TQListView::doAutoScroll( const TQPoint &cursorPos )
}
setCurrentItem( c );
- d->visibleTimer->start( 1, TRUE );
+ d->visibleTimer->start( 1, true );
}
/*!
@@ -4819,7 +4816,7 @@ void TQListView::doAutoScroll( const TQPoint &cursorPos )
void TQListView::focusInEvent( TQFocusEvent* )
{
- d->inMenuMode = FALSE;
+ d->inMenuMode = false;
if ( d->focusItem ) {
repaintItem( d->focusItem );
} else if ( firstChild() && TQFocusEvent::reason() != TQFocusEvent::Mouse ) {
@@ -4828,22 +4825,22 @@ void TQListView::focusInEvent( TQFocusEvent* )
repaintItem( d->focusItem );
}
if ( TQFocusEvent::reason() == TQFocusEvent::Mouse ) {
- d->ignoreEditAfterFocus = TRUE;
- d->startEdit = FALSE;
+ d->ignoreEditAfterFocus = true;
+ d->startEdit = false;
}
if ( style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this ) ) {
bool db = d->useDoubleBuffer;
- d->useDoubleBuffer = TRUE;
- viewport()->repaint( FALSE );
+ d->useDoubleBuffer = true;
+ viewport()->repaint( false );
d->useDoubleBuffer = db;
}
TQRect mfrect = itemRect( d->focusItem );
if ( mfrect.isValid() ) {
if ( header() && header()->isVisible() )
- setMicroFocusHint( mfrect.x(), mfrect.y()+header()->height(), mfrect.width(), mfrect.height(), FALSE );
+ setMicroFocusHint( mfrect.x(), mfrect.y()+header()->height(), mfrect.width(), mfrect.height(), false );
else
- setMicroFocusHint( mfrect.x(), mfrect.y(), mfrect.width(), mfrect.height(), FALSE );
+ setMicroFocusHint( mfrect.x(), mfrect.y(), mfrect.width(), mfrect.height(), false );
}
}
@@ -4855,15 +4852,15 @@ void TQListView::focusInEvent( TQFocusEvent* )
void TQListView::focusOutEvent( TQFocusEvent* )
{
if ( TQFocusEvent::reason() == TQFocusEvent::Popup && d->buttonDown )
- d->buttonDown = FALSE;
+ d->buttonDown = false;
if ( style().styleHint( TQStyle::SH_ItemView_ChangeHighlightOnFocus, this ) ) {
d->inMenuMode =
TQFocusEvent::reason() == TQFocusEvent::Popup
|| (tqApp->focusWidget() && tqApp->focusWidget()->inherits("TQMenuBar"));
if ( !d->inMenuMode ) {
bool db = d->useDoubleBuffer;
- d->useDoubleBuffer = TRUE;
- viewport()->repaint( FALSE );
+ d->useDoubleBuffer = true;
+ viewport()->repaint( false );
d->useDoubleBuffer = db;
}
}
@@ -4890,7 +4887,7 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
if ( !oldCurrent ) {
setCurrentItem( firstChild() );
if ( d->selectionMode == Single )
- setSelected( firstChild(), TRUE );
+ setSelected( firstChild(), true );
return;
}
@@ -4900,9 +4897,9 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
TQRect r( itemRect( i ) );
TQListViewItem * i2;
- bool singleStep = FALSE;
- bool selectCurrent = TRUE;
- bool wasNavigation = TRUE;
+ bool singleStep = false;
+ bool selectCurrent = true;
+ bool wasNavigation = true;
switch( e->key() ) {
case Key_Backspace:
@@ -4924,26 +4921,26 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
// do NOT accept. TQDialog.
return;
case Key_Down:
- selectCurrent = FALSE;
+ selectCurrent = false;
i = i->itemBelow();
d->currentPrefix.truncate( 0 );
- singleStep = TRUE;
+ singleStep = true;
break;
case Key_Up:
- selectCurrent = FALSE;
+ selectCurrent = false;
i = i->itemAbove();
d->currentPrefix.truncate( 0 );
- singleStep = TRUE;
+ singleStep = true;
break;
case Key_Home:
- selectCurrent = FALSE;
+ selectCurrent = false;
i = firstChild();
if (!i->height() || !i->isEnabled())
i = i->itemBelow();
d->currentPrefix.truncate( 0 );
break;
case Key_End:
- selectCurrent = FALSE;
+ selectCurrent = false;
i = firstChild();
while (i->nextSibling() && i->nextSibling()->height() && i->nextSibling()->isEnabled())
i = i->nextSibling();
@@ -4952,7 +4949,7 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
d->currentPrefix.truncate( 0 );
break;
case Key_Next:
- selectCurrent = FALSE;
+ selectCurrent = false;
i2 = itemAt( TQPoint( 0, visibleHeight()-1 ) );
if ( i2 == i || !r.isValid() ||
visibleHeight() <= itemRect( i ).bottom() ) {
@@ -4975,7 +4972,7 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
d->currentPrefix.truncate( 0 );
break;
case Key_Prior:
- selectCurrent = FALSE;
+ selectCurrent = false;
i2 = itemAt( TQPoint( 0, 0 ) );
if ( i == i2 || !r.isValid() || r.top() <= 0 ) {
if ( i2 )
@@ -4993,7 +4990,7 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
case Key_Plus:
d->currentPrefix.truncate( 0 );
if ( !i->isOpen() && (i->isExpandable() || i->childCount()) )
- setOpen( i, TRUE );
+ setOpen( i, true );
else
return;
break;
@@ -5006,7 +5003,7 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
if (childItem)
i = childItem;
} else if ( !i->isOpen() && (i->isExpandable() || i->childCount()) ) {
- setOpen( i, TRUE );
+ setOpen( i, true );
} else if ( contentsX() + visibleWidth() < contentsWidth() ) {
horizontalScrollBar()->addLine();
return;
@@ -5017,14 +5014,14 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
case Key_Minus:
d->currentPrefix.truncate( 0 );
if ( i->isOpen() )
- setOpen( i, FALSE );
+ setOpen( i, false );
else
return;
break;
case Key_Left:
d->currentPrefix.truncate( 0 );
if ( i->isOpen() ) {
- setOpen( i, FALSE );
+ setOpen( i, false );
} else if ( i->parentItem && i->parentItem != d->r ) {
i = i->parentItem;
} else if ( contentsX() ) {
@@ -5035,7 +5032,7 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
}
break;
case Key_Space:
- activatedByClick = FALSE;
+ activatedByClick = false;
d->currentPrefix.truncate( 0 );
if ( currentItem() && !currentItem()->isEnabled() )
break;
@@ -5054,12 +5051,12 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
currentItem()->startRename( 0 );
default:
if ( e->text().length() > 0 && e->text()[ 0 ].isPrint() ) {
- selectCurrent = FALSE;
- wasNavigation = FALSE;
+ selectCurrent = false;
+ wasNavigation = false;
TQString input( d->currentPrefix );
TQListViewItem * keyItem = i;
TQTime now( TQTime::currentTime() );
- bool tryFirst = TRUE;
+ bool tryFirst = true;
while( keyItem ) {
// try twice, first with the previous string and this char
if ( d->currentPrefixTime.msecsTo( now ) <= 400 )
@@ -5069,10 +5066,10 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
if ( input.length() == e->text().length() ) {
if ( keyItem->itemBelow() ) {
keyItem = keyItem->itemBelow();
- tryFirst = TRUE;
+ tryFirst = true;
} else {
keyItem = firstChild();
- tryFirst = FALSE;
+ tryFirst = false;
}
}
TQString keyItemKey;
@@ -5095,14 +5092,14 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
// nonoptimal double-break...
keyItem = 0;
input.truncate( 0 );
- tryFirst = FALSE;
+ tryFirst = false;
}
}
if ( keyItem )
keyItem = keyItem->itemBelow();
if ( !keyItem && tryFirst ) {
keyItem = firstChild();
- tryFirst = FALSE;
+ tryFirst = false;
}
}
// then, if appropriate, with just this character
@@ -5117,7 +5114,7 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
d->currentPrefix = TQString::null;
switch ( e->key() ) {
case Key_A:
- selectAll( TRUE );
+ selectAll( true );
break;
}
}
@@ -5138,10 +5135,10 @@ void TQListView::keyPressEvent( TQKeyEvent * e )
wasNavigation && (e->state() & ControlButton) );
if ( d->focusItem && !d->focusItem->isSelected() && d->selectionMode == Single && selectCurrent )
- setSelected( d->focusItem, TRUE );
+ setSelected( d->focusItem, true );
if ( singleStep )
- d->visibleTimer->start( 1, TRUE );
+ d->visibleTimer->start( 1, true );
else
ensureItemVisible( i );
}
@@ -5265,7 +5262,7 @@ void TQListView::setSelectionMode( SelectionMode mode )
( mode == TQListView::Single || mode == TQListView::NoSelection ) ){
clearSelection();
if ( ( mode == TQListView::Single ) && currentItem() )
- currentItem()->selected = TRUE;
+ currentItem()->selected = true;
}
d->selectionMode = mode;
@@ -5278,11 +5275,11 @@ TQListView::SelectionMode TQListView::selectionMode() const
/*!
- If \a selected is TRUE the \a item is selected; otherwise it is
+ If \a selected is true the \a item is selected; otherwise it is
unselected.
If the list view is in \c Single selection mode and \a selected is
- TRUE, the currently selected item is unselected and \a item is
+ true, the currently selected item is unselected and \a item is
made current. Unlike TQListViewItem::setSelected(), this function
updates the list view as necessary and emits the
selectionChanged() signals.
@@ -5297,15 +5294,15 @@ void TQListView::setSelected( TQListViewItem * item, bool selected )
!item->isSelectable() || selectionMode() == NoSelection )
return;
- bool emitHighlighted = FALSE;
+ bool emitHighlighted = false;
if ( selectionMode() == Single && d->focusItem != item ) {
TQListViewItem *o = d->focusItem;
if ( d->focusItem && d->focusItem->selected )
- d->focusItem->setSelected( FALSE );
+ d->focusItem->setSelected( false );
d->focusItem = item;
if ( o )
repaintItem( o );
- emitHighlighted = TRUE;
+ emitHighlighted = true;
}
item->setSelected( selected );
@@ -5347,11 +5344,11 @@ void TQListView::setSelectionAnchor( TQListViewItem *item )
void TQListView::clearSelection()
{
- selectAll( FALSE );
+ selectAll( false );
}
/*!
- If \a select is TRUE, all the items get selected; otherwise all
+ If \a select is true, all the items get selected; otherwise all
the items get unselected. This only works in the selection modes \c
Multi and \c Extended. In \c Single and \c NoSelection mode the
selection of the current item is just set to \a select.
@@ -5361,21 +5358,21 @@ void TQListView::selectAll( bool select )
{
if ( d->selectionMode == Multi || d->selectionMode == Extended ) {
bool b = signalsBlocked();
- blockSignals( TRUE );
- bool anything = FALSE;
+ blockSignals( true );
+ bool anything = false;
TQListViewItemIterator it( this );
while ( it.current() ) {
TQListViewItem *i = it.current();
if ( i->isVisible()) {
if ( (bool)i->selected != select ) {
i->setSelected( select );
- anything = TRUE;
+ anything = true;
}
}
else {
- if ( (bool)i->selected != FALSE ) {
- i->setSelected( FALSE );
- anything = TRUE;
+ if ( (bool)i->selected != false ) {
+ i->setSelected( false );
+ anything = true;
}
}
++it;
@@ -5383,7 +5380,7 @@ void TQListView::selectAll( bool select )
blockSignals( b );
if ( anything ) {
emit selectionChanged();
- d->useDoubleBuffer = TRUE;
+ d->useDoubleBuffer = true;
triggerUpdate();
}
} else if ( d->focusItem ) {
@@ -5404,15 +5401,15 @@ void TQListView::invertSelection()
return;
bool b = signalsBlocked();
- blockSignals( TRUE );
+ blockSignals( true );
TQListViewItemIterator it( this );
for ( ; it.current(); ++it ) {
if (it.current()->isVisible()) {
it.current()->setSelected( !it.current()->isSelected() );
}
else {
- if ( FALSE != it.current()->isSelected() ) {
- it.current()->setSelected( FALSE );
+ if ( false != it.current()->isSelected() ) {
+ it.current()->setSelected( false );
}
}
}
@@ -5423,15 +5420,15 @@ void TQListView::invertSelection()
/*!
- Returns TRUE if the list view item \a i is selected; otherwise
- returns FALSE.
+ Returns true if the list view item \a i is selected; otherwise
+ returns false.
\sa TQListViewItem::isSelected()
*/
bool TQListView::isSelected( const TQListViewItem * i ) const
{
- return i ? i->isSelected() : FALSE;
+ return i ? i->isSelected() : false;
}
@@ -5485,21 +5482,21 @@ void TQListView::setCurrentItem( TQListViewItem * i )
TQRect mfrect = itemRect( i );
if ( mfrect.isValid() ) {
if ( header() && header()->isVisible() )
- setMicroFocusHint( mfrect.x(), mfrect.y()+header()->height(), mfrect.width(), mfrect.height(), FALSE );
+ setMicroFocusHint( mfrect.x(), mfrect.y()+header()->height(), mfrect.width(), mfrect.height(), false );
else
- setMicroFocusHint( mfrect.x(), mfrect.y(), mfrect.width(), mfrect.height(), FALSE );
+ setMicroFocusHint( mfrect.x(), mfrect.y(), mfrect.width(), mfrect.height(), false );
}
if ( i != prev ) {
if ( i && d->selectionMode == Single ) {
- bool changed = FALSE;
+ bool changed = false;
if ( prev && prev->selected ) {
- changed = TRUE;
- prev->setSelected( FALSE );
+ changed = true;
+ prev->setSelected( false );
}
if ( i && !i->selected && d->selectionMode != NoSelection && i->isSelectable() ) {
- i->setSelected( TRUE );
- changed = TRUE;
+ i->setSelected( true );
+ changed = true;
emit selectionChanged( i );
}
if ( changed )
@@ -5619,7 +5616,7 @@ TQRect TQListView::itemRect( const TQListViewItem * i ) const
/*!
Sets the list view to be sorted by column \a column in ascending
- order if \a ascending is TRUE or descending order if it is FALSE.
+ order if \a ascending is true or descending order if it is false.
If \a column is -1, sorting is disabled and the user cannot sort
columns by clicking on the column headers. If \a column is larger
@@ -5678,7 +5675,7 @@ void TQListView::changeSortColumn( int column )
}
if ( d->sortcolumn != Unsorted ) {
int lcol = d->h->mapToLogical( column );
- setSorting( lcol, d->sortcolumn == lcol ? !d->ascending : TRUE);
+ setSorting( lcol, d->sortcolumn == lcol ? !d->ascending : true);
}
}
@@ -5871,9 +5868,9 @@ void TQListView::reconfigureItems()
d->minLeftBearing = fontMetrics().minLeftBearing();
d->minRightBearing = fontMetrics().minRightBearing();
d->ellipsisWidth = fontMetrics().width( "..." ) * 2;
- d->r->setOpen( FALSE );
- d->r->configured = FALSE;
- d->r->setOpen( TRUE );
+ d->r->setOpen( false );
+ d->r->configured = false;
+ d->r->setOpen( true );
}
/*!
@@ -5904,7 +5901,7 @@ void TQListView::widthChanged( const TQListViewItem* item, int c )
w += indent;
}
if ( w > columnWidth( col ) && !d->h->isStretchEnabled() && !d->h->isStretchEnabled( col ) ) {
- d->updateHeader = TRUE;
+ d->updateHeader = true;
setColumnWidth( col, w );
}
}
@@ -5916,12 +5913,12 @@ void TQListView::widthChanged( const TQListViewItem* item, int c )
\property TQListView::allColumnsShowFocus
\brief whether items should show keyboard focus using all columns
- If this property is TRUE all columns will show focus and selection
+ If this property is true all columns will show focus and selection
states, otherwise only column 0 will show focus.
- The default is FALSE.
+ The default is false.
- Setting this to TRUE if it's not necessary may cause noticeable
+ Setting this to true if it's not necessary may cause noticeable
flicker.
*/
@@ -5998,7 +5995,7 @@ void TQListView::repaintItem( const TQListViewItem * item ) const
{
if ( !item )
return;
- d->dirtyItemTimer->start( 0, TRUE );
+ d->dirtyItemTimer->start( 0, true );
if ( !d->dirtyItems )
d->dirtyItems = new TQPtrDict<void>();
d->dirtyItems->replace( (void *)item, (void *)item );
@@ -6011,7 +6008,7 @@ struct TQCheckListItemPrivate
exclusive( 0 ),
currentState( TQCheckListItem::Off ),
statesDict( 0 ),
- tristate( FALSE ) {}
+ tristate( false ) {}
TQCheckListItem *exclusive;
TQCheckListItem::ToggleState currentState;
@@ -6218,14 +6215,14 @@ TQCheckListItem::TQCheckListItem( TQListViewItem *parent, const TQString &text,
void TQCheckListItem::init()
{
d = new TQCheckListItemPrivate();
- on = FALSE; // ### remove on ver 4
+ on = false; // ### remove on ver 4
if ( myType == CheckBoxController || myType == CheckBox ) {
d->statesDict = new TQPtrDict<ToggleState>(101);
- d->statesDict->setAutoDelete( TRUE );
+ d->statesDict->setAutoDelete( true );
}
- // CheckBoxControllers by default have tristate set to TRUE
+ // CheckBoxControllers by default have tristate set to true
if ( myType == CheckBoxController )
- setTristate( TRUE );
+ setTristate( true );
}
/*!
@@ -6254,7 +6251,7 @@ TQCheckListItem::~TQCheckListItem()
/*!
\fn bool TQCheckListItem::isOn() const
- Returns TRUE if the item is toggled on; otherwise returns FALSE.
+ Returns true if the item is toggled on; otherwise returns false.
*/
/*!
@@ -6276,7 +6273,7 @@ void TQCheckListItem::setTristate( bool b )
}
/*!
- Returns TRUE if the item is tristate; otherwise returns FALSE.
+ Returns true if the item is tristate; otherwise returns false.
\sa setTristate()
*/
@@ -6329,7 +6326,7 @@ void TQCheckListItem::setState( ToggleState s )
{
if ( myType == CheckBoxController && state() == NoChange )
updateStoredState( (void*) this );
- setState( s, TRUE, TRUE );
+ setState( s, true, true );
}
/*
@@ -6360,7 +6357,7 @@ void TQCheckListItem::setState( ToggleState s, bool update, bool store)
( ((TQCheckListItem*)item)->type() == CheckBox ||
((TQCheckListItem*)item)->type() == CheckBoxController ) ) {
TQCheckListItem *checkItem = (TQCheckListItem*)item;
- checkItem->setState( s, FALSE, FALSE );
+ checkItem->setState( s, false, false );
childCount++;
}
item = item->nextSibling();
@@ -6368,7 +6365,7 @@ void TQCheckListItem::setState( ToggleState s, bool update, bool store)
if ( update ) {
if ( childCount > 0 ) {
ToggleState oldState = internalState();
- updateController( FALSE, FALSE );
+ updateController( false, false );
if ( oldState != internalState() &&
parent() && parent()->rtti() == 1 &&
((TQCheckListItem*)parent())->type() == CheckBoxController )
@@ -6416,10 +6413,7 @@ void TQCheckListItem::setCurrentState( ToggleState s )
{
ToggleState old = d->currentState;
d->currentState = s;
- if (d->currentState == On)
- on = TRUE;
- else
- on = FALSE;
+ on = d->currentState == On;
#if defined(QT_ACCESSIBILITY_SUPPORT)
if ( old != d->currentState && listView() )
@@ -6471,7 +6465,7 @@ TQCheckListItem::ToggleState TQCheckListItem::storedState( void *key ) const
void TQCheckListItem::turnOffChild()
{
if ( myType == RadioButtonController && d->exclusive )
- d->exclusive->setOn( FALSE );
+ d->exclusive->setOn( false );
}
/*!
@@ -6487,10 +6481,10 @@ void TQCheckListItem::activate()
TQPoint pos;
int boxsize = lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv);
if ( activatedPos( pos ) ) {
- bool parentControl = FALSE;
+ bool parentControl = false;
if ( parent() && parent()->rtti() == 1 &&
((TQCheckListItem*) parent())->type() == RadioButtonController )
- parentControl = TRUE;
+ parentControl = true;
int x = parentControl ? 0 : 3;
int align = lv->columnAlignment( 0 );
@@ -6529,21 +6523,21 @@ void TQCheckListItem::activate()
}
ignoreDoubleClick();
} else if ( myType == RadioButton ) {
- setOn( TRUE );
+ setOn( true );
ignoreDoubleClick();
}
}
/*!
- Sets the button on if \a b is TRUE, otherwise sets it off.
+ Sets the button on if \a b is true, otherwise sets it off.
Maintains radio button exclusivity.
*/
void TQCheckListItem::setOn( bool b )
{
if ( b )
- setState( On , TRUE, TRUE );
+ setState( On , true, true );
else
- setState( Off , TRUE, TRUE );
+ setState( Off , true, true );
}
@@ -6594,12 +6588,12 @@ void TQCheckListItem::restoreState( void *key, int depth )
}
if ( childCount > 0 ) {
if ( depth == 0 )
- updateController( TRUE );
+ updateController( true );
else
- updateController( FALSE );
+ updateController( false );
} else {
// if there are no children we retrieve the CheckBoxController state directly.
- setState( storedState( key ), TRUE, FALSE );
+ setState( storedState( key ), true, false );
}
}
break;
@@ -6626,7 +6620,7 @@ void TQCheckListItem::updateController( bool update , bool store )
controller = (TQCheckListItem*)parent();
ToggleState theState = Off;
- bool first = TRUE;
+ bool first = true;
TQListViewItem *item = firstChild();
while( item && theState != NoChange ) {
if ( item->rtti() == 1 &&
@@ -6635,7 +6629,7 @@ void TQCheckListItem::updateController( bool update , bool store )
TQCheckListItem *checkItem = (TQCheckListItem*)item;
if ( first ) {
theState = checkItem->internalState();
- first = FALSE;
+ first = false;
} else {
if ( checkItem->internalState() == NoChange ||
theState != checkItem->internalState() )
@@ -6744,10 +6738,10 @@ void TQCheckListItem::paintCell( TQPainter * p, const TQColorGroup & cg,
return;
}
- bool parentControl = FALSE;
+ bool parentControl = false;
if ( parent() && parent()->rtti() == 1 &&
((TQCheckListItem*) parent())->type() == RadioButtonController )
- parentControl = TRUE;
+ parentControl = true;
TQFontMetrics fm( lv->fontMetrics() );
int boxsize = lv->style().pixelMetric( myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize :
@@ -6821,7 +6815,7 @@ void TQCheckListItem::paintCell( TQPainter * p, const TQColorGroup & cg,
void TQCheckListItem::paintFocus( TQPainter *p, const TQColorGroup & cg,
const TQRect & r )
{
- bool intersect = TRUE;
+ bool intersect = true;
TQListView *lv = listView();
if ( lv && lv->header()->mapToActual( 0 ) != 0 ) {
int xdepth = lv->treeStepSize() * ( depth() + ( lv->rootIsDecorated() ? 1 : 0) ) + lv->itemMargin();
@@ -6829,10 +6823,10 @@ void TQCheckListItem::paintFocus( TQPainter *p, const TQColorGroup & cg,
xdepth += p;
intersect = r.intersects( TQRect( p, r.y(), xdepth - p + 1, r.height() ) );
}
- bool parentControl = FALSE;
+ bool parentControl = false;
if ( parent() && parent()->rtti() == 1 &&
((TQCheckListItem*) parent())->type() == RadioButtonController )
- parentControl = TRUE;
+ parentControl = true;
if ( myType != RadioButtonController && intersect &&
(lv->rootIsDecorated() || myType == RadioButton ||
(myType == CheckBox && parentControl) ) ) {
@@ -6902,8 +6896,8 @@ TQSize TQListView::minimumSizeHint() const
/*!
- Sets \a item to be open if \a open is TRUE and \a item is
- expandable, and to be closed if \a open is FALSE. Repaints
+ Sets \a item to be open if \a open is true and \a item is
+ expandable, and to be closed if \a open is false. Repaints
accordingly.
\sa TQListViewItem::setOpen() TQListViewItem::setExpandable()
@@ -6925,7 +6919,7 @@ void TQListView::setOpen( TQListViewItem * item, bool open )
if ( open ) {
TQListViewItem* lastChild = item;
TQListViewItem* tmp;
- while ( TRUE ) {
+ while ( true ) {
tmp = lastChild->itemBelow();
if ( !tmp || tmp == nextParent )
break;
@@ -6944,7 +6938,7 @@ void TQListView::setOpen( TQListViewItem * item, bool open )
c = d->drawables->next();
if ( c && c->i == item ) {
- d->dirtyItemTimer->start( 0, TRUE );
+ d->dirtyItemTimer->start( 0, true );
if ( !d->dirtyItems )
d->dirtyItems = new TQPtrDict<void>();
while( c && c->i ) {
@@ -6972,7 +6966,7 @@ bool TQListView::isOpen( const TQListViewItem * item ) const
\brief whether the list view shows open/close signs on root items
Open/close signs are small <b>+</b> or <b>-</b> symbols in windows
- style, or arrows in Motif style. The default is FALSE.
+ style, or arrows in Motif style. The default is false.
*/
void TQListView::setRootIsDecorated( bool enable )
@@ -7006,7 +7000,7 @@ void TQListView::ensureItemVisible( const TQListViewItem * i )
TQListViewItem *parent = i->parent();
while ( parent ) {
if ( !parent->isOpen() )
- parent->setOpen( TRUE );
+ parent->setOpen( true );
parent = parent->parent();
}
@@ -7138,7 +7132,7 @@ void TQListView::showEvent( TQShowEvent * )
delete d->dirtyItems;
d->dirtyItems = 0;
d->dirtyItemTimer->stop();
- d->fullRepaintOnComlumnChange = TRUE;
+ d->fullRepaintOnComlumnChange = true;
updateGeometries();
}
@@ -7168,7 +7162,7 @@ int TQListViewItem::itemPos() const
i = s.pop();
if ( p ) {
if ( !p->configured ) {
- p->configured = TRUE;
+ p->configured = true;
p->setup(); // ### virtual non-const function called in const
}
a += p->height();
@@ -7209,7 +7203,7 @@ void TQListView::openFocusItem()
{
d->autoopenTimer->stop();
if ( d->focusItem && !d->focusItem->isOpen() ) {
- d->focusItem->setOpen( TRUE );
+ d->focusItem->setOpen( true );
d->focusItem->repaint();
}
}
@@ -7320,7 +7314,7 @@ void TQListView::startDrag()
return;
d->startDragItem = 0;
- d->buttonDown = FALSE;
+ d->buttonDown = false;
TQDragObject *drag = dragObject();
if ( !drag )
@@ -7353,7 +7347,7 @@ TQListView::RenameAction TQListView::defaultRenameAction() const
}
/*!
- Returns TRUE if an item is being renamed; otherwise returns FALSE.
+ Returns true if an item is being renamed; otherwise returns false.
*/
bool TQListView::isRenaming() const
@@ -7791,7 +7785,7 @@ void TQListViewItemIterator::init( int iteratorFlags )
// makes new global ptrdict if it doesn't exist
if ( !qt_iteratorprivate_dict ) {
qt_iteratorprivate_dict = new TQPtrDict<TQListViewItemIteratorPrivate>;
- qt_iteratorprivate_dict->setAutoDelete( TRUE );
+ qt_iteratorprivate_dict->setAutoDelete( true );
}
// sets flag, or inserts new TQListViewItemIteratorPrivate with flag
@@ -7839,59 +7833,59 @@ void TQListViewItemIterator::currentRemoved()
}
/*
- returns TRUE if the item \a item matches all of the flags set for the iterator
+ returns true if the item \a item matches all of the flags set for the iterator
*/
bool TQListViewItemIterator::matchesFlags( const TQListViewItem *item ) const
{
if ( !item )
- return FALSE;
+ return false;
int flags = d() ? d()->flags : 0;
if ( flags == 0 )
- return TRUE;
+ return true;
if ( flags & Visible && !item->isVisible() )
- return FALSE;
+ return false;
if ( flags & Invisible && item->isVisible() )
- return FALSE;
+ return false;
if ( flags & Selected && !item->isSelected() )
- return FALSE;
+ return false;
if ( flags & Unselected && item->isSelected() )
- return FALSE;
+ return false;
if ( flags & Selectable && !item->isSelectable() )
- return FALSE;
+ return false;
if ( flags & NotSelectable && item->isSelectable() )
- return FALSE;
+ return false;
if ( flags & DragEnabled && !item->dragEnabled() )
- return FALSE;
+ return false;
if ( flags & DragDisabled && item->dragEnabled() )
- return FALSE;
+ return false;
if ( flags & DropEnabled && !item->dropEnabled() )
- return FALSE;
+ return false;
if ( flags & DropDisabled && item->dropEnabled() )
- return FALSE;
+ return false;
if ( flags & Expandable && !item->isExpandable() )
- return FALSE;
+ return false;
if ( flags & NotExpandable && item->isExpandable() )
- return FALSE;
+ return false;
if ( flags & Checked && !isChecked( item ) )
- return FALSE;
+ return false;
if ( flags & NotChecked && isChecked( item ) )
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
/*
we want the iterator to check TQCheckListItems as well, so we provide this convenience function
- that checks if the rtti() is 1 which means TQCheckListItem and if isOn is TRUE, returns FALSE otherwise.
+ that checks if the rtti() is 1 which means TQCheckListItem and if isOn is true, returns false otherwise.
*/
bool TQListViewItemIterator::isChecked( const TQListViewItem *item ) const
{
if ( item->rtti() == 1 )
return ((const TQCheckListItem*)item)->isOn();
- else return FALSE;
+ else return false;
}
void TQListView::handleItemChange( TQListViewItem *old, bool shift, bool control )
@@ -7901,17 +7895,17 @@ void TQListView::handleItemChange( TQListViewItem *old, bool shift, bool control
} else if ( d->selectionMode == Extended ) {
if ( shift ) {
selectRange( d->selectAnchor ? d->selectAnchor : old,
- d->focusItem, FALSE, TRUE, d->selectAnchor && !control );
+ d->focusItem, false, true, d->selectAnchor && !control );
} else if ( !control ) {
bool block = signalsBlocked();
- blockSignals( TRUE );
- selectAll( FALSE );
+ blockSignals( true );
+ selectAll( false );
blockSignals( block );
- setSelected( d->focusItem, TRUE );
+ setSelected( d->focusItem, true );
}
} else if ( d->selectionMode == Multi ) {
if ( shift )
- selectRange( old, d->focusItem, TRUE, FALSE );
+ selectRange( old, d->focusItem, true, false );
}
}
@@ -7920,14 +7914,14 @@ void TQListView::startRename()
if ( !currentItem() )
return;
currentItem()->startRename( d->pressedColumn );
- d->buttonDown = FALSE;
+ d->buttonDown = false;
}
-/* unselects items from to, including children, returns TRUE if any items were unselected */
+/* unselects items from to, including children, returns true if any items were unselected */
bool TQListView::clearRange( TQListViewItem *from, TQListViewItem *to, bool includeFirst )
{
if ( !from || !to )
- return FALSE;
+ return false;
// Swap
if ( from->itemPos() > to->itemPos() ) {
@@ -7944,13 +7938,13 @@ bool TQListView::clearRange( TQListViewItem *from, TQListViewItem *to, bool incl
}
// Clear items <from, to>
- bool changed = FALSE;
+ bool changed = false;
TQListViewItemIterator it( from );
while ( it.current() ) {
if ( it.current()->isSelected() ) {
- it.current()->setSelected( FALSE );
- changed = TRUE;
+ it.current()->setSelected( false );
+ changed = true;
}
if ( it.current() == to )
break;
@@ -7968,20 +7962,20 @@ void TQListView::selectRange( TQListViewItem *from, TQListViewItem *to, bool inv
return;
if ( from == to && !includeFirst )
return;
- bool swap = FALSE;
+ bool swap = false;
if ( to == from->itemAbove() )
- swap = TRUE;
+ swap = true;
if ( !swap && from != to && from != to->itemAbove() ) {
TQListViewItemIterator it( from );
- bool found = FALSE;
+ bool found = false;
for ( ; it.current(); ++it ) {
if ( it.current() == to ) {
- found = TRUE;
+ found = true;
break;
}
}
if ( !found )
- swap = TRUE;
+ swap = true;
}
if ( swap ) {
TQListViewItem *i = from;
@@ -7994,20 +7988,20 @@ void TQListView::selectRange( TQListViewItem *from, TQListViewItem *to, bool inv
from = from->itemBelow();
}
- bool changed = FALSE;
+ bool changed = false;
if ( clearSel ) {
TQListViewItemIterator it( firstChild() );
for ( ; it.current(); ++it ) {
if ( it.current()->selected ) {
- it.current()->setSelected( FALSE );
- changed = TRUE;
+ it.current()->setSelected( false );
+ changed = true;
}
}
it = TQListViewItemIterator( to );
for ( ; it.current(); ++it ) {
if ( it.current()->selected ) {
- it.current()->setSelected( FALSE );
- changed = TRUE;
+ it.current()->setSelected( false );
+ changed = true;
}
}
}
@@ -8015,21 +8009,21 @@ void TQListView::selectRange( TQListViewItem *from, TQListViewItem *to, bool inv
for ( TQListViewItem *i = from; i; i = i->itemBelow() ) {
if ( !invert ) {
if ( !i->selected && i->isSelectable() ) {
- i->setSelected( TRUE );
- changed = TRUE;
+ i->setSelected( true );
+ changed = true;
}
} else {
bool sel = !i->selected;
if ( ( (bool)i->selected != sel && sel && i->isSelectable() ) || !sel ) {
i->setSelected( sel );
- changed = TRUE;
+ changed = true;
}
}
if ( i == to )
break;
}
if ( changed ) {
- d->useDoubleBuffer = TRUE;
+ d->useDoubleBuffer = true;
triggerUpdate();
emit selectionChanged();
}
@@ -8039,7 +8033,7 @@ void TQListView::selectRange( TQListViewItem *from, TQListViewItem *to, bool inv
bool TQListView::selectRange( TQListViewItem *newItem, TQListViewItem *oldItem, TQListViewItem *anchorItem )
{
if ( !newItem || !oldItem || !anchorItem )
- return FALSE;
+ return false;
int anchorPos = anchorItem ? anchorItem->itemPos() : 0,
oldPos = oldItem ? oldItem->itemPos() : 0,
@@ -8054,7 +8048,7 @@ bool TQListView::selectRange( TQListViewItem *newItem, TQListViewItem *oldItem,
}
// removes the parts of the old selection that will no longer be selected
- bool changed = FALSE;
+ bool changed = false;
int topPos = top ? top->itemPos() : 0,
bottomPos = bottom ? bottom->itemPos() : 0;
if ( !(oldPos > topPos && oldPos < bottomPos) ) {
@@ -8069,7 +8063,7 @@ bool TQListView::selectRange( TQListViewItem *newItem, TQListViewItem *oldItem,
for ( ; lit.current(); ++lit ) {
if ( (bool)lit.current()->selected != d->select ) {
lit.current()->setSelected( d->select );
- changed = TRUE;
+ changed = true;
}
// Include bottom, then break
if ( lit.current() == bottom )
@@ -8159,7 +8153,7 @@ void TQListView::windowActivationChange( bool oldActive )
function that calls setColumnWidth( \a column, 0 ).
Note: The user may still be able to resize the hidden column using
- the header handles. To prevent this, call setResizeEnabled(FALSE,
+ the header handles. To prevent this, call setResizeEnabled(false,
\a column) on the list views header.
\sa setColumnWidth()
@@ -8197,7 +8191,7 @@ void TQListView::adjustColumn( int col )
d->h->adjustHeaderSize( oldw - w );
if (oldw != w) {
- d->fullRepaintOnComlumnChange = TRUE;
+ d->fullRepaintOnComlumnChange = true;
d->h->resizeSection( col, w );
emit d->h->sizeChange( col, oldw, w);
}
diff --git a/src/widgets/tqlistview.h b/src/widgets/tqlistview.h
index 29e2c629e..1985b4d3f 100644
--- a/src/widgets/tqlistview.h
+++ b/src/widgets/tqlistview.h
@@ -327,7 +327,7 @@ public:
virtual void setRootIsDecorated( bool );
bool rootIsDecorated() const;
- virtual void setSorting( int column, bool ascending = TRUE );
+ virtual void setSorting( int column, bool ascending = true );
int sortColumn() const;
void setSortColumn( int column );
SortOrder sortOrder() const;
@@ -453,9 +453,9 @@ private:
void reconfigureItems();
void widthChanged(const TQListViewItem*, int c);
void handleItemChange( TQListViewItem *old, bool shift, bool control );
- void selectRange( TQListViewItem *from, TQListViewItem *to, bool invert, bool includeFirst, bool clearSel = FALSE );
+ void selectRange( TQListViewItem *from, TQListViewItem *to, bool invert, bool includeFirst, bool clearSel = false );
bool selectRange( TQListViewItem *newItem, TQListViewItem *oldItem, TQListViewItem *anchorItem );
- bool clearRange( TQListViewItem *from, TQListViewItem *to, bool includeFirst = TRUE );
+ bool clearRange( TQListViewItem *from, TQListViewItem *to, bool includeFirst = true );
void doAutoScroll( const TQPoint &cursorPos );
TQListViewPrivate * d;
@@ -530,7 +530,7 @@ private:
ToggleState storedState( void *key ) const;
void stateChange( ToggleState s );
void restoreState( void *key, int depth = 0 );
- void updateController( bool update = TRUE , bool store = FALSE );
+ void updateController( bool update = true , bool store = false );
void updateStoredState( void *key );
void setState( ToggleState s, bool update, bool store );
void setCurrentState( ToggleState s );
diff --git a/src/widgets/tqmainwindow.cpp b/src/widgets/tqmainwindow.cpp
index bc5596645..bfee884c5 100644
--- a/src/widgets/tqmainwindow.cpp
+++ b/src/widgets/tqmainwindow.cpp
@@ -73,15 +73,15 @@ class TQMainWindowPrivate
{
public:
TQMainWindowPrivate()
- : mb(0), sb(0), ttg(0), mc(0), tll(0), mwl(0), ubp( FALSE ), utl( FALSE ),
- justify( FALSE ), movable( TRUE ), opaque( FALSE ), dockMenu( TRUE )
+ : mb(0), sb(0), ttg(0), mc(0), tll(0), mwl(0), ubp( false ), utl( false ),
+ justify( false ), movable( true ), opaque( false ), dockMenu( true )
{
- docks.insert( TQt::DockTop, TRUE );
- docks.insert( TQt::DockBottom, TRUE );
- docks.insert( TQt::DockLeft, TRUE );
- docks.insert( TQt::DockRight, TRUE );
- docks.insert( TQt::DockMinimized, FALSE );
- docks.insert( TQt::DockTornOff, TRUE );
+ docks.insert( TQt::DockTop, true );
+ docks.insert( TQt::DockBottom, true );
+ docks.insert( TQt::DockLeft, true );
+ docks.insert( TQt::DockRight, true );
+ docks.insert( TQt::DockMinimized, false );
+ docks.insert( TQt::DockTornOff, true );
}
~TQMainWindowPrivate()
@@ -138,7 +138,7 @@ public:
void setLeftDock( TQDockArea *l );
void setRightDock( TQDockArea *r );
void setCentralWidget( TQWidget *w );
- bool hasHeightForWidth() const { return FALSE; }
+ bool hasHeightForWidth() const { return false; }
TQSize sizeHint() const;
TQSize minimumSize() const;
TQLayoutIterator iterator();
@@ -152,7 +152,7 @@ protected:
}
private:
- int layoutItems( const TQRect&, bool testonly = FALSE );
+ int layoutItems( const TQRect&, bool testonly = false );
int extraPixels() const;
TQDockArea *left, *right;
@@ -307,8 +307,8 @@ public:
setFixedHeight( style().pixelMetric( TQStyle::PM_DockWindowHandleExtent,
this ) + 3 );
pressedHandle = -1;
- pressed = FALSE;
- setMouseTracking( TRUE );
+ pressed = false;
+ setMouseTracking( true );
win = parent;
#ifndef TQT_NO_TOOLTIP
tip = new TQHideToolTip( this );
@@ -351,7 +351,7 @@ protected:
}
void mousePressEvent( TQMouseEvent *e ) {
- pressed = TRUE;
+ pressed = true;
if ( !children() || children()->isEmpty() )
return;
mouseMoveEvent( e );
@@ -385,7 +385,7 @@ protected:
int old = pressedHandle;
pressedHandle = i;
if ( pressedHandle != old )
- repaint( TRUE );
+ repaint( true );
return;
}
x += 30;
@@ -394,11 +394,11 @@ protected:
int old = pressedHandle;
pressedHandle = -1;
if ( old != -1 )
- repaint( TRUE );
+ repaint( true );
}
void mouseReleaseEvent( TQMouseEvent *e ) {
- pressed = FALSE;
+ pressed = false;
if ( pressedHandle == -1 )
return;
if ( !children() || children()->isEmpty() )
@@ -414,7 +414,7 @@ protected:
}
}
pressedHandle = -1;
- repaint( FALSE );
+ repaint( false );
}
bool eventFilter( TQObject *o, TQEvent *e ) {
@@ -428,9 +428,9 @@ protected:
}
void updateState() {
- bool visible = TRUE;
+ bool visible = true;
if ( !children() || children()->isEmpty() ) {
- visible = FALSE;
+ visible = false;
} else {
TQObjectListIt it( *children() );
TQObject *o;
@@ -440,12 +440,12 @@ protected:
if ( !dw )
continue;
if ( dw->isHidden() ) {
- visible = FALSE;
+ visible = false;
continue;
}
if ( !dw->isVisible() )
continue;
- visible = TRUE;
+ visible = true;
break;
}
}
@@ -454,7 +454,7 @@ protected:
show();
else
hide();
- win->triggerLayout( FALSE );
+ win->triggerLayout( false );
update();
}
@@ -719,7 +719,7 @@ void TQHideToolTip::maybeTip( const TQPoint &pos )
lineUpDockWindows(). Pointers to the dock areas are available from
topDock(), leftDock(), rightDock() and bottomDock(). A customize
menu item is added to the pop up dock window menu if
- isCustomizable() returns TRUE; it returns FALSE by default.
+ isCustomizable() returns true; it returns false by default.
Reimplement isCustomizable() and customize() if you want to offer
this extra menu item, for example, to allow the user to change
settings relating to the main window and its toolbars and dock
@@ -732,12 +732,12 @@ void TQHideToolTip::maybeTip( const TQPoint &pos )
\code
TQToolBar *tb = new TQToolBar( this );
- addDockWindow( tb, tr( "Menubar" ), Top, FALSE );
+ addDockWindow( tb, tr( "Menubar" ), Top, false );
TQMenuBar *mb = new TQMenuBar( tb );
mb->setFrameStyle( TQFrame::NoFrame );
tb->setStretchableWidget( mb );
- setDockEnabled( tb, Left, FALSE );
- setDockEnabled( tb, Right, FALSE );
+ setDockEnabled( tb, Left, false );
+ setDockEnabled( tb, Right, false );
\endcode
An application with multiple dock windows can choose to save the
@@ -836,12 +836,12 @@ void TQHideToolTip::maybeTip( const TQPoint &pos )
/*!
\obsolete
- \fn void TQMainWindow::addToolBar( TQDockWindow *, Dock = Top, bool newLine = FALSE );
+ \fn void TQMainWindow::addToolBar( TQDockWindow *, Dock = Top, bool newLine = false );
*/
/*!
\obsolete
- \overload void TQMainWindow::addToolBar( TQDockWindow *, const TQString &label, Dock = Top, bool newLine = FALSE );
+ \overload void TQMainWindow::addToolBar( TQDockWindow *, const TQString &label, Dock = Top, bool newLine = false );
*/
/*!
@@ -861,7 +861,7 @@ void TQHideToolTip::maybeTip( const TQPoint &pos )
/*!
\obsolete
- \fn void TQMainWindow::lineUpToolBars( bool keepNewLines = FALSE );
+ \fn void TQMainWindow::lineUpToolBars( bool keepNewLines = false );
*/
/*!
@@ -894,9 +894,9 @@ TQMainWindow::TQMainWindow( TQWidget * parent, const char * name, WFlags f )
{
d = new TQMainWindowPrivate;
#ifdef TQ_WS_MACX
- d->opaque = TRUE;
+ d->opaque = true;
#else
- d->opaque = FALSE;
+ d->opaque = false;
#endif
installEventFilter( this );
d->topDock = new TQDockArea( Horizontal, TQDockArea::Normal, this, "qt_top_dock" );
@@ -956,7 +956,7 @@ TQMenuBar * TQMainWindow::menuBar() const
return d->mb;
TQObjectList * l
- = ((TQObject*)this)->queryList( "TQMenuBar", 0, FALSE, FALSE );
+ = ((TQObject*)this)->queryList( "TQMenuBar", 0, false, false );
TQMenuBar * b;
if ( l && l->count() ) {
b = (TQMenuBar *)l->first();
@@ -1019,7 +1019,7 @@ TQStatusBar * TQMainWindow::statusBar() const
return d->sb;
TQObjectList * l
- = ((TQObject*)this)->queryList( "TQStatusBar", 0, FALSE, FALSE );
+ = ((TQObject*)this)->queryList( "TQStatusBar", 0, false, false );
TQStatusBar * s;
if ( l && l->count() ) {
s = (TQStatusBar *)l->first();
@@ -1029,7 +1029,7 @@ TQStatusBar * TQMainWindow::statusBar() const
}
delete l;
((TQMainWindow *)this)->setStatusBar( s );
- ((TQMainWindow *)this)->triggerLayout( TRUE );
+ ((TQMainWindow *)this)->triggerLayout( true );
return s;
}
@@ -1082,8 +1082,8 @@ TQToolTipGroup * TQMainWindow::toolTipGroup() const
/*!
- If \a enable is TRUE then users can dock windows in the \a dock
- area. If \a enable is FALSE users cannot dock windows in the \a
+ If \a enable is true then users can dock windows in the \a dock
+ area. If \a enable is false users cannot dock windows in the \a
dock dock area.
Users can dock (drag) dock windows into any enabled dock area.
@@ -1096,8 +1096,8 @@ void TQMainWindow::setDockEnabled( Dock dock, bool enable )
/*!
- Returns TRUE if the \a dock dock area is enabled, i.e. it can
- accept user dragged dock windows; otherwise returns FALSE.
+ Returns true if the \a dock dock area is enabled, i.e. it can
+ accept user dragged dock windows; otherwise returns false.
\sa setDockEnabled()
*/
@@ -1110,8 +1110,8 @@ bool TQMainWindow::isDockEnabled( Dock dock ) const
/*!
\overload
- Returns TRUE if dock area \a area is enabled, i.e. it can accept
- user dragged dock windows; otherwise returns FALSE.
+ Returns true if dock area \a area is enabled, i.e. it can accept
+ user dragged dock windows; otherwise returns false.
\sa setDockEnabled()
*/
@@ -1127,14 +1127,14 @@ bool TQMainWindow::isDockEnabled( TQDockArea *area ) const
return d->docks[ DockTop ];
if ( area == d->bottomDock )
return d->docks[ DockBottom ];
- return FALSE;
+ return false;
}
/*!
\overload
- If \a enable is TRUE then users can dock the \a dw dock window in
- the \a dock area. If \a enable is FALSE users cannot dock the \a
+ If \a enable is true then users can dock the \a dw dock window in
+ the \a dock area. If \a enable is false users cannot dock the \a
dw dock window in the \a dock area.
In general users can dock (drag) dock windows into any enabled
@@ -1178,8 +1178,8 @@ void TQMainWindow::setDockEnabled( TQDockWindow *dw, Dock dock, bool enable )
/*!
\overload
- Returns TRUE if dock area \a area is enabled for the dock window
- \a dw; otherwise returns FALSE.
+ Returns true if dock area \a area is enabled for the dock window
+ \a dw; otherwise returns false.
\sa setDockEnabled()
*/
@@ -1187,7 +1187,7 @@ void TQMainWindow::setDockEnabled( TQDockWindow *dw, Dock dock, bool enable )
bool TQMainWindow::isDockEnabled( TQDockWindow *dw, TQDockArea *area ) const
{
if ( !isDockEnabled( area ) )
- return FALSE;
+ return false;
Dock dock;
if ( area == d->leftDock )
dock = DockLeft;
@@ -1198,15 +1198,15 @@ bool TQMainWindow::isDockEnabled( TQDockWindow *dw, TQDockArea *area ) const
else if ( area == d->bottomDock )
dock = DockBottom;
else
- return FALSE;
+ return false;
return isDockEnabled( dw, dock );
}
/*!
\overload
- Returns TRUE if dock area \a dock is enabled for the dock window
- \a tb; otherwise returns FALSE.
+ Returns true if dock area \a dock is enabled for the dock window
+ \a tb; otherwise returns false.
\sa setDockEnabled()
*/
@@ -1214,7 +1214,7 @@ bool TQMainWindow::isDockEnabled( TQDockWindow *dw, TQDockArea *area ) const
bool TQMainWindow::isDockEnabled( TQDockWindow *tb, Dock dock ) const
{
if ( !isDockEnabled( dock ) )
- return FALSE;
+ return false;
TQString s;
s.sprintf( "%p_%d", (void*)tb, (int)dock );
return d->disabledDocks.find( s ) == d->disabledDocks.end();
@@ -1225,10 +1225,10 @@ bool TQMainWindow::isDockEnabled( TQDockWindow *tb, Dock dock ) const
/*!
Adds \a dockWindow to the \a edge dock area.
- If \a newLine is FALSE (the default) then the \a dockWindow is
+ If \a newLine is false (the default) then the \a dockWindow is
added at the end of the \a edge. For vertical edges the end is at
the bottom, for horizontal edges (including \c Minimized) the end
- is at the right. If \a newLine is TRUE a new line of dock windows
+ is at the right. If \a newLine is true a new line of dock windows
is started with \a dockWindow as the first (left-most and
top-most) dock window.
@@ -1260,10 +1260,10 @@ void TQMainWindow::addDockWindow( TQDockWindow *dockWindow,
Adds \a dockWindow to the dock area with label \a label.
- If \a newLine is FALSE (the default) the \a dockWindow is added at
+ If \a newLine is false (the default) the \a dockWindow is added at
the end of the \a edge. For vertical edges the end is at the
bottom, for horizontal edges (including \c Minimized) the end is
- at the right. If \a newLine is TRUE a new line of dock windows is
+ at the right. If \a newLine is true a new line of dock windows is
started with \a dockWindow as the first (left-most and top-most)
dock window.
@@ -1298,25 +1298,25 @@ void TQMainWindow::moveDockWindow( TQDockWindow * dockWindow, Dock edge )
switch ( edge ) {
case DockTop:
if ( dockWindow->area() != d->topDock )
- dockWindow->removeFromDock( FALSE );
+ dockWindow->removeFromDock( false );
d->topDock->moveDockWindow( dockWindow );
emit dockWindowPositionChanged( dockWindow );
break;
case DockBottom:
if ( dockWindow->area() != d->bottomDock )
- dockWindow->removeFromDock( FALSE );
+ dockWindow->removeFromDock( false );
d->bottomDock->moveDockWindow( dockWindow );
emit dockWindowPositionChanged( dockWindow );
break;
case DockRight:
if ( dockWindow->area() != d->rightDock )
- dockWindow->removeFromDock( FALSE );
+ dockWindow->removeFromDock( false );
d->rightDock->moveDockWindow( dockWindow );
emit dockWindowPositionChanged( dockWindow );
break;
case DockLeft:
if ( dockWindow->area() != d->leftDock )
- dockWindow->removeFromDock( FALSE );
+ dockWindow->removeFromDock( false );
d->leftDock->moveDockWindow( dockWindow );
emit dockWindowPositionChanged( dockWindow );
break;
@@ -1344,7 +1344,7 @@ void TQMainWindow::moveDockWindow( TQDockWindow * dockWindow, Dock edge )
position number incremented and any of these on the same line are
moved right (down for vertical dock areas) to make room.
- If \a nl is TRUE, a new dock window line is created below the line
+ If \a nl is true, a new dock window line is created below the line
in which the moved dock window appears and the moved dock window,
with any others with higher positions on the same line, is moved
to this new line.
@@ -1367,22 +1367,22 @@ void TQMainWindow::moveDockWindow( TQDockWindow * dockWindow, Dock edge, bool nl
switch ( edge ) {
case DockTop:
if ( dockWindow->area() != d->topDock )
- dockWindow->removeFromDock( FALSE );
+ dockWindow->removeFromDock( false );
d->topDock->moveDockWindow( dockWindow, index );
break;
case DockBottom:
if ( dockWindow->area() != d->bottomDock )
- dockWindow->removeFromDock( FALSE );
+ dockWindow->removeFromDock( false );
d->bottomDock->moveDockWindow( dockWindow, index );
break;
case DockRight:
if ( dockWindow->area() != d->rightDock )
- dockWindow->removeFromDock( FALSE );
+ dockWindow->removeFromDock( false );
d->rightDock->moveDockWindow( dockWindow, index );
break;
case DockLeft:
if ( dockWindow->area() != d->leftDock )
- dockWindow->removeFromDock( FALSE );
+ dockWindow->removeFromDock( false );
d->leftDock->moveDockWindow( dockWindow, index );
break;
case DockTornOff:
@@ -1430,7 +1430,7 @@ void TQMainWindow::setUpLayout()
if ( !d->mb ) {
// slightly evil hack here. reconsider this
TQObjectList * l
- = ((TQObject*)this)->queryList( "TQMenuBar", 0, FALSE, FALSE );
+ = ((TQObject*)this)->queryList( "TQMenuBar", 0, false, false );
if ( l && l->count() )
d->mb = menuBar();
delete l;
@@ -1439,7 +1439,7 @@ void TQMainWindow::setUpLayout()
if ( !d->sb ) {
// as above.
TQObjectList * l
- = ((TQObject*)this)->queryList( "TQStatusBar", 0, FALSE, FALSE );
+ = ((TQObject*)this)->queryList( "TQStatusBar", 0, false, false );
if ( l && l->count() )
d->sb = statusBar();
delete l;
@@ -1606,12 +1606,12 @@ bool TQMainWindow::dockMainWindow( TQObject *dock )
{
while ( dock ) {
if ( dock->parent() && dock->parent() == this )
- return TRUE;
+ return true;
if ( ::tqt_cast<TQMainWindow*>(dock->parent()) )
- return FALSE;
+ return false;
dock = dock->parent();
}
- return FALSE;
+ return false;
}
/*!
@@ -1628,7 +1628,7 @@ bool TQMainWindow::eventFilter( TQObject* o, TQEvent *e )
( ( ::tqt_cast<TQDockArea*>(o) && dockMainWindow( o ) ) || o == d->hideDock || o == d->mb ) ) {
if ( showDockMenu( ( (TQMouseEvent*)e )->globalPos() ) ) {
( (TQContextMenuEvent*)e )->accept();
- return TRUE;
+ return true;
}
}
@@ -1694,7 +1694,7 @@ bool TQMainWindow::event( TQEvent * e )
\property TQMainWindow::usesBigPixmaps
\brief whether big pixmaps are enabled
- If FALSE (the default), the tool buttons will use small pixmaps;
+ If false (the default), the tool buttons will use small pixmaps;
otherwise big pixmaps will be used.
Tool buttons and other widgets that wish to respond to this
@@ -1800,7 +1800,7 @@ void TQMainWindow::setRightJustification( bool enable )
if ( enable == (bool)d->justify )
return;
d->justify = enable;
- triggerLayout( TRUE );
+ triggerLayout( true );
}
@@ -1869,13 +1869,13 @@ void TQMainWindow::styleChange( TQStyle& old )
Finds the location of the dock window \a dw.
If the \a dw dock window is found in the main window the function
- returns TRUE and populates the \a dock variable with the dw's dock
+ returns true and populates the \a dock variable with the dw's dock
area and the \a index with the dw's position within the dock area.
- It also sets \a nl to TRUE if the \a dw begins a new line
- (otherwise FALSE), and \a extraOffset with the dock window's offset.
+ It also sets \a nl to true if the \a dw begins a new line
+ (otherwise false), and \a extraOffset with the dock window's offset.
If the \a dw dock window is not found then the function returns
- FALSE and the state of \a dock, \a index, \a nl and \a extraOffset
+ false and the state of \a dock, \a index, \a nl and \a extraOffset
is undefined.
If you want to save and restore dock window positions then use
@@ -1903,7 +1903,7 @@ bool TQMainWindow::getLocation( TQDockWindow *dw, Dock &dock, int &index, bool &
}
nl = dw->newLine();
extraOffset = dw->offset();
- return TRUE;
+ return true;
}
#ifndef TQT_NO_TOOLBAR
@@ -2006,7 +2006,7 @@ void TQMainWindow::setDockWindowsMovable( bool enable )
\property TQMainWindow::dockWindowsMovable
\brief whether the dock windows are movable
- If TRUE (the default), the user will be able to move movable dock
+ If true (the default), the user will be able to move movable dock
windows from one TQMainWindow dock area to another, including the
\c TearOff area (i.e. where the dock window floats freely as a
window in its own right), and the \c Minimized area (where only
@@ -2014,7 +2014,7 @@ void TQMainWindow::setDockWindowsMovable( bool enable )
dock windows can also be moved within TQMainWindow dock areas, i.e.
to rearrange them within a dock area.
- If FALSE the user will not be able to move any dock windows.
+ If false the user will not be able to move any dock windows.
By default dock windows are moved transparently (i.e. only an
outline rectangle is shown during the drag), but this setting can
@@ -2043,9 +2043,9 @@ void TQMainWindow::setOpaqueMoving( bool b )
\property TQMainWindow::opaqueMoving
\brief whether dock windows are moved opaquely
- If TRUE the dock windows of the main window are shown opaquely
+ If true the dock windows of the main window are shown opaquely
(i.e. it shows the toolbar as it looks when docked) whilst it is
- being moved. If FALSE (the default) they are shown transparently,
+ being moved. If false (the default) they are shown transparently,
(i.e. as an outline rectangle).
\warning Opaque moving of toolbars and dockwindows is known to
@@ -2064,11 +2064,11 @@ bool TQMainWindow::opaqueMoving() const
areas (\c Top, \c Left, \c Right and \c Bottom) as compactly as
possible.
- If \a keepNewLines is TRUE, all dock windows stay on their
- original lines. If \a keepNewLines is FALSE then newlines may be
+ If \a keepNewLines is true, all dock windows stay on their
+ original lines. If \a keepNewLines is false then newlines may be
removed to achieve the most compact layout possible.
- The method only works if dockWindowsMovable() returns TRUE.
+ The method only works if dockWindowsMovable() returns true.
*/
void TQMainWindow::lineUpDockWindows( bool keepNewLines )
@@ -2082,13 +2082,13 @@ void TQMainWindow::lineUpDockWindows( bool keepNewLines )
}
/*!
- Returns TRUE, if the dock window menu is enabled; otherwise
- returns FALSE.
+ Returns true, if the dock window menu is enabled; otherwise
+ returns false.
The menu lists the (appropriate()) dock windows (which may be
shown or hidden), and has a "Line Up Dock Windows" menu item. It
will also have a "Customize" menu item if isCustomizable() returns
- TRUE.
+ true.
\sa setDockEnabled(), lineUpDockWindows() appropriate()
setAppropriate()
@@ -2100,14 +2100,14 @@ bool TQMainWindow::isDockMenuEnabled() const
}
/*!
- If \a b is TRUE, then right clicking on a dock window or dock area
- will pop up the dock window menu. If \a b is FALSE, right clicking
+ If \a b is true, then right clicking on a dock window or dock area
+ will pop up the dock window menu. If \a b is false, right clicking
a dock window or dock area will not pop up the menu.
The menu lists the (appropriate()) dock windows (which may be
shown or hidden), and has a "Line Up Dock Windows" item. It will
also have a "Customize" menu item if isCustomizable() returns
- TRUE.
+ true.
\sa lineUpDockWindows(), isDockMenuEnabled()
*/
@@ -2125,7 +2125,7 @@ void TQMainWindow::setDockMenuEnabled( bool b )
This function is called internally when necessary, e.g. when the
user right clicks a dock area (providing isDockMenuEnabled()
- returns TRUE).
+ returns true).
\omit
### TQt 4.0
You can reimplement this function if you wish to customize the
@@ -2144,9 +2144,9 @@ void TQMainWindow::setDockMenuEnabled( bool b )
The menu also has a menu item for lining up the dock windows.
- If isCustomizable() returns TRUE, a Customize menu item is added
+ If isCustomizable() returns true, a Customize menu item is added
to the menu, which if clicked will call customize(). The
- isCustomizable() function we provide returns FALSE and customize()
+ isCustomizable() function we provide returns false and customize()
does nothing, so they must be reimplemented in a subclass to be
useful.
*/
@@ -2161,7 +2161,7 @@ TQPopupMenu *TQMainWindow::createDockWindowMenu( DockWindows dockWindows ) const
delete l;
TQPopupMenu *menu = new TQPopupMenu( (TQMainWindow*)this, "qt_customize_menu" );
- menu->setCheckable( TRUE );
+ menu->setCheckable( true );
d->dockWindowModes.replace( menu, dockWindows );
connect( menu, TQ_SIGNAL( aboutToShow() ), this, TQ_SLOT( menuAboutToShow() ) );
return menu;
@@ -2191,7 +2191,7 @@ void TQMainWindow::menuAboutToShow()
TQObjectList *l = queryList( "TQDockWindow" );
- bool empty = TRUE;
+ bool empty = true;
if ( l && !l->isEmpty() ) {
TQObject *o = 0;
@@ -2204,14 +2204,14 @@ void TQMainWindow::menuAboutToShow()
if ( !label.isEmpty() ) {
int id = menu->insertItem( label, dw, TQ_SLOT( toggleVisible() ) );
menu->setItemChecked( id, dw->isVisible() );
- empty = FALSE;
+ empty = false;
}
}
if ( !empty )
menu->insertSeparator();
}
- empty = TRUE;
+ empty = true;
#ifndef TQT_NO_TOOLBAR
if ( dockWindows == AllDockWindows || dockWindows == OnlyToolBars ) {
@@ -2223,7 +2223,7 @@ void TQMainWindow::menuAboutToShow()
if ( !label.isEmpty() ) {
int id = menu->insertItem( label, tb, TQ_SLOT( toggleVisible() ) );
menu->setItemChecked( id, tb->isVisible() );
- empty = FALSE;
+ empty = false;
}
}
}
@@ -2245,8 +2245,8 @@ void TQMainWindow::menuAboutToShow()
/*!
Shows the dock menu at the position \a globalPos. The menu lists
the dock windows so that they can be shown (or hidden), lined up,
- and possibly customized. Returns TRUE if the menu is shown;
- otherwise returns FALSE.
+ and possibly customized. Returns true if the menu is shown;
+ otherwise returns false.
If you want a custom menu, reimplement this function. You can
create the menu from scratch or call createDockWindowMenu() and
@@ -2263,14 +2263,14 @@ void TQMainWindow::menuAboutToShow()
bool TQMainWindow::showDockMenu( const TQPoint &globalPos )
{
if ( !d->dockMenu )
- return FALSE;
+ return false;
if ( !d->rmbMenu )
d->rmbMenu = createDockWindowMenu();
if ( !d->rmbMenu )
- return FALSE;
+ return false;
d->rmbMenu->exec( globalPos );
- return TRUE;
+ return true;
}
void TQMainWindow::slotPlaceChanged()
@@ -2307,8 +2307,8 @@ TQDockArea *TQMainWindow::dockingArea( const TQPoint &p )
}
/*!
- Returns TRUE if \a dw is a dock window known to the main window;
- otherwise returns FALSE.
+ Returns true if \a dw is a dock window known to the main window;
+ otherwise returns false.
*/
bool TQMainWindow::hasDockWindow( TQDockWindow *dw )
@@ -2365,7 +2365,7 @@ TQDockArea *TQMainWindow::bottomDock() const
item on the dock window menu.
The customize menu item will only appear if isCustomizable()
- returns TRUE (it returns FALSE by default).
+ returns true (it returns false by default).
The function is intended, for example, to provide the user with a
means of telling the application that they wish to customize the
@@ -2374,7 +2374,7 @@ TQDockArea *TQMainWindow::bottomDock() const
The default implementation does nothing and the Customize menu
item is not shown on the right-click menu by default. If you want
the item to appear then reimplement isCustomizable() to return
- TRUE, and reimplement this function to do whatever you want.
+ true, and reimplement this function to do whatever you want.
\sa isCustomizable()
*/
@@ -2384,11 +2384,11 @@ void TQMainWindow::customize()
}
/*!
- Returns TRUE if the dock area dock window menu includes the
+ Returns true if the dock area dock window menu includes the
Customize menu item (which calls customize() when clicked).
- Returns FALSE by default, i.e. the popup menu will not contain a
+ Returns false by default, i.e. the popup menu will not contain a
Customize menu item. You will need to reimplement this function
- and set it to return TRUE if you wish the user to be able to see
+ and set it to return true if you wish the user to be able to see
the dock window menu.
\sa customize()
@@ -2396,13 +2396,13 @@ void TQMainWindow::customize()
bool TQMainWindow::isCustomizable() const
{
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if it is appropriate to include a menu item for the
+ Returns true if it is appropriate to include a menu item for the
\a dw dock window in the dock window menu; otherwise returns
- FALSE.
+ false.
The user is able to change the state (show or hide) a dock window
that has a menu item by clicking the item.
@@ -2417,7 +2417,7 @@ bool TQMainWindow::appropriate( TQDockWindow *dw ) const
{
TQMap<TQDockWindow*, bool>::ConstIterator it = d->appropriate.find( dw );
if ( it == d->appropriate.end() )
- return TRUE;
+ return true;
return *it;
}
@@ -2426,11 +2426,11 @@ bool TQMainWindow::appropriate( TQDockWindow *dw ) const
window's caption should appear as a menu item on the dock window
menu that lists the dock windows.
- If \a a is TRUE then the \a dw will appear as a menu item on the
+ If \a a is true then the \a dw will appear as a menu item on the
dock window menu. The user is able to change the state (show or
hide) a dock window that has a menu item by clicking the item;
depending on the state of your application, this may or may not be
- appropriate. If \a a is FALSE the \a dw will not appear on the
+ appropriate. If \a a is false the \a dw will not appear on the
popup menu.
\sa showDockMenu() isCustomizable() customize()
diff --git a/src/widgets/tqmainwindow.h b/src/widgets/tqmainwindow.h
index 7a09f47a9..121392b0f 100644
--- a/src/widgets/tqmainwindow.h
+++ b/src/widgets/tqmainwindow.h
@@ -88,9 +88,9 @@ public:
bool isDockEnabled( TQDockWindow *tb, Dock dock ) const;
bool isDockEnabled( TQDockWindow *tb, TQDockArea *area ) const;
- virtual void addDockWindow( TQDockWindow *, Dock = DockTop, bool newLine = FALSE );
+ virtual void addDockWindow( TQDockWindow *, Dock = DockTop, bool newLine = false );
virtual void addDockWindow( TQDockWindow *, const TQString &label,
- Dock = DockTop, bool newLine = FALSE );
+ Dock = DockTop, bool newLine = false );
virtual void moveDockWindow( TQDockWindow *, Dock = DockTop );
virtual void moveDockWindow( TQDockWindow *, Dock, bool nl, int index, int extraOffset = -1 );
virtual void removeDockWindow( TQDockWindow * );
@@ -112,23 +112,23 @@ public:
TQPtrList<TQDockWindow> dockWindows( Dock dock ) const;
TQPtrList<TQDockWindow> dockWindows() const;
- void lineUpDockWindows( bool keepNewLines = FALSE );
+ void lineUpDockWindows( bool keepNewLines = false );
bool isDockMenuEnabled() const;
// compatibility stuff
bool hasDockWindow( TQDockWindow *dw );
#ifndef TQT_NO_TOOLBAR
- void addToolBar( TQDockWindow *, Dock = DockTop, bool newLine = FALSE );
+ void addToolBar( TQDockWindow *, Dock = DockTop, bool newLine = false );
void addToolBar( TQDockWindow *, const TQString &label,
- Dock = DockTop, bool newLine = FALSE );
+ Dock = DockTop, bool newLine = false );
void moveToolBar( TQDockWindow *, Dock = DockTop );
void moveToolBar( TQDockWindow *, Dock, bool nl, int index, int extraOffset = -1 );
void removeToolBar( TQDockWindow * );
bool toolBarsMovable() const;
TQPtrList<TQToolBar> toolBars( Dock dock ) const;
- void lineUpToolBars( bool keepNewLines = FALSE );
+ void lineUpToolBars( bool keepNewLines = false );
#endif
virtual TQDockArea *dockingArea( const TQPoint &p );
@@ -181,11 +181,11 @@ protected:
private slots:
void slotPlaceChanged();
- void doLineUp() { lineUpDockWindows( TRUE ); }
+ void doLineUp() { lineUpDockWindows( true ); }
private:
TQMainWindowPrivate * d;
- void triggerLayout( bool deleteLayout = TRUE);
+ void triggerLayout( bool deleteLayout = true);
bool dockMainWindow( TQObject *dock );
#ifndef TQT_NO_MENUBAR
diff --git a/src/widgets/tqmenubar.cpp b/src/widgets/tqmenubar.cpp
index 58507e4d4..653c00a5f 100644
--- a/src/widgets/tqmenubar.cpp
+++ b/src/widgets/tqmenubar.cpp
@@ -68,7 +68,7 @@ public:
};
#if defined(QT_ACCESSIBILITY_SUPPORT)
-static bool inMenu = FALSE;
+static bool inMenu = false;
#endif
#if defined(TQ_WS_X11)
@@ -266,11 +266,11 @@ TQMenuBar::TQMenuBar( TQWidget *parent, const char *name )
: TQFrame( parent, name, WNoAutoErase )
{
#if defined( TQ_WS_MAC ) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
- mac_eaten_menubar = FALSE;
+ mac_eaten_menubar = false;
mac_d = 0;
macCreateNativeMenubar();
#endif
- isMenuBar = TRUE;
+ isMenuBar = true;
#ifndef TQT_NO_ACCEL
autoaccel = 0;
#endif
@@ -351,11 +351,11 @@ void TQMenuBar::updateItem( int id )
{
int i = indexOf( id );
if ( i >= 0 && irects )
- repaint( irects[i], FALSE );
+ repaint( irects[i], false );
}
#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
-static bool fromFrameChange = FALSE;
+static bool fromFrameChange = false;
#endif
/*!
@@ -370,7 +370,7 @@ void TQMenuBar::menuContentsChanged()
{
// here the part that can't be delayed
TQMenuData::menuContentsChanged();
- badSize = TRUE; // might change the size
+ badSize = true; // might change the size
if( pendingDelayedContentsChanges )
return;
pendingDelayedContentsChanges = 1;
@@ -448,7 +448,7 @@ void TQMenuBar::performDelayedChanges()
if(mac_eaten_menubar && needMacUpdate) {
macDirtyNativeMenubar();
- bool all_hidden = TRUE;
+ bool all_hidden = true;
if(irects) {
for(int i = 0; all_hidden && i < (int)mitems->count(); i++)
all_hidden = irects[i].isEmpty();
@@ -486,11 +486,11 @@ void TQMenuBar::menuDelPopup( TQPopupMenu *popup )
void TQMenuBar::frameChanged()
{
#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
- fromFrameChange = TRUE;
+ fromFrameChange = true;
#endif
menuContentsChanged();
#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
- fromFrameChange = FALSE;
+ fromFrameChange = false;
#endif
}
@@ -521,20 +521,20 @@ bool TQMenuBar::eventFilter( TQObject *object, TQEvent *event )
TQResizeEvent *e = (TQResizeEvent *)event;
int w = e->size().width();
setGeometry( 0, y(), w, heightForWidth(w) );
- return FALSE;
+ return false;
}
if ( !isVisible() || !object->isWidgetType() )
- return FALSE;
+ return false;
if ( object == this && event->type() == TQEvent::LanguageChange ) {
- badSize = TRUE;
+ badSize = true;
calculateRects();
- return FALSE;
+ return false;
} else if ( event->type() == TQEvent::MouseButtonPress ||
event->type() == TQEvent::MouseButtonRelease ) {
waitforalt = 0;
- return FALSE;
+ return false;
} else if ( waitforalt && event->type() == TQEvent::FocusOut ) {
// some window systems/managers use alt/meta as accelerator keys
// for switching between windows/desktops/etc. If the focus
@@ -548,13 +548,13 @@ bool TQMenuBar::eventFilter( TQObject *object, TQEvent *event )
TQWidget * f = ((TQWidget *)object)->focusWidget();
if (f)
f->removeEventFilter( this );
- return FALSE;
+ return false;
} else if ( !( event->type() == TQEvent::Accel ||
event->type() == TQEvent::AccelOverride ||
event->type() == TQEvent::KeyPress ||
event->type() == TQEvent::KeyRelease ) ||
!style().styleHint(TQStyle::SH_MenuBar_AltKeyNavigation, this) ) {
- return FALSE;
+ return false;
}
TQKeyEvent * ke = (TQKeyEvent *) event;
@@ -571,12 +571,12 @@ bool TQMenuBar::eventFilter( TQObject *object, TQEvent *event )
if ( object->parent() )
object->removeEventFilter( this );
ke->accept();
- return TRUE;
+ return true;
// Menu has focus, send focus back
} else if ( hasFocus() ) {
- setAltMode( FALSE );
+ setAltMode( false );
ke->accept();
- return TRUE;
+ return true;
// Start waiting for Alt release on focus widget
} else if ( ke->stateAfter() == AltButton ) {
waitforalt = 1;
@@ -588,17 +588,17 @@ bool TQMenuBar::eventFilter( TQObject *object, TQEvent *event )
}
// Other modifiers kills focus on menubar
} else if ( ke->key() == Key_Control || ke->key() == Key_Shift) {
- setAltMode( FALSE );
+ setAltMode( false );
// Got other key, no need to wait for Alt release
} else {
waitforalt = 0;
}
// ### ! block all accelerator events when the menu bar is active
if ( tqApp && tqApp->focusWidget() == this ) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
#endif
// look for Alt release
@@ -610,7 +610,7 @@ bool TQMenuBar::eventFilter( TQObject *object, TQEvent *event )
&& TQMenuData::d->aInt == qt_xfocusout_grab_counter
#endif
) {
- setAltMode( TRUE );
+ setAltMode( true );
if ( object->parent() )
object->removeEventFilter( this );
TQWidget * tlw = ((TQWidget *)object)->topLevelWidget();
@@ -621,18 +621,18 @@ bool TQMenuBar::eventFilter( TQObject *object, TQEvent *event )
tlw->removeEventFilter( this );
tlw->installEventFilter( this );
}
- return TRUE;
+ return true;
// Cancel if next keypress is NOT Alt/Meta,
} else if ( !hasFocus() && (event->type() == TQEvent::AccelOverride ) &&
!(((TQKeyEvent *)event)->key() == Key_Alt ||
((TQKeyEvent *)event)->key() == Key_Meta) ) {
if ( object->parent() )
object->removeEventFilter( this );
- setAltMode( FALSE );
+ setAltMode( false );
}
}
- return FALSE; // don't stop event
+ return false; // don't stop event
}
@@ -670,7 +670,7 @@ void TQMenuBar::accelActivated( int id )
#endif
if ( !isEnabled() ) // the menu bar is disabled
return;
- setAltMode( TRUE );
+ setAltMode( true );
setActiveItem( indexOf( id ) );
}
#endif
@@ -696,17 +696,17 @@ bool TQMenuBar::tryMouseEvent( TQPopupMenu *, TQMouseEvent *e )
{
TQPoint pos = mapFromGlobal( e->globalPos() );
if ( !rect().contains( pos ) ) // outside
- return FALSE;
+ return false;
int item = itemAtPos( pos );
if ( item == -1 && (e->type() == TQEvent::MouseButtonPress ||
e->type() == TQEvent::MouseButtonRelease) ) {
hidePopups();
goodbye();
- return FALSE;
+ return false;
}
TQMouseEvent ee( e->type(), pos, e->globalPos(), e->button(), e->state() );
event( &ee );
- return TRUE;
+ return true;
}
@@ -718,7 +718,7 @@ void TQMenuBar::tryKeyEvent( TQPopupMenu *, TQKeyEvent *e )
void TQMenuBar::goodbye( bool cancelled )
{
- mouseBtDn = FALSE;
+ mouseBtDn = false;
popupvisible = 0;
setAltMode( cancelled && style().styleHint(TQStyle::SH_MenuBar_AltKeyNavigation, this) );
}
@@ -729,7 +729,7 @@ void TQMenuBar::openActPopup()
#if defined(QT_ACCESSIBILITY_SUPPORT)
if ( !inMenu ) {
TQAccessible::updateAccessibility( this, 0, TQAccessible::MenuStart );
- inMenu = TRUE;
+ inMenu = true;
}
#endif
@@ -769,9 +769,9 @@ void TQMenuBar::openActPopup()
Q_ASSERT( popup->parentMenu == 0 );
popup->parentMenu = this; // set parent menu
- popup->snapToMouse = FALSE;
+ popup->snapToMouse = false;
popup->popup( pos );
- popup->snapToMouse = TRUE;
+ popup->snapToMouse = true;
}
/*!
@@ -782,7 +782,7 @@ void TQMenuBar::openActPopup()
void TQMenuBar::hidePopups()
{
#if defined(QT_ACCESSIBILITY_SUPPORT)
- bool anyVisible = FALSE;
+ bool anyVisible = false;
#endif
TQMenuItemListIt it(*mitems);
TQMenuItem *mi;
@@ -790,7 +790,7 @@ void TQMenuBar::hidePopups()
++it;
if ( mi->popup() && mi->popup()->isVisible() ) {
#if defined(QT_ACCESSIBILITY_SUPPORT)
- anyVisible = TRUE;
+ anyVisible = true;
#endif
mi->popup()->hide();
}
@@ -798,7 +798,7 @@ void TQMenuBar::hidePopups()
#if defined(QT_ACCESSIBILITY_SUPPORT)
if ( !popupvisible && anyVisible && inMenu ) {
TQAccessible::updateAccessibility( this, 0, TQAccessible::MenuEnd );
- inMenu = FALSE;
+ inMenu = false;
}
#endif
}
@@ -826,7 +826,7 @@ void TQMenuBar::show()
#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
if(mac_eaten_menubar) {
//If all elements are invisible no reason for me to be visible either
- bool all_hidden = TRUE;
+ bool all_hidden = true;
if(irects) {
for(int i = 0; all_hidden && i < (int)mitems->count(); i++)
all_hidden = irects[i].isEmpty();
@@ -858,7 +858,7 @@ void TQMenuBar::show()
void TQMenuBar::hide()
{
TQWidget::hide();
- setAltMode( FALSE );
+ setAltMode( false );
hidePopups();
#ifndef TQT_NO_MAINWINDOW
TQMainWindow *mw = ::tqt_cast<TQMainWindow*>(parent());
@@ -874,7 +874,7 @@ void TQMenuBar::hide()
void TQMenuBar::fontChange( const TQFont & f )
{
- badSize = TRUE;
+ badSize = true;
updateGeometry();
if ( isVisible() )
calculateRects();
@@ -1056,7 +1056,7 @@ int TQMenuBar::calculateRects( int max_width )
mi->widget()->show();
}
}
- badSize = FALSE;
+ badSize = false;
}
return max_height;
@@ -1211,7 +1211,7 @@ void TQMenuBar::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() != LeftButton )
return;
- mouseBtDn = TRUE; // mouse button down
+ mouseBtDn = true; // mouse button down
int item = itemAtPos( e->pos() );
if ( item == actItem && popupvisible )
toggleclose = 1;
@@ -1222,10 +1222,10 @@ void TQMenuBar::mousePressEvent( TQMouseEvent *e )
// itemviews to redraw their selections
if ( mi && mi->popup() )
TQFocusEvent::setReason( TQFocusEvent::Popup );
- setAltMode( TRUE );
+ setAltMode( true );
TQFocusEvent::setReason( oldReason );
}
- setActiveItem( item, TRUE, FALSE );
+ setActiveItem( item, true, false );
}
@@ -1238,7 +1238,7 @@ void TQMenuBar::mouseReleaseEvent( TQMouseEvent *e )
return;
if ( !mouseBtDn )
return;
- mouseBtDn = FALSE; // mouse button up
+ mouseBtDn = false; // mouse button up
int item = itemAtPos( e->pos() );
if ( ( item >= 0 && !mitems->at(item)->isEnabledAndVisible() ) ||
( actItem >= 0 && !mitems->at(actItem)->isEnabledAndVisible() ) ) {
@@ -1246,13 +1246,13 @@ void TQMenuBar::mouseReleaseEvent( TQMouseEvent *e )
setActiveItem( -1 );
return;
}
- bool showMenu = TRUE;
+ bool showMenu = true;
if ( toggleclose &&
// pressing an item twice closes in windows, but not in motif :/
style().styleHint(TQStyle::SH_GUIStyle) == WindowsStyle &&
actItem == item ) {
- showMenu = FALSE;
- setAltMode( FALSE );
+ showMenu = false;
+ setAltMode( false );
}
setActiveItem( item, showMenu, !hasMouseTracking() );
toggleclose = 0;
@@ -1273,11 +1273,11 @@ void TQMenuBar::mouseMoveEvent( TQMouseEvent *e )
actItem = -1; // trigger update
}
}
- setActiveItem( item, FALSE, FALSE );
+ setActiveItem( item, false, false );
return;
}
if ( item != actItem && item >= 0 && ( popupvisible || mouseBtDn ) )
- setActiveItem( item, TRUE, FALSE );
+ setActiveItem( item, true, false );
}
@@ -1332,7 +1332,7 @@ void TQMenuBar::keyPressEvent( TQKeyEvent *e )
break;
case Key_Escape:
- setAltMode( FALSE );
+ setAltMode( false );
break;
}
@@ -1411,7 +1411,7 @@ void TQMenuBar::resizeEvent( TQResizeEvent *e )
TQFrame::resizeEvent( e );
if ( badSize )
return;
- badSize = TRUE;
+ badSize = true;
calculateRects();
}
@@ -1441,20 +1441,20 @@ void TQMenuBar::setActiveItem( int i, bool show, bool activate_first_item )
int n = TQMAX( actItem, i );
actItem = i;
if ( irects && n >= 0 )
- repaint( irects[n], FALSE );
+ repaint( irects[n], false );
} else if ( TQABS(i-actItem) == 1 ) {
// two neighbouring items need repainting
int o = actItem;
actItem = i;
if ( irects )
- repaint( irects[i].unite( irects[o] ), FALSE );
+ repaint( irects[i].unite( irects[o] ), false );
} else {
// two non-neighbouring items need repainting
int o = actItem;
actItem = i;
if ( irects ) {
- repaint( irects[o], FALSE );
- repaint( irects[i], FALSE );
+ repaint( irects[o], false );
+ repaint( irects[i], false );
}
}
@@ -1462,7 +1462,7 @@ void TQMenuBar::setActiveItem( int i, bool show, bool activate_first_item )
if ( !popupvisible && actItem >= 0 && irects ) {
TQRect mfrect = irects[actItem];
- setMicroFocusHint( mfrect.x(), mfrect.y(), mfrect.width(), mfrect.height(), FALSE );
+ setMicroFocusHint( mfrect.x(), mfrect.y(), mfrect.width(), mfrect.height(), false );
}
#if defined(QT_ACCESSIBILITY_SUPPORT)
@@ -1480,7 +1480,7 @@ void TQMenuBar::setActiveItem( int i, bool show, bool activate_first_item )
if ( activate_first_item )
popup->setFirstItemActive();
} else { // not a popup
- goodbye( FALSE );
+ goodbye( false );
if ( mi->signal() ) // activate signal
mi->signal()->activate();
emit activated( mi->id() );
@@ -1493,15 +1493,15 @@ void TQMenuBar::setAltMode( bool enable )
#if defined(QT_ACCESSIBILITY_SUPPORT)
if ( inMenu && !enable ) {
TQAccessible::updateAccessibility( this, 0, TQAccessible::MenuEnd );
- inMenu = FALSE;
+ inMenu = false;
} else if ( !inMenu && enable ) {
TQAccessible::updateAccessibility( this, 0, TQAccessible::MenuStart );
- inMenu = TRUE;
+ inMenu = true;
}
#endif
waitforalt = 0;
- actItemDown = FALSE;
+ actItemDown = false;
if ( enable ) {
if ( !TQMenuData::d->aWidget )
TQMenuData::d->aWidget = tqApp->focusWidget();
@@ -1546,7 +1546,7 @@ void TQMenuBar::setupAccelerators()
if ( !autoaccel ) {
autoaccel = new TQAccel( this );
TQ_CHECK_PTR( autoaccel );
- autoaccel->setIgnoreWhatsThis( TRUE );
+ autoaccel->setIgnoreWhatsThis( true );
connect( autoaccel, TQ_SIGNAL(activated(int)),
TQ_SLOT(accelActivated(int)) );
connect( autoaccel, TQ_SIGNAL(activatedAmbiguously(int)),
@@ -1561,7 +1561,7 @@ void TQMenuBar::setupAccelerators()
TQPopupMenu* popup = mi->popup();
popup->updateAccel( this );
if ( !popup->isEnabled() )
- popup->enableAccel( FALSE );
+ popup->enableAccel( false );
}
}
}
@@ -1572,7 +1572,7 @@ void TQMenuBar::setupAccelerators()
*/
bool TQMenuBar::customWhatsThis() const
{
- return TRUE;
+ return true;
}
@@ -1587,7 +1587,7 @@ void TQMenuBar::focusInEvent( TQFocusEvent * )
while ( actItem < 0 && ++i < (int) mitems->count() ) {
TQMenuItem* mi = mitems->at( i );
if ( mi && mi->isEnabledAndVisible() && !mi->isSeparator() )
- setActiveItem( i, FALSE );
+ setActiveItem( i, false );
}
} else if ( !popupvisible ) {
updateItem( idAt( actItem ) );
@@ -1601,7 +1601,7 @@ void TQMenuBar::focusOutEvent( TQFocusEvent * )
{
updateItem( idAt( actItem ) );
if ( !popupvisible )
- setAltMode( FALSE );
+ setAltMode( false );
}
/*!
@@ -1651,7 +1651,7 @@ TQSize TQMenuBar::minimumSizeHint() const
\brief the popup orientation
The default popup orientation. By default, menus pop "down" the
- screen. By setting the property to TRUE, the menu will pop "up".
+ screen. By setting the property to true, the menu will pop "up".
You might call this for menus that are \e below the document to
which they refer.
@@ -1677,7 +1677,7 @@ void TQMenuBar::activateItemAt( int index )
if ( index >= 0 && index < (int) mitems->count() )
setActiveItem( index );
else
- goodbye( FALSE );
+ goodbye( false );
}
#endif // TQT_NO_MENUBAR
diff --git a/src/widgets/tqmenubar.h b/src/widgets/tqmenubar.h
index 4c843790d..2d55ef883 100644
--- a/src/widgets/tqmenubar.h
+++ b/src/widgets/tqmenubar.h
@@ -134,10 +134,10 @@ private:
bool tryMouseEvent( TQPopupMenu *, TQMouseEvent * );
void tryKeyEvent( TQPopupMenu *, TQKeyEvent * );
- void goodbye( bool cancelled = FALSE );
+ void goodbye( bool cancelled = false );
void openActPopup();
- void setActiveItem( int index, bool show = TRUE, bool activate_first_item = TRUE );
+ void setActiveItem( int index, bool show = true, bool activate_first_item = true );
void setAltMode( bool );
int calculateRects( int max_width = -1 );
@@ -175,16 +175,16 @@ private:
#endif
virtual void macWidgetChangedWindow();
bool syncPopups(MenuRef ret, TQPopupMenu *d);
- MenuRef createMacPopup(TQPopupMenu *d, int id, bool =FALSE);
+ MenuRef createMacPopup(TQPopupMenu *d, int id, bool =false);
bool updateMenuBar();
#if !defined(TQMAC_QMENUBAR_NO_MERGE)
- uint isCommand(TQMenuItem *, bool just_check=FALSE);
+ uint isCommand(TQMenuItem *, bool just_check=false);
#endif
uint mac_eaten_menubar : 1;
class MacPrivate;
MacPrivate *mac_d;
- static bool activate(MenuRef, short, bool highlight=FALSE, bool by_accel=FALSE);
+ static bool activate(MenuRef, short, bool highlight=false, bool by_accel=false);
static bool activateCommand(uint cmd);
static bool macUpdateMenuBar();
static bool macUpdatePopupVisible(MenuRef, bool);
diff --git a/src/widgets/tqmenudata.cpp b/src/widgets/tqmenudata.cpp
index e0b7deca9..6cc3c554b 100644
--- a/src/widgets/tqmenudata.cpp
+++ b/src/widgets/tqmenudata.cpp
@@ -110,8 +110,8 @@ TQMenuDataData::TQMenuDataData()
TQMenuItem::TQMenuItem()
:ident( -1 ), iconset_data( 0 ), pixmap_data( 0 ), popup_menu( 0 ),
- widget_item( 0 ), signal_data( 0 ), is_separator( FALSE ), is_enabled( TRUE ),
- is_checked( FALSE ), is_dirty( TRUE ), is_visible( TRUE ), d( 0)
+ widget_item( 0 ), signal_data( 0 ), is_separator( false ), is_enabled( true ),
+ is_checked( false ), is_dirty( true ), is_visible( true ), d( 0)
{}
TQMenuItem::~TQMenuItem()
@@ -159,14 +159,14 @@ TQMenuData::TQMenuData()
actItem = -1; // no active menu item
mitems = new TQMenuItemList; // create list of menu items
TQ_CHECK_PTR( mitems );
- mitems->setAutoDelete( TRUE );
+ mitems->setAutoDelete( true );
parentMenu = 0; // assume top level
- isPopupMenu = FALSE;
- isMenuBar = FALSE;
- mouseBtDn = FALSE;
- badSize = TRUE;
+ isPopupMenu = false;
+ isMenuBar = false;
+ mouseBtDn = false;
+ badSize = true;
avoid_circularity = 0;
- actItemDown = FALSE;
+ actItemDown = false;
d = new TQMenuDataData;
}
@@ -272,7 +272,7 @@ int TQMenuData::insertAny( const TQString *text, const TQPixmap *pixmap,
if ( iconset && !iconset->isNull() )
mi->iconset_data = new TQIconSet( *iconset );
} else if ( text == 0 && pixmap == 0 && popup == 0 ) {
- mi->is_separator = TRUE; // separator
+ mi->is_separator = true; // separator
} else {
#ifndef Q_OS_TEMP
mi->text_data = text?*text:TQString();
@@ -1119,8 +1119,8 @@ void TQMenuData::changeItemIconSet( int id, const TQIconSet &icon )
/*!
- Returns TRUE if the item with identifier \a id is enabled;
- otherwise returns FALSE
+ Returns true if the item with identifier \a id is enabled;
+ otherwise returns false
\sa setItemEnabled(), isItemVisible()
*/
@@ -1128,11 +1128,11 @@ void TQMenuData::changeItemIconSet( int id, const TQIconSet &icon )
bool TQMenuData::isItemEnabled( int id ) const
{
TQMenuItem *mi = findItem( id );
- return mi ? mi->isEnabled() : FALSE;
+ return mi ? mi->isEnabled() : false;
}
/*!
- If \a enable is TRUE, enables the menu item with identifier \a id;
+ If \a enable is true, enables the menu item with identifier \a id;
otherwise disables the menu item with identifier \a id.
\sa isItemEnabled()
@@ -1154,19 +1154,19 @@ void TQMenuData::setItemEnabled( int id, bool enable )
/*!
- Returns TRUE if the menu item with the id \a id is currently
- active; otherwise returns FALSE.
+ Returns true if the menu item with the id \a id is currently
+ active; otherwise returns false.
*/
bool TQMenuData::isItemActive( int id ) const
{
if ( actItem == -1 )
- return FALSE;
+ return false;
return indexOf( id ) == actItem;
}
/*!
- Returns TRUE if the menu item with the id \a id has been checked;
- otherwise returns FALSE.
+ Returns true if the menu item with the id \a id has been checked;
+ otherwise returns false.
\sa setItemChecked()
*/
@@ -1174,13 +1174,13 @@ bool TQMenuData::isItemActive( int id ) const
bool TQMenuData::isItemChecked( int id ) const
{
TQMenuItem *mi = findItem( id );
- return mi ? mi->isChecked() : FALSE;
+ return mi ? mi->isChecked() : false;
}
/*!
- If \a check is TRUE, checks the menu item with id \a id; otherwise
+ If \a check is true, checks the menu item with id \a id; otherwise
unchecks the menu item with id \a id. Calls
- TQPopupMenu::setCheckable( TRUE ) if necessary.
+ TQPopupMenu::setCheckable( true ) if necessary.
\sa isItemChecked()
*/
@@ -1193,15 +1193,15 @@ void TQMenuData::setItemChecked( int id, bool check )
mi->is_checked = check;
#ifndef TQT_NO_POPUPMENU
if ( parent->isPopupMenu && !((TQPopupMenu *)parent)->isCheckable() )
- ((TQPopupMenu *)parent)->setCheckable( TRUE );
+ ((TQPopupMenu *)parent)->setCheckable( true );
#endif
parent->menuStateChanged();
}
}
/*!
- Returns TRUE if the menu item with the id \a id is visible;
- otherwise returns FALSE.
+ Returns true if the menu item with the id \a id is visible;
+ otherwise returns false.
\sa setItemVisible()
*/
@@ -1209,11 +1209,11 @@ void TQMenuData::setItemChecked( int id, bool check )
bool TQMenuData::isItemVisible( int id ) const
{
TQMenuItem *mi = findItem( id );
- return mi ? mi->isVisible() : FALSE;
+ return mi ? mi->isVisible() : false;
}
/*!
- If \a visible is TRUE, shows the menu item with id \a id; otherwise
+ If \a visible is true, shows the menu item with id \a id; otherwise
hides the menu item with id \a id.
\sa isItemVisible(), isItemEnabled()
@@ -1358,13 +1358,13 @@ void TQMenuData::setId( int index, int id )
bool TQMenuData::setItemParameter( int id, int param ) {
TQMenuItem *mi = findItem( id );
if ( !mi ) // no such identifier
- return FALSE;
+ return false;
if ( !mi->signal_data ) { // create new signal
mi->signal_data = new TQSignal;
TQ_CHECK_PTR( mi->signal_data );
}
mi->signal_data->setValue( param );
- return TRUE;
+ return true;
}
@@ -1400,7 +1400,7 @@ bool TQMenuData::connectItem( int id, const TQObject *receiver,
{
TQMenuItem *mi = findItem( id );
if ( !mi ) // no such identifier
- return FALSE;
+ return false;
if ( !mi->signal_data ) { // create new signal
mi->signal_data = new TQSignal;
TQ_CHECK_PTR( mi->signal_data );
@@ -1425,7 +1425,7 @@ bool TQMenuData::disconnectItem( int id, const TQObject *receiver,
{
TQMenuItem *mi = findItem( id );
if ( !mi || !mi->signal_data ) // no identifier or no signal
- return FALSE;
+ return false;
return mi->signal_data->disconnect( receiver, member );
}
@@ -1481,12 +1481,12 @@ TQString TQMenuData::whatsThis( int id ) const
TQPopupMenu::insertItem().
By default, a custom item can also have an icon and a keyboard
- accelerator. You can reimplement fullSpan() to return TRUE if you
+ accelerator. You can reimplement fullSpan() to return true if you
want the item to span the entire popup menu width. This is
particularly useful for labels.
If you want the custom item to be treated just as a separator,
- reimplement isSeparator() to return TRUE.
+ reimplement isSeparator() to return true.
Note that you can insert pixmaps or bitmaps as items into a popup
menu without needing to create a TQCustomMenuItem. However, custom
@@ -1537,23 +1537,23 @@ void TQCustomMenuItem::setFont( const TQFont& /* font */ )
/*!
- Returns TRUE if this item wants to span the entire popup menu
- width; otherwise returns FALSE. The default is FALSE, meaning that
+ Returns true if this item wants to span the entire popup menu
+ width; otherwise returns false. The default is false, meaning that
the menu may show an icon and an accelerator key for this item as
well.
*/
bool TQCustomMenuItem::fullSpan() const
{
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if this item is just a separator; otherwise returns
- FALSE.
+ Returns true if this item is just a separator; otherwise returns
+ false.
*/
bool TQCustomMenuItem::isSeparator() const
{
- return FALSE;
+ return false;
}
@@ -1562,8 +1562,8 @@ bool TQCustomMenuItem::isSeparator() const
Paints this item. When this function is invoked, the painter \a p
is set to a font and foreground color suitable for a menu item
- text using color group \a cg. The item is active if \a act is TRUE
- and enabled if \a enabled is TRUE. The geometry values \a x, \a y,
+ text using color group \a cg. The item is active if \a act is true
+ and enabled if \a enabled is true. The geometry values \a x, \a y,
\a w and \a h specify where to draw the item.
Do not draw any background, this has already been done by the
diff --git a/src/widgets/tqmultilineedit.cpp b/src/widgets/tqmultilineedit.cpp
index 67896224a..4987d21a8 100644
--- a/src/widgets/tqmultilineedit.cpp
+++ b/src/widgets/tqmultilineedit.cpp
@@ -197,8 +197,8 @@ TQMultiLineEdit::~TQMultiLineEdit()
/*!
If there is selected text, sets \a line1, \a col1, \a line2 and \a col2
- to the start and end of the selected region and returns TRUE. Returns
- FALSE if there is no selected text.
+ to the start and end of the selected region and returns true. Returns
+ false if there is no selected text.
*/
bool TQMultiLineEdit::getMarkedRegion( int *line1, int *col1,
int *line2, int *col2 ) const
@@ -206,7 +206,7 @@ bool TQMultiLineEdit::getMarkedRegion( int *line1, int *col1,
int p1,c1, p2, c2;
getSelection( &p1, &c1, &p2, &c2 );
if ( p1 == -1 && c1 == -1 && p2 == -1 && c2 == -1 )
- return FALSE;
+ return false;
if ( line1 )
*line1 = p1;
if ( col1 )
@@ -215,12 +215,12 @@ bool TQMultiLineEdit::getMarkedRegion( int *line1, int *col1,
*line2 = p2;
if ( col2 )
*col2 = c2;
- return TRUE;
+ return true;
}
/*!
- Returns TRUE if there is selected text.
+ Returns true if there is selected text.
*/
bool TQMultiLineEdit::hasMarkedText() const
@@ -239,7 +239,7 @@ TQString TQMultiLineEdit::markedText() const
}
/*!
- Moves the cursor one page down. If \a mark is TRUE, the text
+ Moves the cursor one page down. If \a mark is true, the text
is selected.
*/
@@ -250,7 +250,7 @@ void TQMultiLineEdit::pageDown( bool mark )
/*!
- Moves the cursor one page up. If \a mark is TRUE, the text
+ Moves the cursor one page up. If \a mark is true, the text
is selected.
*/
@@ -284,7 +284,7 @@ void TQMultiLineEdit::removeLine( int paragraph )
}
/*! Inserts \a str at the current cursor position and selects the
- text if \a mark is TRUE.
+ text if \a mark is true.
*/
void TQMultiLineEdit::insertAndMark( const TQString& str, bool mark )
@@ -326,7 +326,7 @@ void TQMultiLineEdit::backspace()
/*! Moves the text cursor to the left end of the line. If \a mark is
- TRUE, text is selected toward the first position. If it is FALSE and the
+ true, text is selected toward the first position. If it is false and the
cursor is moved, all selected text is unselected.
\sa end()
@@ -338,7 +338,7 @@ void TQMultiLineEdit::home( bool mark )
}
/*! Moves the text cursor to the right end of the line. If \a mark is
- TRUE, text is selected toward the last position. If it is FALSE and the
+ true, text is selected toward the last position. If it is false and the
cursor is moved, all selected text is unselected.
\sa home()
@@ -359,14 +359,14 @@ void TQMultiLineEdit::end( bool mark )
number \a line. The parameters are adjusted to lie within the legal
range.
- If \a mark is FALSE, the selection is cleared. otherwise it is extended.
+ If \a mark is false, the selection is cleared. otherwise it is extended.
*/
void TQMultiLineEdit::setCursorPosition( int line, int col, bool mark )
{
if ( !mark )
- selectAll( FALSE );
+ selectAll( false );
TQTextEdit::setCursorPosition( line, col );
if ( mark )
document()->setSelectionEnd( TQTextDocument::Standard, *textCursor() );
@@ -426,7 +426,7 @@ bool TQMultiLineEdit::edited() const
return isModified();
}
-/*! Moves the cursor one word to the right. If \a mark is TRUE, the text
+/*! Moves the cursor one word to the right. If \a mark is true, the text
is selected.
\sa cursorWordBackward()
@@ -436,7 +436,7 @@ void TQMultiLineEdit::cursorWordForward( bool mark )
moveCursor( MoveWordForward, mark );
}
-/*! Moves the cursor one word to the left. If \a mark is TRUE, the
+/*! Moves the cursor one word to the left. If \a mark is true, the
text is selected.
\sa cursorWordForward()
@@ -454,7 +454,7 @@ void TQMultiLineEdit::cursorWordBackward( bool mark )
/*! Inserts string \a s at paragraph number \a line, after character
number \a col in the paragraph. If \a s contains newline
characters, new lines are inserted.
- If \a mark is TRUE the inserted string will be selected.
+ If \a mark is true the inserted string will be selected.
The cursor position is adjusted.
*/
@@ -477,7 +477,7 @@ void TQMultiLineEdit::killLine()
doKeyboardAction( ActionKill );
}
-/*! Moves the cursor one character to the left. If \a mark is TRUE,
+/*! Moves the cursor one character to the left. If \a mark is true,
the text is selected.
The \a wrap parameter is currently ignored.
@@ -489,7 +489,7 @@ void TQMultiLineEdit::cursorLeft( bool mark, bool )
moveCursor( MoveBackward, mark );
}
-/*! Moves the cursor one character to the right. If \a mark is TRUE,
+/*! Moves the cursor one character to the right. If \a mark is true,
the text is selected.
The \a wrap parameter is currently ignored.
@@ -501,7 +501,7 @@ void TQMultiLineEdit::cursorRight( bool mark, bool )
moveCursor( MoveForward, mark );
}
-/*! Moves the cursor up one line. If \a mark is TRUE, the text is
+/*! Moves the cursor up one line. If \a mark is true, the text is
selected.
\sa cursorDown() cursorLeft() cursorRight()
@@ -513,7 +513,7 @@ void TQMultiLineEdit::cursorUp( bool mark )
}
/*!
- Moves the cursor one line down. If \a mark is TRUE, the text
+ Moves the cursor one line down. If \a mark is true, the text
is selected.
\sa cursorUp() cursorLeft() cursorRight()
*/
diff --git a/src/widgets/tqmultilineedit.h b/src/widgets/tqmultilineedit.h
index 1f53dc38f..670396f16 100644
--- a/src/widgets/tqmultilineedit.h
+++ b/src/widgets/tqmultilineedit.h
@@ -69,12 +69,12 @@ public:
virtual void insertLine( const TQString &s, int line = -1 );
virtual void insertAt( const TQString &s, int line, int col ) {
- insertAt( s, line, col, FALSE );
+ insertAt( s, line, col, false );
}
virtual void insertAt( const TQString &s, int line, int col, bool mark );
virtual void removeLine( int line );
virtual void setCursorPosition( int line, int col ) {
- setCursorPosition( line, col, FALSE );
+ setCursorPosition( line, col, false );
}
virtual void setCursorPosition( int line, int col, bool mark );
bool atBeginning() const;
@@ -93,7 +93,7 @@ public:
void cursorWordBackward( bool mark );
// noops
- bool autoUpdate() const { return TRUE; }
+ bool autoUpdate() const { return true; }
virtual void setAutoUpdate( bool ) {}
int totalWidth() const { return contentsWidth(); }
@@ -103,7 +103,7 @@ public:
void setMaxLines( int ) {}
public slots:
- void deselect() { selectAll( FALSE ); }
+ void deselect() { selectAll( false ); }
protected:
TQPoint cursorPoint() const;
@@ -112,15 +112,15 @@ protected:
virtual void insertAndMark( const TQString&, bool mark );
virtual void newLine();
virtual void killLine();
- virtual void pageUp( bool mark=FALSE );
- virtual void pageDown( bool mark=FALSE );
- virtual void cursorLeft( bool mark=FALSE, bool wrap = TRUE );
- virtual void cursorRight( bool mark=FALSE, bool wrap = TRUE );
- virtual void cursorUp( bool mark=FALSE );
- virtual void cursorDown( bool mark=FALSE );
+ virtual void pageUp( bool mark=false );
+ virtual void pageDown( bool mark=false );
+ virtual void cursorLeft( bool mark=false, bool wrap = true );
+ virtual void cursorRight( bool mark=false, bool wrap = true );
+ virtual void cursorUp( bool mark=false );
+ virtual void cursorDown( bool mark=false );
virtual void backspace();
- virtual void home( bool mark=FALSE );
- virtual void end( bool mark=FALSE );
+ virtual void home( bool mark=false );
+ virtual void end( bool mark=false );
bool getMarkedRegion( int *line1, int *col1,
int *line2, int *col2 ) const;
diff --git a/src/widgets/tqpopupmenu.cpp b/src/widgets/tqpopupmenu.cpp
index c52c00005..66da3a26a 100644
--- a/src/widgets/tqpopupmenu.cpp
+++ b/src/widgets/tqpopupmenu.cpp
@@ -101,7 +101,7 @@ static int motion;
// used to provide ONE single-shot timer
static TQTimer * singleSingleShot = 0;
-static bool supressAboutToShow = FALSE;
+static bool supressAboutToShow = false;
static void cleanup()
{
@@ -118,10 +118,10 @@ static void popupSubMenuLater( int msec, TQPopupMenu * receiver ) {
singleSingleShot->disconnect( TQ_SIGNAL(timeout()) );
TQObject::connect( singleSingleShot, TQ_SIGNAL(timeout()),
receiver, TQ_SLOT(subMenuTimer()) );
- singleSingleShot->start( msec, TRUE );
+ singleSingleShot->start( msec, true );
}
-static bool preventAnimation = FALSE;
+static bool preventAnimation = false;
#ifndef TQT_NO_WHATSTHIS
extern void tqWhatsThisBDH();
@@ -170,7 +170,7 @@ static TQMenuItem* whatsThisItem = 0;
removeItem() or removeItemAt().
A popup menu can display check marks for certain items when
- enabled with setCheckable(TRUE). You check or uncheck items with
+ enabled with setCheckable(true). You check or uncheck items with
setItemChecked().
Items are either enabled or disabled. You toggle their state with
@@ -280,13 +280,13 @@ TQPopupMenu::TQPopupMenu( TQWidget *parent, const char *name )
d->scroll.scrollable = TQPopupMenuPrivate::Scroll::ScrollNone;
d->scroll.scrolltimer = 0;
d->hasmouse = 0;
- isPopupMenu = TRUE;
+ isPopupMenu = true;
#ifndef TQT_NO_ACCEL
autoaccel = 0;
- accelDisabled = FALSE;
+ accelDisabled = false;
#endif
popupActive = -1;
- snapToMouse = TRUE;
+ snapToMouse = true;
tab = 0;
checkable = 0;
tornOff = 0;
@@ -329,7 +329,7 @@ TQPopupMenu::~TQPopupMenu()
delete (TQWidget*) TQMenuData::d->aWidget; // tear-off menu
- preventAnimation = FALSE;
+ preventAnimation = false;
delete d;
}
@@ -347,7 +347,7 @@ void TQPopupMenu::setCheckable( bool enable )
{
if ( isCheckable() != enable ) {
checkable = enable;
- badSize = TRUE;
+ badSize = true;
if ( TQMenuData::d->aWidget )
( (TQPopupMenu*)(TQWidget*)TQMenuData::d->aWidget)->setCheckable( enable );
}
@@ -357,7 +357,7 @@ void TQPopupMenu::setCheckable( bool enable )
\property TQPopupMenu::checkable
\brief whether the display of check marks on menu items is enabled
- When TRUE, the display of check marks on menu items is enabled.
+ When true, the display of check marks on menu items is enabled.
Checking is always enabled when in Windows-style.
\sa TQMenuData::setItemChecked()
@@ -372,7 +372,7 @@ void TQPopupMenu::menuContentsChanged()
{
// here the part that can't be delayed
TQMenuData::menuContentsChanged();
- badSize = TRUE; // might change the size
+ badSize = true; // might change the size
#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
mac_dirty_popup = 1;
#endif
@@ -396,12 +396,12 @@ void TQPopupMenu::performDelayedContentsChanged()
if ( isVisible() ) {
if ( tornOff )
return;
- updateSize(TRUE);
+ updateSize(true);
update();
}
TQPopupMenu* p = (TQPopupMenu*)(TQWidget*)TQMenuData::d->aWidget;
if ( p && p->isVisible() ) {
- p->updateSize(TRUE);
+ p->updateSize(true);
p->update();
}
#if defined(TQ_WS_MAC) && !defined(TQMAC_QMENUBAR_NO_NATIVE)
@@ -514,7 +514,7 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
if(d->scroll.scrollable) {
d->scroll.scrollable = TQPopupMenuPrivate::Scroll::ScrollNone;
d->scroll.topScrollableIndex = d->scroll.scrollableSize = 0;
- badSize = TRUE;
+ badSize = true;
}
updateSize();
@@ -524,10 +524,10 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
// have to emit here as a menu might be setup in a slot connected
// to aboutToShow which will change the size of the menu
bool s = supressAboutToShow;
- supressAboutToShow = TRUE;
+ supressAboutToShow = true;
if ( !s) {
emit aboutToShow();
- updateSize(TRUE);
+ updateSize(true);
}
int sw = screen.width(); // screen width
@@ -610,7 +610,7 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
d->scroll.scrollableSize = ch;
}
- updateSize(TRUE); //now set the size using the scrollable/scrollableSize as above
+ updateSize(true); //now set the size using the scrollable/scrollableSize as above
w = width();
h = height();
if(indexAtPoint >= 0) {
@@ -655,7 +655,7 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
#endif
if ( TQApplication::isEffectEnabled( UI_AnimateMenu ) &&
- preventAnimation == FALSE ) {
+ preventAnimation == false ) {
if ( TQApplication::isEffectEnabled( UI_FadeMenu ) )
qFadeEffect( this );
else if ( parentMenu )
@@ -715,7 +715,7 @@ void TQPopupMenu::subHighlighted( int id )
emit highlightedRedirect( id );
}
-static bool fromAccel = FALSE;
+static bool fromAccel = false;
#ifndef TQT_NO_ACCEL
void TQPopupMenu::accelActivated( int id )
@@ -723,9 +723,9 @@ void TQPopupMenu::accelActivated( int id )
TQMenuItem *mi = findItem( id );
if ( mi && mi->isEnabledAndVisible() ) {
TQGuardedPtr<TQSignal> signal = mi->signal();
- fromAccel = TRUE;
+ fromAccel = true;
actSig( mi->id() );
- fromAccel = FALSE;
+ fromAccel = false;
if ( signal )
signal->activate();
}
@@ -804,7 +804,7 @@ void TQPopupMenu::hideAllPopups()
TQMenuData *top = this; // find top level popup
if ( !preventAnimation )
TQTimer::singleShot( 10, this, TQ_SLOT(allowAnimation()) );
- preventAnimation = TRUE;
+ preventAnimation = true;
if ( !isPopup() )
return; // nothing to do
@@ -832,7 +832,7 @@ void TQPopupMenu::hidePopups()
{
if ( !preventAnimation )
TQTimer::singleShot( 10, this, TQ_SLOT(allowAnimation()) );
- preventAnimation = TRUE;
+ preventAnimation = true;
TQMenuItemListIt it(*mitems);
TQMenuItem *mi;
@@ -846,7 +846,7 @@ void TQPopupMenu::hidePopups()
d->mouseMoveBuffer = TQRegion();
TQRect mfrect = itemGeometry( actItem );
- setMicroFocusHint( mfrect.x(), mfrect.y(), mfrect.width(), mfrect.height(), FALSE );
+ setMicroFocusHint( mfrect.x(), mfrect.y(), mfrect.width(), mfrect.height(), false );
}
@@ -876,13 +876,13 @@ bool TQPopupMenu::tryMenuBar( TQMouseEvent *e )
bool TQPopupMenu::tryMouseEvent( TQPopupMenu *p, TQMouseEvent * e)
{
if ( p == this )
- return FALSE;
+ return false;
TQPoint pos = mapFromGlobal( e->globalPos() );
if ( !rect().contains( pos ) ) // outside
- return FALSE;
+ return false;
TQMouseEvent ee( e->type(), pos, e->globalPos(), e->button(), e->state() );
event( &ee );
- return TRUE;
+ return true;
}
/*!
@@ -1040,7 +1040,7 @@ TQSize TQPopupMenu::updateSize(bool force_update, bool do_resize)
TQSize ret = TQSize( 50, 8 );
if(do_resize)
setFixedSize( ret );
- badSize = TRUE;
+ badSize = true;
return ret;
}
@@ -1069,7 +1069,7 @@ TQSize TQPopupMenu::updateSize(bool force_update, bool do_resize)
TQWidget *miw = mi->widget();
if (miw) {
if ( miw->parentWidget() != this )
- miw->reparent( this, TQPoint(0,0), TRUE );
+ miw->reparent( this, TQPoint(0,0), true );
// widget items musn't propgate mouse events
((TQPopupMenu*)miw)->setWFlags(WNoMousePropagation);
}
@@ -1170,7 +1170,7 @@ TQSize TQPopupMenu::updateSize(bool force_update, bool do_resize)
if(style().styleHint(TQStyle::SH_PopupMenu_Scrollable, this)) {
height += scrheight;
- setMouseTracking(TRUE);
+ setMouseTracking(true);
}
if ( tab )
@@ -1190,7 +1190,7 @@ TQSize TQPopupMenu::updateSize(bool force_update, bool do_resize)
else
d->calcSize = TQSize( TQMAX( minimumWidth(), (ncols*(max_width + tab)) + extra_width ),
TQMAX( minimumHeight(), TQMIN( max_height + extra_height + 1, dh ) ) );
- badSize = FALSE;
+ badSize = false;
}
{
@@ -1277,7 +1277,7 @@ void TQPopupMenu::updateAccel( TQWidget *parent )
connect( autoaccel, TQ_SIGNAL(destroyed()),
TQ_SLOT(accelDestroyed()) );
if ( accelDisabled )
- autoaccel->setEnabled( FALSE );
+ autoaccel->setEnabled( false );
}
while ( (mi=it.current()) ) {
++it;
@@ -1307,7 +1307,7 @@ void TQPopupMenu::updateAccel( TQWidget *parent )
}
if ( s != mi->text() ) {
mi->setText( s );
- badSize = TRUE;
+ badSize = true;
}
}
if ( mi->popup() && parent ) { // call recursively
@@ -1348,7 +1348,7 @@ void TQPopupMenu::enableAccel( bool enable )
void TQPopupMenu::setFont( const TQFont &font )
{
TQWidget::setFont( font );
- badSize = TRUE;
+ badSize = true;
if ( isVisible() ) {
updateSize();
update();
@@ -1364,16 +1364,16 @@ void TQPopupMenu::show()
hide();
if ( isVisible() ) {
- supressAboutToShow = FALSE;
+ supressAboutToShow = false;
TQWidget::show();
return;
}
if (!supressAboutToShow)
emit aboutToShow();
else
- supressAboutToShow = FALSE;
+ supressAboutToShow = false;
performDelayedChanges();
- updateSize(TRUE);
+ updateSize(true);
TQWidget::show();
updateSize();
popupActive = -1;
@@ -1402,7 +1402,7 @@ void TQPopupMenu::hide()
actItem = popupActive = -1;
if(style().styleHint(TQStyle::SH_PopupMenu_SubMenuPopupDelay, this))
d->mouseMoveBuffer = TQRegion();
- mouseBtDn = FALSE; // mouse button up
+ mouseBtDn = false; // mouse button up
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::PopupMenuEnd );
#endif
@@ -1460,8 +1460,8 @@ int TQPopupMenu::itemHeight( TQMenuItem *mi ) const
/*!
Draws menu item \a mi in the area \a x, \a y, \a w, \a h, using
- painter \a p. The item is drawn active if \a act is TRUE or drawn
- inactive if \a act is FALSE. The rightmost \a tab_ pixels are used
+ painter \a p. The item is drawn active if \a act is true or drawn
+ inactive if \a act is false. The rightmost \a tab_ pixels are used
for accelerator text.
\sa TQStyle::drawControl()
@@ -1627,7 +1627,7 @@ void TQPopupMenu::mousePressEvent( TQMouseEvent *e )
e->pos().y() >= contentsRect().height() - sh))) //down
return;
- mouseBtDn = TRUE; // mouse button down
+ mouseBtDn = true; // mouse button down
int item = itemAtPos( e->pos() );
if ( item == -1 ) {
if ( !rect().contains(e->pos()) && !tryMenuBar(e) ) {
@@ -1666,7 +1666,7 @@ void TQPopupMenu::mouseReleaseEvent( TQMouseEvent *e )
if ( !parentMenu && !mouseBtDn && actItem < 0 && motion < 6 )
return;
- mouseBtDn = FALSE;
+ mouseBtDn = false;
// if the user released the mouse outside the menu, pass control
// to the menubar or our parent menu
@@ -1688,7 +1688,7 @@ void TQPopupMenu::mouseReleaseEvent( TQMouseEvent *e )
} else { // selected menu item!
TQMenuItem *mi = mitems->at(actItem);
if ( mi ->widget() ) {
- TQWidget* widgetAt = TQApplication::widgetAt( e->globalPos(), TRUE );
+ TQWidget* widgetAt = TQApplication::widgetAt( e->globalPos(), true );
if ( widgetAt && widgetAt != this ) {
TQMouseEvent me( e->type(), widgetAt->mapFromGlobal( e->globalPos() ),
e->globalPos(), e->button(), e->state() );
@@ -1699,7 +1699,7 @@ void TQPopupMenu::mouseReleaseEvent( TQMouseEvent *e )
#ifndef TQT_NO_WHATSTHIS
bool b = TQWhatsThis::inWhatsThisMode();
#else
- const bool b = FALSE;
+ const bool b = false;
#endif
if ( !mi->isEnabledAndVisible() ) {
#ifndef TQT_NO_WHATSTHIS
@@ -1797,12 +1797,12 @@ void TQPopupMenu::mouseMoveEvent( TQMouseEvent *e )
// but did not register mouse press
d->hasmouse = 1;
if ( (e->state() & TQt::MouseButtonMask) && !mouseBtDn )
- mouseBtDn = TRUE; // so mouseReleaseEvent will pop down
+ mouseBtDn = true; // so mouseReleaseEvent will pop down
TQMenuItem *mi = mitems->at( item );
if ( mi->widget() ) {
- TQWidget* widgetAt = TQApplication::widgetAt( e->globalPos(), TRUE );
+ TQWidget* widgetAt = TQApplication::widgetAt( e->globalPos(), true );
if ( widgetAt && widgetAt != this ) {
TQMouseEvent me( e->type(), widgetAt->mapFromGlobal( e->globalPos() ),
e->globalPos(), e->button(), e->state() );
@@ -1864,7 +1864,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
TQMenuItem *mi = 0;
TQPopupMenu *popup;
int dy = 0;
- bool ok_key = TRUE;
+ bool ok_key = true;
int key = e->key();
if ( TQApplication::reverseLayout() ) {
@@ -1904,7 +1904,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
hide();
#ifndef TQT_NO_MENUBAR
if ( p && p->isMenuBar )
- ((TQMenuBar*) p)->goodbye( TRUE );
+ ((TQMenuBar*) p)->goodbye( true );
#endif
}
break;
@@ -1925,7 +1925,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
break;
}
- ok_key = FALSE;
+ ok_key = false;
break;
case Key_Right:
@@ -1950,7 +1950,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
break;
}
}
- ok_key = FALSE;
+ ok_key = false;
break;
case Key_Space:
@@ -1966,7 +1966,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
#ifndef TQT_NO_WHATSTHIS
bool b = TQWhatsThis::inWhatsThisMode();
#else
- const bool b = FALSE;
+ const bool b = false;
#endif
mi = mitems->at( actItem );
if ( !mi->isEnabled() && !b )
@@ -2005,7 +2005,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
//fall-through!
#endif
default:
- ok_key = FALSE;
+ ok_key = false;
}
if ( !ok_key &&
@@ -2029,7 +2029,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
int i = s.find( '&' );
while ( i >= 0 && i < (int)s.length() - 1 ) {
if ( s[i+1].upper() == c ) {
- ok_key = TRUE;
+ ok_key = true;
clashCount++;
if ( !first )
first = m;
@@ -2063,7 +2063,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
#ifndef TQT_NO_WHATSTHIS
bool b = TQWhatsThis::inWhatsThisMode();
#else
- const bool b = FALSE;
+ const bool b = false;
#endif
if ( mi->isEnabledAndVisible() || b ) {
active_popup_menu = this;
@@ -2092,7 +2092,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
int beforeId = top->actItem;
((TQMenuBar*)top)->tryKeyEvent( this, e );
if ( beforeId != top->actItem )
- ok_key = TRUE;
+ ok_key = true;
}
}
#endif
@@ -2149,11 +2149,11 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
if(d->scroll.scrollable) { //need to scroll to make it visible?
TQRect r = itemGeometry(actItem);
if(r.isNull() || r.height() < itemHeight(mitems->at(actItem))) {
- bool refresh = FALSE;
+ bool refresh = false;
if(d->scroll.scrollable & TQPopupMenuPrivate::Scroll::ScrollUp && dy == -1) { //up
if(d->scroll.topScrollableIndex >= 0) {
d->scroll.topScrollableIndex--;
- refresh = TRUE;
+ refresh = true;
}
} else if(d->scroll.scrollable & TQPopupMenuPrivate::Scroll::ScrollDown) { //down
TQMenuItemListIt it(*mitems);
@@ -2168,7 +2168,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
if(y > (contentsRect().height()-sh)) {
if(sz.height() > sh || !it.atLast())
d->scroll.topScrollableIndex++;
- refresh = TRUE;
+ refresh = true;
break;
}
}
@@ -2221,7 +2221,7 @@ void TQPopupMenu::styleChange( TQStyle& old )
TQFrame::styleChange( old );
setMouseTracking(style().styleHint(TQStyle::SH_PopupMenu_MouseTracking, this));
style().polishPopupMenu( this );
- updateSize(TRUE);
+ updateSize(true);
}
/*!\reimp
@@ -2329,7 +2329,7 @@ void TQPopupMenu::subMenuTimer() {
popup->parentMenu = this; // set parent menu
emit popup->aboutToShow();
- supressAboutToShow = TRUE;
+ supressAboutToShow = true;
TQRect r( itemGeometry( actItem ) );
@@ -2349,26 +2349,26 @@ void TQPopupMenu::subMenuTimer() {
p = TQPoint( r.left() + arrowHMargin - ps.width(), r.top() + arrowVMargin );
p = mapToGlobal( p );
- bool right = FALSE;
+ bool right = false;
if ( ( parentMenu && parentMenu->isPopupMenu &&
((TQPopupMenu*)parentMenu)->geometry().x() < geometry().x() ) ||
p.x() < screenRect( p ).left())
- right = TRUE;
+ right = true;
if ( right && (ps.width() > screenRect( p ).right() - mapToGlobal( r.topRight() ).x() ) )
- right = FALSE;
+ right = false;
if ( right )
p.setX( mapToGlobal( r.topRight() ).x() );
} else {
p = TQPoint( r.right() - arrowHMargin, r.top() + arrowVMargin );
p = mapToGlobal( p );
- bool left = FALSE;
+ bool left = false;
if ( ( parentMenu && parentMenu->isPopupMenu &&
((TQPopupMenu*)parentMenu)->geometry().x() > geometry().x() ) ||
p.x() + ps.width() > screenRect( p ).right() )
- left = TRUE;
+ left = true;
if ( left && (ps.width() > mapToGlobal( r.topLeft() ).x() ) )
- left = FALSE;
+ left = false;
if ( left )
p.setX( mapToGlobal( r.topLeft() ).x() - ps.width() );
}
@@ -2404,7 +2404,7 @@ void TQPopupMenu::subMenuTimer() {
void TQPopupMenu::allowAnimation()
{
- preventAnimation = FALSE;
+ preventAnimation = false;
}
void TQPopupMenu::updateRow( int row )
@@ -2464,7 +2464,7 @@ void TQPopupMenu::updateRow( int row )
int TQPopupMenu::exec( const TQPoint & pos, int indexAtPoint )
{
- snapToMouse = TRUE;
+ snapToMouse = true;
if ( !tqApp )
return -1;
@@ -2474,10 +2474,10 @@ int TQPopupMenu::exec( const TQPoint & pos, int indexAtPoint )
syncMenuId = -1;
TQGuardedPtr<TQPopupMenu> that = this;
- connectModal( that, TRUE );
+ connectModal( that, true );
popup( pos, indexAtPoint );
tqApp->enter_loop();
- connectModal( that, FALSE );
+ connectModal( that, false );
syncMenu = priorSyncMenu;
return syncMenuId;
@@ -2564,7 +2564,7 @@ void TQPopupMenu::setActiveItem( int i )
} else {
setFocus();
TQRect mfrect = itemGeometry( actItem );
- setMicroFocusHint( mfrect.x(), mfrect.y(), mfrect.width(), mfrect.height(), FALSE );
+ setMicroFocusHint( mfrect.x(), mfrect.y(), mfrect.width(), mfrect.height(), false );
}
if ( mi->id() != -1 )
hilitSig( mi->id() );
@@ -2585,7 +2585,7 @@ TQSize TQPopupMenu::sizeHint() const
constPolish();
TQPopupMenu* that = (TQPopupMenu*) this;
//We do not need a resize here, just the sizeHint..
- return that->updateSize(FALSE).expandedTo( TQApplication::globalStrut() );
+ return that->updateSize(false).expandedTo( TQApplication::globalStrut() );
}
@@ -2616,7 +2616,7 @@ int TQPopupMenu::idAt( const TQPoint& pos ) const
*/
bool TQPopupMenu::customWhatsThis() const
{
- return TRUE;
+ return true;
}
@@ -2649,7 +2649,7 @@ bool TQPopupMenu::focusNextPrevChild( bool next )
if ( i != actItem )
setActiveItem( i );
}
- return TRUE;
+ return true;
}
@@ -2687,7 +2687,7 @@ public:
}
bool fullSpan() const
{
- return TRUE;
+ return true;
}
TQSize sizeHint()
@@ -2743,9 +2743,9 @@ void TQPopupMenu::toggleTearOff()
p->setCheckable( isCheckable() );
p->reparent( parentWidget(), WType_TopLevel | WStyle_Tool |
WNoAutoErase | WDestructiveClose,
- geometry().topLeft(), FALSE );
- p->mitems->setAutoDelete( FALSE );
- p->tornOff = TRUE;
+ geometry().topLeft(), false );
+ p->mitems->setAutoDelete( false );
+ p->tornOff = true;
#ifdef TQ_WS_X11
p->x11SetWindowType( X11WindowTypeMenu );
#endif
@@ -2786,7 +2786,7 @@ void TQPopupMenu::activateItemAt( int index )
#ifndef TQT_NO_WHATSTHIS
bool b = TQWhatsThis::inWhatsThisMode();
#else
- const bool b = FALSE;
+ const bool b = false;
#endif
if ( !mi->isEnabledAndVisible() ) {
#ifndef TQT_NO_WHATSTHIS
@@ -2819,7 +2819,7 @@ void TQPopupMenu::activateItemAt( int index )
hide();
#ifndef TQT_NO_MENUBAR
if ( p && p->isMenuBar )
- ((TQMenuBar*) p)->goodbye( TRUE );
+ ((TQMenuBar*) p)->goodbye( true );
#endif
}
}
diff --git a/src/widgets/tqpopupmenu.h b/src/widgets/tqpopupmenu.h
index e3b7079a1..330a69ce9 100644
--- a/src/widgets/tqpopupmenu.h
+++ b/src/widgets/tqpopupmenu.h
@@ -116,7 +116,7 @@ protected:
bool focusNextPrevChild( bool next );
- int itemAtPos( const TQPoint &, bool ignoreSeparator = TRUE ) const;
+ int itemAtPos( const TQPoint &, bool ignoreSeparator = true ) const;
private slots:
void subActivated( int itemId );
@@ -145,7 +145,7 @@ private:
void menuDelPopup( TQPopupMenu * );
void frameChanged();
- void actSig( int, bool = FALSE );
+ void actSig( int, bool = false );
void hilitSig( int );
virtual void setFirstItemActive();
void hideAllPopups();
@@ -153,7 +153,7 @@ private:
bool tryMenuBar( TQMouseEvent * );
void byeMenuBar();
- TQSize updateSize(bool force_recalc=FALSE, bool do_resize=TRUE);
+ TQSize updateSize(bool force_recalc=false, bool do_resize=true);
void updateRow( int row );
TQRect screenRect(const TQPoint& pos);
#ifndef TQT_NO_ACCEL
diff --git a/src/widgets/tqprogressbar.cpp b/src/widgets/tqprogressbar.cpp
index 2b3f5074a..0ab5c4c52 100644
--- a/src/widgets/tqprogressbar.cpp
+++ b/src/widgets/tqprogressbar.cpp
@@ -108,9 +108,9 @@ TQProgressBar::TQProgressBar( TQWidget *parent, const char *name, WFlags f )
total_steps( 100 ),
progress_val( -1 ),
percentage( -1 ),
- center_indicator( TRUE ),
- auto_indicator( TRUE ),
- percentage_visible( TRUE ),
+ center_indicator( true ),
+ auto_indicator( true ),
+ percentage_visible( true ),
d( new TQProgressBarPrivate ),
m_orientation( Horizontal )
{
@@ -140,9 +140,9 @@ TQProgressBar::TQProgressBar( int totalSteps,
total_steps( totalSteps ),
progress_val( -1 ),
percentage( -1 ),
- center_indicator( TRUE ),
- auto_indicator( TRUE ),
- percentage_visible( TRUE ),
+ center_indicator( true ),
+ auto_indicator( true ),
+ percentage_visible( true ),
d( new TQProgressBarPrivate ),
m_orientation( Horizontal )
{
@@ -171,7 +171,7 @@ void TQProgressBar::reset()
progress_val = -1;
percentage = -1;
setIndicator(progress_str, progress_val, total_steps);
- repaint( FALSE );
+ repaint( false );
}
@@ -195,7 +195,7 @@ void TQProgressBar::setTotalSteps( int totalSteps )
if ( isVisible() &&
( setIndicator(progress_str, progress_val, total_steps) || !total_steps ) )
- repaint( FALSE );
+ repaint( false );
}
@@ -217,7 +217,7 @@ void TQProgressBar::setProgress( int progress )
setIndicator( progress_str, progress_val, total_steps );
if ( isVisible() && repaintRequired() ) {
- repaint( FALSE );
+ repaint( false );
d->last_painted_progress = progress;
}
@@ -283,23 +283,23 @@ TQSize TQProgressBar::minimumSizeHint() const
\brief whether the indicator string should be centered
Changing this property sets \l TQProgressBar::indicatorFollowsStyle
- to FALSE. The default is TRUE.
+ to false. The default is true.
*/
void TQProgressBar::setCenterIndicator( bool on )
{
if ( !auto_indicator && on == center_indicator )
return;
- auto_indicator = FALSE;
+ auto_indicator = false;
center_indicator = on;
- repaint( FALSE );
+ repaint( false );
}
/*!
\property TQProgressBar::indicatorFollowsStyle
\brief whether the display of the indicator string should follow the GUI style
- The default is TRUE.
+ The default is true.
\sa centerIndicator
*/
@@ -309,14 +309,14 @@ void TQProgressBar::setIndicatorFollowsStyle( bool on )
if ( on == auto_indicator )
return;
auto_indicator = on;
- repaint( FALSE );
+ repaint( false );
}
/*!
\property TQProgressBar::percentageVisible
\brief whether the current progress value is displayed
- The default is TRUE.
+ The default is true.
\sa centerIndicator, indicatorFollowsStyle
*/
@@ -325,7 +325,7 @@ void TQProgressBar::setPercentageVisible( bool on )
if ( on == percentage_visible )
return;
percentage_visible = on;
- repaint( FALSE );
+ repaint( false );
}
/*!
@@ -406,7 +406,7 @@ void TQProgressBar::setOrientation(Orientation orient)
text if you wish.
To allow efficient repainting of the progress bar, this method
- should return FALSE if the string is unchanged from the last call
+ should return false if the string is unchanged from the last call
to this function.
*/
@@ -414,10 +414,10 @@ bool TQProgressBar::setIndicator( TQString & indicator, int progress,
int totalSteps )
{
if ( !totalSteps )
- return FALSE;
+ return false;
if ( progress < 0 ) {
indicator = TQString::fromLatin1("");
- return TRUE;
+ return true;
} else {
// Get the values down to something usable.
if ( totalSteps > INT_MAX/1000 ) {
@@ -429,9 +429,9 @@ bool TQProgressBar::setIndicator( TQString & indicator, int progress,
if ( np != percentage ) {
percentage = np;
indicator.sprintf( "%d%%", np );
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
}
@@ -493,7 +493,7 @@ void TQProgressBar::drawContents( TQPainter *p )
m.rotate(-90.0);
m.translate((bar.height())*(-1.0), 0);
- buffer.painter()->setWorldMatrix(m, TRUE);
+ buffer.painter()->setWorldMatrix(m, true);
const_cast<TQStyleControlElementData&>(ceData).rect = TQRect(ceData.rect.y(), ceData.rect.x(), ceData.rect.height(), ceData.rect.width());
}
@@ -502,7 +502,7 @@ void TQProgressBar::drawContents( TQPainter *p )
TQStyle::visualRect(style().subRect(TQStyle::SR_ProgressBarContents, ceData, elementFlags, this), ceData, elementFlags),
colorGroup(), flags, TQStyleOption(), this);
- buffer.painter()->setWorldMatrix(oldMatrix, TRUE);
+ buffer.painter()->setWorldMatrix(oldMatrix, true);
if (percentageVisible()) {
style().drawControl(TQStyle::CE_ProgressBarLabel, buffer.painter(), this,
diff --git a/src/widgets/tqpushbutton.cpp b/src/widgets/tqpushbutton.cpp
index e264d2c1e..942d1b857 100644
--- a/src/widgets/tqpushbutton.cpp
+++ b/src/widgets/tqpushbutton.cpp
@@ -98,7 +98,7 @@
key in a dialog. You can change this with setAutoDefault(). Note
that auto-default buttons reserve a little extra space which is
necessary to draw a default-button indicator. If you do not want
- this space around your buttons, call setAutoDefault(FALSE).
+ this space around your buttons, call setAutoDefault(false).
Being so central, the button widget has grown to accommodate a
great many variations in the past decade. The Microsoft style
@@ -160,7 +160,7 @@
\property TQPushButton::autoDefault
\brief whether the push button is the auto default button
- If this property is set to TRUE then the push button is the auto
+ If this property is set to true then the push button is the auto
default button in a dialog.
In some GUI styles a default button is drawn with an extra frame
@@ -168,8 +168,8 @@
space free around auto-default buttons, i.e. auto-default buttons
may have a slightly larger size hint.
- This property's default is TRUE for buttons that have a TQDialog
- parent; otherwise it defaults to FALSE.
+ This property's default is true for buttons that have a TQDialog
+ parent; otherwise it defaults to false.
See the \l default property for details of how \l default and
auto-default interact.
@@ -186,7 +186,7 @@
\property TQPushButton::default
\brief whether the push button is the default button
- If this property is set to TRUE then the push button will be
+ If this property is set to true then the push button will be
pressed if the user presses the Enter (or Return) key in a dialog.
Regardless of focus, if the user presses Enter: If there is a
@@ -205,14 +205,14 @@
can always be clicked from the keyboard by pressing Enter (or
Return) or the Spacebar when the button has focus.
- This property's default is FALSE.
+ This property's default is false.
*/
/*!
\property TQPushButton::flat
\brief whether the border is disabled
- This property's default is FALSE.
+ This property's default is false.
*/
/*!
@@ -227,7 +227,7 @@
\brief whether the push button is toggled
This property should only be set for toggle push buttons. The
- default value is FALSE.
+ default value is false.
\sa isOn(), toggle(), toggled(), isToggleButton()
*/
@@ -247,7 +247,7 @@
\brief whether the push button has a menu button on it
\obsolete
- If this property is set to TRUE, then a down arrow is drawn on the push
+ If this property is set to true, then a down arrow is drawn on the push
button to indicate that a menu will pop up if the user clicks on the
arrow.
*/
@@ -330,14 +330,14 @@ TQPushButton::~TQPushButton()
void TQPushButton::init()
{
d = 0;
- defButton = FALSE;
- lastEnabled = FALSE;
- hasMenuArrow = FALSE;
- flt = FALSE;
+ defButton = false;
+ lastEnabled = false;
+ hasMenuArrow = false;
+ flt = false;
#ifndef TQT_NO_DIALOG
autoDefButton = ::tqt_cast<TQDialog*>(topLevelWidget()) != 0;
#else
- autoDefButton = FALSE;
+ autoDefButton = false;
#endif
setBackgroundMode( PaletteButton );
setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
@@ -345,8 +345,8 @@ void TQPushButton::init()
/*
- Makes the push button a toggle button if \a enable is TRUE or a normal
- push button if \a enable is FALSE.
+ Makes the push button a toggle button if \a enable is true or a normal
+ push button if \a enable is false.
Toggle buttons have an on/off state similar to \link TQCheckBox check
boxes. \endlink A push button is initially not a toggle button.
@@ -361,8 +361,8 @@ void TQPushButton::setToggleButton( bool enable )
/*
- Switches a toggle button on if \a enable is TRUE or off if \a enable is
- FALSE.
+ Switches a toggle button on if \a enable is true or off if \a enable is
+ false.
\sa isOn(), toggle(), toggled(), isToggleButton()
*/
@@ -613,7 +613,7 @@ void TQPushButton::updateMask()
void TQPushButton::focusInEvent( TQFocusEvent *e )
{
if (autoDefButton && !defButton) {
- defButton = TRUE;
+ defButton = true;
#ifndef TQT_NO_DIALOG
if ( defButton && ::tqt_cast<TQDialog*>(topLevelWidget()) )
((TQDialog*)topLevelWidget())->setDefault( this );
@@ -637,7 +637,7 @@ void TQPushButton::focusOutEvent( TQFocusEvent *e )
TQButton::focusOutEvent( e );
#ifndef TQT_NO_POPUPMENU
if ( popup() && popup()->isVisible() ) // restore pressed status
- setDown( TRUE );
+ setDown( true );
#endif
}
@@ -705,12 +705,12 @@ void TQPushButton::popupPressed()
TQPopupMenu* popup = d ? (TQPopupMenu*) d->popup : 0;
TQGuardedPtr<TQPushButton> that = this;
if ( isDown() && popup ) {
- bool horizontal = TRUE;
- bool topLeft = TRUE; // ### always TRUE
+ bool horizontal = true;
+ bool topLeft = true; // ### always true
#ifndef TQT_NO_TOOLBAR
TQToolBar *tb = ::tqt_cast<TQToolBar*>(parentWidget());
if ( tb && tb->orientation() == Vertical )
- horizontal = FALSE;
+ horizontal = false;
#endif
if ( horizontal ) {
if ( topLeft ) {
@@ -738,7 +738,7 @@ void TQPushButton::popupPressed()
}
}
if (that)
- setDown( FALSE );
+ setDown( false );
}
}
#endif
diff --git a/src/widgets/tqradiobutton.cpp b/src/widgets/tqradiobutton.cpp
index b296f5d79..adf7e9def 100644
--- a/src/widgets/tqradiobutton.cpp
+++ b/src/widgets/tqradiobutton.cpp
@@ -91,7 +91,7 @@
This property will not effect any other radio buttons unless they
have been placed in the same TQButtonGroup. The default value is
- FALSE (unchecked).
+ false (unchecked).
*/
/*!
@@ -137,11 +137,11 @@ TQRadioButton::TQRadioButton( const TQString &text, TQWidget *parent,
void TQRadioButton::init()
{
setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
- setToggleButton( TRUE );
+ setToggleButton( true );
#ifndef TQT_NO_BUTTONGROUP
TQButtonGroup *bgrp = ::tqt_cast<TQButtonGroup*>(parentWidget());
if ( bgrp )
- bgrp->setRadioButtonExclusive( TRUE );
+ bgrp->setRadioButtonExclusive( true );
#endif
}
@@ -163,7 +163,7 @@ TQSize TQRadioButton::sizeHint() const
constPolish();
TQPainter p(this);
- TQSize sz = style().itemRect(&p, TQRect(0, 0, 1, 1), ShowPrefix, FALSE,
+ TQSize sz = style().itemRect(&p, TQRect(0, 0, 1, 1), ShowPrefix, false,
pixmap(), text()).size();
return (style().sizeFromContents(TQStyle::CT_RadioButton, this, sz).
@@ -225,7 +225,7 @@ void TQRadioButton::drawButton( TQPainter *paint )
p->drawPixmap( irect.topLeft(), *pm );
return;
}
- bool use_pm = TRUE;
+ bool use_pm = true;
TQPainter pmpaint;
int wx, wy;
if ( use_pm ) {
@@ -315,7 +315,7 @@ void TQRadioButton::resizeEvent( TQResizeEvent* e )
TQButton::resizeEvent(e);
if ( isVisible() ) {
TQPainter p(this);
- TQSize isz = style().itemRect(&p, TQRect(0, 0, 1, 1), ShowPrefix, FALSE,
+ TQSize isz = style().itemRect(&p, TQRect(0, 0, 1, 1), ShowPrefix, false,
pixmap(), text()).size();
TQSize wsz = (style().sizeFromContents(TQStyle::CT_RadioButton, this, isz).
expandedTo(TQApplication::globalStrut()));
diff --git a/src/widgets/tqscrollbar.cpp b/src/widgets/tqscrollbar.cpp
index e49e1f9a9..80b2723e8 100644
--- a/src/widgets/tqscrollbar.cpp
+++ b/src/widgets/tqscrollbar.cpp
@@ -287,10 +287,10 @@ TQScrollBar::~TQScrollBar()
void TQScrollBar::init()
{
- track = TRUE;
+ track = true;
sliderPos = 0;
pressedControl = TQStyle::SC_None;
- clickedAt = FALSE;
+ clickedAt = false;
setFocusPolicy( NoFocus );
repeater = 0;
@@ -458,7 +458,7 @@ void TQScrollBar::doAutoRepeat()
style().styleHint(TQStyle::SH_ScrollBar_StopMouseOverSlider, this) &&
style().querySubControl(TQStyle::CC_ScrollBar, this,
mapFromGlobal(TQCursor::pos()) ) == TQStyle::SC_ScrollBarSlider)
- sendRepeat = FALSE;
+ sendRepeat = false;
#endif
if ( sendRepeat ){
if ( repeater )
@@ -484,7 +484,7 @@ void TQScrollBar::startAutoRepeat()
connect( repeater, TQ_SIGNAL(timeout()),
this, TQ_SLOT(doAutoRepeat()) );
}
- repeater->start( thresholdTime, FALSE );
+ repeater->start( thresholdTime, false );
}
@@ -636,7 +636,7 @@ void TQScrollBar::mousePressEvent( TQMouseEvent *e )
if ( e->state() & MouseButtonMask ) // another button was already pressed
return;
- clickedAt = TRUE;
+ clickedAt = true;
pressedControl = style().querySubControl(TQStyle::CC_ScrollBar, this, e->pos() );
if ( (pressedControl == TQStyle::SC_ScrollBarAddPage ||
@@ -700,7 +700,7 @@ void TQScrollBar::mouseReleaseEvent( TQMouseEvent *e )
return;
TQStyle::SubControl tmp = (TQStyle::SubControl) pressedControl;
- clickedAt = FALSE;
+ clickedAt = false;
stopAutoRepeat();
mouseMoveEvent( e ); // Might have moved since last mouse move event.
pressedControl = TQStyle::SC_None;
@@ -720,7 +720,7 @@ void TQScrollBar::mouseReleaseEvent( TQMouseEvent *e )
}
drawControls( tmp, pressedControl );
if ( e->button() == MidButton )
- repaint( FALSE );
+ repaint( false );
}
@@ -730,7 +730,7 @@ void TQScrollBar::mouseReleaseEvent( TQMouseEvent *e )
void TQScrollBar::mouseMoveEvent( TQMouseEvent *e )
{
if ( !isVisible() ) {
- clickedAt = FALSE;
+ clickedAt = false;
return;
}
@@ -1065,7 +1065,7 @@ void TQScrollBar::setValue( int i )
void TQScrollBar::hideEvent( TQHideEvent* )
{
pressedControl = TQStyle::SC_None;
- clickedAt = FALSE;
+ clickedAt = false;
}
diff --git a/src/widgets/tqscrollbar.h b/src/widgets/tqscrollbar.h
index d5cc1a502..e0a7a4195 100644
--- a/src/widgets/tqscrollbar.h
+++ b/src/widgets/tqscrollbar.h
@@ -78,7 +78,7 @@ public:
virtual void setPalette( const TQPalette & );
virtual TQSize sizeHint() const;
virtual void setSizePolicy( TQSizePolicy sp );
- void setSizePolicy( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw = FALSE );
+ void setSizePolicy( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw = false );
int minValue() const;
int maxValue() const;
diff --git a/src/widgets/tqscrollview.cpp b/src/widgets/tqscrollview.cpp
index 40a5bb509..ec062eece 100644
--- a/src/widgets/tqscrollview.cpp
+++ b/src/widgets/tqscrollview.cpp
@@ -130,10 +130,10 @@ public:
vx( 0 ), vy( 0 ), vwidth( 1 ), vheight( 1 ),
#ifndef TQT_NO_DRAGANDDROP
autoscroll_timer( parent, "scrollview autoscroll timer" ),
- drag_autoscroll( TRUE ),
+ drag_autoscroll( true ),
#endif
scrollbar_timer( parent, "scrollview scrollbar timer" ),
- inresize( FALSE ), use_cached_size_hint( TRUE )
+ inresize( false ), use_cached_size_hint( true )
{
l_marg = r_marg = t_marg = b_marg = 0;
viewport->polish();
@@ -147,11 +147,11 @@ public:
vbar->setSteps( 20, 1/*set later*/ );
hbar->setSteps( 20, 1/*set later*/ );
policy = TQScrollView::Default;
- signal_choke = FALSE;
- static_bg = FALSE;
- fake_scroll = FALSE;
- hbarPressed = FALSE;
- vbarPressed = FALSE;
+ signal_choke = false;
+ static_bg = false;
+ fake_scroll = false;
+ hbarPressed = false;
+ vbarPressed = false;
}
~TQScrollViewData();
@@ -171,7 +171,7 @@ public:
delete r;
}
- void hideOrShowAll(TQScrollView* sv, bool isScroll = FALSE );
+ void hideOrShowAll(TQScrollView* sv, bool isScroll = false );
void moveAllBy(int dx, int dy);
bool anyVisibleChildren();
void autoMove(TQScrollView* sv);
@@ -225,7 +225,7 @@ public:
inline TQScrollViewData::~TQScrollViewData()
{
- children.setAutoDelete( TRUE );
+ children.setAutoDelete( true );
}
TQSVChildRec* TQScrollViewData::ancestorRec(TQWidget* w)
@@ -256,7 +256,7 @@ void TQScrollViewData::hideOrShowAll(TQScrollView* sv, bool isScroll )
viewport->height() ) {
// clipped_viewport still covers viewport
if( static_bg )
- clipped_viewport->repaint( TRUE );
+ clipped_viewport->repaint( true );
else if ( ( !isScroll && !clipped_viewport->testWFlags( TQt::WStaticContents) )
|| static_bg )
TQApplication::postEvent( clipped_viewport,
@@ -284,16 +284,16 @@ void TQScrollViewData::moveAllBy(int dx, int dy)
r->child->move(r->child->x()+dx,r->child->y()+dy);
}
if ( static_bg )
- viewport->repaint( TRUE );
+ viewport->repaint( true );
}
}
bool TQScrollViewData::anyVisibleChildren()
{
for (TQSVChildRec *r = children.first(); r; r=children.next()) {
- if (r->child->isVisible()) return TRUE;
+ if (r->child->isVisible()) return true;
}
- return FALSE;
+ return false;
}
void TQScrollViewData::autoMove(TQScrollView* sv)
@@ -441,11 +441,11 @@ void TQScrollViewData::viewportResized( int w, int h )
potentially larger than 4000 pixels in either dimension. In this
usage you call resizeContents() to set the size of the area and
reimplement drawContents() to paint the contents. You then call
- enableClipper(TRUE) and add widgets, again by making them children
+ enableClipper(true) and add widgets, again by making them children
of the viewport(), and adding them with addChild():
\code
TQScrollView* sv = new TQScrollView(...);
- sv->enableClipper(TRUE);
+ sv->enableClipper(true);
TQLabel* child1 = new TQLabel("CHILD", sv->viewport());
sv->addChild(child1);
TQLabel* child2 = new TQLabel("CHILD", sv->viewport());
@@ -469,9 +469,9 @@ void TQScrollViewData::viewportResized( int w, int h )
Note that the widget you see in the scrolled area is the
viewport() widget, not the TQScrollView itself. So to turn mouse
- tracking on, for example, use viewport()->setMouseTracking(TRUE).
+ tracking on, for example, use viewport()->setMouseTracking(true).
- To enable drag-and-drop, you would setAcceptDrops(TRUE) on the
+ To enable drag-and-drop, you would setAcceptDrops(true) on the
TQScrollView (because drag-and-drop events propagate to the
parent). But to work out the logical position in the view, you
would need to map the drop co-ordinate from being relative to the
@@ -658,18 +658,18 @@ TQScrollView::~TQScrollView()
*/
void TQScrollView::hbarIsPressed()
{
- d->hbarPressed = TRUE;
+ d->hbarPressed = true;
emit( horizontalSliderPressed() );
}
void TQScrollView::hbarIsReleased()
{
- d->hbarPressed = FALSE;
+ d->hbarPressed = false;
emit( horizontalSliderReleased() );
}
/*!
- Returns TRUE if horizontal slider is pressed by user; otherwise returns FALSE.
+ Returns true if horizontal slider is pressed by user; otherwise returns false.
*/
bool TQScrollView::isHorizontalSliderPressed()
{
@@ -678,18 +678,18 @@ bool TQScrollView::isHorizontalSliderPressed()
void TQScrollView::vbarIsPressed()
{
- d->vbarPressed = TRUE;
+ d->vbarPressed = true;
emit( verticalSliderPressed() );
}
void TQScrollView::vbarIsReleased()
{
- d->vbarPressed = FALSE;
+ d->vbarPressed = false;
emit( verticalSliderReleased() );
}
/*!
- Returns TRUE if vertical slider is pressed by user; otherwise returns FALSE.
+ Returns true if vertical slider is pressed by user; otherwise returns false.
*/
bool TQScrollView::isVerticalSliderPressed()
{
@@ -804,27 +804,27 @@ TQSize TQScrollView::viewportSize( int x, int y ) const
// Do we intend to show the scrollbar?
if (d->hMode == AlwaysOn)
- showh = TRUE;
+ showh = true;
else if (d->hMode == AlwaysOff)
- showh = FALSE;
+ showh = false;
else
showh = needh;
if (d->vMode == AlwaysOn)
- showv = TRUE;
+ showv = true;
else if (d->vMode == AlwaysOff)
- showv = FALSE;
+ showv = false;
else
showv = needv;
// Given other scrollbar will be shown, NOW do we need one?
if ( showh && h-vsbExt-tmarg-bmarg < y ) {
if (d->vMode == Auto)
- showv=TRUE;
+ showv=true;
}
if ( showv && w-hsbExt-lmarg-rmarg < x ) {
if (d->hMode == Auto)
- showh=TRUE;
+ showh=true;
}
} else {
// Scrollbars not needed, only show scrollbar that are always on.
@@ -863,7 +863,7 @@ void TQScrollView::updateScrollBars()
bool needv;
bool showh;
bool showv;
- bool showc = FALSE;
+ bool showc = false;
int hsbExt = horizontalScrollBar()->sizeHint().height();
int vsbExt = verticalScrollBar()->sizeHint().width();
@@ -879,29 +879,29 @@ void TQScrollView::updateScrollBars()
// Do we intend to show the scrollbar?
if (d->hMode == AlwaysOn)
- showh = TRUE;
+ showh = true;
else if (d->hMode == AlwaysOff)
- showh = FALSE;
+ showh = false;
else
showh = needh;
if (d->vMode == AlwaysOn)
- showv = TRUE;
+ showv = true;
else if (d->vMode == AlwaysOff)
- showv = FALSE;
+ showv = false;
else
showv = needv;
#ifdef TQ_WS_MAC
- bool mac_need_scroll = FALSE;
+ bool mac_need_scroll = false;
if(!parentWidget()) {
- mac_need_scroll = TRUE;
+ mac_need_scroll = true;
} else {
TQWidget *tlw = topLevelWidget();
TQPoint tlw_br = TQPoint(tlw->width(), tlw->height()),
my_br = posInWindow(this) + TQPoint(w, h);
if(my_br.x() >= tlw_br.x() - 3 && my_br.y() >= tlw_br.y() - 3)
- mac_need_scroll = TRUE;
+ mac_need_scroll = true;
}
if(mac_need_scroll) {
WindowAttributes attr;
@@ -909,34 +909,34 @@ void TQScrollView::updateScrollBars()
mac_need_scroll = (attr & kWindowResizableAttribute);
}
if(mac_need_scroll) {
- showc = TRUE;
+ showc = true;
if(d->vMode == Auto)
- showv = TRUE;
+ showv = true;
if(d->hMode == Auto)
- showh = TRUE;
+ showh = true;
}
#endif
// Given other scrollbar will be shown, NOW do we need one?
if ( showh && h-vsbExt-tmarg-bmarg < contentsHeight() ) {
- needv=TRUE;
+ needv=true;
if (d->vMode == Auto)
- showv=TRUE;
+ showv=true;
}
if ( showv && !d->inresize && w-hsbExt-lmarg-rmarg < d->contentsWidth() ) {
- needh=TRUE;
+ needh=true;
if (d->hMode == Auto)
- showh=TRUE;
+ showh=true;
}
} else {
// Scrollbars not needed, only show scrollbar that are always on.
- needh = needv = FALSE;
+ needh = needv = false;
showh = d->hMode == AlwaysOn;
showv = d->vMode == AlwaysOn;
}
bool sc = d->signal_choke;
- d->signal_choke=TRUE;
+ d->signal_choke=true;
// Hide unneeded scrollbar, calculate viewport size
if ( showh ) {
@@ -1075,10 +1075,10 @@ void TQScrollView::updateScrollBars()
if ( showv && ( d->vbar->isHidden() || !d->vbar->isVisible() ) )
d->vbar->show();
- d->signal_choke=TRUE;
+ d->signal_choke=true;
d->vbar->setValue( d->contentsY() );
d->hbar->setValue( d->contentsX() );
- d->signal_choke=FALSE;
+ d->signal_choke=false;
TQSize newVisibleSize( visibleWidth(), visibleHeight() );
if ( d->clipped_viewport && oldVisibleSize != newVisibleSize ) {
@@ -1125,17 +1125,17 @@ void TQScrollView::resizeEvent( TQResizeEvent* event )
#if 0
if ( TQApplication::reverseLayout() ) {
- d->fake_scroll = TRUE;
+ d->fake_scroll = true;
scrollBy( -event->size().width() + event->oldSize().width(), 0 );
- d->fake_scroll = FALSE;
+ d->fake_scroll = false;
}
#endif
bool inresize = d->inresize;
- d->inresize = TRUE;
+ d->inresize = true;
updateScrollBars();
d->inresize = inresize;
- d->scrollbar_timer.start( 0, TRUE );
+ d->scrollbar_timer.start( 0, true );
d->hideOrShowAll(this);
}
@@ -1320,7 +1320,7 @@ void TQScrollView::setCornerWidget(TQWidget* corner)
if ( corner && corner->parentWidget() != this ) {
// #### No clean way to get current WFlags
corner->reparent( this, (((TQScrollView*)corner))->getWFlags(),
- TQPoint(0,0), FALSE );
+ TQPoint(0,0), false );
}
updateScrollBars();
@@ -1381,7 +1381,7 @@ void TQScrollView::removeChild(TQObject* child)
(\a x, \a y). The position defaults to (0, 0). If the child is
already in the view, it is just moved.
- You may want to call enableClipper(TRUE) if you add a large number
+ You may want to call enableClipper(true) if you add a large number
of widgets.
*/
void TQScrollView::addChild(TQWidget* child, int x, int y)
@@ -1417,7 +1417,7 @@ void TQScrollView::addChild(TQWidget* child, int x, int y)
setResizePolicy( Manual );
}
if ( child->parentWidget() != viewport() ) {
- child->reparent( viewport(), 0, TQPoint(0,0), FALSE );
+ child->reparent( viewport(), 0, TQPoint(0,0), false );
}
d->addChildRec(child,x,y)->hideOrShow(this, d->clipped_viewport);
@@ -1463,7 +1463,7 @@ int TQScrollView::childY(TQWidget* child)
/*! \fn bool TQScrollView::childIsVisible(TQWidget*)
\obsolete
- Returns TRUE if \a child is visible. This is equivalent
+ Returns true if \a child is visible. This is equivalent
to child->isVisible().
*/
@@ -1484,7 +1484,7 @@ int TQScrollView::childY(TQWidget* child)
bool TQScrollView::eventFilter( TQObject *obj, TQEvent *e )
{
if ( !d )
- return FALSE; // we are destructing
+ return false; // we are destructing
if ( obj == d->viewport || obj == d->clipped_viewport ) {
switch ( e->type() ) {
/* Forward many events to viewport...() functions */
@@ -1498,22 +1498,22 @@ bool TQScrollView::eventFilter( TQObject *obj, TQEvent *e )
case TQEvent::MouseButtonPress:
viewportMousePressEvent( (TQMouseEvent*)e );
if ( ((TQMouseEvent*)e)->isAccepted() )
- return TRUE;
+ return true;
break;
case TQEvent::MouseButtonRelease:
viewportMouseReleaseEvent( (TQMouseEvent*)e );
if ( ((TQMouseEvent*)e)->isAccepted() )
- return TRUE;
+ return true;
break;
case TQEvent::MouseButtonDblClick:
viewportMouseDoubleClickEvent( (TQMouseEvent*)e );
if ( ((TQMouseEvent*)e)->isAccepted() )
- return TRUE;
+ return true;
break;
case TQEvent::MouseMove:
viewportMouseMoveEvent( (TQMouseEvent*)e );
if ( ((TQMouseEvent*)e)->isAccepted() )
- return TRUE;
+ return true;
break;
#ifndef TQT_NO_DRAGANDDROP
case TQEvent::DragEnter:
@@ -1545,7 +1545,7 @@ bool TQScrollView::eventFilter( TQObject *obj, TQEvent *e )
case TQEvent::ContextMenu:
viewportContextMenuEvent( (TQContextMenuEvent*)e );
if ( ((TQContextMenuEvent*)e)->isAccepted() )
- return TRUE;
+ return true;
break;
case TQEvent::ChildRemoved:
removeChild((TQWidget*)((TQChildEvent*)e)->child());
@@ -1555,7 +1555,7 @@ bool TQScrollView::eventFilter( TQObject *obj, TQEvent *e )
break;
case TQEvent::WindowActivate:
case TQEvent::WindowDeactivate:
- return TRUE;
+ return true;
default:
break;
}
@@ -1997,11 +1997,11 @@ void TQScrollView::setContentsPos( int x, int y )
if ( x < 0 ) x = 0;
if ( y < 0 ) y = 0;
// Choke signal handling while we update BOTH sliders.
- d->signal_choke=TRUE;
+ d->signal_choke=true;
moveContents( -x, -y );
d->vbar->setValue( y );
d->hbar->setValue( x );
- d->signal_choke=FALSE;
+ d->signal_choke=false;
}
/*!
@@ -2094,7 +2094,7 @@ void TQScrollView::moveContents(int x, int y)
// Small move
clipper()->scroll(dx,dy);
}
- d->hideOrShowAll(this, TRUE );
+ d->hideOrShowAll(this, true );
}
/*!
@@ -2146,7 +2146,7 @@ void TQScrollView::resizeContents( int w, int h )
d->vwidth = w;
d->vheight = h;
- d->scrollbar_timer.start( 0, TRUE );
+ d->scrollbar_timer.start( 0, true );
if ( d->children.isEmpty() && d->policy == Default )
setResizePolicy( Manual );
@@ -2250,7 +2250,7 @@ void TQScrollView::updateContents()
/*!
\overload
- Repaints the contents of rectangle \a r. If \a erase is TRUE the
+ Repaints the contents of rectangle \a r. If \a erase is true the
background is cleared using the background color.
*/
void TQScrollView::repaintContents( const TQRect& r, bool erase )
@@ -2262,7 +2262,7 @@ void TQScrollView::repaintContents( const TQRect& r, bool erase )
/*!
\overload
- Repaints the contents. If \a erase is TRUE the background is
+ Repaints the contents. If \a erase is true the background is
cleared using the background color.
*/
void TQScrollView::repaintContents( bool erase )
@@ -2274,7 +2274,7 @@ void TQScrollView::repaintContents( bool erase )
/*!
Calls repaint() on a rectangle defined by \a x, \a y, \a w, \a h,
translated appropriately. If the rectangle is not visible, nothing
- is repainted. If \a erase is TRUE the background is cleared using
+ is repainted. If \a erase is true the background is cleared using
the background color.
\sa updateContents()
@@ -2441,7 +2441,7 @@ void TQScrollView::changeFrameRect(const TQRect& r)
fr = fr.unite( frameRect() );
fr = fr.subtract( cr );
if ( !fr.isEmpty() )
- TQApplication::postEvent( this, new TQPaintEvent( fr, FALSE ) );
+ TQApplication::postEvent( this, new TQPaintEvent( fr, false ) );
}
}
}
@@ -2560,7 +2560,7 @@ bool TQScrollView::focusNextPrevChild( bool next )
}
candidate->setFocus();
- return TRUE;
+ return true;
}
@@ -2568,7 +2568,7 @@ bool TQScrollView::focusNextPrevChild( bool next )
/*!
When a large numbers of child widgets are in a scrollview,
especially if they are close together, the scrolling performance
- can suffer greatly. If \a y is TRUE the scrollview will use an
+ can suffer greatly. If \a y is true the scrollview will use an
extra widget to group child widgets.
Note that you may only call enableClipper() prior to adding
@@ -2599,8 +2599,8 @@ void TQScrollView::enableClipper(bool y)
}
/*!
- Sets the scrollview to have a static background if \a y is TRUE,
- or a scrolling background if \a y is FALSE. By default, the
+ Sets the scrollview to have a static background if \a y is true,
+ or a scrolling background if \a y is false. By default, the
background is scrolling.
Be aware that this mode is quite slow, as a full repaint of the
@@ -2614,8 +2614,8 @@ void TQScrollView::setStaticBackground(bool y)
}
/*!
- Returns TRUE if TQScrollView uses a static background; otherwise
- returns FALSE.
+ Returns true if TQScrollView uses a static background; otherwise
+ returns false.
\sa setStaticBackground()
*/
@@ -2797,10 +2797,10 @@ void TQScrollView::doDragAutoScroll()
\property TQScrollView::dragAutoScroll
\brief whether autoscrolling in drag move events is enabled
- If this property is set to TRUE (the default), the TQScrollView
+ If this property is set to true (the default), the TQScrollView
automatically scrolls the contents in drag move events if the user
moves the cursor close to a border of the view. Of course this
- works only if the viewport accepts drops. Specifying FALSE
+ works only if the viewport accepts drops. Specifying false
disables this autoscroll feature.
\warning Enabling this property might not be enough to
@@ -2834,7 +2834,7 @@ void TQScrollView::setCachedSizeHint( const TQSize &sh ) const
*/
void TQScrollView::disableSizeHintCaching()
{
- d->use_cached_size_hint = FALSE;
+ d->use_cached_size_hint = false;
}
/*!\internal
diff --git a/src/widgets/tqscrollview.h b/src/widgets/tqscrollview.h
index 9c1606481..318ff2a37 100644
--- a/src/widgets/tqscrollview.h
+++ b/src/widgets/tqscrollview.h
@@ -81,7 +81,7 @@ public:
int childX(TQWidget* child);
int childY(TQWidget* child);
bool childIsVisible(TQWidget* child) { return child->isVisible(); } // obsolete functions
- void showChild(TQWidget* child, bool yes=TRUE) {
+ void showChild(TQWidget* child, bool yes=true) {
if ( yes )
child->show();
else
@@ -121,9 +121,9 @@ public:
void updateContents( int x, int y, int w, int h );
void updateContents( const TQRect& r );
void updateContents();
- void repaintContents( int x, int y, int w, int h, bool erase=TRUE );
- void repaintContents( const TQRect& r, bool erase=TRUE );
- void repaintContents( bool erase=TRUE );
+ void repaintContents( int x, int y, int w, int h, bool erase=true );
+ void repaintContents( const TQRect& r, bool erase=true );
+ void repaintContents( bool erase=true );
void contentsToViewport( int x, int y, int& vx, int& vy ) const;
void viewportToContents( int vx, int vy, int& x, int& y ) const;
TQPoint contentsToViewport( const TQPoint& ) const;
diff --git a/src/widgets/tqslider.cpp b/src/widgets/tqslider.cpp
index 7c503e1b0..f56ff7248 100644
--- a/src/widgets/tqslider.cpp
+++ b/src/widgets/tqslider.cpp
@@ -182,7 +182,7 @@ void TQSlider::init()
sliderVal = 0;
clickOffset = 0;
state = Idle;
- track = TRUE;
+ track = true;
ticks = NoMarks;
tickInt = 0;
setFocusPolicy( TabFocus );
@@ -395,10 +395,10 @@ void TQSlider::reallyMoveSlider( int newPos )
/* just the one repaint if no background */
if (backgroundMode() == NoBackground)
- repaint(newR | oldR, FALSE);
+ repaint(newR | oldR, false);
else {
repaint(oldR.subtract(newR));
- repaint(newR, FALSE);
+ repaint(newR, false);
}
}
@@ -462,7 +462,7 @@ void TQSlider::mousePressEvent( TQMouseEvent *e )
if ( !timer )
timer = new TQTimer( this );
connect( timer, TQ_SIGNAL(timeout()), TQ_SLOT(repeatTimeout()) );
- timer->start( thresholdTime, TRUE );
+ timer->start( thresholdTime, true );
} else if ( ( orient == Horizontal && e->pos().x() > r.right() ) //### goodPart
|| ( orient == Vertical && e->pos().y() > r.bottom() ) ) {
if ( orient == Horizontal && TQApplication::reverseLayout() ) {
@@ -475,7 +475,7 @@ void TQSlider::mousePressEvent( TQMouseEvent *e )
if ( !timer )
timer = new TQTimer( this );
connect( timer, TQ_SIGNAL(timeout()), TQ_SLOT(repeatTimeout()) );
- timer->start( thresholdTime, TRUE );
+ timer->start( thresholdTime, true );
}
update( sliderRect() );
}
@@ -716,7 +716,7 @@ void TQSlider::repeatTimeout()
connect( timer, TQ_SIGNAL(timeout()), TQ_SLOT(subtractStep()) );
else if ( state == TimingUp )
connect( timer, TQ_SIGNAL(timeout()), TQ_SLOT(addStep()) );
- timer->start( repeatTime, FALSE );
+ timer->start( repeatTime, false );
}
diff --git a/src/widgets/tqslider.h b/src/widgets/tqslider.h
index 1ce9883ef..37eef3027 100644
--- a/src/widgets/tqslider.h
+++ b/src/widgets/tqslider.h
@@ -86,7 +86,7 @@ public:
TQRect sliderRect() const;
TQSize sizeHint() const;
void setSizePolicy( TQSizePolicy sp );
- void setSizePolicy( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw = FALSE );
+ void setSizePolicy( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw = false );
TQSizePolicy sizePolicy() const;
TQSize minimumSizeHint() const;
diff --git a/src/widgets/tqspinbox.cpp b/src/widgets/tqspinbox.cpp
index 08af76cb0..bfd4a255d 100644
--- a/src/widgets/tqspinbox.cpp
+++ b/src/widgets/tqspinbox.cpp
@@ -98,7 +98,7 @@ TQValidator::State TQSpinBoxValidator::validate( TQString& str, int& pos ) const
if ( overhead == 0 ) {
state = TQIntValidator::validate( str, pos );
} else {
- bool stripedVersion = FALSE;
+ bool stripedVersion = false;
if ( str.length() >= overhead && str.startsWith(pref)
&& (str.endsWith(suff)
|| (stripedVersion = str.endsWith(suffStriped))) ) {
@@ -270,16 +270,16 @@ void TQSpinBox::initSpinBox()
connect( d->controls, TQ_SIGNAL( stepUpPressed() ), TQ_SLOT( stepUp() ) );
connect( d->controls, TQ_SIGNAL( stepDownPressed() ), TQ_SLOT( stepDown() ) );
- wrap = FALSE;
- edited = FALSE;
- d->selreq = FALSE;
+ wrap = false;
+ edited = false;
+ d->selreq = false;
validate = new TQSpinBoxValidator( this, "validator" );
vi = new TQLineEdit( this, "qt_spinbox_edit" );
d->controls->setEditWidget( vi );
vi->setValidator( validate );
vi->installEventFilter( this );
- vi->setFrame( FALSE );
+ vi->setFrame( false );
setFocusProxy( vi );
setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
@@ -546,7 +546,7 @@ void TQSpinBox::arrangeWidgets()
void TQSpinBox::setValue( int value )
{
- edited = FALSE; // we ignore anything entered and not yet interpreted
+ edited = false; // we ignore anything entered and not yet interpreted
TQRangeControl::setValue( value );
updateDisplay();
}
@@ -555,7 +555,7 @@ int TQSpinBox::value() const
{
TQSpinBox * that = (TQSpinBox *) this;
if ( edited ) {
- that->edited = FALSE; // avoid recursion
+ that->edited = false; // avoid recursion
that->interpretText();
}
return TQRangeControl::value();
@@ -564,7 +564,7 @@ int TQSpinBox::value() const
/*!
Increases the spin box's value by one lineStep(), wrapping as
- necessary if wrapping() is TRUE. This is the same as clicking on
+ necessary if wrapping() is true. This is the same as clicking on
the pointing-up button and can be used for keyboard accelerators,
for example.
@@ -585,7 +585,7 @@ void TQSpinBox::stepUp()
/*!
Decreases the spin box's value one lineStep(), wrapping as
- necessary if wrapping() is TRUE. This is the same as clicking on
+ necessary if wrapping() is true. This is the same as clicking on
the pointing-down button and can be used for keyboard
accelerators, for example.
@@ -653,23 +653,23 @@ bool TQSpinBox::eventFilter( TQObject* o, TQEvent* ev )
if ( ev->type() == TQEvent::KeyPress ) {
TQKeyEvent* k = (TQKeyEvent*)ev;
- bool retval = FALSE; // workaround for MSVC++ optimization bug
+ bool retval = false; // workaround for MSVC++ optimization bug
if( (k->key() == Key_Tab) || (k->key() == Key_BackTab) ){
if ( k->state() & TQt::ControlButton )
- return FALSE;
+ return false;
if ( edited )
interpretText();
tqApp->sendEvent( this, ev );
- retval = TRUE;
+ retval = true;
} if ( k->key() == Key_Up ) {
stepUp();
- retval = TRUE;
+ retval = true;
} else if ( k->key() == Key_Down ) {
stepDown();
- retval = TRUE;
+ retval = true;
} else if ( k->key() == Key_Enter || k->key() == Key_Return ) {
interpretText();
- return FALSE;
+ return false;
}
if ( retval )
return retval;
@@ -677,9 +677,9 @@ bool TQSpinBox::eventFilter( TQObject* o, TQEvent* ev )
if ( edited ) {
interpretText();
}
- return FALSE;
+ return false;
}
- return FALSE;
+ return false;
}
/*!
@@ -743,7 +743,7 @@ void TQSpinBox::valueChange()
{
d->selreq = hasFocus();
updateDisplay();
- d->selreq = FALSE;
+ d->selreq = false;
emit valueChanged( value() );
emit valueChanged( currentValueText() );
#if defined(QT_ACCESSIBILITY_SUPPORT)
@@ -802,7 +802,7 @@ const TQValidator * TQSpinBox::validator() const
*/
void TQSpinBox::updateDisplay()
{
- vi->setUpdatesEnabled( FALSE );
+ vi->setUpdatesEnabled( false );
vi->setText( currentValueText() );
if ( d->selreq && isVisible() && ( hasFocus() || vi->hasFocus() ) ) {
selectAll();
@@ -810,9 +810,9 @@ void TQSpinBox::updateDisplay()
if ( !suffix().isEmpty() && vi->text().endsWith(suffix()) )
vi->setCursorPosition( vi->text().length() - suffix().length() );
}
- vi->setUpdatesEnabled( TRUE );
- vi->repaint( FALSE ); // immediate repaint needed for some reason
- edited = FALSE;
+ vi->setUpdatesEnabled( true );
+ vi->repaint( false ); // immediate repaint needed for some reason
+ edited = false;
bool upEnabled = isEnabled() && ( wrapping() || value() < maxValue() );
bool downEnabled = isEnabled() && ( wrapping() || value() > minValue() );
@@ -820,7 +820,7 @@ void TQSpinBox::updateDisplay()
d->controls->setUpEnabled( upEnabled );
d->controls->setDownEnabled( downEnabled );
vi->setEnabled( isEnabled() );
- repaint( FALSE );
+ repaint( false );
}
@@ -838,15 +838,15 @@ void TQSpinBox::updateDisplay()
void TQSpinBox::interpretText()
{
- bool ok = TRUE;
- bool done = FALSE;
+ bool ok = true;
+ bool done = false;
int newVal = 0;
if ( !specialValueText().isEmpty() ) {
TQString s = text().stripWhiteSpace();
TQString t = specialValueText().stripWhiteSpace();
if ( s == t ) {
newVal = minValue();
- done = TRUE;
+ done = true;
}
}
if ( !done )
@@ -893,7 +893,7 @@ TQLineEdit* TQSpinBox::editor() const
void TQSpinBox::textChanged()
{
- edited = TRUE; // this flag is cleared in updateDisplay()
+ edited = true; // this flag is cleared in updateDisplay()
}
@@ -926,8 +926,8 @@ TQString TQSpinBox::mapValueToText( int v )
interpret text entered by the user as a value. The text is
available as text() and as cleanText(), and this function must
parse it if possible. If \a ok is not 0: if it parses the text
- successfully, \a *ok is set to TRUE; otherwise \a *ok is set to
- FALSE.
+ successfully, \a *ok is set to true; otherwise \a *ok is set to
+ false.
Subclasses that need to display spin box values in a non-numeric
way need to reimplement this function.
@@ -1020,7 +1020,7 @@ void TQSpinBox::setButtonSymbols( ButtonSymbols newSymbols )
d->controls->setButtonSymbols( TQSpinWidget::PlusMinus );
break;
}
- // repaint( FALSE );
+ // repaint( false );
}
TQSpinBox::ButtonSymbols TQSpinBox::buttonSymbols() const
diff --git a/src/widgets/tqspinwidget.cpp b/src/widgets/tqspinwidget.cpp
index 893fa0f0c..b2f685a4d 100644
--- a/src/widgets/tqspinwidget.cpp
+++ b/src/widgets/tqspinwidget.cpp
@@ -49,8 +49,8 @@ class TQSpinWidgetPrivate
{
public:
TQSpinWidgetPrivate()
- : upEnabled( TRUE ),
- downEnabled( TRUE ),
+ : upEnabled( true ),
+ downEnabled( true ),
theButton( 0 ),
buttonDown( 0 ),
timerUp( 0 ),
@@ -66,7 +66,7 @@ public:
TQTimer auRepTimer;
TQSpinWidget::ButtonSymbols bsyms;
TQWidget *ed;
- void startTimer( int msec ) { auRepTimer.start( msec, TRUE ); }
+ void startTimer( int msec ) { auRepTimer.start( msec, true ); }
void startTimer( bool up, int msec ) { timerUp = up; startTimer( msec ); }
void stopTimer() { auRepTimer.stop(); }
};
@@ -135,7 +135,7 @@ void TQSpinWidget::mousePressEvent( TQMouseEvent *e )
d->stopTimer();
d->buttonDown = 0;
d->theButton = 0;
- repaint( d->down.unite( d->up ), FALSE );
+ repaint( d->down.unite( d->up ), false );
return;
}
@@ -151,15 +151,15 @@ void TQSpinWidget::mousePressEvent( TQMouseEvent *e )
d->theButton = d->buttonDown;
if ( oldButtonDown != d->buttonDown ) {
if ( !d->buttonDown ) {
- repaint( d->down.unite( d->up ), FALSE );
+ repaint( d->down.unite( d->up ), false );
} else if ( d->buttonDown & 1 ) {
- repaint( d->down, FALSE );
+ repaint( d->down, false );
stepDown();
- d->startTimer( FALSE, 300 );
+ d->startTimer( false, 300 );
} else if ( d->buttonDown & 2 ) {
- repaint( d->up, FALSE );
+ repaint( d->up, false );
stepUp();
- d->startTimer( TRUE, 300 );
+ d->startTimer( true, 300 );
}
}
}
@@ -250,9 +250,9 @@ void TQSpinWidget::mouseReleaseEvent( TQMouseEvent *e )
d->theButton = 0;
if ( oldButtonDown != d->theButton ) {
if ( oldButtonDown & 1 )
- repaint( d->down, FALSE );
+ repaint( d->down, false );
else if ( oldButtonDown & 2 )
- repaint( d->up, FALSE );
+ repaint( d->up, false );
}
d->stopTimer();
d->buttonDown = 0;
@@ -272,19 +272,19 @@ void TQSpinWidget::mouseMoveEvent( TQMouseEvent *e )
if ( oldButtonDown & 1 && !d->down.contains( e->pos() ) ) {
d->stopTimer();
d->theButton = 0;
- repaint( d->down, FALSE );
+ repaint( d->down, false );
} else if ( oldButtonDown & 2 && !d->up.contains( e->pos() ) ) {
d->stopTimer();
d->theButton = 0;
- repaint( d->up, FALSE );
+ repaint( d->up, false );
} else if ( !oldButtonDown && d->up.contains( e->pos() ) && d->buttonDown & 2 ) {
d->startTimer( 500 );
d->theButton = 2;
- repaint( d->up, FALSE );
+ repaint( d->up, false );
} else if ( !oldButtonDown && d->down.contains( e->pos() ) && d->buttonDown & 1 ) {
d->startTimer( 500 );
d->theButton = 1;
- repaint( d->down, FALSE );
+ repaint( d->down, false );
}
}
@@ -379,8 +379,8 @@ TQRect TQSpinWidget::downRect() const
void TQSpinWidget::updateDisplay()
{
if ( !isEnabled() ) {
- d->upEnabled = FALSE;
- d->downEnabled = FALSE;
+ d->upEnabled = false;
+ d->downEnabled = false;
}
if ( d->theButton & 1 && ( d->downEnabled ) == 0 ) {
d->theButton &= ~1;
@@ -391,7 +391,7 @@ void TQSpinWidget::updateDisplay()
d->theButton &= ~2;
d->buttonDown &= ~2;
}
- repaint( FALSE );
+ repaint( false );
}
diff --git a/src/widgets/tqsplitter.cpp b/src/widgets/tqsplitter.cpp
index 41b565ef3..378beb6a4 100644
--- a/src/widgets/tqsplitter.cpp
+++ b/src/widgets/tqsplitter.cpp
@@ -193,7 +193,7 @@ TQCOORD TQSplitterLayoutStruct::getSizer( Orientation orient )
resized, or set the stretch component of the \l sizePolicy.
Although TQSplitter normally resizes the children only at the end
- of a resize operation, if you call setOpaqueResize(TRUE) the
+ of a resize operation, if you call setOpaqueResize(true) the
widgets are resized as often as possible.
The initial distribution of size between the widgets is determined
@@ -251,7 +251,7 @@ TQSplitter::~TQSplitter()
void TQSplitter::init()
{
d = new TQSplitterPrivate;
- d->list.setAutoDelete( TRUE );
+ d->list.setAutoDelete( true );
TQSizePolicy sp( TQSizePolicy::Expanding, TQSizePolicy::Preferred );
if ( orient == Vertical )
sp.transpose();
@@ -358,11 +358,11 @@ TQSplitterLayoutStruct *TQSplitter::findWidget( TQWidget *w )
/*
Inserts the widget \a w at the end (or at the beginning if \a
- prepend is TRUE) of the splitter's list of widgets.
+ prepend is true) of the splitter's list of widgets.
It is the responsibility of the caller to make sure that \a w is
not already in the splitter and to call recalcId() if needed. (If
- \a prepend is TRUE, then recalcId() is very probably needed.)
+ \a prepend is true, then recalcId() is very probably needed.)
*/
TQSplitterLayoutStruct *TQSplitter::addWidget( TQWidget *w, bool prepend )
@@ -377,7 +377,7 @@ TQSplitterLayoutStruct *TQSplitter::addWidget( TQWidget *w, bool prepend )
newHandle = new TQSplitterHandle( orientation(), this, tmp );
s->wid = newHandle;
newHandle->setId( d->list.count() );
- s->isHandle = TRUE;
+ s->isHandle = true;
s->sizer = pick( newHandle->sizeHint() );
if ( prepend )
d->list.prepend( s );
@@ -387,7 +387,7 @@ TQSplitterLayoutStruct *TQSplitter::addWidget( TQWidget *w, bool prepend )
s = new TQSplitterLayoutStruct;
s->resizeMode = DefaultResizeMode;
s->wid = w;
- s->isHandle = FALSE;
+ s->isHandle = false;
if ( prepend )
d->list.prepend( s );
else
@@ -485,7 +485,7 @@ bool TQSplitter::event( TQEvent *e )
case TQEvent::Show:
if ( !d->firstShow )
break;
- d->firstShow = FALSE;
+ d->firstShow = false;
// fall through
case TQEvent::LayoutHint:
recalc( isVisible() );
@@ -525,12 +525,12 @@ void TQSplitter::drawSplitter( TQPainter *p,
int TQSplitter::idAfter( TQWidget* w ) const
{
TQSplitterLayoutStruct *s = d->list.first();
- bool seen_w = FALSE;
+ bool seen_w = false;
while ( s ) {
if ( s->isHandle && seen_w )
return d->list.at();
if ( !s->isHandle && s->wid == w )
- seen_w = TRUE;
+ seen_w = true;
s = d->list.next();
}
return 0;
@@ -561,11 +561,11 @@ void TQSplitter::moveSplitter( TQCOORD p, int id )
if ( TQApplication::reverseLayout() && orient == Horizontal ) {
int q = p + s->wid->width();
- doMove( FALSE, q, id - 1, -1, (q > oldP), (p > max) );
- doMove( TRUE, q, id, -1, (q > oldP), (p < min) );
+ doMove( false, q, id - 1, -1, (q > oldP), (p > max) );
+ doMove( true, q, id, -1, (q > oldP), (p < min) );
} else {
- doMove( FALSE, p, id, +1, (p < oldP), (p > max) );
- doMove( TRUE, p, id - 1, +1, (p < oldP), (p < min) );
+ doMove( false, p, id, +1, (p < oldP), (p > max) );
+ doMove( true, p, id - 1, +1, (p < oldP), (p < min) );
}
storeSizes();
}
@@ -605,13 +605,13 @@ void TQSplitter::doMove( bool backwards, int pos, int id, int delta, bool upLeft
int nextId = backwards ? id - delta : id + delta;
if ( w->isHidden() ) {
- doMove( backwards, pos, nextId, delta, upLeft, TRUE );
+ doMove( backwards, pos, nextId, delta, upLeft, true );
} else {
if ( s->isHandle ) {
int dd = s->getSizer( orient );
int nextPos = backwards ? pos - dd : pos + dd;
int left = backwards ? pos - dd : pos;
- setGeo( w, left, dd, TRUE );
+ setGeo( w, left, dd, true );
doMove( backwards, nextPos, nextId, delta, upLeft, mayCollapse );
} else {
int dd = backwards ? pos - pick( topLeft(w) )
@@ -622,9 +622,9 @@ void TQSplitter::doMove( bool backwards, int pos, int id, int delta, bool upLeft
} else {
dd = 0;
}
- setGeo( w, backwards ? pos - dd : pos, dd, TRUE );
+ setGeo( w, backwards ? pos - dd : pos, dd, true );
doMove( backwards, backwards ? pos - dd : pos + dd, nextId, delta,
- upLeft, TRUE );
+ upLeft, true );
}
}
}
@@ -771,7 +771,7 @@ int TQSplitter::adjustPos( int pos, int id, int *farMin, int *min, int *max,
bool TQSplitter::collapsible( TQSplitterLayoutStruct *s )
{
if (pick(qSmartMinSize(s->wid)) == 1)
- return FALSE;
+ return false;
if ( s->collapsible != Default ) {
return (bool) s->collapsible;
} else {
@@ -796,7 +796,7 @@ void TQSplitter::doResize()
a[i].maximumSize = 0;
} else if ( s->isHandle ) {
a[i].sizeHint = a[i].minimumSize = a[i].maximumSize = s->sizer;
- a[i].empty = FALSE;
+ a[i].empty = false;
} else {
int mode = s->resizeMode;
int stretch = 1;
@@ -826,7 +826,7 @@ void TQSplitter::doResize()
a[i].minimumSize = pick( qSmartMinSize(s->wid) );
a[i].maximumSize = pick( s->wid->maximumSize() );
- a[i].empty = FALSE;
+ a[i].empty = false;
if ( mode == Stretch ) {
if ( s->getSizer(orient) > 1 )
@@ -851,7 +851,7 @@ void TQSplitter::doResize()
for ( int i = 0; i < n; i++ ) {
TQSplitterLayoutStruct *s = d->list.at(i);
- setGeo( s->wid, a[i].pos, a[i].size, FALSE );
+ setGeo( s->wid, a[i].pos, a[i].size, false );
}
}
@@ -863,7 +863,7 @@ void TQSplitter::recalc( bool update )
int maxt = TQWIDGETSIZE_MAX;
int mint = fi;
int n = d->list.count();
- bool first = TRUE;
+ bool first = true;
/*
Splitter handles before the first visible widget or right
@@ -881,15 +881,15 @@ void TQSplitter::recalc( bool update )
p->wid->setHidden( first || s->wid->isHidden() );
if ( !s->wid->isHidden() )
- first = FALSE;
+ first = false;
}
}
- bool empty = TRUE;
+ bool empty = true;
for ( int j = 0; j < n; j++ ) {
TQSplitterLayoutStruct *s = d->list.at( j );
if ( !s->wid->isHidden() ) {
- empty = FALSE;
+ empty = false;
if ( s->isHandle ) {
minl += s->getSizer( orient );
maxl += s->getSizer( orient );
@@ -928,7 +928,7 @@ void TQSplitter::recalc( bool update )
if ( update )
doResize();
else
- d->firstShow = TRUE;
+ d->firstShow = true;
}
/*!
@@ -987,11 +987,11 @@ void TQSplitter::setOpaqueResize( bool on )
void TQSplitter::moveToFirst( TQWidget *w )
{
processChildEvents();
- bool found = FALSE;
+ bool found = false;
TQSplitterLayoutStruct *s = d->list.first();
while ( s ) {
if ( s->wid == w ) {
- found = TRUE;
+ found = true;
TQSplitterLayoutStruct *p = d->list.prev();
if ( p ) { // not already at first place
d->list.take(); // take p
@@ -1004,7 +1004,7 @@ void TQSplitter::moveToFirst( TQWidget *w )
s = d->list.next();
}
if ( !found )
- addWidget( w, TRUE );
+ addWidget( w, true );
recalcId();
}
@@ -1016,11 +1016,11 @@ void TQSplitter::moveToFirst( TQWidget *w )
void TQSplitter::moveToLast( TQWidget *w )
{
processChildEvents();
- bool found = FALSE;
+ bool found = false;
TQSplitterLayoutStruct *s = d->list.first();
while ( s ) {
if ( s->wid == w ) {
- found = TRUE;
+ found = true;
d->list.take(); // take s
TQSplitterLayoutStruct *p = d->list.current();
if ( p ) { // the splitter handle after s
@@ -1284,7 +1284,7 @@ void TQSplitter::updateHandles()
TQTextStream& operator<<( TQTextStream& ts, const TQSplitter& splitter )
{
TQSplitterLayoutStruct *s = splitter.d->list.first();
- bool first = TRUE;
+ bool first = true;
ts << "[";
while ( s != 0 ) {
@@ -1299,7 +1299,7 @@ TQTextStream& operator<<( TQTextStream& ts, const TQSplitter& splitter )
} else {
ts << s->getSizer( splitter.orientation() );
}
- first = FALSE;
+ first = false;
}
s = splitter.d->list.next();
}
@@ -1352,7 +1352,7 @@ TQTextStream& operator>>( TQTextStream& ts, TQSplitter& splitter )
}
s->sizer = dim;
if ( dim == 0 )
- splitter.setGeo( s->wid, 0, 0, FALSE );
+ splitter.setGeo( s->wid, 0, 0, false );
}
SKIP_SPACES();
if ( line[i] == ',' ) {
diff --git a/src/widgets/tqsplitter.h b/src/widgets/tqsplitter.h
index bd8aef13e..cc2ac7d40 100644
--- a/src/widgets/tqsplitter.h
+++ b/src/widgets/tqsplitter.h
@@ -59,7 +59,7 @@ class TQSplitterPrivate
{
public:
TQSplitterPrivate()
- : opaque( FALSE ), firstShow( TRUE ), childrenCollapsible( TRUE ),
+ : opaque( false ), firstShow( true ), childrenCollapsible( true ),
handleWidth( 0 ) { }
TQPtrList<TQSplitterLayoutStruct> list;
@@ -109,13 +109,13 @@ public:
void setCollapsible( TQWidget *w, bool );
virtual void setResizeMode( TQWidget *w, ResizeMode );
- virtual void setOpaqueResize( bool = TRUE );
+ virtual void setOpaqueResize( bool = true );
bool opaqueResize() const;
void moveToFirst( TQWidget * );
void moveToLast( TQWidget * );
- void refresh() { recalc( TRUE ); }
+ void refresh() { recalc( true ); }
TQSize sizeHint() const;
TQSize minimumSizeHint() const;
@@ -145,7 +145,7 @@ public: //private:
enum { DefaultResizeMode = 3 };
void init();
- void recalc( bool update = FALSE );
+ void recalc( bool update = false );
void doResize();
void storeSizes();
void getRange( int id, int *, int *, int *, int * );
@@ -154,7 +154,7 @@ public: //private:
bool collapsible( TQSplitterLayoutStruct * );
void processChildEvents();
TQSplitterLayoutStruct *findWidget( TQWidget * );
- TQSplitterLayoutStruct *addWidget( TQWidget *, bool prepend = FALSE );
+ TQSplitterLayoutStruct *addWidget( TQWidget *, bool prepend = false );
void recalcId();
void doMove( bool backwards, int pos, int id, int delta, bool upLeft,
bool mayCollapse );
diff --git a/src/widgets/tqstatusbar.cpp b/src/widgets/tqstatusbar.cpp
index 07d071b47..1fdab1f4c 100644
--- a/src/widgets/tqstatusbar.cpp
+++ b/src/widgets/tqstatusbar.cpp
@@ -99,7 +99,7 @@
\endcode
By default TQStatusBar provides a TQSizeGrip in the lower-right
- corner. You can disable it with setSizeGripEnabled(FALSE);
+ corner. You can disable it with setSizeGripEnabled(false);
<img src=tqstatusbar-m.png> <img src=tqstatusbar-w.png>
@@ -145,13 +145,13 @@ TQStatusBar::TQStatusBar( TQWidget * parent, const char *name )
: TQWidget( parent, name )
{
d = new TQStatusBarPrivate;
- d->items.setAutoDelete( TRUE );
+ d->items.setAutoDelete( true );
d->box = 0;
d->timer = 0;
#ifndef TQT_NO_SIZEGRIP
d->resizer = 0;
- setSizeGripEnabled(TRUE); // causes reformat()
+ setSizeGripEnabled(true); // causes reformat()
#else
reformat();
#endif
@@ -173,12 +173,12 @@ TQStatusBar::~TQStatusBar()
Adds \a widget to this status bar. \a widget is reparented if it
isn't already a child of the TQStatusBar.
- \a widget is permanently visible if \a permanent is TRUE and may
- be obscured by temporary messages if \a permanent is FALSE. The
- default is FALSE.
+ \a widget is permanently visible if \a permanent is true and may
+ be obscured by temporary messages if \a permanent is false. The
+ default is false.
- If \a permanent is TRUE, \a widget is located at the far right of
- the status bar. If \a permanent is FALSE (the default), \a widget
+ If \a permanent is true, \a widget is located at the far right of
+ the status bar. If \a permanent is false (the default), \a widget
is located just to the left of the first permanent widget.
\a stretch is used to compute a suitable size for \a widget as the
@@ -200,7 +200,7 @@ void TQStatusBar::addWidget( TQWidget * widget, int stretch, bool permanent )
}
if ( widget->parentWidget() != this )
- widget->reparent( this, TQPoint(0, 0), TRUE );
+ widget->reparent( this, TQPoint(0, 0), true );
TQStatusBarPrivate::SBItem* item
= new TQStatusBarPrivate::SBItem( widget, stretch, permanent );
@@ -232,12 +232,12 @@ void TQStatusBar::removeWidget( TQWidget* widget )
{
if ( !widget )
return;
- bool found = FALSE;
+ bool found = false;
TQStatusBarPrivate::SBItem* item = d->items.first();
while ( item && !found ) {
if ( item->w == widget ) {
d->items.remove();
- found = TRUE;
+ found = true;
}
item = d->items.next();
}
@@ -261,7 +261,7 @@ void TQStatusBar::removeWidget( TQWidget* widget )
bool TQStatusBar::isSizeGripEnabled() const
{
#ifdef TQT_NO_SIZEGRIP
- return FALSE;
+ return false;
#else
return !!d->resizer;
#endif
diff --git a/src/widgets/tqstatusbar.h b/src/widgets/tqstatusbar.h
index b4c84ea17..1a0b52280 100644
--- a/src/widgets/tqstatusbar.h
+++ b/src/widgets/tqstatusbar.h
@@ -60,7 +60,7 @@ public:
TQStatusBar( TQWidget* parent=0, const char* name=0 );
virtual ~TQStatusBar();
- virtual void addWidget( TQWidget *, int stretch = 0, bool = FALSE );
+ virtual void addWidget( TQWidget *, int stretch = 0, bool = false );
virtual void removeWidget( TQWidget * );
void setSizeGripEnabled(bool);
diff --git a/src/widgets/tqsyntaxhighlighter.cpp b/src/widgets/tqsyntaxhighlighter.cpp
index f124b7ce2..428be11ef 100644
--- a/src/widgets/tqsyntaxhighlighter.cpp
+++ b/src/widgets/tqsyntaxhighlighter.cpp
@@ -200,10 +200,10 @@ void TQSyntaxHighlighter::rehighlight()
while ( s ) {
s->invalidate( 0 );
s->state = -1;
- s->needPreProcess = TRUE;
+ s->needPreProcess = true;
s = s->next();
}
- edit->repaintContents( FALSE );
+ edit->repaintContents( false );
}
/*!
diff --git a/src/widgets/tqsyntaxhighlighter_p.h b/src/widgets/tqsyntaxhighlighter_p.h
index c72094f92..4a732667a 100644
--- a/src/widgets/tqsyntaxhighlighter_p.h
+++ b/src/widgets/tqsyntaxhighlighter_p.h
@@ -61,7 +61,7 @@ public:
TQSyntaxHighlighterInternal( TQSyntaxHighlighter *h ) : highlighter( h ) {}
void process( TQTextDocument *doc, TQTextParagraph *p, int, bool invalidate ) {
if ( p->prev() && p->prev()->endState() == -1 )
- process( doc, p->prev(), 0, FALSE );
+ process( doc, p->prev(), 0, false );
highlighter->para = p;
TQString text = p->string()->toString();
@@ -72,7 +72,7 @@ public:
highlighter->d->currentParagraph = -1;
highlighter->para = 0;
- p->setFirstPreProcess( FALSE );
+ p->setFirstPreProcess( false );
TQTextParagraph *op = p;
p = p->next();
if ( (!!oldEndState || !!op->endState()) && oldEndState != op->endState() &&
diff --git a/src/widgets/tqtabbar.cpp b/src/widgets/tqtabbar.cpp
index 0d3ea9c70..4d3bacbae 100644
--- a/src/widgets/tqtabbar.cpp
+++ b/src/widgets/tqtabbar.cpp
@@ -74,7 +74,7 @@
*/
TQTab::TQTab()
- : enabled( TRUE ),
+ : enabled( true ),
id ( 0 ),
iconset( 0 ),
tb( 0 )
@@ -87,7 +87,7 @@ TQTab::TQTab()
TQTab::TQTab( const TQString &text )
: label( text ),
- enabled( TRUE ),
+ enabled( true ),
id( 0 ),
iconset( 0 ),
tb( 0 )
@@ -100,7 +100,7 @@ TQTab::TQTab( const TQString &text )
TQTab::TQTab( const TQIconSet& icon, const TQString& text )
: label( text ),
- enabled( TRUE ),
+ enabled( true ),
id( 0 ),
iconset( new TQIconSet(icon) ),
tb( 0 )
@@ -134,13 +134,13 @@ TQTab::TQTab( const TQIconSet& icon, const TQString& text )
/*!
\fn void TQTab::setEnabled( bool enable )
- If \a enable is TRUE enable the TQTab, otherwise disable it.
+ If \a enable is true enable the TQTab, otherwise disable it.
*/
/*!
\fn bool TQTab::isEnabled() const
- Returns TRUE if the TQTab is enabled; otherwise returns FALSE.
+ Returns true if the TQTab is enabled; otherwise returns false.
*/
/*!
@@ -348,7 +348,7 @@ TQTabBar::TQTabBar( TQWidget * parent, const char *name )
connect( d->a, TQ_SIGNAL(activatedAmbiguously(int)), this, TQ_SLOT(setCurrentTab(int)) );
#endif
d->s = RoundedAbove;
- d->scrolls = FALSE;
+ d->scrolls = false;
d->leftB = new TQToolButton( LeftArrow, this, "qt_left_btn" );
connect( d->leftB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( scrollTabs() ) );
d->leftB->hide();
@@ -358,7 +358,7 @@ TQTabBar::TQTabBar( TQWidget * parent, const char *name )
d->btnWidth = style().pixelMetric(TQStyle::PM_TabBarScrollButtonWidth, this);
l = new TQPtrList<TQTab>;
lstatic = new TQPtrList<TQTab>;
- lstatic->setAutoDelete( TRUE );
+ lstatic->setAutoDelete( true );
setFocusPolicy( TabFocus );
setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) );
}
@@ -475,9 +475,9 @@ void TQTabBar::removeTab( TQTab * t )
/*!
- Enables tab \a id if \a enabled is TRUE or disables it if \a
- enabled is FALSE. If \a id is currently selected,
- setTabEnabled(FALSE) makes another tab selected.
+ Enables tab \a id if \a enabled is true or disables it if \a
+ enabled is false. If \a id is currently selected,
+ setTabEnabled(false) makes another tab selected.
setTabEnabled() updates the display if this causes a change in \a
id's status.
@@ -519,7 +519,7 @@ void TQTabBar::setTabEnabled( int id, bool enabled )
emit selected( t->id );
}
}
- repaint( r, FALSE );
+ repaint( r, false );
}
return;
}
@@ -528,8 +528,8 @@ void TQTabBar::setTabEnabled( int id, bool enabled )
/*!
- Returns TRUE if the tab with id \a id exists and is enabled;
- otherwise returns FALSE.
+ Returns true if the tab with id \a id exists and is enabled;
+ otherwise returns false.
\sa setTabEnabled()
*/
@@ -539,7 +539,7 @@ bool TQTabBar::isTabEnabled( int id ) const
TQTab * t = tab( id );
if ( t )
return t->enabled;
- return FALSE;
+ return false;
}
@@ -572,7 +572,7 @@ TQSize TQTabBar::minimumSizeHint() const
/*!
Paints the tab \a t using painter \a p. If and only if \a selected
- is TRUE, \a t is drawn currently selected.
+ is true, \a t is drawn currently selected.
This virtual function may be reimplemented to change the look of
TQTabBar. If you decide to reimplement it, you may also need to
@@ -628,7 +628,7 @@ void TQTabBar::paint( TQPainter * p, TQTab * t, bool selected ) const
/*!
Paints the label of tab \a t centered in rectangle \a br using
- painter \a p. A focus indication is drawn if \a has_focus is TRUE.
+ painter \a p. A focus indication is drawn if \a has_focus is true.
*/
void TQTabBar::paintLabel( TQPainter* p, const TQRect& br,
@@ -741,7 +741,7 @@ void TQTabBar::paintEvent( TQPaintEvent * e )
TQTab * TQTabBar::selectTab( const TQPoint & p ) const
{
TQTab * selected = 0;
- bool moreThanOne = FALSE;
+ bool moreThanOne = false;
TQPtrListIterator<TQTab> i( *l );
while( i.current() ) {
@@ -750,7 +750,7 @@ TQTab * TQTabBar::selectTab( const TQPoint & p ) const
if ( t && t->r.contains( p ) ) {
if ( selected )
- moreThanOne = TRUE;
+ moreThanOne = true;
else
selected = t;
}
@@ -775,7 +775,7 @@ void TQTabBar::mousePressEvent( TQMouseEvent * e )
if(e->type() == style().styleHint( TQStyle::SH_TabBar_SelectMouseType, this ))
setCurrentTab( t );
else
- repaint(t->rect(), FALSE);
+ repaint(t->rect(), false);
}
}
@@ -808,12 +808,12 @@ void TQTabBar::mouseMoveEvent ( TQMouseEvent *e )
if(t != d->pressed) {
if (d->pressed) {
if (!forceRepaint) {
- repaint(d->pressed->rect(), FALSE);
+ repaint(d->pressed->rect(), false);
}
}
if ((d->pressed = t)) {
if (!forceRepaint) {
- repaint(t->rect(), FALSE);
+ repaint(t->rect(), false);
}
}
}
@@ -915,16 +915,16 @@ void TQTabBar::setCurrentTab( TQTab * tab )
d->focus = tab->id;
- setMicroFocusHint( tab->rect().x(), tab->rect().y(), tab->rect().width(), tab->rect().height(), FALSE );
+ setMicroFocusHint( tab->rect().x(), tab->rect().y(), tab->rect().width(), tab->rect().height(), false );
if ( tab->r.intersects( r ) ) {
- repaint( r.unite( tab->r ), FALSE );
+ repaint( r.unite( tab->r ), false );
} else {
#ifdef TQ_WS_MACX
update();
#else
- repaint( r, FALSE );
- repaint( tab->r, FALSE );
+ repaint( r, false );
+ repaint( tab->r, false );
#endif
}
makeVisible( tab );
@@ -1219,7 +1219,7 @@ void TQTabBar::focusInEvent( TQFocusEvent * )
{
TQTab *t = tab( d->focus );
if ( t )
- repaint( t->r, FALSE );
+ repaint( t->r, false );
}
/*!
@@ -1229,7 +1229,7 @@ void TQTabBar::focusOutEvent( TQFocusEvent * )
{
TQTab *t = tab( d->focus );
if ( t )
- repaint( t->r, FALSE );
+ repaint( t->r, false );
}
/*!
@@ -1271,7 +1271,7 @@ void TQTabBar::makeVisible( TQTab* tab )
return;
bool bs = signalsBlocked();
- blockSignals(TRUE);
+ blockSignals(true);
layoutTabs();
blockSignals(bs);
@@ -1293,9 +1293,9 @@ void TQTabBar::makeVisible( TQTab* tab )
// Make sure disabled buttons pop up again
if ( !d->leftB->isEnabled() && d->leftB->isDown() )
- d->leftB->setDown( FALSE );
+ d->leftB->setDown( false );
if ( !d->rightB->isEnabled() && d->rightB->isDown() )
- d->rightB->setDown( FALSE );
+ d->rightB->setDown( false );
update();
emit layoutChanged();
@@ -1304,7 +1304,7 @@ void TQTabBar::makeVisible( TQTab* tab )
void TQTabBar::updateArrowButtons()
{
if (lstatic->isEmpty()) {
- d->scrolls = FALSE;
+ d->scrolls = false;
} else {
d->scrolls = (lstatic->last()->r.right() - lstatic->first()->r.left() > width());
}
@@ -1385,7 +1385,7 @@ void TQTab::setText( const TQString& text )
tb->d->a->insertItem( p, id );
#endif
tb->layoutTabs();
- tb->repaint(FALSE);
+ tb->repaint(false);
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( tb, tb->indexOf(id)+1, TQAccessible::NameChanged );
diff --git a/src/widgets/tqtabwidget.cpp b/src/widgets/tqtabwidget.cpp
index ea294e76a..15383cbdf 100644
--- a/src/widgets/tqtabwidget.cpp
+++ b/src/widgets/tqtabwidget.cpp
@@ -203,7 +203,7 @@ class TQTabWidgetData
{
public:
TQTabWidgetData()
- : tabs(0), tabBase(0), stack(0), dirty( TRUE ),
+ : tabs(0), tabBase(0), stack(0), dirty( true ),
pos( TQTabWidget::Top ), shape( TQTabWidget::Rounded ),
leftCornerWidget(0), rightCornerWidget(0) {};
~TQTabWidgetData(){};
@@ -373,7 +373,7 @@ void TQTabWidget::insertTab( TQWidget *child, const TQIconSet& iconset, const TQ
*/
void TQTabWidget::insertTab( TQWidget *child, TQTab* tab, int index)
{
- tab->enabled = TRUE;
+ tab->enabled = true;
int id = d->tabs->insertTab( tab, index );
d->stack->addWidget( child, id );
if ( d->stack->frameStyle() != ( TQFrame::TabWidgetPanel | TQFrame::Raised ) )
@@ -428,7 +428,7 @@ void TQTabWidget::changeTab( TQWidget *w, const TQIconSet& iconset, const TQStri
}
/*!
- Returns TRUE if the page \a w is enabled; otherwise returns FALSE.
+ Returns true if the page \a w is enabled; otherwise returns false.
\sa setTabEnabled(), TQWidget::isEnabled()
*/
@@ -439,11 +439,11 @@ bool TQTabWidget::isTabEnabled( TQWidget* w ) const
if ( id >= 0 )
return w->isEnabled();
else
- return FALSE;
+ return false;
}
/*!
- If \a enable is TRUE, page \a w is enabled; otherwise page \a w is
+ If \a enable is true, page \a w is enabled; otherwise page \a w is
disabled. The page's tab is redrawn appropriately.
TQTabWidget uses TQWidget::setEnabled() internally, rather than
@@ -527,7 +527,7 @@ void TQTabWidget::removePage( TQWidget * w )
int oldId = d->stack->id(currentPage());
bool fixCurrentTab = oldId == id;
//switches to the next enabled tab
- d->tabs->setTabEnabled( id, FALSE );
+ d->tabs->setTabEnabled( id, false );
//if no next enabled page we fix the current page
fixCurrentTab = fixCurrentTab && oldId == d->stack->id(currentPage());
@@ -632,7 +632,7 @@ void TQTabWidget::resizeEvent( TQResizeEvent *e )
void TQTabWidget::setTabBar( TQTabBar* tb)
{
if ( tb->parentWidget() != this )
- tb->reparent( this, TQPoint(0,0), TRUE );
+ tb->reparent( this, TQPoint(0,0), true );
delete d->tabs;
d->tabs = tb;
setFocusProxy( d->tabs );
@@ -675,7 +675,7 @@ void TQTabWidget::setUpLayout( bool onlyCheck )
return; // nothing to do
if ( !isVisible() ) {
- d->dirty = TRUE;
+ d->dirty = true;
return; // we'll do it later
}
@@ -737,7 +737,7 @@ void TQTabWidget::setUpLayout( bool onlyCheck )
d->stack->setGeometry( 0, stacky, width(), height() - (exth-overlap) -
t.height()+TQMAX(0, lw-2));
- d->dirty = FALSE;
+ d->dirty = false;
// move cornerwidgets
if ( d->leftCornerWidget ) {
@@ -770,7 +770,7 @@ TQSize TQTabWidget::sizeHint() const
rc = d->rightCornerWidget->sizeHint();
if ( !d->dirty ) {
TQTabWidget *that = (TQTabWidget*)this;
- that->setUpLayout( TRUE );
+ that->setUpLayout( true );
}
TQSize s( d->stack->sizeHint() );
TQSize t( d->tabs->sizeHint() );
@@ -800,7 +800,7 @@ TQSize TQTabWidget::minimumSizeHint() const
rc = d->rightCornerWidget->minimumSizeHint();
if ( !d->dirty ) {
TQTabWidget *that = (TQTabWidget*)this;
- that->setUpLayout( TRUE );
+ that->setUpLayout( true );
}
TQSize s( d->stack->minimumSizeHint() );
TQSize t( d->tabs->minimumSizeHint() );
@@ -942,7 +942,7 @@ bool TQTabWidget::eventFilter( TQObject *o, TQEvent * e)
{
if ( o == this ) {
if ( e->type() == TQEvent::LanguageChange || e->type() == TQEvent::LayoutHint ) {
- d->dirty = TRUE;
+ d->dirty = true;
setUpLayout();
updateGeometry();
} else if ( e->type() == TQEvent::KeyPress ) {
@@ -963,7 +963,7 @@ bool TQTabWidget::eventFilter( TQObject *o, TQEvent * e)
setCurrentPage( page );
if ( !tqApp->focusWidget() )
d->tabs->setFocus();
- return TRUE;
+ return true;
}
}
@@ -971,12 +971,12 @@ bool TQTabWidget::eventFilter( TQObject *o, TQEvent * e)
if ( e->type() == TQEvent::ChildRemoved
&& ( (TQChildEvent*)e )->child()->isWidgetType() ) {
removePage( (TQWidget*) ( (TQChildEvent*)e )->child() );
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::LayoutHint ) {
updateGeometry();
}
}
- return FALSE;
+ return false;
}
/*!
diff --git a/src/widgets/tqtabwidget.h b/src/widgets/tqtabwidget.h
index 7ab17b504..6a6a75b65 100644
--- a/src/widgets/tqtabwidget.h
+++ b/src/widgets/tqtabwidget.h
@@ -147,7 +147,7 @@ private slots:
private:
TQTabWidgetData *d;
- void setUpLayout( bool = FALSE );
+ void setUpLayout( bool = false );
friend class TQTabDialog;
private: // Disabled copy constructor and operator=
diff --git a/src/widgets/tqtextbrowser.cpp b/src/widgets/tqtextbrowser.cpp
index 584639c61..9ff64703e 100644
--- a/src/widgets/tqtextbrowser.cpp
+++ b/src/widgets/tqtextbrowser.cpp
@@ -116,7 +116,7 @@
class TQTextBrowserData
{
public:
- TQTextBrowserData():textOrSourceChanged(FALSE) {}
+ TQTextBrowserData():textOrSourceChanged(false) {}
TQValueStack<TQString> stack;
TQValueStack<TQString> forwardStack;
@@ -138,10 +138,10 @@ public:
TQTextBrowser::TQTextBrowser(TQWidget *parent, const char *name)
: TQTextEdit( parent, name )
{
- setReadOnly( TRUE );
+ setReadOnly( true );
d = new TQTextBrowserData;
- viewport()->setMouseTracking( TRUE );
+ viewport()->setMouseTracking( true );
}
/*!
@@ -231,7 +231,7 @@ void TQTextBrowser::setSource(const TQString& name)
if ( isVisible() )
tqApp->setOverrideCursor( waitCursor );
#endif
- d->textOrSourceChanged = TRUE;
+ d->textOrSourceChanged = true;
TQString source = name;
TQString mark;
int hash = name.find('#');
@@ -245,7 +245,7 @@ void TQTextBrowser::setSource(const TQString& name)
TQString url = mimeSourceFactory()->makeAbsolute( source, context() );
TQString txt;
- bool dosettext = FALSE;
+ bool dosettext = false;
if ( !source.isEmpty() && url != d->curmain ) {
const TQMimeSource* m =
@@ -270,7 +270,7 @@ void TQTextBrowser::setSource(const TQString& name)
}
d->curmain = url;
- dosettext = TRUE;
+ dosettext = true;
}
d->curmark = mark;
@@ -314,15 +314,15 @@ void TQTextBrowser::setSource(const TQString& name)
\fn void TQTextBrowser::backwardAvailable(bool available)
This signal is emitted when the availability of backward()
- changes. \a available is FALSE when the user is at home();
- otherwise it is TRUE.
+ changes. \a available is false when the user is at home();
+ otherwise it is true.
*/
/*!
\fn void TQTextBrowser::forwardAvailable(bool available)
This signal is emitted when the availability of forward() changes.
- \a available is TRUE after the user navigates backward() and FALSE
+ \a available is true after the user navigates backward() and false
when the user navigates or goes forward().
*/
@@ -380,7 +380,7 @@ void TQTextBrowser::backward()
return;
d->forwardStack.push( d->stack.pop() );
setSource( d->stack.pop() );
- emit forwardAvailable( TRUE );
+ emit forwardAvailable( true );
}
/*!
@@ -533,7 +533,7 @@ void TQTextBrowser::popupDetail( const TQString& contents, const TQPoint& pos )
void TQTextBrowser::setText( const TQString &txt, const TQString &context )
{
- d->textOrSourceChanged = TRUE;
+ d->textOrSourceChanged = true;
d->curmark = "";
d->curmain = "";
TQTextEdit::setText( txt, context );
@@ -546,7 +546,7 @@ void TQTextBrowser::emitHighlighted( const TQString &s )
void TQTextBrowser::emitLinkClicked( const TQString &s )
{
- d->textOrSourceChanged = FALSE;
+ d->textOrSourceChanged = false;
emit linkClicked( s );
if ( !d->textOrSourceChanged )
setSource( s );
diff --git a/src/widgets/tqtextbrowser.h b/src/widgets/tqtextbrowser.h
index 33648fee2..0c09e2e66 100644
--- a/src/widgets/tqtextbrowser.h
+++ b/src/widgets/tqtextbrowser.h
@@ -90,7 +90,7 @@ protected:
private:
void popupDetail( const TQString& contents, const TQPoint& pos );
- bool linksEnabled() const { return TRUE; }
+ bool linksEnabled() const { return true; }
void emitHighlighted( const TQString &s );
void emitLinkClicked( const TQString &s );
TQTextBrowserData *d;
diff --git a/src/widgets/tqtextedit.cpp b/src/widgets/tqtextedit.cpp
index 7ea000f21..75da02e01 100644
--- a/src/widgets/tqtextedit.cpp
+++ b/src/widgets/tqtextedit.cpp
@@ -97,13 +97,13 @@ class TQTextEditPrivate
{
public:
TQTextEditPrivate()
- :preeditStart(-1),preeditLength(-1),ensureCursorVisibleInShowEvent(FALSE),
- tabChangesFocus(FALSE),
+ :preeditStart(-1),preeditLength(-1),ensureCursorVisibleInShowEvent(false),
+ tabChangesFocus(false),
#ifndef TQT_NO_CLIPBOARD
clipboard_mode( TQClipboard::Clipboard ),
#endif
#ifdef QT_TEXTEDIT_OPTIMIZATION
- od(0), optimMode(FALSE),
+ od(0), optimMode(false),
maxLogLines(-1),
logOffset(0),
#endif
@@ -181,9 +181,9 @@ bool TQRichTextDrag::decode( TQMimeSource *e, TQString &str, const TQCString &mi
if ( qstrcmp( "application/x-qrichtext", mime ) != 0 )
continue;
str = TQString::fromUtf8( e->encodedData( mime ) );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
// do a regular text decode
@@ -194,7 +194,7 @@ bool TQRichTextDrag::decode( TQMimeSource *e, TQString &str, const TQCString &mi
bool TQRichTextDrag::canDecode( TQMimeSource* e )
{
if ( e->provides( "application/x-qrichtext" ) )
- return TRUE;
+ return true;
return TQTextDrag::canDecode( e );
}
@@ -209,7 +209,7 @@ const char* TQRichTextDrag::format( int i ) const
#endif
-static bool block_set_alignment = FALSE;
+static bool block_set_alignment = false;
/*!
\class TQTextEdit tqtextedit.h
@@ -241,7 +241,7 @@ static bool block_set_alignment = FALSE;
correctly display files that have margins set and that
include images). This mode is mostly useful for editing small
amounts of rich text. <sup>1.</sup>
- \row \i Text Viewer \i setReadOnly(TRUE)
+ \row \i Text Viewer \i setReadOnly(true)
\i Set text with setText() or append() (which has no undo
history so is faster and uses less memory); text() returns
plain or rich text depending on the textFormat(). This mode
@@ -350,7 +350,7 @@ static bool block_set_alignment = FALSE;
if ( file.open( IO_WriteOnly ) ) {
TQTextStream stream( &file );
stream << textEdit->text();
- textEdit->setModified( FALSE );
+ textEdit->setModified( false );
}
\endcode
@@ -460,7 +460,7 @@ static bool block_set_alignment = FALSE;
TQStyleSheetItem * item = new TQStyleSheetItem( log->styleSheet(), "mytag" );
item->setColor( "red" );
item->setFontWeight( TQFont::Bold );
- item->setFontUnderline( TRUE );
+ item->setFontUnderline( true );
log->append( "This is a <mytag>custom tag</mytag>!" );
\endcode
Note that only the color, bold, underline and italic attributes of
@@ -510,7 +510,7 @@ static bool block_set_alignment = FALSE;
If the text changes, the textChanged() signal is emitted, and if
the user inserts a new line by pressing Return or Enter,
returnPressed() is emitted. The isModified() function will return
- TRUE if the text has been modified.
+ true if the text has been modified.
TQTextEdit provides command-based undo and redo. To set the depth
of the command history use setUndoDepth() which defaults to 100
@@ -643,11 +643,11 @@ static bool block_set_alignment = FALSE;
text edit.
When text is selected this signal will be emitted with \a yes set
- to TRUE. If no text has been selected or if the selected text is
- de-selected this signal is emitted with \a yes set to FALSE.
+ to true. If no text has been selected or if the selected text is
+ de-selected this signal is emitted with \a yes set to false.
- If \a yes is TRUE then copy() can be used to copy the selection to
- the clipboard. If \a yes is FALSE then copy() does nothing.
+ If \a yes is true then copy() can be used to copy the selection to
+ the clipboard. If \a yes is false then copy() does nothing.
\sa selectionChanged()
*/
@@ -737,9 +737,9 @@ static bool block_set_alignment = FALSE;
\property TQTextEdit::overwriteMode
\brief the text edit's overwrite mode
- If FALSE (the default) characters entered by the user are inserted
+ If false (the default) characters entered by the user are inserted
with any characters to the right being moved out of the way. If
- TRUE, the editor is in overwrite mode, i.e. characters entered by
+ true, the editor is in overwrite mode, i.e. characters entered by
the user overwrite any characters to the right of the cursor
position.
*/
@@ -769,7 +769,7 @@ static bool block_set_alignment = FALSE;
\fn void TQTextEdit::undoAvailable( bool yes )
This signal is emitted when the availability of undo changes. If
- \a yes is TRUE, then undo() will work until undoAvailable( FALSE )
+ \a yes is true, then undo() will work until undoAvailable( false )
is next emitted.
\sa undo() undoDepth()
@@ -779,7 +779,7 @@ static bool block_set_alignment = FALSE;
\fn void TQTextEdit::modificationChanged( bool m )
This signal is emitted when the modification status of the
- document has changed. If \a m is TRUE, the document was modified,
+ document has changed. If \a m is true, the document was modified,
otherwise the modification state has been reset to unmodified.
\sa modified
@@ -789,7 +789,7 @@ static bool block_set_alignment = FALSE;
\fn void TQTextEdit::redoAvailable( bool yes )
This signal is emitted when the availability of redo changes. If
- \a yes is TRUE, then redo() will work until redoAvailable( FALSE )
+ \a yes is true, then redo() will work until redoAvailable( false )
is next emitted.
\sa redo() undoDepth()
@@ -951,24 +951,24 @@ void TQTextEdit::init()
{
d = new TQTextEditPrivate;
doc->formatCollection()->setPaintDevice( this );
- undoEnabled = TRUE;
- readOnly = TRUE;
- setReadOnly( FALSE );
+ undoEnabled = true;
+ readOnly = true;
+ setReadOnly( false );
setFrameStyle( LineEditPanel | Sunken );
connect( doc, TQ_SIGNAL( minimumWidthChanged(int) ),
this, TQ_SLOT( documentWidthChanged(int) ) );
- mousePressed = FALSE;
- inDoubleClick = FALSE;
- modified = FALSE;
+ mousePressed = false;
+ inDoubleClick = false;
+ modified = false;
onLink = TQString::null;
d->onName = TQString::null;
- overWrite = FALSE;
+ overWrite = false;
wrapMode = WidgetWidth;
wrapWidth = -1;
wPolicy = AtWhiteSpace;
- mightStartDrag = FALSE;
- inDnD = FALSE;
+ mightStartDrag = false;
+ inDnD = false;
doc->setFormatter( new TQTextFormatterBreakWords );
doc->formatCollection()->defaultFormat()->setFont( TQScrollView::font() );
doc->formatCollection()->defaultFormat()->setColor( colorGroup().color( TQColorGroup::Text ) );
@@ -977,12 +977,12 @@ void TQTextEdit::init()
setBackgroundMode( PaletteBase );
viewport()->setBackgroundMode( PaletteBase );
- viewport()->setAcceptDrops( TRUE );
+ viewport()->setAcceptDrops( true );
resizeContents( 0, doc->lastParagraph() ?
( doc->lastParagraph()->paragId() + 1 ) * doc->formatCollection()->defaultFormat()->height() : 0 );
- setKeyCompression( TRUE );
- viewport()->setMouseTracking( TRUE );
+ setKeyCompression( true );
+ viewport()->setMouseTracking( true );
#ifndef TQT_NO_CURSOR
viewport()->setCursor( isReadOnly() ? arrowCursor : ibeamCursor );
#endif
@@ -1002,7 +1002,7 @@ void TQTextEdit::init()
connect( changeIntervalTimer, TQ_SIGNAL( timeout() ),
this, TQ_SLOT( doChangeInterval() ) );
- cursorVisible = TRUE;
+ cursorVisible = true;
blinkTimer = new TQTimer( this );
connect( blinkTimer, TQ_SIGNAL( timeout() ),
this, TQ_SLOT( blinkCursor() ) );
@@ -1017,11 +1017,11 @@ void TQTextEdit::init()
formatMore();
- blinkCursorVisible = FALSE;
+ blinkCursorVisible = false;
viewport()->setFocusProxy( this );
viewport()->setFocusPolicy( WheelFocus );
- setInputMethodEnabled( TRUE );
+ setInputMethodEnabled( true );
viewport()->installEventFilter( this );
connect( this, TQ_SIGNAL(horizontalSliderReleased()), this, TQ_SLOT(sliderReleased()) );
connect( this, TQ_SIGNAL(verticalSliderReleased()), this, TQ_SLOT(sliderReleased()) );
@@ -1039,7 +1039,7 @@ void TQTextEdit::paintDocument( bool drawAll, TQPainter *p, int cx, int cy, int
bool drawCur = hasFocus() || viewport()->hasFocus();
if (( hasSelectedText() && !style().styleHint( TQStyle::SH_BlinkCursorWhenTextSelected ) ) ||
isReadOnly() || !cursorVisible || doc->hasSelection( TQTextDocument::IMSelectionText ))
- drawCur = FALSE;
+ drawCur = false;
TQColorGroup g = colorGroup();
const TQColorGroup::ColorRole backRole = TQPalette::backgroundRoleFromMode(backgroundMode());
if ( doc->paper() )
@@ -1078,7 +1078,7 @@ void TQTextEdit::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
return;
}
#endif
- paintDocument( TRUE, p, cx, cy, cw, ch );
+ paintDocument( true, p, cx, cy, cw, ch );
int v;
p->setPen( foregroundColor() );
if ( document()->isPageBreakEnabled() && ( v = document()->flow()->pageSize() ) > 0 ) {
@@ -1209,7 +1209,7 @@ bool TQTextEdit::event( TQEvent *e )
#endif
d->ensureCursorVisibleInShowEvent ) {
ensureCursorVisible();
- d->ensureCursorVisibleInShowEvent = FALSE;
+ d->ensureCursorVisibleInShowEvent = false;
}
if ( !d->scrollToAnchor.isEmpty() ) {
scrollToAnchor( d->scrollToAnchor );
@@ -1228,25 +1228,25 @@ void TQTextEdit::keyPressEvent( TQKeyEvent *e )
{
changeIntervalTimer->stop();
interval = 10;
- bool unknownKey = FALSE;
+ bool unknownKey = false;
if ( isReadOnly() ) {
if ( !handleReadOnlyKeyEvent( e ) )
TQScrollView::keyPressEvent( e );
- changeIntervalTimer->start( 100, TRUE );
+ changeIntervalTimer->start( 100, true );
return;
}
- bool selChanged = FALSE;
+ bool selChanged = false;
for ( int i = 1; i < doc->numSelections(); ++i ) // start with 1 as we don't want to remove the Standard-Selection
selChanged = doc->removeSelection( i ) || selChanged;
if ( selChanged ) {
- cursor->paragraph()->document()->nextDoubleBuffered = TRUE;
+ cursor->paragraph()->document()->nextDoubleBuffered = true;
repaintChanged();
}
- bool clearUndoRedoInfo = TRUE;
+ bool clearUndoRedoInfo = true;
switch ( e->key() ) {
@@ -1281,16 +1281,16 @@ void TQTextEdit::keyPressEvent( TQKeyEvent *e )
moveCursor( MovePgDown, e->state() & ShiftButton );
break;
case Key_Return: case Key_Enter:
- if ( doc->hasSelection( TQTextDocument::Standard, FALSE ) )
+ if ( doc->hasSelection( TQTextDocument::Standard, false ) )
removeSelectedText();
if ( textFormat() == TQt::RichText && ( e->state() & ControlButton ) ) {
// Ctrl-Enter inserts a line break in rich text mode
- insert( TQString( TQChar( 0x2028) ), TRUE, FALSE );
+ insert( TQString( TQChar( 0x2028) ), true, false );
} else {
#ifndef TQT_NO_CURSOR
viewport()->setCursor( isReadOnly() ? arrowCursor : ibeamCursor );
#endif
- clearUndoRedoInfo = FALSE;
+ clearUndoRedoInfo = false;
doKeyboardAction( ActionReturn );
emit returnPressed();
}
@@ -1302,13 +1302,13 @@ void TQTextEdit::keyPressEvent( TQKeyEvent *e )
break;
} else
#endif
- if ( doc->hasSelection( TQTextDocument::Standard, TRUE ) ) {
+ if ( doc->hasSelection( TQTextDocument::Standard, true ) ) {
removeSelectedText();
break;
}
doKeyboardAction( e->state() & ControlButton ? ActionWordDelete
: ActionDelete );
- clearUndoRedoInfo = FALSE;
+ clearUndoRedoInfo = false;
break;
case Key_Insert:
@@ -1335,14 +1335,14 @@ void TQTextEdit::keyPressEvent( TQKeyEvent *e )
}
} else
#endif
- if ( doc->hasSelection( TQTextDocument::Standard, TRUE ) ) {
+ if ( doc->hasSelection( TQTextDocument::Standard, true ) ) {
removeSelectedText();
break;
}
doKeyboardAction( e->state() & ControlButton ? ActionWordBackspace
: ActionBackspace );
- clearUndoRedoInfo = FALSE;
+ clearUndoRedoInfo = false;
break;
case Key_F16: // Copy key on Sun keyboards
copy();
@@ -1402,7 +1402,7 @@ void TQTextEdit::keyPressEvent( TQKeyEvent *e )
!( e->state() & MetaButton ) ) ||
( ( (e->state()&ControlButton) | AltButton ) == (ControlButton|AltButton) ) ) &&
( !e->ascii() || e->ascii() >= 32 || e->text() == "\t" ) ) {
- clearUndoRedoInfo = FALSE;
+ clearUndoRedoInfo = false;
if ( e->key() == Key_Tab ) {
if ( d->tabChangesFocus ) {
e->ignore();
@@ -1417,9 +1417,9 @@ void TQTextEdit::keyPressEvent( TQKeyEvent *e )
undoRedoInfo.styleInformation = TQTextStyleCommand::readStyleInformation( doc, undoRedoInfo.id, undoRedoInfo.eid );
cursor->paragraph()->setListDepth( cursor->paragraph()->listDepth() +1 );
clearUndoRedo();
- drawCursor( FALSE );
+ drawCursor( false );
repaintChanged();
- drawCursor( TRUE );
+ drawCursor( true );
break;
}
} else if ( e->key() == Key_BackTab ) {
@@ -1440,14 +1440,14 @@ void TQTextEdit::keyPressEvent( TQKeyEvent *e )
undoRedoInfo.styleInformation = TQTextStyleCommand::readStyleInformation( doc, undoRedoInfo.id, undoRedoInfo.eid );
setParagType( TQStyleSheetItem::DisplayListItem, TQStyleSheetItem::ListDisc );
clearUndoRedo();
- drawCursor( FALSE );
+ drawCursor( false );
repaintChanged();
- drawCursor( TRUE );
+ drawCursor( true );
break;
}
if (overWrite && !cursor->atParagEnd() && !doc->hasSelection(TQTextDocument::Standard)) {
doKeyboardAction(ActionDelete);
- clearUndoRedoInfo = FALSE;
+ clearUndoRedoInfo = false;
}
TQString t = e->text();
#ifdef TQ_WS_X11
@@ -1468,7 +1468,7 @@ void TQTextEdit::keyPressEvent( TQKeyEvent *e )
}
}
#endif
- insert( t, TRUE, FALSE );
+ insert( t, true, false );
break;
} else if ( e->state() & ControlButton ) {
switch ( e->key() ) {
@@ -1489,7 +1489,7 @@ void TQTextEdit::keyPressEvent( TQKeyEvent *e )
#if defined(TQ_WS_X11)
moveCursor( MoveLineStart, e->state() & ShiftButton );
#else
- selectAll( TRUE );
+ selectAll( true );
#endif
break;
case Key_B:
@@ -1504,7 +1504,7 @@ void TQTextEdit::keyPressEvent( TQKeyEvent *e )
break;
}
doKeyboardAction( ActionDelete );
- clearUndoRedoInfo = FALSE;
+ clearUndoRedoInfo = false;
break;
case Key_H:
if ( doc->hasSelection( TQTextDocument::Standard ) ) {
@@ -1516,7 +1516,7 @@ void TQTextEdit::keyPressEvent( TQKeyEvent *e )
break;
doKeyboardAction( ActionBackspace );
- clearUndoRedoInfo = FALSE;
+ clearUndoRedoInfo = false;
break;
case Key_E:
moveCursor( MoveLineEnd, e->state() & ShiftButton );
@@ -1548,11 +1548,11 @@ void TQTextEdit::keyPressEvent( TQKeyEvent *e )
break;
#endif
default:
- unknownKey = FALSE;
+ unknownKey = false;
break;
}
} else {
- unknownKey = TRUE;
+ unknownKey = true;
}
}
}
@@ -1561,7 +1561,7 @@ void TQTextEdit::keyPressEvent( TQKeyEvent *e )
emit cursorPositionChanged( cursor->paragraph()->paragId(), cursor->index() );
if ( clearUndoRedoInfo )
clearUndoRedo();
- changeIntervalTimer->start( 100, TRUE );
+ changeIntervalTimer->start( 100, true );
if ( unknownKey )
e->ignore();
}
@@ -1576,7 +1576,7 @@ bool TQTextEdit::sendMouseEventToInputContext( TQMouseEvent *e )
#ifndef TQT_NO_IM
if ( d->composeMode() ) {
TQTextCursor c( doc );
- if ( c.place( e->pos(), doc->firstParagraph(), FALSE, FALSE, FALSE ) ) {
+ if ( c.place( e->pos(), doc->firstParagraph(), false, false, false ) ) {
int mousePos = c.index() - d->preeditStart;
if ( cursor->globalY() == c.globalY() &&
mousePos >= 0 && mousePos < d->preeditLength ) {
@@ -1588,10 +1588,10 @@ bool TQTextEdit::sendMouseEventToInputContext( TQMouseEvent *e )
TQWidget::sendMouseEventToInputContext( -1, e->type(),
e->button(), e->state() );
}
- return TRUE;
+ return true;
}
#endif
- return FALSE;
+ return false;
}
@@ -1689,7 +1689,7 @@ void TQTextEdit::imEndEvent( TQIMEvent *e )
if ( d->preeditStart >= 0 ) {
cursor->setIndex( d->preeditStart );
//TODO: TQt 4 we should use the new virtual insert function
- insert( e->text(), FALSE );
+ insert( e->text(), false );
}
d->preeditStart = d->preeditLength = -1;
@@ -1697,7 +1697,7 @@ void TQTextEdit::imEndEvent( TQIMEvent *e )
}
-static bool tqtextedit_ignore_readonly = FALSE;
+static bool tqtextedit_ignore_readonly = false;
/*!
Executes keyboard action \a action. This is normally called by a
@@ -1713,8 +1713,8 @@ void TQTextEdit::doKeyboardAction( KeyboardAction action )
return;
lastFormatted = cursor->paragraph();
- drawCursor( FALSE );
- bool doUpdateCurrentFormat = TRUE;
+ drawCursor( false );
+ bool doUpdateCurrentFormat = true;
switch ( action ) {
case ActionWordDelete:
@@ -1729,7 +1729,7 @@ void TQTextEdit::doKeyboardAction( KeyboardAction action )
}
int idx = cursor->index();
do {
- undoRedoInfo.d->text.insert( undoRedoInfo.d->text.length(), cursor->paragraph()->at( idx++ ), TRUE );
+ undoRedoInfo.d->text.insert( undoRedoInfo.d->text.length(), cursor->paragraph()->at( idx++ ), true );
} while ( !cursor->paragraph()->string()->validCursorPosition( idx ) );
}
cursor->remove();
@@ -1760,9 +1760,9 @@ void TQTextEdit::doKeyboardAction( KeyboardAction action )
}
int ldepth = cursor->paragraph()->listDepth();
if ( cursor->paragraph()->isListItem() && ldepth == 1 ) {
- cursor->paragraph()->setListItem( FALSE );
+ cursor->paragraph()->setListItem( false );
} else if ( TQMAX( ldepth, 1 ) == 1 ) {
- cursor->paragraph()->setListItem( FALSE );
+ cursor->paragraph()->setListItem( false );
cursor->paragraph()->setListDepth( 0 );
} else {
cursor->paragraph()->setListDepth( ldepth - 1 );
@@ -1770,7 +1770,7 @@ void TQTextEdit::doKeyboardAction( KeyboardAction action )
clearUndoRedo();
lastFormatted = cursor->paragraph();
repaintChanged();
- drawCursor( TRUE );
+ drawCursor( true );
return;
}
@@ -1787,13 +1787,13 @@ void TQTextEdit::doKeyboardAction( KeyboardAction action )
if (para->at(cur_idx - 1)->c.isLowSurrogate() && cur_idx > 1 &&
para->at(cur_idx - 2)->c.isHighSurrogate())
{
- undoRedoInfo.d->text.insert( 0, para->at(cur_idx - 1), TRUE );
- undoRedoInfo.d->text.insert( 0, para->at(cur_idx - 2), TRUE );
+ undoRedoInfo.d->text.insert( 0, para->at(cur_idx - 1), true );
+ undoRedoInfo.d->text.insert( 0, para->at(cur_idx - 2), true );
undoRedoInfo.index = cursor->index() - 2;
}
else
{
- undoRedoInfo.d->text.insert( 0, para->at(cur_idx - 1), TRUE );
+ undoRedoInfo.d->text.insert( 0, para->at(cur_idx - 1), true );
undoRedoInfo.index = cursor->index() - 1;
}
}
@@ -1828,7 +1828,7 @@ void TQTextEdit::doKeyboardAction( KeyboardAction action )
lastFormatted = cursor->paragraph()->prev();
lastFormatted->invalidate( 0 );
}
- doUpdateCurrentFormat = FALSE;
+ doUpdateCurrentFormat = false;
break;
case ActionKill:
clearUndoRedo();
@@ -1845,7 +1845,7 @@ void TQTextEdit::doKeyboardAction( KeyboardAction action )
formatMore();
repaintChanged();
ensureCursorVisible();
- drawCursor( TRUE );
+ drawCursor( true );
updateMicroFocusHint();
if ( doUpdateCurrentFormat )
updateCurrentFormat();
@@ -1863,7 +1863,7 @@ void TQTextEdit::readFormats( TQTextCursor &c1, TQTextCursor &c2, TQTextString &
int lastIndex = text.length();
if ( c1.paragraph() == c2.paragraph() ) {
for ( int i = c1.index(); i < c2.index(); ++i )
- text.insert( lastIndex + i - c1.index(), c1.paragraph()->at( i ), TRUE );
+ text.insert( lastIndex + i - c1.index(), c1.paragraph()->at( i ), true );
#ifndef TQT_NO_DATASTREAM
if ( fillStyles ) {
styleStream << (int) 1;
@@ -1873,7 +1873,7 @@ void TQTextEdit::readFormats( TQTextCursor &c1, TQTextCursor &c2, TQTextString &
} else {
int i;
for ( i = c1.index(); i < c1.paragraph()->length()-1; ++i )
- text.insert( lastIndex++, c1.paragraph()->at( i ), TRUE );
+ text.insert( lastIndex++, c1.paragraph()->at( i ), true );
int num = 2; // start and end, being different
text += "\n"; lastIndex++;
@@ -1883,7 +1883,7 @@ void TQTextEdit::readFormats( TQTextCursor &c1, TQTextCursor &c2, TQTextString &
}
for ( i = 0; i < c2.index(); ++i )
- text.insert( i + lastIndex, c2.paragraph()->at( i ), TRUE );
+ text.insert( i + lastIndex, c2.paragraph()->at( i ), true );
#ifndef TQT_NO_DATASTREAM
if ( fillStyles ) {
styleStream << num;
@@ -1934,14 +1934,14 @@ void TQTextEdit::removeSelectedText( int selNum )
doc->removeSelection( i );
}
- drawCursor( FALSE );
+ drawCursor( false );
if ( undoEnabled ) {
checkUndoRedoInfo( UndoRedoInfo::RemoveSelected );
if ( !undoRedoInfo.valid() ) {
doc->selectionStart( selNum, undoRedoInfo.id, undoRedoInfo.index );
undoRedoInfo.d->text = TQString::null;
}
- readFormats( c1, c2, undoRedoInfo.d->text, TRUE );
+ readFormats( c1, c2, undoRedoInfo.d->text, true );
}
doc->removeSelectedText( selNum, cursor );
@@ -1950,15 +1950,15 @@ void TQTextEdit::removeSelectedText( int selNum )
ensureCursorVisible();
lastFormatted = cursor->paragraph();
formatMore();
- repaintContents( FALSE );
+ repaintContents( false );
ensureCursorVisible();
- drawCursor( TRUE );
+ drawCursor( true );
clearUndoRedo();
#if defined(TQ_WS_WIN)
// there seems to be a problem with repainting or erasing the area
// of the scrollview which is not the contents on windows
if ( contentsHeight() < visibleHeight() )
- viewport()->repaint( 0, contentsHeight(), visibleWidth(), visibleHeight() - contentsHeight(), TRUE );
+ viewport()->repaint( 0, contentsHeight(), visibleWidth(), visibleHeight() - contentsHeight(), true );
#endif
#ifndef TQT_NO_CURSOR
viewport()->setCursor( isReadOnly() ? arrowCursor : ibeamCursor );
@@ -1967,8 +1967,8 @@ void TQTextEdit::removeSelectedText( int selNum )
} else {
delete cursor;
cursor = new TQTextCursor( doc );
- drawCursor( TRUE );
- repaintContents( TRUE );
+ drawCursor( true );
+ repaintContents( true );
}
setModified();
emit textChanged();
@@ -1993,7 +1993,7 @@ void TQTextEdit::moveCursor( CursorAction action, bool select )
TQTextCursor c1 = *cursor;
TQTextCursor c2;
#endif
- drawCursor( FALSE );
+ drawCursor( false );
if ( select ) {
if ( !doc->hasSelection( TQTextDocument::Standard ) )
doc->setSelectionStart( TQTextDocument::Standard, *cursor );
@@ -2007,10 +2007,10 @@ void TQTextEdit::moveCursor( CursorAction action, bool select )
moveCursor( MoveHome );
#endif
if ( doc->setSelectionEnd( TQTextDocument::Standard, *cursor ) ) {
- cursor->paragraph()->document()->nextDoubleBuffered = TRUE;
+ cursor->paragraph()->document()->nextDoubleBuffered = true;
repaintChanged();
} else {
- drawCursor( TRUE );
+ drawCursor( true );
}
ensureCursorVisible();
emit selectionChanged();
@@ -2042,12 +2042,12 @@ void TQTextEdit::moveCursor( CursorAction action, bool select )
#endif
if ( !redraw ) {
ensureCursorVisible();
- drawCursor( TRUE );
+ drawCursor( true );
} else {
- cursor->paragraph()->document()->nextDoubleBuffered = TRUE;
+ cursor->paragraph()->document()->nextDoubleBuffered = true;
repaintChanged();
ensureCursorVisible();
- drawCursor( TRUE );
+ drawCursor( true );
#ifndef TQT_NO_CURSOR
viewport()->setCursor( isReadOnly() ? arrowCursor : ibeamCursor );
#endif
@@ -2058,7 +2058,7 @@ void TQTextEdit::moveCursor( CursorAction action, bool select )
}
}
- drawCursor( TRUE );
+ drawCursor( true );
updateCurrentFormat();
updateMicroFocusHint();
}
@@ -2151,7 +2151,7 @@ void TQTextEdit::ensureCursorVisible()
{
// Not visible or the user is draging the window, so don't position to caret yet
if ( !isUpdatesEnabled() || !isVisible() || isHorizontalSliderPressed() || isVerticalSliderPressed() ) {
- d->ensureCursorVisibleInShowEvent = TRUE;
+ d->ensureCursorVisibleInShowEvent = true;
return;
}
sync();
@@ -2171,7 +2171,7 @@ void TQTextEdit::ensureCursorVisible()
void TQTextEdit::sliderReleased()
{
if ( d->ensureCursorVisibleInShowEvent && isVisible() ) {
- d->ensureCursorVisibleInShowEvent = FALSE;
+ d->ensureCursorVisibleInShowEvent = false;
ensureCursorVisible();
}
}
@@ -2186,7 +2186,7 @@ void TQTextEdit::drawCursor( bool visible )
!cursor->paragraph() ||
!cursor->paragraph()->isValid() ||
( !style().styleHint( TQStyle::SH_BlinkCursorWhenTextSelected ) &&
- ( d->optimMode ? optimHasSelection() : doc->hasSelection( TQTextDocument::Standard, TRUE ))) ||
+ ( d->optimMode ? optimHasSelection() : doc->hasSelection( TQTextDocument::Standard, true ))) ||
( visible && !hasFocus() && !viewport()->hasFocus() && !inDnD ) ||
doc->hasSelection( TQTextDocument::IMSelectionText ) ||
isReadOnly() )
@@ -2196,12 +2196,12 @@ void TQTextEdit::drawCursor( bool visible )
// selection phase of input method, so ordinary cursor should be
// invisible if IM selection text exists.
if ( doc->hasSelection( TQTextDocument::IMSelectionText ) ) {
- visible = FALSE;
+ visible = false;
}
TQPainter p( viewport() );
TQRect r( cursor->topParagraph()->rect() );
- cursor->paragraph()->setChanged( TRUE );
+ cursor->paragraph()->setChanged( true );
p.translate( -contentsX() + cursor->totalOffsetX(), -contentsY() + cursor->totalOffsetY() );
TQPixmap *pix = 0;
TQColorGroup cg( colorGroup() );
@@ -2211,7 +2211,7 @@ void TQTextEdit::drawCursor( bool visible )
else if ( doc->paper() )
cg.setBrush( backRole, *doc->paper() );
p.setBrushOrigin( -contentsX(), -contentsY() );
- cursor->paragraph()->document()->nextDoubleBuffered = TRUE;
+ cursor->paragraph()->document()->nextDoubleBuffered = true;
if ( !cursor->nestedDepth() ) {
int h = cursor->paragraph()->lineHeightOfChar( cursor->index() );
int dist = 5;
@@ -2287,7 +2287,7 @@ void TQTextEdit::contentsMousePressEvent( TQMouseEvent *e )
doc->setSelectionEnd( TQTextDocument::Standard, c2 );
*cursor = c2;
repaintChanged();
- mousePressed = TRUE;
+ mousePressed = true;
return;
}
@@ -2295,19 +2295,19 @@ void TQTextEdit::contentsMousePressEvent( TQMouseEvent *e )
TQTextCursor oldCursor = *cursor;
TQTextCursor c = *cursor;
mousePos = e->pos();
- mightStartDrag = FALSE;
+ mightStartDrag = false;
pressedLink = TQString::null;
d->pressedName = TQString::null;
if ( e->button() == LeftButton ) {
- mousePressed = TRUE;
- drawCursor( FALSE );
+ mousePressed = true;
+ drawCursor( false );
placeCursor( e->pos() );
ensureCursorVisible();
if ( isReadOnly() && linksEnabled() ) {
TQTextCursor c = *cursor;
- placeCursor( e->pos(), &c, TRUE );
+ placeCursor( e->pos(), &c, true );
if ( c.paragraph() && c.paragraph()->at( c.index() ) &&
c.paragraph()->at( c.index() )->isAnchor() ) {
pressedLink = c.paragraph()->at( c.index() )->anchorHref();
@@ -2317,15 +2317,15 @@ void TQTextEdit::contentsMousePressEvent( TQMouseEvent *e )
#ifndef TQT_NO_DRAGANDDROP
if ( doc->inSelection( TQTextDocument::Standard, e->pos() ) ) {
- mightStartDrag = TRUE;
- drawCursor( TRUE );
- dragStartTimer->start( TQApplication::startDragTime(), TRUE );
+ mightStartDrag = true;
+ drawCursor( true );
+ dragStartTimer->start( TQApplication::startDragTime(), true );
dragStartPos = e->pos();
return;
}
#endif
- bool redraw = FALSE;
+ bool redraw = false;
if ( doc->hasSelection( TQTextDocument::Standard ) ) {
if ( !( e->state() & ShiftButton ) ) {
redraw = doc->removeSelection( TQTextDocument::Standard );
@@ -2346,7 +2346,7 @@ void TQTextEdit::contentsMousePressEvent( TQMouseEvent *e )
redraw = doc->removeSelection( i ) || redraw;
if ( !redraw ) {
- drawCursor( TRUE );
+ drawCursor( true );
} else {
repaintChanged();
#ifndef TQT_NO_CURSOR
@@ -2356,7 +2356,7 @@ void TQTextEdit::contentsMousePressEvent( TQMouseEvent *e )
} else if ( e->button() == MidButton ) {
bool redraw = doc->removeSelection( TQTextDocument::Standard );
if ( !redraw ) {
- drawCursor( TRUE );
+ drawCursor( true );
} else {
repaintChanged();
#ifndef TQT_NO_CURSOR
@@ -2460,24 +2460,24 @@ void TQTextEdit::contentsMouseReleaseEvent( TQMouseEvent * e )
if ( dragStartTimer->isActive() )
dragStartTimer->stop();
if ( mightStartDrag ) {
- selectAll( FALSE );
- mousePressed = FALSE;
+ selectAll( false );
+ mousePressed = false;
}
#endif
bool mouseWasPressed = mousePressed;
if ( mousePressed ) {
- mousePressed = FALSE;
+ mousePressed = false;
copyToClipboard();
}
#ifndef TQT_NO_CLIPBOARD
else if ( e->button() == MidButton && !isReadOnly() ) {
// only do middle-click pasting on systems that have selections (ie. X11)
if (TQApplication::clipboard()->supportsSelection()) {
- drawCursor( FALSE );
+ drawCursor( false );
placeCursor( e->pos() );
ensureCursorVisible();
doc->setSelectionStart( TQTextDocument::Standard, oldCursor );
- bool redraw = FALSE;
+ bool redraw = false;
if ( doc->hasSelection( TQTextDocument::Standard ) ) {
redraw = doc->removeSelection( TQTextDocument::Standard );
doc->setSelectionStart( TQTextDocument::Standard, *cursor );
@@ -2488,7 +2488,7 @@ void TQTextEdit::contentsMouseReleaseEvent( TQMouseEvent * e )
for ( int i = 1; i < doc->numSelections(); ++i )
redraw = doc->removeSelection( i ) || redraw;
if ( !redraw ) {
- drawCursor( TRUE );
+ drawCursor( true );
} else {
repaintChanged();
#ifndef TQT_NO_CURSOR
@@ -2505,15 +2505,15 @@ void TQTextEdit::contentsMouseReleaseEvent( TQMouseEvent * e )
emit cursorPositionChanged( cursor->paragraph()->paragId(), cursor->index() );
if ( oldCursor != *cursor )
updateCurrentFormat();
- inDoubleClick = FALSE;
+ inDoubleClick = false;
#ifndef TQT_NO_NETWORKPROTOCOL
if ( ( (!onLink.isEmpty() && onLink == pressedLink)
|| (!d->onName.isEmpty() && d->onName == d->pressedName))
&& linksEnabled() && mouseWasPressed ) {
if (!onLink.isEmpty()) {
- TQUrl u( doc->context(), onLink, TRUE );
- emitLinkClicked( u.toString( FALSE, FALSE ) );
+ TQUrl u( doc->context(), onLink, true );
+ emitLinkClicked( u.toString( false, false ) );
}
if (::tqt_cast<TQTextBrowser*>(this)) { // change for 4.0
TQConnectionList *clist = receivers(
@@ -2532,8 +2532,8 @@ void TQTextEdit::contentsMouseReleaseEvent( TQMouseEvent * e )
updateCursor( e->pos() );
}
#endif
- drawCursor( TRUE );
- if ( !doc->hasSelection( TQTextDocument::Standard, TRUE ) )
+ drawCursor( true );
+ if ( !doc->hasSelection( TQTextDocument::Standard, true ) )
doc->removeSelection( TQTextDocument::Standard );
emit copyAvailable( doc->hasSelection( TQTextDocument::Standard ) );
@@ -2572,7 +2572,7 @@ void TQTextEdit::contentsMouseDoubleClickEvent( TQMouseEvent * e )
endIdx = ++i;
}
optimSetSelection( para, startIdx, para, endIdx );
- repaintContents( FALSE );
+ repaintContents( false );
}
} else
#endif
@@ -2616,11 +2616,11 @@ void TQTextEdit::contentsMouseDoubleClickEvent( TQMouseEvent * e )
repaintChanged();
- d->trippleClickTimer->start( tqApp->doubleClickInterval(), TRUE );
+ d->trippleClickTimer->start( tqApp->doubleClickInterval(), true );
d->trippleClickPoint = e->globalPos();
}
- inDoubleClick = TRUE;
- mousePressed = TRUE;
+ inDoubleClick = true;
+ mousePressed = true;
emit doubleClicked( para, index );
}
@@ -2637,7 +2637,7 @@ void TQTextEdit::contentsDragEnterEvent( TQDragEnterEvent *e )
return;
}
e->acceptAction();
- inDnD = TRUE;
+ inDnD = true;
}
/*!
@@ -2650,9 +2650,9 @@ void TQTextEdit::contentsDragMoveEvent( TQDragMoveEvent *e )
e->ignore();
return;
}
- drawCursor( FALSE );
+ drawCursor( false );
placeCursor( e->pos(), cursor );
- drawCursor( TRUE );
+ drawCursor( true );
e->acceptAction();
}
@@ -2662,8 +2662,8 @@ void TQTextEdit::contentsDragMoveEvent( TQDragMoveEvent *e )
void TQTextEdit::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
- drawCursor( FALSE );
- inDnD = FALSE;
+ drawCursor( false );
+ inDnD = false;
}
/*!
@@ -2674,9 +2674,9 @@ void TQTextEdit::contentsDropEvent( TQDropEvent *e )
{
if ( isReadOnly() )
return;
- inDnD = FALSE;
+ inDnD = false;
e->acceptAction();
- bool intern = FALSE;
+ bool intern = false;
if ( TQRichTextDrag::canDecode( e ) ) {
bool hasSel = doc->hasSelection( TQTextDocument::Standard );
bool internalDrag = e->source() == this || e->source() == viewport();
@@ -2715,7 +2715,7 @@ void TQTextEdit::contentsDropEvent( TQDropEvent *e )
if ( internalDrag && e->action() == TQDropEvent::Move ) {
removeSelectedText();
- intern = TRUE;
+ intern = true;
doc->removeSelection( TQTextDocument::Standard );
} else {
doc->removeSelection( TQTextDocument::Standard );
@@ -2723,10 +2723,10 @@ void TQTextEdit::contentsDropEvent( TQDropEvent *e )
viewport()->setCursor( isReadOnly() ? arrowCursor : ibeamCursor );
#endif
}
- drawCursor( FALSE );
+ drawCursor( false );
cursor->setParagraph( insertCursor.paragraph() );
cursor->setIndex( insertCursor.index() );
- drawCursor( TRUE );
+ drawCursor( true );
if ( !cursor->nestedDepth() ) {
TQString subType = "plain";
if ( textFormat() != PlainText ) {
@@ -2762,7 +2762,7 @@ void TQTextEdit::contentsContextMenuEvent( TQContextMenuEvent *e )
#endif
clearUndoRedo();
- mousePressed = FALSE;
+ mousePressed = false;
#ifndef TQT_NO_POPUPMENU
TQGuardedPtr<TQTextEdit> that = this;
@@ -2825,11 +2825,11 @@ void TQTextEdit::handleMouseMove( const TQPoint& pos )
return;
if ( (!scrollTimer->isActive() && pos.y() < contentsY()) || pos.y() > contentsY() + visibleHeight() )
- scrollTimer->start( 100, FALSE );
+ scrollTimer->start( 100, false );
else if ( scrollTimer->isActive() && pos.y() >= contentsY() && pos.y() <= contentsY() + visibleHeight() )
scrollTimer->stop();
- drawCursor( FALSE );
+ drawCursor( false );
TQTextCursor oldCursor = *cursor;
placeCursor( pos );
@@ -2859,16 +2859,16 @@ void TQTextEdit::handleMouseMove( const TQPoint& pos )
}
ensureCursorVisible();
- bool redraw = FALSE;
+ bool redraw = false;
if ( doc->hasSelection( TQTextDocument::Standard ) ) {
redraw = doc->setSelectionEnd( TQTextDocument::Standard, *cursor ) || redraw;
}
if ( !redraw ) {
- drawCursor( TRUE );
+ drawCursor( true );
} else {
repaintChanged();
- drawCursor( TRUE );
+ drawCursor( true );
}
if ( currentFormat && currentFormat->key() != cursor->paragraph()->at( cursor->index() )->format()->key() ) {
@@ -2885,9 +2885,9 @@ void TQTextEdit::handleMouseMove( const TQPoint& pos )
if ( currentAlignment != cursor->paragraph()->alignment() ) {
currentAlignment = cursor->paragraph()->alignment();
- block_set_alignment = TRUE;
+ block_set_alignment = true;
emit currentAlignmentChanged( currentAlignment );
- block_set_alignment = FALSE;
+ block_set_alignment = false;
}
}
@@ -2934,7 +2934,7 @@ void TQTextEdit::updateMicroFocusHint()
if ( !readOnly ) {
TQFont f = c.paragraph()->at( c.index() )->format()->font();
setMicroFocusHint( c.x() - contentsX() + frameWidth(),
- c.y() + cursor->paragraph()->rect().y() - contentsY() + frameWidth(), 0, h, TRUE, &f );
+ c.y() + cursor->paragraph()->rect().y() - contentsY() + frameWidth(), 0, h, true, &f );
}
}
}
@@ -2950,7 +2950,7 @@ void TQTextEdit::formatMore()
int lastTop = -1;
int lastBottom = -1;
int to = 20;
- bool firstVisible = FALSE;
+ bool firstVisible = false;
TQRect cr( contentsX(), contentsY(), visibleWidth(), visibleHeight() );
for ( int i = 0; lastFormatted &&
( i < to || ( firstVisible && lastTop < contentsY()+height() ) );
@@ -2974,7 +2974,7 @@ void TQTextEdit::formatMore()
}
if ( lastFormatted )
- formatTimer->start( interval, TRUE );
+ formatTimer->start( interval, true );
else
interval = TQMAX( 0, interval );
}
@@ -2995,7 +2995,7 @@ void TQTextEdit::doResize()
interval = 0;
formatMore();
}
- repaintContents( FALSE );
+ repaintContents( false );
}
/*! \internal */
@@ -3019,11 +3019,11 @@ bool TQTextEdit::eventFilter( TQObject *o, TQEvent *e )
if ( e->type() == TQEvent::FocusIn ) {
if ( TQApplication::cursorFlashTime() > 0 )
blinkTimer->start( TQApplication::cursorFlashTime() / 2 );
- drawCursor( TRUE );
+ drawCursor( true );
updateMicroFocusHint();
} else if ( e->type() == TQEvent::FocusOut ) {
blinkTimer->stop();
- drawCursor( FALSE );
+ drawCursor( false );
}
}
@@ -3095,7 +3095,7 @@ void TQTextEdit::insert( const TQString &text, uint insertionFlags )
bool imComposition = insertionFlags & AsIMCompositionText;
bool imSelection = insertionFlags & WithIMSelection;
TQString txt( text );
- drawCursor( FALSE );
+ drawCursor( false );
if ( !isReadOnly() && doc->hasSelection( TQTextDocument::Standard ) && removeSelected )
removeSelectedText();
TQTextCursor c2 = *cursor;
@@ -3146,7 +3146,7 @@ void TQTextEdit::insert( const TQString &text, uint insertionFlags )
c2.paragraph()->at( c2.index() )->format()->addRef();
undoRedoInfo.d->text.
setFormat( oldLen + i,
- c2.paragraph()->at( c2.index() )->format(), TRUE );
+ c2.paragraph()->at( c2.index() )->format(), true );
}
c2.gotoNextLetter();
}
@@ -3189,7 +3189,7 @@ void TQTextEdit::insertAt( const TQString &text, int para, int index )
TQTextCursor tmp = *cursor;
cursor->setParagraph( p );
cursor->setIndex( index );
- insert( text, FALSE, TRUE, FALSE );
+ insert( text, false, true, false );
*cursor = tmp;
removeSelection( TQTextDocument::Standard );
}
@@ -3219,23 +3219,23 @@ void TQTextEdit::insertParagraph( const TQString &text, int para )
p = doc->lastParagraph();
TQTextCursor old = *cursor;
- drawCursor( FALSE );
+ drawCursor( false );
cursor->setParagraph( p );
cursor->setIndex( 0 );
clearUndoRedo();
- tqtextedit_ignore_readonly = TRUE;
+ tqtextedit_ignore_readonly = true;
if ( append && cursor->paragraph()->length() > 1 ) {
cursor->setIndex( cursor->paragraph()->length() - 1 );
doKeyboardAction( ActionReturn );
}
- insert( text, FALSE, TRUE, TRUE );
+ insert( text, false, true, true );
doKeyboardAction( ActionReturn );
- tqtextedit_ignore_readonly = FALSE;
+ tqtextedit_ignore_readonly = false;
- drawCursor( FALSE );
+ drawCursor( false );
*cursor = old;
- drawCursor( TRUE );
+ drawCursor( true );
repaintChanged();
}
@@ -3304,16 +3304,16 @@ void TQTextEdit::undo()
#endif
clearUndoRedo();
- drawCursor( FALSE );
+ drawCursor( false );
TQTextCursor *c = doc->undo( cursor );
if ( !c ) {
- drawCursor( TRUE );
+ drawCursor( true );
return;
}
lastFormatted = 0;
repaintChanged();
ensureCursorVisible();
- drawCursor( TRUE );
+ drawCursor( true );
updateMicroFocusHint();
setModified();
// ### If we get back to a completely blank textedit, it
@@ -3324,8 +3324,8 @@ void TQTextEdit::undo()
if ( !cursor->isValid() ) {
delete cursor;
cursor = new TQTextCursor( doc );
- drawCursor( TRUE );
- repaintContents( TRUE );
+ drawCursor( true );
+ repaintContents( true );
}
emit undoAvailable( isUndoAvailable() );
emit redoAvailable( isRedoAvailable() );
@@ -3355,17 +3355,17 @@ void TQTextEdit::redo()
#endif
clearUndoRedo();
- drawCursor( FALSE );
+ drawCursor( false );
TQTextCursor *c = doc->redo( cursor );
if ( !c ) {
- drawCursor( TRUE );
+ drawCursor( true );
return;
}
lastFormatted = 0;
ensureCursorVisible();
repaintChanged();
ensureCursorVisible();
- drawCursor( TRUE );
+ drawCursor( true );
updateMicroFocusHint();
setModified();
emit undoAvailable( isUndoAvailable() );
@@ -3429,7 +3429,7 @@ void TQTextEdit::repaintChanged()
}
#endif
p.translate( -contentsX(), -contentsY() );
- paintDocument( FALSE, &p, contentsX(), contentsY(), visibleWidth(), visibleHeight() );
+ paintDocument( false, &p, contentsX(), contentsY(), visibleWidth(), visibleHeight() );
}
#ifndef TQT_NO_MIME
@@ -3442,7 +3442,7 @@ TQTextDrag *TQTextEdit::dragObject( TQWidget *parent ) const
return new TQTextDrag( doc->selectedText( TQTextDocument::Standard ), parent );
TQRichTextDrag *drag = new TQRichTextDrag( parent );
drag->setPlainText( doc->selectedText( TQTextDocument::Standard ) );
- drag->setRichText( doc->selectedText( TQTextDocument::Standard, TRUE ) );
+ drag->setRichText( doc->selectedText( TQTextDocument::Standard, true ) );
return drag;
}
#endif
@@ -3509,28 +3509,28 @@ void TQTextEdit::indent()
if ( isReadOnly() )
return;
- drawCursor( FALSE );
+ drawCursor( false );
if ( !doc->hasSelection( TQTextDocument::Standard ) )
cursor->indent();
else
doc->indentSelection( TQTextDocument::Standard );
repaintChanged();
- drawCursor( TRUE );
+ drawCursor( true );
setModified();
emit textChanged();
}
/*!
- Reimplemented to allow tabbing through links. If \a n is TRUE the
- tab moves the focus to the next child; if \a n is FALSE the tab
- moves the focus to the previous child. Returns TRUE if the focus
- was moved; otherwise returns FALSE.
+ Reimplemented to allow tabbing through links. If \a n is true the
+ tab moves the focus to the next child; if \a n is false the tab
+ moves the focus to the previous child. Returns true if the focus
+ was moved; otherwise returns false.
*/
bool TQTextEdit::focusNextPrevChild( bool n )
{
if ( !isReadOnly() || !linksEnabled() )
- return FALSE;
+ return false;
bool b = doc->focusNextPrevChild( n );
repaintChanged();
if ( b ) {
@@ -3577,7 +3577,7 @@ bool TQTextEdit::focusNextPrevChild( bool n )
void TQTextEdit::setFormat( TQTextFormat *f, int flags )
{
if ( doc->hasSelection( TQTextDocument::Standard ) ) {
- drawCursor( FALSE );
+ drawCursor( false );
TQTextCursor c1 = doc->selectionStartCursor( TQTextDocument::Standard );
c1.restoreState();
TQTextCursor c2 = doc->selectionEndCursor( TQTextDocument::Standard );
@@ -3597,7 +3597,7 @@ void TQTextEdit::setFormat( TQTextFormat *f, int flags )
doc->setFormat( TQTextDocument::Standard, f, flags );
repaintChanged();
formatMore();
- drawCursor( TRUE );
+ drawCursor( true );
setModified();
emit textChanged();
}
@@ -3614,7 +3614,7 @@ void TQTextEdit::setFormat( TQTextFormat *f, int flags )
emit currentVerticalAlignmentChanged( (VerticalAlignment)currentFormat->vAlign() );
if ( cursor->index() == cursor->paragraph()->length() - 1 ) {
currentFormat->addRef();
- cursor->paragraph()->string()->setFormat( cursor->index(), currentFormat, TRUE );
+ cursor->paragraph()->string()->setFormat( cursor->index(), currentFormat, true );
if ( cursor->paragraph()->length() == 1 ) {
cursor->paragraph()->invalidate( 0 );
cursor->paragraph()->format();
@@ -3656,7 +3656,7 @@ void TQTextEdit::setParagType( TQStyleSheetItem::DisplayMode dm,
if ( isReadOnly() )
return;
- drawCursor( FALSE );
+ drawCursor( false );
TQTextParagraph *start = cursor->paragraph();
TQTextParagraph *end = start;
if ( doc->hasSelection( TQTextDocument::Standard ) ) {
@@ -3675,11 +3675,11 @@ void TQTextEdit::setParagType( TQStyleSheetItem::DisplayMode dm,
while ( start != end->next() ) {
start->setListStyle( listStyle );
if ( dm == TQStyleSheetItem::DisplayListItem ) {
- start->setListItem( TRUE );
+ start->setListItem( true );
if( start->listDepth() == 0 )
start->setListDepth( 1 );
} else if ( start->isListItem() ) {
- start->setListItem( FALSE );
+ start->setListItem( false );
start->setListDepth( TQMAX( start->listDepth()-1, 0 ) );
}
start = start->next();
@@ -3688,7 +3688,7 @@ void TQTextEdit::setParagType( TQStyleSheetItem::DisplayMode dm,
clearUndoRedo();
repaintChanged();
formatMore();
- drawCursor( TRUE );
+ drawCursor( true );
setModified();
emit textChanged();
}
@@ -3705,7 +3705,7 @@ void TQTextEdit::setAlignment( int a )
if ( isReadOnly() || block_set_alignment )
return;
- drawCursor( FALSE );
+ drawCursor( false );
TQTextParagraph *start = cursor->paragraph();
TQTextParagraph *end = start;
if ( doc->hasSelection( TQTextDocument::Standard ) ) {
@@ -3729,7 +3729,7 @@ void TQTextEdit::setAlignment( int a )
clearUndoRedo();
repaintChanged();
formatMore();
- drawCursor( TRUE );
+ drawCursor( true );
if ( currentAlignment != a ) {
currentAlignment = a;
emit currentAlignmentChanged( currentAlignment );
@@ -3759,14 +3759,14 @@ void TQTextEdit::updateCurrentFormat()
if ( currentAlignment != cursor->paragraph()->alignment() ) {
currentAlignment = cursor->paragraph()->alignment();
- block_set_alignment = TRUE;
+ block_set_alignment = true;
emit currentAlignmentChanged( currentAlignment );
- block_set_alignment = FALSE;
+ block_set_alignment = false;
}
}
/*!
- If \a b is TRUE sets the current format to italic; otherwise sets
+ If \a b is true sets the current format to italic; otherwise sets
the current format to non-italic.
\sa italic()
@@ -3781,7 +3781,7 @@ void TQTextEdit::setItalic( bool b )
}
/*!
- If \a b is TRUE sets the current format to bold; otherwise sets
+ If \a b is true sets the current format to bold; otherwise sets
the current format to non-bold.
\sa bold()
@@ -3796,7 +3796,7 @@ void TQTextEdit::setBold( bool b )
}
/*!
- If \a b is TRUE sets the current format to underline; otherwise
+ If \a b is true sets the current format to underline; otherwise
sets the current format to non-underline.
\sa underline()
@@ -3953,8 +3953,8 @@ void TQTextEdit::setText( const TQString &text, const TQString &context )
this->context() == context && this->text() == text )
return;
- emit undoAvailable( FALSE );
- emit redoAvailable( FALSE );
+ emit undoAvailable( false );
+ emit redoAvailable( false );
undoRedoInfo.clear();
doc->commands()->clear();
@@ -3979,7 +3979,7 @@ void TQTextEdit::setText( const TQString &text, const TQString &context )
updateContents();
if ( isModified() )
- setModified( FALSE );
+ setModified( false );
emit textChanged();
if ( cursor->index() != oldCursorPos || cursor->paragraph()->paragId() != oldCursorPar ) {
emit cursorPositionChanged( cursor );
@@ -4018,32 +4018,32 @@ void TQTextEdit::setText( const TQString &text, const TQString &context )
In a read-only text edit the user can only navigate through the
text and select text; modifying the text is not possible.
- This property's default is FALSE.
+ This property's default is false.
*/
/*!
- Finds the next occurrence of the string, \a expr. Returns TRUE if
- \a expr was found; otherwise returns FALSE.
+ Finds the next occurrence of the string, \a expr. Returns true if
+ \a expr was found; otherwise returns false.
If \a para and \a index are both 0 the search begins from the
current cursor position. If \a para and \a index are both not 0,
the search begins from the \a *index character position in the
\a *para paragraph.
- If \a cs is TRUE the search is case sensitive, otherwise it is
- case insensitive. If \a wo is TRUE the search looks for whole word
+ If \a cs is true the search is case sensitive, otherwise it is
+ case insensitive. If \a wo is true the search looks for whole word
matches only; otherwise it searches for any matching text. If \a
- forward is TRUE (the default) the search works forward from the
+ forward is true (the default) the search works forward from the
starting position to the end of the text, otherwise it works
backwards to the beginning of the text.
- If \a expr is found the function returns TRUE. If \a index and \a
+ If \a expr is found the function returns true. If \a index and \a
para are not 0, the number of the paragraph in which the first
character of the match was found is put into \a *para, and the
index position of that character within the paragraph is put into
\a *index.
- If \a expr is not found the function returns FALSE. If \a index
+ If \a expr is not found the function returns false. If \a index
and \a para are not 0 and \a expr is not found, \a *index
and \a *para are undefined.
@@ -4062,7 +4062,7 @@ bool TQTextEdit::find( const TQString &expr, bool cs, bool wo, bool forward,
if ( d->optimMode )
return optimFind( expr, cs, wo, forward, para, index );
#endif
- drawCursor( FALSE );
+ drawCursor( false );
#ifndef TQT_NO_CURSOR
viewport()->setCursor( isReadOnly() ? arrowCursor : ibeamCursor );
#endif
@@ -4092,7 +4092,7 @@ bool TQTextEdit::find( const TQString &expr, bool cs, bool wo, bool forward,
repaintChanged();
ensureCursorVisible();
}
- drawCursor( TRUE );
+ drawCursor( true );
if (found) {
emit cursorPositionChanged( cursor );
emit cursorPositionChanged( cursor->paragraph()->paragId(), cursor->index() );
@@ -4126,11 +4126,11 @@ void TQTextEdit::setCursorPosition( int para, int index )
if ( index > p->length() - 1 )
index = p->length() - 1;
- drawCursor( FALSE );
+ drawCursor( false );
cursor->setParagraph( p );
cursor->setIndex( index );
ensureCursorVisible();
- drawCursor( TRUE );
+ drawCursor( true );
updateCurrentFormat();
emit cursorPositionChanged( cursor );
emit cursorPositionChanged( cursor->paragraph()->paragId(), cursor->index() );
@@ -4175,7 +4175,7 @@ void TQTextEdit::setSelection( int paraFrom, int indexFrom,
#ifdef QT_TEXTEDIT_OPTIMIZATION
if (d->optimMode) {
optimSetSelection(paraFrom, indexFrom, paraTo, indexTo);
- repaintContents(FALSE);
+ repaintContents(false);
return;
}
#endif
@@ -4198,7 +4198,7 @@ void TQTextEdit::setSelection( int paraFrom, int indexFrom,
if ( indexTo > p2->length() - 1 )
indexTo = p2->length() - 1;
- drawCursor( FALSE );
+ drawCursor( false );
TQTextCursor c = *cursor;
TQTextCursor oldCursor = *cursor;
c.setParagraph( p1 );
@@ -4211,7 +4211,7 @@ void TQTextEdit::setSelection( int paraFrom, int indexFrom,
ensureCursorVisible();
if ( selNum != TQTextDocument::Standard )
*cursor = oldCursor;
- drawCursor( TRUE );
+ drawCursor( true );
}
/*!
@@ -4426,11 +4426,11 @@ bool TQTextEdit::isModified() const
void TQTextEdit::setModified()
{
if ( !isModified() )
- setModified( TRUE );
+ setModified( true );
}
/*!
- Returns TRUE if the current format is italic; otherwise returns FALSE.
+ Returns true if the current format is italic; otherwise returns false.
\sa setItalic()
*/
@@ -4441,7 +4441,7 @@ bool TQTextEdit::italic() const
}
/*!
- Returns TRUE if the current format is bold; otherwise returns FALSE.
+ Returns true if the current format is bold; otherwise returns false.
\sa setBold()
*/
@@ -4452,8 +4452,8 @@ bool TQTextEdit::bold() const
}
/*!
- Returns TRUE if the current format is underlined; otherwise returns
- FALSE.
+ Returns true if the current format is underlined; otherwise returns
+ false.
\sa setUnderline()
*/
@@ -4537,8 +4537,8 @@ int TQTextEdit::alignment() const
void TQTextEdit::startDrag()
{
#ifndef TQT_NO_DRAGANDDROP
- mousePressed = FALSE;
- inDoubleClick = FALSE;
+ mousePressed = false;
+ inDoubleClick = false;
TQDragObject *drag = dragObject( viewport() );
if ( !drag )
return;
@@ -4552,8 +4552,8 @@ void TQTextEdit::startDrag()
}
/*!
- If \a select is TRUE (the default), all the text is selected as
- selection 0. If \a select is FALSE any selected text is
+ If \a select is true (the default), all the text is selected as
+ selection 0. If \a select is false any selected text is
unselected, i.e. the default selection (selection 0) is cleared.
\sa selectedText
@@ -4718,8 +4718,8 @@ TQBrush TQTextEdit::paper() const
\property TQTextEdit::linkUnderline
\brief whether hypertext links will be underlined
- If TRUE (the default) hypertext links will be displayed
- underlined. If FALSE links will not be displayed underlined.
+ If true (the default) hypertext links will be displayed
+ underlined. If false links will not be displayed underlined.
*/
void TQTextEdit::setLinkUnderline( bool b )
@@ -4806,7 +4806,7 @@ void TQTextEdit::append( const TQString &text )
f = PlainText;
}
- drawCursor( FALSE );
+ drawCursor( false );
TQTextCursor oldc( *cursor );
ensureFormatted( doc->lastParagraph() );
bool atBottom = contentsY() >= contentsHeight() - visibleHeight();
@@ -4816,7 +4816,7 @@ void TQTextEdit::append( const TQString &text )
TQTextCursor oldCursor2 = *cursor;
if ( f == TQt::PlainText ) {
- cursor->insert( text, TRUE );
+ cursor->insert( text, true );
if ( doc->useFormatCollection() && !doc->preProcessor() &&
currentFormat != cursor->paragraph()->at( cursor->index() )->format() ) {
doc->setSelectionStart( TQTextDocument::Temp, oldCursor2 );
@@ -4825,7 +4825,7 @@ void TQTextEdit::append( const TQString &text )
doc->removeSelection( TQTextDocument::Temp );
}
} else {
- cursor->paragraph()->setListItem( FALSE );
+ cursor->paragraph()->setListItem( false );
cursor->paragraph()->setListDepth( 0 );
if ( cursor->paragraph()->prev() )
cursor->paragraph()->prev()->invalidate(0); // vertical margins might have to change
@@ -4837,7 +4837,7 @@ void TQTextEdit::append( const TQString &text )
scrollToBottom();
*cursor = oldc;
if ( !isReadOnly() )
- cursorVisible = TRUE;
+ cursorVisible = true;
setModified();
emit textChanged();
}
@@ -4915,8 +4915,8 @@ bool TQTextEdit::handleReadOnlyKeyEvent( TQKeyEvent *e )
if (!doc->focusIndicator.href.isEmpty()
|| !doc->focusIndicator.name.isEmpty()) {
if (!doc->focusIndicator.href.isEmpty()) {
- TQUrl u( doc->context(), doc->focusIndicator.href, TRUE );
- emitLinkClicked( u.toString( FALSE, FALSE ) );
+ TQUrl u( doc->context(), doc->focusIndicator.href, true );
+ emitLinkClicked( u.toString( false, false ) );
}
if (!doc->focusIndicator.name.isEmpty()) {
if (::tqt_cast<TQTextBrowser*>(this)) { // change for 4.0
@@ -4955,9 +4955,9 @@ bool TQTextEdit::handleReadOnlyKeyEvent( TQKeyEvent *e )
}
}
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*!
@@ -5189,7 +5189,7 @@ void TQTextEdit::pasteSubType( const TQCString& subtype, TQMimeSource *m )
if ( txt[ i ] != '\n' && oldC.paragraph()->at( oldC.index() )->format() ) {
oldC.paragraph()->at( oldC.index() )->format()->addRef();
undoRedoInfo.d->text.
- setFormat( oldLen + i, oldC.paragraph()->at( oldC.index() )->format(), TRUE );
+ setFormat( oldLen + i, oldC.paragraph()->at( oldC.index() )->format(), true );
}
oldC.gotoNextLetter();
}
@@ -5219,7 +5219,7 @@ void TQTextEdit::pasteSubType( const TQCString& subtype, TQMimeSource *m )
uc[ i ] = ' ';
}
if ( !t.isEmpty() )
- insert( t, FALSE, TRUE );
+ insert( t, false, true );
}
#endif //TQT_NO_MIME
}
@@ -5234,7 +5234,7 @@ void TQTextEdit::pasteSubType( const TQCString& subtype, TQMimeSource *m )
void TQTextEdit::pasteSpecial( const TQPoint& pt )
{
TQCString st = pickSpecial( TQApplication::clipboard()->data( d->clipboard_mode ),
- TRUE, pt );
+ true, pt );
if ( !st.isEmpty() )
pasteSubType( st );
}
@@ -5330,7 +5330,7 @@ void TQTextEdit::setWordWrap( WordWrap mode )
wrapMode = mode;
switch ( mode ) {
case NoWrap:
- document()->formatter()->setWrapEnabled( FALSE );
+ document()->formatter()->setWrapEnabled( false );
document()->formatter()->setWrapAtColumn( -1 );
doc->setWidth( visibleWidth() );
doc->setMinimumWidth( -1 );
@@ -5341,12 +5341,12 @@ void TQTextEdit::setWordWrap( WordWrap mode )
formatMore();
break;
case WidgetWidth:
- document()->formatter()->setWrapEnabled( TRUE );
+ document()->formatter()->setWrapEnabled( true );
document()->formatter()->setWrapAtColumn( -1 );
doResize();
break;
case FixedPixelWidth:
- document()->formatter()->setWrapEnabled( TRUE );
+ document()->formatter()->setWrapEnabled( true );
document()->formatter()->setWrapAtColumn( -1 );
if ( wrapWidth < 0 )
wrapWidth = 200;
@@ -5355,7 +5355,7 @@ void TQTextEdit::setWordWrap( WordWrap mode )
case FixedColumnWidth:
if ( wrapWidth < 0 )
wrapWidth = 80;
- document()->formatter()->setWrapEnabled( TRUE );
+ document()->formatter()->setWrapEnabled( true );
document()->formatter()->setWrapAtColumn( wrapWidth );
setWrapColumnOrWidth( wrapWidth );
break;
@@ -5487,7 +5487,7 @@ void TQTextEdit::clear()
setContentsPos( 0, 0 );
if ( cursor->isValid() )
cursor->restoreState();
- doc->clear( TRUE );
+ doc->clear( true );
delete cursor;
cursor = new TQTextCursor( doc );
lastFormatted = 0;
@@ -5576,23 +5576,23 @@ void TQTextEdit::clearUndoRedo()
color to the character's color and \a verticalAlignment to the
character's vertical alignment.
- Returns FALSE if \a para or \a index is out of range otherwise
- returns TRUE.
+ Returns false if \a para or \a index is out of range otherwise
+ returns true.
*/
bool TQTextEdit::getFormat( int para, int index, TQFont *font, TQColor *color, VerticalAlignment *verticalAlignment )
{
if ( !font || !color )
- return FALSE;
+ return false;
TQTextParagraph *p = doc->paragAt( para );
if ( !p )
- return FALSE;
+ return false;
if ( index < 0 || index >= p->length() )
- return FALSE;
+ return false;
*font = p->at( index )->format()->font();
*color = p->at( index )->format()->color();
*verticalAlignment = (VerticalAlignment)p->at( index )->format()->vAlign();
- return TRUE;
+ return true;
}
/*! \internal
@@ -5609,7 +5609,7 @@ bool TQTextEdit::getFormat( int para, int index, TQFont *font, TQColor *color, V
listDepth to the depth of the list (if the display mode is
TQStyleSheetItem::DisplayListItem).
- Returns FALSE if \a para is out of range otherwise returns TRUE.
+ Returns false if \a para is out of range otherwise returns true.
*/
bool TQTextEdit::getParagraphFormat( int para, TQFont *font, TQColor *color,
@@ -5619,10 +5619,10 @@ bool TQTextEdit::getParagraphFormat( int para, TQFont *font, TQColor *color,
int *listDepth )
{
if ( !font || !color || !alignment || !displayMode || !listStyle )
- return FALSE;
+ return false;
TQTextParagraph *p = doc->paragAt( para );
if ( !p )
- return FALSE;
+ return false;
*font = p->at(0)->format()->font();
*color = p->at(0)->format()->color();
*verticalAlignment = (VerticalAlignment)p->at(0)->format()->vAlign();
@@ -5630,7 +5630,7 @@ bool TQTextEdit::getParagraphFormat( int para, TQFont *font, TQColor *color,
*displayMode = p->isListItem() ? TQStyleSheetItem::DisplayListItem : TQStyleSheetItem::DisplayBlock;
*listStyle = p->listStyle();
*listDepth = p->listDepth();
- return TRUE;
+ return true;
}
@@ -5682,11 +5682,11 @@ TQPopupMenu *TQTextEdit::createPopupMenu( const TQPoint& pos )
popup->setItemEnabled( d->id[ IdUndo ], !isReadOnly() && doc->commands()->isUndoAvailable() );
popup->setItemEnabled( d->id[ IdRedo ], !isReadOnly() && doc->commands()->isRedoAvailable() );
#ifndef TQT_NO_CLIPBOARD
- popup->setItemEnabled( d->id[ IdCut ], !isReadOnly() && doc->hasSelection( TQTextDocument::Standard, TRUE ) );
+ popup->setItemEnabled( d->id[ IdCut ], !isReadOnly() && doc->hasSelection( TQTextDocument::Standard, true ) );
#ifdef QT_TEXTEDIT_OPTIMIZATION
- popup->setItemEnabled( d->id[ IdCopy ], d->optimMode ? optimHasSelection() : doc->hasSelection( TQTextDocument::Standard, TRUE ) );
+ popup->setItemEnabled( d->id[ IdCopy ], d->optimMode ? optimHasSelection() : doc->hasSelection( TQTextDocument::Standard, true ) );
#else
- popup->setItemEnabled( d->id[ IdCopy ], doc->hasSelection( TQTextDocument::Standard, TRUE ) );
+ popup->setItemEnabled( d->id[ IdCopy ], doc->hasSelection( TQTextDocument::Standard, true ) );
#endif
popup->setItemEnabled( d->id[ IdPaste ], !isReadOnly() && !TQApplication::clipboard()->text( d->clipboard_mode ).isEmpty() );
#endif
@@ -6043,7 +6043,7 @@ TQColor TQTextEdit::paragraphBackgroundColor( int para ) const
When changing this property, the undo/redo history is cleared.
- The default is TRUE.
+ The default is true.
*/
void TQTextEdit::setUndoRedoEnabled( bool b )
@@ -6060,7 +6060,7 @@ bool TQTextEdit::isUndoRedoEnabled() const
}
/*!
- Returns TRUE if undo is available; otherwise returns FALSE.
+ Returns true if undo is available; otherwise returns false.
*/
bool TQTextEdit::isUndoAvailable() const
@@ -6069,7 +6069,7 @@ bool TQTextEdit::isUndoAvailable() const
}
/*!
- Returns TRUE if redo is available; otherwise returns FALSE.
+ Returns true if redo is available; otherwise returns false.
*/
bool TQTextEdit::isRedoAvailable() const
@@ -6091,13 +6091,13 @@ void TQTextEdit::updateCursor( const TQPoint & pos )
{
if ( isReadOnly() && linksEnabled() ) {
TQTextCursor c = *cursor;
- placeCursor( pos, &c, TRUE );
+ placeCursor( pos, &c, true );
#ifndef TQT_NO_NETWORKPROTOCOL
- bool insideParagRect = TRUE;
+ bool insideParagRect = true;
if (c.paragraph() == doc->lastParagraph()
&& c.paragraph()->rect().y() + c.paragraph()->rect().height() < pos.y())
- insideParagRect = FALSE;
+ insideParagRect = false;
if (insideParagRect && c.paragraph() && c.paragraph()->at( c.index() ) &&
c.paragraph()->at( c.index() )->isAnchor()) {
if (!c.paragraph()->at( c.index() )->anchorHref().isEmpty()
@@ -6116,8 +6116,8 @@ void TQTextEdit::updateCursor( const TQPoint & pos )
#ifndef TQT_NO_CURSOR
viewport()->setCursor( onLink.isEmpty() ? arrowCursor : pointingHandCursor );
#endif
- TQUrl u( doc->context(), onLink, TRUE );
- emitHighlighted( u.toString( FALSE, FALSE ) );
+ TQUrl u( doc->context(), onLink, true );
+ emitHighlighted( u.toString( false, false ) );
}
} else {
#ifndef TQT_NO_CURSOR
@@ -6139,7 +6139,7 @@ void TQTextEdit::updateCursor( const TQPoint & pos )
*/
void TQTextEdit::placeCursor( const TQPoint &pos, TQTextCursor *c )
{
- placeCursor( pos, c, FALSE );
+ placeCursor( pos, c, false );
}
/*! \internal */
@@ -6149,7 +6149,7 @@ void TQTextEdit::clipboardChanged()
// don't listen to selection changes
disconnect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()), this, 0);
#endif
- selectAll(FALSE);
+ selectAll(false);
}
/*! \property TQTextEdit::tabChangesFocus
@@ -6157,7 +6157,7 @@ void TQTextEdit::clipboardChanged()
In some occasions text edits should not allow the user to input
tabulators or change indentation using the TAB key, as this breaks
- the focus chain. The default is FALSE.
+ the focus chain. The default is false.
*/
@@ -6188,10 +6188,10 @@ bool TQTextEdit::checkOptimMode()
{
bool oldMode = d->optimMode;
if ( textFormat() == LogText ) {
- setReadOnly( TRUE );
- d->optimMode = TRUE;
+ setReadOnly( true );
+ d->optimMode = true;
} else {
- d->optimMode = FALSE;
+ d->optimMode = false;
}
// when changing mode - try to keep selections and text
@@ -6203,7 +6203,7 @@ bool TQTextEdit::checkOptimMode()
disconnect( scrollTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( autoScrollTimerDone() ) );
disconnect( formatTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( formatMore() ) );
optimSetText( doc->originalText() );
- doc->clear(TRUE);
+ doc->clear(true);
delete cursor;
cursor = new TQTextCursor( doc );
} else {
@@ -6266,7 +6266,7 @@ void TQTextEdit::optimSetText( const TQString &str )
d->od->clearTags();
TQFontMetrics fm( TQScrollView::font() );
if ( !(str.isEmpty() || str.isNull() || d->maxLogLines == 0) ) {
- TQStringList strl = TQStringList::split( '\n', str, TRUE );
+ TQStringList strl = TQStringList::split( '\n', str, true );
int lWidth = 0;
for ( TQStringList::Iterator it = strl.begin(); it != strl.end(); ++it ) {
optimParseTags( &*it );
@@ -6291,7 +6291,7 @@ TQTextEditOptimPrivate::Tag * TQTextEdit::optimAppendTag( int index, const TQStr
if ( d->od->tags == 0 )
d->od->tags = t;
- t->bold = t->italic = t->underline = FALSE;
+ t->bold = t->italic = t->underline = false;
t->line = d->od->numLines;
t->index = index;
t->tag = tag;
@@ -6320,7 +6320,7 @@ TQTextEditOptimPrivate::Tag *TQTextEdit::optimInsertTag(int line, int index, con
if (d->od->tags == 0)
d->od->tags = t;
- t->bold = t->italic = t->underline = FALSE;
+ t->bold = t->italic = t->underline = false;
t->line = line;
t->index = index;
t->tag = tag;
@@ -6440,7 +6440,7 @@ void TQTextEdit::optimParseTags( TQString * line, int lineNo, int indexOffset )
endIndex = i;
if ( !tagStr.isEmpty() ) {
TQTextEditOptimPrivate::Tag * tag, * cur, * tmp;
- bool format = TRUE;
+ bool format = true;
if ( tagStr == "b" )
bold++;
@@ -6455,7 +6455,7 @@ void TQTextEdit::optimParseTags( TQString * line, int lineNo, int indexOffset )
else if ( tagStr == "/u" )
underline--;
else
- format = FALSE;
+ format = false;
if ( lineNo > -1 )
tag = optimInsertTag( lineNo, startIndex + indexOffset, tagStr );
else
@@ -6571,13 +6571,13 @@ bool TQTextEdit::optimHasBoldMetrics(int line)
t = *it;
while (t && t->line == line) {
if (t->bold)
- return TRUE;
+ return true;
t = t->next;
}
} else if ((t = optimPreviousLeftTag(line)) && t->bold) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*! \internal
@@ -6590,7 +6590,7 @@ void TQTextEdit::optimAppend( const TQString &str )
if ( str.isEmpty() || str.isNull() || d->maxLogLines == 0 )
return;
- TQStringList strl = TQStringList::split( '\n', str, TRUE );
+ TQStringList strl = TQStringList::split( '\n', str, true );
TQStringList::Iterator it = strl.begin();
TQFontMetrics fm(TQScrollView::font());
@@ -6601,7 +6601,7 @@ void TQTextEdit::optimAppend( const TQString &str )
optimCheckLimit( *it );
if (optimHasBoldMetrics(d->od->numLines-1)) {
TQFont fnt = TQScrollView::font();
- fnt.setBold(TRUE);
+ fnt.setBold(true);
fm = TQFontMetrics(fnt);
}
lWidth = qStrWidth(*it, tabStopWidth(), fm) + 4;
@@ -6691,7 +6691,7 @@ void TQTextEdit::optimInsert(const TQString& text, int line, int index)
if (index > (int) d->od->lines[line].length())
index = d->od->lines[line].length();
- TQStringList strl = TQStringList::split('\n', text, TRUE);
+ TQStringList strl = TQStringList::split('\n', text, true);
int numNewLines = (int)strl.count() - 1;
TQTextEditOptimPrivate::Tag *tag = 0;
TQMap<int,TQTextEditOptimPrivate::Tag *>::ConstIterator ii;
@@ -6790,7 +6790,7 @@ void TQTextEdit::optimInsert(const TQString& text, int line, int index)
for (x = line; x < line + numNewLines; x++) {
if (optimHasBoldMetrics(x)) {
TQFont fnt = TQScrollView::font();
- fnt.setBold(TRUE);
+ fnt.setBold(true);
fm = TQFontMetrics(fnt);
}
lWidth = fm.width(d->od->lines[x]) + 4;
@@ -6923,7 +6923,7 @@ void TQTextEdit::optimDrawContents( TQPainter * p, int clipx, int clipy,
td->setDefaultFormat( TQScrollView::font(), TQColor() );
td->setPlainText( str );
td->setFormatter( new TQTextFormatterBreakWords ); // deleted by TQTextDoc
- td->formatter()->setWrapEnabled( FALSE );
+ td->formatter()->setWrapEnabled( false );
td->setTabStops(doc->tabStopWidth());
// get the current text color from the current format
@@ -7069,7 +7069,7 @@ void TQTextEdit::optimMousePressEvent( TQMouseEvent * e )
return;
TQFontMetrics fm( TQScrollView::font() );
- mousePressed = TRUE;
+ mousePressed = true;
mousePos = e->pos();
d->od->selStart.line = e->y() / fm.lineSpacing();
if ( d->od->selStart.line > d->od->numLines-1 ) {
@@ -7082,7 +7082,7 @@ void TQTextEdit::optimMousePressEvent( TQMouseEvent * e )
d->od->selEnd.line = d->od->selStart.line;
d->od->selEnd.index = d->od->selStart.index;
oldMousePos = e->pos();
- repaintContents( FALSE );
+ repaintContents( false );
}
/*! \internal */
@@ -7110,14 +7110,14 @@ void TQTextEdit::optimMouseReleaseEvent( TQMouseEvent * e )
tqSwap( &d->od->selStart.index, &d->od->selEnd.index );
}
oldMousePos = e->pos();
- repaintContents( FALSE );
+ repaintContents( false );
}
if ( mousePressed ) {
- mousePressed = FALSE;
+ mousePressed = false;
copyToClipboard();
}
- inDoubleClick = FALSE;
+ inDoubleClick = false;
emit copyAvailable( optimHasSelection() );
emit selectionChanged();
}
@@ -7138,7 +7138,7 @@ void TQTextEdit::optimDoAutoScroll()
TQFontMetrics fm( TQScrollView::font() );
TQPoint pos( mapFromGlobal( TQCursor::pos() ) );
- bool doScroll = FALSE;
+ bool doScroll = false;
int xx = contentsX() + pos.x();
int yy = contentsY() + pos.y();
@@ -7161,7 +7161,7 @@ void TQTextEdit::optimDoAutoScroll()
d->od->selEnd.line = my / fm.lineSpacing();
mousePos.setX( xx );
mousePos.setY( my );
- doScroll = TRUE;
+ doScroll = true;
} else {
d->od->selEnd.line = mousePos.y() / fm.lineSpacing();
}
@@ -7183,7 +7183,7 @@ void TQTextEdit::optimDoAutoScroll()
// - redraw the whole thing otherwise calculate the rect that
// needs drawing.
if ( d->od->numLines * fm.lineSpacing() < viewport()->height() ) {
- repaintContents( contentsX(), contentsY(), width(), height(), FALSE );
+ repaintContents( contentsX(), contentsY(), width(), height(), false );
} else {
int h = TQABS(mousePos.y() - oldMousePos.y()) + fm.lineSpacing() * 2;
int y;
@@ -7196,11 +7196,11 @@ void TQTextEdit::optimDoAutoScroll()
}
if ( y < 0 )
y = 0;
- repaintContents( contentsX(), y, width(), h, FALSE );
+ repaintContents( contentsX(), y, width(), h, false );
}
if ( (!scrollTimer->isActive() && pos.y() < 0) || pos.y() > height() )
- scrollTimer->start( 100, FALSE );
+ scrollTimer->start( 100, false );
else if ( scrollTimer->isActive() && pos.y() >= 0 && pos.y() <= height() )
scrollTimer->stop();
}
@@ -7242,7 +7242,7 @@ void TQTextEdit::optimSelectAll()
d->od->selEnd.line = d->od->numLines - 1;
d->od->selEnd.index = d->od->lines[ LOGOFFSET(d->od->selEnd.line) ].length();
- repaintContents( FALSE );
+ repaintContents( false );
emit copyAvailable( optimHasSelection() );
emit selectionChanged();
}
@@ -7252,7 +7252,7 @@ void TQTextEdit::optimRemoveSelection()
{
d->od->selStart.line = d->od->selEnd.line = -1;
d->od->selStart.index = d->od->selEnd.index = -1;
- repaintContents( FALSE );
+ repaintContents( false );
}
/*! \internal */
@@ -7268,10 +7268,8 @@ void TQTextEdit::optimSetSelection( int startLine, int startIdx,
/*! \internal */
bool TQTextEdit::optimHasSelection() const
{
- if ( d->od->selStart.line != d->od->selEnd.line ||
- d->od->selStart.index != d->od->selEnd.index )
- return TRUE;
- return FALSE;
+ return d->od->selStart.line != d->od->selEnd.line ||
+ d->od->selStart.index != d->od->selEnd.index;
}
/*! \internal */
@@ -7306,18 +7304,18 @@ TQString TQTextEdit::optimSelectedText() const
bool TQTextEdit::optimFind( const TQString & expr, bool cs, bool /*wo*/,
bool fw, int * para, int * index )
{
- bool found = FALSE;
+ bool found = false;
int parag = para ? *para : d->od->search.line,
idx = index ? *index : d->od->search.index, i;
if ( d->od->len == 0 )
- return FALSE;
+ return false;
for ( i = parag; fw ? i < d->od->numLines : i >= 0; fw ? i++ : i-- ) {
idx = fw ? d->od->lines[ LOGOFFSET(i) ].find( expr, idx, cs ) :
d->od->lines[ LOGOFFSET(i) ].findRev( expr, idx, cs );
if ( idx != -1 ) {
- found = TRUE;
+ found = true;
break;
} else if ( fw )
idx = 0;
diff --git a/src/widgets/tqtextedit.h b/src/widgets/tqtextedit.h
index 5ea273c6e..27846637a 100644
--- a/src/widgets/tqtextedit.h
+++ b/src/widgets/tqtextedit.h
@@ -233,7 +233,7 @@ public:
void getSelection( int *paraFrom, int *indexFrom,
int *paraTo, int *indexTo, int selNum = 0 ) const;
- virtual bool find( const TQString &expr, bool cs, bool wo, bool forward = TRUE,
+ virtual bool find( const TQString &expr, bool cs, bool wo, bool forward = true,
int *para = 0, int *index = 0 );
int paragraphs() const;
@@ -329,7 +329,7 @@ public slots:
virtual void setText( const TQString &txt, const TQString &context );
virtual void setTextFormat( TextFormat f );
- virtual void selectAll( bool select = TRUE );
+ virtual void selectAll( bool select = true );
virtual void setTabStopWidth( int ts );
virtual void zoomIn( int range );
virtual void zoomIn() { zoomIn( 1 ); }
@@ -384,7 +384,7 @@ public slots:
void insert( const TQString &text, uint insertionFlags = CheckNewLines | RemoveSelected ); // ## virtual in 4.0
// obsolete
- virtual void insert( const TQString &text, bool, bool = TRUE, bool = TRUE );
+ virtual void insert( const TQString &text, bool, bool = true, bool = true );
virtual void insertAt( const TQString &text, int para, int index );
virtual void removeParagraph( int para );
@@ -494,7 +494,7 @@ private:
void updateCursor( const TQPoint & pos );
void handleMouseMove( const TQPoint& pos );
void drawContents( TQPainter * );
- virtual bool linksEnabled() const { return FALSE; }
+ virtual bool linksEnabled() const { return false; }
void init();
void checkUndoRedoInfo( UndoRedoInfo::Type t );
void updateCurrentFormat();
@@ -514,7 +514,7 @@ private:
virtual void emitHighlighted( const TQString & ) {}
virtual void emitLinkClicked( const TQString & ) {}
- void readFormats( TQTextCursor &c1, TQTextCursor &c2, TQTextString &text, bool fillStyles = FALSE );
+ void readFormats( TQTextCursor &c1, TQTextCursor &c2, TQTextString &text, bool fillStyles = false );
void clearUndoRedo();
void paintDocument( bool drawAll, TQPainter *p, int cx = -1, int cy = -1, int cw = -1, int ch = -1 );
void moveCursor( CursorAction action );
diff --git a/src/widgets/tqtextview.cpp b/src/widgets/tqtextview.cpp
index a475d7b4a..febf8a047 100644
--- a/src/widgets/tqtextview.cpp
+++ b/src/widgets/tqtextview.cpp
@@ -48,7 +48,7 @@
\obsolete
This class wraps a read-only \l TQTextEdit.
- Use a \l TQTextEdit instead, and call setReadOnly(TRUE)
+ Use a \l TQTextEdit instead, and call setReadOnly(true)
to disable editing.
*/
@@ -58,7 +58,7 @@ TQTextView::TQTextView( const TQString& text, const TQString& context,
TQWidget *parent, const char *name )
: TQTextEdit( text, context, parent, name )
{
- setReadOnly( TRUE );
+ setReadOnly( true );
}
/*! \reimp */
@@ -66,7 +66,7 @@ TQTextView::TQTextView( const TQString& text, const TQString& context,
TQTextView::TQTextView( TQWidget *parent, const char *name )
: TQTextEdit( parent, name )
{
- setReadOnly( TRUE );
+ setReadOnly( true );
}
/*! \reimp */
diff --git a/src/widgets/tqtitlebar.cpp b/src/widgets/tqtitlebar.cpp
index 536bf4942..09968c170 100644
--- a/src/widgets/tqtitlebar.cpp
+++ b/src/widgets/tqtitlebar.cpp
@@ -178,7 +178,7 @@ TQTitleBar::TQTitleBar(TQWidget* w, TQWidget* parent, const char* name)
readColors();
setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
- setMouseTracking(TRUE);
+ setMouseTracking(true);
}
TQTitleBar::~TQTitleBar()
@@ -199,7 +199,7 @@ void TQTitleBar::readColors()
{
TQPalette pal = palette();
- bool colorsInitialized = FALSE;
+ bool colorsInitialized = false;
#ifdef TQ_WS_WIN // ask system properties on windows
#ifndef SPI_GETGRADIENTCAPTIONS
@@ -217,7 +217,7 @@ void TQTitleBar::readColors()
pal.setColor( TQPalette::Active, TQColorGroup::HighlightedText, qt_colorref2qrgb(GetSysColor(COLOR_CAPTIONTEXT)) );
pal.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, qt_colorref2qrgb(GetSysColor(COLOR_INACTIVECAPTIONTEXT)) );
if ( qt_winver != TQt::WV_95 && qt_winver != WV_NT ) {
- colorsInitialized = TRUE;
+ colorsInitialized = true;
BOOL gradient;
QT_WA( {
SystemParametersInfo( SPI_GETGRADIENTCAPTIONS, 0, &gradient, 0 );
@@ -251,7 +251,7 @@ void TQTitleBar::mousePressEvent( TQMouseEvent * e)
if ( !d->act )
emit doActivate();
if ( e->button() == LeftButton ) {
- d->pressed = TRUE;
+ d->pressed = true;
TQStyle::SCFlags ctrl = style().querySubControl(TQStyle::CC_TitleBar, this, e->pos());
switch (ctrl) {
case TQStyle::SC_TitleBarSysMenu:
@@ -307,9 +307,9 @@ void TQTitleBar::mousePressEvent( TQMouseEvent * e)
default:
break;
}
- repaint( FALSE );
+ repaint( false );
} else {
- d->pressed = FALSE;
+ d->pressed = false;
}
}
@@ -357,7 +357,7 @@ void TQTitleBar::mouseReleaseEvent( TQMouseEvent * e)
case TQStyle::SC_TitleBarCloseButton:
if( testWFlags( WStyle_SysMenu ) ) {
d->buttonDown = TQStyle::SC_None;
- repaint(FALSE);
+ repaint(false);
emit doClose();
return;
}
@@ -368,8 +368,8 @@ void TQTitleBar::mouseReleaseEvent( TQMouseEvent * e)
}
}
d->buttonDown = TQStyle::SC_None;
- repaint(FALSE);
- d->pressed = FALSE;
+ repaint(false);
+ d->pressed = false;
}
}
@@ -378,7 +378,7 @@ void TQTitleBar::mouseMoveEvent( TQMouseEvent * e)
switch (d->buttonDown) {
case TQStyle::SC_None:
if(autoRaise())
- repaint( FALSE );
+ repaint( false );
break;
case TQStyle::SC_TitleBarSysMenu:
break;
@@ -393,7 +393,7 @@ void TQTitleBar::mouseMoveEvent( TQMouseEvent * e)
d->buttonDown = style().querySubControl(TQStyle::CC_TitleBar, this, e->pos());
if( d->buttonDown != last_ctrl)
d->buttonDown = TQStyle::SC_None;
- repaint(FALSE);
+ repaint(false);
d->buttonDown = last_ctrl;
}
break;
@@ -428,7 +428,7 @@ void TQTitleBar::mouseMoveEvent( TQMouseEvent * e)
TQStyle::SCFlags last_ctrl = d->buttonDown;
d->buttonDown = TQStyle::SC_None;
if( d->buttonDown != last_ctrl)
- repaint(FALSE);
+ repaint(false);
}
break;
}
@@ -583,13 +583,13 @@ void TQTitleBar::setIcon( const TQPixmap& icon )
void TQTitleBar::leaveEvent( TQEvent * )
{
if(autoRaise() && !d->pressed)
- repaint( FALSE );
+ repaint( false );
}
void TQTitleBar::enterEvent( TQEvent * )
{
if(autoRaise() && !d->pressed)
- repaint( FALSE );
+ repaint( false );
TQEvent e( TQEvent::Leave );
TQApplication::sendEvent( parentWidget(), &e );
}
@@ -628,12 +628,12 @@ bool TQTitleBar::event( TQEvent* e )
{
if ( e->type() == TQEvent::ApplicationPaletteChange ) {
readColors();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::WindowActivate ) {
setActive( d->act );
} else if ( e->type() == TQEvent::WindowDeactivate ) {
bool wasActive = d->act;
- setActive( FALSE );
+ setActive( false );
d->act = wasActive;
}
diff --git a/src/widgets/tqtoolbar.cpp b/src/widgets/tqtoolbar.cpp
index 43281cf9a..f571ffad8 100644
--- a/src/widgets/tqtoolbar.cpp
+++ b/src/widgets/tqtoolbar.cpp
@@ -89,7 +89,7 @@ class TQToolBarExtensionWidget;
class TQToolBarPrivate
{
public:
- TQToolBarPrivate() : moving( FALSE ) {
+ TQToolBarPrivate() : moving( false ) {
}
bool moving;
@@ -142,7 +142,7 @@ TQToolBarExtensionWidget::TQToolBarExtensionWidget( TQWidget *w )
: TQWidget( w, "qt_dockwidget_internal" )
{
tb = new TQToolButton( this, "qt_toolbar_ext_button" );
- tb->setAutoRaise( TRUE );
+ tb->setAutoRaise( true );
setOrientation( Horizontal );
}
@@ -293,7 +293,7 @@ void TQToolBarSeparator::paintEvent( TQPaintEvent * )
/*!
\fn TQToolBar::TQToolBar( const TQString &label,
TQMainWindow *, ToolBarDock = Top,
- bool newLine = FALSE, const char * name = 0 );
+ bool newLine = false, const char * name = 0 );
\obsolete
*/
@@ -302,14 +302,14 @@ void TQToolBarSeparator::paintEvent( TQPaintEvent * )
The toolbar is called \a name and is a child of \a parent and is
managed by \a parent. It is initially located in dock area \a dock
- and is labeled \a label. If \a newLine is TRUE the toolbar will be
+ and is labeled \a label. If \a newLine is true the toolbar will be
placed on a new line in the dock area.
*/
TQToolBar::TQToolBar( const TQString &label,
TQMainWindow * parent, TQMainWindow::ToolBarDock dock,
bool newLine, const char * name )
- : TQDockWindow( InDock, parent, name, 0, TRUE )
+ : TQDockWindow( InDock, parent, name, 0, true )
{
mw = parent;
init();
@@ -335,13 +335,13 @@ TQToolBar::TQToolBar( const TQString &label,
TQToolBar::TQToolBar( const TQString &label, TQMainWindow * mainWindow,
TQWidget * parent, bool newLine, const char * name,
WFlags f )
- : TQDockWindow( InDock, parent, name, f, TRUE )
+ : TQDockWindow( InDock, parent, name, f, true )
{
mw = mainWindow;
init();
clearWFlags( WType_Dialog | WStyle_Customize | WStyle_NoBorder );
- reparent( parent, TQPoint( 0, 0 ), FALSE );
+ reparent( parent, TQPoint( 0, 0 ), false );
if ( mainWindow )
mainWindow->addToolBar( this, label, TQMainWindow::DockUnmanaged, newLine );
@@ -357,7 +357,7 @@ TQToolBar::TQToolBar( const TQString &label, TQMainWindow * mainWindow,
*/
TQToolBar::TQToolBar( TQMainWindow * parent, const char * name )
- : TQDockWindow( InDock, parent, name, 0, TRUE )
+ : TQDockWindow( InDock, parent, name, 0, true )
{
mw = parent;
init();
@@ -451,7 +451,7 @@ void TQToolBar::show()
{
TQDockWindow::show();
if ( mw )
- mw->triggerLayout( FALSE );
+ mw->triggerLayout( false );
checkForExtension( size() );
}
@@ -464,7 +464,7 @@ void TQToolBar::hide()
{
TQDockWindow::hide();
if ( mw )
- mw->triggerLayout( FALSE );
+ mw->triggerLayout( false );
}
/*!
@@ -484,7 +484,7 @@ TQMainWindow * TQToolBar::mainWindow() const
The request to stretch might occur because TQMainWindow
right-justifies the dock area the toolbar is in, or because this
toolbar's isVerticalStretchable() or isHorizontalStretchable() is
- set to TRUE.
+ set to true.
If you call this function and the toolbar is not yet stretchable,
setStretchable() is called.
@@ -500,9 +500,9 @@ void TQToolBar::setStretchableWidget( TQWidget * w )
if ( !isHorizontalStretchable() && !isVerticalStretchable() ) {
if ( orientation() == Horizontal )
- setHorizontalStretchable( TRUE );
+ setHorizontalStretchable( true );
else
- setVerticalStretchable( TRUE );
+ setVerticalStretchable( true );
}
}
@@ -614,14 +614,14 @@ void TQToolBar::createPopup()
d->extensionPopup->clear();
// clear doesn't delete submenus, so do this explicitly
- TQObjectList *childlist = d->extensionPopup->queryList( "TQPopupMenu", 0, FALSE, TRUE );
- childlist->setAutoDelete(TRUE);
+ TQObjectList *childlist = d->extensionPopup->queryList( "TQPopupMenu", 0, false, true );
+ childlist->setAutoDelete(true);
delete childlist;
- childlist = queryList( "TQWidget", 0, FALSE, TRUE );
+ childlist = queryList( "TQWidget", 0, false, true );
TQObjectListIt it( *childlist );
- bool hide = FALSE;
- bool doHide = FALSE;
+ bool hide = false;
+ bool doHide = false;
int id;
while ( it.current() ) {
int j = 2;
@@ -635,17 +635,17 @@ void TQToolBar::createPopup()
if ( ::tqt_cast<TQComboBox*>(w) )
j = 1;
#endif
- hide = FALSE;
+ hide = false;
TQPoint p = w->parentWidget()->mapTo( this, w->geometry().bottomRight() );
if ( orientation() == Horizontal ) {
if ( p.x() > ( doHide ? width() - d->extension->width() / j : width() ) )
- hide = TRUE;
+ hide = true;
} else {
if ( p.y() > ( doHide ? height()- d->extension->height() / j : height() ) )
- hide = TRUE;
+ hide = true;
}
if ( hide && w->isVisible() ) {
- doHide = TRUE;
+ doHide = true;
if ( ::tqt_cast<TQToolButton*>(w) ) {
TQToolButton *b = (TQToolButton*)w;
TQString s = b->textLabel();
@@ -658,7 +658,7 @@ void TQToolBar::createPopup()
if ( b->isToggleButton() )
d->extensionPopup->setItemChecked( id, b->isOn() );
if ( !b->isEnabled() )
- d->extensionPopup->setItemEnabled( id, FALSE );
+ d->extensionPopup->setItemEnabled( id, false );
} else if ( ::tqt_cast<TQButton*>(w) ) {
TQButton *b = (TQButton*)w;
TQString s = b->text();
@@ -671,7 +671,7 @@ void TQToolBar::createPopup()
if ( b->isToggleButton() )
d->extensionPopup->setItemChecked( id, b->isOn() );
if ( !b->isEnabled() )
- d->extensionPopup->setItemEnabled( id, FALSE );
+ d->extensionPopup->setItemEnabled( id, false );
#ifndef TQT_NO_COMBOBOX
} else if ( ::tqt_cast<TQComboBox*>(w) ) {
TQComboBox *c = (TQComboBox*)w;
@@ -692,7 +692,7 @@ void TQToolBar::createPopup()
TQString tmp = c->text( i );
cp->insertItem( tmp, i );
if ( c->currentText() == tmp )
- cp->setItemChecked( i, TRUE );
+ cp->setItemChecked( i, true );
if ( !maxItems ) {
if ( cp->count() == 10 ) {
int h = cp->sizeHint().height();
diff --git a/src/widgets/tqtoolbar.h b/src/widgets/tqtoolbar.h
index 572cb0d95..4e450075e 100644
--- a/src/widgets/tqtoolbar.h
+++ b/src/widgets/tqtoolbar.h
@@ -60,9 +60,9 @@ class TQ_EXPORT TQToolBar: public TQDockWindow
public:
TQToolBar( const TQString &label,
TQMainWindow *, ToolBarDock = DockTop,
- bool newLine = FALSE, const char* name=0 );
+ bool newLine = false, const char* name=0 );
TQToolBar( const TQString &label, TQMainWindow *, TQWidget *,
- bool newLine = FALSE, const char* name=0, WFlags f = 0 );
+ bool newLine = false, const char* name=0, WFlags f = 0 );
TQToolBar( TQMainWindow* parent=0, const char* name=0 );
~TQToolBar();
diff --git a/src/widgets/tqtoolbox.cpp b/src/widgets/tqtoolbox.cpp
index e5b139035..d99033358 100644
--- a/src/widgets/tqtoolbox.cpp
+++ b/src/widgets/tqtoolbox.cpp
@@ -60,7 +60,7 @@ class TQToolBoxButton : public TQButton
{
public:
TQToolBoxButton( TQWidget *parent, const char *name )
- : TQButton( parent, name ), selected( FALSE )
+ : TQButton( parent, name ), selected( false )
{
setBackgroundMode(PaletteBackground);
setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
@@ -148,7 +148,7 @@ TQToolBoxPrivate::Page *TQToolBoxPrivate::page( int index )
void TQToolBoxPrivate::updateTabs()
{
TQToolBoxButton *lastButton = currentPage ? currentPage->button : 0;
- bool after = FALSE;
+ bool after = false;
for ( PageList::ConstIterator i = pageList.constBegin(); i != pageList.constEnd(); ++i ) {
if (after) {
(*i).button->setEraseColor((*i).widget->eraseColor());
@@ -211,7 +211,7 @@ void TQToolBoxButton::drawButton( TQPainter *p )
if ( selected && style().styleHint( TQStyle::SH_ToolBox_SelectedPageTitleBold ) ) {
TQFont f( p->font() );
- f.setBold( TRUE );
+ f.setBold( true );
p->setFont( f );
}
@@ -430,10 +430,10 @@ void TQToolBox::setCurrentItem( TQWidget *item )
if ( !c || d->currentPage == c )
return;
- c->button->setSelected( TRUE );
+ c->button->setSelected( true );
if ( d->currentPage ) {
d->currentPage->sv->hide();
- d->currentPage->button->setSelected(FALSE);
+ d->currentPage->button->setSelected(false);
}
d->currentPage = c;
d->currentPage->sv->show();
@@ -542,7 +542,7 @@ int TQToolBox::indexOf( TQWidget *item ) const
}
/*!
- If \a enabled is TRUE then the item at position \a index is enabled; otherwise item
+ If \a enabled is true then the item at position \a index is enabled; otherwise item
\a index is disabled.
*/
@@ -610,7 +610,7 @@ void TQToolBox::setItemToolTip( int index, const TQString &toolTip )
}
/*!
- Returns TRUE if the item at position \a index is enabled; otherwise returns FALSE.
+ Returns true if the item at position \a index is enabled; otherwise returns false.
*/
bool TQToolBox::isItemEnabled( int index ) const
diff --git a/src/widgets/tqtoolbutton.cpp b/src/widgets/tqtoolbutton.cpp
index fab5ffb93..176059290 100644
--- a/src/widgets/tqtoolbutton.cpp
+++ b/src/widgets/tqtoolbutton.cpp
@@ -106,7 +106,7 @@ public:
TQMainWindow's settings (see TQMainWindow::setUsesTextLabel() and
TQMainWindow::setUsesBigPixmaps()). The pixmap set on a TQToolButton
will be set to 22x22 if it is bigger than this size. If
- usesBigPixmap() is TRUE, then the pixmap will be set to 32x32.
+ usesBigPixmap() is true, then the pixmap will be set to 32x32.
A tool button can offer additional choices in a popup menu. The
feature is sometimes used with the "Back" button in a web browser.
@@ -145,7 +145,7 @@ TQToolButton::TQToolButton( TQWidget * parent, const char *name )
#ifndef TQT_NO_TOOLBAR
TQToolBar* tb = ::tqt_cast<TQToolBar*>(parent);
if ( tb ) {
- setAutoRaise( TRUE );
+ setAutoRaise( true );
if ( tb->mainWindow() ) {
connect( tb->mainWindow(), TQ_SIGNAL(pixmapSizeChanged(bool)),
this, TQ_SLOT(setUsesBigPixmap(bool)) );
@@ -154,12 +154,12 @@ TQToolButton::TQToolButton( TQWidget * parent, const char *name )
this, TQ_SLOT(setUsesTextLabel(bool)) );
setUsesTextLabel( tb->mainWindow()->usesTextLabel() );
} else {
- setUsesBigPixmap( FALSE );
+ setUsesBigPixmap( false );
}
} else
#endif
{
- setUsesBigPixmap( FALSE );
+ setUsesBigPixmap( false );
}
}
@@ -178,10 +178,10 @@ TQToolButton::TQToolButton( ArrowType type, TQWidget *parent, const char *name )
: TQButton( parent, name )
{
init();
- setUsesBigPixmap( FALSE );
- setAutoRepeat( TRUE );
+ setUsesBigPixmap( false );
+ setAutoRepeat( true );
d->arrow = type;
- hasArrow = TRUE;
+ hasArrow = true;
}
@@ -196,16 +196,16 @@ void TQToolButton::init()
d->popup = 0;
d->popupTimer = 0;
#endif
- d->autoraise = FALSE;
+ d->autoraise = false;
d->arrow = LeftArrow;
- d->instantPopup = FALSE;
- d->discardNextMouseEvent = FALSE;
+ d->instantPopup = false;
+ d->discardNextMouseEvent = false;
bpID = bp.serialNumber();
spID = sp.serialNumber();
- utl = FALSE;
- ubp = TRUE;
- hasArrow = FALSE;
+ utl = false;
+ ubp = true;
+ hasArrow = false;
s = 0;
@@ -233,7 +233,7 @@ TQToolButton::TQToolButton( const TQIconSet& iconSet, const TQString &textLabel,
: TQButton( parent, name )
{
init();
- setAutoRaise( TRUE );
+ setAutoRaise( true );
setIconSet( iconSet );
setTextLabel( textLabel );
if ( receiver && slot )
@@ -246,7 +246,7 @@ TQToolButton::TQToolButton( const TQIconSet& iconSet, const TQString &textLabel,
this, TQ_SLOT(setUsesTextLabel(bool)) );
setUsesTextLabel( parent->mainWindow()->usesTextLabel() );
} else {
- setUsesBigPixmap( FALSE );
+ setUsesBigPixmap( false );
}
#ifndef TQT_NO_TOOLTIP
if ( !textLabel.isEmpty() ) {
@@ -375,7 +375,7 @@ TQSize TQToolButton::minimumSizeHint() const
signal in the TQMainWindow in which it resides. We strongly
recommend that you use TQMainWindow::setUsesBigPixmaps() instead.
- This property's default is TRUE.
+ This property's default is true.
\warning If you set some buttons (in a TQMainWindow) to have big
pixmaps and others to have small pixmaps, TQMainWindow may not get
@@ -399,7 +399,7 @@ void TQToolButton::setUsesBigPixmap( bool enable )
\property TQToolButton::usesTextLabel
\brief whether the toolbutton displays a text label below the button pixmap.
- The default is FALSE.
+ The default is false.
TQToolButton automatically connects this slot to the relevant
signal in the TQMainWindow in which is resides.
@@ -423,7 +423,7 @@ void TQToolButton::setUsesTextLabel( bool enable )
\brief whether this tool button is on.
This property has no effect on \link isToggleButton() non-toggling
- buttons. \endlink The default is FALSE (i.e. off).
+ buttons. \endlink The default is false (i.e. off).
\sa isToggleButton() toggle()
*/
@@ -545,7 +545,7 @@ void TQToolButton::drawButtonLabel(TQPainter *p)
void TQToolButton::enterEvent( TQEvent * e )
{
if ( autoRaise() && isEnabled() )
- repaint(FALSE);
+ repaint(false);
TQButton::enterEvent( e );
}
@@ -557,7 +557,7 @@ void TQToolButton::enterEvent( TQEvent * e )
void TQToolButton::leaveEvent( TQEvent * e )
{
if ( autoRaise() && isEnabled() )
- repaint(FALSE);
+ repaint(false);
TQButton::leaveEvent( e );
}
@@ -571,7 +571,7 @@ void TQToolButton::moveEvent( TQMoveEvent * )
// has a fancy pixmap background.
if ( parentWidget() && parentWidget()->backgroundPixmap() &&
autoRaise() && !uses3D() )
- repaint( FALSE );
+ repaint( false );
}
/*!
@@ -586,8 +586,8 @@ void TQToolButton::mousePressEvent( TQMouseEvent *e )
#ifndef TQT_NO_POPUPMENU
if ( d->discardNextMouseEvent ) {
- d->discardNextMouseEvent = FALSE;
- d->instantPopup = FALSE;
+ d->discardNextMouseEvent = false;
+ d->instantPopup = false;
d->popup->removeEventFilter( this );
return;
}
@@ -597,7 +597,7 @@ void TQToolButton::mousePressEvent( TQMouseEvent *e )
}
#endif
- d->instantPopup = FALSE;
+ d->instantPopup = false;
TQButton::mousePressEvent( e );
}
@@ -615,8 +615,8 @@ bool TQToolButton::eventFilter( TQObject *o, TQEvent *e )
{
TQMouseEvent *me = (TQMouseEvent*)e;
TQPoint p = me->globalPos();
- if ( TQApplication::widgetAt( p, TRUE ) == this )
- d->discardNextMouseEvent = TRUE;
+ if ( TQApplication::widgetAt( p, true ) == this )
+ d->discardNextMouseEvent = true;
}
break;
default:
@@ -627,8 +627,8 @@ bool TQToolButton::eventFilter( TQObject *o, TQEvent *e )
}
/*!
- Returns TRUE if this button should be drawn using raised edges;
- otherwise returns FALSE.
+ Returns true if this button should be drawn using raised edges;
+ otherwise returns false.
\sa drawButton()
*/
@@ -654,14 +654,14 @@ bool TQToolButton::uses3D() const
void TQToolButton::setTextLabel( const TQString &newLabel )
{
- setTextLabel( newLabel, TRUE );
+ setTextLabel( newLabel, true );
}
/*!
\overload
Sets the label of this button to \a newLabel and automatically
- sets it as a tool tip if \a tipToo is TRUE.
+ sets it as a tool tip if \a tipToo is true.
*/
void TQToolButton::setTextLabel( const TQString &newLabel , bool tipToo )
@@ -779,22 +779,22 @@ void TQToolButton::openPopup()
if ( !d->popup )
return;
- d->instantPopup = TRUE;
- repaint( FALSE );
+ d->instantPopup = true;
+ repaint( false );
if ( d->popupTimer )
d->popupTimer->stop();
TQGuardedPtr<TQToolButton> that = this;
popupTimerDone();
if ( !that )
return;
- d->instantPopup = FALSE;
- repaint( FALSE );
+ d->instantPopup = false;
+ repaint( false );
}
void TQToolButton::popupPressed()
{
if ( d->popupTimer && d->delay > 0 )
- d->popupTimer->start( d->delay, TRUE );
+ d->popupTimer->start( d->delay, true );
}
void TQToolButton::popupTimerDone()
@@ -804,12 +804,12 @@ void TQToolButton::popupTimerDone()
d->popup->installEventFilter( this );
d->repeat = autoRepeat();
- setAutoRepeat( FALSE );
- bool horizontal = TRUE;
+ setAutoRepeat( false );
+ bool horizontal = true;
#ifndef TQT_NO_TOOLBAR
TQToolBar *tb = ::tqt_cast<TQToolBar*>(parentWidget());
if ( tb && tb->orientation() == Vertical )
- horizontal = FALSE;
+ horizontal = false;
#endif
TQPoint p;
TQRect screen = tqApp->desktop()->availableGeometry( this );
@@ -849,9 +849,9 @@ void TQToolButton::popupTimerDone()
if ( !that )
return;
- setDown( FALSE );
+ setDown( false );
if ( d->repeat )
- setAutoRepeat( TRUE );
+ setAutoRepeat( true );
}
/*!
@@ -882,7 +882,7 @@ int TQToolButton::popupDelay() const
\property TQToolButton::autoRaise
\brief whether auto-raising is enabled or not.
- The default is disabled (i.e. FALSE).
+ The default is disabled (i.e. false).
*/
void TQToolButton::setAutoRaise( bool enable )
{
diff --git a/src/widgets/tqtooltip.cpp b/src/widgets/tqtooltip.cpp
index 32211ec9f..8599a611d 100644
--- a/src/widgets/tqtooltip.cpp
+++ b/src/widgets/tqtooltip.cpp
@@ -45,7 +45,7 @@
#include "tqtimer.h"
#include "tqeffects_p.h"
-static bool globally_enabled = TRUE;
+static bool globally_enabled = true;
// Magic value meaning an entire widget - if someone tries to insert a
// tool tip on this part of a widget it will be interpreted as the
@@ -67,7 +67,7 @@ public:
WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM )
{
setMargin(1);
- setAutoMask( FALSE );
+ setAutoMask( false );
setFrameStyle( TQFrame::Plain | TQFrame::Box );
setLineWidth( 1 );
setAlignment( AlignAuto | AlignTop );
@@ -106,7 +106,7 @@ public:
TQToolTipGroup *, const TQString& , TQToolTip *, bool );
void add( TQWidget *, const TQRect &, const TQString& ,
TQToolTipGroup *, const TQString& , TQToolTip *, bool );
- void remove( TQWidget *, const TQRect &, bool delayhide = FALSE );
+ void remove( TQWidget *, const TQRect &, bool delayhide = false );
void remove( TQWidget * );
void removeFromGroup( TQToolTipGroup * );
@@ -163,8 +163,8 @@ TQTipManager::TQTipManager()
currentTip = 0;
previousTip = 0;
label = 0;
- preventAnimation = FALSE;
- isApplicationFilter = FALSE;
+ preventAnimation = false;
+ isApplicationFilter = false;
connect( &wakeUp, TQ_SIGNAL(timeout()), TQ_SLOT(showTip()) );
connect( &fallAsleep, TQ_SIGNAL(timeout()), TQ_SLOT(hideTip()) );
removeTimer = new TQTimer( this );
@@ -174,7 +174,7 @@ TQTipManager::TQTipManager()
TQTipManager::~TQTipManager()
{
if ( isApplicationFilter && !tqApp->closingDown() ) {
- tqApp->setGlobalMouseTracking( FALSE );
+ tqApp->setGlobalMouseTracking( false );
tqApp->removeEventFilter( tipManager );
}
@@ -206,7 +206,7 @@ void TQTipManager::add( const TQRect &gm, TQWidget *w,
TQToolTipGroup *g, const TQString& gs,
TQToolTip *tt, bool a )
{
- remove( w, r, TRUE );
+ remove( w, r, true );
TQTipManager::Tip *h = (*tips)[ w ];
TQTipManager::Tip *t = new TQTipManager::Tip;
t->next = h;
@@ -235,9 +235,9 @@ void TQTipManager::add( const TQRect &gm, TQWidget *w,
}
if ( !isApplicationFilter && tqApp ) {
- isApplicationFilter = TRUE;
+ isApplicationFilter = true;
tqApp->installEventFilter( tipManager );
- tqApp->setGlobalMouseTracking( TRUE );
+ tqApp->setGlobalMouseTracking( true );
}
if ( t->group ) {
@@ -266,7 +266,7 @@ void TQTipManager::remove( TQWidget *w, const TQRect & r, bool delayhide )
if (!delayhide)
hideTip();
else
- currentTip->autoDelete = TRUE;
+ currentTip->autoDelete = true;
}
if ( t == previousTip )
@@ -382,14 +382,14 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e )
|| e->type() == TQEvent::Timer
|| e->type() == TQEvent::SockAct
|| !tips )
- return FALSE;
+ return false;
TQWidget *w = (TQWidget *)obj;
if ( e->type() == TQEvent::FocusOut || e->type() == TQEvent::FocusIn ) {
// user moved focus somewhere - hide the tip and sleep
if ( ((TQFocusEvent*)e)->reason() != TQFocusEvent::Popup )
hideTipAndSleep();
- return FALSE;
+ return false;
}
TQTipManager::Tip *t = 0;
@@ -399,13 +399,13 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e )
w = w->isTopLevel() ? 0 : w->parentWidget();
}
if ( !w )
- return FALSE;
+ return false;
if ( !t && e->type() != TQEvent::MouseMove) {
if ( ( e->type() >= TQEvent::MouseButtonPress &&
e->type() <= TQEvent::FocusOut) || e->type() == TQEvent::Leave )
hideTip();
- return FALSE;
+ return false;
}
// with that out of the way, let's get down to action
@@ -427,7 +427,7 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e )
if ( currentTip && !currentTip->rect.contains( mousePos ) ) {
hideTip();
if ( m->state() == 0 )
- return FALSE;
+ return false;
}
wakeUp.stop();
@@ -435,13 +435,13 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e )
mousePos.x() >= 0 && mousePos.x() < w->width() &&
mousePos.y() >= 0 && mousePos.y() < w->height() ) {
if ( label && label->isVisible() ) {
- return FALSE;
+ return false;
} else {
if ( fallAsleep.isActive() ) {
- wakeUp.start( 1, TRUE );
+ wakeUp.start( 1, true );
} else {
previousTip = 0;
- wakeUp.start( wakeUpDelay, TRUE );
+ wakeUp.start( wakeUpDelay, true );
}
if ( t->group && t->group->ena &&
!t->group->del && !t->groupText.isEmpty() ) {
@@ -452,7 +452,7 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e )
}
widget = w;
pos = mousePos;
- return FALSE;
+ return false;
} else {
hideTip();
}
@@ -467,7 +467,7 @@ bool TQTipManager::eventFilter( TQObject *obj, TQEvent *e )
default:
break;
}
- return FALSE;
+ return false;
}
@@ -571,7 +571,7 @@ void TQTipManager::showTip()
label->move( p );
#ifndef TQT_NO_EFFECTS
- if ( TQApplication::isEffectEnabled( UI_AnimateTooltip ) == FALSE ||
+ if ( TQApplication::isEffectEnabled( UI_AnimateTooltip ) == false ||
previousTip || preventAnimation )
label->show();
else if ( TQApplication::isEffectEnabled( UI_FadeTooltip ) )
@@ -583,7 +583,7 @@ void TQTipManager::showTip()
#endif
label->raise();
- fallAsleep.start( 10000, TRUE );
+ fallAsleep.start( 10000, true );
}
if ( t->group && t->group->del && !t->groupText.isEmpty() ) {
@@ -599,21 +599,21 @@ void TQTipManager::showTip()
void TQTipManager::hideTip()
{
TQTimer::singleShot( 250, this, TQ_SLOT(allowAnimation()) );
- preventAnimation = TRUE;
+ preventAnimation = true;
if ( label && label->isVisible() ) {
label->hide();
- fallAsleep.start( 2000, TRUE );
+ fallAsleep.start( 2000, true );
wakeUp.stop();
if ( currentTip && currentTip->group )
- removeTimer->start( 100, TRUE );
+ removeTimer->start( 100, true );
} else if ( wakeUp.isActive() ) {
wakeUp.stop();
if ( currentTip && currentTip->group &&
!currentTip->group->del && !currentTip->groupText.isEmpty() )
- removeTimer->start( 100, TRUE );
+ removeTimer->start( 100, true );
} else if ( currentTip && currentTip->group ) {
- removeTimer->start( 100, TRUE );
+ removeTimer->start( 100, true );
}
previousTip = currentTip;
@@ -632,7 +632,7 @@ void TQTipManager::hideTipAndSleep()
void TQTipManager::allowAnimation()
{
- preventAnimation = FALSE;
+ preventAnimation = false;
}
TQString TQTipManager::find( TQWidget *w, const TQPoint& pos )
@@ -762,7 +762,7 @@ TQFont TQToolTip::font()
void TQToolTip::setFont( const TQFont &font )
{
- TQApplication::setFont( font, TRUE, "TQTipLabel" );
+ TQApplication::setFont( font, true, "TQTipLabel" );
}
@@ -787,7 +787,7 @@ TQPalette TQToolTip::palette()
void TQToolTip::setPalette( const TQPalette &palette )
{
- TQApplication::setPalette( palette, TRUE, "TQTipLabel" );
+ TQApplication::setPalette( palette, true, "TQTipLabel" );
}
/*!
@@ -821,7 +821,7 @@ TQToolTip::TQToolTip( TQWidget * widget, TQToolTipGroup * group )
g = group;
initTipManager();
tipManager->add( p, entireWidget(),
- TQString::null, g, TQString::null, this, FALSE );
+ TQString::null, g, TQString::null, this, false );
}
TQToolTip::~TQToolTip()
@@ -842,7 +842,7 @@ void TQToolTip::add( TQWidget *widget, const TQString &text )
{
initTipManager();
tipManager->add( widget, entireWidget(),
- text, 0, TQString::null, 0, FALSE );
+ text, 0, TQString::null, 0, false );
}
@@ -862,7 +862,7 @@ void TQToolTip::add( TQWidget *widget, const TQString &text,
TQToolTipGroup *group, const TQString& longText )
{
initTipManager();
- tipManager->add( widget, entireWidget(), text, group, longText, 0, FALSE );
+ tipManager->add( widget, entireWidget(), text, group, longText, 0, false );
}
@@ -889,7 +889,7 @@ void TQToolTip::remove( TQWidget * widget )
void TQToolTip::add( TQWidget * widget, const TQRect & rect, const TQString &text )
{
initTipManager();
- tipManager->add( widget, rect, text, 0, TQString::null, 0, FALSE );
+ tipManager->add( widget, rect, text, 0, TQString::null, 0, false );
}
@@ -912,7 +912,7 @@ void TQToolTip::add( TQWidget *widget, const TQRect &rect,
TQToolTipGroup *group, const TQString& groupText )
{
initTipManager();
- tipManager->add( widget, rect, text, group, groupText, 0, FALSE );
+ tipManager->add( widget, rect, text, group, groupText, 0, false );
}
@@ -1003,7 +1003,7 @@ void TQToolTip::hide()
void TQToolTip::tip( const TQRect & rect, const TQString &text )
{
initTipManager();
- tipManager->add( parentWidget(), rect, text, 0, TQString::null, 0, TRUE );
+ tipManager->add( parentWidget(), rect, text, 0, TQString::null, 0, true );
}
/*!
@@ -1022,7 +1022,7 @@ void TQToolTip::tip( const TQRect & rect, const TQString &text,
const TQString& groupText )
{
initTipManager();
- tipManager->add( parentWidget(), rect, text, group(), groupText, 0, TRUE );
+ tipManager->add( parentWidget(), rect, text, group(), groupText, 0, true );
}
/*!
@@ -1042,7 +1042,7 @@ void TQToolTip::tip( const TQRect & rect, const TQString &text,
void TQToolTip::tip( const TQRect &rect, const TQString &text, const TQRect &geometry )
{
initTipManager();
- tipManager->add( geometry, parentWidget(), rect, text, 0, TQString::null, 0, TRUE );
+ tipManager->add( geometry, parentWidget(), rect, text, 0, TQString::null, 0, true );
}
/*!
@@ -1063,7 +1063,7 @@ void TQToolTip::tip( const TQRect &rect, const TQString &text, const TQRect &geo
void TQToolTip::tip( const TQRect &rect, const TQString &text, const TQString& groupText, const TQRect &geometry )
{
initTipManager();
- tipManager->add( geometry, parentWidget(), rect, text, group(), groupText, 0, TRUE );
+ tipManager->add( geometry, parentWidget(), rect, text, group(), groupText, 0, true );
}
@@ -1167,8 +1167,8 @@ void TQToolTip::clear()
TQToolTipGroup::TQToolTipGroup( TQObject *parent, const char *name )
: TQObject( parent, name )
{
- del = TRUE;
- ena = TRUE;
+ del = true;
+ ena = true;
}
@@ -1187,7 +1187,7 @@ TQToolTipGroup::~TQToolTipGroup()
\property TQToolTipGroup::delay
\brief whether the display of the group text is delayed.
- If set to TRUE (the default), the group text is displayed at the
+ If set to true (the default), the group text is displayed at the
same time as the tool tip. Otherwise, the group text is displayed
immediately when the cursor enters the widget.
*/
@@ -1221,7 +1221,7 @@ void TQToolTipGroup::setDelay( bool enable )
\property TQToolTipGroup::enabled
\brief whether tool tips in the group are enabled.
- This property's default is TRUE.
+ This property's default is true.
*/
void TQToolTipGroup::setEnabled( bool enable )
@@ -1235,8 +1235,8 @@ bool TQToolTipGroup::enabled() const
}
/*!
- If \a enable is TRUE sets all tool tips to be enabled (shown when
- needed); if \a enable is FALSE sets all tool tips to be disabled
+ If \a enable is true sets all tool tips to be enabled (shown when
+ needed); if \a enable is false sets all tool tips to be disabled
(never shown).
By default, tool tips are enabled. Note that this function affects
diff --git a/src/widgets/tqvalidator.cpp b/src/widgets/tqvalidator.cpp
index d04a2fa70..d46e7484e 100644
--- a/src/widgets/tqvalidator.cpp
+++ b/src/widgets/tqvalidator.cpp
@@ -429,9 +429,9 @@ TQValidator::State TQDoubleValidator::validate( TQString & input, int & ) const
return Invalid;
if ( empty.exactMatch(input) )
return Intermediate;
- bool ok = TRUE;
+ bool ok = true;
double entered = input.toDouble( &ok );
- int nume = input.contains( 'e', FALSE );
+ int nume = input.contains( 'e', false );
if ( !ok ) {
// explicit exponent regexp
TQRegExp expexpexp( TQString::fromLatin1("[Ee][+-]?\\d*$") );
@@ -574,7 +574,7 @@ void TQDoubleValidator::setDecimals( int decimals )
// match most 'readme' files
rx.setPattern( "read\\S?me(\.(txt|asc|1st))?" );
- rx.setCaseSensitive( FALSE );
+ rx.setCaseSensitive( false );
v.setRegExp( rx );
s = "readme"; v.validate( s, pos ); // Returns Acceptable
s = "README.1ST"; v.validate( s, pos ); // Returns Acceptable
diff --git a/src/widgets/tqvbox.cpp b/src/widgets/tqvbox.cpp
index ad6c7e0b7..11784e736 100644
--- a/src/widgets/tqvbox.cpp
+++ b/src/widgets/tqvbox.cpp
@@ -65,7 +65,7 @@
widget flags \a f.
*/
TQVBox::TQVBox( TQWidget *parent, const char *name, WFlags f )
- :TQHBox( FALSE, parent, name, f )
+ :TQHBox( false, parent, name, f )
{
}
#endif
diff --git a/src/widgets/tqwhatsthis.cpp b/src/widgets/tqwhatsthis.cpp
index 6f4a7ec10..d4906554e 100644
--- a/src/widgets/tqwhatsthis.cpp
+++ b/src/widgets/tqwhatsthis.cpp
@@ -241,12 +241,12 @@ void tqWhatsThisBDH()
TQWhatsThat::TQWhatsThat( TQWidget* w, const TQString& txt, TQWidget* parent, const char* name )
- : TQWidget( parent, name, WType_Popup ), text( txt ), pressed( FALSE ), widget( w )
+ : TQWidget( parent, name, WType_Popup ), text( txt ), pressed( false ), widget( w )
{
setBackgroundMode( NoBackground );
setPalette( TQToolTip::palette() );
- setMouseTracking( TRUE );
+ setMouseTracking( true );
#ifndef TQT_NO_CURSOR
setCursor( arrowCursor );
#endif
@@ -307,7 +307,7 @@ void TQWhatsThat::hide()
void TQWhatsThat::mousePressEvent( TQMouseEvent* e )
{
- pressed = TRUE;
+ pressed = true;
if ( e->button() == LeftButton && rect().contains( e->pos() ) ) {
#ifndef TQT_NO_RICHTEXT
if ( doc )
@@ -364,7 +364,7 @@ void TQWhatsThat::keyPressEvent( TQKeyEvent* )
void TQWhatsThat::paintEvent( TQPaintEvent* )
{
- bool drawShadow = TRUE;
+ bool drawShadow = true;
#if defined(TQ_WS_WIN)
if ( (qWinVersion()&WV_NT_based) > WV_2000 ) {
BOOL shadow;
@@ -372,7 +372,7 @@ void TQWhatsThat::paintEvent( TQPaintEvent* )
drawShadow = !shadow;
}
#elif defined(TQ_WS_MACX)
- drawShadow = FALSE; //never draw it on OS X we get it for free
+ drawShadow = false; //never draw it on OS X we get it for free
#endif
TQRect r = rect();
@@ -450,8 +450,8 @@ TQWhatsThisButton::TQWhatsThisButton( TQWidget * parent, const char * name )
{
TQPixmap p( (const char**)button_image );
setPixmap( p );
- setToggleButton( TRUE );
- setAutoRaise( TRUE );
+ setToggleButton( true );
+ setAutoRaise( true );
setFocusPolicy( NoFocus );
setTextLabel( tr( "What's this?" ) );
wt->buttons->insert( (void *)this, this );
@@ -472,7 +472,7 @@ void TQWhatsThisButton::mouseReleased()
if ( wt->state == TQWhatsThisPrivate::Inactive && isOn() ) {
TQWhatsThisPrivate::setUpWhatsThis();
#ifndef TQT_NO_CURSOR
- TQApplication::setOverrideCursor( whatsThisCursor, FALSE );
+ TQApplication::setOverrideCursor( whatsThisCursor, false );
#endif
wt->state = TQWhatsThisPrivate::Waiting;
tqApp->installEventFilter( wt );
@@ -535,9 +535,9 @@ bool TQWhatsThisPrivate::eventFilter( TQObject * o, TQEvent * e )
if ( e->type() == TQEvent::MouseButtonPress && o->isWidgetType() ) {
TQWidget * w = (TQWidget *) o;
if ( ( (TQMouseEvent*)e)->button() == RightButton )
- return FALSE; // ignore RMB
+ return false; // ignore RMB
if ( w->customWhatsThis() )
- return FALSE;
+ return false;
TQWhatsThisPrivate::WhatsThisItem * i = 0;
TQMouseEvent* me = (TQMouseEvent*) e;
TQPoint p = me->pos();
@@ -545,7 +545,7 @@ bool TQWhatsThisPrivate::eventFilter( TQObject * o, TQEvent * e )
i = dict->find( w );
if ( !i ) {
p += w->pos();
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
}
leaveWhatsThisMode();
@@ -553,16 +553,16 @@ bool TQWhatsThisPrivate::eventFilter( TQObject * o, TQEvent * e )
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::ContextHelpEnd );
#endif
- return TRUE;
+ return true;
}
if ( i->whatsthis )
say( w, i->whatsthis->text( p ), me->globalPos() );
else
say( w, i->s, me->globalPos() );
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::MouseButtonRelease ) {
if ( ( (TQMouseEvent*)e)->button() == RightButton )
- return FALSE; // ignore RMB
+ return false; // ignore RMB
return !o->isWidgetType() || !((TQWidget*)o)->customWhatsThis();
} else if ( e->type() == TQEvent::MouseMove ) {
return !o->isWidgetType() || !((TQWidget*)o)->customWhatsThis();
@@ -571,20 +571,20 @@ bool TQWhatsThisPrivate::eventFilter( TQObject * o, TQEvent * e )
if ( kev->key() == TQt::Key_Escape ) {
leaveWhatsThisMode();
- return TRUE;
+ return true;
} else if ( o->isWidgetType() && ((TQWidget*)o)->customWhatsThis() ) {
- return FALSE;
+ return false;
} else if ( kev->key() == Key_Menu ||
( kev->key() == Key_F10 &&
kev->state() == ShiftButton ) ) {
// we don't react to these keys, they are used for context menus
- return FALSE;
+ return false;
} else if ( kev->state() == kev->stateAfter() &&
kev->key() != Key_Meta ) { // not a modifier key
leaveWhatsThisMode();
}
} else if ( e->type() == TQEvent::MouseButtonDblClick ) {
- return TRUE;
+ return true;
}
break;
case Inactive:
@@ -595,16 +595,16 @@ bool TQWhatsThisPrivate::eventFilter( TQObject * o, TQEvent * e )
TQWidget * w = ((TQWidget *)o)->focusWidget();
if ( !w )
break;
- TQString s = TQWhatsThis::textFor( w, TQPoint(0,0), TRUE );
+ TQString s = TQWhatsThis::textFor( w, TQPoint(0,0), true );
if ( !s.isNull() ) {
say ( w, s, w->mapToGlobal( w->rect().center() ) );
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
}
}
break;
}
- return FALSE;
+ return false;
}
@@ -637,7 +637,7 @@ void TQWhatsThisPrivate::leaveWhatsThisMode()
TQWhatsThisButton * b;
while( (b=it.current()) != 0 ) {
++it;
- b->setOn( FALSE );
+ b->setOn( false );
}
#ifndef TQT_NO_CURSOR
TQApplication::restoreOverrideCursor();
@@ -805,7 +805,7 @@ void TQWhatsThis::remove( TQWidget * widget )
the mouse position; this is useful, for example, if you've
subclassed to make the text that is displayed position dependent.
- If \a includeParents is TRUE, parent widgets are taken into
+ If \a includeParents is true, parent widgets are taken into
consideration as well when looking for what's this help text.
\sa add()
@@ -821,7 +821,7 @@ TQString TQWhatsThis::textFor( TQWidget * w, const TQPoint& pos, bool includePar
break;
if ( !i ) {
p += w->pos();
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
}
if (!i)
@@ -889,14 +889,14 @@ TQString TQWhatsThis::text( const TQPoint & )
"What's this?" window. \a href is the link the user clicked on, or
TQString::null if there was no link.
- If the function returns TRUE (the default), the "What's this?"
+ If the function returns true (the default), the "What's this?"
window is closed, otherwise it remains visible.
- The default implementation ignores \a href and returns TRUE.
+ The default implementation ignores \a href and returns true.
*/
bool TQWhatsThis::clicked( const TQString& )
{
- return TRUE;
+ return true;
}
@@ -920,7 +920,7 @@ void TQWhatsThis::enterWhatsThisMode()
if ( wt->state == TQWhatsThisPrivate::Inactive ) {
wt->enterWhatsThisMode();
#ifndef TQT_NO_CURSOR
- TQApplication::setOverrideCursor( whatsThisCursor, FALSE );
+ TQApplication::setOverrideCursor( whatsThisCursor, false );
#endif
wt->state = TQWhatsThisPrivate::Waiting;
tqApp->installEventFilter( wt );
@@ -929,15 +929,15 @@ void TQWhatsThis::enterWhatsThisMode()
/*!
- Returns TRUE if the application is in "What's this?" mode;
- otherwise returns FALSE.
+ Returns true if the application is in "What's this?" mode;
+ otherwise returns false.
\sa enterWhatsThisMode(), leaveWhatsThisMode()
*/
bool TQWhatsThis::inWhatsThisMode()
{
if (!wt)
- return FALSE;
+ return false;
return wt->state == TQWhatsThisPrivate::Waiting;
}
@@ -994,7 +994,7 @@ void TQWhatsThis::display( const TQString& text, const TQPoint& pos, TQWidget* w
*/
void TQWhatsThis::setFont( const TQFont &font )
{
- TQApplication::setFont( font, TRUE, "TQWhatsThat" );
+ TQApplication::setFont( font, true, "TQWhatsThat" );
}
#include "tqwhatsthis.moc"
diff --git a/src/widgets/tqwhatsthis.h b/src/widgets/tqwhatsthis.h
index 6fc2538e5..827e30378 100644
--- a/src/widgets/tqwhatsthis.h
+++ b/src/widgets/tqwhatsthis.h
@@ -65,7 +65,7 @@ public:
static void add( TQWidget *, const TQString &);
static void remove( TQWidget * );
- static TQString textFor( TQWidget *, const TQPoint & pos = TQPoint(), bool includeParents = FALSE );
+ static TQString textFor( TQWidget *, const TQPoint & pos = TQPoint(), bool includeParents = false );
static TQToolButton * whatsThisButton( TQWidget * parent );
diff --git a/src/widgets/tqwidgetinterface_p.h b/src/widgets/tqwidgetinterface_p.h
index 9638a084e..658f11f33 100644
--- a/src/widgets/tqwidgetinterface_p.h
+++ b/src/widgets/tqwidgetinterface_p.h
@@ -103,9 +103,9 @@ public:
what's this help for the widget \a widget. */
virtual TQString whatsThis( const TQString &widget ) const = 0;
- /*! In the implementation return TRUE here, of the \a widget
+ /*! In the implementation return true here, of the \a widget
should be able to contain other widget in the TQt Designer, else
- FALSE. */
+ false. */
virtual bool isContainer( const TQString &widget ) const = 0;
};
diff --git a/src/widgets/tqwidgetplugin.cpp b/src/widgets/tqwidgetplugin.cpp
index 5508ac7f0..3444ebd61 100644
--- a/src/widgets/tqwidgetplugin.cpp
+++ b/src/widgets/tqwidgetplugin.cpp
@@ -221,7 +221,7 @@ bool TQWidgetPluginPrivate::isContainer( const TQString &widget ) const
bool TQWidgetPluginPrivate::init()
{
- return TRUE;
+ return true;
}
void TQWidgetPluginPrivate::cleanup()
@@ -280,7 +280,7 @@ bool TQWidgetPluginPrivate::isPassiveInteractor( const TQString &key, TQWidget *
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p )
return p->isPassiveInteractor( key, widget );
- return FALSE;
+ return false;
}
bool TQWidgetPluginPrivate::supportsPages( const TQString &key ) const
@@ -427,14 +427,14 @@ TQString TQWidgetPlugin::whatsThis( const TQString & ) const
}
/*!
- Returns TRUE if the custom widget of class \a key can contain
- other widgets, e.g. like TQFrame; otherwise returns FALSE.
+ Returns true if the custom widget of class \a key can contain
+ other widgets, e.g. like TQFrame; otherwise returns false.
- The default implementation returns FALSE.
+ The default implementation returns false.
*/
bool TQWidgetPlugin::isContainer( const TQString & ) const
{
- return FALSE;
+ return false;
}
#ifdef QT_CONTAINER_CUSTOM_WIDGETS
@@ -574,8 +574,8 @@ TQWidget *TQWidgetContainerPlugin::page( const TQString &, TQWidget *, int ) con
/*!
Operates on the plugin's \a key class.
- Returns TRUE if the \a container custom widget is a passive
- interactor for class \e key; otherwise returns FALSE. The \a
+ Returns true if the \a container custom widget is a passive
+ interactor for class \e key; otherwise returns false. The \a
container is a child widget of the actual custom widget.
Usually, when a custom widget is used in \e{TQt Designer}'s design
@@ -583,35 +583,35 @@ TQWidget *TQWidgetContainerPlugin::page( const TQString &, TQWidget *, int ) con
Designer} filters and processes them itself. If one or more
widgets of a custom widget still need to receive such events, for
example, because the widget needs to change pages, this function
- must return TRUE for the widget. In such cases \e{TQt Designer}
+ must return true for the widget. In such cases \e{TQt Designer}
will not filter out key and mouse events destined for the widget.
If the custom widget is a tab widget, the tab bar is the passive
interactor, since that's what the user will use to change pages.
- The default implementation returns FALSE.
+ The default implementation returns false.
*/
bool TQWidgetContainerPlugin::isPassiveInteractor( const TQString &,
TQWidget *container ) const
{
Q_UNUSED( container )
- return FALSE;
+ return false;
}
/*!
Operates on the plugin's \a key class.
- Returns TRUE if the widget supports pages; otherwise returns
- FALSE. If the custom widget is a tab widget this function should
- return TRUE.
+ Returns true if the widget supports pages; otherwise returns
+ false. If the custom widget is a tab widget this function should
+ return true.
- The default implementation returns FALSE.
+ The default implementation returns false.
*/
bool TQWidgetContainerPlugin::supportsPages( const TQString & ) const
{
- return FALSE;
+ return false;
}
/*!
diff --git a/src/widgets/tqwidgetresizehandler.cpp b/src/widgets/tqwidgetresizehandler.cpp
index e16814ba5..7f664d868 100644
--- a/src/widgets/tqwidgetresizehandler.cpp
+++ b/src/widgets/tqwidgetresizehandler.cpp
@@ -51,19 +51,19 @@
#define RANGE 4
-static bool resizeHorizontalDirectionFixed = FALSE;
-static bool resizeVerticalDirectionFixed = FALSE;
+static bool resizeHorizontalDirectionFixed = false;
+static bool resizeVerticalDirectionFixed = false;
TQWidgetResizeHandler::TQWidgetResizeHandler( TQWidget *parent, TQWidget *cw, const char *name )
: TQObject( parent, name ), widget( parent ), childWidget( cw ? cw : parent ),
- extrahei( 0 ), buttonDown( FALSE ), moveResizeMode( FALSE ), sizeprotect( TRUE ), moving( TRUE )
+ extrahei( 0 ), buttonDown( false ), moveResizeMode( false ), sizeprotect( true ), moving( true )
{
mode = Nowhere;
- widget->setMouseTracking( TRUE );
+ widget->setMouseTracking( true );
TQFrame *frame = ::tqt_cast<TQFrame*>(widget);
range = frame ? frame->frameWidth() : RANGE;
range = TQMAX( RANGE, range );
- activeForMove = activeForResize = TRUE;
+ activeForMove = activeForResize = true;
tqApp->installEventFilter( this );
}
@@ -80,7 +80,7 @@ void TQWidgetResizeHandler::setActive( Action ac, bool b )
bool TQWidgetResizeHandler::isActive( Action ac ) const
{
- bool b = FALSE;
+ bool b = false;
if ( ac & Move ) b = activeForMove;
if ( ac & Resize ) b |= activeForResize;
@@ -102,14 +102,14 @@ static TQWidget *childOf( TQWidget *w, TQWidget *child )
bool TQWidgetResizeHandler::eventFilter( TQObject *o, TQEvent *ee )
{
if ( !isActive() || !o->isWidgetType() || !ee->spontaneous())
- return FALSE;
+ return false;
if ( ee->type() != TQEvent::MouseButtonPress &&
ee->type() != TQEvent::MouseButtonRelease &&
ee->type() != TQEvent::MouseMove &&
ee->type() != TQEvent::KeyPress &&
ee->type() != TQEvent::AccelOverride )
- return FALSE;
+ return false;
TQWidget *w = childOf( widget, (TQWidget*)o );
if ( !w
@@ -118,8 +118,8 @@ bool TQWidgetResizeHandler::eventFilter( TQObject *o, TQEvent *ee )
#endif
|| tqApp->activePopupWidget() ) {
if ( buttonDown && ee->type() == TQEvent::MouseButtonRelease )
- buttonDown = FALSE;
- return FALSE;
+ buttonDown = false;
+ return false;
}
TQMouseEvent *e = (TQMouseEvent*)ee;
@@ -128,14 +128,14 @@ bool TQWidgetResizeHandler::eventFilter( TQObject *o, TQEvent *ee )
if ( w->isMaximized() )
break;
if ( !widget->rect().contains( widget->mapFromGlobal( e->globalPos() ) ) )
- return FALSE;
+ return false;
if ( e->button() == LeftButton ) {
emit activate();
bool me = isMovingEnabled();
setMovingEnabled( me && o == widget );
mouseMoveEvent( e );
setMovingEnabled( me );
- buttonDown = TRUE;
+ buttonDown = true;
moveOffset = widget->mapFromGlobal( e->globalPos() );
invertedMoveOffset = widget->rect().bottomRight() - moveOffset;
}
@@ -144,8 +144,8 @@ bool TQWidgetResizeHandler::eventFilter( TQObject *o, TQEvent *ee )
if ( w->isMaximized() )
break;
if ( e->button() == LeftButton ) {
- moveResizeMode = FALSE;
- buttonDown = FALSE;
+ moveResizeMode = false;
+ buttonDown = false;
widget->releaseMouse();
widget->releaseKeyboard();
}
@@ -158,7 +158,7 @@ bool TQWidgetResizeHandler::eventFilter( TQObject *o, TQEvent *ee )
mouseMoveEvent( e );
setMovingEnabled( me );
if ( buttonDown && mode != Center )
- return TRUE;
+ return true;
} break;
case TQEvent::KeyPress:
keyPressEvent( (TQKeyEvent*)e );
@@ -166,13 +166,13 @@ bool TQWidgetResizeHandler::eventFilter( TQObject *o, TQEvent *ee )
case TQEvent::AccelOverride:
if ( buttonDown ) {
((TQKeyEvent*)ee)->accept();
- return TRUE;
+ return true;
}
break;
default:
break;
}
- return FALSE;
+ return false;
}
void TQWidgetResizeHandler::mouseMoveEvent( TQMouseEvent *e )
@@ -212,9 +212,9 @@ void TQWidgetResizeHandler::mouseMoveEvent( TQMouseEvent *e )
if ( widget->testWState( WState_ConfigPending ) )
return;
- TQPoint globalPos = widget->parentWidget( TRUE ) ?
- widget->parentWidget( TRUE )->mapFromGlobal( e->globalPos() ) : e->globalPos();
- if ( widget->parentWidget( TRUE ) && !widget->parentWidget( TRUE )->rect().contains( globalPos ) ) {
+ TQPoint globalPos = widget->parentWidget( true ) ?
+ widget->parentWidget( true )->mapFromGlobal( e->globalPos() ) : e->globalPos();
+ if ( widget->parentWidget( true ) && !widget->parentWidget( true )->rect().contains( globalPos ) ) {
if ( globalPos.x() < 0 )
globalPos.rx() = 0;
if ( globalPos.y() < 0 )
@@ -360,7 +360,7 @@ void TQWidgetResizeHandler::keyPressEvent( TQKeyEvent * e )
}
}
if ( isResize() && !resizeHorizontalDirectionFixed ) {
- resizeHorizontalDirectionFixed = TRUE;
+ resizeHorizontalDirectionFixed = true;
if ( mode == BottomRight )
mode = BottomLeft;
else if ( mode == TopRight )
@@ -385,7 +385,7 @@ void TQWidgetResizeHandler::keyPressEvent( TQKeyEvent * e )
}
}
if ( isResize() && !resizeHorizontalDirectionFixed ) {
- resizeHorizontalDirectionFixed = TRUE;
+ resizeHorizontalDirectionFixed = true;
if ( mode == BottomLeft )
mode = BottomRight;
else if ( mode == TopLeft )
@@ -410,7 +410,7 @@ void TQWidgetResizeHandler::keyPressEvent( TQKeyEvent * e )
}
}
if ( isResize() && !resizeVerticalDirectionFixed ) {
- resizeVerticalDirectionFixed = TRUE;
+ resizeVerticalDirectionFixed = true;
if ( mode == BottomLeft )
mode = TopLeft;
else if ( mode == BottomRight )
@@ -435,7 +435,7 @@ void TQWidgetResizeHandler::keyPressEvent( TQKeyEvent * e )
}
}
if ( isResize() && !resizeVerticalDirectionFixed ) {
- resizeVerticalDirectionFixed = TRUE;
+ resizeVerticalDirectionFixed = true;
if ( mode == TopLeft )
mode = BottomLeft;
else if ( mode == TopRight )
@@ -452,10 +452,10 @@ void TQWidgetResizeHandler::keyPressEvent( TQKeyEvent * e )
case Key_Return:
case Key_Enter:
case Key_Escape:
- moveResizeMode = FALSE;
+ moveResizeMode = false;
widget->releaseMouse();
widget->releaseKeyboard();
- buttonDown = FALSE;
+ buttonDown = false;
break;
default:
return;
@@ -469,8 +469,8 @@ void TQWidgetResizeHandler::doResize()
if ( !activeForResize )
return;
- moveResizeMode = TRUE;
- buttonDown = TRUE;
+ moveResizeMode = true;
+ buttonDown = true;
moveOffset = widget->mapFromGlobal( TQCursor::pos() );
if ( moveOffset.x() < widget->width()/2) {
if ( moveOffset.y() < widget->height()/2)
@@ -491,8 +491,8 @@ void TQWidgetResizeHandler::doResize()
widget->grabMouse();
#endif
widget->grabKeyboard();
- resizeHorizontalDirectionFixed = FALSE;
- resizeVerticalDirectionFixed = FALSE;
+ resizeHorizontalDirectionFixed = false;
+ resizeVerticalDirectionFixed = false;
}
void TQWidgetResizeHandler::doMove()
@@ -501,8 +501,8 @@ void TQWidgetResizeHandler::doMove()
return;
mode = Center;
- moveResizeMode = TRUE;
- buttonDown = TRUE;
+ moveResizeMode = true;
+ buttonDown = true;
moveOffset = widget->mapFromGlobal( TQCursor::pos() );
invertedMoveOffset = widget->rect().bottomRight() - moveOffset;
#ifndef TQT_NO_CURSOR
diff --git a/src/widgets/tqwidgetstack.cpp b/src/widgets/tqwidgetstack.cpp
index d751fb243..267a79d54 100644
--- a/src/widgets/tqwidgetstack.cpp
+++ b/src/widgets/tqwidgetstack.cpp
@@ -87,7 +87,7 @@ public:
bool eventFilter( TQObject *o, TQEvent * e ) {
if ( e->type() == TQEvent::LayoutHint && o->isWidgetType() )
((TQWidget*)o)->updateGeometry();
- return FALSE;
+ return false;
}
};
@@ -230,7 +230,7 @@ int TQWidgetStack::addWidget( TQWidget * w, int id )
w->hide();
if ( w->parent() != this )
- w->reparent( this, contentsRect().topLeft(), FALSE );
+ w->reparent( this, contentsRect().topLeft(), false );
w->setGeometry( contentsRect() );
updateGeometry();
return id;
@@ -280,7 +280,7 @@ static bool isChildOf( TQWidget* child, TQWidget *parent )
{
const TQObjectList *list = parent->children();
if ( !child || !list )
- return FALSE;
+ return false;
TQObjectListIt it(*list);
TQObject *obj;
while ( (obj = it.current()) ) {
@@ -289,9 +289,9 @@ static bool isChildOf( TQWidget* child, TQWidget *parent )
continue;
TQWidget *widget = (TQWidget *)obj;
if ( widget == child || isChildOf( child, widget ) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*!
diff --git a/src/xml/tqdom.h b/src/xml/tqdom.h
index 865da3ad3..16fd11c1a 100644
--- a/src/xml/tqdom.h
+++ b/src/xml/tqdom.h
@@ -290,8 +290,8 @@ class TQM_EXPORT_DOM TQDomDocument : public TQDomNode
{
public:
TQDomDocument();
- Q_EXPLICIT TQDomDocument( const TQString& name );
- Q_EXPLICIT TQDomDocument( const TQDomDocumentType& doctype );
+ explicit TQDomDocument( const TQString& name );
+ explicit TQDomDocument( const TQDomDocumentType& doctype );
TQDomDocument( const TQDomDocument& x );
TQDomDocument& operator= ( const TQDomDocument& );
~TQDomDocument();
diff --git a/src/xml/tqsvgdevice.cpp b/src/xml/tqsvgdevice.cpp
index 51c48179c..3aec30c7a 100644
--- a/src/xml/tqsvgdevice.cpp
+++ b/src/xml/tqsvgdevice.cpp
@@ -60,19 +60,16 @@ const char systemId[] = "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001
struct TQM_EXPORT_SVG ImgElement {
TQDomElement element;
TQImage image;
- TQ_DUMMY_COMPARISON_OPERATOR( ImgElement )
};
struct TQM_EXPORT_SVG PixElement {
TQDomElement element;
TQPixmap pixmap;
- TQ_DUMMY_COMPARISON_OPERATOR( PixElement )
};
struct TQSvgDeviceState {
int textx, texty; // current text position
int textalign; // text alignment
- TQ_DUMMY_COMPARISON_OPERATOR( TQSvgDeviceState )
};
typedef TQValueList<ImgElement> ImageList;
diff --git a/src/xml/tqxml.cpp b/src/xml/tqxml.cpp
index 591890976..eab061cb0 100644
--- a/src/xml/tqxml.cpp
+++ b/src/xml/tqxml.cpp
@@ -2248,8 +2248,6 @@ private:
: publicId(p), systemId(s) {}
TQString publicId;
TQString systemId;
-
- TQ_DUMMY_COMPARISON_OPERATOR(ExternParameterEntity)
};
struct ExternEntity
{
@@ -2259,7 +2257,6 @@ private:
TQString publicId;
TQString systemId;
TQString notation;
- TQ_DUMMY_COMPARISON_OPERATOR(ExternEntity)
};
TQMap<TQString,ExternParameterEntity> externParameterEntities;
TQMap<TQString,TQString> parameterEntities;