summaryrefslogtreecommitdiffstats
path: root/languages/cpp/ccconfigwidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /languages/cpp/ccconfigwidget.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/ccconfigwidget.cpp')
-rw-r--r--languages/cpp/ccconfigwidget.cpp138
1 files changed, 69 insertions, 69 deletions
diff --git a/languages/cpp/ccconfigwidget.cpp b/languages/cpp/ccconfigwidget.cpp
index 09b13938..44ce91c2 100644
--- a/languages/cpp/ccconfigwidget.cpp
+++ b/languages/cpp/ccconfigwidget.cpp
@@ -10,19 +10,19 @@
* *
***************************************************************************/
// qt includes
-#include <qtabwidget.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qmultilineedit.h>
-#include <qslider.h>
-#include <qheader.h>
-#include <qcolor.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqtabwidget.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqmultilineedit.h>
+#include <tqslider.h>
+#include <tqheader.h>
+#include <tqcolor.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
// kde includes
#include <kdevproject.h>
@@ -60,19 +60,19 @@
using namespace std;
-CCConfigWidget::CCConfigWidget( CppSupportPart* part, QWidget* parent, const char* name )
+CCConfigWidget::CCConfigWidget( CppSupportPart* part, TQWidget* parent, const char* name )
: CCConfigWidgetBase( parent, name )
{
m_pPart = part;
- connect( m_pPart->codeRepository(), SIGNAL( catalogRegistered( Catalog* ) ),
- this, SLOT( catalogRegistered( Catalog* ) ) );
- connect( m_pPart->codeRepository(), SIGNAL( catalogUnregistered( Catalog* ) ),
- this, SLOT( catalogUnregistered( Catalog* ) ) );
+ connect( m_pPart->codeRepository(), TQT_SIGNAL( catalogRegistered( Catalog* ) ),
+ this, TQT_SLOT( catalogRegistered( Catalog* ) ) );
+ connect( m_pPart->codeRepository(), TQT_SIGNAL( catalogUnregistered( Catalog* ) ),
+ this, TQT_SLOT( catalogUnregistered( Catalog* ) ) );
- connect( m_qtDir, SIGNAL(urlSelected(const QString &)),
- this, SLOT(isValidQtDir(const QString &)));
- connect( m_qtDir, SIGNAL(textChanged(const QString &)),
- this, SLOT(isValidQtDir(const QString &)));
+ connect( m_qtDir, TQT_SIGNAL(urlSelected(const TQString &)),
+ this, TQT_SLOT(isValidQtDir(const TQString &)));
+ connect( m_qtDir, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(isValidQtDir(const TQString &)));
initGeneralTab( );
initQtTab();
@@ -85,7 +85,7 @@ CCConfigWidget::CCConfigWidget( CppSupportPart* part, QWidget* parent, const cha
void CCConfigWidget::initGeneralTab( )
{
- QDomDocument dom = *m_pPart->projectDom();
+ TQDomDocument dom = *m_pPart->projectDom();
interface_suffix->setText( DomUtil::readEntry( dom, "/cppsupportpart/filetemplates/interfacesuffix", ".h" ) );
implementation_suffix->setText( DomUtil::readEntry( dom, "/cppsupportpart/filetemplates/implementationsuffix", ".cpp" ) );
@@ -112,7 +112,7 @@ void CCConfigWidget::accept( )
void CCConfigWidget::saveFileTemplatesTab( )
{
- QDomDocument dom = *m_pPart->projectDom();
+ TQDomDocument dom = *m_pPart->projectDom();
DomUtil::writeEntry( dom, "/cppsupportpart/filetemplates/interfacesuffix", interface_suffix->text() );
DomUtil::writeEntry( dom, "/cppsupportpart/filetemplates/implementationsuffix", implementation_suffix->text() );
@@ -157,12 +157,12 @@ void CCConfigWidget::initCodeCompletionTab( )
break;
}*/
- QValueList<Catalog*> catalogs = m_pPart->codeRepository() ->registeredCatalogs();
- for ( QValueList<Catalog*>::Iterator it = catalogs.begin(); it != catalogs.end(); ++it )
+ TQValueList<Catalog*> catalogs = m_pPart->codeRepository() ->registeredCatalogs();
+ for ( TQValueList<Catalog*>::Iterator it = catalogs.begin(); it != catalogs.end(); ++it )
{
Catalog* c = *it;
- QFileInfo dbInfo( c->dbName() );
- QCheckListItem* item = new QCheckListItem( advancedOptions, KURL::decode_string( dbInfo.baseName(true) ), QCheckListItem::CheckBox );
+ TQFileInfo dbInfo( c->dbName() );
+ TQCheckListItem* item = new TQCheckListItem( advancedOptions, KURL::decode_string( dbInfo.baseName(true) ), TQCheckListItem::CheckBox );
item->setOn( c->enabled() );
m_catalogs[ item ] = c;
@@ -203,7 +203,7 @@ void CCConfigWidget::saveCodeCompletionTab( )
if( radioGroupByAlphabet->isChecked() )
c->setCompletionBoxItemOrder( CppCodeCompletionConfig::ByAlphabet );*/
- for ( QMap<QCheckListItem*, Catalog*>::Iterator it = m_catalogs.begin(); it != m_catalogs.end(); ++it )
+ for ( TQMap<TQCheckListItem*, Catalog*>::Iterator it = m_catalogs.begin(); it != m_catalogs.end(); ++it )
{
it.data() ->setEnabled( it.key() ->isOn() );
}
@@ -229,11 +229,11 @@ void CCConfigWidget::slotRemovePCS()
if ( !advancedOptions->selectedItem() )
return ;
- QString db = advancedOptions->selectedItem() ->text( 0 );
- QString question = i18n( "Are you sure you want to delete the \"%1\" database?" ).arg( db );
+ TQString db = advancedOptions->selectedItem() ->text( 0 );
+ TQString question = i18n( "Are you sure you want to delete the \"%1\" database?" ).arg( db );
KStandardDirs *dirs = m_pPart->instance() ->dirs();
- QString dbName = dirs->saveLocation( "data", "kdevcppsupport/pcs" ) + KURL::encode_string_no_slash( db ) + ".db";
+ TQString dbName = dirs->saveLocation( "data", "kdevcppsupport/pcs" ) + KURL::encode_string_no_slash( db ) + ".db";
if ( KMessageBox::Continue == KMessageBox::warningContinueCancel( 0, question, i18n( "Delete Database" ), KStdGuiItem::del() ) )
{
@@ -243,8 +243,8 @@ void CCConfigWidget::slotRemovePCS()
void CCConfigWidget::catalogRegistered( Catalog * c )
{
- QFileInfo dbInfo( c->dbName() );
- QCheckListItem* item = new QCheckListItem( advancedOptions, KURL::decode_string( dbInfo.baseName(true) ), QCheckListItem::CheckBox );
+ TQFileInfo dbInfo( c->dbName() );
+ TQCheckListItem* item = new TQCheckListItem( advancedOptions, KURL::decode_string( dbInfo.baseName(true) ), TQCheckListItem::CheckBox );
item->setOn( c->enabled() );
m_catalogs[ item ] = c;
@@ -252,11 +252,11 @@ void CCConfigWidget::catalogRegistered( Catalog * c )
void CCConfigWidget::catalogUnregistered( Catalog * c )
{
- for ( QMap<QCheckListItem*, Catalog*>::Iterator it = m_catalogs.begin(); it != m_catalogs.end(); ++it )
+ for ( TQMap<TQCheckListItem*, Catalog*>::Iterator it = m_catalogs.begin(); it != m_catalogs.end(); ++it )
{
if ( it.data() == c )
{
- QCheckListItem * item = it.key();
+ TQCheckListItem * item = it.key();
delete( item );
m_catalogs.remove( it );
break;
@@ -284,16 +284,16 @@ void CCConfigWidget::slotGetterSetterValuesChanged( )
bool hasError = false;
if ( m_edtParameterName->text().isEmpty() )
{
- m_lblParameterName->setPaletteForegroundColor( QColor( "red" ) );
+ m_lblParameterName->setPaletteForegroundColor( TQColor( "red" ) );
m_edtExampleGet->setText( "error, missing parametername" );
m_edtExampleSet->setText( "error, missing parametername" );
hasError = true;
}
- QString name = m_edtVariableName->text();
+ TQString name = m_edtVariableName->text();
if ( name.isEmpty() )
{
- m_lblVariableName->setPaletteForegroundColor( QColor( "red" ) );
+ m_lblVariableName->setPaletteForegroundColor( TQColor( "red" ) );
m_edtExampleGet->setText( "error, missing variablename" );
m_edtExampleSet->setText( "error, missing variablename" );
hasError = true;
@@ -301,23 +301,23 @@ void CCConfigWidget::slotGetterSetterValuesChanged( )
if ( hasError )
{
- m_edtExampleGet->setPaletteForegroundColor( QColor( "red" ) );
- m_edtExampleSet->setPaletteForegroundColor( QColor( "red" ) );
+ m_edtExampleGet->setPaletteForegroundColor( TQColor( "red" ) );
+ m_edtExampleSet->setPaletteForegroundColor( TQColor( "red" ) );
return ;
}
else
{
- m_lblVariableName->setPaletteForegroundColor( QColor( "black" ) );
- m_lblParameterName->setPaletteForegroundColor( QColor( "black" ) );
- m_edtExampleGet->setPaletteForegroundColor( QColor( "black" ) );
- m_edtExampleSet->setPaletteForegroundColor( QColor( "black" ) );
+ m_lblVariableName->setPaletteForegroundColor( TQColor( "black" ) );
+ m_lblParameterName->setPaletteForegroundColor( TQColor( "black" ) );
+ m_edtExampleGet->setPaletteForegroundColor( TQColor( "black" ) );
+ m_edtExampleSet->setPaletteForegroundColor( TQColor( "black" ) );
}
- QStringList prefixes = QStringList::split( ",", m_edtRemovePrefix->text().replace( " ", "" ) );
+ TQStringList prefixes = TQStringList::split( ",", m_edtRemovePrefix->text().replace( " ", "" ) );
unsigned int len = 0;
- QStringList::ConstIterator theend = prefixes.end();
- for ( QStringList::ConstIterator ci = prefixes.begin(); ci != theend; ++ci )
+ TQStringList::ConstIterator theend = prefixes.end();
+ for ( TQStringList::ConstIterator ci = prefixes.begin(); ci != theend; ++ci )
{
if ( name.startsWith( *ci ) && ( *ci ).length() > len )
len = ( *ci ).length();
@@ -326,14 +326,14 @@ void CCConfigWidget::slotGetterSetterValuesChanged( )
if ( len > 0 )
name.remove( 0, len );
- QString getName = name;
+ TQString getName = name;
if ( !m_edtGet->text().isEmpty() )
{
getName[ 0 ] = getName[ 0 ].upper();
getName.prepend( m_edtGet->text() );
}
- QString setName = name;
+ TQString setName = name;
if ( !m_edtSet->text().isEmpty() )
{
setName[ 0 ] = setName[ 0 ].upper();
@@ -355,7 +355,7 @@ void CCConfigWidget::saveGetterSetterTab( )
config->setPrefixGet( m_edtGet->text() );
config->setPrefixSet( m_edtSet->text() );
- config->setPrefixVariable( QStringList::split( ",", m_edtRemovePrefix->text().replace( " ", "" ) ) );
+ config->setPrefixVariable( TQStringList::split( ",", m_edtRemovePrefix->text().replace( " ", "" ) ) );
config->setParameterName( m_edtParameterName->text() );
config->store();
}
@@ -370,7 +370,7 @@ void CCConfigWidget::initSplitTab( )
m_splitEnable->setChecked( config->splitEnabled() );
m_splitSync->setChecked( config->autoSync() );
- QString o = config->orientation();
+ TQString o = config->orientation();
m_splitVertical->setChecked( o == "Vertical" );
m_splitHorizontal->setChecked( o == "Horizontal" );
}
@@ -453,29 +453,29 @@ void CCConfigWidget::initQtTab()
}
}
-bool CCConfigWidget::isExecutable( const QString& path )
+bool CCConfigWidget::isExecutable( const TQString& path )
{
- QFileInfo fi(path);
+ TQFileInfo fi(path);
return ( fi.exists() && fi.isExecutable() );
}
-void CCConfigWidget::isQMakeExecutable( const QString& path )
+void CCConfigWidget::isQMakeExecutable( const TQString& path )
{
if( !isExecutable( path ) )
{
- m_qmakePath->lineEdit()->setPaletteForegroundColor(QColor("#ff0000"));
+ m_qmakePath->lineEdit()->setPaletteForegroundColor(TQColor("#ff0000"));
}else
{
m_qmakePath->lineEdit()->unsetPalette();
}
}
-void CCConfigWidget::isDesignerExecutable( const QString& path )
+void CCConfigWidget::isDesignerExecutable( const TQString& path )
{
if( !isExecutable( path ) )
{
- m_designerPath->lineEdit()->setPaletteForegroundColor(QColor("#ff0000"));
+ m_designerPath->lineEdit()->setPaletteForegroundColor(TQColor("#ff0000"));
}else
{
m_designerPath->lineEdit()->unsetPalette();
@@ -519,14 +519,14 @@ void CCConfigWidget::saveQtTab()
c->store();
}
-void CCConfigWidget::isValidQtDir( const QString &dir )
+void CCConfigWidget::isValidQtDir( const TQString &dir )
{
- QFileInfo inc( dir + QString( QChar( QDir::separator() ) )+
- "include"+QString( QChar( QDir::separator() ) )+
- "qt.h" );
+ TQFileInfo inc( dir + TQString( TQChar( TQDir::separator() ) )+
+ "include"+TQString( TQChar( TQDir::separator() ) )+
+ "tqt.h" );
if ( !m_versionQt4->isChecked() && !inc.exists() )
{
- m_qtDir->lineEdit()->setPaletteForegroundColor(QColor("#ff0000"));
+ m_qtDir->lineEdit()->setPaletteForegroundColor(TQColor("#ff0000"));
}else
{
m_qtDir->lineEdit()->unsetPalette();
@@ -561,13 +561,13 @@ void CCConfigWidget::openPluginPaths()
kdDebug(9024) << "Plugin paths opened" << endl;
QtBuildConfig* c = m_pPart->qtBuildConfig();
KDialog d( this );
- QVBoxLayout* mainlayout = new QVBoxLayout( &d );
+ TQVBoxLayout* mainlayout = new TQVBoxLayout( &d );
KPushButton* ok = new KPushButton( KStdGuiItem::ok(), &d );
- connect( ok, SIGNAL(clicked()), &d, SLOT(accept()));
+ connect( ok, TQT_SIGNAL(clicked()), &d, TQT_SLOT(accept()));
KPushButton* cancel = new KPushButton( KStdGuiItem::cancel(), &d );
- connect( cancel, SIGNAL(clicked()), &d, SLOT(reject()));
- QHBoxLayout* btns = new QHBoxLayout( &d );
- btns->addItem( new QSpacerItem(10,10,QSizePolicy::Expanding) );
+ connect( cancel, TQT_SIGNAL(clicked()), &d, TQT_SLOT(reject()));
+ TQHBoxLayout* btns = new TQHBoxLayout( &d );
+ btns->addItem( new TQSpacerItem(10,10,TQSizePolicy::Expanding) );
btns->addWidget(ok);
btns->addWidget(cancel);
@@ -579,7 +579,7 @@ void CCConfigWidget::openPluginPaths()
mainlayout->addWidget( p );
mainlayout->addLayout( btns );
d.resize( 450, 250 );
- if( d.exec() == QDialog::Accepted)
+ if( d.exec() == TQDialog::Accepted)
{
c->setDesignerPluginPaths( p->items() );
}