diff options
Diffstat (limited to 'tqtinterface/qt4/tools/designer/plugins/cppeditor/projectsettings.ui.h')
| -rw-r--r-- | tqtinterface/qt4/tools/designer/plugins/cppeditor/projectsettings.ui.h | 106 | 
1 files changed, 106 insertions, 0 deletions
diff --git a/tqtinterface/qt4/tools/designer/plugins/cppeditor/projectsettings.ui.h b/tqtinterface/qt4/tools/designer/plugins/cppeditor/projectsettings.ui.h new file mode 100644 index 0000000..72aea91 --- /dev/null +++ b/tqtinterface/qt4/tools/designer/plugins/cppeditor/projectsettings.ui.h @@ -0,0 +1,106 @@ +/**************************************************************************** +** ui.h extension file, included from the uic-generated form implementation. +**  +** Add custom slot implementations here. Use a slot init() for +** initialization code called during construction, and a slot destroy() +** for cleanup code called during destruction. +** +** This file gets modified by TQt Designer whenever you add, rename or +** remove custom Tslots. Implementation code does not get lost. +*****************************************************************************/ + +#include <designerinterface.h> + +void CppProjectSettings::reInit( TQUnknownInterface *iface ) +{ +    comboConfig->setCurrentItem( 0 ); +    comboLibs->setCurrentItem( 0 ); +    comboDefines->setCurrentItem( 0 ); +    comboInclude->setCurrentItem( 0 ); +     +    DesignerInterface *dIface = 0; +    iface->queryInterface( IID_Designer, (TQUnknownInterface**)&dIface ); +    if ( !dIface ) +	return; +    DesignerProject *project = dIface->currentProject(); +    if ( project->templte() == "app" ) +	comboTemplate->setCurrentItem( 0 ); +    else +	comboTemplate->setCurrentItem( 1 ); +      +    config.clear(); +    defines.clear(); +    libs.clear(); +    defines.clear(); +    includes.clear(); +     +    const TQString platforms[] = { "(all)", "win32", "unix", "mac", TQString() }; +    for ( int i = 0; platforms[ i ] != TQString(); ++i ) { +	config.tqreplace( platforms[ i ], project->config( platforms[ i ] ) ); +	libs.tqreplace( platforms[ i ], project->libs( platforms[ i ] ) ); +	defines.tqreplace( platforms[ i ], project->defines( platforms[ i ] ) ); +	includes.tqreplace( platforms[ i ], project->includePath( platforms[ i ] ) ); +    } +    editConfig->setText( config[ "(all)" ] ); +    editLibs->setText( libs[ "(all)" ] ); +    editDefines->setText( defines[ "(all)" ] ); +    editInclude->setText( includes[ "(all)" ] ); +} + +void CppProjectSettings::save( TQUnknownInterface *iface ) +{ +    DesignerInterface *dIface = 0; +    iface->queryInterface( IID_Designer, (TQUnknownInterface**)&dIface ); +    if ( !dIface ) +	return; +    DesignerProject *project = dIface->currentProject(); +     +    project->setTemplate( comboTemplate->currentText() ); +    const TQString platforms[] = { "(all)", "win32", "unix", "mac", TQString() }; +    for ( int i = 0; platforms[ i ] != TQString(); ++i ) { +	project->setConfig( platforms[ i ], config[ platforms[ i ] ] ); +	project->setLibs( platforms[ i ], libs[ platforms[ i ] ] ); +	project->setDefines( platforms[ i ], defines[ platforms[ i ] ] ); +	project->setIncludePath( platforms[ i ], includes[ platforms[ i ] ] ); +    } +} + +void CppProjectSettings::configChanged( const TQString &str ) +{ +    config.tqreplace( comboConfig->currentText(), str ); +} + +void CppProjectSettings::libsChanged( const TQString &str ) +{ +    libs.tqreplace( comboLibs->currentText(), str ); +} + +void CppProjectSettings::definesChanged( const TQString &str ) +{ +    defines.tqreplace( comboDefines->currentText(), str ); +} + +void CppProjectSettings::includesChanged( const TQString &str ) +{ +    includes.tqreplace( comboInclude->currentText(), str ); +} + +void CppProjectSettings::configPlatformChanged( const TQString &plat ) +{ +    editConfig->setText( config[ plat ] ); +} + +void CppProjectSettings::libsPlatformChanged( const TQString &plat ) +{ +    editLibs->setText( libs[ plat ] ); +} + +void CppProjectSettings::definesPlatformChanged( const TQString &plat ) +{ +    editDefines->setText( defines[ plat ] ); +} + +void CppProjectSettings::includesPlatformChanged( const TQString &plat ) +{ +    editInclude->setText( includes[ plat ] ); +}  | 
