Remove additional unneeded tq method conversions

pull/1/head
Timothy Pearson 13 years ago
parent bcc684e28a
commit 7ea89afa11

@ -365,13 +365,13 @@ bool Arch::processLine( const TQCString &line )
: columns[ m_fixYear ]; : columns[ m_fixYear ];
TQString month = ( m_repairMonth >= 0 ) ? TQString month = ( m_repairMonth >= 0 ) ?
TQString( "%1" ) TQString( "%1" )
.tqarg( ArkUtils::getMonth( columns[ m_repairMonth ].ascii() ) ) .arg( ArkUtils::getMonth( columns[ m_repairMonth ].ascii() ) )
: columns[ m_fixMonth ]; : columns[ m_fixMonth ];
TQString timestamp = TQString::fromLatin1( "%1-%2-%3 %4" ) TQString timestamp = TQString::fromLatin1( "%1-%2-%3 %4" )
.tqarg( year ) .arg( year )
.tqarg( month ) .arg( month )
.tqarg( columns[ m_fixDay ] ) .arg( columns[ m_fixDay ] )
.tqarg( columns[ m_fixTime ] ); .arg( columns[ m_fixTime ] );
columns[ m_dateCol ] = timestamp; columns[ m_dateCol ] = timestamp;
} }

@ -40,12 +40,12 @@ ArchiveFormatDlg::ArchiveFormatDlg( TQWidget * parent, const TQString & defaultT
text = i18n( "This file appears to be of type %1,\n" text = i18n( "This file appears to be of type %1,\n"
"which is not a supported archive format.\n" "which is not a supported archive format.\n"
"In order to proceed, please choose the format\n" "In order to proceed, please choose the format\n"
"of the file." ).tqarg( defaultType ); "of the file." ).arg( defaultType );
else else
text = i18n( "You are about to open a file that has a non-standard extension.\n" text = i18n( "You are about to open a file that has a non-standard extension.\n"
"Ark has detected the format: %1\n" "Ark has detected the format: %1\n"
"If this is not correct, please choose " "If this is not correct, please choose "
"the appropriate format." ).tqarg( defaultDescription ); "the appropriate format." ).arg( defaultDescription );
TQVBox * page = makeVBoxMainWidget(); TQVBox * page = makeVBoxMainWidget();

@ -294,7 +294,7 @@ bool ArkPart::closeURL()
int res = KMessageBox::warningYesNoCancel( widget(), int res = KMessageBox::warningYesNoCancel( widget(),
i18n( "The archive \"%1\" has been modified.\n" i18n( "The archive \"%1\" has been modified.\n"
"Do you want to save it?" ).tqarg( docName ), "Do you want to save it?" ).arg( docName ),
i18n( "Save Archive?" ), KStdGuiItem::save(), KStdGuiItem::discard() ); i18n( "Save Archive?" ), KStdGuiItem::save(), KStdGuiItem::discard() );
switch ( res ) switch ( res )
@ -320,7 +320,7 @@ void ArkPart::transferStarted( KIO::Job *job )
{ {
m_job = job; m_job = job;
m_bar->slotSetBusy( i18n( "Downloading %1..." ).tqarg( m_url.prettyURL() ), m_bar->slotSetBusy( i18n( "Downloading %1..." ).arg( m_url.prettyURL() ),
(job != 0), (job != 0) ); (job != 0), (job != 0) );
if ( job ) if ( job )

@ -80,7 +80,7 @@ bool ArkViewer::view( const KURL& filename )
TQVBox *headerRight = new TQVBox( header ); TQVBox *headerRight = new TQVBox( header );
new TQLabel( TQString( "<qt><b>%1</b></qt>" ) new TQLabel( TQString( "<qt><b>%1</b></qt>" )
.tqarg( filename.fileName() ), headerRight .arg( filename.fileName() ), headerRight
); );
new TQLabel( mimetype->comment(), headerRight ); new TQLabel( mimetype->comment(), headerRight );

@ -199,7 +199,7 @@ ArkWidget::updateStatusTotals()
m_nSizeOfFiles = m_fileListView->totalSize(); m_nSizeOfFiles = m_fileListView->totalSize();
TQString strInfo = i18n( "%n file %1", "%n files %1", m_nNumFiles ) TQString strInfo = i18n( "%n file %1", "%n files %1", m_nNumFiles )
.tqarg( KIO::convertSize( m_nSizeOfFiles ) ); .arg( KIO::convertSize( m_nSizeOfFiles ) );
emit setStatusBarText(strInfo); emit setStatusBarText(strInfo);
} }
@ -431,7 +431,7 @@ ArkWidget::extractTo( const KURL & targetDirectory, const KURL & archive, bool b
{ {
if ( !KIO::NetAccess::mkdir( m_extractTo_targetDirectory, this ) ) if ( !KIO::NetAccess::mkdir( m_extractTo_targetDirectory, this ) )
{ {
KMessageBox::error( 0, i18n( "Could not create the folder %1" ).tqarg( KMessageBox::error( 0, i18n( "Could not create the folder %1" ).arg(
targetDirectory.prettyURL() ) ); targetDirectory.prettyURL() ) );
emit request_file_quit(); emit request_file_quit();
return; return;
@ -467,7 +467,7 @@ ArkWidget::extractToSlotOpenDone( bool success )
disconnect( this, TQT_SIGNAL( openDone( bool ) ), this, TQT_SLOT( extractToSlotOpenDone( bool ) ) ); disconnect( this, TQT_SIGNAL( openDone( bool ) ), this, TQT_SLOT( extractToSlotOpenDone( bool ) ) );
if ( !success ) if ( !success )
{ {
KMessageBox::error( this, i18n( "An error occurred while opening the archive %1." ).tqarg( m_url.prettyURL() ) ); KMessageBox::error( this, i18n( "An error occurred while opening the archive %1." ).arg( m_url.prettyURL() ) );
emit request_file_quit(); emit request_file_quit();
return; return;
} }
@ -712,7 +712,7 @@ ArkWidget::file_open(const KURL& url)
TQFileInfo fileInfo( strFile ); TQFileInfo fileInfo( strFile );
if ( !fileInfo.exists() ) if ( !fileInfo.exists() )
{ {
KMessageBox::error(this, i18n("The archive %1 does not exist.").tqarg(strFile)); KMessageBox::error(this, i18n("The archive %1 does not exist.").arg(strFile));
emit removeRecentURL( m_realURL ); emit removeRecentURL( m_realURL );
return; return;
} }
@ -821,7 +821,7 @@ ArkWidget::getCreateFilename(const TQString & _caption,
{ {
KMessageBox::error( this, KMessageBox::error( this,
i18n( "You do not have permission" i18n( "You do not have permission"
" to write to the directory %1" ).tqarg(url.directory() ) ); " to write to the directory %1" ).arg(url.directory() ) );
return TQString(); return TQString();
} }
} // end of while loop } // end of while loop
@ -1817,13 +1817,13 @@ ArkWidget::updateStatusSelection()
else if (m_nNumSelectedFiles != 1) else if (m_nNumSelectedFiles != 1)
{ {
strInfo = i18n("%1 files selected %2") strInfo = i18n("%1 files selected %2")
.tqarg(KGlobal::locale()->formatNumber(m_nNumSelectedFiles, 0)) .arg(KGlobal::locale()->formatNumber(m_nNumSelectedFiles, 0))
.tqarg(KIO::convertSize(m_nSizeOfSelectedFiles)); .arg(KIO::convertSize(m_nSizeOfSelectedFiles));
} }
else else
{ {
strInfo = i18n("1 file selected %2") strInfo = i18n("1 file selected %2")
.tqarg(KIO::convertSize(m_nSizeOfSelectedFiles)); .arg(KIO::convertSize(m_nSizeOfSelectedFiles));
} }
emit setStatusBarSelectedFiles(strInfo); emit setStatusBarSelectedFiles(strInfo);
@ -2044,7 +2044,7 @@ Arch * ArkWidget::getNewArchive( const TQString & _fileName, const TQString& _mi
if (!newArch->archUtilityIsAvailable()) if (!newArch->archUtilityIsAvailable())
{ {
KMessageBox::error(this, i18n("The utility %1 is not in your PATH.\nPlease install it or contact your system administrator.").tqarg(newArch->getArchUtility())); KMessageBox::error(this, i18n("The utility %1 is not in your PATH.\nPlease install it or contact your system administrator.").arg(newArch->getArchUtility()));
return NULL; return NULL;
} }
@ -2156,7 +2156,7 @@ ArkWidget::openArchive( const TQString & _filename )
if (!newArch->unarchUtilityIsAvailable()) if (!newArch->unarchUtilityIsAvailable())
{ {
KMessageBox::error(this, i18n("The utility %1 is not in your PATH.\nPlease install it or contact your system administrator.").tqarg(newArch->getUnarchUtility())); KMessageBox::error(this, i18n("The utility %1 is not in your PATH.\nPlease install it or contact your system administrator.").arg(newArch->getUnarchUtility()));
return; return;
} }
@ -2211,7 +2211,7 @@ ArkWidget::slotOpen( Arch * /* _newarch */, bool _success, const TQString & _fil
{ {
emit removeRecentURL( m_realURL ); emit removeRecentURL( m_realURL );
emit setWindowCaption( TQString() ); emit setWindowCaption( TQString() );
KMessageBox::error( this, i18n( "An error occurred while trying to open the archive %1" ).tqarg( _filename ) ); KMessageBox::error( this, i18n( "An error occurred while trying to open the archive %1" ).arg( _filename ) );
if ( m_extractOnly ) if ( m_extractOnly )
emit request_file_quit(); emit request_file_quit();

@ -63,7 +63,7 @@ ExtractionDialog::ExtractionDialog( TQWidget *parent, const char *name,
{ {
if ( !archiveName.isNull() ) if ( !archiveName.isNull() )
{ {
setCaption( i18n( "Extract Files From %1" ).tqarg( archiveName ) ); setCaption( i18n( "Extract Files From %1" ).arg( archiveName ) );
} }
TQVBox *vbox = makeVBoxMainWidget(); TQVBox *vbox = makeVBoxMainWidget();
@ -80,7 +80,7 @@ ExtractionDialog::ExtractionDialog( TQWidget *parent, const char *name,
TQVBox *whichFiles = new TQVBox( header ); TQVBox *whichFiles = new TQVBox( header );
whichFiles->tqlayout()->setSpacing( 6 ); whichFiles->tqlayout()->setSpacing( 6 );
new TQLabel( TQString( "<qt><b><font size=\"+1\">%1</font></b></qt>" ) new TQLabel( TQString( "<qt><b><font size=\"+1\">%1</font></b></qt>" )
.tqarg( i18n( "Extract:" ) ), whichFiles ); .arg( i18n( "Extract:" ) ), whichFiles );
TQHButtonGroup *filesGroup = new TQHButtonGroup( whichFiles ); TQHButtonGroup *filesGroup = new TQHButtonGroup( whichFiles );
m_selectedButton = new TQRadioButton( i18n( "Selected files only" ), filesGroup ); m_selectedButton = new TQRadioButton( i18n( "Selected files only" ), filesGroup );
m_allButton = new TQRadioButton( i18n( "All files" ), filesGroup ); m_allButton = new TQRadioButton( i18n( "All files" ), filesGroup );
@ -90,7 +90,7 @@ ExtractionDialog::ExtractionDialog( TQWidget *parent, const char *name,
else else
{ {
new TQLabel( TQString( "<qt><b><font size=\"+2\">%1</font></b></qt>" ) new TQLabel( TQString( "<qt><b><font size=\"+2\">%1</font></b></qt>" )
.tqarg( i18n( "Extract all files" ) ), header ); .arg( i18n( "Extract all files" ) ), header );
} }
TQHBox *destDirBox = new TQHBox( vbox ); TQHBox *destDirBox = new TQHBox( vbox );
@ -145,7 +145,7 @@ void ExtractionDialog::accept()
TQFileInfo fi( p.path() ); TQFileInfo fi( p.path() );
if ( !fi.isDir() && !fi.exists() ) if ( !fi.isDir() && !fi.exists() )
{ {
TQString ltext = i18n( "Create folder %1?").tqarg(p.path()); TQString ltext = i18n( "Create folder %1?").arg(p.path());
int createDir = KMessageBox::questionYesNo( this, ltext, i18n( "Missing Folder" ) , i18n("Create Folder"), i18n("Do Not Create")); int createDir = KMessageBox::questionYesNo( this, ltext, i18n( "Missing Folder" ) , i18n("Create Folder"), i18n("Do Not Create"));
if( createDir == 4 ) if( createDir == 4 )
{ {

@ -153,7 +153,7 @@ void FileLVI::setText( int column, const TQString &text )
else else
m_ratio = text.toDouble(); m_ratio = text.toDouble();
TQListViewItem::setText( column, i18n( "Packed Ratio", "%1 %" ) TQListViewItem::setText( column, i18n( "Packed Ratio", "%1 %" )
.tqarg(KGlobal::locale()->formatNumber( m_ratio, 1 ) ) .arg(KGlobal::locale()->formatNumber( m_ratio, 1 ) )
); );
} }
else if ( colName == timeStampStrCol ) else if ( colName == timeStampStrCol )
@ -264,14 +264,14 @@ TQStringList FileListView::selectedFilenames()
{ {
if ( item->isSelected() ) if ( item->isSelected() )
{ {
// If the item has tqchildren, add each child and the item // If the item has children, add each child and the item
if ( item->childCount() > 0 ) if ( item->childCount() > 0 )
{ {
files += item->fileName(); files += item->fileName();
files += tqchildrenOf( item ); files += childrenOf( item );
/* If we got here, then the logic for "going to the next item" /* If we got here, then the logic for "going to the next item"
* is a bit different: as we already dealt with all the tqchildren, * is a bit different: as we already dealt with all the children,
* the "next item" is the next sibling of the current item, not * the "next item" is the next sibling of the current item, not
* its first child. If the current item has no siblings, then * its first child. If the current item has no siblings, then
* the next item is the next sibling of its parent, and so on. * the next item is the next sibling of its parent, and so on.
@ -288,7 +288,7 @@ TQStringList FileListView::selectedFilenames()
} }
else else
{ {
// If the item has no tqchildren, just add it to the list // If the item has no children, just add it to the list
files += item->fileName(); files += item->fileName();
} }
} }
@ -559,10 +559,10 @@ FileLVI* FileListView::findParent( const TQString& fullname )
return static_cast< FileLVI* >( item ); return static_cast< FileLVI* >( item );
} }
TQStringList FileListView::tqchildrenOf( FileLVI* parent ) TQStringList FileListView::childrenOf( FileLVI* parent )
{ {
Q_ASSERT( parent ); Q_ASSERT( parent );
TQStringList tqchildren; TQStringList children;
FileLVI *item = static_cast<FileLVI*>( parent->firstChild() ); FileLVI *item = static_cast<FileLVI*>( parent->firstChild() );
@ -570,17 +570,17 @@ TQStringList FileListView::tqchildrenOf( FileLVI* parent )
{ {
if ( item->childCount() == 0 ) if ( item->childCount() == 0 )
{ {
tqchildren += item->fileName(); children += item->fileName();
} }
else else
{ {
tqchildren += item->fileName(); children += item->fileName();
tqchildren += tqchildrenOf( item ); children += childrenOf( item );
} }
item = static_cast<FileLVI*>( item->nextSibling() ); item = static_cast<FileLVI*>( item->nextSibling() );
} }
return tqchildren; return children;
} }
#include "filelistview.moc" #include "filelistview.moc"

@ -153,7 +153,7 @@ class FileListView: public KListView
private: private:
FileLVI* findParent( const TQString& fullname ); FileLVI* findParent( const TQString& fullname );
TQStringList tqchildrenOf( FileLVI* parent ); TQStringList childrenOf( FileLVI* parent );
TQMap<int, columnName> m_columnMap; TQMap<int, columnName> m_columnMap;
bool m_pressed; bool m_pressed;

@ -221,7 +221,7 @@ MainWindow::arkAlreadyOpen( const KURL & url )
window_close(); window_close();
// notify the user what's going on // notify the user what's going on
KMessageBox::information(0, i18n("The archive %1 is already open and has been raised.\nNote: if the filename does not match, it only means that one of the two is a symbolic link.").tqarg(url.prettyURL())); KMessageBox::information(0, i18n("The archive %1 is already open and has been raised.\nNote: if the filename does not match, it only means that one of the two is a symbolic link.").arg(url.prettyURL()));
return true; return true;
} }
return false; return false;

@ -283,13 +283,13 @@ bool SevenZipArch::processLine( const TQCString& _line )
: columns[ m_fixYear ]; : columns[ m_fixYear ];
TQString month = ( m_repairMonth >= 0 ) ? TQString month = ( m_repairMonth >= 0 ) ?
TQString( "%1" ) TQString( "%1" )
.tqarg( ArkUtils::getMonth( columns[ m_repairMonth ].ascii() ) ) .arg( ArkUtils::getMonth( columns[ m_repairMonth ].ascii() ) )
: columns[ m_fixMonth ]; : columns[ m_fixMonth ];
TQString timestamp = TQString::fromLatin1( "%1-%2-%3 %4" ) TQString timestamp = TQString::fromLatin1( "%1-%2-%3 %4" )
.tqarg( year ) .arg( year )
.tqarg( month ) .arg( month )
.tqarg( columns[ m_fixDay ] ) .arg( columns[ m_fixDay ] )
.tqarg( columns[ m_fixTime ] ); .arg( columns[ m_fixTime ] );
columns[ m_dateCol ] = timestamp; columns[ m_dateCol ] = timestamp;
} }

@ -322,14 +322,14 @@ void TarArch::slotListingDone(KProcess *_kp)
if (flv!=NULL && flv->totalFiles()>0) if (flv!=NULL && flv->totalFiles()>0)
{ {
const TQString firstfile = ((FileLVI *) flv->firstChild())->fileName(); const TQString firstfile = ((FileLVI *) flv->firstChild())->fileName();
if (list.find(TQRegExp(TQString("\\s\\./%1[/\\n]").tqarg(firstfile)))>=0) if (list.find(TQRegExp(TQString("\\s\\./%1[/\\n]").arg(firstfile)))>=0)
{ {
m_dotslash = true; m_dotslash = true;
kdDebug(1601) << k_funcinfo << "archive has dot-slash" << endl; kdDebug(1601) << k_funcinfo << "archive has dot-slash" << endl;
} }
else else
{ {
if (list.find(TQRegExp(TQString("\\s%1[/\\n]").tqarg(firstfile)))>=0) if (list.find(TQRegExp(TQString("\\s%1[/\\n]").arg(firstfile)))>=0)
{ {
// archive doesn't have dot-slash // archive doesn't have dot-slash
m_dotslash = false; m_dotslash = false;

@ -289,7 +289,7 @@ TQString fixTime( const TQString &_strTime )
if ( strTime.contains("+") || strTime.contains("-") ) if ( strTime.contains("+") || strTime.contains("-") )
{ {
TQCharRef c = strTime.tqat( 8 ); TQCharRef c = strTime.at( 8 );
int offset = strTime.right( strTime.length() - 9 ).toInt(); int offset = strTime.right( strTime.length() - 9 ).toInt();
TQString strHour = strTime.left( 2 ); TQString strHour = strTime.left( 2 );
int nHour = strHour.toInt(); int nHour = strHour.toInt();

@ -98,7 +98,7 @@ KCharSelectDia::KCharSelectDia(TQWidget *parent,const char *name,
(void)new KAction(i18n("&Flip"), 0, TQT_TQOBJECT(this), (void)new KAction(i18n("&Flip"), 0, TQT_TQOBJECT(this),
TQT_SLOT(flipText()), actionCollection(), "flip" ); TQT_SLOT(flipText()), actionCollection(), "flip" );
(void)new KAction(i18n("&Alignment"), 0, TQT_TQOBJECT(this), (void)new KAction(i18n("&Alignment"), 0, TQT_TQOBJECT(this),
TQT_SLOT(toggleEntryDirection()), actionCollection(), "tqalignment" ); TQT_SLOT(toggleEntryDirection()), actionCollection(), "alignment" );
charSelect->setFocus(); charSelect->setFocus();

@ -244,7 +244,7 @@ void IRKick::executeAction(const IRAction &action)
{ TQString sname = ProfileServer::profileServer()->getServiceName(action.program()); { TQString sname = ProfileServer::profileServer()->getServiceName(action.program());
if(!sname.isNull()) if(!sname.isNull())
{ {
KPassivePopup::message("IRKick", i18n("Starting <b>%1</b>...").tqarg(action.application()), SmallIcon("irkick"), theTrayIcon); KPassivePopup::message("IRKick", i18n("Starting <b>%1</b>...").arg(action.application()), SmallIcon("irkick"), theTrayIcon);
KApplication::startServiceByDesktopName(sname); KApplication::startServiceByDesktopName(sname);
} }
} }

@ -97,7 +97,7 @@ void AddAction::updateButton(const TQString &remote, const TQString &button)
} }
else else
KMessageBox::error(this, i18n( "You did not select a mode of that remote control. Please use %1, " KMessageBox::error(this, i18n( "You did not select a mode of that remote control. Please use %1, "
"or revert back to select a different mode." ).tqarg( theMode.remoteName() ), "or revert back to select a different mode." ).arg( theMode.remoteName() ),
i18n( "Incorrect Remote Control Detected" )); i18n( "Incorrect Remote Control Detected" ));
if(indexOf(currentPage()) == 1) if(indexOf(currentPage()) == 1)

@ -223,7 +223,7 @@
<property name="text"> <property name="text">
<string>You are attempting to configure an action for a button on [remote] (in mode [mode]). Press a button on this remote control or select from the list.</string> <string>You are attempting to configure an action for a button on [remote] (in mode [mode]). Press a button on this remote control or select from the list.</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignVCenter</set> <set>WordBreak|AlignVCenter</set>
</property> </property>
</widget> </widget>
@ -1085,7 +1085,7 @@
<property name="text"> <property name="text">
<string>This application may have multiple instances. In the case of having multiple instances at once when this action should be executed, choose a course of action:</string> <string>This application may have multiple instances. In the case of having multiple instances at once when this action should be executed, choose a course of action:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignVCenter</set> <set>WordBreak|AlignVCenter</set>
</property> </property>
</widget> </widget>

@ -768,7 +768,7 @@
<property name="text"> <property name="text">
<string>This application may have multiple instances. In the case of having multiple instances at once when this action should be executed, choose a course of action:</string> <string>This application may have multiple instances. In the case of having multiple instances at once when this action should be executed, choose a course of action:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignVCenter</set> <set>WordBreak|AlignVCenter</set>
</property> </property>
</widget> </widget>

@ -333,7 +333,7 @@ void KCMLirc::slotRemoveMode()
if(!theKCMLircBase->theModes->selectedItem()) return; if(!theKCMLircBase->theModes->selectedItem()) return;
if(!theKCMLircBase->theModes->selectedItem()->parent()) return; if(!theKCMLircBase->theModes->selectedItem()->parent()) return;
if(KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to remove %1 and all its actions?").tqarg(theKCMLircBase->theModes->selectedItem()->text(0)), i18n("Erase Actions?")) == KMessageBox::Continue) if(KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to remove %1 and all its actions?").arg(theKCMLircBase->theModes->selectedItem()->text(0)), i18n("Erase Actions?")) == KMessageBox::Continue)
{ {
allModes.erase(modeMap[theKCMLircBase->theModes->selectedItem()]); allModes.erase(modeMap[theKCMLircBase->theModes->selectedItem()]);
updateModes(); updateModes();
@ -377,7 +377,7 @@ void KCMLirc::updateActions()
if(!theKCMLircBase->theModes->selectedItem()) { updateActionsStatus(0); return; } if(!theKCMLircBase->theModes->selectedItem()) { updateActionsStatus(0); return; }
Mode m = modeMap[theKCMLircBase->theModes->selectedItem()]; Mode m = modeMap[theKCMLircBase->theModes->selectedItem()];
theKCMLircBase->theModeLabel->setText(m.remoteName() + ": " + (m.name().isEmpty() ? i18n("Actions <i>always</i> available") : i18n("Actions available only in mode <b>%1</b>").tqarg(m.name()))); theKCMLircBase->theModeLabel->setText(m.remoteName() + ": " + (m.name().isEmpty() ? i18n("Actions <i>always</i> available") : i18n("Actions available only in mode <b>%1</b>").arg(m.name())));
IRAItList l = allActions.findByMode(m); IRAItList l = allActions.findByMode(m);
for(IRAItList::iterator i = l.begin(); i != l.end(); ++i) for(IRAItList::iterator i = l.begin(); i != l.end(); ++i)
{ TQListViewItem *b = new KListViewItem(theKCMLircBase->theActions, (**i).buttonName(), (**i).application(), (**i).function(), (**i).arguments().toString(), (**i).notes()); { TQListViewItem *b = new KListViewItem(theKCMLircBase->theActions, (**i).buttonName(), (**i).application(), (**i).function(), (**i).arguments().toString(), (**i).notes());
@ -467,7 +467,7 @@ void KCMLirc::updateInformation()
if(!theKCMLircBase->theExtensions->selectedItem()->parent()) if(!theKCMLircBase->theExtensions->selectedItem()->parent())
{ {
theKCMLircBase->theInformationLabel->setText(i18n("Information on <b>%1</b>:").tqarg(theKCMLircBase->theExtensions->selectedItem()->text(0))); theKCMLircBase->theInformationLabel->setText(i18n("Information on <b>%1</b>:").arg(theKCMLircBase->theExtensions->selectedItem()->text(0)));
if(theKCMLircBase->theExtensions->selectedItem()->text(0) == i18n("Applications")) if(theKCMLircBase->theExtensions->selectedItem()->text(0) == i18n("Applications"))
new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Applications"), TQString().setNum(theKCMLircBase->theExtensions->selectedItem()->childCount())); new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Applications"), TQString().setNum(theKCMLircBase->theExtensions->selectedItem()->childCount()));
else if(theKCMLircBase->theExtensions->selectedItem()->text(0) == i18n("Remote Controls")) else if(theKCMLircBase->theExtensions->selectedItem()->text(0) == i18n("Remote Controls"))
@ -481,7 +481,7 @@ void KCMLirc::updateInformation()
new TQListViewItem(theKCMLircBase->theInformation, i18n("Extension Author"), p->author()); new TQListViewItem(theKCMLircBase->theInformation, i18n("Extension Author"), p->author());
new TQListViewItem(theKCMLircBase->theInformation, i18n("Application Identifier"), p->id()); new TQListViewItem(theKCMLircBase->theInformation, i18n("Application Identifier"), p->id());
new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Actions"), TQString().setNum(p->actions().count())); new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Actions"), TQString().setNum(p->actions().count()));
theKCMLircBase->theInformationLabel->setText(i18n("Information on <b>%1</b>:").tqarg(p->name())); theKCMLircBase->theInformationLabel->setText(i18n("Information on <b>%1</b>:").arg(p->name()));
} }
else if(theKCMLircBase->theExtensions->selectedItem()->parent()->text(0) == i18n("Remote Controls")) else if(theKCMLircBase->theExtensions->selectedItem()->parent()->text(0) == i18n("Remote Controls"))
{ {
@ -491,7 +491,7 @@ void KCMLirc::updateInformation()
new TQListViewItem(theKCMLircBase->theInformation, i18n("Extension Author"), p->author()); new TQListViewItem(theKCMLircBase->theInformation, i18n("Extension Author"), p->author());
new TQListViewItem(theKCMLircBase->theInformation, i18n("Remote Control Identifier"), p->id()); new TQListViewItem(theKCMLircBase->theInformation, i18n("Remote Control Identifier"), p->id());
new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Buttons"), TQString().setNum(p->buttons().count())); new TQListViewItem(theKCMLircBase->theInformation, i18n("Number of Buttons"), TQString().setNum(p->buttons().count()));
theKCMLircBase->theInformationLabel->setText(i18n("Information on <b>%1</b>:").tqarg(p->name())); theKCMLircBase->theInformationLabel->setText(i18n("Information on <b>%1</b>:").arg(p->name()));
} }
} }

@ -74,7 +74,7 @@
<property name="text"> <property name="text">
<string>There are currently no remote controls available. You must first set up LIRC correctly; see www.lirc.org for more information.</string> <string>There are currently no remote controls available. You must first set up LIRC correctly; see www.lirc.org for more information.</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignTop</set> <set>WordBreak|AlignTop</set>
</property> </property>
</widget> </widget>

@ -32,6 +32,6 @@ void KCMLircBase::init()
theModes->setItemsRenameable(true); theModes->setItemsRenameable(true);
modeLayout->addWidget(theModes); modeLayout->addWidget(theModes);
modeLayout->addLayout(modeButtonLayout); modeLayout->addLayout(modeButtonLayout);
modeLayout->tqinvalidate(); modeLayout->invalidate();
modeLayout->activate(); modeLayout->activate();
} }

@ -97,7 +97,7 @@ const TQString IRAction::function() const
if(theObject.isEmpty()) if(theObject.isEmpty())
return i18n("Exit mode"); return i18n("Exit mode");
else else
return i18n("Switch to %1").tqarg(theObject); return i18n("Switch to %1").arg(theObject);
else else
if(theObject.isEmpty()) if(theObject.isEmpty())
return i18n("Just start"); return i18n("Just start");

@ -21,7 +21,7 @@ KDEsshDialog::KDEsshDialog(TQCString host, TQCString user, TQCString stub,
m_User = user; m_User = user;
m_Stub = stub; m_Stub = stub;
setCaption(TQString::fromLatin1("%1@%2").tqarg(TQString(m_User)).tqarg(TQString(m_Host))); setCaption(TQString::fromLatin1("%1@%2").arg(TQString(m_User)).arg(TQString(m_Host)));
// Make the prompt a little more polite :-) // Make the prompt a little more polite :-)
if (prompt.lower().left(6) == TQString::fromLatin1("enter ")) if (prompt.lower().left(6) == TQString::fromLatin1("enter "))

@ -226,11 +226,11 @@ int DiskEntry::sysCall(const TQString & command)
{ {
if (readingSysStdErrOut || sysProc->isRunning() ) return -1; if (readingSysStdErrOut || sysProc->isRunning() ) return -1;
sysStringErrOut=i18n("Called: %1\n\n").tqarg(command); // put the called command on ErrOut sysStringErrOut=i18n("Called: %1\n\n").arg(command); // put the called command on ErrOut
sysProc->clearArguments(); sysProc->clearArguments();
(*sysProc) << command; (*sysProc) << command;
if (!sysProc->start( KProcess::Block, KProcess::AllOutput )) if (!sysProc->start( KProcess::Block, KProcess::AllOutput ))
kdFatal() << i18n("could not execute %1").tqarg(command.local8Bit().data()) << endl; kdFatal() << i18n("could not execute %1").arg(command.local8Bit().data()) << endl;
if (sysProc->exitStatus()!=0) emit sysCallError(this, sysProc->exitStatus()); if (sysProc->exitStatus()!=0) emit sysCallError(this, sysProc->exitStatus());

@ -377,7 +377,7 @@ void KDFWidget::criticallyFull( DiskEntry *disk )
if( mStd.popupIfFull() == true ) if( mStd.popupIfFull() == true )
{ {
TQString msg = i18n("Device [%1] on [%2] is getting critically full!"). TQString msg = i18n("Device [%1] on [%2] is getting critically full!").
tqarg(disk->deviceName()).tqarg(disk->mountPoint()); arg(disk->deviceName()).arg(disk->mountPoint());
KMessageBox::sorry( this, msg, i18n("Warning")); KMessageBox::sorry( this, msg, i18n("Warning"));
} }
} }

@ -176,13 +176,13 @@ void KwikDisk::updateDFDone()
{ {
// FIXME: tool tips are unused atm // FIXME: tool tips are unused atm
TQString toolTipText = i18n("%1 (%2) %3 on %4") TQString toolTipText = i18n("%1 (%2) %3 on %4")
.tqarg( disk->mounted() ? i18n("Unmount") : i18n("Mount")) .arg( disk->mounted() ? i18n("Unmount") : i18n("Mount"))
.tqarg(disk->fsType()).tqarg(disk->deviceName()).tqarg(disk->mountPoint()); .arg(disk->fsType()).arg(disk->deviceName()).arg(disk->mountPoint());
TQString entryName = disk->mountPoint(); TQString entryName = disk->mountPoint();
if( disk->mounted() ) if( disk->mounted() )
{ {
entryName += TQString("\t\t\t[%1]").tqarg(disk->prettyKBAvail()); entryName += TQString("\t\t\t[%1]").arg(disk->prettyKBAvail());
} }
int id = contextMenu()->insertItem("", this, TQT_SLOT(toggleMount(int)) ); int id = contextMenu()->insertItem("", this, TQT_SLOT(toggleMount(int)) );
contextMenu()->setItemParameter(id, itemNo); contextMenu()->setItemParameter(id, itemNo);
@ -286,7 +286,7 @@ void KwikDisk::criticallyFull(DiskEntry *disk)
if( m_options.popupIfFull() == true ) if( m_options.popupIfFull() == true )
{ {
TQString msg = i18n("Device [%1] on [%2] is getting critically full!") TQString msg = i18n("Device [%1] on [%2] is getting critically full!")
.tqarg(disk->deviceName()).tqarg(disk->mountPoint()); .arg(disk->deviceName()).arg(disk->mountPoint());
KMessageBox::sorry( this, msg, i18n("Warning")); KMessageBox::sorry( this, msg, i18n("Warning"));
} }
} }

@ -258,7 +258,7 @@ void MntConfigWidget::iconChanged(const TQString &iconName)
TQString msg = i18n("" TQString msg = i18n(""
"This filename is not valid: %1\n" "This filename is not valid: %1\n"
"It must end with " "It must end with "
"\"_mount\" or \"_unmount\".").tqarg(iconName); "\"_mount\" or \"_unmount\".").arg(iconName);
KMessageBox::sorry( this, msg ); KMessageBox::sorry( this, msg );
return; return;
} }

@ -265,7 +265,7 @@ void TopLevel::saveProperties(KConfig* config)
{ {
TQString name = m_url.url(); TQString name = m_url.url();
if (name.isEmpty()) if (name.isEmpty())
name = TQString("kedit%1-%2").tqarg(getpid()).tqarg((long)this); name = TQString("kedit%1-%2").arg(getpid()).arg((long)this);
TQString tmplocation = kapp->tempSaveName(m_url.url()); TQString tmplocation = kapp->tempSaveName(m_url.url());
config->writeEntry("saved_to",tmplocation); config->writeEntry("saved_to",tmplocation);
saveFile(tmplocation, false, m_url.fileEncoding()); saveFile(tmplocation, false, m_url.fileEncoding());
@ -418,7 +418,7 @@ void TopLevel::spell_started( KSpell *)
void TopLevel::spell_progress (unsigned int percent) void TopLevel::spell_progress (unsigned int percent)
{ {
TQString s; TQString s;
s = i18n("Spellcheck: %1% complete").tqarg(percent); s = i18n("Spellcheck: %1% complete").arg(percent);
statusBar()->changeItem (s, ID_GENERAL); statusBar()->changeItem (s, ID_GENERAL);
} }
@ -699,7 +699,7 @@ void TopLevel::file_save()
if ( result == KEDIT_OK ){ if ( result == KEDIT_OK ){
TQString string; TQString string;
string = i18n("Wrote: %1").tqarg(m_caption); string = i18n("Wrote: %1").arg(m_caption);
setGeneralStatusField(string); setGeneralStatusField(string);
} }
} }
@ -732,7 +732,7 @@ void TopLevel::file_save_as()
{ {
int result = KMessageBox::warningContinueCancel( this, int result = KMessageBox::warningContinueCancel( this,
i18n( "A file named \"%1\" already exists. " i18n( "A file named \"%1\" already exists. "
"Are you sure you want to overwrite it?" ).tqarg( u.prettyURL() ), "Are you sure you want to overwrite it?" ).arg( u.prettyURL() ),
i18n( "Overwrite File?" ), i18n( "Overwrite File?" ),
i18n( "Overwrite" ) ); i18n( "Overwrite" ) );
@ -748,7 +748,7 @@ void TopLevel::file_save_as()
{ {
m_url = u; m_url = u;
setFileCaption(); setFileCaption();
TQString string = i18n("Saved as: %1").tqarg(m_caption); TQString string = i18n("Saved as: %1").arg(m_caption);
setGeneralStatusField(string); setGeneralStatusField(string);
recent->addURL( u ); recent->addURL( u );
} }
@ -872,7 +872,7 @@ void TopLevel::setFileCaption()
} }
TQString encoding = m_url.fileEncoding(); TQString encoding = m_url.fileEncoding();
if (!encoding.isEmpty()) if (!encoding.isEmpty())
m_caption += TQString(" (%1)").tqarg(encoding); m_caption += TQString(" (%1)").arg(encoding);
} }
setCaption(m_caption, eframe->isModified()); setCaption(m_caption, eframe->isModified());
} }
@ -887,8 +887,8 @@ void TopLevel::statusbar_slot(){
TQString linenumber; TQString linenumber;
linenumber = i18n("Line: %1 Col: %2") linenumber = i18n("Line: %1 Col: %2")
.tqarg(eframe->currentLine() + 1) .arg(eframe->currentLine() + 1)
.tqarg(eframe->currentColumn() +1); .arg(eframe->currentColumn() +1);
statusBar()->changeItem(linenumber,ID_LINE_COLUMN); statusBar()->changeItem(linenumber,ID_LINE_COLUMN);
} }
@ -896,8 +896,8 @@ void TopLevel::statusbar_slot(){
void TopLevel::print() void TopLevel::print()
{ {
bool aborted = false; bool aborted = false;
TQString headerLeft = i18n("Date: %1").tqarg(KGlobal::locale()->formatDate(TQDate::currentDate(),true)); TQString headerLeft = i18n("Date: %1").arg(KGlobal::locale()->formatDate(TQDate::currentDate(),true));
TQString headerMid = i18n("File: %1").tqarg(m_caption); TQString headerMid = i18n("File: %1").arg(m_caption);
TQString headerRight; TQString headerRight;
TQFont printFont = eframe->font(); TQFont printFont = eframe->font();
@ -908,7 +908,7 @@ void TopLevel::print()
TQFontMetrics headerFontMetrics(headerFont); TQFontMetrics headerFontMetrics(headerFont);
KPrinter *printer = new KPrinter; KPrinter *printer = new KPrinter;
if(printer->setup(this, i18n("Print %1").tqarg(m_caption))) { if(printer->setup(this, i18n("Print %1").arg(m_caption))) {
// set up KPrinter // set up KPrinter
printer->setFullPage(false); printer->setFullPage(false);
printer->setCreator("KEdit"); printer->setCreator("KEdit");
@ -932,7 +932,7 @@ void TopLevel::print()
while(true) { while(true) {
headerRight = TQString("#%1").tqarg(page); headerRight = TQString("#%1").arg(page);
dy = headerFontMetrics.lineSpacing(); dy = headerFontMetrics.lineSpacing();
TQRect body( 0, dy*2, metrics.width(), metrics.height()-dy*2); TQRect body( 0, dy*2, metrics.width(), metrics.height()-dy*2);
@ -1125,7 +1125,7 @@ void TopLevel::openURL( const KURL& _url, int _mode )
if ( !_url.isValid() ) if ( !_url.isValid() )
{ {
TQString string; TQString string;
string = i18n( "Malformed URL\n%1").tqarg(_url.url()); string = i18n( "Malformed URL\n%1").arg(_url.url());
KMessageBox::sorry(this, string); KMessageBox::sorry(this, string);
return; return;

@ -88,7 +88,7 @@ void KTextFileDialog::slotShowEncCombo()
TQComboBox *encCombo; TQComboBox *encCombo;
TQVBox *vbox; TQVBox *vbox;
// Create widgets, and display using tqgeometry management // Create widgets, and display using geometry management
encDlg = new KDialogBase( this, encDlg = new KDialogBase( this,
"Encoding Dialog", true, i18n("Select Encoding"), "Encoding Dialog", true, i18n("Select Encoding"),
KDialogBase::Ok | KDialogBase::Cancel ); KDialogBase::Ok | KDialogBase::Cancel );

@ -497,7 +497,7 @@ void FloppyData::format(){
if (KMessageBox::warningContinueCancel( this, if (KMessageBox::warningContinueCancel( this,
i18n("<qt>Formatting will erase all data on the device:<br/><b>%1</b><br/>" i18n("<qt>Formatting will erase all data on the device:<br/><b>%1</b><br/>"
"(Please check the correctness of the device name.)<br/>" "(Please check the correctness of the device name.)<br/>"
"Are you sure you wish to proceed?</qt>").tqarg( currentComboBoxDevice ) "Are you sure you wish to proceed?</qt>").arg( currentComboBoxDevice )
, i18n("Proceed?") ) != KMessageBox::Continue) , i18n("Proceed?") ) != KMessageBox::Continue)
{ {
return; return;

@ -266,7 +266,7 @@ bool FloppyAction::configureDevice(int drive,int density)
if ((drive<0) || (drive>1)) if ((drive<0) || (drive>1))
{ {
emit status(i18n("Unexpected drive number %1.").tqarg(drive),-1); emit status(i18n("Unexpected drive number %1.").arg(drive),-1);
return false; return false;
} }
@ -278,7 +278,7 @@ bool FloppyAction::configureDevice(int drive,int density)
} }
if (!deviceinfo) if (!deviceinfo)
{ {
emit status(i18n("Unexpected density number %1.").tqarg(density),-1); emit status(i18n("Unexpected density number %1.").arg(density),-1);
return false; return false;
} }
@ -294,7 +294,7 @@ bool FloppyAction::configureDevice(int drive,int density)
if (!deviceinfo || !deviceinfo->devices) if (!deviceinfo || !deviceinfo->devices)
{ {
emit status(i18n("Cannot find a device for drive %1 and density %2.") emit status(i18n("Cannot find a device for drive %1 and density %2.")
.tqarg(drive).tqarg(density),-1); .arg(drive).arg(density),-1);
return false; return false;
} }
@ -313,7 +313,7 @@ bool FloppyAction::configureDevice(int drive,int density)
{ {
const TQString str = i18n( const TQString str = i18n(
"Cannot access %1\nMake sure that the device exists and that " "Cannot access %1\nMake sure that the device exists and that "
"you have write permission to it.").tqarg(deviceinfo->devices[0]); "you have write permission to it.").arg(deviceinfo->devices[0]);
emit status(str,-1); emit status(str,-1);
return false; return false;
} }
@ -343,13 +343,13 @@ void FloppyAction::processDone(KProcess *p)
} }
else else
{ {
emit status(i18n("The program %1 terminated with an error.").tqarg(theProcessName),100); emit status(i18n("The program %1 terminated with an error.").arg(theProcessName),100);
emit done(this,false); emit done(this,false);
} }
} }
else else
{ {
emit status(i18n("The program %1 terminated abnormally.").tqarg(theProcessName),100); emit status(i18n("The program %1 terminated abnormally.").arg(theProcessName),100);
emit done(this,false); emit done(this,false);
} }
} }
@ -478,7 +478,7 @@ void FDFormat::processStdOut(KProcess *, char *b, int l)
} }
else if (b[0]=='E') else if (b[0]=='E')
{ {
emit status(i18n("Error formatting track %1.").tqarg(formatTrackCount),-1); emit status(i18n("Error formatting track %1.").arg(formatTrackCount),-1);
} }
else else
{ {
@ -507,12 +507,12 @@ void FDFormat::processStdOut(KProcess *, char *b, int l)
if ( regexp.search( s ) > -1 ) if ( regexp.search( s ) > -1 )
{ {
const int track = regexp.cap(1).toInt(); const int track = regexp.cap(1).toInt();
emit status(i18n("Low-level formatting error at track %1.").tqarg(track), -1); emit status(i18n("Low-level formatting error at track %1.").arg(track), -1);
} }
else else
{ {
// This error should not happen // This error should not happen
emit status(i18n("Low-level formatting error: %1").tqarg(s), -1); emit status(i18n("Low-level formatting error: %1").arg(s), -1);
} }
return; return;
} }
@ -532,7 +532,7 @@ void FDFormat::processStdOut(KProcess *, char *b, int l)
// Be careful to leave "iotcl" as last before checking numbers // Be careful to leave "iotcl" as last before checking numbers
else if (s.find("ioctl")!=-1) else if (s.find("ioctl")!=-1)
{ {
emit status(i18n("Low-level format error: %1").tqarg(s),-1); emit status(i18n("Low-level format error: %1").arg(s),-1);
return; return;
} }
// Check for numbers at last (as /dev/fd0u1440 has numbers too) // Check for numbers at last (as /dev/fd0u1440 has numbers too)
@ -792,7 +792,7 @@ void UFSFilesystem::exec()
// ### TODO: is it still needed? (FreeBSD 5.3's man page says: "For backward compatibility.") // ### TODO: is it still needed? (FreeBSD 5.3's man page says: "For backward compatibility.")
if ( deviceInfo ) if ( deviceInfo )
*p << "-T" << TQString("fd%1").tqarg(deviceInfo->blocks); *p << "-T" << TQString("fd%1").arg(deviceInfo->blocks);
*p << deviceName; *p << deviceName;

@ -188,7 +188,7 @@ void ZipFormat::transition()
<< "if=/dev/zero" << "if=/dev/zero"
<< "of=/dev/afd0c" << "of=/dev/afd0c"
<< "bs=8192" ; << "bs=8192" ;
*p << TQString("count=%1").tqarg(totalBlocks); *p << TQString("count=%1").arg(totalBlocks);
if (!p->start(KProcess::NotifyOnExit,KProcess::AllOutput)) if (!p->start(KProcess::NotifyOnExit,KProcess::AllOutput))
{ {
emit statusMessage(i18n("Cannot start dd to zero disk.")); emit statusMessage(i18n("Cannot start dd to zero disk."));
@ -251,7 +251,7 @@ void ZipFormat::processResult(KProcess *, char *b, int l)
#ifdef DEBUG #ifdef DEBUG
TQString o = TQString::fromLatin1(b,l); TQString o = TQString::fromLatin1(b,l);
DEBUGS(TQString(" %1").tqarg(o).latin1()); DEBUGS(TQString(" %1").arg(o).latin1());
#endif #endif
switch(formatStep) switch(formatStep)
@ -264,8 +264,8 @@ void ZipFormat::processResult(KProcess *, char *b, int l)
if (totalBlocks>10000) if (totalBlocks>10000)
{ {
emit statusMessage(i18n("Zeroing block %1 of %2...") emit statusMessage(i18n("Zeroing block %1 of %2...")
.tqarg(currentblock) .arg(currentblock)
.tqarg(totalBlocks)); .arg(totalBlocks));
} }
} }
break; break;

@ -132,7 +132,7 @@ It will shred (overwrite several times before erasing) the
files you drop on it, making it almost impossible to recover files you drop on it, making it almost impossible to recover
the original file.</string> the original file.</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignJustify|AlignTop</set> <set>WordBreak|AlignJustify|AlignTop</set>
</property> </property>
</widget> </widget>
@ -143,7 +143,7 @@ the original file.</string>
<property name="text"> <property name="text">
<string>textLabel5</string> <string>textLabel5</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignTop</set> <set>AlignTop</set>
</property> </property>
</widget> </widget>

@ -81,7 +81,7 @@
<property name="scaledContents"> <property name="scaledContents">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
<property name="whatsThis" stdset="0"> <property name="whatsThis" stdset="0">

@ -261,8 +261,8 @@ void keyServer::slotsearchresult(KProcess *)
dialogServer->enableButtonOK(true); dialogServer->enableButtonOK(true);
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
nb=nb.setNum(keyNumbers); nb=nb.setNum(keyNumbers);
//listpop->kLVsearch->setColumnText(0,i18n("Found %1 matching keys").tqarg(nb)); //listpop->kLVsearch->setColumnText(0,i18n("Found %1 matching keys").arg(nb));
listpop->statusText->setText(i18n("Found %1 matching keys").tqarg(nb)); listpop->statusText->setText(i18n("Found %1 matching keys").arg(nb));
if (listpop->kLVsearch->firstChild()!=NULL) { if (listpop->kLVsearch->firstChild()!=NULL) {
listpop->kLVsearch->setSelected(listpop->kLVsearch->firstChild(),true); listpop->kLVsearch->setSelected(listpop->kLVsearch->firstChild(),true);

@ -147,7 +147,7 @@ void MyView::encryptDroppedFolder()
compressionScheme=0; compressionScheme=0;
kgpgfoldertmp=new KTempFile(TQString()); kgpgfoldertmp=new KTempFile(TQString());
kgpgfoldertmp->setAutoDelete(true); kgpgfoldertmp->setAutoDelete(true);
if (KMessageBox::warningContinueCancel(0,i18n("<qt>KGpg will now create a temporary archive file:<br><b>%1</b> to process the encryption. The file will be deleted after the encryption is finished.</qt>").tqarg(kgpgfoldertmp->name()),i18n("Temporary File Creation"),KStdGuiItem::cont(),"FolderTmpFile")==KMessageBox::Cancel) if (KMessageBox::warningContinueCancel(0,i18n("<qt>KGpg will now create a temporary archive file:<br><b>%1</b> to process the encryption. The file will be deleted after the encryption is finished.</qt>").arg(kgpgfoldertmp->name()),i18n("Temporary File Creation"),KStdGuiItem::cont(),"FolderTmpFile")==KMessageBox::Cancel)
return; return;
dialogue=new popupPublic(0,"Public keys",droppedUrls.first().fileName(),true,goDefaultKey); dialogue=new popupPublic(0,"Public keys",droppedUrls.first().fileName(),true,goDefaultKey);
@ -305,7 +305,7 @@ shredConfirm->setMainWidget(page);
TQBoxLayout *tqlayout=new TQBoxLayout(page,TQBoxLayout::TopToBottom,0); TQBoxLayout *tqlayout=new TQBoxLayout(page,TQBoxLayout::TopToBottom,0);
tqlayout->setAutoAdd(true); tqlayout->setAutoAdd(true);
(void) new KActiveLabel( i18n("Do you really want to <a href=\"whatsthis:%1\">shred</a> these files?").tqarg(i18n( "<qt><p>You must be aware that <b>shredding is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>")),page); (void) new KActiveLabel( i18n("Do you really want to <a href=\"whatsthis:%1\">shred</a> these files?").arg(i18n( "<qt><p>You must be aware that <b>shredding is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>")),page);
KListBox *lb=new KListBox(page); KListBox *lb=new KListBox(page);
lb->insertStringList(droppedUrls.toStringList()); lb->insertStringList(droppedUrls.toStringList());
if (shredConfirm->exec()==TQDialog::Accepted) if (shredConfirm->exec()==TQDialog::Accepted)
@ -400,7 +400,7 @@ void MyView::decryptDroppedFile()
kgpgFolderExtract=new KTempFile(TQString(),".tar.gz"); kgpgFolderExtract=new KTempFile(TQString(),".tar.gz");
kgpgFolderExtract->setAutoDelete(true); kgpgFolderExtract->setAutoDelete(true);
swapname=KURL(kgpgFolderExtract->name()); swapname=KURL(kgpgFolderExtract->name());
if (KMessageBox::warningContinueCancel(0,i18n("<qt>The file to decrypt is an archive. KGpg will create a temporary unencrypted archive file:<br><b>%1</b> before processing the archive extraction. This temporary file will be deleted after the decryption is finished.</qt>").tqarg(kgpgFolderExtract->name()),i18n("Temporary File Creation"),KStdGuiItem::cont(),"FolderTmpDecFile")==KMessageBox::Cancel) if (KMessageBox::warningContinueCancel(0,i18n("<qt>The file to decrypt is an archive. KGpg will create a temporary unencrypted archive file:<br><b>%1</b> before processing the archive extraction. This temporary file will be deleted after the decryption is finished.</qt>").arg(kgpgFolderExtract->name()),i18n("Temporary File Creation"),KStdGuiItem::cont(),"FolderTmpDecFile")==KMessageBox::Cancel)
return; return;
} else*/ { } else*/ {
swapname=KURL(droppedUrls.first().directory(0,0)+oldname); swapname=KURL(droppedUrls.first().directory(0,0)+oldname);
@ -926,7 +926,7 @@ int KgpgAppletApp::newInstance()
if ((KgpgInterface::getGpgBoolSetting("use-agent",gpgPath)) && (!getenv("GPG_AGENT_INFO"))) if ((KgpgInterface::getGpgBoolSetting("use-agent",gpgPath)) && (!getenv("GPG_AGENT_INFO")))
KMessageBox::sorry(0,i18n("<qt>The use of <b>GnuPG Agent</b> is enabled in GnuPG's configuration file (%1).<br>" KMessageBox::sorry(0,i18n("<qt>The use of <b>GnuPG Agent</b> is enabled in GnuPG's configuration file (%1).<br>"
"However, the agent does not seem to be running. This could result in problems with signing/decryption.<br>" "However, the agent does not seem to be running. This could result in problems with signing/decryption.<br>"
"Please disable GnuPG Agent from KGpg settings, or fix the agent.</qt>").tqarg(gpgPath)); "Please disable GnuPG Agent from KGpg settings, or fix the agent.</qt>").arg(gpgPath));
} }
} }

@ -376,7 +376,7 @@ void KgpgApp::slotFileSaveAs()
TQString filn=url.path(); TQString filn=url.path();
TQFile f(filn); TQFile f(filn);
if (f.exists()) { if (f.exists()) {
TQString message=i18n("Overwrite existing file %1?").tqarg(url.fileName()); TQString message=i18n("Overwrite existing file %1?").arg(url.fileName());
int result=KMessageBox::warningContinueCancel(this,TQString(message),i18n("Warning"),i18n("Overwrite")); int result=KMessageBox::warningContinueCancel(this,TQString(message),i18n("Warning"),i18n("Overwrite"));
if (result==KMessageBox::Cancel) if (result==KMessageBox::Cancel)
return; return;
@ -385,7 +385,7 @@ void KgpgApp::slotFileSaveAs()
} }
else if (KIO::NetAccess::exists(url,false,this)) else if (KIO::NetAccess::exists(url,false,this))
{ {
TQString message=i18n("Overwrite existing file %1?").tqarg(url.fileName()); TQString message=i18n("Overwrite existing file %1?").arg(url.fileName());
int result=KMessageBox::warningContinueCancel(this,TQString(message),i18n("Warning"),i18n("Overwrite")); int result=KMessageBox::warningContinueCancel(this,TQString(message),i18n("Warning"),i18n("Overwrite"));
if (result==KMessageBox::Cancel) if (result==KMessageBox::Cancel)
return; return;

@ -219,9 +219,9 @@ void KgpgInterface::readdecprocess(KProcIO *p)
if (anonymous) if (anonymous)
passdlgmessage=i18n("<b>No user id found</b>. Trying all secret keys.<br>"); passdlgmessage=i18n("<b>No user id found</b>. Trying all secret keys.<br>");
if ((step<3) && (!anonymous)) if ((step<3) && (!anonymous))
passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").tqarg(step); passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").arg(step);
passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").tqarg(userIDs); passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").arg(userIDs);
int code=KPasswordDialog::getPassword(passphrase,passdlgmessage); int code=KPasswordDialog::getPassword(passphrase,passdlgmessage);
if (code!=TQDialog::Accepted) { if (code!=TQDialog::Accepted) {
p->deleteLater(); p->deleteLater();
@ -395,8 +395,8 @@ void KgpgInterface::getCmdOutput(KProcess *p, char *data, int )
if (anonymous) if (anonymous)
passdlgmessage=i18n("<b>No user id found</b>. Trying all secret keys.<br>"); passdlgmessage=i18n("<b>No user id found</b>. Trying all secret keys.<br>");
if ((step<3) && (!anonymous)) if ((step<3) && (!anonymous))
passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").tqarg(step); passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").arg(step);
passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").tqarg(userIDs); passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").arg(userIDs);
int code=KPasswordDialog::getPassword(passphrase,passdlgmessage); int code=KPasswordDialog::getPassword(passphrase,passdlgmessage);
if (code!=TQDialog::Accepted) if (code!=TQDialog::Accepted)
{ {
@ -501,8 +501,8 @@ void KgpgInterface::txtsignprocess(KProcIO *p)
TQCString passphrase; TQCString passphrase;
TQString passdlgmessage; TQString passdlgmessage;
if (step<3) if (step<3)
passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").tqarg(step); passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").arg(step);
passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").tqarg(userIDs); passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").arg(userIDs);
int code=KPasswordDialog::getPassword(passphrase,passdlgmessage); int code=KPasswordDialog::getPassword(passphrase,passdlgmessage);
if (code!=TQDialog::Accepted) if (code!=TQDialog::Accepted)
{ {
@ -588,11 +588,11 @@ TQString required;
{ {
TQString userName=required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;"); TQString userName=required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;");
userName=checkForUtf8(userName); userName=checkForUtf8(userName);
signID=i18n("<qt>Good signature from:<br><b>%1</b><br>Key ID: %2</qt>").tqarg(userName).tqarg("0x"+required.section(" ",1,1).right(8)); signID=i18n("<qt>Good signature from:<br><b>%1</b><br>Key ID: %2</qt>").arg(userName).arg("0x"+required.section(" ",1,1).right(8));
} }
if (required.startsWith("BADSIG")) if (required.startsWith("BADSIG"))
{ {
signID=i18n("<qt><b>Bad signature</b> from:<br>%1<br>Key ID: %2<br><br><b>Text is corrupted.</b></qt>").tqarg(required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;")).tqarg("0x"+required.section(" ",1,1).right(8)); signID=i18n("<qt><b>Bad signature</b> from:<br>%1<br>Key ID: %2<br><br><b>Text is corrupted.</b></qt>").arg(required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;")).arg("0x"+required.section(" ",1,1).right(8));
} }
if (required.startsWith("NO_PUBKEY")) if (required.startsWith("NO_PUBKEY"))
{ {
@ -628,7 +628,7 @@ Md5Widget::Md5Widget(TQWidget *parent, const char *name,KURL url):KDialogBase( p
TQGridLayout *MyDialogLayout = new TQGridLayout( page, 1, 1, 5, 6, "MyDialogLayout"); TQGridLayout *MyDialogLayout = new TQGridLayout( page, 1, 1, 5, 6, "MyDialogLayout");
TQLabel *TextLabel1 = new TQLabel( page, "TextLabel1" ); TQLabel *TextLabel1 = new TQLabel( page, "TextLabel1" );
TextLabel1->setText(i18n("MD5 sum for <b>%1</b> is:").tqarg(url.fileName())); TextLabel1->setText(i18n("MD5 sum for <b>%1</b> is:").arg(url.fileName()));
MyDialogLayout->addWidget( TextLabel1, 0, 0 ); MyDialogLayout->addWidget( TextLabel1, 0, 0 );
KLineEdit *KRestrictedLine1 = new KLineEdit(mdSum,page); KLineEdit *KRestrictedLine1 = new KLineEdit(mdSum,page);
@ -715,7 +715,7 @@ void KgpgInterface::KgpgSignFile(TQString keyID,KURL srcUrl,TQStringList Options
void KgpgInterface::signfin(KProcess *) void KgpgInterface::signfin(KProcess *)
{ {
if (message.find("SIG_CREATED")!=-1) if (message.find("SIG_CREATED")!=-1)
KMessageBox::information(0,i18n("The signature file %1 was successfully created.").tqarg(file.fileName())); KMessageBox::information(0,i18n("The signature file %1 was successfully created.").arg(file.fileName()));
else if (message.find("BAD_PASSPHRASE")!=-1) else if (message.find("BAD_PASSPHRASE")!=-1)
KMessageBox::sorry(0,i18n("Bad passphrase, signature was not created.")); KMessageBox::sorry(0,i18n("Bad passphrase, signature was not created."));
else else
@ -740,8 +740,8 @@ void KgpgInterface::readsignprocess(KProcIO *p)
TQCString passphrase; TQCString passphrase;
TQString passdlgmessage; TQString passdlgmessage;
if (step<3) if (step<3)
passdlgmessage=i18n("<b>Bad passphrase</b>. you have %1 tries left.<br>").tqarg(step); passdlgmessage=i18n("<b>Bad passphrase</b>. you have %1 tries left.<br>").arg(step);
passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").tqarg(userIDs); passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").arg(userIDs);
int code=KPasswordDialog::getPassword(passphrase,passdlgmessage); int code=KPasswordDialog::getPassword(passphrase,passdlgmessage);
if (code!=TQDialog::Accepted) { if (code!=TQDialog::Accepted) {
p->deleteLater(); p->deleteLater();
@ -799,12 +799,12 @@ TQString required;
signID=i18n("No signature found."); signID=i18n("No signature found.");
if (required.startsWith("GOODSIG")) if (required.startsWith("GOODSIG"))
{ {
signID=i18n("<qt>Good signature from:<br><b>%1</b><br>Key ID: %2</qt>").tqarg(required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;")).tqarg("0x"+required.section(" ",1,1).right(8)); signID=i18n("<qt>Good signature from:<br><b>%1</b><br>Key ID: %2</qt>").arg(required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;")).arg("0x"+required.section(" ",1,1).right(8));
} }
if (required.startsWith("BADSIG")) if (required.startsWith("BADSIG"))
{ {
signID=i18n("<qt><b>BAD signature</b> from:<br> %1<br>Key id: %2<br><br>" signID=i18n("<qt><b>BAD signature</b> from:<br> %1<br>Key id: %2<br><br>"
"<b>The file is corrupted!</b></qt>").tqarg(required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;")).tqarg("0x"+required.section(" ",1,1).right(8)); "<b>The file is corrupted!</b></qt>").arg(required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;")).arg("0x"+required.section(" ",1,1).right(8));
} }
if (required.startsWith("NO_PUBKEY")) if (required.startsWith("NO_PUBKEY"))
{ {
@ -827,7 +827,7 @@ void KgpgInterface::verifyfin(KProcess *)
} }
else { else {
if (KMessageBox::questionYesNo(0,i18n("<qt><b>Missing signature:</b><br>Key id: %1<br><br>" if (KMessageBox::questionYesNo(0,i18n("<qt><b>Missing signature:</b><br>Key id: %1<br><br>"
"Do you want to import this key from a keyserver?</qt>").tqarg(signID),file.fileName(),TQString(), i18n("Import"), i18n("Do Not Import"))==KMessageBox::Yes) "Do you want to import this key from a keyserver?</qt>").arg(signID),file.fileName(),TQString(), i18n("Import"), i18n("Do Not Import"))==KMessageBox::Yes)
emit verifyquerykey(signID); emit verifyquerykey(signID);
} }
emit verifyfinished(); emit verifyfinished();
@ -908,7 +908,7 @@ void KgpgInterface::sigprocess(KProcIO *p)
if (required.find("passphrase.enter")!=-1) { if (required.find("passphrase.enter")!=-1) {
TQCString signpass; TQCString signpass;
int code=KPasswordDialog::getPassword(signpass,i18n("<qt>%1 Enter passphrase for <b>%2</b>:</qt>") int code=KPasswordDialog::getPassword(signpass,i18n("<qt>%1 Enter passphrase for <b>%2</b>:</qt>")
.tqarg(errMessage).tqarg(userIDs)); .arg(errMessage).arg(userIDs));
if (code!=TQDialog::Accepted) { if (code!=TQDialog::Accepted) {
signSuccess=4; ///// aborted by user mode signSuccess=4; ///// aborted by user mode
required=TQString(); required=TQString();
@ -947,7 +947,7 @@ void KgpgInterface::signover(KProcess *)
emit signatureFinished(signSuccess); //// signature successful or bad passphrase emit signatureFinished(signSuccess); //// signature successful or bad passphrase
else { else {
KDetailedConsole *q=new KDetailedConsole(0,"sign_error",i18n("<qt>Signing key <b>%1</b> with key <b>%2</b> failed.<br>" KDetailedConsole *q=new KDetailedConsole(0,"sign_error",i18n("<qt>Signing key <b>%1</b> with key <b>%2</b> failed.<br>"
"Do you want to try signing the key in console mode?</qt>").tqarg(konsKeyID).tqarg(konsSignKey),output); "Do you want to try signing the key in console mode?</qt>").arg(konsKeyID).arg(konsSignKey),output);
if (q->exec()==TQDialog::Accepted) if (q->exec()==TQDialog::Accepted)
openSignConsole(); openSignConsole();
else else
@ -1112,7 +1112,7 @@ void KgpgInterface::expprocess(KProcIO *p)
if (required.find("passphrase.enter")!=-1) { if (required.find("passphrase.enter")!=-1) {
TQCString signpass; TQCString signpass;
int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").tqarg(userIDs)); int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs));
if (code!=TQDialog::Accepted) { if (code!=TQDialog::Accepted) {
expSuccess=3; ///// aborted by user mode expSuccess=3; ///// aborted by user mode
p->writeStdin(TQString("quit")); p->writeStdin(TQString("quit"));
@ -1276,7 +1276,7 @@ void KgpgInterface::passprocess(KProcIO *p)
if (step==1) { if (step==1) {
TQCString passphrase; TQCString passphrase;
int code=KPasswordDialog::getPassword(passphrase,i18n("<qt>%1 Enter passphrase for <b>%2</b></qt>") int code=KPasswordDialog::getPassword(passphrase,i18n("<qt>%1 Enter passphrase for <b>%2</b></qt>")
.tqarg(message).tqarg(userIDs)); .arg(message).arg(userIDs));
if (code!=TQDialog::Accepted) { if (code!=TQDialog::Accepted) {
p->writeStdin(TQString("quit")); p->writeStdin(TQString("quit"));
// p->closeWhenDone(); // p->closeWhenDone();
@ -1290,7 +1290,7 @@ void KgpgInterface::passprocess(KProcIO *p)
if (step==3) { if (step==3) {
TQCString passphrase; TQCString passphrase;
int code=KPasswordDialog::getNewPassword(passphrase,i18n("<qt>Enter new passphrase for <b>%1</b><br>If you forget this passphrase, all your encrypted files and messages will be lost !<br></qt>").tqarg(userIDs)); int code=KPasswordDialog::getNewPassword(passphrase,i18n("<qt>Enter new passphrase for <b>%1</b><br>If you forget this passphrase, all your encrypted files and messages will be lost !<br></qt>").arg(userIDs));
if (code!=TQDialog::Accepted) { if (code!=TQDialog::Accepted) {
step=4; step=4;
p->writeStdin(TQString("quit")); p->writeStdin(TQString("quit"));
@ -1517,7 +1517,7 @@ void KgpgInterface::adduidprocess(KProcIO *p)
if (required.find("passphrase.enter")!=-1) { if (required.find("passphrase.enter")!=-1) {
TQCString delpass; TQCString delpass;
int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>") int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>")
.tqarg(userIDs)); .arg(userIDs));
if (code!=TQDialog::Accepted) { if (code!=TQDialog::Accepted) {
//addSuccess=false; //addSuccess=false;
p->writeStdin(TQString("quit")); p->writeStdin(TQString("quit"));
@ -1639,7 +1639,7 @@ void KgpgInterface::delphotoprocess(KProcIO *p)
if (required.find("passphrase.enter")!=-1) { if (required.find("passphrase.enter")!=-1) {
TQCString delpass; TQCString delpass;
int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").tqarg(userIDs)); int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs));
if (code!=TQDialog::Accepted) { if (code!=TQDialog::Accepted) {
//deleteSuccess=false; //deleteSuccess=false;
p->writeStdin(TQString("quit")); p->writeStdin(TQString("quit"));
@ -1714,7 +1714,7 @@ void KgpgInterface::addphotoprocess(KProcIO *p)
if (required.find("passphrase.enter")!=-1) { if (required.find("passphrase.enter")!=-1) {
TQCString delpass; TQCString delpass;
int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").tqarg(userIDs)); int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs));
if (code!=TQDialog::Accepted) { if (code!=TQDialog::Accepted) {
//deleteSuccess=false; //deleteSuccess=false;
p->writeStdin(TQString("quit")); p->writeStdin(TQString("quit"));
@ -1800,7 +1800,7 @@ void KgpgInterface::revokeprocess(KProcIO *p)
if (required.find("passphrase.enter")!=-1) { if (required.find("passphrase.enter")!=-1) {
TQCString signpass; TQCString signpass;
int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").tqarg(userIDs)); int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs));
if (code!=TQDialog::Accepted) { if (code!=TQDialog::Accepted) {
expSuccess=3; ///// aborted by user mode expSuccess=3; ///// aborted by user mode
p->writeStdin(TQString("quit")); p->writeStdin(TQString("quit"));
@ -1928,7 +1928,7 @@ void KgpgInterface::setGpgGroupSetting(TQString name,TQStringList values, TQStri
if (result2.startsWith(name) && (result2.remove(0,name.length()).stripWhiteSpace().startsWith("="))) { if (result2.startsWith(name) && (result2.remove(0,name.length()).stripWhiteSpace().startsWith("="))) {
// kdDebug(2100)<<"Found group: "<<name<<endl; // kdDebug(2100)<<"Found group: "<<name<<endl;
//kdDebug(2100)<<"New values: "<<values<<endl; //kdDebug(2100)<<"New values: "<<values<<endl;
result=TQString("group %1=%2").tqarg(name).tqarg(values.join(" ")); result=TQString("group %1=%2").arg(name).arg(values.join(" "));
found=true; found=true;
} }
} }
@ -1937,7 +1937,7 @@ void KgpgInterface::setGpgGroupSetting(TQString name,TQStringList values, TQStri
} }
qfile.close(); qfile.close();
if (!found) if (!found)
textToWrite+="\n"+TQString("group %1=%2").tqarg(name).tqarg(values.join(" ")); textToWrite+="\n"+TQString("group %1=%2").arg(name).arg(values.join(" "));
if (qfile.open(IO_WriteOnly)) { if (qfile.open(IO_WriteOnly)) {
TQTextStream t( &qfile); TQTextStream t( &qfile);

@ -104,8 +104,8 @@ void KgpgLibrary::fastencode(KURL &fileToCrypt,TQStringList selec,TQStringList e
} }
int filesToEncode=urlselecteds.count(); int filesToEncode=urlselecteds.count();
if (filesToEncode>1) if (filesToEncode>1)
emit systemMessage(i18n("<b>%1 Files left.</b>\nEncrypting </b>%2").tqarg(filesToEncode).tqarg(urlselecteds.first().path())); emit systemMessage(i18n("<b>%1 Files left.</b>\nEncrypting </b>%2").arg(filesToEncode).arg(urlselecteds.first().path()));
else emit systemMessage(i18n("<b>Encrypting </b>%2").tqarg(urlselecteds.first().path())); else emit systemMessage(i18n("<b>Encrypting </b>%2").arg(urlselecteds.first().path()));
KgpgInterface *cryptFileProcess=new KgpgInterface(); KgpgInterface *cryptFileProcess=new KgpgInterface();
pop = new KPassivePopup(panel); pop = new KPassivePopup(panel);
cryptFileProcess->KgpgEncryptFile(selec,urlselected,dest,encryptOptions,symetric); cryptFileProcess->KgpgEncryptFile(selec,urlselected,dest,encryptOptions,symetric);
@ -122,7 +122,7 @@ void KgpgLibrary::processpopup2(TQString fileName)
{ {
//pop->setTimeout(0); //pop->setTimeout(0);
pop->setView(i18n("Processing encryption (%1)").tqarg(fileName),i18n("Please wait..."),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop)); pop->setView(i18n("Processing encryption (%1)").arg(fileName),i18n("Please wait..."),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop));
pop->show(); pop->show();
/*TQRect qRect(TQApplication::desktop()->screenGeometry()); /*TQRect qRect(TQApplication::desktop()->screenGeometry());
int iXpos=qRect.width()/2-pop->width()/2; int iXpos=qRect.width()/2-pop->width()/2;
@ -192,7 +192,7 @@ void KgpgLibrary::slotFileDec(KURL srcUrl,KURL destUrl,TQStringList customDecryp
void KgpgLibrary::processpopup(TQString fileName) void KgpgLibrary::processpopup(TQString fileName)
{ {
emit systemMessage(i18n("Decrypting %1").tqarg(fileName)); emit systemMessage(i18n("Decrypting %1").arg(fileName));
pop->setTimeout(0); pop->setTimeout(0);
pop->setView(i18n("Processing decryption"),i18n("Please wait..."),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop)); pop->setView(i18n("Processing decryption"),i18n("Please wait..."),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop));
pop->show(); pop->show();
@ -222,7 +222,7 @@ void KgpgLibrary::processdecerror(TQString mssge)
qfile.close(); qfile.close();
////////////// if pgp data found, decode it ////////////// if pgp data found, decode it
if (result.startsWith("-----BEGIN PGP PUBLIC KEY BLOCK")) {////// dropped file is a public key, ask for import if (result.startsWith("-----BEGIN PGP PUBLIC KEY BLOCK")) {////// dropped file is a public key, ask for import
int result=KMessageBox::warningContinueCancel(0,i18n("<p>The file <b>%1</b> is a public key.<br>Do you want to import it ?</p>").tqarg(urlselected.path()),i18n("Warning")); int result=KMessageBox::warningContinueCancel(0,i18n("<p>The file <b>%1</b> is a public key.<br>Do you want to import it ?</p>").arg(urlselected.path()),i18n("Warning"));
if (result==KMessageBox::Cancel) if (result==KMessageBox::Cancel)
return; return;
else { else {
@ -233,7 +233,7 @@ void KgpgLibrary::processdecerror(TQString mssge)
} }
} else if (result.startsWith("-----BEGIN PGP PRIVATE KEY BLOCK")) {////// dropped file is a public key, ask for import } else if (result.startsWith("-----BEGIN PGP PRIVATE KEY BLOCK")) {////// dropped file is a public key, ask for import
qfile.close(); qfile.close();
KMessageBox::information(0,i18n("<p>The file <b>%1</b> is a private key block. Please use KGpg key manager to import it.</p>").tqarg(urlselected.path())); KMessageBox::information(0,i18n("<p>The file <b>%1</b> is a private key block. Please use KGpg key manager to import it.</p>").arg(urlselected.path()));
return; return;
} }
} }

@ -26,7 +26,7 @@
<property name="text"> <property name="text">
<string>key id</string> <string>key id</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter</set> <set>AlignVCenter</set>
</property> </property>
</widget> </widget>

@ -127,7 +127,7 @@ TQFile qfile(fileToCheck);
} else } else
if (result.startsWith("-----BEGIN PGP PUBLIC KEY BLOCK")) {////// dropped file is a public key, ask for import if (result.startsWith("-----BEGIN PGP PUBLIC KEY BLOCK")) {////// dropped file is a public key, ask for import
qfile.close(); qfile.close();
int result=KMessageBox::warningContinueCancel(this,i18n("<p>The file <b>%1</b> is a public key.<br>Do you want to import it ?</p>").tqarg(fileToCheck),i18n("Warning")); int result=KMessageBox::warningContinueCancel(this,i18n("<p>The file <b>%1</b> is a public key.<br>Do you want to import it ?</p>").arg(fileToCheck),i18n("Warning"));
if (result==KMessageBox::Cancel) { if (result==KMessageBox::Cancel) {
KIO::NetAccess::removeTempFile(fileToCheck); KIO::NetAccess::removeTempFile(fileToCheck);
return true; return true;
@ -239,7 +239,7 @@ void KgpgView::modified()
void KgpgView::slotAskForImport(TQString ID) void KgpgView::slotAskForImport(TQString ID)
{ {
if (KMessageBox::questionYesNo(0,i18n("<qt><b>Missing signature:</b><br>Key id: %1<br><br>" if (KMessageBox::questionYesNo(0,i18n("<qt><b>Missing signature:</b><br>Key id: %1<br><br>"
"Do you want to import this key from a keyserver?</qt>").tqarg(ID),i18n("Missing Key"), TQString(), i18n("Import"), i18n("Do Not Import"))==KMessageBox::Yes) { "Do you want to import this key from a keyserver?</qt>").arg(ID),i18n("Missing Key"), TQString(), i18n("Import"), i18n("Do Not Import"))==KMessageBox::Yes) {
keyServer *kser=new keyServer(0,"server_dialog",false,true); keyServer *kser=new keyServer(0,"server_dialog",false,true);
kser->page->kLEimportid->setText(ID); kser->page->kLEimportid->setText(ID);
kser->slotImport(); kser->slotImport();

@ -50,7 +50,7 @@
<property name="scaledContents"> <property name="scaledContents">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignTop</set> <set>AlignTop</set>
</property> </property>
</widget> </widget>
@ -62,7 +62,7 @@
<string>&lt;h1&gt;Welcome to the KGpg Wizard&lt;/h1&gt; <string>&lt;h1&gt;Welcome to the KGpg Wizard&lt;/h1&gt;
This wizard will first setup some basic configuration options required for KGpg to work properly. Next, it will allow you to create your own key pair, enabling you to encrypt your files and emails.</string> This wizard will first setup some basic configuration options required for KGpg to work properly. Next, it will allow you to create your own key pair, enabling you to encrypt your files and emails.</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignTop</set> <set>WordBreak|AlignTop</set>
</property> </property>
</widget> </widget>
@ -111,7 +111,7 @@ This wizard will first setup some basic configuration options required for KGpg
<property name="text"> <property name="text">
<string>Unless you want to try some unusual settings, just click on the "next" button.</string> <string>Unless you want to try some unusual settings, just click on the "next" button.</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignTop</set> <set>WordBreak|AlignTop</set>
</property> </property>
</widget> </widget>
@ -122,7 +122,7 @@ This wizard will first setup some basic configuration options required for KGpg
<property name="text"> <property name="text">
<string>KGpg needs to know where your GnuPG configuration file is stored.</string> <string>KGpg needs to know where your GnuPG configuration file is stored.</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignTop</set> <set>WordBreak|AlignTop</set>
</property> </property>
</widget> </widget>
@ -155,7 +155,7 @@ This wizard will first setup some basic configuration options required for KGpg
<property name="text"> <property name="text">
<string>&lt;br&gt;Path to your GnuPG options file:</string> <string>&lt;br&gt;Path to your GnuPG options file:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignVCenter</set> <set>WordBreak|AlignVCenter</set>
</property> </property>
</widget> </widget>
@ -183,7 +183,7 @@ This wizard will first setup some basic configuration options required for KGpg
<property name="scaledContents"> <property name="scaledContents">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignTop</set> <set>AlignTop</set>
</property> </property>
</widget> </widget>
@ -235,7 +235,7 @@ This wizard will first setup some basic configuration options required for KGpg
<property name="scaledContents"> <property name="scaledContents">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignTop</set> <set>AlignTop</set>
</property> </property>
</widget> </widget>
@ -266,7 +266,7 @@ The shredder securely deletes files (overwriting them 35 times) dropped on to it
Remember that if you download a file or open one in an editor, parts of the file may be saved in a temporary location. Shredding will not erase these temporary files. Remember that if you download a file or open one in an editor, parts of the file may be saved in a temporary location. Shredding will not erase these temporary files.
&lt;br&gt;&lt;b&gt;Shredding may not be 100% secure if you use a journaling file system.&lt;/b&gt;&lt;/qt&gt;</string> &lt;br&gt;&lt;b&gt;Shredding may not be 100% secure if you use a journaling file system.&lt;/b&gt;&lt;/qt&gt;</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignJustify|AlignTop</set> <set>WordBreak|AlignJustify|AlignTop</set>
</property> </property>
</widget> </widget>
@ -349,7 +349,7 @@ Remember that if you download a file or open one in an editor, parts of the file
<property name="text"> <property name="text">
<string>KGpg will now launch the key generation dialog to create your own key pair for encryption and decryption.</string> <string>KGpg will now launch the key generation dialog to create your own key pair for encryption and decryption.</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignTop</set> <set>WordBreak|AlignTop</set>
</property> </property>
</widget> </widget>
@ -377,7 +377,7 @@ Remember that if you download a file or open one in an editor, parts of the file
<property name="scaledContents"> <property name="scaledContents">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignTop</set> <set>AlignTop</set>
</property> </property>
</widget> </widget>

@ -137,7 +137,7 @@ UpdateViewItem::UpdateViewItem(TQListViewItem *parent, TQString name,TQString em
} }
void UpdateViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int tqalignment) void UpdateViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int alignment)
{ {
TQColorGroup _cg( cg ); TQColorGroup _cg( cg );
if (depth()==0) if (depth()==0)
@ -157,7 +157,7 @@ void UpdateViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,int column,
} }
KListViewItem::paintCell(p,_cg, column, width, tqalignment); KListViewItem::paintCell(p,_cg, column, width, alignment);
} }
#include <iostream> #include <iostream>
@ -257,7 +257,7 @@ KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel)
val=i18n("Unlimited"); val=i18n("Unlimited");
fullname=keyString[9]; fullname=keyString[9];
fp2 = popen(TQFile::encodeName(TQString("gpg --no-tty --with-colons --list-key %1").tqarg(KShellProcess::quote(id))), "r"); fp2 = popen(TQFile::encodeName(TQString("gpg --no-tty --with-colons --list-key %1").arg(KShellProcess::quote(id))), "r");
bool dead=true; bool dead=true;
while ( fgets( line, sizeof(line), fp2)) { while ( fgets( line, sizeof(line), fp2)) {
tst2=TQString::fromUtf8(line); tst2=TQString::fromUtf8(line);
@ -297,7 +297,7 @@ KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel)
item=new KListViewItem(keysListpr,keyName,keyMail,id); item=new KListViewItem(keysListpr,keyName,keyMail,id);
//KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, expiration: %3").tqarg(id).tqarg(trust).tqarg(val)); //KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, expiration: %3").arg(id).arg(trust).arg(val));
KListViewItem *sub= new KListViewItem(item,i18n("Expiration:"),val); KListViewItem *sub= new KListViewItem(item,i18n("Expiration:"),val);
sub->setSelectable(false); sub->setSelectable(false);
item->setPixmap(0,keyPair); item->setPixmap(0,keyPair);
@ -434,7 +434,7 @@ KeyView::KeyView( TQWidget *parent, const char *name )
void KeyView::droppedfile (KURL url) void KeyView::droppedfile (KURL url)
{ {
if (KMessageBox::questionYesNo(this,i18n("<p>Do you want to import file <b>%1</b> into your key ring?</p>").tqarg(url.path()), TQString(), i18n("Import"), i18n("Do Not Import"))!=KMessageBox::Yes) if (KMessageBox::questionYesNo(this,i18n("<p>Do you want to import file <b>%1</b> into your key ring?</p>").arg(url.path()), TQString(), i18n("Import"), i18n("Do Not Import"))!=KMessageBox::Yes)
return; return;
KgpgInterface *importKeyProcess=new KgpgInterface(); KgpgInterface *importKeyProcess=new KgpgInterface();
@ -966,7 +966,7 @@ void listKeys::slotGpgError(TQString errortxt)
void listKeys::slotDeletePhoto() void listKeys::slotDeletePhoto()
{ {
if (KMessageBox::warningContinueCancel(this,i18n("<qt>Are you sure you want to delete Photo id <b>%1</b><br>from key <b>%2 &lt;%3&gt;</b> ?</qt>").tqarg(keysList2->currentItem()->text(6)).tqarg(keysList2->currentItem()->parent()->text(0)).tqarg(keysList2->currentItem()->parent()->text(1)),i18n("Warning"),KGuiItem(i18n("Delete"),"editdelete"))!=KMessageBox::Continue) if (KMessageBox::warningContinueCancel(this,i18n("<qt>Are you sure you want to delete Photo id <b>%1</b><br>from key <b>%2 &lt;%3&gt;</b> ?</qt>").arg(keysList2->currentItem()->text(6)).arg(keysList2->currentItem()->parent()->text(0)).arg(keysList2->currentItem()->parent()->text(1)),i18n("Warning"),KGuiItem(i18n("Delete"),"editdelete"))!=KMessageBox::Continue)
return; return;
KgpgInterface *delPhotoProcess=new KgpgInterface(); KgpgInterface *delPhotoProcess=new KgpgInterface();
@ -1070,7 +1070,7 @@ void listKeys::findFirstKey()
keysList2->setSelected(item,true); keysList2->setSelected(item,true);
keysList2->ensureItemVisible(item); keysList2->ensureItemVisible(item);
} else } else
KMessageBox::sorry(this,i18n("<qt>Search string '<b>%1</b>' not found.").tqarg(searchString)); KMessageBox::sorry(this,i18n("<qt>Search string '<b>%1</b>' not found.").arg(searchString));
} }
void listKeys::findNextKey() void listKeys::findNextKey()
@ -1275,7 +1275,7 @@ void listKeys::readOptions()
KGpgSettings::setGroups(groups.join(",")); KGpgSettings::setGroups(groups.join(","));
keysList2->groupNb=groups.count(); keysList2->groupNb=groups.count();
if (keyStatusBar) if (keyStatusBar)
changeMessage(i18n("%1 Keys, %2 Groups").tqarg(keysList2->childCount()-keysList2->groupNb).tqarg(keysList2->groupNb),1); changeMessage(i18n("%1 Keys, %2 Groups").arg(keysList2->childCount()-keysList2->groupNb).arg(keysList2->groupNb),1);
showTipOfDay= KGpgSettings::showTipOfDay(); showTipOfDay= KGpgSettings::showTipOfDay();
} }
@ -1478,7 +1478,7 @@ void listKeys::slotexportsec()
p->start(KProcess::Block); p->start(KProcess::Block);
if (fgpg.exists()) if (fgpg.exists())
KMessageBox::information(this,i18n("Your PRIVATE key \"%1\" was successfully exported.\nDO NOT leave it in an insecure place.").tqarg(url.path())); KMessageBox::information(this,i18n("Your PRIVATE key \"%1\" was successfully exported.\nDO NOT leave it in an insecure place.").arg(url.path()));
else else
KMessageBox::sorry(this,i18n("Your secret key could not be exported.\nCheck the key.")); KMessageBox::sorry(this,i18n("Your secret key could not be exported.\nCheck the key."));
} }
@ -1553,7 +1553,7 @@ void listKeys::slotexport()
p->start(KProcess::Block); p->start(KProcess::Block);
if (fgpg.exists()) if (fgpg.exists())
KMessageBox::information(this,i18n("Your public key \"%1\" was successfully exported\n").tqarg(expname)); KMessageBox::information(this,i18n("Your public key \"%1\" was successfully exported\n").arg(expname));
else else
KMessageBox::sorry(this,i18n("Your public key could not be exported\nCheck the key.")); KMessageBox::sorry(this,i18n("Your public key could not be exported\nCheck the key."));
} }
@ -1667,7 +1667,7 @@ void listKeys::deleteGroup()
if (!keysList2->currentItem() || !keysList2->currentItem()->text(6).isEmpty()) if (!keysList2->currentItem() || !keysList2->currentItem()->text(6).isEmpty())
return; return;
int result=KMessageBox::warningContinueCancel(this,i18n("<qt>Are you sure you want to delete group <b>%1</b> ?</qt>").tqarg(keysList2->currentItem()->text(0)),i18n("Warning"),KGuiItem(i18n("Delete"),"editdelete")); int result=KMessageBox::warningContinueCancel(this,i18n("<qt>Are you sure you want to delete group <b>%1</b> ?</qt>").arg(keysList2->currentItem()->text(0)),i18n("Warning"),KGuiItem(i18n("Delete"),"editdelete"));
if (result!=KMessageBox::Continue) if (result!=KMessageBox::Continue)
return; return;
KgpgInterface::delGpgGroup(keysList2->currentItem()->text(0), KGpgSettings::gpgConfigPath()); KgpgInterface::delGpgGroup(keysList2->currentItem()->text(0), KGpgSettings::gpgConfigPath());
@ -1681,7 +1681,7 @@ void listKeys::deleteGroup()
TQStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath()); TQStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath());
KGpgSettings::setGroups(groups.join(",")); KGpgSettings::setGroups(groups.join(","));
keysList2->groupNb=groups.count(); keysList2->groupNb=groups.count();
changeMessage(i18n("%1 Keys, %2 Groups").tqarg(keysList2->childCount()-keysList2->groupNb).tqarg(keysList2->groupNb),1); changeMessage(i18n("%1 Keys, %2 Groups").arg(keysList2->childCount()-keysList2->groupNb).arg(keysList2->groupNb),1);
} }
void listKeys::groupChange() void listKeys::groupChange()
@ -1737,9 +1737,9 @@ void listKeys::createNewGroup()
keysList2->setSelected(newgrp,true); keysList2->setSelected(newgrp,true);
keysList2->ensureItemVisible(newgrp); keysList2->ensureItemVisible(newgrp);
keysList2->groupNb=groups.count(); keysList2->groupNb=groups.count();
changeMessage(i18n("%1 Keys, %2 Groups").tqarg(keysList2->childCount()-keysList2->groupNb).tqarg(keysList2->groupNb),1); changeMessage(i18n("%1 Keys, %2 Groups").arg(keysList2->childCount()-keysList2->groupNb).arg(keysList2->groupNb),1);
} else } else
KMessageBox::sorry(this,i18n("<qt>No valid or trusted key was selected. The group <b>%1</b> will not be created.</qt>").tqarg(groupName)); KMessageBox::sorry(this,i18n("<qt>No valid or trusted key was selected. The group <b>%1</b> will not be created.</qt>").arg(groupName));
} }
} }
@ -1864,7 +1864,7 @@ void listKeys::signkey()
pclose(pass); pclose(pass);
opt= i18n("<qt>You are about to sign key:<br><br>%1<br>ID: %2<br>Fingerprint: <br><b>%3</b>.<br><br>" opt= i18n("<qt>You are about to sign key:<br><br>%1<br>ID: %2<br>Fingerprint: <br><b>%3</b>.<br><br>"
"You should check the key fingerprint by phoning or meeting the key owner to be sure that someone " "You should check the key fingerprint by phoning or meeting the key owner to be sure that someone "
"is not trying to intercept your communications</qt>").tqarg(keysList2->currentItem()->text(0)+" ("+keysList2->currentItem()->text(1)+")").tqarg(keysList2->currentItem()->text(6)).tqarg(fingervalue); "is not trying to intercept your communications</qt>").arg(keysList2->currentItem()->text(0)+" ("+keysList2->currentItem()->text(1)+")").arg(keysList2->currentItem()->text(6)).arg(fingervalue);
if (KMessageBox::warningContinueCancel(this,opt)!=KMessageBox::Continue) if (KMessageBox::warningContinueCancel(this,opt)!=KMessageBox::Continue)
return; return;
@ -1958,7 +1958,7 @@ void listKeys::signatureResult(int success)
keysList2->refreshcurrentkey(signList.at(keyCount)); keysList2->refreshcurrentkey(signList.at(keyCount));
else if (success==2) else if (success==2)
KMessageBox::sorry(this,i18n("<qt>Bad passphrase, key <b>%1</b> not signed.</qt>").tqarg(signList.at(keyCount)->text(0)+i18n(" (")+signList.at(keyCount)->text(1)+i18n(")"))); KMessageBox::sorry(this,i18n("<qt>Bad passphrase, key <b>%1</b> not signed.</qt>").arg(signList.at(keyCount)->text(0)+i18n(" (")+signList.at(keyCount)->text(1)+i18n(")")));
keyCount++; keyCount++;
signLoop(); signLoop();
@ -2064,7 +2064,7 @@ void listKeys::delsignkey()
KMessageBox::sorry(this,i18n("Edit key manually to delete a self-signature.")); KMessageBox::sorry(this,i18n("Edit key manually to delete a self-signature."));
return; return;
} }
TQString ask=i18n("<qt>Are you sure you want to delete signature<br><b>%1</b> from key:<br><b>%2</b>?</qt>").tqarg(signMail).tqarg(parentMail); TQString ask=i18n("<qt>Are you sure you want to delete signature<br><b>%1</b> from key:<br><b>%2</b>?</qt>").arg(signMail).arg(parentMail);
if (KMessageBox::questionYesNo(this,ask,TQString(),KStdGuiItem::del(),KStdGuiItem::cancel())!=KMessageBox::Yes) if (KMessageBox::questionYesNo(this,ask,TQString(),KStdGuiItem::del(),KStdGuiItem::cancel())!=KMessageBox::Yes)
return; return;
@ -2134,7 +2134,7 @@ void listKeys::slotgenkey()
bool goodpass=false; bool goodpass=false;
while (!goodpass) while (!goodpass)
{ {
int code=KPasswordDialog::getNewPassword(password,i18n("<b>Enter passphrase for %1</b>:<br>Passphrase should include non alphanumeric characters and random sequences").tqarg(newKeyName+" <"+newKeyMail+">")); int code=KPasswordDialog::getNewPassword(password,i18n("<b>Enter passphrase for %1</b>:<br>Passphrase should include non alphanumeric characters and random sequences").arg(newKeyName+" <"+newKeyMail+">"));
if (code!=TQDialog::Accepted) if (code!=TQDialog::Accepted)
return; return;
if (password.length()<5) if (password.length()<5)
@ -2188,27 +2188,27 @@ void listKeys::slotgenkey()
{ {
proc->writeStdin(TQString("Key-Type: DSA")); proc->writeStdin(TQString("Key-Type: DSA"));
proc->writeStdin(TQString("Subkey-Type: ELG-E")); proc->writeStdin(TQString("Subkey-Type: ELG-E"));
proc->writeStdin(TQString("Subkey-Length:%1").tqarg(ksize)); proc->writeStdin(TQString("Subkey-Length:%1").arg(ksize));
} }
proc->writeStdin(TQString("Passphrase:%1").tqarg(password.data())); proc->writeStdin(TQString("Passphrase:%1").arg(password.data()));
proc->writeStdin(TQString("Key-Length:%1").tqarg(ksize)); proc->writeStdin(TQString("Key-Length:%1").arg(ksize));
proc->writeStdin(TQString("Name-Real:%1").tqarg(newKeyName)); proc->writeStdin(TQString("Name-Real:%1").arg(newKeyName));
if (!newKeyMail.isEmpty()) if (!newKeyMail.isEmpty())
proc->writeStdin(TQString("Name-Email:%1").tqarg(newKeyMail)); proc->writeStdin(TQString("Name-Email:%1").arg(newKeyMail));
if (!kcomment.isEmpty()) if (!kcomment.isEmpty())
proc->writeStdin(TQString("Name-Comment:%1").tqarg(kcomment)); proc->writeStdin(TQString("Name-Comment:%1").arg(kcomment));
if (kexp==0) if (kexp==0)
proc->writeStdin(TQString("Expire-Date:0")); proc->writeStdin(TQString("Expire-Date:0"));
if (kexp==1) if (kexp==1)
proc->writeStdin(TQString("Expire-Date:%1").tqarg(knumb)); proc->writeStdin(TQString("Expire-Date:%1").arg(knumb));
if (kexp==2) if (kexp==2)
proc->writeStdin(TQString("Expire-Date:%1w").tqarg(knumb)); proc->writeStdin(TQString("Expire-Date:%1w").arg(knumb));
if (kexp==3) if (kexp==3)
proc->writeStdin(TQString("Expire-Date:%1m").tqarg(knumb)); proc->writeStdin(TQString("Expire-Date:%1m").arg(knumb));
if (kexp==4) if (kexp==4)
proc->writeStdin(TQString("Expire-Date:%1y").tqarg(knumb)); proc->writeStdin(TQString("Expire-Date:%1y").arg(knumb));
proc->writeStdin(TQString("%commit")); proc->writeStdin(TQString("%commit"));
TQObject::connect(proc,TQT_SIGNAL(readReady(KProcIO *)),TQT_TQOBJECT(this),TQT_SLOT(readgenprocess(KProcIO *))); TQObject::connect(proc,TQT_SIGNAL(readReady(KProcIO *)),TQT_TQOBJECT(this),TQT_SLOT(readgenprocess(KProcIO *)));
proc->closeWhenDone(); proc->closeWhenDone();
@ -2281,7 +2281,7 @@ void listKeys::newKeyDone(KProcess *)
return; return;
} }
keysList2->refreshcurrentkey(newkeyID); keysList2->refreshcurrentkey(newkeyID);
changeMessage(i18n("%1 Keys, %2 Groups").tqarg(keysList2->childCount()-keysList2->groupNb).tqarg(keysList2->groupNb),1); changeMessage(i18n("%1 Keys, %2 Groups").arg(keysList2->childCount()-keysList2->groupNb).arg(keysList2->groupNb),1);
KDialogBase *keyCreated=new KDialogBase( this, "key_created", true,i18n("New Key Pair Created"), KDialogBase::Ok); KDialogBase *keyCreated=new KDialogBase( this, "key_created", true,i18n("New Key Pair Created"), KDialogBase::Ok);
newKey *page=new newKey(keyCreated); newKey *page=new newKey(keyCreated);
page->TLname->setText("<b>"+newKeyName+"</b>"); page->TLname->setText("<b>"+newKeyName+"</b>");
@ -2326,7 +2326,7 @@ void listKeys::doFilePrint(TQString url)
TQTextStream t( &qfile ); TQTextStream t( &qfile );
doPrint(t.read()); doPrint(t.read());
} else } else
KMessageBox::sorry(this,i18n("<qt>Cannot open file <b>%1</b> for printing...</qt>").tqarg(url)); KMessageBox::sorry(this,i18n("<qt>Cannot open file <b>%1</b> for printing...</qt>").arg(url));
} }
void listKeys::doPrint(TQString txt) void listKeys::doPrint(TQString txt)
@ -2345,7 +2345,7 @@ void listKeys::deleteseckey()
//////////////////////// delete a key //////////////////////// delete a key
TQString res=keysList2->currentItem()->text(0)+" ("+keysList2->currentItem()->text(1)+")"; TQString res=keysList2->currentItem()->text(0)+" ("+keysList2->currentItem()->text(1)+")";
int result=KMessageBox::warningContinueCancel(this, int result=KMessageBox::warningContinueCancel(this,
i18n("<p>Delete <b>SECRET KEY</b> pair <b>%1</b>?</p>Deleting this key pair means you will never be able to decrypt files encrypted with this key again.").tqarg(res), i18n("<p>Delete <b>SECRET KEY</b> pair <b>%1</b>?</p>Deleting this key pair means you will never be able to decrypt files encrypted with this key again.").arg(res),
i18n("Warning"), i18n("Warning"),
KGuiItem(i18n("Delete"),"editdelete")); KGuiItem(i18n("Delete"),"editdelete"));
if (result!=KMessageBox::Continue) if (result!=KMessageBox::Continue)
@ -2406,7 +2406,7 @@ void listKeys::confirmdeletekey()
} }
if (secretKeyInside) { if (secretKeyInside) {
int result=KMessageBox::warningContinueCancel(this,i18n("<qt>The following are secret key pairs:<br><b>%1</b>They will not be deleted.<br></qt>").tqarg(secList)); int result=KMessageBox::warningContinueCancel(this,i18n("<qt>The following are secret key pairs:<br><b>%1</b>They will not be deleted.<br></qt>").arg(secList));
if (result!=KMessageBox::Continue) if (result!=KMessageBox::Continue)
return; return;
} }
@ -2461,7 +2461,7 @@ void listKeys::deletekey()
} }
} }
else stateChanged("empty_list"); else stateChanged("empty_list");
changeMessage(i18n("%1 Keys, %2 Groups").tqarg(keysList2->childCount()-keysList2->groupNb).tqarg(keysList2->groupNb),1); changeMessage(i18n("%1 Keys, %2 Groups").arg(keysList2->childCount()-keysList2->groupNb).arg(keysList2->groupNb),1);
} }
@ -2638,7 +2638,7 @@ void KeyView::expandKey(TQListViewItem *item)
} else } else
if (tst[0]=="sub") { if (tst[0]=="sub") {
gpgKey subKey=extractKey(line); gpgKey subKey=extractKey(line);
itemsub= new UpdateViewItem(item,i18n("%1 subkey").tqarg(subKey.gpgkeyalgo),TQString(),TQString(),subKey.gpgkeyexpiration,subKey.gpgkeysize,subKey.gpgkeycreation,subKey.gpgkeyid); itemsub= new UpdateViewItem(item,i18n("%1 subkey").arg(subKey.gpgkeyalgo),TQString(),TQString(),subKey.gpgkeyexpiration,subKey.gpgkeysize,subKey.gpgkeycreation,subKey.gpgkeyid);
itemsub->setPixmap(0,pixkeySingle); itemsub->setPixmap(0,pixkeySingle);
itemsub->setPixmap(2,subKey.trustpic); itemsub->setPixmap(2,subKey.trustpic);
cycle="sub"; cycle="sub";
@ -2768,7 +2768,7 @@ void KeyView::refreshkeylist()
setSelected(firstChild(),true); setSelected(firstChild(),true);
} }
emit statusMessage(i18n("%1 Keys, %2 Groups").tqarg(childCount()-groupNb).tqarg(groupNb),1); emit statusMessage(i18n("%1 Keys, %2 Groups").arg(childCount()-groupNb).arg(groupNb),1);
emit statusMessage(i18n("Ready"),0); emit statusMessage(i18n("Ready"),0);
kdDebug(2100)<<"Refresh Finished"<<endl; kdDebug(2100)<<"Refresh Finished"<<endl;
} }
@ -2855,7 +2855,7 @@ void KeyView::refreshgroups()
item->setPixmap(0,pixkeyGroup); item->setPixmap(0,pixkeyGroup);
item->setExpandable(false); item->setExpandable(false);
} }
emit statusMessage(i18n("%1 Keys, %2 Groups").tqarg(childCount()-groupNb).tqarg(groupNb),1); emit statusMessage(i18n("%1 Keys, %2 Groups").arg(childCount()-groupNb).arg(groupNb),1);
emit statusMessage(i18n("Ready"),0); emit statusMessage(i18n("Ready"),0);
} }
@ -2882,7 +2882,7 @@ void KeyView::slotReloadKeys(TQStringList keyIDs)
} }
kdDebug(2100)<<"Refreshing key:--------"<<TQString((keyIDs.last()).right(8).prepend("0x"))<<endl; kdDebug(2100)<<"Refreshing key:--------"<<TQString((keyIDs.last()).right(8).prepend("0x"))<<endl;
ensureItemVisible(this->findItem((keyIDs.last()).right(8).prepend("0x"),6)); ensureItemVisible(this->findItem((keyIDs.last()).right(8).prepend("0x"),6));
emit statusMessage(i18n("%1 Keys, %2 Groups").tqarg(childCount()-groupNb).tqarg(groupNb),1); emit statusMessage(i18n("%1 Keys, %2 Groups").arg(childCount()-groupNb).arg(groupNb),1);
emit statusMessage(i18n("Ready"),0); emit statusMessage(i18n("Ready"),0);
} }
@ -2917,7 +2917,7 @@ void KeyView::slotReloadOrphaned()
} }
} }
setSelected(findItem(*it,6),true); setSelected(findItem(*it,6),true);
emit statusMessage(i18n("%1 Keys, %2 Groups").tqarg(childCount()-groupNb).tqarg(groupNb),1); emit statusMessage(i18n("%1 Keys, %2 Groups").arg(childCount()-groupNb).arg(groupNb),1);
emit statusMessage(i18n("Ready"),0); emit statusMessage(i18n("Ready"),0);
} }

@ -70,14 +70,14 @@ def=isDefault;
} }
void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int tqalignment) void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int alignment)
{ {
if ((def) && (column<2)) { if ((def) && (column<2)) {
TQFont font(p->font()); TQFont font(p->font());
font.setBold(true); font.setBold(true);
p->setFont(font); p->setFont(font);
} }
KListViewItem::paintCell(p, cg, column, width, tqalignment); KListViewItem::paintCell(p, cg, column, width, alignment);
} }
TQString UpdateViewItem2 :: key(int c,bool ) const TQString UpdateViewItem2 :: key(int c,bool ) const
@ -106,7 +106,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
keySingle=loader->loadIcon("kgpg_key1",KIcon::Small,20); keySingle=loader->loadIcon("kgpg_key1",KIcon::Small,20);
keyGroup=loader->loadIcon("kgpg_key3",KIcon::Small,20); keyGroup=loader->loadIcon("kgpg_key3",KIcon::Small,20);
if (filemode) setCaption(i18n("Select Public Key for %1").tqarg(sfile)); if (filemode) setCaption(i18n("Select Public Key for %1").arg(sfile));
fmode=filemode; fmode=filemode;
TQHButtonGroup *hBar=new TQHButtonGroup(page); TQHButtonGroup *hBar=new TQHButtonGroup(page);
@ -176,7 +176,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
(CBshred,i18n("<b>Shred source file</b>: permanently remove source file. No recovery will be possible")); (CBshred,i18n("<b>Shred source file</b>: permanently remove source file. No recovery will be possible"));
TQString shredWhatsThis = i18n( "<qt><b>Shred source file:</b><br /><p>Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.</p><p><b>But you must be aware that this is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>"); TQString shredWhatsThis = i18n( "<qt><b>Shred source file:</b><br /><p>Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.</p><p><b>But you must be aware that this is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>");
KActiveLabel *warn= new KActiveLabel( i18n("<a href=\"whatsthis:%1\">Read this before using shredding</a>").tqarg(shredWhatsThis),parentBox ); KActiveLabel *warn= new KActiveLabel( i18n("<a href=\"whatsthis:%1\">Read this before using shredding</a>").arg(shredWhatsThis),parentBox );
shredBox->addWidget(CBshred); shredBox->addWidget(CBshred);
shredBox->addWidget(warn); shredBox->addWidget(warn);
} }
@ -431,7 +431,7 @@ void popupPublic::slotprocread(KProcIO *p)
bool isDefaultKey=false; bool isDefaultKey=false;
if (id.right(8)==defaultKey) isDefaultKey=true; if (id.right(8)==defaultKey) isDefaultKey=true;
UpdateViewItem2 *item=new UpdateViewItem2(keysList,keyname,keymail,id,isDefaultKey); UpdateViewItem2 *item=new UpdateViewItem2(keysList,keyname,keymail,id,isDefaultKey);
//KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, validity: %3").tqarg(id).tqarg(tr).tqarg(val)); //KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, validity: %3").arg(id).arg(tr).arg(val));
//sub->setSelectable(false); //sub->setSelectable(false);
if (seclist.find(tst,0,FALSE)!=-1) if (seclist.find(tst,0,FALSE)!=-1)
item->setPixmap(0,keyPair); item->setPixmap(0,keyPair);

@ -132,7 +132,7 @@ void CDigitLabel::drawContents( TQPainter *p )
TQString text; TQString text;
text.setNum( mDigit ); text.setNum( mDigit );
p->drawText( 0, 0, cr.width(), cr.height(), tqalignment(), text ); p->drawText( 0, 0, cr.width(), cr.height(), alignment(), text );

@ -1237,7 +1237,7 @@ void centerDialog( TQWidget *widget, TQWidget *centerParent )
} }
TQPoint point = centerParent->mapToGlobal( TQPoint(0,0) ); TQPoint point = centerParent->mapToGlobal( TQPoint(0,0) );
TQRect pos = centerParent->tqgeometry(); TQRect pos = centerParent->geometry();
widget->setGeometry( point.x() + pos.width()/2 - widget->width()/2, widget->setGeometry( point.x() + pos.width()/2 - widget->width()/2,
point.y() + pos.height()/2 - widget->height()/2, point.y() + pos.height()/2 - widget->height()/2,
@ -1253,7 +1253,7 @@ void centerDialogBottom( TQWidget *widget, TQWidget *centerParent )
} }
TQPoint point = centerParent->mapToGlobal( TQPoint(0,0) ); TQPoint point = centerParent->mapToGlobal( TQPoint(0,0) );
TQRect pos = centerParent->tqgeometry(); TQRect pos = centerParent->geometry();
widget->setGeometry( point.x() + pos.width()/2 - widget->width()/2, widget->setGeometry( point.x() + pos.width()/2 - widget->width()/2,
point.y() + pos.height() - widget->height(), point.y() + pos.height() - widget->height(),

@ -673,14 +673,14 @@ bool CExportDialog::verifyPackage( const TQString &path )
} }
const TQString prefix = mHtml.prefixInput->text(); const TQString prefix = mHtml.prefixInput->text();
TQString f1 = TQString("%1%2.html").tqarg(prefix).tqarg("00000000"); TQString f1 = TQString("%1%2.html").arg(prefix).arg("00000000");
TQString f2 = TQString("%1%2.html").tqarg(prefix).tqarg("99999999"); TQString f2 = TQString("%1%2.html").arg(prefix).arg("99999999");
TQString msg = i18n( "" TQString msg = i18n( ""
"You have specified an existing folder.\n" "You have specified an existing folder.\n"
"If you continue, any existing file in the range " "If you continue, any existing file in the range "
"\"%1\" to \"%2\" can be lost.\n" "\"%1\" to \"%2\" can be lost.\n"
"Continue?").tqarg(f1).tqarg(f2); "Continue?").arg(f1).arg(f2);
int reply = KMessageBox::warningContinueCancel( this, msg, title ); int reply = KMessageBox::warningContinueCancel( this, msg, title );
if( reply != KMessageBox::Continue ) if( reply != KMessageBox::Continue )
{ {

@ -239,13 +239,13 @@ void CFileInfoDialog::setStatistics( SStatisticControl &sc )
o.sprintf("%03o", i ); o.sprintf("%03o", i );
b.sprintf("%s", printBin(i) ); b.sprintf("%s", printBin(i) );
n = TQString("%1").tqarg( sc.occurrence[i], pre ); n = TQString("%1").arg( sc.occurrence[i], pre );
if( sc.documentSize == 0 ) if( sc.documentSize == 0 )
p = "0.00"; p = "0.00";
else else
{ {
double val = 100.0*((double)sc.occurrence[i]/(double)sc.documentSize); double val = 100.0*((double)sc.occurrence[i]/(double)sc.documentSize);
p = TQString("%1").tqarg( val, 6, 'f', 2 ); p = TQString("%1").arg( val, 6, 'f', 2 );
} }
const TQChar _i((char)i); const TQChar _i((char)i);

@ -447,8 +447,8 @@ TQString SExportCArray::variableName( uint range ) const
uint es = elementSize(); uint es = elementSize();
uint numElement = range / es + ((range % es) ? 1 : 0); uint numElement = range / es + ((range % es) ? 1 : 0);
return( TQString("%1 %2[%2]").tqarg(typeString[elementType]). return( TQString("%1 %2[%2]").arg(typeString[elementType]).
tqarg(arrayName).tqarg(numElement) ); arg(arrayName).arg(numElement) );
} }
@ -676,7 +676,7 @@ bool CHexBuffer::toggleEditor( void )
edit_secondary : edit_primary; edit_secondary : edit_primary;
} }
setEditMode( mEditMode ); // Sets the cursor tqshapes as well setEditMode( mEditMode ); // Sets the cursor shapes as well
if( changed == true ) if( changed == true )
{ {
@ -952,7 +952,7 @@ int CHexBuffer::writeFile( TQFile &file, CProgress &p )
int CHexBuffer::readFile( TQFile &file, const TQString &url, CProgress &p ) int CHexBuffer::readFile( TQFile &file, const TQString &url, CProgress &p )
{ {
if( tqresize( file.size() + 100 ) == false ) if( resize( file.size() + 100 ) == false )
{ {
p.finish(); p.finish();
return( Err_NoMemory ); return( Err_NoMemory );
@ -1064,7 +1064,7 @@ int CHexBuffer::insertFile( TQFile &file, CProgress &p )
int CHexBuffer::newFile( const TQString &url ) int CHexBuffer::newFile( const TQString &url )
{ {
if( tqresize( 100 ) == 0 ) if( resize( 100 ) == 0 )
{ {
return( Err_NoMemory ); return( Err_NoMemory );
} }
@ -1923,8 +1923,8 @@ void CHexBuffer::drawHeader( TQPainter &paint, int sx, int width, int y,
else if( header.pos[i] == SPageHeader::PageNumber ) else if( header.pos[i] == SPageHeader::PageNumber )
{ {
msg = i18n("Page %1 of %2") msg = i18n("Page %1 of %2")
.tqarg(KGlobal::locale()->formatNumber(position.curPage, 0)) .arg(KGlobal::locale()->formatNumber(position.curPage, 0))
.tqarg(KGlobal::locale()->formatNumber(position.maxPage, 0)); .arg(KGlobal::locale()->formatNumber(position.maxPage, 0));
} }
else if( header.pos[i] == SPageHeader::FileName ) else if( header.pos[i] == SPageHeader::FileName )
{ {
@ -2091,7 +2091,7 @@ void CHexBuffer::drawCursor( TQPainter &paint, uint line, int startx,
} }
// //
// Draw the cursor tqshape // Draw the cursor shape
// //
bool transparent = false; bool transparent = false;
if( mActiveEditor == edit_primary ) if( mActiveEditor == edit_primary )
@ -2116,7 +2116,7 @@ void CHexBuffer::drawCursor( TQPainter &paint, uint line, int startx,
paint.drawLine( center-2, mFontHeight-1, center+2, mFontHeight-1 ); paint.drawLine( center-2, mFontHeight-1, center+2, mFontHeight-1 );
} }
} }
else // Solid block tqshape else // Solid block shape
{ {
paint.fillRect( c.x1 - startx, 0, mUnitWidth, mFontHeight, cbg ); paint.fillRect( c.x1 - startx, 0, mUnitWidth, mFontHeight, cbg );
useFg = true; useFg = true;
@ -2209,7 +2209,7 @@ void CHexBuffer::drawCursor( TQPainter &paint, uint line, int startx,
} }
// //
// Draw the cursor tqshape // Draw the cursor shape
// //
transparent = false; transparent = false;
if( mActiveEditor == edit_secondary ) if( mActiveEditor == edit_secondary )
@ -2822,16 +2822,16 @@ int CHexBuffer::exportHtml( const SExportHtml &ex, CProgress &p )
for( uint i=0; i < numFiles; i++ ) for( uint i=0; i < numFiles; i++ )
{ {
name.sprintf( "%08d.html", i+1 ); name.sprintf( "%08d.html", i+1 );
fileNames.append( TQString("%1/%2%3").tqarg(ex.package).tqarg(ex.prefix). fileNames.append( TQString("%1/%2%3").arg(ex.package).arg(ex.prefix).
arg(name)); arg(name));
} }
name.sprintf( "%08d.html", 0 ); name.sprintf( "%08d.html", 0 );
TQString tocName =TQString("%1/%2%3").tqarg(ex.package).tqarg(ex.prefix).tqarg(name); TQString tocName =TQString("%1/%2%3").arg(ex.package).arg(ex.prefix).arg(name);
TQString linkName; TQString linkName;
if( ex.symLink == true ) if( ex.symLink == true )
{ {
linkName = TQString("%1/%2").tqarg(ex.package).tqarg("index.html"); linkName = TQString("%1/%2").arg(ex.package).arg("index.html");
} }
while( remaining > 0 ) while( remaining > 0 )
@ -2849,7 +2849,7 @@ int CHexBuffer::exportHtml( const SExportHtml &ex, CProgress &p )
THIS_FPTR(printOffset)( mPrintBuf, (startLine-1)*mLayout.lineSize ); THIS_FPTR(printOffset)( mPrintBuf, (startLine-1)*mLayout.lineSize );
mPrintBuf[mOffsetSize]=0; mPrintBuf[mOffsetSize]=0;
offset += TQString(" %1 [%2]").tqarg(i18n("to")).tqarg(mPrintBuf); offset += TQString(" %1 [%2]").arg(i18n("to")).arg(mPrintBuf);
offsets.append(offset); offsets.append(offset);
if( p.expired() == true ) if( p.expired() == true )
@ -2981,7 +2981,7 @@ int CHexBuffer::copyText( TQByteArray &array, const SExportRange &range,
uint bytePerLine = mOffsetSize + 1 + (mNumCell + 2)*mLayout.lineSize + 1; uint bytePerLine = mOffsetSize + 1 + (mNumCell + 2)*mLayout.lineSize + 1;
uint size = (stopLine - startLine + 1)*bytePerLine; uint size = (stopLine - startLine + 1)*bytePerLine;
if( array.tqresize( size+1 ) == false ) if( array.resize( size+1 ) == false )
{ {
return( Err_NoMemory ); return( Err_NoMemory );
} }
@ -3021,7 +3021,7 @@ int CHexBuffer::copySelectedData( TQByteArray &array )
} }
uint size = stop - start; uint size = stop - start;
if( array.tqresize( size ) == false ) if( array.resize( size ) == false )
{ {
return( Err_NoMemory ); return( Err_NoMemory );
} }
@ -4829,7 +4829,7 @@ void CHexBuffer::printHtmlCaption( TQTextStream &os, uint captionType,
break; break;
case 3: case 3:
caption = i18n("Page %1 of %2").tqarg(curPage).tqarg(numPage); caption = i18n("Page %1 of %2").arg(curPage).arg(numPage);
break; break;
} }

@ -580,7 +580,7 @@ void CHexEditorWidget::newFile( void )
return; return;
} }
TQString url = i18n("Untitled %1").tqarg( mUntitledCount ); TQString url = i18n("Untitled %1").arg( mUntitledCount );
// //
// If the url is already present in the document list (should not happen), // If the url is already present in the document list (should not happen),
@ -1978,7 +1978,7 @@ int CHexEditorWidget::readURL( const KURL &url, bool insert )
// //
if( !url.isValid() ) if( !url.isValid() )
{ {
TQString msg = i18n("Malformed URL\n%1").tqarg( url.url() ); TQString msg = i18n("Malformed URL\n%1").arg( url.url() );
KMessageBox::sorry( topLevelWidget(), msg, i18n("Read URL") ); KMessageBox::sorry( topLevelWidget(), msg, i18n("Read URL") );
return( Err_IllegalArgument ); return( Err_IllegalArgument );
} }
@ -2049,21 +2049,21 @@ bool CHexEditorWidget::readFile( const TQString &diskPath, const TQString &url,
TQFileInfo info( diskPath ); TQFileInfo info( diskPath );
if( info.exists() == false ) if( info.exists() == false )
{ {
const TQString msg = i18n("The specified file does not exist.\n%1").tqarg( diskPath ); const TQString msg = i18n("The specified file does not exist.\n%1").arg( diskPath );
KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") ); KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") );
return( false ); return( false );
} }
if( info.isDir() == true ) if( info.isDir() == true )
{ {
const TQString msg = i18n("You have specified a folder.\n%1").tqarg( diskPath ); const TQString msg = i18n("You have specified a folder.\n%1").arg( diskPath );
KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") ); KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") );
return( false ); return( false );
} }
if( info.isReadable() == false ) if( info.isReadable() == false )
{ {
const TQString msg = i18n("You do not have read permission to this file.\n%1").tqarg( diskPath ); const TQString msg = i18n("You do not have read permission to this file.\n%1").arg( diskPath );
KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") ); KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") );
return( false ); return( false );
} }
@ -2071,7 +2071,7 @@ bool CHexEditorWidget::readFile( const TQString &diskPath, const TQString &url,
TQFile file( diskPath ); TQFile file( diskPath );
if( file.open( IO_ReadOnly | IO_Raw ) == false ) if( file.open( IO_ReadOnly | IO_Raw ) == false )
{ {
const TQString msg = i18n("An error occurred while trying to open the file.\n%1").tqarg( diskPath ); const TQString msg = i18n("An error occurred while trying to open the file.\n%1").arg( diskPath );
KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") ); KMessageBox::sorry( topLevelWidget(), msg, i18n("Read") );
return( false ); return( false );
} }

@ -126,7 +126,7 @@ void CHexManagerWidget::setConversionVisibility( EConversionPosition position )
else if( mConversionPosition == Float ) else if( mConversionPosition == Float )
{ {
TQPoint point = mapToGlobal( TQPoint(0,0) ); TQPoint point = mapToGlobal( TQPoint(0,0) );
TQRect rect = tqgeometry(); TQRect rect = geometry();
TQPoint p; TQPoint p;
p.setX(point.x() + rect.width()/2 - mConverter->minimumSize().width()/2); p.setX(point.x() + rect.width()/2 - mConverter->minimumSize().width()/2);

@ -258,7 +258,7 @@ void CHexToolWidget::cursorChanged( SCursorState &state )
// checking for system endianess, using the compiler for the byte interpretation and cutting bloaded code // checking for system endianess, using the compiler for the byte interpretation and cutting bloaded code
// TODO: add PDP endianess // TODO: add PDP endianess
void *P8Bit, *P16Bit, *P32Bit, *P64Bit; void *P8Bit, *P16Bit, *P32Bit, *P64Bit;
// ensure strict tqalignment for double as needed on some architectures (e.g. PA-RISC) // ensure strict alignment for double as needed on some architectures (e.g. PA-RISC)
typedef union { unsigned char b[8]; double d; } aligned_t; typedef union { unsigned char b[8]; double d; } aligned_t;
aligned_t Data; aligned_t Data;
if( if(

@ -233,7 +233,7 @@ CHexViewWidget::CHexViewWidget( TQWidget *parent, const char *name,
setStartY(0); setStartY(0);
setAcceptDrops(true); setAcceptDrops(true);
setDropHighlight(false); // Init state + frame tqshape setDropHighlight(false); // Init state + frame shape
setBackgroundColor( mHexBuffer->backgroundColor() ); setBackgroundColor( mHexBuffer->backgroundColor() );
} }
@ -459,7 +459,7 @@ void CHexViewWidget::filter( SFilterControl &fc )
int errCode = mHexBuffer->filter( fc ); int errCode = mHexBuffer->filter( fc );
if( errCode == Err_Success ) if( errCode == Err_Success )
{ {
tqrepaint(); repaint();
emit dataChanged(); emit dataChanged();
emit cursorChanged( mHexBuffer->cursorState() ); emit cursorChanged( mHexBuffer->cursorState() );
} }
@ -752,7 +752,7 @@ void CHexViewWidget::setColor( const SDisplayColor &color,
mHexBuffer->setColor( mColor ); mHexBuffer->setColor( mColor );
if( updateDisplay == true ) if( updateDisplay == true )
{ {
tqrepaint(); repaint();
} }
} }
@ -796,7 +796,7 @@ int CHexViewWidget::setEncoding( CConversion::EMode mode, CProgress &p )
int errCode = mHexBuffer->setEncoding( mode, p ); int errCode = mHexBuffer->setEncoding( mode, p );
if( errCode == Err_Success ) if( errCode == Err_Success )
{ {
tqrepaint(); repaint();
emit cursorChanged( mHexBuffer->cursorState() ); emit cursorChanged( mHexBuffer->cursorState() );
emit encodingChanged( mHexBuffer->encoding() ); emit encodingChanged( mHexBuffer->encoding() );
} }
@ -1099,7 +1099,7 @@ int CHexViewWidget::bookmarkMenu( const TQString &title )
if( p == 0 ) { continue; } if( p == 0 ) { continue; }
text.sprintf("%04X:%04X", p->offset>>16, p->offset&0x0000FFFF ); text.sprintf("%04X:%04X", p->offset>>16, p->offset&0x0000FFFF );
text.prepend( TQString("[%1] %2: ").tqarg(i+1).tqarg(i18n("Offset")) ); text.prepend( TQString("[%1] %2: ").arg(i+1).arg(i18n("Offset")) );
popup->insertItem( text, i ); popup->insertItem( text, i );
} }
@ -1379,7 +1379,7 @@ void CHexViewWidget::drawFrame( TQPainter *p )
// accepts a drop. The setPalette() function causes quite a bit of flicker // accepts a drop. The setPalette() function causes quite a bit of flicker
// in the scrollbars (even when PropagationMode is NoChildren), so I // in the scrollbars (even when PropagationMode is NoChildren), so I
// draw the frame manually when it can accept a drop. Note that the // draw the frame manually when it can accept a drop. Note that the
// code below is for the frame tqshape "TQFrame::WinPanel|TQFrame::Plain" // code below is for the frame shape "TQFrame::WinPanel|TQFrame::Plain"
// //
if( mDropHighlight == true ) if( mDropHighlight == true )
{ {
@ -1860,7 +1860,7 @@ void CHexViewWidget::setCursorPosition(int x, int y, bool init, bool cellLevel)
void CHexViewWidget::redrawInterval( uint startOffset, uint stopOffset ) void CHexViewWidget::redrawInterval( uint startOffset, uint stopOffset )
{ {
// //
// Can be improved, I tqrepaint the entire line even if the offsets // Can be improved, I repaint the entire line even if the offsets
// only specify one byte. // only specify one byte.
// //
uint lineStart = mHexBuffer->calculateLine( startOffset ); uint lineStart = mHexBuffer->calculateLine( startOffset );
@ -2270,7 +2270,7 @@ void CHexViewWidget::setDropHighlight( bool dropHighlight )
// //
// 2000-01-10 Espen Sand // 2000-01-10 Espen Sand
// Highlight. I have reimplemented TQFrame::drawFrame(TQPainter *) // Highlight. I have reimplemented TQFrame::drawFrame(TQPainter *)
// to support a custom frame color. I assume the frame tqshape is // to support a custom frame color. I assume the frame shape is
// "TQFrame::WinPanel|TQFrame::Plain" in that function. // "TQFrame::WinPanel|TQFrame::Plain" in that function.
// //
setFrameStyle( TQFrame::WinPanel|TQFrame::Plain ); setFrameStyle( TQFrame::WinPanel|TQFrame::Plain );

@ -24,7 +24,7 @@ using namespace KHE;
void KBinaryByteCodec::encode( TQString &Digits, unsigned int Pos, const unsigned char Char ) const void KBinaryByteCodec::encode( TQString &Digits, unsigned int Pos, const unsigned char Char ) const
{ {
for( unsigned char M=1<<7; M>0; M>>=1 ) for( unsigned char M=1<<7; M>0; M>>=1 )
Digits.tqat(Pos++) = (Char & M) ? '1' : '0'; Digits.at(Pos++) = (Char & M) ? '1' : '0';
} }
void KBinaryByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned char Char ) const void KBinaryByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned char Char ) const
@ -36,7 +36,7 @@ void KBinaryByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned
break; break;
// now set the // now set the
for( ; M>0; M>>=1 ) for( ; M>0; M>>=1 )
Digits.tqat(Pos++) = (Char & M) ? '1' : '0'; Digits.at(Pos++) = (Char & M) ? '1' : '0';
} }

@ -40,7 +40,7 @@ KByteCodec *KByteCodec::createCodec( KCoding C )
unsigned int KByteCodec::decode( unsigned char *Char, const TQString &Digits, uint Pos ) const unsigned int KByteCodec::decode( unsigned char *Char, const TQString &Digits, uint Pos ) const
{ {
//kdDebug() << TQString("KByteCodec::decode(%1,%2)").tqarg(Digits).tqarg(Pos) << endl; //kdDebug() << TQString("KByteCodec::decode(%1,%2)").arg(Digits).arg(Pos) << endl;
const uint P = Pos; const uint P = Pos;
// remove leading 0s // remove leading 0s
@ -50,7 +50,7 @@ unsigned int KByteCodec::decode( unsigned char *Char, const TQString &Digits, ui
unsigned int d = encodingWidth(); unsigned int d = encodingWidth();
do do
{ {
if( !appendDigit(&C,Digits.tqat(Pos)) ) if( !appendDigit(&C,Digits.at(Pos)) )
break; break;
++Pos; ++Pos;

@ -24,12 +24,12 @@ using namespace KHE;
void KDecimalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const void KDecimalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const
{ {
unsigned char C = Char / 100; unsigned char C = Char / 100;
Digits.tqat(Pos++) = '0'+C; Digits.at(Pos++) = '0'+C;
Char -= C * 100; Char -= C * 100;
C = Char / 10; C = Char / 10;
Digits.tqat(Pos++) = '0'+C; Digits.at(Pos++) = '0'+C;
Char -= C * 10; Char -= C * 10;
Digits.tqat(Pos) = '0'+Char; Digits.at(Pos) = '0'+Char;
} }
@ -38,15 +38,15 @@ void KDecimalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigne
unsigned char C; unsigned char C;
if( (C = Char / 100) ) if( (C = Char / 100) )
{ {
Digits.tqat(Pos++) = '0'+C; Digits.at(Pos++) = '0'+C;
Char -= C * 100; Char -= C * 100;
} }
if( (C = Char / 10) ) if( (C = Char / 10) )
{ {
Digits.tqat(Pos++) = '0'+C; Digits.at(Pos++) = '0'+C;
Char -= C * 10; Char -= C * 10;
} }
Digits.tqat(Pos) = '0'+Char; Digits.at(Pos) = '0'+Char;
} }

@ -41,16 +41,16 @@ bool KHexadecimalByteCodec::smallDigits() const { return Digit != BigDigit; }
void KHexadecimalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const void KHexadecimalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const
{ {
Digits.tqat(Pos++) = Digit[Char>>4]; Digits.at(Pos++) = Digit[Char>>4];
Digits.tqat(Pos) = Digit[Char&0x0F]; Digits.at(Pos) = Digit[Char&0x0F];
} }
void KHexadecimalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned char Char ) const void KHexadecimalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned char Char ) const
{ {
unsigned char C; unsigned char C;
if( (C = (Char>>4)) ) if( (C = (Char>>4)) )
Digits.tqat(Pos++) = Digit[C]; Digits.at(Pos++) = Digit[C];
Digits.tqat(Pos) = Digit[Char&0x0F]; Digits.at(Pos) = Digit[Char&0x0F];
} }

@ -23,9 +23,9 @@ using namespace KHE;
void KOctalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const void KOctalByteCodec::encode( TQString &Digits, unsigned int Pos, unsigned char Char ) const
{ {
Digits.tqat(Pos++) = '0'+(Char>>6); Digits.at(Pos++) = '0'+(Char>>6);
Digits.tqat(Pos++) = '0'+((Char>>3)&0x07); Digits.at(Pos++) = '0'+((Char>>3)&0x07);
Digits.tqat(Pos) = '0'+((Char) &0x07); Digits.at(Pos) = '0'+((Char) &0x07);
} }
@ -33,10 +33,10 @@ void KOctalByteCodec::encodeShort( TQString &Digits, unsigned int Pos, unsigned
{ {
unsigned char C; unsigned char C;
if( (C = (Char>>6)&0x07) ) if( (C = (Char>>6)&0x07) )
Digits.tqat(Pos++) = '0'+C; Digits.at(Pos++) = '0'+C;
if( (C = (Char>>3)&0x07) ) if( (C = (Char>>3)&0x07) )
Digits.tqat(Pos++) = '0'+C; Digits.at(Pos++) = '0'+C;
Digits.tqat(Pos) = '0'+((Char)&0x07); Digits.at(Pos) = '0'+((Char)&0x07);
} }

@ -166,7 +166,7 @@ TQByteArray KBufferDrag::encodedData( const char *Format ) const
{ {
KHEChar B = CharCodec->decode( Data[i] ); KHEChar B = CharCodec->decode( Data[i] );
Text.tqat(i) = B.isUndefined() ? KHEChar(UndefinedChar) : Text.at(i) = B.isUndefined() ? KHEChar(UndefinedChar) :
(!B.isPrint() && B != Tab && B != Return ) ? KHEChar(SubstituteChar) : B; (!B.isPrint() && B != Tab && B != Return ) ? KHEChar(SubstituteChar) : B;
} }
// clean up // clean up

@ -28,7 +28,7 @@ namespace KHE
{ {
/** a class to control all the ranges like marking and selections /** a class to control all the ranges like marking and selections
* holds also all modified ranges and merges them so a tqrepaint can take its info from here * holds also all modified ranges and merges them so a repaint can take its info from here
* *
* @author Friedrich W. H. Kossebau * @author Friedrich W. H. Kossebau
*/ */

@ -39,7 +39,7 @@ class KBytesEditPrivate;
* possible changes are told to the widget by repaintRange * possible changes are told to the widget by repaintRange
* b) changing data ranges -> data pointer and length might change * b) changing data ranges -> data pointer and length might change
* changes told by * changes told by
* * resetData( char *, int size, bool tqrepaint ); * * resetData( char *, int size, bool repaint );
* * * *
* 2. used as editor * 2. used as editor
* a) static data ranges * a) static data ranges
@ -137,7 +137,7 @@ class KHEXEDIT_EXPORT KBytesEdit : public KHexEdit
*/ */
void setKeepsMemory( bool KM = true ); void setKeepsMemory( bool KM = true );
/** tqrepaint the indizes from i1 to i2 */ /** repaint the indizes from i1 to i2 */
void repaintRange( int i1, int i2 ); void repaintRange( int i1, int i2 );
protected: protected:

@ -167,7 +167,7 @@ void KColumnsView::drawContents( TQPainter *P, int cx, int cy, int cw, int ch )
if( AffectedLines.isValid() ) if( AffectedLines.isValid() )
{ {
TQPainter Paint; TQPainter Paint;
Paint.tqbegin( const_cast<TQPixmap*>(&LineBuffer), this ); Paint.begin( const_cast<TQPixmap*>(&LineBuffer), this );
// starting painting with the first line // starting painting with the first line
KColumn *C = RedrawColumns.first(); KColumn *C = RedrawColumns.first();
@ -198,7 +198,7 @@ void KColumnsView::drawContents( TQPainter *P, int cx, int cy, int cw, int ch )
break; break;
// to avoid flickers we first paint to the linebuffer // to avoid flickers we first paint to the linebuffer
Paint.tqbegin( TQT_TQPAINTDEVICE(&LineBuffer), this ); Paint.begin( TQT_TQPAINTDEVICE(&LineBuffer), this );
KColumn *C = RedrawColumns.first(); KColumn *C = RedrawColumns.first();
Paint.translate( C->x(), 0 ); Paint.translate( C->x(), 0 );

@ -38,7 +38,7 @@ class KCursor
public: public:
/** sets size of the full cursor */ /** sets size of the full cursor */
void setSize( KPixelX Width, KPixelY Height ); void setSize( KPixelX Width, KPixelY Height );
/** sets the tqshape of the cursor to be drawn */ /** sets the shape of the cursor to be drawn */
void setShape( KPixelX X, KPixelX W ); void setShape( KPixelX X, KPixelX W );
public: // access public: // access

@ -214,7 +214,7 @@ int KFixedSizeBuffer::fill( const char FChar, int FillLength, unsigned int Pos )
int KFixedSizeBuffer::compare( const KDataBuffer &Other, KSection OtherRange, unsigned int Pos ) int KFixedSizeBuffer::compare( const KDataBuffer &Other, KSection OtherRange, unsigned int Pos )
{ {
//kdDebug() << TQString("Pos: %1, OtherRange: (%3/%4)" ).tqarg(Pos).tqarg(OtherRange.start()).tqarg(OtherRange.end()) //kdDebug() << TQString("Pos: %1, OtherRange: (%3/%4)" ).arg(Pos).arg(OtherRange.start()).arg(OtherRange.end())
// << endl; // << endl;
// test other values // test other values
if( OtherRange.startsBehind(Other.size()-1) ) if( OtherRange.startsBehind(Other.size()-1) )
@ -245,14 +245,14 @@ int KFixedSizeBuffer::compare( const KDataBuffer &Other, KSection OtherRange, un
ValueByLength = -1; ValueByLength = -1;
} }
//kdDebug() //kdDebug()
// << TQString( "Range: (%1/%2), OtherRange: (%3/%4)" ).tqarg(Range.start()).tqarg(Range.end()).tqarg(OtherRange.start()).tqarg(OtherRange.end()) // << TQString( "Range: (%1/%2), OtherRange: (%3/%4)" ).arg(Range.start()).arg(Range.end()).arg(OtherRange.start()).arg(OtherRange.end())
// << endl; // << endl;
int oi = OtherRange.start(); int oi = OtherRange.start();
for( int i=Range.start(); i<=Range.end(); ++i,++oi ) for( int i=Range.start(); i<=Range.end(); ++i,++oi )
{ {
char OD = Other.datum(oi); char OD = Other.datum(oi);
char D = Data[i]; char D = Data[i];
//kdDebug() << TQString("%1==%2").tqarg((int)D).tqarg((int)OD) << endl; //kdDebug() << TQString("%1==%2").arg((int)D).arg((int)OD) << endl;
if( OD == D ) if( OD == D )
continue; continue;
return OD < D ? 1 : -1; return OD < D ? 1 : -1;

@ -199,7 +199,7 @@ void KHexEdit::setOverwriteMode( bool OM )
OverWrite = OM; OverWrite = OM;
// affected: // affected:
// cursor tqshape // cursor shape
bool ChangeCursor = !( CursorPaused || ValueEditor->isInEditMode() ); bool ChangeCursor = !( CursorPaused || ValueEditor->isInEditMode() );
if( ChangeCursor ) if( ChangeCursor )
pauseCursor(); pauseCursor();
@ -1275,15 +1275,15 @@ void KHexEdit::createCursorPixmaps()
int Index = BufferCursor->validIndex(); int Index = BufferCursor->validIndex();
TQPainter Paint; TQPainter Paint;
Paint.tqbegin( const_cast<TQPixmap*>(&CursorPixmaps->offPixmap()), this ); Paint.begin( const_cast<TQPixmap*>(&CursorPixmaps->offPixmap()), this );
activeColumn().paintByte( &Paint, Index ); activeColumn().paintByte( &Paint, Index );
Paint.end(); Paint.end();
Paint.tqbegin( const_cast<TQPixmap*>(&CursorPixmaps->onPixmap()), this ); Paint.begin( const_cast<TQPixmap*>(&CursorPixmaps->onPixmap()), this );
activeColumn().paintCursor( &Paint, Index ); activeColumn().paintCursor( &Paint, Index );
Paint.end(); Paint.end();
// calculat the tqshape // calculat the shape
KPixelX CursorX; KPixelX CursorX;
KPixelX CursorW; KPixelX CursorW;
if( BufferCursor->isBehind() ) if( BufferCursor->isBehind() )
@ -1498,7 +1498,7 @@ void KHexEdit::paintLine( KBufferColumn *C, int Line, KSection Positions )
// to avoid flickers we first paint to the linebuffer // to avoid flickers we first paint to the linebuffer
TQPainter Paint; TQPainter Paint;
Paint.tqbegin( &LineBuffer, this ); Paint.begin( &LineBuffer, this );
Paint.translate( C->x(), 0 ); Paint.translate( C->x(), 0 );
C->paintPositions( &Paint, Line, Positions ); C->paintPositions( &Paint, Line, Positions );

@ -72,7 +72,7 @@ int KPlainBuffer::insert( int Pos, const char* D, int Length )
// check all parameters // check all parameters
if( Length == 0 ) if( Length == 0 )
return 0; return 0;
//kdDebug() << TQString("before: Size: %1, RawSize: %2").tqarg(Size).tqarg(RawSize) << endl; //kdDebug() << TQString("before: Size: %1, RawSize: %2").arg(Size).arg(RawSize) << endl;
// correct for appending // correct for appending
if( Pos > (int)Size ) if( Pos > (int)Size )
Pos = Size; Pos = Size;
@ -82,7 +82,7 @@ int KPlainBuffer::insert( int Pos, const char* D, int Length )
// copy new data to its place // copy new data to its place
memcpy( &Data[Pos], D, Length ); memcpy( &Data[Pos], D, Length );
//kdDebug() << TQString("after: Size: %1, RawSize: %2").tqarg(Size).tqarg(RawSize) << endl; //kdDebug() << TQString("after: Size: %1, RawSize: %2").arg(Size).arg(RawSize) << endl;
Modified = true; Modified = true;
return Length; return Length;

@ -46,9 +46,9 @@
#include <tqobjectlist.h> #include <tqobjectlist.h>
static void enableWidget( TQWidget *w, bool state ) static void enableWidget( TQWidget *w, bool state )
{ {
if( w->tqchildren() ) if( w->children() )
{ {
TQObjectList *l = (TQObjectList*)w->tqchildren(); // silence please TQObjectList *l = (TQObjectList*)w->children(); // silence please
for( uint i=0; i < l->count(); i++ ) for( uint i=0; i < l->count(); i++ )
{ {
TQObject *o = l->at(i); TQObject *o = l->at(i);
@ -351,7 +351,7 @@ void COptionDialog::setupColorPage( void )
modeList.append( i18n("Marked Background") ); modeList.append( i18n("Marked Background") );
modeList.append( i18n("Marked Text") ); modeList.append( i18n("Marked Text") );
modeList.append( i18n("Cursor Background") ); modeList.append( i18n("Cursor Background") );
modeList.append( i18n("Cursor Text (block tqshape)") ); modeList.append( i18n("Cursor Text (block shape)") );
modeList.append( i18n("Bookmark Background") ); modeList.append( i18n("Bookmark Background") );
modeList.append( i18n("Bookmark Text") ); modeList.append( i18n("Bookmark Text") );
modeList.append( i18n("Separator") ); modeList.append( i18n("Separator") );

@ -86,7 +86,7 @@ class KBytesEditWidget : public TQWidget, public KHE::BytesEditInterface,
virtual bool isOverwriteOnly() const; virtual bool isOverwriteOnly() const;
virtual bool isReadOnly() const; virtual bool isReadOnly() const;
virtual bool isModified() const; virtual bool isModified() const;
/** tqrepaint the indizes from i1 to i2 */ /** repaint the indizes from i1 to i2 */
virtual void repaintRange( int i1, int i2 ); virtual void repaintRange( int i1, int i2 );
public: // cursor interface public: // cursor interface

@ -212,13 +212,13 @@ int CStatusBarProgress::recalcValue(int range)
void CStatusBarProgress::valueChange() void CStatusBarProgress::valueChange()
{ {
tqrepaint(contentsRect(), FALSE); repaint(contentsRect(), FALSE);
emit percentageChanged(recalcValue(100)); emit percentageChanged(recalcValue(100));
} }
void CStatusBarProgress::rangeChange() void CStatusBarProgress::rangeChange()
{ {
tqrepaint(contentsRect(), FALSE); repaint(contentsRect(), FALSE);
emit percentageChanged(recalcValue(100)); emit percentageChanged(recalcValue(100));
} }
@ -259,17 +259,17 @@ void CStatusBarProgress::drawText( TQPainter *p )
if( mMsg.isEmpty() == true ) if( mMsg.isEmpty() == true )
{ {
s = TQString("%1%").tqarg(recalcValue(100)); s = TQString("%1%").arg(recalcValue(100));
} }
else else
{ {
if( mCurPage > 0 ) if( mCurPage > 0 )
{ {
s = i18n("%1... %2 of %3").tqarg(mMsg).tqarg(mCurPage).tqarg(mMaxPage); s = i18n("%1... %2 of %3").arg(mMsg).arg(mCurPage).arg(mMaxPage);
} }
else else
{ {
s = i18n("%1... %2%").tqarg(mMsg).tqarg(recalcValue(100)); s = i18n("%1... %2%").arg(mMsg).arg(recalcValue(100));
} }
} }

@ -372,8 +372,8 @@ void CStringDialog::appendListItem( const TQString &str, uint offsetLen )
void CStringDialog::updateListInfo( void ) void CStringDialog::updateListInfo( void )
{ {
mListSizeLabel->setText( TQString("%1").tqarg(mStringData.count()) ); mListSizeLabel->setText( TQString("%1").arg(mStringData.count()) );
mDisplaySizeLabel->setText( TQString("%1").tqarg(mStringList->childCount()) ); mDisplaySizeLabel->setText( TQString("%1").arg(mStringList->childCount()) );
setColumnWidth(); setColumnWidth();
} }

@ -391,7 +391,7 @@ void KHexEdit::initialize( bool openFiles )
maxItems = 1; maxItems = 1;
for( unsigned int i = 1 ; i <= maxItems ; i++ ) for( unsigned int i = 1 ; i <= maxItems ; i++ )
{ {
const TQString key = TQString( "File%1" ).tqarg( i ); const TQString key = TQString( "File%1" ).arg( i );
const TQString value = config->readPathEntry( key ); const TQString value = config->readPathEntry( key );
if (!value.isEmpty()) if (!value.isEmpty())
@ -533,7 +533,7 @@ void KHexEdit::slotFileOpenRecent( const KURL& url )
else else
{ {
// ### TODO: support network transparency // ### TODO: support network transparency
KMessageBox::error( this, i18n("Non local recent file: %1").tqarg( url.prettyURL() ) ); KMessageBox::error( this, i18n("Non local recent file: %1").arg( url.prettyURL() ) );
} }
} }
@ -788,7 +788,7 @@ void KHexEdit::fileState( SFileState &state )
{ {
if( state.valid == true ) if( state.valid == true )
{ {
statusBar()->changeItem( i18n("Size: %1").tqarg( state.size ), status_Size); statusBar()->changeItem( i18n("Size: %1").arg( state.size ), status_Size);
statusBar()->changeItem( state.modified ? "!" : "", status_Modified); statusBar()->changeItem( state.modified ? "!" : "", status_Modified);
if( mIsModified != state.modified ) if( mIsModified != state.modified )
@ -922,7 +922,7 @@ void KHexEdit::bookmarkChanged( TQPtrList<SCursorOffset> &list )
for( SCursorOffset *p=list.first(); p!=0; p=list.next(), i++ ) for( SCursorOffset *p=list.first(); p!=0; p=list.next(), i++ )
{ {
offset.sprintf("%04X:%04X", p->offset>>16, p->offset&0x0000FFFF ); offset.sprintf("%04X:%04X", p->offset>>16, p->offset&0x0000FFFF );
text = i18n("Offset: %1").tqarg(offset); text = i18n("Offset: %1").arg(offset);
KAction *action = new KAction(text, 0, mAction.bookmarkMapper, TQT_SLOT(map()), TQT_TQOBJECT(this), text.latin1()); KAction *action = new KAction(text, 0, mAction.bookmarkMapper, TQT_SLOT(map()), TQT_TQOBJECT(this), text.latin1());
int key = acceleratorNumKey( i ); int key = acceleratorNumKey( i );
if( key > 0 ) if( key > 0 )
@ -1021,7 +1021,7 @@ void KHexEdit::encodingChanged( const SEncodeState &encodeState )
if( mSelectionSize == 0 ) if( mSelectionSize == 0 )
{ {
statusBar()->changeItem( i18n("Encoding: %1").tqarg(encodeState.name), statusBar()->changeItem( i18n("Encoding: %1").arg(encodeState.name),
status_Selection ); status_Selection );
} }
} }
@ -1186,7 +1186,7 @@ void KHexEdit::setSelectionText( uint selectionOffset, uint selectionSize )
else else
{ {
statusBar()->changeItem( statusBar()->changeItem(
i18n("Encoding: %1").tqarg(hexView()->encoding().name), status_Selection); i18n("Encoding: %1").arg(hexView()->encoding().name), status_Selection);
} }
} }

@ -249,7 +249,7 @@ protected:
inline void KHexEdit::addStartupFile( const TQString &fileName ) inline void KHexEdit::addStartupFile( const TQString &fileName )
{ {
mStartupFileList.prepend( fileName ); mStartupFileList.prepend( fileName );
mStartupOffsetList.prepend( TQString("%1").tqarg(mStartupOffset,0,16) ); mStartupOffsetList.prepend( TQString("%1").arg(mStartupOffset,0,16) );
mStartupOffset = 0; mStartupOffset = 0;
} }

@ -316,7 +316,7 @@ void KJotsMain::deleteBook()
return; return;
TQString msg = i18n("<qt>Are you sure you want to delete the <strong>%1</strong> book?</qt>"); TQString msg = i18n("<qt>Are you sure you want to delete the <strong>%1</strong> book?</qt>");
int result = KMessageBox::warningContinueCancel(topLevelWidget(), msg.tqarg(b->subject()), i18n("Delete Book"),KStdGuiItem::del()); int result = KMessageBox::warningContinueCancel(topLevelWidget(), msg.arg(b->subject()), i18n("Delete Book"),KStdGuiItem::del());
if (result!=KMessageBox::Continue) if (result!=KMessageBox::Continue)
return; return;
@ -360,7 +360,7 @@ void KJotsMain::deleteEntry()
if (!cur || if (!cur ||
KMessageBox::warningContinueCancel(topLevelWidget(), KMessageBox::warningContinueCancel(topLevelWidget(),
i18n("<qt>Are you sure you want to delete the <strong>%1</strong> page?</qt>") i18n("<qt>Are you sure you want to delete the <strong>%1</strong> page?</qt>")
.tqarg(cur->subject()), .arg(cur->subject()),
i18n("Delete Page"),KStdGuiItem::del()) != KMessageBox::Continue) i18n("Delete Page"),KStdGuiItem::del()) != KMessageBox::Continue)
{ {
return; return;
@ -493,7 +493,7 @@ void KJotsMain::saveBookToFile(bool plainText)
} }
if (!KIO::NetAccess::exists(res.URLs[0], true, this) || if (!KIO::NetAccess::exists(res.URLs[0], true, this) ||
KMessageBox::warningYesNo(this, "<qt>" + i18n("The file <strong>%1</strong> already exists. Do you wish to overwrite it?").tqarg(res.URLs[0].prettyURL()) + "</qt>", i18n("File Exists"), i18n("Overwrite"), KStdGuiItem::cancel()) == KMessageBox::Yes) KMessageBox::warningYesNo(this, "<qt>" + i18n("The file <strong>%1</strong> already exists. Do you wish to overwrite it?").arg(res.URLs[0].prettyURL()) + "</qt>", i18n("File Exists"), i18n("Overwrite"), KStdGuiItem::cancel()) == KMessageBox::Yes)
{ {
tryAgain = false; tryAgain = false;
} }
@ -534,7 +534,7 @@ void KJotsMain::savePageToFile(bool plainText)
} }
if (!KIO::NetAccess::exists(res.URLs[0], true, this) || if (!KIO::NetAccess::exists(res.URLs[0], true, this) ||
KMessageBox::warningYesNo(this, "<qt>" + i18n("The file <strong>%1</strong> already exists. Do you wish to overwrite it?").tqarg(res.URLs[0].prettyURL()) + "</qt>", i18n("File Exists"), i18n("Overwrite"), KStdGuiItem::cancel()) == KMessageBox::Yes) KMessageBox::warningYesNo(this, "<qt>" + i18n("The file <strong>%1</strong> already exists. Do you wish to overwrite it?").arg(res.URLs[0].prettyURL()) + "</qt>", i18n("File Exists"), i18n("Overwrite"), KStdGuiItem::cancel()) == KMessageBox::Yes)
{ {
tryAgain = false; tryAgain = false;
} }

@ -135,7 +135,7 @@ void KJotsEdit::setEntry (KJotsPage *entry)
m_entry = entry; m_entry = entry;
setText(entry->body()); setText(entry->body());
removeSelection(); removeSelection();
tqrepaint(); repaint();
setEnabled(true); setEnabled(true);
setFocus(); setFocus();
entry->setEditor(this); entry->setEditor(this);

@ -532,9 +532,9 @@ void KJotsBook::saveToFile(KURL url, bool plainText, const TQString& encoding)
//revisions will likely use it. I don't want to make the translators add, remove, //revisions will likely use it. I don't want to make the translators add, remove,
//and re-add translations, so I'm just keeping this here for now. //and re-add translations, so I'm just keeping this here for now.
m_saveProgressDialog = new KProgressDialog(listView(), "bookSaveInProgress", m_saveProgressDialog = new KProgressDialog(listView(), "bookSaveInProgress",
i18n("Saving %1").tqarg(subject()), i18n("Saving %1").arg(subject()),
i18n("Saving the contents of %1 to %2") i18n("Saving the contents of %1 to %2")
.tqarg(subject(), url.prettyURL()), .arg(subject(), url.prettyURL()),
true); true);
m_saveProgressDialog->progressBar()->setTotalSteps(1); m_saveProgressDialog->progressBar()->setTotalSteps(1);
@ -613,7 +613,7 @@ void KJotsBook::print(TQFont& defaultFont)
printer.setFullPage(false); printer.setFullPage(false);
printer.setCreator("KJots"); printer.setCreator("KJots");
if (!printer.setup(listView(), i18n("Print: %1").tqarg(subject()))) if (!printer.setup(listView(), i18n("Print: %1").arg(subject())))
{ {
return; return;
} }
@ -657,7 +657,7 @@ bool KJotsBook::isDirty()
//Am I dirty? //Am I dirty?
if ( KJotsEntryBase::isDirty() ) return true; if ( KJotsEntryBase::isDirty() ) return true;
//Check all tqchildren to see if any of them are dirty //Check all children to see if any of them are dirty
KJotsEntryBase *entry = dynamic_cast<KJotsEntryBase*>(firstChild()); KJotsEntryBase *entry = dynamic_cast<KJotsEntryBase*>(firstChild());
while ( entry ) while ( entry )
{ {
@ -763,7 +763,7 @@ TQString KJotsBook::getToc()
KJotsEntryBase *entry = dynamic_cast<KJotsEntryBase*>(firstChild()); KJotsEntryBase *entry = dynamic_cast<KJotsEntryBase*>(firstChild());
while ( entry ) { while ( entry ) {
TQString htmlSubject = prepForHTML(entry->subject()); TQString htmlSubject = prepForHTML(entry->subject());
toc += TQString("<li><a href=\"#%1\">").tqarg(entry->id()) + htmlSubject + "</a></li>"; toc += TQString("<li><a href=\"#%1\">").arg(entry->id()) + htmlSubject + "</a></li>";
KJotsBook *book = dynamic_cast<KJotsBook*>(entry); KJotsBook *book = dynamic_cast<KJotsBook*>(entry);
if ( book ) toc += book->getToc(); if ( book ) toc += book->getToc();
@ -787,13 +787,13 @@ TQString KJotsBook::generateHtml( KJotsEntryBase* top, bool diskMode )
if ( top == this ) if ( top == this )
{ {
toc = TQString("<h1><a name=\"%1\">%2</a></h1>").tqarg(id()).tqarg(htmlTitle); toc = TQString("<h1><a name=\"%1\">%2</a></h1>").arg(id()).arg(htmlTitle);
} else { } else {
if ( diskMode ) if ( diskMode )
{ {
toc = TQString("<h2><a name=\"%1\">%2</a></h2>").tqarg(id()).tqarg(htmlTitle); toc = TQString("<h2><a name=\"%1\">%2</a></h2>").arg(id()).arg(htmlTitle);
} else { } else {
toc = TQString("<h2><a name=\"%1\" href=\"%2\">%3</a></h2>").tqarg(id()).tqarg(id()).tqarg(htmlTitle); toc = TQString("<h2><a name=\"%1\" href=\"%2\">%3</a></h2>").arg(id()).arg(id()).arg(htmlTitle);
} }
} }
@ -995,7 +995,7 @@ void KJotsPage::print(TQFont& defaultFont)
printer.setFullPage(false); printer.setFullPage(false);
printer.setCreator("KJots"); printer.setCreator("KJots");
if (printer.setup(listView(), i18n("Print: %1").tqarg(docName))) if (printer.setup(listView(), i18n("Print: %1").arg(docName)))
{ {
TQPainter painter( &printer ); TQPainter painter( &printer );
painter.setFont(defaultFont); painter.setFont(defaultFont);
@ -1066,7 +1066,7 @@ TQString KJotsPage::defaultSubject()
page = 1; page = 1;
} }
return i18n("Page %1").tqarg(page); return i18n("Page %1").arg(page);
} }
/*! /*!
@ -1181,21 +1181,21 @@ TQString KJotsPage::generateHtml( KJotsEntryBase *top, bool diskMode )
TQString htmlSubject = prepForHTML(subject()); TQString htmlSubject = prepForHTML(subject());
if ( top == this || diskMode ) { if ( top == this || diskMode ) {
html += TQString("<h3><a name=\"%1\">%2</a></h3>").tqarg(id()).tqarg(htmlSubject); html += TQString("<h3><a name=\"%1\">%2</a></h3>").arg(id()).arg(htmlSubject);
} else { } else {
html += TQString("<h3><a name=\"%1\" href=\"%2\">%3</a></h3>").tqarg(id()).tqarg(id()).tqarg(htmlSubject); html += TQString("<h3><a name=\"%1\" href=\"%2\">%3</a></h3>").arg(id()).arg(id()).arg(htmlSubject);
} }
html += prepForHTML(body()); html += prepForHTML(body());
html += "<br><table border=1><tr>"; html += "<br><table border=1><tr>";
html += TQString("<td><a href=\"#%1\">%2</a></td>").tqarg(id()).tqarg(subject()); html += TQString("<td><a href=\"#%1\">%2</a></td>").arg(id()).arg(subject());
if ( top != this ) if ( top != this )
{ {
KJotsBook *parent = parentBook(); KJotsBook *parent = parentBook();
while ( parent ) while ( parent )
{ {
html += TQString("<td><a href=\"#%1\">%2</a></td>").tqarg(parent->id()).tqarg(parent->subject()); html += TQString("<td><a href=\"#%1\">%2</a></td>").arg(parent->id()).arg(parent->subject());
if ( parent == top ) break; if ( parent == top ) break;
parent = parent->parentBook(); parent = parent->parentBook();
} }

@ -145,7 +145,7 @@ AcpiConfig::AcpiConfig (TQWidget * parent, const char *name)
top_layout->addStretch(1); top_layout->addStretch(1);
top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, TQt::AlignRight );
load(); load();

@ -100,7 +100,7 @@ ApmConfig::ApmConfig (TQWidget * parent, const char *name)
"ways you can enable this application, either make the file " "ways you can enable this application, either make the file "
"/proc/apm writeable by anyone every time your system boots " "/proc/apm writeable by anyone every time your system boots "
"or use the button below to make the %1 application " "or use the button below to make the %1 application "
"set-uid root").tqarg(apm_name), this ); "set-uid root").arg(apm_name), this );
tmp_label->setAlignment( TQt::WordBreak ); tmp_label->setAlignment( TQt::WordBreak );
top_layout->addWidget( tmp_label ); top_layout->addWidget( tmp_label );
TQHBoxLayout *ll = new TQHBoxLayout(top_layout); TQHBoxLayout *ll = new TQHBoxLayout(top_layout);
@ -141,7 +141,7 @@ ApmConfig::ApmConfig (TQWidget * parent, const char *name)
top_layout->addStretch(1); top_layout->addStretch(1);
top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, TQt::AlignRight );
load(); load();
@ -158,7 +158,7 @@ void ApmConfig::setupHelper()
if (!tdesu.isEmpty()) { if (!tdesu.isEmpty()) {
int rc = KMessageBox::warningContinueCancel(0, int rc = KMessageBox::warningContinueCancel(0,
i18n("You will need to supply a root password " i18n("You will need to supply a root password "
"to allow the privileges of the %1 application to change.").tqarg(apm_name), "to allow the privileges of the %1 application to change.").arg(apm_name),
"KLaptopDaemon", KStdGuiItem::cont(), "KLaptopDaemon", KStdGuiItem::cont(),
""); "");
if (rc == KMessageBox::Continue) { if (rc == KMessageBox::Continue) {
@ -170,7 +170,7 @@ void ApmConfig::setupHelper()
proc.start(KProcess::Block); // run it sync so has_apm below sees the results proc.start(KProcess::Block); // run it sync so has_apm below sees the results
} }
} else { } else {
KMessageBox::sorry(0, i18n("%1 cannot be enabled because tdesu cannot be found. Please make sure that it is installed correctly.").tqarg(TQString(apm_name)), KMessageBox::sorry(0, i18n("%1 cannot be enabled because tdesu cannot be found. Please make sure that it is installed correctly.").arg(TQString(apm_name)),
i18n("KLaptopDaemon")); i18n("KLaptopDaemon"));
} }
laptop_portable::apm_set_mask(enablestandby, enablesuspend); laptop_portable::apm_set_mask(enablestandby, enablesuspend);

@ -278,7 +278,7 @@ ButtonsConfig::ButtonsConfig (TQWidget * parent, const char *name)
top_layout->addStretch(1); top_layout->addStretch(1);
top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this ), 0, TQt::AlignRight ); top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this ), 0, TQt::AlignRight );
} }
} }

@ -215,7 +215,7 @@ laptop_dock::invokeBrightness()
TQPoint pos = TQCursor::pos(); TQPoint pos = TQCursor::pos();
int x = pos.x(); int x = pos.x();
int y = pos.y(); int y = pos.y();
y -= brightness_widget->tqgeometry().height(); y -= brightness_widget->geometry().height();
int w = brightness_widget->width(); int w = brightness_widget->width();
int h = brightness_widget->height(); int h = brightness_widget->height();
if (x+w > sw) if (x+w > sw)
@ -375,10 +375,10 @@ void laptop_dock::mousePressEvent( TQMouseEvent *event )
TQString num3; TQString num3;
num3.setNum(pdaemon->left%60); num3.setNum(pdaemon->left%60);
num3 = num3.rightJustify(2, '0'); num3 = num3.rightJustify(2, '0');
tmp = i18n("%1:%2 hours left").tqarg(pdaemon->left/60).tqarg(num3); tmp = i18n("%1:%2 hours left").arg(pdaemon->left/60).arg(num3);
} else { } else {
// no remaining time available // no remaining time available
tmp = i18n("%1% charged").tqarg(pdaemon->val); tmp = i18n("%1% charged").arg(pdaemon->val);
} }
} else { } else {
tmp = i18n("No Battery"); tmp = i18n("No Battery");
@ -402,7 +402,7 @@ void laptop_dock::mousePressEvent( TQMouseEvent *event )
TQString speed = laptop_portable::cpu_frequency(); TQString speed = laptop_portable::cpu_frequency();
if (!speed.isEmpty()) { if (!speed.isEmpty()) {
popup->insertSeparator(); popup->insertSeparator();
popup->insertItem(i18n("CPU: %1").tqarg(speed)); popup->insertItem(i18n("CPU: %1").arg(speed));
} }
} }
@ -449,7 +449,7 @@ void laptop_dock::mousePressEvent( TQMouseEvent *event )
// add a few bits of information // add a few bits of information
thisSub->insertSeparator(); thisSub->insertSeparator();
thisSub->insertItem(slotname.tqarg(thiscard->num()+1)); thisSub->insertItem(slotname.arg(thiscard->num()+1));
if (thiscard->status() & CARD_STATUS_READY) if (thiscard->status() & CARD_STATUS_READY)
thisSub->insertItem(i18n("Ready")); thisSub->insertItem(i18n("Ready"));
if (thiscard->status() & CARD_STATUS_BUSY) if (thiscard->status() & CARD_STATUS_BUSY)
@ -641,10 +641,10 @@ quit:
num3.setNum(pdaemon->left%60); num3.setNum(pdaemon->left%60);
num3 = num3.rightJustify(2, '0'); num3 = num3.rightJustify(2, '0');
tmp = i18n("Plugged in - %1% charged (%2:%3 hours left)") tmp = i18n("Plugged in - %1% charged (%2:%3 hours left)")
.tqarg(pdaemon->val).tqarg(pdaemon->left/60).tqarg(num3); .arg(pdaemon->val).arg(pdaemon->left/60).arg(num3);
} else { } else {
// no remaining time available // no remaining time available
tmp = i18n("Plugged in - %1% charged").tqarg(pdaemon->val); tmp = i18n("Plugged in - %1% charged").arg(pdaemon->val);
} }
} else { } else {
tmp = i18n("Plugged in - no battery"); tmp = i18n("Plugged in - no battery");
@ -658,9 +658,9 @@ quit:
num3.setNum(pdaemon->left%60); num3.setNum(pdaemon->left%60);
num3 = num3.rightJustify(2, '0'); num3 = num3.rightJustify(2, '0');
tmp = i18n("Running on batteries - %1% charged (%2:%3 hours left)") tmp = i18n("Running on batteries - %1% charged (%2:%3 hours left)")
.tqarg(pdaemon->val).tqarg(pdaemon->left/60).tqarg(num3); .arg(pdaemon->val).arg(pdaemon->left/60).arg(num3);
} else { } else {
tmp = i18n("Running on batteries - %1% charged").tqarg(pdaemon->val); tmp = i18n("Running on batteries - %1% charged").arg(pdaemon->val);
} }
} else { } else {
// running without any power source... // running without any power source...

@ -175,7 +175,7 @@ tv.tv_sec = 0; tv.tv_usec = 0;
TQTextStream ts(&f); TQTextStream ts(&f);
bool foundit = false; bool foundit = false;
TQString _thisreg = "^Socket %1: "; TQString _thisreg = "^Socket %1: ";
TQRegExp thisreg ( _thisreg.tqarg(_num) ); TQRegExp thisreg ( _thisreg.arg(_num) );
if (flock(f.handle(), LOCK_SH)) return updated; if (flock(f.handle(), LOCK_SH)) return updated;
@ -500,7 +500,7 @@ TQFile df("/proc/devices");
TQString thisreg; TQString thisreg;
thisreg = "^[0-9]+ %1$"; thisreg = "^[0-9]+ %1$";
thisreg = thisreg.tqarg(x); thisreg = thisreg.arg(x);
if (df.open(IO_ReadOnly)) { if (df.open(IO_ReadOnly)) {
TQTextStream t(&df); TQTextStream t(&df);
@ -523,7 +523,7 @@ static int openDevice(dev_t dev) {
TQString tmp_path = locateLocal("tmp", KGlobal::instance()->instanceName()); TQString tmp_path = locateLocal("tmp", KGlobal::instance()->instanceName());
TQString ext = "_socket%1"; TQString ext = "_socket%1";
tmp_path += ext.tqarg((int)dev); tmp_path += ext.arg((int)dev);
int rc = mknod(tmp_path.latin1(), (S_IFCHR | S_IREAD), dev); int rc = mknod(tmp_path.latin1(), (S_IFCHR | S_IREAD), dev);
if (rc < 0) return -1; if (rc < 0) return -1;

@ -136,7 +136,7 @@ void KPCMCIAInfo::prepareCards() {
connect(this, TQT_SIGNAL(updateNow()), tp, TQT_SLOT(update())); connect(this, TQT_SIGNAL(updateNow()), tp, TQT_SLOT(update()));
connect(tp, TQT_SIGNAL(setStatusBar(const TQString&)), this, TQT_SLOT(slotTabSetStatus(const TQString&))); connect(tp, TQT_SIGNAL(setStatusBar(const TQString&)), this, TQT_SLOT(slotTabSetStatus(const TQString&)));
tp->resize(_mainTab->sizeHint()); tp->resize(_mainTab->sizeHint());
_mainTab->addTab(tp, tabname.tqarg(i+1)); _mainTab->addTab(tp, tabname.arg(i+1));
_pages.insert(i, tp); _pages.insert(i, tp);
} }
} }
@ -235,10 +235,10 @@ void KPCMCIAInfoPage::update() {
_card_name->setText(_card->name()); _card_name->setText(_card->name());
_card_name->resize(_card_name->sizeHint()); _card_name->resize(_card_name->sizeHint());
tmp = i18n("Card type: %1 "); tmp = i18n("Card type: %1 ");
_card_type->setText(tmp.tqarg(_card->type())); _card_type->setText(tmp.arg(_card->type()));
_card_type->resize(_card_type->sizeHint()); _card_type->resize(_card_type->sizeHint());
tmp = i18n("Driver: %1"); tmp = i18n("Driver: %1");
_card_driver->setText(tmp.tqarg(_card->driver())); _card_driver->setText(tmp.arg(_card->driver()));
_card_driver->resize(_card_driver->sizeHint()); _card_driver->resize(_card_driver->sizeHint());
tmp = i18n("IRQ: %1%2"); tmp = i18n("IRQ: %1%2");
TQString tmp2; TQString tmp2;
@ -256,32 +256,32 @@ void KPCMCIAInfoPage::update() {
tmp2 = ""; tmp2 = "";
}; };
if (_card->irq() <= 0) if (_card->irq() <= 0)
_card_irq->setText(tmp.tqarg(i18n("none")).tqarg("")); _card_irq->setText(tmp.arg(i18n("none")).arg(""));
else _card_irq->setText(tmp.tqarg(_card->irq()).tqarg(tmp2)); else _card_irq->setText(tmp.arg(_card->irq()).arg(tmp2));
_card_irq->resize(_card_irq->sizeHint()); _card_irq->resize(_card_irq->sizeHint());
tmp = i18n("I/O port(s): %1"); tmp = i18n("I/O port(s): %1");
if (_card->ports().isEmpty()) if (_card->ports().isEmpty())
_card_io->setText(tmp.tqarg(i18n("none"))); _card_io->setText(tmp.arg(i18n("none")));
else _card_io->setText(tmp.tqarg(_card->ports())); else _card_io->setText(tmp.arg(_card->ports()));
_card_io->resize(_card_io->sizeHint()); _card_io->resize(_card_io->sizeHint());
tmp = i18n("Bus: %1 bit %2"); tmp = i18n("Bus: %1 bit %2");
if (_card->busWidth() == 0) if (_card->busWidth() == 0)
_card_bus->setText(i18n("Bus: unknown")); _card_bus->setText(i18n("Bus: unknown"));
else _card_bus->setText(tmp.tqarg(_card->busWidth()).tqarg(_card->busWidth() == 16 ? i18n("PC Card") : i18n("Cardbus"))); else _card_bus->setText(tmp.arg(_card->busWidth()).arg(_card->busWidth() == 16 ? i18n("PC Card") : i18n("Cardbus")));
_card_bus->resize(_card_bus->sizeHint()); _card_bus->resize(_card_bus->sizeHint());
tmp = i18n("Device: %1"); tmp = i18n("Device: %1");
_card_dev->setText(tmp.tqarg(_card->device())); _card_dev->setText(tmp.arg(_card->device()));
_card_dev->resize(_card_dev->sizeHint()); _card_dev->resize(_card_dev->sizeHint());
tmp = i18n("Power: +%1V"); tmp = i18n("Power: +%1V");
_card_vcc->setText(tmp.tqarg(_card->vcc()/10)); _card_vcc->setText(tmp.arg(_card->vcc()/10));
_card_vcc->resize(_card_vcc->sizeHint()); _card_vcc->resize(_card_vcc->sizeHint());
tmp = i18n("Programming power: +%1V, +%2V"); tmp = i18n("Programming power: +%1V, +%2V");
_card_vpp->setText(tmp.tqarg(_card->vpp()/10).tqarg(_card->vpp2()/10)); _card_vpp->setText(tmp.arg(_card->vpp()/10).arg(_card->vpp2()/10));
_card_vpp->resize(_card_vpp->sizeHint()); _card_vpp->resize(_card_vpp->sizeHint());
tmp = i18n("Configuration base: 0x%1"); tmp = i18n("Configuration base: 0x%1");
if (_card->configBase() == 0) if (_card->configBase() == 0)
_card_cfgbase->setText(i18n("Configuration base: none")); _card_cfgbase->setText(i18n("Configuration base: none"));
else _card_cfgbase->setText(tmp.tqarg(_card->configBase(), -1, 16)); else _card_cfgbase->setText(tmp.arg(_card->configBase(), -1, 16));
_card_cfgbase->resize(_card_cfgbase->sizeHint()); _card_cfgbase->resize(_card_cfgbase->sizeHint());
if (!(_card->status() & (CARD_STATUS_READY|CARD_STATUS_SUSPEND))) { if (!(_card->status() & (CARD_STATUS_READY|CARD_STATUS_SUSPEND))) {

@ -537,13 +537,13 @@ void laptop_daemon::haveBatteryLow(int t, const int num, const int type)
if (type) { if (type) {
if (s.time_based_action_critical) { if (s.time_based_action_critical) {
KPassivePopup::message(i18n("Battery power is running out."), KPassivePopup::message(i18n("Battery power is running out."),
i18n("%1 % charge left.").tqarg(num), i18n("%1 % charge left.").arg(num),
BarIcon("laptop_battery"), dock_widget, BarIcon("laptop_battery"), dock_widget,
0, 20000); 0, 20000);
} else { } else {
// Will this ever be reached? // Will this ever be reached?
KPassivePopup::message(i18n("Battery power is running out."), KPassivePopup::message(i18n("Battery power is running out."),
i18n("%1 % charge left.").tqarg(num), i18n("%1 % charge left.").arg(num),
BarIcon("laptop_battery"), dock_widget, BarIcon("laptop_battery"), dock_widget,
0, 20000); 0, 20000);
} }

@ -199,7 +199,7 @@ pmu_read(apm_info *ap)
int timerem = 0; int timerem = 0;
int maxcharge = 0; int maxcharge = 0;
for (int i = 0; i < bcnt; i++) { for (int i = 0; i < bcnt; i++) {
TQFile bf(TQString("/proc/pmu/battery_%1").tqarg(i)); TQFile bf(TQString("/proc/pmu/battery_%1").arg(i));
if (!bf.exists() || !bf.open(IO_ReadOnly)) if (!bf.exists() || !bf.open(IO_ReadOnly))
continue; continue;
@ -1226,7 +1226,7 @@ laptop_portable::get_battery_status(int &num_batteries, TQStringList &names, TQS
for(unsigned int i = 0; i < acpi_batteries.count(); ++i) { for(unsigned int i = 0; i < acpi_batteries.count(); ++i) {
acpi_battery_info& bat = acpi_batteries[i]; acpi_battery_info& bat = acpi_batteries[i];
names.append(bat.name); names.append(bat.name);
values.append(TQString("%1").tqarg(bat.percentage)); values.append(TQString("%1").arg(bat.percentage));
state.append(bat.present ? "yes" : "no"); state.append(bat.present ? "yes" : "no");
} }
return; return;
@ -1330,11 +1330,11 @@ TQString laptop_portable::cpu_frequency() {
continue; continue;
if (ll.first().stripWhiteSpace() if (ll.first().stripWhiteSpace()
== "cpu MHz") { == "cpu MHz") {
rc = i18n("%1 MHz (%2)").tqarg(ll.last().stripWhiteSpace()).tqarg(rc); rc = i18n("%1 MHz (%2)").arg(ll.last().stripWhiteSpace()).arg(rc);
break; break;
} else if (ll.first().stripWhiteSpace() } else if (ll.first().stripWhiteSpace()
== "clock") { == "clock") {
rc = TQString("%1 (%2)").tqarg(ll.last().stripWhiteSpace()).tqarg(rc); rc = TQString("%1 (%2)").arg(ll.last().stripWhiteSpace()).arg(rc);
break; break;
} }
} }
@ -1581,7 +1581,7 @@ get_acpi_list(char p, int *map, const char *dev, TQStringList &list, int &index,
TQString l; TQString l;
f.readLine(l, 500); f.readLine(l, 500);
if (l.contains("active limit", false)) { if (l.contains("active limit", false)) {
TQRegExp rx(TQString("%1(\\d+)").tqarg(p)); TQRegExp rx(TQString("%1(\\d+)").arg(p));
if (rx.search(l) >= 0) { if (rx.search(l) >= 0) {
bool ok; bool ok;
int min = rx.cap(1).toInt(&ok); int min = rx.cap(1).toInt(&ok);
@ -1706,7 +1706,7 @@ static int get_cpufreq_24_state(TQStringList &states, int &current, const TQStri
f.close(); f.close();
cpufreq_minmax_frequency[i] = buffer; cpufreq_minmax_frequency[i] = buffer;
unsigned int val = buffer.toUInt() / 1000; unsigned int val = buffer.toUInt() / 1000;
states.append(i18n("%1 MHz").tqarg(val)); states.append(i18n("%1 MHz").arg(val));
if(buffer.stripWhiteSpace() == cur) if(buffer.stripWhiteSpace() == cur)
current = i; current = i;
} }

@ -317,7 +317,7 @@ PowerConfig::PowerConfig (TQWidget * parent, const char *name)
top_layout->addStretch(1); top_layout->addStretch(1);
top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this ), 0, TQt::AlignRight ); top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this ), 0, TQt::AlignRight );
} }
} }

@ -213,7 +213,7 @@ ProfileConfig::ProfileConfig(TQWidget * parent, const char *name)
tmp_label->setAlignment( TQt::WordBreak ); tmp_label->setAlignment( TQt::WordBreak );
top_layout->addWidget( tmp_label ); top_layout->addWidget( tmp_label );
top_layout->addStretch(1); top_layout->addStretch(1);
top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, TQt::AlignRight );
load(); load();

@ -99,7 +99,7 @@ SonyConfig::SonyConfig(TQWidget * parent, const char *name)
top_layout->addStretch(1); top_layout->addStretch(1);
top_layout->addWidget( new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), 0, TQt::AlignRight ); top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, TQt::AlignRight );
load(); load();

@ -288,7 +288,7 @@ WarningConfig::WarningConfig (int t, TQWidget * parent, const char *name)
} }
grid->setRowStretch(curRow++, 1); grid->setRowStretch(curRow++, 1);
grid->addWidget(new TQLabel( i18n("Version: %1").tqarg(LAPTOP_VERSION), this), grid->addWidget(new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this),
curRow, 1, TQt::AlignRight); curRow, 1, TQt::AlignRight);
} }

@ -96,8 +96,8 @@ selectEvents (Window window, Bool substructureOnly)
{ {
Window root; /* root window of the window */ Window root; /* root window of the window */
Window parent; /* parent of the window */ Window parent; /* parent of the window */
Window* tqchildren; /* tqchildren of the window */ Window* children; /* children of the window */
unsigned nofChildren = 0; /* number of tqchildren */ unsigned nofChildren = 0; /* number of children */
unsigned i; /* loop counter */ unsigned i; /* loop counter */
XWindowAttributes attribs; /* attributes of the window */ XWindowAttributes attribs; /* attributes of the window */
@ -107,12 +107,12 @@ selectEvents (Window window, Bool substructureOnly)
* Start by querying the server about the root and parent windows. * Start by querying the server about the root and parent windows.
*/ */
if (!XQueryTree (queue.display, window, &root, &parent, if (!XQueryTree (queue.display, window, &root, &parent,
&tqchildren, &nofChildren)) &children, &nofChildren))
{ {
return; return;
} }
if (nofChildren) (void) XFree ((char*) tqchildren); if (nofChildren) (void) XFree ((char*) children);
/* /*
* Build the appropriate event mask. The basic idea is that we don't * Build the appropriate event mask. The basic idea is that we don't
@ -168,7 +168,7 @@ selectEvents (Window window, Bool substructureOnly)
} }
/* /*
* Now ask for the list of tqchildren again, since it might have changed * Now ask for the list of children again, since it might have changed
* in between the last time and us selecting SubstructureNotifyMask. * in between the last time and us selecting SubstructureNotifyMask.
* *
* There is a (very small) chance that we might process a subtree twice: * There is a (very small) chance that we might process a subtree twice:
@ -179,20 +179,20 @@ selectEvents (Window window, Bool substructureOnly)
* isn't required... * isn't required...
*/ */
if (!XQueryTree (queue.display, window, &root, &parent, if (!XQueryTree (queue.display, window, &root, &parent,
&tqchildren, &nofChildren)) &children, &nofChildren))
{ {
return; return;
} }
/* /*
* Now do the same thing for all tqchildren. * Now do the same thing for all children.
*/ */
for (i = 0; i < nofChildren; ++i) for (i = 0; i < nofChildren; ++i)
{ {
selectEvents (tqchildren[i], substructureOnly); selectEvents (children[i], substructureOnly);
} }
if (nofChildren) (void) XFree ((char*) tqchildren); if (nofChildren) (void) XFree ((char*) children);
} }
#if 0 #if 0

@ -183,7 +183,7 @@ bool AsusMonitor::readProc(asus_state_struct* asus_state)
int AsusMonitor::readProcEntry(const TQString &name) int AsusMonitor::readProcEntry(const TQString &name)
{ {
TQFile f(TQString("/proc/acpi/asus/%1").tqarg(name).local8Bit()); TQFile f(TQString("/proc/acpi/asus/%1").arg(name).local8Bit());
if (f.open(IO_ReadOnly)) if (f.open(IO_ReadOnly))
{ {

@ -71,7 +71,7 @@
<property name="text"> <property name="text">
<string>Remaining battery capacity:</string> <string>Remaining battery capacity:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
@ -109,7 +109,7 @@
<property name="text"> <property name="text">
<string>AC</string> <string>AC</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
</widget> </widget>
@ -150,7 +150,7 @@
<property name="text"> <property name="text">
<string>Bat 1</string> <string>Bat 1</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
</widget> </widget>
@ -186,7 +186,7 @@
<property name="text"> <property name="text">
<string>Bat 2</string> <string>Bat 2</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
</widget> </widget>

@ -397,7 +397,7 @@ bool KVaio::showBatteryStatus ( bool force )
case 3: case 3:
case 2: case 2:
case 1: case 1:
stream << i18n("Caution: Battery is Almost Empty (%1% remaining).").tqarg(remaining); stream << i18n("Caution: Battery is Almost Empty (%1% remaining).").arg(remaining);
break; break;
case 0: case 0:
stream << i18n("Alert: Battery is Empty!"); stream << i18n("Alert: Battery is Empty!");
@ -406,7 +406,7 @@ bool KVaio::showBatteryStatus ( bool force )
stream << i18n("No Battery Inserted."); stream << i18n("No Battery Inserted.");
break; break;
default: default:
stream << i18n("Remaining Battery Capacity: %1%").tqarg( remaining ); stream << i18n("Remaining Battery Capacity: %1%").arg( remaining );
}; };
// show a message if the battery status changed by more then 10% or on startup // show a message if the battery status changed by more then 10% or on startup

@ -100,7 +100,7 @@ void DefaultSkin::show() {
#if KDE_IS_VERSION(3,1,90) #if KDE_IS_VERSION(3,1,90)
TQRect r = KGlobalSettings::splashScreenDesktopGeometry(); TQRect r = KGlobalSettings::splashScreenDesktopGeometry();
#else #else
TQRect r = TQApplication::desktop()->tqgeometry(); TQRect r = TQApplication::desktop()->geometry();
#endif #endif
// _label->resize(_label->minimumSizeHint()); // _label->resize(_label->minimumSizeHint());
// _widget->resize(_label->minimumSizeHint()); // _widget->resize(_label->minimumSizeHint());

@ -33,7 +33,7 @@ Released under the terms of the GNU GPL.</comment>
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -57,7 +57,7 @@ Released under the terms of the GNU GPL.</comment>
<property name="text"> <property name="text">
<string></string> <string></string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>

@ -98,7 +98,7 @@ Monitor::DisplayType PowerBookMonitor::poll()
{ {
rc = Monitor::Tap; rc = Monitor::Tap;
TQString marg = tpmodes[ tag->data & 3 ]; TQString marg = tpmodes[ tag->data & 3 ];
m_message = i18n( "Operating mode set to: %1." ).tqarg( marg ); m_message = i18n( "Operating mode set to: %1." ).arg( marg );
} }
break; break;
default: default:

@ -116,7 +116,7 @@ KCMThinkpadModule::KCMThinkpadModule(TQWidget* parent, const char* name, const T
"R30/R31 models and to use a custom volume " "R30/R31 models and to use a custom volume "
"change step, set the nvram device to world " "change step, set the nvram device to world "
"writeable: <em>chmod 666 " "writeable: <em>chmod 666 "
"/dev/nvram</em>").tqarg(m_nvramFile)); "/dev/nvram</em>").arg(m_nvramFile));
#endif #endif
} else { } else {
m_KCMThinkpadGeneral->tlOff->setText(i18n("Thinkpad Buttons KMilo Plugin Ready For Configuration")); m_KCMThinkpadGeneral->tlOff->setText(i18n("Thinkpad Buttons KMilo Plugin Ready For Configuration"));

@ -1,4 +1,4 @@
(1) If I do not resize the widget to be reparented then it will take up all (1) If I do not resize the widget to be reparented then it will take up all
the size of its new parent, and the parent will never receive a the size of its new parent, and the parent will never receive a
tqrepaint event, and will thus never get a chance to resize its new child repaint event, and will thus never get a chance to resize its new child
to a proper size (This is namely done in repaintEvent() ). to a proper size (This is namely done in repaintEvent() ).

@ -38,9 +38,9 @@ CCP::CCP(KMultiFormListBoxMultiVisible *ee_, KMultiFormListBoxEntry *eee_) : TQO
void CCP::install(TQObject *elm) void CCP::install(TQObject *elm)
{ {
elm->installEventFilter(this); elm->installEventFilter(this);
const TQObjectList tqchildren = elm->childrenListObject(); const TQObjectList children = elm->childrenListObject();
if (!tqchildren.isEmpty()) { if (!children.isEmpty()) {
TQObjectListIt it = TQObjectListIt(tqchildren); TQObjectListIt it = TQObjectListIt(children);
while (TQObject *child=it.current()) { while (TQObject *child=it.current()) {
if (child->inherits("KMultiFormListBoxMultiVisible")) { if (child->inherits("KMultiFormListBoxMultiVisible")) {

@ -150,7 +150,7 @@ void KMultiFormListBoxWindowed::slotDeleteEntry()
WindowListboxItem *item = selected(); WindowListboxItem *item = selected();
if (item) { if (item) {
int answer = int answer =
KMessageBox::warningContinueCancel(0, i18n("Delete item \"%1\"?").tqarg(item->text()),i18n("Delete Item"),KStdGuiItem::del()); KMessageBox::warningContinueCancel(0, i18n("Delete item \"%1\"?").arg(item->text()),i18n("Delete Item"),KStdGuiItem::del());
if (answer == KMessageBox::Continue) { if (answer == KMessageBox::Continue) {
delete item; delete item;
slotUpdateButtonState(); slotUpdateButtonState();

@ -48,11 +48,11 @@ void KWidgetStreamer::propertyToStream( const TQObject* from, TQDataStream& stre
if ( ! from->inherits(TQWIDGET_OBJECT_NAME_STRING) ) if ( ! from->inherits(TQWIDGET_OBJECT_NAME_STRING) )
return; return;
// Serializing all the tqchildren (if any). // Serializing all the children (if any).
const TQObjectList tqchildren = from->childrenListObject(); const TQObjectList children = from->childrenListObject();
if ( !tqchildren.isEmpty() ) { if ( !children.isEmpty() ) {
stream << tqchildren.count(); stream << children.count();
for ( TQObjectListIt it = TQObjectListIt(tqchildren); *it; ++it ) { for ( TQObjectListIt it = TQObjectListIt(children); *it; ++it ) {
toStream( *it, stream ); toStream( *it, stream );
} }
} }
@ -83,14 +83,14 @@ void KWidgetStreamer::propertyFromStream( TQDataStream& stream, TQObject* to )
if ( ! to->inherits(TQWIDGET_OBJECT_NAME_STRING) ) if ( ! to->inherits(TQWIDGET_OBJECT_NAME_STRING) )
return; return;
// Stream in all the tqchildren (if any) // Stream in all the children (if any)
const TQObjectList tqchildren = to->childrenListObject(); const TQObjectList children = to->childrenListObject();
unsigned int count; unsigned int count;
stream >> count; stream >> count;
if ( !tqchildren.isEmpty() ) { if ( !children.isEmpty() ) {
Q_ASSERT( count == tqchildren.count() ); Q_ASSERT( count == children.count() );
for ( TQObjectListIt it = TQObjectListIt(tqchildren); *it; ++it ) for ( TQObjectListIt it = TQObjectListIt(children); *it; ++it )
fromStream( stream, *it ); fromStream( stream, *it );
} }
else { else {
@ -147,14 +147,14 @@ KWidgetStreamer::KWidgetStreamer ()
l.clear(); l.clear();
l << TQString::fromLatin1("enabled") l << TQString::fromLatin1("enabled")
<< TQString::fromLatin1("text") << TQString::fromLatin1("maxLength") << TQString::fromLatin1("text") << TQString::fromLatin1("maxLength")
<< TQString::fromLatin1("echoMode") << TQString::fromLatin1("tqalignment"); << TQString::fromLatin1("echoMode") << TQString::fromLatin1("alignment");
_map.insert(TQString::fromLatin1(TQLINEEDIT_OBJECT_NAME_STRING), l); _map.insert(TQString::fromLatin1(TQLINEEDIT_OBJECT_NAME_STRING), l);
// TQMultiLineEdit // TQMultiLineEdit
l.clear(); l.clear();
l << TQString::fromLatin1("enabled") l << TQString::fromLatin1("enabled")
<< TQString::fromLatin1("text") << TQString::fromLatin1("text")
<< TQString::fromLatin1("tqalignment"); << TQString::fromLatin1("alignment");
_map.insert(TQString::fromLatin1(TQTEXTEDIT_OBJECT_NAME_STRING), l); _map.insert(TQString::fromLatin1(TQTEXTEDIT_OBJECT_NAME_STRING), l);
// TQRadioButton // TQRadioButton

@ -29,7 +29,7 @@ void AltnRegExp::addRegExp( RegExp *elm )
addChild( elm ); addChild( elm );
} }
RegExpList AltnRegExp::tqchildren() const RegExpList AltnRegExp::children() const
{ {
return list; return list;
} }

@ -30,7 +30,7 @@ public:
AltnRegExp( bool selected ); AltnRegExp( bool selected );
void addRegExp( RegExp * ); void addRegExp( RegExp * );
RegExpList tqchildren() const; RegExpList children() const;
virtual bool check( ErrorMap&, bool first, bool last ); virtual bool check( ErrorMap&, bool first, bool last );
virtual int precedence() const { return 1;} virtual int precedence() const { return 1;}

@ -34,7 +34,7 @@ AltnWidget::AltnWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
{ {
DragAccepter *accepter = new DragAccepter(editorWindow, this); DragAccepter *accepter = new DragAccepter(editorWindow, this);
accepter->resize(0,0); // See note (1) in Comments accepter->resize(0,0); // See note (1) in Comments
_tqchildren.append(accepter); _children.append(accepter);
_text = i18n("Alternatives"); _text = i18n("Alternatives");
} }
@ -44,10 +44,10 @@ AltnWidget::AltnWidget( AltnRegExp* regexp, RegExpEditorWindow* editorWindow,
{ {
DragAccepter *accepter = new DragAccepter(editorWindow, this); DragAccepter *accepter = new DragAccepter(editorWindow, this);
accepter->resize(0,0); // See note (1) in Comments accepter->resize(0,0); // See note (1) in Comments
_tqchildren.append(accepter); _children.append(accepter);
_text = i18n("Alternatives"); _text = i18n("Alternatives");
RegExpList list = regexp->tqchildren(); RegExpList list = regexp->children();
for ( RegExpListIt it(list); *it; ++it ) { for ( RegExpListIt it(list); *it; ++it ) {
RegExpWidget* child = WidgetFactory::createWidget( *it, editorWindow, this ); RegExpWidget* child = WidgetFactory::createWidget( *it, editorWindow, this );
ConcWidget* conc; ConcWidget* conc;
@ -65,12 +65,12 @@ void AltnWidget::addNewChild(DragAccepter *accepter, RegExpWidget *child)
ConcWidget *conc = new ConcWidget(_editorWindow, child,this); ConcWidget *conc = new ConcWidget(_editorWindow, child,this);
MultiContainerWidget::addNewChild( accepter, conc ); MultiContainerWidget::addNewChild( accepter, conc );
updateDrawLineInfo(); updateDrawLineInfo();
tqrepaint(); repaint();
} }
void AltnWidget::setConcChild(ConcWidget *child) void AltnWidget::setConcChild(ConcWidget *child)
{ {
addNewConcChild( dynamic_cast<DragAccepter*>(_tqchildren.at(0)), child ); addNewConcChild( dynamic_cast<DragAccepter*>(_children.at(0)), child );
} }
void AltnWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *child) void AltnWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *child)
@ -83,19 +83,19 @@ void AltnWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *child)
TQSize AltnWidget::sizeHint() const TQSize AltnWidget::sizeHint() const
{ {
TQPtrListIterator<RegExpWidget> it(_tqchildren); TQPtrListIterator<RegExpWidget> it(_children);
// Skip the first child, as we only need half of the size of the first and the // Skip the first child, as we only need half of the size of the first and the
// last drag accepter. Does, however, not apply when there only is onw child. // last drag accepter. Does, however, not apply when there only is onw child.
if ( _tqchildren.count() != 1 ) if ( _children.count() != 1 )
++it; ++it;
_tqchildrenWidth = 0; _childrenWidth = 0;
_tqchildrenHeight = 0; _childrenHeight = 0;
for ( ; *it ; ++it) { for ( ; *it ; ++it) {
TQSize thisChildSize = (*it)->sizeHint(); TQSize thisChildSize = (*it)->sizeHint();
_tqchildrenWidth = TQMAX(_tqchildrenWidth, thisChildSize.width()); _childrenWidth = TQMAX(_childrenWidth, thisChildSize.width());
_tqchildrenHeight += thisChildSize.height(); _childrenHeight += thisChildSize.height();
} }
// Now add the size of the header // Now add the size of the header
@ -104,18 +104,18 @@ TQSize AltnWidget::sizeHint() const
int headerWidth = _textSize.width() + 2 * bdSize + 2; int headerWidth = _textSize.width() + 2 * bdSize + 2;
_tqchildrenWidth = TQMAX(_tqchildrenWidth, headerWidth); _childrenWidth = TQMAX(_childrenWidth, headerWidth);
return TQSize(_tqchildrenWidth + 2*pw, _tqchildrenHeight + _textSize.height() + 1*pw ); return TQSize(_childrenWidth + 2*pw, _childrenHeight + _textSize.height() + 1*pw );
} }
void AltnWidget::paintEvent( TQPaintEvent *e) void AltnWidget::paintEvent( TQPaintEvent *e)
{ {
Q_ASSERT( dynamic_cast<DragAccepter*>(_tqchildren.at(0)) ); Q_ASSERT( dynamic_cast<DragAccepter*>(_children.at(0)) );
// if this fails, then I should check the location of the show() // if this fails, then I should check the location of the show()
Q_ASSERT( _tqchildren.count() == 1 || Q_ASSERT( _children.count() == 1 ||
( _tqchildren.count() >=3 && ( _children.count() >=3 &&
dynamic_cast<DragAccepter*>(_tqchildren.at(_tqchildren.count()-1)) ) ); dynamic_cast<DragAccepter*>(_children.at(_children.count()-1)) ) );
int offset = 0; int offset = 0;
TQSize mySize = sizeHint(); TQSize mySize = sizeHint();
@ -136,13 +136,13 @@ void AltnWidget::paintEvent( TQPaintEvent *e)
painter.drawLine(mySize.width()-pw, startY, mySize.width()-pw, mySize.height()); painter.drawLine(mySize.width()-pw, startY, mySize.width()-pw, mySize.height());
painter.drawLine(0,mySize.height()-pw, mySize.width()-pw, mySize.height()-pw); painter.drawLine(0,mySize.height()-pw, mySize.width()-pw, mySize.height()-pw);
//---- Run through all the tqchildren and place them at the correct location. //---- Run through all the children and place them at the correct location.
offset = _textSize.height(); offset = _textSize.height();
xOffset = pw; xOffset = pw;
for (unsigned int i = 0; i < _tqchildren.count(); i++ ) { for (unsigned int i = 0; i < _children.count(); i++ ) {
RegExpWidget* child = _tqchildren.at(i); RegExpWidget* child = _children.at(i);
TQSize childSize = child->sizeHint(); TQSize childSize = child->sizeHint();
TQSize curChildSize = child->size(); TQSize curChildSize = child->size();
@ -151,12 +151,12 @@ void AltnWidget::paintEvent( TQPaintEvent *e)
int x = xOffset; int x = xOffset;
int y = offset; int y = offset;
int h = childSize.height(); int h = childSize.height();
if ( ( _tqchildren.count() != 1 ) && ( i == 0 || i == _tqchildren.count() -1 ) ) { if ( ( _children.count() != 1 ) && ( i == 0 || i == _children.count() -1 ) ) {
// first and last DragAccepter should only be half size. // first and last DragAccepter should only be half size.
h /= 2; h /= 2;
} }
int w = _tqchildrenWidth; int w = _childrenWidth;
child->setGeometry( x, y, w, h ); child->setGeometry( x, y, w, h );
if ( w != curChildSize.width() || h != curChildSize.height() ) { if ( w != curChildSize.width() || h != curChildSize.height() ) {
// I resized the child, so give it a chance to relect thus. // I resized the child, so give it a chance to relect thus.
@ -172,7 +172,7 @@ RegExp* AltnWidget::regExp() const
{ {
AltnRegExp *regexp = new AltnRegExp( isSelected() ); AltnRegExp *regexp = new AltnRegExp( isSelected() );
TQPtrListIterator<RegExpWidget> it(_tqchildren); TQPtrListIterator<RegExpWidget> it(_children);
++it; // start with the second element ++it; // start with the second element
for ( ; *it; it+=2 ) { for ( ; *it; it+=2 ) {
regexp->addRegExp( (*it)->regExp() ); regexp->addRegExp( (*it)->regExp() );
@ -183,8 +183,8 @@ RegExp* AltnWidget::regExp() const
void AltnWidget::applyRegExpToSelection( RegExpType type ) void AltnWidget::applyRegExpToSelection( RegExpType type )
{ {
for ( unsigned int i=1; i < _tqchildren.count(); i += 2 ) { for ( unsigned int i=1; i < _children.count(); i += 2 ) {
RegExpWidget* child = _tqchildren.at( i ); RegExpWidget* child = _children.at( i );
if ( child->hasSelection() ) { if ( child->hasSelection() ) {
child->applyRegExpToSelection( type ); child->applyRegExpToSelection( type );
} }
@ -197,7 +197,7 @@ RegExp* AltnWidget::selection() const
if ( isSelected() ) if ( isSelected() )
return regExp(); return regExp();
else { else {
TQPtrListIterator<RegExpWidget> it(_tqchildren); TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past DragAccepter ++it; // Skip past DragAccepter
for ( ; *it; it+=2 ) { for ( ; *it; it+=2 ) {
if ( (*it)->hasSelection() ) { if ( (*it)->hasSelection() ) {
@ -216,7 +216,7 @@ bool AltnWidget::validateSelection() const
} }
bool foundASelection = false; bool foundASelection = false;
TQPtrListIterator<RegExpWidget> it(_tqchildren); TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past DragAccepter ++it; // Skip past DragAccepter
for ( ; *it; it+=2 ) { for ( ; *it; it+=2 ) {
if ( (*it)->hasSelection() ) { if ( (*it)->hasSelection() ) {
@ -238,9 +238,9 @@ bool AltnWidget::validateSelection() const
void AltnWidget::updateDrawLineInfo() void AltnWidget::updateDrawLineInfo()
{ {
for ( unsigned int i=0; i < _tqchildren.count(); i+=2 ) { for ( unsigned int i=0; i < _children.count(); i+=2 ) {
bool line = ( i != 0 && i!= _tqchildren.count()-1 ); bool line = ( i != 0 && i!= _children.count()-1 );
DragAccepter *accepter = dynamic_cast<DragAccepter*>(_tqchildren.at(i)); DragAccepter *accepter = dynamic_cast<DragAccepter*>(_children.at(i));
if (accepter) if (accepter)
accepter->setDrawLine( line ); accepter->setDrawLine( line );
} }

@ -58,8 +58,8 @@ private:
mutable TQSize _textSize; mutable TQSize _textSize;
mutable int _maxSelectedWidth; mutable int _maxSelectedWidth;
mutable int _tqchildrenWidth; mutable int _childrenWidth;
mutable int _tqchildrenHeight; mutable int _childrenHeight;
}; };
#endif // altnwidget #endif // altnwidget

@ -247,7 +247,7 @@ void CompoundWidget::slotConfigCanceled()
TQDataStream stream( _backup, IO_ReadOnly ); TQDataStream stream( _backup, IO_ReadOnly );
KWidgetStreamer streamer; KWidgetStreamer streamer;
streamer.fromStream( stream, TQT_TQOBJECT(_content) ); streamer.fromStream( stream, TQT_TQOBJECT(_content) );
tqrepaint(); repaint();
} }
RegExp* CompoundWidget::regExp() const RegExp* CompoundWidget::regExp() const
@ -273,7 +273,7 @@ void CompoundWidget::mouseReleaseEvent( TQMouseEvent* event)
TQRect( _pixmapPos, _pixmapSize ).contains( event->pos() ) ) { TQRect( _pixmapPos, _pixmapSize ).contains( event->pos() ) ) {
_hidden = !_hidden; _hidden = !_hidden;
_editorWindow->updateContent( 0 ); _editorWindow->updateContent( 0 );
tqrepaint(); // is this necesary? repaint(); // is this necesary?
_editorWindow->emitChange(); _editorWindow->emitChange();
} }
else else
@ -286,7 +286,7 @@ bool CompoundWidget::updateSelection( bool parentSelected )
bool changed = RegExpWidget::updateSelection( parentSelected ); bool changed = RegExpWidget::updateSelection( parentSelected );
_child->selectWidget( _isSelected ); _child->selectWidget( _isSelected );
if (changed) if (changed)
tqrepaint(); repaint();
return changed; return changed;
} }
else { else {

@ -29,7 +29,7 @@ void ConcRegExp::addRegExp( RegExp *regExp )
addChild( regExp ); addChild( regExp );
} }
RegExpList ConcRegExp::tqchildren() RegExpList ConcRegExp::children()
{ {
return list; return list;
} }

@ -31,7 +31,7 @@ public:
ConcRegExp( bool selected ); ConcRegExp( bool selected );
void addRegExp( RegExp *); void addRegExp( RegExp *);
RegExpList tqchildren(); RegExpList children();
RegExp* lastRegExp(); RegExp* lastRegExp();
virtual bool check( ErrorMap&, bool first, bool last ); virtual bool check( ErrorMap&, bool first, bool last );

@ -28,7 +28,7 @@ ConcWidget::ConcWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
init(); init();
DragAccepter *accepter = new DragAccepter(editorWindow, this); DragAccepter *accepter = new DragAccepter(editorWindow, this);
accepter->show(); accepter->show();
_tqchildren.append(accepter); _children.append(accepter);
} }
@ -38,7 +38,7 @@ ConcWidget::ConcWidget(RegExpEditorWindow* editorWindow, RegExpWidget *child,
{ {
init(); init();
DragAccepter *accepter = new DragAccepter(editorWindow, this); DragAccepter *accepter = new DragAccepter(editorWindow, this);
_tqchildren.append(accepter); _children.append(accepter);
child->reparent(this, TQPoint(0,0), false); child->reparent(this, TQPoint(0,0), false);
addNewChild(accepter, child); addNewChild(accepter, child);
} }
@ -48,13 +48,13 @@ ConcWidget::ConcWidget( RegExpEditorWindow* editorWindow, ConcWidget* origConc,
:MultiContainerWidget(editorWindow, 0, "Splitted ConcWidget") :MultiContainerWidget(editorWindow, 0, "Splitted ConcWidget")
{ {
init(); init();
_tqchildren.prepend( new DragAccepter(editorWindow, this) ); _children.prepend( new DragAccepter(editorWindow, this) );
for (unsigned int i = end; i >= start; i--) { for (unsigned int i = end; i >= start; i--) {
RegExpWidget* child = origConc->_tqchildren.take( i ); RegExpWidget* child = origConc->_children.take( i );
_tqchildren.prepend( child ); _children.prepend( child );
child->reparent( this, TQPoint(0,0), false); child->reparent( this, TQPoint(0,0), false);
} }
_tqchildren.prepend( new DragAccepter(editorWindow, this) ); _children.prepend( new DragAccepter(editorWindow, this) );
} }
ConcWidget::ConcWidget( ConcRegExp* regexp, RegExpEditorWindow* editorWindow, ConcWidget::ConcWidget( ConcRegExp* regexp, RegExpEditorWindow* editorWindow,
@ -63,9 +63,9 @@ ConcWidget::ConcWidget( ConcRegExp* regexp, RegExpEditorWindow* editorWindow,
{ {
init(); init();
DragAccepter *accepter = new DragAccepter(editorWindow, this); DragAccepter *accepter = new DragAccepter(editorWindow, this);
_tqchildren.append(accepter); _children.append(accepter);
RegExpList list = regexp->tqchildren(); RegExpList list = regexp->children();
for ( RegExpListIt it(list); *it; ++it ) { for ( RegExpListIt it(list); *it; ++it ) {
RegExpWidget* child = WidgetFactory::createWidget( *it, editorWindow, this ); RegExpWidget* child = WidgetFactory::createWidget( *it, editorWindow, this );
append( child ); append( child );
@ -80,30 +80,30 @@ void ConcWidget::init()
TQSize ConcWidget::sizeHint() const TQSize ConcWidget::sizeHint() const
{ {
int tqchildrenWidth = 0; int childrenWidth = 0;
int tqchildrenHeight = 0; int childrenHeight = 0;
TQPtrListIterator<RegExpWidget> it(_tqchildren); TQPtrListIterator<RegExpWidget> it(_children);
for ( ; *it; ++it) { for ( ; *it; ++it) {
TQSize thisChildSize = (*it)->sizeHint(); TQSize thisChildSize = (*it)->sizeHint();
tqchildrenWidth += thisChildSize.width(); childrenWidth += thisChildSize.width();
tqchildrenHeight = TQMAX(tqchildrenHeight, thisChildSize.height()); childrenHeight = TQMAX(childrenHeight, thisChildSize.height());
} }
return TQSize(tqchildrenWidth, tqchildrenHeight); return TQSize(childrenWidth, childrenHeight);
} }
void ConcWidget::paintEvent( TQPaintEvent *e) void ConcWidget::paintEvent( TQPaintEvent *e)
{ {
Q_ASSERT( dynamic_cast<DragAccepter*>(_tqchildren.at(0)) ); Q_ASSERT( dynamic_cast<DragAccepter*>(_children.at(0)) );
// if this fails, then I should check the location of the show() // if this fails, then I should check the location of the show()
Q_ASSERT( _tqchildren.count() == 1 || Q_ASSERT( _children.count() == 1 ||
( _tqchildren.count() >=3 && ( _children.count() >=3 &&
dynamic_cast<DragAccepter*>(_tqchildren.at(_tqchildren.count()-1)) ) ); dynamic_cast<DragAccepter*>(_children.at(_children.count()-1)) ) );
if ( _tqchildren.count() == 1) { if ( _children.count() == 1) {
// There is only an accepter, lets give it all the space. // There is only an accepter, lets give it all the space.
_tqchildren.at(0)->setGeometry( 0, 0, size().width(), size().height() ); _children.at(0)->setGeometry( 0, 0, size().width(), size().height() );
} }
else { else {
TQSize myReqSize = sizeHint(); TQSize myReqSize = sizeHint();
@ -125,11 +125,11 @@ void ConcWidget::paintEvent( TQPaintEvent *e)
int lastHeight = 0; int lastHeight = 0;
int offset = 0; int offset = 0;
for (unsigned int i = 1; i < _tqchildren.count(); i += 2 ) { for (unsigned int i = 1; i < _children.count(); i += 2 ) {
DragAccepter* accepter = dynamic_cast<DragAccepter*>(_tqchildren.at(i-1)); DragAccepter* accepter = dynamic_cast<DragAccepter*>(_children.at(i-1));
if (!accepter) if (!accepter)
continue; continue;
RegExpWidget* child = _tqchildren.at(i); RegExpWidget* child = _children.at(i);
TQSize childSize = child->sizeHint(); TQSize childSize = child->sizeHint();
TQSize curChildSize = child->size(); TQSize curChildSize = child->size();
@ -176,7 +176,7 @@ void ConcWidget::paintEvent( TQPaintEvent *e)
//---------------------- Finally place the last accepter. //---------------------- Finally place the last accepter.
DragAccepter* accepter = DragAccepter* accepter =
dynamic_cast<DragAccepter*>(_tqchildren.at(_tqchildren.count()-1)); dynamic_cast<DragAccepter*>(_children.at(_children.count()-1));
// dynamic_cast is ASSERTed at top // dynamic_cast is ASSERTed at top
int x = offset; int x = offset;
int h = lastHeight; int h = lastHeight;
@ -212,10 +212,10 @@ void ConcWidget::sizeAccepter( DragAccepter* accepter, int height, int totHeight
RegExp* ConcWidget::regExp() const RegExp* ConcWidget::regExp() const
{ {
TQPtrListIterator<RegExpWidget> it( _tqchildren ); TQPtrListIterator<RegExpWidget> it( _children );
++it; // start with the second element. ++it; // start with the second element.
if ( _tqchildren.count() == 3 ) { if ( _children.count() == 3 ) {
// Exactly one child (and two drag accepters) // Exactly one child (and two drag accepters)
return (*it)->regExp(); return (*it)->regExp();
} }
@ -236,7 +236,7 @@ bool ConcWidget::updateSelection(bool parentSelected)
_maxSelectedHeight = 0; _maxSelectedHeight = 0;
TQPtrListIterator<RegExpWidget> it(_tqchildren); TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past the first DragAccepter ++it; // Skip past the first DragAccepter
for ( ; *it; it +=2 ) { for ( ; *it; it +=2 ) {
if ( (*it)->isSelected() ) { if ( (*it)->isSelected() ) {
@ -246,7 +246,7 @@ bool ConcWidget::updateSelection(bool parentSelected)
changed = changed || isSel != _isSelected; changed = changed || isSel != _isSelected;
if ( changed ) { if ( changed ) {
tqrepaint(); repaint();
} }
return changed; return changed;
@ -259,8 +259,8 @@ void ConcWidget::getSelectionIndexes( int* start, int* end )
// Start with element at index 1, and skip every second element, as we // Start with element at index 1, and skip every second element, as we
// know they are dragAccepters. // know they are dragAccepters.
for ( unsigned int index = 1; index< _tqchildren.count(); index += 2 ) { for ( unsigned int index = 1; index< _children.count(); index += 2 ) {
RegExpWidget* child = _tqchildren.at(index); RegExpWidget* child = _children.at(index);
if ( child->isSelected() ) { if ( child->isSelected() ) {
// The child is selected at topmost level. // The child is selected at topmost level.
@ -276,7 +276,7 @@ void ConcWidget::getSelectionIndexes( int* start, int* end )
} }
if ( *start != -1 && *end == -1 ) if ( *start != -1 && *end == -1 )
*end = _tqchildren.count() -2; *end = _children.count() -2;
} }
void ConcWidget::applyRegExpToSelection( RegExpType type ) void ConcWidget::applyRegExpToSelection( RegExpType type )
@ -287,7 +287,7 @@ void ConcWidget::applyRegExpToSelection( RegExpType type )
if ( start == -1 ) { if ( start == -1 ) {
// No item selected at top level // No item selected at top level
TQPtrListIterator<RegExpWidget> it(_tqchildren); TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past the first DragAccepter ++it; // Skip past the first DragAccepter
for ( ; *it ; it += 2 ) { for ( ; *it ; it += 2 ) {
if ( (*it)->hasSelection() ) { if ( (*it)->hasSelection() ) {
@ -307,7 +307,7 @@ void ConcWidget::applyRegExpToSelection( RegExpType type )
subSequence->resize(0,0); // see note (1) subSequence->resize(0,0); // see note (1)
subSequence->reparent( newElm, TQPoint(0,0), false); subSequence->reparent( newElm, TQPoint(0,0), false);
_tqchildren.insert( start, newElm ); _children.insert( start, newElm );
newElm->show(); newElm->show();
} }
} }
@ -318,7 +318,7 @@ bool ConcWidget::isSelected() const
// A ConcWidget should be considered selected when all its elements has been selected // A ConcWidget should be considered selected when all its elements has been selected
// otherwise empty ConcWidgets may be left behind when for example selection is deleted. // otherwise empty ConcWidgets may be left behind when for example selection is deleted.
bool allSelected = true; bool allSelected = true;
TQPtrListIterator<RegExpWidget> it(_tqchildren); TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past first DragAccepter. ++it; // Skip past first DragAccepter.
for ( ; *it && allSelected; it += 2 ) { for ( ; *it && allSelected; it += 2 ) {
allSelected = allSelected && (*it)->isSelected(); allSelected = allSelected && (*it)->isSelected();
@ -336,7 +336,7 @@ RegExp* ConcWidget::selection() const
bool foundMoreThanOne = false; bool foundMoreThanOne = false;
RegExp* regexp = 0; RegExp* regexp = 0;
TQPtrListIterator<RegExpWidget> it(_tqchildren); TQPtrListIterator<RegExpWidget> it(_children);
++it; // Skip past the first DragAccepter ++it; // Skip past the first DragAccepter
for ( ; (*it) ; it += 2 ) { for ( ; (*it) ; it += 2 ) {
if ( (*it)->hasSelection() ) { if ( (*it)->hasSelection() ) {
@ -363,21 +363,21 @@ RegExp* ConcWidget::selection() const
void ConcWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *other) void ConcWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *other)
{ {
for ( unsigned int i=0; i<_tqchildren.count(); i+= 2 ) { for ( unsigned int i=0; i<_children.count(); i+= 2 ) {
RegExpWidget *ch = _tqchildren.at( i ); RegExpWidget *ch = _children.at( i );
if ( ch == accepter ) { if ( ch == accepter ) {
// Move all the element from the `child' ConcWidget to this one. // Move all the element from the `child' ConcWidget to this one.
// Do not copy the first one as this is a dragAccepter, and we place the widgets // Do not copy the first one as this is a dragAccepter, and we place the widgets
// after this drag accepter. // after this drag accepter.
// We must take them in pairs to avoid breaking the invariant for paintEvent, // We must take them in pairs to avoid breaking the invariant for paintEvent,
// namely that every second element is a dragAccepter // namely that every second element is a dragAccepter
for ( unsigned int j = other->_tqchildren.count()-1; j > 0 ; j-=2 ) { for ( unsigned int j = other->_children.count()-1; j > 0 ; j-=2 ) {
RegExpWidget* newChildA = other->_tqchildren.take(j); RegExpWidget* newChildA = other->_children.take(j);
newChildA->reparent( this, TQPoint(0,0), false); newChildA->reparent( this, TQPoint(0,0), false);
_tqchildren.insert( i+1, newChildA ); _children.insert( i+1, newChildA );
RegExpWidget* newChildB = other->_tqchildren.take(j-1); RegExpWidget* newChildB = other->_children.take(j-1);
newChildB->reparent( this, TQPoint(0,0), false); newChildB->reparent( this, TQPoint(0,0), false);
_tqchildren.insert( i+1, newChildB ); _children.insert( i+1, newChildB );
newChildA->show(); newChildA->show();
newChildB->show(); newChildB->show();
} }
@ -391,7 +391,7 @@ void ConcWidget::addNewConcChild(DragAccepter *accepter, ConcWidget *other)
bool ConcWidget::validateSelection() const bool ConcWidget::validateSelection() const
{ {
bool cont = true; bool cont = true;
TQPtrListIterator<RegExpWidget> it(_tqchildren); TQPtrListIterator<RegExpWidget> it(_children);
++it; // skip past the DragAccepter. ++it; // skip past the DragAccepter.
for ( ; *it && cont; it += 2 ) { for ( ; *it && cont; it += 2 ) {
cont = (*it)->validateSelection(); cont = (*it)->validateSelection();

@ -52,7 +52,7 @@ public:
virtual bool validateSelection() const; virtual bool validateSelection() const;
virtual bool acceptWidgetInsert( RegExpType ) const { return false; } virtual bool acceptWidgetInsert( RegExpType ) const { return false; }
virtual bool acceptWidgetPaste() const { return false; } virtual bool acceptWidgetPaste() const { return false; }
bool hasAnyChildren() { return _tqchildren.count() > 1; } bool hasAnyChildren() { return _children.count() > 1; }
protected: protected:
virtual void paintEvent( TQPaintEvent *e ); virtual void paintEvent( TQPaintEvent *e );

@ -209,8 +209,8 @@ void RegExpEditorWindow::slotDoSelect()
_pasteInAction = false; _pasteInAction = false;
_insertInAction = false; _insertInAction = false;
// I need to update the cursor recursively, as a tqrepaint may not have been issued yet // I need to update the cursor recursively, as a repaint may not have been issued yet
// when this method is invoked. This means that when the tqrepaint comes, the cursor may // when this method is invoked. This means that when the repaint comes, the cursor may
// move to an other widget. // move to an other widget.
_top->updateCursorRecursively(); _top->updateCursorRecursively();
} }
@ -383,14 +383,14 @@ void RegExpEditorWindow::slotSave()
TQString fileName = dir + TQString::fromLocal8Bit("/") + txt + TQString::fromLocal8Bit(".regexp"); TQString fileName = dir + TQString::fromLocal8Bit("/") + txt + TQString::fromLocal8Bit(".regexp");
TQFileInfo finfo( fileName ); TQFileInfo finfo( fileName );
if ( finfo.exists() ) { if ( finfo.exists() ) {
int answer = KMessageBox::warningContinueCancel( this, i18n("<p>Overwrite named regular expression <b>%1</b></p>").tqarg(txt), TQString(), i18n("Overwrite")); int answer = KMessageBox::warningContinueCancel( this, i18n("<p>Overwrite named regular expression <b>%1</b></p>").arg(txt), TQString(), i18n("Overwrite"));
if ( answer != KMessageBox::Continue ) if ( answer != KMessageBox::Continue )
return; return;
} }
TQFile file( fileName ); TQFile file( fileName );
if ( ! file.open(IO_WriteOnly) ) { if ( ! file.open(IO_WriteOnly) ) {
KMessageBox::sorry( this, i18n("Could not open file for writing: %1").tqarg(fileName) ); KMessageBox::sorry( this, i18n("Could not open file for writing: %1").arg(fileName) );
return; return;
} }

@ -40,7 +40,7 @@ TQString EmacsRegExpConverter::toString( AltnRegExp* regexp, bool markSelection
TQString res; TQString res;
bool first = true; bool first = true;
RegExpList list = regexp->tqchildren(); RegExpList list = regexp->children();
for ( RegExpListIt it(list); *it; ++it ) { for ( RegExpListIt it(list); *it; ++it ) {
if ( !first ) { if ( !first ) {
res += TQString::fromLatin1("\\|"); res += TQString::fromLatin1("\\|");
@ -56,7 +56,7 @@ TQString EmacsRegExpConverter::toString( ConcRegExp* regexp, bool markSelection
{ {
TQString res; TQString res;
RegExpList list = regexp->tqchildren(); RegExpList list = regexp->children();
for ( RegExpListIt it(list); *it; ++it ) { for ( RegExpListIt it(list); *it; ++it ) {
TQString startPar = TQString::fromLocal8Bit(""); TQString startPar = TQString::fromLocal8Bit("");
TQString endPar = TQString::fromLocal8Bit(""); TQString endPar = TQString::fromLocal8Bit("");

@ -1160,7 +1160,7 @@ yyreduce:
case 23: case 23:
#line 157 "qregexpparser.y" #line 157 "qregexpparser.y"
{ {
TQString match = TQString(TQString::fromLocal8Bit("\\%1")).tqarg( yyvsp[0].backRef ); TQString match = TQString(TQString::fromLocal8Bit("\\%1")).arg( yyvsp[0].backRef );
yyval.regexp = new TextRegExp( false, match ); yyval.regexp = new TextRegExp( false, match );
KMessageBox::information(0,i18n("<qt>Back reference regular expressions are not supported.<p>" KMessageBox::information(0,i18n("<qt>Back reference regular expressions are not supported.<p>"
"<tt>\\1</tt>, <tt>\\2</tt>, ... are <i>back references</i>, meaning they refer to " "<tt>\\1</tt>, <tt>\\2</tt>, ... are <i>back references</i>, meaning they refer to "
@ -1170,7 +1170,7 @@ yyreduce:
"just a workaround to ensure that the application handles the regexp at all. " "just a workaround to ensure that the application handles the regexp at all. "
"Therefore, as soon as you edit the regular expression in the graphical area, " "Therefore, as soon as you edit the regular expression in the graphical area, "
"the back reference will be replaced by matching the text <b>%2</b> literally.") "the back reference will be replaced by matching the text <b>%2</b> literally.")
.tqarg( match ).tqarg( match ), .arg( match ).arg( match ),
i18n("Back reference regular expressions not supported"), i18n("Back reference regular expressions not supported"),
TQString::fromLocal8Bit("backReferenceNotSupported") ); TQString::fromLocal8Bit("backReferenceNotSupported") );
} }
@ -1192,13 +1192,13 @@ yyreduce:
if ( yyvsp[0].ch == '{' || yyvsp[0].ch == '}' || yyvsp[0].ch == '[' || yyvsp[0].ch == ']' || yyvsp[0].ch == '\\' ) { if ( yyvsp[0].ch == '{' || yyvsp[0].ch == '}' || yyvsp[0].ch == '[' || yyvsp[0].ch == ']' || yyvsp[0].ch == '\\' ) {
yyerror( "illigal character - needs escaping" ); yyerror( "illigal character - needs escaping" );
} }
yyval.regexp = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg(yyvsp[0].ch)); yyval.regexp = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).arg(yyvsp[0].ch));
} }
break; break;
case 27: case 27:
#line 182 "qregexpparser.y" #line 182 "qregexpparser.y"
{ yyval.regexp = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg(yyvsp[0].ch)); } { yyval.regexp = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).arg(yyvsp[0].ch)); }
break; break;

@ -130,7 +130,7 @@ void KRegExpEditorGUI::doSomething( TQString method, void* arguments )
_editor->setAllowNonTQtSyntax( (bool) arguments ); _editor->setAllowNonTQtSyntax( (bool) arguments );
} }
else { else {
qFatal( "%s", tqtr("Method '%1' is not valid!").tqarg(method).latin1() ); qFatal( "%s", tqtr("Method '%1' is not valid!").arg(method).latin1() );
} }
} }

@ -371,7 +371,7 @@ void KRegExpEditorPrivate::setVerifyText( const TQString& fileName )
_autoVerify = false; _autoVerify = false;
TQFile file( fileName ); TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) ) { if ( !file.open( IO_ReadOnly ) ) {
KMessageBox::sorry(0, i18n("Could not open file '%1' for reading").tqarg( fileName ) ); KMessageBox::sorry(0, i18n("Could not open file '%1' for reading").arg( fileName ) );
} }
else { else {
TQTextStream s( &file ); TQTextStream s( &file );

@ -27,8 +27,8 @@ MultiContainerWidget::MultiContainerWidget( RegExpEditorWindow* editorWindow,
void MultiContainerWidget::append( RegExpWidget* child ) void MultiContainerWidget::append( RegExpWidget* child )
{ {
child->reparent( this, TQPoint(0,0), false ); child->reparent( this, TQPoint(0,0), false );
_tqchildren.append( child ); _children.append( child );
_tqchildren.append( new DragAccepter( _editorWindow, this ) ); _children.append( new DragAccepter( _editorWindow, this ) );
} }
bool MultiContainerWidget::hasSelection() const bool MultiContainerWidget::hasSelection() const
@ -36,7 +36,7 @@ bool MultiContainerWidget::hasSelection() const
if ( _isSelected ) if ( _isSelected )
return true; return true;
TQPtrListIterator<RegExpWidget> it(_tqchildren); TQPtrListIterator<RegExpWidget> it(_children);
++it; // Move past the first dragAccepter ++it; // Move past the first dragAccepter
for ( ; *it; it += 2 ) { for ( ; *it; it += 2 ) {
if ( (*it)->hasSelection() ) { if ( (*it)->hasSelection() ) {
@ -49,8 +49,8 @@ bool MultiContainerWidget::hasSelection() const
void MultiContainerWidget::clearSelection() void MultiContainerWidget::clearSelection()
{ {
_isSelected = false; _isSelected = false;
for ( unsigned int i = 0; i< _tqchildren.count(); i++ ) { for ( unsigned int i = 0; i< _children.count(); i++ ) {
_tqchildren.at(i)->clearSelection(); _children.at(i)->clearSelection();
} }
} }
@ -58,15 +58,15 @@ void MultiContainerWidget::clearSelection()
void MultiContainerWidget::deleteSelection() void MultiContainerWidget::deleteSelection()
{ {
// run from the back to the front (which we do since we delete items on the run) // run from the back to the front (which we do since we delete items on the run)
// When deleting tqchildren, delete the drag accepter to its right. // When deleting children, delete the drag accepter to its right.
for ( int i = (int) _tqchildren.count()-2; i > 0; i -=2 ) { for ( int i = (int) _children.count()-2; i > 0; i -=2 ) {
RegExpWidget* child = _tqchildren.at( i ); RegExpWidget* child = _children.at( i );
if ( child->isSelected() ) { if ( child->isSelected() ) {
delete _tqchildren.at( i+1 ); delete _children.at( i+1 );
_tqchildren.remove( i+1 ); _children.remove( i+1 );
delete child; delete child;
_tqchildren.remove(i); _children.remove(i);
} }
else if ( child->hasSelection() ) { else if ( child->hasSelection() ) {
child->deleteSelection(); child->deleteSelection();
@ -78,16 +78,16 @@ void MultiContainerWidget::deleteSelection()
void MultiContainerWidget::addNewChild(DragAccepter *accepter, RegExpWidget *child) void MultiContainerWidget::addNewChild(DragAccepter *accepter, RegExpWidget *child)
{ {
for ( unsigned int i=0; i<_tqchildren.count(); i+= 2 ) { for ( unsigned int i=0; i<_children.count(); i+= 2 ) {
RegExpWidget *ch = _tqchildren.at( i ); RegExpWidget *ch = _children.at( i );
if ( ch == accepter ) { if ( ch == accepter ) {
// Insert the new child // Insert the new child
_tqchildren.insert( i+1, child ); _children.insert( i+1, child );
// Insert an accepter as the next element. // Insert an accepter as the next element.
DragAccepter *accepter = new DragAccepter( _editorWindow, this ); DragAccepter *accepter = new DragAccepter( _editorWindow, this );
_tqchildren.insert( i+2, accepter ); _children.insert( i+2, accepter );
// These two show's must come here otherwise a paintevent // These two show's must come here otherwise a paintevent
// will be invoked, where the invariant, that a accepter is located at // will be invoked, where the invariant, that a accepter is located at
@ -107,11 +107,11 @@ bool MultiContainerWidget::updateSelection(bool parentSelected)
{ {
bool changed = false; bool changed = false;
bool isSel = _isSelected; bool isSel = _isSelected;
TQMemArray<bool> oldState(_tqchildren.count()); TQMemArray<bool> oldState(_children.count());
TQMemArray<bool> newState(_tqchildren.count()); TQMemArray<bool> newState(_children.count());
for (int i = 0; i< (int)_tqchildren.count();i++) { for (int i = 0; i< (int)_children.count();i++) {
oldState[i] = _tqchildren.at(i)->isSelected(); oldState[i] = _children.at(i)->isSelected();
} }
RegExpWidget::updateSelection( parentSelected ); RegExpWidget::updateSelection( parentSelected );
@ -120,8 +120,8 @@ bool MultiContainerWidget::updateSelection(bool parentSelected)
int last; int last;
// scan for the first selected item. // scan for the first selected item.
for (first = 1; first < (int) _tqchildren.count(); first+= 2 ) { for (first = 1; first < (int) _children.count(); first+= 2 ) {
RegExpWidget* child = _tqchildren.at(first); RegExpWidget* child = _children.at(first);
changed = child->updateSelection( _isSelected ) || changed; changed = child->updateSelection( _isSelected ) || changed;
newState[first] = child->isSelected(); newState[first] = child->isSelected();
if ( child->isSelected() ) if ( child->isSelected() )
@ -129,8 +129,8 @@ bool MultiContainerWidget::updateSelection(bool parentSelected)
} }
// scan for the last selected item // scan for the last selected item
for (last = _tqchildren.count()-2; last>first; last -= 2) { for (last = _children.count()-2; last>first; last -= 2) {
RegExpWidget* child = _tqchildren.at(last); RegExpWidget* child = _children.at(last);
changed = child->updateSelection( _isSelected ) || changed; changed = child->updateSelection( _isSelected ) || changed;
newState[last] = child->isSelected(); newState[last] = child->isSelected();
if ( child->isSelected() ) if ( child->isSelected() )
@ -139,17 +139,17 @@ bool MultiContainerWidget::updateSelection(bool parentSelected)
// everything between first and last must be selected. // everything between first and last must be selected.
for (int j = first+2; j<last; j+=2) { for (int j = first+2; j<last; j+=2) {
RegExpWidget* child = _tqchildren.at(j); RegExpWidget* child = _children.at(j);
changed = child->updateSelection( true ) || changed; changed = child->updateSelection( true ) || changed;
newState[j] = true; newState[j] = true;
} }
// update drag accepters. // update drag accepters.
for (int k = 0; k< (int) _tqchildren.count(); k+=2) { for (int k = 0; k< (int) _children.count(); k+=2) {
RegExpWidget* child = _tqchildren.at(k); RegExpWidget* child = _children.at(k);
bool select; bool select;
if ( k == 0 || k == (int)_tqchildren.count()-1) { if ( k == 0 || k == (int)_children.count()-1) {
// The elements at the border is only selected if the parent is selected. // The elements at the border is only selected if the parent is selected.
select = _isSelected; select = _isSelected;
} }
@ -164,12 +164,12 @@ bool MultiContainerWidget::updateSelection(bool parentSelected)
if (accepter) if (accepter)
accepter->_isSelected = select; accepter->_isSelected = select;
if ( select != isChildSel ) if ( select != isChildSel )
child->tqrepaint(); child->repaint();
} }
changed = changed || isSel != _isSelected; changed = changed || isSel != _isSelected;
if ( changed ) { if ( changed ) {
tqrepaint(); repaint();
} }
return changed; return changed;
@ -183,7 +183,7 @@ TQRect MultiContainerWidget::selectionRect() const
return TQRect( mapToGlobal( TQPoint(0,0) ), size() ); return TQRect( mapToGlobal( TQPoint(0,0) ), size() );
else { else {
TQRect res; TQRect res;
TQPtrListIterator<RegExpWidget> it(_tqchildren); TQPtrListIterator<RegExpWidget> it(_children);
++it; // Move past the first dragAccepter ++it; // Move past the first dragAccepter
for ( ; *it; it +=2 ) { for ( ; *it; it +=2 ) {
if ( (*it)->hasSelection() ) { if ( (*it)->hasSelection() ) {
@ -216,8 +216,8 @@ RegExpWidget* MultiContainerWidget::widgetUnderPoint( TQPoint globalPos, bool ju
incr = 1; incr = 1;
} }
for ( unsigned int i = start; i < _tqchildren.count(); i+=incr ) { for ( unsigned int i = start; i < _children.count(); i+=incr ) {
RegExpWidget* wid = _tqchildren.at(i)->widgetUnderPoint( globalPos, justVisibleWidgets ); RegExpWidget* wid = _children.at(i)->widgetUnderPoint( globalPos, justVisibleWidgets );
if ( wid ) if ( wid )
return wid; return wid;
} }
@ -230,8 +230,8 @@ RegExpWidget* MultiContainerWidget::widgetUnderPoint( TQPoint globalPos, bool ju
RegExpWidget* MultiContainerWidget::findWidgetToEdit( TQPoint globalPos ) RegExpWidget* MultiContainerWidget::findWidgetToEdit( TQPoint globalPos )
{ {
for ( unsigned int i = 1; i < _tqchildren.count(); i+=2 ) { for ( unsigned int i = 1; i < _children.count(); i+=2 ) {
RegExpWidget* wid = _tqchildren.at(i)->findWidgetToEdit( globalPos ); RegExpWidget* wid = _children.at(i)->findWidgetToEdit( globalPos );
if ( wid ) if ( wid )
return wid; return wid;
} }
@ -241,7 +241,7 @@ RegExpWidget* MultiContainerWidget::findWidgetToEdit( TQPoint globalPos )
void MultiContainerWidget::selectWidget( bool sel ) void MultiContainerWidget::selectWidget( bool sel )
{ {
RegExpWidget::selectWidget( sel ); RegExpWidget::selectWidget( sel );
TQPtrListIterator<RegExpWidget> it(_tqchildren); TQPtrListIterator<RegExpWidget> it(_children);
for ( ; *it ; ++it ) { for ( ; *it ; ++it ) {
(*it)->selectWidget( sel ); (*it)->selectWidget( sel );
} }
@ -250,7 +250,7 @@ void MultiContainerWidget::selectWidget( bool sel )
void MultiContainerWidget::updateAll() void MultiContainerWidget::updateAll()
{ {
for ( TQPtrListIterator<RegExpWidget> it(_tqchildren); *it ; ++it ) { for ( TQPtrListIterator<RegExpWidget> it(_children); *it ; ++it ) {
(*it)->updateAll(); (*it)->updateAll();
} }
RegExpWidget::updateAll(); RegExpWidget::updateAll();
@ -258,7 +258,7 @@ void MultiContainerWidget::updateAll()
void MultiContainerWidget::updateCursorRecursively() void MultiContainerWidget::updateCursorRecursively()
{ {
for ( TQPtrListIterator<RegExpWidget> it(_tqchildren); *it ; ++it ) { for ( TQPtrListIterator<RegExpWidget> it(_children); *it ; ++it ) {
(*it)->updateCursorRecursively(); (*it)->updateCursorRecursively();
} }
updateCursorShape(); updateCursorShape();

@ -21,7 +21,7 @@
#include "regexpwidget.h" #include "regexpwidget.h"
/** /**
Abstract RegExp widget class representing widgets having multible tqchildren. Abstract RegExp widget class representing widgets having multible children.
@internal @internal
*/ */
class MultiContainerWidget :public RegExpWidget class MultiContainerWidget :public RegExpWidget
@ -43,7 +43,7 @@ public:
protected: protected:
void append( RegExpWidget* child ); void append( RegExpWidget* child );
TQPtrList<RegExpWidget> _tqchildren; TQPtrList<RegExpWidget> _children;
}; };

@ -155,7 +155,7 @@ atom : TOK_LeftParen expression TOK_RightParent {
| TOK_Carat { $<regexp>$ = new PositionRegExp( false, PositionRegExp::BEGLINE ); } | TOK_Carat { $<regexp>$ = new PositionRegExp( false, PositionRegExp::BEGLINE ); }
| TOK_Dot { $<regexp>$ = new DotRegExp( false ); } | TOK_Dot { $<regexp>$ = new DotRegExp( false ); }
| TOK_BackRef { | TOK_BackRef {
QString match = TQString(TQString::fromLocal8Bit("\\%1")).tqarg( $<backRef>1 ); QString match = TQString(TQString::fromLocal8Bit("\\%1")).arg( $<backRef>1 );
$<regexp>$ = new TextRegExp( false, match ); $<regexp>$ = new TextRegExp( false, match );
KMessageBox::information(0,i18n("<qt>Back reference regular expressions are not supported.<p>" KMessageBox::information(0,i18n("<qt>Back reference regular expressions are not supported.<p>"
"<tt>\\1</tt>, <tt>\\2</tt>, ... are <i>back references</i>, meaning they refer to " "<tt>\\1</tt>, <tt>\\2</tt>, ... are <i>back references</i>, meaning they refer to "
@ -165,7 +165,7 @@ atom : TOK_LeftParen expression TOK_RightParent {
"just a workaround to ensure that the application handles the regexp at all. " "just a workaround to ensure that the application handles the regexp at all. "
"Therefore, as soon as you edit the regular expression in the graphical area, " "Therefore, as soon as you edit the regular expression in the graphical area, "
"the back reference will be replaced by matching the text <b>%2</b> literally.") "the back reference will be replaced by matching the text <b>%2</b> literally.")
.tqarg( match ).tqarg( match ), .arg( match ).arg( match ),
i18n("Back reference regular expressions not supported"), i18n("Back reference regular expressions not supported"),
QString::fromLocal8Bit("backReferenceNotSupported") ); QString::fromLocal8Bit("backReferenceNotSupported") );
} }
@ -177,9 +177,9 @@ char : TOK_Char {
if ( $<ch>1 == '{' || $<ch>1 == '}' || $<ch>1 == '[' || $<ch>1 == ']' || $<ch>1 == '\\' ) { if ( $<ch>1 == '{' || $<ch>1 == '}' || $<ch>1 == '[' || $<ch>1 == ']' || $<ch>1 == '\\' ) {
yyerror( "illigal character - needs escaping" ); yyerror( "illigal character - needs escaping" );
} }
$<regexp>$ = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg($<ch>1)); $<regexp>$ = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).arg($<ch>1));
} }
| TOK_EscapeChar { $<regexp>$ = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).tqarg($<ch>1)); } | TOK_EscapeChar { $<regexp>$ = new TextRegExp( false, TQString(TQString::fromLocal8Bit("%1")).arg($<ch>1)); }
; ;
%% %%

@ -48,7 +48,7 @@ TQString TQtRegExpConverter::toString( AltnRegExp* regexp, bool markSelection )
TQString res; TQString res;
bool first = true; bool first = true;
RegExpList list = regexp->tqchildren(); RegExpList list = regexp->children();
for ( RegExpListIt it(list); *it; ++it ) { for ( RegExpListIt it(list); *it; ++it ) {
if ( !first ) { if ( !first ) {
res += TQString::fromLatin1( "|" ); res += TQString::fromLatin1( "|" );
@ -69,7 +69,7 @@ TQString TQtRegExpConverter::toString( ConcRegExp* regexp, bool markSelection )
TQString res; TQString res;
bool childSelected = false; bool childSelected = false;
RegExpList list = regexp->tqchildren(); RegExpList list = regexp->children();
for ( RegExpListIt it(list); *it; ++it ) { for ( RegExpListIt it(list); *it; ++it ) {
TQString startPar = TQString::fromLocal8Bit(""); TQString startPar = TQString::fromLocal8Bit("");
TQString endPar = TQString::fromLocal8Bit(""); TQString endPar = TQString::fromLocal8Bit("");

@ -28,7 +28,7 @@ RegExp::RegExp( bool selected ) : _parent(0), _destructing( false ), _selected(
RegExp::~RegExp() RegExp::~RegExp()
{ {
_destructing = true; _destructing = true;
for ( TQPtrListIterator<RegExp> it(_tqchildren); *it; ++it ) { for ( TQPtrListIterator<RegExp> it(_children); *it; ++it ) {
delete *it; delete *it;
} }
if ( _parent ) if ( _parent )
@ -38,14 +38,14 @@ RegExp::~RegExp()
void RegExp::addChild( RegExp* child ) void RegExp::addChild( RegExp* child )
{ {
_tqchildren.append( child ); _children.append( child );
child->setParent( this ); child->setParent( this );
} }
void RegExp::removeChild( RegExp* child ) void RegExp::removeChild( RegExp* child )
{ {
if ( ! _destructing ) { if ( ! _destructing ) {
_tqchildren.remove( child ); _children.remove( child );
} }
} }

@ -59,7 +59,7 @@ protected:
private: private:
RegExp() {} // disable RegExp() {} // disable
TQPtrList<RegExp> _tqchildren; TQPtrList<RegExp> _children;
RegExp* _parent; RegExp* _parent;
bool _destructing; bool _destructing;
bool _selected; bool _selected;

@ -43,17 +43,17 @@ RegExpWidget::RegExpWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
void RegExpWidget::addNewChild(DragAccepter *, RegExpWidget *) void RegExpWidget::addNewChild(DragAccepter *, RegExpWidget *)
{ {
qFatal("This widget should not expect any tqchildren"); qFatal("This widget should not expect any children");
} }
void RegExpWidget::addNewConcChild(DragAccepter *, ConcWidget *) void RegExpWidget::addNewConcChild(DragAccepter *, ConcWidget *)
{ {
qFatal("This widget should not expect any tqchildren"); qFatal("This widget should not expect any children");
} }
void RegExpWidget::setConcChild(ConcWidget *) void RegExpWidget::setConcChild(ConcWidget *)
{ {
qFatal("This widget should not expect any tqchildren"); qFatal("This widget should not expect any children");
} }
bool RegExpWidget::updateSelection(bool parentSelected) bool RegExpWidget::updateSelection(bool parentSelected)
@ -65,7 +65,7 @@ bool RegExpWidget::updateSelection(bool parentSelected)
if ( _isSelected != selected ) { if ( _isSelected != selected ) {
// Selection state changed // Selection state changed
_isSelected = selected; _isSelected = selected;
tqrepaint(); repaint();
return true; return true;
} }
return false; return false;

@ -49,7 +49,7 @@ public:
virtual void addNewChild(DragAccepter *accepter, RegExpWidget *child); virtual void addNewChild(DragAccepter *accepter, RegExpWidget *child);
/** /**
Inserts all the tqchildren of `child' into this widget in place of Inserts all the children of `child' into this widget in place of
`accepter'. `accepter'.
This method only applies to container widgets (see @ref This method only applies to container widgets (see @ref
SingleContainerWidget, and @ref MultiContainerWidget). SingleContainerWidget, and @ref MultiContainerWidget).
@ -83,7 +83,7 @@ public:
virtual bool isSelected() const; virtual bool isSelected() const;
/** /**
Returns true if this widget or one of its tqchildren is selected. Returns true if this widget or one of its children is selected.
*/ */
virtual bool hasSelection() const; virtual bool hasSelection() const;
@ -93,7 +93,7 @@ public:
Update selection information for this widget. Update selection information for this widget.
@param parentSelected indicates whether the parent is selected. @param parentSelected indicates whether the parent is selected.
@return true if the selection state has changed for the widget since @return true if the selection state has changed for the widget since
the last time the widget was painted. `tqrepaint' is invoked on the widget if the last time the widget was painted. `repaint' is invoked on the widget if
selection state is changed, to ensure that selection is visible. selection state is changed, to ensure that selection is visible.
*/ */
virtual bool updateSelection(bool parentSelected); virtual bool updateSelection(bool parentSelected);

@ -58,7 +58,7 @@ bool RepeatRegExp::load( TQDomElement top, const TQString& version )
if ( !ok ) { if ( !ok ) {
KMessageBox::sorry( 0, i18n("<p>Value for attribute <b>%1</b> was not an integer for element " KMessageBox::sorry( 0, i18n("<p>Value for attribute <b>%1</b> was not an integer for element "
"<b>%2</b></p><p>It contained the value <b>%3</b></p>") "<b>%2</b></p><p>It contained the value <b>%3</b></p>")
.tqarg(TQString::fromLatin1("lower")).tqarg(TQString::fromLatin1("Repeat")).tqarg(lower), .arg(TQString::fromLatin1("lower")).arg(TQString::fromLatin1("Repeat")).arg(lower),
i18n("Error While Loading From XML File") ) ; i18n("Error While Loading From XML File") ) ;
_lower = 0; _lower = 0;
} }
@ -66,7 +66,7 @@ bool RepeatRegExp::load( TQDomElement top, const TQString& version )
if ( !ok ) { if ( !ok ) {
KMessageBox::sorry( 0, i18n("<p>Value for attribute <b>%1</b> was not an integer for element " KMessageBox::sorry( 0, i18n("<p>Value for attribute <b>%1</b> was not an integer for element "
"<b>%2</b></p><p>It contained the value <b>%3</b></p>") "<b>%2</b></p><p>It contained the value <b>%3</b></p>")
.tqarg(TQString::fromLatin1("upper")).tqarg(TQString::fromLatin1("Repeat")).tqarg(upper), .arg(TQString::fromLatin1("upper")).arg(TQString::fromLatin1("Repeat")).arg(upper),
i18n("Error While Loading From XML File") ) ; i18n("Error While Loading From XML File") ) ;
_upper = -1; _upper = -1;
} }

@ -152,7 +152,7 @@ void RepeatWidget::slotConfigCanceled()
TQDataStream stream( _backup, IO_ReadOnly ); TQDataStream stream( _backup, IO_ReadOnly );
KWidgetStreamer streamer; KWidgetStreamer streamer;
streamer.fromStream( stream, TQT_TQOBJECT(_content) ); streamer.fromStream( stream, TQT_TQOBJECT(_content) );
tqrepaint(); repaint();
} }
int RepeatWidget::edit() int RepeatWidget::edit()
@ -271,7 +271,7 @@ TQString RepeatRangeWindow::text()
case ATMOST: return i18n("Repeated at Most 1 Time", "Repeated at Most %n Times", _mostTimes->value() ); case ATMOST: return i18n("Repeated at Most 1 Time", "Repeated at Most %n Times", _mostTimes->value() );
case EXACTLY: return i18n("Repeated Exactly 1 Time", "Repeated Exactly %n Times", _exactlyTimes->value() ); case EXACTLY: return i18n("Repeated Exactly 1 Time", "Repeated Exactly %n Times", _exactlyTimes->value() );
case MINMAX: return i18n("Repeated From %1 to %2 Times") case MINMAX: return i18n("Repeated From %1 to %2 Times")
.tqarg( _rangeFrom->value() ).tqarg( _rangeTo->value() ); .arg( _rangeFrom->value() ).arg( _rangeTo->value() );
} }
qFatal("Fall through!"); qFatal("Fall through!");
return TQString::fromLocal8Bit(""); return TQString::fromLocal8Bit("");

@ -40,7 +40,7 @@ void SelectableLineEdit::setSelected( bool selected )
else { else {
unsetPalette(); unsetPalette();
} }
tqrepaint(); repaint();
} }
TQSize SelectableLineEdit::sizeHint() const TQSize SelectableLineEdit::sizeHint() const
@ -67,7 +67,7 @@ void SelectableLineEdit::slotKeyPressed()
int actualSize = metrics.width( text() ); int actualSize = metrics.width( text() );
if ( actualSize > size().width()-frameWidth ) { if ( actualSize > size().width()-frameWidth ) {
tqrepaint(); repaint();
emit parentPleaseUpdate(); emit parentPleaseUpdate();
} }
} }

@ -33,7 +33,7 @@ bool SingleContainerWidget::updateSelection( bool parentSelected )
bool changed = RegExpWidget::updateSelection( parentSelected ); bool changed = RegExpWidget::updateSelection( parentSelected );
changed = _child->updateSelection( _isSelected ) && changed; changed = _child->updateSelection( _isSelected ) && changed;
if (changed) if (changed)
tqrepaint(); repaint();
return changed; return changed;
} }

@ -127,7 +127,7 @@ bool TextRangeRegExp::load( TQDomElement top, const TQString& /*version*/ )
addRange( from, to ); addRange( from, to );
} }
else { else {
KMessageBox::sorry( 0, i18n("<p>Invalid sub element to element <b>TextRange</b>. Tag was <b>%1</b></p>").tqarg(child.tagName()), KMessageBox::sorry( 0, i18n("<p>Invalid sub element to element <b>TextRange</b>. Tag was <b>%1</b></p>").arg(child.tagName()),
i18n("Error While Loading From XML File") ) ; i18n("Error While Loading From XML File") ) ;
return false; return false;
} }

@ -56,13 +56,13 @@ void TextWidget::init( const TQString& txt )
void TextWidget::slotUpdate() void TextWidget::slotUpdate()
{ {
// I need to force the parent to tqrepaint, as the size change of this // I need to force the parent to repaint, as the size change of this
// widget may not be enough for the parent to change size, and in that // widget may not be enough for the parent to change size, and in that
// case the parent would not tqrepaint, and the text widget would not be // case the parent would not repaint, and the text widget would not be
// resized. // resized.
TQWidget *p = TQT_TQWIDGET(parent()); TQWidget *p = TQT_TQWIDGET(parent());
if (p) if (p)
p->tqrepaint(); p->repaint();
_editorWindow->updateContent( this ); _editorWindow->updateContent( this );
} }

@ -101,7 +101,7 @@ void UserDefinedRegExps::createItems( const TQString& _title, const TQString& di
TQFile file( fileName ); TQFile file( fileName );
if ( ! file.open(IO_ReadOnly) ) { if ( ! file.open(IO_ReadOnly) ) {
KMessageBox::sorry( this, i18n("Could not open file for reading: %1").tqarg(fileName) ); KMessageBox::sorry( this, i18n("Could not open file for reading: %1").arg(fileName) );
continue; continue;
} }
@ -111,7 +111,7 @@ void UserDefinedRegExps::createItems( const TQString& _title, const TQString& di
RegExp* regexp = WidgetFactory::createRegExp( data ); RegExp* regexp = WidgetFactory::createRegExp( data );
if ( ! regexp ) { if ( ! regexp ) {
KMessageBox::sorry( this, i18n("File %1 containing user defined regular expression contained an error").tqarg( fileName ) ); KMessageBox::sorry( this, i18n("File %1 containing user defined regular expression contained an error").arg( fileName ) );
continue; continue;
} }
@ -200,7 +200,7 @@ void UserDefinedRegExps::slotEdit( TQListViewItem* item, const TQPoint& pos )
TQString fileName = WidgetWinItem::path() + TQString::fromLocal8Bit("/") + txt + TQString::fromLocal8Bit(".regexp"); TQString fileName = WidgetWinItem::path() + TQString::fromLocal8Bit("/") + txt + TQString::fromLocal8Bit(".regexp");
TQFileInfo finfo( fileName ); TQFileInfo finfo( fileName );
if ( finfo.exists() ) { if ( finfo.exists() ) {
int answer = KMessageBox::warningYesNo( this, i18n("<p>Overwrite named regular expression <b>%1</b>?</p>").tqarg(txt), TQString(), i18n("Overwrite"), i18n("Do Not Overwrite") ); int answer = KMessageBox::warningYesNo( this, i18n("<p>Overwrite named regular expression <b>%1</b>?</p>").arg(txt), TQString(), i18n("Overwrite"), i18n("Do Not Overwrite") );
if ( answer != KMessageBox::Yes ) if ( answer != KMessageBox::Yes )
return; return;

@ -97,7 +97,7 @@ void Verifier::setMinimal( bool b )
// //
// void Verifier::gotoNum( int which ) // void Verifier::gotoNum( int which )
// { // {
// TQString anchor = TQString::fromLatin1("match%1").tqarg(which); // TQString anchor = TQString::fromLatin1("match%1").arg(which);
// scrollToAnchor( anchor ); // scrollToAnchor( anchor );
// _current = which; // _current = which;
// emit currentChanged( _current ); // emit currentChanged( _current );

@ -162,7 +162,7 @@ RegExp* WidgetFactory::createRegExp( TQDomElement node, const TQString& version
else if ( tag == TQString::fromLocal8Bit( "Repeat" ) ) else if ( tag == TQString::fromLocal8Bit( "Repeat" ) )
regexp = new RepeatRegExp( false ); regexp = new RepeatRegExp( false );
else { else {
KMessageBox::sorry( 0, i18n("<p>Unknown tag while reading XML. Tag was <b>%1</b></p>").tqarg(tag), KMessageBox::sorry( 0, i18n("<p>Unknown tag while reading XML. Tag was <b>%1</b></p>").arg(tag),
i18n("Error While Loading From XML File") ) ; i18n("Error While Loading From XML File") ) ;
return 0; return 0;
@ -191,14 +191,14 @@ RegExp* WidgetFactory::createRegExp( TQString str )
// Read the RegularExpression element, and extract the version. // Read the RegularExpression element, and extract the version.
TQDomElement top = doc.documentElement(); TQDomElement top = doc.documentElement();
if (! (top.tagName() == TQString::fromLocal8Bit("RegularExpression")) ) { if (! (top.tagName() == TQString::fromLocal8Bit("RegularExpression")) ) {
KMessageBox::sorry( 0, i18n("<p>XML file did not contain a <b>%1</b> tag.</p>").tqarg(TQString::fromLatin1("RegularExpression")), KMessageBox::sorry( 0, i18n("<p>XML file did not contain a <b>%1</b> tag.</p>").arg(TQString::fromLatin1("RegularExpression")),
i18n("Error While Loading From XML File") ) ; i18n("Error While Loading From XML File") ) ;
} }
TQString version = top.attribute( TQString::fromLocal8Bit("version"), KRegExpEditorGUI::version ); TQString version = top.attribute( TQString::fromLocal8Bit("version"), KRegExpEditorGUI::version );
TQDomNode child = top.firstChild(); TQDomNode child = top.firstChild();
if ( ! child.isElement() ) { if ( ! child.isElement() ) {
KMessageBox::sorry( 0, i18n("<p>Error while reading XML file. The element just below the tag " KMessageBox::sorry( 0, i18n("<p>Error while reading XML file. The element just below the tag "
"<b>%1</b> was not an element.</p>").tqarg(TQString::fromLatin1("RegularExpression")), "<b>%1</b> was not an element.</p>").arg(TQString::fromLatin1("RegularExpression")),
i18n("Error While Loading From XML File") ) ; i18n("Error While Loading From XML File") ) ;
} }

@ -39,7 +39,7 @@ ZeroWidget::ZeroWidget(TQString txt, RegExpEditorWindow* editorWindow,
void ZeroWidget::addNewChild(DragAccepter *, RegExpWidget *) void ZeroWidget::addNewChild(DragAccepter *, RegExpWidget *)
{ {
qFatal("No tqchildren should be added to this widget!"); qFatal("No children should be added to this widget!");
} }
TQSize ZeroWidget::sizeHint() const TQSize ZeroWidget::sizeHint() const

@ -122,7 +122,7 @@ void KSim::ConfigDialog::removePage(const TQCString &name)
const KSim::Plugin &plugin = KSim::PluginLoader::self().find(name); const KSim::Plugin &plugin = KSim::PluginLoader::self().find(name);
if (plugin.isNull() || !plugin.configPage()) { if (plugin.isNull() || !plugin.configPage()) {
KMessageBox::sorry(0, i18n("Failed to remove %1's config page due to the " KMessageBox::sorry(0, i18n("Failed to remove %1's config page due to the "
"plugin not being loaded or the config page has not been created").tqarg(name.data())); "plugin not being loaded or the config page has not been created").arg(name.data()));
return; return;
} }
@ -148,7 +148,7 @@ void KSim::ConfigDialog::createPage(const KSim::Plugin &plugin)
if (plugin.isNull() || !plugin.configPage()) { if (plugin.isNull() || !plugin.configPage()) {
KMessageBox::sorry(0, i18n("Failed to add %1's config page due to the plugin" KMessageBox::sorry(0, i18n("Failed to add %1's config page due to the plugin"
" not being loaded or the config page has not been created") " not being loaded or the config page has not been created")
.tqarg(plugin.libName().data())); .arg(plugin.libName().data()));
return; return;
} }
@ -156,7 +156,7 @@ void KSim::ConfigDialog::createPage(const KSim::Plugin &plugin)
TQStringList list; TQStringList list;
list << ' ' + i18n("Plugins") << ' ' + plugin.name(); list << ' ' + i18n("Plugins") << ' ' + plugin.name();
TQFrame *pluginFrame = addHBoxPage(list, i18n("%1 Options").tqarg(plugin.name()), TQFrame *pluginFrame = addHBoxPage(list, i18n("%1 Options").arg(plugin.name()),
plugin.icon()); plugin.icon());
plugin.configPage()->reparent(pluginFrame, TQPoint(0, 0), true); plugin.configPage()->reparent(pluginFrame, TQPoint(0, 0), true);

@ -173,7 +173,7 @@ void KSim::Sysinfo::sysUpdate()
} }
// if (m_config->showProcs()) { // if (m_config->showProcs()) {
// m_procsLabel->setText(i18n("Procs: %1").tqarg(sysInfo.procs)); // m_procsLabel->setText(i18n("Procs: %1").arg(sysInfo.procs));
// } // }
} }
@ -274,7 +274,7 @@ void KSim::Sysinfo::createView()
m_procsLabel = 0L; m_procsLabel = 0L;
}*/ }*/
// m_layout->tqinvalidate(); // m_layout->invalidate();
updateGeometry(); updateGeometry();
adjustSize(); adjustSize();

@ -226,7 +226,7 @@ void KSim::MainView::maskMainView()
TQBitmap rightPixmap(*m_rightFrame->background()->mask()); TQBitmap rightPixmap(*m_rightFrame->background()->mask());
TQBitmap bottomPixmap(*m_bottomFrame->background()->mask()); TQBitmap bottomPixmap(*m_bottomFrame->background()->mask());
TQSize insideSize(m_pluginLayout->tqgeometry().size()); TQSize insideSize(m_pluginLayout->geometry().size());
// make a cleared bigrect where we can put our pixmap masks on // make a cleared bigrect where we can put our pixmap masks on
TQBitmap bigBitmap(topLevelWidget()->size(), true); TQBitmap bigBitmap(topLevelWidget()->size(), true);
@ -243,7 +243,7 @@ void KSim::MainView::maskMainView()
painter.begin(&bigBitmap); painter.begin(&bigBitmap);
painter.setBrush(color1); painter.setBrush(color1);
painter.setPen(color1); painter.setPen(color1);
TQRect rect = m_pluginLayout->tqgeometry(); TQRect rect = m_pluginLayout->geometry();
rect.moveBy(ofsX, ofsY); rect.moveBy(ofsX, ofsY);
painter.drawRect(rect); painter.drawRect(rect);
painter.drawPixmap(ofsX, ofsY, topPixmap); painter.drawPixmap(ofsX, ofsY, topPixmap);

@ -263,7 +263,7 @@ void KSim::Chart::configureObject(bool repaintWidget)
d->krell->show(); d->krell->show();
} }
// Update our tqgeometry if we need to let any // Update our geometry if we need to let any
// tqlayout know about our sizeHint() change // tqlayout know about our sizeHint() change
if (oldSize != sizeHint()) { if (oldSize != sizeHint()) {
// Using resize() here seems to be needed // Using resize() here seems to be needed
@ -333,19 +333,19 @@ void KSim::Chart::setDisplayMeter(bool value)
void KSim::Chart::setText(const TQString &in, const TQString &out) void KSim::Chart::setText(const TQString &in, const TQString &out)
{ {
bool tqrepaint = false; bool repaint = false;
if (d->inText != in) { if (d->inText != in) {
tqrepaint = true; repaint = true;
d->inText = in; d->inText = in;
} }
if (d->outText != out) { if (d->outText != out) {
tqrepaint = true; repaint = true;
d->outText = out; d->outText = out;
} }
if (tqrepaint) if (repaint)
update(); update();
} }
@ -407,13 +407,13 @@ void KSim::Chart::setValue(int valueIn, int valueOut)
void KSim::Chart::setConfigValues() void KSim::Chart::setConfigValues()
{ {
TQFont newFont = font(); TQFont newFont = font();
bool tqrepaint = themeLoader().current().fontColours(this, bool repaint = themeLoader().current().fontColours(this,
newFont, d->mColour, d->sColour, d->showShadow); newFont, d->mColour, d->sColour, d->showShadow);
if (font() != newFont) if (font() != newFont)
setFont(newFont); setFont(newFont);
if (tqrepaint) if (repaint)
update(); update();
} }
@ -446,7 +446,7 @@ void KSim::Chart::paintEvent(TQPaintEvent *)
const TQSize &size = chartSize(); const TQSize &size = chartSize();
TQPixmap pixmap(size); TQPixmap pixmap(size);
TQPainter painter; TQPainter painter;
painter.tqbegin(&pixmap, this); painter.begin(&pixmap, this);
int location = size.height() / 5; int location = size.height() / 5;
painter.drawPixmap(0, 0, d->chartPixmap); painter.drawPixmap(0, 0, d->chartPixmap);
@ -521,7 +521,7 @@ void KSim::Chart::drawChart()
TQPainter painter; TQPainter painter;
d->graphData.setMask(drawMask(&painter)); d->graphData.setMask(drawMask(&painter));
painter.tqbegin(&d->graphData, this); painter.begin(&d->graphData, this);
int position = width() - 1; int position = width() - 1;
TQValueList<Private::ValuePair>::ConstIterator it; TQValueList<Private::ValuePair>::ConstIterator it;
@ -553,7 +553,7 @@ TQSize KSim::Chart::chartSize() const
TQBitmap KSim::Chart::drawMask(TQPainter *painter) TQBitmap KSim::Chart::drawMask(TQPainter *painter)
{ {
TQBitmap bitmap(chartSize(), true); TQBitmap bitmap(chartSize(), true);
painter->tqbegin(&bitmap, this); painter->begin(&bitmap, this);
painter->setPen(color1); painter->setPen(color1);
int position = width() - 1; int position = width() - 1;

@ -136,10 +136,10 @@ void KSim::Label::clear()
void KSim::Label::setText(const TQString &text) void KSim::Label::setText(const TQString &text)
{ {
if (text == d->text) if (text == d->text)
return; // If the text is the same, no need to tqrepaint etc return; // If the text is the same, no need to repaint etc
TQSize oldSize = sizeHint(); TQSize oldSize = sizeHint();
// set the text of our widget and tqrepaint // set the text of our widget and repaint
d->text = text; d->text = text;
relayoutLabel(oldSize); relayoutLabel(oldSize);
} }
@ -183,13 +183,13 @@ const TQColor &KSim::Label::shadowColour() const
void KSim::Label::setConfigValues() void KSim::Label::setConfigValues()
{ {
TQFont newFont = font(); TQFont newFont = font();
bool tqrepaint = themeLoader().current().fontColours(this, bool repaint = themeLoader().current().fontColours(this,
newFont, d->mColour, d->sColour, d->showShadow); newFont, d->mColour, d->sColour, d->showShadow);
if (font() != newFont) if (font() != newFont)
setFont(newFont); setFont(newFont);
if (tqrepaint) if (repaint)
update(); update();
} }
@ -276,13 +276,13 @@ void KSim::Label::setThemePixmap(const TQString &image)
relayoutLabel(oldSize); relayoutLabel(oldSize);
} }
void KSim::Label::relayoutLabel(const TQSize &old, bool tqrepaint) void KSim::Label::relayoutLabel(const TQSize &old, bool repaint)
{ {
if (sizeHint() != old) { if (sizeHint() != old) {
updateGeometry(); updateGeometry();
} }
if (tqrepaint) if (repaint)
update(); update();
} }

@ -196,7 +196,7 @@ namespace KSim
* sets the background image to be painted * sets the background image to be painted
*/ */
void setThemePixmap(const TQString &image); void setThemePixmap(const TQString &image);
void relayoutLabel(const TQSize &old, bool tqrepaint = true); void relayoutLabel(const TQSize &old, bool repaint = true);
private: private:
/** /**

@ -88,7 +88,7 @@ namespace KSim
*/ */
Type type() const; Type type() const;
/** /**
* Force the Led to tqrepaint its state * Force the Led to repaint its state
*/ */
void update(); void update();

@ -92,13 +92,13 @@ bool KSim::PluginLoader::loadPlugin(const KDesktopFile &file)
case KSim::PluginLoader::EmptyLibName: case KSim::PluginLoader::EmptyLibName:
KMessageBox::error(0, i18n("KSim was unable to load the plugin %1" KMessageBox::error(0, i18n("KSim was unable to load the plugin %1"
" due to the X-KSIM-LIBRARY property being empty in the" " due to the X-KSIM-LIBRARY property being empty in the"
" plugins desktop file").tqarg(file.readName())); " plugins desktop file").arg(file.readName()));
return false; return false;
break; break;
case KSim::PluginLoader::LibNotFound: case KSim::PluginLoader::LibNotFound:
KMessageBox::error(0, i18n("KSim was unable to load the plugin %1" KMessageBox::error(0, i18n("KSim was unable to load the plugin %1"
" due to not being able to find the plugin, check that the plugin" " due to not being able to find the plugin, check that the plugin"
" is installed and is in your $TDEDIR/lib path").tqarg(file.readName())); " is installed and is in your $TDEDIR/lib path").arg(file.readName()));
return false; return false;
break; break;
case KSim::PluginLoader::UnSymbols: case KSim::PluginLoader::UnSymbols:
@ -108,8 +108,8 @@ bool KSim::PluginLoader::loadPlugin(const KDesktopFile &file)
" macro</li>\n<li>The plugin has been damaged or has" " macro</li>\n<li>The plugin has been damaged or has"
" some unresolved symbols</li>\n</ul> \nLast" " some unresolved symbols</li>\n</ul> \nLast"
" error message that occurred: \n%3</qt>") " error message that occurred: \n%3</qt>")
.tqarg(d->lib.prepend("ksim_")).tqarg("KSIM_INIT_PLUGIN") .arg(d->lib.prepend("ksim_")).arg("KSIM_INIT_PLUGIN")
.tqarg(d->error)); .arg(d->error));
return false; return false;
break; break;
default: default:

@ -718,14 +718,14 @@ bool KSim::Theme::fontColours(int type, const TQString &string, TQFont &font,
TQColor &text, TQColor &shadow, bool &showShadow) const TQColor &text, TQColor &shadow, bool &showShadow) const
{ {
TQString key = KSim::Types::typeToString(type, false); TQString key = KSim::Types::typeToString(type, false);
bool tqrepaint = false; bool repaint = false;
// set colours from the string 'key' // set colours from the string 'key'
if (!readEntry(string, key + ".textcolor").isEmpty()) { if (!readEntry(string, key + ".textcolor").isEmpty()) {
text= textColour(string, key + ".textcolor"); text= textColour(string, key + ".textcolor");
shadow = shadowColour(string, key + ".textcolor"); shadow = shadowColour(string, key + ".textcolor");
showShadow = textShadow(string, key + ".textcolor"); showShadow = textShadow(string, key + ".textcolor");
tqrepaint = true; repaint = true;
} }
else { else {
text= textColour(string, "*.textcolor"); text= textColour(string, "*.textcolor");
@ -737,14 +737,14 @@ bool KSim::Theme::fontColours(int type, const TQString &string, TQFont &font,
if (!readEntry(string, key + ".font").isEmpty()) { if (!readEntry(string, key + ".font").isEmpty()) {
if (KSim::ThemeLoader::currentFontItem() != 3) { if (KSim::ThemeLoader::currentFontItem() != 3) {
font = readFontEntry(string, key + ".font"); font = readFontEntry(string, key + ".font");
tqrepaint = true; repaint = true;
} }
} }
else { else {
font = currentFont(); font = currentFont();
} }
return tqrepaint; return repaint;
} }
bool KSim::Theme::fontColours(const KSim::Base *const base, TQFont &font, bool KSim::Theme::fontColours(const KSim::Base *const base, TQFont &font,

@ -201,7 +201,7 @@ void CpuView::updateView()
cpuDiff = 100; cpuDiff = 100;
} }
current.chart()->setText(i18n("%1%").tqarg(cpuDiff)); current.chart()->setText(i18n("%1%").arg(cpuDiff));
current.chart()->setValue(cpuDiff, 0); current.chart()->setValue(cpuDiff, 0);
current.label()->setValue(cpuDiff); current.label()->setValue(cpuDiff);
} }
@ -420,7 +420,7 @@ CpuConfig::CpuConfig(KSim::PluginObject *parent, const char *name)
for (uint i = 0; i < addCpus(); ++i) for (uint i = 0; i < addCpus(); ++i)
{ {
TQCheckListItem *item = new TQCheckListItem(m_listView, i18n("cpu %1").tqarg(i), TQCheckListItem::CheckBox); TQCheckListItem *item = new TQCheckListItem(m_listView, i18n("cpu %1").arg(i), TQCheckListItem::CheckBox);
item->setText(1, "%T"); item->setText(1, "%T");
} }
} }

@ -216,13 +216,13 @@ void DiskView::updateDisplay()
if (m_useSeperatly) { if (m_useSeperatly) {
it.current()->first->setValue(diskData.readBlocks, diskData.writeBlocks); it.current()->first->setValue(diskData.readBlocks, diskData.writeBlocks);
it.current()->first->setText(i18n("in: %1k") it.current()->first->setText(i18n("in: %1k")
.tqarg(KGlobal::locale()->formatNumber((float)diskData.readBlocks / 1024.0, 1)), .arg(KGlobal::locale()->formatNumber((float)diskData.readBlocks / 1024.0, 1)),
i18n("out: %1k").tqarg(KGlobal::locale()->formatNumber((float)diskData.writeBlocks / 1024.0, 1))); i18n("out: %1k").arg(KGlobal::locale()->formatNumber((float)diskData.writeBlocks / 1024.0, 1)));
} }
else { else {
it.current()->first->setValue(diff, 0); it.current()->first->setValue(diff, 0);
it.current()->first->setText(i18n("%1k") it.current()->first->setText(i18n("%1k")
.tqarg(KGlobal::locale()->formatNumber((float)diff / 1024.0, 1))); .arg(KGlobal::locale()->formatNumber((float)diff / 1024.0, 1)));
} }
it.current()->second->setMaxValue(it.current()->first->maxValue()); it.current()->second->setMaxValue(it.current()->first->maxValue());
@ -239,7 +239,7 @@ void DiskView::updateData(DiskList &disks)
if (!m_procStream) if (!m_procStream)
return; return;
m_procStream->tqdevice()->reset(); m_procStream->device()->reset();
fseek(m_procFile, 0L, SEEK_SET); fseek(m_procFile, 0L, SEEK_SET);
if (m_bLinux24) if (m_bLinux24)
@ -430,7 +430,7 @@ TQString DiskView::diskName( int major, int minor ) const
break; break;
} }
returnValue.tqat(2) = returnValue.tqat(2).latin1() + minor; returnValue.at(2) = returnValue.at(2).latin1() + minor;
return returnValue; return returnValue;
#else #else
Q_UNUSED(major); Q_UNUSED(major);

@ -189,7 +189,7 @@ void FilesystemWidget::processExited(KProcess *)
TQStringList::Iterator it; TQStringList::Iterator it;
for (it = errorList.begin(); it != errorList.end(); ++it) { for (it = errorList.begin(); it != errorList.end(); ++it) {
message += TQString::fromLatin1("<li>%1</li>") message += TQString::fromLatin1("<li>%1</li>")
.tqarg((*it).replace(TQRegExp("[u]?mount: "), TQString())); .arg((*it).replace(TQRegExp("[u]?mount: "), TQString()));
} }
message += TQString::fromLatin1("</ul></qt>"); message += TQString::fromLatin1("</ul></qt>");

@ -195,17 +195,17 @@ void I8KView::updateView()
} }
if ( rightspeed > 0 ) if ( rightspeed > 0 )
m_fan1Label->setText( i18n( "Right fan: %1 RPM" ).tqarg( rightspeed ) ); m_fan1Label->setText( i18n( "Right fan: %1 RPM" ).arg( rightspeed ) );
else else
m_fan1Label->setText( i18n( "Right fan: Off" ) ); m_fan1Label->setText( i18n( "Right fan: Off" ) );
if ( leftspeed > 0 ) if ( leftspeed > 0 )
m_fan2Label->setText( i18n( "Left fan: %1 RPM" ).tqarg( leftspeed ) ); m_fan2Label->setText( i18n( "Left fan: %1 RPM" ).arg( leftspeed ) );
else else
m_fan2Label->setText( i18n( "Left fan: Off" ) ); m_fan2Label->setText( i18n( "Left fan: Off" ) );
m_tempLabel->setText( i18n( "CPU temp: %1°%2" ).tqarg( cputemp ) m_tempLabel->setText( i18n( "CPU temp: %1°%2" ).arg( cputemp )
.tqarg( m_unit ) ); .arg( m_unit ) );
} }
I8KConfig::I8KConfig(KSim::PluginObject *parent, const char *name) I8KConfig::I8KConfig(KSim::PluginObject *parent, const char *name)

@ -101,7 +101,7 @@ MailLabel::~MailLabel()
{ {
} }
void MailLabel::configureObject( bool tqrepaint ) void MailLabel::configureObject( bool repaint )
{ {
m_envelope.load( themeLoader().current().mailPixmap() ); m_envelope.load( themeLoader().current().mailPixmap() );
m_frames = themeLoader().current().mailFrames(); m_frames = themeLoader().current().mailFrames();
@ -112,7 +112,7 @@ void MailLabel::configureObject( bool tqrepaint )
setPixmap( frame( m_envelope, 1 ) ); setPixmap( frame( m_envelope, 1 ) );
KSim::Label::configureObject( tqrepaint ); KSim::Label::configureObject( repaint );
} }
void MailLabel::paintEvent( TQPaintEvent* e ) void MailLabel::paintEvent( TQPaintEvent* e )

@ -356,7 +356,7 @@ void NetView::updateGraph()
if ( ( *it ).label() ) if ( ( *it ).label() )
{ {
timeDisplay = ( *it ).format(); timeDisplay = ( *it ).format();
newPid = pid.tqarg( ( *it ).name() ); newPid = pid.arg( ( *it ).name() );
if ( TQFile::exists( newPid ) && stat( TQFile::encodeName( newPid ).data(), &st ) == 0 ) if ( TQFile::exists( newPid ) && stat( TQFile::encodeName( newPid ).data(), &st ) == 0 )
{ {
@ -394,16 +394,16 @@ void NetView::updateGraph()
TQString receiveString = KGlobal::locale()->formatNumber( ( float ) receiveDiff / 1024.0, 1 ); TQString receiveString = KGlobal::locale()->formatNumber( ( float ) receiveDiff / 1024.0, 1 );
TQString sendString = KGlobal::locale()->formatNumber( ( float ) sendDiff / 1024.0, 1 ); TQString sendString = KGlobal::locale()->formatNumber( ( float ) sendDiff / 1024.0, 1 );
( *it ).chart()->setText( i18n( "in: %1k" ).tqarg( receiveString ), ( *it ).chart()->setText( i18n( "in: %1k" ).arg( receiveString ),
i18n( "out: %1k" ).tqarg( sendString ) ); i18n( "out: %1k" ).arg( sendString ) );
} }
else else
{ {
( *it ).setData( NetData() ); ( *it ).setData( NetData() );
( *it ).chart()->setValue( 0, 0 ); ( *it ).chart()->setValue( 0, 0 );
( *it ).chart()->setText( i18n( "in: %1k" ).tqarg( KGlobal::locale()->formatNumber( 0.0, 1 ) ), ( *it ).chart()->setText( i18n( "in: %1k" ).arg( KGlobal::locale()->formatNumber( 0.0, 1 ) ),
i18n( "out: %1k" ).tqarg( KGlobal::locale()->formatNumber( 0.0, 1 ) ) ); i18n( "out: %1k" ).arg( KGlobal::locale()->formatNumber( 0.0, 1 ) ) );
if ( ( *it ).label() ) if ( ( *it ).label() )
( *it ).label()->setText( i18n( "offline" ) ); ( *it ).label()->setText( i18n( "offline" ) );

@ -144,8 +144,8 @@ void NetConfig::menu(KListView *, TQListViewItem *item, const TQPoint &)
if (item) { if (item) {
aboutMenu->insertItem(i18n("&Add Net Device"), 3); aboutMenu->insertItem(i18n("&Add Net Device"), 3);
aboutMenu->insertItem(i18n("&Modify '%1'").tqarg(item->text(0)), 2); aboutMenu->insertItem(i18n("&Modify '%1'").arg(item->text(0)), 2);
aboutMenu->insertItem(i18n("&Remove '%1'").tqarg(item->text(0)), 1); aboutMenu->insertItem(i18n("&Remove '%1'").arg(item->text(0)), 1);
} }
else { else {
aboutMenu->insertItem(i18n("&Add Net Device"), 3); aboutMenu->insertItem(i18n("&Add Net Device"), 3);
@ -217,7 +217,7 @@ void NetConfig::removeItem(TQListViewItem *item)
return; return;
int result = KMessageBox::warningContinueCancel(0, i18n("Are you sure you " int result = KMessageBox::warningContinueCancel(0, i18n("Are you sure you "
"want to remove the net interface '%1'?").tqarg(item->text(0)), TQString(), KStdGuiItem::del()); "want to remove the net interface '%1'?").arg(item->text(0)), TQString(), KStdGuiItem::del());
if (result == KMessageBox::Cancel) if (result == KMessageBox::Cancel)
return; return;

@ -104,7 +104,7 @@
<property name="text"> <property name="text">
<string>The text in the edit box is what is displayed except that any occurrence of &lt;b&gt;%s&lt;/b&gt; will be replaced with the snmp object value and any occurrence of &lt;b&gt;%n&lt;/b&gt; will be replaced with the name of this monitor (see Name input field) .</string> <string>The text in the edit box is what is displayed except that any occurrence of &lt;b&gt;%s&lt;/b&gt; will be replaced with the snmp object value and any occurrence of &lt;b&gt;%n&lt;/b&gt; will be replaced with the name of this monitor (see Name input field) .</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignVCenter</set> <set>WordBreak|AlignVCenter</set>
</property> </property>
</widget> </widget>

@ -30,7 +30,7 @@ ProbeResultDialog::ProbeResultDialog( const HostConfig &hostConfig, const ProbeD
TQWidget *parent, const char *name ) TQWidget *parent, const char *name )
: ProbeResultDialogBase( parent, name ) : ProbeResultDialogBase( parent, name )
{ {
info->setText( i18n( "Results of scanning host %1:" ).tqarg( hostConfig.name ) ); info->setText( i18n( "Results of scanning host %1:" ).arg( hostConfig.name ) );
for ( ProbeDialog::ProbeResultList::ConstIterator it = probeResults.begin(); for ( ProbeDialog::ProbeResultList::ConstIterator it = probeResults.begin();
it != probeResults.end(); ++it ) it != probeResults.end(); ++it )

@ -321,7 +321,7 @@ TQString Value::formatTimeTicks( int ticks, int conversionFlags )
if ( days > 0 ) if ( days > 0 )
result += TQString::number( days ) + "d:"; result += TQString::number( days ) + "d:";
result += TQString(TQString::fromAscii( "%1h:%2m" )).tqarg( hours ).tqarg( minutes ); result += TQString(TQString::fromAscii( "%1h:%2m" )).arg( hours ).arg( minutes );
if ( conversionFlags & TimeTicksWithSeconds ) if ( conversionFlags & TimeTicksWithSeconds )
result += ":" + TQString::number( seconds ) + "s"; result += ":" + TQString::number( seconds ) + "s";

@ -249,7 +249,7 @@ void KTimerPref::saveJobs( KConfig *cfg )
int num = 0; int num = 0;
KTimerJobItem *item = static_cast<KTimerJobItem*>(m_list->firstChild()); KTimerJobItem *item = static_cast<KTimerJobItem*>(m_list->firstChild());
while( item ) { while( item ) {
item->job()->save( cfg, TQString("Job%1").tqarg( num ) ); item->job()->save( cfg, TQString("Job%1").arg( num ) );
item = static_cast<KTimerJobItem*>(item->nextSibling()); item = static_cast<KTimerJobItem*>(item->nextSibling());
num++; num++;
} }
@ -280,7 +280,7 @@ void KTimerPref::loadJobs( KConfig *cfg )
connect( job, TQT_SIGNAL(finished(KTimerJob*,bool)), connect( job, TQT_SIGNAL(finished(KTimerJob*,bool)),
TQT_SLOT(jobFinished(KTimerJob*,bool)) ); TQT_SLOT(jobFinished(KTimerJob*,bool)) );
job->load( cfg, TQString( "Job%1" ).tqarg(n) ); job->load( cfg, TQString( "Job%1" ).arg(n) );
job->setUser( item ); job->setUser( item );
} }

@ -40,7 +40,7 @@
*/ */
KWalletFolderItem::KWalletFolderItem(KWallet::Wallet *w, TQListView* parent, const TQString &name, int entries) KWalletFolderItem::KWalletFolderItem(KWallet::Wallet *w, TQListView* parent, const TQString &name, int entries)
: KListViewItem(parent),_wallet(w),_name(name),_entries(entries) { : KListViewItem(parent),_wallet(w),_name(name),_entries(entries) {
setText(0, TQString("%1 (%2)").tqarg(_name).tqarg(_entries)); setText(0, TQString("%1 (%2)").arg(_name).arg(_entries));
setRenameEnabled(0, false); setRenameEnabled(0, false);
setDragEnabled(true); setDragEnabled(true);
setDropEnabled(true); setDropEnabled(true);
@ -66,7 +66,7 @@ TQPixmap KWalletFolderItem::getFolderIcon(KIcon::Group group){
void KWalletFolderItem::refresh() { void KWalletFolderItem::refresh() {
TQString saveFolder = _wallet->currentFolder(); TQString saveFolder = _wallet->currentFolder();
_wallet->setFolder(_name); _wallet->setFolder(_name);
setText(0, TQString("%1 (%2)").tqarg(_name).tqarg(_wallet->entryList().count())); setText(0, TQString("%1 (%2)").arg(_name).arg(_wallet->entryList().count()));
_wallet->setFolder(saveFolder); _wallet->setFolder(saveFolder);
} }
@ -194,7 +194,7 @@ static bool decodeEntry(KWallet::Wallet *_wallet, TQDataStream& ds) {
KWallet::Wallet::EntryType et; KWallet::Wallet::EntryType et;
ds >> name; ds >> name;
if (_wallet->hasEntry(name)) { if (_wallet->hasEntry(name)) {
int rc = KMessageBox::warningContinueCancel(0L, i18n("An entry by the name '%1' already exists. Would you like to continue?").tqarg(name)); int rc = KMessageBox::warningContinueCancel(0L, i18n("An entry by the name '%1' already exists. Would you like to continue?").arg(name));
if (rc == KMessageBox::Cancel) { if (rc == KMessageBox::Cancel) {
return false; return false;
} }
@ -217,7 +217,7 @@ static bool decodeFolder(KWallet::Wallet *_wallet, TQDataStream& ds) {
TQString folder; TQString folder;
ds >> folder; ds >> folder;
if (_wallet->hasFolder(folder)) { if (_wallet->hasFolder(folder)) {
int rc = KMessageBox::warningYesNoCancel(0L, i18n("A folder by the name '%1' already exists. What would you like to do?").tqarg(folder), TQString(), KStdGuiItem::cont(), i18n("Replace")); int rc = KMessageBox::warningYesNoCancel(0L, i18n("A folder by the name '%1' already exists. What would you like to do?").arg(folder), TQString(), KStdGuiItem::cont(), i18n("Replace"));
if (rc == KMessageBox::Cancel) { if (rc == KMessageBox::Cancel) {
return false; return false;
} }

@ -293,7 +293,7 @@ void KWalletEditor::deleteFolder() {
return; return;
} }
int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the folder '%1' from the wallet?").tqarg(fi->name()),"",KStdGuiItem::del()); int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the folder '%1' from the wallet?").arg(fi->name()),"",KStdGuiItem::del());
if (rc == KMessageBox::Continue) { if (rc == KMessageBox::Continue) {
bool rc = _w->removeFolder(fi->name()); bool rc = _w->removeFolder(fi->name());
if (!rc) { if (!rc) {
@ -366,7 +366,7 @@ void KWalletEditor::saveEntry() {
} }
} }
KMessageBox::sorry(this, i18n("Error saving entry. Error code: %1").tqarg(rc)); KMessageBox::sorry(this, i18n("Error saving entry. Error code: %1").arg(rc));
} }
@ -402,7 +402,7 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) {
if (_w->readPassword(item->text(0), pass) == 0) { if (_w->readPassword(item->text(0), pass) == 0) {
_ww->_entryStack->raiseWidget(int(4)); _ww->_entryStack->raiseWidget(int(4));
_ww->_entryName->setText(i18n("Password: %1") _ww->_entryName->setText(i18n("Password: %1")
.tqarg(item->text(0))); .arg(item->text(0)));
_ww->_passwordValue->setText(pass); _ww->_passwordValue->setText(pass);
_ww->_saveChanges->setEnabled(false); _ww->_saveChanges->setEnabled(false);
_ww->_undoChanges->setEnabled(false); _ww->_undoChanges->setEnabled(false);
@ -413,7 +413,7 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) {
showHideMapEditorValue(false); showHideMapEditorValue(false);
if (_w->readMap(item->text(0), _currentMap) == 0) { if (_w->readMap(item->text(0), _currentMap) == 0) {
_mapEditor->reload(); _mapEditor->reload();
_ww->_entryName->setText(i18n("Name-Value Map: %1").tqarg(item->text(0))); _ww->_entryName->setText(i18n("Name-Value Map: %1").arg(item->text(0)));
_ww->_saveChanges->setEnabled(false); _ww->_saveChanges->setEnabled(false);
_ww->_undoChanges->setEnabled(false); _ww->_undoChanges->setEnabled(false);
} }
@ -422,7 +422,7 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) {
TQByteArray ba; TQByteArray ba;
if (_w->readEntry(item->text(0), ba) == 0) { if (_w->readEntry(item->text(0), ba) == 0) {
_ww->_entryName->setText(i18n("Binary Data: %1") _ww->_entryName->setText(i18n("Binary Data: %1")
.tqarg(item->text(0))); .arg(item->text(0)));
_ww->_saveChanges->setEnabled(false); _ww->_saveChanges->setEnabled(false);
_ww->_undoChanges->setEnabled(false); _ww->_undoChanges->setEnabled(false);
} }
@ -454,7 +454,7 @@ void KWalletEditor::entrySelectionChanged(TQListViewItem *item) {
if (fi) { if (fi) {
_currentFolder = fi->name(); _currentFolder = fi->name();
_ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").tqarg(fi->text(0))); _ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").arg(fi->text(0)));
_ww->_iconTitle->setPixmap(fi->getFolderIcon(KIcon::Toolbar)); _ww->_iconTitle->setPixmap(fi->getFolderIcon(KIcon::Toolbar));
} }
} }
@ -540,7 +540,7 @@ void KWalletEditor::updateEntries(const TQString& folder) {
} }
fi->refresh(); fi->refresh();
if (fi->name() == _currentFolder) { if (fi->name() == _currentFolder) {
_ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").tqarg(fi->text(0))); _ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").arg(fi->text(0)));
} }
if (!_entryList->selectedItem()) { if (!_entryList->selectedItem()) {
_ww->_entryName->clear(); _ww->_entryName->clear();
@ -700,7 +700,7 @@ void KWalletEditor::newEntry() {
abort(); abort();
} }
fi->refresh(); fi->refresh();
_ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").tqarg(fi->text(0))); _ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").arg(fi->text(0)));
} }
} }
@ -734,11 +734,11 @@ void KWalletEditor::listItemRenamed(TQListViewItem* item, int, const TQString& t
return; return;
} }
if (ci->type() == KWallet::Wallet::Password) { if (ci->type() == KWallet::Wallet::Password) {
_ww->_entryName->setText(i18n("Password: %1").tqarg(item->text(0))); _ww->_entryName->setText(i18n("Password: %1").arg(item->text(0)));
} else if (ci->type() == KWallet::Wallet::Map) { } else if (ci->type() == KWallet::Wallet::Map) {
_ww->_entryName->setText(i18n("Name-Value Map: %1").tqarg(item->text(0))); _ww->_entryName->setText(i18n("Name-Value Map: %1").arg(item->text(0)));
} else if (ci->type() == KWallet::Wallet::Stream) { } else if (ci->type() == KWallet::Wallet::Stream) {
_ww->_entryName->setText(i18n("Binary Data: %1").tqarg(item->text(0))); _ww->_entryName->setText(i18n("Binary Data: %1").arg(item->text(0)));
} }
} else { } else {
i->setText(0, i->oldName()); i->setText(0, i->oldName());
@ -750,7 +750,7 @@ void KWalletEditor::listItemRenamed(TQListViewItem* item, int, const TQString& t
void KWalletEditor::deleteEntry() { void KWalletEditor::deleteEntry() {
TQListViewItem *item = _entryList->selectedItem(); TQListViewItem *item = _entryList->selectedItem();
if (_w && item) { if (_w && item) {
int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the item '%1'?").tqarg(item->text(0)),"",KStdGuiItem::del()); int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the item '%1'?").arg(item->text(0)),"",KStdGuiItem::del());
if (rc == KMessageBox::Continue) { if (rc == KMessageBox::Continue) {
KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(item->parent()->parent()); KWalletFolderItem *fi = dynamic_cast<KWalletFolderItem *>(item->parent()->parent());
if (!fi) { if (!fi) {
@ -761,7 +761,7 @@ void KWalletEditor::deleteEntry() {
delete item; delete item;
entrySelectionChanged(_entryList->currentItem()); entrySelectionChanged(_entryList->currentItem());
fi->refresh(); fi->refresh();
_ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").tqarg(fi->text(0))); _ww->_entryTitle->setText(TQString("<font size=\"+1\">%1</font>").arg(fi->text(0)));
} }
} }
} }
@ -818,7 +818,7 @@ void KWalletEditor::importWallet() {
TQString tmpFile; TQString tmpFile;
if (!KIO::NetAccess::download(url, tmpFile, this)) { if (!KIO::NetAccess::download(url, tmpFile, this)) {
KMessageBox::sorry(this, i18n("Unable to access wallet '<b>%1</b>'.").tqarg(url.prettyURL())); KMessageBox::sorry(this, i18n("Unable to access wallet '<b>%1</b>'.").arg(url.prettyURL()));
return; return;
} }
@ -847,7 +847,7 @@ void KWalletEditor::importWallet() {
if (hasEntry && mp == Prompt) { if (hasEntry && mp == Prompt) {
KBetterThanKDialogBase *bd; KBetterThanKDialogBase *bd;
bd = new KBetterThanKDialogBase(this); bd = new KBetterThanKDialogBase(this);
bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").tqarg(TQStyleSheet::escape(*f)).tqarg(TQStyleSheet::escape(me.key()))); bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").arg(TQStyleSheet::escape(*f)).arg(TQStyleSheet::escape(me.key())));
mp = (MergePlan)bd->exec(); mp = (MergePlan)bd->exec();
delete bd; delete bd;
bool ok = false; bool ok = false;
@ -877,7 +877,7 @@ void KWalletEditor::importWallet() {
if (hasEntry && mp == Prompt) { if (hasEntry && mp == Prompt) {
KBetterThanKDialogBase *bd; KBetterThanKDialogBase *bd;
bd = new KBetterThanKDialogBase(this); bd = new KBetterThanKDialogBase(this);
bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").tqarg(TQStyleSheet::escape(*f)).tqarg(TQStyleSheet::escape(pe.key()))); bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").arg(TQStyleSheet::escape(*f)).arg(TQStyleSheet::escape(pe.key())));
mp = (MergePlan)bd->exec(); mp = (MergePlan)bd->exec();
delete bd; delete bd;
bool ok = false; bool ok = false;
@ -907,7 +907,7 @@ void KWalletEditor::importWallet() {
if (hasEntry && mp == Prompt) { if (hasEntry && mp == Prompt) {
KBetterThanKDialogBase *bd; KBetterThanKDialogBase *bd;
bd = new KBetterThanKDialogBase(this); bd = new KBetterThanKDialogBase(this);
bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").tqarg(TQStyleSheet::escape(*f)).tqarg(TQStyleSheet::escape(ee.key()))); bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").arg(TQStyleSheet::escape(*f)).arg(TQStyleSheet::escape(ee.key())));
mp = (MergePlan)bd->exec(); mp = (MergePlan)bd->exec();
delete bd; delete bd;
bool ok = false; bool ok = false;
@ -946,20 +946,20 @@ void KWalletEditor::importXML() {
TQString tmpFile; TQString tmpFile;
if (!KIO::NetAccess::download(url, tmpFile, this)) { if (!KIO::NetAccess::download(url, tmpFile, this)) {
KMessageBox::sorry(this, i18n("Unable to access XML file '<b>%1</b>'.").tqarg(url.prettyURL())); KMessageBox::sorry(this, i18n("Unable to access XML file '<b>%1</b>'.").arg(url.prettyURL()));
return; return;
} }
TQFile qf(tmpFile); TQFile qf(tmpFile);
if (!qf.open(IO_ReadOnly)) { if (!qf.open(IO_ReadOnly)) {
KMessageBox::sorry(this, i18n("Error opening XML file '<b>%1</b>' for input.").tqarg(url.prettyURL())); KMessageBox::sorry(this, i18n("Error opening XML file '<b>%1</b>' for input.").arg(url.prettyURL()));
KIO::NetAccess::removeTempFile(tmpFile); KIO::NetAccess::removeTempFile(tmpFile);
return; return;
} }
TQDomDocument doc(tmpFile); TQDomDocument doc(tmpFile);
if (!doc.setContent(&qf)) { if (!doc.setContent(&qf)) {
KMessageBox::sorry(this, i18n("Error reading XML file '<b>%1</b>' for input.").tqarg(url.prettyURL())); KMessageBox::sorry(this, i18n("Error reading XML file '<b>%1</b>' for input.").arg(url.prettyURL()));
KIO::NetAccess::removeTempFile(tmpFile); KIO::NetAccess::removeTempFile(tmpFile);
return; return;
} }
@ -998,7 +998,7 @@ void KWalletEditor::importXML() {
if (hasEntry && mp == Prompt) { if (hasEntry && mp == Prompt) {
KBetterThanKDialogBase *bd; KBetterThanKDialogBase *bd;
bd = new KBetterThanKDialogBase(this); bd = new KBetterThanKDialogBase(this);
bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").tqarg(TQStyleSheet::escape(fname)).tqarg(TQStyleSheet::escape(ename))); bd->setLabel(i18n("Folder '<b>%1</b>' already contains an entry '<b>%2</b>'. Do you wish to replace it?").arg(TQStyleSheet::escape(fname)).arg(TQStyleSheet::escape(ename)));
mp = (MergePlan)bd->exec(); mp = (MergePlan)bd->exec();
delete bd; delete bd;
bool ok = false; bool ok = false;
@ -1106,7 +1106,7 @@ void KWalletEditor::exportXML() {
if (!url.isEmpty()) { if (!url.isEmpty()) {
bool ok = true; bool ok = true;
if (KIO::NetAccess::exists(url, false, this)) { if (KIO::NetAccess::exists(url, false, this)) {
int rc = KMessageBox::warningContinueCancel(this, i18n("The file '%1' already exists. Would you like to overwrite this file?").tqarg(url.prettyURL()), i18n("Overwrite")); int rc = KMessageBox::warningContinueCancel(this, i18n("The file '%1' already exists. Would you like to overwrite this file?").arg(url.prettyURL()), i18n("Overwrite"));
if (rc == KMessageBox::Cancel) { if (rc == KMessageBox::Cancel) {
ok = false; ok = false;
} }

@ -220,13 +220,13 @@ void KWalletManager::contextMenu(TQIconViewItem *item, const TQPoint& pos) {
void KWalletManager::deleteWallet(const TQString& walletName) { void KWalletManager::deleteWallet(const TQString& walletName) {
int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the wallet '%1'?").tqarg(walletName),"",KStdGuiItem::del()); int rc = KMessageBox::warningContinueCancel(this, i18n("Are you sure you wish to delete the wallet '%1'?").arg(walletName),"",KStdGuiItem::del());
if (rc != KMessageBox::Continue) { if (rc != KMessageBox::Continue) {
return; return;
} }
rc = KWallet::Wallet::deleteWallet(walletName); rc = KWallet::Wallet::deleteWallet(walletName);
if (rc != 0) { if (rc != 0) {
KMessageBox::sorry(this, i18n("Unable to delete the wallet. Error code was %1.").tqarg(rc)); KMessageBox::sorry(this, i18n("Unable to delete the wallet. Error code was %1.").arg(rc));
} }
updateWalletDisplay(); updateWalletDisplay();
} }
@ -239,7 +239,7 @@ void KWalletManager::closeWallet(const TQString& walletName) {
if (rc == KMessageBox::Yes) { if (rc == KMessageBox::Yes) {
rc = KWallet::Wallet::closeWallet(walletName, true); rc = KWallet::Wallet::closeWallet(walletName, true);
if (rc != 0) { if (rc != 0) {
KMessageBox::sorry(this, i18n("Unable to force the wallet closed. Error code was %1.").tqarg(rc)); KMessageBox::sorry(this, i18n("Unable to force the wallet closed. Error code was %1.").arg(rc));
} }
} }
} }
@ -260,7 +260,7 @@ void KWalletManager::openWalletFile(const TQString& path) {
this, TQT_SLOT(editorClosed(KMainWindow*))); this, TQT_SLOT(editorClosed(KMainWindow*)));
we->show(); we->show();
} else { } else {
KMessageBox::sorry(this, i18n("Error opening wallet %1.").tqarg(path)); KMessageBox::sorry(this, i18n("Error opening wallet %1.").arg(path));
delete we; delete we;
} }
} }
@ -302,7 +302,7 @@ void KWalletManager::openWallet(const TQString& walletName, bool newWallet) {
we->show(); we->show();
_windows.append(we); _windows.append(we);
} else if (!newWallet) { } else if (!newWallet) {
KMessageBox::sorry(this, i18n("Error opening wallet %1.").tqarg(walletName)); KMessageBox::sorry(this, i18n("Error opening wallet %1.").arg(walletName));
delete we; delete we;
} }
} }

@ -150,7 +150,7 @@
<property name="textFormat"> <property name="textFormat">
<enum>RichText</enum> <enum>RichText</enum>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter</set> <set>AlignVCenter</set>
</property> </property>
</widget> </widget>
@ -268,7 +268,7 @@
<property name="text"> <property name="text">
<string>This is a binary data entry. It cannot be editted as its format is unknown and application specific.</string> <string>This is a binary data entry. It cannot be editted as its format is unknown and application specific.</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignVCenter</set> <set>WordBreak|AlignVCenter</set>
</property> </property>
</widget> </widget>

@ -61,7 +61,7 @@ ImageLabel* createImageLabel(karamba *theme, long x, long y,
theme->meterList->append (tmp); theme->meterList->append (tmp);
theme->imageList->append (tmp); theme->imageList->append (tmp);
if(bg) if(bg)
theme->kroot->tqrepaint(true); theme->kroot->repaint(true);
return tmp; return tmp;
} }

@ -35,7 +35,7 @@ Input::~Input()
void Input::mUpdate(TQPainter*) void Input::mUpdate(TQPainter*)
{ {
edit->tqrepaint(); edit->repaint();
} }
void Input::setValue(TQString text) void Input::setValue(TQString text)

@ -85,7 +85,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance,
karambaApp->addKaramba(this, reloading); karambaApp->addKaramba(this, reloading);
if(prettyName.isEmpty()) if(prettyName.isEmpty())
prettyName = TQString("%1 - %2").tqarg(m_theme.name()).tqarg(m_instance); prettyName = TQString("%1 - %2").arg(m_theme.name()).arg(m_instance);
kdDebug() << "Starting theme: " << m_theme.name() kdDebug() << "Starting theme: " << m_theme.name()
<< " pretty name: " << prettyName << endl; << " pretty name: " << prettyName << endl;
@ -111,7 +111,7 @@ karamba::karamba(TQString fn, TQString name, bool reloading, int instance,
// Creates KConfig Object // Creates KConfig Object
TQString instanceString; TQString instanceString;
if(m_instance > 1) if(m_instance > 1)
instanceString = TQString("-%1").tqarg(m_instance); instanceString = TQString("-%1").arg(m_instance);
TQString cfg = TQDir::home().absPath() + "/.superkaramba/" TQString cfg = TQDir::home().absPath() + "/.superkaramba/"
+ m_theme.id() + instanceString + ".rc"; + m_theme.id() + instanceString + ".rc";
kdDebug() << cfg << endl; kdDebug() << cfg << endl;
@ -1619,13 +1619,13 @@ void karamba::updateBackground(KSharedPixmap* kpm)
{ {
systray->updateBackgroundPixmap(buffer2); systray->updateBackgroundPixmap(buffer2);
} }
tqrepaint(); repaint();
} }
void karamba::currentDesktopChanged( int i ) void karamba::currentDesktopChanged( int i )
{ {
//qDebug("karamba::currentDesktopChanged"); //qDebug("karamba::currentDesktopChanged");
kroot->tqrepaint( true ); kroot->repaint( true );
if (pythonIface && pythonIface->isExtensionLoaded()) if (pythonIface && pythonIface->isExtensionLoaded())
pythonIface->desktopChanged(this, i); pythonIface->desktopChanged(this, i);
} }
@ -1633,7 +1633,7 @@ void karamba::currentDesktopChanged( int i )
void karamba::currentWallpaperChanged(int i ) void karamba::currentWallpaperChanged(int i )
{ {
//qDebug("karamba::currentWallpaperChanged"); //qDebug("karamba::currentWallpaperChanged");
kroot->tqrepaint( true ); kroot->repaint( true );
if (pythonIface && pythonIface->isExtensionLoaded()) if (pythonIface && pythonIface->isExtensionLoaded())
pythonIface->wallpaperChanged(this, i); pythonIface->wallpaperChanged(this, i);
} }
@ -1660,7 +1660,7 @@ void karamba::externalStep()
p.end(); p.end();
bitBlt(&pm,0,0,&buffer,0,TQt::CopyROP); bitBlt(&pm,0,0,&buffer,0,TQt::CopyROP);
tqrepaint(); repaint();
} }
} }

@ -125,8 +125,8 @@ static PyMethodDef karamba_methods[] = {
{(char*)"getTextColor", py_getTextColor, METH_VARARGS, (char*)"Get a Text Sensor's Color"}, {(char*)"getTextColor", py_getTextColor, METH_VARARGS, (char*)"Get a Text Sensor's Color"},
{(char*)"changeTextSize", py_setTextFontSize, METH_VARARGS, (char*)"Change a Text Sensor's Font Size"}, {(char*)"changeTextSize", py_setTextFontSize, METH_VARARGS, (char*)"Change a Text Sensor's Font Size"},
{(char*)"getTextFontSize", py_getTextFontSize, METH_VARARGS, (char*)"Get a Text Sensor's Font Size"}, {(char*)"getTextFontSize", py_getTextFontSize, METH_VARARGS, (char*)"Get a Text Sensor's Font Size"},
{(char*)"getTextAlign", py_getTextAlign, METH_VARARGS, (char*)"Get Text tqalignment."}, {(char*)"getTextAlign", py_getTextAlign, METH_VARARGS, (char*)"Get Text alignment."},
{(char*)"setTextAlign", py_setTextAlign, METH_VARARGS, (char*)"Set Text tqalignment."}, {(char*)"setTextAlign", py_setTextAlign, METH_VARARGS, (char*)"Set Text alignment."},
{(char*)"setTextScroll", py_setTextScroll, METH_VARARGS, (char*)"Set Text scroll."}, {(char*)"setTextScroll", py_setTextScroll, METH_VARARGS, (char*)"Set Text scroll."},
// RichTextLabel - richtextlabel_python.cpp // RichTextLabel - richtextlabel_python.cpp

@ -46,13 +46,13 @@ void SKLineEdit::drawContents(TQPainter *p)
void SKLineEdit::setFrameColor(TQColor c) void SKLineEdit::setFrameColor(TQColor c)
{ {
frameColor = c; frameColor = c;
tqrepaint(); repaint();
} }
void SKLineEdit::setBackgroundColor(TQColor c) void SKLineEdit::setBackgroundColor(TQColor c)
{ {
TQLineEdit::setBackgroundColor(c); TQLineEdit::setBackgroundColor(c);
tqrepaint(); repaint();
} }
TQColor SKLineEdit::getFrameColor() const TQColor SKLineEdit::getFrameColor() const

@ -190,7 +190,7 @@ void Systemtray::layoutSystray()
} }
count++; count++;
emb->tqrepaint(); emb->repaint();
} }
} }

@ -106,28 +106,28 @@ void TextField::setAlignment( const TQString &align )
{ {
TQString a = align.upper(); TQString a = align.upper();
if( a == "LEFT" || a.isEmpty() ) if( a == "LEFT" || a.isEmpty() )
tqalignment = TQt::AlignLeft; alignment = TQt::AlignLeft;
if( a == "RIGHT" ) if( a == "RIGHT" )
tqalignment = TQt::AlignRight; alignment = TQt::AlignRight;
if( a == "CENTER" ) if( a == "CENTER" )
tqalignment = TQt::AlignHCenter; alignment = TQt::AlignHCenter;
} }
void TextField::setAlignment( int af ) void TextField::setAlignment( int af )
{ {
tqalignment = af; alignment = af;
} }
int TextField::getAlignment() const int TextField::getAlignment() const
{ {
return tqalignment; return alignment;
} }
TQString TextField::getAlignmentAsString() const TQString TextField::getAlignmentAsString() const
{ {
if( tqalignment == TQt::AlignHCenter ) if( alignment == TQt::AlignHCenter )
return "CENTER"; return "CENTER";
else if( tqalignment == TQt::AlignRight ) else if( alignment == TQt::AlignRight )
return "RIGHT"; return "RIGHT";
else else
return "LEFT"; return "LEFT";

@ -47,7 +47,7 @@ public:
int getLineHeight() const; int getLineHeight() const;
protected: protected:
int tqalignment; int alignment;
TQFont font; TQFont font;
TQColor color; TQColor color;
TQColor bgColor; TQColor bgColor;

@ -13,7 +13,7 @@
#include "textlabel.h" #include "textlabel.h"
TextLabel::TextLabel(karamba *k, int x,int y,int w,int h): TextLabel::TextLabel(karamba *k, int x,int y,int w,int h):
Meter(k, x,y,w,h), tqalignment(TQt::AlignLeft), clip(0), bgColor(0, 0, 0), Meter(k, x,y,w,h), alignment(TQt::AlignLeft), clip(0), bgColor(0, 0, 0),
lineHeight(0), shadow(0), scrollSpeed(0, 0), scrollPos(0, 0), scrollGap(0), lineHeight(0), shadow(0), scrollSpeed(0, 0), scrollPos(0, 0), scrollGap(0),
scrollPause(0), pauseCounter(0), scrollType(ScrollNone) scrollPause(0), pauseCounter(0), scrollType(ScrollNone)
{ {
@ -31,7 +31,7 @@ TextLabel::TextLabel(karamba *k, int x,int y,int w,int h):
} }
TextLabel::TextLabel(karamba *k): TextLabel::TextLabel(karamba *k):
Meter(k, 0, 0, 0, 0), tqalignment(TQt::AlignLeft), clip(0), bgColor(0, 0, 0), Meter(k, 0, 0, 0, 0), alignment(TQt::AlignLeft), clip(0), bgColor(0, 0, 0),
lineHeight(0), shadow(0), scrollSpeed(0, 0), scrollPos(0, 0), scrollGap(0), lineHeight(0), shadow(0), scrollSpeed(0, 0), scrollPos(0, 0), scrollGap(0),
scrollPause(0), pauseCounter(0), scrollType(ScrollNone) scrollPause(0), pauseCounter(0), scrollType(ScrollNone)
{ {
@ -60,7 +60,7 @@ void TextLabel::setTextProps( TextField* t )
text = *t; text = *t;
//lineHeight = t->getLineHeight(); //lineHeight = t->getLineHeight();
shadow = t->getShadow(); shadow = t->getShadow();
tqalignment = t->getAlignment(); alignment = t->getAlignment();
setFontSize(t->getFontSize()); setFontSize(t->getFontSize());
setFont(t->getFont()); setFont(t->getFont());
@ -135,18 +135,18 @@ void TextLabel::setAlignment( TQString align )
{ {
TQString a = align.upper(); TQString a = align.upper();
if( a == "LEFT" || a.isEmpty() ) if( a == "LEFT" || a.isEmpty() )
tqalignment = TQt::AlignLeft; alignment = TQt::AlignLeft;
if( a == "RIGHT" ) if( a == "RIGHT" )
tqalignment = TQt::AlignRight; alignment = TQt::AlignRight;
if( a == "CENTER" ) if( a == "CENTER" )
tqalignment = TQt::AlignHCenter; alignment = TQt::AlignHCenter;
} }
TQString TextLabel::getAlignment() const TQString TextLabel::getAlignment() const
{ {
if( tqalignment == TQt::AlignHCenter ) if( alignment == TQt::AlignHCenter )
return "CENTER"; return "CENTER";
else if( tqalignment == TQt::AlignRight ) else if( alignment == TQt::AlignRight )
return "RIGHT"; return "RIGHT";
else else
return "LEFT"; return "LEFT";
@ -228,10 +228,10 @@ int TextLabel::drawText(TQPainter *p, int x, int y, int width, int height,
{ {
p->setPen(getBGColor()); p->setPen(getBGColor());
p->drawText(x + shadow, y + shadow, width, height, p->drawText(x + shadow, y + shadow, width, height,
tqalignment | clip | TQt::ExpandTabs, text); alignment | clip | TQt::ExpandTabs, text);
} }
p->setPen(getColor()); p->setPen(getColor());
p->drawText(x, y, width, height, tqalignment | clip | TQt::ExpandTabs, text); p->drawText(x, y, width, height, alignment | clip | TQt::ExpandTabs, text);
return 0; return 0;
} }

@ -62,7 +62,7 @@ public:
virtual bool click(TQMouseEvent*); virtual bool click(TQMouseEvent*);
private: private:
int tqalignment; int alignment;
int clip; int clip;
TQStringList value; TQStringList value;
TQFont font; TQFont font;

@ -213,7 +213,7 @@ bool ThemeFile::set(const KURL &url)
i18n("You are about to install and run %1 SuperKaramba theme. Since " i18n("You are about to install and run %1 SuperKaramba theme. Since "
"themes can contain executable code you should only install themes " "themes can contain executable code you should only install themes "
"from sources that you trust. Continue?"), i18n("Executable Code Warning"), i18n("Install") "from sources that you trust. Continue?"), i18n("Executable Code Warning"), i18n("Install")
.tqarg(url.prettyURL())) .arg(url.prettyURL()))
== KMessageBox::Cancel) == KMessageBox::Cancel)
{ {
return false; return false;
@ -226,7 +226,7 @@ bool ThemeFile::set(const KURL &url)
{ {
if(KMessageBox::warningContinueCancel(TQT_TQWIDGET(kapp->activeWindow()), if(KMessageBox::warningContinueCancel(TQT_TQWIDGET(kapp->activeWindow()),
i18n("%1 already exists. Do you want to overwrite it?") i18n("%1 already exists. Do you want to overwrite it?")
.tqarg(localFile.filePath()),i18n("File Exists"),i18n("Overwrite")) .arg(localFile.filePath()),i18n("File Exists"),i18n("Overwrite"))
== KMessageBox::Cancel) == KMessageBox::Cancel)
{ {
return false; return false;

@ -157,7 +157,7 @@ void ThemeLocale::setLanguage(const TQStringList &languages)
++it) ++it)
{ {
TQString file = TQString file =
TQString("locale/%1/LC_MESSAGES/%2.mo").tqarg(*it).tqarg(m_theme->mo()); TQString("locale/%1/LC_MESSAGES/%2.mo").arg(*it).arg(m_theme->mo());
if(m_theme->fileExists(file)) if(m_theme->fileExists(file))
{ {

@ -75,7 +75,7 @@ void ThemeWidget::updateRunning()
{ {
int i = instances(); int i = instances();
if(i > 0) if(i > 0)
running->setText(i18n("<p align=\"center\">%1 running</p>").tqarg(i)); running->setText(i18n("<p align=\"center\">%1 running</p>").arg(i));
else else
running->setText(""); running->setText("");
} }
@ -101,12 +101,12 @@ void ThemeWidget::showButton(bool show)
void ThemeWidget::setDescriptionMaxHeight() void ThemeWidget::setDescriptionMaxHeight()
{ {
if(layoutText->tqgeometry().height() <= 0) if(layoutText->geometry().height() <= 0)
return; return;
int height = layoutText->tqgeometry().height() - themeName->height() - int height = layoutText->geometry().height() - themeName->height() -
layoutText->spacing(); layoutText->spacing();
if(buttonGo->isVisible()) if(buttonGo->isVisible())
height -= layoutButton->tqgeometry().height() + layoutText->spacing(); height -= layoutButton->geometry().height() + layoutText->spacing();
description->setMaximumHeight(height); description->setMaximumHeight(height);
} }

@ -47,7 +47,7 @@
<property name="pixmap"> <property name="pixmap">
<pixmap>image0</pixmap> <pixmap>image0</pixmap>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -121,7 +121,7 @@
<property name="text"> <property name="text">
<string>Description</string> <string>Description</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignTop</set> <set>WordBreak|AlignTop</set>
</property> </property>
</widget> </widget>

@ -101,7 +101,7 @@ PyObject* py_create_widget_mask(PyObject *, PyObject *args)
long redrawWidgetBackground(long widget) long redrawWidgetBackground(long widget)
{ {
karamba* currTheme = (karamba*)widget; karamba* currTheme = (karamba*)widget;
currTheme->kroot->tqrepaint(true); currTheme->kroot->repaint(true);
return 1; return 1;
} }

Loading…
Cancel
Save