summaryrefslogtreecommitdiffstats
path: root/kaddressbook/xxport/csvimportdialog.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kaddressbook/xxport/csvimportdialog.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook/xxport/csvimportdialog.cpp')
-rw-r--r--kaddressbook/xxport/csvimportdialog.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp
index 36f760540..4356a5997 100644
--- a/kaddressbook/xxport/csvimportdialog.cpp
+++ b/kaddressbook/xxport/csvimportdialog.cpp
@@ -50,10 +50,10 @@
enum { Local = 0, Guess = 1, Latin1 = 2, Uni = 3, MSBug = 4, Codec = 5 };
-CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, TQWidget *parent,
+CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, TQWidget *tqparent,
const char * name )
: KDialogBase( Plain, i18n ( "CSV Import Dialog" ), Ok | Cancel | User1 |
- User2, Ok, parent, name, true, true ),
+ User2, Ok, tqparent, name, true, true ),
mAdjustRows( false ),
mStartLine( 0 ),
mTextQuote( '"' ),
@@ -383,11 +383,11 @@ void CSVImportDialog::initGUI()
// Delimiter: comma, semicolon, tab, space, other
mDelimiterBox = new TQButtonGroup( i18n( "Delimiter" ), mPage );
- mDelimiterBox->setColumnLayout( 0, Qt::Vertical );
+ mDelimiterBox->setColumnLayout( 0, TQt::Vertical );
mDelimiterBox->tqlayout()->setSpacing( spacingHint() );
mDelimiterBox->tqlayout()->setMargin( marginHint() );
TQGridLayout *delimiterLayout = new TQGridLayout( mDelimiterBox->tqlayout() );
- delimiterLayout->tqsetAlignment( Qt::AlignTop );
+ delimiterLayout->tqsetAlignment( TQt::AlignTop );
tqlayout->addMultiCellWidget( mDelimiterBox, 1, 4, 0, 0 );
mRadioComma = new TQRadioButton( i18n( "Comma" ), mDelimiterBox );
@@ -465,7 +465,7 @@ void CSVImportDialog::fillTable()
int row, column;
bool lastCharDelimiter = false;
bool ignoreDups = mIgnoreDuplicates->isChecked();
- enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD,
+ enum { S_START, S_TQUOTED_FIELD, S_MAYBE_END_OF_TQUOTED_FIELD, S_END_OF_TQUOTED_FIELD,
S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;
TQChar x;
@@ -517,7 +517,7 @@ void CSVImportDialog::fillTable()
switch ( state ) {
case S_START :
if ( x == mTextQuote ) {
- state = S_QUOTED_FIELD;
+ state = S_TQUOTED_FIELD;
} else if ( x == mDelimiter ) {
if ( ( ignoreDups == false ) || ( lastCharDelimiter == false ) )
++column;
@@ -530,9 +530,9 @@ void CSVImportDialog::fillTable()
state = S_MAYBE_NORMAL_FIELD;
}
break;
- case S_QUOTED_FIELD :
+ case S_TQUOTED_FIELD :
if ( x == mTextQuote ) {
- state = S_MAYBE_END_OF_QUOTED_FIELD;
+ state = S_MAYBE_END_OF_TQUOTED_FIELD;
} else if ( x == '\n' && mTextQuote.isNull() ) {
setText( row - mStartLine + 1, column, field );
field = "";
@@ -549,10 +549,10 @@ void CSVImportDialog::fillTable()
field += x;
}
break;
- case S_MAYBE_END_OF_QUOTED_FIELD :
+ case S_MAYBE_END_OF_TQUOTED_FIELD :
if ( x == mTextQuote ) {
field += x;
- state = S_QUOTED_FIELD;
+ state = S_TQUOTED_FIELD;
} else if ( x == mDelimiter || x == '\n' ) {
setText( row - mStartLine + 1, column, field );
field = "";
@@ -566,10 +566,10 @@ void CSVImportDialog::fillTable()
}
state = S_START;
} else {
- state = S_END_OF_QUOTED_FIELD;
+ state = S_END_OF_TQUOTED_FIELD;
}
break;
- case S_END_OF_QUOTED_FIELD :
+ case S_END_OF_TQUOTED_FIELD :
if ( x == mDelimiter || x == '\n' ) {
setText( row - mStartLine + 1, column, field );
field = "";
@@ -583,13 +583,13 @@ void CSVImportDialog::fillTable()
}
state = S_START;
} else {
- state = S_END_OF_QUOTED_FIELD;
+ state = S_END_OF_TQUOTED_FIELD;
}
break;
case S_MAYBE_NORMAL_FIELD :
if ( x == mTextQuote ) {
field = "";
- state = S_QUOTED_FIELD;
+ state = S_TQUOTED_FIELD;
break;
}
case S_NORMAL_FIELD :
@@ -707,11 +707,11 @@ void CSVImportDialog::resizeColumns()
TQMap<TQString, uint>::ConstIterator it;
for ( it = mTypeMap.begin(); it != mTypeMap.end(); ++it ) {
- width = QMAX( width, fm.width( it.key() ) );
+ width = TQMAX( width, fm.width( it.key() ) );
}
for ( int i = 0; i < mTable->numCols(); ++i )
- mTable->setColumnWidth( i, QMAX( width + 15, mTable->columnWidth( i ) ) );
+ mTable->setColumnWidth( i, TQMAX( width + 15, mTable->columnWidth( i ) ) );
}
void CSVImportDialog::returnPressed()