summaryrefslogtreecommitdiffstats
path: root/languages/cpp/addattributedialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/addattributedialog.cpp')
-rw-r--r--languages/cpp/addattributedialog.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/languages/cpp/addattributedialog.cpp b/languages/cpp/addattributedialog.cpp
index 7f5712a2..42031f59 100644
--- a/languages/cpp/addattributedialog.cpp
+++ b/languages/cpp/addattributedialog.cpp
@@ -32,24 +32,24 @@
#include <ktexteditor/editinterface.h>
#include <klineedit.h>
-#include <qfileinfo.h>
-#include <qcombobox.h>
-#include <qlistview.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qtextstream.h>
+#include <tqfileinfo.h>
+#include <tqcombobox.h>
+#include <tqlistview.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqtextstream.h>
AddAttributeDialog::AddAttributeDialog( CppSupportPart* cppSupport, ClassDom klass,
- QWidget* parent, const char* name, bool modal, WFlags fl )
+ TQWidget* parent, const char* name, bool modal, WFlags fl )
: AddAttributeDialogBase( parent, name, modal, fl ), m_cppSupport( cppSupport ), m_klass( klass ), m_count( 0 )
{
- access->insertStringList( QStringList() << "Public" << "Protected" << "Private" );
+ access->insertStringList( TQStringList() << "Public" << "Protected" << "Private" );
- storage->insertStringList( QStringList() << "Normal" << "Static" );
+ storage->insertStringList( TQStringList() << "Normal" << "Static" );
returnType->setAutoCompletion( true );
- returnType->insertStringList( QStringList()
+ returnType->insertStringList( TQStringList()
<< "void"
<< "char"
<< "wchar_t"
@@ -73,7 +73,7 @@ AddAttributeDialog::~AddAttributeDialog()
void AddAttributeDialog::reject()
{
- QDialog::reject();
+ TQDialog::reject();
}
void AddAttributeDialog::accept()
@@ -83,7 +83,7 @@ void AddAttributeDialog::accept()
if ( !editIface )
{
/// @todo show messagebox
- QDialog::accept();
+ TQDialog::accept();
return ;
}
@@ -91,15 +91,15 @@ void AddAttributeDialog::accept()
m_klass->getEndPosition( &line, &column );
// compute the insertion point map
- QMap<QString, QPair<int, int> > points;
- QStringList accessList;
+ TQMap<TQString, QPair<int, int> > points;
+ TQStringList accessList;
const VariableList variableList = m_klass->variableList();
for ( VariableList::ConstIterator it = variableList.begin(); it != variableList.end(); ++it )
{
int varEndLine, varEndColumn;
( *it ) ->getEndPosition( &varEndLine, &varEndColumn );
- QString access = accessID( *it );
+ TQString access = accessID( *it );
QPair<int, int> varEndPoint = qMakePair( varEndLine, varEndColumn );
if ( !points.contains( access ) || points[ access ] < varEndPoint )
@@ -115,21 +115,21 @@ void AddAttributeDialog::accept()
accessList += newAccessList( accessList );
- for ( QStringList::iterator it = accessList.begin(); it != accessList.end(); ++it )
+ for ( TQStringList::iterator it = accessList.begin(); it != accessList.end(); ++it )
{
- QListViewItem* item = attributes->firstChild();
+ TQListViewItem* item = attributes->firstChild();
while ( item )
{
- QListViewItem * currentItem = item;
+ TQListViewItem * currentItem = item;
item = item->nextSibling();
if ( currentItem->text( 0 ) != *it )
continue;
- QString access = ( *it ).lower();
+ TQString access = ( *it ).lower();
- QString str = variableDeclaration( currentItem );
+ TQString str = variableDeclaration( currentItem );
QPair<int, int> pt;
if ( points.contains( *it ) )
@@ -144,21 +144,21 @@ void AddAttributeDialog::accept()
}
editIface->insertText( pt.first + insertedLine + 1, 0 /*pt.second*/, str );
- insertedLine += str.contains( QChar( '\n' ) );
+ insertedLine += str.contains( TQChar( '\n' ) );
}
}
m_cppSupport->backgroundParser() ->addFile( m_klass->fileName() );
- QDialog::accept();
+ TQDialog::accept();
}
-QString AddAttributeDialog::variableDeclaration( QListViewItem* item ) const
+TQString AddAttributeDialog::variableDeclaration( TQListViewItem* item ) const
{
- QString str;
- QTextStream stream( &str, IO_WriteOnly );
- QString ind;
- ind.fill( QChar( ' ' ), 4 );
+ TQString str;
+ TQTextStream stream( &str, IO_WriteOnly );
+ TQString ind;
+ ind.fill( TQChar( ' ' ), 4 );
stream << ind;
if ( item->text( 1 ) == "Static" )
@@ -183,7 +183,7 @@ void AddAttributeDialog::updateGUI()
if ( enable )
{
- QListViewItem * item = attributes->selectedItem();
+ TQListViewItem * item = attributes->selectedItem();
item->setText( 0, access->currentText() );
item->setText( 1, storage->currentText() );
item->setText( 2, returnType->currentText() );
@@ -193,8 +193,8 @@ void AddAttributeDialog::updateGUI()
void AddAttributeDialog::addAttribute()
{
- QListViewItem * item = new QListViewItem( attributes, "Protected", "Normal",
- "int", QString( "attribute_%1" ).arg( ++m_count ) );
+ TQListViewItem * item = new TQListViewItem( attributes, "Protected", "Normal",
+ "int", TQString( "attribute_%1" ).arg( ++m_count ) );
attributes->setCurrentItem( item );
attributes->setSelected( item, true );
@@ -206,14 +206,14 @@ void AddAttributeDialog::deleteCurrentAttribute()
delete( attributes->currentItem() );
}
-void AddAttributeDialog::currentChanged( QListViewItem* item )
+void AddAttributeDialog::currentChanged( TQListViewItem* item )
{
if ( item )
{
- QString _access = item->text( 0 );
- QString _storage = item->text( 1 );
- QString _returnType = item->text( 2 );
- QString _declarator = item->text( 3 );
+ TQString _access = item->text( 0 );
+ TQString _storage = item->text( 1 );
+ TQString _returnType = item->text( 2 );
+ TQString _declarator = item->text( 3 );
access->setCurrentText( _access );
storage->setCurrentText( _storage );
@@ -224,18 +224,18 @@ void AddAttributeDialog::currentChanged( QListViewItem* item )
updateGUI();
}
-QStringList AddAttributeDialog::newAccessList( const QStringList& accessList ) const
+TQStringList AddAttributeDialog::newAccessList( const TQStringList& accessList ) const
{
- QStringList newAccessList;
+ TQStringList newAccessList;
- QListViewItem* item = attributes->firstChild();
+ TQListViewItem* item = attributes->firstChild();
while ( item )
{
- QListViewItem * currentItem = item;
+ TQListViewItem * currentItem = item;
item = item->nextSibling();
- QString access = currentItem->text( 0 );
+ TQString access = currentItem->text( 0 );
if ( !( accessList.contains( access ) || newAccessList.contains( access ) ) )
newAccessList.push_back( access );
}
@@ -243,21 +243,21 @@ QStringList AddAttributeDialog::newAccessList( const QStringList& accessList ) c
return newAccessList;
}
-QString AddAttributeDialog::accessID( VariableDom var ) const
+TQString AddAttributeDialog::accessID( VariableDom var ) const
{
switch ( var->access() )
{
case CodeModelItem::Public:
- return QString::fromLatin1( "Public" );
+ return TQString::fromLatin1( "Public" );
case CodeModelItem::Protected:
- return QString::fromLatin1( "Protected" );
+ return TQString::fromLatin1( "Protected" );
case CodeModelItem::Private:
- return QString::fromLatin1( "Private" );
+ return TQString::fromLatin1( "Private" );
}
- return QString::null;
+ return TQString::null;
}
#include "addattributedialog.moc"