diff options
Diffstat (limited to 'tools')
201 files changed, 3201 insertions, 3201 deletions
diff --git a/tools/assistant/config.cpp b/tools/assistant/config.cpp index 4bdc7f38b..fc812c1f0 100644 --- a/tools/assistant/config.cpp +++ b/tools/assistant/config.cpp @@ -51,7 +51,7 @@ inline TQString getVersionString() } Config::Config() - : hideSidebar( FALSE ), profil( 0 ), maximized(FALSE) + : hideSidebar( false ), profil( 0 ), maximized(false) { fontSiz = tqApp->font().pointSize(); if( !static_configuration ) { @@ -116,7 +116,7 @@ void Config::load() webBrows = settings.readEntry( key + "Webbrowser" ); home = settings.readEntry( profkey + "Homepage" ); pdfApp = settings.readEntry( key + "PDFApplication" ); - linkUnder = settings.readBoolEntry( key + "LinkUnderline", TRUE ); + linkUnder = settings.readBoolEntry( key + "LinkUnderline", true ); linkCol = settings.readEntry( key + "LinkColor", "#0000FF" ); src = settings.readListEntry( profkey + "Source" ); sideBar = settings.readNumEntry( key + "SideBarPage" ); @@ -133,10 +133,10 @@ void Config::load() settings.readNumEntry( key + "GeometryY", TQApplication::desktop()->availableGeometry().y() ), settings.readNumEntry( key + "GeometryWidth", 800 ), settings.readNumEntry( key + "GeometryHeight", 600 ) ); - maximized = settings.readBoolEntry( key + "GeometryMaximized", FALSE ); + maximized = settings.readBoolEntry( key + "GeometryMaximized", false ); } mainWinLayout = settings.readEntry( key + "MainwindowLayout" ); - rebuildDocs = settings.readBoolEntry( key + "RebuildDocDB", TRUE ); + rebuildDocs = settings.readBoolEntry( key + "RebuildDocDB", true ); profileNames = settings.entryList( key + "Profile" ); } @@ -284,7 +284,7 @@ TQStringList Config::mimePaths() // Mime source for .dcf file path TQFileInfo info( *it ); - TQString dcfPath = info.dirPath(TRUE); + TQString dcfPath = info.dirPath(true); if (lst.contains(dcfPath) == 0) lst << dcfPath; diff --git a/tools/assistant/docuparser.cpp b/tools/assistant/docuparser.cpp index c819b766d..1437e470d 100644 --- a/tools/assistant/docuparser.cpp +++ b/tools/assistant/docuparser.cpp @@ -70,7 +70,7 @@ DocuParser *DocuParser::createParser( const TQString &fileName ) int read = 0; int maxlen = 1024; int majVer = 0, minVer = 0, serVer = 0; - static TQRegExp re( "assistantconfig +version=\"(\\d)\\.(\\d)\\.(\\d)\"", FALSE ); + static TQRegExp re( "assistantconfig +version=\"(\\d)\\.(\\d)\\.(\\d)\"", false ); Q_ASSERT( re.isValid() ); while( read != -1 ) { read = file.readLine( str, maxlen ); @@ -144,7 +144,7 @@ bool DocuParser310::startDocument() contentList.clear(); indexList.clear(); - return TRUE; + return true; } @@ -169,8 +169,8 @@ bool DocuParser310::startElement( const TQString &, const TQString &, state = StateKeyword; indexRef = absolutify( attr.value( "ref" ) ); } else - return FALSE; - return TRUE; + return false; + return true; } bool DocuParser310::endElement( const TQString &nameSpace, const TQString &localName, @@ -189,7 +189,7 @@ bool DocuParser310::endElement( const TQString &nameSpace, const TQString &local state = StateSect; break; } - return TRUE; + return true; } @@ -197,21 +197,21 @@ bool DocuParser310::characters( const TQString& ch ) { TQString str = ch.simplifyWhiteSpace(); if ( str.isEmpty() ) - return TRUE; + return true; switch ( state ) { case StateInit: case StateContent: case StateSect: - return FALSE; + return false; break; case StateKeyword: indexList.append( new IndexItem( str, indexRef ) ); break; default: - return FALSE; + return false; } - return TRUE; + return true; } @@ -260,7 +260,7 @@ bool DocuParser320::startDocument() prof->addDCF( fname ); - return TRUE; + return true; } bool DocuParser320::startElement( const TQString &, const TQString &, @@ -316,7 +316,7 @@ bool DocuParser320::startElement( const TQString &, const TQString &, break; } - return TRUE; + return true; } bool DocuParser320::endElement( const TQString &nameSpace, @@ -335,7 +335,7 @@ bool DocuParser320::endElement( const TQString &nameSpace, case StateProperty: state = StateProfile; if( propertyName.isEmpty() || propertyValue.isEmpty() ) - return FALSE; + return false; { static const TQStringList lst = TQStringList() << "startpage" << "abouturl" << "applicationicon" << "assistantdocs"; @@ -347,7 +347,7 @@ bool DocuParser320::endElement( const TQString &nameSpace, case StateContent: if( !iconName.isEmpty() ) prof->addDCFIcon( docTitle, iconName ); if( contentRef.isEmpty() ) - return FALSE; + return false; prof->addDCFIndexPage( docTitle, conURL ); prof->addDCFTitle( fname, docTitle ); state = StateDocRoot; @@ -359,20 +359,20 @@ bool DocuParser320::endElement( const TQString &nameSpace, state = StateSect; break; } - return TRUE; + return true; } bool DocuParser320::characters( const TQString& ch ) { TQString str = ch.simplifyWhiteSpace(); if ( str.isEmpty() ) - return TRUE; + return true; switch ( state ) { case StateInit: case StateContent: case StateSect: - return FALSE; + return false; break; case StateKeyword: indexList.append( new IndexItem( str, indexRef ) ); @@ -381,9 +381,9 @@ bool DocuParser320::characters( const TQString& ch ) propertyValue = ch; break; default: - return FALSE; + return false; } - return TRUE; + return true; } bool DocuParser320::fatalError( const TQXmlParseException& exception ) diff --git a/tools/assistant/finddialog.ui.h b/tools/assistant/finddialog.ui.h index f356dd4cd..f27a4a947 100644 --- a/tools/assistant/finddialog.ui.h +++ b/tools/assistant/finddialog.ui.h @@ -36,7 +36,7 @@ void FindDialog::init() { lastBrowser = 0; - onceFound = FALSE; + onceFound = false; findExpr = ""; sb = new TQStatusBar( this ); FindDialogLayout->addWidget( sb ); diff --git a/tools/assistant/helpdialogimpl.cpp b/tools/assistant/helpdialogimpl.cpp index a75573f3c..9290807ab 100644 --- a/tools/assistant/helpdialogimpl.cpp +++ b/tools/assistant/helpdialogimpl.cpp @@ -82,9 +82,9 @@ static bool verifyDirectory(const TQString &str) return TQDir().mkdir(str); if (!dirInfo.isDir()) { tqWarning("'%s' exists but is not a directory", str.latin1()); - return FALSE; + return false; } - return TRUE; + return true; } struct IndexKeyword { @@ -145,7 +145,7 @@ void HelpNavigationListItem::addLink( const TQString &link ) } TQString preHash = link.left( hash ); - if ( linkList.grep( preHash, FALSE ).count() > 0 ) + if ( linkList.grep( preHash, false ).count() > 0 ) return; linkList << link; } @@ -173,7 +173,7 @@ TQString HelpNavigationContentsItem::link() const HelpDialog::HelpDialog( TQWidget *parent, MainWindow *h ) - : HelpDialogBase( parent, 0, FALSE ), lwClosed( FALSE ), help( h ) + : HelpDialogBase( parent, 0, false ), lwClosed( false ), help( h ) { } @@ -226,9 +226,9 @@ void HelpDialog::initialize() editIndex->installEventFilter( this ); listBookmarks->header()->hide(); - listBookmarks->header()->setStretchEnabled( TRUE ); + listBookmarks->header()->setStretchEnabled( true ); listContents->header()->hide(); - listContents->header()->setStretchEnabled( TRUE ); + listContents->header()->setStretchEnabled( true ); framePrepare->hide(); connect( tqApp, TQ_SIGNAL(lastWindowClosed()), TQ_SLOT(lastWinClosed()) ); @@ -239,15 +239,15 @@ void HelpDialog::initialize() itemPopup->insertItem( tr( "Open Link in New Window" ), 1 ); itemPopup->insertItem( tr( "Open Link in New Tab" ), 2 ); - contentList.setAutoDelete( TRUE ); + contentList.setAutoDelete( true ); contentList.clear(); - initDoneMsgShown = FALSE; + initDoneMsgShown = false; fullTextIndex = 0; - indexDone = FALSE; - titleMapDone = FALSE; - contentsInserted = FALSE; - bookmarksInserted = FALSE; + indexDone = false; + titleMapDone = false; + contentsInserted = false; + bookmarksInserted = false; setupTitleMap(); } @@ -260,7 +260,7 @@ void HelpDialog::processEvents() void HelpDialog::lastWinClosed() { - lwClosed = TRUE; + lwClosed = true; } @@ -302,7 +302,7 @@ void HelpDialog::loadIndexFile() return; setCursor( waitCursor ); - indexDone = TRUE; + indexDone = true; labelPrepare->setText( tr( "Prepare..." ) ); framePrepare->show(); processEvents(); @@ -330,7 +330,7 @@ void HelpDialog::loadIndexFile() } } - editIndex->setEnabled(FALSE); + editIndex->setEnabled(false); TQDataStream ds( &indexFile ); TQ_UINT32 fileAges; @@ -341,7 +341,7 @@ void HelpDialog::loadIndexFile() if ( !indexFile.open( IO_ReadOnly ) ) { TQMessageBox::warning( help, tr( "TQt Assistant" ), tr( "Cannot open the index file %1" ).arg( TQFileInfo( indexFile ).absFilePath() ) ); - editIndex->setEnabled(TRUE); + editIndex->setEnabled(true); return; } ds.setDevice( &indexFile ); @@ -373,7 +373,7 @@ void HelpDialog::loadIndexFile() framePrepare->hide(); showInitDoneMessage(); setCursor( arrowCursor ); - editIndex->setEnabled(TRUE); + editIndex->setEnabled(true); } TQ_UINT32 HelpDialog::getFileAges() @@ -467,13 +467,13 @@ void HelpDialog::setupTitleMap() return; if ( Config::configuration()->docRebuild() ) { removeOldCacheFiles(); - Config::configuration()->setDocRebuild( FALSE ); + Config::configuration()->setDocRebuild( false ); Config::configuration()->saveProfile( Config::configuration()->profile() ); } if ( contentList.isEmpty() ) getAllContents(); - titleMapDone = TRUE; + titleMapDone = true; titleMap.clear(); TQDictIterator<ContentList> lstIt( contentList ); for ( ; lstIt.current(); ++lstIt ) { @@ -583,7 +583,7 @@ void HelpDialog::showInitDoneMessage() { if ( initDoneMsgShown ) return; - initDoneMsgShown = TRUE; + initDoneMsgShown = true; help->statusBar()->message( tr( "Done" ), 3000 ); } @@ -628,9 +628,9 @@ void HelpDialog::showIndexTopic() if ( !i ) return; - editIndex->blockSignals( TRUE ); + editIndex->blockSignals( true ); editIndex->setText( i->text() ); - editIndex->blockSignals( FALSE ); + editIndex->blockSignals( false ); HelpNavigationListItem *item = (HelpNavigationListItem*)i; @@ -681,7 +681,7 @@ TQString HelpDialog::titleOfLink( const TQString &link ) bool HelpDialog::eventFilter( TQObject * o, TQEvent * e ) { if ( !o || !e ) - return TRUE; + return true; if ( o == editIndex && e->type() == TQEvent::KeyPress ) { TQKeyEvent *ke = (TQKeyEvent*)e; @@ -689,25 +689,25 @@ bool HelpDialog::eventFilter( TQObject * o, TQEvent * e ) int i = listIndex->currentItem(); if ( --i >= 0 ) { listIndex->setCurrentItem( i ); - editIndex->blockSignals( TRUE ); + editIndex->blockSignals( true ); editIndex->setText( listIndex->currentText() ); - editIndex->blockSignals( FALSE ); + editIndex->blockSignals( false ); } - return TRUE; + return true; } else if ( ke->key() == Key_Down ) { int i = listIndex->currentItem(); if ( ++i < int(listIndex->count()) ) { listIndex->setCurrentItem( i ); - editIndex->blockSignals( TRUE ); + editIndex->blockSignals( true ); editIndex->setText( listIndex->currentText() ); - editIndex->blockSignals( FALSE ); + editIndex->blockSignals( false ); } - return TRUE; + return true; } else if ( ke->key() == Key_Next || ke->key() == Key_Prior ) { TQApplication::sendEvent( listIndex, e); - editIndex->blockSignals( TRUE ); + editIndex->blockSignals( true ); editIndex->setText( listIndex->currentText() ); - editIndex->blockSignals( FALSE ); + editIndex->blockSignals( false ); } } @@ -738,7 +738,7 @@ void HelpDialog::removeBookmark() delete listBookmarks->currentItem(); saveBookmarks(); if ( listBookmarks->firstChild() ) { - listBookmarks->setSelected( listBookmarks->firstChild(), TRUE ); + listBookmarks->setSelected( listBookmarks->firstChild(), true ); } help->updateBookmarkMenu(); } @@ -747,7 +747,7 @@ void HelpDialog::insertBookmarks() { if ( bookmarksInserted ) return; - bookmarksInserted = TRUE; + bookmarksInserted = true; listBookmarks->clear(); TQFile f( cacheFilesPath + "bookmarks." + Config::configuration()->profileName() ); if ( !f.open( IO_ReadOnly ) ) @@ -801,7 +801,7 @@ void HelpDialog::insertContents() if ( contentList.isEmpty() ) getAllContents(); - contentsInserted = TRUE; + contentsInserted = true; listContents->clear(); setCursor( waitCursor ); if ( !titleMapDone ) @@ -817,7 +817,7 @@ void HelpDialog::insertContents() TQPtrStack<HelpNavigationContentsItem> stack; stack.clear(); int depth = 0; - bool root = FALSE; + bool root = false; HelpNavigationContentsItem *lastItem[64]; for( int j = 0; j < 64; ++j ) @@ -835,7 +835,7 @@ void HelpDialog::insertContents() newEntry->setLink( item.reference ); stack.push( newEntry ); depth = 1; - root = TRUE; + root = true; } else{ if( (item.depth > depth) && root ) { @@ -928,9 +928,9 @@ void HelpDialog::setupFullTextIndex() "Assistant will not work!")); return; } - searchButton->setEnabled(FALSE); - helpButton->setEnabled(FALSE); - termsEdit->setEnabled(FALSE); + searchButton->setEnabled(false); + helpButton->setEnabled(false); + termsEdit->setEnabled(false); fullTextIndex->setDictionaryFile( cacheFilesPath + "indexdb.dict." + pname ); fullTextIndex->setDocListFile( cacheFilesPath + "indexdb.doc." + pname ); @@ -982,9 +982,9 @@ void HelpDialog::setupFullTextIndex() help->statusBar()->message( tr( "Done" ), 3000 ); setCursor( arrowCursor ); } - searchButton->setEnabled(TRUE); - termsEdit->setEnabled(TRUE); - helpButton->setEnabled(TRUE); + searchButton->setEnabled(true); + termsEdit->setEnabled(true); + helpButton->setEnabled(true); } void HelpDialog::setIndexingProgress( int prog ) @@ -1047,7 +1047,7 @@ void HelpDialog::startSearch() resultBox->insertItem( fullTextIndex->getDocumentTitle( *it ) ); terms.clear(); - bool isPhrase = FALSE; + bool isPhrase = false; TQString s = ""; for ( int i = 0; i < (int)buf.length(); ++i ) { if ( buf[i] == '\"' ) { @@ -1103,9 +1103,9 @@ void HelpDialog::showItemMenu( TQListBoxItem *item, const TQPoint &pos ) } else if ( id > 0 ) { HelpWindow *hw = help->browsers()->currentBrowser(); if ( stripAmpersand( tabWidget->tabLabel( tabWidget->currentPage() ) ).contains( tr( "Index" ) ) ) { - editIndex->blockSignals( TRUE ); + editIndex->blockSignals( true ); editIndex->setText( item->text() ); - editIndex->blockSignals( FALSE ); + editIndex->blockSignals( false ); HelpNavigationListItem *hi = (HelpNavigationListItem*)item; diff --git a/tools/assistant/helpwindow.cpp b/tools/assistant/helpwindow.cpp index 175bc577b..e59b2cc2a 100644 --- a/tools/assistant/helpwindow.cpp +++ b/tools/assistant/helpwindow.cpp @@ -56,8 +56,8 @@ #endif HelpWindow::HelpWindow( MainWindow *w, TQWidget *parent, const char *name ) - : TQTextBrowser( parent, name ), mw( w ), blockScroll( FALSE ), - shiftPressed( FALSE ), newWindow( FALSE ) + : TQTextBrowser( parent, name ), mw( w ), blockScroll( false ), + shiftPressed( false ), newWindow( false ) { connect(this, TQ_SIGNAL(forwardAvailable(bool)), this, TQ_SLOT(updateForward(bool))); connect(this, TQ_SIGNAL(backwardAvailable(bool)), this, TQ_SLOT(updateBackward(bool))); @@ -78,7 +78,7 @@ void HelpWindow::setSource( const TQString &name ) TQFileInfo linkInfo( name ); TQString target = name; if( linkInfo.isRelative() ) - target = currentInfo.dirPath( TRUE ) + "/" + name; + target = currentInfo.dirPath( true ) + "/" + name; nmw->setup(); nmw->move( mw->geometry().topLeft() ); @@ -170,9 +170,9 @@ void HelpWindow::openLinkInNewWindow() { if ( lastAnchor.isEmpty() ) return; - newWindow = TRUE; + newWindow = true; setSource(lastAnchor); - newWindow = FALSE; + newWindow = false; } void HelpWindow::openLinkInNewWindow( const TQString &link ) diff --git a/tools/assistant/index.cpp b/tools/assistant/index.cpp index c5d142208..dccc5833f 100644 --- a/tools/assistant/index.cpp +++ b/tools/assistant/index.cpp @@ -67,8 +67,8 @@ TQDataStream &operator<<( TQDataStream &s, const Document &l ) Index::Index( const TQString &dp, const TQString &hp ) : TQObject( 0, 0 ), dict( 8999 ), docPath( dp ) { - alreadyHaveDocList = FALSE; - lastWindowClosed = FALSE; + alreadyHaveDocList = false; + lastWindowClosed = false; connect( tqApp, TQ_SIGNAL( lastWindowClosed() ), this, TQ_SLOT( setLastWinClosed() ) ); } @@ -77,15 +77,15 @@ Index::Index( const TQStringList &dl, const TQString &hp ) : TQObject( 0, 0 ), dict( 8999 ) { docList = dl; - alreadyHaveDocList = TRUE; - lastWindowClosed = FALSE; + alreadyHaveDocList = true; + lastWindowClosed = false; connect( tqApp, TQ_SIGNAL( lastWindowClosed() ), this, TQ_SLOT( setLastWinClosed() ) ); } void Index::setLastWinClosed() { - lastWindowClosed = TRUE; + lastWindowClosed = true; } void Index::setDictionaryFile( const TQString &f ) @@ -167,7 +167,7 @@ void Index::parseDocument( const TQString &filename, int docNum ) if (text.isNull()) return; - bool valid = TRUE; + bool valid = true; const TQChar *buf = text.unicode(); TQChar str[64]; TQChar c = buf[0]; @@ -175,7 +175,7 @@ void Index::parseDocument( const TQString &filename, int docNum ) int i = 0; while ( (uint)j < text.length() ) { if ( c == '<' || c == '&' ) { - valid = FALSE; + valid = false; if ( i > 1 ) insertInDict( TQString(str,i), docNum ); i = 0; @@ -183,7 +183,7 @@ void Index::parseDocument( const TQString &filename, int docNum ) continue; } if ( ( c == '>' || c == ';' ) && !valid ) { - valid = TRUE; + valid = true; c = buf[++j]; continue; } @@ -291,11 +291,11 @@ TQStringList Index::query( const TQStringList &terms, const TQStringList &termSe TQValueList<Document> docs = t->documents; C = minDocs.begin(); while ( C != minDocs.end() ) { - bool found = FALSE; + bool found = false; for ( It = docs.begin(); It != docs.end(); ++It ) { if ( (*C).docNumber == (*It).docNumber ) { (*C).frequency += (*It).frequency; - found = TRUE; + found = true; break; } } @@ -333,8 +333,8 @@ TQString Index::getDocumentTitle( const TQString &fileName ) TQTextStream s( &file ); TQString text = s.read(); - int start = text.find( "<title>", 0, FALSE ) + 7; - int end = text.find( "</title>", 0, FALSE ); + int start = text.find( "<title>", 0, false ) + 7; + int end = text.find( "</title>", 0, false ); TQString title = ( end - start <= 0 ? tr("Untitled") : text.mid( start, end - start ) ); return title; @@ -349,31 +349,31 @@ TQStringList Index::getWildcardTerms( const TQString &term ) TQDictIterator<Entry> it( dict ); for( ; it.current(); ++it ) { int index = 0; - bool found = FALSE; + bool found = false; TQString text( it.currentKey() ); for ( iter = terms.begin(); iter != terms.end(); ++iter ) { if ( *iter == "*" ) { - found = TRUE; + found = true; continue; } if ( iter == terms.begin() && (*iter)[0] != text[0] ) { - found = FALSE; + found = false; break; } index = text.find( *iter, index ); if ( *iter == terms.last() && index != (int)text.length()-1 ) { index = text.findRev( *iter ); if ( index != (int)text.length() - (int)(*iter).length() ) { - found = FALSE; + found = false; break; } } if ( index != -1 ) { - found = TRUE; + found = true; index += (*iter).length(); continue; } else { - found = FALSE; + found = false; break; } } @@ -451,7 +451,7 @@ bool Index::searchForPattern( const TQStringList &patterns, const TQStringList & TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) { tqWarning( "cannot open file " + fileName ); - return FALSE; + return false; } wordNum = 3; @@ -462,7 +462,7 @@ bool Index::searchForPattern( const TQStringList &patterns, const TQStringList & TQTextStream s( &file ); TQString text = s.read(); - bool valid = TRUE; + bool valid = true; const TQChar *buf = text.unicode(); TQChar str[64]; TQChar c = buf[0]; @@ -470,7 +470,7 @@ bool Index::searchForPattern( const TQStringList &patterns, const TQStringList & int i = 0; while ( (uint)j < text.length() ) { if ( c == '<' || c == '&' ) { - valid = FALSE; + valid = false; if ( i > 1 ) buildMiniDict( TQString(str,i) ); i = 0; @@ -478,7 +478,7 @@ bool Index::searchForPattern( const TQStringList &patterns, const TQStringList & continue; } if ( ( c == '>' || c == ';' ) && !valid ) { - valid = TRUE; + valid = true; c = buf[++j]; continue; } @@ -521,6 +521,6 @@ bool Index::searchForPattern( const TQStringList &patterns, const TQStringList & } } if ( a.count() ) - return TRUE; - return FALSE; + return true; + return false; } diff --git a/tools/assistant/lib/qassistantclient.cpp b/tools/assistant/lib/qassistantclient.cpp index 56eda22e5..d5d34b513 100644 --- a/tools/assistant/lib/qassistantclient.cpp +++ b/tools/assistant/lib/qassistantclient.cpp @@ -47,7 +47,7 @@ class TQAssistantClientPrivate static TQMap<const TQAssistantClient*,TQAssistantClientPrivate*> *dpointers = 0; -static TQAssistantClientPrivate *data( const TQAssistantClient *client, bool create=FALSE ) +static TQAssistantClientPrivate *data( const TQAssistantClient *client, bool create=false ) { if( !dpointers ) dpointers = new TQMap<const TQAssistantClient*,TQAssistantClientPrivate*>; @@ -71,7 +71,7 @@ static TQAssistantClientPrivate *data( const TQAssistantClient *client, bool cre The TQAssistantClient instance can open (openAssistant()) or close (closeAssistant()) TQt Assistant whenever required. If TQt Assistant - is open, isOpen() returns TRUE. + is open, isOpen() returns true. One TQAssistantClient instance interacts with one TQt Assistant instance, so every time you call openAssistant(), showPage() or @@ -157,7 +157,7 @@ TQAssistantClient::TQAssistantClient( const TQString &path, TQObject *parent, co TQ_SLOT( socketConnectionClosed() ) ); connect( socket, TQ_SIGNAL( error( int ) ), TQ_SLOT( socketError( int ) ) ); - opened = FALSE; + opened = false; proc = new TQProcess( this ); port = 0; pageBuffer = ""; @@ -290,7 +290,7 @@ bool TQAssistantClient::isOpen() const void TQAssistantClient::socketConnected() { - opened = TRUE; + opened = true; if ( !pageBuffer.isEmpty() ) showPage( pageBuffer ); emit assistantOpened(); @@ -298,7 +298,7 @@ void TQAssistantClient::socketConnected() void TQAssistantClient::socketConnectionClosed() { - opened = FALSE; + opened = false; emit assistantClosed(); } @@ -329,6 +329,6 @@ void TQAssistantClient::readStdError() */ void TQAssistantClient::setArguments( const TQStringList &args ) { - TQAssistantClientPrivate *d = data( this, TRUE ); + TQAssistantClientPrivate *d = data( this, true ); d->arguments = args; } diff --git a/tools/assistant/main.cpp b/tools/assistant/main.cpp index 4f7d21b9d..9df6637ce 100644 --- a/tools/assistant/main.cpp +++ b/tools/assistant/main.cpp @@ -54,7 +54,7 @@ #define INDEX_CHECK( text ) if( i+1 >= argc ) { fprintf( stderr, text "\n" ); return 1; } #endif -static bool allowFirstRun = TRUE; +static bool allowFirstRun = true; class AssistantSocket : public TQSocket { @@ -142,7 +142,7 @@ void AssistantServer::newConnection( int socket ) int main( int argc, char ** argv ) { - bool withGUI = TRUE; + bool withGUI = true; if ( argc > 1 ) { TQString arg( argv[1] ); arg = arg.lower(); @@ -152,7 +152,7 @@ int main( int argc, char ** argv ) || arg == "-help" #endif ) - withGUI = FALSE; + withGUI = false; } TQApplication a(argc, argv, withGUI); @@ -160,10 +160,10 @@ int main( int argc, char ** argv ) AssistantServer *as = 0; TQStringList catlist; TQString file, profileName, aDocPath; - bool server = FALSE; - bool hideSidebar = FALSE; - bool startClean = FALSE; - bool configLoaded = FALSE; + bool server = false; + bool hideSidebar = false; + bool startClean = false; + bool configLoaded = false; if ( argc == 2 ) { if ( (argv[1])[0] != '-' ) file = argv[1]; @@ -175,7 +175,7 @@ int main( int argc, char ** argv ) i++; file = argv[i]; } else if ( TQString( argv[i] ).lower() == "-server" ) { - server = TRUE; + server = true; } else if ( TQString( argv[i] ).lower() == "-profile" ) { INDEX_CHECK( "Missing profile argument!" ); profileName = argv[++i]; @@ -199,7 +199,7 @@ int main( int argc, char ** argv ) return 1; } parser->addTo( c->profile() ); - c->setDocRebuild( TRUE ); + c->setDocRebuild( true ); c->save(); } return 0; @@ -227,7 +227,7 @@ int main( int argc, char ** argv ) return 1; } profile->removeDocFileEntry( file.absFilePath() ); - c->setDocRebuild( TRUE ); + c->setDocRebuild( true ); c->save(); } return 0; @@ -238,9 +238,9 @@ int main( int argc, char ** argv ) Config *c = Config::loadConfig( TQString::null ); c->saveProfile(Profile::createDefaultProfile(dir.absPath())); c->loadDefaultProfile(); - c->setDocRebuild( TRUE ); + c->setDocRebuild( true ); c->save(); - configLoaded = TRUE; + configLoaded = true; ++i; } else { fprintf( stderr, "The specified path does not exist!\n"); @@ -248,7 +248,7 @@ int main( int argc, char ** argv ) return 1; } } else if ( TQString( argv[i] ).lower() == "-hidesidebar" ) { - hideSidebar = TRUE; + hideSidebar = true; } else if ( TQString( argv[i] ).lower() == "-help" ) { TQString helpText( "Usage: assistant [option]\n" "Options:\n" diff --git a/tools/assistant/mainwindow.ui.h b/tools/assistant/mainwindow.ui.h index 480ba7283..3dbf61ad5 100644 --- a/tools/assistant/mainwindow.ui.h +++ b/tools/assistant/mainwindow.ui.h @@ -57,11 +57,11 @@ void MainWindow::init() // certain user configs. See task: 34372 qt_ntfs_permission_lookup = 0; #endif - setupCompleted = FALSE; + setupCompleted = false; goActions = new TQPtrList<TQAction>; goActionDocFiles = new TQMap<TQAction*,TQString>; - goActions->setAutoDelete( TRUE ); + goActions->setAutoDelete( true ); if ( !windows ) windows = new TQPtrList<MainWindow>; @@ -76,7 +76,7 @@ void MainWindow::init() dw = new TQDockWindow( TQDockWindow::InDock, this ); helpDock = new HelpDialog( dw, this ); - dw->setResizeEnabled( TRUE ); + dw->setResizeEnabled( true ); dw->setCloseMode( TQDockWindow::Always ); addDockWindow( dw, DockLeft ); dw->setWidget( helpDock ); @@ -120,7 +120,7 @@ void MainWindow::setup() tqApp->setOverrideCursor( TQCursor( TQt::WaitCursor ) ); statusBar()->message( tr( "Initializing TQt Assistant..." ) ); - setupCompleted = TRUE; + setupCompleted = true; helpDock->initialize(); connect( actionGoPrevious, TQ_SIGNAL( activated() ), tabs, TQ_SLOT( backward() ) ); connect( actionGoNext, TQ_SIGNAL( activated() ), tabs, TQ_SLOT( forward() ) ); @@ -168,8 +168,8 @@ void MainWindow::setup() helpDock->tabWidget->setCurrentPage( config->sideBarPage() ); tqApp->restoreOverrideCursor(); - actionGoPrevious->setEnabled( FALSE ); - actionGoNext->setEnabled( FALSE ); + actionGoPrevious->setEnabled( false ); + actionGoNext->setEnabled( false ); } void MainWindow::setupGoActions() @@ -178,7 +178,7 @@ void MainWindow::setupGoActions() TQStringList titles = config->docTitles(); TQAction *action = 0; - static bool separatorInserted = FALSE; + static bool separatorInserted = false; TQAction *cur = goActions->first(); while( cur ) { @@ -198,7 +198,7 @@ void MainWindow::setupGoActions() if( !pix.isNull() ) { if( !separatorInserted ) { goMenu->insertSeparator(); - separatorInserted = TRUE; + separatorInserted = true; } action = new TQAction( title, TQIconSet( pix ), title, 0, 0 ); action->addTo( goMenu ); @@ -229,7 +229,7 @@ bool MainWindow::insertActionSeparator() { goMenu->insertSeparator(); Toolbar->addSeparator(); - return TRUE; + return true; } bool MainWindow::close( bool alsoDelete ) @@ -309,7 +309,7 @@ void MainWindow::findAgain() find(); return; } - findDialog->doFind(TRUE); + findDialog->doFind(true); } void MainWindow::findAgainPrev() @@ -318,7 +318,7 @@ void MainWindow::findAgainPrev() find(); return; } - findDialog->doFind(FALSE); + findDialog->doFind(false); } void MainWindow::goHome() @@ -329,7 +329,7 @@ void MainWindow::goHome() void MainWindow::print() { TQPrinter printer( TQPrinter::HighResolution ); - printer.setFullPage( TRUE ); + printer.setFullPage( true ); if ( printer.setup( this ) ) { TQPainter p; if ( !p.begin( &printer ) ) @@ -348,7 +348,7 @@ void MainWindow::print() metrics.height() - 2 * margin ); TQSimpleRichText richText( browser->text(), browser->TQWidget::font(), browser->context(), browser->styleSheet(), browser->mimeSourceFactory(), - view.height(), TQt::black, FALSE ); + view.height(), TQt::black, false ); richText.setWidth( &p, view.width() ); int page = 1; do { @@ -363,7 +363,7 @@ void MainWindow::print() break; printer.newPage(); page++; - } while (TRUE); + } while (true); tqApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); tqApp->restoreOverrideCursor(); @@ -611,7 +611,7 @@ TabbedBrowser* MainWindow::browsers() void MainWindow::showSearchLink( const TQString &link, const TQStringList &terms ) { HelpWindow * hw = tabs->currentBrowser(); - hw->blockScrolling( TRUE ); + hw->blockScrolling( true ); hw->setCursor( waitCursor ); if ( hw->source() == link ) hw->reload(); @@ -620,25 +620,25 @@ void MainWindow::showSearchLink( const TQString &link, const TQStringList &terms hw->sync(); hw->setCursor( arrowCursor ); - hw->viewport()->setUpdatesEnabled( FALSE ); + hw->viewport()->setUpdatesEnabled( false ); int minPar = INT_MAX; int minIndex = INT_MAX; TQStringList::ConstIterator it = terms.begin(); for ( ; it != terms.end(); ++it ) { int para = 0; int index = 0; - bool found = hw->find( *it, FALSE, TRUE, TRUE, ¶, &index ); + bool found = hw->find( *it, false, true, true, ¶, &index ); while ( found ) { if ( para < minPar ) { minPar = para; minIndex = index; } hw->setColor( red ); - found = hw->find( *it, FALSE, TRUE, TRUE ); + found = hw->find( *it, false, true, true ); } } - hw->blockScrolling( FALSE ); - hw->viewport()->setUpdatesEnabled( TRUE ); + hw->blockScrolling( false ); + hw->viewport()->setUpdatesEnabled( true ); hw->setCursorPosition( minPar, minIndex ); hw->updateContents(); } diff --git a/tools/assistant/profile.cpp b/tools/assistant/profile.cpp index d7634646e..3ce6ce008 100644 --- a/tools/assistant/profile.cpp +++ b/tools/assistant/profile.cpp @@ -50,7 +50,7 @@ Profile *Profile::createDefaultProfile( const TQString &docPath ) path = docPath; path = path + "/html/"; Profile *profile = new Profile; - profile->valid = TRUE; + profile->valid = true; profile->type = DefaultProfile; profile->props["name"] = "default"; profile->props["applicationicon"] = "appicon.png"; @@ -88,7 +88,7 @@ Profile *Profile::createDefaultProfile( const TQString &docPath ) Profile::Profile() - : valid( TRUE ), dparser( 0 ) + : valid( true ), dparser( 0 ) { } diff --git a/tools/assistant/tabbedbrowser.ui.h b/tools/assistant/tabbedbrowser.ui.h index 2d0a04393..451c1574a 100644 --- a/tools/assistant/tabbedbrowser.ui.h +++ b/tools/assistant/tabbedbrowser.ui.h @@ -127,7 +127,7 @@ void TabbedBrowser::zoomOut() void TabbedBrowser::init() { - tabLinkUnderline = FALSE; + tabLinkUnderline = false; tabStyleSheet = new TQStyleSheet( TQStyleSheet::defaultSheet() ); lastCurrentTab = 0; while( tab->count() ) @@ -146,7 +146,7 @@ void TabbedBrowser::init() connect( tab, TQ_SIGNAL( currentChanged( TQWidget* ) ), mainWindow(), TQ_SLOT( browserTabChanged() ) ); - TQTabBar *tabBar = (TQTabBar*)tab->child( 0, "TQTabBar", FALSE ); + TQTabBar *tabBar = (TQTabBar*)tab->child( 0, "TQTabBar", false ); int m = ( tabBar ? style().pixelMetric( TQStyle::PM_TabBarTabVSpace, (TQWidget*)tabBar ) + style().pixelMetric( TQStyle::PM_TabBarBaseHeight, (TQWidget*)tabBar ) : 0 ); int s = tab->height() - m; @@ -161,7 +161,7 @@ void TabbedBrowser::init() newTabButton->setPalette(pal); tab->setCornerWidget( newTabButton, TQt::TopLeft ); newTabButton->setCursor( arrowCursor ); - newTabButton->setAutoRaise( TRUE ); + newTabButton->setAutoRaise( true ); newTabButton->setPixmap( TQPixmap::fromMimeSource( "addtab.png" ) ); newTabButton->setFixedSize( s, s ); TQObject::connect( newTabButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( newTab() ) ); @@ -171,7 +171,7 @@ void TabbedBrowser::init() closeTabButton->setPalette(pal); tab->setCornerWidget( closeTabButton, TQt::TopRight ); closeTabButton->setCursor( arrowCursor ); - closeTabButton->setAutoRaise( TRUE ); + closeTabButton->setAutoRaise( true ); TQIconSet is( TQPixmap::fromMimeSource( "closetab.png") ); TQPixmap disabledPix = TQPixmap::fromMimeSource( "d_closetab.png" ); is.setPixmap( disabledPix, TQIconSet::Small, TQIconSet::Disabled ); @@ -179,7 +179,7 @@ void TabbedBrowser::init() closeTabButton->setFixedSize( s, s ); TQObject::connect( closeTabButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( closeTab() ) ); TQToolTip::add( closeTabButton, tr( "Close page" ) ); - closeTabButton->setEnabled( FALSE ); + closeTabButton->setEnabled( false ); } void TabbedBrowser::setMimePath( TQStringList lst ) diff --git a/tools/assistant/topicchooserimpl.cpp b/tools/assistant/topicchooserimpl.cpp index 736aa4845..c7b815944 100644 --- a/tools/assistant/topicchooserimpl.cpp +++ b/tools/assistant/topicchooserimpl.cpp @@ -39,7 +39,7 @@ TopicChooser::TopicChooser( TQWidget *parent, const TQStringList &lnkNames, const TQStringList &lnks, const TQString &title ) - : TopicChooserBase( parent, 0, TRUE ), links( lnks ), linkNames( lnkNames ) + : TopicChooserBase( parent, 0, true ), links( lnks ), linkNames( lnkNames ) { label->setText( tr( "Choose a topic for <b>%1</b>" ).arg( title ) ); listbox->insertStringList( linkNames ); diff --git a/tools/designer/app/main.cpp b/tools/designer/app/main.cpp index 74dadc19c..a2a044449 100644 --- a/tools/designer/app/main.cpp +++ b/tools/designer/app/main.cpp @@ -72,7 +72,7 @@ static void signalHandler( QT_SIGNAL_ARGS ) #if 0 // ### what's this dead code for? FormWindow* totop; #endif - bool haveit = FALSE; + bool haveit = false; while ( fw ) { haveit = haveit || fw->fileName() == arg; #if 0 // ### what's this dead code for? @@ -118,7 +118,7 @@ int main( int argc, char *argv[] ) DesignerApplication::setOverrideCursor( TQt::WaitCursor ); - bool creatPid = FALSE; + bool creatPid = false; if ( a.argc() > 1 ) { TQString arg1 = a.argv()[ 1 ]; if ( arg1 == "-client" ) { @@ -135,12 +135,12 @@ int main( int argc, char *argv[] ) f.close(); #if defined(Q_OS_UNIX) if ( kill( pidStr.toInt(), SIGUSR1 ) == -1 ) - creatPid = TRUE; + creatPid = true; else return 0; #elif defined(Q_OS_WIN32) if ( !GetProcessVersion( pidStr.toUInt() ) ) { - creatPid = TRUE; + creatPid = true; } else { if ( a.winVersion() & TQt::WV_NT_based ) SendMessage( HWND_BROADCAST, RegisterWindowMessage((TCHAR*)"QT_DESIGNER_OPEN_FILE"), 0, 0 ); @@ -150,11 +150,11 @@ int main( int argc, char *argv[] ) } #endif } else { - creatPid = TRUE; + creatPid = true; } } else if(arg1 == "-debug_stderr") { extern bool debugToStderr; //outputwindow.cpp - debugToStderr = TRUE; + debugToStderr = true; } } @@ -191,7 +191,7 @@ int main( int argc, char *argv[] ) MainWindow *mw = new MainWindow( creatPid ); a.setMainWidget( mw ); mw->setCaption( "TQt Designer by Trolltech" ); - if ( config.readBoolEntry( keybase + "Geometries/MainwindowMaximized", FALSE ) ) { + if ( config.readBoolEntry( keybase + "Geometries/MainwindowMaximized", false ) ) { int x = config.readNumEntry( keybase + "Geometries/MainwindowX", 0 ); int y = config.readNumEntry( keybase + "Geometries/MainwindowY", 0 ); mw->move( x, y ); diff --git a/tools/designer/designer/actiondnd.cpp b/tools/designer/designer/actiondnd.cpp index 841ab00d6..82f483b2a 100644 --- a/tools/designer/designer/actiondnd.cpp +++ b/tools/designer/designer/actiondnd.cpp @@ -111,12 +111,12 @@ bool TQDesignerAction::addTo( TQWidget *w ) return TQAction::addTo( w ); if ( ::tqt_cast<TQPopupMenu*>(w) ) - return FALSE; + return false; - widgetToInsert->reparent( w, TQPoint( 0, 0 ), FALSE ); + widgetToInsert->reparent( w, TQPoint( 0, 0 ), false ); widgetToInsert->show(); addedTo( widgetToInsert, w ); - return TRUE; + return true; } bool TQDesignerAction::removeFrom( TQWidget *w ) @@ -125,15 +125,15 @@ bool TQDesignerAction::removeFrom( TQWidget *w ) return TQAction::removeFrom( w ); remove(); - return TRUE; + return true; } void TQDesignerAction::remove() { if ( !widgetToInsert ) return; - MainWindow::self->formWindow()->selectWidget( widgetToInsert, FALSE ); - widgetToInsert->reparent( 0, TQPoint( 0, 0 ), FALSE ); + MainWindow::self->formWindow()->selectWidget( widgetToInsert, false ); + widgetToInsert->reparent( 0, TQPoint( 0, 0 ), false ); } class TQDesignerIndicatorWidget : public TQWidget @@ -204,25 +204,25 @@ bool TQSeparatorAction::addTo( TQWidget *w ) if ( ::tqt_cast<TQToolBar*>(w) ) { TQToolBar *tb = (TQToolBar*)w; wid = new TQDesignerToolBarSeparator( tb->orientation(), tb ); - return TRUE; + return true; } else if ( ::tqt_cast<TQPopupMenu*>(w) ) { idx = ( (TQPopupMenu*)w )->count(); ( (TQPopupMenu*)w )->insertSeparator( idx ); - return TRUE; + return true; } - return FALSE; + return false; } bool TQSeparatorAction::removeFrom( TQWidget *w ) { if ( ::tqt_cast<TQToolBar*>(w) ) { delete wid; - return TRUE; + return true; } else if ( ::tqt_cast<TQPopupMenu*>(w) ) { ( (TQPopupMenu*)w )->removeItemAt( idx ); - return TRUE; + return true; } - return FALSE; + return false; } TQWidget *TQSeparatorAction::widget() const @@ -236,31 +236,31 @@ TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw ) : TQToolBar( mw ), lastIndicatorPos( -1, -1 ) { insertAnchor = 0; - afterAnchor = TRUE; - setAcceptDrops( TRUE ); + afterAnchor = true; + setAcceptDrops( true ); MetaDataBase::addEntry( this ); lastIndicatorPos = TQPoint( -1, -1 ); indicator = new TQDesignerIndicatorWidget( this ); indicator->hide(); installEventFilter( this ); - widgetInserting = FALSE; + widgetInserting = false; findFormWindow(); - mw->setDockEnabled( DockTornOff, FALSE ); + mw->setDockEnabled( DockTornOff, false ); } TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw, Dock dock ) : TQToolBar( TQString::null, mw, dock), lastIndicatorPos( -1, -1 ) { insertAnchor = 0; - afterAnchor = TRUE; - setAcceptDrops( TRUE ); + afterAnchor = true; + setAcceptDrops( true ); indicator = new TQDesignerIndicatorWidget( this ); indicator->hide(); MetaDataBase::addEntry( this ); installEventFilter( this ); - widgetInserting = FALSE; + widgetInserting = false; findFormWindow(); - mw->setDockEnabled( DockTornOff, FALSE ); + mw->setDockEnabled( DockTornOff, false ); } void TQDesignerToolBar::findFormWindow() @@ -304,7 +304,7 @@ bool TQDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) if ( o == this && e->type() == TQEvent::MouseButtonPress && ( ( TQMouseEvent*)e )->button() == LeftButton ) { mousePressEvent( (TQMouseEvent*)e ); - return TRUE; + return true; } if ( o == this ) @@ -314,30 +314,30 @@ bool TQDesignerToolBar::eventFilter( TQObject *o, TQEvent *e ) TQMouseEvent *ke = (TQMouseEvent*)e; fixObject( o ); if ( !o ) - return FALSE; + return false; buttonMousePressEvent( ke, o ); - return TRUE; + return true; } else if(e->type() == TQEvent::ContextMenu ) { TQContextMenuEvent *ce = (TQContextMenuEvent*)e; fixObject( o ); if( !o ) - return FALSE; + return false; buttonContextMenuEvent( ce, o ); - return TRUE; + return true; } else if ( e->type() == TQEvent::MouseMove ) { TQMouseEvent *ke = (TQMouseEvent*)e; fixObject( o ); if ( !o ) - return FALSE; + return false; buttonMouseMoveEvent( ke, o ); - return TRUE; + return true; } else if ( e->type() == TQEvent::MouseButtonRelease ) { TQMouseEvent *ke = (TQMouseEvent*)e; fixObject( o ); if ( !o ) - return FALSE; + return false; buttonMouseReleaseEvent( ke, o ); - return TRUE; + return true; } else if ( e->type() == TQEvent::DragEnter ) { TQDragEnterEvent *de = (TQDragEnterEvent*)e; if (ActionDrag::canDecode(de)) @@ -375,20 +375,20 @@ void TQDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e ) void TQDesignerToolBar::mousePressEvent( TQMouseEvent *e ) { - widgetInserting = FALSE; + widgetInserting = false; if ( e->button() == LeftButton && MainWindow::self->currentTool() != POINTER_TOOL && MainWindow::self->currentTool() != ORDER_TOOL && MainWindow::self->currentTool() != CONNECT_TOOL && MainWindow::self->currentTool() != BUDDY_TOOL ) - widgetInserting = TRUE; + widgetInserting = true; } void TQDesignerToolBar::mouseReleaseEvent( TQMouseEvent *e ) { if ( widgetInserting ) doInsertWidget( mapFromGlobal( e->globalPos() ) ); - widgetInserting = FALSE; + widgetInserting = false; } void TQDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) @@ -396,10 +396,10 @@ void TQDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w ) if ( widgetInserting ) doInsertWidget( mapFromGlobal( e->globalPos() ) ); else if ( w->isWidgetType() && formWindow->widgets()->find( w ) ) { - formWindow->clearSelection( FALSE ); + formWindow->clearSelection( false ); formWindow->selectWidget( w ); } - widgetInserting = FALSE; + widgetInserting = false; } void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o ) @@ -455,7 +455,7 @@ void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject void TQDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) { - widgetInserting = FALSE; + widgetInserting = false; if ( e->button() == MidButton ) return; @@ -465,7 +465,7 @@ void TQDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * ) MainWindow::self->currentTool() != ORDER_TOOL && MainWindow::self->currentTool() != CONNECT_TOOL && MainWindow::self->currentTool() != BUDDY_TOOL ) { - widgetInserting = TRUE; + widgetInserting = true; return; } @@ -517,7 +517,7 @@ void TQDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) drag->setPixmap( a->iconSet().pixmap() ); if ( ::tqt_cast<TQDesignerAction*>(a) ) { if ( formWindow->widgets()->find( ( (TQDesignerAction*)a )->widget() ) ) - formWindow->selectWidget( ( (TQDesignerAction*)a )->widget(), FALSE ); + formWindow->selectWidget( ( (TQDesignerAction*)a )->widget(), false ); } if ( !drag->drag() ) { AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( tr( "Add Action '%1' to Toolbar '%2'" ). @@ -534,7 +534,7 @@ void TQDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o ) void TQDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e ) { - widgetInserting = FALSE; + widgetInserting = false; lastIndicatorPos = TQPoint( -1, -1 ); if (ActionDrag::canDecode(e)) e->accept(); @@ -552,7 +552,7 @@ void TQDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * ) { indicator->hide(); insertAnchor = 0; - afterAnchor = TRUE; + afterAnchor = true; } void TQDesignerToolBar::dropEvent( TQDropEvent *e ) @@ -631,7 +631,7 @@ TQPoint TQDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) if ( orientation() == Horizontal ) { TQPoint pnt( width() - 2, 0 ); insertAnchor = 0; - afterAnchor = TRUE; + afterAnchor = true; if ( !children() ) return pnt; pnt = TQPoint( 13, 0 ); @@ -645,7 +645,7 @@ TQPoint TQDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) if ( w->x() < pos.x() ) { pnt.setX( w->x() + w->width() + 1 ); insertAnchor = w; - afterAnchor = TRUE; + afterAnchor = true; } } } @@ -653,7 +653,7 @@ TQPoint TQDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) } else { TQPoint pnt( 0, height() - 2 ); insertAnchor = 0; - afterAnchor = TRUE; + afterAnchor = true; if ( !children() ) return pnt; pnt = TQPoint( 0, 13 ); @@ -667,7 +667,7 @@ TQPoint TQDesignerToolBar::calcIndicatorPos( const TQPoint &pos ) if ( w->y() < pos.y() ) { pnt.setY( w->y() + w->height() + 1 ); insertAnchor = w; - afterAnchor = TRUE; + afterAnchor = true; } } } @@ -704,9 +704,9 @@ void TQDesignerToolBar::doInsertWidget( const TQPoint &p ) if ( formWindow != MainWindow::self->formWindow() ) return; calcIndicatorPos( p ); - TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, TRUE ); + TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, true ); installEventFilters( w ); - MainWindow::self->formWindow()->insertWidget( w, TRUE ); + MainWindow::self->formWindow()->insertWidget( w, true ); TQDesignerAction *a = new TQDesignerAction( w, parent() ); int index = actionList.findRef( *actionMap.find( insertAnchor ) ); if ( index != -1 && afterAnchor ) diff --git a/tools/designer/designer/actioneditorimpl.cpp b/tools/designer/designer/actioneditorimpl.cpp index 46d5bd4f4..b961d7570 100644 --- a/tools/designer/designer/actioneditorimpl.cpp +++ b/tools/designer/designer/actioneditorimpl.cpp @@ -55,8 +55,8 @@ ActionEditor::ActionEditor( TQWidget* parent, const char* name, WFlags fl ) explicitlyClosed(false) { listActions->addColumn( tr( "Actions" ) ); - setEnabled( FALSE ); - buttonConnect->setEnabled( FALSE ); + setEnabled( false ); + buttonConnect->setEnabled( false ); TQPopupMenu *popup = new TQPopupMenu( this ); popup->insertItem( tr( "New &Action" ), this, TQ_SLOT( newAction() ) ); @@ -106,21 +106,21 @@ void ActionEditor::setCurrentAction( TQAction *a ) TQAction *ActionEditor::newActionEx() { - ActionItem *i = new ActionItem( listActions, (bool)FALSE ); + ActionItem *i = new ActionItem( listActions, (bool)false ); TQAction *a = i->action(); TQObject::connect( a, TQ_SIGNAL( destroyed( TQObject * ) ), this, TQ_SLOT( removeConnections( TQObject* ) ) ); MetaDataBase::addEntry( i->action() ); TQString n = "Action"; - formWindow->unify( i->action(), n, TRUE ); + formWindow->unify( i->action(), n, true ); i->setText( 0, n ); i->action()->setName( n ); i->action()->setText( i->action()->name() ); - MetaDataBase::setPropertyChanged( i->action(), "text", TRUE ); - MetaDataBase::setPropertyChanged( i->action(), "name", TRUE ); + MetaDataBase::setPropertyChanged( i->action(), "text", true ); + MetaDataBase::setPropertyChanged( i->action(), "name", true ); formWindow->actionList().append( i->action() ); if ( formWindow->formFile() ) - formWindow->formFile()->setModified( TRUE ); + formWindow->formFile()->setModified( true ); return i->action(); } @@ -146,7 +146,7 @@ void ActionEditor::deleteAction() if ( formWindow ) { formWindow->setActiveObject( formWindow->mainContainer() ); if ( formWindow->formFile() ) - formWindow->formFile()->setModified( TRUE ); + formWindow->formFile()->setModified( true ); } } @@ -162,28 +162,28 @@ void ActionEditor::newAction() if ( actionParent ) i = new ActionItem( actionParent ); else - i = new ActionItem( listActions, (bool)FALSE ); + i = new ActionItem( listActions, (bool)false ); TQAction *a = i->action(); TQObject::connect( a, TQ_SIGNAL( destroyed( TQObject * ) ), this, TQ_SLOT( removeConnections( TQObject* ) ) ); MetaDataBase::addEntry( i->action() ); TQString n = "Action"; - formWindow->unify( i->action(), n, TRUE ); + formWindow->unify( i->action(), n, true ); i->setText( 0, n ); i->action()->setName( n ); i->action()->setText( i->action()->name() ); if ( actionParent && actionParent->actionGroup() && actionParent->actionGroup()->usesDropDown() ) { - i->action()->setToggleAction( TRUE ); - MetaDataBase::setPropertyChanged( i->action(), "toggleAction", TRUE ); + i->action()->setToggleAction( true ); + MetaDataBase::setPropertyChanged( i->action(), "toggleAction", true ); } - MetaDataBase::setPropertyChanged( i->action(), "text", TRUE ); - MetaDataBase::setPropertyChanged( i->action(), "name", TRUE ); + MetaDataBase::setPropertyChanged( i->action(), "text", true ); + MetaDataBase::setPropertyChanged( i->action(), "name", true ); listActions->setCurrentItem( i ); if ( !actionParent ) formWindow->actionList().append( i->action() ); if ( formWindow->formFile() ) - formWindow->formFile()->setModified( TRUE ); + formWindow->formFile()->setModified( true ); } void ActionEditor::newActionGroup() @@ -196,33 +196,33 @@ void ActionEditor::newActionGroup() ActionItem *i = 0; if ( actionParent ) - i = new ActionItem( actionParent, TRUE ); + i = new ActionItem( actionParent, true ); else - i = new ActionItem( listActions, TRUE ); + i = new ActionItem( listActions, true ); TQAction *ag = i->actionGroup(); TQObject::connect( ag, TQ_SIGNAL( destroyed( TQObject * ) ), this, TQ_SLOT( removeConnections( TQObject* ) ) ); MetaDataBase::addEntry( i->actionGroup() ); - MetaDataBase::setPropertyChanged( i->actionGroup(), "usesDropDown", TRUE ); + MetaDataBase::setPropertyChanged( i->actionGroup(), "usesDropDown", true ); TQString n = "ActionGroup"; - formWindow->unify( i->action(), n, TRUE ); + formWindow->unify( i->action(), n, true ); i->setText( 0, n ); i->actionGroup()->setName( n ); i->actionGroup()->setText( i->actionGroup()->name() ); - MetaDataBase::setPropertyChanged( i->actionGroup(), "text", TRUE ); - MetaDataBase::setPropertyChanged( i->actionGroup(), "name", TRUE ); + MetaDataBase::setPropertyChanged( i->actionGroup(), "text", true ); + MetaDataBase::setPropertyChanged( i->actionGroup(), "name", true ); listActions->setCurrentItem( i ); - i->setOpen( TRUE ); + i->setOpen( true ); if ( !actionParent ) formWindow->actionList().append( i->actionGroup() ); if ( formWindow->formFile() ) - formWindow->formFile()->setModified( TRUE ); + formWindow->formFile()->setModified( true ); } void ActionEditor::newDropDownActionGroup() { newActionGroup(); - ( (ActionItem*)listActions->currentItem() )->actionGroup()->setUsesDropDown( TRUE ); + ( (ActionItem*)listActions->currentItem() )->actionGroup()->setUsesDropDown( true ); } void ActionEditor::setFormWindow( FormWindow *fw ) @@ -231,9 +231,9 @@ void ActionEditor::setFormWindow( FormWindow *fw ) formWindow = fw; if ( !formWindow || !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) { - setEnabled( FALSE ); + setEnabled( false ); } else { - setEnabled( TRUE ); + setEnabled( true ); for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) { ActionItem *i = 0; if ( ::tqt_cast<TQAction*>(a->parent()) ) @@ -252,7 +252,7 @@ void ActionEditor::setFormWindow( FormWindow *fw ) } if ( listActions->firstChild() ) { listActions->setCurrentItem( listActions->firstChild() ); - listActions->setSelected( listActions->firstChild(), TRUE ); + listActions->setSelected( listActions->firstChild(), true ); } } } @@ -269,7 +269,7 @@ void ActionEditor::insertChildActions( ActionItem *i ) continue; TQAction *a = (TQAction*)o; ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a ); - i->setOpen( TRUE ); + i->setOpen( true ); i2->setText( 0, a->name() ); i2->setPixmap( 0, a->iconSet().pixmap() ); // make sure we don't duplicate the connection diff --git a/tools/designer/designer/actionlistview.cpp b/tools/designer/designer/actionlistview.cpp index 62366a774..32dec7e7a 100644 --- a/tools/designer/designer/actionlistview.cpp +++ b/tools/designer/designer/actionlistview.cpp @@ -38,9 +38,9 @@ ActionListView::ActionListView( TQWidget *parent, const char *name ) : TQListView( parent, name ) { - setShowSortIndicator( TRUE ); + setShowSortIndicator( true ); setResizeMode( LastColumn ); - setRootIsDecorated( TRUE ); + setRootIsDecorated( true ); connect( this, TQ_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ), this, TQ_SLOT( rmbMenu( TQListViewItem *, const TQPoint & ) ) ); } @@ -51,7 +51,7 @@ ActionItem::ActionItem( TQListView *lv, TQAction *ac ) g = ::tqt_cast<TQDesignerActionGroup*>(ac); if ( !g ) a = ::tqt_cast<TQDesignerAction*>(ac); - setDragEnabled( TRUE ); + setDragEnabled( true ); } ActionItem::ActionItem( TQListViewItem *i, TQAction *ac ) @@ -60,7 +60,7 @@ ActionItem::ActionItem( TQListViewItem *i, TQAction *ac ) g = ::tqt_cast<TQDesignerActionGroup*>(ac); if ( !g ) a = ::tqt_cast<TQDesignerAction*>(ac); - setDragEnabled( TRUE ); + setDragEnabled( true ); moveToEnd(); } diff --git a/tools/designer/designer/actionlistview.h b/tools/designer/designer/actionlistview.h index 59f769ab4..c800de2ec 100644 --- a/tools/designer/designer/actionlistview.h +++ b/tools/designer/designer/actionlistview.h @@ -43,13 +43,13 @@ public: ActionItem( TQListView *lv, bool group ) : TQListViewItem( lv ), a( group ? 0 : new TQDesignerAction( 0 ) ), - g( group ? new TQDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( TRUE ); } + g( group ? new TQDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( true ); } ActionItem( TQListView *lv, TQAction *ac ); ActionItem( TQListViewItem *i, TQAction *ac ); - ActionItem( ActionItem *parent, bool group = FALSE ) + ActionItem( ActionItem *parent, bool group = false ) : TQListViewItem( parent ), a( group ? 0 : new TQDesignerAction( parent->actionGroup() ) ), - g( group ? new TQDesignerActionGroup( parent->actionGroup() ) : 0 ) { setDragEnabled( TRUE ); moveToEnd(); } + g( group ? new TQDesignerActionGroup( parent->actionGroup() ) : 0 ) { setDragEnabled( true ); moveToEnd(); } TQDesignerAction *action() const { return a; } TQDesignerActionGroup *actionGroup() const { return g; } diff --git a/tools/designer/designer/asciivalidator.cpp b/tools/designer/designer/asciivalidator.cpp index 640cd1eb8..cb55ffaf0 100644 --- a/tools/designer/designer/asciivalidator.cpp +++ b/tools/designer/designer/asciivalidator.cpp @@ -36,7 +36,7 @@ #include <ntqstring.h> AsciiValidator::AsciiValidator( TQObject * parent, const char *name ) - : TQValidator( parent, name ), functionName( FALSE ) + : TQValidator( parent, name ), functionName( false ) { } @@ -46,7 +46,7 @@ AsciiValidator::AsciiValidator( bool funcName, TQObject * parent, const char *na } AsciiValidator::AsciiValidator( const TQString &allow, TQObject * parent, const char *name ) - : TQValidator( parent, name ), functionName( FALSE ), allowedChars( allow ) + : TQValidator( parent, name ), functionName( false ), allowedChars( allow ) { } @@ -56,8 +56,8 @@ AsciiValidator::~AsciiValidator() TQValidator::State AsciiValidator::validate( TQString &s, int & ) const { - bool inParen = FALSE; - bool outParen = FALSE; + bool inParen = false; + bool outParen = false; if ( !s.isEmpty() && s[0].row() == 0 && s[0].cell() >= '0' && s[0].cell() <= '9' ) s[0] = '_'; for ( int i = 0, j = 0; i < (int) s.length(); i++ ) { @@ -82,11 +82,11 @@ TQValidator::State AsciiValidator::validate( TQString &s, int & ) const if ( functionName ) { if ( c == '(' ) { - inParen = TRUE; + inParen = true; continue; } if ( c == ')' ) { - outParen = TRUE; + outParen = true; j = i + 1; continue; } diff --git a/tools/designer/designer/command.cpp b/tools/designer/designer/command.cpp index df24e8dfd..0b93e2952 100644 --- a/tools/designer/designer/command.cpp +++ b/tools/designer/designer/command.cpp @@ -66,8 +66,8 @@ CommandHistory::CommandHistory( int s ) : current( -1 ), steps( s ), savedAt( -1 ) { - history.setAutoDelete( TRUE ); - modified = FALSE; + history.setAutoDelete( true ); + modified = false; compressedCommand = 0; } @@ -83,7 +83,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress ) if ( compressedCommand ) { compressedCommand->merge( cmd ); - modified = TRUE; + modified = true; modificationChanged( modified ); return; } @@ -97,7 +97,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress ) savedAt = -2; TQPtrList<Command> commands; - commands.setAutoDelete( FALSE ); + commands.setAutoDelete( false ); for( int i = 0; i <= current; ++i ) { commands.insert( i, history.at( 0 ) ); @@ -107,7 +107,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress ) commands.append( cmd ); history.clear(); history = commands; - history.setAutoDelete( TRUE ); + history.setAutoDelete( true ); } else { history.append( cmd ); } @@ -120,7 +120,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress ) } emitUndoRedo(); - modified = TRUE; + modified = true; modificationChanged( modified ); } @@ -231,7 +231,7 @@ void Command::merge( Command * ) bool Command::canMerge( Command * ) { - return FALSE; + return false; } // ------------------------------------------------------------ @@ -281,7 +281,7 @@ void InsertCommand::execute() } widget->show(); formWindow()->widgets()->insert( widget, widget ); - formWindow()->clearSelection( FALSE ); + formWindow()->clearSelection( false ); formWindow()->selectWidget( widget ); formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget ); } @@ -289,7 +289,7 @@ void InsertCommand::execute() void InsertCommand::unexecute() { widget->hide(); - formWindow()->selectWidget( widget, FALSE ); + formWindow()->selectWidget( widget, false ); formWindow()->widgets()->remove( widget ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget ); } @@ -304,7 +304,7 @@ MoveCommand::MoveCommand( const TQString &n, FormWindow *fw, : Command( n, fw ), widgets( w ), oldPos( op ), newPos( np ), oldParent( opr ), newParent( npr ) { - widgets.setAutoDelete( FALSE ); + widgets.setAutoDelete( false ); } void MoveCommand::merge( Command *c ) @@ -326,7 +326,7 @@ void MoveCommand::execute() if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) { if ( newParent && oldParent && newParent != oldParent ) { TQPoint pos = newParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) ); - w->reparent( newParent, pos, TRUE ); + w->reparent( newParent, pos, true ); formWindow()->raiseSelection( w ); formWindow()->raiseChildSelections( w ); formWindow()->widgetChanged( w ); @@ -347,7 +347,7 @@ void MoveCommand::unexecute() if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) { if ( newParent && oldParent && newParent != oldParent ) { TQPoint pos = oldParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) ); - w->reparent( oldParent, pos, TRUE ); + w->reparent( oldParent, pos, true ); formWindow()->raiseSelection( w ); formWindow()->raiseChildSelections( w ); formWindow()->widgetChanged( w ); @@ -368,9 +368,9 @@ DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw, const TQWidgetList &wl ) : Command( n, fw ), widgets( wl ) { - widgets.setAutoDelete( FALSE ); + widgets.setAutoDelete( false ); TQWidgetList copyOfWidgets = widgets; - copyOfWidgets.setAutoDelete(FALSE); + copyOfWidgets.setAutoDelete(false); // Include the children of the selected items when deleting for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { @@ -388,14 +388,14 @@ DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw, void DeleteCommand::execute() { - formWindow()->setPropertyShowingBlocked( TRUE ); + formWindow()->setPropertyShowingBlocked( true ); connections.clear(); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->hide(); TQString s = w->name(); s.prepend( "qt_dead_widget_" ); w->setName( s ); - formWindow()->selectWidget( w, FALSE ); + formWindow()->selectWidget( w, false ); formWindow()->widgets()->remove( w ); TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow(), w ); connections.insert( w, conns ); @@ -405,7 +405,7 @@ void DeleteCommand::execute() (*it).signal, (*it).receiver, (*it).slot ); } } - formWindow()->setPropertyShowingBlocked( FALSE ); + formWindow()->setPropertyShowingBlocked( false ); formWindow()->emitShowProperties(); formWindow()->mainWindow()->objectHierarchy()->widgetsRemoved( widgets ); @@ -413,8 +413,8 @@ void DeleteCommand::execute() void DeleteCommand::unexecute() { - formWindow()->setPropertyShowingBlocked( TRUE ); - formWindow()->clearSelection( FALSE ); + formWindow()->setPropertyShowingBlocked( true ); + formWindow()->clearSelection( false ); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->show(); TQString s = w->name(); @@ -429,7 +429,7 @@ void DeleteCommand::unexecute() (*it).signal, (*it).receiver, (*it).slot ); } } - formWindow()->setPropertyShowingBlocked( FALSE ); + formWindow()->setPropertyShowingBlocked( false ); formWindow()->emitShowProperties(); formWindow()->mainWindow()->objectHierarchy()->widgetsInserted( widgets ); } @@ -443,7 +443,7 @@ SetPropertyCommand::SetPropertyCommand( const TQString &n, FormWindow *fw, const TQString &ocut, bool reset ) : Command( n, fw ), widget( w ), editor( e ), propName( pn ), oldValue( ov ), newValue( nv ), oldCurrentItemText( ocut ), newCurrentItemText( ncut ), - wasChanged( TRUE ), isResetCommand( reset ) + wasChanged( true ), isResetCommand( reset ) { wasChanged = MetaDataBase::isPropertyChanged( w, propName ); if ( oldCurrentItemText.isNull() ) @@ -456,9 +456,9 @@ SetPropertyCommand::SetPropertyCommand( const TQString &n, FormWindow *fw, void SetPropertyCommand::execute() { if ( !wasChanged ) - MetaDataBase::setPropertyChanged( widget, propName, TRUE ); + MetaDataBase::setPropertyChanged( widget, propName, true ); if ( isResetCommand ) { - MetaDataBase::setPropertyChanged( widget, propName, FALSE ); + MetaDataBase::setPropertyChanged( widget, propName, false ); if ( WidgetFactory::resetProperty( widget, propName ) ) { if ( !formWindow()->isWidgetSelected( widget ) && formWindow() != (TQObject *)widget ) formWindow()->selectWidget( (TQObject *)widget ); @@ -469,7 +469,7 @@ void SetPropertyCommand::execute() if ( !i ) return; i->setValue( widget->property( propName ) ); - i->setChanged( FALSE ); + i->setChanged( false ); editor->refetchData(); editor->emitWidgetChanged(); return; @@ -481,9 +481,9 @@ void SetPropertyCommand::execute() void SetPropertyCommand::unexecute() { if ( !wasChanged ) - MetaDataBase::setPropertyChanged( widget, propName, FALSE ); + MetaDataBase::setPropertyChanged( widget, propName, false ); if ( isResetCommand ) - MetaDataBase::setPropertyChanged( widget, propName, TRUE ); + MetaDataBase::setPropertyChanged( widget, propName, true ); setProperty( oldValue, oldCurrentItemText ); } @@ -491,24 +491,24 @@ bool SetPropertyCommand::canMerge( Command *c ) { SetPropertyCommand *cmd = (SetPropertyCommand*)c; if ( !widget ) - return FALSE; + return false; const TQMetaProperty *p = - widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE ); + widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true ); if ( !p ) { if ( propName == "toolTip" || propName == "whatsThis" ) - return TRUE; + return true; if ( ::tqt_cast<CustomWidget*>((TQObject *)widget) ) { MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget(); if ( !cw ) - return FALSE; + return false; for ( TQValueList<MetaDataBase::Property>::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { if ( TQString( (*it ).property ) == propName ) { if ( (*it).type == "String" || (*it).type == "CString" || (*it).type == "Int" || (*it).type == "UInt" ) - return TRUE; + return true; } } } - return FALSE; + return false; } TQVariant::Type t = TQVariant::nameToType( p->type() ); return ( ( cmd->propName == propName && @@ -526,7 +526,7 @@ bool SetPropertyCommand::checkProperty() { if ( propName == "name" /*|| propName == "itemName"*/ ) { // ### fix that TQString s = newValue.toString(); - if ( !formWindow()->unify( widget, s, FALSE ) ) { + if ( !formWindow()->unify( widget, s, false ) ) { TQMessageBox::information( formWindow()->mainWindow(), FormWindow::tr( "Set 'name' property" ), FormWindow::tr( "The name of a widget must be unique.\n" @@ -535,8 +535,8 @@ bool SetPropertyCommand::checkProperty() arg( newValue.toString() ). arg( formWindow()->name() ). arg( oldValue.toString() )); - setProperty( oldValue, oldCurrentItemText, FALSE ); - return FALSE; + setProperty( oldValue, oldCurrentItemText, false ); + return false; } if ( s.isEmpty() ) { TQMessageBox::information( formWindow()->mainWindow(), @@ -544,14 +544,14 @@ bool SetPropertyCommand::checkProperty() FormWindow::tr( "The name of a widget must not be null.\n" "The name has been reverted to '%1'." ). arg( oldValue.toString() )); - setProperty( oldValue, oldCurrentItemText, FALSE ); - return FALSE; + setProperty( oldValue, oldCurrentItemText, false ); + return false; } if ( ::tqt_cast<FormWindow*>(widget->parent()) ) formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() ); } - return TRUE; + return true; } void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤tItemText, bool select ) @@ -566,16 +566,16 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ if ( select ) editor->propertyList()->setCurrentProperty( propName ); const TQMetaProperty *p = - widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE ); + widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true ); if ( !p ) { if ( propName == "hAlign" ) { - p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE ); + p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", true ), true ); int align = widget->property( "alignment" ).toInt(); align &= ~( AlignHorizontal_Mask ); align |= p->keyToValue( currentItemText ); widget->setProperty( "alignment", TQVariant( align ) ); } else if ( propName == "vAlign" ) { - p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE ); + p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", true ), true ); int align = widget->property( "alignment" ).toInt(); align &= ~( AlignVertical_Mask ); align |= p->keyToValue( currentItemText ); @@ -683,14 +683,14 @@ LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow void LayoutHorizontalCommand::execute() { - formWindow()->clearSelection( FALSE ); + formWindow()->clearSelection( false ); layout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutHorizontalCommand::unexecute() { - formWindow()->clearSelection( FALSE ); + formWindow()->clearSelection( false ); layout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -700,20 +700,20 @@ void LayoutHorizontalCommand::unexecute() LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw, TQWidget *parent, TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true ) { } void LayoutHorizontalSplitCommand::execute() { - formWindow()->clearSelection( FALSE ); + formWindow()->clearSelection( false ); layout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutHorizontalSplitCommand::unexecute() { - formWindow()->clearSelection( FALSE ); + formWindow()->clearSelection( false ); layout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -729,14 +729,14 @@ LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw, void LayoutVerticalCommand::execute() { - formWindow()->clearSelection( FALSE ); + formWindow()->clearSelection( false ); layout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutVerticalCommand::unexecute() { - formWindow()->clearSelection( FALSE ); + formWindow()->clearSelection( false ); layout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -746,20 +746,20 @@ void LayoutVerticalCommand::unexecute() LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw, TQWidget *parent, TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true ) { } void LayoutVerticalSplitCommand::execute() { - formWindow()->clearSelection( FALSE ); + formWindow()->clearSelection( false ); layout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutVerticalSplitCommand::unexecute() { - formWindow()->clearSelection( FALSE ); + formWindow()->clearSelection( false ); layout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -775,14 +775,14 @@ LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw, void LayoutGridCommand::execute() { - formWindow()->clearSelection( FALSE ); + formWindow()->clearSelection( false ); layout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutGridCommand::unexecute() { - formWindow()->clearSelection( FALSE ); + formWindow()->clearSelection( false ); layout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -798,18 +798,18 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw, margin = MetaDataBase::margin( layoutBase ); layout = 0; if ( lay == WidgetFactory::HBox ) - layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqt_cast<TQSplitter*>(layoutBase) != 0 ); + layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, ::tqt_cast<TQSplitter*>(layoutBase) != 0 ); else if ( lay == WidgetFactory::VBox ) - layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqt_cast<TQSplitter*>(layoutBase) != 0 ); + layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, ::tqt_cast<TQSplitter*>(layoutBase) != 0 ); else if ( lay == WidgetFactory::Grid ) - layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), FALSE ); + layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), false ); } void BreakLayoutCommand::execute() { if ( !layout ) return; - formWindow()->clearSelection( FALSE ); + formWindow()->clearSelection( false ); layout->breakLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) @@ -820,7 +820,7 @@ void BreakLayoutCommand::unexecute() { if ( !layout ) return; - formWindow()->clearSelection( FALSE ); + formWindow()->clearSelection( false ); layout->doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( lb ), spacing ); @@ -1182,7 +1182,7 @@ void AddFunctionCommand::execute() MetaDataBase::addFunction( formWindow(), function, specifier, access, functionType, language, returnType ); formWindow()->mainWindow()->functionsChanged(); if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); + formWindow()->formFile()->setModified( true ); } void AddFunctionCommand::unexecute() @@ -1190,7 +1190,7 @@ void AddFunctionCommand::unexecute() MetaDataBase::removeFunction( formWindow(), function, specifier, access, functionType, language, returnType ); formWindow()->mainWindow()->functionsChanged(); if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); + formWindow()->formFile()->setModified( true ); } // ------------------------------------------------------------ @@ -1218,7 +1218,7 @@ void ChangeFunctionAttribCommand::execute() formWindow()->formFile()->functionRetTypeChanged( newName, oldReturnType, newReturnType ); formWindow()->mainWindow()->functionsChanged(); if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); + formWindow()->formFile()->setModified( true ); } void ChangeFunctionAttribCommand::unexecute() @@ -1229,7 +1229,7 @@ void ChangeFunctionAttribCommand::unexecute() formWindow()->formFile()->functionRetTypeChanged( oldName, newReturnType, oldReturnType ); formWindow()->mainWindow()->functionsChanged(); if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); + formWindow()->formFile()->setModified( true ); } // ------------------------------------------------------------ @@ -1261,7 +1261,7 @@ void RemoveFunctionCommand::execute() MetaDataBase::removeFunction( formWindow(), function, specifier, access, functionType, language, returnType ); formWindow()->mainWindow()->functionsChanged(); if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); + formWindow()->formFile()->setModified( true ); } void RemoveFunctionCommand::unexecute() @@ -1271,7 +1271,7 @@ void RemoveFunctionCommand::unexecute() MetaDataBase::addFunction( formWindow(), function, specifier, access, functionType, language, returnType ); formWindow()->mainWindow()->functionsChanged(); if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); + formWindow()->formFile()->setModified( true ); } // ------------------------------------------------------------ @@ -1286,7 +1286,7 @@ void AddVariableCommand::execute() MetaDataBase::addVariable( formWindow(), varName, access ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); + formWindow()->formFile()->setModified( true ); } void AddVariableCommand::unexecute() @@ -1294,7 +1294,7 @@ void AddVariableCommand::unexecute() MetaDataBase::removeVariable( formWindow(), varName ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); + formWindow()->formFile()->setModified( true ); } // ------------------------------------------------------------ @@ -1311,7 +1311,7 @@ void SetVariablesCommand::execute() MetaDataBase::setVariables( formWindow(), newList ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); + formWindow()->formFile()->setModified( true ); } void SetVariablesCommand::unexecute() @@ -1319,7 +1319,7 @@ void SetVariablesCommand::unexecute() MetaDataBase::setVariables( formWindow(), oldList ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); + formWindow()->formFile()->setModified( true ); } // ------------------------------------------------------------ @@ -1341,7 +1341,7 @@ void RemoveVariableCommand::execute() MetaDataBase::removeVariable( formWindow(), varName ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); + formWindow()->formFile()->setModified( true ); } void RemoveVariableCommand::unexecute() @@ -1349,7 +1349,7 @@ void RemoveVariableCommand::unexecute() MetaDataBase::addVariable( formWindow(), varName, access ); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); + formWindow()->formFile()->setModified( true ); } // ------------------------------------------------------------ @@ -1367,7 +1367,7 @@ void EditDefinitionsCommand::execute() lIface->release(); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); + formWindow()->formFile()->setModified( true ); } void EditDefinitionsCommand::unexecute() @@ -1376,7 +1376,7 @@ void EditDefinitionsCommand::unexecute() lIface->release(); formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); + formWindow()->formFile()->setModified( true ); } // ------------------------------------------------------------ @@ -1449,7 +1449,7 @@ void PasteCommand::unexecute() { for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { w->hide(); - formWindow()->selectWidget( w, FALSE ); + formWindow()->selectWidget( w, false ); formWindow()->widgets()->remove( w ); formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); } @@ -1471,7 +1471,7 @@ void TabOrderCommand::merge( Command *c ) bool TabOrderCommand::canMerge( Command * ) { - return TRUE; + return true; } void TabOrderCommand::execute() @@ -1633,7 +1633,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to ) toLasts.pop(); toLasts.push( ni ); if ( pi ) - pi->setOpen( TRUE ); + pi->setOpen( true ); } else { if ( i->parent() == fromLast ) { fromParents.push( fromLast ); @@ -1653,7 +1653,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to ) toLasts.pop(); toLasts.push( ni ); if ( pi ) - pi->setOpen( TRUE ); + pi->setOpen( true ); } else { while ( fromParents.top() != i->parent() ) { fromParents.pop(); @@ -1673,7 +1673,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to ) ni->setPixmap( c, *i->pixmap( c ) ); } if ( pi ) - pi->setOpen( TRUE ); + pi->setOpen( true ); toLasts.pop(); toLasts.push( ni ); } @@ -1697,7 +1697,7 @@ PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, F void PopulateMultiLineEditCommand::execute() { mlined->setText( newText ); - MetaDataBase::setPropertyChanged( mlined, "text", TRUE ); + MetaDataBase::setPropertyChanged( mlined, "text", true ); formWindow()->emitUpdateProperties( mlined ); } @@ -1882,7 +1882,7 @@ void AddToolBarCommand::execute() if ( !toolBar ) { toolBar = new TQDesignerToolBar( mainWindow ); TQString n = "Toolbar"; - formWindow()->unify( toolBar, n, TRUE ); + formWindow()->unify( toolBar, n, true ); toolBar->setName( n ); mainWindow->addToolBar( toolBar, n ); } else { @@ -2160,7 +2160,7 @@ void SetActionIconsCommand::execute() ActionEditor *ae = actionEditor(); if ( ae ) ae->updateActionIcon( action ); - MetaDataBase::setPropertyChanged( action, "iconSet", TRUE ); + MetaDataBase::setPropertyChanged( action, "iconSet", true ); } void SetActionIconsCommand::unexecute() @@ -2169,7 +2169,7 @@ void SetActionIconsCommand::unexecute() ActionEditor *ae = actionEditor(); if ( ae ) ae->updateActionIcon( action ); - MetaDataBase::setPropertyChanged( action, "iconSet", TRUE ); + MetaDataBase::setPropertyChanged( action, "iconSet", true ); } // ------------------------------------------------------------ @@ -2199,19 +2199,19 @@ void AddMenuCommand::execute() if ( !mb ) { mb = new MenuBarEditor( formWindow(), mw ); mb->setName( "MenuBarEditor" ); - formWindow()->insertWidget( mb, TRUE ); + formWindow()->insertWidget( mb, true ); } if ( !item ) { PopupMenuEditor *popup = new PopupMenuEditor( formWindow(), mw ); popup->setName( "PopupMenuEditor" ); - formWindow()->insertWidget( popup, TRUE ); + formWindow()->insertWidget( popup, true ); mb->insertItem( name, popup, index ); index = mb->findItem( popup ); item = mb->item( index ); } else { PopupMenuEditor *popup = item->menu(); popup->setName( item->menuText() ); - formWindow()->insertWidget( popup, TRUE ); + formWindow()->insertWidget( popup, true ); mb->insertItem( item, index ); } formWindow()->mainWindow()->objectHierarchy()->rebuild(); @@ -2334,7 +2334,7 @@ void RenameMenuCommand::execute() PopupMenuEditor *popup = item->menu(); item->setMenuText( newName ); TQString legal = makeLegal( newName ); - formWindow()->unify( popup, legal, TRUE ); + formWindow()->unify( popup, legal, true ); popup->setName( legal ); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } diff --git a/tools/designer/designer/command.h b/tools/designer/designer/command.h index 12d518008..9bc6ae9aa 100644 --- a/tools/designer/designer/command.h +++ b/tools/designer/designer/command.h @@ -161,7 +161,7 @@ class CommandHistory : public TQObject public: CommandHistory( int s ); - void addCommand( Command *cmd, bool tryCompress = FALSE ); + void addCommand( Command *cmd, bool tryCompress = false ); void undo(); void redo(); @@ -262,7 +262,7 @@ public: const TQString &pn, const TQVariant &ov, const TQVariant &nv, const TQString &ncut, const TQString &ocut, - bool reset = FALSE ); + bool reset = false ); void execute(); void unexecute(); @@ -272,7 +272,7 @@ public: bool checkProperty(); private: - void setProperty( const TQVariant &v, const TQString ¤tItemText, bool select = TRUE ); + void setProperty( const TQVariant &v, const TQString ¤tItemText, bool select = true ); TQGuardedPtr<TQObject> widget; PropertyEditor *editor; @@ -490,7 +490,7 @@ class AddWizardPageCommand : public Command { public: AddWizardPageCommand( const TQString &n, FormWindow *fw, - TQWizard *w, const TQString &label, int index = -1, bool show = TRUE ); + TQWizard *w, const TQString &label, int index = -1, bool show = true ); void execute(); void unexecute(); @@ -509,7 +509,7 @@ class DeleteWizardPageCommand : public Command { public: DeleteWizardPageCommand( const TQString &n, FormWindow *fw, - TQWizard *w, int index, bool show = TRUE ); + TQWizard *w, int index, bool show = true ); void execute(); void unexecute(); diff --git a/tools/designer/designer/configtoolboxdialog.ui.h b/tools/designer/designer/configtoolboxdialog.ui.h index 8a46e0d22..b759fc98a 100644 --- a/tools/designer/designer/configtoolboxdialog.ui.h +++ b/tools/designer/designer/configtoolboxdialog.ui.h @@ -62,7 +62,7 @@ void ConfigToolboxDialog::init() if ( !parent ) { parent = new TQListViewItem( listViewTools ); parent->setText( 0, grp ); - parent->setOpen( TRUE ); + parent->setOpen( true ); groups.insert( grp, parent ); } TQListViewItem *i = new TQListViewItem( parent ); @@ -83,14 +83,14 @@ void ConfigToolboxDialog::addTool() { TQListView *src = listViewTools; - bool addKids = FALSE; + bool addKids = false; TQListViewItem *nextSibling = 0; TQListViewItem *nextParent = 0; TQListViewItemIterator it = src->firstChild(); for ( ; *it; it++ ) { // Hit the nextSibling, turn of child processing if ( (*it) == nextSibling ) - addKids = FALSE; + addKids = false; if ( (*it)->isSelected() ) { if ( (*it)->childCount() == 0 ) { @@ -104,7 +104,7 @@ void ConfigToolboxDialog::addTool() // Children processing not set, so set it // Also find the item were we shall quit // processing children...if any such item - addKids = TRUE; + addKids = true; nextSibling = (*it)->nextSibling(); nextParent = (*it)->parent(); while ( nextParent && !nextSibling ) { @@ -175,11 +175,11 @@ void ConfigToolboxDialog::moveToolDown() void ConfigToolboxDialog::currentToolChanged( TQListViewItem *i ) { - bool canAdd = FALSE; + bool canAdd = false; TQListViewItemIterator it = listViewTools->firstChild(); for ( ; *it; it++ ) { if ( (*it)->isSelected() ) { - canAdd = TRUE; + canAdd = true; break; } } @@ -192,11 +192,11 @@ void ConfigToolboxDialog::currentCommonToolChanged( TQListViewItem *i ) buttonUp->setEnabled( (bool) (i && i->itemAbove()) ); buttonDown->setEnabled( (bool) (i && i->itemBelow()) ); - bool canRemove = FALSE; + bool canRemove = false; TQListViewItemIterator it = listViewCommon->firstChild(); for ( ; *it; it++ ) { if ( (*it)->isSelected() ) { - canRemove = TRUE; + canRemove = true; break; } } diff --git a/tools/designer/designer/connectiondialog.ui.h b/tools/designer/designer/connectiondialog.ui.h index 010a5c193..6c0ab320a 100644 --- a/tools/designer/designer/connectiondialog.ui.h +++ b/tools/designer/designer/connectiondialog.ui.h @@ -73,7 +73,7 @@ void ConnectionDialog::init() this, TQ_SLOT( updateEditSlotsButton() ) ); connect( connectionsTable, TQ_SIGNAL( resorted() ), this, TQ_SLOT( updateConnectionContainers() ) ); - buttonEditSlots->setEnabled( FALSE ); + buttonEditSlots->setEnabled( false ); if ( !invalidConnection ) { invalidConnection = new TQPixmap( invalid_connection ); @@ -86,7 +86,7 @@ void ConnectionDialog::init() it != conns.end(); ++it ) { ConnectionContainer *c = addConnection( (*it).sender, (*it).receiver, (*it).signal, (*it).slot ); - c->setModified( FALSE ); + c->setModified( false ); updateConnectionState( c ); } @@ -169,7 +169,7 @@ ConnectionContainer *ConnectionDialog::addConnection( TQObject *sender, TQObject sl->setCurrentItem( slot ); } - c->setModified( TRUE ); + c->setModified( true ); return c; } @@ -263,7 +263,7 @@ void ConnectionDialog::deleteClicked() void ConnectionDialog::editSlots() { - EditFunctions dlg( this, MainWindow::self->formWindow(), TRUE ); + EditFunctions dlg( this, MainWindow::self->formWindow(), true ); dlg.exec(); int currentCol = connectionsTable->currentColumn(); connectionsTable->setCurrentCell( connectionsTable->currentRow(), 0 ); diff --git a/tools/designer/designer/connectionitems.cpp b/tools/designer/designer/connectionitems.cpp index 0c44135a7..db85bc949 100644 --- a/tools/designer/designer/connectionitems.cpp +++ b/tools/designer/designer/connectionitems.cpp @@ -90,9 +90,9 @@ static const char* const ignore_slots[] = { }; ConnectionItem::ConnectionItem( TQTable *table, FormWindow *fw ) - : TQComboTableItem( table, TQStringList(), FALSE ), formWindow( fw ), conn( 0 ) + : TQComboTableItem( table, TQStringList(), false ), formWindow( fw ), conn( 0 ) { - setReplaceable( FALSE ); + setReplaceable( false ); } void ConnectionItem::senderChanged( TQObject * ) @@ -173,7 +173,7 @@ void ConnectionItem::paint( TQPainter *p, const TQColorGroup &cg, TQFont f( p->font() ); TQFont oldf( p->font() ); if ( conn && conn->isModified() ) { - f.setBold( TRUE ); + f.setBold( true ); p->setFont( f ); } @@ -345,7 +345,7 @@ SignalItem::SignalItem( TQTable *table, FormWindow *fw ) void SignalItem::senderChanged( TQObject *sender ) { - TQStrList sigs = sender->metaObject()->signalNames( TRUE ); + TQStrList sigs = sender->metaObject()->signalNames( true ); sigs.remove( "destroyed()" ); sigs.remove( "destroyed(TQObject*)" ); sigs.remove( "accessibilityChanged(int)" ); @@ -416,25 +416,25 @@ bool SlotItem::ignoreSlot( const char* slot ) const #ifndef TQT_NO_SQL if ( qstrcmp( slot, "update()" ) == 0 && ::tqt_cast<TQDataBrowser*>(lastReceiver) ) - return FALSE; + return false; #endif for ( int i = 0; ignore_slots[i]; i++ ) { if ( qstrcmp( slot, ignore_slots[i] ) == 0 ) - return TRUE; + return true; } if ( !formWindow->isMainContainer( (TQWidget*)lastReceiver ) ) { if ( qstrcmp( slot, "close()" ) == 0 ) - return TRUE; + return true; } if ( qstrcmp( slot, "setFocus()" ) == 0 ) if ( lastReceiver->isWidgetType() && ( (TQWidget*)lastReceiver )->focusPolicy() == TQWidget::NoFocus ) - return TRUE; + return true; - return FALSE; + return false; } void SlotItem::updateSlotList() @@ -448,15 +448,15 @@ void SlotItem::updateSlotList() } TQString signal = MetaDataBase::normalizeFunction( lastSignal ); - int n = lastReceiver->metaObject()->numSlots( TRUE ); + int n = lastReceiver->metaObject()->numSlots( true ); TQStringList slts; for( int i = 0; i < n; ++i ) { // accept only public slots. For the form window, also accept protected slots - const TQMetaData* md = lastReceiver->metaObject()->slot( i, TRUE ); - if ( ( (lastReceiver->metaObject()->slot( i, TRUE )->access == TQMetaData::Public) || + const TQMetaData* md = lastReceiver->metaObject()->slot( i, true ); + if ( ( (lastReceiver->metaObject()->slot( i, true )->access == TQMetaData::Public) || (formWindow->isMainContainer( (TQWidget*)lastReceiver ) && - lastReceiver->metaObject()->slot(i, TRUE)->access == + lastReceiver->metaObject()->slot(i, true)->access == TQMetaData::Protected) ) && !ignoreSlot( md->name ) && checkConnectArgs( signal.latin1(), lastReceiver, md->name ) ) diff --git a/tools/designer/designer/connectionitems.h b/tools/designer/designer/connectionitems.h index e3db9790a..37fb40497 100644 --- a/tools/designer/designer/connectionitems.h +++ b/tools/designer/designer/connectionitems.h @@ -171,7 +171,7 @@ class ConnectionContainer : public TQObject public: ConnectionContainer( TQObject *parent, SenderItem *i1, SignalItem *i2, ReceiverItem *i3, SlotItem *i4, int r ) - : TQObject( parent ), mod( FALSE ), se( i1 ), si( i2 ), + : TQObject( parent ), mod( false ), se( i1 ), si( i2 ), re( i3 ), sl( i4 ), rw ( r ) { i1->setConnection( this ); i2->setConnection( this ); @@ -208,7 +208,7 @@ public: SlotItem *slotItem() const { return sl; } public slots: - void somethingChanged() { mod = TRUE; emit changed( this ); } + void somethingChanged() { mod = true; emit changed( this ); } signals: void changed( ConnectionContainer *c ); diff --git a/tools/designer/designer/connectiontable.cpp b/tools/designer/designer/connectiontable.cpp index 13bd4e7e8..edd79c98a 100644 --- a/tools/designer/designer/connectiontable.cpp +++ b/tools/designer/designer/connectiontable.cpp @@ -36,26 +36,26 @@ ConnectionTable::ConnectionTable( TQWidget *parent, const char *name ) : TQTable( 0, 4, parent, name ) { - setSorting( TRUE ); - setShowGrid( FALSE ); + setSorting( true ); + setShowGrid( false ); setFocusStyle( FollowStyle ); setSelectionMode( SingleRow ); horizontalHeader()->setLabel( 0, tr( "Sender" ) ); horizontalHeader()->setLabel( 1, tr( "Signal" ) ); horizontalHeader()->setLabel( 2, tr( "Receiver" ) ); horizontalHeader()->setLabel( 3, tr( "Slot" ) ); - setColumnStretchable( 0, TRUE ); - setColumnStretchable( 1, TRUE ); - setColumnStretchable( 2, TRUE ); - setColumnStretchable( 3, TRUE ); + setColumnStretchable( 0, true ); + setColumnStretchable( 1, true ); + setColumnStretchable( 2, true ); + setColumnStretchable( 3, true ); } void ConnectionTable::sortColumn( int col, bool ascending, bool ) { horizontalHeader()->setSortIndicator( col, ascending ); if ( isEditing() ) - endEdit( currEditRow(), currEditCol(), FALSE, FALSE ); - TQTable::sortColumn( col, ascending, TRUE ); + endEdit( currEditRow(), currEditCol(), false, false ); + TQTable::sortColumn( col, ascending, true ); setCurrentCell( 0, 0 ); emit resorted(); } diff --git a/tools/designer/designer/customwidgeteditorimpl.cpp b/tools/designer/designer/customwidgeteditorimpl.cpp index 13524966c..2a3982bb0 100644 --- a/tools/designer/designer/customwidgeteditorimpl.cpp +++ b/tools/designer/designer/customwidgeteditorimpl.cpp @@ -59,29 +59,29 @@ #include <ntqcheckbox.h> CustomWidgetEditor::CustomWidgetEditor( TQWidget *parent, MainWindow *mw ) - : CustomWidgetEditorBase( parent, 0, TRUE ), mainWindow( mw ) + : CustomWidgetEditorBase( parent, 0, true ), mainWindow( mw ) { connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); checkTimer = new TQTimer( this ); connect( checkTimer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( checkWidgetName() ) ); - editClass->setEnabled( FALSE ); - editHeader->setEnabled( FALSE ); - buttonChooseHeader->setEnabled( FALSE ); - buttonChoosePixmap->setEnabled( FALSE ); - spinWidth->setEnabled( FALSE ); - spinHeight->setEnabled( FALSE ); - sizeHor->setEnabled( FALSE ); - sizeVer->setEnabled( FALSE ); - checkContainer->setEnabled( FALSE ); - localGlobalCombo->setEnabled( FALSE ); + editClass->setEnabled( false ); + editHeader->setEnabled( false ); + buttonChooseHeader->setEnabled( false ); + buttonChoosePixmap->setEnabled( false ); + spinWidth->setEnabled( false ); + spinHeight->setEnabled( false ); + sizeHor->setEnabled( false ); + sizeVer->setEnabled( false ); + checkContainer->setEnabled( false ); + localGlobalCombo->setEnabled( false ); editClass->setValidator( new AsciiValidator( TQString(":"), editClass ) ); - editSignal->setValidator( new AsciiValidator( TRUE, editSignal ) ); - editSlot->setValidator( new AsciiValidator( TRUE, editSignal ) ); + editSignal->setValidator( new AsciiValidator( true, editSignal ) ); + editSlot->setValidator( new AsciiValidator( true, editSignal ) ); editProperty->setValidator( new AsciiValidator( editSignal ) ); - editSignal->setEnabled( FALSE ); - buttonRemoveSignal->setEnabled( FALSE ); + editSignal->setEnabled( false ); + buttonRemoveSignal->setEnabled( false ); setupDefinition(); setupSignals(); @@ -103,15 +103,15 @@ void CustomWidgetEditor::setupDefinition() if ( boxWidgets->firstItem() ) { boxWidgets->setCurrentItem( boxWidgets->firstItem() ); - boxWidgets->setSelected( boxWidgets->firstItem(), TRUE ); + boxWidgets->setSelected( boxWidgets->firstItem(), true ); } oldItem = 0; } void CustomWidgetEditor::setupSignals() { - editSignal->setEnabled( FALSE ); - buttonRemoveSignal->setEnabled( FALSE ); + editSignal->setEnabled( false ); + buttonRemoveSignal->setEnabled( false ); MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); if ( !w ) return; @@ -120,15 +120,15 @@ void CustomWidgetEditor::setupSignals() listSignals->insertItem( TQString( *it ) ); if ( listSignals->firstItem() ) { listSignals->setCurrentItem( listSignals->firstItem() ); - listSignals->setSelected( listSignals->firstItem(), TRUE ); + listSignals->setSelected( listSignals->firstItem(), true ); } } void CustomWidgetEditor::setupSlots() { - editSlot->setEnabled( FALSE ); - comboAccess->setEnabled( FALSE ); - buttonRemoveSlot->setEnabled( FALSE ); + editSlot->setEnabled( false ); + comboAccess->setEnabled( false ); + buttonRemoveSlot->setEnabled( false ); MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); if ( !w ) @@ -139,15 +139,15 @@ void CustomWidgetEditor::setupSlots() if ( listSlots->firstChild() ) { listSlots->setCurrentItem( listSlots->firstChild() ); - listSlots->setSelected( listSlots->firstChild(), TRUE ); + listSlots->setSelected( listSlots->firstChild(), true ); } } void CustomWidgetEditor::setupProperties() { - editProperty->setEnabled( FALSE ); - comboType->setEnabled( FALSE ); - buttonRemoveProperty->setEnabled( FALSE ); + editProperty->setEnabled( false ); + comboType->setEnabled( false ); + buttonRemoveProperty->setEnabled( false ); MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); if ( !w ) @@ -158,7 +158,7 @@ void CustomWidgetEditor::setupProperties() if ( listProperties->firstChild() ) { listProperties->setCurrentItem( listProperties->firstChild() ); - listProperties->setSelected( listProperties->firstChild(), TRUE ); + listProperties->setSelected( listProperties->firstChild(), true ); } } @@ -169,33 +169,33 @@ void CustomWidgetEditor::currentWidgetChanged( TQListBoxItem *i ) MetaDataBase::CustomWidget *w = findWidget( i ); if ( !i || !w ) { - buttonChooseHeader->setEnabled( FALSE ); - editClass->setEnabled( FALSE ); - editHeader->setEnabled( FALSE ); - buttonChoosePixmap->setEnabled( FALSE ); - spinWidth->setEnabled( FALSE ); - spinHeight->setEnabled( FALSE ); - localGlobalCombo->setEnabled( FALSE ); - sizeHor->setEnabled( FALSE ); - sizeVer->setEnabled( FALSE ); - checkContainer->setEnabled( FALSE ); + buttonChooseHeader->setEnabled( false ); + editClass->setEnabled( false ); + editHeader->setEnabled( false ); + buttonChoosePixmap->setEnabled( false ); + spinWidth->setEnabled( false ); + spinHeight->setEnabled( false ); + localGlobalCombo->setEnabled( false ); + sizeHor->setEnabled( false ); + sizeVer->setEnabled( false ); + checkContainer->setEnabled( false ); return; } - buttonChooseHeader->setEnabled( TRUE ); - editClass->setEnabled( TRUE ); - editHeader->setEnabled( TRUE ); - buttonChoosePixmap->setEnabled( TRUE ); - spinWidth->setEnabled( TRUE ); - spinHeight->setEnabled( TRUE ); - localGlobalCombo->setEnabled( TRUE ); - sizeHor->setEnabled( TRUE ); - sizeVer->setEnabled( TRUE ); - checkContainer->setEnabled( TRUE ); - - editClass->blockSignals( TRUE ); + buttonChooseHeader->setEnabled( true ); + editClass->setEnabled( true ); + editHeader->setEnabled( true ); + buttonChoosePixmap->setEnabled( true ); + spinWidth->setEnabled( true ); + spinHeight->setEnabled( true ); + localGlobalCombo->setEnabled( true ); + sizeHor->setEnabled( true ); + sizeVer->setEnabled( true ); + checkContainer->setEnabled( true ); + + editClass->blockSignals( true ); editClass->setText( w->className ); - editClass->blockSignals( FALSE ); + editClass->blockSignals( false ); editHeader->setText( w->includeFile ); localGlobalCombo->setCurrentItem( (int)w->includePolicy ); if ( w->pixmap ) @@ -233,7 +233,7 @@ void CustomWidgetEditor::addWidgetClicked() customWidgets.insert( i, w ); boxWidgets->setCurrentItem( i ); - boxWidgets->setSelected( i, TRUE ); + boxWidgets->setSelected( i, true ); } void CustomWidgetEditor::classNameChanged( const TQString &s ) @@ -246,7 +246,7 @@ void CustomWidgetEditor::classNameChanged( const TQString &s ) WidgetDatabase::customWidgetClassNameChanged( w->className, s ); checkTimer->stop(); - boxWidgets->blockSignals( TRUE ); + boxWidgets->blockSignals( true ); oldName = w->className; w->className = s; TQListBoxItem *old = i; @@ -258,8 +258,8 @@ void CustomWidgetEditor::classNameChanged( const TQString &s ) oldItem = i; customWidgets.insert( i, w ); customWidgets.remove( old ); - boxWidgets->blockSignals( FALSE ); - checkTimer->start( 1000, TRUE ); + boxWidgets->blockSignals( false ); + checkTimer->start( 1000, true ); } void CustomWidgetEditor::deleteWidgetClicked() @@ -292,7 +292,7 @@ void CustomWidgetEditor::deleteWidgetClicked() i = boxWidgets->item( boxWidgets->currentItem() ); if ( i ) { boxWidgets->setCurrentItem( i ); - boxWidgets->setSelected( i, TRUE ); + boxWidgets->setSelected( i, true ); } } @@ -340,13 +340,13 @@ void CustomWidgetEditor::pixmapChoosen() delete w->pixmap; w->pixmap = new TQPixmap( pix ); - boxWidgets->blockSignals( TRUE ); + boxWidgets->blockSignals( true ); TQListBoxItem *old = i; boxWidgets->changeItem( *w->pixmap, w->className, boxWidgets->currentItem() ); i = boxWidgets->item( boxWidgets->currentItem() ); customWidgets.insert( i, w ); customWidgets.remove( old ); - boxWidgets->blockSignals( FALSE ); + boxWidgets->blockSignals( false ); previewPixmap->setPixmap( *w->pixmap ); } @@ -420,28 +420,28 @@ void CustomWidgetEditor::closeClicked() void CustomWidgetEditor::currentSignalChanged( TQListBoxItem *i ) { - editSignal->blockSignals( TRUE ); + editSignal->blockSignals( true ); editSignal->setText( "" ); - editSignal->blockSignals( FALSE ); + editSignal->blockSignals( false ); if ( !i ) { - editSignal->setEnabled( FALSE ); - buttonRemoveSignal->setEnabled( FALSE ); + editSignal->setEnabled( false ); + buttonRemoveSignal->setEnabled( false ); return; } - editSignal->blockSignals( TRUE ); - editSignal->setEnabled( TRUE ); - buttonRemoveSignal->setEnabled( TRUE ); + editSignal->blockSignals( true ); + editSignal->setEnabled( true ); + buttonRemoveSignal->setEnabled( true ); editSignal->setText( i->text() ); - editSignal->blockSignals( FALSE ); + editSignal->blockSignals( false ); } void CustomWidgetEditor::addSignal() { TQListBoxItem *i = new TQListBoxText( listSignals, "signal()" ); listSignals->setCurrentItem( i ); - listSignals->setSelected( i, TRUE ); + listSignals->setSelected( i, true ); MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); if ( w ) w->lstSignals.append( i->text().latin1() ); @@ -452,7 +452,7 @@ void CustomWidgetEditor::removeSignal() TQString s = listSignals->currentText(); delete listSignals->item( listSignals->currentItem() ); if ( listSignals->currentItem() != -1 ) - listSignals->setSelected( listSignals->currentItem(), TRUE ); + listSignals->setSelected( listSignals->currentItem(), true ); MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); if ( w ) w->lstSignals.remove( s.latin1() ); @@ -467,9 +467,9 @@ void CustomWidgetEditor::signalNameChanged( const TQString &s ) TQValueList<TQCString>::Iterator it = w->lstSignals.find( listSignals->currentText().latin1() ); if ( it != w->lstSignals.end() ) w->lstSignals.remove( it ); - listSignals->blockSignals( TRUE ); + listSignals->blockSignals( true ); listSignals->changeItem( s, listSignals->currentItem() ); - listSignals->blockSignals( FALSE ); + listSignals->blockSignals( false ); w->lstSignals.append( s.latin1() ); } @@ -514,7 +514,7 @@ void CustomWidgetEditor::addSlot() { TQListViewItem *i = new TQListViewItem( listSlots, "slot()", "public" ); listSlots->setCurrentItem( i ); - listSlots->setSelected( i, TRUE ); + listSlots->setSelected( i, true ); MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); if ( w ) { MetaDataBase::Function slot; @@ -535,7 +535,7 @@ void CustomWidgetEditor::removeSlot() } delete listSlots->currentItem(); if ( listSlots->currentItem() ) - listSlots->setSelected( listSlots->currentItem(), TRUE ); + listSlots->setSelected( listSlots->currentItem(), true ); MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); if ( w && slot.function != "1 2 3" ) w->lstSlots.remove( slot ); @@ -543,29 +543,29 @@ void CustomWidgetEditor::removeSlot() void CustomWidgetEditor::currentSlotChanged( TQListViewItem *i ) { - editSlot->blockSignals( TRUE ); + editSlot->blockSignals( true ); editSlot->setText( "" ); - editSignal->blockSignals( FALSE ); + editSignal->blockSignals( false ); if ( !i ) { - editSlot->setEnabled( FALSE ); - comboAccess->setEnabled( FALSE ); - buttonRemoveSlot->setEnabled( FALSE ); + editSlot->setEnabled( false ); + comboAccess->setEnabled( false ); + buttonRemoveSlot->setEnabled( false ); return; } - editSlot->setEnabled( TRUE ); - comboAccess->setEnabled( TRUE ); - buttonRemoveSlot->setEnabled( TRUE ); - editSlot->blockSignals( TRUE ); - comboAccess->blockSignals( TRUE ); + editSlot->setEnabled( true ); + comboAccess->setEnabled( true ); + buttonRemoveSlot->setEnabled( true ); + editSlot->blockSignals( true ); + comboAccess->blockSignals( true ); editSlot->setText( i->text( 0 ) ); if ( i->text( 1 ) == tr( "protected" ) ) comboAccess->setCurrentItem( 1 ); else comboAccess->setCurrentItem( 0 ); - editSlot->blockSignals( FALSE ); - comboAccess->blockSignals( FALSE ); + editSlot->blockSignals( false ); + comboAccess->blockSignals( false ); } void CustomWidgetEditor::propertyTypeChanged( const TQString &s ) @@ -608,7 +608,7 @@ void CustomWidgetEditor::addProperty() { TQListViewItem *i = new TQListViewItem( listProperties, "property", "String" ); listProperties->setCurrentItem( i ); - listProperties->setSelected( i, TRUE ); + listProperties->setSelected( i, true ); MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); if ( w ) { MetaDataBase::Property prop; @@ -628,7 +628,7 @@ void CustomWidgetEditor::removeProperty() } delete listProperties->currentItem(); if ( listProperties->currentItem() ) - listProperties->setSelected( listProperties->currentItem(), TRUE ); + listProperties->setSelected( listProperties->currentItem(), true ); MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) ); if ( w && property.property != "1 2 3" ) w->lstProperties.remove( property ); @@ -636,22 +636,22 @@ void CustomWidgetEditor::removeProperty() void CustomWidgetEditor::currentPropertyChanged( TQListViewItem *i ) { - editProperty->blockSignals( TRUE ); + editProperty->blockSignals( true ); editProperty->setText( "" ); - editSignal->blockSignals( FALSE ); + editSignal->blockSignals( false ); if ( !i ) { - editProperty->setEnabled( FALSE ); - comboType->setEnabled( FALSE ); - buttonRemoveProperty->setEnabled( FALSE ); + editProperty->setEnabled( false ); + comboType->setEnabled( false ); + buttonRemoveProperty->setEnabled( false ); return; } - editProperty->setEnabled( TRUE ); - comboType->setEnabled( TRUE ); - buttonRemoveProperty->setEnabled( TRUE ); - editProperty->blockSignals( TRUE ); - comboType->blockSignals( TRUE ); + editProperty->setEnabled( true ); + comboType->setEnabled( true ); + buttonRemoveProperty->setEnabled( true ); + editProperty->blockSignals( true ); + comboType->blockSignals( true ); editProperty->setText( i->text( 0 ) ); for ( int j = 0; j < comboType->count(); ++j ) { @@ -660,8 +660,8 @@ void CustomWidgetEditor::currentPropertyChanged( TQListViewItem *i ) break; } } - editProperty->blockSignals( FALSE ); - comboType->blockSignals( FALSE ); + editProperty->blockSignals( false ); + comboType->blockSignals( false ); } static TQString makeIndent2( int indent ) diff --git a/tools/designer/designer/database.cpp b/tools/designer/designer/database.cpp index 602e9c236..f3a18decf 100644 --- a/tools/designer/designer/database.cpp +++ b/tools/designer/designer/database.cpp @@ -89,13 +89,13 @@ bool TQDesignerDataBrowser::event( TQEvent* e ) #endif if ( e->type() == TQEvent::Show ) { if ( con ) { - TQSqlCursor* cursor = new TQSqlCursor( tbl, TRUE, con ); - setSqlCursor( cursor, TRUE ); + TQSqlCursor* cursor = new TQSqlCursor( tbl, true, con ); + setSqlCursor( cursor, true ); setForm( frm ); refresh(); first(); } - return TRUE; + return true; } #if defined(DESIGNER) } @@ -117,7 +117,7 @@ bool TQDesignerDataView::event( TQEvent* e ) if ( e->type() == TQEvent::Show ) { setForm( frm ); readFields(); - return TRUE; + return true; } #if defined(DESIGNER) } diff --git a/tools/designer/designer/dbconnectionimpl.cpp b/tools/designer/designer/dbconnectionimpl.cpp index fd9cf4eb0..d460e8fed 100644 --- a/tools/designer/designer/dbconnectionimpl.cpp +++ b/tools/designer/designer/dbconnectionimpl.cpp @@ -67,20 +67,20 @@ void DatabaseConnectionEditor::accept() void DatabaseConnectionEditor::init() { - connectionWidget->editName->setEnabled( FALSE ); + connectionWidget->editName->setEnabled( false ); connectionWidget->editName->setValidator( new AsciiValidator( connectionWidget->editName ) ); connectionWidget->editName->setText( conn->name() ); - connectionWidget->comboDriver->setEnabled( FALSE ); + connectionWidget->comboDriver->setEnabled( false ); connectionWidget->comboDriver->lineEdit()->setText( conn->driver() ); - connectionWidget->editDatabase->setEnabled( FALSE ); + connectionWidget->editDatabase->setEnabled( false ); connectionWidget->editDatabase->setText( conn->database() ); - connectionWidget->editUsername->setEnabled( TRUE ); + connectionWidget->editUsername->setEnabled( true ); connectionWidget->editUsername->setText( conn->username() ); - connectionWidget->editPassword->setEnabled( TRUE ); + connectionWidget->editPassword->setEnabled( true ); connectionWidget->editPassword->setText( "" ); - connectionWidget->editHostname->setEnabled( TRUE ); + connectionWidget->editHostname->setEnabled( true ); connectionWidget->editHostname->setText( conn->hostname() ); - connectionWidget->editPort->setEnabled( TRUE ); + connectionWidget->editPort->setEnabled( true ); connectionWidget->editPort->setValue( conn->port() ); connectionWidget->editUsername->setFocus(); connectionWidget->editUsername->selectAll(); diff --git a/tools/designer/designer/dbconnectionimpl.h b/tools/designer/designer/dbconnectionimpl.h index fbf379d3b..94193b330 100644 --- a/tools/designer/designer/dbconnectionimpl.h +++ b/tools/designer/designer/dbconnectionimpl.h @@ -46,7 +46,7 @@ class DatabaseConnectionEditor : public DatabaseConnectionEditorBase public: DatabaseConnectionEditor( DatabaseConnection* connection, TQWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + const char* name = 0, bool modal = false, WFlags fl = 0 ); ~DatabaseConnectionEditor(); public slots: diff --git a/tools/designer/designer/dbconnectionsimpl.cpp b/tools/designer/designer/dbconnectionsimpl.cpp index 29c216cd1..5f7933d54 100644 --- a/tools/designer/designer/dbconnectionsimpl.cpp +++ b/tools/designer/designer/dbconnectionsimpl.cpp @@ -47,14 +47,14 @@ #include "mainwindow.h" #include "asciivalidator.h" -static bool blockChanges = FALSE; +static bool blockChanges = false; /* * Constructs a DatabaseConnectionsEditor which is a child of 'parent', with the * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, TQWidget* parent, const char* name, bool modal, WFlags fl ) : DatabaseConnectionBase( parent, name, modal, fl ), project( pro ) @@ -69,7 +69,7 @@ DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, TQWidget* pa connectionWidget->comboDriver->insertStringList( TQSqlDatabase::drivers() ); #endif connectionWidget->editName->setValidator( new AsciiValidator( connectionWidget->editName ) ); - enableAll( FALSE ); + enableAll( false ); } DatabaseConnectionsEditor::~DatabaseConnectionsEditor() @@ -86,15 +86,15 @@ void DatabaseConnectionsEditor::deleteConnection() listConnections->setCurrentItem( 0 ); currentConnectionChanged( listConnections->currentText() ); } else { - enableAll( FALSE ); + enableAll( false ); } project->saveConnections(); } void DatabaseConnectionsEditor::newConnection() { - blockChanges = TRUE; - enableAll( TRUE ); + blockChanges = true; + enableAll( true ); TQString n( "(default)" ); if ( project->databaseConnection( n ) ) { n = "connection"; @@ -105,9 +105,9 @@ void DatabaseConnectionsEditor::newConnection() } connectionWidget->editName->setText( n ); listConnections->clearSelection(); - buttonConnect->setDefault( TRUE ); + buttonConnect->setDefault( true ); connectionWidget->editName->setFocus(); - blockChanges = FALSE; + blockChanges = false; } void DatabaseConnectionsEditor::doConnect() @@ -156,15 +156,15 @@ void DatabaseConnectionsEditor::currentConnectionChanged( const TQString &s ) { #ifndef TQT_NO_SQL DatabaseConnection *conn = project->databaseConnection( s ); - blockChanges = TRUE; + blockChanges = true; enableAll( conn != 0 ); - connectionWidget->editName->setEnabled( FALSE ); - blockChanges = FALSE; + connectionWidget->editName->setEnabled( false ); + blockChanges = false; if ( !conn ) return; - blockChanges = TRUE; + blockChanges = true; connectionWidget->editName->setText( conn->name() ); - blockChanges = FALSE; + blockChanges = false; connectionWidget->comboDriver->lineEdit()->setText( conn->driver() ); connectionWidget->editDatabase->setText( conn->database() ); connectionWidget->editUsername->setText( conn->username() ); diff --git a/tools/designer/designer/dbconnectionsimpl.h b/tools/designer/designer/dbconnectionsimpl.h index 3b65ed60a..0e76e8a12 100644 --- a/tools/designer/designer/dbconnectionsimpl.h +++ b/tools/designer/designer/dbconnectionsimpl.h @@ -45,7 +45,7 @@ class DatabaseConnectionsEditor : public DatabaseConnectionBase public: DatabaseConnectionsEditor( Project *pro, TQWidget* parent = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + const char* name = 0, bool modal = false, WFlags fl = 0 ); ~DatabaseConnectionsEditor(); protected slots: diff --git a/tools/designer/designer/designerapp.cpp b/tools/designer/designer/designerapp.cpp index 370558d76..6e86d43f8 100644 --- a/tools/designer/designer/designerapp.cpp +++ b/tools/designer/designer/designerapp.cpp @@ -77,7 +77,7 @@ TQ_EXPORT TQSplashScreen *DesignerApplication::showSplash() TQRect mainRect; TQString keybase = settingsKey(); - bool show = config.readBoolEntry( keybase + "SplashScreen", TRUE ); + bool show = config.readBoolEntry( keybase + "SplashScreen", true ); mainRect.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", 0 ) ); mainRect.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", 0 ) ); mainRect.setWidth( config.readNumEntry( keybase + "Geometries/MainwindowWidth", 500 ) ); @@ -156,7 +156,7 @@ bool DesignerApplication::winEventFilter( MSG *msg ) TQObjectList* l = MainWindow::self->queryList( "FormWindow" ); FormWindow* fw = (FormWindow*) l->first(); FormWindow* totop = 0; - bool haveit = FALSE; + bool haveit = false; while ( fw ) { haveit = haveit || fw->fileName() == arg; if ( haveit ) @@ -166,7 +166,7 @@ bool DesignerApplication::winEventFilter( MSG *msg ) } if ( !haveit ) { - FlashWindow( MainWindow::self->winId(), TRUE ); + FlashWindow( MainWindow::self->winId(), true ); MainWindow::self->openFormWindow( arg ); } else if ( totop ) { totop->setFocus(); @@ -174,7 +174,7 @@ bool DesignerApplication::winEventFilter( MSG *msg ) delete l; } } - return TRUE; + return true; } return TQApplication::winEventFilter( msg ); } diff --git a/tools/designer/designer/designerappiface.cpp b/tools/designer/designer/designerappiface.cpp index c6ac96c70..fac102486 100644 --- a/tools/designer/designer/designerappiface.cpp +++ b/tools/designer/designer/designerappiface.cpp @@ -596,7 +596,7 @@ void DesignerFormWindowImpl::insertWidget( TQWidget * ) TQWidget *DesignerFormWindowImpl::create( const char *className, TQWidget *parent, const char *name ) { TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, name ); - formWindow->insertWidget( w, TRUE ); + formWindow->insertWidget( w, true ); formWindow->killAccels( formWindow->mainContainer() ); return w; } @@ -685,7 +685,7 @@ void DesignerFormWindowImpl::breakLayout() void DesignerFormWindowImpl::selectWidget( TQWidget * w ) { - formWindow->selectWidget( w, TRUE ); + formWindow->selectWidget( w, true ); } void DesignerFormWindowImpl::selectAll() @@ -699,7 +699,7 @@ void DesignerFormWindowImpl::clearSelection() bool DesignerFormWindowImpl::isWidgetSelected( TQWidget * ) const { - return FALSE; + return false; } TQWidgetList DesignerFormWindowImpl::selectedWidgets() const @@ -747,12 +747,12 @@ void DesignerFormWindowImpl::addAction( TQAction *a ) return; formWindow->actionList().append( a ); MetaDataBase::addEntry( a ); - setPropertyChanged( a, "name", TRUE ); - setPropertyChanged( a, "text", TRUE ); - setPropertyChanged( a, "menuText", TRUE ); - setPropertyChanged( a, "accel", TRUE ); + setPropertyChanged( a, "name", true ); + setPropertyChanged( a, "text", true ); + setPropertyChanged( a, "menuText", true ); + setPropertyChanged( a, "accel", true ); if ( !a->iconSet().isNull() && !a->iconSet().pixmap().isNull() ) - setPropertyChanged( a, "iconSet", TRUE ); + setPropertyChanged( a, "iconSet", true ); } void DesignerFormWindowImpl::removeAction( TQAction *a ) @@ -781,8 +781,8 @@ void DesignerFormWindowImpl::addFunction( const TQCString &function, const TQStr void DesignerFormWindowImpl::setProperty( TQObject *o, const char *property, const TQVariant &value ) { - int id = o->metaObject()->findProperty( property, TRUE ); - const TQMetaProperty* p = o->metaObject()->property( id, TRUE ); + int id = o->metaObject()->findProperty( property, true ); + const TQMetaProperty* p = o->metaObject()->property( id, true ); if ( p && p->isValid() ) o->setProperty( property, value ); else @@ -791,8 +791,8 @@ void DesignerFormWindowImpl::setProperty( TQObject *o, const char *property, con TQVariant DesignerFormWindowImpl::property( TQObject *o, const char *prop ) const { - int id = o->metaObject()->findProperty( prop, TRUE ); - const TQMetaProperty* p = o->metaObject()->property( id, TRUE ); + int id = o->metaObject()->findProperty( prop, true ); + const TQMetaProperty* p = o->metaObject()->property( id, true ); if ( p && p->isValid() ) return o->property( prop ); return MetaDataBase::fakeProperty( o, prop ); @@ -974,7 +974,7 @@ void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); PopupMenuEditor *popup = new PopupMenuEditor( formWindow, mw ); TQString n = name; - formWindow->unify( popup, n, TRUE ); + formWindow->unify( popup, n, true ); popup->setName( n ); MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" ); if ( !mb ) { @@ -1020,7 +1020,7 @@ void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &n TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQToolBar *tb = new TQDesignerToolBar( mw ); TQString n = name; - formWindow->unify( tb, n, TRUE ); + formWindow->unify( tb, n, true ); tb->setName( n ); mw->addToolBar( tb, text ); } @@ -1086,7 +1086,7 @@ void DesignerOutputDockImpl::appendError( const TQString &s, int l ) ls << s; TQValueList<uint> ll; ll << l; - outWin->setErrorMessages( ls, ll, FALSE, TQStringList(), TQObjectList() ); + outWin->setErrorMessages( ls, ll, false, TQStringList(), TQObjectList() ); } void DesignerOutputDockImpl::clearError() diff --git a/tools/designer/designer/designerappiface.h b/tools/designer/designer/designerappiface.h index 90f46f221..199cd9754 100644 --- a/tools/designer/designer/designerappiface.h +++ b/tools/designer/designer/designerappiface.h @@ -150,7 +150,7 @@ public: void setTables( const TQStringList & ); TQMap<TQString, TQStringList> fields() const; void setFields( const TQMap<TQString, TQStringList> & ); - void open( bool suppressDialog = TRUE ) const; + void open( bool suppressDialog = true ) const; void close() const; TQSqlDatabase* connection(); private: @@ -213,7 +213,7 @@ public: void setCurrentWidget( TQWidget * ); TQPtrList<TQAction> actionList() const; TQAction *createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel, - TQObject* parent, const char* name = 0, bool toggle = FALSE ); + TQObject* parent, const char* name = 0, bool toggle = false ); void addAction( TQAction * ); void removeAction( TQAction * ); void preview() const; diff --git a/tools/designer/designer/editfunctionsimpl.cpp b/tools/designer/designer/editfunctionsimpl.cpp index dc2f625e0..dd047895a 100644 --- a/tools/designer/designer/editfunctionsimpl.cpp +++ b/tools/designer/designer/editfunctionsimpl.cpp @@ -52,7 +52,7 @@ #include <ntqcheckbox.h> EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) - : EditFunctionsBase( parent, 0, TRUE ), formWindow( fw ) + : EditFunctionsBase( parent, 0, true ), formWindow( fw ) { connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); @@ -97,8 +97,8 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) } } - boxProperties->setEnabled( FALSE ); - functionName->setValidator( new AsciiValidator( TRUE, functionName ) ); + boxProperties->setEnabled( false ); + functionName->setValidator( new AsciiValidator( true, functionName ) ); if ( functionListView->firstChild() ) functionListView->setCurrentItem( functionListView->firstChild() ); @@ -109,7 +109,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) // Enable rename for all TQListViewItems TQListViewItemIterator lvit = functionListView->firstChild(); for ( ; *lvit; lvit++ ) - (*lvit)->setRenameEnabled( 0, TRUE ); + (*lvit)->setRenameEnabled( 0, true ); // Connect listview signal to signal-relay TQObject::connect( functionListView, @@ -139,12 +139,12 @@ void EditFunctions::okClicked() TQValueList<MetaDataBase::Function>::Iterator fit; if ( !functionList.isEmpty() ) { for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) { - bool functionFound = FALSE; + bool functionFound = false; TQValueList<FunctItem>::Iterator it = functList.begin(); for ( ; it != functList.end(); ++it ) { if ( MetaDataBase::normalizeFunction( (*it).oldName ) == MetaDataBase::normalizeFunction( (*fit).function ) ) { - functionFound = TRUE; + functionFound = true; break; } } @@ -158,7 +158,7 @@ void EditFunctions::okClicked() } } - bool invalidFunctions = FALSE; + bool invalidFunctions = false; TQValueList<FunctItem> invalidItems; if ( !functList.isEmpty() ) { @@ -181,15 +181,15 @@ void EditFunctions::okClicked() bool illegalSpace = s.find( ' ' ) != -1 && s.find( ' ' ) < s.find( '(' ); if ( startNum || noParens || illegalSpace || lst.find( function.function ) != -1 ) { - invalidFunctions = TRUE; + invalidFunctions = true; invalidItems.append( (*it) ); continue; } - bool functionFound = FALSE; + bool functionFound = false; for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) { if ( MetaDataBase::normalizeFunction( (*fit).function ) == MetaDataBase::normalizeFunction( (*it).oldName ) ) { - functionFound = TRUE; + functionFound = true; break; } } @@ -220,12 +220,12 @@ void EditFunctions::okClicked() "Remove these functions?" ), tr( "&Yes" ), tr( "&No" ) ) == 0 ) { TQValueList<FunctItem>::Iterator it = functList.begin(); while ( it != functList.end() ) { - bool found = FALSE; + bool found = false; TQValueList<FunctItem>::Iterator vit = invalidItems.begin(); for ( ; vit != invalidItems.end(); ++vit ) { if ( (*vit).newName == (*it).newName ) { invalidItems.remove( vit ); - found = TRUE; + found = true; break; } } @@ -239,7 +239,7 @@ void EditFunctions::okClicked() functionIds.remove( fit ); delete litem; if ( functionListView->currentItem() ) - functionListView->setSelected( functionListView->currentItem(), TRUE ); + functionListView->setSelected( functionListView->currentItem(), true ); currentItemChanged( functionListView->currentItem() ); break; } @@ -251,7 +251,7 @@ void EditFunctions::okClicked() } if ( functionListView->firstChild() ) { functionListView->setCurrentItem( functionListView->firstChild() ); - functionListView->setSelected( functionListView->firstChild(), TRUE ); + functionListView->setSelected( functionListView->firstChild(), true ); } } formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); @@ -272,7 +272,7 @@ void EditFunctions::functionAdd( const TQString &access, const TQString &type ) { TQListViewItem *i = new TQListViewItem( functionListView ); i->setPixmap( 0, TQPixmap::fromMimeSource( "designer_editslots.png" ) ); - i->setRenameEnabled( 0, TRUE ); + i->setRenameEnabled( 0, true ); i->setText( 1, "void" ); i->setText( 2, "virtual" ); @@ -303,7 +303,7 @@ void EditFunctions::functionAdd( const TQString &access, const TQString &type ) } functionListView->setCurrentItem( i ); - functionListView->setSelected( i, TRUE ); + functionListView->setSelected( i, true ); functionListView->ensureItemVisible( i ); functionName->setFocus(); functionName->selectAll(); @@ -331,7 +331,7 @@ void EditFunctions::functionRemove() if ( !functionListView->currentItem() ) return; - functionListView->blockSignals( TRUE ); + functionListView->blockSignals( true ); removedFunctions << MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ) ); int delId = functionIds[ functionListView->currentItem() ]; TQValueList<FunctItem>::Iterator it = functList.begin(); @@ -345,24 +345,24 @@ void EditFunctions::functionRemove() functionIds.remove( functionListView->currentItem() ); delete functionListView->currentItem(); if ( functionListView->currentItem() ) - functionListView->setSelected( functionListView->currentItem(), TRUE ); - functionListView->blockSignals( FALSE ); + functionListView->setSelected( functionListView->currentItem(), true ); + functionListView->blockSignals( false ); currentItemChanged( functionListView->currentItem() ); } void EditFunctions::currentItemChanged( TQListViewItem *i ) { - functionName->blockSignals( TRUE ); + functionName->blockSignals( true ); functionName->setText( "" ); functionAccess->setCurrentItem( 0 ); - functionName->blockSignals( FALSE ); + functionName->blockSignals( false ); if ( !i ) { - boxProperties->setEnabled( FALSE ); + boxProperties->setEnabled( false ); return; } - functionName->blockSignals( TRUE ); + functionName->blockSignals( true ); functionName->setText( i->text( 0 ) ); editType->setText( i->text( 1 ) ); TQString specifier = i->text( 2 ); @@ -387,8 +387,8 @@ void EditFunctions::currentItemChanged( TQListViewItem *i ) else functionType->setCurrentItem( 1 ); - functionName->blockSignals( FALSE ); - boxProperties->setEnabled( TRUE ); + functionName->blockSignals( false ); + boxProperties->setEnabled( true ); } void EditFunctions::currentTextChanged( const TQString &txt ) @@ -492,7 +492,7 @@ void EditFunctions::setCurrentFunction( const TQString &function ) while ( it.current() ) { if ( MetaDataBase::normalizeFunction( it.current()->text( 0 ) ) == function ) { functionListView->setCurrentItem( it.current() ); - functionListView->setSelected( it.current(), TRUE ); + functionListView->setSelected( it.current(), true ); currentItemChanged( it.current() ); return; } @@ -527,7 +527,7 @@ void EditFunctions::displaySlots( bool justSlots ) } if ( functionListView->firstChild() ) - functionListView->setSelected( functionListView->firstChild(), TRUE ); + functionListView->setSelected( functionListView->firstChild(), true ); } void EditFunctions::emitItemRenamed( TQListViewItem *, int, const TQString & text ) diff --git a/tools/designer/designer/editfunctionsimpl.h b/tools/designer/designer/editfunctionsimpl.h index cc1661764..bde482af2 100644 --- a/tools/designer/designer/editfunctionsimpl.h +++ b/tools/designer/designer/editfunctionsimpl.h @@ -47,7 +47,7 @@ class EditFunctions : public EditFunctionsBase TQ_OBJECT public: - EditFunctions( TQWidget *parent, FormWindow *fw, bool showOnlySlots = FALSE ); + EditFunctions( TQWidget *parent, FormWindow *fw, bool showOnlySlots = false ); void setCurrentFunction( const TQString &function ); void functionAdd( const TQString &access = TQString::null, diff --git a/tools/designer/designer/finddialog.ui.h b/tools/designer/designer/finddialog.ui.h index 6e48a850a..9dceda5d6 100644 --- a/tools/designer/designer/finddialog.ui.h +++ b/tools/designer/designer/finddialog.ui.h @@ -50,16 +50,16 @@ void FindDialog::doFind() if ( !editor->find( comboFind->currentText(), checkCase->isChecked(), checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked() ) ) - checkBegin->setChecked( TRUE ); + checkBegin->setChecked( true ); else - checkBegin->setChecked( FALSE ); + checkBegin->setChecked( false ); } void FindDialog::setEditor( EditorInterface * e, TQObject * fw ) { if ( fw != formWindow ) - checkBegin->setChecked( TRUE ); + checkBegin->setChecked( true ); formWindow = fw; if ( editor ) editor->release(); diff --git a/tools/designer/designer/formfile.cpp b/tools/designer/designer/formfile.cpp index de82ebc72..f4aa80b78 100644 --- a/tools/designer/designer/formfile.cpp +++ b/tools/designer/designer/formfile.cpp @@ -69,8 +69,8 @@ static TQString make_func_pretty( const TQString &s ) FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name ) : filename( fn ), fileNameTemp( temp ), pro( p ), fw( 0 ), ed( 0 ), - timeStamp( 0, fn + codeExtension() ), codeEdited( FALSE ), pkg( FALSE ), - cm( FALSE ), codeFileStat( None ), timeStampUi(0, fn) + timeStamp( 0, fn + codeExtension() ), codeEdited( false ), pkg( false ), + cm( false ), codeFileStat( None ), timeStampUi(0, fn) { MetaDataBase::addEntry( this ); fake = qstrcmp( name, "qt_fakewindow" ) == 0; @@ -78,7 +78,7 @@ FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name pro->addFormFile( this ); loadCode(); if ( !temp ) - checkFileName( FALSE ); + checkFileName( false ); timeStampUi.update(); } @@ -98,7 +98,7 @@ void FormFile::setFormWindow( FormWindow *f ) fw = f; if ( fw ) fw->setFormFile( this ); - parseCode( cod, FALSE ); + parseCode( cod, false ); TQTimer::singleShot( 0, this, TQ_SLOT( notifyFormWindowChange() ) ); } @@ -112,12 +112,12 @@ void FormFile::setFileName( const TQString &fn ) if ( fn == filename ) return; if ( fn.isEmpty() ) { - fileNameTemp = TRUE; + fileNameTemp = true; if ( filename.find( "unnamed" ) != 0 ) filename = createUnnamedFileName(); return; } else { - fileNameTemp = FALSE; + fileNameTemp = false; } filename = fn; timeStamp.setFileName( filename + codeExtension() ); @@ -169,16 +169,16 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified ) if ( fileNameTemp ) return saveAs(); if ( !ignoreModified && !isModified() ) - return TRUE; + return true; if ( ed ) ed->save(); if (!shouldOverwriteUi()) - return TRUE; + return true; if ( formWindow() && isModified( WFormWindow ) ) { if ( withMsgBox ) { if ( !formWindow()->checkCustomWidgets() ) - return FALSE; + return false; } if ( TQFile::exists( pro->makeAbsolute( filename ) ) ) { @@ -235,7 +235,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified ) MainWindow::self->statusBar()->message( tr( "Failed to save file '%1'.").arg( formCodeOnly ? codeFile(): filename ), 5000 ); if ( formCodeOnly ) - return FALSE; + return false; return saveAs(); } if ( MainWindow::self ) @@ -244,18 +244,18 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified ) 3000 ); } else { if ( !Resource::saveFormCode(this, MetaDataBase::languageInterface(pro->language())) ) - return FALSE; + return false; } timeStamp.update(); timeStampUi.update(); - setModified( FALSE ); - return TRUE; + setModified( false ); + return true; } bool FormFile::shouldOverwriteUi() const { if (timeStampUi.isUpToDate()) - return TRUE; + return true; return (TQMessageBox::information(MainWindow::self, tr( "TQt Designer" ), tr("File '%1' has been changed outside TQt Designer.\n" "Do you want to overwrite it?" ).arg(timeStampUi.fileName()), @@ -270,7 +270,7 @@ bool FormFile::saveAs( bool ignoreModified ) f.replace( "::", "_" ); f = pro->makeAbsolute( f + ".ui" ); } - bool saved = FALSE; + bool saved = false; if ( ignoreModified ) { TQString dir = TQStringList::split( ':', pro->iFace()->customSetting( "TQTSCRIPT_PACKAGES" ) ).first(); f = TQFileInfo( f ).fileName(); @@ -284,11 +284,11 @@ bool FormFile::saveAs( bool ignoreModified ) tr( "Save Form '%1' As ...").arg( formName() ), MainWindow::self ? &MainWindow::self->lastSaveFilter : 0 ); if ( fn.isEmpty() ) - return FALSE; + return false; TQFileInfo fi( fn ); if ( fi.extension() != "ui" ) fn += ".ui"; - fileNameTemp = FALSE; + fileNameTemp = false; filename = pro->makeRelative( fn ); TQFileInfo relfi( filename ); if ( relfi.exists() ) { @@ -296,27 +296,27 @@ bool FormFile::saveAs( bool ignoreModified ) tr( "The file already exists. Do you wish to overwrite it?" ), TQMessageBox::Yes, TQMessageBox::No ) == TQMessageBox::Yes ) { - saved = TRUE; + saved = true; } else { filename = f; } } else { - saved = TRUE; + saved = true; } } - if ( !checkFileName( TRUE ) ) { + if ( !checkFileName( true ) ) { filename = f; - return FALSE; + return false; } - pro->setModified( TRUE ); + pro->setModified( true ); timeStamp.setFileName( pro->makeAbsolute( codeFile() ) ); if ( ed && formWindow() ) ed->setCaption( tr( "Edit %1" ).arg( formWindow()->name() ) ); - setModified( TRUE ); + setModified( true ); if ( pro->isDummy() ) fw->mainWindow()->addRecentlyOpenedFile( fn ); - return save( TRUE, ignoreModified ); + return save( true, ignoreModified ); } bool FormFile::close() @@ -327,18 +327,18 @@ bool FormFile::close() } if ( formWindow() ) return formWindow()->close(); - return TRUE; + return true; } bool FormFile::closeEvent() { if ( !isModified() && fileNameTemp ) { pro->removeFormFile( this ); - return TRUE; + return true; } if ( !isModified() ) - return TRUE; + return true; if ( editor() ) editor()->save(); @@ -348,7 +348,7 @@ bool FormFile::closeEvent() tr( "&Yes" ), tr( "&No" ), tr( "&Cancel" ), 0, 2 ) ) { case 0: // save if ( !save() ) - return FALSE; + return false; case 1: // don't save loadCode(); if ( ed ) @@ -359,16 +359,16 @@ bool FormFile::closeEvent() MainWindow::self->workspace()->update(); break; case 2: // cancel - return FALSE; + return false; default: break; } - setModified( FALSE ); + setModified( false ); if ( MainWindow::self ) MainWindow::self->updateFunctionList(); - setCodeEdited( FALSE ); - return TRUE; + setCodeEdited( false ); + return true; } void FormFile::setModified( bool m, int who ) @@ -391,7 +391,7 @@ bool FormFile::isModified( int who ) bool FormFile::isFormWindowModified() const { if ( !formWindow() || !formWindow()->commandHistory() ) - return FALSE; + return false; return formWindow()->commandHistory()->isModified(); } @@ -440,7 +440,7 @@ void FormFile::showFormWindow() formWindow()->setFocus(); return; } - MainWindow::self->openFormWindow( pro->makeAbsolute( filename ), TRUE, this ); + MainWindow::self->openFormWindow( pro->makeAbsolute( filename ), true, this ); } bool FormFile::setupUihFile( bool askForUih ) @@ -448,10 +448,10 @@ bool FormFile::setupUihFile( bool askForUih ) if ( !pro->isCpp() || !askForUih ) { if ( !hasFormCode() ) { createFormCode(); - setModified( TRUE ); + setModified( true ); } codeFileStat = FormFile::Ok; - return TRUE; + return true; } if ( codeFileStat != FormFile::Ok && !ed ) { if ( hasFormCode() ) { @@ -461,20 +461,20 @@ bool FormFile::setupUihFile( bool askForUih ) tr( "Use existing" ), tr( "Create new" ), tr( "Cancel" ), 2, 2 ); if ( i == 2 ) - return FALSE; + return false; if ( i == 1 ) createFormCode(); } else { if ( TQMessageBox::Yes != TQMessageBox::information( MainWindow::self, tr( "Creating ui.h file" ), tr( "Do you want to create an new \"ui.h\" file?" ), TQMessageBox::Yes, TQMessageBox::No ) ) - return FALSE; + return false; createFormCode(); } - setModified( TRUE ); + setModified( true ); } codeFileStat = FormFile::Ok; - return TRUE; + return true; } SourceEditor *FormFile::showEditor( bool askForUih ) @@ -554,7 +554,7 @@ void FormFile::createFormCode() (*it).returnType, (*it).access ) + "\n" + iface->createEmptyFunction(); } - parseCode( cod, FALSE ); + parseCode( cod, false ); } void FormFile::load() @@ -567,21 +567,21 @@ bool FormFile::loadCode() { TQString fn = pro->makeAbsolute( codeFile() ); if ( fn.isEmpty() ) - return FALSE; + return false; TQFile f( fn ); if ( !f.open( IO_ReadOnly ) ) { cod = ""; setCodeFileState( FormFile::None ); - return FALSE; + return false; } TQTextStream ts( &f ); cod = ts.read(); - parseCode( cod, FALSE ); + parseCode( cod, false ); if ( hasFormCode() && codeFileStat != FormFile::Ok ) setCodeFileState( FormFile::Deleted ); timeStamp.update(); - return TRUE; + return true; } bool FormFile::isCodeEdited() const @@ -608,13 +608,13 @@ void FormFile::parseCode( const TQString &txt, bool allowModify ) TQMap<TQString, TQString> funcs; for ( TQValueList<LanguageInterface::Function>::Iterator it = functions.begin(); it != functions.end(); ++it ) { - bool found = FALSE; + bool found = false; for ( TQValueList<MetaDataBase::Function>::Iterator fit = oldFunctions.begin(); fit != oldFunctions.end(); ++fit ) { TQString f( (*fit).function ); if ( MetaDataBase::normalizeFunction( f ) == MetaDataBase::normalizeFunction( (*it).name ) ) { - found = TRUE; + found = true; MetaDataBase::Function function; function.function = make_func_pretty( (*it).name ); function.specifier = (*fit).specifier; @@ -650,12 +650,12 @@ void FormFile::parseCode( const TQString &txt, bool allowModify ) newFunctions << function; funcs.insert( (*it).name, (*it).body ); if ( allowModify ) - setFormWindowModified( TRUE ); + setFormWindowModified( true ); } } if ( allowModify && oldFunctions.count() > 0 ) - setFormWindowModified( TRUE ); + setFormWindowModified( true ); MetaDataBase::setFunctionList( formWindow(), newFunctions ); } @@ -664,7 +664,7 @@ void FormFile::syncCode() { if ( !editor() ) return; - parseCode( editor()->editorInterface()->text(), TRUE ); + parseCode( editor()->editorInterface()->text(), true ); cod = editor()->editorInterface()->text(); } @@ -695,13 +695,13 @@ void FormFile::checkTimeStamp() bool FormFile::isUihFileUpToDate() { if ( timeStamp.isUpToDate() ) - return TRUE; + return true; if ( !editor() ) { MainWindow::self->editSource(); - parseCode( editor()->editorInterface()->text(), TRUE ); + parseCode( editor()->editorInterface()->text(), true ); } checkTimeStamp(); - return FALSE; + return false; } void FormFile::addFunctionCode( MetaDataBase::Function function ) @@ -714,11 +714,11 @@ void FormFile::addFunctionCode( MetaDataBase::Function function ) TQValueList<LanguageInterface::Function> funcs; iface->functions( cod, &funcs ); - bool hasFunc = FALSE; + bool hasFunc = false; for ( TQValueList<LanguageInterface::Function>::Iterator it = funcs.begin(); it != funcs.end(); ++it ) { if ( MetaDataBase::normalizeFunction( (*it).name ) == MetaDataBase::normalizeFunction( function.function ) ) { - hasFunc = TRUE; + hasFunc = true; break; } } @@ -740,7 +740,7 @@ void FormFile::addFunctionCode( MetaDataBase::Function function ) "\n" + iface->createEmptyFunction(); cod += body; if ( codeEdited ) { - setModified( TRUE ); + setModified( true ); emit somethingChanged( this ); } } @@ -878,7 +878,7 @@ bool FormFile::checkFileName( bool allowBreak ) tr( "The project already contains a form with a\n" "filename of '%1'. Please choose a new filename." ).arg( filename ) ); if (!formWindow()) // We are starting up - return FALSE; + return false; while ( ff ) { TQString fn; while ( fn.isEmpty() ) { @@ -889,12 +889,12 @@ bool FormFile::checkFileName( bool allowBreak ) arg( formWindow()->name() ), MainWindow::self ? &MainWindow::self->lastSaveFilter : 0 ); if ( allowBreak && fn.isEmpty() ) - return FALSE; + return false; } filename = pro->makeRelative( fn ); ff = pro->findFormFile( filename, this ); } - return TRUE; + return true; } void FormFile::addConnection( const TQString &sender, const TQString &signal, diff --git a/tools/designer/designer/formfile.h b/tools/designer/designer/formfile.h index d0dbe5374..92fd47a77 100644 --- a/tools/designer/designer/formfile.h +++ b/tools/designer/designer/formfile.h @@ -79,8 +79,8 @@ public: bool loadCode(); void load(); - bool save( bool withMsgBox = TRUE, bool ignoreModified = FALSE ); - bool saveAs( bool ignoreModified = FALSE ); + bool save( bool withMsgBox = true, bool ignoreModified = false ); + bool saveAs( bool ignoreModified = false ); bool close(); bool closeEvent(); bool isModified( int who = WAnyOrAll ); @@ -95,7 +95,7 @@ public: void functionRetTypeChanged( const TQString &fuName, const TQString &oldType, const TQString &newType ); void showFormWindow(); - SourceEditor *showEditor( bool askForUih = TRUE ); + SourceEditor *showEditor( bool askForUih = true ); static TQString createUnnamedFileName(); TQString formName() const; @@ -112,7 +112,7 @@ public: bool hasTempFileName() const { return fileNameTemp; } void setCodeFileState( UihState ); int codeFileState() const; - bool setupUihFile( bool askForUih = TRUE ); + bool setupUihFile( bool askForUih = true ); Project *project() const { return pro; } diff --git a/tools/designer/designer/formsettingsimpl.cpp b/tools/designer/designer/formsettingsimpl.cpp index 88ddef415..68dbf8626 100644 --- a/tools/designer/designer/formsettingsimpl.cpp +++ b/tools/designer/designer/formsettingsimpl.cpp @@ -48,7 +48,7 @@ #include <ntqcheckbox.h> FormSettings::FormSettings( TQWidget *parent, FormWindow *fw ) - : FormSettingsBase( parent, 0, TRUE ), formwindow( fw ) + : FormSettingsBase( parent, 0, true ), formwindow( fw ) { connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( fw ); @@ -63,11 +63,11 @@ FormSettings::FormSettings( TQWidget *parent, FormWindow *fw ) editPixmapFunction->setValidator( new AsciiValidator( TQString( ":" ), editPixmapFunction ) ); if ( formwindow->savePixmapInline() ) - radioPixmapInline->setChecked( TRUE ); + radioPixmapInline->setChecked( true ); else if ( formwindow->savePixmapInProject() ) - radioProjectImageFile->setChecked( TRUE ); + radioProjectImageFile->setChecked( true ); else - radioPixmapFunction->setChecked( TRUE ); + radioPixmapFunction->setChecked( true ); editPixmapFunction->setText( formwindow->pixmapLoaderFunction() ); radioProjectImageFile->setEnabled( !fw->project()->isDummy() ); spinSpacing->setValue( formwindow->layoutDefaultSpacing() ); @@ -88,7 +88,7 @@ void FormSettings::okClicked() info.author = editAuthor->text(); MetaDataBase::setMetaInfo( formwindow, info ); - formwindow->commandHistory()->setModified( TRUE ); + formwindow->commandHistory()->setModified( true ); if ( formwindow->savePixmapInline() ) { MetaDataBase::clearPixmapArguments( formwindow ); @@ -100,20 +100,20 @@ void FormSettings::okClicked() } if ( radioPixmapInline->isChecked() ) { - formwindow->setSavePixmapInline( TRUE ); - formwindow->setSavePixmapInProject( FALSE ); + formwindow->setSavePixmapInline( true ); + formwindow->setSavePixmapInProject( false ); } else if ( radioProjectImageFile->isChecked() ){ - formwindow->setSavePixmapInline( FALSE ); - formwindow->setSavePixmapInProject( TRUE ); + formwindow->setSavePixmapInline( false ); + formwindow->setSavePixmapInProject( true ); } else { - formwindow->setSavePixmapInline( FALSE ); - formwindow->setSavePixmapInProject( FALSE ); + formwindow->setSavePixmapInline( false ); + formwindow->setSavePixmapInProject( false ); } if ( checkLayoutFunctions->isChecked() ) - formwindow->hasLayoutFunctions( TRUE ); + formwindow->hasLayoutFunctions( true ); else - formwindow->hasLayoutFunctions( FALSE ); + formwindow->hasLayoutFunctions( false ); formwindow->setPixmapLoaderFunction( editPixmapFunction->text() ); formwindow->setLayoutDefaultSpacing( spinSpacing->value() ); diff --git a/tools/designer/designer/formwindow.cpp b/tools/designer/designer/formwindow.cpp index caf9d0030..3740ae2df 100644 --- a/tools/designer/designer/formwindow.cpp +++ b/tools/designer/designer/formwindow.cpp @@ -115,7 +115,7 @@ static void restoreCursors( TQWidget *start, FormWindow *fw ) #include <qt_windows.h> static void flickerfree_update( TQWidget *w ) { - InvalidateRect( w->winId(), 0, FALSE ); + InvalidateRect( w->winId(), 0, false ); } #endif @@ -139,7 +139,7 @@ static void flickerfree_update( TQWidget *w ) FormWindow::FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name ) : TQWidget( parent, name, WDestructiveClose ), mainwindow( mw ), - commands( 100 ), pixInline( TRUE ), pixProject( FALSE ) + commands( 100 ), pixInline( true ), pixProject( false ) { ff = f; init(); @@ -148,7 +148,7 @@ FormWindow::FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const cha FormWindow::FormWindow( FormFile *f, TQWidget *parent, const char *name ) : TQWidget( parent, name, WDestructiveClose ), mainwindow( 0 ), - commands( 100 ), pixInline( TRUE ) + commands( 100 ), pixInline( true ) { ff = f; init(); @@ -162,14 +162,14 @@ void FormWindow::init() iface = 0; proj = 0; propertyWidget = 0; - toolFixed = FALSE; - checkedSelectionsForMove = FALSE; + toolFixed = false; + checkedSelectionsForMove = false; mContainer = 0; startWidget = endWidget = 0; currTool = POINTER_TOOL; unclippedPainter = 0; - widgetPressed = FALSE; - drawRubber = FALSE; + widgetPressed = false; + drawRubber = false; setFocusPolicy( ClickFocus ); sizePreviewLabel = 0; checkSelectionsTimer = new TQTimer( this, "checkSelectionsTimer" ); @@ -190,7 +190,7 @@ void FormWindow::init() insertParent = 0; connect( &commands, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), this, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ) ); - propShowBlocked = FALSE; + propShowBlocked = false; setIcon( TQPixmap::fromMimeSource( "designer_form.png" ) ); @@ -202,11 +202,11 @@ void FormWindow::init() setMainContainer( w ); propertyWidget = w; targetContainer = 0; - hadOwnPalette = FALSE; + hadOwnPalette = false; defSpacing = BOXLAYOUT_DEFAULT_SPACING; defMargin = BOXLAYOUT_DEFAULT_MARGIN; - hasLayoutFunc = FALSE; + hasLayoutFunc = false; } void FormWindow::setMainWindow( MainWindow *w ) @@ -365,7 +365,7 @@ void FormWindow::insertWidget() } - TQWidget *w = WidgetFactory::create( currTool, insertParent, 0, TRUE, &currRect, orient ); + TQWidget *w = WidgetFactory::create( currTool, insertParent, 0, true, &currRect, orient ); if ( !w ) return; @@ -393,7 +393,7 @@ void FormWindow::insertWidget() } TQString s = w->name(); - unify( w, s, TRUE ); + unify( w, s, true ); w->setName( s ); insertWidget( w ); TQRect r( currRect ); @@ -497,7 +497,7 @@ void FormWindow::insertWidget( TQWidget *w, bool checkName ) return; if ( checkName ) { TQString s = w->name(); - unify( w, s, TRUE ); + unify( w, s, true ); w->setName( s ); } @@ -565,7 +565,7 @@ void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w ) void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) { CHECK_MAINWINDOW; - checkedSelectionsForMove = FALSE; + checkedSelectionsForMove = false; checkSelectionsTimer->stop(); if ( !sizePreviewLabel ) { sizePreviewLabel = new TQLabel( this ); @@ -581,7 +581,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) w->raise(); if ( ( e->state() & ControlButton ) ) { // with control pressed, always start rubber band selection - drawRubber = TRUE; + drawRubber = true; currRect = TQRect( 0, 0, -1, -1 ); startRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber ); break; @@ -590,19 +590,19 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) bool sel = isWidgetSelected( w ); if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { // control not pressed... if ( !sel ) { // ...and widget no selectted: unselect all - clearSelection( FALSE ); + clearSelection( false ); } else { // ...widget selected // only if widget has a layout (it is a layout meta widget or a laid out container!), unselect its childs if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ) { TQObjectList *l = w->queryList( "TQWidget" ); - setPropertyShowingBlocked( TRUE ); + setPropertyShowingBlocked( true ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( !o->isWidgetType() ) continue; if ( insertedWidgets.find( (TQWidget*)o ) ) - selectWidget( (TQWidget*)o, FALSE ); + selectWidget( (TQWidget*)o, false ); } - setPropertyShowingBlocked( FALSE ); + setPropertyShowingBlocked( false ); delete l; } } @@ -610,7 +610,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) } if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) && sel && e->button() == LeftButton ) { // control pressed and selected, unselect widget - selectWidget( w, FALSE ); + selectWidget( w, false ); break; } @@ -623,11 +623,11 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) w = w->parentWidget(); if ( e->button() == LeftButton ) { // left button: store original geometry and more as the widget might start moving - widgetPressed = TRUE; + widgetPressed = true; widgetGeom = TQRect( w->pos(), w->size() ); oldPressPos = w->mapFromGlobal( e->globalPos() ); origPressPos = oldPressPos; - checkedSelectionsForMove = FALSE; + checkedSelectionsForMove = false; moving.clear(); if ( w->parentWidget() && !isMainContainer( w->parentWidget() ) && !isCentralWidget( w->parentWidget() ) ) { targetContainer = w->parentWidget(); @@ -637,9 +637,9 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) } } else { // press was on the formwindow if ( e->button() == LeftButton ) { // left button: start rubber selection and show formwindow properties - drawRubber = TRUE; + drawRubber = true; if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { - clearSelection( FALSE ); + clearSelection( false ); TQObject *opw = propertyWidget; propertyWidget = mainContainer(); if ( opw->isWidgetType() ) @@ -654,12 +654,12 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) case BUDDY_TOOL: if ( e->button() != LeftButton ) break; - validForBuddy = FALSE; + validForBuddy = false; if ( currTool == BUDDY_TOOL ) { if ( !::tqt_cast<TQLabel*>(w) ) break; - clearSelection( FALSE ); - validForBuddy = TRUE; + clearSelection( false ); + validForBuddy = true; mainWindow()->statusBar()->message( tr( "Set buddy for '%1' to..." ).arg( w->name() ) ); } else { mainWindow()->statusBar()->message( tr( "Connect '%1' with..." ).arg( w->name() ) ); @@ -669,7 +669,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) currentPos = startPos; startWidget = designerWidget( w ); endWidget = startWidget; - beginUnclippedPainter( FALSE ); + beginUnclippedPainter( false ); drawConnectionLine(); break; case ORDER_TOOL: @@ -686,7 +686,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) TQWidgetList oldl = MetaDataBase::tabOrder( this ); TabOrderCommand *cmd = new TabOrderCommand( tr( "Change Tab Order" ), this, oldl, stackedWidgets ); cmd->execute(); - commandHistory()->addCommand( cmd, TRUE ); + commandHistory()->addCommand( cmd, true ); updateOrderIndicators(); } break; @@ -732,7 +732,7 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w ) TQWidgetList oldl = MetaDataBase::tabOrder( this ); TabOrderCommand *cmd = new TabOrderCommand( tr( "Change Tab Order" ), this, oldl, stackedWidgets ); cmd->execute(); - commandHistory()->addCommand( cmd, TRUE ); + commandHistory()->addCommand( cmd, true ); updateOrderIndicators(); } default: @@ -800,9 +800,9 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) if ( x - p.x() != 0 || y - p.y() != 0 ) { // if we actually have to move if ( !checkedSelectionsForMove ) { // if not checked yet, check if the correct widget are selected... if ( !isWidgetSelected( w ) ) { // and unselect others. Only siblings can be moved at the same time - setPropertyShowingBlocked( TRUE ); + setPropertyShowingBlocked( true ); selectWidget( w ); - setPropertyShowingBlocked( FALSE ); + setPropertyShowingBlocked( false ); } checkSelectionsForMove( w ); } @@ -845,7 +845,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) sizePreviewLabel->raise(); sizePreviewLabel->show(); #if defined(TQ_WS_WIN32) - windowsRepaintWorkaroundTimer->start( 100, TRUE ); + windowsRepaintWorkaroundTimer->start( 100, true ); #endif } else { // if we don't need to move, do some indication TQRect lg( mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), sizePreviewLabel->size() ); @@ -860,7 +860,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) break; case CONNECT_TOOL: restoreConnectionLine(); - wid = tqApp->widgetAt( e->globalPos(), TRUE ); + wid = tqApp->widgetAt( e->globalPos(), true ); if ( wid ) wid = designerWidget( wid ); if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) @@ -884,7 +884,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) if ( !validForBuddy ) break; restoreConnectionLine(); - wid = tqApp->widgetAt( e->globalPos(), TRUE ); + wid = tqApp->widgetAt( e->globalPos(), true ); if ( wid ) wid = designerWidget( wid ); if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) ) @@ -974,20 +974,20 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) } // doesn't need to be a command, the MoveCommand does reparenting too - bool emitSelChanged = FALSE; + bool emitSelChanged = false; for ( TQMap<TQWidget*, TQPoint>::Iterator it = moving.begin(); it != moving.end(); ++it ) { TQWidget *i = it.key(); if ( !emitSelChanged && ::tqt_cast<TQButton*>(i) ) { if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) || ::tqt_cast<TQButtonGroup*>(wa) ) - emitSelChanged = TRUE; + emitSelChanged = true; if ( !::tqt_cast<TQButtonGroup*>(wa) ) { - MetaDataBase::setPropertyChanged( i, "buttonGroupId", FALSE ); + MetaDataBase::setPropertyChanged( i, "buttonGroupId", false ); if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) ) ( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i ); } } TQPoint pos = wa->mapFromGlobal( i->mapToGlobal( TQPoint(0,0) ) ); - i->reparent( wa, pos, TRUE ); + i->reparent( wa, pos, true ); raiseSelection( i ); raiseChildSelections( i ); widgetChanged( i ); @@ -1015,9 +1015,9 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) oldPos, newPos, oldParent, newParent ) ); } else if ( drawRubber ) { // we were drawing a rubber selection endRectDraw(); // get rid of the rectangle - blockSignals( TRUE ); + blockSignals( true ); selectWidgets(); // select widgets which intersect the rect - blockSignals( FALSE ); + blockSignals( false ); emitSelectionChanged(); // inform about selection changes if ( propertyWidget ) emitShowProperties( propertyWidget ); @@ -1049,7 +1049,7 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) "buddy", startWidget->property( "buddy" ), endWidget->name(), endWidget->name(), oldBuddy ); - commandHistory()->addCommand( cmd, TRUE ); + commandHistory()->addCommand( cmd, true ); cmd->execute(); emitUpdateProperties( startWidget ); } @@ -1085,8 +1085,8 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) } break; } - widgetPressed = FALSE; - drawRubber = FALSE; + widgetPressed = false; + drawRubber = false; insertParent = 0; delete buffer; buffer = 0; @@ -1104,7 +1104,7 @@ void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w ) e->key() == Key_Down ) && propertyWidget->isWidgetType() ) checkSelectionsForMove( (TQWidget*)propertyWidget ); - checkSelectionsTimer->start( 1000, TRUE ); + checkSelectionsTimer->start( 1000, true ); if ( e->key() == Key_Left || e->key() == Key_Right || e->key() == Key_Up || e->key() == Key_Down ) { TQWidgetList widgets; @@ -1155,7 +1155,7 @@ void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w ) if ( !widgets.isEmpty() ) { MoveCommand *cmd = new MoveCommand( tr( "Move" ), this, widgets, oldPos, newPos, 0, 0 ); - commandHistory()->addCommand( cmd, TRUE ); + commandHistory()->addCommand( cmd, true ); cmd->execute(); } } @@ -1260,7 +1260,7 @@ void FormWindow::updateSelection( TQWidget *w ) { WidgetSelection *s = usedSelections.find( w ); if ( !w->isVisibleTo( this ) ) - selectWidget( w, FALSE ); + selectWidget( w, false ); else if ( s ) s->updateGeometry(); } @@ -1283,7 +1283,7 @@ void FormWindow::clearSelection( bool changePropertyDisplay ) { TQPtrDictIterator<WidgetSelection> it( usedSelections ); for ( ; it.current(); ++it ) - it.current()->setWidget( 0, FALSE ); + it.current()->setWidget( 0, false ); usedSelections.clear(); if ( changePropertyDisplay ) { @@ -1300,8 +1300,8 @@ void FormWindow::startRectDraw( const TQPoint &p, const TQPoint &global, TQWidge { TQPoint pos( p ); pos = mapFromGlobal( global ); - oldRectValid = FALSE; - beginUnclippedPainter( TRUE ); + oldRectValid = false; + beginUnclippedPainter( true ); if ( t == Rubber ) unclippedPainter->setPen( TQPen( color0, 1 ) ); if ( t == Insert ) @@ -1335,7 +1335,7 @@ void FormWindow::continueRectDraw( const TQPoint &p, const TQPoint &global, TQWi if ( oldRectValid ) unclippedPainter->drawRect( currRect ); if ( r.width() > 1 || r.height() > 1 ) { - oldRectValid = TRUE; + oldRectValid = true; currRect = r; if ( t == Insert ) { TQString t = tr( "%1/%2" ); @@ -1344,9 +1344,9 @@ void FormWindow::continueRectDraw( const TQPoint &p, const TQPoint &global, TQWi } unclippedPainter->setClipRegion( TQRegion( rect() ).subtract( TQRect( sizePreviewPos, sizePreviewPixmap.size() ) ) ); unclippedPainter->drawRect( currRect ); - unclippedPainter->setClipping( FALSE ); + unclippedPainter->setClipping( false ); } else { - oldRectValid = FALSE; + oldRectValid = false; if ( t == Insert ) drawSizePreview( pos, tr("Use Size Hint") ); } @@ -1386,7 +1386,7 @@ bool FormWindow::isWidgetSelected( TQObject *w ) { if ( w->isWidgetType() ) return usedSelections.find( (TQWidget*)w ) != 0; - return FALSE; // #### do stuff for TQObjects + return false; // #### do stuff for TQObjects } void FormWindow::moveSelectedWidgets( int dx, int dy ) @@ -1449,9 +1449,9 @@ void FormWindow::updateChildSelections( TQWidget *w ) void FormWindow::checkSelectionsForMove( TQWidget *w ) { - checkedSelectionsForMove = TRUE; + checkedSelectionsForMove = true; - TQObjectList *l = w->parentWidget()->queryList( "TQWidget", 0, FALSE, FALSE ); + TQObjectList *l = w->parentWidget()->queryList( "TQWidget", 0, false, false ); moving.clear(); if ( l ) { TQPtrDictIterator<WidgetSelection> it( usedSelections ); @@ -1564,7 +1564,7 @@ TQLabel *FormWindow::sizePreview() const void FormWindow::invalidCheckedSelections() { - checkedSelectionsForMove = FALSE; + checkedSelectionsForMove = false; } void FormWindow::checkPreviewGeometry( TQRect &r ) @@ -1603,10 +1603,10 @@ void FormWindow::resizeEvent( TQResizeEvent *e ) if ( currTool == ORDER_TOOL ) repositionOrderIndicators(); if ( isVisible() ) - formFile()->setModified( TRUE, FormFile::WFormWindow ); + formFile()->setModified( true, FormFile::WFormWindow ); #if defined(TQ_WS_WIN32) - windowsRepaintWorkaroundTimer->start( 100, TRUE ); + windowsRepaintWorkaroundTimer->start( 100, true ); #endif } @@ -1646,21 +1646,21 @@ void FormWindow::emitShowProperties( TQObject *w ) repaintSelection( (TQWidget*)opw ); } showPropertiesTimer->stop(); - showPropertiesTimer->start( 0, TRUE ); + showPropertiesTimer->start( 0, true ); } void FormWindow::emitUpdateProperties( TQObject *w ) { if ( w == propertyWidget ) { updatePropertiesTimer->stop(); - updatePropertiesTimer->start( 0, TRUE ); + updatePropertiesTimer->start( 0, true ); } } void FormWindow::emitSelectionChanged() { selectionChangedTimer->stop(); - selectionChangedTimer->start( 0, TRUE ); + selectionChangedTimer->start( 0, true ); } void FormWindow::updatePropertiesTimerDone() @@ -1685,7 +1685,7 @@ void FormWindow::selectionChangedTimerDone() void FormWindow::currentToolChanged() { CHECK_MAINWINDOW; - toolFixed = FALSE; + toolFixed = false; int t = mainwindow->currentTool(); if ( currTool == t && t != ORDER_TOOL ) return; @@ -1717,8 +1717,8 @@ void FormWindow::currentToolChanged() } startWidget = endWidget = 0; - widgetPressed = FALSE; - drawRubber = FALSE; + widgetPressed = false; + drawRubber = false; insertParent = 0; delete buffer; buffer = 0; @@ -1726,7 +1726,7 @@ void FormWindow::currentToolChanged() currTool = t; if ( hasFocus() ) - clearSelection( FALSE ); + clearSelection( false ); mainWindow()->statusBar()->clear(); @@ -1769,7 +1769,7 @@ void FormWindow::currentToolChanged() void FormWindow::showOrderIndicators() { hideOrderIndicators(); - orderIndicators.setAutoDelete( TRUE ); + orderIndicators.setAutoDelete( true ); TQObjectList *l = mainContainer()->queryList( "TQWidget" ); stackedWidgets = MetaDataBase::tabOrder( this ); if ( l ) { @@ -1838,9 +1838,9 @@ bool FormWindow::checkCustomWidgets() "the generated code will not compile.\n" "Do you want to save this form now?"; if ( TQMessageBox::information( mainWindow(), tr( "Save Form" ), txt ) == 1 ) - return FALSE; + return false; } - return TRUE; + return true; } void FormWindow::setPropertyShowingBlocked( bool b ) @@ -1909,11 +1909,11 @@ void FormWindow::checkAccels() insertedWidgets[ (void*)o ] ) { TQWidget *w = (TQWidget*)o; const TQMetaProperty* text = - w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); + w->metaObject()->property( w->metaObject()->findProperty( "text", true ), true ); const TQMetaProperty* title = - w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); + w->metaObject()->property( w->metaObject()->findProperty( "title", true ), true ); const TQMetaProperty* pageTitle = - w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); + w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", true ), true ); if ( text ) find_accel( w->property( "text" ).toString(), accels, w ); if ( title ) @@ -1927,20 +1927,20 @@ void FormWindow::checkAccels() delete l; } - bool ok = TRUE; + bool ok = true; TQWidget *wid; for ( TQMap<TQChar, TQWidgetList >::Iterator it = accels.begin(); it != accels.end(); ++it ) { if ( (*it).count() > 1 ) { - ok = FALSE; + ok = false; switch ( TQMessageBox::information( mainWindow(), tr( "Check Accelerators" ), tr( "Accelerator '%1' is used %2 times." ).arg( it.key().upper() ).arg( (*it).count() ), tr( "&Select" ), tr( "&Cancel" ), TQString::null, 2 ) ) { case 0: // select - clearSelection( FALSE ); + clearSelection( false ); for ( wid = (*it).first(); wid; wid = (*it).next() ) - selectWidget( wid, TRUE ); + selectWidget( wid, true ); return; case 1: // cancel return; @@ -1975,8 +1975,8 @@ void FormWindow::paste( const TQString &cb, TQWidget *parent ) void FormWindow::selectAll() { - checkedSelectionsForMove = FALSE; - blockSignals( TRUE ); + checkedSelectionsForMove = false; + blockSignals( true ); TQObjectList *l = mainContainer()->queryList( "TQWidget" ); if ( l ) { for ( TQObject *o = l->first(); o; o = l->next() ) { @@ -1988,7 +1988,7 @@ void FormWindow::selectAll() delete l; } - blockSignals( FALSE ); + blockSignals( false ); emitSelectionChanged(); if ( propertyWidget ) emitShowProperties( propertyWidget ); @@ -2000,7 +2000,7 @@ void FormWindow::layoutHorizontal() TQWidgetList widgets( selectedWidgets() ); LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( tr( "Lay out horizontally" ), this, mainContainer(), 0, widgets ); - clearSelection( FALSE ); + clearSelection( false ); commandHistory()->addCommand( cmd ); cmd->execute(); } @@ -2010,7 +2010,7 @@ void FormWindow::layoutVertical() TQWidgetList widgets( selectedWidgets() ); LayoutVerticalCommand *cmd = new LayoutVerticalCommand( tr( "Lay out vertically" ), this, mainContainer(), 0, widgets ); - clearSelection( FALSE ); + clearSelection( false ); commandHistory()->addCommand( cmd ); cmd->execute(); } @@ -2020,7 +2020,7 @@ void FormWindow::layoutHorizontalSplit() TQWidgetList widgets( selectedWidgets() ); LayoutHorizontalSplitCommand *cmd = new LayoutHorizontalSplitCommand( tr( "Lay out horizontally (in splitter)" ), this, mainContainer(), 0, widgets ); - clearSelection( FALSE ); + clearSelection( false ); commandHistory()->addCommand( cmd ); cmd->execute(); } @@ -2030,7 +2030,7 @@ void FormWindow::layoutVerticalSplit() TQWidgetList widgets( selectedWidgets() ); LayoutVerticalSplitCommand *cmd = new LayoutVerticalSplitCommand( tr( "Lay out vertically (in splitter)" ), this, mainContainer(), 0, widgets ); - clearSelection( FALSE ); + clearSelection( false ); commandHistory()->addCommand( cmd ); cmd->execute(); } @@ -2043,7 +2043,7 @@ void FormWindow::layoutGrid() TQWidgetList widgets( selectedWidgets() ); LayoutGridCommand *cmd = new LayoutGridCommand( tr( "Lay out in a grid" ), this, mainContainer(), 0, widgets, xres, yres ); - clearSelection( FALSE ); + clearSelection( false ); commandHistory()->addCommand( cmd ); cmd->execute(); } @@ -2064,7 +2064,7 @@ void FormWindow::layoutHorizontalContainer( TQWidget *w ) } LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( tr( "Lay out children horizontally" ), this, mainContainer(), w, widgets ); - clearSelection( FALSE ); + clearSelection( false ); commandHistory()->addCommand( cmd ); cmd->execute(); } @@ -2085,7 +2085,7 @@ void FormWindow::layoutVerticalContainer( TQWidget *w ) } LayoutVerticalCommand *cmd = new LayoutVerticalCommand( tr( "Lay out children vertically" ), this, mainContainer(), w, widgets ); - clearSelection( FALSE ); + clearSelection( false ); commandHistory()->addCommand( cmd ); cmd->execute(); } @@ -2109,7 +2109,7 @@ void FormWindow::layoutGridContainer( TQWidget *w ) } LayoutGridCommand *cmd = new LayoutGridCommand( tr( "Lay out children in a grid" ), this, mainContainer(), w, widgets, xres, yres ); - clearSelection( FALSE ); + clearSelection( false ); commandHistory()->addCommand( cmd ); cmd->execute(); } @@ -2138,7 +2138,7 @@ void FormWindow::breakLayout( TQWidget *w ) if ( commands.isEmpty() ) return; - clearSelection( FALSE ); + clearSelection( false ); MacroCommand *cmd = new MacroCommand( tr( "Break Layout" ), this, commands ); commandHistory()->addCommand( cmd ); cmd->execute(); @@ -2176,14 +2176,14 @@ int FormWindow::numVisibleWidgets() const bool FormWindow::hasInsertedChildren( TQWidget *w ) const { if ( !w ) - return FALSE; + return false; w = WidgetFactory::containerOfWidget( w ); if ( !w ) - return FALSE; + return false; TQObjectList *l = w->queryList( "TQWidget" ); if ( !l || !l->first() ) { delete l; - return FALSE; + return false; } for ( TQObject *o = l->first(); o; o = l->next() ) { @@ -2191,12 +2191,12 @@ bool FormWindow::hasInsertedChildren( TQWidget *w ) const ( (TQWidget*)o )->isVisibleTo( (FormWindow*)this ) && insertedWidgets.find( (TQWidget*)o ) ) { delete l; - return TRUE; + return true; } } delete l; - return FALSE; + return false; } bool FormWindow::allowMove( TQWidget *w ) @@ -2204,10 +2204,10 @@ bool FormWindow::allowMove( TQWidget *w ) w = w->parentWidget(); while ( w ) { if ( ( isMainContainer( w ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) - return TRUE; + return true; w = w->parentWidget(); } - return FALSE; + return false; } @@ -2362,7 +2362,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) for ( ; it.current();) { if ( it.current() != w && qstrcmp( it.current()->name(), s.latin1() ) == 0 ) { - found = TRUE; + found = true; if ( !changeIt ) break; s = orig + "_" + TQString::number( ++num ); @@ -2384,7 +2384,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) for ( a = al.first(); a; a = al.next() ) { if ( a != w && qstrcmp( a->name(), s.latin1() ) == 0 ) { - found = TRUE; + found = true; if ( !changeIt ) break; s = orig + "_" + TQString::number( ++num ); @@ -2397,7 +2397,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) for ( TQObject *o = l->first(); o; o = l->next() ) { if ( o != w && qstrcmp ( o->name(), s.latin1() ) == 0 ) { - found = TRUE; + found = true; if ( !changeIt ) break; s = orig + "_" + TQString::number( ++num ); @@ -2408,11 +2408,11 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) } if ( ::tqt_cast<TQMainWindow*>(mainContainer()) ) { if ( !found ) { - TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 0, TRUE ); + TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 0, true ); for ( TQObject *o = l->first(); o; o = l->next() ) { if ( o != w && qstrcmp( o->name(), s.latin1() ) == 0 ) { - found = TRUE; + found = true; if ( !changeIt ) break; s = orig + "_" + TQString::number( ++num ); @@ -2425,8 +2425,8 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) } if ( !found ) - return TRUE; - return FALSE; + return true; + return false; } bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w ) @@ -2435,11 +2435,11 @@ bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w ) for ( ; it.current(); ++it ) { if ( it.current()->isA( "CustomWidget" ) ) { if ( qstrcmp( WidgetFactory::classNameOf( it.current() ), w->className.utf8() ) == 0 ) - return TRUE; + return true; } } - return FALSE; + return false; } bool FormWindow::isDatabaseWidgetUsed() const @@ -2451,21 +2451,21 @@ bool FormWindow::isDatabaseWidgetUsed() const for ( ; it.current(); ++it ) { TQString c( it.current()->className() ); if ( dbClasses.contains( c ) > 0 ) { - return TRUE; + return true; } } #endif - return FALSE; + return false; } bool FormWindow::isDatabaseAware() const { #ifndef TQT_NO_SQL if ( TQString(mContainer->className()) == "TQDesignerDataBrowser" || TQString(mContainer->className()) == "TQDesignerDataView" ) - return TRUE; + return true; return isDatabaseWidgetUsed(); #else - return FALSE; + return false; #endif } @@ -2512,10 +2512,10 @@ static bool isChildOf( TQWidget *c, TQWidget *p ) { while ( c && !c->isTopLevel() ) { if ( c == p ) - return TRUE; + return true; c = c->parentWidget(); } - return FALSE; + return false; } TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) @@ -2626,14 +2626,14 @@ void FormWindow::setSavePixmapInline( bool b ) { pixInline = b; if ( b ) - pixProject = FALSE; + pixProject = false; } void FormWindow::setSavePixmapInProject( bool b ) { pixProject = b; if ( b ) - pixInline = FALSE; + pixInline = false; } void FormWindow::setPixmapLoaderFunction( const TQString &func ) @@ -2675,7 +2675,7 @@ void FormWindow::killAccels( TQObject *top ) if ( !l ) return; for ( TQObject *o = l->first(); o; o = l->next() ) - ( (TQAccel*)o )->setEnabled( FALSE ); + ( (TQAccel*)o )->setEnabled( false ); delete l; } @@ -2689,7 +2689,7 @@ DesignerFormWindow *FormWindow::iFace() bool FormWindow::isCentralWidget( TQObject *w ) const { if ( !::tqt_cast<TQMainWindow*>(mainContainer()) ) - return FALSE; + return false; return w == ( (TQMainWindow*)mainContainer() )->centralWidget(); } diff --git a/tools/designer/designer/formwindow.h b/tools/designer/designer/formwindow.h index 12f27998f..4e126a9bf 100644 --- a/tools/designer/designer/formwindow.h +++ b/tools/designer/designer/formwindow.h @@ -110,12 +110,12 @@ public: virtual void breakLayout( TQWidget *w ); - virtual void selectWidget( TQObject *w, bool select = TRUE ); + virtual void selectWidget( TQObject *w, bool select = true ); virtual void selectAll(); virtual void updateSelection( TQWidget *w ); virtual void raiseSelection( TQWidget *w ); virtual void repaintSelection( TQWidget *w ); - virtual void clearSelection( bool changePropertyDisplay = TRUE ); + virtual void clearSelection( bool changePropertyDisplay = true ); virtual void selectWidgets(); bool isWidgetSelected( TQObject *w ); virtual void updateChildSelections( TQWidget *w ); @@ -149,7 +149,7 @@ public: virtual MainWindow *mainWindow() const { return mainwindow; } bool checkCustomWidgets(); - virtual void insertWidget( TQWidget *w, bool checkName = FALSE ); + virtual void insertWidget( TQWidget *w, bool checkName = false ); virtual void removeWidget( TQWidget *w ); virtual void deleteWidgets(); virtual void editAdjustSize(); @@ -184,7 +184,7 @@ public: bool savePixmapInProject() const; void setSavePixmapInProject( bool b ); - void setToolFixed() { toolFixed = TRUE; } + void setToolFixed() { toolFixed = true; } void setActiveObject( TQObject *o ); diff --git a/tools/designer/designer/hierarchyview.cpp b/tools/designer/designer/hierarchyview.cpp index 4e5c11276..ad142ebeb 100644 --- a/tools/designer/designer/hierarchyview.cpp +++ b/tools/designer/designer/hierarchyview.cpp @@ -93,14 +93,14 @@ void HierarchyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, if ( rtti() == Function && MainWindow::self->currProject()->isCpp() && ( txt == "init()" || txt == "destroy()" ) ) { - listView()->setUpdatesEnabled( FALSE ); + listView()->setUpdatesEnabled( false ); if ( txt == "init()" ) setText( 0, txt + " " + "(Constructor)" ); else setText( 0, txt + " " + "(Destructor)" ); TQListViewItem::paintCell( p, g, column, width, align ); setText( 0, txt ); - listView()->setUpdatesEnabled( TRUE ); + listView()->setUpdatesEnabled( true ); } else { TQListViewItem::paintCell( p, g, column, width, align ); } @@ -181,8 +181,8 @@ HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects init_colors(); setDefaultRenameAction( Accept ); - header()->setMovingEnabled( FALSE ); - header()->setStretchEnabled( TRUE ); + header()->setMovingEnabled( false ); + header()->setStretchEnabled( true ); normalMenu = 0; tabWidgetMenu = 0; addColumn( tr( "Name" ) ); @@ -206,31 +206,31 @@ HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects connect( this, TQ_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint&, int ) ), this, TQ_SLOT( showRMBMenu( TQListViewItem *, const TQPoint & ) ) ); } - deselect = TRUE; + deselect = true; setColumnWidthMode( 1, Manual ); } void HierarchyList::keyPressEvent( TQKeyEvent *e ) { if ( e->key() == Key_Shift || e->key() == Key_Control ) - deselect = FALSE; + deselect = false; else - deselect = TRUE; + deselect = true; TQListView::keyPressEvent( e ); } void HierarchyList::keyReleaseEvent( TQKeyEvent *e ) { - deselect = TRUE; + deselect = true; TQListView::keyReleaseEvent( e ); } void HierarchyList::viewportMousePressEvent( TQMouseEvent *e ) { if ( e->state() & ShiftButton || e->state() & ControlButton ) - deselect = FALSE; + deselect = false; else - deselect = TRUE; + deselect = true; TQListView::viewportMousePressEvent( e ); } @@ -249,7 +249,7 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) return 0; if ( formWindow == o ) { if ( deselect ) - formWindow->clearSelection( FALSE ); + formWindow->clearSelection( false ); formWindow->emitShowProperties( formWindow ); return 0; } @@ -281,11 +281,11 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) } } else if ( ::tqt_cast<TQAction*>(o) ) { MainWindow::self->actioneditor()->setCurrentAction( (TQAction*)o ); - deselect = TRUE; + deselect = true; } if ( deselect ) - formWindow->clearSelection( FALSE ); + formWindow->clearSelection( false ); return o; } @@ -301,7 +301,7 @@ void HierarchyList::objectDoubleClicked( TQListViewItem *i ) if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) w->raise(); - formWindow->selectWidget( w, TRUE ); + formWindow->selectWidget( w, true ); } } @@ -312,7 +312,7 @@ void HierarchyList::objectClicked( TQListViewItem *i ) return; if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) { TQWidget *w = (TQWidget*)o; - formWindow->selectWidget( w, TRUE ); + formWindow->selectWidget( w, true ); } } @@ -399,12 +399,12 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) { if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) ) return; - bool fakeMainWindow = FALSE; + bool fakeMainWindow = false; if ( ::tqt_cast<TQMainWindow*>(o) ) { TQObject *cw = ( (TQMainWindow*)o )->centralWidget(); if ( cw ) { o = cw; - fakeMainWindow = TRUE; + fakeMainWindow = true; } } TQListViewItem *item = 0; @@ -452,7 +452,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) item = new HierarchyItem( HierarchyItem::Widget, this, 0, name, className, dbInfo ); else item = new HierarchyItem( HierarchyItem::Widget, parent, 0, name, className, dbInfo ); - item->setOpen( TRUE ); + item->setOpen( true ); if ( !parent ) item->setPixmap( 0, TQPixmap::fromMimeSource( "designer_form.png" ) ); else if ( ::tqt_cast<TQLayoutWidget*>(o) ) @@ -489,7 +489,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) if ( widgetStacks->findRef( stack ) != -1 ) continue; widgetStacks->append( stack ); - TQObjectList *l2 = stack->queryList( "TQWidget", 0, TRUE, FALSE ); + TQObjectList *l2 = stack->queryList( "TQWidget", 0, true, false ); for ( obj = l2->last(); obj; obj = l2->prev() ) { if ( qstrcmp( obj->className(), "TQWidgetStackPrivate::Invisible" ) == 0 || @@ -577,10 +577,10 @@ void HierarchyList::setCurrent( TQObject *o ) TQListViewItemIterator it( this ); while ( it.current() ) { if ( ( (HierarchyItem*)it.current() )->object() == o ) { - blockSignals( TRUE ); + blockSignals( true ); setCurrentItem( it.current() ); ensureItemVisible( it.current() ); - blockSignals( FALSE ); + blockSignals( false ); return; } ++it; @@ -665,7 +665,7 @@ void HierarchyList::removeTabPage() new DeleteWizardPageCommand( tr( "Delete Page %1 of %2" ). arg( dw->pageTitle() ).arg( wiz->name() ), formWindow, wiz, - wiz->indexOf( wiz->currentPage() ), TRUE ); + wiz->indexOf( wiz->currentPage() ), true ); formWindow->commandHistory()->addCommand( cmd ); cmd->execute(); } @@ -675,13 +675,13 @@ void HierarchyList::removeTabPage() // ------------------------------------------------------------ FormDefinitionView::FormDefinitionView( TQWidget *parent, FormWindow *fw ) - : HierarchyList( parent, fw, TRUE ) + : HierarchyList( parent, fw, true ) { header()->hide(); removeColumn( 1 ); connect( this, TQ_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), this, TQ_SLOT( renamed( TQListViewItem * ) ) ); - popupOpen = FALSE; + popupOpen = false; } void FormDefinitionView::setup() @@ -708,14 +708,14 @@ void FormDefinitionView::setup() HierarchyItem *itemDef = new HierarchyItem( HierarchyItem::DefinitionParent, this, 0, tr( *dit ), TQString::null, TQString::null ); itemDef->setPixmap( 0, TQPixmap::fromMimeSource( "designer_folder.png" ) ); - itemDef->setOpen( TRUE ); + itemDef->setOpen( true ); TQStringList entries = lIface->definitionEntries( *dit, formWindow->mainWindow()->designerInterface() ); HierarchyItem *item = 0; for ( TQStringList::Iterator eit = entries.begin(); eit != entries.end(); ++eit ) { item = new HierarchyItem( HierarchyItem::Definition, itemDef, item, *eit, TQString::null, TQString::null ); - item->setRenameEnabled( 0, TRUE ); + item->setRenameEnabled( 0, true ); } } lIface->release(); @@ -727,7 +727,7 @@ void FormDefinitionView::setup() void FormDefinitionView::setupVariables() { bool pubOpen, protOpen, privOpen; - pubOpen = protOpen = privOpen = TRUE; + pubOpen = protOpen = privOpen = true; TQListViewItem *i = firstChild(); while ( i ) { if ( i->rtti() == HierarchyItem::VarParent ) { @@ -751,7 +751,7 @@ void FormDefinitionView::setupVariables() HierarchyItem *itemVar = new HierarchyItem( HierarchyItem::VarParent, this, 0, tr( "Class Variables" ), TQString::null, TQString::null ); itemVar->setPixmap( 0, TQPixmap::fromMimeSource( "designer_folder.png" ) ); - itemVar->setOpen( TRUE ); + itemVar->setOpen( true ); itemVarPriv = new HierarchyItem( HierarchyItem::VarPrivate, itemVar, 0, tr( "private" ), TQString::null, TQString::null ); @@ -780,7 +780,7 @@ void FormDefinitionView::setupVariables() --it; } } - itemVar->setOpen( TRUE ); + itemVar->setOpen( true ); itemVarPriv->setOpen( privOpen ); itemVarProt->setOpen( protOpen ); itemVarPubl->setOpen( pubOpen ); @@ -792,7 +792,7 @@ void FormDefinitionView::refresh() return; bool fuPub, fuProt, fuPriv, slPub, slProt, slPriv; - fuPub = fuProt = fuPriv = slPub = slProt = slPriv = TRUE; + fuPub = fuProt = fuPriv = slPub = slProt = slPriv = true; TQListViewItem *i = firstChild(); while ( i ) { if ( i->rtti() == HierarchyItem::SlotParent || @@ -883,12 +883,12 @@ void FormDefinitionView::refresh() } } - itemFunct->setOpen( TRUE ); + itemFunct->setOpen( true ); itemFunctPubl->setOpen( fuPub ); itemFunctProt->setOpen( fuProt ); itemFunctPriv->setOpen( fuPriv ); - itemSlots->setOpen( TRUE ); + itemSlots->setOpen( true ); itemPublic->setOpen( slPub ); itemProtected->setOpen( slProt ); itemPrivate->setOpen( slPriv ); @@ -950,7 +950,7 @@ void HierarchyList::insertEntry( TQListViewItem *i, const TQPixmap &pix, const T TQString::null, TQString::null ); if ( !pix.isNull() ) item->setPixmap( 0, pix ); - item->setRenameEnabled( 0, TRUE ); + item->setRenameEnabled( 0, true ); setCurrentItem( item ); ensureItemVisible( item ); tqApp->processEvents(); @@ -975,22 +975,22 @@ void FormDefinitionView::contentsMouseDoubleClickEvent( TQMouseEvent *e ) if ( formWindow->project()->isCpp() ) switch( i->rtti() ) { case HierarchyItem::FunctPublic: - execFunctionDialog( "public", "function", TRUE ); + execFunctionDialog( "public", "function", true ); break; case HierarchyItem::FunctProtected: - execFunctionDialog( "protected", "function", TRUE ); + execFunctionDialog( "protected", "function", true ); break; case HierarchyItem::FunctPrivate: - execFunctionDialog( "private", "function", TRUE ); + execFunctionDialog( "private", "function", true ); break; case HierarchyItem::SlotPublic: - execFunctionDialog( "public", "slot", TRUE ); + execFunctionDialog( "public", "slot", true ); break; case HierarchyItem::SlotProtected: - execFunctionDialog( "protected", "slot", TRUE ); + execFunctionDialog( "protected", "slot", true ); break; case HierarchyItem::SlotPrivate: - execFunctionDialog( "private", "slot", TRUE ); + execFunctionDialog( "private", "slot", true ); break; case HierarchyItem::VarPublic: case HierarchyItem::VarProtected: @@ -1017,7 +1017,7 @@ void FormDefinitionView::execFunctionDialog( const TQString &access, const TQStr // refresh the functions list in the metadatabase SourceEditor *editor = formFile->editor(); if ( editor ) - editor->refresh( TRUE ); + editor->refresh( true ); EditFunctions dlg( this, formWindow ); if ( addFunc ) @@ -1037,7 +1037,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) const int GOIMPL = 5; TQPopupMenu menu; - bool insertDelete = FALSE; + bool insertDelete = false; if ( i->rtti() == HierarchyItem::FunctParent || i->rtti() == HierarchyItem::SlotParent || i->rtti() == HierarchyItem::VarParent ) { @@ -1053,7 +1053,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) menu.insertItem( TQPixmap::fromMimeSource( "designer_editslots.png" ), tr( "Properties..." ), PROPS ); if ( MetaDataBase::hasEditor( formWindow->project()->language() ) ) menu.insertItem( tr( "Goto Implementation" ), GOIMPL ); - insertDelete = TRUE; + insertDelete = true; } if ( insertDelete || i->rtti() == HierarchyItem::Variable || i->rtti() == HierarchyItem::Function || i->rtti() == HierarchyItem::Slot || @@ -1061,19 +1061,19 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) menu.insertSeparator(); menu.insertItem( TQPixmap::fromMimeSource( "designer_editcut.png" ), tr( "Delete..." ), DEL ); } - popupOpen = TRUE; + popupOpen = true; int res = menu.exec( pos ); - popupOpen = FALSE; + popupOpen = false; if ( res == -1 ) return; if ( res == EDIT ) { switch( i->rtti() ) { case HierarchyItem::FunctParent: - execFunctionDialog( "public", "function", FALSE ); + execFunctionDialog( "public", "function", false ); break; case HierarchyItem::SlotParent: - execFunctionDialog( "public", "slot", FALSE ); + execFunctionDialog( "public", "slot", false ); break; case HierarchyItem::VarParent: case HierarchyItem::VarPublic: @@ -1085,7 +1085,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) if ( i ) varDia.setCurrentItem( i->text( 0 ) ); if ( varDia.exec() == TQDialog::Accepted ) - formWindow->commandHistory()->setModified( TRUE ); + formWindow->commandHistory()->setModified( true ); break; } case HierarchyItem::Definition: @@ -1095,7 +1095,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) return; if ( i->rtti() == HierarchyItem::Definition ) i = i->parent(); - ListEditor dia( this, 0, TRUE ); + ListEditor dia( this, 0, true ); dia.setCaption( tr( "Edit %1" ).arg( i->text( 0 ) ) ); TQStringList entries = lIface->definitionEntries( i->text( 0 ), MainWindow::self->designerInterface() ); dia.setList( entries ); @@ -1111,22 +1111,22 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) i = i->parent(); switch( i->rtti() ) { case HierarchyItem::SlotPublic: - execFunctionDialog( "public", "slot", TRUE ); + execFunctionDialog( "public", "slot", true ); break; case HierarchyItem::SlotProtected: - execFunctionDialog( "protected", "slot", TRUE ); + execFunctionDialog( "protected", "slot", true ); break; case HierarchyItem::SlotPrivate: - execFunctionDialog( "private" , "slot", TRUE ); + execFunctionDialog( "private" , "slot", true ); break; case HierarchyItem::FunctPublic: - execFunctionDialog( "public", "function", TRUE ); + execFunctionDialog( "public", "function", true ); break; case HierarchyItem::FunctProtected: - execFunctionDialog( "protected", "function", TRUE ); + execFunctionDialog( "protected", "function", true ); break; case HierarchyItem::FunctPrivate: - execFunctionDialog( "private" , "function", TRUE ); + execFunctionDialog( "private" , "function", true ); break; default: insertEntry( i ); @@ -1184,7 +1184,7 @@ void FormDefinitionView::save( TQListViewItem *p, TQListViewItem *i ) } if ( i && i->rtti() == HierarchyItem::Variable ) { - i->setRenameEnabled( 0, FALSE ); + i->setRenameEnabled( 0, false ); TQString varName = i->text( 0 ); varName = varName.simplifyWhiteSpace(); if ( varName[(int)varName.length() - 1] != ';' ) @@ -1262,7 +1262,7 @@ HierarchyView::HierarchyView( TQWidget *parent ) setTabToolTip( cb.lv, tr( "List of all classes and its declarations of the current source file" ) ); ciface->onClick( this, TQ_SLOT( jumpTo( const TQString &, const TQString &, int ) ) ); classBrowsers->insert( *it, cb ); - setTabEnabled( cb.lv, FALSE ); + setTabEnabled( cb.lv, false ); } } } @@ -1293,7 +1293,7 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o ) editor = 0; } - setTabEnabled( listview, TRUE ); + setTabEnabled( listview, true ); setTabEnabled( fView, fw && fw->project()->isCpp() ); if ( fw == formwindow ) { @@ -1366,7 +1366,7 @@ void HierarchyView::showClassesTimeout() } setTabEnabled( listview, !!se->formWindow() && !se->formWindow()->isFake() ); - setTabEnabled( fView, FALSE ); + setTabEnabled( fView, false ); formwindow = 0; listview->setFormWindow( 0 ); @@ -1381,10 +1381,10 @@ void HierarchyView::showClassesTimeout() it != classBrowsers->end(); ++it ) { if ( it.key() == se->project()->language() ) { (*it).iface->update( se->text() ); - setTabEnabled( (*it).lv, TRUE ); + setTabEnabled( (*it).lv, true ); showPage( (*it).lv ); } else { - setTabEnabled( (*it).lv, FALSE ); + setTabEnabled( (*it).lv, false ); (*it).iface->clear(); } } diff --git a/tools/designer/designer/hierarchyview.h b/tools/designer/designer/hierarchyview.h index a7d88fd4b..a73012997 100644 --- a/tools/designer/designer/hierarchyview.h +++ b/tools/designer/designer/hierarchyview.h @@ -107,7 +107,7 @@ class HierarchyList : public TQListView TQ_OBJECT public: - HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects = TRUE ); + HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects = true ); virtual void setup(); virtual void setCurrent( TQObject *o ); @@ -117,9 +117,9 @@ public: void setFormWindow( FormWindow *fw ) { formWindow = fw; } void drawContentsOffset( TQPainter *p, int ox, int oy, int cx, int cy, int cw, int ch ) { - setUpdatesEnabled( FALSE ); + setUpdatesEnabled( false ); triggerUpdate(); - setUpdatesEnabled( TRUE ); + setUpdatesEnabled( true ); TQListView::drawContentsOffset( p, ox, oy, cx, cy, cw, ch ); } diff --git a/tools/designer/designer/iconvieweditorimpl.cpp b/tools/designer/designer/iconvieweditorimpl.cpp index a98f7dd80..f2f502485 100644 --- a/tools/designer/designer/iconvieweditorimpl.cpp +++ b/tools/designer/designer/iconvieweditorimpl.cpp @@ -43,16 +43,16 @@ #include <ntqcheckbox.h> IconViewEditor::IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) - : IconViewEditorBase( parent, 0, TRUE ), formwindow( fw ) + : IconViewEditorBase( parent, 0, true ), formwindow( fw ) { connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); iconview = (TQIconView*)editWidget; itemText->setText( "" ); - itemText->setEnabled( FALSE ); + itemText->setEnabled( false ); itemPixmap->setText( "" ); - itemChoosePixmap->setEnabled( FALSE ); - itemDeletePixmap->setEnabled( FALSE ); + itemChoosePixmap->setEnabled( false ); + itemDeletePixmap->setEnabled( false ); TQIconViewItem *i = 0; for ( i = iconview->firstItem(); i; i = i->nextItem() ) { @@ -67,7 +67,7 @@ void IconViewEditor::insertNewItem() { TQIconViewItem *i = new TQIconViewItem( preview, tr( "New Item" ) ); preview->setCurrentItem( i ); - preview->setSelected( i, TRUE ); + preview->setSelected( i, true ); itemText->setFocus(); itemText->selectAll(); } @@ -76,31 +76,31 @@ void IconViewEditor::deleteCurrentItem() { delete preview->currentItem(); if ( preview->currentItem() ) - preview->setSelected( preview->currentItem(), TRUE ); + preview->setSelected( preview->currentItem(), true ); } void IconViewEditor::currentItemChanged( TQIconViewItem *i ) { - itemText->blockSignals( TRUE ); + itemText->blockSignals( true ); itemText->setText( "" ); itemPixmap->setText( "" ); - itemText->blockSignals( FALSE ); + itemText->blockSignals( false ); if ( !i ) { - itemText->setEnabled( FALSE ); - itemChoosePixmap->setEnabled( FALSE ); + itemText->setEnabled( false ); + itemChoosePixmap->setEnabled( false ); return; } - itemText->blockSignals( TRUE ); - itemText->setEnabled( TRUE ); - itemChoosePixmap->setEnabled( TRUE ); + itemText->blockSignals( true ); + itemText->setEnabled( true ); + itemChoosePixmap->setEnabled( true ); itemDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() ); itemText->setText( i->text() ); if ( i->pixmap() ) itemPixmap->setPixmap( *i->pixmap() ); - itemText->blockSignals( FALSE ); + itemText->blockSignals( false ); } void IconViewEditor::currentTextChanged( const TQString &txt ) @@ -156,7 +156,7 @@ void IconViewEditor::choosePixmap() preview->currentItem()->setPixmap( pix ); itemPixmap->setPixmap( pix ); - itemDeletePixmap->setEnabled( TRUE ); + itemDeletePixmap->setEnabled( true ); } void IconViewEditor::deletePixmap() @@ -166,5 +166,5 @@ void IconViewEditor::deletePixmap() preview->currentItem()->setPixmap( TQPixmap() ); itemPixmap->setText( "" ); - itemDeletePixmap->setEnabled( FALSE ); + itemDeletePixmap->setEnabled( false ); } diff --git a/tools/designer/designer/layout.cpp b/tools/designer/designer/layout.cpp index c4f9aa819..c9855a0bd 100644 --- a/tools/designer/designer/layout.cpp +++ b/tools/designer/designer/layout.cpp @@ -71,7 +71,7 @@ bool operator<( const TQGuardedPtr<TQWidget> &p1, const TQGuardedPtr<TQWidget> & Layout::Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter ) : widgets( wl ), parent( p ), formWindow( fw ), isBreak( !doSetup ), useSplitter( splitter ) { - widgets.setAutoDelete( FALSE ); + widgets.setAutoDelete( false ); layoutBase = lb; if ( !doSetup && layoutBase ) oldGeometry = layoutBase->geometry(); @@ -110,7 +110,7 @@ void Layout::setup() } if ( !lastList ) { TQWidgetList l; - l.setAutoDelete( FALSE ); + l.setAutoDelete( false ); lists.append( l ); lastList = &lists.last(); } @@ -170,7 +170,7 @@ void Layout::widgetDestroyed() bool Layout::prepareLayout( bool &needMove, bool &needReparent ) { if ( !widgets.count() ) - return FALSE; + return false; for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) w->raise(); needMove = !layoutBase; @@ -186,7 +186,7 @@ bool Layout::prepareLayout( bool &needMove, bool &needReparent ) WidgetFactory::deleteLayout( layoutBase ); } - return TRUE; + return true; } void Layout::finishLayout( bool needMove, TQLayout *layout ) @@ -221,7 +221,7 @@ void Layout::undoLayout() it.key()->reparent( WidgetFactory::containerOfWidget( parent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) ); it.key()->resize( ( *it ).size() ); } - formWindow->selectWidget( layoutBase, FALSE ); + formWindow->selectWidget( layoutBase, false ); WidgetFactory::deleteLayout( layoutBase ); if ( parent != layoutBase && !::tqt_cast<TQMainWindow*>(layoutBase) ) { layoutBase->hide(); @@ -255,7 +255,7 @@ void Layout::breakLayout() for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( needReparent ) w->reparent( layoutBase->parentWidget(), 0, - layoutBase->pos() + w->pos(), TRUE ); + layoutBase->pos() + w->pos(), true ); if ( needResize ) { TQMap<TQWidget*, TQRect>::Iterator it = rects.find( w ); if ( it != rects.end() ) @@ -322,7 +322,7 @@ void HorizontalLayout::doLayout() for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( needReparent && w->parent() != layoutBase ) - w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); + w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false ); if ( !useSplitter ) { if ( qstrcmp( w->className(), "Spacer" ) == 0 ) layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); @@ -386,7 +386,7 @@ void VerticalLayout::doLayout() for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( needReparent && w->parent() != layoutBase ) - w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); + w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false ); if ( !useSplitter ) { if ( qstrcmp( w->className(), "Spacer" ) == 0 ) layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); @@ -502,10 +502,10 @@ bool Grid::isWidgetStartCol( int c ) const int r; for ( r = 0; r < nrows; r++ ) { if ( cell( r, c ) && ( (c==0) || (cell( r, c) != cell( r, c-1) )) ) { - return TRUE; + return true; } } - return FALSE; + return false; } bool Grid::isWidgetEndCol( int c ) const @@ -513,9 +513,9 @@ bool Grid::isWidgetEndCol( int c ) const int r; for ( r = 0; r < nrows; r++ ) { if ( cell( r, c ) && ((c == ncols-1) || (cell( r, c) != cell( r, c+1) )) ) - return TRUE; + return true; } - return FALSE; + return false; } bool Grid::isWidgetStartRow( int r ) const @@ -523,9 +523,9 @@ bool Grid::isWidgetStartRow( int r ) const int c; for ( c = 0; c < ncols; c++ ) { if ( cell( r, c ) && ( (r==0) || (cell( r, c) != cell( r-1, c) )) ) - return TRUE; + return true; } - return FALSE; + return false; } bool Grid::isWidgetEndRow( int r ) const @@ -533,9 +533,9 @@ bool Grid::isWidgetEndRow( int r ) const int c; for ( c = 0; c < ncols; c++ ) { if ( cell( r, c ) && ((r == nrows-1) || (cell( r, c) != cell( r+1, c) )) ) - return TRUE; + return true; } - return FALSE; + return false; } @@ -543,7 +543,7 @@ bool Grid::isWidgetTopLeft( int r, int c ) const { TQWidget* w = cell( r, c ); if ( !w ) - return FALSE; + return false; return ( !r || cell( r-1, c) != w ) && (!c || cell( r, c-1) != w); } @@ -684,16 +684,16 @@ void Grid::merge() { int r,c; for ( c = 0; c < ncols; c++ ) - cols[c] = FALSE; + cols[c] = false; for ( r = 0; r < nrows; r++ ) - rows[r] = FALSE; + rows[r] = false; for ( c = 0; c < ncols; c++ ) { for ( r = 0; r < nrows; r++ ) { if ( isWidgetTopLeft( r, c ) ) { - rows[r] = TRUE; - cols[c] = TRUE; + rows[r] = true; + cols[c] = true; } } } @@ -725,11 +725,11 @@ bool Grid::locateWidget( TQWidget* w, int& row, int& col, int& rowspan, int & co if ( cols[ c2] ) colspan++; } - return TRUE; + return true; } } } - return FALSE; + return false; } @@ -764,7 +764,7 @@ void GridLayout::doLayout() for ( w = widgets.first(); w; w = widgets.next() ) { if ( grid->locateWidget( w, r, c, rs, cs) ) { if ( needReparent && w->parent() != layoutBase ) - w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); + w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false ); if ( rs * cs == 1 ) { layout->addWidget( w, r, c, ::tqt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 ); } else { @@ -872,10 +872,10 @@ void GridLayout::buildGrid() Spacer::Spacer( TQWidget *parent, const char *name ) : TQWidget( parent, name, WMouseNoMask ), - orient( Vertical ), interactive(TRUE), sh( TQSize(20,20) ) + orient( Vertical ), interactive(true), sh( TQSize(20,20) ) { setSizeType( Expanding ); - setAutoMask( TRUE ); + setAutoMask( true ); } void Spacer::paintEvent( TQPaintEvent * ) diff --git a/tools/designer/designer/layout.h b/tools/designer/designer/layout.h index 129e1f1f0..38622ff9b 100644 --- a/tools/designer/designer/layout.h +++ b/tools/designer/designer/layout.h @@ -50,7 +50,7 @@ class Layout : public TQObject TQ_OBJECT public: - Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE ); + Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = true, bool splitter = false ); virtual ~Layout() {} virtual void doLayout() = 0; @@ -81,7 +81,7 @@ protected slots: class HorizontalLayout : public Layout { public: - HorizontalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE ); + HorizontalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = true, bool splitter = false ); void doLayout(); @@ -93,7 +93,7 @@ protected: class VerticalLayout : public Layout { public: - VerticalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE ); + VerticalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = true, bool splitter = false ); void doLayout(); @@ -107,7 +107,7 @@ class Grid; class GridLayout : public Layout { public: - GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup = TRUE ); + GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup = true ); ~GridLayout(); void doLayout(); diff --git a/tools/designer/designer/listboxdnd.cpp b/tools/designer/designer/listboxdnd.cpp index f4bf73051..67cf1b4d1 100644 --- a/tools/designer/designer/listboxdnd.cpp +++ b/tools/designer/designer/listboxdnd.cpp @@ -42,7 +42,7 @@ class ListBoxItemDrag : public TQStoredDrag { public: - ListBoxItemDrag( ListBoxItemList & items, bool sendPtr = FALSE, TQListBox * parent = 0, const char * name = 0 ); + ListBoxItemDrag( ListBoxItemList & items, bool sendPtr = false, TQListBox * parent = 0, const char * name = 0 ); ~ListBoxItemDrag() {}; static bool canDecode( TQDragMoveEvent * event ); static bool decode( TQDropEvent * event, TQListBox * parent, TQListBoxItem * insertPoint ); @@ -55,7 +55,7 @@ ListBoxDnd::ListBoxDnd( TQListBox * eventSource, const char * name ) void ListBoxDnd::confirmDrop( TQListBoxItem * ) { - dropConfirmed = TRUE; + dropConfirmed = true; } bool ListBoxDnd::dropEvent( TQDropEvent * event ) @@ -65,7 +65,7 @@ bool ListBoxDnd::dropEvent( TQDropEvent * event ) if ( dMode & NullDrop ) { // combined with Move, a NullDrop will delete an item event->accept(); emit dropped( 0 ); // a NullDrop - return TRUE; + return true; } TQPoint pos = event->pos(); @@ -81,9 +81,9 @@ bool ListBoxDnd::dropEvent( TQDropEvent * event ) } line->hide(); - dragInside = FALSE; + dragInside = false; - return TRUE; + return true; } bool ListBoxDnd::mouseMoveEvent( TQMouseEvent * event ) @@ -111,15 +111,15 @@ bool ListBoxDnd::mouseMoveEvent( TQMouseEvent * event ) if ( dMode & Move ) { if ( dropConfirmed ) { // ###FIX: memleak ? in internal mode, only pointers are transfered... - //list.setAutoDelete( TRUE ); + //list.setAutoDelete( true ); list.clear(); - dropConfirmed = FALSE; + dropConfirmed = false; } insertList( list ); // "show" items } } } - return FALSE; + return false; } int ListBoxDnd::buildList( ListBoxItemList & list ) @@ -127,7 +127,7 @@ int ListBoxDnd::buildList( ListBoxItemList & list ) TQListBoxItem * i = ((TQListBox *)src)->firstItem(); while ( i ) { if ( i->isSelected() ) { - ((TQListBox *)src)->setSelected( i, FALSE ); + ((TQListBox *)src)->setSelected( i, false ); list.append( i ); } i = i->next(); @@ -306,7 +306,7 @@ bool ListBoxItemDrag::decode( TQDropEvent * event, TQListBox * parent, TQListBox } - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/tools/designer/designer/listboxeditorimpl.cpp b/tools/designer/designer/listboxeditorimpl.cpp index e1bfb45a8..df2c97bb7 100644 --- a/tools/designer/designer/listboxeditorimpl.cpp +++ b/tools/designer/designer/listboxeditorimpl.cpp @@ -46,16 +46,16 @@ #include <ntqcheckbox.h> ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) - : ListBoxEditorBase( parent, 0, TRUE ), formwindow( fw ) + : ListBoxEditorBase( parent, 0, true ), formwindow( fw ) { connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); listbox = (TQListBox*)editWidget; itemText->setText( "" ); - itemText->setEnabled( FALSE ); + itemText->setEnabled( false ); itemPixmap->setText( "" ); - itemChoosePixmap->setEnabled( FALSE ); - itemDeletePixmap->setEnabled( FALSE ); + itemChoosePixmap->setEnabled( false ); + itemDeletePixmap->setEnabled( false ); TQListBoxItem *i = 0; for ( i = listbox->firstItem(); i; i = i->next() ) { @@ -93,7 +93,7 @@ void ListBoxEditor::insertNewItem() { TQListBoxItem *i = new TQListBoxText( preview, tr("New Item") ); preview->setCurrentItem( i ); - preview->setSelected( i, TRUE ); + preview->setSelected( i, true ); itemText->setFocus(); itemText->selectAll(); } @@ -102,32 +102,32 @@ void ListBoxEditor::deleteCurrentItem() { delete preview->item( preview->currentItem() ); if ( preview->currentItem() != -1 ) - preview->setSelected( preview->currentItem(), TRUE ); + preview->setSelected( preview->currentItem(), true ); } void ListBoxEditor::currentItemChanged( TQListBoxItem *i ) { - itemText->blockSignals( TRUE ); + itemText->blockSignals( true ); itemText->setText( "" ); itemPixmap->setText( "" ); - itemText->blockSignals( FALSE ); + itemText->blockSignals( false ); if ( !i ) { - itemText->setEnabled( FALSE ); - itemChoosePixmap->setEnabled( FALSE ); - itemDeletePixmap->setEnabled( FALSE ); + itemText->setEnabled( false ); + itemChoosePixmap->setEnabled( false ); + itemDeletePixmap->setEnabled( false ); return; } - itemText->blockSignals( TRUE ); - itemText->setEnabled( TRUE ); - itemChoosePixmap->setEnabled( TRUE ); + itemText->blockSignals( true ); + itemText->setEnabled( true ); + itemChoosePixmap->setEnabled( true ); itemDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() ); itemText->setText( i->text() ); if ( i->pixmap() ) itemPixmap->setPixmap( *i->pixmap() ); - itemText->blockSignals( FALSE ); + itemText->blockSignals( false ); } void ListBoxEditor::currentTextChanged( const TQString &txt ) @@ -135,12 +135,12 @@ void ListBoxEditor::currentTextChanged( const TQString &txt ) if ( preview->currentItem() == -1 ) return; - preview->blockSignals( TRUE ); + preview->blockSignals( true ); if ( preview->item( preview->currentItem() )->pixmap() ) preview->changeItem( *preview->item( preview->currentItem() )->pixmap(), txt, preview->currentItem() ); else preview->changeItem( txt, preview->currentItem() ); - preview->blockSignals( FALSE ); + preview->blockSignals( false ); } void ListBoxEditor::okClicked() @@ -188,7 +188,7 @@ void ListBoxEditor::choosePixmap() TQString txt = preview->item( preview->currentItem() )->text(); preview->changeItem( pix, txt, preview->currentItem() ); - itemDeletePixmap->setEnabled( TRUE ); + itemDeletePixmap->setEnabled( true ); } void ListBoxEditor::moveItemUp() @@ -246,5 +246,5 @@ void ListBoxEditor::deletePixmap() TQListBoxItem *i = preview->item( preview->currentItem() ); preview->changeItem( i->text(), preview->currentItem() ); - itemDeletePixmap->setEnabled( FALSE ); + itemDeletePixmap->setEnabled( false ); } diff --git a/tools/designer/designer/listboxrename.cpp b/tools/designer/designer/listboxrename.cpp index 9cf1e4e38..0a64a41c7 100644 --- a/tools/designer/designer/listboxrename.cpp +++ b/tools/designer/designer/listboxrename.cpp @@ -47,13 +47,13 @@ public: ListBoxRename::ListBoxRename( TQListBox * eventSource, const char * name ) : TQObject( eventSource, name ), - clickedItem( 0 ), activity( FALSE ) + clickedItem( 0 ), activity( false ) { src = eventSource; src->installEventFilter( this ); ed = new TQLineEdit( src->viewport() ); ed->hide(); - ed->setFrame( FALSE ); + ed->setFrame( false ); TQObject::connect( ed, TQ_SIGNAL( returnPressed() ), this, TQ_SLOT( renameClickedItem() ) ); @@ -71,9 +71,9 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event ) clickedItem->isSelected() && (clickedItem == src->itemAt( pos )) ) { TQTimer::singleShot( 500, this, TQ_SLOT( showLineEdit() ) ); - activity = FALSE; // no drags or clicks for 500 ms before we start the renaming + activity = false; // no drags or clicks for 500 ms before we start the renaming } else { // new item clicked - activity = TRUE; + activity = true; clickedItem = src->itemAt( pos ); ed->hide(); } @@ -83,7 +83,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event ) case TQEvent::MouseMove: if ( ((TQMouseEvent *) event)->state() & TQt::LeftButton ) { - activity = TRUE; // drag + activity = true; // drag } break; @@ -93,7 +93,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event ) case TQt::Key_F2: - activity = FALSE; + activity = false; clickedItem = src->item( src->currentItem() ); showLineEdit(); break; @@ -101,7 +101,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event ) case TQt::Key_Escape: if ( !ed->isHidden() ) { hideLineEdit(); // abort rename - return TRUE; + return true; } break; @@ -111,7 +111,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event ) case TQt::Key_PageDown: if ( !ed->isHidden() ) - return TRUE; // Filter out the keystrokes + return true; // Filter out the keystrokes break; } @@ -130,7 +130,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event ) break; } - return FALSE; + return false; } void ListBoxRename::showLineEdit() diff --git a/tools/designer/designer/listdnd.cpp b/tools/designer/designer/listdnd.cpp index 137237ad7..dfe5f8e54 100644 --- a/tools/designer/designer/listdnd.cpp +++ b/tools/designer/designer/listdnd.cpp @@ -37,10 +37,10 @@ ListDnd::ListDnd( TQScrollView * eventSource, const char * name ) : TQObject( eventSource, name ), - dragInside( FALSE ), dragDelete( TRUE ), dropConfirmed( FALSE ), dMode( Both ) + dragInside( false ), dragDelete( true ), dropConfirmed( false ), dMode( Both ) { src = eventSource; - src->setAcceptDrops( TRUE ); + src->setAcceptDrops( true ); src->installEventFilter( this ); src->viewport()->installEventFilter( this ); @@ -78,14 +78,14 @@ bool ListDnd::eventFilter( TQObject *, TQEvent * event ) default: break; } - return FALSE; + return false; } bool ListDnd::dragEnterEvent( TQDragEnterEvent * event ) { if ( dMode == None ) { - return TRUE; + return true; } bool ok = ( ( ( dMode & Both ) == Both ) || @@ -94,20 +94,20 @@ bool ListDnd::dragEnterEvent( TQDragEnterEvent * event ) if ( ok && canDecode( event ) ) { event->accept(); - dragInside = TRUE; + dragInside = true; if ( !( dMode & NullDrop ) ) { updateLine( event->pos() ); line->show(); } } - return TRUE; + return true; } bool ListDnd::dragLeaveEvent( TQDragLeaveEvent * ) { - dragInside = FALSE; + dragInside = false; line->hide(); - return TRUE; + return true; } bool ListDnd::dragMoveEvent( TQDragMoveEvent * event ) @@ -115,26 +115,26 @@ bool ListDnd::dragMoveEvent( TQDragMoveEvent * event ) if ( dragInside && dMode && !( dMode & NullDrop ) ) { updateLine( event->pos() ); } - return TRUE; + return true; } bool ListDnd::dropEvent( TQDropEvent * ) { // do nothing - return FALSE; + return false; } bool ListDnd::mousePressEvent( TQMouseEvent * event ) { if ( event->button() == LeftButton ) mousePressPos = event->pos(); - return FALSE; + return false; } bool ListDnd::mouseMoveEvent( TQMouseEvent * ) { // do nothing - return FALSE; + return false; } void ListDnd::updateLine( const TQPoint & ) @@ -145,5 +145,5 @@ void ListDnd::updateLine( const TQPoint & ) bool ListDnd::canDecode( TQDragEnterEvent * ) { // do nothing - return FALSE; + return false; } diff --git a/tools/designer/designer/listeditor.ui.h b/tools/designer/designer/listeditor.ui.h index 3092706d5..bdbab2fde 100644 --- a/tools/designer/designer/listeditor.ui.h +++ b/tools/designer/designer/listeditor.ui.h @@ -22,14 +22,14 @@ void ListEditor::setList( const TQStringList &l ) for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { i = new TQListViewItem( listview, i ); i->setText( 0, *it ); - i->setRenameEnabled( 0, TRUE ); + i->setRenameEnabled( 0, true ); } } void ListEditor::addItem() { TQListViewItem *i = new TQListViewItem( listview, listview->lastItem() ); - i->setRenameEnabled( 0, TRUE ); + i->setRenameEnabled( 0, true ); tqApp->processEvents(); i->startRename( 0 ); } diff --git a/tools/designer/designer/listviewdnd.cpp b/tools/designer/designer/listviewdnd.cpp index a7b831d15..953706d6f 100644 --- a/tools/designer/designer/listviewdnd.cpp +++ b/tools/designer/designer/listviewdnd.cpp @@ -55,7 +55,7 @@ ListViewDnd::ListViewDnd( TQListView * eventSource, const char * name ) void ListViewDnd::confirmDrop( TQListViewItem * ) { - dropConfirmed = TRUE; + dropConfirmed = true; } bool ListViewDnd::dropEvent( TQDropEvent * event ) @@ -65,7 +65,7 @@ bool ListViewDnd::dropEvent( TQDropEvent * event ) if ( dMode & NullDrop ) { // combined with Move, a NullDrop will delete an item event->accept(); emit dropped( 0 ); // a NullDrop - return TRUE; + return true; } TQPoint pos = event->pos(); @@ -92,9 +92,9 @@ bool ListViewDnd::dropEvent( TQDropEvent * event ) } line->hide(); - dragInside = FALSE; + dragInside = false; - return TRUE; + return true; } bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event ) @@ -112,7 +112,7 @@ bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event ) if ( dMode & Move ) { disabledItems = list; - setVisibleItems( FALSE ); + setVisibleItems( false ); } dragobject->dragCopy(); @@ -123,29 +123,29 @@ bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event ) // Shouldn't autoDelete handle this? for( list.first(); list.current(); list.next() ) delete list.current(); - dropConfirmed = FALSE; + dropConfirmed = false; } else { // Reenable disabled items since // drag'n'drop was aborted - setVisibleItems( TRUE ); + setVisibleItems( true ); } disabledItems.clear(); } } } - return FALSE; + return false; } int ListViewDnd::buildFlatList( ListViewItemList & list ) { - bool addKids = FALSE; + bool addKids = false; TQListViewItem *nextSibling = 0; TQListViewItem *nextParent = 0; TQListViewItemIterator it = ((TQListView *)src)->firstChild(); for ( ; *it; it++ ) { // Hit the nextSibling, turn of child processing if ( (*it) == nextSibling ) - addKids = FALSE; + addKids = false; if ( (*it)->isSelected() ) { if ( (*it)->childCount() == 0 ) { @@ -155,7 +155,7 @@ int ListViewDnd::buildFlatList( ListViewItemList & list ) // Children processing not set, so set it // Also find the item were we shall quit // processing children...if any such item - addKids = TRUE; + addKids = true; nextSibling = (*it)->nextSibling(); nextParent = (*it)->parent(); while ( nextParent && !nextSibling ) { @@ -310,15 +310,15 @@ bool ListViewItemDrag::decode( TQDropEvent * event, TQListView * parent, TQListV for( int i = 0; i < count; i++ ) { if ( itemParent ) { insertPoint = new TQListViewItem( itemParent, insertPoint ); - itemParent->setOpen( TRUE ); + itemParent->setOpen( true ); } else { // No parent for insertPoint, use TQListView insertPoint = new TQListViewItem( parent, insertPoint ); } stream >> *insertPoint; } - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/tools/designer/designer/listvieweditorimpl.cpp b/tools/designer/designer/listvieweditorimpl.cpp index b8cef9064..2ffe895c1 100644 --- a/tools/designer/designer/listvieweditorimpl.cpp +++ b/tools/designer/designer/listvieweditorimpl.cpp @@ -52,13 +52,13 @@ #include <ntqptrstack.h> ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw ) - : ListViewEditorBase( parent, 0, TRUE ), listview( lv ), formwindow( fw ) + : ListViewEditorBase( parent, 0, true ), listview( lv ), formwindow( fw ) { connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); - itemText->setEnabled( FALSE ); - itemChoosePixmap->setEnabled( FALSE ); - itemDeletePixmap->setEnabled( FALSE ); - itemColumn->setEnabled( FALSE ); + itemText->setEnabled( false ); + itemChoosePixmap->setEnabled( false ); + itemDeletePixmap->setEnabled( false ); + itemColumn->setEnabled( false ); setupColumns(); PopulateListViewCommand::transferItems( listview, itemsPreview ); @@ -70,7 +70,7 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw if ( itemsPreview->firstChild() ) { itemsPreview->setCurrentItem( itemsPreview->firstChild() ); - itemsPreview->setSelected( itemsPreview->firstChild(), TRUE ); + itemsPreview->setSelected( itemsPreview->firstChild(), true ); } // Clamp on drag and drop to TQListView @@ -82,7 +82,7 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw // Enable rename for all TQListViewItems TQListViewItemIterator it = ((TQListView *)itemsPreview)->firstChild(); for ( ; *it; it++ ) - (*it)->setRenameEnabled( 0, TRUE ); + (*it)->setRenameEnabled( 0, true ); // Connect listview signal to signal-relay TQObject::connect( itemsPreview, @@ -166,7 +166,7 @@ void ListViewEditor::columnDownClicked() colPreview->insertItem( i, below ); colPreview->setCurrentItem( i ); - colPreview->setSelected( i, TRUE ); + colPreview->setSelected( i, true ); } void ListViewEditor::columnPixmapChosen() @@ -185,15 +185,15 @@ void ListViewEditor::columnPixmapChosen() return; c->pixmap = pix; - colPreview->blockSignals( TRUE ); + colPreview->blockSignals( true ); if ( !c->pixmap.isNull() ) colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) ); else colPreview->changeItem( c->text, colPreview->index( c->item ) ); c->item = colPreview->item( colPreview->currentItem() ); colPixmap->setPixmap( c->pixmap ); - colPreview->blockSignals( FALSE ); - colDeletePixmap->setEnabled( TRUE ); + colPreview->blockSignals( false ); + colDeletePixmap->setEnabled( true ); } void ListViewEditor::columnPixmapDeleted() @@ -203,15 +203,15 @@ void ListViewEditor::columnPixmapDeleted() return; c->pixmap = TQPixmap(); - colPreview->blockSignals( TRUE ); + colPreview->blockSignals( true ); if ( !c->pixmap.isNull() ) colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) ); else colPreview->changeItem( c->text, colPreview->index( c->item ) ); c->item = colPreview->item( colPreview->currentItem() ); colPixmap->setText( "" ); - colPreview->blockSignals( FALSE ); - colDeletePixmap->setEnabled( FALSE ); + colPreview->blockSignals( false ); + colDeletePixmap->setEnabled( false ); } void ListViewEditor::columnResizable( bool b ) @@ -229,13 +229,13 @@ void ListViewEditor::columnTextChanged( const TQString &txt ) return; c->text = txt; - colPreview->blockSignals( TRUE ); + colPreview->blockSignals( true ); if ( !c->pixmap.isNull() ) colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) ); else colPreview->changeItem( c->text, colPreview->index( c->item ) ); c->item = colPreview->item( colPreview->currentItem() ); - colPreview->blockSignals( FALSE ); + colPreview->blockSignals( false ); } void ListViewEditor::columnUpClicked() @@ -251,33 +251,33 @@ void ListViewEditor::columnUpClicked() colPreview->insertItem( above, i ); colPreview->setCurrentItem( i ); - colPreview->setSelected( i, TRUE ); + colPreview->setSelected( i, true ); } void ListViewEditor::currentColumnChanged( TQListBoxItem *i ) { Column *c = findColumn( i ); if ( !i || !c ) { - colText->setEnabled( FALSE ); - colPixmap->setEnabled( FALSE ); - colDeletePixmap->setEnabled( FALSE ); - colText->blockSignals( TRUE ); + colText->setEnabled( false ); + colPixmap->setEnabled( false ); + colDeletePixmap->setEnabled( false ); + colText->blockSignals( true ); colText->setText( "" ); - colText->blockSignals( FALSE ); - colClickable->setEnabled( FALSE ); - colResizable->setEnabled( FALSE ); + colText->blockSignals( false ); + colClickable->setEnabled( false ); + colResizable->setEnabled( false ); return; } - colText->setEnabled( TRUE ); - colPixmap->setEnabled( TRUE ); + colText->setEnabled( true ); + colPixmap->setEnabled( true ); colDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() ); - colClickable->setEnabled( TRUE ); - colResizable->setEnabled( TRUE ); + colClickable->setEnabled( true ); + colResizable->setEnabled( true ); - colText->blockSignals( TRUE ); + colText->blockSignals( true ); colText->setText( c->text ); - colText->blockSignals( FALSE ); + colText->blockSignals( false ); if ( !c->pixmap.isNull() ) colPixmap->setPixmap( c->pixmap ); else @@ -291,15 +291,15 @@ void ListViewEditor::newColumnClicked() Column col; col.text = tr( "New Column" ); col.pixmap = TQPixmap(); - col.clickable = TRUE; - col.resizable = TRUE; + col.clickable = true; + col.resizable = true; if ( !col.pixmap.isNull() ) col.item = new TQListBoxPixmap( colPreview, col.pixmap, col.text ); else col.item = new TQListBoxText( colPreview, col.text ); columns.append( col ); colPreview->setCurrentItem( col.item ); - colPreview->setSelected( col.item, TRUE ); + colPreview->setSelected( col.item, true ); } void ListViewEditor::deleteColumnClicked() @@ -317,40 +317,40 @@ void ListViewEditor::deleteColumnClicked() } if ( colPreview->currentItem() != -1 ) - colPreview->setSelected( colPreview->currentItem(), TRUE ); + colPreview->setSelected( colPreview->currentItem(), true ); } void ListViewEditor::currentItemChanged( TQListViewItem *i ) { if ( !i ) { - itemText->setEnabled( FALSE ); - itemChoosePixmap->setEnabled( FALSE ); - itemDeletePixmap->setEnabled( FALSE ); - itemColumn->setEnabled( FALSE ); + itemText->setEnabled( false ); + itemChoosePixmap->setEnabled( false ); + itemDeletePixmap->setEnabled( false ); + itemColumn->setEnabled( false ); return; } - itemText->setEnabled( TRUE ); - itemChoosePixmap->setEnabled( TRUE ); + itemText->setEnabled( true ); + itemChoosePixmap->setEnabled( true ); itemDeletePixmap->setEnabled( i->pixmap( itemColumn->value() ) && !i->pixmap( itemColumn->value() )->isNull() ); - itemColumn->setEnabled( TRUE ); + itemColumn->setEnabled( true ); displayItem( i, itemColumn->value() ); } void ListViewEditor::displayItem( TQListViewItem *i, int col ) { - itemText->blockSignals( TRUE ); + itemText->blockSignals( true ); itemText->setText( i->text( col ) ); - itemText->blockSignals( FALSE ); + itemText->blockSignals( false ); - itemPixmap->blockSignals( TRUE ); + itemPixmap->blockSignals( true ); if ( i->pixmap( col ) ) itemPixmap->setPixmap( *i->pixmap( col ) ); else itemPixmap->setText( "" ); - itemPixmap->blockSignals( FALSE ); + itemPixmap->blockSignals( false ); } void ListViewEditor::itemColChanged( int col ) @@ -372,7 +372,7 @@ void ListViewEditor::itemDeleteClicked() delete i; if ( itemsPreview->firstChild() ) { itemsPreview->setCurrentItem( itemsPreview->firstChild() ); - itemsPreview->setSelected( itemsPreview->firstChild(), TRUE ); + itemsPreview->setSelected( itemsPreview->firstChild(), true ); } } @@ -402,9 +402,9 @@ void ListViewEditor::itemNewClicked() { TQListViewItem *item = new TQListViewItem( itemsPreview ); item->setText( 0, "Item" ); - item->setRenameEnabled( 0, TRUE ); + item->setRenameEnabled( 0, true ); itemsPreview->setCurrentItem( item ); - itemsPreview->setSelected( item, TRUE ); + itemsPreview->setSelected( item, true ); itemText->setFocus(); itemText->selectAll(); } @@ -415,14 +415,14 @@ void ListViewEditor::itemNewSubClicked() TQListViewItem *item = 0; if ( parent ) { item = new TQListViewItem( parent ); - parent->setOpen( TRUE ); + parent->setOpen( true ); } else { item = new TQListViewItem( itemsPreview ); } item->setText( 0, "Subitem" ); - item->setRenameEnabled( 0, TRUE ); + item->setRenameEnabled( 0, true ); itemsPreview->setCurrentItem( item ); - itemsPreview->setSelected( item, TRUE ); + itemsPreview->setSelected( item, true ); } void ListViewEditor::itemPixmapChoosen() @@ -442,7 +442,7 @@ void ListViewEditor::itemPixmapChoosen() i->setPixmap( itemColumn->value(), TQPixmap( pix ) ); itemPixmap->setPixmap( pix ); - itemDeletePixmap->setEnabled( TRUE ); + itemDeletePixmap->setEnabled( true ); } void ListViewEditor::itemPixmapDeleted() @@ -453,7 +453,7 @@ void ListViewEditor::itemPixmapDeleted() i->setPixmap( itemColumn->value(), TQPixmap() ); itemPixmap->setText( "" ); - itemDeletePixmap->setEnabled( FALSE ); + itemDeletePixmap->setEnabled( false ); } void ListViewEditor::itemTextChanged( const TQString &txt ) @@ -523,7 +523,7 @@ void ListViewEditor::itemRightClicked() } itemsPreview->setCurrentItem( other ); - itemsPreview->setSelected( other, TRUE ); + itemsPreview->setSelected( other, true ); } void ListViewEditor::itemLeftClicked() @@ -563,7 +563,7 @@ void ListViewEditor::itemLeftClicked() } itemsPreview->setCurrentItem( other ); - itemsPreview->setSelected( other, TRUE ); + itemsPreview->setSelected( other, true ); } void ListViewEditor::setupColumns() @@ -584,10 +584,10 @@ void ListViewEditor::setupColumns() columns.append( col ); } - colText->setEnabled( FALSE ); - colPixmap->setEnabled( FALSE ); - colClickable->setEnabled( FALSE ); - colResizable->setEnabled( FALSE ); + colText->setEnabled( false ); + colPixmap->setEnabled( false ); + colClickable->setEnabled( false ); + colResizable->setEnabled( false ); if ( colPreview->firstItem() ) colPreview->setCurrentItem( colPreview->firstItem() ); @@ -636,15 +636,15 @@ void ListViewEditor::initTabPage( const TQString &page ) if ( page == tr( "&Items" ) ) { setupItems(); if ( numColumns == 0 ) { - itemNew->setEnabled( FALSE ); - itemNewSub->setEnabled( FALSE ); - itemText->setEnabled( FALSE ); - itemChoosePixmap->setEnabled( FALSE ); - itemDeletePixmap->setEnabled( FALSE ); - itemColumn->setEnabled( FALSE ); + itemNew->setEnabled( false ); + itemNewSub->setEnabled( false ); + itemText->setEnabled( false ); + itemChoosePixmap->setEnabled( false ); + itemDeletePixmap->setEnabled( false ); + itemColumn->setEnabled( false ); } else { - itemNew->setEnabled( TRUE ); - itemNewSub->setEnabled( TRUE ); + itemNew->setEnabled( true ); + itemNewSub->setEnabled( true ); } } } diff --git a/tools/designer/designer/mainwindow.cpp b/tools/designer/designer/mainwindow.cpp index ba2dfb9e4..ec0b1d19c 100644 --- a/tools/designer/designer/mainwindow.cpp +++ b/tools/designer/designer/mainwindow.cpp @@ -120,7 +120,7 @@ #include <ntqassistantclient.h> #include <stdlib.h> -static bool mblockNewForms = FALSE; +static bool mblockNewForms = false; extern TQMap<TQWidget*, TQString> *qwf_forms; extern TQString *qwf_language; extern bool qwf_execute_code; @@ -152,9 +152,9 @@ static TQString textNoAccel( const TQString& text) TQ_EXPORT MainWindow::MainWindow( bool asClient, bool single, const TQString &plgDir ) : TQMainWindow( 0, "designer_mainwindow", WType_TopLevel | (single ? 0 : WDestructiveClose) | WGroupLeader ), - grd( 10, 10 ), sGrid( TRUE ), snGrid( TRUE ), restoreConfig( TRUE ), splashScreen( TRUE ), + grd( 10, 10 ), sGrid( true ), snGrid( true ), restoreConfig( true ), splashScreen( true ), fileFilter( tr( "TQt User-Interface Files (*.ui)" ) ), client( asClient ), - previewing( FALSE ), databaseAutoEdit( FALSE ), autoSaveEnabled( FALSE ), autoSaveInterval( 1800 ) + previewing( false ), databaseAutoEdit( false ), autoSaveEnabled( false ), autoSaveInterval( 1800 ) { extern void qInitImages_tqtdesignercore(); qInitImages_tqtdesignercore(); @@ -162,16 +162,16 @@ TQ_EXPORT MainWindow::MainWindow( bool asClient, bool single, const TQString &pl self = this; setPluginDirectory( plgDir ); customWidgetToolBar = customWidgetToolBar2 = 0; - guiStuffVisible = TRUE; - editorsReadOnly = FALSE; - sSignalHandlers = TRUE; + guiStuffVisible = true; + editorsReadOnly = false; + sSignalHandlers = true; init_colors(); - shStartDialog = TRUE; + shStartDialog = true; desInterface = new DesignerInterfaceImpl( this ); desInterface->addRef(); - inDebugMode = FALSE; - savePluginPaths = FALSE; + inDebugMode = false; + savePluginPaths = false; updateFunctionsTimer = new TQTimer( this ); connect( updateFunctionsTimer, TQ_SIGNAL( timeout() ), @@ -237,8 +237,8 @@ TQ_EXPORT MainWindow::MainWindow( bool asClient, bool single, const TQString &pl connect( this, TQ_SIGNAL( projectChanged() ), this, TQ_SLOT( emitProjectSignals() ) ); connect( this, TQ_SIGNAL( hasActiveWindow(bool) ), this, TQ_SLOT( emitProjectSignals() ) ); - emit hasActiveForm( FALSE ); - emit hasActiveWindow( FALSE ); + emit hasActiveForm( false ); + emit hasActiveWindow( false ); lastPressWidget = 0; tqApp->installEventFilter( this ); @@ -250,30 +250,30 @@ TQ_EXPORT MainWindow::MainWindow( bool asClient, bool single, const TQString &pl connect( tqApp->clipboard(), TQ_SIGNAL( dataChanged() ), this, TQ_SLOT( clipboardChanged() ) ); clipboardChanged(); - layoutChilds = FALSE; - layoutSelected = FALSE; - breakLayout = FALSE; - backPix = TRUE; + layoutChilds = false; + layoutSelected = false; + breakLayout = false; + backPix = true; set_splash_status( "Loading User Settings..." ); readConfig(); // hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties) - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), this, 0, FALSE ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), this, 0, false ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), this, 0, false ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLabel" ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLabel" ), this, 0, false ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQTabWidget" ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQTabWidget" ), this, 0, false ); delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this, 0, FALSE ); + w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this, 0, false ); delete w; - setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE ); + setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), false ); actionEditor->parentWidget()->hide(); assistant = new TQAssistantClient( assistantPath(), this ); - statusBar()->setSizeGripEnabled( TRUE ); + statusBar()->setSizeGripEnabled( true ); set_splash_status( "Initialization Done." ); if ( shStartDialog ) TQTimer::singleShot( 0, this, TQ_SLOT( showStartDialog() )); @@ -330,11 +330,11 @@ void MainWindow::setupMDI() vbox->setLineWidth( 1 ); qworkspace = new TQWorkspace( vbox ); qworkspace->setPaletteBackgroundPixmap( TQPixmap::fromMimeSource( "designer_background.png" ) ); - qworkspace->setScrollBarsEnabled( TRUE ); + qworkspace->setScrollBarsEnabled( true ); connect( qworkspace, TQ_SIGNAL( windowActivated( TQWidget * ) ), this, TQ_SLOT( activeWindowChanged( TQWidget * ) ) ); lastActiveFormWindow = 0; - qworkspace->setAcceptDrops( TRUE ); + qworkspace->setAcceptDrops( true ); } void MainWindow::setupMenuBar() @@ -345,7 +345,7 @@ void MainWindow::setupMenuBar() void MainWindow::setupPropertyEditor() { TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); + dw->setResizeEnabled( true ); dw->setCloseMode( TQDockWindow::Always ); propertyEditor = new PropertyEditor( dw ); addToolBar( dw, TQt::DockRight ); @@ -374,7 +374,7 @@ void MainWindow::setupPropertyEditor() void MainWindow::setupOutputWindow() { TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); + dw->setResizeEnabled( true ); dw->setCloseMode( TQDockWindow::Always ); addToolBar( dw, TQt::DockBottom ); oWindow = new OutputWindow( dw ); @@ -388,7 +388,7 @@ void MainWindow::setupHierarchyView() if ( hierarchyView ) return; TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); + dw->setResizeEnabled( true ); dw->setCloseMode( TQDockWindow::Always ); hierarchyView = new HierarchyView( dw ); addToolBar( dw, TQt::DockRight ); @@ -410,7 +410,7 @@ void MainWindow::setupHierarchyView() void MainWindow::setupWorkspace() { TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); + dw->setResizeEnabled( true ); dw->setCloseMode( TQDockWindow::Always ); TQVBox *vbox = new TQVBox( dw ); TQCompletionEdit *edit = new TQCompletionEdit( vbox ); @@ -436,7 +436,7 @@ void MainWindow::setupActionEditor() { TQDockWindow *dw = new TQDockWindow( TQDockWindow::OutsideDock, this, 0 ); addDockWindow( dw, TQt::DockTornOff ); - dw->setResizeEnabled( TRUE ); + dw->setResizeEnabled( true ); dw->setCloseMode( TQDockWindow::Always ); actionEditor = new ActionEditor( dw ); dw->setWidget( actionEditor ); @@ -450,13 +450,13 @@ void MainWindow::setupActionEditor() "these are displayed on toolbar buttons and besides their names in " "menus.</p>" ) ); dw->hide(); - setAppropriate( dw, FALSE ); + setAppropriate( dw, false ); } void MainWindow::setupToolbox() { TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); + dw->setResizeEnabled( true ); dw->setCloseMode( TQDockWindow::Always ); addToolBar( dw, TQt::DockLeft ); toolBox = new TQToolBox( dw ); @@ -464,9 +464,9 @@ void MainWindow::setupToolbox() dw->setFixedExtentWidth( 160 ); dw->setCaption( tr( "Toolbox" ) ); dw->show(); - setDockEnabled( dw, TQt::DockTop, FALSE ); - setDockEnabled( dw, TQt::DockBottom, FALSE ); - commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, FALSE, "Common Widgets" ); + setDockEnabled( dw, TQt::DockTop, false ); + setDockEnabled( dw, TQt::DockBottom, false ); + commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, false, "Common Widgets" ); commonWidgetsToolBar->setFrameStyle( TQFrame::NoFrame ); commonWidgetsToolBar->setOrientation( TQt::Vertical ); commonWidgetsToolBar->setBackgroundMode(PaletteBase); @@ -546,14 +546,14 @@ void MainWindow::runProjectPrecondition() oWindow->clearErrorMessages(); oWindow->clearDebug(); oWindow->showDebugTab(); - previewing = TRUE; + previewing = true; } void MainWindow::runProjectPostcondition( TQObjectList *l ) { - inDebugMode = TRUE; + inDebugMode = true; debuggingForms = *l; - enableAll( FALSE ); + enableAll( false ); for ( SourceEditor *e2 = sourceEditors.first(); e2; e2 = sourceEditors.next() ) { if ( e2->project() == currentProject ) e2->editorInterface()->setMode( EditorInterface::Debugging ); @@ -562,7 +562,7 @@ void MainWindow::runProjectPostcondition( TQObjectList *l ) TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) { - qwf_execute_code = FALSE; + qwf_execute_code = false; for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) e->save(); if ( currentTool() == ORDER_TOOL ) @@ -584,7 +584,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) if ( fw->project() ) { TQStringList::ConstIterator it; for ( it = databases.begin(); it != databases.end(); ++it ) - fw->project()->openDatabase( *it, FALSE ); + fw->project()->openDatabase( *it, false ); } TQApplication::setOverrideCursor( WaitCursor ); @@ -620,9 +620,9 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) w->move( fw->mapToGlobal( TQPoint(0,0) ) ); ((MainWindow*)w )->setWFlags( WDestructiveClose ); - previewing = TRUE; + previewing = true; w->show(); - previewing = FALSE; + previewing = false; TQApplication::restoreOverrideCursor(); return w; } @@ -729,10 +729,10 @@ void MainWindow::previewForm( const TQString & style ) void MainWindow::helpContents() { TQWidget *focusWidget = tqApp->focusWidget(); - bool showClassDocu = TRUE; + bool showClassDocu = true; while ( focusWidget ) { if ( focusWidget->isA( "PropertyList" ) ) { - showClassDocu = FALSE; + showClassDocu = false; break; } focusWidget = focusWidget->parentWidget(); @@ -806,7 +806,7 @@ void MainWindow::helpManual() void MainWindow::helpAbout() { - AboutDialog dlg( this, 0, TRUE ); + AboutDialog dlg( this, 0, true ); if ( singleProjectMode() ) { dlg.aboutPixmap->setText( "" ); dlg.aboutVersion->setText( "" ); @@ -911,7 +911,7 @@ void MainWindow::showProperties( TQObject *o ) void MainWindow::resetTool() { - actionPointerTool->setOn( TRUE ); + actionPointerTool->setOn( true ); } void MainWindow::updateProperties( TQObject * ) @@ -928,7 +928,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ::tqt_cast<PopupMenuEditor*>(o->parent()) ) ) ) { if ( e->type() == TQEvent::Accel && ::tqt_cast<PopupMenuEditor*>(o) ) { - return TRUE; // consume accel events + return true; // consume accel events } else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast<MenuBarEditor*>(o) ) { TQPoint pos = ((TQMouseEvent*)e)->pos(); MenuBarEditor *m = ::tqt_cast<MenuBarEditor*>(o); @@ -957,12 +957,12 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) while ( w ) { if ( ::tqt_cast<PropertyList*>(w) ) break; - w = w->parentWidget( TRUE ); + w = w->parentWidget( true ); } if ( w ) { propertyEditor->propertyList()->showCurrentWhatsThis(); ( (TQKeyEvent*)e )->accept(); - return TRUE; + return true; } } break; @@ -973,7 +973,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) if ( qWorkspace()->activeWindow() && ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (TQKeyEvent*)e )->ignore(); - return TRUE; + return true; } } break; @@ -1026,7 +1026,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) if( e->type() == TQEvent::ContextMenu ) { ( (FormWindow*)w )->handleContextMenu( (TQContextMenuEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); - return TRUE; + return true; } else { ( (FormWindow*)w )->handleMousePress( (TQMouseEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); @@ -1036,7 +1036,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) if ( passiveInteractor ) TQTimer::singleShot( 0, formWindow(), TQ_SLOT( visibilityChanged() ) ); if ( currentTool() == CONNECT_TOOL || currentTool() == BUDDY_TOOL ) - return TRUE; + return true; return !passiveInteractor; case TQEvent::MouseButtonRelease: lastPressWidget = 0; @@ -1065,7 +1065,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) !::tqt_cast<SizeHandle*>(o) && !::tqt_cast<OrderIndicator*>(o) && !::tqt_cast<PopupMenuEditor*>(o) && !::tqt_cast<TQMenuBar*>(o) && !::tqt_cast<TQSizeGrip*>(o) ) - return TRUE; + return true; if ( o && ::tqt_cast<TQSizeGrip*>(o) ) break; if ( lastPressWidget != (TQWidget*)o || @@ -1080,12 +1080,12 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) case TQEvent::KeyPress: if ( ( (TQKeyEvent*)e )->key() == Key_Escape && currentTool() != POINTER_TOOL ) { resetTool(); - return FALSE; + return false; } if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) { if ( ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { qWorkspace()->activeWindow()->setFocus(); - return TRUE; + return true; } } if ( !( w = isAFormWindowChild( o ) ) || @@ -1094,7 +1094,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; ( (FormWindow*)w )->handleKeyPress( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); if ( ((TQKeyEvent*)e)->isAccepted() ) - return TRUE; + return true; break; case TQEvent::MouseButtonDblClick: if ( !( w = isAFormWindowChild( o ) ) || @@ -1108,11 +1108,11 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) if ( currentTool() == ORDER_TOOL ) { ( (FormWindow*)w )->handleMouseDblClick( (TQMouseEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); - return TRUE; + return true; } if ( !WidgetFactory::isPassiveInteractor( o ) && ( (FormWindow*)w )->formFile() ) return openEditor( ( (FormWindow*)w )->designerWidget( o ), (FormWindow*)w ); - return TRUE; + return true; case TQEvent::KeyRelease: if ( !( w = isAFormWindowChild( o ) ) || ::tqt_cast<SizeHandle*>(o) || @@ -1120,7 +1120,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; ( (FormWindow*)w )->handleKeyRelease( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); if ( ((TQKeyEvent*)e)->isAccepted() ) - return TRUE; + return true; break; case TQEvent::Hide: if ( !( w = isAFormWindowChild( o ) ) || @@ -1128,7 +1128,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ::tqt_cast<OrderIndicator*>(o) ) break; if ( ( (FormWindow*)w )->isWidgetSelected( (TQWidget*)o ) ) - ( (FormWindow*)w )->selectWidget( (TQWidget*)o, FALSE ); + ( (FormWindow*)w )->selectWidget( (TQWidget*)o, false ); break; case TQEvent::Enter: case TQEvent::Leave: @@ -1137,7 +1137,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ::tqt_cast<OrderIndicator*>(o) || ::tqt_cast<MenuBarEditor*>(o) ) break; - return TRUE; + return true; case TQEvent::Resize: case TQEvent::Move: if ( !( w = isAFormWindowChild( o ) ) || @@ -1162,19 +1162,19 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) case TQEvent::DragEnter: if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { workspace()->contentsDragEnterEvent( (TQDragEnterEvent*)e ); - return TRUE; + return true; } break; case TQEvent::DragMove: if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { workspace()->contentsDragMoveEvent( (TQDragMoveEvent*)e ); - return TRUE; + return true; } break; case TQEvent::Drop: if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) { workspace()->contentsDropEvent( (TQDropEvent*)e ); - return TRUE; + return true; } break; case TQEvent::Show: @@ -1185,16 +1185,16 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) TQApplication::sendPostedEvents( qworkspace, TQEvent::ChildInserted ); showEvent( (TQShowEvent*)e ); checkTempFiles(); - return TRUE; + return true; case TQEvent::Wheel: if ( !( w = isAFormWindowChild( o ) ) || ::tqt_cast<SizeHandle*>(o) || ::tqt_cast<OrderIndicator*>(o) ) break; - return TRUE; + return true; case TQEvent::FocusIn: if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) - return TRUE; //FIXME + return true; //FIXME if ( hierarchyView->formDefinitionView()->isRenaming() && ( o->inherits( "Editor" ) || ::tqt_cast<FormWindow*>(o) ) ) TQApplication::sendPostedEvents(); @@ -1203,7 +1203,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) while ( w ) { if ( ::tqt_cast<SourceEditor*>(w) ) break; - w = w->parentWidget( TRUE ); + w = w->parentWidget( true ); } if ( ::tqt_cast<SourceEditor*>(w) ) ( (SourceEditor*)w )->checkTimeStamp(); @@ -1215,7 +1215,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) break; case TQEvent::FocusOut: if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) - return TRUE; + return true; break; default: return TQMainWindow::eventFilter( o, e ); @@ -1332,7 +1332,7 @@ void MainWindow::createNewProject( const TQString &lang ) } TQAction *a = new TQAction( pro->makeRelative( pro->fileName() ), - pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, 0, TRUE ); + pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, 0, true ); projects.insert( a, pro ); addRecentlyOpened( pro->makeAbsolute( pro->fileName() ), recentlyProjects ); projectSelected( a ); @@ -1347,7 +1347,7 @@ bool MainWindow::unregisterClient( FormWindow *w ) lastActiveFormWindow = 0; TQPtrList<SourceEditor> waitingForDelete; - waitingForDelete.setAutoDelete( TRUE ); + waitingForDelete.setAutoDelete( true ); for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { if ( e->object() == w ) waitingForDelete.append( e ); @@ -1358,7 +1358,7 @@ bool MainWindow::unregisterClient( FormWindow *w ) actionEditor->parentWidget()->hide(); } - return TRUE; + return true; } void MainWindow::activeWindowChanged( TQWidget *w ) @@ -1369,7 +1369,7 @@ void MainWindow::activeWindowChanged( TQWidget *w ) FormWindow *ofw = lastActiveFormWindow; lastActiveFormWindow = fw; lastActiveFormWindow->updateUndoInfo(); - emit hasActiveForm( TRUE ); + emit hasActiveForm( true ); if ( formWindow() ) { formWindow()->emitShowProperties(); emit formModified( formWindow()->commandHistory()->isModified() ); @@ -1404,17 +1404,17 @@ void MainWindow::activeWindowChanged( TQWidget *w ) propertyEditor->resetFocus(); } else if ( !lastActiveFormWindow ) { emit formWindowChanged(); - emit hasActiveForm( FALSE ); - actionEditUndo->setEnabled( FALSE ); - actionEditRedo->setEnabled( FALSE ); + emit hasActiveForm( false ); + actionEditUndo->setEnabled( false ); + actionEditRedo->setEnabled( false ); } if ( !w ) { emit formWindowChanged(); - emit hasActiveForm( FALSE ); + emit hasActiveForm( false ); propertyEditor->clear(); hierarchyView->clear(); - updateUndoRedo( FALSE, FALSE, TQString::null, TQString::null ); + updateUndoRedo( false, false, TQString::null, TQString::null ); } selectionChanged(); @@ -1426,18 +1426,18 @@ void MainWindow::activeWindowChanged( TQWidget *w ) lastActiveFormWindow != fw ) { activeWindowChanged( se->formWindow() ); } - actionSearchFind->setEnabled( TRUE ); - actionSearchIncremetal->setEnabled( TRUE ); - actionSearchReplace->setEnabled( TRUE ); - actionSearchGotoLine->setEnabled( TRUE ); - incrementalSearch->setEnabled( TRUE ); + actionSearchFind->setEnabled( true ); + actionSearchIncremetal->setEnabled( true ); + actionSearchReplace->setEnabled( true ); + actionSearchGotoLine->setEnabled( true ); + incrementalSearch->setEnabled( true ); - actionEditUndo->setEnabled( FALSE ); - actionEditRedo->setEnabled( FALSE ); - actionEditCut->setEnabled( TRUE ); - actionEditCopy->setEnabled( TRUE ); + actionEditUndo->setEnabled( false ); + actionEditRedo->setEnabled( false ); + actionEditCut->setEnabled( true ); + actionEditCopy->setEnabled( true ); // actionEditPaste will be updated by calling clipboardChanged() - actionEditSelectAll->setEnabled( TRUE ); + actionEditSelectAll->setEnabled( true ); actionEditUndo->setMenuText( tr( "&Undo" ) ); actionEditUndo->setToolTip( textNoAccel( actionEditUndo->menuText()) ); actionEditRedo->setMenuText( tr( "&Redo" ) ); @@ -1455,11 +1455,11 @@ void MainWindow::activeWindowChanged( TQWidget *w ) } workspace()->activeEditorChanged( se ); } else { - actionSearchFind->setEnabled( FALSE ); - actionSearchIncremetal->setEnabled( FALSE ); - actionSearchReplace->setEnabled( FALSE ); - actionSearchGotoLine->setEnabled( FALSE ); - incrementalSearch->setEnabled( FALSE ); + actionSearchFind->setEnabled( false ); + actionSearchIncremetal->setEnabled( false ); + actionSearchReplace->setEnabled( false ); + actionSearchGotoLine->setEnabled( false ); + incrementalSearch->setEnabled( false ); } clipboardChanged(); // update actionEditPaste @@ -1491,8 +1491,8 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable, actionEditRedo->setToolTip( textNoAccel( actionEditRedo->menuText()) ); if ( currentTool() == ORDER_TOOL ) { - actionEditUndo->setEnabled( FALSE ); - actionEditRedo->setEnabled( FALSE ); + actionEditUndo->setEnabled( false ); + actionEditRedo->setEnabled( false ); } } @@ -1549,18 +1549,18 @@ void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidg void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int> &props, TQWidget *w ) { - const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); + const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", true ), true ); if ( text && qstrcmp( text->type(), "TQString") != 0 ) text = 0; - const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); + const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", true ), true ); if ( title && qstrcmp( title->type(), "TQString") != 0 ) title = 0; const TQMetaProperty* pagetitle = - w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); + w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", true ), true ); if ( pagetitle && qstrcmp( pagetitle->type(), "TQString") != 0 ) pagetitle = 0; const TQMetaProperty* pixmap = - w->metaObject()->property( w->metaObject()->findProperty( "pixmap", TRUE ), TRUE ); + w->metaObject()->property( w->metaObject()->findProperty( "pixmap", true ), true ); if ( pixmap && qstrcmp( pixmap->type(), "TQPixmap") != 0 ) pixmap = 0; @@ -1713,12 +1713,12 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids, void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWidget *w ) { if ( id == props[ "text" ] ) { - bool ok = FALSE; - bool oldDoWrap = FALSE; + bool ok = false; + bool oldDoWrap = false; if ( ::tqt_cast<TQLabel*>(w) ) { int align = w->property( "alignment" ).toInt(); if ( align & WordBreak ) - oldDoWrap = TRUE; + oldDoWrap = true; } bool doWrap = oldDoWrap; @@ -1738,7 +1738,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid TQVariant( doWrap ), TQString::null, TQString::null ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE ); + MetaDataBase::setPropertyChanged( w, "wordwrap", true ); } TQString pn( tr( "Set the 'text' of '%1'" ).arg( w->name() ) ); @@ -1747,10 +1747,10 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid text, TQString::null, TQString::null ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "text", TRUE ); + MetaDataBase::setPropertyChanged( w, "text", true ); } } else if ( id == props[ "title" ] ) { - bool ok = FALSE; + bool ok = false; TQString title = TQInputDialog::getText( tr("Title"), tr( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this ); if ( ok ) { @@ -1760,10 +1760,10 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid title, TQString::null, TQString::null ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "title", TRUE ); + MetaDataBase::setPropertyChanged( w, "title", true ); } } else if ( id == props[ "pagetitle" ] ) { - bool ok = FALSE; + bool ok = false; TQString text = TQInputDialog::getText( tr("Page Title"), tr( "New page title" ), TQLineEdit::Normal, w->property("pageTitle").toString(), &ok, this ); if ( ok ) { @@ -1774,7 +1774,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid text, TQString::null, TQString::null ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "pageTitle", TRUE ); + MetaDataBase::setPropertyChanged( w, "pageTitle", true ); } } else if ( id == props[ "pixmap" ] ) { TQPixmap oldPix = w->property( "pixmap" ).toPixmap(); @@ -1786,7 +1786,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid pix, TQString::null, TQString::null ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "pixmap", TRUE ); + MetaDataBase::setPropertyChanged( w, "pixmap", true ); } } } @@ -1858,7 +1858,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command currentPage + 1, TQString::null, TQString::null ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "currentPage", TRUE ); + MetaDataBase::setPropertyChanged( w, "currentPage", true ); } else if ( id == commands[ "prevpage" ] ) { int currentPage = w->property( "currentPage" ).toInt(); TQString pn( tr( "Raise previous page of '%2'" ).arg( w->name() ) ); @@ -1868,7 +1868,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command currentPage -1, TQString::null, TQString::null ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "currentPage", TRUE ); + MetaDataBase::setPropertyChanged( w, "currentPage", true ); } #ifdef QT_CONTAINER_CUSTOM_WIDGETS } else if ( WidgetDatabase:: @@ -1898,7 +1898,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command } else if ( id == commands[ "rename" ] ) { TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); if ( iface ) { - bool ok = FALSE; + bool ok = false; TQString wClassName = WidgetFactory::classNameOf( w ); int index = iface->currentIndex( wClassName, w ); TQString text = TQInputDialog::getText( tr("Page Title"), tr( "New page title" ), @@ -1958,7 +1958,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command delete e; } else if ( id == commands[ "rename" ] ) { - bool ok = FALSE; + bool ok = false; TQDesignerWizard *dw = (TQDesignerWizard*)wiz; TQString text = TQInputDialog::getText( tr("Page Title"), tr( "New page title" ), TQLineEdit::Normal, dw->pageTitle(), &ok, this ); @@ -2002,23 +2002,23 @@ void MainWindow::clipboardChanged() void MainWindow::selectionChanged() { - layoutChilds = FALSE; - layoutSelected = FALSE; - breakLayout = FALSE; + layoutChilds = false; + layoutSelected = false; + breakLayout = false; if ( !formWindow() ) { - actionEditCut->setEnabled( FALSE ); - actionEditCopy->setEnabled( FALSE ); - actionEditDelete->setEnabled( FALSE ); - actionEditAdjustSize->setEnabled( FALSE ); - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditSplitHorizontal->setEnabled( FALSE ); - actionEditSplitVertical->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); - actionEditLower->setEnabled( FALSE ); - actionEditRaise->setEnabled( FALSE ); - actionEditAdjustSize->setEnabled( FALSE ); + actionEditCut->setEnabled( false ); + actionEditCopy->setEnabled( false ); + actionEditDelete->setEnabled( false ); + actionEditAdjustSize->setEnabled( false ); + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditSplitHorizontal->setEnabled( false ); + actionEditSplitVertical->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); + actionEditBreakLayout->setEnabled( false ); + actionEditLower->setEnabled( false ); + actionEditRaise->setEnabled( false ); + actionEditAdjustSize->setEnabled( false ); return; } @@ -2030,11 +2030,11 @@ void MainWindow::selectionChanged() actionEditLower->setEnabled( enable ); actionEditRaise->setEnabled( enable ); - actionEditAdjustSize->setEnabled( FALSE ); - actionEditSplitHorizontal->setEnabled( FALSE ); - actionEditSplitVertical->setEnabled( FALSE ); + actionEditAdjustSize->setEnabled( false ); + actionEditSplitHorizontal->setEnabled( false ); + actionEditSplitVertical->setEnabled( false ); - enable = FALSE; + enable = false; TQWidgetList widgets = formWindow()->selectedWidgets(); if ( selectedWidgets > 1 ) { int unlaidout = 0; @@ -2062,69 +2062,69 @@ void MainWindow::selectionChanged() WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ); if ( !isContainer ) { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); - breakLayout = TRUE; + breakLayout = true; } else { - actionEditBreakLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( false ); } } else { if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { if ( !formWindow()->hasInsertedChildren( w ) ) { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); + actionEditBreakLayout->setEnabled( false ); } else { - actionEditHLayout->setEnabled( TRUE ); - actionEditVLayout->setEnabled( TRUE ); - actionEditGridLayout->setEnabled( TRUE ); - actionEditBreakLayout->setEnabled( FALSE ); - layoutChilds = TRUE; + actionEditHLayout->setEnabled( true ); + actionEditVLayout->setEnabled( true ); + actionEditGridLayout->setEnabled( true ); + actionEditBreakLayout->setEnabled( false ); + layoutChilds = true; } if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); - breakLayout = TRUE; + breakLayout = true; } } else { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) ); - breakLayout = TRUE; + breakLayout = true; } } } else if ( selectedWidgets == 0 ) { - actionEditAdjustSize->setEnabled( TRUE ); + actionEditAdjustSize->setEnabled( true ); TQWidget *w = formWindow()->mainContainer(); if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { if ( !formWindow()->hasInsertedChildren( w ) ) { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); + actionEditBreakLayout->setEnabled( false ); } else { - actionEditHLayout->setEnabled( TRUE ); - actionEditVLayout->setEnabled( TRUE ); - actionEditGridLayout->setEnabled( TRUE ); - actionEditBreakLayout->setEnabled( FALSE ); - layoutChilds = TRUE; + actionEditHLayout->setEnabled( true ); + actionEditVLayout->setEnabled( true ); + actionEditGridLayout->setEnabled( true ); + actionEditBreakLayout->setEnabled( false ); + layoutChilds = true; } } else { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( TRUE ); - breakLayout = TRUE; + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); + actionEditBreakLayout->setEnabled( true ); + breakLayout = true; } } else { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); + actionEditHLayout->setEnabled( false ); + actionEditVLayout->setEnabled( false ); + actionEditGridLayout->setEnabled( false ); + actionEditBreakLayout->setEnabled( false ); } } @@ -2251,12 +2251,12 @@ void MainWindow::readConfig() config.insertSearchPath( TQSettings::Windows, "/Trolltech" ); bool ok; - bool readPreviousConfig = FALSE; + bool readPreviousConfig = false; TQString backPixName( TQDir::home().absPath() + "/.designer/" + "background.xpm" ); - restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok ); + restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", true, &ok ); if ( !ok ) { keybase = DesignerApplication::oldSettingsKey(); - restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok ); + restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", true, &ok ); if ( !ok ) { if ( oWindow ) { oWindow->shuttingDown(); @@ -2268,7 +2268,7 @@ void MainWindow::readConfig() qworkspace->setBackgroundPixmap( pix ); return; } - readPreviousConfig = TRUE; + readPreviousConfig = true; } if ( !readPreviousConfig ) { fileFilter = config.readEntry( keybase + "FileFilter", fileFilter ); @@ -2307,7 +2307,7 @@ void MainWindow::readConfig() recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects" ); } - backPix = config.readBoolEntry( keybase + "Background/UsePixmap", TRUE ) | readPreviousConfig; + backPix = config.readBoolEntry( keybase + "Background/UsePixmap", true ) | readPreviousConfig; if ( backPix ) { TQPixmap pix; pix.load( backPixName ); @@ -2318,14 +2318,14 @@ void MainWindow::readConfig() } if ( !readPreviousConfig ) { - splashScreen = config.readBoolEntry( keybase + "SplashScreen", TRUE ); + splashScreen = config.readBoolEntry( keybase + "SplashScreen", true ); - sGrid = config.readBoolEntry( keybase + "Grid/Show", TRUE ); - snGrid = config.readBoolEntry( keybase + "Grid/Snap", TRUE ); + sGrid = config.readBoolEntry( keybase + "Grid/Show", true ); + snGrid = config.readBoolEntry( keybase + "Grid/Snap", true ); grd.setX( config.readNumEntry( keybase + "Grid/x", 10 ) ); grd.setY( config.readNumEntry( keybase + "Grid/y", 10 ) ); - if ( !config.readBoolEntry( DesignerApplication::settingsKey() + "Geometries/MainwindowMaximized", FALSE ) ) { + if ( !config.readBoolEntry( DesignerApplication::settingsKey() + "Geometries/MainwindowMaximized", false ) ) { TQRect r( pos(), size() ); r.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", r.x() ) ); r.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", r.y() ) ); @@ -2339,8 +2339,8 @@ void MainWindow::readConfig() move( r.topLeft() ); } } - setUsesTextLabel( config.readBoolEntry( keybase + "View/TextLabels", FALSE ) ); - setUsesBigPixmaps( FALSE /*config.readBoolEntry( "BigIcons", FALSE )*/ ); // ### disabled for now + setUsesTextLabel( config.readBoolEntry( keybase + "View/TextLabels", false ) ); + setUsesBigPixmaps( false /*config.readBoolEntry( "BigIcons", false )*/ ); // ### disabled for now } } int num = config.readNumEntry( keybase + "CustomWidgets/num" ); @@ -2599,13 +2599,13 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) new AddConnectionCommand( tr( "Add connection" ), f, conn ); f->commandHistory()->addCommand( cmd ); cmd->execute(); - f->formFile()->setModified( TRUE ); + f->formFile()->setModified( true ); } } } - editFunction( s, TRUE ); + editFunction( s, true ); } - return TRUE; + return true; } if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) { @@ -2613,18 +2613,18 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ), this, w, formWindow() ); statusBar()->clear(); - return TRUE; + return true; } - const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); - const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); + const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", true ), true ); + const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", true ), true ); if ( text && text->designable(w) ) { - bool ok = FALSE; - bool oldDoWrap = FALSE; + bool ok = false; + bool oldDoWrap = false; if ( ::tqt_cast<TQLabel*>(w) ) { int align = w->property( "alignment" ).toInt(); if ( align & WordBreak ) - oldDoWrap = TRUE; + oldDoWrap = true; } bool doWrap = oldDoWrap; @@ -2645,7 +2645,7 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) TQVariant( doWrap ), TQString::null, TQString::null ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE ); + MetaDataBase::setPropertyChanged( w, "wordwrap", true ); } TQString pn( tr( "Set the 'text' of '%1'" ).arg( w->name() ) ); @@ -2654,12 +2654,12 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) text, TQString::null, TQString::null ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "text", TRUE ); + MetaDataBase::setPropertyChanged( w, "text", true ); } - return TRUE; + return true; } if ( title && title->designable(w) ) { - bool ok = FALSE; + bool ok = false; TQString text; text = TQInputDialog::getText( tr("Title"), tr( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this ); if ( ok ) { @@ -2669,15 +2669,15 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) text, TQString::null, TQString::null ); cmd->execute(); formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( w, "title", TRUE ); + MetaDataBase::setPropertyChanged( w, "title", true ); } - return TRUE; + return true; } if ( !WidgetFactory::isPassiveInteractor( w ) ) editSource(); - return TRUE; + return true; } void MainWindow::rebuildCustomWidgetGUI() @@ -2702,7 +2702,7 @@ void MainWindow::rebuildCustomWidgetGUI() for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { WidgetAction* a = new WidgetAction( "Custom Widgets", actionGroupTools, TQString::number( w->id ).latin1() ); - a->setToggleAction( TRUE ); + a->setToggleAction( true ); a->setText( w->className ); a->setIconSet( *w->pixmap ); a->setStatusTip( tr( "Insert a " +w->className + " (custom widget)" ) ); @@ -2729,16 +2729,16 @@ void MainWindow::rebuildCustomWidgetGUI() void MainWindow::rebuildCommonWidgetsToolBoxPage() { - toolBox->setUpdatesEnabled( FALSE ); - commonWidgetsToolBar->setUpdatesEnabled( FALSE ); + toolBox->setUpdatesEnabled( false ); + commonWidgetsToolBar->setUpdatesEnabled( false ); commonWidgetsToolBar->clear(); for ( TQAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() ) a->addTo( commonWidgetsToolBar ); TQWidget *w; commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) ); w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() ); - toolBox->setUpdatesEnabled( TRUE ); - commonWidgetsToolBar->setUpdatesEnabled( TRUE ); + toolBox->setUpdatesEnabled( true ); + commonWidgetsToolBar->setUpdatesEnabled( true ); } bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid ) @@ -2747,10 +2747,10 @@ bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid ) for ( TQWidget *w = windows.first(); w; w = windows.next() ) { if ( ::tqt_cast<FormWindow*>(w) ) { if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) ) - return TRUE; + return true; } } - return FALSE; + return false; } void MainWindow::setGrid( const TQPoint &p ) @@ -2800,11 +2800,11 @@ void MainWindow::windowsMenuActivated( int id ) void MainWindow::projectSelected( TQAction *a ) { - a->setOn( TRUE ); + a->setOn( true ); if ( currentProject ) - currentProject->setActive( FALSE ); + currentProject->setActive( false ); Project *p = *projects.find( a ); - p->setActive( TRUE ); + p->setActive( true ); if ( currentProject == p ) return; currentProject = p; @@ -2822,8 +2822,8 @@ void MainWindow::openProject( const TQString &fn ) } TQApplication::setOverrideCursor( waitCursor ); Project *pro = new Project( fn, "", projectSettingsPluginManager ); - pro->setModified( FALSE ); - TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, TRUE ); + pro->setModified( false ); + TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, true ); projects.insert( a, pro ); projectSelected( a ); TQApplication::restoreOverrideCursor(); @@ -2847,7 +2847,7 @@ void MainWindow::checkTempFiles() TQApplication::setOverrideCursor( waitCursor ); for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { if ( load ) - openFormWindow( s + "/" + *it, FALSE ); + openFormWindow( s + "/" + *it, false ); d.remove( *it ); } } @@ -2959,7 +2959,7 @@ void MainWindow::editFunction( const TQString &func, bool rereadSource ) return; if ( formWindow()->formFile()->codeFileState() != FormFile::Ok ) - if ( !formWindow()->formFile()->setupUihFile(FALSE) ) + if ( !formWindow()->formFile()->setupUihFile(false) ) return; TQString lang = currentProject->language(); @@ -3203,7 +3203,7 @@ void MainWindow::setModified( bool b, TQWidget *window ) } return; } - w = w->parentWidget( TRUE ); + w = w->parentWidget( true ); } } @@ -3214,13 +3214,13 @@ void MainWindow::editorClosed( SourceEditor *e ) void MainWindow::functionsChanged() { - updateFunctionsTimer->start( 0, TRUE ); + updateFunctionsTimer->start( 0, true ); } void MainWindow::doFunctionsChanged() { for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) - e->refresh( FALSE ); + e->refresh( false ); hierarchyView->formDefinitionView()->refresh(); } @@ -3275,17 +3275,17 @@ void MainWindow::showErrorMessage( TQObject *o, int errorLine, const TQString &e ol.append( o ); TQStringList ll; ll << currentProject->locationOfObject( o ); - oWindow->setErrorMessages( l2, l, TRUE, ll, ol ); + oWindow->setErrorMessages( l2, l, true, ll, ol ); showSourceLine( o, errorLine, Error ); } } void MainWindow::finishedRun() { - inDebugMode = FALSE; - previewing = FALSE; + inDebugMode = false; + previewing = false; debuggingForms.clear(); - enableAll( TRUE ); + enableAll( true ); for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { if ( e->project() == currentProject ) e->editorInterface()->setMode( EditorInterface::Editing ); @@ -3419,11 +3419,11 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) return; } - mblockNewForms = TRUE; + mblockNewForms = true; if ( !fw ) openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (TQWidget*)o ) ) ); else - fw->formFile()->showEditor( FALSE ); + fw->formFile()->showEditor( false ); tqApp->processEvents(); // give all views the chance to get the formwindow SourceEditor *se = editSource(); if ( se ) { @@ -3439,7 +3439,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) break; } } - mblockNewForms = FALSE; + mblockNewForms = false; } @@ -3463,7 +3463,7 @@ void MainWindow::formNameChanged( FormWindow *fw ) { for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { if ( e->object() == fw ) - e->refresh( TRUE ); + e->refresh( true ); if ( e->project() == fw->project() ) e->resetContext(); } @@ -3557,7 +3557,7 @@ SourceFile *MainWindow::sourceFile() bool MainWindow::openProjectSettings( Project *pro ) { - ProjectSettings dia( pro, this, 0, TRUE ); + ProjectSettings dia( pro, this, 0, true ); SenderObject *senderObject = new SenderObject( designerInterface() ); TQValueList<Tab>::ConstIterator it; for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) { @@ -3575,7 +3575,7 @@ bool MainWindow::openProjectSettings( Project *pro ) } if ( singleProject ) - dia.tabWidget->setTabEnabled( dia.tabSettings, FALSE ); + dia.tabWidget->setTabEnabled( dia.tabSettings, false ); int res = dia.exec(); @@ -3584,7 +3584,7 @@ bool MainWindow::openProjectSettings( Project *pro ) for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) { Tab t = *it; dia.tabWidget->removePage( t.w ); - t.w->reparent( 0, TQPoint(0,0), FALSE ); + t.w->reparent( 0, TQPoint(0,0), false ); } return res == TQDialog::Accepted; @@ -3635,7 +3635,7 @@ void MainWindow::setSingleProject( Project *pro ) Project *pro = eProject; pro->save(); TQWidgetList windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( TRUE ); + qWorkspace()->blockSignals( true ); TQWidgetListIt wit( windows ); while ( wit.current() ) { TQWidget *w = wit.current(); @@ -3652,18 +3652,18 @@ void MainWindow::setSingleProject( Project *pro ) } hierarchyView->clear(); windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( FALSE ); + qWorkspace()->blockSignals( false ); currentProject = 0; - updateUndoRedo( FALSE, FALSE, TQString::null, TQString::null ); + updateUndoRedo( false, false, TQString::null, TQString::null ); } - singleProject = TRUE; + singleProject = true; projects.clear(); TQAction *a = new TQAction( tr( pro->name() ), tr( pro->name() ), 0, - actionGroupProjects, 0, TRUE ); + actionGroupProjects, 0, true ); eProject = pro; projects.insert( a, eProject ); - a->setOn( TRUE ); + a->setOn( true ); actionGroupProjects->removeFrom( projectMenu ); actionGroupProjects->removeFrom( projectToolBar ); currentProject = eProject; @@ -3681,16 +3681,16 @@ void MainWindow::showGUIStuff( bool b ) return; guiStuffVisible = b; if ( !b ) { - setAppropriate( (TQDockWindow*)toolBox->parentWidget(), FALSE ); + setAppropriate( (TQDockWindow*)toolBox->parentWidget(), false ); toolBox->parentWidget()->hide(); for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { tb->hide(); - setAppropriate( tb, FALSE ); + setAppropriate( tb, false ); } - propertyEditor->setPropertyEditorEnabled( FALSE ); - setAppropriate( layoutToolBar, FALSE ); + propertyEditor->setPropertyEditorEnabled( false ); + setAppropriate( layoutToolBar, false ); layoutToolBar->hide(); - setAppropriate( toolsToolBar, FALSE ); + setAppropriate( toolsToolBar, false ); toolsToolBar->hide(); menubar->removeItem( toolsMenuId ); menubar->removeItem( toolsMenuId + 1 ); @@ -3700,11 +3700,11 @@ void MainWindow::showGUIStuff( bool b ) disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQ_SLOT( setEnabled(bool) ) ); disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQ_SLOT( setEnabled(bool) ) ); disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQ_SLOT( setEnabled(bool) ) ); - actionEditFormSettings->setEnabled( FALSE ); - actionEditSource->setEnabled( FALSE ); - actionEditConnections->setEnabled( FALSE ); - actionEditFunctions->setEnabled( FALSE ); - actionEditAccels->setEnabled( FALSE ); + actionEditFormSettings->setEnabled( false ); + actionEditSource->setEnabled( false ); + actionEditConnections->setEnabled( false ); + actionEditFunctions->setEnabled( false ); + actionEditAccels->setEnabled( false ); ( (TQDockWindow*)propertyEditor->parentWidget() )-> setCaption( tr( "Signal Handlers" ) ); actionGroupNew->removeFrom( fileMenu ); @@ -3718,16 +3718,16 @@ void MainWindow::showGUIStuff( bool b ) actionFileSave->addTo( projectToolBar ); actionFileExit->addTo( fileMenu ); } else { - setAppropriate( (TQDockWindow*)toolBox->parentWidget(), TRUE ); + setAppropriate( (TQDockWindow*)toolBox->parentWidget(), true ); toolBox->parentWidget()->show(); for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { - setAppropriate( tb, TRUE ); + setAppropriate( tb, true ); tb->hide(); } - propertyEditor->setPropertyEditorEnabled( TRUE ); - setAppropriate( layoutToolBar, TRUE ); + propertyEditor->setPropertyEditorEnabled( true ); + setAppropriate( layoutToolBar, true ); layoutToolBar->show(); - setAppropriate( toolsToolBar, TRUE ); + setAppropriate( toolsToolBar, true ); toolsToolBar->show(); menubar->insertItem( tr( "&Tools" ), toolsMenu, toolsMenuId, toolsMenuIndex ); menubar->insertItem( tr( "&Layout" ), layoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 ); @@ -3737,11 +3737,11 @@ void MainWindow::showGUIStuff( bool b ) connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQ_SLOT( setEnabled(bool) ) ); connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQ_SLOT( setEnabled(bool) ) ); connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQ_SLOT( setEnabled(bool) ) ); - actionEditFormSettings->setEnabled( TRUE ); - actionEditSource->setEnabled( TRUE ); - actionEditConnections->setEnabled( TRUE ); - actionEditFunctions->setEnabled( TRUE ); - actionEditAccels->setEnabled( TRUE ); + actionEditFormSettings->setEnabled( true ); + actionEditSource->setEnabled( true ); + actionEditConnections->setEnabled( true ); + actionEditFunctions->setEnabled( true ); + actionEditAccels->setEnabled( true ); ( (TQDockWindow*)propertyEditor->parentWidget() )-> setCaption( tr( "Property Editor/Signal Handlers" ) ); actionFileSave->removeFrom( fileMenu ); diff --git a/tools/designer/designer/mainwindow.h b/tools/designer/designer/mainwindow.h index 45722b379..c40836b40 100644 --- a/tools/designer/designer/mainwindow.h +++ b/tools/designer/designer/mainwindow.h @@ -88,7 +88,7 @@ class MainWindow : public TQMainWindow public: enum LineMode { Error, Step, StackFrame }; - MainWindow( bool asClient, bool single = FALSE, const TQString &plgDir = "/designer" ); + MainWindow( bool asClient, bool single = false, const TQString &plgDir = "/designer" ); ~MainWindow(); HierarchyView *objectHierarchy() const; @@ -115,7 +115,7 @@ public: TQPopupMenu *setupNormalHierarchyMenu( TQWidget *parent ); TQPopupMenu *setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot ); - FormWindow *openFormWindow( const TQString &fn, bool validFileName = TRUE, FormFile *ff = 0 ); + FormWindow *openFormWindow( const TQString &fn, bool validFileName = true, FormFile *ff = 0 ); bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w ); void setGrid( const TQPoint &p ); @@ -131,7 +131,7 @@ public: TQString templatePath() const { return templPath; } - void editFunction( const TQString &func, bool rereadSource = FALSE ); + void editFunction( const TQString &func, bool rereadSource = false ); bool isPreviewing() const { return previewing; } @@ -228,7 +228,7 @@ public slots: void fileQuit(); void fileCloseProject(); // not visible in menu, called from fileClose void fileOpen(); - void fileOpen( const TQString &filter, const TQString &extension, const TQString &filename = "" , bool inProject = TRUE ); + void fileOpen( const TQString &filter, const TQString &extension, const TQString &filename = "" , bool inProject = true ); bool fileSave(); bool fileSaveForm(); // not visible in menu, called from fileSave bool fileSaveProject(); // not visible in menu, called from fileSaveProject @@ -265,7 +265,7 @@ public slots: SourceEditor *createSourceEditor( TQObject *object, Project *project, const TQString &lang = TQString::null, const TQString &func = TQString::null, - bool rereadSource = FALSE ); + bool rereadSource = false ); void editFormSettings(); void editProjectSettings(); void editPixmapCollection(); diff --git a/tools/designer/designer/mainwindowactions.cpp b/tools/designer/designer/mainwindowactions.cpp index d7699dca6..e2360f9e2 100644 --- a/tools/designer/designer/mainwindowactions.cpp +++ b/tools/designer/designer/mainwindowactions.cpp @@ -128,37 +128,37 @@ void MainWindow::setupEditActions() actionEditUndo->setStatusTip( tr( "Undoes the last action" ) ); actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) ); connect( actionEditUndo, TQ_SIGNAL( activated() ), this, TQ_SLOT( editUndo() ) ); - actionEditUndo->setEnabled( FALSE ); + actionEditUndo->setEnabled( false ); actionEditRedo = new TQAction( tr( "Redo" ), createIconSet("designer_redo.png"), tr( "&Redo: Not Available" ), CTRL + Key_Y, this, 0 ); actionEditRedo->setStatusTip( tr( "Redoes the last undone operation") ); actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) ); connect( actionEditRedo, TQ_SIGNAL( activated() ), this, TQ_SLOT( editRedo() ) ); - actionEditRedo->setEnabled( FALSE ); + actionEditRedo->setEnabled( false ); actionEditCut = new TQAction( tr( "Cut" ), createIconSet("designer_editcut.png"), tr( "Cu&t" ), CTRL + Key_X, this, 0 ); actionEditCut->setStatusTip( tr( "Cuts the selected widgets and puts them on the clipboard" ) ); actionEditCut->setWhatsThis( whatsThisFrom( "Edit|Cut" ) ); connect( actionEditCut, TQ_SIGNAL( activated() ), this, TQ_SLOT( editCut() ) ); - actionEditCut->setEnabled( FALSE ); + actionEditCut->setEnabled( false ); actionEditCopy = new TQAction( tr( "Copy" ), createIconSet("designer_editcopy.png"), tr( "&Copy" ), CTRL + Key_C, this, 0 ); actionEditCopy->setStatusTip( tr( "Copies the selected widgets to the clipboard" ) ); actionEditCopy->setWhatsThis( whatsThisFrom( "Edit|Copy" ) ); connect( actionEditCopy, TQ_SIGNAL( activated() ), this, TQ_SLOT( editCopy() ) ); - actionEditCopy->setEnabled( FALSE ); + actionEditCopy->setEnabled( false ); actionEditPaste = new TQAction( tr( "Paste" ), createIconSet("designer_editpaste.png"), tr( "&Paste" ), CTRL + Key_V, this, 0 ); actionEditPaste->setStatusTip( tr( "Pastes the clipboard's contents" ) ); actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) ); connect( actionEditPaste, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPaste() ) ); - actionEditPaste->setEnabled( FALSE ); + actionEditPaste->setEnabled( false ); actionEditDelete = new TQAction( tr( "Delete" ), TQPixmap(), tr( "&Delete" ), Key_Delete, this, 0 ); actionEditDelete->setStatusTip( tr( "Deletes the selected widgets" ) ); actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) ); connect( actionEditDelete, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDelete() ) ); - actionEditDelete->setEnabled( FALSE ); + actionEditDelete->setEnabled( false ); #ifdef TQ_WS_MAC TQAction *macDelete = new TQAction( tr( "Delete" ), TQPixmap(), tr( "&Delete" ), Key_Backspace, this, 0 ); connect( macDelete, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDelete() ) ); @@ -168,19 +168,19 @@ void MainWindow::setupEditActions() actionEditSelectAll->setStatusTip( tr( "Selects all widgets" ) ); actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) ); connect( actionEditSelectAll, TQ_SIGNAL( activated() ), this, TQ_SLOT( editSelectAll() ) ); - actionEditSelectAll->setEnabled( TRUE ); + actionEditSelectAll->setEnabled( true ); actionEditRaise = new TQAction( tr( "Bring to Front" ), createIconSet("designer_editraise.png"), tr( "Bring to &Front" ), 0, this, 0 ); actionEditRaise->setStatusTip( tr( "Raises the selected widgets" ) ); actionEditRaise->setWhatsThis( tr( "Raises the selected widgets" ) ); connect( actionEditRaise, TQ_SIGNAL( activated() ), this, TQ_SLOT( editRaise() ) ); - actionEditRaise->setEnabled( FALSE ); + actionEditRaise->setEnabled( false ); actionEditLower = new TQAction( tr( "Send to Back" ), createIconSet("designer_editlower.png"), tr( "Send to &Back" ), 0, this, 0 ); actionEditLower->setStatusTip( tr( "Lowers the selected widgets" ) ); actionEditLower->setWhatsThis( tr( "Lowers the selected widgets" ) ); connect( actionEditLower, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLower() ) ); - actionEditLower->setEnabled( FALSE ); + actionEditLower->setEnabled( false ); actionEditAccels = new TQAction( tr( "Check Accelerators" ), TQPixmap(), tr( "Chec&k Accelerators" ), ALT + Key_R, this, 0 ); @@ -271,25 +271,25 @@ void MainWindow::setupSearchActions() actionSearchFind = new TQAction( tr( "Find" ), createIconSet( "designer_searchfind.png" ), tr( "&Find..." ), CTRL + Key_F, this, 0 ); connect( actionSearchFind, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchFind() ) ); - actionSearchFind->setEnabled( FALSE ); + actionSearchFind->setEnabled( false ); actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) ); actionSearchIncremetal = new TQAction( tr( "Find Incremental" ), TQIconSet(), tr( "Find &Incremental" ), ALT + Key_I, this, 0 ); connect( actionSearchIncremetal, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchIncremetalFindMenu() ) ); - actionSearchIncremetal->setEnabled( FALSE ); + actionSearchIncremetal->setEnabled( false ); actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) ); actionSearchReplace = new TQAction( tr( "Replace" ), TQIconSet(), tr( "&Replace..." ), CTRL + Key_R, this, 0 ); connect( actionSearchReplace, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchReplace() ) ); - actionSearchReplace->setEnabled( FALSE ); + actionSearchReplace->setEnabled( false ); actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) ); actionSearchGotoLine = new TQAction( tr( "Goto Line" ), TQIconSet(), tr( "&Goto Line..." ), ALT + Key_G, this, 0 ); connect( actionSearchGotoLine, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchGotoLine() ) ); - actionSearchGotoLine->setEnabled( FALSE ); + actionSearchGotoLine->setEnabled( false ); actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) ); TQToolBar *tb = new TQToolBar( this, "Search" ); @@ -303,7 +303,7 @@ void MainWindow::setupSearchActions() this, TQ_SLOT( searchIncremetalFind() ) ); connect( incrementalSearch, TQ_SIGNAL( returnPressed() ), this, TQ_SLOT( searchIncremetalFindNext() ) ); - incrementalSearch->setEnabled( FALSE ); + incrementalSearch->setEnabled( false ); TQPopupMenu *menu = new TQPopupMenu( this, "Search" ); menubar->insertItem( tr( "&Search" ), menu ); @@ -318,7 +318,7 @@ void MainWindow::setupLayoutActions() { if ( !actionGroupTools ) { actionGroupTools = new TQActionGroup( this ); - actionGroupTools->setExclusive( TRUE ); + actionGroupTools->setExclusive( true ); connect( actionGroupTools, TQ_SIGNAL( selected(TQAction*) ), this, TQ_SLOT( toolSelected(TQAction*) ) ); } @@ -327,53 +327,53 @@ void MainWindow::setupLayoutActions() actionEditAdjustSize->setStatusTip(tr("Adjusts the size of the selected widget") ); actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) ); connect( actionEditAdjustSize, TQ_SIGNAL( activated() ), this, TQ_SLOT( editAdjustSize() ) ); - actionEditAdjustSize->setEnabled( FALSE ); + actionEditAdjustSize->setEnabled( false ); actionEditHLayout = new TQAction( tr( "Lay Out Horizontally" ), createIconSet("designer_edithlayout.png"), tr( "Lay Out &Horizontally" ), CTRL + Key_H, this, 0 ); actionEditHLayout->setStatusTip(tr("Lays out the selected widgets horizontally") ); actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally" ) ); connect( actionEditHLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutHorizontal() ) ); - actionEditHLayout->setEnabled( FALSE ); + actionEditHLayout->setEnabled( false ); actionEditVLayout = new TQAction( tr( "Lay Out Vertically" ), createIconSet("designer_editvlayout.png"), tr( "Lay Out &Vertically" ), CTRL + Key_L, this, 0 ); actionEditVLayout->setStatusTip(tr("Lays out the selected widgets vertically") ); actionEditVLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically" ) ); connect( actionEditVLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutVertical() ) ); - actionEditVLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( false ); actionEditGridLayout = new TQAction( tr( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"), tr( "Lay Out in a &Grid" ), CTRL + Key_G, this, 0 ); actionEditGridLayout->setStatusTip(tr("Lays out the selected widgets in a grid") ); actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) ); connect( actionEditGridLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutGrid() ) ); - actionEditGridLayout->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( false ); actionEditSplitHorizontal = new TQAction( tr( "Lay Out Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"), tr( "Lay Out Horizontally (in S&plitter)" ), 0, this, 0 ); actionEditSplitHorizontal->setStatusTip(tr("Lays out the selected widgets horizontally in a splitter") ); actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally (in Splitter)" ) ); connect( actionEditSplitHorizontal, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutHorizontalSplit() ) ); - actionEditSplitHorizontal->setEnabled( FALSE ); + actionEditSplitHorizontal->setEnabled( false ); actionEditSplitVertical = new TQAction( tr( "Lay Out Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"), tr( "Lay Out Vertically (in Sp&litter)" ), 0, this, 0 ); actionEditSplitVertical->setStatusTip(tr("Lays out the selected widgets vertically in a splitter") ); actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically (in Splitter)" ) ); connect( actionEditSplitVertical, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutVerticalSplit() ) ); - actionEditSplitVertical->setEnabled( FALSE ); + actionEditSplitVertical->setEnabled( false ); actionEditBreakLayout = new TQAction( tr( "Break Layout" ), createIconSet("designer_editbreaklayout.png"), tr( "&Break Layout" ), CTRL + Key_B, this, 0 ); actionEditBreakLayout->setStatusTip(tr("Breaks the selected layout") ); actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) ); connect( actionEditBreakLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editBreakLayout() ) ); - actionEditBreakLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( false ); int id = WidgetDatabase::idFromClassName( "Spacer" ); actionInsertSpacer = new WidgetAction( "Layout", actionGroupTools, TQString::number( id ).latin1() ); - actionInsertSpacer->setToggleAction( TRUE ); + actionInsertSpacer->setToggleAction( true ); actionInsertSpacer->setText( WidgetDatabase::className( id ) ); actionInsertSpacer->setMenuText( tr( "Add ") + WidgetDatabase::className( id ) ); actionInsertSpacer->setIconSet( WidgetDatabase::iconSet( id ) ); @@ -422,7 +422,7 @@ void MainWindow::setupToolActions() { if ( !actionGroupTools ) { actionGroupTools = new TQActionGroup( this ); - actionGroupTools->setExclusive( TRUE ); + actionGroupTools->setExclusive( true ); connect( actionGroupTools, TQ_SIGNAL( selected(TQAction*) ), this, TQ_SLOT( toolSelected(TQAction*) ) ); } @@ -430,7 +430,7 @@ void MainWindow::setupToolActions() actionPointerTool = new TQAction( tr("Pointer"), createIconSet("designer_pointer.png"), tr("&Pointer"), Key_F2, actionGroupTools, - TQString::number(POINTER_TOOL).latin1(), TRUE ); + TQString::number(POINTER_TOOL).latin1(), true ); actionPointerTool->setStatusTip( tr("Selects the pointer tool") ); actionPointerTool->setWhatsThis( whatsThisFrom( "Tools|Pointer" ) ); @@ -439,21 +439,21 @@ void MainWindow::setupToolActions() tr("&Connect Signal/Slots"), singleProjectMode() ? 0 : Key_F3, actionGroupTools, - TQString::number(CONNECT_TOOL).latin1(), TRUE ); + TQString::number(CONNECT_TOOL).latin1(), true ); actionConnectTool->setStatusTip( tr("Selects the connection tool") ); actionConnectTool->setWhatsThis( whatsThisFrom( "Tools|Connect Signals and Slots" ) ); actionOrderTool = new TQAction( tr("Tab Order"), createIconSet("designer_ordertool.png"), tr("Tab &Order"), Key_F4, actionGroupTools, - TQString::number(ORDER_TOOL).latin1(), TRUE ); + TQString::number(ORDER_TOOL).latin1(), true ); actionOrderTool->setStatusTip( tr("Selects the tab order tool") ); actionOrderTool->setWhatsThis( whatsThisFrom( "Tools|Tab Order" ) ); actionBuddyTool = new TQAction( tr( "Set Buddy" ), createIconSet( "designer_setbuddy.png" ), tr( "Set &Buddy" ), Key_F12, actionGroupTools, TQString::number( BUDDY_TOOL ).latin1(), - TRUE ); + true ); actionBuddyTool->setStatusTip( tr( "Sets a buddy to a label" ) ); actionBuddyTool->setWhatsThis( whatsThisFrom( "Tools|Set Buddy" ) ); @@ -462,7 +462,7 @@ void MainWindow::setupToolActions() toolsToolBar = tb; TQWhatsThis::add( tb, tr( "<b>The Tools toolbar</b>%1" ).arg(tr(toolbarHelp).arg("")) ); - addToolBar( tb, tr( "Tools" ), TQMainWindow::DockTop, FALSE ); + addToolBar( tb, tr( "Tools" ), TQMainWindow::DockTop, false ); actionPointerTool->addTo( tb ); if ( !singleProjectMode() ) actionConnectTool->addTo( tb ); @@ -517,7 +517,7 @@ void MainWindow::setupToolActions() TQPopupMenu *menu = new TQPopupMenu( this, grp.latin1() ); mmenu->insertItem( grp, menu ); - TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, FALSE, grp.latin1() ); + TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, false, grp.latin1() ); tb2->setFrameStyle( TQFrame::NoFrame ); tb2->setOrientation( TQt::Vertical ); tb2->setBackgroundMode( PaletteBase ); @@ -537,7 +537,7 @@ void MainWindow::setupToolActions() continue; // only widgets, i.e. not forms and temp stuff WidgetAction* a = new WidgetAction( grp, actionGroupTools, TQString::number( i ).latin1() ); - a->setToggleAction( TRUE ); + a->setToggleAction( true ); TQString atext = WidgetDatabase::className( i ); if (( atext[0] == 'T' ) && ( atext[1] == 'Q' )) atext = atext.mid(2); @@ -593,7 +593,7 @@ void MainWindow::setupToolActions() actionToolsCustomWidget->addTo( customWidgetMenu ); customWidgetMenu->insertSeparator(); TQToolBar *tb2 = new TQToolBar( "Custom Widgets", 0, - toolBox, FALSE, "Custom Widgets" ); + toolBox, false, "Custom Widgets" ); tb2->setBackgroundMode(PaletteBase); tb2->setOrientation( TQt::Vertical ); tb2->setFrameStyle( TQFrame::NoFrame ); @@ -636,9 +636,9 @@ void MainWindow::setupFileActions() a->addTo( tb ); a->addTo( fileMenu ); } else { - actionGroupNew = new TQActionGroup( this, 0, FALSE ); + actionGroupNew = new TQActionGroup( this, 0, false ); a = actionGroupNew; - ( (TQActionGroup*)a )->setUsesDropDown( TRUE ); + ( (TQActionGroup*)a )->setUsesDropDown( true ); a->setText( tr( "New" ) ); a->setMenuText( tr( "&New..." ) ); a->setIconSet( createIconSet("designer_form.png") ); @@ -786,14 +786,14 @@ void MainWindow::setupProjectActions() TQActionGroup *ag = new TQActionGroup( this, 0 ); ag->setText( tr( "Active Project" ) ); ag->setMenuText( tr( "Active Project" ) ); - ag->setExclusive( TRUE ); - ag->setUsesDropDown( TRUE ); + ag->setExclusive( true ); + ag->setUsesDropDown( true ); connect( ag, TQ_SIGNAL( selected( TQAction * ) ), this, TQ_SLOT( projectSelected( TQAction * ) ) ); connect( ag, TQ_SIGNAL( selected( TQAction * ) ), this, TQ_SIGNAL( projectChanged() ) ); - TQAction *a = new TQAction( tr( "<No Project>" ), tr( "<No Project>" ), 0, ag, 0, TRUE ); - eProject = new Project( "", tr( "<No Project>" ), projectSettingsPluginManager, TRUE ); + TQAction *a = new TQAction( tr( "<No Project>" ), tr( "<No Project>" ), 0, ag, 0, true ); + eProject = new Project( "", tr( "<No Project>" ), projectSettingsPluginManager, true ); projects.insert( a, eProject ); - a->setOn( TRUE ); + a->setOn( true ); ag->addTo( projectMenu ); ag->addTo( projectToolBar ); actionGroupProjects = ag; @@ -805,7 +805,7 @@ void MainWindow::setupProjectActions() a->setStatusTip( tr("Adds a file to the current project") ); a->setWhatsThis( whatsThisFrom( "Project|Add File" ) ); connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( projectInsertFile() ) ); - a->setEnabled( FALSE ); + a->setEnabled( false ); connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); if ( !singleProject ) a->addTo( projectMenu ); @@ -815,7 +815,7 @@ void MainWindow::setupProjectActions() actionEditPixmapCollection->setStatusTip( tr("Opens a dialog for editing the current project's image collection") ); actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) ); connect( actionEditPixmapCollection, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPixmapCollection() ) ); - actionEditPixmapCollection->setEnabled( FALSE ); + actionEditPixmapCollection->setEnabled( false ); connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQ_SLOT( setEnabled(bool) ) ); actionEditPixmapCollection->addTo( projectMenu ); @@ -825,7 +825,7 @@ void MainWindow::setupProjectActions() actionEditDatabaseConnections->setStatusTip( tr("Opens a dialog for editing the current project's database connections") ); actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) ); connect( actionEditDatabaseConnections, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDatabaseConnections() ) ); - //actionEditDatabaseConnections->setEnabled( FALSE ); + //actionEditDatabaseConnections->setEnabled( false ); //connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQ_SLOT( setEnabled(bool) ) ); if ( !singleProject ) actionEditDatabaseConnections->addTo( projectMenu ); @@ -836,7 +836,7 @@ void MainWindow::setupProjectActions() actionEditProjectSettings->setStatusTip( tr("Opens a dialog to change the project's settings") ); actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) ); connect( actionEditProjectSettings, TQ_SIGNAL( activated() ), this, TQ_SLOT( editProjectSettings() ) ); - actionEditProjectSettings->setEnabled( FALSE ); + actionEditProjectSettings->setEnabled( false ); connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQ_SLOT( setEnabled(bool) ) ); actionEditProjectSettings->addTo( projectMenu ); @@ -892,9 +892,9 @@ void MainWindow::setupPreviewActions() void MainWindow::setupWindowActions() { - static bool windowActionsSetup = FALSE; + static bool windowActionsSetup = false; if ( !windowActionsSetup ) { - windowActionsSetup = TRUE; + windowActionsSetup = true; actionWindowTile = new TQAction( tr( "Tile" ), tr( "&Tile" ), 0, this ); actionWindowTile->setStatusTip( tr("Tiles the windows so that they are all visible") ); @@ -1032,10 +1032,10 @@ void MainWindow::fileNewDialog() while ( currentProject->findFormFile( n + ".ui" ) ) n = "Dialog" + TQString::number( ++forms ); FormWindow *fw = 0; - FormFile *ff = new FormFile( n + ".ui", FALSE, currentProject ); + FormFile *ff = new FormFile( n + ".ui", false, currentProject ); fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); - ff->setModified( TRUE ); - currentProject->setModified( TRUE ); + ff->setModified( true ); + currentProject->setModified( true ); workspace()->update(); fw->setProject( currentProject ); MetaDataBase::addEntry( fw ); @@ -1045,10 +1045,10 @@ void MainWindow::fileNewDialog() fw->resize( 600, 480 ); insertFormWindow( fw ); fw->killAccels( fw ); - fw->project()->setModified( TRUE ); + fw->project()->setModified( true ); fw->setFocus(); - fw->setSavePixmapInProject( TRUE ); - fw->setSavePixmapInline( FALSE ); + fw->setSavePixmapInProject( true ); + fw->setSavePixmapInline( false ); } void MainWindow::fileNewFile() @@ -1058,10 +1058,10 @@ void MainWindow::fileNewFile() return; if ( name.right( 3 ) != ".qs" ) name += ".qs"; - SourceFile *f = new SourceFile( name, FALSE, currentProject ); + SourceFile *f = new SourceFile( name, false, currentProject ); MainWindow::self->editSource( f ); - f->setModified( TRUE ); - currentProject->setModified( TRUE ); + f->setModified( true ); + currentProject->setModified( true ); workspace()->update(); } @@ -1121,7 +1121,7 @@ void MainWindow::fileCloseProject() } TQWidgetList windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( TRUE ); + qWorkspace()->blockSignals( true ); TQWidgetListIt wit( windows ); while ( wit.current() ) { TQWidget *w = wit.current(); @@ -1140,7 +1140,7 @@ void MainWindow::fileCloseProject() } hierarchyView->clear(); windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( FALSE ); + qWorkspace()->blockSignals( false ); actionGroupProjects->removeChild( a ); projects.remove( a ); delete a; @@ -1158,16 +1158,16 @@ void MainWindow::fileCloseProject() break; } } else { - emit hasActiveWindow( FALSE ); - emit hasActiveForm( FALSE ); - updateUndoRedo( FALSE, FALSE, TQString::null, TQString::null ); + emit hasActiveWindow( false ); + emit hasActiveForm( false ); + updateUndoRedo( false, false, TQString::null, TQString::null ); } } } void MainWindow::fileOpen() // as called by the menu { - fileOpen( "", "", "", FALSE ); + fileOpen( "", "", "", false ); } void MainWindow::projectInsertFile() @@ -1227,24 +1227,24 @@ TQ_EXPORT void MainWindow::fileOpen( const TQString &filter, const TQString &ext if ( !filename.isEmpty() ) { TQFileInfo fi( filename ); - if ( fi.extension( FALSE ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) { + if ( fi.extension( false ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) { addRecentlyOpened( filename, recentlyProjects ); openProject( filename ); - } else if ( fi.extension( FALSE ) == "ui" && ( extension.isEmpty() || extension.find( ";ui" ) != -1 ) ) { + } else if ( fi.extension( false ) == "ui" && ( extension.isEmpty() || extension.find( ";ui" ) != -1 ) ) { if ( !inProject ) setCurrentProject( eProject ); openFormWindow( filename ); addRecentlyOpened( filename, recentlyFiles ); - } else if ( ( !extension.isEmpty() && extension.find( ";" + fi.extension( FALSE ) ) != -1 ) || - additionalSources.find( fi.extension( FALSE ) ) != additionalSources.end() ) { + } else if ( ( !extension.isEmpty() && extension.find( ";" + fi.extension( false ) ) != -1 ) || + additionalSources.find( fi.extension( false ) ) != additionalSources.end() ) { SourceFile *sf = project->findSourceFile( project->makeRelative( filename ) ); if ( !sf ) - sf = new SourceFile( project->makeRelative( filename ), FALSE, project ); + sf = new SourceFile( project->makeRelative( filename ), false, project ); editSource( sf ); } else if ( extension.isEmpty() ) { TQString filter; for ( TQStringList::Iterator it2 = filterlist.begin(); it2 != filterlist.end(); ++it2 ) { - if ( (*it2).contains( "." + fi.extension( FALSE ), FALSE ) ) { + if ( (*it2).contains( "." + fi.extension( false ), false ) ) { filter = *it2; break; } @@ -1268,7 +1268,7 @@ TQ_EXPORT void MainWindow::fileOpen( const TQString &filter, const TQString &ext setCurrentProject( eProject ); addRecentlyOpened( filename, recentlyFiles ); for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - openFormWindow( *it, FALSE ); + openFormWindow( *it, false ); TQFile::remove( *it ); } statusBar()->clear(); @@ -1283,10 +1283,10 @@ TQ_EXPORT FormWindow *MainWindow::openFormWindow( const TQString &filename, bool if ( filename.isEmpty() ) return 0; - bool makeNew = FALSE; + bool makeNew = false; if ( !TQFile::exists( filename ) ) { - makeNew = TRUE; + makeNew = true; } else { TQFile f( filename ); f.open( IO_ReadOnly ); @@ -1312,7 +1312,7 @@ TQ_EXPORT FormWindow *MainWindow::openFormWindow( const TQString &filename, bool TQApplication::setOverrideCursor( WaitCursor ); Resource resource( this ); if ( !ff ) - ff = new FormFile( currentProject->makeRelative( filename ), FALSE, currentProject ); + ff = new FormFile( currentProject->makeRelative( filename ), false, currentProject ); bool b = resource.load( ff ) && (FormWindow*)resource.widget(); if ( !validFileName && resource.widget() ) ( (FormWindow*)resource.widget() )->setFileName( TQString::null ); @@ -1354,7 +1354,7 @@ bool MainWindow::fileSaveForm() fw = se->formWindow(); else if ( se->sourceFile() ) { se->sourceFile()->save(); - return TRUE; + return true; } } } @@ -1362,16 +1362,16 @@ bool MainWindow::fileSaveForm() if ( !fw ) fw = formWindow(); if ( !fw || !fw->formFile()->save() ) - return FALSE; + return false; TQApplication::restoreOverrideCursor(); - return TRUE; + return true; } bool MainWindow::fileSaveProject() { currentProject->save(); statusBar()->message( tr( "Project '%1' saved.").arg( currentProject->projectName() ), 3000 ); - return TRUE; + return true; } bool MainWindow::fileSaveAs() @@ -1380,12 +1380,12 @@ bool MainWindow::fileSaveAs() TQWidget *w = qworkspace->activeWindow(); if ( !w ) - return TRUE; + return true; if ( ::tqt_cast<FormWindow*>(w) ) return ( (FormWindow*)w )->formFile()->saveAs(); else if ( ::tqt_cast<SourceEditor*>(w) ) return ( (SourceEditor*)w )->saveAs(); - return FALSE; + return false; } void MainWindow::fileSaveAll() @@ -1396,7 +1396,7 @@ void MainWindow::fileSaveAll() void MainWindow::fileCreateTemplate() { - CreateTemplate dia( this, 0, TRUE ); + CreateTemplate dia( this, 0, true ); int i = 0; for ( i = 0; i < WidgetDatabase::count(); ++i ) { @@ -1544,7 +1544,7 @@ void MainWindow::editPaste() if ( w && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { formWindow()->paste( tqApp->clipboard()->text(), WidgetFactory::containerOfWidget( w ) ); hierarchyView->widgetInserted( 0 ); - formWindow()->commandHistory()->setModified( TRUE ); + formWindow()->commandHistory()->setModified( true ); } else { TQMessageBox::information( this, tr( "Paste error" ), tr( "Can't paste widgets. Designer couldn't find a container\n" @@ -1709,7 +1709,7 @@ void MainWindow::editFunctions() return; statusBar()->message( tr( "Edit the current form's slots..." ) ); - EditFunctions dlg( this, formWindow(), TRUE ); + EditFunctions dlg( this, formWindow(), true ); dlg.exec(); statusBar()->clear(); } @@ -1803,7 +1803,7 @@ SourceEditor *MainWindow::createSourceEditor( TQObject *object, Project *project if ( editor->object() != object ) editor->setObject( object, project ); else if ( rereadSource ) - editor->refresh( FALSE ); + editor->refresh( false ); editor->show(); editor->setFocus(); @@ -1833,7 +1833,7 @@ void MainWindow::editProjectSettings() void MainWindow::editPixmapCollection() { - PixmapCollectionEditor dia( this, 0, TRUE ); + PixmapCollectionEditor dia( this, 0, true ); dia.setProject( currentProject ); dia.exec(); } @@ -1841,7 +1841,7 @@ void MainWindow::editPixmapCollection() void MainWindow::editDatabaseConnections() { #ifndef TQT_NO_SQL - DatabaseConnectionsEditor dia( currentProject, this, 0, TRUE ); + DatabaseConnectionsEditor dia( currentProject, this, 0, true ); dia.exec(); #endif } @@ -1849,7 +1849,7 @@ void MainWindow::editDatabaseConnections() void MainWindow::editPreferences() { statusBar()->message( tr( "Edit preferences..." ) ); - Preferences *dia = new Preferences( this, 0, TRUE ); + Preferences *dia = new Preferences( this, 0, true ); prefDia = dia; connect( dia->helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); dia->buttonColor->setEditor( StyledButton::ColorEditor ); @@ -1866,9 +1866,9 @@ void MainWindow::editPreferences() if ( qworkspace->backgroundPixmap() ) dia->buttonPixmap->setPixmap( *qworkspace->backgroundPixmap() ); if ( backPix ) - dia->radioPixmap->setChecked( TRUE ); + dia->radioPixmap->setChecked( true ); else - dia->radioColor->setChecked( TRUE ); + dia->radioColor->setChecked( true ); dia->checkBoxSplash->setChecked( splashScreen ); dia->checkAutoEdit->setChecked( !databaseAutoEdit ); dia->checkBoxStartDialog->setChecked( shStartDialog ); @@ -1903,15 +1903,15 @@ void MainWindow::editPreferences() if (dia->textEditPluginPaths->isModified()) { pluginPaths = dia->textEditPluginPaths->text(); TQApplication::setLibraryPaths(TQStringList::split("\n", pluginPaths)); - savePluginPaths = TRUE; + savePluginPaths = true; } if ( dia->radioPixmap->isChecked() && dia->buttonPixmap->pixmap() ) { qworkspace->setBackgroundPixmap( *dia->buttonPixmap->pixmap() ); - backPix = TRUE; + backPix = true; } else { qworkspace->setBackgroundColor( dia->buttonColor->color() ); - backPix = FALSE; + backPix = false; } splashScreen = dia->checkBoxSplash->isChecked(); databaseAutoEdit = !dia->checkAutoEdit->isChecked(); @@ -1928,7 +1928,7 @@ void MainWindow::editPreferences() for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) { Tab t = *it; dia->tabWidget->removePage( t.w ); - t.w->reparent( 0, TQPoint(0,0), FALSE ); + t.w->reparent( 0, TQPoint(0,0), false ); } for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) @@ -1946,7 +1946,7 @@ void MainWindow::searchFind() return; if ( !findDialog ) - findDialog = new FindDialog( this, 0, FALSE ); + findDialog = new FindDialog( this, 0, false ); findDialog->show(); findDialog->raise(); findDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(), @@ -1968,7 +1968,7 @@ void MainWindow::searchIncremetalFind() return; ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), - FALSE, FALSE, TRUE, FALSE ); + false, false, true, false ); } void MainWindow::searchIncremetalFindNext() @@ -1978,7 +1978,7 @@ void MainWindow::searchIncremetalFindNext() return; ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), - FALSE, FALSE, TRUE, TRUE ); + false, false, true, true ); } void MainWindow::searchReplace() @@ -1988,7 +1988,7 @@ void MainWindow::searchReplace() return; if ( !replaceDialog ) - replaceDialog = new ReplaceDialog( this, 0, FALSE ); + replaceDialog = new ReplaceDialog( this, 0, false ); replaceDialog->show(); replaceDialog->raise(); replaceDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(), @@ -2004,7 +2004,7 @@ void MainWindow::searchGotoLine() return; if ( !gotoLineDialog ) - gotoLineDialog = new GotoLineDialog( this, 0, FALSE ); + gotoLineDialog = new GotoLineDialog( this, 0, false ); gotoLineDialog->show(); gotoLineDialog->raise(); gotoLineDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface() ); diff --git a/tools/designer/designer/menubareditor.cpp b/tools/designer/designer/menubareditor.cpp index fa763b54f..5bd1ecd37 100644 --- a/tools/designer/designer/menubareditor.cpp +++ b/tools/designer/designer/menubareditor.cpp @@ -83,13 +83,13 @@ bool MenuBarEditorItemPtrDrag::decode( TQDropEvent * e, MenuBarEditorItem ** i ) TQDataStream stream( data, IO_ReadOnly ); if ( !data.size() ) - return FALSE; + return false; TQ_LONG p = 0; stream >> p; *i = ( MenuBarEditorItem *) p; - return TRUE; + return true; } // MenuBarEditorItem --------------------------------------------------- @@ -98,9 +98,9 @@ MenuBarEditorItem::MenuBarEditorItem( MenuBarEditor * bar, TQObject * parent, co : TQObject( parent, name ), menuBar( bar ), popupMenu( 0 ), - visible( TRUE ), - separator( FALSE ), - removable( FALSE ) + visible( true ), + separator( false ), + removable( false ) { } MenuBarEditorItem::MenuBarEditorItem( PopupMenuEditor * menu, MenuBarEditor * bar, @@ -108,9 +108,9 @@ MenuBarEditorItem::MenuBarEditorItem( PopupMenuEditor * menu, MenuBarEditor * ba : TQObject( parent, name ), menuBar( bar ), popupMenu( menu ), - visible( TRUE ), - separator( FALSE ), - removable( TRUE ) + visible( true ), + separator( false ), + removable( true ) { text = menu->name(); } @@ -120,9 +120,9 @@ MenuBarEditorItem::MenuBarEditorItem( TQActionGroup * actionGroup, MenuBarEditor : TQObject( parent, name ), menuBar( bar ), popupMenu( 0 ), - visible( TRUE ), - separator( FALSE ), - removable( TRUE ) + visible( true ), + separator( false ), + removable( true ) { text = actionGroup->menuText(); popupMenu = new PopupMenuEditor( menuBar->formWindow(), menuBar ); @@ -153,10 +153,10 @@ MenuBarEditor::MenuBarEditor( FormWindow * fw, TQWidget * parent, const char * n currentIndex( 0 ), itemHeight( 0 ), separatorWidth( 32 ), - hideWhenEmpty( TRUE ), - hasSeparator( FALSE ) + hideWhenEmpty( true ), + hasSeparator( false ) { - setAcceptDrops( TRUE ); + setAcceptDrops( true ); setFocusPolicy( StrongFocus ); addItem.setMenuText( tr("new menu") ); @@ -179,7 +179,7 @@ MenuBarEditor::MenuBarEditor( FormWindow * fw, TQWidget * parent, const char * n MenuBarEditor::~MenuBarEditor() { - itemList.setAutoDelete( TRUE ); + itemList.setAutoDelete( true ); } FormWindow * MenuBarEditor::formWindow() @@ -243,9 +243,9 @@ void MenuBarEditor::insertSeparator( int index ) return; MenuBarEditorItem * i = createItem( index ); - i->setSeparator( TRUE ); + i->setSeparator( true ); i->setMenuText( "separator" ); - hasSeparator = TRUE; + hasSeparator = true; } void MenuBarEditor::removeItemAt( int index ) @@ -260,7 +260,7 @@ void MenuBarEditor::removeItem( MenuBarEditorItem * item ) itemList.removeRef( item ) ) { if ( item->isSeparator() ) - hasSeparator = FALSE; + hasSeparator = false; if ( hideWhenEmpty && itemList.count() == 0 ) hide(); @@ -623,20 +623,20 @@ void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e ) { if ( e->state() & TQt::LeftButton ) { if ( ( e->pos() - mousePressPos ).manhattanLength() > 3 ) { - bool itemCreated = FALSE; - bool isSeparator = FALSE; + bool itemCreated = false; + bool isSeparator = false; draggedItem = item( findItem( mousePressPos ) ); if ( draggedItem == &addItem ) { draggedItem = createItem(); - itemCreated = TRUE; + itemCreated = true; } else if ( draggedItem == &addSeparator ) { if (hasSeparator) // we can only have one separator return; draggedItem = createItem(); - draggedItem->setSeparator( TRUE ); + draggedItem->setSeparator( true ); draggedItem->setMenuText( "separator" ); - isSeparator = TRUE; - itemCreated = TRUE; + isSeparator = true; + itemCreated = true; } else { isSeparator = draggedItem->isSeparator(); } @@ -645,7 +645,7 @@ void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e ) new MenuBarEditorItemPtrDrag( draggedItem, this ); d->setPixmap( createTextPixmap( draggedItem->menuText() ) ); hideItem(); - draggedItem->setVisible( FALSE ); + draggedItem->setVisible( false ); update(); // If the item is dropped in the same list, @@ -653,21 +653,21 @@ void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e ) // in the list. itemList.find( draggedItem ); TQLNode * node = itemList.currentNode(); - dropConfirmed = FALSE; + dropConfirmed = false; d->dragCopy(); // dragevents and stuff happens if ( draggedItem ) { // item was not dropped if ( itemCreated ) { removeItem( draggedItem ); } else { hideItem(); - draggedItem->setVisible( TRUE ); + draggedItem->setVisible( true ); draggedItem = 0; showItem(); } } else if ( dropConfirmed ) { // item was dropped - dropConfirmed = FALSE; + dropConfirmed = false; hideItem(); - itemList.takeNode( node )->setVisible( TRUE ); + itemList.takeNode( node )->setVisible( true ); hasSeparator = isSeparator || hasSeparator; showItem(); } else { @@ -1012,10 +1012,10 @@ void MenuBarEditor::dropInPlace( MenuBarEditorItem * i, const TQPoint & pos ) int iidx = itemList.findRef( i ); if ( iidx != -1 ) { // internal dnd cmd = new MoveMenuCommand( "Item Dragged", formWnd, this, iidx, idx ); - item( iidx )->setVisible( TRUE ); + item( iidx )->setVisible( true ); } else { cmd = new AddMenuCommand( "Add Menu", formWnd, this, i, idx ); - dropConfirmed = TRUE; // let mouseMoveEvent set the item visible + dropConfirmed = true; // let mouseMoveEvent set the item visible } formWnd->commandHistory()->addCommand( cmd ); cmd->execute(); diff --git a/tools/designer/designer/menubareditor.h b/tools/designer/designer/menubareditor.h index f1d87f206..c2d045063 100644 --- a/tools/designer/designer/menubareditor.h +++ b/tools/designer/designer/menubareditor.h @@ -95,7 +95,7 @@ public: FormWindow * formWindow(); - MenuBarEditorItem * createItem( int index = -1, bool addToCmdStack = TRUE ); + MenuBarEditorItem * createItem( int index = -1, bool addToCmdStack = true ); void insertItem( MenuBarEditorItem * item, int index = -1 ); void insertItem( TQString text, PopupMenuEditor * menu, int index = -1 ); void insertItem( TQString text, TQActionGroup * group, int index = -1 ); diff --git a/tools/designer/designer/metadatabase.cpp b/tools/designer/designer/metadatabase.cpp index bdfd5cb97..9a75f0181 100644 --- a/tools/designer/designer/metadatabase.cpp +++ b/tools/designer/designer/metadatabase.cpp @@ -86,7 +86,7 @@ public: static TQPtrDict<MetaDataBaseRecord> *db = 0; static TQPtrList<MetaDataBase::CustomWidget> *cWidgets = 0; -static bool doUpdate = TRUE; +static bool doUpdate = true; static TQStringList langList; static TQStringList editorLangList; static TQPluginManager<LanguageInterface> *languageInterfaceManager = 0; @@ -108,9 +108,9 @@ inline void setupDataBase() { if ( !db || !cWidgets ) { db = new TQPtrDict<MetaDataBaseRecord>( 1481 ); - db->setAutoDelete( TRUE ); + db->setAutoDelete( true ); cWidgets = new TQPtrList<MetaDataBase::CustomWidget>; - cWidgets->setAutoDelete( TRUE ); + cWidgets->setAutoDelete( true ); } } @@ -167,20 +167,20 @@ void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bo if ( doUpdate && ( property == "hAlign" || property == "vAlign" || property == "wordwrap" ) ) { - doUpdate = FALSE; + doUpdate = false; setPropertyChanged( o, "alignment", changed || isPropertyChanged( o, "hAlign" ) || isPropertyChanged( o, "vAlign" ) || isPropertyChanged( o, "wordwrap" ) ); - doUpdate = TRUE; + doUpdate = true; } if ( doUpdate && property == "alignment" ) { - doUpdate = FALSE; + doUpdate = false; setPropertyChanged( o, "hAlign", changed ); setPropertyChanged( o, "vAlign", changed ); setPropertyChanged( o, "wordwrap", changed ); - doUpdate = TRUE; + doUpdate = true; } } @@ -193,7 +193,7 @@ bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property ) if ( !r ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return FALSE; + return false; } return r->changedProperties.findIndex( property ) != -1; @@ -350,13 +350,13 @@ void MetaDataBase::setMargin( TQObject *o, int margin ) TQLayout * layout = 0; WidgetFactory::layoutType( (TQWidget*)o, layout ); - bool isInnerLayout = TRUE; + bool isInnerLayout = true; TQWidget *widget = (TQWidget*)o; if ( widget && !::tqt_cast<TQLayoutWidget*>(widget) && ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) || ( widget && widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) ) - isInnerLayout = FALSE; + isInnerLayout = false; if ( layout ) { @@ -528,7 +528,7 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte formfile->formWindow()->mainContainer() : formfile->project()->objectForFakeFormFile( formfile ), (*cit).slot.latin1(), - FALSE ); + false ); } } @@ -540,7 +540,7 @@ bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString if ( !r ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return FALSE; + return false; } for ( TQValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { @@ -549,9 +549,9 @@ bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString conn.signal == signal && conn.receiver == receiver && conn.slot == slot ) - return TRUE; + return true; } - return FALSE; + return false; } @@ -629,7 +629,7 @@ void MetaDataBase::doConnections( TQObject *o ) if ( qstrcmp( conn.sender->name(), o->name() ) == 0 ) { sender = o; } else { - l = o->queryList( 0, conn.sender->name(), FALSE ); + l = o->queryList( 0, conn.sender->name(), false ); if ( !l || !l->first() ) { delete l; continue; @@ -640,7 +640,7 @@ void MetaDataBase::doConnections( TQObject *o ) if ( qstrcmp( conn.receiver->name(), o->name() ) == 0 ) { receiver = o; } else { - l = o->queryList( 0, conn.receiver->name(), FALSE ); + l = o->queryList( 0, conn.receiver->name(), false ); if ( !l || !l->first() ) { delete l; continue; @@ -653,8 +653,8 @@ void MetaDataBase::doConnections( TQObject *o ) TQString s2 = "1""%1"; s2 = s2.arg( conn.slot ); - TQStrList signalList = sender->metaObject()->signalNames( TRUE ); - TQStrList slotList = receiver->metaObject()->slotNames( TRUE ); + TQStrList signalList = sender->metaObject()->signalNames( true ); + TQStrList slotList = receiver->metaObject()->slotNames( true ); // avoid warnings if ( signalList.find( conn.signal ) == -1 || @@ -672,19 +672,19 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom if ( !r ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return FALSE; + return false; } if ( !onlyCustom ) { - TQStrList slotList = o->metaObject()->slotNames( TRUE ); + TQStrList slotList = o->metaObject()->slotNames( true ); if ( slotList.find( slot ) != -1 ) - return TRUE; + return true; if ( ::tqt_cast<FormWindow*>(o) ) { o = ( (FormWindow*)o )->mainContainer(); - slotList = o->metaObject()->slotNames( TRUE ); + slotList = o->metaObject()->slotNames( true ); if ( slotList.find( slot ) != -1 ) - return TRUE; + return true; } //if ( ::tqt_cast<CustomWidget*>(o) ) { @@ -695,7 +695,7 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom if ( !s.data() ) continue; if ( s == slot ) - return TRUE; + return true; } } } @@ -703,10 +703,10 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { Function f = *it; if ( normalizeFunction( f.function ) == normalizeFunction( slot ) && f.type == "slot" ) - return TRUE; + return true; } - return FALSE; + return false; } bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot ) @@ -716,15 +716,15 @@ bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot ) if ( !r ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return FALSE; + return false; } TQValueList<Connection> conns = connections( o ); for ( TQValueList<Connection>::Iterator it = conns.begin(); it != conns.end(); ++it ) { if ( (*it).slot == slot ) - return TRUE; + return true; } - return FALSE; + return false; } @@ -902,19 +902,19 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl if ( !r ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return FALSE; + return false; } if ( !onlyCustom ) { - TQStrList functionList = o->metaObject()->slotNames( TRUE ); + TQStrList functionList = o->metaObject()->slotNames( true ); if ( functionList.find( function ) != -1 ) - return TRUE; + return true; if ( ::tqt_cast<FormWindow*>(o) ) { o = ( (FormWindow*)o )->mainContainer(); - functionList = o->metaObject()->slotNames( TRUE ); + functionList = o->metaObject()->slotNames( true ); if ( functionList.find( function ) != -1 ) - return TRUE; + return true; } //if ( ::tqt_cast<CustomWidget*>(o) ) { @@ -925,7 +925,7 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl if ( !s.data() ) continue; if ( s == function ) - return TRUE; + return true; } } } @@ -933,10 +933,10 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { Function f = *it; if ( normalizeFunction( f.function ) == normalizeFunction( function ) ) - return TRUE; + return true; } - return FALSE; + return false; } TQString MetaDataBase::languageOfFunction( TQObject *o, const TQCString &function ) @@ -976,7 +976,7 @@ bool MetaDataBase::addCustomWidget( CustomWidget *wid ) w->lstProperties.append( *it3 ); } delete wid; - return FALSE; + return false; } } @@ -990,7 +990,7 @@ bool MetaDataBase::addCustomWidget( CustomWidget *wid ) r->isContainer = wid->isContainer; wid->id = WidgetDatabase::addCustomWidget( r ); cWidgets->append( wid ); - return TRUE; + return true; } void MetaDataBase::removeCustomWidget( CustomWidget *w ) @@ -1019,18 +1019,18 @@ bool MetaDataBase::isWidgetNameUsed( CustomWidget *wid ) if ( w == wid ) continue; if ( wid->className == w->className ) - return TRUE; + return true; } - return FALSE; + return false; } bool MetaDataBase::hasCustomWidget( const TQString &className ) { for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { if ( w->className == className ) - return TRUE; + return true; } - return FALSE; + return false; } void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order ) @@ -1177,15 +1177,15 @@ bool MetaDataBase::hasVariable( TQObject *o, const TQString &name ) if ( !r ) { tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", o, o->name(), o->className() ); - return FALSE; + return false; } TQValueList<Variable>::Iterator it = r->variables.begin(); for ( ; it != r->variables.end(); ++it ) { if ( extractVariableName( name ) == extractVariableName( (*it).varName ) ) - return TRUE; + return true; } - return FALSE; + return false; } TQString MetaDataBase::extractVariableName( const TQString &name ) @@ -1282,7 +1282,7 @@ MetaDataBase::CustomWidget::CustomWidget() pixmap = new TQPixmap( TQPixmap::fromMimeSource( "designer_customwidget.png" ) ); id = -1; sizePolicy = TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ); - isContainer = FALSE; + isContainer = false; } MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w ) @@ -1356,40 +1356,40 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const { - TQStrList sigList = TQWidget::staticMetaObject()->signalNames( TRUE ); + TQStrList sigList = TQWidget::staticMetaObject()->signalNames( true ); if ( sigList.find( signal ) != -1 ) - return TRUE; + return true; for ( TQValueList<TQCString>::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) { if ( normalizeFunction( *it ) == normalizeFunction( signal ) ) - return TRUE; + return true; } - return FALSE; + return false; } bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const { - TQStrList slotList = TQWidget::staticMetaObject()->slotNames( TRUE ); + TQStrList slotList = TQWidget::staticMetaObject()->slotNames( true ); if ( slotList.find( normalizeFunction( slot ) ) != -1 ) - return TRUE; + return true; for ( TQValueList<MetaDataBase::Function>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) { if ( normalizeFunction( (*it).function ) == normalizeFunction( slot ) ) - return TRUE; + return true; } - return FALSE; + return false; } bool MetaDataBase::CustomWidget::hasProperty( const TQCString &prop ) const { - TQStrList propList = TQWidget::staticMetaObject()->propertyNames( TRUE ); + TQStrList propList = TQWidget::staticMetaObject()->propertyNames( true ); if ( propList.find( prop ) != -1 ) - return TRUE; + return true; for ( TQValueList<MetaDataBase::Property>::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) { if ( (*it).property == prop ) - return TRUE; + return true; } - return FALSE; + return false; } void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &arg ) diff --git a/tools/designer/designer/metadatabase.h b/tools/designer/designer/metadatabase.h index 21711c51d..b538aafa1 100644 --- a/tools/designer/designer/metadatabase.h +++ b/tools/designer/designer/metadatabase.h @@ -142,7 +142,7 @@ public: struct MetaInfo { - MetaInfo() : classNameChanged( FALSE ) { } + MetaInfo() : classNameChanged( false ) { } TQString className; bool classNameChanged; TQString comment; @@ -173,7 +173,7 @@ public: static TQString resizeMode( TQObject *o ); static void addConnection( TQObject *o, TQObject *sender, const TQCString &signal, - TQObject *receiver, const TQCString &slot, bool addCode = TRUE ); + TQObject *receiver, const TQCString &slot, bool addCode = true ); static void removeConnection( TQObject *o, TQObject *sender, const TQCString &signal, TQObject *receiver, const TQCString &slot ); static bool hasConnection( TQObject *o, TQObject *sender, const TQCString &signal, @@ -191,11 +191,11 @@ public: const TQString &access, const TQString &type, const TQString &language, const TQString &returnType ); static void removeFunction( TQObject *o, const TQString &function ); - static TQValueList<Function> functionList( TQObject *o, bool onlyFunctions = FALSE ); + static TQValueList<Function> functionList( TQObject *o, bool onlyFunctions = false ); static TQValueList<Function> slotList( TQObject *o ); static bool isSlotUsed( TQObject *o, const TQCString &slot ); - static bool hasFunction( TQObject *o, const TQCString &function, bool onlyCustom = FALSE ); - static bool hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom = FALSE ); + static bool hasFunction( TQObject *o, const TQCString &function, bool onlyCustom = false ); + static bool hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom = false ); static void changeFunction( TQObject *o, const TQString &function, const TQString &newName, const TQString &returnType ); static void changeFunctionAttributes( TQObject *o, const TQString &oldName, const TQString &newName, diff --git a/tools/designer/designer/multilineeditorimpl.cpp b/tools/designer/designer/multilineeditorimpl.cpp index 709ebd596..aa970d070 100644 --- a/tools/designer/designer/multilineeditorimpl.cpp +++ b/tools/designer/designer/multilineeditorimpl.cpp @@ -86,7 +86,7 @@ TQTextParagraph* TextEdit::paragraph() MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget *parent, TQWidget *editWidget, FormWindow *fw, const TQString &text ) - : MultiLineEditorBase( parent, 0, WType_Dialog | WShowModal ), formwindow( fw ), doWrap( FALSE ) + : MultiLineEditorBase( parent, 0, WType_Dialog | WShowModal ), formwindow( fw ), doWrap( false ) { callStatic = call_static; @@ -214,7 +214,7 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget optionsToolBar = new TQToolBar( "Options", this, DockTop ); wrapAction = new TQAction( this ); - wrapAction->setToggleAction( TRUE ); + wrapAction->setToggleAction( true ); wrapAction->setIconSet( TQPixmap::fromMimeSource( "designer_wordwrap.png" ) ); wrapAction->setText( tr( "Word Wrapping" ) ); wrapAction->addTo( optionsToolBar ); @@ -226,22 +226,22 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); textEdit->document()->setFormatter( new TQTextFormatterBreakInWords ); - textEdit->document()->setUseFormatCollection( FALSE ); + textEdit->document()->setUseFormatCollection( false ); textEdit->document()->setPreProcessor( new SyntaxHighlighter_HTML ); if ( !callStatic && ::tqt_cast<TQTextEdit*>(editWidget) ) { mlined = (TQTextEdit*)editWidget; - mlined->setReadOnly( TRUE ); + mlined->setReadOnly( true ); const TQMetaProperty *wordWrap = mlined->metaObject()->property( - mlined->metaObject()->findProperty( "wordWrap", TRUE ), TRUE ); + mlined->metaObject()->findProperty( "wordWrap", true ), true ); oldWrapMode = 0; oldWrapString = "NoWrap"; if ( wordWrap ) { oldWrapMode = mlined->property( "wordWrap" ); oldWrapString = TQString( wordWrap->valueToKey( oldWrapMode.toInt() ) ); if ( oldWrapString != "NoWrap" ) - doWrap = TRUE; + doWrap = true; } textEdit->setAlignment( mlined->alignment() ); textEdit->setWordWrap( mlined->wordWrap() ); @@ -298,7 +298,7 @@ void MultiLineEditor::applyClicked() TQVariant( 0 ), "NoWrap", oldWrapString ); propcmd->execute(); - formwindow->commandHistory()->addCommand( propcmd, TRUE ); + formwindow->commandHistory()->addCommand( propcmd, true ); } textEdit->setFocus(); } @@ -348,11 +348,11 @@ void MultiLineEditor::insertBR() void MultiLineEditor::showFontDialog() { - bool selText = FALSE; + bool selText = false; int pfrom, pto, ifrom, ito; if ( textEdit->hasSelectedText() ) { textEdit->getSelection( &pfrom, &ifrom, &pto, &ito ); - selText = TRUE; + selText = true; } RichTextFontDialog *fd = new RichTextFontDialog( this ); if ( fd->exec() == TQDialog::Accepted ) { @@ -382,7 +382,7 @@ TQString MultiLineEditor::getStaticText() TQString MultiLineEditor::getText( TQWidget *parent, const TQString &text, bool richtextMode, bool *useWrap ) { - MultiLineEditor medit( TRUE, richtextMode, parent, 0, 0, text ); + MultiLineEditor medit( true, richtextMode, parent, 0, 0, text ); if ( richtextMode ) medit.setUseWrapping( *useWrap ); if ( medit.exec() == TQDialog::Accepted ) { diff --git a/tools/designer/designer/newformimpl.cpp b/tools/designer/designer/newformimpl.cpp index 378fcabfe..806ebdbea 100644 --- a/tools/designer/designer/newformimpl.cpp +++ b/tools/designer/designer/newformimpl.cpp @@ -77,7 +77,7 @@ void FormItem::insert( Project *pro ) { TQString n = "Form" + TQString::number( ++forms ); FormWindow *fw = 0; - FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), TRUE, pro ); + FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), true, pro ); fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); fw->setProject( pro ); MetaDataBase::addEntry( fw ); @@ -116,11 +116,11 @@ void FormItem::insert( Project *pro ) MainWindow::self->objectHierarchy()->formDefinitionView()->refresh(); MainWindow::self->objectHierarchy()->rebuild(); fw->killAccels( fw ); - fw->project()->setModified( TRUE ); + fw->project()->setModified( true ); fw->setFocus(); if ( !pro->isDummy() ) { - fw->setSavePixmapInProject( TRUE ); - fw->setSavePixmapInline( FALSE ); + fw->setSavePixmapInProject( true ); + fw->setSavePixmapInline( false ); } } @@ -158,7 +158,7 @@ void CustomFormItem::insert( Project *pro ) TQString filename = templateFileName(); if ( !filename.isEmpty() && TQFile::exists( filename ) ) { Resource resource( MainWindow::self ); - FormFile *ff = new FormFile( filename, TRUE, pro ); + FormFile *ff = new FormFile( filename, true, pro ); if ( !resource.load( ff ) ) { TQMessageBox::information( MainWindow::self, MainWindow::tr("Load Template"), MainWindow::tr("Couldn't load form description from template '" + @@ -171,8 +171,8 @@ void CustomFormItem::insert( Project *pro ) MainWindow::self->formWindow()->setFileName( TQString::null ); unifyFormName( MainWindow::self->formWindow(), MainWindow::self->qWorkspace() ); if ( !pro->isDummy() ) { - MainWindow::self->formWindow()->setSavePixmapInProject( TRUE ); - MainWindow::self->formWindow()->setSavePixmapInline( FALSE ); + MainWindow::self->formWindow()->setSavePixmapInProject( true ); + MainWindow::self->formWindow()->setSavePixmapInline( false ); } } } @@ -181,13 +181,13 @@ void CustomFormItem::insert( Project *pro ) SourceFileItem::SourceFileItem( TQIconView *view, const TQString &text ) - : NewItem( view, text ), visible( TRUE ) + : NewItem( view, text ), visible( true ) { } void SourceFileItem::insert( Project *pro ) { - SourceFile *f = new SourceFile( SourceFile::createUnnamedFileName( ext ), TRUE, pro ); + SourceFile *f = new SourceFile( SourceFile::createUnnamedFileName( ext ), true, pro ); MainWindow::self->editSource( f ); } @@ -207,7 +207,7 @@ void SourceFileItem::setProject( Project *pro ) SourceTemplateItem::SourceTemplateItem( TQIconView *view, const TQString &text ) - : NewItem( view, text ), visible( TRUE ) + : NewItem( view, text ), visible( true ) { } @@ -221,13 +221,13 @@ void SourceTemplateItem::insert( Project *pro ) if ( src.type == SourceTemplateInterface::Source::Invalid ) return; if ( src.type == SourceTemplateInterface::Source::FileName ) - f = new SourceFile( src.filename, FALSE, pro ); + f = new SourceFile( src.filename, false, pro ); else - f = new SourceFile( SourceFile::createUnnamedFileName( src.extension ), TRUE, pro ); + f = new SourceFile( SourceFile::createUnnamedFileName( src.extension ), true, pro ); if ( f->isAccepted()) { f->setText( src.code ); MainWindow::self->editSource( f ); - f->setModified( TRUE ); + f->setModified( true ); } else { delete f; } @@ -257,7 +257,7 @@ void NewForm::insertTemplates( TQIconView *tView, allItems.append( pi ); pi->setLanguage( *it ); pi->setPixmap( TQPixmap::fromMimeSource( "designer_project.png" ) ); - pi->setDragEnabled( FALSE ); + pi->setDragEnabled( false ); } } TQIconViewItem *cur = 0; @@ -265,24 +265,24 @@ void NewForm::insertTemplates( TQIconView *tView, allItems.append( fi ); fi->setFormType( FormItem::Dialog ); fi->setPixmap( TQPixmap::fromMimeSource( "designer_newform.png" ) ); - fi->setDragEnabled( FALSE ); + fi->setDragEnabled( false ); cur = fi; if ( !MainWindow::self->singleProjectMode() ) { fi = new FormItem( tView,tr( "Wizard" ) ); allItems.append( fi ); fi->setFormType( FormItem::Wizard ); fi->setPixmap( TQPixmap::fromMimeSource( "designer_newform.png" ) ); - fi->setDragEnabled( FALSE ); + fi->setDragEnabled( false ); fi = new FormItem( tView, tr( "Widget" ) ); allItems.append( fi ); fi->setFormType( FormItem::Widget ); fi->setPixmap( TQPixmap::fromMimeSource( "designer_newform.png" ) ); - fi->setDragEnabled( FALSE ); + fi->setDragEnabled( false ); fi = new FormItem( tView, tr( "Main Window" ) ); allItems.append( fi ); fi->setFormType( FormItem::MainWindow ); fi->setPixmap( TQPixmap::fromMimeSource( "designer_newform.png" ) ); - fi->setDragEnabled( FALSE ); + fi->setDragEnabled( false ); TQString templPath = templatePath; TQStringList templRoots; @@ -313,7 +313,7 @@ void NewForm::insertTemplates( TQIconView *tView, name = name.replace( '_', ' ' ); CustomFormItem *ci = new CustomFormItem( tView, name ); allItems.append( ci ); - ci->setDragEnabled( FALSE ); + ci->setDragEnabled( false ); ci->setPixmap( TQPixmap::fromMimeSource( "designer_newform.png" ) ); ci->setTemplateFile( fi->absFilePath() ); } @@ -333,7 +333,7 @@ void NewForm::insertTemplates( TQIconView *tView, si->setExtension( eit.key() ); si->setLanguage( *it ); si->setPixmap( TQPixmap::fromMimeSource( "designer_filenew.png" ) ); - si->setDragEnabled( FALSE ); + si->setDragEnabled( false ); } iface->release(); } @@ -350,7 +350,7 @@ void NewForm::insertTemplates( TQIconView *tView, si->setTemplate( *sit ); si->setLanguage( siface->language( *sit ) ); si->setPixmap( TQPixmap::fromMimeSource( "designer_filenew.png" ) ); - si->setDragEnabled( FALSE ); + si->setDragEnabled( false ); siface->release(); } } @@ -370,7 +370,7 @@ NewForm::NewForm( TQIconView *templateView, const TQString &templatePath ) NewForm::NewForm( TQWidget *parent, const TQStringList& projects, const TQString& currentProject, const TQString &templatePath ) - : NewFormBase( parent, 0, TRUE ) + : NewFormBase( parent, 0, true ) { connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); @@ -403,7 +403,7 @@ void NewForm::projectChanged( const TQString &project ) for ( i = allItems.first(); i; i = allItems.next() ) ( (NewItem*)i )->setProject( pro ); templateView->setCurrentItem( templateView->firstItem() ); - templateView->arrangeItemsInGrid( TRUE ); + templateView->arrangeItemsInGrid( true ); } void NewForm::itemChanged( TQIconViewItem *item ) diff --git a/tools/designer/designer/orderindicator.cpp b/tools/designer/designer/orderindicator.cpp index 7a886991e..ec1355be5 100644 --- a/tools/designer/designer/orderindicator.cpp +++ b/tools/designer/designer/orderindicator.cpp @@ -46,7 +46,7 @@ OrderIndicator::OrderIndicator( int i, TQWidget* w, FormWindow *fw ) order = -1; widget = w; setBackgroundMode( NoBackground ); - setAutoMask( TRUE ); + setAutoMask( true ); setOrder( i, w ); } @@ -74,7 +74,7 @@ void OrderIndicator::setOrder( int i, TQWidget* wid ) int w = fontMetrics().width( TQString::number( i ) ) + 10; int h = fontMetrics().lineSpacing() * 3 / 2; TQFont f( font() ); - f.setBold( TRUE ); + f.setBold( true ); setFont( f ); resize( TQMAX( w, h ), h ); update(); // in case the size didn't change diff --git a/tools/designer/designer/outputwindow.cpp b/tools/designer/designer/outputwindow.cpp index 89c0b0553..78369a564 100644 --- a/tools/designer/designer/outputwindow.cpp +++ b/tools/designer/designer/outputwindow.cpp @@ -45,7 +45,7 @@ #include <ntqpainter.h> static TQTextEdit *debugoutput = 0; -TQ_EXPORT bool debugToStderr = FALSE; +TQ_EXPORT bool debugToStderr = false; TQtMsgHandler OutputWindow::oldMsgHandler = 0; @@ -94,7 +94,7 @@ void OutputWindow::setupError() errorView->setColumnWidth( 1, errorView->fontMetrics().width( "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP" ) ); errorView->setColumnWidth( 2, errorView->fontMetrics().width( "9999999" ) ); errorView->setColumnAlignment( 2, TQt::AlignRight ); - errorView->setAllColumnsShowFocus( TRUE ); + errorView->setAllColumnsShowFocus( true ); } static void debugMessageOutput( TQtMsgType type, const char *msg ) @@ -120,7 +120,7 @@ static void debugMessageOutput( TQtMsgType type, const char *msg ) void OutputWindow::setupDebug() { debugoutput = debugView = new TQTextEdit( this, "OutputWindow::debugView" ); - //debugView->setReadOnly( TRUE ); + //debugView->setReadOnly( true ); addTab( debugView, "Debug Output" ); if ( !debugToStderr ) @@ -174,7 +174,7 @@ void OutputWindow::currentErrorChanged( TQListViewItem *i ) if ( !i ) return; ErrorItem *ei = (ErrorItem*)i; - ei->setRead( TRUE ); + ei->setRead( true ); MainWindow::self->showSourceLine( ei->location(), ei->line() - 1, MainWindow::Error ); } @@ -184,7 +184,7 @@ ErrorItem::ErrorItem( TQListView *parent, TQListViewItem *after, const TQString const TQString &locationString, TQObject *locationObject ) : TQListViewItem( parent, after ) { - setMultiLinesEnabled( TRUE ); + setMultiLinesEnabled( true ); TQString m( message ); type = m.startsWith( "Warning: " ) ? Warning : Error; m = m.mid( m.find( ':' ) + 1 ); @@ -195,7 +195,7 @@ ErrorItem::ErrorItem( TQListView *parent, TQListViewItem *after, const TQString object = locationObject; read = !after; if ( !after ) { - parent->setSelected( this, TRUE ); + parent->setSelected( this, true ); parent->setCurrentItem( this ); } } @@ -207,7 +207,7 @@ void ErrorItem::paintCell( TQPainter *p, const TQColorGroup & cg, g.setColor( TQColorGroup::Text, type == Error ? TQt::red : TQt::darkYellow ); if ( !read ) { TQFont f( p->font() ); - f.setBold( TRUE ); + f.setBold( true ); p->setFont( f ); } TQListViewItem::paintCell( p, g, column, width, alignment ); diff --git a/tools/designer/designer/paletteeditoradvancedimpl.cpp b/tools/designer/designer/paletteeditoradvancedimpl.cpp index 112a42490..188fef0ac 100644 --- a/tools/designer/designer/paletteeditoradvancedimpl.cpp +++ b/tools/designer/designer/paletteeditoradvancedimpl.cpp @@ -66,7 +66,7 @@ BoldListBoxText::BoldListBoxText( TQString text, TQListBox* lb ) void BoldListBoxText::paint( TQPainter* painter ) { TQFont f = painter->font(); - f.setBold( TRUE ); + f.setBold( true ); painter->setFont( f ); TQListBoxText::paint( painter ); @@ -86,8 +86,8 @@ PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent, buttonPixmap->setFormWindow( formWindow ); // force toggle event - checkBuildEffect->setChecked(FALSE); - checkBuildEffect->setChecked(TRUE); + checkBuildEffect->setChecked(false); + checkBuildEffect->setChecked(true); } PaletteEditorAdvanced::~PaletteEditorAdvanced() @@ -133,8 +133,8 @@ void PaletteEditorAdvanced::paletteSelected(int p) groupEffect->setDisabled(checkBuildDisabled->isChecked()); } else { - groupCentral->setEnabled(TRUE); - groupEffect->setEnabled(TRUE); + groupCentral->setEnabled(true); + groupEffect->setEnabled(true); } updateStyledButtons(); } @@ -629,7 +629,7 @@ TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init, BackgroundMode mode, TQWidget* parent, const char* name, FormWindow *fw ) { - PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, parent, name, TRUE ); + PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, parent, name, true ); dlg->setupBackgroundMode( mode ); if ( init != TQPalette() ) @@ -639,11 +639,11 @@ TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init, TQPalette result = init; if ( resultCode == TQDialog::Accepted ) { if ( ok ) - *ok = TRUE; + *ok = true; result = dlg->pal(); } else { if ( ok ) - *ok = FALSE; + *ok = false; } delete dlg; return result; diff --git a/tools/designer/designer/paletteeditoradvancedimpl.h b/tools/designer/designer/paletteeditoradvancedimpl.h index ab61b33e2..edf4a5f5b 100644 --- a/tools/designer/designer/paletteeditoradvancedimpl.h +++ b/tools/designer/designer/paletteeditoradvancedimpl.h @@ -43,7 +43,7 @@ class PaletteEditorAdvanced : public PaletteEditorAdvancedBase TQ_OBJECT public: PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent=0, const char * name=0, - bool modal=FALSE, WFlags f=0 ); + bool modal=false, WFlags f=0 ); ~PaletteEditorAdvanced(); static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground, diff --git a/tools/designer/designer/paletteeditorimpl.cpp b/tools/designer/designer/paletteeditorimpl.cpp index c23808f35..c0b6fef8f 100644 --- a/tools/designer/designer/paletteeditorimpl.cpp +++ b/tools/designer/designer/paletteeditorimpl.cpp @@ -290,7 +290,7 @@ TQPalette PaletteEditor::pal() const TQPalette PaletteEditor::getPalette( bool *ok, const TQPalette &init, BackgroundMode mode, TQWidget* parent, const char* name, FormWindow *fw ) { - PaletteEditor* dlg = new PaletteEditor( fw, parent, name, TRUE ); + PaletteEditor* dlg = new PaletteEditor( fw, parent, name, true ); dlg->setupBackgroundMode( mode ); if ( init != TQPalette() ) @@ -300,11 +300,11 @@ TQPalette PaletteEditor::getPalette( bool *ok, const TQPalette &init, Background TQPalette result = init; if ( resultCode == TQDialog::Accepted ) { if ( ok ) - *ok = TRUE; + *ok = true; result = dlg->pal(); } else { if ( ok ) - *ok = FALSE; + *ok = false; } delete dlg; return result; diff --git a/tools/designer/designer/paletteeditorimpl.h b/tools/designer/designer/paletteeditorimpl.h index 8ae59843d..733395c47 100644 --- a/tools/designer/designer/paletteeditorimpl.h +++ b/tools/designer/designer/paletteeditorimpl.h @@ -43,7 +43,7 @@ class PaletteEditor : public PaletteEditorBase TQ_OBJECT public: - PaletteEditor( FormWindow *fw, TQWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 ); + PaletteEditor( FormWindow *fw, TQWidget * parent=0, const char * name=0, bool modal=false, WFlags f=0 ); ~PaletteEditor(); static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground, diff --git a/tools/designer/designer/pixmapchooser.cpp b/tools/designer/designer/pixmapchooser.cpp index 037694e7d..686672999 100644 --- a/tools/designer/designer/pixmapchooser.cpp +++ b/tools/designer/designer/pixmapchooser.cpp @@ -66,7 +66,7 @@ void PixmapView::setPixmap( const TQPixmap &pix ) { pixmap = pix; resizeContents( pixmap.size().width(), pixmap.size().height() ); - viewport()->repaint( FALSE ); + viewport()->repaint( false ); } void PixmapView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch ) @@ -114,9 +114,9 @@ TQStringList qChoosePixmaps( TQWidget *parent ) TQString all; buildImageFormatList( filter, all ); - TQFileDialog fd( TQString::null, filter, parent, 0, TRUE ); + TQFileDialog fd( TQString::null, filter, parent, 0, true ); fd.setMode( TQFileDialog::ExistingFiles ); - fd.setContentsPreviewEnabled( TRUE ); + fd.setContentsPreviewEnabled( true ); PixmapView *pw = new PixmapView( &fd ); fd.setContentsPreview( pw, pw ); fd.setViewMode( TQFileDialog::List ); @@ -138,8 +138,8 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T TQString all; buildImageFormatList( filter, all ); - TQFileDialog fd( TQString::null, filter, parent, 0, TRUE ); - fd.setContentsPreviewEnabled( TRUE ); + TQFileDialog fd( TQString::null, filter, parent, 0, true ); + fd.setContentsPreviewEnabled( true ); PixmapView *pw = new PixmapView( &fd ); fd.setContentsPreview( pw, pw ); fd.setViewMode( TQFileDialog::List ); @@ -153,9 +153,9 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T return pix; } } else if ( fw && fw->savePixmapInProject() ) { - PixmapCollectionEditor dia( parent, 0, TRUE ); + PixmapCollectionEditor dia( parent, 0, true ); dia.setProject( fw->project() ); - dia.setChooserMode( TRUE ); + dia.setChooserMode( true ); dia.setCurrentItem( MetaDataBase::pixmapKey( fw, old.serialNumber() ) ); if ( dia.exec() == TQDialog::Accepted ) { TQPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) ); @@ -163,7 +163,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T return pix; } } else { - PixmapFunction dia( parent, 0, TRUE ); + PixmapFunction dia( parent, 0, true ); TQObject::connect( dia.helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" ); dia.editArguments->setText( MetaDataBase::pixmapArgument( fw, old.serialNumber() ) ); diff --git a/tools/designer/designer/pixmapcollection.cpp b/tools/designer/designer/pixmapcollection.cpp index 83bb14502..f1964ee8f 100644 --- a/tools/designer/designer/pixmapcollection.cpp +++ b/tools/designer/designer/pixmapcollection.cpp @@ -61,14 +61,14 @@ bool PixmapCollection::addPixmap( const Pixmap &pix, bool force ) if ( !force ) { for ( TQValueList<Pixmap>::Iterator it = pixList.begin(); it != pixList.end(); ++it ) { if ( (*it).name == pixmap.name ) - return FALSE; + return false; } } pixList.append( pixmap ); mimeSourceFactory->setPixmap( pixmap.name, pixmap.pix ); - project->setModified( TRUE ); - return TRUE; + project->setModified( true ); + return true; } void PixmapCollection::removePixmap( const TQString &name ) @@ -79,7 +79,7 @@ void PixmapCollection::removePixmap( const TQString &name ) break; } } - project->setModified( TRUE ); + project->setModified( true ); } TQValueList<PixmapCollection::Pixmap> PixmapCollection::pixmaps() const @@ -90,18 +90,18 @@ TQValueList<PixmapCollection::Pixmap> PixmapCollection::pixmaps() const TQString PixmapCollection::unifyName( const TQString &n ) { TQString name = n; - bool restart = FALSE; + bool restart = false; int added = 1; for ( TQValueList<Pixmap>::Iterator it = pixList.begin(); it != pixList.end(); ++it ) { if ( restart ) it = pixList.begin(); - restart = FALSE; + restart = false; if ( name == (*it).name ) { name = n; name += "_" + TQString::number( added ); ++added; - restart = TRUE; + restart = true; } } @@ -145,13 +145,13 @@ void PixmapCollection::savePixmap( Pixmap &pix ) TQString PixmapCollection::imageDir() const { - return TQFileInfo( project->fileName() ).dirPath( TRUE ) + "/images"; + return TQFileInfo( project->fileName() ).dirPath( true ) + "/images"; } void PixmapCollection::mkdir() { TQString f = project->fileName(); - TQDir d( TQFileInfo( f ).dirPath( TRUE ) ); + TQDir d( TQFileInfo( f ).dirPath( true ) ); d.mkdir( "images" ); } @@ -163,7 +163,7 @@ void PixmapCollection::load( const TQString& filename ) if ( filename[0] == '/' ) absfile = filename; else - absfile = TQFileInfo( project->fileName() ).dirPath( TRUE ) + "/" + filename; + absfile = TQFileInfo( project->fileName() ).dirPath( true ) + "/" + filename; TQPixmap pm( absfile ); if ( pm.isNull() ) @@ -173,7 +173,7 @@ void PixmapCollection::load( const TQString& filename ) pix.name = TQFileInfo( absfile ).fileName(); pix.absname = absfile; pix.pix = pm; - addPixmap( pix, TRUE ); + addPixmap( pix, true ); } DesignerPixmapCollection *PixmapCollection::iFace() diff --git a/tools/designer/designer/pixmapcollection.h b/tools/designer/designer/pixmapcollection.h index afff12d94..fd6a8e763 100644 --- a/tools/designer/designer/pixmapcollection.h +++ b/tools/designer/designer/pixmapcollection.h @@ -56,7 +56,7 @@ public: PixmapCollection( Project *pro ); ~PixmapCollection(); - bool addPixmap( const Pixmap &pix, bool force = TRUE ); + bool addPixmap( const Pixmap &pix, bool force = true ); void removePixmap( const TQString &name ); TQPixmap pixmap( const TQString &name ); diff --git a/tools/designer/designer/pixmapcollectioneditor.ui.h b/tools/designer/designer/pixmapcollectioneditor.ui.h index 3cac8bb71..e9d03b9d5 100644 --- a/tools/designer/designer/pixmapcollectioneditor.ui.h +++ b/tools/designer/designer/pixmapcollectioneditor.ui.h @@ -34,7 +34,7 @@ void PixmapCollectionEditor::init() { project = 0; - setChooserMode( FALSE ); + setChooserMode( false ); } void PixmapCollectionEditor::destroy() @@ -61,7 +61,7 @@ void PixmapCollectionEditor::addPixmap() TQFileInfo fi ( *it ); pixmap.name = fi.fileName(); pixmap.absname = fi.filePath(); - if ( !project->pixmapCollection()->addPixmap( pixmap, FALSE ) ) + if ( !project->pixmapCollection()->addPixmap( pixmap, false ) ) continue; lastName = pixmap.name; } @@ -94,9 +94,9 @@ void PixmapCollectionEditor::updateView() for ( TQValueList<PixmapCollection::Pixmap>::Iterator it = pixmaps.begin(); it != pixmaps.end(); ++it ) { // #### might need to scale down the pixmap TQIconViewItem *item = new TQIconViewItem( viewPixmaps, (*it).name, scaledPixmap( (*it).pix ) ); - //item->setRenameEnabled( TRUE ); // this will be a bit harder to implement - item->setDragEnabled( FALSE ); - item->setDropEnabled( FALSE ); + //item->setRenameEnabled( true ); // this will be a bit harder to implement + item->setDragEnabled( false ); + item->setDropEnabled( false ); } viewPixmaps->setCurrentItem( viewPixmaps->firstItem() ); currentChanged( viewPixmaps->firstItem() ); @@ -114,8 +114,8 @@ void PixmapCollectionEditor::setChooserMode( bool c ) buttonClose->hide(); buttonOk->show(); buttonCancel->show(); - buttonOk->setEnabled( FALSE ); - buttonOk->setDefault( TRUE ); + buttonOk->setEnabled( false ); + buttonOk->setDefault( true ); connect( viewPixmaps, TQ_SIGNAL( doubleClicked( TQIconViewItem * ) ), buttonOk, TQ_SIGNAL( clicked() ) ); connect( viewPixmaps, TQ_SIGNAL( returnPressed( TQIconViewItem * ) ), buttonOk, TQ_SIGNAL( clicked() ) ); setCaption( tr( "Choose an Image" ) ); @@ -123,7 +123,7 @@ void PixmapCollectionEditor::setChooserMode( bool c ) buttonClose->show(); buttonOk->hide(); buttonCancel->hide(); - buttonClose->setDefault( TRUE ); + buttonClose->setDefault( true ); } updateView(); } diff --git a/tools/designer/designer/popupmenueditor.cpp b/tools/designer/designer/popupmenueditor.cpp index f0903e000..9b6acb0b1 100644 --- a/tools/designer/designer/popupmenueditor.cpp +++ b/tools/designer/designer/popupmenueditor.cpp @@ -89,13 +89,13 @@ bool PopupMenuEditorItemPtrDrag::decode( TQDropEvent * e, PopupMenuEditorItem ** TQDataStream stream( data, IO_ReadOnly ); if ( !data.size() ) - return FALSE; + return false; TQ_LONG p = 0; stream >> p; *i = ( PopupMenuEditorItem *) p; - return TRUE; + return true; } // PopupMenuEditorItem Implementation ----------------------------------- @@ -105,8 +105,8 @@ PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditor * menu, TQObject * par a( 0 ), s( 0 ), m( menu ), - separator( FALSE ), - removable( FALSE ) + separator( false ), + removable( false ) { init(); a = new TQAction( this ); @@ -120,12 +120,12 @@ PopupMenuEditorItem::PopupMenuEditorItem( TQAction * action, PopupMenuEditor * m a( action ), s( 0 ), m( menu ), - separator( FALSE ), - removable( TRUE ) + separator( false ), + removable( true ) { init(); if ( /*a->name() == "qt_separator_action" ||*/ ::tqt_cast<TQSeparatorAction*>(a) ) - separator = TRUE; + separator = true; if ( a && a->children() ) a->installEventFilter( this ); } @@ -156,7 +156,7 @@ void PopupMenuEditorItem::init() if ( m && !isSeparator() ) { s = new PopupMenuEditor( m->formWindow(), m ); TQString n = "popupMenu"; - m->formWindow()->unify( s, n, TRUE ); + m->formWindow()->unify( s, n, true ); s->setName( n ); MetaDataBase::addEntry( s ); } @@ -185,7 +185,7 @@ bool PopupMenuEditorItem::isVisible() const return ( g->isVisible() && g->usesDropDown() ); else if ( a ) return a->isVisible(); - return FALSE; + return false; } void PopupMenuEditorItem::showMenu( int x, int y ) @@ -228,20 +228,20 @@ int PopupMenuEditorItem::count() const bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event ) { if ( ! ::tqt_cast<TQActionGroup*>( o ) ) - return FALSE; + return false; if ( event->type() == TQEvent::ChildInserted ) { TQChildEvent * ce = ( TQChildEvent * ) event; TQObject * c = ce->child(); TQAction * action = ::tqt_cast<TQAction*>( c ); if ( s->find( action ) != -1 ) // avoid duplicates - return FALSE; + return false; TQActionGroup * actionGroup = ::tqt_cast<TQActionGroup*>( c ); if ( actionGroup ) s->insert( actionGroup ); else if ( action ) s->insert( action ); } - return FALSE; + return false; } void PopupMenuEditorItem::selfDestruct() @@ -298,7 +298,7 @@ PopupMenuEditor::PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu, PopupMenuEditor::~PopupMenuEditor() { - itemList.setAutoDelete( TRUE ); + itemList.setAutoDelete( true ); } void PopupMenuEditor::init() @@ -308,7 +308,7 @@ void PopupMenuEditor::init() addItem.action()->setMenuText( tr("new item") ); addSeparator.action()->setMenuText( tr("new separator") ); - setAcceptDrops( TRUE ); + setAcceptDrops( true ); setFocusPolicy( StrongFocus ); lineEdit = new TQLineEdit( this ); @@ -363,7 +363,7 @@ void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index ) PopupMenuEditorItem *i = new PopupMenuEditorItem( (TQAction *)actionGroup, this, 0, TQString( actionGroup->name() ) + "Menu" ); TQActionGroup *g = 0; - TQObjectList *l = actionGroup->queryList( "TQAction", 0, FALSE, FALSE ); + TQObjectList *l = actionGroup->queryList( "TQAction", 0, false, false ); TQObjectListIterator it( *l ); insert( i, index ); for ( ; it.current(); ++it ) { @@ -566,7 +566,7 @@ void PopupMenuEditor::setAccelerator( int key, TQt::ButtonState state, int index if ( n < 4 ) keys[n] = key | shift | ctrl | alt | meta; a->setAccel( TQKeySequence( keys[0], keys[1], keys[2], keys[3] ) ); - MetaDataBase::setPropertyChanged( a, "accel", TRUE ); + MetaDataBase::setPropertyChanged( a, "accel", true ); resizeToContents(); } @@ -625,7 +625,7 @@ PopupMenuEditorItem * PopupMenuEditor::createItem( TQAction * a ) a = ae->newActionEx(); PopupMenuEditorItem * i = new PopupMenuEditorItem( a, this ); TQString n = TQString( a->name() ) + "Item"; - formWindow()->unify( i, n, FALSE ); + formWindow()->unify( i, n, false ); i->setName( n ); AddActionToPopupCommand * cmd = new AddActionToPopupCommand( "Add Item", formWnd, this, i ); @@ -748,7 +748,7 @@ void PopupMenuEditor::mouseDoubleClickEvent( TQMouseEvent * ) setFocusAt( mousePressPos ); if ( currentItem() == &addSeparator ) { PopupMenuEditorItem * i = createItem( new TQSeparatorAction( 0 ) ); - i->setSeparator( TRUE ); + i->setSeparator( true ); return; } if ( currentField == 0 ) { @@ -772,7 +772,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e ) // FIXME: start rename after drop } else if ( draggedItem == &addSeparator ) { draggedItem = createItem( new TQSeparatorAction( 0 ) ); - draggedItem->setSeparator( TRUE ); + draggedItem->setSeparator( true ); } PopupMenuEditorItemPtrDrag * d = @@ -780,7 +780,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e ) hideSubMenu(); - draggedItem->setVisible( FALSE ); + draggedItem->setVisible( false ); resizeToContents(); // If the item is dropped in the same list, @@ -792,7 +792,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e ) d->dragCopy(); // dragevents and stuff happens if ( draggedItem ) { // item was not dropped - draggedItem->setVisible( TRUE ); + draggedItem->setVisible( true ); draggedItem = 0; if ( hasFocus() ) { hideSubMenu(); @@ -800,7 +800,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e ) showSubMenu(); } } else { // item was dropped - itemList.takeNode( node )->setVisible( TRUE ); + itemList.takeNode( node )->setVisible( true ); if ( currentIndex > 0 && currentIndex > idx ) --currentIndex; // the drop might happen in another menu, so we'll resize @@ -861,9 +861,9 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e ) if ( g->usesDropDown() ) { i = new PopupMenuEditorItem( g, this ); TQString n = TQString( g->name() ) + "Item"; - formWindow()->unify( i, n, FALSE ); + formWindow()->unify( i, n, false ); i->setName( n ); - TQObjectList *l = g->queryList( "TQAction", 0, FALSE, FALSE ); + TQObjectList *l = g->queryList( "TQAction", 0, false, false ); TQObjectListIterator it( *l ); for ( ; it.current(); ++it ) { g = ::tqt_cast<TQActionGroup*>(it.current()); @@ -1416,10 +1416,10 @@ void PopupMenuEditor::leaveEditMode( TQKeyEvent * e ) a->setMenuText( menuText ); i = createItem( a ); TQString n = constructName( i ); - formWindow()->unify( a, n, TRUE ); + formWindow()->unify( a, n, true ); a->setName( n ); MetaDataBase::addEntry( a ); - MetaDataBase::setPropertyChanged( a, "menuText", TRUE ); + MetaDataBase::setPropertyChanged( a, "menuText", true ); ActionEditor *ae = (ActionEditor*)formWindow()->mainWindow()->child( 0, "ActionEditor" ); if ( ae ) ae->updateActionName( a ); diff --git a/tools/designer/designer/previewwidgetimpl.cpp b/tools/designer/designer/previewwidgetimpl.cpp index aa75de704..5f9d7c0e8 100644 --- a/tools/designer/designer/previewwidgetimpl.cpp +++ b/tools/designer/designer/previewwidgetimpl.cpp @@ -64,9 +64,9 @@ bool PreviewWidget::eventFilter(TQObject *, TQEvent *e) case TQEvent::KeyRelease: case TQEvent::Enter: case TQEvent::Leave: - return TRUE; // ignore; + return true; // ignore; default: break; } - return FALSE; + return false; } diff --git a/tools/designer/designer/project.cpp b/tools/designer/designer/project.cpp index 024d9a181..0a4a34855 100644 --- a/tools/designer/designer/project.cpp +++ b/tools/designer/designer/project.cpp @@ -76,9 +76,9 @@ bool DatabaseConnection::refreshCatalog() { #ifndef TQT_NO_SQL if ( loaded ) - return TRUE; + return true; if ( !open() ) - return FALSE; + return false; tbls = conn->tables( TQSql::TableType( TQSql::Tables | TQSql::Views ) ); flds.clear(); for ( TQStringList::Iterator it = tbls.begin(); it != tbls.end(); ++it ) { @@ -88,11 +88,11 @@ bool DatabaseConnection::refreshCatalog() lst << fil.field( j )->name(); flds.insert( *it, lst ); } - loaded = TRUE; + loaded = true; conn->close(); return loaded; #else - return FALSE; + return false; #endif } @@ -129,16 +129,16 @@ bool DatabaseConnection::open( bool suppressDialog ) conn->setHostName( hname ); conn->setPort( prt ); bool success = conn->open(); - for( ; suppressDialog == FALSE ; ) { - bool done = FALSE; + for( ; suppressDialog == false ; ) { + bool done = false; if ( !success ) { - DatabaseConnectionEditor dia( this, 0 , 0 , TRUE ); + DatabaseConnectionEditor dia( this, 0 , 0 , true ); switch( dia.exec() ) { case TQDialog::Accepted: - done = FALSE; + done = false; break; case TQDialog::Rejected: - done = TRUE; + done = true; break; } } @@ -161,7 +161,7 @@ bool DatabaseConnection::open( bool suppressDialog ) case 0: // OK or Enter continue; case 1: // Cancel or Escape - done = TRUE; + done = true; break; } } else @@ -175,7 +175,7 @@ bool DatabaseConnection::open( bool suppressDialog ) } return success; #else - return FALSE; + return false; #endif } @@ -211,7 +211,7 @@ Project::Project( const TQString &fn, const TQString &pName, const TQString &l ) : proName( pName ), projectSettingsPluginManager( pm ), isDummyProject( isDummy ) { - modified = TRUE; + modified = true; pixCollection = new PixmapCollection( this ); iface = 0; lang = l; @@ -221,10 +221,10 @@ Project::Project( const TQString &fn, const TQString &pName, setFileName( fn ); if ( !pName.isEmpty() ) proName = pName; - sourcefiles.setAutoDelete( TRUE ); - modified = FALSE; - objs.setAutoDelete( FALSE ); - fakeFormFiles.setAutoDelete( FALSE ); + sourcefiles.setAutoDelete( true ); + modified = false; + objs.setAutoDelete( false ); + fakeFormFiles.setAutoDelete( false ); } Project::~Project() @@ -320,13 +320,13 @@ TQString Project::projectName() const static TQString parse_part( const TQString &part ) { TQString res; - bool inName = FALSE; + bool inName = false; TQString currName; for ( int i = 0; i < (int)part.length(); ++i ) { TQChar c = part[ i ]; if ( !inName ) { if ( c != ' ' && c != '\t' && c != '\n' && c != '=' && c != '\\' && c != '+' ) - inName = TRUE; + inName = true; else continue; } @@ -382,15 +382,15 @@ TQStringList parse_multiline_part( const TQString &contents, const TQString &key if ( start ) *start = i - lastWord.length() - extraWhiteSpaceCount + 1; TQStringList lst; - bool inName = FALSE; + bool inName = false; TQString currName; - bool hadEqual = FALSE; + bool hadEqual = false; for ( ; i < (int)contents.length(); ++i ) { c = contents[ i ]; if ( !hadEqual && c != '=' ) continue; if ( !hadEqual ) { - hadEqual = TRUE; + hadEqual = true; continue; } if ( ( c.isLetter() || @@ -418,11 +418,11 @@ TQStringList parse_multiline_part( const TQString &contents, const TQString &key currName = TQString::null; if ( c != '\\' || contents[i+1] != '\n' ) { currName += c; - inName = TRUE; + inName = true; } } else { if ( inName ) { - inName = FALSE; + inName = false; if ( currName.simplifyWhiteSpace() != "\\" ) lst.append( currName ); } @@ -453,7 +453,7 @@ void Project::parse() int i = contents.find( "LANGUAGE" ); if ( i != -1 ) { lang = ""; - is_cpp = FALSE; + is_cpp = false; TQString part = contents.mid( i + TQString( "LANGUAGE" ).length() ); lang = parse_part( part ); is_cpp = lang == "C++"; @@ -471,7 +471,7 @@ void Project::parse() for ( it = uifiles.begin(); it != uifiles.end(); ++it ) { if ( (*it).startsWith( "__APPOBJ" ) ) continue; - (void) new FormFile( *it, FALSE, this ); + (void) new FormFile( *it, false, this ); } @@ -496,7 +496,7 @@ void Project::parse() for ( TQStringList::Iterator it = sourceKeys.begin(); it != sourceKeys.end(); ++it ) { TQStringList lst = parse_multiline_part( contents, *it ); for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) - (void) new SourceFile( *it, FALSE, this ); + (void) new SourceFile( *it, false, this ); } } @@ -517,11 +517,11 @@ void Project::parse() TQStringList images = parse_multiline_part( contents, "IMAGES" ); // ### remove that for the final - this is beta-compatibility - if ( images.isEmpty() && TQDir( TQFileInfo( filename ).dirPath( TRUE ) + "/images" ).exists() ) { - images = TQDir( TQFileInfo( filename ).dirPath( TRUE ) + "/images" ).entryList(); + if ( images.isEmpty() && TQDir( TQFileInfo( filename ).dirPath( true ) + "/images" ).exists() ) { + images = TQDir( TQFileInfo( filename ).dirPath( true ) + "/images" ).entryList(); for ( int i = 0; i < (int)images.count(); ++i ) images[ i ].prepend( "images/" ); - modified = TRUE; + modified = true; } for ( TQStringList::ConstIterator pit = images.begin(); pit != images.end(); ++pit ) @@ -538,13 +538,13 @@ void Project::clear() bool Project::removeSourceFile( SourceFile *sf ) { if ( !sourcefiles.containsRef( sf ) ) - return FALSE; + return false; if ( !sf->close() ) - return FALSE; + return false; sourcefiles.removeRef( sf ); - modified = TRUE; + modified = true; emit sourceFileRemoved( sf ); - return TRUE; + return true; } void Project::setDatabaseDescription( const TQString &db ) @@ -567,16 +567,16 @@ bool Project::isValid() const { // #### do more checking here? if ( filename.isEmpty() || proName.isEmpty() ) - return FALSE; + return false; - return TRUE; + return true; } TQString Project::makeAbsolute( const TQString &f ) { if ( isDummy() ) return f; - TQString encodedUrl = TQFileInfo( filename ).dirPath( TRUE ); + TQString encodedUrl = TQFileInfo( filename ).dirPath( true ); TQUrl::encode( encodedUrl ); TQUrl u( encodedUrl, f ); return u.path(); @@ -586,7 +586,7 @@ TQString Project::makeRelative( const TQString &f ) { if ( isDummy() ) return f; - TQString p = TQFileInfo( filename ).dirPath( TRUE ); + TQString p = TQFileInfo( filename ).dirPath( true ); TQString f2 = f; #if defined(TQ_WS_WIN32) if ( p.endsWith("/") ) @@ -622,7 +622,7 @@ static void remove_multiline_contents( TQString &contents, const TQString &s, in if ( strt ) *strt = i; int start = i; - bool lastWasBackspash = TRUE; + bool lastWasBackspash = true; if ( i != -1 && ( i == 0 || contents[ i - 1 ] != '{' || contents[ i - 1 ] != ':' ) && !(i > 0 && contents[i-1] != '\n')) { for ( ; i < (int)contents.length(); ++i ) { if ( contents[ i ] == '\n' && !lastWasBackspash ) @@ -636,7 +636,7 @@ static void remove_multiline_contents( TQString &contents, const TQString &s, in void Project::save( bool onlyProjectFile ) { - bool anythingModified = FALSE; + bool anythingModified = false; // save sources and forms if ( !onlyProjectFile ) { @@ -672,12 +672,12 @@ void Project::save( bool onlyProjectFile ) TQString original = ""; // read the existing file - bool hasPreviousContents = FALSE; + bool hasPreviousContents = false; if ( f.open( IO_ReadOnly ) ) { TQTextStream ts( &f ); original = ts.read(); f.close(); - hasPreviousContents = TRUE; + hasPreviousContents = true; remove_contents( original, "{SOURCES+=" ); // ### compatibility with early 3.0 betas remove_contents( original, "DBFILE" ); remove_contents( original, "LANGUAGE" ); @@ -809,12 +809,12 @@ void Project::save( bool onlyProjectFile ) f.close(); - setModified( FALSE ); + setModified( false ); if ( singleProjectMode() ) { LanguageInterface *iface = MetaDataBase::languageInterface( language() ); if ( iface && iface->supports( LanguageInterface::CompressProject ) ) - iface->compressProject( makeAbsolute( filename ), singleProFileName, TRUE ); + iface->compressProject( makeAbsolute( filename ), singleProFileName, true ); } } @@ -836,7 +836,7 @@ void Project::setDatabaseConnections( const TQPtrList<DatabaseConnection> &lst ) void Project::addDatabaseConnection( DatabaseConnection *conn ) { dbConnections.append( conn ); - modified = TRUE; + modified = true; } #endif @@ -919,7 +919,7 @@ void Project::saveConnections() if ( f.exists() ) f.remove(); setDatabaseDescription( "" ); - modified = TRUE; + modified = true; return; } @@ -1066,13 +1066,13 @@ bool Project::openDatabase( const TQString &connection, bool suppressDialog ) if ( connection.isEmpty() && !conn ) conn = databaseConnection( "(default)" ); if ( !conn ) - return FALSE; + return false; bool b = conn->open( suppressDialog ); return b; #else Q_UNUSED( connection ); Q_UNUSED( suppressDialog ); - return FALSE; + return false; #endif } @@ -1128,7 +1128,7 @@ void Project::setLanguage( const TQString &l ) lang = l; is_cpp = lang == "C++"; updateCustomSettings(); - modified = TRUE; + modified = true; } TQString Project::language() const @@ -1140,7 +1140,7 @@ void Project::setCustomSetting( const TQString &key, const TQString &value ) { customSettings.remove( key ); customSettings.insert( key, value ); - modified = TRUE; + modified = true; } TQString Project::customSetting( const TQString &key ) const @@ -1179,7 +1179,7 @@ void Project::setActive( bool b ) void Project::addSourceFile( SourceFile *sf ) { sourcefiles.append( sf ); - modified = TRUE; + modified = true; emit sourceFileAdded( sf ); } @@ -1211,7 +1211,7 @@ void Project::setIncludePath( const TQString &platform, const TQString &path ) if ( inclPath[platform] == path ) return; inclPath.replace( platform, path ); - modified = TRUE; + modified = true; } void Project::setLibs( const TQString &platform, const TQString &path ) @@ -1315,27 +1315,27 @@ void Project::writePlatformSettings( TQString &contents, const TQString &setting void Project::addFormFile( FormFile *ff ) { formfiles.append( ff ); - modified = TRUE; + modified = true; emit formFileAdded( ff ); } bool Project::removeFormFile( FormFile *ff ) { if ( !formfiles.containsRef( ff ) ) - return FALSE; + return false; if ( !ff->close() ) - return FALSE; + return false; formfiles.removeRef( ff ); - modified = TRUE; + modified = true; emit formFileRemoved( ff ); - return TRUE; + return true; } void Project::addObject( TQObject *o ) { bool wasModified = modified; objs.append( o ); - FormFile *ff = new FormFile( "", FALSE, this, "qt_fakewindow" ); + FormFile *ff = new FormFile( "", false, this, "qt_fakewindow" ); ff->setFileName( "__APPOBJ" + TQString( o->name() ) + ".ui" ); fakeFormFiles.insert( (void*)o, ff ); MetaDataBase::addEntry( o ); @@ -1345,7 +1345,7 @@ void Project::addObject( TQObject *o ) fw->setProject( this ); if ( TQFile::exists( ff->absFileName() ) ) Resource::loadExtraSource( ff, ff->absFileName(), - MetaDataBase::languageInterface( language() ), FALSE ); + MetaDataBase::languageInterface( language() ), false ); if ( MainWindow::self ) fw->setMainWindow( MainWindow::self ); if ( MainWindow::self ) { @@ -1363,7 +1363,7 @@ void Project::addObject( TQObject *o ) } else { if ( TQFile::exists( ff->absFileName() ) ) Resource::loadExtraSource( ff, ff->absFileName(), - MetaDataBase::languageInterface( language() ), FALSE ); + MetaDataBase::languageInterface( language() ), false ); } emit objectAdded( o ); modified = wasModified; @@ -1455,11 +1455,11 @@ void Project::addAndEditFunction( const TQString &function, const TQString &func if ( i != -1 ) func = func.left( i ); - bool found = FALSE; + bool found = false; for ( TQValueList<LanguageInterface::Function>::Iterator it = funcs.begin(); it != funcs.end(); ++it ) { if ( (*it).name.left( (*it).name.find( '(' ) ) == func ) { - found = TRUE; + found = true; break; } } @@ -1473,7 +1473,7 @@ void Project::addAndEditFunction( const TQString &function, const TQString &func "()\n" + functionBody + "\n"; f->setText( code ); if ( f->editor() ) - f->editor()->refresh( FALSE ); + f->editor()->refresh( false ); } if ( openDeveloper ) { @@ -1492,9 +1492,9 @@ bool Project::hasParentObject( TQObject *o ) for ( TQObject *p = objs.first(); p; p = objs.next() ) { TQObject *c = p->child( o->name(), o->className() ); if ( c ) - return TRUE; + return true; } - return FALSE; + return false; } TQString Project::qualifiedName( TQObject *o ) @@ -1531,7 +1531,7 @@ void Project::designerCreated() const TQString & ) ), MainWindow::self, TQ_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) ); - fw->reparent( MainWindow::self->qWorkspace(), TQPoint( 0, 0 ), FALSE ); + fw->reparent( MainWindow::self->qWorkspace(), TQPoint( 0, 0 ), false ); TQApplication::sendPostedEvents( MainWindow::self->qWorkspace(), TQEvent::ChildInserted ); fw->parentWidget()->setFixedSize( 1, 1 ); diff --git a/tools/designer/designer/project.h b/tools/designer/designer/project.h index f5c6f1485..b55224f8c 100644 --- a/tools/designer/designer/project.h +++ b/tools/designer/designer/project.h @@ -64,11 +64,11 @@ public: #ifndef TQT_NO_SQL conn( 0 ), #endif - project( p ), loaded( FALSE ), iface( 0 ) {} + project( p ), loaded( false ), iface( 0 ) {} ~DatabaseConnection(); bool refreshCatalog(); - bool open( bool suppressDialog = TRUE ); + bool open( bool suppressDialog = true ); void close(); DesignerDatabase *iFace(); @@ -122,12 +122,12 @@ class Project : public TQObject public: Project( const TQString &fn, const TQString &pName = TQString::null, - TQPluginManager<ProjectSettingsInterface> *pm = 0, bool isDummy = FALSE, + TQPluginManager<ProjectSettingsInterface> *pm = 0, bool isDummy = false, const TQString &l = "C++" ); ~Project(); - void setFileName( const TQString &fn, bool doClear = TRUE ); - TQString fileName( bool singlePro = FALSE ) const; + void setFileName( const TQString &fn, bool doClear = true ); + TQString fileName( bool singlePro = false ) const; TQString projectName() const; void setDatabaseDescription( const TQString &db ); @@ -142,13 +142,13 @@ public: bool isValid() const; - // returns TRUE if this project is the <No Project> project + // returns true if this project is the <No Project> project bool isDummy() const; TQString makeAbsolute( const TQString &f ); TQString makeRelative( const TQString &f ); - void save( bool onlyProjectFile = FALSE ); + void save( bool onlyProjectFile = false ); #ifndef TQT_NO_SQL TQPtrList<DatabaseConnection> databaseConnections() const; @@ -163,10 +163,10 @@ public: void saveConnections(); void loadConnections(); - bool openDatabase( const TQString &connection, bool suppressDialog = TRUE ); + bool openDatabase( const TQString &connection, bool suppressDialog = true ); void closeDatabase( const TQString &connection ); - TQObjectList *formList( bool resolveFakeObjects = FALSE ) const; + TQObjectList *formList( bool resolveFakeObjects = false ) const; DesignerProject *iFace(); diff --git a/tools/designer/designer/projectsettingsimpl.cpp b/tools/designer/designer/projectsettingsimpl.cpp index 19f6fedeb..a7d102866 100644 --- a/tools/designer/designer/projectsettingsimpl.cpp +++ b/tools/designer/designer/projectsettingsimpl.cpp @@ -56,7 +56,7 @@ * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ ProjectSettings::ProjectSettings( Project *pro, TQWidget* parent, const char* name, bool modal, WFlags fl ) : ProjectSettingsBase( parent, name, modal, fl ), project( pro ) @@ -66,7 +66,7 @@ ProjectSettings::ProjectSettings( Project *pro, TQWidget* parent, const char* n editProjectFile->setFocus(); if ( project->isDummy() ) { - editProjectFile->setEnabled( FALSE ); + editProjectFile->setEnabled( false ); editProjectFile->setText( project->projectName() ); } else { if ( project->fileName().isEmpty() || project->fileName() == ".pro" ) { @@ -120,10 +120,10 @@ void ProjectSettings::helpClicked() void ProjectSettings::okClicked() { // ### check for validity - project->setFileName( editProjectFile->text(), FALSE ); + project->setFileName( editProjectFile->text(), false ); project->setDatabaseDescription( editDatabaseFile->text() ); project->setLanguage( comboLanguage->text( comboLanguage->currentItem() ) ); - project->setModified( TRUE ); + project->setModified( true ); accept(); } diff --git a/tools/designer/designer/projectsettingsimpl.h b/tools/designer/designer/projectsettingsimpl.h index 639dab147..423c2d9d2 100644 --- a/tools/designer/designer/projectsettingsimpl.h +++ b/tools/designer/designer/projectsettingsimpl.h @@ -46,7 +46,7 @@ class ProjectSettings : public ProjectSettingsBase TQ_OBJECT public: - ProjectSettings( Project *pro, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + ProjectSettings( Project *pro, TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 ); ~ProjectSettings(); protected slots: diff --git a/tools/designer/designer/propertyeditor.cpp b/tools/designer/designer/propertyeditor.cpp index 78bb88b78..a01ffacc2 100644 --- a/tools/designer/designer/propertyeditor.cpp +++ b/tools/designer/designer/propertyeditor.cpp @@ -152,7 +152,7 @@ bool PropertyWhatsThis::clicked( const TQString& href ) TQAssistantClient *ac = MainWindow::self->assistantClient(); ac->showPage( TQString( tqInstallPathDocs() ) + "/html/" + href ); } - return FALSE; // do not hide window + return false; // do not hide window } @@ -174,10 +174,10 @@ bool PropertyWhatsThis::clicked( const TQString& href ) PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) : TQListViewItem( l, after ), listview( l ), property( prop ), propertyName( propName ) { - setSelectable( FALSE ); - open = FALSE; + setSelectable( false ); + open = false; setText( 0, propertyName ); - changed = FALSE; + changed = false; setText( 1, "" ); resetButton = 0; } @@ -248,7 +248,7 @@ void PropertyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, if ( isChanged() && column == 0 ) { p->save(); TQFont f = p->font(); - f.setBold( TRUE ); + f.setBold( true ); p->setFont( f ); } @@ -300,13 +300,13 @@ void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRec p->restore(); } -/*! Subclasses which are expandable items have to return TRUE - here. Default is FALSE. +/*! Subclasses which are expandable items have to return true + here. Default is false. */ bool PropertyItem::hasSubItems() const { - return FALSE; + return false; } /*! Returns the parent property item here if this is a child or 0 @@ -330,9 +330,9 @@ void PropertyItem::setOpen( bool b ) open = b; if ( !open ) { - children.setAutoDelete( TRUE ); + children.setAutoDelete( true ); children.clear(); - children.setAutoDelete( FALSE ); + children.setAutoDelete( false ); tqApp->processEvents(); listview->updateEditorSize(); return; @@ -428,7 +428,7 @@ void PropertyItem::updateResetButtonState() if ( !resetButton ) return; if ( propertyParent() || !WidgetFactory::canResetProperty( listview->propertyEditor()->widget(), name() ) ) - resetButton->setEnabled( FALSE ); + resetButton->setEnabled( false ); else resetButton->setEnabled( isChanged() ); } @@ -444,7 +444,7 @@ void PropertyItem::placeEditor( TQWidget *w ) if ( !r.size().isValid() ) { listview->ensureItemVisible( this ); #if defined(TQ_WS_WIN) - listview->repaintContents( FALSE ); + listview->repaintContents( false ); #endif r = listview->itemRect( this ); } @@ -467,12 +467,12 @@ void PropertyItem::notifyValueChange() { if ( !propertyParent() ) { listview->valueChanged( this ); - setChanged( TRUE ); + setChanged( true ); if ( hasSubItems() ) initChildren(); } else { propertyParent()->childValueChanged( this ); - setChanged( TRUE ); + setChanged( true ); } } @@ -506,12 +506,12 @@ PropertyItem *PropertyItem::child( int i ) const /*! If the contents of the item is not displayable with a text, but you want to draw it yourself (using drawCustomContents()), return - TRUE here. + true here. */ bool PropertyItem::hasCustomContents() const { - return FALSE; + return false; } /*! @@ -599,7 +599,7 @@ TQLineEdit *PropertyTextItem::lined() if ( PropertyItem::name() == "name" ) { lin->setValidator( new AsciiValidator( TQString(":"), lin, "ascii_validator" ) ); if ( listview->propertyEditor()->formWindow()->isFake() ) - lin->setEnabled( FALSE ); + lin->setEnabled( false ); } else { lin->setValidator( new AsciiValidator( TQString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9" @@ -615,7 +615,7 @@ TQLineEdit *PropertyTextItem::lined() button->setFixedWidth( 20 ); connect( button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( getText() ) ); - lin->setFrame( FALSE ); + lin->setFrame( false ); } connect( lin, TQ_SIGNAL( returnPressed() ), this, TQ_SLOT( setValue() ) ); @@ -656,16 +656,16 @@ void PropertyTextItem::childValueChanged( PropertyItem *child ) PropertyItem::name(), child->value().toString() ); else MetaDataBase::setExportMacro( listview->propertyEditor()->widget(), child->value().toString() ); - listview->propertyEditor()->formWindow()->commandHistory()->setModified( TRUE ); + listview->propertyEditor()->formWindow()->commandHistory()->setModified( true ); } void PropertyTextItem::showEditor() { PropertyItem::showEditor(); if ( !lin || lin->text().length() == 0 ) { - lined()->blockSignals( TRUE ); + lined()->blockSignals( true ); lined()->setText( value().toString() ); - lined()->blockSignals( FALSE ); + lined()->blockSignals( false ); } TQWidget* w; @@ -685,7 +685,7 @@ void PropertyTextItem::createChildren() { PropertyTextItem *i = new PropertyTextItem( listview, this, this, PropertyItem::name() == "name" ? - "export macro" : "comment", FALSE, FALSE, + "export macro" : "comment", false, false, PropertyItem::name() == "name" ); i->lined()->setEnabled( isChanged() ); addChild( i ); @@ -723,13 +723,13 @@ void PropertyTextItem::setValue( const TQVariant &v ) && value() == v ) return; if ( lin ) { - lined()->blockSignals( TRUE ); + lined()->blockSignals( true ); int oldCursorPos; oldCursorPos = lin->cursorPosition(); lined()->setText( v.toString() ); if ( oldCursorPos < (int)lin->text().length() ) lin->setCursorPosition( oldCursorPos ); - lined()->blockSignals( FALSE ); + lined()->blockSignals( false ); } setText( 1, v.toString() ); PropertyItem::setValue( v ); @@ -754,15 +754,15 @@ void PropertyTextItem::getText() { bool richText = !::tqt_cast<TQButton*>(listview->propertyEditor()->widget()) || ( text( 0 ) == "whatsThis" ); - bool doWrap = FALSE; + bool doWrap = false; TQString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap ); if ( !txt.isEmpty() ) { setText( 1, txt ); PropertyItem::setValue( txt ); notifyValueChange(); - lined()->blockSignals( TRUE ); + lined()->blockSignals( true ); lined()->setText( txt ); - lined()->blockSignals( FALSE ); + lined()->blockSignals( false ); } } @@ -800,9 +800,9 @@ void PropertyDoubleItem::showEditor() { PropertyItem::showEditor(); if ( !lin ) { - lined()->blockSignals( TRUE ); + lined()->blockSignals( true ); lined()->setText( TQString::number( value().toDouble() ) ); - lined()->blockSignals( FALSE ); + lined()->blockSignals( false ); } TQWidget* w = lined(); @@ -826,13 +826,13 @@ void PropertyDoubleItem::setValue( const TQVariant &v ) if ( value() == v ) return; if ( lin ) { - lined()->blockSignals( TRUE ); + lined()->blockSignals( true ); int oldCursorPos; oldCursorPos = lin->cursorPosition(); lined()->setText( TQString::number( v.toDouble() ) ); if ( oldCursorPos < (int)lin->text().length() ) lin->setCursorPosition( oldCursorPos ); - lined()->blockSignals( FALSE ); + lined()->blockSignals( false ); } setText( 1, TQString::number( v.toDouble() ) ); PropertyItem::setValue( v ); @@ -879,9 +879,9 @@ void PropertyDateItem::showEditor() { PropertyItem::showEditor(); if ( !lin ) { - lined()->blockSignals( TRUE ); + lined()->blockSignals( true ); lined()->setDate( value().toDate() ); - lined()->blockSignals( FALSE ); + lined()->blockSignals( false ); } placeEditor( lin ); if ( !lin->isVisible() ) { @@ -904,10 +904,10 @@ void PropertyDateItem::setValue( const TQVariant &v ) return; if ( lin ) { - lined()->blockSignals( TRUE ); + lined()->blockSignals( true ); if ( lined()->date() != v.toDate() ) lined()->setDate( v.toDate() ); - lined()->blockSignals( FALSE ); + lined()->blockSignals( false ); } setText( 1, v.toDate().toString( ::TQt::ISODate ) ); PropertyItem::setValue( v ); @@ -954,9 +954,9 @@ void PropertyTimeItem::showEditor() { PropertyItem::showEditor(); if ( !lin ) { - lined()->blockSignals( TRUE ); + lined()->blockSignals( true ); lined()->setTime( value().toTime() ); - lined()->blockSignals( FALSE ); + lined()->blockSignals( false ); } placeEditor( lin ); if ( !lin->isVisible() ) { @@ -979,10 +979,10 @@ void PropertyTimeItem::setValue( const TQVariant &v ) return; if ( lin ) { - lined()->blockSignals( TRUE ); + lined()->blockSignals( true ); if ( lined()->time() != v.toTime() ) lined()->setTime( v.toTime() ); - lined()->blockSignals( FALSE ); + lined()->blockSignals( false ); } setText( 1, v.toTime().toString( ::TQt::ISODate ) ); PropertyItem::setValue( v ); @@ -1029,9 +1029,9 @@ void PropertyDateTimeItem::showEditor() { PropertyItem::showEditor(); if ( !lin ) { - lined()->blockSignals( TRUE ); + lined()->blockSignals( true ); lined()->setDateTime( value().toDateTime() ); - lined()->blockSignals( FALSE ); + lined()->blockSignals( false ); } placeEditor( lin ); if ( !lin->isVisible() ) { @@ -1054,10 +1054,10 @@ void PropertyDateTimeItem::setValue( const TQVariant &v ) return; if ( lin ) { - lined()->blockSignals( TRUE ); + lined()->blockSignals( true ); if ( lined()->dateTime() != v.toDateTime() ) lined()->setDateTime( v.toDateTime() ); - lined()->blockSignals( FALSE ); + lined()->blockSignals( false ); } setText( 1, v.toDateTime().toString( ::TQt::ISODate ) ); PropertyItem::setValue( v ); @@ -1084,7 +1084,7 @@ TQComboBox *PropertyBoolItem::combo() { if ( comb ) return comb; - comb = new TQComboBox( FALSE, listview->viewport() ); + comb = new TQComboBox( false, listview->viewport() ); comb->hide(); comb->insertItem( tr( "False" ) ); comb->insertItem( tr( "True" ) ); @@ -1111,12 +1111,12 @@ void PropertyBoolItem::showEditor() { PropertyItem::showEditor(); if ( !comb ) { - combo()->blockSignals( TRUE ); + combo()->blockSignals( true ); if ( value().toBool() ) combo()->setCurrentItem( 1 ); else combo()->setCurrentItem( 0 ); - combo()->blockSignals( FALSE ); + combo()->blockSignals( false ); } placeEditor( combo() ); if ( !combo()->isVisible() || !combo()->hasFocus() ) { @@ -1138,12 +1138,12 @@ void PropertyBoolItem::setValue( const TQVariant &v ) return; if ( comb ) { - combo()->blockSignals( TRUE ); + combo()->blockSignals( true ); if ( v.toBool() ) combo()->setCurrentItem( 1 ); else combo()->setCurrentItem( 0 ); - combo()->blockSignals( FALSE ); + combo()->blockSignals( false ); } TQString tmp = tr( "True" ); if ( !v.toBool() ) @@ -1157,7 +1157,7 @@ void PropertyBoolItem::setValue() if ( !comb ) return; setText( 1, combo()->currentText() ); - bool b = combo()->currentItem() == 0 ? (bool)FALSE : (bool)TRUE; + bool b = (combo()->currentItem() != 0); PropertyItem::setValue( TQVariant( b ) ); notifyValueChange(); } @@ -1200,12 +1200,12 @@ void PropertyIntItem::showEditor() { PropertyItem::showEditor(); if ( !spinBx ) { - spinBox()->blockSignals( TRUE ); + spinBox()->blockSignals( true ); if ( signedValue ) spinBox()->setValue( value().toInt() ); else spinBox()->setValue( value().toUInt() ); - spinBox()->blockSignals( FALSE ); + spinBox()->blockSignals( false ); } placeEditor( spinBox() ); if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) { @@ -1227,12 +1227,12 @@ void PropertyIntItem::setValue( const TQVariant &v ) return; if ( spinBx ) { - spinBox()->blockSignals( TRUE ); + spinBox()->blockSignals( true ); if ( signedValue ) spinBox()->setValue( v.toInt() ); else spinBox()->setValue( v.toUInt() ); - spinBox()->blockSignals( FALSE ); + spinBox()->blockSignals( false ); } if ( signedValue ) @@ -1290,9 +1290,9 @@ void PropertyLayoutItem::showEditor() { PropertyItem::showEditor(); if ( !spinBx ) { - spinBox()->blockSignals( TRUE ); + spinBox()->blockSignals( true ); spinBox()->setValue( value().toInt() ); - spinBox()->blockSignals( TRUE ); + spinBox()->blockSignals( true ); } placeEditor( spinBox() ); if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) { @@ -1310,9 +1310,9 @@ void PropertyLayoutItem::hideEditor() void PropertyLayoutItem::setValue( const TQVariant &v ) { if ( spinBx ) { - spinBox()->blockSignals( TRUE ); + spinBox()->blockSignals( true ); spinBox()->setValue( v.toInt() ); - spinBox()->blockSignals( FALSE ); + spinBox()->blockSignals( false ); } TQString s = v.toString(); if ( v.toInt() == -1 ) @@ -1368,10 +1368,10 @@ void PropertyListItem::showEditor() { PropertyItem::showEditor(); if ( !comb ) { - combo()->blockSignals( TRUE ); + combo()->blockSignals( true ); combo()->clear(); combo()->insertStringList( value().toStringList() ); - combo()->blockSignals( FALSE ); + combo()->blockSignals( false ); } placeEditor( combo() ); if ( !combo()->isVisible() || !combo()->hasFocus() ) { @@ -1389,10 +1389,10 @@ void PropertyListItem::hideEditor() void PropertyListItem::setValue( const TQVariant &v ) { if ( comb ) { - combo()->blockSignals( TRUE ); + combo()->blockSignals( true ); combo()->clear(); combo()->insertStringList( v.toStringList() ); - combo()->blockSignals( FALSE ); + combo()->blockSignals( false ); } setText( 1, v.toStringList().first() ); PropertyItem::setValue( v ); @@ -1423,10 +1423,10 @@ void PropertyListItem::setCurrentItem( const TQString &s ) return; if ( !comb ) { - combo()->blockSignals( TRUE ); + combo()->blockSignals( true ); combo()->clear(); combo()->insertStringList( value().toStringList() ); - combo()->blockSignals( FALSE ); + combo()->blockSignals( false ); } for ( uint i = 0; i < combo()->listBox()->count(); ++i ) { if ( combo()->listBox()->item( i )->text().lower() == s.lower() ) { @@ -1450,10 +1450,10 @@ void PropertyListItem::setCurrentItem( int i ) return; if ( !comb ) { - combo()->blockSignals( TRUE ); + combo()->blockSignals( true ); combo()->clear(); combo()->insertStringList( value().toStringList() ); - combo()->blockSignals( FALSE ); + combo()->blockSignals( false ); } combo()->setCurrentItem( i ); setText( 1, combo()->currentText() ); @@ -1491,7 +1491,7 @@ TQLineEdit *PropertyCoordItem::lined() if ( lin ) return lin; lin = new TQLineEdit( listview->viewport() ); - lin->setReadOnly( TRUE ); + lin->setReadOnly( true ); lin->installEventFilter( listview ); lin->hide(); return lin; @@ -1501,15 +1501,15 @@ void PropertyCoordItem::createChildren() { PropertyItem *i = this; if ( typ == Rect || typ == Point ) { - i = new PropertyIntItem( listview, i, this, tr( "x" ), TRUE ); + i = new PropertyIntItem( listview, i, this, tr( "x" ), true ); addChild( i ); - i = new PropertyIntItem( listview, i, this, tr( "y" ), TRUE ); + i = new PropertyIntItem( listview, i, this, tr( "y" ), true ); addChild( i ); } if ( typ == Rect || typ == Size ) { - i = new PropertyIntItem( listview, i, this, tr( "width" ), TRUE ); + i = new PropertyIntItem( listview, i, this, tr( "width" ), true ); addChild( i ); - i = new PropertyIntItem( listview, i, this, tr( "height" ), TRUE ); + i = new PropertyIntItem( listview, i, this, tr( "height" ), true ); addChild( i ); } } @@ -1591,7 +1591,7 @@ void PropertyCoordItem::setValue( const TQVariant &v ) bool PropertyCoordItem::hasSubItems() const { - return TRUE; + return true; } void PropertyCoordItem::childValueChanged( PropertyItem *child ) @@ -1698,7 +1698,7 @@ void PropertyPixmapItem::getPixmap() bool PropertyPixmapItem::hasCustomContents() const { - return TRUE; + return true; } void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r ) @@ -1753,11 +1753,11 @@ PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, Prop void PropertyColorItem::createChildren() { PropertyItem *i = this; - i = new PropertyIntItem( listview, i, this, tr( "Red" ), TRUE ); + i = new PropertyIntItem( listview, i, this, tr( "Red" ), true ); addChild( i ); - i = new PropertyIntItem( listview, i, this, tr( "Green" ), TRUE ); + i = new PropertyIntItem( listview, i, this, tr( "Green" ), true ); addChild( i ); - i = new PropertyIntItem( listview, i, this, tr( "Blue" ), TRUE ); + i = new PropertyIntItem( listview, i, this, tr( "Blue" ), true ); addChild( i ); } @@ -1837,7 +1837,7 @@ void PropertyColorItem::getColor() bool PropertyColorItem::hasCustomContents() const { - return TRUE; + return true; } void PropertyColorItem::drawCustomContents( TQPainter *p, const TQRect &r ) @@ -1862,8 +1862,8 @@ PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, Proper button->setFixedWidth( 20 ); box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); box->setLineWidth( 2 ); - lined->setFrame( FALSE ); - lined->setReadOnly( TRUE ); + lined->setFrame( false ); + lined->setReadOnly( true ); box->setFocusProxy( lined ); box->installEventFilter( listview ); lined->installEventFilter( listview ); @@ -1875,9 +1875,9 @@ PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, Proper void PropertyFontItem::createChildren() { PropertyItem *i = this; - i = new PropertyListItem( listview, i, this, tr( "Family" ), FALSE ); + i = new PropertyListItem( listview, i, this, tr( "Family" ), false ); addChild( i ); - i = new PropertyIntItem( listview, i, this, tr( "Point Size" ), TRUE ); + i = new PropertyIntItem( listview, i, this, tr( "Point Size" ), true ); addChild( i ); i = new PropertyBoolItem( listview, i, this, tr( "Bold" ) ); addChild( i ); @@ -1943,7 +1943,7 @@ void PropertyFontItem::setValue( const TQVariant &v ) void PropertyFontItem::getFont() { - bool ok = FALSE; + bool ok = false; TQFont f = TQFontDialog::getFont( &ok, val.toFont(), listview ); if ( ok && f != val.toFont() ) { setValue( f ); @@ -1953,7 +1953,7 @@ void PropertyFontItem::getFont() bool PropertyFontItem::hasSubItems() const { - return TRUE; + return true; } void PropertyFontItem::childValueChanged( PropertyItem *child ) @@ -1989,8 +1989,8 @@ PropertyDatabaseItem::PropertyDatabaseItem( PropertyList *l, PropertyItem *after button->setFixedWidth( 20 ); box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); box->setLineWidth( 2 ); - lined->setFrame( FALSE ); - lined->setReadOnly( TRUE ); + lined->setFrame( false ); + lined->setReadOnly( true ); box->setFocusProxy( lined ); box->installEventFilter( listview ); lined->installEventFilter( listview ); @@ -2000,12 +2000,12 @@ PropertyDatabaseItem::PropertyDatabaseItem( PropertyList *l, PropertyItem *after void PropertyDatabaseItem::createChildren() { PropertyItem *i = this; - i = new PropertyListItem( listview, i, this, tr( "Connection" ), TRUE ); + i = new PropertyListItem( listview, i, this, tr( "Connection" ), true ); addChild( i ); - i = new PropertyListItem( listview, i, this, tr( "Table" ), TRUE ); + i = new PropertyListItem( listview, i, this, tr( "Table" ), true ); addChild( i ); if ( withField ) { - i = new PropertyListItem( listview, i, this, tr( "Field" ), TRUE ); + i = new PropertyListItem( listview, i, this, tr( "Field" ), true ); addChild( i ); } } @@ -2109,7 +2109,7 @@ void PropertyDatabaseItem::setValue( const TQVariant &v ) bool PropertyDatabaseItem::hasSubItems() const { - return TRUE; + return true; } void PropertyDatabaseItem::childValueChanged( PropertyItem *c ) @@ -2157,7 +2157,7 @@ TQLineEdit *PropertySizePolicyItem::lined() return lin; lin = new TQLineEdit( listview->viewport() ); lin->hide(); - lin->setReadOnly( TRUE ); + lin->setReadOnly( true ); return lin; } @@ -2167,15 +2167,15 @@ void PropertySizePolicyItem::createChildren() lst << "Fixed" << "Minimum" << "Maximum" << "Preferred" << "MinimumExpanding" << "Expanding" << "Ignored"; PropertyItem *i = this; - i = new PropertyListItem( listview, i, this, tr( "hSizeType" ), FALSE ); + i = new PropertyListItem( listview, i, this, tr( "hSizeType" ), false ); i->setValue( lst ); addChild( i ); - i = new PropertyListItem( listview, i, this, tr( "vSizeType" ), FALSE ); + i = new PropertyListItem( listview, i, this, tr( "vSizeType" ), false ); i->setValue( lst ); addChild( i ); - i = new PropertyIntItem( listview, i, this, tr( "horizontalStretch" ), TRUE ); + i = new PropertyIntItem( listview, i, this, tr( "horizontalStretch" ), true ); addChild( i ); - i = new PropertyIntItem( listview, i, this, tr( "verticalStretch" ), TRUE ); + i = new PropertyIntItem( listview, i, this, tr( "verticalStretch" ), true ); addChild( i ); } @@ -2249,7 +2249,7 @@ void PropertySizePolicyItem::childValueChanged( PropertyItem *child ) bool PropertySizePolicyItem::hasSubItems() const { - return TRUE; + return true; } // -------------------------------------------------------------- @@ -2304,7 +2304,7 @@ void PropertyPaletteItem::getPalette() { if ( !listview->propertyEditor()->widget()->isWidgetType() ) return; - bool ok = FALSE; + bool ok = false; TQWidget *w = (TQWidget*)listview->propertyEditor()->widget(); if ( ::tqt_cast<TQScrollView*>(w) ) w = ( (TQScrollView*)w )->viewport(); @@ -2319,7 +2319,7 @@ void PropertyPaletteItem::getPalette() bool PropertyPaletteItem::hasCustomContents() const { - return TRUE; + return true; } void PropertyPaletteItem::drawCustomContents( TQPainter *p, const TQRect &r ) @@ -2353,7 +2353,7 @@ TQComboBox *PropertyCursorItem::combo() { if ( comb ) return comb; - comb = new TQComboBox( FALSE, listview->viewport() ); + comb = new TQComboBox( false, listview->viewport() ); comb->hide(); TQBitmap cur; @@ -2390,9 +2390,9 @@ void PropertyCursorItem::showEditor() { PropertyItem::showEditor(); if ( !comb ) { - combo()->blockSignals( TRUE ); + combo()->blockSignals( true ); combo()->setCurrentItem( (int)value().toCursor().shape() ); - combo()->blockSignals( FALSE ); + combo()->blockSignals( false ); } placeEditor( combo() ); if ( !combo()->isVisible() || !combo()->hasFocus() ) { @@ -2413,9 +2413,9 @@ void PropertyCursorItem::setValue( const TQVariant &v ) && value() == v ) return; - combo()->blockSignals( TRUE ); + combo()->blockSignals( true ); combo()->setCurrentItem( (int)v.toCursor().shape() ); - combo()->blockSignals( FALSE ); + combo()->blockSignals( false ); setText( 1, combo()->currentText() ); PropertyItem::setValue( v ); } @@ -2438,7 +2438,7 @@ PropertyKeysequenceItem::PropertyKeysequenceItem( PropertyList *l, PropertyItem *prop, const TQString &propName ) : PropertyItem( l, after, prop, propName ), - k1( 0 ), k2( 0 ), k3( 0 ), k4( 0 ), num( 0 ), mouseEnter( FALSE ) + k1( 0 ), k2( 0 ), k3( 0 ), k4( 0 ), num( 0 ), mouseEnter( false ) { box = new TQHBox( listview->viewport() ); box->hide(); @@ -2477,22 +2477,22 @@ bool PropertyKeysequenceItem::eventFilter( TQObject *o, TQEvent *e ) if ( !mouseEnter && (k->key() == TQObject::Key_Up || k->key() == TQObject::Key_Down) ) - return FALSE; + return false; handleKeyEvent( k ); - return TRUE; + return true; } else if ( (e->type() == TQEvent::FocusIn) || (e->type() == TQEvent::MouseButtonPress) ) { mouseEnter = ( listview->lastEvent() == PropertyList::MouseEvent ) || (e->type() == TQEvent::MouseButtonPress); - return TRUE; + return true; } // Lets eat accelerators now.. if ( e->type() == TQEvent::Accel || e->type() == TQEvent::AccelOverride || e->type() == TQEvent::KeyRelease ) - return TRUE; - return FALSE; + return true; + return false; } void PropertyKeysequenceItem::handleKeyEvent( TQKeyEvent *e ) @@ -2558,7 +2558,7 @@ void PropertyKeysequenceItem::setValue() // if the user wants to use F1 as accelerator, Designer will pop up a TQWhatsThat widget || (tqApp->focusWidget() && tqApp->focusWidget()->inherits("TQWhatsThat"))) notifyValueChange(); - setChanged( TRUE ); + setChanged( true ); } void PropertyKeysequenceItem::setValue( const TQVariant &v ) @@ -2585,7 +2585,7 @@ EnumPopup::EnumPopup( TQWidget *parent, const char *name, WFlags f ) setFrameStyle( Panel | Plain ); setPaletteBackgroundColor( TQt::white ); popLayout = new TQVBoxLayout( this, 3 ); - checkBoxList.setAutoDelete( TRUE ); + checkBoxList.setAutoDelete( true ); } EnumPopup::~EnumPopup() @@ -2646,18 +2646,18 @@ EnumBox::EnumBox( TQWidget *parent, const char *name ) pop = new EnumPopup( this, "popup", TQObject::WType_Popup ); connect( pop, TQ_SIGNAL( hidden() ), this, TQ_SLOT( popupHidden() ) ); connect( pop, TQ_SIGNAL( closed() ), this, TQ_SLOT( popupClosed() ) ); - popupShown = FALSE; - arrowDown = FALSE; + popupShown = false; + arrowDown = false; } void EnumBox::popupHidden() { - popupShown = FALSE; + popupShown = false; } void EnumBox::popupClosed() { - popupShown = FALSE; + popupShown = false; emit valueChanged(); } @@ -2674,7 +2674,7 @@ void EnumBox::paintEvent( TQPaintEvent * ) flags |= TQStyle::Style_HasFocus; if ( width() < 5 || height() < 5 ) { - qDrawShadePanel( &p, rect().x(), rect().y(), rect().width(), rect().height(), g, FALSE, 2, + qDrawShadePanel( &p, rect().x(), rect().y(), rect().width(), rect().height(), g, false, 2, &g.brush( TQColorGroup::Button ) ); return; } @@ -2713,14 +2713,14 @@ void EnumBox::popup() { if ( popupShown ) { pop->closeWidget(); - popupShown = FALSE; + popupShown = false; return; } pop->move( ((TQWidget*)parent())->mapToGlobal( geometry().bottomLeft() ) ); pop->setMinimumWidth( width() ); emit aboutToShowPopup(); pop->show(); - popupShown = TRUE; + popupShown = true; } void EnumBox::mousePressEvent( TQMouseEvent *e ) @@ -2735,8 +2735,8 @@ void EnumBox::mousePressEvent( TQMouseEvent *e ) arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); if ( arrowRect.contains( e->pos() ) ) { - arrowDown = TRUE; - repaint( FALSE ); + arrowDown = true; + repaint( false ); } popup(); @@ -2755,14 +2755,14 @@ void EnumBox::keyPressEvent( TQKeyEvent *e ) void EnumBox::restoreArrow() { - arrowDown = FALSE; - repaint( FALSE ); + arrowDown = false; + repaint( false ); } void EnumBox::setText( const TQString &text ) { str = text; - repaint( FALSE ); + repaint( false ); } @@ -2810,8 +2810,8 @@ void PropertyEnumItem::setValue( const TQVariant &v ) TQStringList lst = v.toStringList(); TQValueListConstIterator<TQString> it = lst.begin(); for ( ; it != lst.end(); ++it ) - enumList.append( EnumItem( *it, FALSE ) ); - enumList.first().selected = TRUE; + enumList.append( EnumItem( *it, false ) ); + enumList.first().selected = true; enumString = enumList.first().key; box->setText( enumString ); setText( 1, enumString ); @@ -2846,10 +2846,10 @@ void PropertyEnumItem::setCurrentValues( TQStrList lst ) TQStrList::ConstIterator it = lst.begin(); TQValueList<EnumItem>::Iterator eit = enumList.begin(); for ( ; eit != enumList.end(); ++eit ) { - (*eit).selected = FALSE; + (*eit).selected = false; for ( it = lst.begin(); it != lst.end(); ++it ) { if ( TQString( *it ) == (*eit).key ) { - (*eit).selected = TRUE; + (*eit).selected = true; enumString += "|" + (*eit).key; break; } @@ -2899,11 +2899,11 @@ PropertyList::PropertyList( PropertyEditor *e ) init_colors(); whatsThis = new PropertyWhatsThis( this ); - showSorted = FALSE; - header()->setMovingEnabled( FALSE ); - header()->setStretchEnabled( TRUE ); + showSorted = false; + header()->setMovingEnabled( false ); + header()->setStretchEnabled( true ); setResizePolicy( TQScrollView::Manual ); - viewport()->setAcceptDrops( TRUE ); + viewport()->setAcceptDrops( true ); viewport()->installEventFilter( this ); addColumn( tr( "Property" ) ); addColumn( tr( "Value" ) ); @@ -2921,7 +2921,7 @@ PropertyList::PropertyList( PropertyEditor *e ) setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOn ); setColumnWidthMode( 1, Manual ); - mousePressed = FALSE; + mousePressed = false; pressItem = 0; theLastEvent = MouseEvent; header()->installEventFilter( this ); @@ -3010,10 +3010,10 @@ static bool parent_is_data_aware( TQWidget *w ) TQWidget *p = w ? w->parentWidget() : 0; while ( p && !p->isTopLevel() ) { if ( ::tqt_cast<TQDesignerDataBrowser*>(p) || ::tqt_cast<TQDesignerDataView*>(p) ) - return TRUE; + return true; p = p->parentWidget(); } - return FALSE; + return false; } #endif @@ -3062,7 +3062,7 @@ void PropertyList::setupProperties() if ( qstrcmp( p->name(), "maximumSize" ) == 0 ) continue; } - unique.insert( TQString::fromLatin1( it.current() ), TRUE ); + unique.insert( TQString::fromLatin1( it.current() ), true ); if ( editor->widget()->isWidgetType() && editor->formWindow()->isMainContainer( (TQWidget*)editor->widget() ) ) { if ( qstrcmp( p->name(), "geometry" ) == 0 ) @@ -3157,27 +3157,27 @@ void PropertyList::setupProperties() << p->valueToKey( AlignHCenter ) << p->valueToKey( AlignRight ) << p->valueToKey( AlignJustify ); - item = new PropertyListItem( this, item, 0, "hAlign", FALSE ); + item = new PropertyListItem( this, item, 0, "hAlign", false ); item->setValue( lst ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) ) - item->setChanged( TRUE, FALSE ); + item->setChanged( true, false ); if ( !::tqt_cast<TQMultiLineEdit*>(editor->widget()) ) { lst.clear(); lst << p->valueToKey( AlignTop ) << p->valueToKey( AlignVCenter ) << p->valueToKey( AlignBottom ); - item = new PropertyListItem( this, item, 0, "vAlign", FALSE ); + item = new PropertyListItem( this, item, 0, "vAlign", false ); item->setValue( lst ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) ) - item->setChanged( TRUE, FALSE ); + item->setChanged( true, false ); item = new PropertyBoolItem( this, item, 0, "wordwrap" ); if ( ::tqt_cast<TQGroupBox*>(w) ) - item->setVisible( FALSE ); + item->setVisible( false ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) ) - item->setChanged( TRUE, FALSE ); + item->setChanged( true, false ); } } else { TQStrList lst( p->enumKeys() ); @@ -3191,7 +3191,7 @@ void PropertyList::setupProperties() item->setValue( l ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) ) - item->setChanged( TRUE, FALSE ); + item->setChanged( true, false ); } } else if ( p->isEnumType() ) { TQStrList l = p->enumKeys(); @@ -3203,7 +3203,7 @@ void PropertyList::setupProperties() continue; lst << k; } - item = new PropertyListItem( this, item, 0, p->name(), FALSE ); + item = new PropertyListItem( this, item, 0, p->name(), false ); item->setValue( lst ); } else { TQVariant::Type t = TQVariant::nameToType( p->type() ); @@ -3217,7 +3217,7 @@ void PropertyList::setupProperties() valueSet << item->name(); } if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) ) - item->setChanged( TRUE, FALSE ); + item->setChanged( true, false ); } } @@ -3227,20 +3227,20 @@ void PropertyList::setupProperties() setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutSpacing" ) || MetaDataBase::spacing( editor->widget() ) != -1 ) - layoutInitValue( item, TRUE ); + layoutInitValue( item, true ); else layoutInitValue( item ); item = new PropertyLayoutItem( this, item, 0, "layoutMargin" ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutMargin" ) || MetaDataBase::margin( editor->widget() ) != -1 ) - layoutInitValue( item, TRUE ); + layoutInitValue( item, true ); else layoutInitValue( item ); TQWidget *widget = (TQWidget*)w; if ( ( !::tqt_cast<TQLayoutWidget*>(widget) && widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) { - item = new PropertyListItem( this, item, 0, "resizeMode", FALSE ); + item = new PropertyListItem( this, item, 0, "resizeMode", false ); TQStringList lst; lst << "Auto" << "FreeResize" << "Minimum" << "Fixed"; item->setValue( lst ); @@ -3248,22 +3248,22 @@ void PropertyList::setupProperties() TQString resizeMod = MetaDataBase::resizeMode( editor->widget() ); if ( !resizeMod.isEmpty() && resizeMod != WidgetFactory::defaultCurrentItem( editor->widget(), "resizeMode" ) ) { - item->setChanged( TRUE, FALSE ); - MetaDataBase::setPropertyChanged( editor->widget(), "resizeMode", TRUE ); + item->setChanged( true, false ); + MetaDataBase::setPropertyChanged( editor->widget(), "resizeMode", true ); } } } if ( !::tqt_cast<Spacer*>(w) && !::tqt_cast<TQLayoutWidget*>(w) && !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<TQDesignerToolBar*>(w) ) { - item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE ); + item = new PropertyTextItem( this, item, 0, "toolTip", true, false ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) ) - item->setChanged( TRUE, FALSE ); - item = new PropertyTextItem( this, item, 0, "whatsThis", TRUE, TRUE ); + item->setChanged( true, false ); + item = new PropertyTextItem( this, item, 0, "whatsThis", true, true ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "whatsThis" ) ) - item->setChanged( TRUE, FALSE ); + item->setChanged( true, false ); } #ifndef TQT_NO_SQL @@ -3272,19 +3272,19 @@ void PropertyList::setupProperties() item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) - item->setChanged( TRUE, FALSE ); + item->setChanged( true, false ); } if ( ::tqt_cast<TQDataTable*>(editor->widget()) || ::tqt_cast<TQDataBrowser*>(editor->widget()) || ::tqt_cast<TQDataView*>(editor->widget()) ) { - item = new PropertyDatabaseItem( this, item, 0, "database", FALSE ); + item = new PropertyDatabaseItem( this, item, 0, "database", false ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) - item->setChanged( TRUE, FALSE ); + item->setChanged( true, false ); item = new PropertyBoolItem( this, item, 0, "frameworkCode" ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "frameworkCode" ) ) - item->setChanged( TRUE, FALSE ); + item->setChanged( true, false ); } #endif @@ -3327,18 +3327,18 @@ void PropertyList::setupCusWidgetProperties( MetaDataBase::CustomWidget *cw, cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { if ( unique.contains( TQString( (*it).property ) ) ) continue; - unique.insert( TQString( (*it).property ), TRUE ); + unique.insert( TQString( (*it).property ), true ); addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), (*it).property ) ) - item->setChanged( TRUE, FALSE ); + item->setChanged( true, false ); } } bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t ) { if ( name == "buddy" ) { - PropertyListItem *itm = new PropertyListItem( this, item, 0, name, TRUE ); + PropertyListItem *itm = new PropertyListItem( this, item, 0, name, true ); TQPtrDict<TQWidget> *widgets = editor->formWindow()->widgets(); TQPtrDictIterator<TQWidget> it( *widgets ); TQStringList l; @@ -3353,12 +3353,12 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, l.sort(); itm->setValue( l ); item = itm; - return TRUE; + return true; } switch ( t ) { case TQVariant::String: - item = new PropertyTextItem( this, item, 0, name, TRUE, + item = new PropertyTextItem( this, item, 0, name, true, ::tqt_cast<TQLabel*>(editor->widget()) || ::tqt_cast<TQTextView*>(editor->widget()) || ::tqt_cast<TQButton*>(editor->widget()) ); @@ -3367,7 +3367,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, item = new PropertyTextItem( this, item, 0, name, name == "name" && editor->widget() == editor->formWindow()->mainContainer(), - FALSE, TRUE ); + false, true ); break; case TQVariant::Bool: item = new PropertyBoolItem( this, item, 0, name ); @@ -3377,13 +3377,13 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, break; case TQVariant::Int: if ( name == "accel" ) - item = new PropertyTextItem( this, item, 0, name, FALSE, FALSE, FALSE, TRUE ); + item = new PropertyTextItem( this, item, 0, name, false, false, false, true ); else if ( name == "layoutSpacing" || name == "layoutMargin" ) item = new PropertyLayoutItem( this, item, 0, name ); else if ( name == "resizeMode" ) - item = new PropertyListItem( this, item, 0, name, TRUE ); + item = new PropertyListItem( this, item, 0, name, true ); else - item = new PropertyIntItem( this, item, 0, name, TRUE ); + item = new PropertyIntItem( this, item, 0, name, true ); break; case TQVariant::Double: item = new PropertyDoubleItem( this, item, 0, name ); @@ -3392,10 +3392,10 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, item = new PropertyKeysequenceItem( this, item, 0, name ); break; case TQVariant::UInt: - item = new PropertyIntItem( this, item, 0, name, FALSE ); + item = new PropertyIntItem( this, item, 0, name, false ); break; case TQVariant::StringList: - item = new PropertyListItem( this, item, 0, name, TRUE ); + item = new PropertyListItem( this, item, 0, name, true ); break; case TQVariant::Rect: item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Rect ); @@ -3407,7 +3407,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Size ); break; case TQVariant::Color: - item = new PropertyColorItem( this, item, 0, name, TRUE ); + item = new PropertyColorItem( this, item, 0, name, true ); break; case TQVariant::Pixmap: item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Pixmap ); @@ -3437,9 +3437,9 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, item = new PropertyDateTimeItem( this, item, 0, name ); break; default: - return FALSE; + return false; } - return TRUE; + return true; } void PropertyList::paintEmptyArea( TQPainter *p, const TQRect &r ) @@ -3479,7 +3479,7 @@ void PropertyList::valueChanged( PropertyItem *i ) i->value(), i->currentItem(), i->currentItemFromObject() ); cmd->execute(); - editor->formWindow()->commandHistory()->addCommand( cmd, TRUE ); + editor->formWindow()->commandHistory()->addCommand( cmd, true ); } void PropertyList::layoutInitValue( PropertyItem *i, bool changed ) @@ -3493,7 +3493,7 @@ void PropertyList::layoutInitValue( PropertyItem *i, bool changed ) i->value(), i->currentItem(), i->currentItemFromObject() ); cmd->execute(); if ( i->value().toString() != "-1" ) - changed = TRUE; + changed = true; i->setChanged( changed ); } @@ -3524,7 +3524,7 @@ void PropertyList::toggleOpen( TQListViewItem *i ) bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) { if ( !o || !e ) - return TRUE; + return true; PropertyItem *i = (PropertyItem*)currentItem(); if ( e->type() == TQEvent::KeyPress ) @@ -3538,22 +3538,22 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) ( o != this || o != viewport() ) && !( ke->state() & ControlButton ) ) { TQApplication::sendEvent( this, (TQKeyEvent*)e ); - return TRUE; + return true; } else if ( ( !::tqt_cast<TQLineEdit*>(o) || ( ::tqt_cast<TQLineEdit*>(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) && i && i->hasSubItems() ) { if ( !i->isOpen() && ( ke->key() == Key_Plus || ke->key() == Key_Right )) - i->setOpen( TRUE ); + i->setOpen( true ); else if ( i->isOpen() && ( ke->key() == Key_Minus || ke->key() == Key_Left ) ) - i->setOpen( FALSE ); + i->setOpen( false ); } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::tqt_cast<TQComboBox*>(o) ) { TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 ); TQApplication::sendEvent( o, &ke2 ); - return TRUE; + return true; } } else if ( e->type() == TQEvent::FocusOut && ::tqt_cast<TQLineEdit*>(o) && editor->formWindow() ) { TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQ_SLOT( checkCompressedCommand() ) ); @@ -3567,7 +3567,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) if ( i && ( ::tqt_cast<PropertyColorItem*>(i) || ::tqt_cast<PropertyPixmapItem*>(i) ) ) { pressItem = i; pressPos = me->pos(); - mousePressed = TRUE; + mousePressed = true; } break; case TQEvent::MouseMove: @@ -3587,7 +3587,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) p.drawRect( 0, 0, pix.width(), pix.height() ); p.end(); drg->setPixmap( pix ); - mousePressed = FALSE; + mousePressed = false; drg->dragCopy(); } else if ( ::tqt_cast<PropertyPixmapItem*>(i) ) { @@ -3596,7 +3596,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) TQImage img = pix.convertToImage(); TQImageDrag *drg = new TQImageDrag( img, this ); drg->setPixmap( pix ); - mousePressed = FALSE; + mousePressed = false; drg->dragCopy(); } } @@ -3611,15 +3611,15 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) if ( e->type() == TQEvent::ContextMenu ) { ((TQContextMenuEvent *)e)->accept(); TQPopupMenu menu( 0 ); - menu.setCheckable( TRUE ); + menu.setCheckable( true ); const int cat_id = 1; const int alpha_id = 2; menu.insertItem( tr( "Sort &Categorized" ), cat_id ); int alpha = menu.insertItem( tr( "Sort &Alphabetically" ), alpha_id ); if ( showSorted ) - menu.setItemChecked( alpha_id, TRUE ); + menu.setItemChecked( alpha_id, true ); else - menu.setItemChecked( cat_id, TRUE ); + menu.setItemChecked( cat_id, true ); int res = menu.exec( ( (TQContextMenuEvent*)e )->globalPos() ); if ( res != -1 ) { bool newShowSorted = ( res == alpha ); @@ -3629,7 +3629,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) editor->setup(); } } - return TRUE; + return true; } } @@ -3651,12 +3651,12 @@ void PropertyList::refetchData() bool changed = MetaDataBase::isPropertyChanged( editor->widget(), i->name() ); if ( ( i->name() == "layoutSpacing" || i->name() == "layoutMargin" ) ) { if ( i->value().toString() != "-1" ) - i->setChanged( TRUE, FALSE ); + i->setChanged( true, false ); else - i->setChanged( FALSE, FALSE ); + i->setChanged( false, false ); } else if ( changed != i->isChanged() ) - i->setChanged( changed, FALSE ); + i->setChanged( changed, false ); } updateEditorSize(); } @@ -3679,12 +3679,12 @@ void PropertyList::setPropertyValue( PropertyItem *i ) { const TQMetaProperty *p = editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( i->name(), TRUE), TRUE ); + property( editor->widget()->metaObject()->findProperty( i->name(), true), true ); if ( !p ) { if ( i->name() == "hAlign" ) { int align = editor->widget()->property( "alignment" ).toInt(); p = editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE ); + property( editor->widget()->metaObject()->findProperty( "alignment", true ), true ); align &= ~AlignVertical_Mask; TQStrList l = p->valueToKeys( align ); clearAlignList( l ); @@ -3692,7 +3692,7 @@ void PropertyList::setPropertyValue( PropertyItem *i ) } else if ( i->name() == "vAlign" ) { int align = editor->widget()->property( "alignment" ).toInt(); p = editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE ); + property( editor->widget()->metaObject()->findProperty( "alignment", true ), true ); align &= ~AlignHorizontal_Mask; ( (PropertyListItem*)i )->setCurrentItem( p->valueToKeys( align ).last() ); } else if ( i->name() == "wordwrap" ) { @@ -3761,9 +3761,9 @@ void PropertyList::resetProperty() i->name(), i->value(), WidgetFactory::defaultValue( editor->widget(), i->name() ), WidgetFactory::defaultCurrentItem( editor->widget(), i->name() ), - i->currentItem(), TRUE ); + i->currentItem(), true ); cmd->execute(); - editor->formWindow()->commandHistory()->addCommand( cmd, FALSE ); + editor->formWindow()->commandHistory()->addCommand( cmd, false ); if ( i->hasSubItems() ) i->initChildren(); } @@ -3903,11 +3903,11 @@ PropertyList::LastEventType PropertyList::lastEvent() // ------------------------------------------------------------ EventList::EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e ) - : HierarchyList( parent, fw, TRUE ), editor( e ) + : HierarchyList( parent, fw, true ), editor( e ) { header()->hide(); removeColumn( 1 ); - setRootIsDecorated( TRUE ); + setRootIsDecorated( true ); connect( this, TQ_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), this, TQ_SLOT( renamed( TQListViewItem * ) ) ); } @@ -3951,7 +3951,7 @@ void EventList::setup() while ( it.current() ) { HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (HierarchyItem*)0, it.current(), TQString::null, TQString::null ); - eventItem->setOpen( TRUE ); + eventItem->setOpen( true ); TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() ); HierarchyItem *item = 0; @@ -4046,15 +4046,15 @@ void EventList::renamed( TQListViewItem *i ) if ( !i->parent() ) return; TQListViewItem *itm = i->parent()->firstChild(); - bool del = FALSE; + bool del = false; while ( itm ) { if ( itm != i && itm->text( 0 ) == i->text( 0 ) ) { - del = TRUE; + del = true; break; } itm = itm->nextSibling(); } - i->setRenameEnabled( 0, FALSE ); + i->setRenameEnabled( 0, false ); if ( del ) { delete i; } else { @@ -4082,10 +4082,10 @@ void EventList::renamed( TQListViewItem *i ) MetaDataBase::addFunction( formWindow, funcname.latin1(), "virtual", "public", "slot", formWindow->project()->language(), "void" ); editor->formWindow()->mainWindow()-> - editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ), TRUE ); + editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ), true ); cmd->execute(); editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - editor->formWindow()->formFile()->setModified( TRUE ); + editor->formWindow()->formFile()->setModified( true ); } } @@ -4135,13 +4135,13 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw ) if ( w && w == wid ) { // if there is no properties displayed then we really should show them. // to do this check the number of properties in the list. - bool ret = (listview->childCount() > 0) ? TRUE : FALSE; + bool ret = (listview->childCount() > 0); if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) { TQListViewItemIterator it( listview ); - ret = FALSE; + ret = false; while ( it.current() ) { if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) { - ret = TRUE; + ret = true; break; } ++it; @@ -4162,11 +4162,11 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw ) wid = w; formwindow = fw; setCaption( tr( "Property Editor (%1)" ).arg( formwindow->name() ) ); - listview->viewport()->setUpdatesEnabled( FALSE ); - listview->setUpdatesEnabled( FALSE ); + listview->viewport()->setUpdatesEnabled( false ); + listview->setUpdatesEnabled( false ); clear(); - listview->viewport()->setUpdatesEnabled( TRUE ); - listview->setUpdatesEnabled( TRUE ); + listview->viewport()->setUpdatesEnabled( true ); + listview->setUpdatesEnabled( true ); setup(); } @@ -4182,16 +4182,16 @@ void PropertyEditor::setup() { if ( !formwindow || !wid ) return; - listview->viewport()->setUpdatesEnabled( FALSE ); + listview->viewport()->setUpdatesEnabled( false ); listview->setupProperties(); - listview->viewport()->setUpdatesEnabled( TRUE ); + listview->viewport()->setUpdatesEnabled( true ); listview->updateEditorSize(); // the forced processing of events in setupProperties() can set wid to 0, so we have to check if ( wid && !wid->isA( "PropertyObject" ) ) { - eList->viewport()->setUpdatesEnabled( FALSE ); + eList->viewport()->setUpdatesEnabled( false ); eList->setup(); - eList->viewport()->setUpdatesEnabled( TRUE ); + eList->viewport()->setUpdatesEnabled( true ); } } @@ -4248,7 +4248,7 @@ TQString PropertyEditor::classOfCurrentProperty() const TQString curr = currentProperty(); TQMetaObject *mo = o->metaObject(); while ( mo ) { - TQStrList props = mo->propertyNames( FALSE ); + TQStrList props = mo->propertyNames( false ); if ( props.find( curr.latin1() ) != -1 ) return mo->className(); mo = mo->superClass(); @@ -4296,9 +4296,9 @@ void PropertyEditor::updateWindow() { if ( isHidden() && count() ) { parentWidget()->show(); - MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), TRUE ); + MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), true ); } else if ( isShown() && !count() ) { parentWidget()->hide(); - MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), FALSE ); + MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), false ); } } diff --git a/tools/designer/designer/propertyeditor.h b/tools/designer/designer/propertyeditor.h index 45f22481c..4783f0835 100644 --- a/tools/designer/designer/propertyeditor.h +++ b/tools/designer/designer/propertyeditor.h @@ -92,7 +92,7 @@ public: TQString name() const; virtual void notifyValueChange(); - virtual void setChanged( bool b, bool updateDb = TRUE ); + virtual void setChanged( bool b, bool updateDb = true ); bool isChanged() const; virtual void placeEditor( TQWidget *w ); @@ -149,7 +149,7 @@ class PropertyTextItem : public TQObject, public: PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool comment, bool multiLine, bool ascii = FALSE, bool a = FALSE ); + const TQString &propName, bool comment, bool multiLine, bool ascii = false, bool a = false ); ~PropertyTextItem(); virtual void createChildren(); @@ -162,7 +162,7 @@ public: virtual bool hasSubItems() const; virtual void childValueChanged( PropertyItem *child ); - virtual void setChanged( bool b, bool updateDb = TRUE ); + virtual void setChanged( bool b, bool updateDb = true ); private slots: void setValue(); @@ -571,7 +571,7 @@ private: struct EnumItem { EnumItem( const TQString &k, bool s ) : key( k ), selected( s ) {} - EnumItem() : key( TQString::null ), selected( FALSE ) {} + EnumItem() : key( TQString::null ), selected( false ) {} bool operator==( const EnumItem &item ) const { return key == item.key; } @@ -678,7 +678,7 @@ public: virtual void setPropertyValue( PropertyItem *i ); virtual void setCurrentProperty( const TQString &n ); - void layoutInitValue( PropertyItem *i, bool changed = FALSE ); + void layoutInitValue( PropertyItem *i, bool changed = false ); PropertyEditor *propertyEditor() const; TQString whatsThisAt( const TQPoint &p ); void showCurrentWhatsThis(); diff --git a/tools/designer/designer/propertyobject.cpp b/tools/designer/designer/propertyobject.cpp index 3244ec52e..0064baa00 100644 --- a/tools/designer/designer/propertyobject.cpp +++ b/tools/designer/designer/propertyobject.cpp @@ -43,7 +43,7 @@ PropertyObject::PropertyObject( const TQWidgetList &objs ) { TQPtrVector<TQPtrList<TQMetaObject> > v; v.resize( objects.count() ); - v.setAutoDelete( TRUE ); + v.setAutoDelete( true ); for ( TQObject *o = objects.first(); o; o = objects.next() ) { const TQMetaObject *m = o->metaObject(); @@ -84,7 +84,7 @@ bool PropertyObject::setProperty( const char *name, const TQVariant& value ) for ( TQObject *o = objects.first(); o; o = objects.next() ) o->setProperty( name, value ); - return TRUE; + return true; } TQVariant PropertyObject::property( const char *name ) const @@ -102,9 +102,9 @@ bool PropertyObject::mdIsPropertyChanged( const TQString &property ) { for ( TQObject *o = objects.first(); o; o = objects.next() ) { if ( MetaDataBase::isPropertyChanged( o, property ) ) - return TRUE; + return true; } - return FALSE; + return false; } void PropertyObject::mdSetPropertyComment( const TQString &property, const TQString &comment ) diff --git a/tools/designer/designer/qcompletionedit.cpp b/tools/designer/designer/qcompletionedit.cpp index 79cdae62c..ce273b673 100644 --- a/tools/designer/designer/qcompletionedit.cpp +++ b/tools/designer/designer/qcompletionedit.cpp @@ -38,7 +38,7 @@ #include <ntqvbox.h> TQCompletionEdit::TQCompletionEdit( TQWidget *parent, const char *name ) - : TQLineEdit( parent, name ), aAdd( FALSE ), caseSensitive( FALSE ) + : TQLineEdit( parent, name ), aAdd( false ), caseSensitive( false ) { popup = new TQVBox( 0, 0, WType_Popup ); popup->setFrameStyle( TQFrame::Box | TQFrame::Plain ); @@ -105,7 +105,7 @@ void TQCompletionEdit::placeListBox() popup->move( p.x(), p.y() - listbox->height() ); popup->show(); listbox->setCurrentItem( 0 ); - listbox->setSelected( 0, TRUE ); + listbox->setSelected( 0, true ); setFocus(); } @@ -130,20 +130,20 @@ bool TQCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) if ( ke->key() == Key_Tab && listbox->count() > 1 && listbox->currentItem() < (int)listbox->count() - 1 ) { listbox->setCurrentItem( listbox->currentItem() + 1 ); - return TRUE; + return true; } popup->close(); setFocus(); - blockSignals( TRUE ); + blockSignals( true ); setText( listbox->currentText() ); - blockSignals( FALSE ); + blockSignals( false ); emit chosen( text() ); - return TRUE; + return true; } else if ( ke->key() == Key_Left || ke->key() == Key_Right || ke->key() == Key_Up || ke->key() == Key_Down || ke->key() == Key_Home || ke->key() == Key_End || ke->key() == Key_Prior || ke->key() == Key_Next ) { - return FALSE; + return false; } else if ( ke->key() == Key_Escape ) { popup->close(); setFocus(); @@ -155,16 +155,16 @@ bool TQCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) setFocus(); } TQApplication::sendEvent( this, e ); - return TRUE; + return true; } } else if ( e->type() == TQEvent::MouseButtonDblClick ) { popup->close(); setFocus(); - blockSignals( TRUE ); + blockSignals( true ); setText( listbox->currentText() ); - blockSignals( FALSE ); + blockSignals( false ); emit chosen( text() ); - return TRUE; + return true; } } else if ( o == this ) { if ( e->type() == TQEvent::KeyPress ) { @@ -178,7 +178,7 @@ bool TQCompletionEdit::eventFilter( TQObject *o, TQEvent *e ) ke->key() == Key_Tab || ke->key() == Key_Escape ) { TQApplication::sendEvent( listbox, e ); - return TRUE; + return true; } } } diff --git a/tools/designer/designer/replacedialog.ui.h b/tools/designer/designer/replacedialog.ui.h index c2c233ec1..f5ad431d8 100644 --- a/tools/designer/designer/replacedialog.ui.h +++ b/tools/designer/designer/replacedialog.ui.h @@ -52,10 +52,10 @@ void ReplaceDialog::doReplace() return; if ( !editor->replace( comboFind->currentText(), comboReplace->currentText(), checkCase->isChecked(), - checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), FALSE ) ) - checkBegin->setChecked( TRUE ); + checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), false ) ) + checkBegin->setChecked( true ); else - checkBegin->setChecked( FALSE ); + checkBegin->setChecked( false ); } void ReplaceDialog::doReplaceAll() @@ -64,16 +64,16 @@ void ReplaceDialog::doReplaceAll() return; if ( !editor->replace( comboFind->currentText(), comboReplace->currentText(), checkCase->isChecked(), - checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), TRUE ) ) - checkBegin->setChecked( TRUE ); + checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), true ) ) + checkBegin->setChecked( true ); else - checkBegin->setChecked( FALSE ); + checkBegin->setChecked( false ); } void ReplaceDialog::setEditor( EditorInterface * e, TQObject * fw ) { if ( fw != formWindow ) - checkBegin->setChecked( TRUE ); + checkBegin->setChecked( true ); formWindow = fw; if ( editor ) editor->release(); diff --git a/tools/designer/designer/resource.cpp b/tools/designer/designer/resource.cpp index f683d3ec3..726ab13bb 100644 --- a/tools/designer/designer/resource.cpp +++ b/tools/designer/designer/resource.cpp @@ -95,7 +95,7 @@ static TQString makeIndent( int indent ) return s; } -static TQString entitize( const TQString &s, bool attribute = FALSE ) +static TQString entitize( const TQString &s, bool attribute = false ) { TQString s2 = s; s2 = s2.replace( "&", "&" ); @@ -279,11 +279,11 @@ Resource::Resource() mainwindow = 0; formwindow = 0; toplevel = 0; - copying = FALSE; - pasting = FALSE; - hadGeometry = FALSE; + copying = false; + pasting = false; + hadGeometry = false; langIface = 0; - hasFunctions = FALSE; + hasFunctions = false; } Resource::Resource( MainWindow* mw ) @@ -291,11 +291,11 @@ Resource::Resource( MainWindow* mw ) { formwindow = 0; toplevel = 0; - copying = FALSE; - pasting = FALSE; - hadGeometry = FALSE; + copying = false; + pasting = false; + hadGeometry = false; langIface = 0; - hasFunctions = FALSE; + hasFunctions = false; } Resource::~Resource() @@ -318,9 +318,9 @@ TQWidget *Resource::widget() const bool Resource::load( FormFile *ff, Project *defProject ) { if ( !ff || ff->absFileName().isEmpty() ) - return FALSE; + return false; currFileName = ff->absFileName(); - mainContainerSet = FALSE; + mainContainerSet = false; TQFile f( ff->absFileName() ); f.open( IO_ReadOnly | IO_Translate ); @@ -340,7 +340,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) TQString errMsg; int errLine; if ( !doc.setContent( dev, &errMsg, &errLine ) ) { - return FALSE; + return false; } DomTool::fixDocument( doc ); @@ -468,14 +468,14 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) metaInfo.className = e.firstChild().toText().data(); } else if ( e.tagName() == "pixmapfunction" ) { if ( formwindow ) { - formwindow->setSavePixmapInline( FALSE ); - formwindow->setSavePixmapInProject( FALSE ); + formwindow->setSavePixmapInline( false ); + formwindow->setSavePixmapInProject( false ); formwindow->setPixmapLoaderFunction( e.firstChild().toText().data() ); } } else if ( e.tagName() == "pixmapinproject" ) { if ( formwindow ) { - formwindow->setSavePixmapInline( FALSE ); - formwindow->setSavePixmapInProject( TRUE ); + formwindow->setSavePixmapInline( false ); + formwindow->setSavePixmapInProject( true ); } } else if ( e.tagName() == "exportmacro" ) { exportMacro = e.firstChild().toText().data(); @@ -486,7 +486,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) formwindow->setSpacingFunction( e.attribute( "spacing" ) ); formwindow->setMarginFunction( e.attribute( "margin" ) ); if ( !formwindow->marginFunction().isEmpty() || !formwindow->spacingFunction().isEmpty() ) - formwindow->hasLayoutFunctions( TRUE ); + formwindow->hasLayoutFunctions( true ); } e = e.nextSibling().toElement(); @@ -498,7 +498,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) loadCustomWidgets( customWidgets, this ); if ( !createObject( widget, formwindow) ) - return FALSE; + return false; if ( !forwards.isNull() ) { for ( TQDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) @@ -575,7 +575,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) function.returnType = "void"; function.type = "slot"; function.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) ) + if ( !MetaDataBase::hasFunction( formwindow, function.function, true ) ) MetaDataBase::addFunction( formwindow, function.function, function.specifier, function.access, "slot", function.language, function.returnType ); else @@ -603,7 +603,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) if ( function.returnType.isEmpty() ) function.returnType = "void"; function.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) ) + if ( !MetaDataBase::hasFunction( formwindow, function.function, true ) ) MetaDataBase::addFunction( formwindow, function.function, function.specifier, function.access, function.type, function.language, function.returnType ); @@ -654,7 +654,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) formwindow->resize( formwindow->size().expandedTo( formwindow->sizeHint() ) ); } - return TRUE; + return true; } static bool saveCode( const TQString &filename, const TQString &code ) @@ -663,15 +663,15 @@ static bool saveCode( const TQString &filename, const TQString &code ) if ( f.open(IO_WriteOnly | IO_Translate) ) { TQTextStream ts( &f ); ts << code; - return TRUE; + return true; } - return FALSE; + return false; } bool Resource::save( const TQString& filename, bool formCodeOnly ) { if ( !formwindow || filename.isEmpty() ) - return FALSE; + return false; if (!langIface) { TQString lang = "TQt Script"; if ( mainwindow ) @@ -682,8 +682,8 @@ bool Resource::save( const TQString& filename, bool formCodeOnly ) } if ( formCodeOnly && langIface ) { if ( saveFormCode(formwindow->formFile(), langIface) ) - return TRUE; - bool breakout = FALSE; + return true; + bool breakout = false; FormFile *ff = formwindow->formFile(); TQString codeFile = ff->project()->makeAbsolute( ff->codeFile() ); TQString filter = langIface->fileFilterList().join(";;"); @@ -692,7 +692,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly ) breakout = fn.isEmpty(); if ( !breakout ) { if ( saveCode(fn, ff->code()) ) - return TRUE; + return true; } } } @@ -700,7 +700,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly ) TQFile f( filename ); if ( !f.open( IO_WriteOnly | IO_Translate ) ) - return FALSE; + return false; bool b = save( &f ); f.close(); return b; @@ -709,7 +709,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly ) bool Resource::save( TQIODevice* dev ) { if ( !formwindow ) - return FALSE; + return false; if ( !langIface ) { TQString lang = "C++"; @@ -753,7 +753,7 @@ TQString Resource::copy() if ( !formwindow ) return TQString::null; - copying = TRUE; + copying = true; TQString s; TQTextOStream ts( &s ); @@ -762,10 +762,10 @@ TQString Resource::copy() TQWidgetList tmp( widgets ); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { TQWidget *p = w->parentWidget(); - bool save = TRUE; + bool save = true; while ( p ) { if ( tmp.findRef( p ) != -1 ) { - save = FALSE; + save = false; break; } p = p->parentWidget(); @@ -787,9 +787,9 @@ void Resource::paste( const TQString &cb, TQWidget *parent ) { if ( !formwindow ) return; - mainContainerSet = TRUE; + mainContainerSet = true; - pasting = TRUE; + pasting = true; TQDomDocument doc; TQString errMsg; int errLine; @@ -812,9 +812,9 @@ void Resource::paste( const TQString &cb, TQWidget *parent ) loadCustomWidgets( customWidgets, this ); TQWidgetList widgets; - formwindow->clearSelection( FALSE ); - formwindow->setPropertyShowingBlocked( TRUE ); - formwindow->clearSelection( FALSE ); + formwindow->clearSelection( false ); + formwindow->setPropertyShowingBlocked( true ); + formwindow->clearSelection( false ); while ( !firstWidget.isNull() ) { if ( firstWidget.tagName() == "widget" ) { TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 ); @@ -847,7 +847,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent ) } firstWidget = firstWidget.nextSibling().toElement(); } - formwindow->setPropertyShowingBlocked( FALSE ); + formwindow->setPropertyShowingBlocked( false ); formwindow->emitShowProperties(); PasteCommand *cmd = new PasteCommand( FormWindow::tr( "Paste" ), formwindow, widgets ); @@ -1032,7 +1032,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre } else if ( ::tqt_cast<TQMainWindow*>(obj) ) { saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent ); } else { - bool saved = FALSE; + bool saved = false; #ifdef QT_CONTAINER_CUSTOM_WIDGETS if ( isPlugin ) { WidgetInterface *iface = 0; @@ -1044,7 +1044,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre if ( iface2->supportsPages( className ) ) { TQWidgetList containers = iface2->pages( className, (TQWidget*)obj ); if ( !containers.isEmpty() ) { - saved = TRUE; + saved = true; int i = 0; for ( TQWidget *w = containers.first(); w; w = containers.next(), ++i ) { if ( WidgetDatabase:: @@ -1073,7 +1073,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre } } } else { - saved = TRUE; + saved = true; TQWidget *w = iface2->containerOfWidget( className, (TQWidget*)obj ); if ( obj != w ) { ts << makeIndent( indent ) << "<widget class=\"" @@ -1095,14 +1095,14 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre MetaDataBase::CustomWidget *cw = new MetaDataBase::CustomWidget; cw->className = className; cw->includeFile = WidgetDatabase::includeFile( classID ); - TQStrList lst = w->metaObject()->signalNames( TRUE ); + TQStrList lst = w->metaObject()->signalNames( true ); for ( TQPtrListIterator<char> it(lst); it.current(); ++it ) cw->lstSignals.append(it.current()); int i; - int total = w->metaObject()->numProperties( TRUE ); + int total = w->metaObject()->numProperties( true ); for ( i = 0; i < total; i++ ) { - const TQMetaProperty *p = w->metaObject()->property( i, TRUE ); + const TQMetaProperty *p = w->metaObject()->property( i, true ); if ( p->designable(w) ) { MetaDataBase::Property prop; prop.property = p->name(); @@ -1120,9 +1120,9 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre } } - total = w->metaObject()->numSlots( TRUE ); + total = w->metaObject()->numSlots( true ); for ( i = 0; i < total; i++ ) { - const TQMetaData *md = w->metaObject()->slot( i, TRUE ); + const TQMetaData *md = w->metaObject()->slot( i, true ); MetaDataBase::Function funky; // Find out if we have a return type. if ( md->method->count > 0 ) { @@ -1230,7 +1230,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) TQStringList l; l << lv->header()->label( i ); TQPtrList<TQPixmap> pix; - pix.setAutoDelete( TRUE ); + pix.setAutoDelete( true ); if ( lv->header()->iconSet( i ) ) pix.append( new TQPixmap( lv->header()->iconSet( i )->pixmap() ) ); saveItem( l, pix, ts, indent ); @@ -1272,7 +1272,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) TQStringList l; l << table->horizontalHeader()->label( i ); TQPtrList<TQPixmap> pix; - pix.setAutoDelete( TRUE ); + pix.setAutoDelete( true ); if ( table->horizontalHeader()->iconSet( i ) ) pix.append( new TQPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) ); saveItem( l, pix, ts, indent ); @@ -1296,7 +1296,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) TQStringList l; l << table->verticalHeader()->label( i ); TQPtrList<TQPixmap> pix; - pix.setAutoDelete( TRUE ); + pix.setAutoDelete( true ); if ( table->verticalHeader()->iconSet( i ) ) pix.append( new TQPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) ); saveItem( l, pix, ts, indent ); @@ -1510,7 +1510,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) continue; saved << TQString::fromLatin1( it.current() ); const TQMetaProperty* p = w->metaObject()-> - property( w->metaObject()->findProperty( it.current(), TRUE ), TRUE ); + property( w->metaObject()->findProperty( it.current(), true ), true ); if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) ) continue; if ( ::tqt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 && @@ -1566,7 +1566,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) { - const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE ); + const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true ); TQStrList l( p->valueToKeys( w->property( name ).toInt() ) ); TQString v; for ( uint i = 0; i < l.count(); ++i ) { @@ -1579,7 +1579,7 @@ void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Ty void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) { - const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE ); + const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true ); int value = w->property( name ).toInt(); const char* key = p->valueToKey( value ); if (key) @@ -1855,7 +1855,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay // ### TODO loading for custom container widgets without pages #endif if ( !className.isNull() ) { - obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE ); + obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, false ); if ( !obj ) { TQMessageBox::critical( MainWindow::self, MainWindow::tr( "Loading File" ), MainWindow::tr( "Error loading %1.\n" @@ -1867,7 +1867,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay if ( !mainContainerSet ) { if ( formwindow ) formwindow->setMainContainer( (TQWidget*)obj ); - mainContainerSet = TRUE; + mainContainerSet = true; } w = (TQWidget*)obj; if ( ::tqt_cast<TQMainWindow*>(w) ) @@ -2012,9 +2012,9 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) TQListView *lv = (TQListView*)widget; TQDomElement n = e.firstChild().toElement(); TQPixmap pix; - bool hasPixmap = FALSE; + bool hasPixmap = false; TQString txt; - bool clickable = TRUE, resizable = TRUE; + bool clickable = true, resizable = true; while ( !n.isNull() ) { if ( n.tagName() == "property" ) { TQString attrib = n.attribute( "name" ); @@ -2052,7 +2052,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) TQDomElement n = e.firstChild().toElement(); TQPixmap pix; - bool hasPixmap = FALSE; + bool hasPixmap = false; TQString txt; TQString field; TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( table ); @@ -2088,7 +2088,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap ) { TQDomElement n = e; - hasPixmap = FALSE; + hasPixmap = false; while ( !n.isNull() ) { if ( n.tagName() == "property" ) { TQString attrib = n.attribute( "name" ); @@ -2112,7 +2112,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt if ( ::tqt_cast<TQListBox*>(widget) || ::tqt_cast<TQComboBox*>(widget) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; - bool hasPixmap = FALSE; + bool hasPixmap = false; TQString txt; loadItem( n, pix, txt, hasPixmap ); TQListBox *lb = 0; @@ -2134,7 +2134,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt } else if ( ::tqt_cast<TQIconView*>(widget) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; - bool hasPixmap = FALSE; + bool hasPixmap = false; TQString txt; loadItem( n, pix, txt, hasPixmap ); TQIconView *iv = (TQIconView*)widget; @@ -2169,7 +2169,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt } } } else if ( n.tagName() == "item" ) { - item->setOpen( TRUE ); + item->setOpen( true ); createItem( n, widget, item ); } @@ -2197,15 +2197,15 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay colspan = 1; Spacer *spacer = (Spacer*) WidgetFactory::create( WidgetDatabase::idFromClassName("Spacer"), - parent, "spacer", FALSE); + parent, "spacer", false); spacer->setOrientation( o ); - spacer->setInteraciveMode( FALSE ); + spacer->setInteraciveMode( false ); while ( !n.isNull() ) { if ( n.tagName() == "property" ) setObjectProperty( spacer, n.attribute( "name" ), n.firstChild().toElement() ); n = n.nextSibling().toElement(); } - spacer->setInteraciveMode( TRUE ); + spacer->setInteraciveMode( true ); if ( formwindow ) formwindow->insertWidget( spacer, pasting ); if ( layout ) { @@ -2223,7 +2223,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay */ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e ) { - const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE ); + const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true ); if ( !::tqt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS) if ( obj->inherits( "CustomWidget" ) ) { @@ -2231,7 +2231,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" ) return; } - MetaDataBase::setPropertyChanged( obj, prop, TRUE ); + MetaDataBase::setPropertyChanged( obj, prop, true ); } TQVariant defVarient; @@ -2328,11 +2328,11 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD if ( prop == "geometry" ) { if ( obj == toplevel ) { - hadGeometry = TRUE; + hadGeometry = true; toplevel->resize( v.toRect().size() ); return; } else if ( obj == formwindow->mainContainer() ) { - hadGeometry = TRUE; + hadGeometry = true; formwindow->resize( v.toRect().size() ); return; } @@ -2354,7 +2354,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD if ( prop == "name" ) { if ( pasting ) { TQString s = v.toString(); - formwindow->unify( (TQWidget*)obj, s, TRUE ); + formwindow->unify( (TQWidget*)obj, s, true ); obj->setName( s ); return; } else if ( formwindow && obj == formwindow->mainContainer() ) { @@ -2401,12 +2401,12 @@ void Resource::saveImageData( const TQImage &img, TQTextStream &ts, int indent ) TQBuffer buf( ba ); buf.open( IO_WriteOnly | IO_Translate ); TQString format; - bool compress = FALSE; + bool compress = false; if (img.hasAlphaBuffer()) { format = "PNG"; } else { format = img.depth() > 1 ? "XPM" : "XBM"; - compress = TRUE; + compress = true; } TQImageIO iio( &buf, format ); iio.setImage( img ); @@ -2584,7 +2584,7 @@ void Resource::loadConnections( const TQDomElement &e ) } else { if ( name == "this" ) name = toplevel->name(); - TQObjectList *l = toplevel->queryList( 0, name, FALSE ); + TQObjectList *l = toplevel->queryList( 0, name, false ); if ( l ) { if ( l->first() ) conn.sender = l->first(); @@ -2602,7 +2602,7 @@ void Resource::loadConnections( const TQDomElement &e ) if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { conn.receiver = toplevel; } else { - TQObjectList *l = toplevel->queryList( 0, name, FALSE ); + TQObjectList *l = toplevel->queryList( 0, name, false ); if ( l ) { if ( l->first() ) conn.receiver = l->first(); @@ -2642,7 +2642,7 @@ void Resource::loadConnections( const TQDomElement &e ) if ( slot.returnType.isEmpty() ) slot.returnType = "void"; slot.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( formwindow, slot.function, TRUE ) ) + if ( !MetaDataBase::hasFunction( formwindow, slot.function, true ) ) MetaDataBase::addFunction( formwindow, slot.function, slot.specifier, slot.access, "slot", slot.language, slot.returnType ); else @@ -2815,7 +2815,7 @@ void Resource::loadTabOrder( const TQDomElement &e ) TQString name = n.firstChild().toText().data(); if ( name.isEmpty() ) continue; - TQObjectList *l = toplevel->queryList( 0, name, FALSE ); + TQObjectList *l = toplevel->queryList( 0, name, false ); if ( l ) { if ( l->first() ) { TQWidget *w = (TQWidget*)l->first(); @@ -2855,12 +2855,12 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) if ( !langIface || formwindow->project()->isCpp() ) { TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow ); TQString extensionInclude; - bool needExtensionInclude = FALSE; + bool needExtensionInclude = false; if ( langIface && formwindow->formFile()->hasFormCode() && formwindow->formFile()->codeFileState() != FormFile::Deleted ) { extensionInclude = TQFileInfo( currFileName ).fileName() + langIface->formCodeExtension(); - needExtensionInclude = TRUE; + needExtensionInclude = true; } if ( !includes.isEmpty() || needExtensionInclude ) { ts << makeIndent( indent ) << "<includes>" << endl; @@ -2938,7 +2938,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) ts << makeIndent( indent ) << "</slots>" << endl; } - TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, TRUE ); + TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, true ); if ( !functionList.isEmpty() ) { ts << makeIndent( indent ) << "<functions>" << endl; indent++; @@ -3075,13 +3075,13 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e ) a = new TQDesignerAction( parent ); MetaDataBase::addEntry( a ); TQDomElement n2 = n.firstChild().toElement(); - bool hasMenuText = FALSE; + bool hasMenuText = false; while ( !n2.isNull() ) { if ( n2.tagName() == "property" ) { TQDomElement n3(n2); // don't modify n2 TQString prop = n3.attribute( "name" ); if (prop == "menuText") - hasMenuText = TRUE; + hasMenuText = true; TQDomElement value(n3.firstChild().toElement()); setObjectProperty( a, prop, value ); if (!hasMenuText && uiFileVersion < "3.3" && prop == "text") @@ -3095,13 +3095,13 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e ) a = new TQDesignerActionGroup( parent ); MetaDataBase::addEntry( a ); TQDomElement n2 = n.firstChild().toElement(); - bool hasMenuText = FALSE; + bool hasMenuText = false; while ( !n2.isNull() ) { if ( n2.tagName() == "property" ) { TQDomElement n3(n2); // don't modify n2 TQString prop = n3.attribute( "name" ); if (prop == "menuText") - hasMenuText = TRUE; + hasMenuText = true; TQDomElement value = n3.firstChild().toElement(); setObjectProperty( a, prop, value ); if (!hasMenuText && uiFileVersion < "3.3" && prop == "text") @@ -3184,7 +3184,7 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ) return; ts << makeIndent( indent ) << "<menubar>" << endl; indent++; - MetaDataBase::setPropertyChanged( mb, "name", TRUE ); // FIXME: remove + MetaDataBase::setPropertyChanged( mb, "name", true ); // FIXME: remove saveObjectProperties( mb, ts, indent ); for ( int i = 0; i < (int)mb->count(); ++i ) { @@ -3305,7 +3305,7 @@ void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e ) PopupMenuEditorItem *i = p->at( p->find( a ) ); if ( i ) { TQString name = n.attribute( "name" ); - formwindow->unify( i, name, TRUE ); + formwindow->unify( i, name, true ); i->setName( name ); MetaDataBase::addEntry( i ); loadPopupMenu( i->subMenu(), n ); @@ -3325,7 +3325,7 @@ bool Resource::saveFormCode( FormFile *formfile, LanguageInterface * /*langIface formfile->code().isEmpty() || !formfile->hasFormCode() || !formfile->isModified(FormFile::WFormCode) ) - return TRUE; // There is no code to be saved. + return true; // There is no code to be saved. return saveCode( formfile->project()->makeAbsolute(formfile->codeFile()), formfile->code() ); } diff --git a/tools/designer/designer/resource.h b/tools/designer/designer/resource.h index f16344dbe..05584ce50 100644 --- a/tools/designer/designer/resource.h +++ b/tools/designer/designer/resource.h @@ -82,7 +82,7 @@ public: bool load( FormFile *ff, TQIODevice*, Project *defProject = 0 ); TQString copy(); - bool save( const TQString& filename, bool formCodeOnly = FALSE); + bool save( const TQString& filename, bool formCodeOnly = false); bool save( TQIODevice* ); void paste( const TQString &cb, TQWidget *parent ); diff --git a/tools/designer/designer/sizehandle.cpp b/tools/designer/designer/sizehandle.cpp index 7d3b1eb14..02f6946f5 100644 --- a/tools/designer/designer/sizehandle.cpp +++ b/tools/designer/designer/sizehandle.cpp @@ -44,12 +44,12 @@ SizeHandle::SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s ) : TQWidget( parent ) { - active = TRUE; + active = true; setBackgroundMode( active ? PaletteText : PaletteDark ); setFixedSize( 6, 6 ); widget = 0; dir =d ; - setMouseTracking( FALSE ); + setMouseTracking( false ); formWindow = parent; sel = s; updateCursor(); diff --git a/tools/designer/designer/sizehandle.h b/tools/designer/designer/sizehandle.h index adc1d7810..9d97f6242 100644 --- a/tools/designer/designer/sizehandle.h +++ b/tools/designer/designer/sizehandle.h @@ -83,7 +83,7 @@ class WidgetSelection public: WidgetSelection( FormWindow *parent, TQPtrDict<WidgetSelection> *selDict ); - void setWidget( TQWidget *w, bool updateDict = TRUE ); + void setWidget( TQWidget *w, bool updateDict = true ); bool isUsed() const; void updateGeometry(); diff --git a/tools/designer/designer/sourceeditor.cpp b/tools/designer/designer/sourceeditor.cpp index 32df118bf..1ff4ddec1 100644 --- a/tools/designer/designer/sourceeditor.cpp +++ b/tools/designer/designer/sourceeditor.cpp @@ -62,7 +62,7 @@ SourceEditor::~SourceEditor() saveBreakPoints(); editor = 0; if ( formWindow() ) { - formWindow()->formFile()->setCodeEdited( FALSE ); + formWindow()->formFile()->setCodeEdited( false ); formWindow()->formFile()->setEditor( 0 ); } else if ( sourceFile() ) { sourceFile()->setEditor( 0 ); @@ -79,16 +79,16 @@ void SourceEditor::setObject( TQObject *o, Project *p ) if ( sourceFile() ) sourceFile()->setEditor( 0 ); if ( formWindow() ) { - formWindow()->formFile()->setCodeEdited( FALSE ); + formWindow()->formFile()->setCodeEdited( false ); formWindow()->formFile()->setEditor( 0 ); } if ( ::tqt_cast<FormWindow*>(o) ) - ( (FormWindow*)o )->formFile()->setCodeEdited( TRUE ); + ( (FormWindow*)o )->formFile()->setCodeEdited( true ); save(); - bool changed = FALSE; + bool changed = false; if ( &(*obj) != o ) { saveBreakPoints(); - changed = TRUE; + changed = true; } obj = o; pro = p; @@ -249,7 +249,7 @@ void SourceEditor::resetContext() void SourceEditor::setFocus() { if ( formWindow() ) - formWindow()->formFile()->setCodeEdited( TRUE ); + formWindow()->formFile()->setCodeEdited( true ); if ( editor ) editor->setFocus(); } @@ -307,7 +307,7 @@ bool SourceEditor::saveAs() return formWindow()->formFile()->saveAs(); else if ( sourceFile() ) return sourceFile()->saveAs(); - return FALSE; + return false; } SourceFile *SourceEditor::sourceFile() const diff --git a/tools/designer/designer/sourcefile.cpp b/tools/designer/designer/sourcefile.cpp index bdb6299d8..671b3afcf 100644 --- a/tools/designer/designer/sourcefile.cpp +++ b/tools/designer/designer/sourcefile.cpp @@ -46,13 +46,13 @@ SourceFile::SourceFile( const TQString &fn, bool temp, Project *p ) : filename( fn ), ed( 0 ), fileNameTemp( temp ), - timeStamp( 0, p->makeAbsolute( fn ) ), pro( p ), pkg( FALSE ) - , accepted( TRUE ) + timeStamp( 0, p->makeAbsolute( fn ) ), pro( p ), pkg( false ) + , accepted( true ) { iface = 0; if ( !temp ) - accepted = checkFileName( TRUE ); + accepted = checkFileName( true ); if (accepted) { load(); @@ -83,7 +83,7 @@ bool SourceFile::save( bool ignoreModified ) if ( fileNameTemp ) return saveAs(); if ( !ignoreModified && !isModified() ) - return TRUE; + return true; if ( ed ) ed->save(); @@ -112,8 +112,8 @@ bool SourceFile::save( bool ignoreModified ) TQTextStream ts( &f ); ts << txt; timeStamp.update(); - setModified( FALSE ); - return TRUE; + setModified( false ); + return true; } bool SourceFile::saveAs( bool ignoreModified ) @@ -132,18 +132,18 @@ bool SourceFile::saveAs( bool ignoreModified ) } TQString fn = TQFileDialog::getSaveFileName( initFn, filter ); if ( fn.isEmpty() ) - return FALSE; - fileNameTemp = FALSE; + return false; + fileNameTemp = false; filename = pro->makeRelative( fn ); - if ( !checkFileName( TRUE ) ) { + if ( !checkFileName( true ) ) { filename = old; - return FALSE; + return false; } - pro->setModified( TRUE ); + pro->setModified( true ); timeStamp.setFileName( pro->makeAbsolute( filename ) ); if ( ed ) ed->setCaption( tr( "Edit %1" ).arg( filename ) ); - setModified( TRUE ); + setModified( true ); if ( pro->isDummy() ) { TQObject *o = ed->parent(); while ( o && !o->isA( "MainWindow" ) ) @@ -158,11 +158,11 @@ bool SourceFile::load() { TQFile f( pro->makeAbsolute( filename ) ); if ( !f.open( IO_ReadOnly ) ) - return FALSE; + return false; TQTextStream ts( &f ); txt = ts.read(); timeStamp.update(); - return TRUE; + return true; } DesignerSourceFile *SourceFile::iFace() @@ -180,7 +180,7 @@ void SourceFile::setEditor( SourceEditor *e ) bool SourceFile::isModified() const { if ( !ed ) - return FALSE; + return false; return ed->isModified(); } @@ -214,11 +214,11 @@ bool SourceFile::closeEvent() { if ( !isModified() && fileNameTemp ) { pro->removeSourceFile( this ); - return TRUE; + return true; } if ( !isModified() ) - return TRUE; + return true; if ( ed ) ed->save(); @@ -228,7 +228,7 @@ bool SourceFile::closeEvent() tr( "&Yes" ), tr( "&No" ), tr( "&Cancel" ), 0, 2 ) ) { case 0: // save if ( !save() ) - return FALSE; + return false; break; case 1: // don't save load(); @@ -236,24 +236,24 @@ bool SourceFile::closeEvent() ed->editorInterface()->setText( txt ); if ( fileNameTemp ) { pro->removeSourceFile( this ); - return TRUE; + return true; } if ( MainWindow::self ) MainWindow::self->workspace()->update(); break; case 2: // cancel - return FALSE; + return false; default: break; } - setModified( FALSE ); - return TRUE; + setModified( false ); + return true; } bool SourceFile::close() { if ( !ed ) - return TRUE; + return true; return ed->close(); } @@ -293,10 +293,10 @@ bool SourceFile::checkFileName( bool allowBreak ) while ( fn.isEmpty() ) { fn = TQFileDialog::getSaveFileName( pro->makeAbsolute( filename ), filter ); if ( allowBreak && fn.isEmpty() ) - return FALSE; + return false; } filename = pro->makeRelative( fn ); sf = pro->findSourceFile( filename, this ); } - return TRUE; + return true; } diff --git a/tools/designer/designer/sourcefile.h b/tools/designer/designer/sourcefile.h index b659efaa9..0cdc8ac0d 100644 --- a/tools/designer/designer/sourcefile.h +++ b/tools/designer/designer/sourcefile.h @@ -52,8 +52,8 @@ public: void setText( const TQString &s ); void setModified( bool m ); - bool save( bool ignoreModified = FALSE ); - bool saveAs( bool ignoreModified = FALSE ); + bool save( bool ignoreModified = false ); + bool saveAs( bool ignoreModified = false ); bool load(); bool close(); bool closeEvent(); diff --git a/tools/designer/designer/startdialogimpl.cpp b/tools/designer/designer/startdialogimpl.cpp index 0b5200fdd..e57f32b38 100644 --- a/tools/designer/designer/startdialogimpl.cpp +++ b/tools/designer/designer/startdialogimpl.cpp @@ -38,7 +38,7 @@ StartDialog::StartDialog( TQWidget *parent, const TQString &templatePath ) newForm = new NewForm( templateView, templatePath ); recentFiles.clear(); initFileOpen(); - showInFuture = TRUE; + showInFuture = true; connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); @@ -114,12 +114,12 @@ void StartDialog::clearFileInfo() void StartDialog::setRecentlyFiles( TQStringList &files ) { - insertRecentItems( files, FALSE ); + insertRecentItems( files, false ); } void StartDialog::setRecentlyProjects( TQStringList &projects ) { - insertRecentItems( projects, TRUE ); + insertRecentItems( projects, true ); } void StartDialog::insertRecentItems( TQStringList &files, bool isProject ) @@ -134,7 +134,7 @@ void StartDialog::insertRecentItems( TQStringList &files, bool isProject ) item = new TQIconViewItem( recentView, fi.fileName() ); recentFiles[recentView->index( item )] = *it; item->setPixmap( TQPixmap::fromMimeSource( iconName ) ); - item->setDragEnabled( FALSE ); + item->setDragEnabled( false ); } } @@ -155,7 +155,7 @@ void StartDialog::initFileOpen() } delete l; - fd->setSizeGripEnabled ( FALSE ); + fd->setSizeGripEnabled ( false ); tabLayout->addWidget( fd ); TQPluginManager<ImportFilterInterface> manager( IID_ImportFilter, TQApplication::libraryPaths(), diff --git a/tools/designer/designer/styledbutton.cpp b/tools/designer/designer/styledbutton.cpp index 22096d36e..239b4b757 100644 --- a/tools/designer/designer/styledbutton.cpp +++ b/tools/designer/designer/styledbutton.cpp @@ -46,10 +46,10 @@ #include <ntqstyle.h> StyledButton::StyledButton(TQWidget* parent, const char* name) - : TQButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( FALSE ) + : TQButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( false ) { setMinimumSize( minimumSizeHint() ); - setAcceptDrops( TRUE ); + setAcceptDrops( true ); connect( this, TQ_SIGNAL(clicked()), TQ_SLOT(onEditor())); @@ -216,7 +216,7 @@ void StyledButton::onEditor() void StyledButton::mousePressEvent(TQMouseEvent* e) { TQButton::mousePressEvent(e); - mousePressed = TRUE; + mousePressed = true; pressPos = e->pos(); } @@ -235,7 +235,7 @@ void StyledButton::mouseMoveEvent(TQMouseEvent* e) p.drawRect( 0, 0, pix.width(), pix.height() ); p.end(); drg->setPixmap( pix ); - mousePressed = FALSE; + mousePressed = false; drg->dragCopy(); } else if ( edit == PixmapEditor && pix && !pix->isNull() ) { @@ -243,7 +243,7 @@ void StyledButton::mouseMoveEvent(TQMouseEvent* e) TQImageDrag *drg = new TQImageDrag( img, this ); if(spix) drg->setPixmap( *spix ); - mousePressed = FALSE; + mousePressed = false; drg->dragCopy(); } } diff --git a/tools/designer/designer/syntaxhighlighter_html.cpp b/tools/designer/designer/syntaxhighlighter_html.cpp index c41c8bac3..136d71309 100644 --- a/tools/designer/designer/syntaxhighlighter_html.cpp +++ b/tools/designer/designer/syntaxhighlighter_html.cpp @@ -73,7 +73,7 @@ void SyntaxHighlighter_HTML::process( TQTextDocument *doc, TQTextParagraph *stri if ( string->prev() ) { if ( string->prev()->endState() == -1 ) - process( doc, string->prev(), 0, FALSE ); + process( doc, string->prev(), 0, false ); state = string->prev()->endState(); } @@ -84,50 +84,50 @@ void SyntaxHighlighter_HTML::process( TQTextDocument *doc, TQTextParagraph *stri if ( c == '<' ) { if ( state != StateStandard ) - string->setFormat( i - buffer.length(), buffer.length(), formatStandard, FALSE ); + string->setFormat( i - buffer.length(), buffer.length(), formatStandard, false ); buffer = c; state = StateTag; - string->setFormat( i, 1, formatKeyword, FALSE ); + string->setFormat( i, 1, formatKeyword, false ); } else if ( c == '>' && ( state != StateStandard ) ) { - string->setFormat( i, 1, formatKeyword, FALSE ); + string->setFormat( i, 1, formatKeyword, false ); buffer = ""; state = StateStandard; } else if ( c == ' ' && state == StateTag ) { buffer += c; - string->setFormat( i, 1, formatStandard, FALSE ); + string->setFormat( i, 1, formatStandard, false ); state = StateAttribute; } else if ( c == '=' && state == StateAttribute ) { buffer += c; - string->setFormat( i, 1, formatStandard, FALSE ); + string->setFormat( i, 1, formatStandard, false ); state = StateAttribute; } else if ( c == '\"' && state == StateAttribute ) { buffer += c; - string->setFormat( i, 1, formatStandard, FALSE ); + string->setFormat( i, 1, formatStandard, false ); state = StateAttribVal; } else if ( c == '\"' && state == StateAttribVal ) { buffer += c; - string->setFormat( i, 1, formatStandard, FALSE ); + string->setFormat( i, 1, formatStandard, false ); state = StateAttribute; } else if ( state == StateAttribute ) { buffer += c; - string->setFormat( i, 1, formatAttribute, FALSE ); + string->setFormat( i, 1, formatAttribute, false ); } else if ( state == StateAttribVal ) { buffer += c; - string->setFormat( i, 1, formatAttribValue, FALSE ); + string->setFormat( i, 1, formatAttribValue, false ); } else if ( state == StateTag ) { - string->setFormat( i, 1, formatKeyword, FALSE ); + string->setFormat( i, 1, formatKeyword, false ); buffer += c; } else if ( state == StateStandard ) { - string->setFormat( i, 1, formatStandard, FALSE ); + string->setFormat( i, 1, formatStandard, false ); } i++; @@ -136,7 +136,7 @@ void SyntaxHighlighter_HTML::process( TQTextDocument *doc, TQTextParagraph *stri } string->setEndState( state ); - string->setFirstPreProcess( FALSE ); + string->setFirstPreProcess( false ); if ( invalidate && string->next() && !string->next()->firstPreProcess() && string->next()->endState() != -1 ) { diff --git a/tools/designer/designer/syntaxhighlighter_html.h b/tools/designer/designer/syntaxhighlighter_html.h index 6173b6d58..454703199 100644 --- a/tools/designer/designer/syntaxhighlighter_html.h +++ b/tools/designer/designer/syntaxhighlighter_html.h @@ -49,7 +49,7 @@ public: SyntaxHighlighter_HTML(); virtual ~SyntaxHighlighter_HTML(); - void process( TQTextDocument *doc, TQTextParagraph *string, int start, bool invalidate = TRUE ); + void process( TQTextDocument *doc, TQTextParagraph *string, int start, bool invalidate = true ); TQTextFormat *format( int id ); private: diff --git a/tools/designer/designer/tableeditorimpl.cpp b/tools/designer/designer/tableeditorimpl.cpp index 2a82127fb..18724c46c 100644 --- a/tools/designer/designer/tableeditorimpl.cpp +++ b/tools/designer/designer/tableeditorimpl.cpp @@ -78,7 +78,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f // TabWidget->removePage( rows_tab ); // rows_tab->hide(); // ## do this in the meantime... - TabWidget->setTabEnabled( rows_tab, FALSE ); + TabWidget->setTabEnabled( rows_tab, false ); } if ( formWindow->project() && ::tqt_cast<TQDataTable*>(editTable) ) { @@ -123,9 +123,9 @@ void TableEditor::columnTextChanged( const TQString &s ) { if ( listColumns->currentItem() == -1 ) return; - listColumns->blockSignals( TRUE ); + listColumns->blockSignals( true ); listColumns->changeItem( s, listColumns->currentItem() ); - listColumns->blockSignals( FALSE ); + listColumns->blockSignals( false ); #ifndef TQT_NO_TABLE if ( table->horizontalHeader()->iconSet( listColumns->currentItem() ) ) table->horizontalHeader()->setLabel( listColumns->currentItem(), @@ -155,13 +155,13 @@ void TableEditor::currentColumnChanged( TQListBoxItem *i ) { if ( !i ) return; - editColumnText->blockSignals( TRUE ); + editColumnText->blockSignals( true ); editColumnText->setText( i->text() ); if ( i->pixmap() ) labelColumnPixmap->setPixmap( *i->pixmap() ); else labelColumnPixmap->setText( "" ); - editColumnText->blockSignals( FALSE ); + editColumnText->blockSignals( false ); #ifndef TQT_NO_SQL if ( ::tqt_cast<TQDataTable*>(editTable) ) { @@ -182,24 +182,24 @@ void TableEditor::currentFieldChanged( const TQString &s ) return; fieldMap.remove( listColumns->currentItem() ); fieldMap.insert( listColumns->currentItem(), s ); - editColumnText->blockSignals( TRUE ); //## necessary + editColumnText->blockSignals( true ); //## necessary TQString newColText = s.mid(0,1).upper() + s.mid(1); editColumnText->setText( newColText ); columnTextChanged( newColText ); - editColumnText->blockSignals( FALSE ); + editColumnText->blockSignals( false ); } void TableEditor::currentRowChanged( TQListBoxItem *i ) { if ( !i ) return; - editRowText->blockSignals( TRUE ); + editRowText->blockSignals( true ); editRowText->setText( i->text() ); if ( i->pixmap() ) labelRowPixmap->setPixmap( *i->pixmap() ); else labelRowPixmap->setText( "" ); - editRowText->blockSignals( FALSE ); + editRowText->blockSignals( false ); } void TableEditor::deleteColumnClicked() @@ -212,7 +212,7 @@ void TableEditor::deleteColumnClicked() readColumns(); if ( listColumns->firstItem() ) { listColumns->setCurrentItem( listColumns->firstItem() ); - listColumns->setSelected( listColumns->firstItem(), TRUE ); + listColumns->setSelected( listColumns->firstItem(), true ); } #endif } @@ -227,7 +227,7 @@ void TableEditor::deleteRowClicked() readRows(); if ( listRows->firstItem() ) { listRows->setCurrentItem( listRows->firstItem() ); - listRows->setSelected( listRows->firstItem(), TRUE ); + listRows->setSelected( listRows->firstItem(), true ); } #endif } @@ -238,7 +238,7 @@ void TableEditor::newColumnClicked() table->setNumCols( table->numCols() + 1 ); TQMap<TQString, bool> m; for ( int i = 0; i < table->numCols() - 1; ++i ) - m.insert( table->horizontalHeader()->label( i ), TRUE ); + m.insert( table->horizontalHeader()->label( i ), true ); int n = table->numCols() - 1; TQString t = TQString::number( n ); while ( m.find( t ) != m.end() ) @@ -247,7 +247,7 @@ void TableEditor::newColumnClicked() listColumns->insertItem( t ); TQListBoxItem *item = listColumns->item( listColumns->count() - 1 ); listColumns->setCurrentItem( item ); - listColumns->setSelected( item, TRUE ); + listColumns->setSelected( item, true ); #ifndef TQT_NO_SQL if ( ::tqt_cast<TQDataTable*>(editTable) ) { comboFields->setFocus(); @@ -266,7 +266,7 @@ void TableEditor::newRowClicked() table->setNumRows( table->numRows() + 1 ); TQMap<TQString, bool> m; for ( int i = 0; i < table->numRows() - 1; ++i ) - m.insert( table->verticalHeader()->label( i ), TRUE ); + m.insert( table->verticalHeader()->label( i ), true ); int n = table->numRows() - 1; TQString t = TQString::number( n ); while ( m.find( t ) != m.end() ) @@ -275,7 +275,7 @@ void TableEditor::newRowClicked() listRows->insertItem( t ); TQListBoxItem *item = listRows->item( listRows->count() - 1 ); listRows->setCurrentItem( item ); - listRows->setSelected( item, TRUE ); + listRows->setSelected( item, true ); #endif } @@ -304,9 +304,9 @@ void TableEditor::rowTextChanged( const TQString &s ) if ( listRows->currentItem() == -1 ) return; #ifndef TQT_NO_TABLE - listRows->blockSignals(TRUE); + listRows->blockSignals(true); listRows->changeItem( s, listRows->currentItem() ); - listRows->blockSignals(FALSE); + listRows->blockSignals(false); if ( table->verticalHeader()->iconSet( listRows->currentItem() ) ) table->verticalHeader()->setLabel( listRows->currentItem(), *table->verticalHeader()->iconSet( listRows->currentItem() ), s ); @@ -436,7 +436,7 @@ void TableEditor::readFromTable() if ( listColumns->firstItem() ) { listColumns->setCurrentItem( listColumns->firstItem() ); - listColumns->setSelected( listColumns->firstItem(), TRUE ); + listColumns->setSelected( listColumns->firstItem(), true ); } TQHeader *rows = editTable->verticalHeader(); @@ -455,7 +455,7 @@ void TableEditor::readFromTable() if ( listRows->firstItem() ) { listRows->setCurrentItem( listRows->firstItem() ); - listRows->setSelected( listRows->firstItem(), TRUE ); + listRows->setSelected( listRows->firstItem(), true ); } #endif } diff --git a/tools/designer/designer/tableeditorimpl.h b/tools/designer/designer/tableeditorimpl.h index f566f2643..a67773c0e 100644 --- a/tools/designer/designer/tableeditorimpl.h +++ b/tools/designer/designer/tableeditorimpl.h @@ -47,7 +47,7 @@ class TableEditor : public TableEditorBase public: TableEditor( TQWidget* parent = 0, TQWidget *editWidget = 0, FormWindow *fw = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + const char* name = 0, bool modal = false, WFlags fl = 0 ); ~TableEditor(); protected slots: diff --git a/tools/designer/designer/timestamp.cpp b/tools/designer/designer/timestamp.cpp index f9bb3f1b5..81e7f3b62 100644 --- a/tools/designer/designer/timestamp.cpp +++ b/tools/designer/designer/timestamp.cpp @@ -38,7 +38,7 @@ class TQTimer; TimeStamp::TimeStamp( TQObject *parent, const TQString &f ) - : TQObject( parent ), filename( f ), autoCheck( FALSE ) + : TQObject( parent ), filename( f ), autoCheck( false ) { timer = new TQTimer( this ); connect( timer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( autoCheckTimeStamp() ) ); @@ -77,7 +77,7 @@ bool TimeStamp::isUpToDate() const { TQFile f( filename ); if ( !f.exists() ) - return TRUE; + return true; return lastTimeStamp == TQFileInfo( f ).lastModified(); } diff --git a/tools/designer/designer/variabledialogimpl.cpp b/tools/designer/designer/variabledialogimpl.cpp index c02dcf691..4ccd13f3f 100644 --- a/tools/designer/designer/variabledialogimpl.cpp +++ b/tools/designer/designer/variabledialogimpl.cpp @@ -60,7 +60,7 @@ VariableDialog::VariableDialog( FormWindow *fw, TQWidget *parent ) if ( varView->firstChild() ) varView->setCurrentItem( varView->firstChild() ); else - propBox->setEnabled( FALSE ); + propBox->setEnabled( false ); } VariableDialog::~VariableDialog() @@ -136,7 +136,7 @@ void VariableDialog::addVariable() i->setText( 0, "int newVariable" ); i->setText( 1, "protected" ); varView->setCurrentItem( i ); - varView->setSelected( i, TRUE ); + varView->setSelected( i, true ); varName->setFocus(); varName->selectAll(); } @@ -149,7 +149,7 @@ void VariableDialog::deleteVariable() delete i; i = 0; if ( varView->firstChild() ) - varView->setSelected( varView->firstChild(), TRUE ); + varView->setSelected( varView->firstChild(), true ); } void VariableDialog::currentItemChanged( TQListViewItem *i ) @@ -157,7 +157,7 @@ void VariableDialog::currentItemChanged( TQListViewItem *i ) if ( !i ) { varName->clear(); accessCombo->setCurrentItem( 1 ); - propBox->setEnabled( FALSE ); + propBox->setEnabled( false ); return; } varName->setText( i->text( 0 ) ); @@ -167,7 +167,7 @@ void VariableDialog::currentItemChanged( TQListViewItem *i ) accessCombo->setCurrentItem( 1 ); else accessCombo->setCurrentItem( 2 ); - propBox->setEnabled( TRUE ); + propBox->setEnabled( true ); } void VariableDialog::nameChanged() diff --git a/tools/designer/designer/widgetaction.cpp b/tools/designer/designer/widgetaction.cpp index 694a0857f..cb5f6dc36 100644 --- a/tools/designer/designer/widgetaction.cpp +++ b/tools/designer/designer/widgetaction.cpp @@ -46,7 +46,7 @@ void WidgetAction::addedTo( TQWidget *w, TQWidget *container ) if ( !windowsStyle ) windowsStyle = TQStyleFactory::create( "windows" ); w->setStyle( windowsStyle ); - ( (TQToolButton*)w )->setUsesTextLabel( TRUE ); + ( (TQToolButton*)w )->setUsesTextLabel( true ); ( (TQToolButton*)w )->setTextPosition( TQToolButton::Right ); w->setBackgroundMode( container->backgroundMode() ); } diff --git a/tools/designer/designer/widgetaction.h b/tools/designer/designer/widgetaction.h index 40017de8e..094fb6cdd 100644 --- a/tools/designer/designer/widgetaction.h +++ b/tools/designer/designer/widgetaction.h @@ -42,15 +42,15 @@ class WidgetAction : public TQAction public: WidgetAction( const TQString &grp, TQObject* parent, - const char* name = 0, bool toggle = FALSE ) + const char* name = 0, bool toggle = false ) : TQAction( parent, name, toggle ) { init( grp ); } WidgetAction( const TQString &grp, const TQString& text, const TQIconSet& icon, const TQString& menuText, TQKeySequence accel, - TQObject* parent, const char* name = 0, bool toggle = FALSE ) + TQObject* parent, const char* name = 0, bool toggle = false ) : TQAction( text, icon, menuText, accel, parent, name, toggle ) { init( grp ); } WidgetAction( const TQString &grp, const TQString& text, const TQString& menuText, TQKeySequence accel, TQObject* parent, - const char* name = 0, bool toggle = FALSE ) + const char* name = 0, bool toggle = false ) : TQAction( text, menuText, accel, parent, name, toggle ) { init( grp ); } ~WidgetAction(); diff --git a/tools/designer/designer/widgetfactory.cpp b/tools/designer/designer/widgetfactory.cpp index 7a2e45865..b476586f7 100644 --- a/tools/designer/designer/widgetfactory.cpp +++ b/tools/designer/designer/widgetfactory.cpp @@ -125,9 +125,9 @@ void TQLayoutWidget::paintEvent( TQPaintEvent* ) TQDesignerTabWidget::TQDesignerTabWidget( TQWidget *parent, const char *name ) - : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( FALSE ) + : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false ) { - tabBar()->setAcceptDrops( TRUE ); + tabBar()->setAcceptDrops( true ); tabBar()->installEventFilter( this ); } @@ -171,11 +171,11 @@ int TQDesignerTabWidget::count() const bool TQDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) { - if ( o != tabBar() ) return FALSE; + if ( o != tabBar() ) return false; switch ( e->type() ) { case TQEvent::MouseButtonPress: { - mousePressed = TRUE; + mousePressed = true; TQMouseEvent *me = (TQMouseEvent*)e; pressPoint = me->pos(); } @@ -184,7 +184,7 @@ bool TQDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) TQMouseEvent *me = (TQMouseEvent*)e; if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > TQApplication::startDragDistance() ) { TQTextDrag *drg = new TQTextDrag( TQString::number( (long) this ) , this ); - mousePressed = FALSE; + mousePressed = false; dragPage = TQTabWidget::currentPage(); dragLabel = TQTabWidget::tabLabel( dragPage ); @@ -213,7 +213,7 @@ bool TQDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) if ( text == TQString::number( (long)this ) ) de->accept(); else - return FALSE; + return false; } int index = 0; @@ -287,7 +287,7 @@ bool TQDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) default: break; } - return FALSE; + return false; } @@ -295,12 +295,12 @@ TQDesignerWidgetStack::TQDesignerWidgetStack( TQWidget *parent, const char *name : TQWidgetStack( parent, name ) { prev = new TQToolButton( TQt::LeftArrow, this, "designer_wizardstack_button" ); - prev->setAutoRaise( TRUE ); - prev->setAutoRepeat( TRUE ); + prev->setAutoRaise( true ); + prev->setAutoRepeat( true ); prev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); next = new TQToolButton( TQt::RightArrow, this, "designer_wizardstack_button" ); - next->setAutoRaise( TRUE ); - next->setAutoRepeat( TRUE ); + next->setAutoRaise( true ); + next->setAutoRepeat( true ); next->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); connect( prev, TQ_SIGNAL( clicked() ), this, TQ_SLOT( prevPage() ) ); connect( next, TQ_SIGNAL( clicked() ), this, TQ_SLOT( nextPage() ) ); @@ -499,7 +499,7 @@ TQMap< int, TQStringList > *changedProperties = 0; void WidgetFactory::saveDefaultProperties( TQObject *w, int id ) { TQMap< TQString, TQVariant> propMap; - TQStrList lst = w->metaObject()->propertyNames( TRUE ); + TQStrList lst = w->metaObject()->propertyNames( true ); for ( uint i = 0; i < lst.count(); ++i ) { TQVariant var = w->property( lst.at( i ) ); if ( !var.isValid() && qstrcmp( "pixmap", lst.at( i ) ) == 0 ) @@ -518,7 +518,7 @@ void WidgetFactory::saveChangedProperties( TQObject *w, int id ) } /*! Creates a widget of the type which is registered as \a id as - child of \a parent. The \a name is optional. If \a init is TRUE, the + child of \a parent. The \a name is optional. If \a init is true, the widget is initialized with some defaults, else the plain widget is created. */ @@ -680,7 +680,7 @@ void WidgetFactory::deleteLayout( TQWidget *widget ) /*! Factory functions for creating a widget of the type \a className as child of \a parent with the name \a name. - If \a init is TRUE, some initial default properties are set. This + If \a init is true, some initial default properties are set. This has to be in sync with the initChangedProperties() function! */ @@ -702,9 +702,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare if ( init ) { TQDesignerToolButton *tb = new TQDesignerToolButton( parent, name ); if ( ::tqt_cast<TQToolBox*>(widgetOfContainer(parent))) { - tb->setUsesTextLabel(TRUE); + tb->setUsesTextLabel(true); tb->setTextLabel("..."); - tb->setAutoRaise(TRUE); + tb->setAutoRaise(true); tb->setTextPosition(TQToolButton::BesideIcon); } else { tb->setText( "..." ); @@ -792,17 +792,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare if ( init ) { l->setText( TQString::fromLatin1( name ) ); MetaDataBase::addEntry( l ); - MetaDataBase::setPropertyChanged( l, "text", TRUE ); + MetaDataBase::setPropertyChanged( l, "text", true ); } return l; } else if ( className == "PixmapLabel" ) { TQDesignerLabel *l = new TQDesignerLabel( parent, name ); if ( init ) { l->setPixmap( TQPixmap::fromMimeSource( "designer_qtlogo.png" ) ); - l->setScaledContents( TRUE ); + l->setScaledContents( true ); MetaDataBase::addEntry( l ); - MetaDataBase::setPropertyChanged( l, "pixmap", TRUE ); - MetaDataBase::setPropertyChanged( l, "scaledContents", TRUE ); + MetaDataBase::setPropertyChanged( l, "pixmap", true ); + MetaDataBase::setPropertyChanged( l, "scaledContents", true ); } return l; } else if ( className == "TQLayoutWidget" ) @@ -831,7 +831,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare } return ws; } else if ( className == "TQComboBox" ) { - return new TQComboBox( FALSE, parent, name ); + return new TQComboBox( false, parent, name ); } else if ( className == "TQWidget" ) { if ( parent && ( ::tqt_cast<FormWindow*>(parent) || @@ -855,12 +855,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare else dia = new TQDialog( parent, name ); if ( parent ) - dia->reparent( parent, TQPoint( 0, 0 ), TRUE ); + dia->reparent( parent, TQPoint( 0, 0 ), true ); return dia; } else if ( className == "TQWizard" ) { TQWizard *wiz = new TQDesignerWizard( parent, name ); if ( parent ) - wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); + wiz->reparent( parent, TQPoint( 0, 0 ), true ); if ( init && ::tqt_cast<FormWindow*>(parent) ) { TQDesignerWidget *dw = new TQDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" ); MetaDataBase::addEntry( dw ); @@ -871,8 +871,8 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare } else if ( className == "Spacer" ) { Spacer *s = new Spacer( parent, name ); MetaDataBase::addEntry( s ); - MetaDataBase::setPropertyChanged( s, "orientation", TRUE ); - MetaDataBase::setPropertyChanged( s, "sizeType", TRUE ); + MetaDataBase::setPropertyChanged( s, "orientation", true ); + MetaDataBase::setPropertyChanged( s, "sizeType", true ); if ( !r ) return s; if ( !r->isValid() || ( r->width() < 2 && r->height() < 2 ) ) @@ -901,7 +901,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare else if ( r->width() > r->height() ) s->setOrientation( TQt::Horizontal ); MetaDataBase::addEntry( s ); - MetaDataBase::setPropertyChanged( s, "orientation", TRUE ); + MetaDataBase::setPropertyChanged( s, "orientation", true ); return s; } else if ( className == "TQScrollBar" ) { TQScrollBar *s = new TQScrollBar( parent, name ); @@ -912,7 +912,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare else if ( r->width() > r->height() ) s->setOrientation( TQt::Horizontal ); MetaDataBase::addEntry( s ); - MetaDataBase::setPropertyChanged( s, "orientation", TRUE ); + MetaDataBase::setPropertyChanged( s, "orientation", true ); return s; } else if ( className == "TQFrame" ) { if ( !init ) @@ -923,9 +923,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare } else if ( className == "Line" ) { Line *l = new Line( parent, name ); MetaDataBase::addEntry( l ); - MetaDataBase::setPropertyChanged( l, "orientation", TRUE ); - MetaDataBase::setPropertyChanged( l, "frameShadow", TRUE ); - MetaDataBase::setPropertyChanged( l, "frameShape", TRUE ); + MetaDataBase::setPropertyChanged( l, "orientation", true ); + MetaDataBase::setPropertyChanged( l, "frameShadow", true ); + MetaDataBase::setPropertyChanged( l, "frameShape", true ); if ( !r ) return l; if ( !r->isValid() || ( r->width() < 2 && r->height() < 2 ) ) @@ -935,9 +935,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return l; } else if ( className == "TQMainWindow" ) { TQMainWindow *mw = new TQMainWindow( parent, name, 0 ); - mw->setDockEnabled( TQt::DockMinimized, FALSE ); + mw->setDockEnabled( TQt::DockMinimized, false ); TQDesignerWidget *dw = new TQDesignerWidget( (FormWindow*)parent, mw, "central widget" ); - mw->setDockMenuEnabled( FALSE ); + mw->setDockMenuEnabled( false ); MetaDataBase::addEntry( dw ); mw->setCentralWidget( dw ); (void)mw->statusBar(); @@ -962,12 +962,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare else if ( className == "TQDataBrowser" ) { TQWidget *w = new TQDesignerDataBrowser( parent, name ); if ( parent ) - w->reparent( parent, TQPoint( 0, 0 ), TRUE ); + w->reparent( parent, TQPoint( 0, 0 ), true ); return w; } else if ( className == "TQDataView" ) { TQWidget *w = new TQDesignerDataView( parent, name ); if ( parent ) - w->reparent( parent, TQPoint( 0, 0 ), TRUE ); + w->reparent( parent, TQPoint( 0, 0 ), true ); return w; } #endif @@ -1146,40 +1146,40 @@ TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w ) Returns whether \a o is a passive interactor or not. */ -bool WidgetFactory::lastWasAPassiveInteractor = FALSE; +bool WidgetFactory::lastWasAPassiveInteractor = false; TQGuardedPtr<TQObject> *WidgetFactory::lastPassiveInteractor = new TQGuardedPtr<TQObject>(); bool WidgetFactory::isPassiveInteractor( TQObject* o ) { if ( lastPassiveInteractor && *lastPassiveInteractor && (TQObject*)(*lastPassiveInteractor) == o ) return lastWasAPassiveInteractor; - lastWasAPassiveInteractor = FALSE; + lastWasAPassiveInteractor = false; (*lastPassiveInteractor) = o; if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things - return ( lastWasAPassiveInteractor = TRUE ); + return ( lastWasAPassiveInteractor = true ); if ( ::tqt_cast<TQTabBar*>(o) ) - return ( lastWasAPassiveInteractor = TRUE ); + return ( lastWasAPassiveInteractor = true ); else if ( ::tqt_cast<TQSizeGrip*>(o) ) - return ( lastWasAPassiveInteractor = TRUE ); + return ( lastWasAPassiveInteractor = true ); else if ( ::tqt_cast<TQButton*>(o) && ( ::tqt_cast<TQTabBar*>(o->parent()) || ::tqt_cast<TQToolBox*>(o->parent()) ) ) - return ( lastWasAPassiveInteractor = TRUE ); + return ( lastWasAPassiveInteractor = true ); else if ( ::tqt_cast<TQPushButton*>(o) && ::tqt_cast<TQWizard*>(o->parent()) ) - return ( lastWasAPassiveInteractor = TRUE ); + return ( lastWasAPassiveInteractor = true ); else if ( ::tqt_cast<TQMenuBar*>(o) && ::tqt_cast<TQMainWindow*>(o->parent()) ) - return ( lastWasAPassiveInteractor = TRUE ); + return ( lastWasAPassiveInteractor = true ); // else if ( ::tqt_cast<TQDockWindowHandle*>(o) ) else if ( o->inherits( "TQDockWindowHandle" ) ) - return ( lastWasAPassiveInteractor = TRUE ); + return ( lastWasAPassiveInteractor = true ); // else if ( ::tqt_cast<TQHideDock*>(o) ) else if ( o->inherits( "TQHideDock" ) ) - return ( lastWasAPassiveInteractor = TRUE ); + return ( lastWasAPassiveInteractor = true ); else if ( qstrcmp( o->name(), "designer_wizardstack_button" ) == 0 ) - return ( lastWasAPassiveInteractor = TRUE ); + return ( lastWasAPassiveInteractor = true ); #ifdef QT_CONTAINER_CUSTOM_WIDGETS if ( !o->isWidgetType() ) - return ( lastWasAPassiveInteractor = FALSE ); + return ( lastWasAPassiveInteractor = false ); WidgetInterface *iface = 0; TQWidget *w = (TQWidget*)o; while ( !iface && w && !::tqt_cast<FormWindow*>(w) ) { @@ -1187,17 +1187,17 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o ) w = w->parentWidget(); } if ( !iface ) - return ( lastWasAPassiveInteractor = FALSE ); + return ( lastWasAPassiveInteractor = false ); TQWidgetContainerInterfacePrivate *iface2 = 0; iface->queryInterface( IID_QWidgetContainer, (TQUnknownInterface**)&iface2 ); if ( !iface2 ) - return ( lastWasAPassiveInteractor = FALSE ); + return ( lastWasAPassiveInteractor = false ); TQWidget *fw = MainWindow::self->isAFormWindowChild( (TQWidget*)o ); if ( !fw ) - return ( lastWasAPassiveInteractor = FALSE ); + return ( lastWasAPassiveInteractor = false ); TQWidget *dw = ( (FormWindow*)fw )->designerWidget( (TQWidget*)o ); if ( !dw ) - return ( lastWasAPassiveInteractor = FALSE ); + return ( lastWasAPassiveInteractor = false ); lastWasAPassiveInteractor = iface2->isPassiveInteractor( dw->className(), (TQWidget*)o ); iface2->release(); iface->release(); @@ -1299,50 +1299,50 @@ void WidgetFactory::initChangedProperties( TQObject *o ) if ( MainWindow::self && MainWindow::self->currProject() && MainWindow::self->currProject()->fakeFormFileFor( o ) ) return; - MetaDataBase::setPropertyChanged( o, "name", TRUE ); + MetaDataBase::setPropertyChanged( o, "name", true ); if ( !::tqt_cast<TQDesignerToolBar*>(o) && !::tqt_cast<MenuBarEditor*>(o) ) - MetaDataBase::setPropertyChanged( o, "geometry", TRUE ); + MetaDataBase::setPropertyChanged( o, "geometry", true ); if ( ::tqt_cast<TQPushButton*>(o) || ::tqt_cast<TQRadioButton*>(o) || ::tqt_cast<TQCheckBox*>(o) || ::tqt_cast<TQToolButton*>(o) ) { if (::tqt_cast<TQToolButton*>(o) && ::tqt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) { - MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE ); - MetaDataBase::setPropertyChanged( o, "textLabel", TRUE ); - MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE ); - MetaDataBase::setPropertyChanged( o, "textPosition", TRUE ); + MetaDataBase::setPropertyChanged( o, "usesTextLabel", true ); + MetaDataBase::setPropertyChanged( o, "textLabel", true ); + MetaDataBase::setPropertyChanged( o, "autoRaise", true ); + MetaDataBase::setPropertyChanged( o, "textPosition", true ); } else { - MetaDataBase::setPropertyChanged( o, "text", TRUE ); + MetaDataBase::setPropertyChanged( o, "text", true ); } } else if ( ::tqt_cast<TQGroupBox*>(o) ) - MetaDataBase::setPropertyChanged( o, "title", TRUE ); + MetaDataBase::setPropertyChanged( o, "title", true ); else if ( o->isA( "TQFrame" ) ) { - MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE ); - MetaDataBase::setPropertyChanged( o, "frameShape", TRUE ); + MetaDataBase::setPropertyChanged( o, "frameShadow", true ); + MetaDataBase::setPropertyChanged( o, "frameShape", true ); } else if ( ::tqt_cast<TQTabWidget*>(o) || ::tqt_cast<TQWizard*>(o) ) { - MetaDataBase::setPropertyChanged( o, "pageTitle", TRUE ); - MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); - MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); + MetaDataBase::setPropertyChanged( o, "pageTitle", true ); + MetaDataBase::setPropertyChanged( o, "pageName", true ); + MetaDataBase::setPropertyChanged( o, "currentPage", true ); } else if ( ::tqt_cast<TQWidgetStack*>(o) ) { - MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); - MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); + MetaDataBase::setPropertyChanged( o, "currentPage", true ); + MetaDataBase::setPropertyChanged( o, "pageName", true ); } else if ( ::tqt_cast<TQToolBox*>(o) ) { - MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemIconSet", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE ); + MetaDataBase::setPropertyChanged( o, "currentIndex", true ); + MetaDataBase::setPropertyChanged( o, "itemName", true ); + MetaDataBase::setPropertyChanged( o, "itemLabel", true ); + MetaDataBase::setPropertyChanged( o, "itemIconSet", true ); + MetaDataBase::setPropertyChanged( o, "itemToolTip", true ); + MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", true ); #ifndef TQT_NO_TABLE } else if ( ::tqt_cast<TQTable*>(o) ) { # ifndef TQT_NO_SQL if (!::tqt_cast<TQDataTable*>(o) ) # endif { - MetaDataBase::setPropertyChanged( o, "numRows", TRUE ); - MetaDataBase::setPropertyChanged( o, "numCols", TRUE ); + MetaDataBase::setPropertyChanged( o, "numRows", true ); + MetaDataBase::setPropertyChanged( o, "numCols", true ); TQTable *t = (TQTable*)o; for ( int i = 0; i < 3; ++i ) { t->horizontalHeader()->setLabel( i, TQString::number( i + 1 ) ); @@ -1351,13 +1351,13 @@ void WidgetFactory::initChangedProperties( TQObject *o ) } #endif } else if ( ::tqt_cast<TQSplitter*>(o) ) { - MetaDataBase::setPropertyChanged( o, "orientation", TRUE ); + MetaDataBase::setPropertyChanged( o, "orientation", true ); } else if ( ::tqt_cast<TQDesignerToolBar*>(o) ) { - MetaDataBase::setPropertyChanged( o, "label", TRUE ); + MetaDataBase::setPropertyChanged( o, "label", true ); } else if ( ::tqt_cast<MenuBarEditor*>(o) ) { - MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemNumber", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemText", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemName", true ); + MetaDataBase::setPropertyChanged( o, "itemNumber", true ); + MetaDataBase::setPropertyChanged( o, "itemText", true ); } } @@ -1366,19 +1366,19 @@ bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget ) TQString className = WidgetDatabase::className( id ); if ( className.contains( "ListBox" ) ) - return TRUE; + return true; if ( className.contains( "ComboBox" ) ) - return TRUE; + return true; if ( className.contains( "ListView" ) ) - return TRUE; + return true; if ( className.contains( "IconView" ) ) - return TRUE; + return true; if ( className == "TQTextEdit" || className == "TQMultiLineEdit" ) - return TRUE; + return true; if ( ::tqt_cast<TQTable*>(editorWidget) != 0 ) - return TRUE; + return true; - return FALSE; + return false; } bool WidgetFactory::hasItems( int id, TQObject *editorWidget ) @@ -1388,9 +1388,9 @@ bool WidgetFactory::hasItems( int id, TQObject *editorWidget ) if ( className.contains( "ListBox" ) || className.contains( "ListView" ) || className.contains( "IconView" ) || className.contains( "ComboBox" ) || ::tqt_cast<TQTable*>(editorWidget) != 0 ) - return TRUE; + return true; - return FALSE; + return false; } void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) @@ -1442,7 +1442,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, } if ( className == "TQMultiLineEdit" || className == "TQTextEdit" ) { - MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, parent, editWidget, fw ); + MultiLineEditor *e = new MultiLineEditor( false, true, parent, editWidget, fw ); e->exec(); delete e; return; @@ -1460,7 +1460,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName ) { if ( propName == "name" || propName == "geometry" ) - return FALSE; + return false; TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ); return l.findIndex( propName ) == -1; } @@ -1468,9 +1468,9 @@ bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName ) bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName ) { const TQMetaProperty *p = w->metaObject()->property( w->metaObject()-> - findProperty( propName, TRUE ), TRUE ); + findProperty( propName, true ), true ); if (!p ) - return FALSE; + return false; return p->reset( w ); } @@ -1495,7 +1495,7 @@ TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName ) TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName ) { const TQMetaProperty *p = w->metaObject()-> - property( w->metaObject()->findProperty( propName, TRUE ), TRUE ); + property( w->metaObject()->findProperty( propName, true ), true ); if ( !p ) { int v = defaultValue( w, "alignment" ).toInt(); if ( propName == "hAlign" ) { @@ -1534,8 +1534,8 @@ TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name, TQVariant WidgetFactory::property( TQObject *w, const char *name ) { - int id = w->metaObject()->findProperty( name, TRUE ); - const TQMetaProperty* p = w->metaObject()->property( id, TRUE ); + int id = w->metaObject()->findProperty( name, true ); + const TQMetaProperty* p = w->metaObject()->property( id, true ); if ( !p || !p->isValid() ) return MetaDataBase::fakeProperty( w, name ); return w->property( name ); @@ -1547,7 +1547,7 @@ void TQDesignerLabel::updateBuddy() if ( myBuddy.isEmpty() ) return; - TQObjectList *l = topLevelWidget()->queryList( "TQWidget", myBuddy, FALSE, TRUE ); + TQObjectList *l = topLevelWidget()->queryList( "TQWidget", myBuddy, false, true ); if ( !l || !l->first() ) { delete l; return; diff --git a/tools/designer/designer/widgetfactory.h b/tools/designer/designer/widgetfactory.h index c49066b4f..98e4e7184 100644 --- a/tools/designer/designer/widgetfactory.h +++ b/tools/designer/designer/widgetfactory.h @@ -83,7 +83,7 @@ public: NoLayout }; - static TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = TRUE, + static TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = true, const TQRect *rect = 0, TQt::Orientation orient = TQt::Horizontal ); static TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type ); static void deleteLayout( TQWidget *widget ); @@ -208,7 +208,7 @@ class TQDesignerWizard : public TQWizard public: TQDesignerWizard( TQWidget *parent, const char *name ) - : TQWizard( parent, name ), modal(FALSE) {} + : TQWizard( parent, name ), modal(false) {} int currentPageNum() const; void setCurrentPage( int i ); @@ -375,7 +375,7 @@ class TQDesignerDialog : public TQDialog public: TQDesignerDialog( FormWindow *fw, TQWidget *parent, const char *name ) - : TQDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ), modal(FALSE) {} + : TQDialog( parent, name, false, WResizeNoErase ), formwindow( fw ), modal(false) {} bool isModal() const { return modal; } void setModal(bool b) { modal = b; } diff --git a/tools/designer/designer/wizardeditorimpl.cpp b/tools/designer/designer/wizardeditorimpl.cpp index a04a33f36..7300b9b3e 100644 --- a/tools/designer/designer/wizardeditorimpl.cpp +++ b/tools/designer/designer/wizardeditorimpl.cpp @@ -66,7 +66,7 @@ WizardEditor::WizardEditor( TQWidget *parent, TQWizard *w, FormWindow *fw ) WizardEditor::~WizardEditor() { - commands.setAutoDelete( TRUE ); + commands.setAutoDelete( true ); } void WizardEditor::okClicked() @@ -98,20 +98,20 @@ void WizardEditor::applyClicked() TQWidget * page = wizard->page( i ); if ( i == 0 ) { // first page - wizard->setBackEnabled( page, FALSE ); - wizard->setNextEnabled( page, TRUE ); + wizard->setBackEnabled( page, false ); + wizard->setNextEnabled( page, true ); } else if ( i == wizard->pageCount() - 1 ) { // last page - wizard->setBackEnabled( page, TRUE ); - wizard->setNextEnabled( page, FALSE ); + wizard->setBackEnabled( page, true ); + wizard->setNextEnabled( page, false ); } else { - wizard->setBackEnabled( page, TRUE ); - wizard->setNextEnabled( page, TRUE ); + wizard->setBackEnabled( page, true ); + wizard->setNextEnabled( page, true ); } - wizard->setFinishEnabled( page, FALSE ); + wizard->setFinishEnabled( page, false ); } // update listbox @@ -136,7 +136,7 @@ void WizardEditor::addClicked() // schedule add command AddWizardPageCommand *cmd = new AddWizardPageCommand( tr( "Add Page to %1" ).arg( wizard->name() ), - formwindow, wizard, "Page", index, FALSE); + formwindow, wizard, "Page", index, false); commands.append( cmd ); // update buttons @@ -155,7 +155,7 @@ void WizardEditor::removeClicked() // schedule remove command DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( tr( "Delete Page %1 of %2" ) .arg( listBox->text( index ) ).arg( wizard->name() ), - formwindow, wizard, index, FALSE ); + formwindow, wizard, index, false ); commands.append( cmd ); // update buttons @@ -236,7 +236,7 @@ void WizardEditor::updateButtons() buttonRemove->setEnabled( index >= 0 ); if ( listBox->count() < 2 ) - buttonRemove->setEnabled( FALSE ); + buttonRemove->setEnabled( false ); } void WizardEditor::itemDragged( TQListBoxItem * i ) diff --git a/tools/designer/designer/workspace.cpp b/tools/designer/designer/workspace.cpp index be050bce5..3777e1c46 100644 --- a/tools/designer/designer/workspace.cpp +++ b/tools/designer/designer/workspace.cpp @@ -62,7 +62,7 @@ WorkspaceItem::WorkspaceItem( TQListView *parent, Project* p ) project = p; t = ProjectType; setPixmap( 0, TQPixmap::fromMimeSource( "designer_folder.png" ) ); - setExpandable( FALSE ); + setExpandable( false ); } WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf ) @@ -106,8 +106,8 @@ WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type ) void WorkspaceItem::init() { - autoOpen = FALSE; - useOddColor = FALSE; + autoOpen = false; + useOddColor = false; project = 0; sourceFile = 0; formFile = 0; @@ -132,7 +132,7 @@ void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, if ( isModified() ) { TQFont f = p->font(); - f.setBold( TRUE ); + f.setBold( true ); p->setFont( f ); } @@ -217,7 +217,7 @@ bool WorkspaceItem::checkCompletion( const TQString& completion ) case ObjectType: return completion == object->name(); } - return FALSE; + return false; } @@ -236,7 +236,7 @@ bool WorkspaceItem::isModified() const return project->fakeFormFileFor( object )->isModified(); break; } - return FALSE; // shut up compiler + return false; // shut up compiler } TQString WorkspaceItem::key( int column, bool ) const @@ -263,7 +263,7 @@ TQColor WorkspaceItem::backgroundColor() void WorkspaceItem::setOpen( bool b ) { TQListViewItem::setOpen( b ); - autoOpen = FALSE; + autoOpen = false; } void WorkspaceItem::setAutoOpen( bool b ) @@ -275,14 +275,14 @@ void WorkspaceItem::setAutoOpen( bool b ) Workspace::Workspace( TQWidget *parent, MainWindow *mw ) : TQListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ), - project( 0 ), completionDirty( FALSE ) + project( 0 ), completionDirty( false ) { init_colors(); setDefaultRenameAction( Accept ); - blockNewForms = FALSE; + blockNewForms = false; bufferEdit = 0; - header()->setStretchEnabled( TRUE ); + header()->setStretchEnabled( true ); header()->hide(); setSorting( 0 ); setResizePolicy( TQScrollView::Manual ); @@ -293,7 +293,7 @@ Workspace::Workspace( TQWidget *parent, MainWindow *mw ) setPalette( p ); #endif addColumn( tr( "Files" ) ); - setAllColumnsShowFocus( TRUE ); + setAllColumnsShowFocus( true ); connect( this, TQ_SIGNAL( mouseButtonClicked( int, TQListViewItem *, const TQPoint &, int ) ), this, TQ_SLOT( itemClicked( int, TQListViewItem *, const TQPoint& ) ) ), connect( this, TQ_SIGNAL( doubleClicked( TQListViewItem * ) ), @@ -302,8 +302,8 @@ Workspace::Workspace( TQWidget *parent, MainWindow *mw ) this, TQ_SLOT( rmbClicked( TQListViewItem *, const TQPoint& ) ) ), setHScrollBarMode( AlwaysOff ); setVScrollBarMode( AlwaysOn ); - viewport()->setAcceptDrops( TRUE ); - setAcceptDrops( TRUE ); + viewport()->setAcceptDrops( true ); + setAcceptDrops( true ); setColumnWidthMode( 1, Manual ); } @@ -345,7 +345,7 @@ void Workspace::setCurrentProject( Project *pro ) projectItem = new WorkspaceItem( this, project ); - projectItem->setOpen( TRUE ); + projectItem->setOpen( true ); for ( TQPtrListIterator<SourceFile> sources = project->sourceFiles(); sources.current(); ++sources ) { @@ -370,7 +370,7 @@ void Workspace::setCurrentProject( Project *pro ) } updateColors(); - completionDirty = TRUE; + completionDirty = true; } void Workspace::sourceFileAdded( SourceFile* sf ) @@ -413,7 +413,7 @@ void Workspace::objectRemoved( TQObject *o ) void Workspace::update() { - completionDirty = TRUE; + completionDirty = true; triggerUpdate(); } @@ -433,9 +433,9 @@ void Workspace::activeFormChanged( FormWindow *fw ) WorkspaceItem *i = findItem( fw->formFile() ); if ( i ) { setCurrentItem( i ); - setSelected( i, TRUE ); + setSelected( i, true ); if ( !i->isOpen() ) - i->setAutoOpen( TRUE ); + i->setAutoOpen( true ); } closeAutoOpenItems(); @@ -451,15 +451,15 @@ void Workspace::activeEditorChanged( SourceEditor *se ) WorkspaceItem *i = findItem( se->formWindow()->formFile() ); if ( i && i->firstChild() ) { if ( !i->isOpen() ) - i->setAutoOpen( TRUE ); + i->setAutoOpen( true ); setCurrentItem( i->firstChild() ); - setSelected( i->firstChild(), TRUE ); + setSelected( i->firstChild(), true ); } } else { WorkspaceItem *i = findItem( se->sourceFile() ); if ( i ) { setCurrentItem( i ); - setSelected( i, TRUE ); + setSelected( i, true ); } } @@ -505,7 +505,7 @@ void Workspace::closeAutoOpenItems() if ( i->type() == WorkspaceItem::FormSourceType ) { if ( !i->isSelected() && !ip->isSelected() && ip->isAutoOpen() ) { - ip->setAutoOpen( FALSE ); + ip->setAutoOpen( false ); } } } @@ -520,7 +520,7 @@ void Workspace::closeEvent( TQCloseEvent *e ) void Workspace::itemDoubleClicked( TQListViewItem *i ) { if ( ( (WorkspaceItem*)i)->type()== WorkspaceItem::ProjectType ) - i->setOpen( TRUE ); + i->setOpen( true ); } void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& ) @@ -538,7 +538,7 @@ void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& ) wi->formFile->showFormWindow(); break; case WorkspaceItem::FormSourceType: - wi->formFile->showEditor( FALSE ); + wi->formFile->showEditor( false ); break; case WorkspaceItem::SourceFileType: mainWindow->editSource( wi->sourceFile ); @@ -594,7 +594,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos ) enum { OPEN_SOURCE, REMOVE_SOURCE, OPEN_FORM, REMOVE_FORM, OPEN_FORM_SOURCE, REMOVE_FORM_SOURCE, OPEN_OBJECT_SOURCE }; TQPopupMenu menu( this ); - menu.setCheckable( TRUE ); + menu.setCheckable( true ); switch ( wi->type() ) { case WorkspaceItem::SourceFileType: menu.insertItem( tr( "&Open source file" ), OPEN_SOURCE ); @@ -634,7 +634,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos ) project->removeFormFile( wi->formFile ); break; case REMOVE_FORM_SOURCE: - ( (WorkspaceItem*)i )->formFile->setModified( TRUE ); + ( (WorkspaceItem*)i )->formFile->setModified( true ); ( (WorkspaceItem*)i )->formFile->setCodeFileState( FormFile::Deleted ); delete ( (WorkspaceItem*)i )->formFile->editor(); break; @@ -667,7 +667,7 @@ void Workspace::updateBufferEdit() { if ( !bufferEdit || !completionDirty || !MainWindow::self) return; - completionDirty = FALSE; + completionDirty = false; TQStringList completion = MainWindow::self->projectFileNames(); TQListViewItemIterator it( this ); while ( it.current() ) { @@ -703,7 +703,7 @@ void Workspace::updateColors() TQListViewItem* i = firstChild(); if ( i ) i = i->firstChild(); - bool b = TRUE; + bool b = true; while ( i ) { WorkspaceItem* wi = ( WorkspaceItem*) i; i = i->nextSibling(); diff --git a/tools/designer/editor/browser.cpp b/tools/designer/editor/browser.cpp index d32e8551c..899399fc0 100644 --- a/tools/designer/editor/browser.cpp +++ b/tools/designer/editor/browser.cpp @@ -46,7 +46,7 @@ EditorBrowser::EditorBrowser( Editor *e ) // curEditor->installEventFilter( this ); TQFont fn( curEditor->font() ); - fn.setUnderline( TRUE ); + fn.setUnderline( true ); highlightedFormat = new TQTextFormat( fn, blue ); } @@ -77,14 +77,14 @@ bool EditorBrowser::eventFilter( TQObject *o, TQEvent *e ) // avoid collision with other selections for ( int i = 0; i < curEditor->document()->numSelections(); ++i ) curEditor->document()->removeSelection( i ); - from.paragraph()->setFormat( from.index(), to.index() - from.index() + 1, highlightedFormat, FALSE ); + from.paragraph()->setFormat( from.index(), to.index() - from.index() + 1, highlightedFormat, false ); lastWord = from.paragraph()->string()->toString().mid( from.index(), to.index() - from.index() + 1 ); oldHighlightedParag = from.paragraph(); } else { lastWord = ""; } curEditor->repaintChanged(); - return TRUE; + return true; } break; case TQEvent::MouseButtonPress: { @@ -100,7 +100,7 @@ bool EditorBrowser::eventFilter( TQObject *o, TQEvent *e ) oldHighlightedParag = 0; } if ( killEvent ) - return TRUE; + return true; } break; case TQEvent::KeyRelease: lastWord = ""; @@ -118,7 +118,7 @@ bool EditorBrowser::eventFilter( TQObject *o, TQEvent *e ) break; } } - return FALSE; + return false; } void EditorBrowser::setCurrentEdior( Editor *e ) @@ -145,5 +145,5 @@ bool EditorBrowser::findCursor( const TQTextCursor &c, TQTextCursor &from, TQTex to.gotoRight(); if ( to.paragraph()->at( to.index() )->c == ' ' || to.paragraph()->at( to.index() )->c == '\t' ) to.gotoLeft(); - return TRUE; + return true; } diff --git a/tools/designer/editor/cindent.cpp b/tools/designer/editor/cindent.cpp index d30be4600..0c06830f6 100644 --- a/tools/designer/editor/cindent.cpp +++ b/tools/designer/editor/cindent.cpp @@ -40,7 +40,7 @@ extern void setIndentSize( int s ); CIndent::CIndent() : TQTextIndent(), tabSize( 8 ), indentSize( 4 ), - autoIndent( TRUE ), keepTabs( TRUE ), lastDoc( 0 ) + autoIndent( true ), keepTabs( true ), lastDoc( 0 ) { } diff --git a/tools/designer/editor/completion.cpp b/tools/designer/editor/completion.cpp index fb7365058..cda177651 100644 --- a/tools/designer/editor/completion.cpp +++ b/tools/designer/editor/completion.cpp @@ -65,7 +65,7 @@ public: CompletionItem( TQListBox *lb, const TQString &txt, const TQString &t, const TQString &p, const TQString &pre, const TQString &p2 ) : TQListBoxItem( lb ), type( t ), postfix( p ), prefix( pre ), postfix2( p2 ), - parag( 0 ), lastState( FALSE ) { setText( txt ); } + parag( 0 ), lastState( false ) { setText( txt ); } ~CompletionItem() { delete parag; } void paint( TQPainter *painter ) { if ( lastState != isSelected() ) { @@ -102,7 +102,7 @@ void CompletionItem::setupParagraph() { if ( !parag ) { TQTextFormatter *formatter; formatter = new TQTextFormatterBreakWords; - formatter->setWrapEnabled( FALSE ); + formatter->setWrapEnabled( false ); parag = new TQTextParagraph( 0 ); parag->setTabStops( listBox()->fontMetrics().width( "propertyXXXX" ) ); parag->pseudoDocument()->pFormatter = formatter; @@ -115,7 +115,7 @@ void CompletionItem::setupParagraph() { listBox()->colorGroup().highlightedText() : listBox()->colorGroup().text() ); TQFont f( listBox()->font() ); - f.setBold( TRUE ); + f.setBold( true ); TQTextFormat *f2 = parag->formatCollection()->format( f, isSelected() ? listBox()->colorGroup().highlightedText() : listBox()->colorGroup().text() ); @@ -136,7 +136,7 @@ void CompletionItem::setupParagraph() { EditorCompletion::EditorCompletion( Editor *e ) { - enabled = TRUE; + enabled = true; lastDoc = 0; completionPopup = new TQVBox( e->topLevelWidget(), 0, WType_Popup ); completionPopup->setFrameStyle( TQFrame::Box | TQFrame::Plain ); @@ -216,9 +216,9 @@ TQValueList<CompletionEntry> EditorCompletion::completionList( const TQString &s void EditorCompletion::updateCompletionMap( TQTextDocument *doc ) { - bool strict = TRUE; + bool strict = true; if ( doc != lastDoc ) - strict = FALSE; + strict = false; lastDoc = doc; TQTextParagraph *s = doc->firstParagraph(); if ( !s->extraData() ) @@ -252,7 +252,7 @@ bool EditorCompletion::doCompletion() { searchString = ""; if ( !curEditor ) - return FALSE; + return false; TQTextCursor *cursor = curEditor->textCursor(); TQTextDocument *doc = curEditor->document(); @@ -263,10 +263,10 @@ bool EditorCompletion::doCompletion() int idx = cursor->index(); if ( idx == 0 ) - return FALSE; + return false; TQChar c = cursor->paragraph()->at( idx - 1 )->c; if ( !c.isLetter() && !c.isNumber() && c != '_' && c != '#' ) - return FALSE; + return false; TQString s; idx--; @@ -317,16 +317,16 @@ bool EditorCompletion::doCompletion() TQTextEdit::CheckNewLines | TQTextEdit::RemoveSelected ) ); } else { - return FALSE; + return false; } - return TRUE; + return true; } bool EditorCompletion::eventFilter( TQObject *o, TQEvent *e ) { if ( !enabled ) - return FALSE; + return false; if ( e->type() == TQEvent::KeyPress && ::tqt_cast<Editor*>(o)) { curEditor = (Editor*)o; TQKeyEvent *ke = (TQKeyEvent*)e; @@ -343,23 +343,23 @@ bool EditorCompletion::eventFilter( TQObject *o, TQEvent *e ) curEditor->textCursor()->paragraph()->at( i )->c != '\t' ) break; } - curEditor->drawCursor( FALSE ); + curEditor->drawCursor( false ); curEditor->textCursor()->setIndex( i ); - curEditor->drawCursor( TRUE ); + curEditor->drawCursor( true ); } else { curEditor->insert( "\t" ); } - return TRUE; + return true; } } if ( functionLabel->isVisible() ) { if ( ke->key() == Key_Up && ( ke->state() & ControlButton ) == ControlButton ) { functionLabel->gotoPrev(); - return TRUE; + return true; } else if ( ke->key() == Key_Down && ( ke->state() & ControlButton ) == ControlButton ) { functionLabel->gotoNext(); - return TRUE; + return true; } } @@ -369,9 +369,9 @@ bool EditorCompletion::eventFilter( TQObject *o, TQEvent *e ) if ( ke->key() == Key_Tab ) { if ( curEditor->textCursor()->index() == 0 && curEditor->textCursor()->paragraph()->isListItem() ) - return FALSE; + return false; if ( doCompletion() ) - return TRUE; + return true; } else if ( ( ke->key() == Key_Period && ( curEditor->textCursor()->index() == 0 || curEditor->textCursor()->paragraph()->at( curEditor->textCursor()->index() - 1 )->c != '.' ) ) @@ -393,15 +393,15 @@ bool EditorCompletion::eventFilter( TQObject *o, TQEvent *e ) if ( ke->key() == Key_Tab && completionListBox->count() > 1 && completionListBox->currentItem() < (int)completionListBox->count() - 1 ) { completionListBox->setCurrentItem( completionListBox->currentItem() + 1 ); - return TRUE; + return true; } completeCompletion(); - return TRUE; + return true; } else if ( ke->key() == Key_Left || ke->key() == Key_Right || ke->key() == Key_Up || ke->key() == Key_Down || ke->key() == Key_Home || ke->key() == Key_End || ke->key() == Key_Prior || ke->key() == Key_Next ) { - return FALSE; + return false; } else if ( ke->key() != Key_Shift && ke->key() != Key_Control && ke->key() != Key_Alt ) { int l = searchString.length(); @@ -416,11 +416,11 @@ bool EditorCompletion::eventFilter( TQObject *o, TQEvent *e ) curEditor->setFocus(); } TQApplication::sendEvent( curEditor, e ); - return TRUE; + return true; } } else if ( e->type() == TQEvent::MouseButtonDblClick ) { completeCompletion(); - return TRUE; + return true; } } if ( o == functionLabel || ( ::tqt_cast<Editor*>(o) && functionLabel->isVisible() ) ) { @@ -433,12 +433,12 @@ bool EditorCompletion::eventFilter( TQObject *o, TQEvent *e ) functionLabel->hide(); if ( o == functionLabel ) { TQApplication::sendEvent( curEditor, e ); - return TRUE; + return true; } } } } - return FALSE; + return false; } void EditorCompletion::completeCompletion() @@ -453,7 +453,7 @@ void EditorCompletion::completeCompletion() curEditor->setFocus(); if ( i != -1 && i < (int)s.length() ) { curEditor->setCursorPosition( curEditor->textCursor()->paragraph()->paragId(), idx + i + 1 ); - doArgumentHint( FALSE ); + doArgumentHint( false ); } } @@ -488,13 +488,13 @@ bool EditorCompletion::doObjectCompletion() object.remove( object.length() - 1, 1 ); if ( object.isEmpty() ) - return FALSE; + return false; return doObjectCompletion( object ); } bool EditorCompletion::doObjectCompletion( const TQString & ) { - return FALSE; + return false; } static void strip( TQString &txt ) @@ -513,20 +513,20 @@ bool EditorCompletion::continueComplete() (void)new CompletionItem( completionListBox, (*it).text, (*it).type, (*it).postfix, (*it).prefix, (*it).postfix2 ); completionListBox->setCurrentItem( 0 ); - completionListBox->setSelected( completionListBox->currentItem(), TRUE ); - return TRUE; + completionListBox->setSelected( completionListBox->currentItem(), true ); + return true; } TQListBoxItem *i = completionListBox->findItem( searchString ); if ( !i ) - return FALSE; + return false; TQString txt1 = i->text(); TQString txt2 = searchString; strip( txt1 ); strip( txt2 ); if ( txt1 == txt2 && !i->next() ) - return FALSE; + return false; TQValueList<CompletionEntry> res; for ( TQValueList<CompletionEntry>::ConstIterator it = cList.begin(); it != cList.end(); ++it ) { @@ -534,14 +534,14 @@ bool EditorCompletion::continueComplete() res << *it; } if ( res.isEmpty() ) - return FALSE; + return false; completionListBox->clear(); for ( TQValueList<CompletionEntry>::ConstIterator it2 = res.begin(); it2 != res.end(); ++it2 ) (void)new CompletionItem( completionListBox, (*it2).text, (*it2).type, (*it2).postfix, (*it2).prefix, (*it2).postfix2 ); completionListBox->setCurrentItem( 0 ); - completionListBox->setSelected( completionListBox->currentItem(), TRUE ); - return TRUE; + completionListBox->setSelected( completionListBox->currentItem(), true ); + return true; } bool EditorCompletion::doArgumentHint( bool useIndex ) @@ -549,7 +549,7 @@ bool EditorCompletion::doArgumentHint( bool useIndex ) TQTextCursor *cursor = curEditor->textCursor(); int i = cursor->index() ; if ( !useIndex ) { - bool foundParen = FALSE; + bool foundParen = false; int closeParens = 0; while ( i >= 0 ) { if ( cursor->paragraph()->at( i )->c == ')' && i != cursor->index() ) @@ -557,7 +557,7 @@ bool EditorCompletion::doArgumentHint( bool useIndex ) if ( cursor->paragraph()->at( i )->c == '(' ) { closeParens--; if ( closeParens == -1 ) { - foundParen = TRUE; + foundParen = true; break; } } @@ -565,18 +565,18 @@ bool EditorCompletion::doArgumentHint( bool useIndex ) } if ( !foundParen ) - return FALSE; + return false; } int j = i - 1; - bool foundSpace = FALSE; - bool foundNonSpace = FALSE; + bool foundSpace = false; + bool foundNonSpace = false; while ( j >= 0 ) { if ( foundNonSpace && ( cursor->paragraph()->at( j )->c == ' ' || cursor->paragraph()->at( j )->c == ',' ) ) { - foundSpace = TRUE; + foundSpace = true; break; } if ( !foundNonSpace && ( cursor->paragraph()->at( j )->c != ' ' || cursor->paragraph()->at( j )->c != ',' ) ) - foundNonSpace = TRUE; + foundNonSpace = true; --j; } if ( foundSpace ) @@ -601,7 +601,7 @@ bool EditorCompletion::doArgumentHint( bool useIndex ) TQString pre, post; TQValueList<TQStringList> argl = functionParameters( function, sep, pre, post ); if ( argl.isEmpty() ) - return FALSE; + return false; TQString label; int w = 0; @@ -652,7 +652,7 @@ bool EditorCompletion::doArgumentHint( bool useIndex ) } w += 16; if ( label.isEmpty() ) - return FALSE; + return false; if ( functionLabel->isVisible() ) { functionLabel->resize( w + 50, TQMAX( functionLabel->fontMetrics().height(), 16 ) ); } else { @@ -672,7 +672,7 @@ bool EditorCompletion::doArgumentHint( bool useIndex ) } TQTimer::singleShot( 0, functionLabel, TQ_SLOT( relayout() ) ); - return TRUE; + return true; } TQValueList<TQStringList> EditorCompletion::functionParameters( const TQString &, TQChar &, TQString &, TQString & ) diff --git a/tools/designer/editor/conf.cpp b/tools/designer/editor/conf.cpp index bff128679..e709f91a6 100644 --- a/tools/designer/editor/conf.cpp +++ b/tools/designer/editor/conf.cpp @@ -50,7 +50,7 @@ TQMap<TQString, ConfigStyle> Config::defaultStyles() s.color = TQt::black; styles.insert( "Standard", s ); - s.font = TQFont( commentFamily, normalSize, normalWeight, TRUE ); + s.font = TQFont( commentFamily, normalSize, normalWeight, true ); s.color = TQt::red; styles.insert( "Comment", s ); @@ -88,7 +88,7 @@ TQMap<TQString, ConfigStyle> Config::readStyles( const TQString &path ) TQString family; int size = 10; - bool bold = FALSE, italic = FALSE, underline = FALSE; + bool bold = false, italic = false, underline = false; int red = 0, green = 0, blue = 0; TQString elements[] = { @@ -105,7 +105,7 @@ TQMap<TQString, ConfigStyle> Config::readStyles( const TQString &path ) for ( int i = 0; elements[ i ] != TQString::null; ++i ) { TQSettings settings; - bool ok = TRUE; + bool ok = true; for (;;) { family = settings.readEntry( path + elements[ i ] + "/family", TQString::null, &ok ); if ( !ok ) @@ -113,13 +113,13 @@ TQMap<TQString, ConfigStyle> Config::readStyles( const TQString &path ) size = settings.readNumEntry( path + elements[ i ] + "/size", 10, &ok ); if ( !ok ) break; - bold = settings.readBoolEntry( path + elements[ i ] + "/bold", FALSE, &ok ); + bold = settings.readBoolEntry( path + elements[ i ] + "/bold", false, &ok ); if ( !ok ) break; - italic = settings.readBoolEntry( path + elements[ i ] + "/italic", FALSE, &ok ); + italic = settings.readBoolEntry( path + elements[ i ] + "/italic", false, &ok ); if ( !ok ) break; - underline = settings.readBoolEntry( path + elements[ i ] + "/underline", FALSE, &ok ); + underline = settings.readBoolEntry( path + elements[ i ] + "/underline", false, &ok ); if ( !ok ) break; red = settings.readNumEntry( path + elements[ i ] + "/red", 0, &ok ); @@ -180,21 +180,21 @@ void Config::saveStyles( const TQMap<TQString, ConfigStyle> &styles, const TQStr bool Config::completion( const TQString &path ) { TQSettings settings; - bool ret = settings.readBoolEntry( path + "/completion", TRUE ); + bool ret = settings.readBoolEntry( path + "/completion", true ); return ret; } bool Config::wordWrap( const TQString &path ) { TQSettings settings; - bool ret = settings.readBoolEntry( path + "/wordWrap", TRUE ); + bool ret = settings.readBoolEntry( path + "/wordWrap", true ); return ret; } bool Config::parenMatching( const TQString &path ) { TQSettings settings; - bool ret = settings.readBoolEntry( path + "/parenMatching", TRUE ); + bool ret = settings.readBoolEntry( path + "/parenMatching", true ); return ret; } @@ -215,14 +215,14 @@ int Config::indentIndentSize( const TQString &path ) bool Config::indentKeepTabs( const TQString &path ) { TQSettings settings; - bool ret = settings.readBoolEntry( path + "/indentKeepTabs", TRUE ); + bool ret = settings.readBoolEntry( path + "/indentKeepTabs", true ); return ret; } bool Config::indentAutoIndent( const TQString &path ) { TQSettings settings; - bool ret = settings.readBoolEntry( path + "/indentAutoIndent", TRUE ); + bool ret = settings.readBoolEntry( path + "/indentAutoIndent", true ); return ret; } diff --git a/tools/designer/editor/editor.cpp b/tools/designer/editor/editor.cpp index 58b5ed90d..7d1f91754 100644 --- a/tools/designer/editor/editor.cpp +++ b/tools/designer/editor/editor.cpp @@ -41,14 +41,14 @@ #include <ntqaccel.h> Editor::Editor( const TQString &fn, TQWidget *parent, const char *name ) - : TQTextEdit( parent, name ), hasError( FALSE ) + : TQTextEdit( parent, name ), hasError( false ) { document()->setFormatter( new TQTextFormatterBreakInWords ); if ( !fn.isEmpty() ) load( fn ); setHScrollBarMode( TQScrollView::AlwaysOff ); setVScrollBarMode( TQScrollView::AlwaysOn ); - document()->setUseFormatCollection( FALSE ); + document()->setUseFormatCollection( false ); parenMatcher = new ParenMatcher; connect( this, TQ_SIGNAL( cursorPositionChanged( TQTextCursor * ) ), this, TQ_SLOT( cursorPosChanged( TQTextCursor * ) ) ); @@ -57,14 +57,14 @@ Editor::Editor( const TQString &fn, TQWidget *parent, const char *name ) document()->addSelection( Step ); document()->setSelectionColor( Error, red ); document()->setSelectionColor( Step, yellow ); - document()->setInvertSelectionText( Error, FALSE ); - document()->setInvertSelectionText( Step, FALSE ); + document()->setInvertSelectionText( Error, false ); + document()->setInvertSelectionText( Step, false ); document()->addSelection( ParenMatcher::Match ); document()->addSelection( ParenMatcher::Mismatch ); document()->setSelectionColor( ParenMatcher::Match, TQColor( 204, 232, 195 ) ); document()->setSelectionColor( ParenMatcher::Mismatch, TQt::magenta ); - document()->setInvertSelectionText( ParenMatcher::Match, FALSE ); - document()->setInvertSelectionText( ParenMatcher::Mismatch, FALSE ); + document()->setInvertSelectionText( ParenMatcher::Match, false ); + document()->setInvertSelectionText( ParenMatcher::Mismatch, false ); accelComment = new TQAccel( this ); accelComment->connectItem( accelComment->insertItem( ALT + Key_C ), @@ -72,7 +72,7 @@ Editor::Editor( const TQString &fn, TQWidget *parent, const char *name ) accelUncomment = new TQAccel( this ); accelUncomment->connectItem( accelUncomment->insertItem( ALT + Key_U ), this, TQ_SLOT( uncommentSelection() ) ); - editable = TRUE; + editable = true; } Editor::~Editor() @@ -87,7 +87,7 @@ void Editor::cursorPosChanged( TQTextCursor *c ) repaintChanged(); if ( hasError ) { emit clearErrorMarker(); - hasError = FALSE; + hasError = false; } } @@ -113,7 +113,7 @@ void Editor::save( const TQString &fn ) void Editor::configChanged() { document()->invalidate(); - viewport()->repaint( FALSE ); + viewport()->repaint( false ); } void Editor::setErrorSelection( int line ) @@ -128,8 +128,8 @@ void Editor::setErrorSelection( int line ) document()->setSelectionStart( Error, c ); c.gotoLineEnd(); document()->setSelectionEnd( Error, c ); - hasError = TRUE; - viewport()->repaint( FALSE ); + hasError = true; + viewport()->repaint( false ); } void Editor::setStepSelection( int line ) @@ -144,13 +144,13 @@ void Editor::setStepSelection( int line ) document()->setSelectionStart( Step, c ); c.gotoLineEnd(); document()->setSelectionEnd( Step, c ); - viewport()->repaint( FALSE ); + viewport()->repaint( false ); } void Editor::clearStepSelection() { document()->removeSelection( Step ); - viewport()->repaint( FALSE ); + viewport()->repaint( false ); } void Editor::doChangeInterval() @@ -175,7 +175,7 @@ void Editor::commentSelection() } document()->removeSelection( TQTextDocument::Standard ); repaintChanged(); - setModified( TRUE ); + setModified( true ); } void Editor::uncommentSelection() @@ -195,7 +195,7 @@ void Editor::uncommentSelection() } document()->removeSelection( TQTextDocument::Standard ); repaintChanged(); - setModified( TRUE ); + setModified( true ); } TQPopupMenu *Editor::createPopupMenu( const TQPoint &p ) diff --git a/tools/designer/editor/editor.h b/tools/designer/editor/editor.h index 060394312..294ee5f5a 100644 --- a/tools/designer/editor/editor.h +++ b/tools/designer/editor/editor.h @@ -73,8 +73,8 @@ public: void clearStepSelection(); void clearSelections(); - virtual bool supportsErrors() const { return TRUE; } - virtual bool supportsBreakPoints() const { return TRUE; } + virtual bool supportsErrors() const { return true; } + virtual bool supportsBreakPoints() const { return true; } virtual void makeFunctionVisible( TQTextParagraph * ) {} void drawCursor( bool b ) { TQTextEdit::drawCursor( b ); } diff --git a/tools/designer/editor/markerwidget.cpp b/tools/designer/editor/markerwidget.cpp index 69e68817f..286877c9a 100644 --- a/tools/designer/editor/markerwidget.cpp +++ b/tools/designer/editor/markerwidget.cpp @@ -409,7 +409,7 @@ void MarkerWidget::mousePressEvent( TQMouseEvent *e ) if ( data->marker == ParagData::Breakpoint ) { data->marker = ParagData::NoMarker; } else { - bool ok = TRUE; + bool ok = true; isBreakpointPossible( ok, ( (Editor*)viewManager->currentView() )->text(), p->paragId() ); if ( ok ) data->marker = ParagData::Breakpoint; @@ -465,13 +465,13 @@ void MarkerWidget::contextMenuEvent( TQContextMenuEvent *e ) return; if ( res == collapseAll ) { - emit collapse( TRUE ); + emit collapse( true ); } else if ( res == collapseFunctions ) { - emit collapse( FALSE ); + emit collapse( false ); } else if ( res == expandAll ) { - emit expand( TRUE ); + emit expand( true ); } else if ( res == expandFunctions ) { - emit expand( FALSE ); + emit expand( false ); } else if ( res == toggleBreakPoint ) { if ( ( (ParagData*)p->extraData() )->marker == ParagData::Breakpoint ) { ( (ParagData*)p->extraData() )->marker = ParagData::NoMarker; diff --git a/tools/designer/editor/markerwidget.h b/tools/designer/editor/markerwidget.h index 67e4e3bc2..bf1565f7f 100644 --- a/tools/designer/editor/markerwidget.h +++ b/tools/designer/editor/markerwidget.h @@ -58,7 +58,7 @@ signals: void showMessage( const TQString &msg ); public slots: - void doRepaint() { repaint( FALSE ); } + void doRepaint() { repaint( false ); } protected: void paintEvent( TQPaintEvent *e ); diff --git a/tools/designer/editor/paragdata.h b/tools/designer/editor/paragdata.h index 772aaede9..d1483ec58 100644 --- a/tools/designer/editor/paragdata.h +++ b/tools/designer/editor/paragdata.h @@ -44,7 +44,7 @@ public: enum LineState { FunctionStart, InFunction, FunctionEnd, Invalid }; ParagData() : lastLengthForCompletion( -1 ), marker( NoMarker ), - lineState( Invalid ), functionOpen( TRUE ), step( FALSE ), stackFrame( FALSE ) {} + lineState( Invalid ), functionOpen( true ), step( false ), stackFrame( false ) {} ~ParagData() {} void join( TQTextParagraphData *data ) { ParagData *d = (ParagData*)data; diff --git a/tools/designer/editor/parenmatcher.cpp b/tools/designer/editor/parenmatcher.cpp index ddc4b8838..efb6a215a 100644 --- a/tools/designer/editor/parenmatcher.cpp +++ b/tools/designer/editor/parenmatcher.cpp @@ -40,18 +40,18 @@ ParenMatcher::ParenMatcher() { - enabled = TRUE; + enabled = true; } bool ParenMatcher::match( TQTextCursor *cursor ) { if ( !enabled ) - return FALSE; - bool ret = FALSE; + return false; + bool ret = false; TQChar c( cursor->paragraph()->at( cursor->index() )->c ); - bool ok1 = FALSE; - bool ok2 = FALSE; + bool ok1 = false; + bool ok2 = false; if ( c == '{' || c == '(' || c == '[' ) { ok1 = checkOpenParen( cursor ); ret = ok1 || ret; @@ -69,7 +69,7 @@ bool ParenMatcher::match( TQTextCursor *cursor ) bool ParenMatcher::checkOpenParen( TQTextCursor *cursor ) { if ( !cursor->paragraph()->extraData() ) - return FALSE; + return false; ParenList parenList = ( (ParagData*)cursor->paragraph()->extraData() )->parenList; Paren openParen, closedParen; @@ -77,7 +77,7 @@ bool ParenMatcher::checkOpenParen( TQTextCursor *cursor ) int i = 0; int ignore = 0; - bool foundOpen = FALSE; + bool foundOpen = false; TQChar c = cursor->paragraph()->at( cursor->index() )->c; for (;;) { if ( !foundOpen ) { @@ -88,7 +88,7 @@ bool ParenMatcher::checkOpenParen( TQTextCursor *cursor ) ++i; continue; } else { - foundOpen = TRUE; + foundOpen = true; ++i; } } @@ -132,18 +132,18 @@ bool ParenMatcher::checkOpenParen( TQTextCursor *cursor ) cursor->document()->setSelectionEnd( id, *cursor ); cursor->setParagraph( tstring ); cursor->setIndex( tidx ); - return TRUE; + return true; } } bye: - return FALSE; + return false; } bool ParenMatcher::checkClosedParen( TQTextCursor *cursor ) { if ( !cursor->paragraph()->extraData() ) - return FALSE; + return false; ParenList parenList = ( (ParagData*)cursor->paragraph()->extraData() )->parenList; Paren openParen, closedParen; @@ -151,7 +151,7 @@ bool ParenMatcher::checkClosedParen( TQTextCursor *cursor ) int i = (int)parenList.count() - 1; int ignore = 0; - bool foundClosed = FALSE; + bool foundClosed = false; TQChar c = cursor->paragraph()->at( cursor->index() - 1 )->c; for (;;) { if ( !foundClosed ) { @@ -162,7 +162,7 @@ bool ParenMatcher::checkClosedParen( TQTextCursor *cursor ) --i; continue; } else { - foundClosed = TRUE; + foundClosed = true; --i; } } @@ -206,10 +206,10 @@ bool ParenMatcher::checkClosedParen( TQTextCursor *cursor ) cursor->document()->setSelectionEnd( id, *cursor ); cursor->setParagraph( tstring ); cursor->setIndex( tidx ); - return TRUE; + return true; } } bye: - return FALSE; + return false; } diff --git a/tools/designer/editor/viewmanager.cpp b/tools/designer/editor/viewmanager.cpp index e3627bf5e..62cf92936 100644 --- a/tools/designer/editor/viewmanager.cpp +++ b/tools/designer/editor/viewmanager.cpp @@ -124,7 +124,7 @@ void ViewManager::setStep( int line ) TQTextParagraph *p = ( (Editor*)curView )->document()->firstParagraph(); while ( p ) { if ( p->extraData() ) - ( (ParagData*)p->extraData() )->step = FALSE; + ( (ParagData*)p->extraData() )->step = false; p = p->next(); } p = ( (Editor*)curView )->document()->paragAt( line ); @@ -136,7 +136,7 @@ void ViewManager::setStep( int line ) ParagData *paragData = (ParagData*)p->extraData(); if ( !paragData ) paragData = new ParagData; - paragData->step = TRUE; + paragData->step = true; p->setExtraData( paragData ); markerWidget->doRepaint(); } @@ -148,7 +148,7 @@ void ViewManager::clearStep() TQTextParagraph *p = ( (Editor*)curView )->document()->firstParagraph(); while ( p ) { if ( p->extraData() ) - ( (ParagData*)p->extraData() )->step = FALSE; + ( (ParagData*)p->extraData() )->step = false; p = p->next(); } markerWidget->doRepaint(); @@ -166,7 +166,7 @@ void ViewManager::setStackFrame( int line ) ParagData *paragData = (ParagData*)p->extraData(); if ( !paragData ) paragData = new ParagData; - paragData->stackFrame = TRUE; + paragData->stackFrame = true; p->setExtraData( paragData ); markerWidget->doRepaint(); } @@ -177,7 +177,7 @@ void ViewManager::clearStackFrame() TQTextParagraph *p = ( (Editor*)curView )->document()->firstParagraph(); while ( p ) { if ( p->extraData() ) { - ( (ParagData*)p->extraData() )->stackFrame = FALSE; + ( (ParagData*)p->extraData() )->stackFrame = false; if ( ( (ParagData*)p->extraData() )->marker == ParagData::Error ) ( (ParagData*)p->extraData() )->marker = ParagData::NoMarker; } @@ -264,7 +264,7 @@ void ViewManager::showMessage( const TQString &msg ) int col; ( (TQTextEdit*)currentView() )->getCursorPosition( &row, &col ); posLabel->setText( msg ); - messageTimer->start( 1000, TRUE ); + messageTimer->start( 1000, true ); } void ViewManager::clearStatusBar() diff --git a/tools/designer/editor/yyindent.cpp b/tools/designer/editor/yyindent.cpp index d8498dc3a..d7228c0b6 100644 --- a/tools/designer/editor/yyindent.cpp +++ b/tools/designer/editor/yyindent.cpp @@ -137,8 +137,8 @@ static TQChar firstNonWhiteSpace( const TQString& t ) } /* - Returns TRUE if string t is made only of white space; otherwise - returns FALSE. + Returns true if string t is made only of white space; otherwise + returns false. */ static bool isOnlyWhiteSpace( const TQString& t ) { @@ -272,8 +272,8 @@ static inline TQChar lastParen( const TQString& t ) } /* - Returns TRUE if typedIn the same as okayCh or is null; otherwise - returns FALSE. + Returns true if typedIn the same as okayCh or is null; otherwise + returns false. */ static inline bool okay( TQChar typedIn, TQChar okayCh ) { @@ -331,7 +331,7 @@ static bool readLine() do { if ( yyLinizerState->iter == yyProgram->begin() ) { yyLinizerState->line = TQString::null; - return FALSE; + return false; } --yyLinizerState->iter; @@ -345,7 +345,7 @@ static bool readLine() of that and eventually yyLine will contain a slash-aster. Notice that both if's can be executed, since - yyLinizerState->inCComment is potentially set to FALSE in + yyLinizerState->inCComment is potentially set to false in the first if. The order of the if's is also important. */ @@ -357,7 +357,7 @@ static bool readLine() yyLinizerState->line = TQString::null; } else { yyLinizerState->line.truncate( k ); - yyLinizerState->inCComment = FALSE; + yyLinizerState->inCComment = false; } } @@ -368,7 +368,7 @@ static bool readLine() if ( k != -1 ) { for ( int i = 0; i < k + 2; i++ ) eraseChar( yyLinizerState->line, i, ' ' ); - yyLinizerState->inCComment = TRUE; + yyLinizerState->inCComment = true; } } @@ -421,7 +421,7 @@ static bool readLine() yyLinizerState->braceDepth--; } while ( yyLinizerState->line.isEmpty() ); - return TRUE; + return true; } /* @@ -431,8 +431,8 @@ static bool readLine() static void startLinizer() { yyLinizerState->braceDepth = 0; - yyLinizerState->inCComment = FALSE; - yyLinizerState->pendingRightBrace = FALSE; + yyLinizerState->inCComment = false; + yyLinizerState->pendingRightBrace = false; yyLine = &yyLinizerState->line; yyBraceDepth = &yyLinizerState->braceDepth; @@ -445,9 +445,9 @@ static void startLinizer() } /* - Returns TRUE if the start of the bottom line of yyProgram (and + Returns true if the start of the bottom line of yyProgram (and potentially the whole line) is part of a C-style comment; otherwise - returns FALSE. + returns false. */ static bool bottomLineStartsInCComment() { @@ -463,20 +463,20 @@ static bool bottomLineStartsInCComment() for ( int i = 0; i < BigRoof; i++ ) { if ( p == yyProgram->begin() ) - return FALSE; + return false; --p; if ( (*p).find(slashAster) != -1 || (*p).find(asterSlash) != -1 ) { TQString trimmed = trimmedCodeLine( *p ); if ( trimmed.find(slashAster) != -1 ) { - return TRUE; + return true; } else if ( trimmed.find(asterSlash) != -1 ) { - return FALSE; + return false; } } } - return FALSE; + return false; } /* @@ -515,15 +515,15 @@ static int indentWhenBottomLineStartsInCComment() /* A function called match...() modifies the linizer state. If it - returns TRUE, yyLine is the top line of the matched construct; + returns true, yyLine is the top line of the matched construct; otherwise, the linizer is left in an unknown state. A function called is...() keeps the linizer state intact. */ /* - Returns TRUE if the current line (and upwards) forms a braceless - control statement; otherwise returns FALSE. + Returns true if the current line (and upwards) forms a braceless + control statement; otherwise returns false. The first line of the following example is a "braceless control statement": @@ -536,10 +536,10 @@ static bool matchBracelessControlStatement() int delimDepth = 0; if ( yyLine->endsWith("else") ) - return TRUE; + return true; if ( !yyLine->endsWith(")") ) - return FALSE; + return false; for ( int i = 0; i < SmallRoof; i++ ) { int j = yyLine->length(); @@ -564,7 +564,7 @@ static bool matchBracelessControlStatement() "if ( x )" is not part of the statement "y". */ - return TRUE; + return true; } } if ( delimDepth == -1 ) { @@ -579,7 +579,7 @@ static bool matchBracelessControlStatement() if ( 1 + 2 ) */ - return FALSE; + return false; } break; case '{': @@ -592,19 +592,19 @@ static bool matchBracelessControlStatement() though. */ if ( ch != TQChar(';') || delimDepth == 0 ) - return FALSE; + return false; } } if ( !readLine() ) break; } - return FALSE; + return false; } /* - Returns TRUE if yyLine is an unfinished line; otherwise returns - FALSE. + Returns true if yyLine is an unfinished line; otherwise returns + false. In many places we'll use the terms "standalone line", "unfinished line" and "continuation line". The meaning of these should be @@ -618,12 +618,12 @@ static bool matchBracelessControlStatement() */ static bool isUnfinishedLine() { - bool unf = FALSE; + bool unf = false; YY_SAVE(); if ( yyLine->isEmpty() ) - return FALSE; + return false; TQChar lastCh = (*yyLine)[(int) yyLine->length() - 1]; if ( TQString("{};").find(lastCh) == -1 && !yyLine->endsWith("...") ) { @@ -640,7 +640,7 @@ static bool isUnfinishedLine() for ( int i = 1; i < 10; */ - unf = TRUE; + unf = true; } else if ( readLine() && yyLine->endsWith(";") && lastParen(*yyLine) == TQChar('(') ) { /* @@ -649,7 +649,7 @@ static bool isUnfinishedLine() for ( int i = 1; i < 10; */ - unf = TRUE; + unf = true; } } @@ -658,12 +658,12 @@ static bool isUnfinishedLine() } /* - Returns TRUE if yyLine is a continuation line; otherwise returns - FALSE. + Returns true if yyLine is a continuation line; otherwise returns + false. */ static bool isContinuationLine() { - bool cont = FALSE; + bool cont = false; YY_SAVE(); if ( readLine() ) @@ -992,11 +992,11 @@ static int indentForStandaloneLine() static void initializeIndenter() { literal = new TQRegExp( "([\"'])(?:\\\\.|[^\\\\])*\\1" ); - literal->setMinimal( TRUE ); + literal->setMinimal( true ); label = new TQRegExp( "^\\s*((?:case\\b([^:]|::)+|[a-zA-Z_0-9]+)(?:\\s+slots)?:)(?!:)" ); inlineCComment = new TQRegExp( "/\\*.*\\*/" ); - inlineCComment->setMinimal( TRUE ); + inlineCComment->setMinimal( true ); braceX = new TQRegExp( "^\\s*\\}\\s*(?:else|catch)\\b" ); iflikeKeyword = new TQRegExp( "\\b(?:catch|do|for|if|while)\\b" ); @@ -1136,7 +1136,7 @@ int main( int argc, char **argv ) } TQString code = fileContents( argv[1] ); - TQStringList program = TQStringList::split( '\n', code, TRUE ); + TQStringList program = TQStringList::split( '\n', code, true ); TQStringList p; TQString out; diff --git a/tools/designer/examples/addressbook/addressbook.ui.h b/tools/designer/examples/addressbook/addressbook.ui.h index 93f3d50e5..6b282a2cc 100644 --- a/tools/designer/examples/addressbook/addressbook.ui.h +++ b/tools/designer/examples/addressbook/addressbook.ui.h @@ -15,7 +15,7 @@ void AddressBook::fileNew() { - AddressDetails dia( this, 0, TRUE ); + AddressDetails dia( this, 0, true ); connect( &dia, TQ_SIGNAL( newAddress( const TQString &, const TQString &, const TQString &, @@ -117,7 +117,7 @@ void AddressBook::fileExit() void AddressBook::editFind() { - SearchDialog dia( this, 0, TRUE ); + SearchDialog dia( this, 0, true ); connect( &dia, TQ_SIGNAL( searchAddress( const TQString & ) ), this, TQ_SLOT( searchAddress( const TQString & ) ) ); dia.exec(); @@ -130,7 +130,7 @@ void AddressBook::searchAddress( const TQString &expr ) while ( it.current() ) { for ( int i = 0; i < 7; ++i ) { if ( it.current()->text( i ).find( expr ) != -1 ) - addressView->setSelected( it.current(), TRUE ); + addressView->setSelected( it.current(), true ); } ++it; } diff --git a/tools/designer/examples/book/book5/book.ui.h b/tools/designer/examples/book/book5/book.ui.h index c41fa174f..88bffedd7 100644 --- a/tools/designer/examples/book/book5/book.ui.h +++ b/tools/designer/examples/book/book5/book.ui.h @@ -1,6 +1,6 @@ void BookForm::editClicked() { - EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", TRUE ); + EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", true ); dialog->exec(); delete dialog; } diff --git a/tools/designer/examples/book/book6/book.ui.h b/tools/designer/examples/book/book6/book.ui.h index fe0b39d9d..cc5126ffd 100644 --- a/tools/designer/examples/book/book6/book.ui.h +++ b/tools/designer/examples/book/book6/book.ui.h @@ -1,6 +1,6 @@ void BookForm::editClicked() { - EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", TRUE ); + EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", true ); TQSqlCursor cur( "book" ); dialog->BookDataBrowser->setSqlCursor( &cur ); dialog->BookDataBrowser->setFilter( BookDataTable->filter() ); diff --git a/tools/designer/examples/book/book7/book.ui.h b/tools/designer/examples/book/book7/book.ui.h index 1cb2f0b9c..1c704ddc4 100644 --- a/tools/designer/examples/book/book7/book.ui.h +++ b/tools/designer/examples/book/book7/book.ui.h @@ -1,6 +1,6 @@ void BookForm::editClicked() { - EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", TRUE ); + EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", true ); TQSqlCursor cur( "book" ); dialog->BookDataBrowser->setSqlCursor( &cur ); dialog->BookDataBrowser->setFilter( BookDataTable->filter() ); diff --git a/tools/designer/examples/book/book8/book.ui.h b/tools/designer/examples/book/book8/book.ui.h index 24bb69c4f..fe512c626 100644 --- a/tools/designer/examples/book/book8/book.ui.h +++ b/tools/designer/examples/book/book8/book.ui.h @@ -1,6 +1,6 @@ void BookForm::editClicked() { - EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", TRUE ); + EditBookForm *dialog = new EditBookForm( this, "Edit Book Form", true ); TQSqlCursor cur( "book" ); dialog->BookDataBrowser->setSqlCursor( &cur ); dialog->BookDataBrowser->setFilter( BookDataTable->filter() ); diff --git a/tools/designer/examples/book/book8/editbook.ui.h b/tools/designer/examples/book/book8/editbook.ui.h index 45876fe71..cb06b57e2 100644 --- a/tools/designer/examples/book/book8/editbook.ui.h +++ b/tools/designer/examples/book/book8/editbook.ui.h @@ -4,14 +4,14 @@ void EditBookForm::init() while ( query.next() ) { ComboBoxAuthor->insertItem( query.value( 0 ).toString() ); int id = query.value( 1 ).toInt(); - mapAuthor( query.value( 0 ).toString(), id, TRUE ); + mapAuthor( query.value( 0 ).toString(), id, true ); } } void EditBookForm::beforeUpdateBook( TQSqlRecord * buffer ) { int id; - mapAuthor( ComboBoxAuthor->currentText(), id, FALSE ); + mapAuthor( ComboBoxAuthor->currentText(), id, false ); buffer->setValue( "authorid", id ); } diff --git a/tools/designer/examples/book/connection.cpp b/tools/designer/examples/book/connection.cpp index d9b0df31f..24d38746c 100644 --- a/tools/designer/examples/book/connection.cpp +++ b/tools/designer/examples/book/connection.cpp @@ -21,7 +21,7 @@ bool createConnections() tqWarning( "Failed to open books database: " + defaultDB->lastError().driverText() ); tqWarning( defaultDB->lastError().databaseText() ); - return FALSE; + return false; } TQSqlQuery q(TQString::null, defaultDB); @@ -46,7 +46,7 @@ bool createConnections() q.exec("INSERT INTO sequence VALUES ( 'author', 2 )"); q.exec("INSERT INTO sequence VALUES ( 'book', 5 )"); - return TRUE; + return true; } diff --git a/tools/designer/examples/colortool/mainform.ui.h b/tools/designer/examples/colortool/mainform.ui.h index 7a0f8a8db..f75ba266d 100644 --- a/tools/designer/examples/colortool/mainform.ui.h +++ b/tools/designer/examples/colortool/mainform.ui.h @@ -20,15 +20,15 @@ void MainForm::init() { clipboard = TQApplication::clipboard(); if ( clipboard->supportsSelection() ) - clipboard->setSelectionMode( TRUE ); + clipboard->setSelectionMode( true ); findForm = 0; loadSettings(); m_filename = ""; - m_changed = FALSE; - m_table_dirty = TRUE; - m_icons_dirty = TRUE; - clearData( TRUE ); + m_changed = false; + m_table_dirty = true; + m_icons_dirty = true; + clearData( true ); } void MainForm::clearData( bool fillWithDefaults ) @@ -98,7 +98,7 @@ void MainForm::populate() } else colorTable->hideColumn( COL_WEB ); - m_table_dirty = FALSE; + m_table_dirty = false; } if ( m_icons_dirty ) { @@ -108,7 +108,7 @@ void MainForm::populate() for ( it = m_colors.constBegin(); it != m_colors.constEnd(); ++it ) (void) new TQIconViewItem( colorIconView, it.key(), colorSwatch( it.data() ) ); - m_icons_dirty = FALSE; + m_icons_dirty = false; } } @@ -129,10 +129,10 @@ void MainForm::fileNew() { if ( okToClear() ) { m_filename = ""; - m_changed = FALSE; - m_table_dirty = TRUE; - m_icons_dirty = TRUE; - clearData( FALSE ); + m_changed = false; + m_table_dirty = true; + m_icons_dirty = true; + clearData( false ); } } @@ -176,7 +176,7 @@ void MainForm::fileSave() statusBar()->message( TQString( "Saved %1 colors to '%2'" ). arg( m_colors.count() ). arg( m_filename ), 3000 ); - m_changed = FALSE; + m_changed = false; } else statusBar()->message( TQString( "Failed to save '%1'" ). @@ -208,7 +208,7 @@ void MainForm::fileSaveAs() void MainForm::load( const TQString& filename ) { - clearData( FALSE ); + clearData( false ); m_filename = filename; TQRegExp regex( "^\\s*(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\S+.*)$" ); TQFile file( filename ); @@ -236,7 +236,7 @@ void MainForm::load( const TQString& filename ) m_icons_dirty = ! ( m_table_dirty = ( visible == tablePage ) ); populate(); m_icons_dirty = ! ( m_table_dirty = ( visible != tablePage ) ); - m_changed = FALSE; + m_changed = false; } else statusBar()->message( TQString( "Failed to load '%1'" ). @@ -261,10 +261,10 @@ bool MainForm::okToClear() if ( ans == 0 ) fileSave(); else if ( ans == 1 ) - return FALSE; + return false; } - return TRUE; + return true; } void MainForm::closeEvent( TQCloseEvent * ) @@ -294,7 +294,7 @@ void MainForm::editCut() colorTable->setCurrentCell( row, 0 ); else if ( colorTable->numRows() ) colorTable->setCurrentCell( colorTable->numRows() - 1, 0 ); - m_icons_dirty = TRUE; + m_icons_dirty = true; } else if ( visible == iconsPage && colorIconView->currentItem() ) { TQIconViewItem *item = colorIconView->currentItem(); @@ -310,12 +310,12 @@ void MainForm::editCut() colorIconView->setCurrentItem( current ); colorIconView->arrangeItemsInGrid(); } - m_table_dirty = TRUE; + m_table_dirty = true; } if ( ! name.isNull() ) { m_colors.remove( name ); - m_changed = TRUE; + m_changed = true; statusBar()->message( TQString( "Deleted '%1'" ).arg( name ), 5000 ); } else @@ -368,7 +368,7 @@ void MainForm::lookfor( const TQString& text ) return; TQString ltext = text.lower(); TQWidget *visible = colorWidgetStack->visibleWidget(); - bool found = FALSE; + bool found = false; if ( visible == tablePage && colorTable->numRows() ) { int row = colorTable->currentRow(); @@ -377,7 +377,7 @@ void MainForm::lookfor( const TQString& text ) colorTable->setCurrentCell( i, 0 ); colorTable->clearSelection(); colorTable->selectRow( i ); - found = TRUE; + found = true; break; } if ( ! found ) @@ -390,7 +390,7 @@ void MainForm::lookfor( const TQString& text ) if ( item->text().lower().contains( ltext ) ) { colorIconView->setCurrentItem( item ); colorIconView->ensureItemVisible( item ); - found = TRUE; + found = true; break; } if ( ! found && start ) @@ -487,7 +487,7 @@ void MainForm::editAdd() if ( color.isValid() ) { TQPixmap pixmap( 80, 10 ); pixmap.fill( color ); - ColorNameForm *colorForm = new ColorNameForm( this, "color", TRUE ); + ColorNameForm *colorForm = new ColorNameForm( this, "color", true ); colorForm->setColors( m_colors ); colorForm->colorLabel->setPixmap( pixmap ); if ( colorForm->exec() ) { @@ -509,23 +509,23 @@ void MainForm::editAdd() (void) new TQIconViewItem( colorIconView, name, colorSwatch( color ) ); - m_changed = TRUE; + m_changed = true; } } } void MainForm::editOptions() { - OptionsForm *options = new OptionsForm( this, "options", TRUE ); + OptionsForm *options = new OptionsForm( this, "options", true ); switch ( m_clip_as ) { case CLIP_AS_HEX: - options->hexRadioButton->setChecked( TRUE ); + options->hexRadioButton->setChecked( true ); break; case CLIP_AS_NAME: - options->nameRadioButton->setChecked( TRUE ); + options->nameRadioButton->setChecked( true ); break; case CLIP_AS_RGB: - options->rgbRadioButton->setChecked( TRUE ); + options->rgbRadioButton->setChecked( true ); break; } options->webCheckBox->setChecked( m_show_web ); @@ -554,10 +554,10 @@ void MainForm::loadSettings() int windowX = settings.readNumEntry( APP_KEY + "WindowX", 0 ); int windowY = settings.readNumEntry( APP_KEY + "WindowY", 0 ); m_clip_as = settings.readNumEntry( APP_KEY + "ClipAs", CLIP_AS_HEX ); - m_show_web = settings.readBoolEntry( APP_KEY + "ShowWeb", TRUE ); - if ( ! settings.readBoolEntry( APP_KEY + "View", TRUE ) ) { + m_show_web = settings.readBoolEntry( APP_KEY + "ShowWeb", true ); + if ( ! settings.readBoolEntry( APP_KEY + "View", true ) ) { colorWidgetStack->raiseWidget( iconsPage ); - viewIconsAction->setOn( TRUE ); + viewIconsAction->setOn( true ); } resize( windowWidth, windowHeight ); diff --git a/tools/designer/examples/credit/creditform.h b/tools/designer/examples/credit/creditform.h index f8beb3581..938bcb10f 100644 --- a/tools/designer/examples/credit/creditform.h +++ b/tools/designer/examples/credit/creditform.h @@ -5,7 +5,7 @@ class CreditForm : public CreditFormBase TQ_OBJECT public: CreditForm( TQWidget* parent = 0, const char* name = 0, - bool modal = FALSE, WFlags fl = 0 ); + bool modal = false, WFlags fl = 0 ); ~CreditForm(); public slots: void setAmount(); diff --git a/tools/designer/examples/credit/creditformbase.cpp b/tools/designer/examples/credit/creditformbase.cpp index 372a756d3..79ed73d22 100644 --- a/tools/designer/examples/credit/creditformbase.cpp +++ b/tools/designer/examples/credit/creditformbase.cpp @@ -36,7 +36,7 @@ static TQPixmap uic_load_pixmap_CreditFormBase( const TQString &name ) * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. + * true to construct a modal dialog. */ CreditFormBase::CreditFormBase( TQWidget* parent, const char* name, bool modal, WFlags fl ) : TQDialog( parent, name, modal, fl ) @@ -61,7 +61,7 @@ CreditFormBase::CreditFormBase( TQWidget* parent, const char* name, bool modal, stdRadioButton = new TQRadioButton( creditButtonGroup, "stdRadioButton" ); stdRadioButton->setText( trUtf8( "&Standard", "" ) ); - stdRadioButton->setChecked( TRUE ); + stdRadioButton->setChecked( true ); creditButtonGroupLayout->addWidget( stdRadioButton ); noneRadioButton = new TQRadioButton( creditButtonGroup, "noneRadioButton" ); @@ -74,7 +74,7 @@ CreditFormBase::CreditFormBase( TQWidget* parent, const char* name, bool modal, CreditFormBaseLayout->addWidget( creditButtonGroup ); amountSpinBox = new TQSpinBox( this, "amountSpinBox" ); - amountSpinBox->setEnabled( FALSE ); + amountSpinBox->setEnabled( false ); amountSpinBox->setPrefix( trUtf8( "$ ", "" ) ); amountSpinBox->setButtonSymbols( TQSpinBox::UpDownArrows ); amountSpinBox->setMaxValue( 100000 ); @@ -89,7 +89,7 @@ CreditFormBase::CreditFormBase( TQWidget* parent, const char* name, bool modal, okPushButton = new TQPushButton( this, "okPushButton" ); okPushButton->setText( trUtf8( "OK", "" ) ); - okPushButton->setDefault( TRUE ); + okPushButton->setDefault( true ); Layout4->addWidget( okPushButton ); TQSpacerItem* spacer_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); Layout4->addItem( spacer_2 ); diff --git a/tools/designer/examples/credit/creditformbase.h b/tools/designer/examples/credit/creditformbase.h index 8d8b97c69..cae897357 100644 --- a/tools/designer/examples/credit/creditformbase.h +++ b/tools/designer/examples/credit/creditformbase.h @@ -24,7 +24,7 @@ class CreditFormBase : public TQDialog TQ_OBJECT public: - CreditFormBase( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + CreditFormBase( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 ); ~CreditFormBase(); TQButtonGroup* creditButtonGroup; diff --git a/tools/designer/examples/filechooser/plugin/plugin.cpp b/tools/designer/examples/filechooser/plugin/plugin.cpp index be8105ff5..80bce8dc1 100644 --- a/tools/designer/examples/filechooser/plugin/plugin.cpp +++ b/tools/designer/examples/filechooser/plugin/plugin.cpp @@ -88,7 +88,7 @@ TQString CustomWidgetPlugin::whatsThis( const TQString& feature ) const bool CustomWidgetPlugin::isContainer( const TQString& ) const { - return FALSE; + return false; } diff --git a/tools/designer/examples/multiclip/multiclip.ui.h b/tools/designer/examples/multiclip/multiclip.ui.h index 203fc6906..ba329f01e 100644 --- a/tools/designer/examples/multiclip/multiclip.ui.h +++ b/tools/designer/examples/multiclip/multiclip.ui.h @@ -45,9 +45,9 @@ void MulticlipForm::init() void MulticlipForm::selectionChanged() { - cb->setSelectionMode( TRUE ); + cb->setSelectionMode( true ); dataChanged(); - cb->setSelectionMode( FALSE ); + cb->setSelectionMode( false ); } void MulticlipForm::copyPrevious() @@ -55,9 +55,9 @@ void MulticlipForm::copyPrevious() if ( clippingsListBox->currentItem() != -1 ) { cb->setText( clippingsListBox->currentText() ); if ( cb->supportsSelection() ) { - cb->setSelectionMode( TRUE ); + cb->setSelectionMode( true ); cb->setText( clippingsListBox->currentText() ); - cb->setSelectionMode( FALSE ); + cb->setSelectionMode( false ); } } } diff --git a/tools/designer/examples/opengl/main.cpp b/tools/designer/examples/opengl/main.cpp index 08168e48c..fd810acd3 100644 --- a/tools/designer/examples/opengl/main.cpp +++ b/tools/designer/examples/opengl/main.cpp @@ -279,7 +279,7 @@ TQString OpenGLWidgetInterface::whatsThis( const TQString &description ) const bool OpenGLWidgetInterface::isContainer( const TQString& ) const { - return FALSE; + return false; } TQRESULT OpenGLWidgetInterface::queryInterface( const TQUuid& uuid, TQUnknownInterface **iface ) diff --git a/tools/designer/examples/richedit/richedit.ui.h b/tools/designer/examples/richedit/richedit.ui.h index 02f7b1ef4..a68503244 100644 --- a/tools/designer/examples/richedit/richedit.ui.h +++ b/tools/designer/examples/richedit/richedit.ui.h @@ -52,7 +52,7 @@ void EditorForm::fileSave() if ( f.open( IO_WriteOnly ) ) { TQTextStream ts( &f ); ts << textEdit->text(); - textEdit->setModified( FALSE ); + textEdit->setModified( false ); } } } diff --git a/tools/designer/examples/sizeaware/main.cpp b/tools/designer/examples/sizeaware/main.cpp index 2b0dcf446..0481093ea 100644 --- a/tools/designer/examples/sizeaware/main.cpp +++ b/tools/designer/examples/sizeaware/main.cpp @@ -4,7 +4,7 @@ int main( int argc, char ** argv ) { TQApplication app( argc, argv ); - SizeAware *sizeaware = new SizeAware( 0, 0, TRUE ); + SizeAware *sizeaware = new SizeAware( 0, 0, true ); sizeaware->exec(); sizeaware->destroy(); return 0; diff --git a/tools/designer/examples/sizeaware/sizeaware.cpp b/tools/designer/examples/sizeaware/sizeaware.cpp index 621d36ead..3af595ce9 100644 --- a/tools/designer/examples/sizeaware/sizeaware.cpp +++ b/tools/designer/examples/sizeaware/sizeaware.cpp @@ -31,7 +31,7 @@ void SizeAware::destroy() settings.insertSearchPath( TQSettings::Unix, "/Opt/" + company() + "/share" ); settings.writeEntry( "/" + settingsFile() + "/width", width() ); settings.writeEntry( "/" + settingsFile() + "/height", height() ); - close( TRUE ); + close( true ); } diff --git a/tools/designer/examples/sizeaware/sizeaware.h b/tools/designer/examples/sizeaware/sizeaware.h index b939cfe4e..505b8351e 100644 --- a/tools/designer/examples/sizeaware/sizeaware.h +++ b/tools/designer/examples/sizeaware/sizeaware.h @@ -8,7 +8,7 @@ class SizeAware : public TQDialog TQ_PROPERTY( TQString company READ company WRITE setCompany ) TQ_PROPERTY( TQString settingsFile READ settingsFile WRITE setSettingsFile ) public: - SizeAware( TQDialog *parent = 0, const char *name = 0, bool modal = FALSE ); + SizeAware( TQDialog *parent = 0, const char *name = 0, bool modal = false ); ~SizeAware(); void setCompany( TQString company ) { m_company = company; } TQString company() const { return m_company; } diff --git a/tools/designer/interfaces/designerinterface.h b/tools/designer/interfaces/designerinterface.h index 31b750e95..5ec15aeee 100644 --- a/tools/designer/interfaces/designerinterface.h +++ b/tools/designer/interfaces/designerinterface.h @@ -171,7 +171,7 @@ struct DesignerDatabase virtual void setTables( const TQStringList & ) = 0; virtual TQMap<TQString, TQStringList> fields() const = 0; virtual void setFields( const TQMap<TQString, TQStringList> & ) = 0; - virtual void open( bool suppressDialog = FALSE ) const = 0; + virtual void open( bool suppressDialog = false ) const = 0; virtual void close() const = 0; virtual TQSqlDatabase* connection() = 0; @@ -228,7 +228,7 @@ struct DesignerFormWindow virtual void setCurrentWidget( TQWidget * ) = 0; virtual TQPtrList<TQAction> actionList() const = 0; virtual TQAction *createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel, - TQObject* parent, const char* name = 0, bool toggle = FALSE ) = 0; + TQObject* parent, const char* name = 0, bool toggle = false ) = 0; virtual void addAction( TQAction * ) = 0; virtual void removeAction( TQAction * ) = 0; virtual void preview() const = 0; diff --git a/tools/designer/plugins/cppeditor/cppcompletion.cpp b/tools/designer/plugins/cppeditor/cppcompletion.cpp index a5643b918..90b2fdbf7 100644 --- a/tools/designer/plugins/cppeditor/cppcompletion.cpp +++ b/tools/designer/plugins/cppeditor/cppcompletion.cpp @@ -46,7 +46,7 @@ CppEditorCompletion::CppEditorCompletion( Editor *e ) bool CppEditorCompletion::doObjectCompletion( const TQString &objName ) { if ( !ths ) - return FALSE; + return false; TQString object( objName ); int i = -1; if ( ( i = object.findRev( "->" ) ) != -1 ) @@ -62,7 +62,7 @@ bool CppEditorCompletion::doObjectCompletion( const TQString &objName ) } if ( !obj ) - return FALSE; + return false; TQValueList<CompletionEntry> lst; @@ -79,7 +79,7 @@ bool CppEditorCompletion::doObjectCompletion( const TQString &objName ) } } - TQStrList props = obj->metaObject()->propertyNames( TRUE ); + TQStrList props = obj->metaObject()->propertyNames( true ); for ( TQPtrListIterator<char> pit( props ); pit.current(); ++pit ) { TQString f( pit.current() ); TQChar c = f[ 0 ]; @@ -96,7 +96,7 @@ bool CppEditorCompletion::doObjectCompletion( const TQString &objName ) lst << ce; } - TQStrList slts = obj->metaObject()->slotNames( TRUE ); + TQStrList slts = obj->metaObject()->slotNames( true ); for ( TQPtrListIterator<char> sit( slts ); sit.current(); ++sit ) { TQString f( sit.current() ); f = f.left( f.find( "(" ) ); @@ -109,10 +109,10 @@ bool CppEditorCompletion::doObjectCompletion( const TQString &objName ) } if ( lst.isEmpty() ) - return FALSE; + return false; showCompletion( lst ); - return TRUE; + return true; } TQValueList<TQStringList> CppEditorCompletion::functionParameters( const TQString &expr, TQChar &separator, @@ -185,7 +185,7 @@ TQValueList<TQStringList> CppEditorCompletion::functionParameters( const TQStrin if ( !obj ) return TQValueList<TQStringList>(); - TQStrList slts = obj->metaObject()->slotNames( TRUE ); + TQStrList slts = obj->metaObject()->slotNames( true ); for ( TQPtrListIterator<char> sit( slts ); sit.current(); ++sit ) { TQString f( sit.current() ); f = f.left( f.find( "(" ) ); @@ -204,7 +204,7 @@ TQValueList<TQStringList> CppEditorCompletion::functionParameters( const TQStrin const TQMetaProperty *prop = obj->metaObject()-> - property( obj->metaObject()->findProperty( func[ 3 ].lower() + func.mid( 4 ), TRUE ), TRUE ); + property( obj->metaObject()->findProperty( func[ 3 ].lower() + func.mid( 4 ), true ), true ); if ( prop ) { TQValueList<TQStringList> l; l << TQStringList( prop->type() ); diff --git a/tools/designer/plugins/cppeditor/cppeditor.cpp b/tools/designer/plugins/cppeditor/cppeditor.cpp index 8b567ab20..70cffdde4 100644 --- a/tools/designer/plugins/cppeditor/cppeditor.cpp +++ b/tools/designer/plugins/cppeditor/cppeditor.cpp @@ -54,7 +54,7 @@ CppEditor::CppEditor( const TQString &fn, TQWidget *parent, const char *name, De browser = new CppEditorBrowser( this ); int j = 0; while ( SyntaxHighlighter_CPP::keywords[ j ] != TQString::null ) - completion->addCompletionEntry( SyntaxHighlighter_CPP::keywords[ j++ ], 0, FALSE ); + completion->addCompletionEntry( SyntaxHighlighter_CPP::keywords[ j++ ], 0, false ); configChanged(); } @@ -82,7 +82,7 @@ void CppEditor::configChanged() } else { if ( hScrollBarMode() != AlwaysOn ) { TQTextFormatterBreakWords *f = new TQTextFormatterBreakWords; - f->setWrapEnabled( FALSE ); + f->setWrapEnabled( false ); document()->setFormatter( f ); setHScrollBarMode( AlwaysOn ); } @@ -112,9 +112,9 @@ TQPopupMenu *CppEditor::createPopupMenu( const TQPoint &p ) int addimplid = m->insertItem( tr( "Add Include File (in Implementation)..." ), this, TQ_SLOT( addInclImpl() ) ); int addforid = m->insertItem( tr( "Add Forward Declaration..." ), this, TQ_SLOT( addForward() ) ); if ( !dIface->currentForm() ) { - m->setItemEnabled( adddeclid, FALSE ); - m->setItemEnabled( addimplid, FALSE ); - m->setItemEnabled( addforid, FALSE ); + m->setItemEnabled( adddeclid, false ); + m->setItemEnabled( addimplid, false ); + m->setItemEnabled( addforid, false ); } return m; } diff --git a/tools/designer/plugins/cppeditor/cppeditor.h b/tools/designer/plugins/cppeditor/cppeditor.h index 6df0d926c..647f175a3 100644 --- a/tools/designer/plugins/cppeditor/cppeditor.h +++ b/tools/designer/plugins/cppeditor/cppeditor.h @@ -54,7 +54,7 @@ public: virtual EditorBrowser *browserManager() { return browser; } void configChanged(); - bool supportsBreakPoints() const { return FALSE; } + bool supportsBreakPoints() const { return false; } #if defined(Q_USING) using TQTextEdit::createPopupMenu; #endif diff --git a/tools/designer/plugins/cppeditor/editorinterfaceimpl.cpp b/tools/designer/plugins/cppeditor/editorinterfaceimpl.cpp index 7b7747f3b..0880cb224 100644 --- a/tools/designer/plugins/cppeditor/editorinterfaceimpl.cpp +++ b/tools/designer/plugins/cppeditor/editorinterfaceimpl.cpp @@ -76,7 +76,7 @@ TQWidget *EditorInterfaceImpl::editor( bool readonly, { if ( !viewManager ) { ( (EditorInterfaceImpl*)this )->viewManager = new ViewManager( parent, 0 ); - ( (EditorInterfaceImpl*)this )->viewManager->showMarkerWidget( FALSE ); + ( (EditorInterfaceImpl*)this )->viewManager->showMarkerWidget( false ); if ( iface ) iface->queryInterface( IID_Designer, (TQUnknownInterface**) &dIface ); CppEditor *e = new CppEditor( TQString::null, viewManager, "editor", dIface ); @@ -95,7 +95,7 @@ void EditorInterfaceImpl::setText( const TQString &txt ) CppEditor *e = (CppEditor*)viewManager->currentView(); disconnect( e, TQ_SIGNAL( modificationChanged( bool ) ), this, TQ_SLOT( modificationChanged( bool ) ) ); e->setText( txt ); - e->setModified( FALSE ); + e->setModified( false ); connect( e, TQ_SIGNAL( modificationChanged( bool ) ), this, TQ_SLOT( modificationChanged( bool ) ) ); } @@ -112,14 +112,14 @@ TQString EditorInterfaceImpl::text() const bool EditorInterfaceImpl::isUndoAvailable() const { if ( !viewManager || !viewManager->currentView() ) - return FALSE; + return false; return ( (CppEditor*)viewManager->currentView() )->isUndoAvailable(); } bool EditorInterfaceImpl::isRedoAvailable() const { if ( !viewManager || !viewManager->currentView() ) - return FALSE; + return false; return ( (CppEditor*)viewManager->currentView() )->isRedoAvailable(); } @@ -168,7 +168,7 @@ void EditorInterfaceImpl::selectAll() bool EditorInterfaceImpl::find( const TQString &expr, bool cs, bool wo, bool forward, bool startAtCursor ) { if ( !viewManager || !viewManager->currentView() ) - return FALSE; + return false; CppEditor *e = (CppEditor*)viewManager->currentView(); if ( startAtCursor ) return e->find( expr, cs, wo, forward ); @@ -180,9 +180,9 @@ bool EditorInterfaceImpl::replace( const TQString &find, const TQString &replace bool forward, bool startAtCursor, bool replaceAll ) { if ( !viewManager || !viewManager->currentView() ) - return FALSE; + return false; CppEditor *e = (CppEditor*)viewManager->currentView(); - bool ok = FALSE; + bool ok = false; if ( startAtCursor ) { ok = e->find( find, cs, wo, forward ); } else { @@ -192,7 +192,7 @@ bool EditorInterfaceImpl::replace( const TQString &find, const TQString &replace if ( ok ) { e->removeSelectedText(); - e->insert( replace, FALSE, FALSE ); + e->insert( replace, false, false ); } if ( !replaceAll || !ok ) { @@ -204,16 +204,16 @@ bool EditorInterfaceImpl::replace( const TQString &find, const TQString &replace return ok; } - bool ok2 = TRUE; + bool ok2 = true; while ( ok2 ) { ok2 = e->find( find, cs, wo, forward ); if ( ok2 ) { e->removeSelectedText(); - e->insert( replace, FALSE, FALSE ); + e->insert( replace, false, false ); } } - return TRUE; + return true; } void EditorInterfaceImpl::gotoLine( int line ) @@ -295,7 +295,7 @@ void EditorInterfaceImpl::setModified( bool m ) bool EditorInterfaceImpl::isModified() const { if ( !viewManager ) - return FALSE; + return false; return ( (CppEditor*)viewManager->currentView() )->isModified(); } @@ -320,7 +320,7 @@ void EditorInterfaceImpl::intervalChanged() { if ( !dIface ) return; - updateTimer->start( 2000, TRUE ); + updateTimer->start( 2000, true ); } void EditorInterfaceImpl::update() diff --git a/tools/designer/plugins/cppeditor/languageinterfaceimpl.cpp b/tools/designer/plugins/cppeditor/languageinterfaceimpl.cpp index 1fbd63e0d..1739f38e0 100644 --- a/tools/designer/plugins/cppeditor/languageinterfaceimpl.cpp +++ b/tools/designer/plugins/cppeditor/languageinterfaceimpl.cpp @@ -170,10 +170,10 @@ TQString LanguageInterfaceImpl::createEmptyFunction() bool LanguageInterfaceImpl::supports( Support s ) const { if ( s == ReturnType ) - return TRUE; + return true; if ( s == ConnectionsToCustomSlots ) - return TRUE; - return FALSE; + return true; + return false; } TQStringList LanguageInterfaceImpl::fileFilterList() const @@ -243,7 +243,7 @@ void LanguageInterfaceImpl::preferedExtensions( TQMap<TQString, TQString> &exten TQStrList LanguageInterfaceImpl::signalNames( TQObject *obj ) const { TQStrList sigs; - sigs = obj->metaObject()->signalNames( TRUE ); + sigs = obj->metaObject()->signalNames( true ); sigs.remove( "destroyed()" ); return sigs; } diff --git a/tools/designer/plugins/cppeditor/sourcetemplateinterfaceimpl.cpp b/tools/designer/plugins/cppeditor/sourcetemplateinterfaceimpl.cpp index fbf6f059d..87004bc44 100644 --- a/tools/designer/plugins/cppeditor/sourcetemplateinterfaceimpl.cpp +++ b/tools/designer/plugins/cppeditor/sourcetemplateinterfaceimpl.cpp @@ -88,7 +88,7 @@ SourceTemplateInterface::Source SourceTemplateInterfaceImpl::create( const TQStr SourceTemplateInterface::Source src; src.type = SourceTemplateInterface::Source::Invalid; if ( templ == "C++ Main-File (main.cpp)" ) { - CppMainFile dia( 0, 0, TRUE ); + CppMainFile dia( 0, 0, true ); dia.setup( appIface ); if ( dia.exec() == TQDialog::Accepted ) { DesignerInterface *dIface = 0; diff --git a/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp b/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp index 7607cf730..333843e0d 100644 --- a/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp +++ b/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.cpp @@ -262,13 +262,13 @@ void SyntaxHighlighter_CPP::process( TQTextDocument *doc, TQTextParagraph *strin int state = StateStandard; if ( string->prev() ) { if ( string->prev()->endState() == -1 ) - process( doc, string->prev(), 0, FALSE ); + process( doc, string->prev(), 0, false ); state = string->prev()->endState(); } int input = -1; int i = 0; - bool lastWasBackSlash = FALSE; - bool makeLastStandard = FALSE; + bool lastWasBackSlash = false; + bool makeLastStandard = false; ParagData *paragData = (ParagData*)string->extraData(); if ( paragData ) @@ -279,7 +279,7 @@ void SyntaxHighlighter_CPP::process( TQTextDocument *doc, TQTextParagraph *strin TQString alphabeth = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; TQString mathChars = "xXeE"; TQString numbers = "0123456789"; - bool questionMark = FALSE; + bool questionMark = false; TQChar lastChar; for (;;) { TQChar c = string->at( i )->c; @@ -348,13 +348,13 @@ void SyntaxHighlighter_CPP::process( TQTextDocument *doc, TQTextParagraph *strin if ( state == StateStandard && !questionMark && lastChar != ':' && nextChar != ':' ) { for ( int j = 0; j < i; ++j ) { if ( string->at( j )->format() == formatStandard ) - string->setFormat( j, 1, formatLabel, FALSE ); + string->setFormat( j, 1, formatLabel, false ); } } } break; default: { if ( !questionMark && c == '?' ) - questionMark = TRUE; + questionMark = true; if ( c.isLetter() || c == '_' ) input = InputAlpha; else @@ -373,19 +373,19 @@ void SyntaxHighlighter_CPP::process( TQTextDocument *doc, TQTextParagraph *strin switch ( state ) { case StateStandard: { int len = buffer.length(); - string->setFormat( i, 1, formatStandard, FALSE ); + string->setFormat( i, 1, formatStandard, false ); if ( makeLastStandard ) - string->setFormat( i - 1, 1, formatStandard, FALSE ); - makeLastStandard = FALSE; + string->setFormat( i - 1, 1, formatStandard, false ); + makeLastStandard = false; if ( buffer.length() > 0 && input != InputAlpha ) { if ( buffer[ 0 ] == 'Q' ) { - string->setFormat( i - buffer.length(), buffer.length(), formatType, FALSE ); + string->setFormat( i - buffer.length(), buffer.length(), formatType, false ); } else { TQMap<int, TQMap<TQString, int > >::Iterator it = wordMap->find( len ); if ( it != wordMap->end() ) { TQMap<TQString, int >::Iterator it2 = ( *it ).find( buffer ); if ( it2 != ( *it ).end() ) - string->setFormat( i - buffer.length(), buffer.length(), format( ( *it2 ) ), FALSE ); + string->setFormat( i - buffer.length(), buffer.length(), format( ( *it2 ) ), false ); } } buffer = TQString::null; @@ -393,102 +393,102 @@ void SyntaxHighlighter_CPP::process( TQTextDocument *doc, TQTextParagraph *strin } break; case StateCommentStart1: if ( makeLastStandard ) - string->setFormat( i - 1, 1, formatStandard, FALSE ); - makeLastStandard = TRUE; + string->setFormat( i - 1, 1, formatStandard, false ); + makeLastStandard = true; buffer = TQString::null; break; case StateCCommentStart2: - string->setFormat( i - 1, 2, formatComment, FALSE ); - makeLastStandard = FALSE; + string->setFormat( i - 1, 2, formatComment, false ); + makeLastStandard = false; buffer = TQString::null; break; case StateCppCommentStart2: - string->setFormat( i - 1, 2, formatComment, FALSE ); - makeLastStandard = FALSE; + string->setFormat( i - 1, 2, formatComment, false ); + makeLastStandard = false; buffer = TQString::null; break; case StateCComment: if ( makeLastStandard ) - string->setFormat( i - 1, 1, formatStandard, FALSE ); - makeLastStandard = FALSE; - string->setFormat( i, 1, formatComment, FALSE ); + string->setFormat( i - 1, 1, formatStandard, false ); + makeLastStandard = false; + string->setFormat( i, 1, formatComment, false ); buffer = TQString::null; break; case StateCppComment: if ( makeLastStandard ) - string->setFormat( i - 1, 1, formatStandard, FALSE ); - makeLastStandard = FALSE; - string->setFormat( i, 1, formatComment, FALSE ); + string->setFormat( i - 1, 1, formatStandard, false ); + makeLastStandard = false; + string->setFormat( i, 1, formatComment, false ); buffer = TQString::null; break; case StateCCommentEnd1: if ( makeLastStandard ) - string->setFormat( i - 1, 1, formatStandard, FALSE ); - makeLastStandard = FALSE; - string->setFormat( i, 1, formatComment, FALSE ); + string->setFormat( i - 1, 1, formatStandard, false ); + makeLastStandard = false; + string->setFormat( i, 1, formatComment, false ); buffer = TQString::null; break; case StateCCommentEnd2: if ( makeLastStandard ) - string->setFormat( i - 1, 1, formatStandard, FALSE ); - makeLastStandard = FALSE; - string->setFormat( i, 1, formatComment, FALSE ); + string->setFormat( i - 1, 1, formatStandard, false ); + makeLastStandard = false; + string->setFormat( i, 1, formatComment, false ); buffer = TQString::null; break; case StateStringStart: if ( makeLastStandard ) - string->setFormat( i - 1, 1, formatStandard, FALSE ); - makeLastStandard = FALSE; - string->setFormat( i, 1, formatStandard, FALSE ); + string->setFormat( i - 1, 1, formatStandard, false ); + makeLastStandard = false; + string->setFormat( i, 1, formatStandard, false ); buffer = TQString::null; break; case StateString: if ( makeLastStandard ) - string->setFormat( i - 1, 1, formatStandard, FALSE ); - makeLastStandard = FALSE; - string->setFormat( i, 1, formatString, FALSE ); + string->setFormat( i - 1, 1, formatStandard, false ); + makeLastStandard = false; + string->setFormat( i, 1, formatString, false ); buffer = TQString::null; break; case StateStringEnd: if ( makeLastStandard ) - string->setFormat( i - 1, 1, formatStandard, FALSE ); - makeLastStandard = FALSE; - string->setFormat( i, 1, formatStandard, FALSE ); + string->setFormat( i - 1, 1, formatStandard, false ); + makeLastStandard = false; + string->setFormat( i, 1, formatStandard, false ); buffer = TQString::null; break; case StateString2Start: if ( makeLastStandard ) - string->setFormat( i - 1, 1, formatStandard, FALSE ); - makeLastStandard = FALSE; - string->setFormat( i, 1, formatStandard, FALSE ); + string->setFormat( i - 1, 1, formatStandard, false ); + makeLastStandard = false; + string->setFormat( i, 1, formatStandard, false ); buffer = TQString::null; break; case StateString2: if ( makeLastStandard ) - string->setFormat( i - 1, 1, formatStandard, FALSE ); - makeLastStandard = FALSE; - string->setFormat( i, 1, formatString, FALSE ); + string->setFormat( i - 1, 1, formatStandard, false ); + makeLastStandard = false; + string->setFormat( i, 1, formatString, false ); buffer = TQString::null; break; case StateString2End: if ( makeLastStandard ) - string->setFormat( i - 1, 1, formatStandard, FALSE ); - makeLastStandard = FALSE; - string->setFormat( i, 1, formatStandard, FALSE ); + string->setFormat( i - 1, 1, formatStandard, false ); + makeLastStandard = false; + string->setFormat( i, 1, formatStandard, false ); buffer = TQString::null; break; case StateNumber: if ( makeLastStandard ) - string->setFormat( i - 1, 1, formatStandard, FALSE ); - makeLastStandard = FALSE; - string->setFormat( i, 1, formatNumber, FALSE ); + string->setFormat( i - 1, 1, formatStandard, false ); + makeLastStandard = false; + string->setFormat( i, 1, formatNumber, false ); buffer = TQString::null; break; case StatePreProcessor: if ( makeLastStandard ) - string->setFormat( i - 1, 1, formatStandard, FALSE ); - makeLastStandard = FALSE; - string->setFormat( i, 1, formatPreProcessor, FALSE ); + string->setFormat( i - 1, 1, formatStandard, false ); + makeLastStandard = false; + string->setFormat( i, 1, formatPreProcessor, false ); buffer = TQString::null; break; } @@ -513,7 +513,7 @@ void SyntaxHighlighter_CPP::process( TQTextDocument *doc, TQTextParagraph *strin string->setEndState( StateStandard ); } - string->setFirstPreProcess( FALSE ); + string->setFirstPreProcess( false ); TQTextParagraph *p = string->next(); if ( (!!oldEndState || !!string->endState()) && oldEndState != string->endState() && diff --git a/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.h b/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.h index 45cd01350..b6e6e721b 100644 --- a/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.h +++ b/tools/designer/plugins/cppeditor/syntaxhighliter_cpp.h @@ -53,7 +53,7 @@ public: SyntaxHighlighter_CPP(); virtual ~SyntaxHighlighter_CPP(); - void process( TQTextDocument *doc, TQTextParagraph *string, int start, bool invalidate = TRUE ); + void process( TQTextDocument *doc, TQTextParagraph *string, int start, bool invalidate = true ); void updateStyles( const TQMap<TQString, ConfigStyle> &styles ); static const char * const keywords[]; diff --git a/tools/designer/plugins/cppeditor/yyreg.cpp b/tools/designer/plugins/cppeditor/yyreg.cpp index 1f06a02e7..0955e896c 100644 --- a/tools/designer/plugins/cppeditor/yyreg.cpp +++ b/tools/designer/plugins/cppeditor/yyreg.cpp @@ -159,7 +159,7 @@ static int getToken() if ( yyCh == EOF ) { break; } else if ( isspace(yyCh) ) { - bool metNL = FALSE; + bool metNL = false; do { metNL = ( metNL || yyCh == '\n' ); readChar(); @@ -294,8 +294,8 @@ static int getToken() */ readChar(); if ( yyCh == '*' ) { - bool metAster = FALSE; - bool metAsterSlash = FALSE; + bool metAster = false; + bool metAsterSlash = false; readChar(); @@ -304,11 +304,11 @@ static int getToken() break; if ( yyCh == '*' ) - metAster = TRUE; + metAster = true; else if ( metAster && yyCh == '/' ) - metAsterSlash = TRUE; + metAsterSlash = true; else - metAster = FALSE; + metAster = false; readChar(); } break; @@ -406,8 +406,8 @@ TQString CppFunction::prototype() const static int yyTok; // the current token /* - Returns TRUE if thingy is a constructor or a destructor; otherwise - returns FALSE. + Returns true if thingy is a constructor or a destructor; otherwise + returns false. */ static bool isCtorOrDtor( const TQString& thingy ) { @@ -512,7 +512,7 @@ static TQString matchDataType() Alpha::Beta::Gamma::...::Omega. */ for ( ;; ) { - bool modifierMet = FALSE; + bool modifierMet = false; prependToType( &type, matchTemplateAngles() ); @@ -525,7 +525,7 @@ static TQString matchDataType() prependToType( &type, yyLex ); yyTok = getToken(); if ( yyTok != Tok_const ) - modifierMet = TRUE; + modifierMet = true; } if ( yyTok == Tok_Tilde ) { @@ -578,10 +578,10 @@ static CppFunction matchFunctionPrototype( bool stripParamNames ) TQString scopedName; TQStringList params; TQString qualifier; - bool cnst = FALSE; + bool cnst = false; if ( yyTok == Tok_const ) { - cnst = TRUE; + cnst = true; yyTok = getToken(); } @@ -753,7 +753,7 @@ static void matchTranslationUnit( TQValueList<CppFunction> *flist ) // found a left brace yyTok = getToken(); startBody = yyPos; - CppFunction func = matchFunctionPrototype( FALSE ); + CppFunction func = matchFunctionPrototype( false ); if ( !func.scopedName().isEmpty() ) { TQString body = yyIn->mid( startBody, endBody - startBody ); setBody( &func, body ); @@ -794,7 +794,7 @@ TQString canonicalCppProto( const TQString& proto ) { startTokenizer( proto ); yyTok = getToken(); - CppFunction func = matchFunctionPrototype( TRUE ); + CppFunction func = matchFunctionPrototype( true ); stopTokenizer(); return func.prototype(); } diff --git a/tools/designer/plugins/cppeditor/yyreg.h b/tools/designer/plugins/cppeditor/yyreg.h index 5ac3fc2f3..fec27cda2 100644 --- a/tools/designer/plugins/cppeditor/yyreg.h +++ b/tools/designer/plugins/cppeditor/yyreg.h @@ -41,7 +41,7 @@ class CppFunction { public: - CppFunction() : cnst( FALSE ), lineno1( 0 ), lineno2( 0 ) { } + CppFunction() : cnst( false ), lineno1( 0 ), lineno2( 0 ) { } void setReturnType( const TQString& r ) { ret = r; } void setScopedName( const TQString& n ) { nam = n; } @@ -67,7 +67,7 @@ public: int closingBraceLineNum() const { return lineno2; } #if defined(TQ_FULL_TEMPLATE_INSTANTIATION) - bool operator==( const CppFunction& ) const { return FALSE; } + bool operator==( const CppFunction& ) const { return false; } #endif private: diff --git a/tools/designer/plugins/dlg/dlg2ui.cpp b/tools/designer/plugins/dlg/dlg2ui.cpp index 23e18063e..bb425670b 100644 --- a/tools/designer/plugins/dlg/dlg2ui.cpp +++ b/tools/designer/plugins/dlg/dlg2ui.cpp @@ -523,7 +523,7 @@ void Dlg2Ui::flushWidgets() TQString className = widgetClassName( *yyWidgetMap.begin() ); if ( !widgetForLayout.exactMatch(className) ) { emitOpeningWidget( className ); - emitWidgetBody( *yyWidgetMap.begin(), FALSE ); + emitWidgetBody( *yyWidgetMap.begin(), false ); emitClosing( TQString("widget") ); } yyWidgetMap.remove( yyWidgetMap.begin() ); @@ -827,18 +827,18 @@ void Dlg2Ui::emitWidgetBody( const TQDomElement& e, bool layouted ) if ( type == TQString("qstring") ) type = TQString( "string" ); - bool omit = FALSE; + bool omit = false; if ( propertyName == TQString("backgroundOrigin") && val.toString() == TQString("WidgetOrigin") ) - omit = TRUE; + omit = true; if ( propertyName == TQString("enabled") && val.toBool() ) - omit = TRUE; + omit = true; if ( propertyName == TQString("minimumSize") && val.toSize() == TQSize(-1, -1) ) - omit = TRUE; + omit = true; if ( propertyName == TQString("maximumSize") && val.toSize() == TQSize(32767, 32767) ) - omit = TRUE; + omit = true; if ( !omit ) emitProperty( propertyName, val, type ); @@ -1013,7 +1013,7 @@ void Dlg2Ui::matchDialogCommon( const TQDomElement& dialogCommon ) TQString dataSource; TQString dataName; TQString windowBaseClass( "TQDialog" ); - bool isCustom = FALSE; + bool isCustom = false; TQString customBaseHeader; TQString windowCaption; @@ -1040,7 +1040,7 @@ void Dlg2Ui::matchDialogCommon( const TQDomElement& dialogCommon ) dataName = val; } else if ( tagName == TQString("WindowBaseClass") ) { if ( val == TQString("Custom") ) - isCustom = TRUE; + isCustom = true; else windowBaseClass = val; } else if ( tagName == TQString("IsModal") ) { @@ -1083,7 +1083,7 @@ void Dlg2Ui::matchBoxLayout( const TQDomElement& boxLayout ) int autoBorder = 5; TQString name; bool needsWidget = needsTQLayoutWidget( boxLayout ); - bool opened = FALSE; + bool opened = false; TQDomNode n = boxLayout.firstChild(); while ( !n.isNull() ) { @@ -1096,7 +1096,7 @@ void Dlg2Ui::matchBoxLayout( const TQDomElement& boxLayout ) if ( !directionStr.isEmpty() ) emitProperty( TQString("direction"), directionStr, TQString("enum") ); - opened = TRUE; + opened = true; } matchLayout( n.toElement() ); } else { @@ -1172,7 +1172,7 @@ void Dlg2Ui::matchGridLayout( const TQDomElement& gridLayout ) TQString name; TQString menu; bool needsWidget = needsTQLayoutWidget( gridLayout ); - bool opened = FALSE; + bool opened = false; TQDomNode n = gridLayout.firstChild(); while ( !n.isNull() ) { @@ -1184,7 +1184,7 @@ void Dlg2Ui::matchGridLayout( const TQDomElement& gridLayout ) autoBorder ); yyGridRow = -1; yyGridColumn = -1; - opened = TRUE; + opened = true; } matchLayout( n.toElement() ); } else { @@ -1307,7 +1307,7 @@ void Dlg2Ui::matchLayoutWidget( const TQDomElement& layoutWidget ) emitClosingLayout( needsWidget, TQString("grid") ); } else { emitOpeningWidget( widgetClassName(*w) ); - emitWidgetBody( *w, TRUE ); + emitWidgetBody( *w, true ); if ( !children.isNull() ) matchLayout( children ); emitClosing( TQString("widget") ); diff --git a/tools/designer/plugins/dlg/main.cpp b/tools/designer/plugins/dlg/main.cpp index 70fc9f340..b6a75d5b2 100644 --- a/tools/designer/plugins/dlg/main.cpp +++ b/tools/designer/plugins/dlg/main.cpp @@ -90,7 +90,7 @@ TQStringList DlgFilter::import( const TQString &, const TQString& filename ) bool DlgFilter::init() { - return TRUE; + return true; } void DlgFilter::cleanup() @@ -99,7 +99,7 @@ void DlgFilter::cleanup() bool DlgFilter::canUnload() const { - return TRUE; + return true; } TQ_EXPORT_COMPONENT() diff --git a/tools/designer/plugins/glade/glade2ui.cpp b/tools/designer/plugins/glade/glade2ui.cpp index b1bbe9ca7..442776e8d 100644 --- a/tools/designer/plugins/glade/glade2ui.cpp +++ b/tools/designer/plugins/glade/glade2ui.cpp @@ -270,7 +270,7 @@ Glade2Ui::Glade2Ui() TQString Glade2Ui::imageName( const TQString& fileName ) { return *yyImages.insert( fileName, TQString("image%1").arg(yyImages.count()), - FALSE ); + false ); } TQString Glade2Ui::opening( const TQString& tag, const AttributeMap& attr ) @@ -476,8 +476,8 @@ TQString Glade2Ui::gtk2qtClass( const TQString& gtkClass, if ( gtkClass == TQString("GtkScrolledWindow") ) { if ( childWidgets.count() == 1 ) { TQString g; - bool editable = FALSE; - bool showTitles = TRUE; + bool editable = false; + bool showTitles = true; TQDomNode n = childWidgets.first().firstChild(); while ( !n.isNull() ) { @@ -909,7 +909,7 @@ void Glade2Ui::emitGnomeAbout( TQString copyright, TQString authors, Emit the application name. */ emitOpeningWidget( TQString("TQLabel") ); - emitFontProperty( TQString("font"), 24, TRUE ); + emitFontProperty( TQString("font"), 24, true ); emitProperty( TQString("text"), prog ); emitProperty( TQString("alignment"), TQString("AlignAuto|AlignCenter"), TQString("set") ); @@ -919,7 +919,7 @@ void Glade2Ui::emitGnomeAbout( TQString copyright, TQString authors, Emit the copyright notice. */ emitOpeningWidget( TQString("TQLabel") ); - emitFontProperty( TQString("font"), 12, TRUE ); + emitFontProperty( TQString("font"), 12, true ); emitProperty( TQString("text"), copyright ); emitClosing( TQString("widget") ); @@ -930,14 +930,14 @@ void Glade2Ui::emitGnomeAbout( TQString copyright, TQString authors, emitOpening( TQString("hbox") ); emitOpeningWidget( TQString("TQLabel") ); - emitFontProperty( TQString("font"), 12, TRUE ); + emitFontProperty( TQString("font"), 12, true ); emitProperty( TQString("text"), TQString("Authors:") ); emitProperty( TQString("alignment"), TQString("AlignAuto|AlignTop"), TQString("set") ); emitClosing( TQString("widget") ); emitOpeningWidget( TQString("TQLabel") ); - emitFontProperty( TQString("font"), 12, FALSE ); + emitFontProperty( TQString("font"), 12, false ); emitProperty( TQString("text"), authors ); emitProperty( TQString("alignment"), TQString("AlignAuto|AlignTop"), TQString("set") ); @@ -952,7 +952,7 @@ void Glade2Ui::emitGnomeAbout( TQString copyright, TQString authors, Emit the comments. */ emitOpeningWidget( TQString("TQLabel") ); - emitFontProperty( TQString("font"), 10, FALSE ); + emitFontProperty( TQString("font"), 10, false ); emitProperty( TQString("text"), comments ); emitProperty( TQString("alignment"), TQString("AlignAuto|AlignTop"), TQString("set") ); @@ -1004,7 +1004,7 @@ void Glade2Ui::emitGnomeAppChildWidgetsPass1( } if ( childName == TQString("GnomeDock:contents") ) { - emitWidget( *c, FALSE ); + emitWidget( *c, false ); } else { emitGnomeAppChildWidgetsPass1( grandchildWidgets ); } @@ -1188,7 +1188,7 @@ void Glade2Ui::emitGtkNotebookChildWidgets( tabNames.remove( tabNames.begin() ); emitAttribute( TQString("title"), accelerate(tabLabels.first()) ); tabLabels.remove( tabLabels.begin() ); - emitWidget( *c, FALSE ); + emitWidget( *c, false ); emitClosing( TQString("widget") ); } ++c; @@ -1359,7 +1359,7 @@ void Glade2Ui::emitGtkWindowChildWidgets( const TQValueList<TQDomElement>& childWidgets, const TQString& qtClass ) { if ( childWidgets.count() == 1 && qtClass == TQString("TQWizard") ) { - emitFontProperty( TQString("titleFont"), 18, FALSE ); + emitFontProperty( TQString("titleFont"), 18, false ); TQDomNode n = childWidgets.first().firstChild(); while ( !n.isNull() ) { @@ -1368,7 +1368,7 @@ void Glade2Ui::emitGtkWindowChildWidgets( n = n.nextSibling(); } } else { - emitChildWidgets( childWidgets, FALSE ); + emitChildWidgets( childWidgets, false ); } } @@ -1388,7 +1388,7 @@ bool Glade2Ui::packEnd( const TQDomElement& widget ) } n = n.nextSibling(); } - return FALSE; + return false; } void Glade2Ui::emitChildWidgets( const TQValueList<TQDomElement>& childWidgets, @@ -1436,9 +1436,9 @@ void Glade2Ui::emitOpeningWidget( const TQString& qtClass, int leftAttach, } /* - Returns TRUE if the vbox containing childWidgets should have a + Returns true if the vbox containing childWidgets should have a spacer at the end to prevent it from looking bad, otherwise returns - FALSE. + false. The algorithm is very experimental. */ @@ -1466,10 +1466,10 @@ bool Glade2Ui::shouldPullup( const TQValueList<TQDomElement>& childWidgets ) if ( !gtkSmallWidget.exactMatch(gtkClass) || !shouldPullup(grandchildWidgets) ) - return FALSE; + return false; ++c; } - return TRUE; + return true; } TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted, @@ -1492,13 +1492,13 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted, int numRows = 0; int numColumns = 0; - bool active = FALSE; + bool active = false; TQString authors; TQString childName; TQString comments; TQString copyright; TQString creationFunction; - bool editable = TRUE; + bool editable = true; TQString filename; TQString focusTarget; TQString hscrollbarPolicy; @@ -1513,21 +1513,21 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted, int pageSize = 10; TQString selectionMode; TQString shadowType( "GTK_SHADOW_NONE" ); - bool showText = TRUE; - bool showTitles = TRUE; + bool showText = true; + bool showTitles = true; int step = 1; TQString tabPos; TQString text; int textMaxLength = 0; - bool textVisible = TRUE; + bool textVisible = true; TQString tooltip; TQString type; int upper = 123456789; int value = 123456789; - bool valueInList = TRUE; + bool valueInList = true; TQString vscrollbarPolicy; TQString watermarkImage; - bool wrap = FALSE; + bool wrap = false; bool topLevel = yyFormName.isEmpty(); if ( topLevel ) @@ -1758,7 +1758,7 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted, if ( gtkClass == TQString("GtkHButtonBox") || childName == TQString("Dialog:action_area") ) emitSpacer( orientation ); - emitChildWidgets( childWidgets, TRUE ); + emitChildWidgets( childWidgets, true ); if ( gtkClass == TQString("GtkVButtonBox") || childName == TQString("Dialog:action_area") || @@ -1773,7 +1773,7 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted, if ( layouted ) emitClosing( TQString("widget") ); } else if ( gtkClass == TQString("GtkFixed") && !layouted ) { - emitChildWidgets( childWidgets, FALSE ); + emitChildWidgets( childWidgets, false ); /* Placeholders in a grid are typically needless. */ @@ -1781,7 +1781,7 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted, bool needFakeLayout = ( !layouted && !topLevel && x == 0 && y == 0 && width == 0 && height == 0 ); TQString qtClass = gtk2qtClass( gtkClass, childWidgets ); - bool unknown = FALSE; + bool unknown = false; if ( qtClass == TQString("TQFrame") && !label.isEmpty() ) { qtClass = TQString( "TQButtonGroup" ); @@ -1793,7 +1793,7 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted, yyCustomWidgets.insert( qtClass, TQString::null ); } else if ( qtClass == TQString("Unknown") ) { qtClass = TQString( "TQLabel" ); - unknown = TRUE; + unknown = true; } if ( qtClass.isEmpty() ) { @@ -1940,7 +1940,7 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted, emitGnomeAppChildWidgetsPass1( childWidgets ); } else if ( gtkClass == TQString("GnomePropertyBox") ) { emitOpening( TQString("vbox") ); - emitChildWidgets( childWidgets, TRUE ); + emitChildWidgets( childWidgets, true ); emitOpeningWidget( TQString("TQLayoutWidget") ); emitOpening( TQString("hbox") ); emitPushButton( TQString("&Help"), TQString("helpButton") ); @@ -1975,7 +1975,7 @@ TQString Glade2Ui::emitWidget( const TQDomElement& widget, bool layouted, TQString("AlignAuto|AlignCenter"), TQString("set") ); } else if ( qtClass != TQString("TQListBox") ) { - emitChildWidgets( childWidgets, FALSE ); + emitChildWidgets( childWidgets, false ); } emitClosing( TQString("widget") ); @@ -2024,7 +2024,7 @@ TQStringList Glade2Ui::convertGladeFile( const TQString& fileName ) TQProgressDialog fremskritt( TQString("Converting Glade files..."), TQString("Abort Conversion"), numWidgets, 0, - "fremskritt", TRUE ); + "fremskritt", true ); n = root.firstChild(); while ( !n.isNull() ) { @@ -2058,7 +2058,7 @@ TQStringList Glade2Ui::convertGladeFile( const TQString& fileName ) uniqueToolBar = 1; emitHeader(); - TQString name = emitWidget( n.toElement(), FALSE ); + TQString name = emitWidget( n.toElement(), false ); if ( !yyCustomWidgets.isEmpty() ) { emitOpening( TQString("customwidgets") ); diff --git a/tools/designer/plugins/glade/main.cpp b/tools/designer/plugins/glade/main.cpp index 8cb0353f5..93af82bcc 100644 --- a/tools/designer/plugins/glade/main.cpp +++ b/tools/designer/plugins/glade/main.cpp @@ -91,7 +91,7 @@ TQStringList GladeFilter::import( const TQString &, const TQString& filename ) bool GladeFilter::init() { - return TRUE; + return true; } void GladeFilter::cleanup() @@ -100,7 +100,7 @@ void GladeFilter::cleanup() bool GladeFilter::canUnload() const { - return TRUE; + return true; } TQ_EXPORT_COMPONENT() diff --git a/tools/designer/plugins/kdevdlg/kdevdlg2ui.cpp b/tools/designer/plugins/kdevdlg/kdevdlg2ui.cpp index e92301924..0467d7ace 100644 --- a/tools/designer/plugins/kdevdlg/kdevdlg2ui.cpp +++ b/tools/designer/plugins/kdevdlg/kdevdlg2ui.cpp @@ -177,26 +177,26 @@ void KDEVDLG2UI::writeColor( const TQString& name, const TQString& value ) void KDEVDLG2UI::writeStyles( const TQStringList styles, bool isFrame ) { if ( isFrame ) { - bool defineFrame = FALSE; + bool defineFrame = false; TQString shadow = "NoFrame"; TQString shape = "StyledPanel"; int width = 2; if ( styles.contains( "WS_EX_STATICEDGE" ) ) { shadow = "Plain"; width = 1; - defineFrame = TRUE; + defineFrame = true; } if ( styles.contains( "WS_EX_CLIENTEDGE" ) ) { shadow = "Sunken"; - defineFrame = TRUE; + defineFrame = true; } if ( styles.contains( "WS_EX_DLGMODALFRAME" ) ) { shadow = "Raised"; - defineFrame = TRUE; + defineFrame = true; } if ( !styles.contains( "WS_BORDER" ) ) { shape = "NoFrame"; - defineFrame = TRUE; + defineFrame = true; } if ( defineFrame ) { @@ -207,11 +207,11 @@ void KDEVDLG2UI::writeStyles( const TQStringList styles, bool isFrame ) } if ( styles.contains("WS_DISABLED") ) - writeBool("enabled", FALSE ); + writeBool("enabled", false ); if ( styles.contains("WS_EX_ACCEPTFILES") ) - writeBool("acceptDrops", TRUE ); + writeBool("acceptDrops", true ); if ( styles.contains("WS_EX_TRANSPARENT") ) - writeBool("autoMask", TRUE ); + writeBool("autoMask", true ); if ( !styles.contains("WS_TABSTOP") ) writeEnum("focusPolicy", "NoFocus"); } @@ -223,7 +223,7 @@ void KDEVDLG2UI::writeStyles( const TQStringList styles, bool isFrame ) KDEVDLG2UI::KDEVDLG2UI( TQTextStream* input, const TQString& name ) { className = name; - writeToFile = TRUE; + writeToFile = true; in = input; indentation = 0; out = 0; @@ -263,7 +263,7 @@ bool KDEVDLG2UI::parse() delete out; out = 0; - return TRUE; + return true; } /*! @@ -271,7 +271,7 @@ bool KDEVDLG2UI::parse() */ bool KDEVDLG2UI::parse( TQStringList& get ) { - writeToFile = FALSE; + writeToFile = false; bool result = parse(); get = target; return result; @@ -322,7 +322,7 @@ bool KDEVDLG2UI::writeDialog( const TQString& name ) TQString family = font.section("\"", 1, 1 ); int pointSize = font.section("\"", 3, 3 ).toInt(); //int weight = font.section("\"", 5, 5 ).toInt(); - //bool italic = ( font.section("\"", 7, 7 ) == "TRUE" ); + //bool italic = ( font.section("\"", 7, 7 ) == "true" ); writeFont( family, pointSize ); // weight, italic ? } else if ( line.left( 9 ) == "IsEnabled" ) { bool isEnabled = @@ -519,6 +519,6 @@ bool KDEVDLG2UI::writeDialog( const TQString& name ) //} } *out << "</UI>" << endl; - return TRUE; + return true; } diff --git a/tools/designer/plugins/kdevdlg/main.cpp b/tools/designer/plugins/kdevdlg/main.cpp index a9ddde96a..07a7bed78 100644 --- a/tools/designer/plugins/kdevdlg/main.cpp +++ b/tools/designer/plugins/kdevdlg/main.cpp @@ -102,7 +102,7 @@ TQStringList KDevDlgFilter::import( const TQString &, const TQString& filename ) bool KDevDlgFilter::init() { - return TRUE; + return true; } void KDevDlgFilter::cleanup() @@ -111,7 +111,7 @@ void KDevDlgFilter::cleanup() bool KDevDlgFilter::canUnload() const { - return TRUE; + return true; } TQ_EXPORT_COMPONENT() diff --git a/tools/designer/plugins/rc/main.cpp b/tools/designer/plugins/rc/main.cpp index aebdb0aba..2a18aa70a 100644 --- a/tools/designer/plugins/rc/main.cpp +++ b/tools/designer/plugins/rc/main.cpp @@ -99,7 +99,7 @@ TQStringList RCFilter::import( const TQString &, const TQString& filename ) bool RCFilter::init() { - return TRUE; + return true; } void RCFilter::cleanup() @@ -108,7 +108,7 @@ void RCFilter::cleanup() bool RCFilter::canUnload() const { - return TRUE; + return true; } TQ_EXPORT_COMPONENT() diff --git a/tools/designer/plugins/rc/rc2ui.cpp b/tools/designer/plugins/rc/rc2ui.cpp index 3189dde0a..d507d7b16 100644 --- a/tools/designer/plugins/rc/rc2ui.cpp +++ b/tools/designer/plugins/rc/rc2ui.cpp @@ -160,26 +160,26 @@ void RC2UI::writeSet( const TQString& name, const TQString& value ) void RC2UI::writeStyles( const TQStringList styles, bool isFrame ) { if ( isFrame ) { - bool defineFrame = FALSE; + bool defineFrame = false; TQString shadow = "NoFrame"; TQString shape = "StyledPanel"; int width = 2; if ( styles.contains( "WS_EX_STATICEDGE" ) ) { shadow = "Plain"; width = 1; - defineFrame = TRUE; + defineFrame = true; } if ( styles.contains( "WS_EX_CLIENTEDGE" ) ) { shadow = "Sunken"; - defineFrame = TRUE; + defineFrame = true; } if ( styles.contains( "WS_EX_DLGMODALFRAME" ) ) { shadow = "Raised"; - defineFrame = TRUE; + defineFrame = true; } if ( !styles.contains( "WS_BORDER" ) ) { shape = "NoFrame"; - defineFrame = TRUE; + defineFrame = true; } if ( defineFrame ) { @@ -190,11 +190,11 @@ void RC2UI::writeStyles( const TQStringList styles, bool isFrame ) } if ( styles.contains("WS_DISABLED") ) - writeBool("enabled", FALSE ); + writeBool("enabled", false ); if ( styles.contains("WS_EX_ACCEPTFILES") ) - writeBool("acceptDrops", TRUE ); + writeBool("acceptDrops", true ); if ( styles.contains("WS_EX_TRANSPARENT") ) - writeBool("autoMask", TRUE ); + writeBool("autoMask", true ); if ( !styles.contains("WS_TABSTOP") ) writeEnum("focusPolicy", "NoFocus"); } @@ -207,7 +207,7 @@ RC2UI::RC2UI( TQTextStream* input ) : blockStart1( "/////////////////////////////////////////////////////////////////////////////" ), blockStart2( "//" ) { - writeToFile = TRUE; + writeToFile = true; in = input; indentation = 0; out = 0; @@ -231,11 +231,11 @@ bool RC2UI::parse() while ( line != blockStart1 && !in->eof() ) line = in->readLine(); if ( in->eof() ) - return FALSE; + return false; while ( line != blockStart2 && !in->eof() ) line = in->readLine(); if ( in->eof() ) - return FALSE; + return false; line = in->readLine(); @@ -244,37 +244,37 @@ bool RC2UI::parse() if ( in->readLine() == "//" && in->readLine().isEmpty() && !in->eof() ) { if ( type == "Dialog" ) { if ( !makeDialog() ) - return FALSE; + return false; } /* else if ( type == "Bitmap" ) { if ( !makeBitmap() ) - return FALSE; + return false; } else if ( type == "String Table" ) { if ( !makeStringTable() ) - return FALSE; + return false; } else if ( type == "Accelerator" ) { if ( !makeAccelerator() ) - return FALSE; + return false; } else if ( type == "Cursor" ) { if ( !makeCursor() ) - return FALSE; + return false; } else if ( type == "HTML" ) { if ( !makeHTML() ) - return FALSE; + return false; } else if ( type == "Icon" ) { if ( !makeIcon() ) - return FALSE; + return false; } else if ( type == "Version" ) { if ( !makeVersion() ) - return FALSE; + return false; } */ } } else - return FALSE; + return false; } - return TRUE; + return true; } /*! @@ -283,7 +283,7 @@ bool RC2UI::parse() bool RC2UI::parse( TQStringList& get ) { - writeToFile = FALSE; + writeToFile = false; bool result = parse(); get = target; return result; @@ -322,7 +322,7 @@ bool RC2UI::makeDialog() TQCString className; uint x, y, w, h; uint endDesc; - bool space = FALSE; + bool space = false; for ( endDesc = 0; endDesc < line.length() ; endDesc++ ) { char c = (TQChar)line.at(endDesc); if ( space && (c >= '0') && (c <= '9') ) @@ -338,7 +338,7 @@ bool RC2UI::makeDialog() count = sscanf( line, "%u, %u, %u, %u", &x, &y, &w, &h ); if ( !count && count == EOF ) - return FALSE; + return false; char property[256]; TQStringList styles; @@ -354,7 +354,7 @@ bool RC2UI::makeDialog() line = ""; do { if ( in->eof() ) - return TRUE; + return true; line += in->readLine(); } while ( line[(int)line.length()-1] == '|' || line[(int)line.length()-1] == ',' ); @@ -398,7 +398,7 @@ bool RC2UI::makeDialog() do { if ( in->eof() ) - return TRUE; + return true; line = in->readLine().stripWhiteSpace(); if ( line == "END" ) @@ -416,30 +416,30 @@ bool RC2UI::makeDialog() TQString controlType; TQString widgetID; TQString widgetText; - bool hasText = FALSE; - bool isControl = FALSE; - bool isFrame = FALSE; + bool hasText = false; + bool isControl = false; + bool isFrame = false; if ( widgetType == "PUSHBUTTON" ) { ID = IDPushButton; - hasText = TRUE; + hasText = true; } else if ( widgetType == "DEFPUSHBUTTON" ) { ID = IDPushButton; - hasText = TRUE; + hasText = true; } else if ( widgetType == "LTEXT" ) { ID = IDLabel; - hasText = TRUE; + hasText = true; } else if ( widgetType == "CTEXT" ) { ID = IDLabel; - hasText = TRUE; + hasText = true; } else if ( widgetType == "RTEXT" ) { ID = IDLabel; - hasText = TRUE; + hasText = true; } else if ( widgetType == "EDITTEXT" ) { ID = IDLineEdit; } else if ( widgetType == "GROUPBOX" ) { ID = IDGroupBox; - hasText = TRUE; + hasText = true; } else if ( widgetType == "COMBOBOX" ) { ID = IDComboBox; } else if ( widgetType == "LISTBOX" ) { @@ -448,12 +448,12 @@ bool RC2UI::makeDialog() ID = IDScrollBar; } else if ( widgetType == "CHECKBOX" ) { ID = IDCheckBox; - hasText = TRUE; + hasText = true; } else if ( widgetType == "RADIOBUTTON" ) { ID = IDRadioButton; - hasText = TRUE; + hasText = true; } else if ( widgetType == "CONTROL" ) { - isControl = TRUE; + isControl = true; widgetText = stripQM(parseNext( arguments )); widgetID = parseNext( arguments ); controlType = stripQM(parseNext( arguments )); @@ -526,12 +526,12 @@ bool RC2UI::makeDialog() writeRect( "geometry", x, y, w, h ); writeString( "text", widgetText ); if ( widgetType == "DEFPUSHBUTTON" ) - writeBool( "default", TRUE ); + writeBool( "default", true ); } break; case IDLabel: { - isFrame = TRUE, + isFrame = true, writeClass("TQLabel"); writeCString( "name", useName("Label_"+widgetID) ); writeRect( "geometry", x,y,w,h ); @@ -558,7 +558,7 @@ bool RC2UI::makeDialog() writeRect("geometry", x,y,w,h); writeString("text", widgetText ); if ( styles.contains( "BS_3STATE" ) ) - writeBool( "tristate", TRUE ); + writeBool( "tristate", true ); } break; case IDRadioButton: @@ -571,7 +571,7 @@ bool RC2UI::makeDialog() break; case IDGroupBox: { - isFrame = TRUE; + isFrame = true; writeClass("TQGroupBox"); writeCString( "name", useName("GroupBox_"+widgetID) ); writeRect( "geometry", x,y,w,h ); @@ -609,31 +609,31 @@ bool RC2UI::makeDialog() break; case IDIconView: { - isFrame = TRUE; + isFrame = true; writeClass("TQIconView"); writeCString("name", useName("IconView_"+widgetID) ); writeRect("geometry", x,y,w,h ); if ( !styles.contains( "LVS_SINGLESEL" ) ) writeEnum( "selectionMode", "Extended" ); if ( styles.contains( "LVS_NOLABELWRAP" ) ) - writeBool("wordWrapIconText", FALSE ); + writeBool("wordWrapIconText", false ); } break; case IDListView: { - isFrame = TRUE; + isFrame = true; writeClass("TQListView"); writeCString("name", useName("ListView_"+widgetID) ); writeRect("geometry", x,y,w,h ); if ( styles.contains( "TVS_LINESATROOT" ) ) - writeBool( "rootIsDecorated", TRUE ); + writeBool( "rootIsDecorated", true ); if ( styles.contains( "TVS_FULLROWSELECT" ) ) - writeBool( "allColumnsShowFocus", TRUE ); + writeBool( "allColumnsShowFocus", true ); } break; case IDProgressBar: { - isFrame = TRUE; + isFrame = true; writeClass("TQProgressBar"); writeCString("name", useName("ProgressBar_"+widgetID) ); writeRect("geometry", x,y,w,h ); @@ -659,7 +659,7 @@ bool RC2UI::makeDialog() break; case IDSpinBox: { - isFrame = TRUE; + isFrame = true; writeClass("TQSpinBox"); writeCString("name", useName("SpinBox_"+widgetID) ); writeRect("geometry", x,y,w,h); @@ -690,7 +690,7 @@ bool RC2UI::makeDialog() break; case IDListBox: { - isFrame = TRUE; + isFrame = true; writeClass("TQListBox"); writeCString("name", useName("ListBox_"+widgetID) ); writeRect( "geometry", x,y,w,h ); @@ -769,7 +769,7 @@ bool RC2UI::makeDialog() } while ( line != blockStart1 ); - return TRUE; + return true; } /*! Not yet implemented @@ -777,7 +777,7 @@ bool RC2UI::makeDialog() bool RC2UI::makeBitmap() { - return TRUE; + return true; } /*! Not yet implemented @@ -785,7 +785,7 @@ bool RC2UI::makeBitmap() bool RC2UI::makeAccelerator() { - return TRUE; + return true; } /*! Not yet implemented @@ -793,7 +793,7 @@ bool RC2UI::makeAccelerator() bool RC2UI::makeCursor() { - return TRUE; + return true; } /*! Not yet implemented @@ -801,7 +801,7 @@ bool RC2UI::makeCursor() bool RC2UI::makeHTML() { - return TRUE; + return true; } /*! Not yet implemented @@ -809,7 +809,7 @@ bool RC2UI::makeHTML() bool RC2UI::makeIcon() { - return TRUE; + return true; } /*! @@ -820,7 +820,7 @@ bool RC2UI::makeIcon() bool RC2UI::makeStringTable() { if ( !writeToFile ) - return TRUE; + return true; TQFile fileOut; line = in->readLine(); @@ -829,7 +829,7 @@ bool RC2UI::makeStringTable() char discard[12]; sscanf( line, "%s %s", stringtable, discard ); if ( TQString(stringtable) != "STRINGTABLE" ) - return TRUE; + return true; do { line = in->readLine(); } while ( line != "BEGIN" ); @@ -876,7 +876,7 @@ bool RC2UI::makeStringTable() } } while ( line != blockStart1 ); - return TRUE; + return true; } /*! Not yet implemented @@ -884,5 +884,5 @@ bool RC2UI::makeStringTable() bool RC2UI::makeVersion() { - return TRUE; + return true; } diff --git a/tools/designer/plugins/wizards/main.cpp b/tools/designer/plugins/wizards/main.cpp index 7a84ef115..b2d33dee5 100644 --- a/tools/designer/plugins/wizards/main.cpp +++ b/tools/designer/plugins/wizards/main.cpp @@ -63,7 +63,7 @@ private: }; StandardTemplateWizardInterface::StandardTemplateWizardInterface() - : inUse( FALSE ) + : inUse( false ) { } @@ -73,7 +73,7 @@ StandardTemplateWizardInterface::~StandardTemplateWizardInterface() bool StandardTemplateWizardInterface::init() { - return TRUE; + return true; } void StandardTemplateWizardInterface::cleanup() @@ -99,23 +99,23 @@ TQStringList StandardTemplateWizardInterface::featureList() const void StandardTemplateWizardInterface::setup( const TQString &templ, TQWidget *widget, DesignerFormWindow *fw, TQUnknownInterface *aIface ) { - inUse = TRUE; + inUse = true; #ifndef TQT_NO_SQL if ( templ == "TQDesignerDataView" || templ == "TQDesignerDataBrowser" || templ == "TQDataView" || templ == "TQDataBrowser" || templ == "TQDataTable" ) { - SqlFormWizard wizard( aIface, widget, tqApp->mainWidget(), fw, 0, TRUE ); + SqlFormWizard wizard( aIface, widget, tqApp->mainWidget(), fw, 0, true ); wizard.exec(); } #endif if ( templ == "TQMainWindow" ) { - MainWindowWizardBase wizard( tqApp->mainWidget(), 0, TRUE ); + MainWindowWizardBase wizard( tqApp->mainWidget(), 0, true ); wizard.setAppInterface( aIface, fw, widget ); wizard.exec(); } - inUse = FALSE; + inUse = false; } TQRESULT StandardTemplateWizardInterface::queryInterface( const TQUuid& uuid, TQUnknownInterface** iface ) diff --git a/tools/designer/plugins/wizards/mainwindowwizard.ui.h b/tools/designer/plugins/wizards/mainwindowwizard.ui.h index cc5b1c157..99adbe0c7 100644 --- a/tools/designer/plugins/wizards/mainwindowwizard.ui.h +++ b/tools/designer/plugins/wizards/mainwindowwizard.ui.h @@ -37,10 +37,10 @@ void MainWindowWizardBase::init() dIface = 0; dfw = 0; widget = 0; - setHelpEnabled( menuToolbarPage, FALSE ); - setHelpEnabled( toolbarsPage, FALSE ); - setHelpEnabled( finishPage, FALSE ); - setFinishEnabled( finishPage, TRUE ); + setHelpEnabled( menuToolbarPage, false ); + setHelpEnabled( toolbarsPage, false ); + setHelpEnabled( finishPage, false ); + setFinishEnabled( finishPage, true ); } void MainWindowWizardBase::destroy() @@ -114,7 +114,7 @@ void MainWindowWizardBase::accept() return; } - setFinishEnabled( finishPage, FALSE ); + setFinishEnabled( finishPage, false ); TQPixmap pix; @@ -297,7 +297,7 @@ void MainWindowWizardBase::getPixmap( const TQString & n, TQPixmap & pix ) DesignerProject *pro = dIface->currentProject(); if ( !pro || pro->projectName() == "<No Project>" ) return; - pro->pixmapCollection()->addPixmap( pix, n, FALSE ); + pro->pixmapCollection()->addPixmap( pix, n, false ); } void MainWindowWizardBase::pageSelected( const TQString & ) diff --git a/tools/designer/plugins/wizards/sqlformwizardimpl.cpp b/tools/designer/plugins/wizards/sqlformwizardimpl.cpp index adb283a79..9ac91ee04 100644 --- a/tools/designer/plugins/wizards/sqlformwizardimpl.cpp +++ b/tools/designer/plugins/wizards/sqlformwizardimpl.cpp @@ -66,25 +66,25 @@ SqlFormWizard::SqlFormWizard( TQUnknownInterface *aIface, TQWidget *w, { appIface->addRef(); formWindow = fw; - setFinishEnabled( finishPage, TRUE ); + setFinishEnabled( finishPage, true ); /* set mode of operation */ if ( ::tqt_cast<TQDataTable*>(widget) ) { setCaption( "Data Table Wizard" ); mode = Table; - setAppropriate( navigPage, FALSE ); - setAppropriate( layoutPage, FALSE ); - checkBoxAutoEdit->setChecked( FALSE ); + setAppropriate( navigPage, false ); + setAppropriate( layoutPage, false ); + checkBoxAutoEdit->setChecked( false ); } else if ( ::tqt_cast<TQDataBrowser*>(widget) ) { setCaption( "Data Browser Wizard" ); - setAppropriate( tablePropertiesPage, FALSE ); + setAppropriate( tablePropertiesPage, false ); mode = Browser; - checkBoxAutoEdit->setChecked( TRUE ); + checkBoxAutoEdit->setChecked( true ); } else if ( ::tqt_cast<TQDataView*>(widget) ) { setCaption( "Data View Wizard" ); - setAppropriate( tablePropertiesPage, FALSE ); - setAppropriate( navigPage, FALSE ); - setAppropriate( sqlPage, FALSE); + setAppropriate( tablePropertiesPage, false ); + setAppropriate( navigPage, false ); + setAppropriate( sqlPage, false); checkCreateFieldLayout->hide(); checkCreateButtonLayout->hide(); checkBoxAutoEdit->hide(); @@ -104,7 +104,7 @@ SqlFormWizard::~SqlFormWizard() void SqlFormWizard::nextPageClicked() { if ( currentPage() == populatePage ) { - autoPopulate( TRUE ); + autoPopulate( true ); } } @@ -129,9 +129,9 @@ void SqlFormWizard::connectionSelected( const TQString &c ) void SqlFormWizard::tableSelected( const TQString & ) { if ( listBoxTable->currentItem() >= 0 ) { - setNextEnabled( databasePage, TRUE ); + setNextEnabled( databasePage, true ); } else { - setNextEnabled( databasePage, FALSE ); + setNextEnabled( databasePage, false ); } } @@ -153,9 +153,9 @@ void SqlFormWizard::autoPopulate( bool populate ) TQStringList lst = *d->fields().find( listBoxTable->currentText() ); // remove primary index fields, if any listBoxSortField->insertStringList( lst ); - d->open( FALSE ); + d->open( false ); #ifndef TQT_NO_SQL - TQSqlCursor tab( listBoxTable->currentText(), TRUE, d->connection() ); + TQSqlCursor tab( listBoxTable->currentText(), true, d->connection() ); TQSqlIndex pIdx = tab.primaryIndex(); for ( uint i = 0; i < pIdx.count(); i++ ) { listBoxField->insertItem( pIdx.field( i )->name() ); @@ -304,7 +304,7 @@ void SqlFormWizard::setupPage1() if ( lst.count() ) listBoxConnection->setCurrentItem( 0 ); - setNextEnabled( databasePage, FALSE ); + setNextEnabled( databasePage, false ); } static TQPushButton *create_widget( TQWidget *parent, const char *name, @@ -313,8 +313,8 @@ static TQPushButton *create_widget( TQWidget *parent, const char *name, TQPushButton *pb = (TQPushButton*)fw->create( "TQPushButton", parent, name ); pb->setText( txt ); pb->setGeometry( r ); - fw->setPropertyChanged( pb, "text", TRUE ); - fw->setPropertyChanged( pb, "geometry", TRUE ); + fw->setPropertyChanged( pb, "text", true ); + fw->setPropertyChanged( pb, "geometry", true ); return pb; } @@ -337,12 +337,12 @@ void SqlFormWizard::accept() if ( !conn.isEmpty() && !table.isEmpty() ) { formWindow->setProperty( widget, "database", lst ); - formWindow->setPropertyChanged( widget, "database", TRUE ); + formWindow->setPropertyChanged( widget, "database", true ); } if ( !editFilter->text().isEmpty() ) { widget->setProperty( "filter", editFilter->text() ); - formWindow->setPropertyChanged( widget, "filter", TRUE ); + formWindow->setPropertyChanged( widget, "filter", true ); } if ( listBoxSortedField->count() ) { @@ -350,7 +350,7 @@ void SqlFormWizard::accept() for ( uint i = 0; i < listBoxSortedField->count(); ++i ) lst << listBoxSortedField->text( i ); widget->setProperty( "sort", lst ); - formWindow->setPropertyChanged( widget, "sort", TRUE ); + formWindow->setPropertyChanged( widget, "sort", true ); } TQPtrList<DesignerDatabase> databases = proIface->databaseConnections(); @@ -358,7 +358,7 @@ void SqlFormWizard::accept() for ( DesignerDatabase *d = databases.first(); d; d = databases.next() ) { if ( d->name() == listBoxConnection->currentText() || ( ( d->name() == "(default)" || d->name().isEmpty() ) && listBoxConnection->currentText() == "(default)" ) ) { database = d; - d->open( FALSE ); + d->open( false ); break; } } @@ -366,7 +366,7 @@ void SqlFormWizard::accept() if (!database) { return; } - TQSqlCursor tab( listBoxTable->currentText(), TRUE, database->connection() ); + TQSqlCursor tab( listBoxTable->currentText(), true, database->connection() ); int columns = 2; TQSqlEditorFactory * f = TQSqlEditorFactory::defaultFactory(); @@ -392,8 +392,8 @@ void SqlFormWizard::accept() case Browser: { if ( mode == Browser && !checkBoxAutoEdit->isChecked() ) { - ((TQDataBrowser*)widget)->setAutoEdit( FALSE ); - formWindow->setPropertyChanged( widget, "autoEdit", TRUE ); + ((TQDataBrowser*)widget)->setAutoEdit( false ); + formWindow->setPropertyChanged( widget, "autoEdit", true ); } formWindow->clearSelection(); @@ -423,8 +423,8 @@ void SqlFormWizard::accept() label->setGeometry( SPACING + currentCol*COL_SPACING, row+SPACING, SPACING*3, SPACING ); - formWindow->setPropertyChanged( label, "geometry", TRUE ); - formWindow->setPropertyChanged( label, "text", TRUE ); + formWindow->setPropertyChanged( label, "geometry", true ); + formWindow->setPropertyChanged( label, "text", true ); /* editor */ editorDummy = f->createEditor( widget, field ); @@ -440,7 +440,7 @@ void SqlFormWizard::accept() editor->setGeometry(SPACING * 5 + currentCol*COL_SPACING, row+SPACING, SPACING*3, SPACING ); } - formWindow->setPropertyChanged( editor, "geometry", TRUE ); + formWindow->setPropertyChanged( editor, "geometry", true ); if ( TQString(editor->className()) == "TQLineEdit" && (field->type() == TQVariant::Double || field->type() == TQVariant::Int || @@ -448,16 +448,16 @@ void SqlFormWizard::accept() /* default right-align numerics */ //## ((TQLineEdit*)editor)->setAlignment( TQt::AlignRight ); - formWindow->setPropertyChanged( editor, "alignment", TRUE ); + formWindow->setPropertyChanged( editor, "alignment", true ); } if ( ::tqt_cast<TQSpinBox*>(editor) ) { ( (TQSpinBox*)editor )->setMaxValue( INT_MAX ); - formWindow->setPropertyChanged( editor, "maxValue", TRUE ); + formWindow->setPropertyChanged( editor, "maxValue", true ); } TQStringList lst; lst << conn << table << field->name(); formWindow->setProperty( editor, "database", lst ); - formWindow->setPropertyChanged( editor, "database", TRUE ); + formWindow->setPropertyChanged( editor, "database", true ); /* geometry */ if ( createFieldLayout ) { @@ -567,34 +567,34 @@ void SqlFormWizard::accept() { TQDataTable* sqlTable = ((TQDataTable*)widget); if ( checkBoxAutoEdit->isChecked() ) { - sqlTable->setAutoEdit( TRUE ); - formWindow->setPropertyChanged( sqlTable, "autoEdit", TRUE ); + sqlTable->setAutoEdit( true ); + formWindow->setPropertyChanged( sqlTable, "autoEdit", true ); } if ( checkBoxReadOnly->isChecked() ) { - sqlTable->setReadOnly( TRUE ); - formWindow->setPropertyChanged( sqlTable, "readOnly", TRUE ); + sqlTable->setReadOnly( true ); + formWindow->setPropertyChanged( sqlTable, "readOnly", true ); } else { if ( checkBoxConfirmInserts->isChecked() ) { - sqlTable->setConfirmInsert( TRUE ); - formWindow->setPropertyChanged( sqlTable, "confirmInsert", TRUE ); + sqlTable->setConfirmInsert( true ); + formWindow->setPropertyChanged( sqlTable, "confirmInsert", true ); } if ( checkBoxConfirmUpdates->isChecked() ) { - sqlTable->setConfirmUpdate( TRUE ); - formWindow->setPropertyChanged( sqlTable, "confirmUpdate", TRUE ); + sqlTable->setConfirmUpdate( true ); + formWindow->setPropertyChanged( sqlTable, "confirmUpdate", true ); } if ( checkBoxConfirmDeletes->isChecked() ) { - sqlTable->setConfirmDelete( TRUE ); - formWindow->setPropertyChanged( sqlTable, "confirmDelete", TRUE ); + sqlTable->setConfirmDelete( true ); + formWindow->setPropertyChanged( sqlTable, "confirmDelete", true ); } if ( checkBoxConfirmCancels->isChecked() ) { - sqlTable->setConfirmCancels( TRUE ); - formWindow->setPropertyChanged( sqlTable, "confirmCancels", TRUE ); + sqlTable->setConfirmCancels( true ); + formWindow->setPropertyChanged( sqlTable, "confirmCancels", true ); } } if ( checkBoxSorting->isChecked() ) { - sqlTable->setSorting( TRUE ); - formWindow->setPropertyChanged( sqlTable, "sorting", TRUE ); + sqlTable->setSorting( true ); + formWindow->setPropertyChanged( sqlTable, "sorting", true ); } TQMap<TQString, TQString> columnFields; diff --git a/tools/designer/plugins/wizards/sqlformwizardimpl.h b/tools/designer/plugins/wizards/sqlformwizardimpl.h index 1bce4780e..bfc1bd96b 100644 --- a/tools/designer/plugins/wizards/sqlformwizardimpl.h +++ b/tools/designer/plugins/wizards/sqlformwizardimpl.h @@ -45,7 +45,7 @@ class SqlFormWizard : public SqlFormWizardBase public: SqlFormWizard( TQUnknownInterface *aIface, TQWidget *w, TQWidget* parent = 0, DesignerFormWindow *fw = 0, - const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + const char* name = 0, bool modal = false, WFlags fl = 0 ); ~SqlFormWizard(); void accept() const; diff --git a/tools/designer/shared/domtool.cpp b/tools/designer/shared/domtool.cpp index 499ee562f..89c346e87 100644 --- a/tools/designer/shared/domtool.cpp +++ b/tools/designer/shared/domtool.cpp @@ -93,10 +93,10 @@ bool DomTool::hasProperty( const TQDomElement& e, const TQString& name ) if ( n.tagName() == "property" ) { if ( n.attribute( "name" ) != name ) continue; - return TRUE; + return true; } } - return FALSE; + return false; } TQStringList DomTool::propertiesOfType( const TQDomElement& e, const TQString& type ) @@ -193,7 +193,7 @@ TQVariant DomTool::elementToVariant( const TQDomElement& e, const TQVariant& def } else if ( e.tagName() == "cstring" ) { v = TQVariant( TQCString( e.firstChild().toText().data() ) ); } else if ( e.tagName() == "number" ) { - bool ok = TRUE; + bool ok = true; v = TQVariant( e.firstChild().toText().data().toInt( &ok ) ); if ( !ok ) v = TQVariant( e.firstChild().toText().data().toDouble() ); @@ -347,10 +347,10 @@ bool DomTool::hasAttribute( const TQDomElement& e, const TQString& name ) if ( n.tagName() == "attribute" ) { if ( n.attribute( "name" ) != name ) continue; - return TRUE; + return true; } } - return FALSE; + return false; } static bool toBool( const TQString& s ) diff --git a/tools/designer/shared/ui2uib.cpp b/tools/designer/shared/ui2uib.cpp index fa3085e50..f75572229 100644 --- a/tools/designer/shared/ui2uib.cpp +++ b/tools/designer/shared/ui2uib.cpp @@ -183,7 +183,7 @@ private: void UibIndexMap::setName( int no, const TQString& name ) { if ( !name.isEmpty() ) { - if ( *nameMap.insert(name, no, FALSE) != no ) + if ( *nameMap.insert(name, no, false) != no ) conflicts.insert( name, 0 ); } } diff --git a/tools/designer/shared/widgetdatabase.cpp b/tools/designer/shared/widgetdatabase.cpp index baa3c1be5..0c8e53771 100644 --- a/tools/designer/shared/widgetdatabase.cpp +++ b/tools/designer/shared/widgetdatabase.cpp @@ -55,21 +55,21 @@ static int dbcount = 0; static int dbcustomcount = 200; static TQStrList *wGroups; static TQStrList *invisibleGroups; -static bool whatsThisLoaded = FALSE; +static bool whatsThisLoaded = false; static TQPluginManager<WidgetInterface> *widgetPluginManager = 0; -static bool plugins_set_up = FALSE; -static bool was_in_setup = FALSE; +static bool plugins_set_up = false; +static bool was_in_setup = false; TQCleanupHandler<TQPluginManager<WidgetInterface> > cleanup_manager; WidgetDatabaseRecord::WidgetDatabaseRecord() { - isForm = FALSE; - isContainer = FALSE; + isForm = false; + isContainer = false; icon = 0; nameCounter = 0; - isCommon = FALSE; - isPlugin = FALSE; + isCommon = false; + isPlugin = false; } WidgetDatabaseRecord::~WidgetDatabaseRecord() @@ -108,7 +108,7 @@ WidgetDatabase::WidgetDatabase() void WidgetDatabase::setupDataBase( int id ) { - was_in_setup = TRUE; + was_in_setup = true; #ifndef UIC Q_UNUSED( id ) if ( dbcount ) @@ -129,7 +129,7 @@ void WidgetDatabase::setupDataBase( int id ) invisibleGroups->append( "Forms" ); invisibleGroups->append( "Temp" ); className2Id = new TQDict<int>( dbdictsize ); - className2Id->setAutoDelete( TRUE ); + className2Id->setAutoDelete( true ); WidgetDatabaseRecord *r = 0; @@ -138,7 +138,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQPushButton"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Push Button"; - r->isCommon = TRUE; + r->isCommon = true; append( r ); @@ -155,7 +155,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQRadioButton"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Radio Button"; - r->isCommon = TRUE; + r->isCommon = true; append( r ); @@ -164,7 +164,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQCheckBox"; r->group = widgetGroup( "Buttons" ); r->toolTip = "Check Box"; - r->isCommon = TRUE; + r->isCommon = true; append( r ); @@ -173,7 +173,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQGroupBox"; r->group = widgetGroup( "Containers" ); r->toolTip = "Group Box"; - r->isContainer = TRUE; + r->isContainer = true; append( r ); @@ -182,8 +182,8 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQButtonGroup"; r->group = widgetGroup( "Containers" ); r->toolTip = "Button Group"; - r->isContainer = TRUE; - r->isCommon = TRUE; + r->isContainer = true; + r->isCommon = true; append( r ); @@ -192,7 +192,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQFrame"; r->group = widgetGroup( "Containers" ); r->toolTip = "Frame"; - r->isContainer = TRUE; + r->isContainer = true; append( r ); @@ -201,7 +201,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQTabWidget"; r->group = widgetGroup( "Containers" ); r->toolTip = "Tabwidget"; - r->isContainer = TRUE; + r->isContainer = true; append( r ); @@ -210,7 +210,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQWidgetStack"; r->group = widgetGroup( "Containers" ); r->toolTip = "Widget Stack"; - r->isContainer = TRUE; + r->isContainer = true; append( r ); @@ -219,7 +219,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQToolBox"; r->group = widgetGroup( "Containers" ); r->toolTip = "Tool Box"; - r->isContainer = TRUE; + r->isContainer = true; append( r ); @@ -228,7 +228,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQListBox"; r->group = widgetGroup( "Views" ); r->toolTip = "List Box"; - r->isCommon = TRUE; + r->isCommon = true; append( r ); @@ -276,7 +276,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQLineEdit"; r->group = widgetGroup( "Input" ); r->toolTip = "Line Edit"; - r->isCommon = TRUE; + r->isCommon = true; append( r ); @@ -285,7 +285,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQSpinBox"; r->group = widgetGroup( "Input" ); r->toolTip = "Spin Box"; - r->isCommon = TRUE; + r->isCommon = true; append( r ); @@ -329,7 +329,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQTextEdit"; r->group = widgetGroup( "Input" ); r->toolTip = "Rich Text Edit"; - r->isCommon = TRUE; + r->isCommon = true; append( r ); @@ -338,7 +338,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQComboBox"; r->group = widgetGroup( "Input" ); r->toolTip = "Combo Box"; - r->isCommon = TRUE; + r->isCommon = true; append( r ); @@ -380,7 +380,7 @@ void WidgetDatabase::setupDataBase( int id ) r->group = widgetGroup( "Display" ); r->toolTip = "Text Label"; r->whatsThis = "The Text Label provides a widget to display static text."; - r->isCommon = TRUE; + r->isCommon = true; append( r ); @@ -446,7 +446,7 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->name = "TQWidget"; - r->isForm = TRUE; + r->isForm = true; r->group = widgetGroup( "Forms" ); append( r ); @@ -454,21 +454,21 @@ void WidgetDatabase::setupDataBase( int id ) r = new WidgetDatabaseRecord; r->name = "TQDialog"; r->group = widgetGroup( "Forms" ); - r->isForm = TRUE; + r->isForm = true; append( r ); r = new WidgetDatabaseRecord; r->name = "TQWizard"; r->group = widgetGroup( "Forms" ); - r->isContainer = TRUE; + r->isContainer = true; append( r ); r = new WidgetDatabaseRecord; r->name = "TQDesignerWizard"; r->group = widgetGroup( "Forms" ); - r->isContainer = TRUE; + r->isContainer = true; append( r ); @@ -476,7 +476,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQLayoutWidget"; r->group = widgetGroup( "Temp" ); r->includeFile = ""; - r->isContainer = TRUE; + r->isContainer = true; append( r ); @@ -484,7 +484,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQSplitter"; r->group = widgetGroup( "Temp" ); r->includeFile = "ntqsplitter.h"; - r->isContainer = TRUE; + r->isContainer = true; append( r ); @@ -492,7 +492,7 @@ void WidgetDatabase::setupDataBase( int id ) r->iconSet = "designer_tabwidget.png"; r->name = "TQDesignerTabWidget"; r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; + r->isContainer = true; append( r ); @@ -500,7 +500,7 @@ void WidgetDatabase::setupDataBase( int id ) r->iconSet = "designer_tabwidget.png"; r->name = "TQDesignerWidget"; r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; + r->isContainer = true; append( r ); @@ -508,7 +508,7 @@ void WidgetDatabase::setupDataBase( int id ) r->iconSet = "designer_tabwidget.png"; r->name = "TQDesignerDialog"; r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; + r->isContainer = true; append( r ); @@ -517,7 +517,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQMainWindow"; r->includeFile = "ntqmainwindow.h"; r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; + r->isContainer = true; append( r ); @@ -526,7 +526,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQDesignerAction"; r->includeFile = "ntqaction.h"; r->group = widgetGroup( "Temp" ); - r->isContainer = FALSE; + r->isContainer = false; append( r ); @@ -535,7 +535,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQDesignerActionGroup"; r->includeFile = "ntqaction.h"; r->group = widgetGroup( "Temp" ); - r->isContainer = FALSE; + r->isContainer = false; append( r ); @@ -544,7 +544,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "TQScrollView"; r->includeFile = "ntqscrollview.h"; r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; + r->isContainer = true; append( r ); @@ -556,7 +556,7 @@ void WidgetDatabase::setupDataBase( int id ) r->group = widgetGroup( "Database" ); r->toolTip = "Data Browser"; r->iconSet = "designer_databrowser.png"; - r->isContainer = TRUE; + r->isContainer = true; append( r ); @@ -567,7 +567,7 @@ void WidgetDatabase::setupDataBase( int id ) r->group = widgetGroup( "Database" ); r->toolTip = "Data View"; r->iconSet = "designer_dataview.png"; - r->isContainer = TRUE; + r->isContainer = true; append( r ); #endif @@ -581,7 +581,7 @@ void WidgetDatabase::setupPlugins() { if ( plugins_set_up ) return; - plugins_set_up = TRUE; + plugins_set_up = true; TQStringList widgets = widgetManager()->featureList(); for ( TQStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) { if ( hasWidget( *it ) ) @@ -606,7 +606,7 @@ void WidgetDatabase::setupPlugins() r->includeFile = iface->includeFile( *it ); r->isContainer = iface->isContainer( *it ); r->name = *it; - r->isPlugin = TRUE; + r->isPlugin = true; append( r ); iface->release(); } @@ -735,7 +735,7 @@ bool WidgetDatabase::isForm( int id ) setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return FALSE; + return false; return r->isForm; } @@ -747,7 +747,7 @@ bool WidgetDatabase::isContainer( int id ) setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return FALSE; + return false; return r->isContainer || r->isForm; } @@ -756,7 +756,7 @@ bool WidgetDatabase::isCommon( int id ) setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return FALSE; + return false; return r->isCommon; } @@ -848,9 +848,9 @@ bool WidgetDatabase::isGroupEmpty( const TQString &grp ) if ( !( r = db[ i ] ) ) continue; if ( r->group == grp ) - return FALSE; + return false; } - return TRUE; + return true; } TQString WidgetDatabase::widgetGroup( int i ) @@ -894,8 +894,8 @@ void WidgetDatabase::customWidgetClassNameChanged( const TQString &oldName, bool WidgetDatabase::isCustomWidget( int id ) { if ( id >= dbcustom && id < dbcustomcount ) - return TRUE; - return FALSE; + return true; + return false; } bool WidgetDatabase::isCustomPluginWidget( int id ) @@ -903,7 +903,7 @@ bool WidgetDatabase::isCustomPluginWidget( int id ) setupDataBase( id ); WidgetDatabaseRecord *r = at( id ); if ( !r ) - return FALSE; + return false; return r->isPlugin; } @@ -927,13 +927,13 @@ void WidgetDatabase::loadWhatsThis( const TQString &docPath ) if ( r ) r->whatsThis = l[ 0 ]; } - whatsThisLoaded = TRUE; + whatsThisLoaded = true; } // ### TQt 3.1: make these publically accessible via TQWidgetDatabase API #if defined(UIC) -bool dbnounload = FALSE; +bool dbnounload = false; TQStringList *dbpaths = 0; #else extern TQString *qwf_plugin_dir; @@ -952,7 +952,7 @@ TQPluginManager<WidgetInterface> *widgetManager() cleanup_manager.add( &widgetPluginManager ); #if defined(UIC) if ( dbnounload ) - widgetPluginManager->setAutoUnload( FALSE ); + widgetPluginManager->setAutoUnload( false ); if ( dbpaths ) { TQStringList::ConstIterator it = dbpaths->begin(); for ( ; it != dbpaths->end(); ++it ) diff --git a/tools/designer/tools/tqtconv2ui/main.cpp b/tools/designer/tools/tqtconv2ui/main.cpp index 208be173b..6e0eb5eb6 100644 --- a/tools/designer/tools/tqtconv2ui/main.cpp +++ b/tools/designer/tools/tqtconv2ui/main.cpp @@ -77,12 +77,12 @@ bool Conv2ui::convert( const TQString & filename, const TQDir & dest ) { if ( !importFiltersManager ) { tqWarning( "Conv2ui: no TQPluginManager was found" ); - return FALSE; + return false; } if ( !TQFile::exists( absName( filename ) ) ) { tqWarning( "Conv2ui: can not find file %s", filename.latin1() ); - return FALSE; + return false; } TQString tag = getTag( filename ); @@ -95,7 +95,7 @@ bool Conv2ui::convert( const TQString & filename, const TQDir & dest ) if ( !interface ) continue; - if ( (*it).contains( tag, FALSE ) ) { + if ( (*it).contains( tag, false ) ) { // Make sure we output the files in the destination dir TQString absfile = absName( filename ); TQString current = TQDir::currentDirPath(); @@ -108,7 +108,7 @@ bool Conv2ui::convert( const TQString & filename, const TQDir & dest ) } - return TRUE; + return true; } TQStringList Conv2ui::featureList() @@ -156,10 +156,10 @@ int main( int argc, char ** argv ) { Conv2ui conv; - bool help = TRUE; - bool silent = FALSE; - bool version = FALSE; - bool unrecognized = FALSE; + bool help = true; + bool silent = false; + bool version = false; + bool unrecognized = false; // parse options int argi = 1; @@ -168,17 +168,17 @@ int main( int argc, char ** argv ) while ( argv[argi][i] != '\0' ) { if ( argv[argi][i] == 's' ) { - silent = TRUE; + silent = true; break; } else if ( argv[argi][i] == 'h' ) { - help = TRUE; + help = true; break; } else if ( argv[argi][i] == 'v' ) { - version = TRUE; - silent = TRUE; + version = true; + silent = true; break; } else { - unrecognized = TRUE; + unrecognized = true; } i++; } @@ -195,7 +195,7 @@ int main( int argc, char ** argv ) TQDir dst; if ( argv[argi] ) { dst.setPath( argv[argi++] ); - help = FALSE; + help = false; } if ( !silent ) { diff --git a/tools/designer/tools/tqtcreatecw/main.cpp b/tools/designer/tools/tqtcreatecw/main.cpp index fcfa43168..4ad708ed4 100644 --- a/tools/designer/tools/tqtcreatecw/main.cpp +++ b/tools/designer/tools/tqtcreatecw/main.cpp @@ -109,15 +109,15 @@ static void createDescription( const TQValueList<Widget> &l, TQTextStream &ts ) indent--; ts << makeIndent( indent ) << "</sizepolicy>" << endl; - TQStrList sigs = w.w->metaObject()->signalNames( TRUE ); + TQStrList sigs = w.w->metaObject()->signalNames( true ); if ( !sigs.isEmpty() ) { for ( int i = 0; i < (int)sigs.count(); ++i ) ts << makeIndent( indent ) << "<signal>" << entitize( sigs.at( i ) ) << "</signal>" << endl; } - TQStrList slts = w.w->metaObject()->slotNames( TRUE ); + TQStrList slts = w.w->metaObject()->slotNames( true ); if ( !slts.isEmpty() ) { for ( int i = 0; i < (int)slts.count(); ++i ) { - TQMetaData::Access data = w.w->metaObject()->slot( i, TRUE )->access; + TQMetaData::Access data = w.w->metaObject()->slot( i, true )->access; if ( data == TQMetaData::Private ) continue; ts << makeIndent( indent ) << "<slot access=\"" @@ -125,12 +125,12 @@ static void createDescription( const TQValueList<Widget> &l, TQTextStream &ts ) << "\">" << entitize( slts.at( i ) ) << "</slot>" << endl; } } - TQStrList props = w.w->metaObject()->propertyNames( TRUE ); + TQStrList props = w.w->metaObject()->propertyNames( true ); if ( !props.isEmpty() ) { for ( int i = 0; i < (int)props.count(); ++i ) { const TQMetaProperty *p = w.w->metaObject()-> property( w.w->metaObject()-> - findProperty( props.at( i ), TRUE ), TRUE ); + findProperty( props.at( i ), true ), true ); if ( !p ) continue; if ( !p->writable() || !p->designable( w.w ) ) diff --git a/tools/designer/uic/embed.cpp b/tools/designer/uic/embed.cpp index aa4597d34..0a89ca533 100644 --- a/tools/designer/uic/embed.cpp +++ b/tools/designer/uic/embed.cpp @@ -150,7 +150,7 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima out << "\n"; TQPtrList<EmbedImage> list_image; - list_image.setAutoDelete( TRUE ); + list_image.setAutoDelete( true ); int image_count = 0; for ( it = images.begin(); it != images.end(); ++it ) { TQImage img; @@ -217,9 +217,9 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima else out << "0, "; if ( e->alpha ) - out << "TRUE, "; + out << "true, "; else - out << "FALSE, "; + out << "false, "; out << "\"" << e->name << "\" },\n"; e = list_image.next(); } @@ -258,7 +258,7 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima " );\n" #endif " if ( embed_image_vec[i].alpha )\n" - " img.setAlphaBuffer(TRUE);\n" + " img.setAlphaBuffer(true);\n" " return img;\n" " }\n" " }\n" diff --git a/tools/designer/uic/form.cpp b/tools/designer/uic/form.cpp index 42ee08cb1..5db986f6a 100644 --- a/tools/designer/uic/form.cpp +++ b/tools/designer/uic/form.cpp @@ -87,9 +87,9 @@ TQCString combinePath( const char *infile, const char *outfile ) int numCommonComponents = 0; TQStringList inSplitted = - TQStringList::split( '/', inFileInfo.dir().canonicalPath(), TRUE ); + TQStringList::split( '/', inFileInfo.dir().canonicalPath(), true ); TQStringList outSplitted = - TQStringList::split( '/', outFileInfo.dir().canonicalPath(), TRUE ); + TQStringList::split( '/', outFileInfo.dir().canonicalPath(), true ); while ( !inSplitted.isEmpty() && !outSplitted.isEmpty() && inSplitted.first() == outSplitted.first() ) { @@ -263,7 +263,7 @@ void Uic::createFormDecl( const TQDomElement &e ) out << "class TQPopupMenu;" << endl; } - bool dbForm = FALSE; + bool dbForm = false; registerDatabases( e ); dbConnections = unique( dbConnections ); if ( dbConnections.count() ) @@ -271,12 +271,12 @@ void Uic::createFormDecl( const TQDomElement &e ) if ( dbCursors.count() ) forwardDecl += "TQSqlCursor"; if ( dbForms[ "(default)" ].count() ) - dbForm = TRUE; - bool subDbForms = FALSE; + dbForm = true; + bool subDbForms = false; for ( it = dbConnections.begin(); it != dbConnections.end(); ++it ) { if ( !(*it).isEmpty() && (*it) != "(default)" ) { if ( dbForms[ (*it) ].count() ) { - subDbForms = TRUE; + subDbForms = true; break; } } @@ -380,12 +380,12 @@ void Uic::createFormDecl( const TQDomElement &e ) // constructor if ( objClass == "TQDialog" || objClass == "TQWizard" ) { - out << " " << bareNameOfClass << "( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );" << endl; + out << " " << bareNameOfClass << "( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );" << endl; } else if ( objClass == "TQWidget" ) { out << " " << bareNameOfClass << "( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );" << endl; } else if ( objClass == "TQMainWindow" ) { out << " " << bareNameOfClass << "( TQWidget* parent = 0, const char* name = 0, WFlags fl = WType_TopLevel );" << endl; - isMainWindow = TRUE; + isMainWindow = true; } else { out << " " << bareNameOfClass << "( TQWidget* parent = 0, const char* name = 0 );" << endl; } @@ -395,7 +395,7 @@ void Uic::createFormDecl( const TQDomElement &e ) out << endl; // children - bool needPolish = FALSE; + bool needPolish = false; nl = e.parentNode().toElement().elementsByTagName( "widget" ); for ( i = 1; i < (int) nl.length(); i++ ) { // start at 1, 0 is the toplevel widget n = nl.item(i).toElement(); @@ -406,7 +406,7 @@ void Uic::createFormDecl( const TQDomElement &e ) TQString s = getClassName( n ); if ( s == "TQDataTable" || s == "TQDataBrowser" ) { if ( isFrameworkCodeGenerated( n ) ) - needPolish = TRUE; + needPolish = true; } } @@ -428,13 +428,13 @@ void Uic::createFormDecl( const TQDomElement &e ) // database connections dbConnections = unique( dbConnections ); - bool hadOutput = FALSE; + bool hadOutput = false; for ( it = dbConnections.begin(); it != dbConnections.end(); ++it ) { if ( !(*it).isEmpty() ) { // only need pointers to non-default connections if ( (*it) != "(default)" && !(*it).isEmpty() ) { out << indent << "TQSqlDatabase* " << *it << "Connection;" << endl; - hadOutput = TRUE; + hadOutput = true; } } } @@ -756,14 +756,14 @@ void Uic::createFormImpl( const TQDomElement &e ) globalIncludes += "ntqsqldatabase.h"; if ( dbCursors.count() ) globalIncludes += "ntqsqlcursor.h"; - bool dbForm = FALSE; + bool dbForm = false; if ( dbForms[ "(default)" ].count() ) - dbForm = TRUE; - bool subDbForms = FALSE; + dbForm = true; + bool subDbForms = false; for ( it = dbConnections.begin(); it != dbConnections.end(); ++it ) { if ( !(*it).isEmpty() && (*it) != "(default)" ) { if ( dbForms[ (*it) ].count() ) { - subDbForms = TRUE; + subDbForms = true; break; } } @@ -869,7 +869,7 @@ void Uic::createFormImpl( const TQDomElement &e ) if ( !outputFileName.isEmpty() ) uiDotH = combinePath( uiDotH, outputFileName ); out << "#include \"" << uiDotH << "\"" << endl; - writeFunctImpl = FALSE; + writeFunctImpl = false; } // register the object and unify its name @@ -900,7 +900,7 @@ void Uic::createFormImpl( const TQDomElement &e ) // resulting 'length' to catch corrupt UIC files? int a = 0; int column = 0; - bool inQuote = FALSE; + bool inQuote = false; out << "static const char* const " << img << "_data[] = { " << endl; while ( baunzip[a] != '\"' ) a++; @@ -948,7 +948,7 @@ void Uic::createFormImpl( const TQDomElement &e ) out << " * name 'name' and widget flags set to 'f'." << endl; out << " *" << endl; out << " * The " << objClass.mid(1).lower() << " will by default be modeless, unless you set 'modal' to" << endl; - out << " * TRUE to construct a modal " << objClass.mid(1).lower() << "." << endl; + out << " * true to construct a modal " << objClass.mid(1).lower() << "." << endl; out << " */" << endl; out << nameOfClass << "::" << bareNameOfClass << "( TQWidget* parent, const char* name, bool modal, WFlags fl )" << endl; out << " : " << objClass << "( parent, name, modal, fl )"; @@ -967,7 +967,7 @@ void Uic::createFormImpl( const TQDomElement &e ) out << " */" << endl; out << nameOfClass << "::" << bareNameOfClass << "( TQWidget* parent, const char* name, WFlags fl )" << endl; out << " : " << objClass << "( parent, name, fl )"; - isMainWindow = TRUE; + isMainWindow = true; } else { out << "/*" << endl; out << " * Constructs a " << nameOfClass << " which is a child of 'parent', with the" << endl; @@ -1099,35 +1099,35 @@ void Uic::createFormImpl( const TQDomElement &e ) } // actions, toolbars, menubar - bool needEndl = FALSE; + bool needEndl = false; for ( n = e; !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "actions" ) { if ( !needEndl ) out << endl << indent << "// actions" << endl; createActionImpl( n.firstChild().toElement(), "this" ); - needEndl = TRUE; + needEndl = true; } } if ( needEndl ) out << endl; - needEndl = FALSE; + needEndl = false; for ( n = e; !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "toolbars" ) { if ( !needEndl ) out << endl << indent << "// toolbars" << endl; createToolbarImpl( n, objClass, objName ); - needEndl = TRUE; + needEndl = true; } } if ( needEndl ) out << endl; - needEndl = FALSE; + needEndl = false; for ( n = e; !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "menubar" ) { if ( !needEndl ) out << endl << indent << "// menubar" << endl; createMenuBarImpl( n, objClass, objName ); - needEndl = TRUE; + needEndl = true; } } if ( needEndl ) @@ -1201,14 +1201,14 @@ void Uic::createFormImpl( const TQDomElement &e ) } // buddies - bool firstBuddy = TRUE; + bool firstBuddy = true; for ( TQValueList<Buddy>::Iterator buddy = buddies.begin(); buddy != buddies.end(); ++buddy ) { if ( isObjectRegistered( (*buddy).buddy ) ) { if ( firstBuddy ) { out << endl << indent << "// buddies" << endl; } out << indent << (*buddy).key << "->setBuddy( " << registeredName( (*buddy).buddy ) << " );" << endl; - firstBuddy = FALSE; + firstBuddy = false; } } @@ -1232,26 +1232,26 @@ void Uic::createFormImpl( const TQDomElement &e ) out << endl; // handle application events if required - bool needFontEventHandler = FALSE; - bool needSqlTableEventHandler = FALSE; - bool needSqlDataBrowserEventHandler = FALSE; + bool needFontEventHandler = false; + bool needSqlTableEventHandler = false; + bool needSqlDataBrowserEventHandler = false; nl = e.elementsByTagName( "widget" ); for ( i = 0; i < (int) nl.length(); i++ ) { if ( !DomTool::propertiesOfType( nl.item(i).toElement() , "font" ).isEmpty() ) - needFontEventHandler = TRUE; + needFontEventHandler = true; TQString s = getClassName( nl.item(i).toElement() ); if ( s == "TQDataTable" || s == "TQDataBrowser" ) { if ( !isFrameworkCodeGenerated( nl.item(i).toElement() ) ) continue; if ( s == "TQDataTable" ) - needSqlTableEventHandler = TRUE; + needSqlTableEventHandler = true; if ( s == "TQDataBrowser" ) - needSqlDataBrowserEventHandler = TRUE; + needSqlDataBrowserEventHandler = true; } if ( needFontEventHandler && needSqlTableEventHandler && needSqlDataBrowserEventHandler ) break; } - if ( needFontEventHandler && FALSE ) { + if ( needFontEventHandler && false ) { // indent = "\t"; // increase indentation for if-clause below out << "/*" << endl; out << " * Main event handler. Reimplemented to handle" << endl; @@ -1301,10 +1301,10 @@ void Uic::createFormImpl( const TQDomElement &e ) if ( conn == "(default)" ) out << indent << indent << indent << "cursor = new TQSqlCursor( \"" << tab << "\" );" << endl; else - out << indent << indent << indent << "cursor = new TQSqlCursor( \"" << tab << "\", TRUE, " << conn << "Connection );" << endl; + out << indent << indent << indent << "cursor = new TQSqlCursor( \"" << tab << "\", true, " << conn << "Connection );" << endl; out << indent << indent << indent << "if ( " << c << "->isReadOnly() ) " << endl; out << indent << indent << indent << indent << "cursor->setMode( TQSqlCursor::ReadOnly );" << endl; - out << indent << indent << indent << c << "->setSqlCursor( cursor, FALSE, TRUE );" << endl; + out << indent << indent << indent << c << "->setSqlCursor( cursor, false, true );" << endl; out << indent << indent << "}" << endl; out << indent << indent << "if ( !cursor->isActive() )" << endl; out << indent << indent << indent << c << "->refresh( TQDataTable::RefreshAll );" << endl; @@ -1329,8 +1329,8 @@ void Uic::createFormImpl( const TQDomElement &e ) if ( conn == "(default)" ) out << indent << indent << indent << "TQSqlCursor* cursor = new TQSqlCursor( \"" << tab << "\" );" << endl; else - out << indent << indent << indent << "TQSqlCursor* cursor = new TQSqlCursor( \"" << tab << "\", TRUE, " << conn << "Connection );" << endl; - out << indent << indent << indent << obj << "->setSqlCursor( cursor, TRUE );" << endl; + out << indent << indent << indent << "TQSqlCursor* cursor = new TQSqlCursor( \"" << tab << "\", true, " << conn << "Connection );" << endl; + out << indent << indent << indent << obj << "->setSqlCursor( cursor, true );" << endl; out << indent << indent << indent << obj << "->refresh();" << endl; out << indent << indent << indent << obj << "->first();" << endl; out << indent << indent << "}" << endl; @@ -1380,7 +1380,7 @@ void Uic::createFormImpl( const TQDomElement &e ) 1. If the type is 'void', we return nothing. - 2. If the type is 'bool', we return 'FALSE'. + 2. If the type is 'bool', we return 'false'. 3. If the type is 'unsigned long' or 'TQ_UINT16' or 'double' or similar, we @@ -1400,7 +1400,7 @@ void Uic::createFormImpl( const TQDomElement &e ) ( toks.grep(numeric).count() == toks.count() ); if ( type == "bool" ) { - retVal = "FALSE"; + retVal = "false"; } else if ( isBasicNumericType || type.endsWith("*") ) { retVal = "0"; } else if ( type.endsWith("&") ) { diff --git a/tools/designer/uic/main.cpp b/tools/designer/uic/main.cpp index af06821e2..bd0441c75 100644 --- a/tools/designer/uic/main.cpp +++ b/tools/designer/uic/main.cpp @@ -52,12 +52,12 @@ extern TQStringList *dbpaths; int main( int argc, char * argv[] ) { - bool impl = FALSE; - bool subcl = FALSE; - bool imagecollection = FALSE; - bool imagecollection_tmpfile = FALSE; + bool impl = false; + bool subcl = false; + bool imagecollection = false; + bool imagecollection_tmpfile = false; #if defined(UIB) - bool binary = FALSE; + bool binary = false; #endif TQStringList images; const char *error = 0; @@ -68,10 +68,10 @@ int main( int argc, char * argv[] ) TQCString image_tmpfile; const char* projectName = 0; const char* trmacro = 0; - bool nofwd = FALSE; - bool fix = FALSE; + bool nofwd = false; + bool fix = false; TQCString pchFile; - TQApplication app(argc, argv, FALSE); + TQApplication app(argc, argv, false); TQString keybase( "/TQt Designer/" + TQString::number( (TQT_VERSION >> 16) & 0xff ) +"." + TQString::number( (TQT_VERSION >> 8) & 0xff ) + "/" ); @@ -95,7 +95,7 @@ int main( int argc, char * argv[] ) } else outputFile = &opt[1]; } else if ( opt[0] == 'i' || opt == "impl" ) { - impl = TRUE; + impl = true; if ( opt == "impl" || opt[1] == '\0' ) { if ( !(n < argc-1) ) { error = "Missing name of header file"; @@ -105,7 +105,7 @@ int main( int argc, char * argv[] ) } else headerFile = &opt[1]; } else if ( opt[0] == 'e' || opt == "embed" ) { - imagecollection = TRUE; + imagecollection = true; if ( opt == "embed" || opt[1] == '\0' ) { if ( !(n < argc-1) ) { error = "Missing name of project"; @@ -116,21 +116,21 @@ int main( int argc, char * argv[] ) projectName = &opt[1]; } if ( argc > n+1 && qstrcmp( argv[n+1], "-f" ) == 0 ) { - imagecollection_tmpfile = TRUE; + imagecollection_tmpfile = true; image_tmpfile = argv[n+2]; n += 2; } #if defined(UIB) } else if ( opt == "binary" ) { - binary = TRUE; + binary = true; #endif } else if ( opt == "nofwd" ) { - nofwd = TRUE; + nofwd = true; } else if ( opt == "nounload" ) { - dbnounload = TRUE; + dbnounload = true; } else if ( opt == "subdecl" ) { - subcl = TRUE; + subcl = true; if ( !(n < argc-2) ) { error = "Missing arguments"; break; @@ -138,8 +138,8 @@ int main( int argc, char * argv[] ) className = argv[++n]; headerFile = argv[++n]; } else if ( opt == "subimpl" ) { - subcl = TRUE; - impl = TRUE; + subcl = true; + impl = true; if ( !(n < argc-2) ) { error = "Missing arguments"; break; @@ -174,7 +174,7 @@ int main( int argc, char * argv[] ) } else if ( opt == "help" ) { break; } else if ( opt == "fix" ) { - fix = TRUE; + fix = true; } else if ( opt == "pch") { if ( !(n < argc-1) ) { error = "Missing name of PCH file"; diff --git a/tools/designer/uic/object.cpp b/tools/designer/uic/object.cpp index 1306e9c06..305d01b4b 100644 --- a/tools/designer/uic/object.cpp +++ b/tools/designer/uic/object.cpp @@ -88,7 +88,7 @@ void Uic::createObjectDecl( const TQDomElement& e ) \sa createObjectDecl() */ -static bool createdCentralWidget = FALSE; +static bool createdCentralWidget = false; TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentClass, const TQString& par, const TQString& layout ) { @@ -96,7 +96,7 @@ TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentCla if ( parent == "this" && isMainWindow ) { if ( !createdCentralWidget ) out << indent << "setCentralWidget( new TQWidget( this, \"qt_central_widget\" ) );" << endl; - createdCentralWidget = TRUE; + createdCentralWidget = true; parent = "centralWidget()"; } TQDomElement n; @@ -164,7 +164,7 @@ TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentCla lastItem = "0"; // set the properties and insert items - bool hadFrameShadow = FALSE; + bool hadFrameShadow = false; for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "property" ) { bool stdset = stdsetdef; @@ -179,7 +179,7 @@ TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentCla if ( prop == "name" ) continue; if ( isLine && prop == "frameShadow" ) - hadFrameShadow = TRUE; + hadFrameShadow = true; if ( prop == "buddy" && value.startsWith("\"") && value.endsWith("\"") ) { buddies << Buddy( objName, value.mid(1, value.length() - 2 ) ); continue; @@ -628,12 +628,12 @@ TQString Uic::setObjectProperty( const TQString& objClass, const TQString& obj, TQString palette = "pal"; if ( !pal_used ) { out << indent << "TQPalette " << palette << ";" << endl; - pal_used = TRUE; + pal_used = true; } TQString cg = "cg"; if ( !cg_used ) { out << indent << "TQColorGroup " << cg << ";" << endl; - cg_used = TRUE; + cg_used = true; } n = e.firstChild().toElement(); while ( !n.isNull() && n.tagName() != "active" ) diff --git a/tools/designer/uic/subclassing.cpp b/tools/designer/uic/subclassing.cpp index 17e651f06..cb7a1a92b 100644 --- a/tools/designer/uic/subclassing.cpp +++ b/tools/designer/uic/subclassing.cpp @@ -70,7 +70,7 @@ void Uic::createSubDecl( const TQDomElement &e, const TQString& subClass ) // constructor if ( objClass == "TQDialog" || objClass == "TQWizard" ) { - out << " " << subClass << "( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );" << endl; + out << " " << subClass << "( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );" << endl; } else { // standard TQWidget out << " " << subClass << "( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );" << endl; } @@ -215,7 +215,7 @@ void Uic::createSubImpl( const TQDomElement &e, const TQString& subClass ) out << " * name 'name' and widget flags set to 'f' " << endl; out << " *" << endl; out << " * The " << objClass.mid(1).lower() << " will by default be modeless, unless you set 'modal' to" << endl; - out << " * TRUE to construct a modal " << objClass.mid(1).lower() << "." << endl; + out << " * true to construct a modal " << objClass.mid(1).lower() << "." << endl; out << " */" << endl; out << subClass << "::" << subClass << "( TQWidget* parent, const char* name, bool modal, WFlags fl )" << endl; out << " : " << nameOfClass << "( parent, name, modal, fl )" << endl; diff --git a/tools/designer/uic/uic.cpp b/tools/designer/uic/uic.cpp index c38802714..9f54a216a 100644 --- a/tools/designer/uic/uic.cpp +++ b/tools/designer/uic/uic.cpp @@ -44,7 +44,7 @@ #include <stdio.h> #include <stdlib.h> -bool Uic::isMainWindow = FALSE; +bool Uic::isMainWindow = false; TQString Uic::getComment( const TQDomNode& n ) { @@ -59,7 +59,7 @@ TQString Uic::getComment( const TQDomNode& n ) TQString Uic::mkBool( bool b ) { - return b? "TRUE" : "FALSE"; + return b? "true" : "false"; } TQString Uic::mkBool( const TQString& s ) @@ -104,13 +104,13 @@ TQString Uic::trcall( const TQString& sourceText, const TQString& comment ) return "TQString::null"; TQString t = trmacro; - bool encode = FALSE; + bool encode = false; if ( t.isNull() ) { t = "tr"; for ( int i = 0; i < (int) sourceText.length(); i++ ) { if ( sourceText[i].unicode() >= 0x80 ) { t = "trUtf8"; - encode = TRUE; + encode = true; break; } } @@ -144,10 +144,10 @@ Uic::Uic( const TQString &fn, const char *outputFn, TQTextStream &outStream, outputFileName( outputFn ), trmacro( trm ), nofwd( omitForwardDecls ) { fileName = fn; - writeFunctImpl = TRUE; + writeFunctImpl = true; defMargin = BOXLAYOUT_DEFAULT_MARGIN; defSpacing = BOXLAYOUT_DEFAULT_SPACING; - externPixmaps = FALSE; + externPixmaps = false; indent = " "; // default indent item_used = cg_used = pal_used = 0; @@ -170,7 +170,7 @@ Uic::Uic( const TQString &fn, const char *outputFn, TQTextStream &outStream, if ( e.tagName() == "widget" ) { widget = e; } else if ( e.tagName() == "pixmapinproject" ) { - externPixmaps = TRUE; + externPixmaps = true; } else if ( e.tagName() == "layoutdefaults" ) { defSpacing = e.attribute( "spacing", defSpacing.toString() ); defMargin = e.attribute( "margin", defMargin.toString() ); @@ -256,7 +256,7 @@ TQString Uic::getClassName( const TQDomElement& e ) return s; } -/*! Returns TRUE if database framework code is generated, else FALSE. +/*! Returns true if database framework code is generated, else false. */ bool Uic::isFrameworkCodeGenerated( const TQDomElement& e ) @@ -264,8 +264,8 @@ bool Uic::isFrameworkCodeGenerated( const TQDomElement& e ) TQDomElement n = getObjectProperty( e, "frameworkCode" ); if ( n.attribute("name") == "frameworkCode" && !DomTool::elementToVariant( n.firstChild().toElement(), TQVariant( true ) ).toBool() ) - return FALSE; - return TRUE; + return false; + return true; } /*! Extracts an object name from \a e. It's stored in the 'name' @@ -407,8 +407,8 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent ) out << indent << objName << " = new TQActionGroup( " << parent << ", \"" << objName << "\" );" << endl; else continue; - bool subActionsDone = FALSE; - bool hasMenuText = FALSE; + bool subActionsDone = false; + bool hasMenuText = false; TQString actionText; for ( TQDomElement n2 = ae.firstChild().toElement(); !n2.isNull(); n2 = n2.nextSibling().toElement() ) { if ( n2.tagName() == "property" ) { @@ -431,7 +431,7 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent ) call += value + " );"; if (prop == "menuText") - hasMenuText = TRUE; + hasMenuText = true; else if (prop == "text") actionText = value; @@ -442,7 +442,7 @@ void Uic::createActionImpl( const TQDomElement &n, const TQString &parent ) } } else if ( !subActionsDone && ( n2.tagName() == "actiongroup" || n2.tagName() == "action" ) ) { createActionImpl( n2, objName ); - subActionsDone = TRUE; + subActionsDone = true; } } // workaround for loading pre-3.3 files expecting bogus TQAction behavior @@ -647,7 +647,7 @@ TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &par s = indent + item + " = "; else s = indent + "TQListViewItem * " + item + " = "; - item_used = TRUE; + item_used = true; } if ( !parentItem.isEmpty() ) @@ -672,7 +672,7 @@ TQString Uic::createListViewItemImpl( const TQDomElement &e, const TQString &par pixmaps << pix; } } else if ( n.tagName() == "item" ) { - s += indent + item + "->setOpen( TRUE );\n"; + s += indent + item + "->setOpen( true );\n"; s += createListViewItemImpl( n, parent, item ); } n = n.nextSibling().toElement(); @@ -700,7 +700,7 @@ TQString Uic::createListViewColumnImpl( const TQDomElement &e, const TQString &p TQString txt; TQString com; TQString pix; - bool clickable = FALSE, resizable = FALSE; + bool clickable = false, resizable = false; while ( !n.isNull() ) { if ( n.tagName() == "property" ) { TQString attrib = n.attribute("name"); @@ -730,9 +730,9 @@ TQString Uic::createListViewColumnImpl( const TQDomElement &e, const TQString &p if ( !pix.isEmpty() ) s += indent + parent + "->header()->setLabel( " + parent + "->header()->count() - 1, " + pix + ", " + trcall( txt, com ) + " );\n"; if ( !clickable ) - s += indent + parent + "->header()->setClickEnabled( FALSE, " + parent + "->header()->count() - 1 );\n"; + s += indent + parent + "->header()->setClickEnabled( false, " + parent + "->header()->count() - 1 );\n"; if ( !resizable ) - s += indent + parent + "->header()->setResizeEnabled( FALSE, " + parent + "->header()->count() - 1 );\n"; + s += indent + parent + "->header()->setResizeEnabled( false, " + parent + "->header()->count() - 1 );\n"; return s; } @@ -993,7 +993,7 @@ TQColorGroup Uic::loadColorGroup( const TQDomElement &e ) return cg; } -/*! Returns TRUE if the widget properties specify that it belongs to +/*! Returns true if the widget properties specify that it belongs to the database \a connection and \a table. */ @@ -1002,8 +1002,8 @@ bool Uic::isWidgetInTable( const TQDomElement& e, const TQString& connection, co TQString conn = getDatabaseInfo( e, "connection" ); TQString tab = getDatabaseInfo( e, "table" ); if ( conn == connection && tab == table ) - return TRUE; - return FALSE; + return true; + return false; } /*! @@ -1115,7 +1115,7 @@ TQString Uic::createObjectInstance( const TQString& objClass, const TQString& pa { if (( objClass.mid( 1 ) == "ComboBox" ) || ( objClass.mid( 2 ) == "ComboBox" )) { - return objClass + "( FALSE, " + parent + ", \"" + objName + "\" )"; + return objClass + "( false, " + parent + ", \"" + objName + "\" )"; } return objClass + "( " + parent + ", \"" + objName + "\" )"; } diff --git a/tools/designer/uic/uic.h b/tools/designer/uic/uic.h index f7e62f6e2..2de6015e8 100644 --- a/tools/designer/uic/uic.h +++ b/tools/designer/uic/uic.h @@ -164,7 +164,7 @@ private: static TQString mkBool( bool b ); static TQString mkBool( const TQString& s ); bool toBool( const TQString& s ); - static TQString fixString( const TQString &str, bool encode = FALSE ); + static TQString fixString( const TQString &str, bool encode = false ); static bool onlyAscii; static TQString mkStdSet( const TQString& prop ); static TQString getComment( const TQDomNode& n ); diff --git a/tools/designer/uilib/ntqwidgetfactory.h b/tools/designer/uilib/ntqwidgetfactory.h index fb54e8ae1..e1af0a018 100644 --- a/tools/designer/uilib/ntqwidgetfactory.h +++ b/tools/designer/uilib/ntqwidgetfactory.h @@ -76,7 +76,7 @@ private: void loadConnections( const TQDomElement &e, TQObject *connector ); void loadTabOrder( const TQDomElement &e ); TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg ); - TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type, bool isTQLayoutWidget = FALSE ); + TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type, bool isTQLayoutWidget = false ); LayoutType layoutType( TQLayout *l ) const; void setProperty( TQObject* widget, const TQString &prop, TQVariant value ); void setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e ); diff --git a/tools/designer/uilib/qwidgetfactory.cpp b/tools/designer/uilib/qwidgetfactory.cpp index 428385d5d..a83c292aa 100644 --- a/tools/designer/uilib/qwidgetfactory.cpp +++ b/tools/designer/uilib/qwidgetfactory.cpp @@ -122,8 +122,8 @@ static TQStringList *availableWidgetList = 0; TQ_EXPORT TQMap<TQWidget*, TQString> *qwf_forms = 0; TQString *qwf_language = 0; -TQ_EXPORT bool qwf_execute_code = TRUE; -bool qwf_stays_on_top = FALSE; +TQ_EXPORT bool qwf_execute_code = true; +bool qwf_stays_on_top = false; TQString qwf_currFileName = ""; TQObject *qwf_form_object = 0; TQ_EXPORT TQString *qwf_plugin_dir = 0; @@ -165,7 +165,7 @@ static void setupWidgetListAndMap() availableWidgetMap = new TQMap<TQString, bool>; for ( it = availableWidgetList->begin(); it != availableWidgetList->end(); ++it ) - availableWidgetMap->insert( *it, TRUE ); + availableWidgetMap->insert( *it, true ); } static TQImage loadImageData( const TQString& format, ulong len, TQByteArray data ) @@ -254,10 +254,10 @@ static TQSizePolicy::SizeType stringToSizeType( const TQString& str ) TQWidgetFactory::TQWidgetFactory() : d( new TQWidgetFactoryPrivate() ), dbControls( 0 ), - usePixmapCollection( FALSE ), defMargin( 11 ), defSpacing( 6 ) + usePixmapCollection( false ), defMargin( 11 ), defSpacing( 6 ) { - widgetFactories.setAutoDelete( TRUE ); - d->customWidgets.setAutoDelete( TRUE ); + widgetFactories.setAutoDelete( true ); + d->customWidgets.setAutoDelete( true ); } /*! \fn TQWidgetFactory::~TQWidgetFactory() @@ -293,9 +293,9 @@ TQWidget *TQWidgetFactory::create( const TQString &uiFile, TQObject *connector, { setupPluginDir(); TQFile f( uiFile ); - bool failed = FALSE; + bool failed = false; if ( !f.open( IO_ReadOnly ) ) - failed = TRUE; + failed = true; if ( failed && tqApp->type() == TQApplication::Tty ) { // for TQSA: If we have no GUI, we have no form definition // files, but just the code. So try if only the code exists. @@ -390,10 +390,10 @@ TQWidget *TQWidgetFactory::create( TQIODevice *dev, TQObject *connector, TQWidge c = new TQSqlCursor( (*it)[ 1 ] ); } else { db = TQSqlDatabase::database( conn ); - c = new TQSqlCursor( (*it)[ 1 ], TRUE, db ); + c = new TQSqlCursor( (*it)[ 1 ], true, db ); } if ( db ) { - table->setSqlCursor( c, fieldMap.isEmpty(), TRUE ); + table->setSqlCursor( c, fieldMap.isEmpty(), true ); table->refresh( TQDataTable::RefreshAll ); } } @@ -466,7 +466,7 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec } else if ( e.tagName() == "widget" ) { widget = e; } else if ( e.tagName() == "pixmapinproject" ) { - usePixmapCollection = TRUE; + usePixmapCollection = true; } else if ( e.tagName() == "layoutdefaults" ) { defSpacing = e.attribute( "spacing", TQString::number( defSpacing ) ).toInt(); defMargin = e.attribute( "margin", TQString::number( defMargin ) ).toInt(); @@ -669,7 +669,7 @@ void TQWidgetFactory::inputSpacer( const UibStrTable& strings, TQDataStream& in, TQVariant value; TQCString comment; TQSizePolicy::SizeType sizeType = TQSizePolicy::Preferred; - bool vertical = FALSE; + bool vertical = false; int w = 0; int h = 0; TQ_UINT16 column = 0; @@ -731,8 +731,8 @@ void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings, TQString text; TQPixmap pixmap; TQString field; - bool clickable = TRUE; - bool resizable = TRUE; + bool clickable = true; + bool resizable = true; TQCString name; TQVariant value; @@ -814,7 +814,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, switch ( objectTag ) { case Object_Item: if ( listView != 0 ) - d->lastItem->setOpen( TRUE ); + d->lastItem->setOpen( true ); inputItem( strings, in, parent, item ); break; case Object_TextProperty: @@ -1005,7 +1005,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, metAttribute = 2; break; case Object_Column: - inputColumnOrRow( strings, in, obj, FALSE ); + inputColumnOrRow( strings, in, obj, false ); break; case Object_Event: unpackCString( strings, in, name ); @@ -1031,13 +1031,13 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, font.setPointSize( pointSize ); } if ( fontFlags & Font_Bold ) - font.setBold( TRUE ); + font.setBold( true ); if ( fontFlags & Font_Italic ) - font.setItalic( TRUE ); + font.setItalic( true ); if ( fontFlags & Font_Underline ) - font.setUnderline( TRUE ); + font.setUnderline( true ); if ( fontFlags & Font_StrikeOut ) - font.setStrikeOut( TRUE ); + font.setStrikeOut( true ); if ( obj != 0 ) setProperty( obj, name, font ); @@ -1100,7 +1100,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, } break; case Object_Row: - inputColumnOrRow( strings, in, obj, TRUE ); + inputColumnOrRow( strings, in, obj, true ); break; case Object_Spacer: inputSpacer( strings, in, layout ); @@ -1302,7 +1302,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in, unpackCString( strings, in, d->translationContext ); if ( introFlags & Intro_Pixmapinproject ) - usePixmapCollection = TRUE; + usePixmapCollection = true; if ( defaultMargin != -32768 ) defMargin = defaultMargin; if ( defaultSpacing != -32768 ) @@ -1458,7 +1458,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa } else if ( className == "TQTabWidget" ) { return new TQTabWidget( parent, name ); } else if ( className == "TQComboBox" ) { - return new TQComboBox( FALSE, parent, name ); + return new TQComboBox( false, parent, name ); } else if ( className == "TQWidget" ) { if ( !qwf_stays_on_top ) return new TQWidget( parent, name ); @@ -1466,7 +1466,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa } else if ( className == "TQDialog" ) { if ( !qwf_stays_on_top ) return new TQDialog( parent, name ); - return new TQDialog( parent, name, FALSE, TQt::WStyle_StaysOnTop ); + return new TQDialog( parent, name, false, TQt::WStyle_StaysOnTop ); } else if ( className == "TQWizard" ) { return new TQWizard( parent, name ); } else if ( className == "TQLCDNumber" ) { @@ -1545,7 +1545,7 @@ TQWidget *TQWidgetFactory::createWidget( const TQString &className, TQWidget *pa if ( iface ) { TQWidget *w = iface->create( className, parent, name ); if ( w ) { - d->customWidgets.replace( className.latin1(), new bool(TRUE) ); + d->customWidgets.replace( className.latin1(), new bool(true) ); return w; } } @@ -1569,8 +1569,8 @@ TQStringList TQWidgetFactory::widgets() return *availableWidgetList; } -/*! Returns TRUE if the widget factory can create the specified \a widget; -otherwise returns FALSE. */ +/*! Returns true if the widget factory can create the specified \a widget; +otherwise returns false. */ bool TQWidgetFactory::supportsWidget( const TQString &widget ) { @@ -1597,12 +1597,12 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget if ( colspan < 1 ) colspan = 1; - bool isTQLayoutWidget = FALSE; + bool isTQLayoutWidget = false; if ( !className.isEmpty() ) { if ( !layout && className == "TQLayoutWidget" ) { className = "TQWidget"; - isTQLayoutWidget = TRUE; + isTQLayoutWidget = true; } if ( layout && className == "TQLayoutWidget" ) { // hide layout widgets @@ -1638,7 +1638,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget } #ifdef QT_CONTAINER_CUSTOM_WIDGETS TQString parentClassName = parent ? parent->className() : 0; - bool isPlugin = parent ? !!d->customWidgets.find( parent->className() ) : FALSE; + bool isPlugin = parent ? !!d->customWidgets.find( parent->className() ) : false; if ( isPlugin ) tqWarning( "####### loading custom container widgets without page support not implemented!" ); // ### TODO loading for custom container widgets without pages @@ -1819,7 +1819,7 @@ TQWidgetFactory::LayoutType TQWidgetFactory::layoutType( TQLayout *layout ) cons void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop, TQVariant value ) { - int offset = obj->metaObject()->findProperty( prop, TRUE ); + int offset = obj->metaObject()->findProperty( prop, true ); if ( offset != -1 ) { if ( prop == "geometry" && obj == toplevel ) { @@ -1830,7 +1830,7 @@ void TQWidgetFactory::setProperty( TQObject* obj, const TQString &prop, if ( value.type() == TQVariant::String || value.type() == TQVariant::CString ) { const TQMetaProperty *metaProp = - obj->metaObject()->property( offset, TRUE ); + obj->metaObject()->property( offset, true ); if ( metaProp != 0 && metaProp->isEnumType() ) { if ( metaProp->isSetType() ) { TQStrList flagsCStr; @@ -2084,7 +2084,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto } else { if ( name == "this" ) name = toplevel->name(); - TQObjectList *l = toplevel->queryList( 0, name, FALSE ); + TQObjectList *l = toplevel->queryList( 0, name, false ); if ( l ) { if ( l->first() ) conn.sender = l->first(); @@ -2100,7 +2100,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { conn.receiver = toplevel; } else { - TQObjectList *l = toplevel->queryList( 0, name, FALSE ); + TQObjectList *l = toplevel->queryList( 0, name, false ); if ( l ) { if ( l->first() ) conn.receiver = l->first(); @@ -2122,7 +2122,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto } TQObject *sender = 0, *receiver = 0; - TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), FALSE ); + TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), false ); if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) { sender = toplevel; } else { @@ -2140,7 +2140,7 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) { receiver = toplevel; } else { - l = toplevel->queryList( 0, conn.receiver->name(), FALSE ); + l = toplevel->queryList( 0, conn.receiver->name(), false ); if ( !l || !l->first() ) { delete l; n = n.nextSibling().toElement(); @@ -2155,12 +2155,12 @@ void TQWidgetFactory::loadConnections( const TQDomElement &e, TQObject *connecto TQString s2 = "1""%1"; s2 = s2.arg( conn.slot ); - TQStrList signalList = sender->metaObject()->signalNames( TRUE ); - TQStrList slotList = receiver->metaObject()->slotNames( TRUE ); + TQStrList signalList = sender->metaObject()->signalNames( true ); + TQStrList slotList = receiver->metaObject()->slotNames( true ); // if this is a connection to a custom slot and we have a connector, try this as receiver if ( slotList.find( conn.slot ) == -1 && receiver == toplevel && connector ) { - slotList = connector->metaObject()->slotNames( TRUE ); + slotList = connector->metaObject()->slotNames( true ); receiver = connector; } @@ -2183,7 +2183,7 @@ void TQWidgetFactory::loadTabOrder( const TQDomElement &e ) while ( !n.isNull() ) { if ( n.tagName() == "tabstop" ) { TQString name = n.firstChild().toText().data(); - TQObjectList *l = toplevel->queryList( 0, name, FALSE ); + TQObjectList *l = toplevel->queryList( 0, name, false ); if ( l ) { if ( l->first() ) { TQWidget *w = (TQWidget*)l->first(); @@ -2272,7 +2272,7 @@ void TQWidgetFactory::createColumn( const TQDomElement &e, TQWidget *widget ) TQDomElement n = e.firstChild().toElement(); TQPixmap pix; TQString txt; - bool clickable = TRUE, resizable = TRUE; + bool clickable = true, resizable = true; while ( !n.isNull() ) { if ( n.tagName() == "property" ) { TQString attrib = n.attribute( "name" ); @@ -2321,7 +2321,7 @@ void TQWidgetFactory::createColumn( const TQDomElement &e, TQWidget *widget ) void TQWidgetFactory::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap ) { TQDomElement n = e; - hasPixmap = FALSE; + hasPixmap = false; while ( !n.isNull() ) { if ( n.tagName() == "property" ) { TQString attrib = n.attribute( "name" ); @@ -2342,7 +2342,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis if ( widget->inherits( "TQListBox" ) || widget->inherits( "TQComboBox" ) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; - bool hasPixmap = FALSE; + bool hasPixmap = false; TQString txt; loadItem( n, pix, txt, hasPixmap ); TQListBox *lb = 0; @@ -2365,7 +2365,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis } else if ( widget->inherits( "TQIconView" ) ) { TQDomElement n = e.firstChild().toElement(); TQPixmap pix; - bool hasPixmap = FALSE; + bool hasPixmap = false; TQString txt; loadItem( n, pix, txt, hasPixmap ); @@ -2399,7 +2399,7 @@ void TQWidgetFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLis } } } else if ( n.tagName() == "item" ) { - item->setOpen( TRUE ); + item->setOpen( true ); createItem( n, widget, item ); } @@ -2420,7 +2420,7 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e ) { TQDomElement n = e; TQAction *a = 0; - bool hasMenuText = FALSE; + bool hasMenuText = false; if ( n.tagName() == "action" ) { a = new TQAction( parent ); TQDomElement n2 = n.firstChild().toElement(); @@ -2429,7 +2429,7 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e ) if ( n2.tagName() == "property" ) { TQString prop(n2.attribute("name")); if (prop == "menuText") - hasMenuText = TRUE; + hasMenuText = true; setProperty( a, prop, n2.firstChild().toElement() ); } n2 = n2.nextSibling().toElement(); @@ -2443,7 +2443,7 @@ void TQWidgetFactory::loadChildAction( TQObject *parent, const TQDomElement &e ) if ( n2.tagName() == "property" ) { TQString prop(n2.attribute("name")); if (prop == "menuText") - hasMenuText = TRUE; + hasMenuText = true; setProperty( a, prop, n2.firstChild().toElement() ); } else if ( n2.tagName() == "action" || n2.tagName() == "actiongroup" ) { diff --git a/tools/linguist/linguist/finddialog.cpp b/tools/linguist/linguist/finddialog.cpp index 3978b974c..005b5a590 100644 --- a/tools/linguist/linguist/finddialog.cpp +++ b/tools/linguist/linguist/finddialog.cpp @@ -57,7 +57,7 @@ FindDialog::FindDialog( bool replace, TQWidget *parent, const char *name, TQLabel *replaceWith = 0; TQPushButton *findNxt = new TQPushButton( tr("&Find Next"), this, "find next" ); - findNxt->setDefault( TRUE ); + findNxt->setDefault( true ); connect( findNxt, TQ_SIGNAL(clicked()), this, TQ_SLOT(emitFindNext()) ); TQPushButton *cancel = new TQPushButton( tr("Cancel"), this, "cancel find" ); connect( cancel, TQ_SIGNAL(clicked()), this, TQ_SLOT(reject()) ); @@ -66,7 +66,7 @@ FindDialog::FindDialog( bool replace, TQWidget *parent, const char *name, bl->addWidget( findNxt ); matchCase = new TQCheckBox( tr("&Match case"), this, "find match case" ); - matchCase->setChecked( FALSE ); + matchCase->setChecked( false ); if ( replace ) { TQWhatsThis::add( this, tr("This window allows you to search and replace" @@ -109,12 +109,12 @@ FindDialog::FindDialog( bool replace, TQWidget *parent, const char *name, sourceText = new TQCheckBox( tr("&Source texts"), this, "find in source texts" ); - sourceText->setChecked( TRUE ); + sourceText->setChecked( true ); translations = new TQCheckBox( tr("&Translations"), this, "find in translations" ); - translations->setChecked( TRUE ); + translations->setChecked( true ); comments = new TQCheckBox( tr("&Comments"), this, "find in comments" ); - comments->setChecked( TRUE ); + comments->setChecked( true ); TQWhatsThis::add( sourceText, tr("Source texts are searched when" " checked.") ); @@ -174,10 +174,10 @@ void FindDialog::emitFindNext() void FindDialog::emitReplace() { - emit replace( led->text(), red->text(), matchCase->isChecked(), FALSE ); + emit replace( led->text(), red->text(), matchCase->isChecked(), false ); } void FindDialog::emitReplaceAll() { - emit replace( led->text(), red->text(), matchCase->isChecked(), TRUE ); + emit replace( led->text(), red->text(), matchCase->isChecked(), true ); } diff --git a/tools/linguist/linguist/finddialog.h b/tools/linguist/linguist/finddialog.h index c2576002e..315748859 100644 --- a/tools/linguist/linguist/finddialog.h +++ b/tools/linguist/linguist/finddialog.h @@ -45,7 +45,7 @@ class FindDialog : public TQDialog public: enum { SourceText = 0x1, Translations = 0x2, Comments = 0x4 }; - FindDialog( bool replace, TQWidget *parent = 0, const char *name = 0, bool modal = FALSE ); + FindDialog( bool replace, TQWidget *parent = 0, const char *name = 0, bool modal = false ); signals: void findNext( const TQString& text, int where, bool matchCase ); diff --git a/tools/linguist/linguist/listviews.cpp b/tools/linguist/linguist/listviews.cpp index 4acfb5051..4eaa2cb1d 100644 --- a/tools/linguist/linguist/listviews.cpp +++ b/tools/linguist/linguist/listviews.cpp @@ -148,11 +148,11 @@ MessageLVI::MessageLVI( TQListView *parent, m.setTranslation( t ); } setText( 1, fixEllipsis( text, Text0MaxLen ) ); - fini = TRUE; - d = FALSE; + fini = true; + d = false; if( m.type() == MetaTranslatorMessage::Unfinished ) - setFinished( FALSE ); + setFinished( false ); } void MessageLVI::updateTranslationText() @@ -241,7 +241,7 @@ MetaTranslatorMessage MessageLVI::message() const ContextLVI::ContextLVI( TQListView *lv, const TQString& context ) : LVI( lv ), com( "" ) { - messageItems.setAutoDelete( TRUE ); + messageItems.setAutoDelete( true ); unfinishedCount = 0; dangerCount = 0; diff --git a/tools/linguist/linguist/listviews.h b/tools/linguist/linguist/listviews.h index 62bc42943..5bc85b31a 100644 --- a/tools/linguist/linguist/listviews.h +++ b/tools/linguist/linguist/listviews.h @@ -48,7 +48,7 @@ public: LVI( TQListViewItem *parent, TQString text = TQString::null ); virtual int compare( TQListViewItem *other, int column, bool ascending ) const; - virtual bool danger() const { return FALSE; } + virtual bool danger() const { return false; } protected: void drawObsoleteText( TQPainter * p, const TQColorGroup & cg, int column, diff --git a/tools/linguist/linguist/main.cpp b/tools/linguist/linguist/main.cpp index 927047769..2f7fae0e3 100644 --- a/tools/linguist/linguist/main.cpp +++ b/tools/linguist/linguist/main.cpp @@ -52,7 +52,7 @@ int main( int argc, char **argv ) translator.load( TQString( "linguist_" ) + TQTextCodec::locale(), "." ); app.installTranslator( &translator ); - bool showSplash = TRUE; + bool showSplash = true; TQString keybase("/TQt Linguist/3.1/"); TQSettings config; @@ -77,7 +77,7 @@ int main( int argc, char **argv ) if ( app.argc() > 1 ) tw->openFile( TQString(app.argv()[app.argc() - 1]) ); - if ( config.readBoolEntry( keybase + "Geometry/MainwindowMaximized", FALSE ) ) + if ( config.readBoolEntry( keybase + "Geometry/MainwindowMaximized", false ) ) tw->showMaximized(); else tw->show(); diff --git a/tools/linguist/linguist/msgedit.cpp b/tools/linguist/linguist/msgedit.cpp index 5d2a785ea..1268847a1 100644 --- a/tools/linguist/linguist/msgedit.cpp +++ b/tools/linguist/linguist/msgedit.cpp @@ -148,7 +148,7 @@ void ShadowWidget::setWidget( TQWidget * child ) { childWgt = child; if ( childWgt && childWgt->parent() != this ) { - childWgt->reparent( this, TQPoint( 0, 0 ), TRUE ); + childWgt->reparent( this, TQPoint( 0, 0 ), true ); } } @@ -220,7 +220,7 @@ EditorPage::EditorPage( TQWidget * parent, const char * name ) transLbl = new TQLabel( tr("Translation"), this, "translation label" ); TQFont fnt = font(); - fnt.setBold( TRUE ); + fnt.setBold( true ); srcTextLbl->setFont( fnt ); transLbl->setFont( fnt ); @@ -381,7 +381,7 @@ void EditorPage::fontChange( const TQFont & ) { TQFont fnt = font(); - fnt.setBold( TRUE ); + fnt.setBold( true ); TQFontMetrics fm( fnt ); srcTextLbl->setFont( fnt ); srcTextLbl->resize( fm.width( srcTextLbl->text() ), srcTextLbl->height() ); @@ -400,7 +400,7 @@ MessageEditor::MessageEditor( MetaTranslator * t, TQWidget * parent, : TQWidget( parent, name ), tor( t ) { - doGuesses = TRUE; + doGuesses = true; v = new TQVBoxLayout( this ); topDock = new TQDockArea( TQt::Horizontal, TQDockArea::Normal, this, "top dock area" ); @@ -412,20 +412,20 @@ MessageEditor::MessageEditor( MetaTranslator * t, TQWidget * parent, "top dock window" ); TQMainWindow *mw = (TQMainWindow*)topLevelWidget(); if ( mw ) { - mw->setDockEnabled( topDockWnd, TQt::DockTop, TRUE ); - mw->setDockEnabled( topDockWnd, TQt::DockLeft, TRUE ); - mw->setDockEnabled( topDockWnd, TQt::DockRight, TRUE ); - mw->setDockEnabled( topDockWnd, TQt::DockBottom, TRUE ); + mw->setDockEnabled( topDockWnd, TQt::DockTop, true ); + mw->setDockEnabled( topDockWnd, TQt::DockLeft, true ); + mw->setDockEnabled( topDockWnd, TQt::DockRight, true ); + mw->setDockEnabled( topDockWnd, TQt::DockBottom, true ); } topDockWnd->setCaption( tr("Source text") ); topDockWnd->setCloseMode( TQDockWindow::Always ); - topDockWnd->setResizeEnabled( TRUE ); + topDockWnd->setResizeEnabled( true ); topDockWnd->setFixedExtentHeight( 110 ); srcTextList = new TQListView( topDockWnd, "source text list view" ); - srcTextList->setShowSortIndicator( TRUE ); - srcTextList->setAllColumnsShowFocus( TRUE ); + srcTextList->setShowSortIndicator( true ); + srcTextList->setAllColumnsShowFocus( true ); srcTextList->setSorting( 0 ); TQFontMetrics fm( font() ); srcTextList->addColumn( tr("Done"), fm.width( tr("Done") ) + 10 ); @@ -433,7 +433,7 @@ MessageEditor::MessageEditor( MetaTranslator * t, TQWidget * parent, srcTextList->addColumn( tr("Translation"), 300 ); srcTextList->setColumnAlignment( 0, TQt::AlignCenter ); srcTextList->setColumnWidthMode( 1, TQListView::Manual ); - srcTextList->header()->setStretchEnabled( TRUE, 1 ); + srcTextList->header()->setStretchEnabled( true, 1 ); srcTextList->setMinimumSize( TQSize( 50, 50 ) ); srcTextList->setHScrollBarMode( TQScrollView::AlwaysOff ); srcTextList->installEventFilter( this ); @@ -463,14 +463,14 @@ MessageEditor::MessageEditor( MetaTranslator * t, TQWidget * parent, bottomDockWnd = new TQDockWindow( TQDockWindow::InDock, bottomDock, "bottom dock window" ); if ( mw ) { - mw->setDockEnabled( bottomDockWnd, TQt::DockTop, TRUE ); - mw->setDockEnabled( bottomDockWnd, TQt::DockLeft, TRUE ); - mw->setDockEnabled( bottomDockWnd, TQt::DockRight, TRUE ); - mw->setDockEnabled( bottomDockWnd, TQt::DockBottom, TRUE ); + mw->setDockEnabled( bottomDockWnd, TQt::DockTop, true ); + mw->setDockEnabled( bottomDockWnd, TQt::DockLeft, true ); + mw->setDockEnabled( bottomDockWnd, TQt::DockRight, true ); + mw->setDockEnabled( bottomDockWnd, TQt::DockBottom, true ); } bottomDockWnd->setCaption( tr("Phrases") ); bottomDockWnd->setCloseMode( TQDockWindow::Always ); - bottomDockWnd->setResizeEnabled( TRUE ); + bottomDockWnd->setResizeEnabled( true ); TQWidget * w = new TQWidget( bottomDockWnd ); w->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, @@ -538,9 +538,9 @@ MessageEditor::MessageEditor( MetaTranslator * t, TQWidget * parent, void MessageEditor::toggleFinished() { if ( itemFinished ) - itemFinished = FALSE; + itemFinished = false; else - itemFinished = TRUE; + itemFinished = true; emit finished( itemFinished ); } @@ -558,7 +558,7 @@ bool MessageEditor::eventFilter( TQObject *o, TQEvent *e ) // inside the editor if ( k == Key_BackTab ) { emit focusSourceList(); - return TRUE; + return true; } } else if ( e->type() == TQEvent::KeyRelease ) { MED * ed = (MED *) o; @@ -620,12 +620,12 @@ TQListView * MessageEditor::phraseList() const void MessageEditor::showNothing() { editorPage->srcText->setText( "" ); - showContext( TQString(""), FALSE ); + showContext( TQString(""), false ); } void MessageEditor::showContext( const TQString& context, bool finished ) { - setEditionEnabled( FALSE ); + setEditionEnabled( false ); sourceText = TQString::null; guesses.clear(); @@ -633,7 +633,7 @@ void MessageEditor::showContext( const TQString& context, bool finished ) editorPage->cmtText->setText(""); else editorPage->cmtText->setText( richText(context.simplifyWhiteSpace()) ); - setTranslation( TQString(""), FALSE ); + setTranslation( TQString(""), false ); setFinished( finished ); phraseLv->clear(); editorPage->handleSourceChanges(); @@ -667,7 +667,7 @@ void MessageEditor::showMessage( const TQString& text, else editorPage->cmtText->setText( "" ); - setTranslation( translation, FALSE ); + setTranslation( translation, false ); setFinished( type != MetaTranslatorMessage::Unfinished ); TQValueList<Phrase>::ConstIterator p; phraseLv->clear(); @@ -706,11 +706,11 @@ void MessageEditor::setTranslation( const TQString& translation, bool emitt ) // the actual translation. editorPage->translationMed->blockSignals( !emitt ); editorPage->translationMed->setText( translation ); - editorPage->translationMed->blockSignals( FALSE ); + editorPage->translationMed->blockSignals( false ); if ( !emitt ) updateButtons(); - emit cutAvailable( FALSE ); - emit copyAvailable( FALSE ); + emit cutAvailable( false ); + emit copyAvailable( false ); } void MessageEditor::setEditionEnabled( bool enabled ) @@ -790,21 +790,21 @@ void MessageEditor::updateButtons() bool overwrite = ( !editorPage->translationMed->isReadOnly() && (editorPage->translationMed->text().stripWhiteSpace().isEmpty() || mayOverwriteTranslation) ); - mayOverwriteTranslation = FALSE; + mayOverwriteTranslation = false; emit updateActions( overwrite ); } void MessageEditor::beginFromSource() { - mayOverwriteTranslation = TRUE; - setTranslation( sourceText, TRUE ); + mayOverwriteTranslation = true; + setTranslation( sourceText, true ); if ( !editorPage->hasFocus() ) editorPage->setFocus(); } void MessageEditor::finishAndNext() { - setFinished( TRUE ); + setFinished( true ); emit nextUnfinished(); if ( !editorPage->hasFocus() ) editorPage->setFocus(); diff --git a/tools/linguist/linguist/phrase.cpp b/tools/linguist/linguist/phrase.cpp index 0a93e89b8..f2b5a458f 100644 --- a/tools/linguist/linguist/phrase.cpp +++ b/tools/linguist/linguist/phrase.cpp @@ -99,7 +99,7 @@ bool QphHandler::startElement( const TQString& /* namespaceURI */, definition.truncate( 0 ); } accum.truncate( 0 ); - return TRUE; + return true; } bool QphHandler::endElement( const TQString& /* namespaceURI */, @@ -114,13 +114,13 @@ bool QphHandler::endElement( const TQString& /* namespaceURI */, definition = accum; else if ( qName == TQString("phrase") ) pb->append( Phrase(source, target, definition) ); - return TRUE; + return true; } bool QphHandler::characters( const TQString& ch ) { accum += ch; - return TRUE; + return true; } bool QphHandler::fatalError( const TQXmlParseException& exception ) @@ -133,23 +133,23 @@ bool QphHandler::fatalError( const TQXmlParseException& exception ) TQMessageBox::information( tqApp->mainWidget(), TQObject::tr("TQt Linguist"), msg ); } - return FALSE; + return false; } bool PhraseBook::load( const TQString& filename ) { TQFile f( filename ); if ( !f.open(IO_ReadOnly) ) - return FALSE; + return false; TQTextStream t( &f ); TQXmlInputSource in( t ); TQXmlSimpleReader reader; // don't click on these! - reader.setFeature( "http://xml.org/sax/features/namespaces", FALSE ); - reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", TRUE ); + reader.setFeature( "http://xml.org/sax/features/namespaces", false ); + reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", true ); reader.setFeature( "http://trolltech.com/xml/features/report-whitespace" - "-only-CharData", FALSE ); + "-only-CharData", false ); TQXmlDefaultHandler *hand = new QphHandler( this ); reader.setContentHandler( hand ); reader.setErrorHandler( hand ); @@ -168,7 +168,7 @@ bool PhraseBook::save( const TQString& filename ) const { TQFile f( filename ); if ( !f.open(IO_WriteOnly) ) - return FALSE; + return false; TQTextStream t( &f ); t.setEncoding(TQTextStream::UnicodeUTF8); @@ -185,5 +185,5 @@ bool PhraseBook::save( const TQString& filename ) const } t << "</TQPH>\n"; f.close(); - return TRUE; + return true; } diff --git a/tools/linguist/linguist/phrasebookbox.cpp b/tools/linguist/linguist/phrasebookbox.cpp index cefac1b34..67106bceb 100644 --- a/tools/linguist/linguist/phrasebookbox.cpp +++ b/tools/linguist/linguist/phrasebookbox.cpp @@ -69,10 +69,10 @@ PhraseBookBox::PhraseBookBox( const TQString& filename, lv = new PhraseLV( this, "phrase book list view" ); newBut = new TQPushButton( tr("&New Phrase"), this ); - newBut->setDefault( TRUE ); + newBut->setDefault( true ); removeBut = new TQPushButton( tr("&Remove Phrase"), this ); - removeBut->setEnabled( FALSE ); + removeBut->setEnabled( false ); TQPushButton *saveBut = new TQPushButton( tr("&Save"), this ); TQPushButton *closeBut = new TQPushButton( tr("Close"), this ); @@ -208,7 +208,7 @@ void PhraseBookBox::selectionChanged( TQListViewItem * /* item */ ) void PhraseBookBox::selectItem( TQListViewItem *item ) { - lv->setSelected( item, TRUE ); + lv->setSelected( item, true ); lv->ensureItemVisible( item ); } @@ -216,9 +216,9 @@ void PhraseBookBox::enableDisable() { TQListViewItem *item = lv->currentItem(); - sourceLed->blockSignals( TRUE ); - targetLed->blockSignals( TRUE ); - definitionLed->blockSignals( TRUE ); + sourceLed->blockSignals( true ); + targetLed->blockSignals( true ); + definitionLed->blockSignals( true ); if ( item == 0 ) { sourceLed->setText( TQString::null ); @@ -234,9 +234,9 @@ void PhraseBookBox::enableDisable() definitionLed->setEnabled( item != 0 ); removeBut->setEnabled( item != 0 ); - sourceLed->blockSignals( FALSE ); - targetLed->blockSignals( FALSE ); - definitionLed->blockSignals( FALSE ); + sourceLed->blockSignals( false ); + targetLed->blockSignals( false ); + definitionLed->blockSignals( false ); TQLineEdit *led = ( sourceLed->text() == NewPhrase ? sourceLed : targetLed ); led->setFocus(); diff --git a/tools/linguist/linguist/phrasebookbox.h b/tools/linguist/linguist/phrasebookbox.h index 99edb9f81..e93383920 100644 --- a/tools/linguist/linguist/phrasebookbox.h +++ b/tools/linguist/linguist/phrasebookbox.h @@ -51,7 +51,7 @@ class PhraseBookBox : public TQDialog public: PhraseBookBox( const TQString& filename, const PhraseBook& phraseBook, TQWidget *parent = 0, const char *name = 0, - bool modal = FALSE ); + bool modal = false ); const PhraseBook& phraseBook() const { return pb; } diff --git a/tools/linguist/linguist/phraselv.cpp b/tools/linguist/linguist/phraselv.cpp index 92757cd84..76de52663 100644 --- a/tools/linguist/linguist/phraselv.cpp +++ b/tools/linguist/linguist/phraselv.cpp @@ -149,14 +149,14 @@ TQString PhraseLVI::makeKey( const TQString& text ) const PhraseLV::PhraseLV( TQWidget *parent, const char *name ) : TQListView( parent, name ) { - setAllColumnsShowFocus( TRUE ); - setShowSortIndicator( TRUE ); + setAllColumnsShowFocus( true ); + setShowSortIndicator( true ); for ( int i = 0; i < 3; i++ ) addColumn( TQString::null, 120 ); setColumnText( PhraseLVI::SourceTextShown, tr("Source phrase") ); setColumnText( PhraseLVI::TargetTextShown, tr("Translation") ); setColumnText( PhraseLVI::DefinitionText, tr("Definition") ); - header()->setStretchEnabled( TRUE, -1 ); + header()->setStretchEnabled( true, -1 ); what = new WhatPhrase( this ); } diff --git a/tools/linguist/linguist/printout.cpp b/tools/linguist/linguist/printout.cpp index 321e8de2d..e1eb58949 100644 --- a/tools/linguist/linguist/printout.cpp +++ b/tools/linguist/linguist/printout.cpp @@ -99,7 +99,7 @@ void PrintOut::flushLine( bool /* mayBreak */ ) nextRule = NoRule; cp = Paragraph( TQPoint(hmargin, voffset) ); - firstParagraph = FALSE; + firstParagraph = false; } void PrintOut::addBox( int percent, const TQString& text, Style style, @@ -108,9 +108,9 @@ void PrintOut::addBox( int percent, const TQString& text, Style style, int align = halign | TQt::AlignTop; TQFont f = f10; if ( style == Strong ) - f.setBold( TRUE ); + f.setBold( true ); else if ( style == Emphasis ) - f.setItalic( TRUE ); + f.setItalic( true ); int wd = hsize * percent / 100; TQRect r( cp.rect.x() + cp.rect.width(), 0, wd, vsize ); int ht = p.boundingRect( r, align, text ).height(); @@ -151,7 +151,7 @@ void PrintOut::breakPage() voffset += 4; p.drawLine( TQPoint(hmargin, voffset), TQPoint(hmargin + hsize, voffset) ); voffset += 14; - firstParagraph = TRUE; + firstParagraph = true; } void PrintOut::drawRule( Rule rule ) diff --git a/tools/linguist/linguist/printout.h b/tools/linguist/linguist/printout.h index bba3da6af..e8c61c9ee 100644 --- a/tools/linguist/linguist/printout.h +++ b/tools/linguist/linguist/printout.h @@ -56,7 +56,7 @@ public: void setRule( Rule rule ); void setGuide( const TQString& guide ); void vskip(); - void flushLine( bool mayBreak = FALSE ); + void flushLine( bool mayBreak = false ); void addBox( int percent, const TQString& text = TQString::null, Style style = Normal, int halign = TQt::AlignLeft | TQt::WordBreak ); diff --git a/tools/linguist/linguist/trwindow.cpp b/tools/linguist/linguist/trwindow.cpp index 7b3ce9880..b95aad30e 100644 --- a/tools/linguist/linguist/trwindow.cpp +++ b/tools/linguist/linguist/trwindow.cpp @@ -163,9 +163,9 @@ class Action : public TQAction public: Action( TQPopupMenu *pop, const TQString& menuText, TQObject *receiver, const char *member, const TQString &imageName = TQString::null, - int accel = 0, bool toggle = FALSE ); + int accel = 0, bool toggle = false ); Action( TQPopupMenu *pop, const TQString& menuText, int accel = 0, - bool toggle = FALSE ); + bool toggle = false ); virtual void setWhatsThis( const TQString& whatsThis ); @@ -220,7 +220,7 @@ const TQPixmap TrWindow::pageCurl() pixmap = TQPixmap::fromMimeSource( "pagecurl.png" ); if ( !pixmap.isNull() ) { TQBitmap pageCurlMask( pagecurl_mask_width, pagecurl_mask_height, - pagecurl_mask_bits, TRUE ); + pagecurl_mask_bits, true ); pixmap.setMask( pageCurlMask ); } @@ -244,15 +244,15 @@ TrWindow::TrWindow() // Set up the Scope dock window TQDockWindow * dwScope = new TQDockWindow( TQDockWindow::InDock, this, "context"); - dwScope->setResizeEnabled( TRUE ); + dwScope->setResizeEnabled( true ); dwScope->setCloseMode( TQDockWindow::Always ); addDockWindow( dwScope, tr("Context"), TQt::DockLeft ); dwScope->setCaption( tr("Context") ); dwScope->setFixedExtentWidth( 200 ); lv = new TQListView( dwScope, "context list view" ); - lv->setShowSortIndicator( TRUE ); - lv->setAllColumnsShowFocus( TRUE ); - lv->header()->setStretchEnabled( TRUE, 1 ); + lv->setShowSortIndicator( true ); + lv->setAllColumnsShowFocus( true ); + lv->header()->setStretchEnabled( true, 1 ); TQFontMetrics fm( font() ); lv->addColumn( tr("Done"), fm.width( tr("Done") ) + 10 ); lv->addColumn( tr("Context") ); @@ -263,7 +263,7 @@ TrWindow::TrWindow() lv->setHScrollBarMode( TQScrollView::AlwaysOff ); dwScope->setWidget( lv ); - messageIsShown = FALSE; + messageIsShown = false; me = new MessageEditor( &tor, this, "message editor" ); setCentralWidget( me ); slv = me->sourceTextList(); @@ -273,10 +273,10 @@ TrWindow::TrWindow() setupToolBars(); progress = new TQLabel( statusBar(), "progress" ); - statusBar()->addWidget( progress, 0, TRUE ); + statusBar()->addWidget( progress, 0, true ); modified = new TQLabel( TQString(" %1 ").arg(tr("MOD")), statusBar(), "modified?" ); - statusBar()->addWidget( modified, 0, TRUE ); + statusBar()->addWidget( modified, 0, true ); dirtyItem = -1; numFinished = 0; @@ -284,16 +284,16 @@ TrWindow::TrWindow() numMessages = 0; updateProgress(); - dirty = FALSE; + dirty = false; updateCaption(); - phraseBooks.setAutoDelete( TRUE ); + phraseBooks.setAutoDelete( true ); - f = new FindDialog( FALSE, this, "find", FALSE ); + f = new FindDialog( false, this, "find", false ); f->setCaption( tr("TQt Linguist") ); - h = new FindDialog( TRUE, this, "replace", FALSE ); + h = new FindDialog( true, this, "replace", false ); h->setCaption( tr("TQt Linguist") ); - findMatchCase = FALSE; + findMatchCase = false; findWhere = 0; foundItem = 0; foundScope = 0; @@ -355,14 +355,14 @@ void TrWindow::openFile( const TQString& name ) slv->clear(); slv->repaint(); slv->viewport()->repaint(); - slv->setUpdatesEnabled( FALSE ); - slv->viewport()->setUpdatesEnabled( FALSE ); + slv->setUpdatesEnabled( false ); + slv->viewport()->setUpdatesEnabled( false ); lv->clear(); lv->repaint(); lv->viewport()->repaint(); - lv->setUpdatesEnabled( FALSE ); - lv->viewport()->setUpdatesEnabled( FALSE ); - setEnabled( FALSE ); + lv->setUpdatesEnabled( false ); + lv->viewport()->setUpdatesEnabled( false ); + setEnabled( false ); numFinished = 0; numNonobsolete = 0; numMessages = 0; @@ -409,22 +409,22 @@ void TrWindow::openFile( const TQString& name ) } c->updateStatus(); } - slv->viewport()->setUpdatesEnabled( TRUE ); - slv->setUpdatesEnabled( TRUE ); - lv->viewport()->setUpdatesEnabled( TRUE ); - lv->setUpdatesEnabled( TRUE ); - setEnabled( TRUE ); + slv->viewport()->setUpdatesEnabled( true ); + slv->setUpdatesEnabled( true ); + lv->viewport()->setUpdatesEnabled( true ); + lv->setUpdatesEnabled( true ); + setEnabled( true ); slv->repaint(); slv->viewport()->repaint(); lv->triggerUpdate(); updateProgress(); filename = name; - dirty = FALSE; + dirty = false; updateCaption(); me->showNothing(); - doneAndNextAct->setEnabled( FALSE ); - doneAndNextAlt->setEnabled( FALSE ); - messageIsShown = FALSE; + doneAndNextAct->setEnabled( false ); + doneAndNextAlt->setEnabled( false ); + messageIsShown = false; statusBar()->message( tr("%1 source phrase(s) loaded.").arg(numMessages), MessageMS ); @@ -433,10 +433,10 @@ void TrWindow::openFile( const TQString& name ) foundWhere = 0; foundOffset = 0; if ( lv->childCount() > 0 ) { - findAct->setEnabled( TRUE ); - findAgainAct->setEnabled( FALSE ); + findAct->setEnabled( true ); + findAgainAct->setEnabled( false ); #ifdef notyet - replaceAct->setEnabled( TRUE ); + replaceAct->setEnabled( true ); #endif lv->setCurrentItem( lv->firstChild() ); } @@ -467,7 +467,7 @@ void TrWindow::save() return; if ( tor.save(filename) ) { - dirty = FALSE; + dirty = false; updateCaption(); statusBar()->message( tr("File saved."), MessageMS ); } else { @@ -560,7 +560,7 @@ void TrWindow::print() pout.addBox( 4 ); pout.addBox( 92, m->comment(), PrintOut::Emphasis ); } - pout.flushLine( TRUE ); + pout.flushLine( true ); if ( pout.pageNum() != pageNum ) { pageNum = pout.pageNum(); @@ -571,7 +571,7 @@ void TrWindow::print() } c = (ContextLVI *) c->nextSibling(); } - pout.flushLine( TRUE ); + pout.flushLine( true ); TQApplication::restoreOverrideCursor(); statusBar()->message( tr("Printing completed"), MessageMS ); } else { @@ -607,7 +607,7 @@ void TrWindow::findAgain() #else foundOffset++; #endif - slv->setUpdatesEnabled( FALSE ); + slv->setUpdatesEnabled( false ); do { // Iterate through every item in all contexts if ( j == 0 ) { @@ -680,7 +680,7 @@ void TrWindow::findAgain() setCurrentMessageItem( slv->firstChild() ); } - slv->setUpdatesEnabled( TRUE ); + slv->setUpdatesEnabled( true ); slv->triggerUpdate(); tqApp->beep(); TQMessageBox::warning( this, tr("TQt Linguist"), @@ -734,13 +734,13 @@ bool TrWindow::searchItem( const TQString & searchWhat, TQListViewItem * j, foundItem = itemToIndex( slv, k ); foundScope = j; setCurrentMessageItem( k ); - slv->setUpdatesEnabled( TRUE ); + slv->setUpdatesEnabled( true ); slv->triggerUpdate(); - return TRUE; + return true; } } foundOffset = 0; - return FALSE; + return false; } void TrWindow::newPhraseBook() @@ -800,7 +800,7 @@ void TrWindow::editPhraseBook( int id ) { int index = editPhraseBookp->indexOf( id ); PhraseBookBox box( phraseBookNames[index], *phraseBooks.at(index), this, - "phrase book box", TRUE ); + "phrase book box", true ); box.setCaption( tr("%1 - %2").arg(tr("TQt Linguist")) .arg(friendlyPhraseBookName(index)) ); box.resize( 500, 300 ); @@ -835,9 +835,9 @@ void TrWindow::printPhraseBook( int id ) .arg(pageNum) ); } pout.setRule( PrintOut::NoRule ); - pout.flushLine( TRUE ); + pout.flushLine( true ); } - pout.flushLine( TRUE ); + pout.flushLine( true ); statusBar()->message( tr("Printing completed"), MessageMS ); } else { statusBar()->message( tr("Printing aborted"), MessageMS ); @@ -858,7 +858,7 @@ void TrWindow::manual() void TrWindow::about() { - AboutDialog about( this, 0, TRUE ); + AboutDialog about( this, 0, true ); about.versionLabel->setText( tr("Version %1").arg(TQT_VERSION_STR) ); about.exec(); } @@ -895,7 +895,7 @@ bool TrWindow::maybeSave() TQMessageBox::Cancel | TQMessageBox::Escape ) ) { case TQMessageBox::Cancel: - return FALSE; + return false; case TQMessageBox::Yes: save(); return !dirty; @@ -903,7 +903,7 @@ bool TrWindow::maybeSave() break; } } - return TRUE; + return true; } void TrWindow::updateCaption() @@ -939,14 +939,14 @@ void TrWindow::showNewScope( TQListViewItem *item ) if( item != 0 ) { ContextLVI * c = (ContextLVI *) item; bool upe = slv->isUpdatesEnabled(); - slv->setUpdatesEnabled( FALSE ); - slv->viewport()->setUpdatesEnabled( FALSE ); + slv->setUpdatesEnabled( false ); + slv->viewport()->setUpdatesEnabled( false ); if ( oldContext != 0 ) { MessageLVI * tmp; - slv->blockSignals( TRUE ); + slv->blockSignals( true ); while ( (tmp = (MessageLVI *) slv->firstChild()) != 0 ) oldContext->appendMessageItem( slv, tmp ); - slv->blockSignals( FALSE ); + slv->blockSignals( false ); } MessageLVI * tmp; while ( c->messageItemsInList() ) { @@ -980,7 +980,7 @@ void TrWindow::showNewCurrent( TQListViewItem *item ) getPhrases(m->sourceText()) ); if ( (m->message().type() != MetaTranslatorMessage::Finished) && m->danger() ) - danger( m->sourceText(), m->translation(), TRUE ); + danger( m->sourceText(), m->translation(), true ); else statusBar()->clear(); @@ -991,7 +991,7 @@ void TrWindow::showNewCurrent( TQListViewItem *item ) me->showNothing(); else me->showContext( c->fullContext(), c->finished() ); - doneAndNextAct->setEnabled( FALSE ); + doneAndNextAct->setEnabled( false ); } doneAndNextAlt->setEnabled( doneAndNextAct->isEnabled() ); @@ -1007,16 +1007,16 @@ void TrWindow::updateTranslation( const TQString& translation ) bool dngr; m->setTranslation( translation ); if ( m->finished() && - (dngr = danger( m->sourceText(), m->translation(), TRUE )) ) { + (dngr = danger( m->sourceText(), m->translation(), true )) ) { numFinished -= 1; m->setDanger( dngr ); - m->setFinished( FALSE ); + m->setFinished( false ); m->contextLVI()->updateStatus(); updateProgress(); } tor.insert( m->message() ); if ( !dirty ) { - dirty = TRUE; + dirty = true; updateCaption(); } m->updateTranslationText(); @@ -1041,7 +1041,7 @@ void TrWindow::updateFinished( bool finished ) tqApp->beep(); tor.insert( m->message() ); if ( !dirty ) { - dirty = TRUE; + dirty = true; updateCaption(); } } @@ -1051,10 +1051,10 @@ void TrWindow::updateFinished( bool finished ) void TrWindow::doneAndNext() { MessageLVI * m = (MessageLVI *) slv->currentItem(); - bool dngr = FALSE; + bool dngr = false; if ( !m ) return; - dngr = danger( m->sourceText(), m->translation(), TRUE ); + dngr = danger( m->sourceText(), m->translation(), true ); if ( !dngr ) { me->finishAndNext(); m->contextLVI()->updateStatus(); @@ -1063,7 +1063,7 @@ void TrWindow::doneAndNext() m->setDanger( dngr ); tor.insert( m->message() ); if ( !dirty ) { - dirty = TRUE; + dirty = true; updateCaption(); } tqApp->beep(); @@ -1076,10 +1076,10 @@ void TrWindow::toggleFinished( TQListViewItem *item, const TQPoint& /* p */, { if ( item != 0 && column == 0 ) { MessageLVI *m = (MessageLVI *) item; - bool dngr = FALSE; + bool dngr = false; if ( m->message().type() == MetaTranslatorMessage::Unfinished ) { - dngr = danger( m->sourceText(), m->translation(), TRUE ); + dngr = danger( m->sourceText(), m->translation(), true ); } if ( !dngr && m->message().type() != MetaTranslatorMessage::Obsolete) { setCurrentMessageItem( m ); @@ -1093,7 +1093,7 @@ void TrWindow::toggleFinished( TQListViewItem *item, const TQPoint& /* p */, tqApp->beep(); tor.insert( m->message() ); if ( !dirty ) { - dirty = TRUE; + dirty = true; updateCaption(); } } @@ -1348,7 +1348,7 @@ void TrWindow::findNext( const TQString& text, int where, bool matchCase ) findText = TQString( "magicwordthatyoushouldavoid" ); findWhere = where; findMatchCase = matchCase; - findAgainAct->setEnabled( TRUE ); + findAgainAct->setEnabled( true ); findAgain(); } @@ -1357,7 +1357,7 @@ void TrWindow::revalidate() ContextLVI *c = (ContextLVI *) lv->firstChild(); TQListViewItem * oldScope = lv->currentItem(); int oldItemNo = itemToIndex( slv, slv->currentItem() ); - slv->setUpdatesEnabled( FALSE ); + slv->setUpdatesEnabled( false ); while ( c != 0 ) { showNewScope( c ); @@ -1376,7 +1376,7 @@ void TrWindow::revalidate() if( tmp ) setCurrentMessageItem( tmp ); } - slv->setUpdatesEnabled( TRUE ); + slv->setUpdatesEnabled( true ); slv->triggerUpdate(); } @@ -1397,13 +1397,13 @@ void TrWindow::setupMenuBar() TQPopupMenu * editp = new TQPopupMenu( this ); TQPopupMenu * translationp = new TQPopupMenu( this ); TQPopupMenu * validationp = new TQPopupMenu( this ); - validationp->setCheckable( TRUE ); + validationp->setCheckable( true ); phrasep = new TQPopupMenu( this ); closePhraseBookp = new TQPopupMenu( this ); editPhraseBookp = new TQPopupMenu( this ); printPhraseBookp = new TQPopupMenu( this ); TQPopupMenu * viewp = new TQPopupMenu( this ); - viewp->setCheckable( TRUE ); + viewp->setCheckable( true ); TQPopupMenu * helpp = new TQPopupMenu( this ); m->insertItem( tr("&File"), filep ); @@ -1453,40 +1453,40 @@ void TrWindow::setupMenuBar() // Edit menu undoAct = new Action( editp, tr("&Undo"), me, TQ_SLOT(undo()), "undo.png", TQAccel::stringToKey(tr("Ctrl+Z")) ); - undoAct->setEnabled( FALSE ); + undoAct->setEnabled( false ); connect( me, TQ_SIGNAL(undoAvailable(bool)), undoAct, TQ_SLOT(setEnabled(bool)) ); redoAct = new Action( editp, tr("&Redo"), me, TQ_SLOT(redo()), "redo.png", TQAccel::stringToKey(tr("Ctrl+Y")) ); - redoAct->setEnabled( FALSE ); + redoAct->setEnabled( false ); connect( me, TQ_SIGNAL(redoAvailable(bool)), redoAct, TQ_SLOT(setEnabled(bool)) ); editp->insertSeparator(); cutAct = new Action( editp, tr("Cu&t"), me, TQ_SLOT(cut()), "editcut.png", TQAccel::stringToKey(tr("Ctrl+X")) ); - cutAct->setEnabled( FALSE ); + cutAct->setEnabled( false ); connect( me, TQ_SIGNAL(cutAvailable(bool)), cutAct, TQ_SLOT(setEnabled(bool)) ); copyAct = new Action( editp, tr("&Copy"), me, TQ_SLOT(copy()), "editcopy.png", TQAccel::stringToKey(tr("Ctrl+C")) ); - copyAct->setEnabled( FALSE ); + copyAct->setEnabled( false ); connect( me, TQ_SIGNAL(copyAvailable(bool)), copyAct, TQ_SLOT(setEnabled(bool)) ); pasteAct = new Action( editp, tr("&Paste"), me, TQ_SLOT(paste()), "editpaste.png", TQAccel::stringToKey(tr("Ctrl+V")) ); - pasteAct->setEnabled( FALSE ); + pasteAct->setEnabled( false ); connect( me, TQ_SIGNAL(pasteAvailable(bool)), pasteAct, TQ_SLOT(setEnabled(bool)) ); selectAllAct = new Action( editp, tr("Select &All"), me, TQ_SLOT(selectAll()), TQString::null, TQAccel::stringToKey(tr("Ctrl+A")) ); - selectAllAct->setEnabled( FALSE ); + selectAllAct->setEnabled( false ); editp->insertSeparator(); findAct = new Action( editp, tr("&Find..."), this, TQ_SLOT(find()), "searchfind.png", TQAccel::stringToKey(tr("Ctrl+F")) ); - findAct->setEnabled( FALSE ); + findAct->setEnabled( false ); findAgainAct = new Action( editp, tr("Find &Next"), this, TQ_SLOT(findAgain()), TQString::null, Key_F3 ); - findAgainAct->setEnabled( FALSE ); + findAgainAct->setEnabled( false ); #ifdef notyet replaceAct = new Action( editp, tr("&Replace..."), this, TQ_SLOT(replace()), TQAccel::stringToKey(tr("Ctrl+H")) ); - replaceAct->setEnabled( FALSE ); + replaceAct->setEnabled( false ); #endif // Translation menu @@ -1534,24 +1534,24 @@ void TrWindow::setupMenuBar() // Validation menu acceleratorsAct = new Action( validationp, tr("&Accelerators"), - this, TQ_SLOT(revalidate()), "accelerator.png", 0, TRUE ); - acceleratorsAct->setOn( TRUE ); + this, TQ_SLOT(revalidate()), "accelerator.png", 0, true ); + acceleratorsAct->setOn( true ); endingPunctuationAct = new Action( validationp, tr("&Ending Punctuation"), - this, TQ_SLOT(revalidate()), "punctuation.png", 0, TRUE ); - endingPunctuationAct->setOn( TRUE ); + this, TQ_SLOT(revalidate()), "punctuation.png", 0, true ); + endingPunctuationAct->setOn( true ); phraseMatchesAct = new Action( validationp, tr("&Phrase Matches"), - this, TQ_SLOT(revalidate()), "phrase.png", 0, TRUE ); - phraseMatchesAct->setOn( TRUE ); + this, TQ_SLOT(revalidate()), "phrase.png", 0, true ); + phraseMatchesAct->setOn( true ); // View menu revertSortingAct = new Action( viewp, tr("&Revert Sorting"), this, TQ_SLOT(revertSorting()) ); doGuessesAct = new Action( viewp, tr("&Display guesses"), this, TQ_SLOT(toggleGuessing()) ); - doGuessesAct->setToggleAction( TRUE ); - doGuessesAct->setOn( TRUE ); + doGuessesAct->setToggleAction( true ); + doGuessesAct->setOn( true ); toggleStats = new Action( viewp, tr("&Statistics"), this, TQ_SLOT(toggleStatistics()) ); - toggleStats->setToggleAction( TRUE ); + toggleStats->setToggleAction( true ); viewp->insertSeparator(); viewp->insertItem( tr("Vie&ws"), createDockWindowMenu( NoToolBars ) ); viewp->insertItem( tr("&Toolbars"), createDockWindowMenu( OnlyToolBars ) ); @@ -1676,13 +1676,13 @@ void TrWindow::setupToolBars() void TrWindow::setCurrentContextItem( TQListViewItem *item ) { lv->ensureItemVisible( item ); - lv->setSelected( item, TRUE ); + lv->setSelected( item, true ); } void TrWindow::setCurrentMessageItem( TQListViewItem *item ) { slv->ensureItemVisible( item ); - slv->setSelected( item, TRUE ); + slv->setSelected( item, true ); } TQString TrWindow::friendlyPhraseBookName( int k ) @@ -1697,7 +1697,7 @@ bool TrWindow::openPhraseBook( const TQString& name ) TQMessageBox::warning( this, tr("TQt Linguist"), tr("Cannot read from phrase book '%1'.") .arg(name) ); - return FALSE; + return false; } int index = (int) phraseBooks.count(); @@ -1712,7 +1712,7 @@ bool TrWindow::openPhraseBook( const TQString& name ) printPhraseBookp->setWhatsThis( id, tr("Print the entries of the phrase" " book.") ); updatePhraseDict(); - return TRUE; + return true; } bool TrWindow::savePhraseBook( TQString& name, const PhraseBook& pb ) @@ -1724,9 +1724,9 @@ bool TrWindow::savePhraseBook( TQString& name, const PhraseBook& pb ) TQMessageBox::warning( this, tr("TQt Linguist"), tr("Cannot create phrase book '%1'.") .arg(name) ); - return FALSE; + return false; } - return TRUE; + return true; } void TrWindow::updateProgress() @@ -1796,12 +1796,12 @@ bool TrWindow::danger( const TQString& source, const TQString& translation, if ( verbose ) statusBar()->message( tr("Accelerator possibly superfluous in" " translation."), ErrorMS ); - return TRUE; + return true; } else if ( sk != 0 && tk == 0 ) { if ( verbose ) statusBar()->message( tr("Accelerator possibly missing in" " translation."), ErrorMS ); - return TRUE; + return true; } } if ( endingPunctuationAct->isOn() ) { @@ -1810,7 +1810,7 @@ bool TrWindow::danger( const TQString& source, const TQString& translation, statusBar()->message( tr("Translation does not end with the" " same punctuation as the source" " text."), ErrorMS ); - return TRUE; + return true; } } if ( phraseMatchesAct->isOn() ) { @@ -1833,7 +1833,7 @@ bool TrWindow::danger( const TQString& source, const TQString& translation, statusBar()->message( tr("A phrase book suggestion for" " '%1' was ignored.") .arg(*w), ErrorMS ); - return TRUE; + return true; } } } @@ -1841,7 +1841,7 @@ bool TrWindow::danger( const TQString& source, const TQString& translation, if ( verbose ) statusBar()->clear(); - return FALSE; + return false; } void TrWindow::readConfig() @@ -1855,7 +1855,7 @@ void TrWindow::readConfig() TQRect r( pos(), size() ); recentFiles = config.readListEntry( keybase + "RecentlyOpenedFiles" ); - if ( !config.readBoolEntry( keybase + "Geometry/MainwindowMaximized", FALSE ) ) { + if ( !config.readBoolEntry( keybase + "Geometry/MainwindowMaximized", false ) ) { r.setX( config.readNumEntry( keybase + "Geometry/MainwindowX", r.x() ) ); r.setY( config.readNumEntry( keybase + "Geometry/MainwindowY", r.y() ) ); r.setWidth( config.readNumEntry( keybase + "Geometry/MainwindowWidth", r.width() ) ); @@ -2055,15 +2055,15 @@ void TrWindow::countStats( TQListViewItem* ci, TQListViewItem* mi, int& trW, int void TrWindow::doCharCounting( const TQString& text, int& trW, int& trC, int& trCS ) { trCS += text.length(); - bool inWord = FALSE; + bool inWord = false; for ( int i = 0; i < (int) text.length(); i++ ) { if ( text[i].isLetterOrNumber() || text[i] == TQChar('_') ) { if ( !inWord ) { trW++; - inWord = TRUE; + inWord = true; } } else { - inWord = FALSE; + inWord = false; } if ( !text[i].isSpace() ) trC++; diff --git a/tools/linguist/linguist/trwindow.h b/tools/linguist/linguist/trwindow.h index 82fc4ec10..e1d5087c9 100644 --- a/tools/linguist/linguist/trwindow.h +++ b/tools/linguist/linguist/trwindow.h @@ -145,7 +145,7 @@ private: void updatePhraseDict(); PhraseBook getPhrases( const TQString& source ); bool danger( const TQString& source, const TQString& translation, - bool verbose = FALSE ); + bool verbose = false ); int itemToIndex( TQListView * view, TQListViewItem * item ); TQListViewItem * indexToItem( TQListView * view, int index ); diff --git a/tools/linguist/lrelease/main.cpp b/tools/linguist/lrelease/main.cpp index 587f62104..6671045e2 100644 --- a/tools/linguist/lrelease/main.cpp +++ b/tools/linguist/lrelease/main.cpp @@ -104,9 +104,9 @@ static void releaseTsFile( const TQString& tsFileName, bool verbose, int main( int argc, char **argv ) { - bool verbose = FALSE; - bool stripped = TRUE; - bool metTranslations = FALSE; + bool verbose = false; + bool stripped = true; + bool metTranslations = false; MetaTranslator tor; TQString outputFile; int numFiles = 0; @@ -114,10 +114,10 @@ int main( int argc, char **argv ) for ( i = 1; i < argc; i++ ) { if ( qstrcmp(argv[i], "-nocompress") == 0 ) { - stripped = FALSE; + stripped = false; continue; } else if ( qstrcmp(argv[i], "-verbose") == 0 ) { - verbose = TRUE; + verbose = true; continue; } else if ( qstrcmp(argv[i], "-version") == 0 ) { fprintf( stderr, "lrelease version %s\n", TQT_VERSION_STR ); @@ -182,7 +182,7 @@ int main( int argc, char **argv ) for ( t = toks.begin(); t != toks.end(); ++t ) { if ( it.key() == TQString("TRANSLATIONS") ) { - metTranslations = TRUE; + metTranslations = true; releaseTsFile( *t, verbose, stripped ); } } diff --git a/tools/linguist/lupdate/fetchtr.cpp b/tools/linguist/lupdate/fetchtr.cpp index c5ed953b0..80ec37094 100644 --- a/tools/linguist/lupdate/fetchtr.cpp +++ b/tools/linguist/lupdate/fetchtr.cpp @@ -275,8 +275,8 @@ static int getToken() yyCh = getChar(); } while ( yyCh != EOF && yyCh != '\n' ); } else if ( yyCh == '*' ) { - bool metAster = FALSE; - bool metAsterSlash = FALSE; + bool metAster = false; + bool metAsterSlash = false; while ( !metAsterSlash ) { yyCh = getChar(); @@ -292,11 +292,11 @@ static int getToken() yyComment[yyCommentLen++] = (char) yyCh; if ( yyCh == '*' ) - metAster = TRUE; + metAster = true; else if ( metAster && yyCh == '/' ) - metAsterSlash = TRUE; + metAsterSlash = true; else - metAster = FALSE; + metAster = false; } yyCh = getChar(); yyCommentLen -= 2; @@ -463,9 +463,9 @@ static bool matchEncoding( bool *utf8 ) } *utf8 = TQString( yyIdent ).endsWith( TQString("UTF8") ); yyTok = getToken(); - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -479,8 +479,8 @@ static void parse( MetaTranslator *tor, const char *initialContext, TQCString com; TQCString functionContext = initialContext; TQCString prefix; - bool utf8 = FALSE; - bool missing_TQ_OBJECT = FALSE; + bool utf8 = false; + bool missing_TQ_OBJECT = false; yyTok = getToken(); while ( yyTok != Tok_Eof ) { @@ -511,7 +511,7 @@ static void parse( MetaTranslator *tor, const char *initialContext, } if ( yyTok == Tok_Colon ) { - missing_TQ_OBJECT = TRUE; + missing_TQ_OBJECT = true; } else { functionContext = defaultContext; } @@ -562,7 +562,7 @@ static void parse( MetaTranslator *tor, const char *initialContext, } break; case Tok_translate: - utf8 = FALSE; + utf8 = false; yyTok = getToken(); if ( match(Tok_LeftParen) && matchString(&context) && @@ -581,7 +581,7 @@ static void parse( MetaTranslator *tor, const char *initialContext, } break; case Tok_TQ_OBJECT: - missing_TQ_OBJECT = FALSE; + missing_TQ_OBJECT = false; yyTok = getToken(); break; case Tok_Ident: @@ -604,7 +604,7 @@ static void parse( MetaTranslator *tor, const char *initialContext, context = com.left( k ); com.remove( 0, k + 1 ); tor->insert( MetaTranslatorMessage(context, "", com, - TQString::null, FALSE) ); + TQString::null, false) ); } /* @@ -647,7 +647,7 @@ static void parse( MetaTranslator *tor, const char *initialContext, } } functionContext = defaultContext; - missing_TQ_OBJECT = FALSE; + missing_TQ_OBJECT = false; } yyTok = getToken(); break; @@ -741,7 +741,7 @@ bool UiHandler::startElement( const TQString& /* namespaceURI */, flush(); } accum.truncate( 0 ); - return TRUE; + return true; } bool UiHandler::endElement( const TQString& /* namespaceURI */, @@ -764,13 +764,13 @@ bool UiHandler::endElement( const TQString& /* namespaceURI */, } else { flush(); } - return TRUE; + return true; } bool UiHandler::characters( const TQString& ch ) { accum += ch; - return TRUE; + return true; } bool UiHandler::fatalError( const TQXmlParseException& exception ) @@ -780,7 +780,7 @@ bool UiHandler::fatalError( const TQXmlParseException& exception ) exception.lineNumber(), exception.columnNumber(), exception.message().latin1() ); fprintf( stderr, "XML error: %s\n", msg.latin1() ); - return FALSE; + return false; } void UiHandler::flush() @@ -788,7 +788,7 @@ void UiHandler::flush() if ( !context.isEmpty() && !source.isEmpty() ) tor->insert( MetaTranslatorMessage(context.utf8(), source.utf8(), comment.utf8(), TQString::null, - TRUE) ); + true) ); source.truncate( 0 ); comment.truncate( 0 ); } @@ -807,10 +807,10 @@ void fetchtr_ui( const char *fileName, MetaTranslator *tor, TQTextStream t( &f ); TQXmlInputSource in( t ); TQXmlSimpleReader reader; - reader.setFeature( "http://xml.org/sax/features/namespaces", FALSE ); - reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", TRUE ); + reader.setFeature( "http://xml.org/sax/features/namespaces", false ); + reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", true ); reader.setFeature( "http://trolltech.com/xml/features/report-whitespace" - "-only-CharData", FALSE ); + "-only-CharData", false ); TQXmlDefaultHandler *hand = new UiHandler( tor, fileName ); reader.setContentHandler( hand ); reader.setErrorHandler( hand ); diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp index 1e7225081..3f4695e55 100644 --- a/tools/linguist/lupdate/main.cpp +++ b/tools/linguist/lupdate/main.cpp @@ -101,18 +101,18 @@ int main( int argc, char **argv ) TQCString codec; TQStringList tsFileNames; - bool verbose = FALSE; - bool noObsolete = FALSE; - bool metSomething = FALSE; + bool verbose = false; + bool noObsolete = false; + bool metSomething = false; int numFiles = 0; - bool standardSyntax = TRUE; - bool metTsFlag = FALSE; + bool standardSyntax = true; + bool metTsFlag = false; int i; for ( i = 1; i < argc; i++ ) { if ( qstrcmp(argv[i], "-ts") == 0 ) - standardSyntax = FALSE; + standardSyntax = false; } for ( i = 1; i < argc; i++ ) { @@ -120,16 +120,16 @@ int main( int argc, char **argv ) printUsage(); return 0; } else if ( qstrcmp(argv[i], "-noobsolete") == 0 ) { - noObsolete = TRUE; + noObsolete = true; continue; } else if ( qstrcmp(argv[i], "-verbose") == 0 ) { - verbose = TRUE; + verbose = true; continue; } else if ( qstrcmp(argv[i], "-version") == 0 ) { fprintf( stderr, "lupdate version %s\n", TQT_VERSION_STR ); return 0; } else if ( qstrcmp(argv[i], "-ts") == 0 ) { - metTsFlag = TRUE; + metTsFlag = true; continue; } @@ -167,17 +167,17 @@ int main( int argc, char **argv ) for ( t = toks.begin(); t != toks.end(); ++t ) { if ( it.key() == "HEADERS" || it.key() == "SOURCES" ) { - fetchtr_cpp( *t, &fetchedTor, defaultContext, TRUE ); - metSomething = TRUE; + fetchtr_cpp( *t, &fetchedTor, defaultContext, true ); + metSomething = true; } else if ( it.key() == "INTERFACES" || it.key() == "FORMS" ) { - fetchtr_ui( *t, &fetchedTor, defaultContext, TRUE ); + fetchtr_ui( *t, &fetchedTor, defaultContext, true ); fetchtr_cpp( *t + ".h", &fetchedTor, defaultContext, - FALSE ); - metSomething = TRUE; + false ); + metSomething = true; } else if ( it.key() == "TRANSLATIONS" ) { tsFileNames.append( *t ); - metSomething = TRUE; + metSomething = true; } else if ( it.key() == "CODEC" || it.key() == "DEFAULTCODEC" ) { codec = (*t).latin1(); @@ -219,11 +219,11 @@ int main( int argc, char **argv ) } else { TQFileInfo fi(argv[i]); if ( TQString(argv[i]).lower().endsWith(".ui") ) { - fetchtr_ui( fi.fileName(), &fetchedTor, defaultContext, TRUE ); + fetchtr_ui( fi.fileName(), &fetchedTor, defaultContext, true ); fetchtr_cpp( TQString(fi.fileName()) + ".h", &fetchedTor, - defaultContext, FALSE ); + defaultContext, false ); } else { - fetchtr_cpp( fi.fileName(), &fetchedTor, defaultContext, TRUE ); + fetchtr_cpp( fi.fileName(), &fetchedTor, defaultContext, true ); } } } diff --git a/tools/linguist/lupdate/numberh.cpp b/tools/linguist/lupdate/numberh.cpp index 29d6fd2f9..4ff8d09eb 100644 --- a/tools/linguist/lupdate/numberh.cpp +++ b/tools/linguist/lupdate/numberh.cpp @@ -73,14 +73,14 @@ static TQCString zeroKey( const char *key ) char *z = zeroed.data(); int i = 0, j = 0; int len; - bool metSomething = FALSE; + bool metSomething = false; while ( key[i] != '\0' ) { len = numberLength( key + i ); if ( len > 0 ) { i += len; z[j++] = '0'; - metSomething = TRUE; + metSomething = true; } else { z[j++] = key[i++]; } @@ -125,7 +125,7 @@ static TQString translationAttempt( const TQString& oldTranslation, newNumbers.append( TQCString(newSource + j, n + 1) ); i += m; j += n; - met[k] = FALSE; + met[k] = false; matchedYet[k] = 0; k++; } @@ -168,7 +168,7 @@ static TQString translationAttempt( const TQString& oldTranslation, if ( best != p ) { attempt.truncate( attempt.length() - matchedYet[best] ); attempt += newNumbers[best]; - met[best] = TRUE; + met[best] = true; for ( k = 0; k < p; k++ ) matchedYet[k] = 0; break; diff --git a/tools/linguist/shared/metatranslator.cpp b/tools/linguist/shared/metatranslator.cpp index 3ea91f2cb..7733f46bc 100644 --- a/tools/linguist/shared/metatranslator.cpp +++ b/tools/linguist/shared/metatranslator.cpp @@ -51,7 +51,7 @@ static bool encodingIsUtf8( const TQXmlAttributes& atts ) return ( atts.value(i) == TQString("UTF-8") ); } } - return FALSE; + return false; } class TsHandler : public TQXmlDefaultHandler @@ -59,8 +59,8 @@ class TsHandler : public TQXmlDefaultHandler public: TsHandler( MetaTranslator *translator ) : tor( translator ), type( MetaTranslatorMessage::Finished ), - inMessage( FALSE ), ferrorCount( 0 ), contextIsUtf8( FALSE ), - messageIsUtf8( FALSE ) { } + inMessage( false ), ferrorCount( 0 ), contextIsUtf8( false ), + messageIsUtf8( false ) { } virtual bool startElement( const TQString& namespaceURI, const TQString& localName, const TQString& qName, @@ -112,7 +112,7 @@ bool TsHandler::startElement( const TQString& /* namespaceURI */, translation.truncate( 0 ); contextIsUtf8 = encodingIsUtf8( atts ); } else if ( qName == TQString("message") ) { - inMessage = TRUE; + inMessage = true; type = MetaTranslatorMessage::Finished; source.truncate( 0 ); comment.truncate( 0 ); @@ -132,7 +132,7 @@ bool TsHandler::startElement( const TQString& /* namespaceURI */, } accum.truncate( 0 ); } - return TRUE; + return true; } bool TsHandler::endElement( const TQString& /* namespaceURI */, @@ -153,12 +153,12 @@ bool TsHandler::endElement( const TQString& /* namespaceURI */, if ( contextIsUtf8 ) tor->insert( MetaTranslatorMessage(context.utf8(), ContextComment, - accum.utf8(), TQString::null, TRUE, + accum.utf8(), TQString::null, true, MetaTranslatorMessage::Unfinished) ); else tor->insert( MetaTranslatorMessage(context.ascii(), ContextComment, - accum.ascii(), TQString::null, FALSE, + accum.ascii(), TQString::null, false, MetaTranslatorMessage::Unfinished) ); } } else if ( qName == TQString("translation") ) { @@ -167,14 +167,14 @@ bool TsHandler::endElement( const TQString& /* namespaceURI */, if ( messageIsUtf8 ) tor->insert( MetaTranslatorMessage(context.utf8(), source.utf8(), comment.utf8(), translation, - TRUE, type) ); + true, type) ); else tor->insert( MetaTranslatorMessage(context.ascii(), source.ascii(), comment.ascii(), translation, - FALSE, type) ); - inMessage = FALSE; + false, type) ); + inMessage = false; } - return TRUE; + return true; } bool TsHandler::characters( const TQString& ch ) @@ -182,7 +182,7 @@ bool TsHandler::characters( const TQString& ch ) TQString t = ch; t.replace( "\r", "" ); accum += t; - return TRUE; + return true; } bool TsHandler::fatalError( const TQXmlParseException& exception ) @@ -198,7 +198,7 @@ bool TsHandler::fatalError( const TQXmlParseException& exception ) TQMessageBox::information( tqApp->mainWidget(), TQObject::tr("TQt Linguist"), msg ); } - return FALSE; + return false; } static TQString numericEntity( int ch ) @@ -257,7 +257,7 @@ static TQString evilBytes( const TQCString& str, bool utf8 ) } MetaTranslatorMessage::MetaTranslatorMessage() - : utfeight( FALSE ), ty( Unfinished ) + : utfeight( false ), ty( Unfinished ) { } @@ -267,7 +267,7 @@ MetaTranslatorMessage::MetaTranslatorMessage( const char *context, const TQString& translation, bool utf8, Type type ) : TQTranslatorMessage( context, sourceText, comment, translation ), - utfeight( FALSE ), ty( type ) + utfeight( false ), ty( type ) { /* Don't use UTF-8 if it makes no difference. UTF-8 should be @@ -279,7 +279,7 @@ MetaTranslatorMessage::MetaTranslatorMessage( const char *context, int i = 0; while ( sourceText[i] != '\0' ) { if ( (uchar) sourceText[i] >= 0x80 ) { - utfeight = TRUE; + utfeight = true; break; } i++; @@ -289,7 +289,7 @@ MetaTranslatorMessage::MetaTranslatorMessage( const char *context, int i = 0; while ( comment[i] != '\0' ) { if ( (uchar) comment[i] >= 0x80 ) { - utfeight = TRUE; + utfeight = true; break; } i++; @@ -358,13 +358,13 @@ bool MetaTranslator::load( const TQString& filename ) { TQFile f( filename ); if ( !f.open(IO_ReadOnly) ) - return FALSE; + return false; TQTextStream t( &f ); TQXmlInputSource in( t ); TQXmlSimpleReader reader; - reader.setFeature( "http://xml.org/sax/features/namespaces", FALSE ); - reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", TRUE ); + reader.setFeature( "http://xml.org/sax/features/namespaces", false ); + reader.setFeature( "http://xml.org/sax/features/namespace-prefixes", true ); TQXmlDefaultHandler *hand = new TsHandler( this ); reader.setContentHandler( hand ); reader.setErrorHandler( hand ); @@ -381,7 +381,7 @@ bool MetaTranslator::save( const TQString& filename ) const { TQFile f( filename ); if ( !f.open(IO_WriteOnly) ) - return FALSE; + return false; TQTextStream t( &f ); t.setCodec( TQTextCodec::codecForName("ISO-8859-1") ); @@ -448,7 +448,7 @@ bool MetaTranslator::save( const TQString& filename ) const } t << "</TS>\n"; f.close(); - return TRUE; + return true; } bool MetaTranslator::release( const TQString& filename, bool verbose, diff --git a/tools/linguist/shared/metatranslator.h b/tools/linguist/shared/metatranslator.h index 4462a77f5..3f74aa11e 100644 --- a/tools/linguist/shared/metatranslator.h +++ b/tools/linguist/shared/metatranslator.h @@ -50,7 +50,7 @@ public: MetaTranslatorMessage( const char *context, const char *sourceText, const char *comment, const TQString& translation = TQString::null, - bool utf8 = FALSE, Type type = Unfinished ); + bool utf8 = false, Type type = Unfinished ); MetaTranslatorMessage( const MetaTranslatorMessage& m ); MetaTranslatorMessage& operator=( const MetaTranslatorMessage& m ); @@ -86,7 +86,7 @@ public: void clear(); bool load( const TQString& filename ); bool save( const TQString& filename ) const; - bool release( const TQString& filename, bool verbose = FALSE, + bool release( const TQString& filename, bool verbose = false, TQTranslator::SaveMode mode = TQTranslator::Stripped ) const; bool contains( const char *context, const char *sourceText, diff --git a/tools/linguist/tqm2ts/main.cpp b/tools/linguist/tqm2ts/main.cpp index 6e71a3cbc..f4d93b500 100644 --- a/tools/linguist/tqm2ts/main.cpp +++ b/tools/linguist/tqm2ts/main.cpp @@ -53,7 +53,7 @@ static void printUsage() int main( int argc, char **argv ) { - bool verbose = FALSE; + bool verbose = false; int numQmFiles = 0; for ( int i = 1; i < argc; i++ ) { @@ -61,7 +61,7 @@ int main( int argc, char **argv ) printUsage(); return 0; } else if ( qstrcmp(argv[i], "-verbose") == 0 ) { - verbose = TRUE; + verbose = true; continue; } else if ( qstrcmp(argv[i], "-version") == 0 ) { fprintf( stderr, "tqm2ts version %s\n", TQT_VERSION_STR ); @@ -92,7 +92,7 @@ int main( int argc, char **argv ) context = "@default"; metator.insert( MetaTranslatorMessage(context, (*it).sourceText(), (*it).comment(), - (*it).translation(), FALSE, + (*it).translation(), false, MetaTranslatorMessage::Finished) ); } } diff --git a/tools/qconfig/main.cpp b/tools/qconfig/main.cpp index a34e2a667..229d6bb97 100644 --- a/tools/qconfig/main.cpp +++ b/tools/qconfig/main.cpp @@ -189,9 +189,9 @@ public: CheckBox), id(i) { - setOpen(TRUE); + setOpen(true); label = text(0); - avl = TRUE; + avl = true; } // We reverse the logic @@ -270,7 +270,7 @@ Main::Main() lv = new TQListView(horizontal); lv->setSorting(-1); - lv->setRootIsDecorated(TRUE); + lv->setRootIsDecorated(true); lv->addColumn("ID"); info = new Info(horizontal); @@ -463,8 +463,8 @@ void Main::loadFeatures(const TQString& filename) TQString sec; TQString lab; TQString doc; - bool on = FALSE; - bool docmode = FALSE; + bool on = false; + bool docmode = false; TQStringList deps; do { @@ -475,7 +475,7 @@ void Main::loadFeatures(const TQString& filename) if ( on ) { if ( docmode ) { if ( token[0] == "*/" ) - docmode = FALSE; + docmode = false; else if ( lab.isEmpty() ) lab = line.stripWhiteSpace(); else @@ -491,7 +491,7 @@ void Main::loadFeatures(const TQString& filename) doc = ""; lab = ""; } else if ( token[0] == "/*!" ) { - docmode = TRUE; + docmode = true; } else if ( token[0] == "//" ) { token.remove(token.begin()); sec = token.join(" "); @@ -516,7 +516,7 @@ void Main::loadFeatures(const TQString& filename) tqDebug("Cannot parse: %s",token.join(" ").ascii()); } } else if ( token[0] == "#include" ) { - on = TRUE; + on = true; } } while (!s.atEnd()); #endif @@ -572,7 +572,7 @@ void Main::loadConfig(const TQString& filename) TQRegExp qt_no_xxx("TQT_NO_[A-Z_0-9]*"); for (TQStringList::Iterator ch = choices.begin(); ch != choices.end(); ++ch) { - item[*ch]->setDefined(FALSE); + item[*ch]->setDefined(false); } do { TQString line = s.readLine(); @@ -580,7 +580,7 @@ void Main::loadConfig(const TQString& filename) if ( token[0] == "#define" ) { ChoiceItem* i = item[token[1]]; if ( i ) - i->setDefined(TRUE); + i->setDefined(true); else tqDebug("The item %s is not used by ntqfeatures.h", token[1].latin1()); } @@ -599,14 +599,14 @@ void Main::updateAvailability(TQListViewItem* i) { ChoiceItem* d = item[*it]; TQStringList ddeps = dependencies[d->id]; - bool av = TRUE; + bool av = true; for (TQStringList::ConstIterator dit = ddeps.begin(); av && dit != ddeps.end(); ++dit) { ChoiceItem* dd = item[*dit]; if ( dd ) { if ( dd->isDefined() || !dd->isAvailable() ) - av = FALSE; + av = false; } else tqDebug("%s ???",(*dit).latin1()); } @@ -665,7 +665,7 @@ void Main::selectId(const TQString& id) { TQListViewItem* it = item[id]; if ( it ) { - lv->setSelected(it,TRUE); + lv->setSelected(it,true); lv->ensureItemVisible(it); } } diff --git a/tools/qembed/qembed.cpp b/tools/qembed/qembed.cpp index d13cf46a7..ee367c552 100644 --- a/tools/qembed/qembed.cpp +++ b/tools/qembed/qembed.cpp @@ -60,15 +60,15 @@ int main( int argc, char **argv ) } TQFile output; - bool output_hdr = FALSE; - bool images = FALSE; + bool output_hdr = false; + bool images = false; output.open( IO_WriteOnly, stdout ); TQTextStream out( &output ); TQPtrList<EmbedImage> list_image; TQPtrList<Embed> list; - list.setAutoDelete( TRUE ); - list_image.setAutoDelete( TRUE ); + list.setAutoDelete( true ); + list_image.setAutoDelete( true ); long l = rand(); out << "#ifndef _QEMBED_" << l << endl; @@ -98,7 +98,7 @@ int main( int argc, char **argv ) if ( !images ) { out << "#include <ntqimage.h>\n"; out << "#include <ntqdict.h>\n"; - images = TRUE; + images = true; } } else { TQFile f( *it ); @@ -164,7 +164,7 @@ int main( int argc, char **argv ) out << "\n};\n\n"; } if ( !output_hdr ) { - output_hdr = TRUE; + output_hdr = true; out << header; } } @@ -234,9 +234,9 @@ int main( int argc, char **argv ) else out << "0, "; if ( e->alpha ) - out << "TRUE, "; + out << "true, "; else - out << "FALSE, "; + out << "false, "; out << "\"" << e->name << "\" },\n"; e = list_image.next(); } @@ -258,7 +258,7 @@ int main( int argc, char **argv ) " embed_image_vec[i].numColors,\n" " TQImage::BigEndian );\n" " if ( embed_image_vec[i].alpha )\n" -" img->setAlphaBuffer( TRUE );\n" +" img->setAlphaBuffer( true );\n" " dict.insert( name, img );\n" " break;\n" " }\n" diff --git a/tools/qtconfig/colorbutton.cpp b/tools/qtconfig/colorbutton.cpp index 2d8668c21..c8000ea23 100644 --- a/tools/qtconfig/colorbutton.cpp +++ b/tools/qtconfig/colorbutton.cpp @@ -41,9 +41,9 @@ ColorButton::ColorButton(TQWidget *parent, const char *name) - : TQButton(parent, name), mousepressed(FALSE) + : TQButton(parent, name), mousepressed(false) { - setAcceptDrops(TRUE); + setAcceptDrops(true); col = black; connect(this, TQ_SIGNAL(clicked()), TQ_SLOT(changeColor())); } @@ -52,7 +52,7 @@ ColorButton::ColorButton(TQWidget *parent, const char *name) ColorButton::ColorButton(const TQColor &c, TQWidget *parent, const char *name) : TQButton(parent, name) { - setAcceptDrops(TRUE); + setAcceptDrops(true); col = c; connect(this, TQ_SIGNAL(clicked()), TQ_SLOT(changeColor())); } @@ -150,14 +150,14 @@ void ColorButton::dropEvent(TQDropEvent *e) void ColorButton::mousePressEvent(TQMouseEvent *e) { presspos = e->pos(); - mousepressed = TRUE; + mousepressed = true; TQButton::mousePressEvent(e); } void ColorButton::mouseReleaseEvent(TQMouseEvent *e) { - mousepressed = FALSE; + mousepressed = false; TQButton::mouseReleaseEvent(e); } @@ -168,8 +168,8 @@ void ColorButton::mouseMoveEvent(TQMouseEvent *e) return; if ((presspos - e->pos()).manhattanLength() > TQApplication::startDragDistance()) { - mousepressed = FALSE; - setDown(FALSE); + mousepressed = false; + setDown(false); TQColorDrag *cd = new TQColorDrag(color(), this); cd->dragCopy(); diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp index 9a1d0044a..da77abb83 100644 --- a/tools/qtconfig/mainwindow.cpp +++ b/tools/qtconfig/mainwindow.cpp @@ -215,7 +215,7 @@ MainWindow::MainWindow() : MainWindowBase(0, "main window"), editPalette(palette()), previewPalette(palette()), previewstyle(0) { - modified = TRUE; + modified = true; TQStringList gstyles = TQStyleFactory::keys(); gstyles.sort(); @@ -373,7 +373,7 @@ MainWindow::MainWindow() sublistbox->clear(); sublistbox->insertStringList(subs); - rtlExtensions->setChecked( settings.readBoolEntry( "/qt/useRtlExtensions", FALSE ) ); + rtlExtensions->setChecked( settings.readBoolEntry( "/qt/useRtlExtensions", false ) ); #if defined(TQ_WS_X11) inputStyle->setCurrentText( trUtf8( @@ -443,11 +443,11 @@ MainWindow::MainWindow() inputMethodLabel->hide(); #endif - fontembeddingcheckbox->setChecked( settings.readBoolEntry("/qt/embedFonts", TRUE) ); + fontembeddingcheckbox->setChecked( settings.readBoolEntry("/qt/embedFonts", true) ); fontpaths = settings.readListEntry("/qt/fontPath", ':'); fontpathlistbox->insertStringList(fontpaths); - setModified(FALSE); + setModified(false); } @@ -566,7 +566,7 @@ void MainWindow::fileSave() TQApplication::x11_apply_settings(); #endif // TQ_WS_X11 - setModified(FALSE); + setModified(false); statusBar()->message("Saved changes."); } @@ -622,7 +622,7 @@ void MainWindow::buildPalette() updateColorButtons(); - setModified(TRUE); + setModified(true); } @@ -754,7 +754,7 @@ void MainWindow::tunePalette() editPalette = pal; setPreviewPalette(editPalette); - setModified(TRUE); + setModified(true); } @@ -774,7 +774,7 @@ void MainWindow::styleSelected(const TQString &stylename) delete previewstyle; previewstyle = style; - setModified(TRUE); + setModified(true); } @@ -796,7 +796,7 @@ void MainWindow::buildFont() stylecombo->currentText(), psizecombo->currentText().toInt()); samplelineedit->setFont(font); - setModified(TRUE); + setModified(true); } @@ -824,7 +824,7 @@ void MainWindow::removeSubstitute() sublistbox->setCurrentItem(item); TQFont::removeSubstitution(familysubcombo->currentText()); TQFont::insertSubstitutions(familysubcombo->currentText(), subs); - setModified(TRUE); + setModified(true); } @@ -836,7 +836,7 @@ void MainWindow::addSubstitute() TQStringList subs = TQFont::substitutes(familysubcombo->currentText()); sublistbox->clear(); sublistbox->insertStringList(subs); - setModified(TRUE); + setModified(true); return; } @@ -846,7 +846,7 @@ void MainWindow::addSubstitute() sublistbox->clear(); sublistbox->insertStringList(subs); sublistbox->setCurrentItem(item); - setModified(TRUE); + setModified(true); } @@ -868,7 +868,7 @@ void MainWindow::downSubstitute() sublistbox->setCurrentItem(item + 1); TQFont::removeSubstitution(familysubcombo->currentText()); TQFont::insertSubstitutions(familysubcombo->currentText(), subs); - setModified(TRUE); + setModified(true); } @@ -889,7 +889,7 @@ void MainWindow::upSubstitute() sublistbox->setCurrentItem(item - 1); TQFont::removeSubstitution(familysubcombo->currentText()); TQFont::insertSubstitutions(familysubcombo->currentText(), subs); - setModified(TRUE); + setModified(true); } @@ -908,7 +908,7 @@ void MainWindow::removeLibpath() item = int(libpathlistbox->count()) - 1; libpathlistbox->setCurrentItem(item); TQApplication::setLibraryPaths(paths); - setModified(TRUE); + setModified(true); } @@ -924,7 +924,7 @@ void MainWindow::addLibpath() libpathlistbox->clear(); libpathlistbox->insertStringList(paths); TQApplication::setLibraryPaths(paths); - setModified(TRUE); + setModified(true); return; } @@ -937,7 +937,7 @@ void MainWindow::addLibpath() libpathlistbox->insertStringList(paths); libpathlistbox->setCurrentItem(item); TQApplication::setLibraryPaths(paths); - setModified(TRUE); + setModified(true); } @@ -958,7 +958,7 @@ void MainWindow::downLibpath() libpathlistbox->insertStringList(paths); libpathlistbox->setCurrentItem(item + 1); TQApplication::setLibraryPaths(paths); - setModified(TRUE); + setModified(true); } @@ -978,7 +978,7 @@ void MainWindow::upLibpath() libpathlistbox->insertStringList(paths); libpathlistbox->setCurrentItem(item - 1); TQApplication::setLibraryPaths(paths); - setModified(TRUE); + setModified(true); } @@ -1006,7 +1006,7 @@ void MainWindow::removeFontpath() if (uint(item) > fontpathlistbox->count()) item = int(fontpathlistbox->count()) - 1; fontpathlistbox->setCurrentItem(item); - setModified(TRUE); + setModified(true); } @@ -1020,7 +1020,7 @@ void MainWindow::addFontpath() fontpaths.append(fontpathlineedit->text()); fontpathlistbox->clear(); fontpathlistbox->insertStringList(fontpaths); - setModified(TRUE); + setModified(true); return; } @@ -1031,7 +1031,7 @@ void MainWindow::addFontpath() fontpathlistbox->clear(); fontpathlistbox->insertStringList(fontpaths); fontpathlistbox->setCurrentItem(item); - setModified(TRUE); + setModified(true); } @@ -1050,7 +1050,7 @@ void MainWindow::downFontpath() fontpathlistbox->clear(); fontpathlistbox->insertStringList(fontpaths); fontpathlistbox->setCurrentItem(item + 1); - setModified(TRUE); + setModified(true); } @@ -1068,7 +1068,7 @@ void MainWindow::upFontpath() fontpathlistbox->clear(); fontpathlistbox->insertStringList(fontpaths); fontpathlistbox->setCurrentItem(item - 1); - setModified(TRUE); + setModified(true); } @@ -1085,7 +1085,7 @@ void MainWindow::browseFontpath() void MainWindow::somethingModified() { - setModified(TRUE); + setModified(true); } diff --git a/tools/qtconfig/paletteeditoradvanced.cpp b/tools/qtconfig/paletteeditoradvanced.cpp index 02078bc40..f693464dd 100644 --- a/tools/qtconfig/paletteeditoradvanced.cpp +++ b/tools/qtconfig/paletteeditoradvanced.cpp @@ -64,7 +64,7 @@ BoldListBoxText::BoldListBoxText( TQString text, TQListBox* lb ) void BoldListBoxText::paint( TQPainter* painter ) { TQFont f = painter->font(); - f.setBold( TRUE ); + f.setBold( true ); painter->setFont( f ); TQListBoxText::paint( painter ); @@ -121,8 +121,8 @@ void PaletteEditorAdvanced::paletteSelected(int p) groupEffect->setDisabled(checkBuildDisabled->isChecked()); } else { - groupCentral->setEnabled(TRUE); - groupEffect->setEnabled(TRUE); + groupCentral->setEnabled(true); + groupEffect->setEnabled(true); } updateColorButtons(); } @@ -594,7 +594,7 @@ TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init, BackgroundMode mode, TQWidget* parent, const char* name ) { - PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( parent, name, TRUE ); + PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( parent, name, true ); dlg->setupBackgroundMode( mode ); if ( init != TQPalette() ) @@ -604,11 +604,11 @@ TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init, TQPalette result = init; if ( resultCode == TQDialog::Accepted ) { if ( ok ) - *ok = TRUE; + *ok = true; result = dlg->pal(); } else { if ( ok ) - *ok = FALSE; + *ok = false; } delete dlg; return result; diff --git a/tools/qtconfig/paletteeditoradvanced.h b/tools/qtconfig/paletteeditoradvanced.h index c1724a651..fc4b4a51b 100644 --- a/tools/qtconfig/paletteeditoradvanced.h +++ b/tools/qtconfig/paletteeditoradvanced.h @@ -41,7 +41,7 @@ class PaletteEditorAdvanced : public PaletteEditorAdvancedBase TQ_OBJECT public: PaletteEditorAdvanced( TQWidget * parent=0, const char * name=0, - bool modal=FALSE, WFlags f=0 ); + bool modal=false, WFlags f=0 ); ~PaletteEditorAdvanced(); static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground, diff --git a/tools/qtconfig/previewwidget.cpp b/tools/qtconfig/previewwidget.cpp index 1bb32b1d6..f9bc99ab2 100644 --- a/tools/qtconfig/previewwidget.cpp +++ b/tools/qtconfig/previewwidget.cpp @@ -67,9 +67,9 @@ bool PreviewWidget::eventFilter(TQObject *, TQEvent *e) case TQEvent::KeyRelease: case TQEvent::Enter: case TQEvent::Leave: - return TRUE; // ignore; + return true; // ignore; default: break; } - return FALSE; + return false; } diff --git a/tools/tqtmergetr/tqtmergetr.cpp b/tools/tqtmergetr/tqtmergetr.cpp index 91296e37b..73781a376 100644 --- a/tools/tqtmergetr/tqtmergetr.cpp +++ b/tools/tqtmergetr/tqtmergetr.cpp @@ -43,10 +43,10 @@ bool isEmpty( const TQString& line ) int i = 0; while ( i < int(line.length()) ) { if ( !line[i].isSpace() ) - return FALSE; + return false; i++; } - return TRUE; + return true; } @@ -70,7 +70,7 @@ TQString extractContents( const TQString& line ) { TQString contents; int pos = 0; - bool inStr = FALSE; + bool inStr = false; while ( pos < int(line.length()) ) { if ( line[pos] == '"' ) { inStr = !inStr; |
