|
|
|
|
@ -141,9 +141,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() ) {
|
|
|
|
|
@ -575,14 +575,14 @@ void Uic::createFormImpl( const TQDomElement &e )
|
|
|
|
|
sqlClasses += "TQt::SqlDatabase";
|
|
|
|
|
if ( dbCursors.count() )
|
|
|
|
|
sqlClasses += "TQt::SqlCursor";
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -705,7 +705,7 @@ void Uic::createFormImpl( const TQDomElement &e )
|
|
|
|
|
} else if ( objClass == "TQt::MainWindow" ) {
|
|
|
|
|
out << indent << "shift->SUPER::NEW(@_[0..2]);" << endl;
|
|
|
|
|
out << indent << "statusBar();" << endl;
|
|
|
|
|
isMainWindow = TRUE;
|
|
|
|
|
isMainWindow = true;
|
|
|
|
|
} else {
|
|
|
|
|
out << indent << "shift->SUPER::NEW(@_[0,1]);" << endl;
|
|
|
|
|
}
|
|
|
|
|
@ -791,7 +791,7 @@ void Uic::createFormImpl( const TQDomElement &e )
|
|
|
|
|
TQString label = DomTool::readAttribute( n, "title", "", comment ).toString();
|
|
|
|
|
out << indent << "addPage( " << page << ", \"\" );" << endl;
|
|
|
|
|
trout << indent << "setTitle( " << page << ", " << trcall( label, comment ) << " );" << endl;
|
|
|
|
|
TQVariant def( FALSE );
|
|
|
|
|
TQVariant def( false );
|
|
|
|
|
if ( DomTool::hasAttribute( n, "backEnabled" ) )
|
|
|
|
|
out << indent << "setBackEnabled(" << page << "," << mkBool( DomTool::readAttribute( n, "backEnabled", def).toBool() ) << ");" << endl;
|
|
|
|
|
if ( DomTool::hasAttribute( n, "nextEnabled" ) )
|
|
|
|
|
@ -841,35 +841,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;
|
|
|
|
|
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;
|
|
|
|
|
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;
|
|
|
|
|
createMenuBarImpl( n, objClass, objName );
|
|
|
|
|
needEndl = TRUE;
|
|
|
|
|
needEndl = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ( needEndl )
|
|
|
|
|
@ -943,14 +943,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;
|
|
|
|
|
}
|
|
|
|
|
out << indent << (*buddy).key << "->setBuddy(this->" << registeredName( (*buddy).buddy ) << ");" << endl;
|
|
|
|
|
firstBuddy = FALSE;
|
|
|
|
|
firstBuddy = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -977,21 +977,21 @@ void Uic::createFormImpl( const TQDomElement &e )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 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 == "TQt::DataTable" || s == "TQt::DataBrowser" ) {
|
|
|
|
|
if ( !isFrameworkCodeGenerated( nl.item(i).toElement() ) )
|
|
|
|
|
continue;
|
|
|
|
|
if ( s == "TQt::DataTable" )
|
|
|
|
|
needSqlTableEventHandler = TRUE;
|
|
|
|
|
needSqlTableEventHandler = true;
|
|
|
|
|
if ( s == "TQt::DataBrowser" )
|
|
|
|
|
needSqlDataBrowserEventHandler = TRUE;
|
|
|
|
|
needSqlDataBrowserEventHandler = true;
|
|
|
|
|
}
|
|
|
|
|
if ( needFontEventHandler && needSqlTableEventHandler && needSqlDataBrowserEventHandler )
|
|
|
|
|
break;
|
|
|
|
|
@ -1139,7 +1139,7 @@ void Uic::createFormImpl( const TQDomElement &e )
|
|
|
|
|
int astart = (*it).find('(');
|
|
|
|
|
out << indent << "sub " << (*it).left(astart)<< endl;
|
|
|
|
|
out << indent << "{" << endl;
|
|
|
|
|
bool createWarning = TRUE;
|
|
|
|
|
bool createWarning = true;
|
|
|
|
|
TQString fname = Parser::cleanArgs( *it );
|
|
|
|
|
TQMap<TQString, TQString>::Iterator fit = functionImpls.find( fname );
|
|
|
|
|
if ( fit != functionImpls.end() ) {
|
|
|
|
|
|