summaryrefslogtreecommitdiffstats
path: root/src/kernel/tqapplication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/tqapplication.cpp')
-rw-r--r--src/kernel/tqapplication.cpp312
1 files changed, 156 insertions, 156 deletions
diff --git a/src/kernel/tqapplication.cpp b/src/kernel/tqapplication.cpp
index c6e6510b4..97368b0c6 100644
--- a/src/kernel/tqapplication.cpp
+++ b/src/kernel/tqapplication.cpp
@@ -326,51 +326,51 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop );
TQApplication *tqApp = 0; // global application object
TQStyle *TQApplication::app_style = 0; // default application style
-bool tqt_explicit_app_style = FALSE; // style explicitly set by programmer
+bool tqt_explicit_app_style = false; // style explicitly set by programmer
int TQApplication::app_cspec = TQApplication::NormalColor;
#ifndef TQT_NO_PALETTE
TQPalette *TQApplication::app_pal = 0; // default application palette
#endif
TQFont *TQApplication::app_font = 0; // default application font
-bool tqt_app_has_font = FALSE;
+bool tqt_app_has_font = false;
#ifndef TQT_NO_CURSOR
TQCursor *TQApplication::app_cursor = 0; // default application cursor
#endif
int TQApplication::app_tracking = 0; // global mouse tracking
-bool TQApplication::is_app_running = FALSE; // app starting up if FALSE
-bool TQApplication::is_app_closing = FALSE; // app closing down if TRUE
+bool TQApplication::is_app_running = false; // app starting up if false
+bool TQApplication::is_app_closing = false; // app closing down if true
int TQApplication::loop_level = 0; // event loop level
TQWidget *TQApplication::main_widget = 0; // main application widget
TQWidget *TQApplication::focus_widget = 0; // has keyboard input focus
TQWidget *TQApplication::active_window = 0; // toplevel with keyboard focus
-bool TQApplication::obey_desktop_settings = TRUE; // use winsys resources
+bool TQApplication::obey_desktop_settings = true; // use winsys resources
int TQApplication::cursor_flash_time = 1000; // text caret flash time
int TQApplication::mouse_double_click_time = 400; // mouse dbl click limit
#ifndef TQT_NO_WHEELEVENT
int TQApplication::wheel_scroll_lines = 3; // number of lines to scroll
#endif
bool tqt_is_gui_used;
-bool TQ_EXPORT tqt_resolve_symlinks = TRUE;
-bool TQ_EXPORT tqt_tab_all_widgets = TRUE;
+bool TQ_EXPORT tqt_resolve_symlinks = true;
+bool TQ_EXPORT tqt_tab_all_widgets = true;
TQRect tqt_maxWindowRect;
static int drag_time = 500;
static int drag_distance = 4;
-static bool reverse_layout = FALSE;
+static bool reverse_layout = false;
TQSize TQApplication::app_strut = TQSize( 0,0 ); // no default application strut
-bool TQApplication::animate_ui = TRUE;
-bool TQApplication::animate_menu = FALSE;
-bool TQApplication::fade_menu = FALSE;
-bool TQApplication::animate_combo = FALSE;
-bool TQApplication::animate_tooltip = FALSE;
-bool TQApplication::fade_tooltip = FALSE;
-bool TQApplication::animate_toolbox = FALSE;
-bool TQApplication::widgetCount = FALSE;
+bool TQApplication::animate_ui = true;
+bool TQApplication::animate_menu = false;
+bool TQApplication::fade_menu = false;
+bool TQApplication::animate_combo = false;
+bool TQApplication::animate_tooltip = false;
+bool TQApplication::fade_tooltip = false;
+bool TQApplication::animate_toolbox = false;
+bool TQApplication::widgetCount = false;
TQApplication::Type tqt_appType=TQApplication::Tty;
#ifndef TQT_NO_COMPONENT
TQStringList *TQApplication::app_libpaths = 0;
#endif
-bool TQApplication::metaComposeUnicode = FALSE;
+bool TQApplication::metaComposeUnicode = false;
int TQApplication::composedUnicode = 0;
#ifdef TQT_THREAD_SUPPORT
@@ -413,7 +413,7 @@ extern bool tqt_tryComposeUnicode( TQWidget*, TQKeyEvent* ); // def in tqaccel.c
#endif
#if defined(QT_TABLET_SUPPORT)
-bool chokeMouse = FALSE;
+bool chokeMouse = false;
#endif
void tqt_setMaxWindowRect(const TQRect& r)
@@ -607,7 +607,7 @@ public:
#ifdef TQT_THREAD_SUPPORT
if (with_mutex)
{
- m_mutex = new TQMutex(TRUE);
+ m_mutex = new TQMutex(true);
}
#endif
}
@@ -645,7 +645,7 @@ public:
static TQPostEventList* InitGlobalPostedEventsList()
{
static TQPostEventList _globalEventList(true);
- _globalEventList.setAutoDelete(TRUE);
+ _globalEventList.setAutoDelete(true);
return &_globalEventList;
}
@@ -694,7 +694,7 @@ static void tqt_fix_tooltips()
TQColor(96,96,96), TQt::black, TQt::black,
TQt::black, TQColor(255,255,220) );
TQPalette pal( cg, cg, cg );
- TQApplication::setPalette( pal, TRUE, "TQTipLabel");
+ TQApplication::setPalette( pal, true, "TQTipLabel");
}
#endif
@@ -717,7 +717,7 @@ void TQApplication::process_cmdline( int* argcptr, char ** argv )
TQCString s;
if ( arg == "-qdevel" || arg == "-qdebug") {
// obsolete argument
- } else if ( arg.find( "-style=", 0, FALSE ) != -1 ) {
+ } else if ( arg.find( "-style=", 0, false ) != -1 ) {
s = arg.right( arg.length() - 7 );
} else if ( qstrcmp(arg,"-style") == 0 && i < argc-1 ) {
s = argv[++i];
@@ -734,13 +734,13 @@ void TQApplication::process_cmdline( int* argcptr, char ** argv )
*session_key = session_id.mid( p +1 );
session_id = session_id.left( p );
}
- is_session_restored = TRUE;
+ is_session_restored = true;
}
#endif
} else if ( qstrcmp(arg, "-reverse") == 0 ) {
- setReverseLayout( TRUE );
+ setReverseLayout( true );
} else if ( qstrcmp(arg, "-widgetcount") == 0 ) {
- widgetCount = TRUE;;
+ widgetCount = true;;
} else {
argv[j++] = argv[i];
}
@@ -845,14 +845,14 @@ TQApplication::TQApplication( int &argc, char **argv )
/*!
Constructs an application object with \a argc command line arguments
- in \a argv. If \a GUIenabled is TRUE, a GUI application is
+ in \a argv. If \a GUIenabled is true, a GUI application is
constructed, otherwise a non-GUI (console) application is created.
- Set \a GUIenabled to FALSE for programs without a graphical user
+ Set \a GUIenabled to false for programs without a graphical user
interface that should be able to run without a window system.
- On X11, the window system is initialized if \a GUIenabled is TRUE.
- If \a GUIenabled is FALSE, the application does not connect to the
+ On X11, the window system is initialized if \a GUIenabled is true.
+ If \a GUIenabled is false, the application does not connect to the
X-server.
On Windows and Macintosh, currently the window system is always
initialized, regardless of the value of GUIenabled. This may change in
@@ -866,7 +866,7 @@ TQApplication::TQApplication( int &argc, char **argv )
#ifdef TQ_WS_X11
bool useGUI = getenv( "DISPLAY" ) != 0;
#else
- bool useGUI = TRUE;
+ bool useGUI = true;
#endif
TQApplication app(argc, argv, useGUI);
@@ -889,18 +889,18 @@ TQApplication::TQApplication( int &argc, char **argv, bool GUIenabled )
/*!
Constructs an application object with \a argc command line arguments
- in \a argv. If \a GUIenabled is TRUE, a GUI application is
+ in \a argv. If \a GUIenabled is true, a GUI application is
constructed, otherwise a non-GUI (console) application is created.
- If \a SMEnabled is TRUE, session management support is enabled (default).
+ If \a SMEnabled is true, session management support is enabled (default).
- Set \a GUIenabled to FALSE for programs without a graphical user
+ Set \a GUIenabled to false for programs without a graphical user
interface that should be able to run without a window system.
- Set \a SMEnabled to FALSE to disable session management.
+ Set \a SMEnabled to false to disable session management.
Session management cannot be enabled at a later time if disabled here.
- On X11, the window system is initialized if \a GUIenabled is TRUE.
- If \a GUIenabled is FALSE, the application does not connect to the
+ On X11, the window system is initialized if \a GUIenabled is true.
+ If \a GUIenabled is false, the application does not connect to the
X-server.
On Windows and Macintosh, currently the window system is always
initialized, regardless of the value of GUIenabled. This may change in
@@ -914,7 +914,7 @@ TQApplication::TQApplication( int &argc, char **argv, bool GUIenabled )
#ifdef TQ_WS_X11
bool useGUI = getenv( "DISPLAY" ) != 0;
#else
- bool useGUI = TRUE;
+ bool useGUI = true;
#endif
TQApplication app(argc, argv, useGUI);
@@ -1010,7 +1010,7 @@ TQApplication::TQApplication( Display* dpy, HANDLE visual, HANDLE colormap )
app_argv = aargv;
tqt_appType = GuiClient;
- tqt_is_gui_used = TRUE;
+ tqt_is_gui_used = true;
tqt_appType = GuiClient;
init_precmdline();
// ... no command line.
@@ -1049,7 +1049,7 @@ TQApplication::TQApplication(Display *dpy, int argc, char **argv,
HANDLE visual, HANDLE colormap)
{
tqt_appType = GuiClient;
- tqt_is_gui_used = TRUE;
+ tqt_is_gui_used = true;
tqt_appType = GuiClient;
init_precmdline();
@@ -1095,9 +1095,9 @@ bool TQApplication::isCoreThread() {
void TQApplication::init_precmdline()
{
translators = 0;
- is_app_closing = FALSE;
+ is_app_closing = false;
#ifndef TQT_NO_SESSIONMANAGER
- is_session_restored = FALSE;
+ is_session_restored = false;
#endif
#if defined(QT_CHECK_STATE)
if ( tqApp )
@@ -1113,24 +1113,24 @@ void TQApplication::init_precmdline()
void TQApplication::initialize( int argc, char **argv, bool enable_sm )
{
#ifdef TQT_THREAD_SUPPORT
- tqt_mutex = new TQMutex( TRUE );
- tqt_sharedStringMutex = new TQMutex( TRUE );
- tqt_sharedMetaObjectMutex = new TQMutex( TRUE );
+ tqt_mutex = new TQMutex( true );
+ tqt_sharedStringMutex = new TQMutex( true );
+ tqt_sharedMetaObjectMutex = new TQMutex( true );
#ifdef QT_USE_GLIBMAINLOOP
- tqt_timerListMutex = new TQMutex( TRUE );
+ tqt_timerListMutex = new TQMutex( true );
#endif // QT_USE_GLIBMAINLOOP
tqt_application_thread_id = TQThread::currentThread();
#endif // TQT_THREAD_SUPPORT
app_argc = argc;
app_argv = argv;
- quit_now = FALSE;
+ quit_now = false;
quit_code = 0;
TQWidget::createMapper(); // create widget mapper
#ifndef TQT_NO_PALETTE
(void) palette(); // trigger creation of application palette
#endif
- is_app_running = TRUE; // no longer starting up
+ is_app_running = true; // no longer starting up
#ifndef TQT_NO_SESSIONMANAGER
if (enable_sm) {
@@ -1178,7 +1178,7 @@ TQWidget *TQApplication::activePopupWidget()
A modal widget is a special top level widget which is a subclass of
TQDialog that specifies the modal parameter of the constructor as
- TRUE. A modal widget must be closed before the user can continue
+ true. A modal widget must be closed before the user can continue
with other parts of the program.
Modal widgets are organized in a stack. This function returns
@@ -1220,12 +1220,12 @@ TQApplication::~TQApplication()
postRList = 0;
}
- TQObject *tipmanager = child( "toolTipManager", "TQTipManager", FALSE );
+ TQObject *tipmanager = child( "toolTipManager", "TQTipManager", false );
delete tipmanager;
delete tqt_desktopWidget;
tqt_desktopWidget = 0;
- is_app_closing = TRUE;
+ is_app_closing = true;
// Due to hacks to speed up TQStyle engine (see git hash 523c1fd99) TQObjects now contain a
// reference to TQStyleControlElementData object which among other contain TQFont members.
@@ -1284,7 +1284,7 @@ TQApplication::~TQApplication()
removePostedEvents( this );
tqApp = 0;
}
- is_app_running = FALSE;
+ is_app_running = false;
if ( widgetCount ) {
tqDebug( "Widgets left: %i Max widgets: %i \n", TQWidget::instanceCounter, TQWidget::maxInstances );
@@ -1311,10 +1311,10 @@ TQApplication::~TQApplication()
#endif // QT_USE_GLIBMAINLOOP
#endif // TQT_THREAD_SUPPORT
- tqt_explicit_app_style = FALSE;
- tqt_app_has_font = FALSE;
+ tqt_explicit_app_style = false;
+ tqt_app_has_font = false;
app_tracking = 0;
- obey_desktop_settings = TRUE;
+ obey_desktop_settings = true;
cursor_flash_time = 1000;
mouse_double_click_time = 400;
#ifndef TQT_NO_WHEELEVENT
@@ -1322,15 +1322,15 @@ TQApplication::~TQApplication()
#endif
drag_time = 500;
drag_distance = 4;
- reverse_layout = FALSE;
+ reverse_layout = false;
app_strut = TQSize( 0, 0 );
- animate_ui = TRUE;
- animate_menu = FALSE;
- fade_menu = FALSE;
- animate_combo = FALSE;
- animate_tooltip = FALSE;
- fade_tooltip = FALSE;
- widgetCount = FALSE;
+ animate_ui = true;
+ animate_menu = false;
+ fade_menu = false;
+ animate_combo = false;
+ animate_tooltip = false;
+ fade_tooltip = false;
+ widgetCount = false;
}
@@ -1499,7 +1499,7 @@ void TQApplication::setStyle( TQStyle *style )
TQStyle* old = app_style;
app_style = style;
#ifdef TQ_WS_X11
- tqt_explicit_app_style = TRUE;
+ tqt_explicit_app_style = true;
#endif // TQ_WS_X11
if ( startingUp() ) {
@@ -1529,7 +1529,7 @@ void TQApplication::setStyle( TQStyle *style )
if ( !tqt_std_pal )
tqt_create_std_palette();
TQPalette tmpPal = *tqt_std_pal;
- setPalette( tmpPal, TRUE );
+ setPalette( tmpPal, true );
// initialize the application with the new style
app_style->polish( tqApp );
@@ -1575,7 +1575,7 @@ void TQApplication::setStyle( TQStyle *style )
TQStyle* TQApplication::setStyle( const TQString& style )
{
#ifdef TQ_WS_X11
- tqt_explicit_app_style = TRUE;
+ tqt_explicit_app_style = true;
#endif // TQ_WS_X11
if ( startingUp() ) {
@@ -1747,7 +1747,7 @@ extern const char *tqAppFileName();
#ifndef TQ_WS_WIN
static TQString resolveSymlinks( const TQString& path, int depth = 0 )
{
- bool foundLink = FALSE;
+ bool foundLink = false;
TQString linkTarget;
TQString part = path;
int slashPos = path.length();
@@ -1760,7 +1760,7 @@ static TQString resolveSymlinks( const TQString& path, int depth = 0 )
part = part.left( slashPos );
TQFileInfo fileInfo( part );
if ( fileInfo.isSymLink() ) {
- foundLink = TRUE;
+ foundLink = true;
linkTarget = fileInfo.readLink();
break;
}
@@ -2074,9 +2074,9 @@ TQPalette TQApplication::palette(TQStringList objectTypeList)
/*!
Changes the default application palette to \a palette. If \a
- informWidgets is TRUE, then existing widgets are informed about the
+ informWidgets is true, then existing widgets are informed about the
change and may adjust themselves to the new application
- setting. If \a informWidgets is FALSE, the change only affects newly
+ setting. If \a informWidgets is false, the change only affects newly
created widgets.
If \a className is passed, the change applies only to widgets that
@@ -2099,7 +2099,7 @@ void TQApplication::setPalette( const TQPalette &palette, bool informWidgets,
if ( !startingUp() ) // on startup this has been done already
tqApp->style().polish( pal ); // NB: non-const reference
#endif
- bool all = FALSE;
+ bool all = false;
if ( !className ) {
if ( !app_pal ) {
app_pal = new TQPalette( pal );
@@ -2115,7 +2115,7 @@ void TQApplication::setPalette( const TQPalette &palette, bool informWidgets,
if ( !app_palettes ) {
app_palettes = new TQAsciiDict<TQPalette>;
TQ_CHECK_PTR( app_palettes );
- app_palettes->setAutoDelete( TRUE );
+ app_palettes->setAutoDelete( true );
}
oldpal = app_palettes->find( className );
app_palettes->insert( className, new TQPalette( pal ) );
@@ -2165,9 +2165,9 @@ TQFont TQApplication::font( const TQWidget *w )
}
/*! Changes the default application font to \a font. If \a
- informWidgets is TRUE, then existing widgets are informed about the
+ informWidgets is true, then existing widgets are informed about the
change and may adjust themselves to the new application
- setting. If \a informWidgets is FALSE, the change only affects newly
+ setting. If \a informWidgets is false, the change only affects newly
created widgets. If \a className is passed, the change applies only
to classes that inherit \a className (as reported by
TQObject::inherits()).
@@ -2184,9 +2184,9 @@ TQFont TQApplication::font( const TQWidget *w )
void TQApplication::setFont( const TQFont &font, bool informWidgets,
const char* className )
{
- bool all = FALSE;
+ bool all = false;
if ( !className ) {
- tqt_app_has_font = TRUE;
+ tqt_app_has_font = true;
if ( !app_font ) {
app_font = new TQFont( font );
TQ_CHECK_PTR( app_font );
@@ -2205,7 +2205,7 @@ void TQApplication::setFont( const TQFont &font, bool informWidgets,
if (!app_fonts){
app_fonts = new TQAsciiDict<TQFont>;
TQ_CHECK_PTR( app_fonts );
- app_fonts->setAutoDelete( TRUE );
+ app_fonts->setAutoDelete( true );
}
TQFont* fnt = new TQFont(font);
TQ_CHECK_PTR( fnt );
@@ -2399,7 +2399,7 @@ void TQApplication::quit()
*/
void TQApplication::closeAllWindows()
{
- bool did_close = TRUE;
+ bool did_close = true;
TQWidget *w;
while((w = activeModalWidget()) && did_close) {
if(w->isHidden())
@@ -2498,13 +2498,13 @@ void TQApplication::aboutTQt()
*/
bool TQApplication::sendEvent( TQObject *receiver, TQEvent *event ) {
- if ( event ) event->spont = FALSE;
- return tqApp ? tqApp->notify( receiver, event ) : FALSE;
+ if ( event ) event->spont = false;
+ return tqApp ? tqApp->notify( receiver, event ) : false;
}
bool TQApplication::sendSpontaneousEvent( TQObject *receiver, TQEvent *event ) {
- if ( event ) event->spont = TRUE;
- return tqApp ? tqApp->notify( receiver, event ) : FALSE;
+ if ( event ) event->spont = true;
+ return tqApp ? tqApp->notify( receiver, event ) : false;
}
/*!
@@ -2514,7 +2514,7 @@ bool TQApplication::sendSpontaneousEvent( TQObject *receiver, TQEvent *event ) {
For certain types of events (e.g. mouse and key events),
the event will be propagated to the receiver's parent and so on up to
the top-level object if the receiver is not interested in the event
- (i.e., it returns FALSE).
+ (i.e., it returns false).
There are five different ways that events can be processed;
reimplementing this virtual function is just one of them. All five
@@ -2550,18 +2550,18 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
{
// no events are delivered after ~TQApplication() has started
if ( is_app_closing ) {
- return FALSE;
+ return false;
}
if ( receiver == 0 ) { // serious error
#if defined(QT_CHECK_NULL)
tqWarning( "TQApplication::notify: Unexpected null receiver" );
#endif
- return FALSE;
+ return false;
}
if ( receiver && (e->type() == TQEvent::Destroy) ) {
- return TRUE;
+ return true;
}
if ( e->type() == TQEvent::ChildRemoved && receiver->postedEvents) {
@@ -2584,7 +2584,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
if ( pe->event && pe->receiver == receiver &&
pe->event->type() == TQEvent::ChildInserted &&
((TQChildEvent*)pe->event)->child() == c ) {
- pe->event->posted = FALSE;
+ pe->event->posted = false;
delete pe->event;
pe->event = 0;
l->remove();
@@ -2595,7 +2595,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
}
}
- bool res = FALSE;
+ bool res = false;
if ( !receiver->isWidgetType() ) {
res = internalNotify( receiver, e );
}
@@ -2637,7 +2637,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
res = internalNotify( w, e );
if ( res || key->isAccepted() )
break;
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
}
break;
@@ -2664,7 +2664,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
TQMouseEvent me(mouse->type(), relpos, mouse->globalPos(), mouse->button(), mouse->state());
me.spont = mouse->spontaneous();
res = internalNotify( w, w == receiver ? mouse : &me );
- e->spont = FALSE;
+ e->spont = false;
if (res || w->isTopLevel() || w->testWFlags(WNoMousePropagation))
break;
@@ -2698,7 +2698,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
TQWheelEvent we(relpos, wheel->globalPos(), wheel->delta(), wheel->state(), wheel->orientation());
we.spont = wheel->spontaneous();
res = internalNotify( w, w == receiver ? wheel : &we );
- e->spont = FALSE;
+ e->spont = false;
if (res || w->isTopLevel() || w->testWFlags(WNoMousePropagation))
break;
@@ -2721,7 +2721,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
TQContextMenuEvent ce(context->reason(), relpos, context->globalPos(), context->state());
ce.spont = e->spontaneous();
res = internalNotify( w, w == receiver ? context : &ce );
- e->spont = FALSE;
+ e->spont = false;
if (res || w->isTopLevel() || w->testWFlags(WNoMousePropagation))
break;
@@ -2749,7 +2749,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
tablet->uniqueId());
te.spont = e->spontaneous();
res = internalNotify( w, w == receiver ? tablet : &te );
- e->spont = FALSE;
+ e->spont = false;
if (res || w->isTopLevel() || w->testWFlags(WNoMousePropagation))
break;
@@ -2791,10 +2791,10 @@ bool TQApplication::event( TQEvent *e )
}
}
if(ce->isAccepted())
- return TRUE;
+ return true;
} else if (e->type() == TQEvent::Quit) {
quit();
- return TRUE;
+ return true;
}
return TQObject::event(e);
}
@@ -2824,14 +2824,14 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
TQObjectListIt it( *eventFilters );
TQObject *obj;
while ( (obj=it.current()) != 0 ) { // send to all filters
- ++it; // until one returns TRUE
+ ++it; // until one returns true
if ( obj->eventFilter(receiver,e) )
- return TRUE;
+ return true;
}
}
- bool consumed = FALSE;
- bool handled = FALSE;
+ bool consumed = false;
+ bool handled = false;
if ( receiver->isWidgetType() ) {
TQWidget *widget = (TQWidget*)receiver;
@@ -2863,8 +2863,8 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
if ( e->type() == TQEvent::MouseMove &&
(((TQMouseEvent*)e)->state()&TQMouseEvent::MouseButtonMask) == 0 &&
!widget->hasMouseTracking() ) {
- handled = TRUE;
- consumed = TRUE;
+ handled = true;
+ consumed = true;
} else if ( !widget->isEnabled() ) { // throw away mouse events to disabled widgets
switch(e->type()) {
case TQEvent::MouseButtonPress:
@@ -2872,35 +2872,35 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
case TQEvent::MouseButtonDblClick:
case TQEvent::MouseMove:
( (TQMouseEvent*) e)->ignore();
- handled = TRUE;
- consumed = TRUE;
+ handled = true;
+ consumed = true;
break;
#ifndef TQT_NO_DRAGANDDROP
case TQEvent::DragEnter:
case TQEvent::DragMove:
( (TQDragMoveEvent*) e)->ignore();
- handled = TRUE;
+ handled = true;
break;
case TQEvent::DragLeave:
case TQEvent::DragResponse:
- handled = TRUE;
+ handled = true;
break;
case TQEvent::Drop:
( (TQDropEvent*) e)->ignore();
- handled = TRUE;
+ handled = true;
break;
#endif
#ifndef TQT_NO_WHEELEVENT
case TQEvent::Wheel:
( (TQWheelEvent*) e)->ignore();
- handled = TRUE;
+ handled = true;
break;
#endif
case TQEvent::ContextMenu:
( (TQContextMenuEvent*) e)->ignore();
- handled = TRUE;
+ handled = true;
break;
default:
break;
@@ -2931,13 +2931,13 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
}
#endif
}
- e->spont = FALSE;
+ e->spont = false;
return consumed;
}
/*!
- Returns TRUE if an application object has not been created yet;
- otherwise returns FALSE.
+ Returns true if an application object has not been created yet;
+ otherwise returns false.
\sa closingDown()
*/
@@ -2948,8 +2948,8 @@ bool TQApplication::startingUp()
}
/*!
- Returns TRUE if the application objects are being destroyed;
- otherwise returns FALSE.
+ Returns true if the application objects are being destroyed;
+ otherwise returns false.
\sa startingUp()
*/
@@ -3153,8 +3153,8 @@ void TQApplication::wakeUpCoreThread()
}
/*!
- This function returns TRUE if there are pending events; otherwise
- returns FALSE. Pending events can be either from the window system
+ This function returns true if there are pending events; otherwise
+ returns false. Pending events can be either from the window system
or posted events using TQApplication::postEvent().
*/
bool TQApplication::hasPendingEvents()
@@ -3506,7 +3506,7 @@ void TQApplication::postEvent( TQObject *receiver, TQEvent *event )
#endif
// if no compression could be done, just append something
- event->posted = TRUE;
+ event->posted = true;
TQPostEvent * pe = new TQPostEvent( receiver, event );
l->append( pe );
GlobalPostedEvents()->append( pe );
@@ -3568,9 +3568,9 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type )
TQMutexLocker locker( GlobalPostedEvents()->mutex() );
#endif
- bool sent = TRUE;
+ bool sent = true;
while ( sent ) {
- sent = FALSE;
+ sent = false;
if (receiver && !receiver->postedEvents) {
return;
@@ -3600,7 +3600,7 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type )
) {
// first, we diddle the event so that we can deliver
// it, and that noone will try to touch it later.
- pe->event->posted = FALSE;
+ pe->event->posted = false;
TQEvent * e = pe->event;
TQObject * r = pe->receiver;
pe->event = 0;
@@ -3634,7 +3634,7 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type )
w->repaint( p->reg, p->erase );
}
} else {
- sent = TRUE;
+ sent = true;
TQApplication::sendEvent( r, e );
}
#ifdef TQT_THREAD_SUPPORT
@@ -3719,7 +3719,7 @@ void TQApplication::removePostedEvents( TQObject *receiver, int event_type )
while( (pe=l->current()) != 0 ) {
if ( !event_type || pe->event->type() == event_type ) {
if ( pe->event ) {
- pe->event->posted = FALSE;
+ pe->event->posted = false;
delete pe->event;
pe->event = 0;
}
@@ -3832,7 +3832,7 @@ void TQApplication::removePostedEvent( TQEvent * event )
pe->receiver ? pe->receiver->name() : "object" );
// note the beautiful uglehack if !pe->receiver :)
#endif
- event->posted = FALSE;
+ event->posted = false;
delete pe->event;
pe->event = 0;
return;
@@ -3961,7 +3961,7 @@ void TQApplication::setActiveWindow( TQWidget* act )
if ( w && w->focusPolicy() != TQWidget::NoFocus )
w->setFocus();
else
- active_window->focusNextPrevChild( TRUE );
+ active_window->focusNextPrevChild( true );
}
TQFocusEvent::resetReason();
}
@@ -3996,22 +3996,22 @@ TQ_EXPORT void tqt_dispatchEnterLeave( TQWidget* enter, TQWidget* leave ) {
w = leave;
do {
leaveList.append( w );
- } while ( (w = w->parentWidget( TRUE ) ) );
+ } while ( (w = w->parentWidget( true ) ) );
}
if ( enter && !sameWindow ) {
w = enter;
do {
enterList.prepend( w );
- } while ( (w = w->parentWidget(TRUE) ) );
+ } while ( (w = w->parentWidget(true) ) );
}
if ( sameWindow ) {
int enterDepth = 0;
int leaveDepth = 0;
w = enter;
- while ( ( w = w->parentWidget( TRUE ) ) )
+ while ( ( w = w->parentWidget( true ) ) )
enterDepth++;
w = leave;
- while ( ( w = w->parentWidget( TRUE ) ) )
+ while ( ( w = w->parentWidget( true ) ) )
leaveDepth++;
TQWidget* wenter = enter;
TQWidget* wleave = leave;
@@ -4060,7 +4060,7 @@ extern TQWidget *tqt_tryModalHelperMac( TQWidget * top ); //tqapplication_mac.cp
/*!\internal
- Called from tqapplication_<platform>.cpp, returns TRUE
+ Called from tqapplication_<platform>.cpp, returns true
if the widget should accept the event.
*/
TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
@@ -4068,7 +4068,7 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
if ( rettop ) *rettop = top;
if ( tqApp->activePopupWidget() )
- return TRUE;
+ return true;
#ifdef TQ_WS_MACX
top = tqt_tryModalHelperMac( top );
@@ -4081,12 +4081,12 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
if ( widget->testWFlags(TQt::WShowModal) ) // widget is modal
modal = widget;
if ( !top || modal == top ) // don't block event
- return TRUE;
+ return true;
TQWidget * p = widget->parentWidget(); // Check if the active modal widget is a parent of our widget
while ( p ) {
if ( p == top )
- return TRUE;
+ return true;
p = p->parentWidget();
}
@@ -4095,7 +4095,7 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
if ( groupLeader ) {
// Does groupLeader have a child in tqt_modal_stack?
- bool unrelated = TRUE;
+ bool unrelated = true;
modal = tqt_modal_stack->first();
while (modal && unrelated) {
TQWidget* p = modal->parentWidget();
@@ -4103,13 +4103,13 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
p = p->parentWidget();
}
modal = tqt_modal_stack->next();
- if ( p == groupLeader ) unrelated = FALSE;
+ if ( p == groupLeader ) unrelated = false;
}
if ( unrelated )
- return TRUE; // don't block event
+ return true; // don't block event
}
- return FALSE;
+ return false;
}
@@ -4156,14 +4156,14 @@ TQClipboard *TQApplication::clipboard()
By default, TQt will try to use the current standard colors, fonts
etc., from the underlying window system's desktop settings,
and use them for all relevant widgets. This behavior can be switched off
- by calling this function with \a on set to FALSE.
+ by calling this function with \a on set to false.
This static function must be called before creating the TQApplication
object, like this:
\code
int main( int argc, char** argv ) {
- TQApplication::setDesktopSettingsAware( FALSE ); // I know better than the user
+ TQApplication::setDesktopSettingsAware( false ); // I know better than the user
TQApplication myApp( argc, argv ); // Use default fonts & colors
...
}
@@ -4178,7 +4178,7 @@ void TQApplication::setDesktopSettingsAware( bool on )
}
/*!
- Returns the value set by setDesktopSettingsAware(); by default TRUE.
+ Returns the value set by setDesktopSettingsAware(); by default true.
\sa setDesktopSettingsAware()
*/
@@ -4200,7 +4200,7 @@ bool TQApplication::desktopSettingsAware()
/*! \fn void TQApplication::unlock(bool wakeUpCore)
- Unlock the TQt Library Mutex. If \a wakeUpCore is TRUE (the default),
+ Unlock the TQt Library Mutex. If \a wakeUpCore is true (the default),
then the core application thread will be woken with TQApplication::wakeUpCoreThread().
\sa lock(), locked() \link threads.html Thread Support in TQt\endlink
@@ -4209,8 +4209,8 @@ bool TQApplication::desktopSettingsAware()
/*! \fn bool TQApplication::locked()
- Returns TRUE if the TQt Library Mutex is locked by a different thread;
- otherwise returns FALSE.
+ Returns true if the TQt Library Mutex is locked by a different thread;
+ otherwise returns false.
\warning Due to different implementations of recursive mutexes on
the supported platforms, calling this function from the same thread
@@ -4222,8 +4222,8 @@ bool TQApplication::desktopSettingsAware()
/*! \fn bool TQApplication::tryLock()
Attempts to lock the TQt Library Mutex, and returns immediately. If
- the lock was obtained, this function returns TRUE. If another thread
- has locked the mutex, this function returns FALSE, instead of
+ the lock was obtained, this function returns true. If another thread
+ has locked the mutex, this function returns false, instead of
waiting for the lock to become available.
The mutex must be unlocked with unlock() before another thread can
@@ -4261,8 +4261,8 @@ bool TQApplication::tryLock()
/*!
\fn bool TQApplication::isSessionRestored() const
- Returns TRUE if the application has been restored from an earlier
- \link session.html session\endlink; otherwise returns FALSE.
+ Returns true if the application has been restored from an earlier
+ \link session.html session\endlink; otherwise returns false.
\sa sessionId(), commitData(), saveState()
*/
@@ -4332,7 +4332,7 @@ void TQApplication::commitData( TQSessionManager& sm )
if ( sm.allowsInteraction() ) {
TQWidgetList done;
TQWidgetList *list = TQApplication::topLevelWidgets();
- bool cancelled = FALSE;
+ bool cancelled = false;
TQWidget* w = list->first();
while ( !cancelled && w ) {
if ( !w->isHidden() ) {
@@ -4457,9 +4457,9 @@ int TQApplication::startDragDistance()
}
/*!
- If \a b is TRUE, all dialogs and widgets will be laid out in a
+ If \a b is true, all dialogs and widgets will be laid out in a
mirrored fashion, as required by right to left languages such as
- Arabic and Hebrew. If \a b is FALSE, dialogs and widgets are laid
+ Arabic and Hebrew. If \a b is false, dialogs and widgets are laid
out left to right.
Changing this flag in runtime does not cause a relayout of already
@@ -4485,8 +4485,8 @@ void TQApplication::setReverseLayout( bool b )
}
/*!
- Returns TRUE if all dialogs and widgets will be laid out in a
- mirrored (right to left) fashion. Returns FALSE if dialogs and
+ Returns true if all dialogs and widgets will be laid out in a
+ mirrored (right to left) fashion. Returns false if dialogs and
widgets will be laid out left to right.
\sa setReverseLayout()
@@ -4602,8 +4602,8 @@ bool TQApplication::reverseLayout()
\fn bool TQSessionManager::allowsInteraction()
Asks the session manager for permission to interact with the
- user. Returns TRUE if interaction is permitted; otherwise
- returns FALSE.
+ user. Returns true if interaction is permitted; otherwise
+ returns false.
The rationale behind this mechanism is to make it possible to
synchronize user interaction during a shutdown. Advanced session
@@ -4809,8 +4809,8 @@ void MyApplication::commitData( TQSessionManager& sm ) {
/*!
\fn bool TQSessionManager::isPhase2() const
- Returns TRUE if the session manager is currently performing a second
- session management phase; otherwise returns FALSE.
+ Returns true if the session manager is currently performing a second
+ session management phase; otherwise returns false.
\sa requestPhase2()
*/
@@ -4910,12 +4910,12 @@ void* TQSessionManager::handle() const
#if !defined(TQ_WS_WIN)
bool TQSessionManager::allowsInteraction()
{
- return TRUE;
+ return true;
}
bool TQSessionManager::allowsErrorInteraction()
{
- return TRUE;
+ return true;
}
void TQSessionManager::release()
{
@@ -4967,7 +4967,7 @@ void TQSessionManager::setManagerProperty( const TQString&, const TQStringList&
bool TQSessionManager::isPhase2() const
{
- return FALSE;
+ return false;
}
void TQSessionManager::requestPhase2()