diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
commit | e69e8b1d09fb579316595b4e6a850e717358a8b1 (patch) | |
tree | a24fc20865f65772f530d16177520190594ffdd2 /kpovmodeler/pmpovraysettings.cpp | |
parent | eecec9afb81fdebb0f22e9da22635874c403f854 (diff) | |
download | tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip |
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpovmodeler/pmpovraysettings.cpp')
-rw-r--r-- | kpovmodeler/pmpovraysettings.cpp | 68 |
1 files changed, 30 insertions, 38 deletions
diff --git a/kpovmodeler/pmpovraysettings.cpp b/kpovmodeler/pmpovraysettings.cpp index 607c5752..a6828cbb 100644 --- a/kpovmodeler/pmpovraysettings.cpp +++ b/kpovmodeler/pmpovraysettings.cpp @@ -35,65 +35,65 @@ #include <kmessagebox.h> #include <kfiledialog.h> -PMPovraySettings::PMPovraySettings( TQWidget* parent, const char* name ) - : PMSettingsDialogPage( parent, name ) +PMPovraySettings::PMPovraySettings( TQWidget* tqparent, const char* name ) + : PMSettingsDialogPage( tqparent, name ) { m_selectionIndex = 0; - TQHBoxLayout* hlayout; - TQVBoxLayout* vlayout; + TQHBoxLayout* htqlayout; + TQVBoxLayout* vtqlayout; TQVBoxLayout* gvl; TQGroupBox* gb; - vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + vtqlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); gb = new TQGroupBox( i18n( "Povray Command" ), this ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new TQHBoxLayout( gvl ); - hlayout->addWidget( new TQLabel( i18n( "Command:" ), gb ) ); + htqlayout = new TQHBoxLayout( gvl ); + htqlayout->addWidget( new TQLabel( i18n( "Command:" ), gb ) ); m_pPovrayCommand = new TQLineEdit( gb ); - hlayout->addWidget( m_pPovrayCommand ); + htqlayout->addWidget( m_pPovrayCommand ); m_pBrowsePovrayCommand = new TQPushButton( gb ); m_pBrowsePovrayCommand->setPixmap( SmallIcon( "fileopen" ) ); connect( m_pBrowsePovrayCommand, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotBrowsePovrayCommand( ) ) ); - hlayout->addWidget( m_pBrowsePovrayCommand ); - vlayout->addWidget( gb ); + htqlayout->addWidget( m_pBrowsePovrayCommand ); + vtqlayout->addWidget( gb ); gb = new TQGroupBox( i18n( "Povray User Documentation" ), this ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new TQHBoxLayout( gvl ); - hlayout->addWidget( new TQLabel( i18n( "Path:" ), gb ) ); + htqlayout = new TQHBoxLayout( gvl ); + htqlayout->addWidget( new TQLabel( i18n( "Path:" ), gb ) ); m_pDocumentationPath = new TQLineEdit( gb ); - hlayout->addWidget( m_pDocumentationPath ); + htqlayout->addWidget( m_pDocumentationPath ); m_pBrowseDocumentationPath = new TQPushButton( gb ); m_pBrowseDocumentationPath->setPixmap( SmallIcon( "fileopen" ) ); connect( m_pBrowseDocumentationPath, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotBrowsePovrayDocumentation( ) ) ); - hlayout->addWidget( m_pBrowseDocumentationPath ); - vlayout->addWidget( gb ); - hlayout = new TQHBoxLayout( gvl ); - hlayout->addWidget( new TQLabel( i18n( "Version:" ), gb ) ); + htqlayout->addWidget( m_pBrowseDocumentationPath ); + vtqlayout->addWidget( gb ); + htqlayout = new TQHBoxLayout( gvl ); + htqlayout->addWidget( new TQLabel( i18n( "Version:" ), gb ) ); m_pDocumentationVersion = new TQComboBox( false, gb ); TQValueList<TQString> versions = PMDocumentationMap::theMap( )->availableVersions( ); TQValueListIterator<TQString> it; for( it = versions.begin( ); it != versions.end( ); ++it ) m_pDocumentationVersion->insertItem( *it ); - hlayout->addWidget( m_pDocumentationVersion ); - hlayout->addStretch( ); + htqlayout->addWidget( m_pDocumentationVersion ); + htqlayout->addStretch( ); gb = new TQGroupBox( i18n( "Library Paths" ), this ); gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new TQHBoxLayout( gvl ); + htqlayout = new TQHBoxLayout( gvl ); m_pLibraryPaths = new TQListBox( gb ); connect( m_pLibraryPaths, TQT_SIGNAL( highlighted( int ) ), TQT_SLOT( slotPathSelected( int ) ) ); - hlayout->addWidget( m_pLibraryPaths ); + htqlayout->addWidget( m_pLibraryPaths ); - TQVBoxLayout* bl = new TQVBoxLayout( hlayout ); + TQVBoxLayout* bl = new TQVBoxLayout( htqlayout ); m_pAddLibraryPath = new TQPushButton( i18n( "Add..." ), gb ); connect( m_pAddLibraryPath, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPath( ) ) ); bl->addWidget( m_pAddLibraryPath ); @@ -113,9 +113,9 @@ PMPovraySettings::PMPovraySettings( TQWidget* parent, const char* name ) TQT_SLOT( slotPathDown( ) ) ); bl->addWidget( m_pLibraryPathDown ); bl->addStretch( 1 ); - vlayout->addWidget( gb ); + vtqlayout->addWidget( gb ); - vlayout->addStretch( 1 ); + vtqlayout->addStretch( 1 ); } void PMPovraySettings::displaySettings( ) @@ -152,7 +152,7 @@ void PMPovraySettings::displayDefaults( ) { m_pPovrayCommand->setText( c_defaultPovrayCommand ); m_pDocumentationVersion->setCurrentItem( 0 ); - m_pDocumentationPath->setText( TQString::null ); + m_pDocumentationPath->setText( TQString() ); m_pLibraryPaths->clear(); } @@ -180,7 +180,7 @@ void PMPovraySettings::applySettings( ) PMPovrayRenderWidget::setPovrayLibraryPaths( plist ); PMResourceLocator::clearCache( ); PMText::povrayLibraryPathsChanged( ); - emit repaintViews( ); + emit tqrepaintViews( ); } } @@ -190,14 +190,10 @@ void PMPovraySettings::slotAddPath( ) KMessageBox::error( this, i18n( "Povray only supports up to 20 library paths." ) ); else { - TQString path = KFileDialog::getExistingDirectory( TQString::null, this ); + TQString path = KFileDialog::getExistingDirectory( TQString(), this ); if( !path.isEmpty( ) ) { -#if ( QT_VERSION >= 300 ) - TQListBoxItem* item = m_pLibraryPaths->findItem( path, ExactMatch ); -#else - TQListBoxItem* item = 0; -#endif + TQListBoxItem* item = m_pLibraryPaths->tqfindItem( path, ExactMatch ); if( !item ) { m_pLibraryPaths->insertItem( path, m_selectionIndex + 1 ); @@ -254,11 +250,7 @@ void PMPovraySettings::slotEditPath( ) TQString path = KFileDialog::getExistingDirectory( text, this ); if( !path.isEmpty( ) ) { -#if ( QT_VERSION >= 300 ) - TQListBoxItem* item = m_pLibraryPaths->findItem( path, ExactMatch ); -#else - TQListBoxItem* item = 0; -#endif + TQListBoxItem* item = m_pLibraryPaths->tqfindItem( path, ExactMatch ); if( !item ) m_pLibraryPaths->changeItem( path, m_selectionIndex ); else if( item != lbi ) @@ -289,7 +281,7 @@ void PMPovraySettings::slotPathSelected( int index ) void PMPovraySettings::slotBrowsePovrayCommand( ) { - TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); + TQString str = KFileDialog::getOpenFileName( TQString(), TQString() ); if( !str.isEmpty() ) { |