diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-27 05:58:16 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-27 05:58:16 +0000 |
commit | f636ba5ba2df9d34d56b1c85f24c6598fa1cb645 (patch) | |
tree | 5365045e6bce685a7cbaeb81b4797a719e86089f /src/kreplacements/kreplacements.cpp | |
parent | 63862fdfcb61f302ef69e86d40772bb1318d3763 (diff) | |
download | kdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.tar.gz kdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.zip |
TQt4 port kdiff3
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdiff3@1238464 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kreplacements/kreplacements.cpp')
-rw-r--r-- | src/kreplacements/kreplacements.cpp | 436 |
1 files changed, 218 insertions, 218 deletions
diff --git a/src/kreplacements/kreplacements.cpp b/src/kreplacements/kreplacements.cpp index 95885a5..a9df56a 100644 --- a/src/kreplacements/kreplacements.cpp +++ b/src/kreplacements/kreplacements.cpp @@ -21,30 +21,30 @@ #include <assert.h> -#include <qnamespace.h> -#include <qmessagebox.h> -#include <qpopupmenu.h> -#include <qmenubar.h> -#include <qpainter.h> -#include <qcolordialog.h> -#include <qfontdialog.h> -#include <qlabel.h> -#include <qtextbrowser.h> -#include <qtextstream.h> -#include <qlayout.h> -#include <qdockarea.h> +#include <tqnamespace.h> +#include <tqmessagebox.h> +#include <tqpopupmenu.h> +#include <tqmenubar.h> +#include <tqpainter.h> +#include <tqcolordialog.h> +#include <tqfontdialog.h> +#include <tqlabel.h> +#include <tqtextbrowser.h> +#include <tqtextstream.h> +#include <tqlayout.h> +#include <tqdockarea.h> #include <vector> #include <iostream> #include <algorithm> -static QString s_copyright; -static QString s_email; -static QString s_description; -static QString s_appName; -static QString s_version; -static QString s_homepage; +static TQString s_copyright; +static TQString s_email; +static TQString s_description; +static TQString s_appName; +static TQString s_version; +static TQString s_homepage; static KAboutData* s_pAboutData; @@ -59,17 +59,17 @@ static void showHelp() char buf[200]; int r= SearchPathA( 0, ".", 0, sizeof(buf), buf, 0 ); - QString exePath; + TQString exePath; if (r!=0) { exePath = buf; } else { exePath = "."; } - QFileInfo helpFile( exePath + "\\doc\\en\\index.html" ); + TQFileInfo helpFile( exePath + "\\doc\\en\\index.html" ); if ( ! helpFile.exists() ) { helpFile.setFile( exePath + "\\..\\doc\\en\\index.html" ); } if ( ! helpFile.exists() ) { helpFile.setFile( exePath + "\\doc\\index.html" ); } if ( ! helpFile.exists() ) { helpFile.setFile( exePath + "\\..\\doc\\index.html" ); } if ( ! helpFile.exists() ) { - QMessageBox::warning( 0, "KDiff3 documentation not found", + TQMessageBox::warning( 0, "KDiff3 documentation not found", "Couldn't find the documentation. \n\n" "The documentation can also be found at the homepage:\n\n " " http://kdiff3.sourceforge.net/"); @@ -79,10 +79,10 @@ static void showHelp() HINSTANCE hi = FindExecutableA( helpFile.fileName().ascii(), helpFile.dirPath(true).ascii(), buf ); if ( int(hi)<=32 ) { - static QTextBrowser* pBrowser = 0; + static TQTextBrowser* pBrowser = 0; if (pBrowser==0) { - pBrowser = new QTextBrowser( 0 ); + pBrowser = new TQTextBrowser( 0 ); pBrowser->setMinimumSize( 600, 400 ); } pBrowser->setSource(helpFile.filePath()); @@ -90,15 +90,15 @@ static void showHelp() } else { - QFileInfo prog( buf ); + TQFileInfo prog( buf ); _spawnlp( _P_NOWAIT , prog.filePath().ascii(), prog.fileName().ascii(), ("\"file:///"+helpFile.absFilePath()+"\"").ascii(), NULL ); } #else - static QTextBrowser* pBrowser = 0; + static TQTextBrowser* pBrowser = 0; if (pBrowser==0) { - pBrowser = new QTextBrowser( 0 ); + pBrowser = new TQTextBrowser( 0 ); pBrowser->setMinimumSize( 600, 400 ); } pBrowser->setSource("/usr/local/share/doc/kdiff3/en/index.html"); @@ -106,13 +106,13 @@ static void showHelp() #endif } -QString getTranslationDir() +TQString getTranslationDir() { #ifdef _WIN32 char buf[200]; int r= SearchPathA( 0, ".", 0, sizeof(buf), buf, 0 ); - QString exePath; + TQString exePath; if (r!=0) { exePath = buf; } else { exePath = "."; } return exePath+"/translations"; @@ -122,37 +122,37 @@ QString getTranslationDir() } // static -void KMessageBox::error( QWidget* parent, const QString& text, const QString& caption ) +void KMessageBox::error( TQWidget* tqparent, const TQString& text, const TQString& caption ) { - QMessageBox::critical( parent, caption, text ); + TQMessageBox::critical( tqparent, caption, text ); } -int KMessageBox::warningContinueCancel( QWidget* parent, const QString& text, const QString& caption, - const QString& button1 ) +int KMessageBox::warningContinueCancel( TQWidget* tqparent, const TQString& text, const TQString& caption, + const TQString& button1 ) { - return 0 == QMessageBox::warning( parent, caption, text, button1, "Cancel" ) ? Continue : Cancel; + return 0 == TQMessageBox::warning( tqparent, caption, text, button1, "Cancel" ) ? Continue : Cancel; } -void KMessageBox::sorry( QWidget* parent, const QString& text, const QString& caption ) +void KMessageBox::sorry( TQWidget* tqparent, const TQString& text, const TQString& caption ) { - QMessageBox::information( parent, caption, text ); + TQMessageBox::information( tqparent, caption, text ); } -void KMessageBox::information( QWidget* parent, const QString& text, const QString& caption ) +void KMessageBox::information( TQWidget* tqparent, const TQString& text, const TQString& caption ) { - QMessageBox::information( parent, caption, text ); + TQMessageBox::information( tqparent, caption, text ); } -int KMessageBox::warningYesNo( QWidget* parent, const QString& text, const QString& caption, - const QString& button1, const QString& button2 ) +int KMessageBox::warningYesNo( TQWidget* tqparent, const TQString& text, const TQString& caption, + const TQString& button1, const TQString& button2 ) { - return 0 == QMessageBox::warning( parent, caption, text, button1, button2, QString::null, 1, 1 ) ? Yes : No; + return 0 == TQMessageBox::warning( tqparent, caption, text, button1, button2, TQString(), 1, 1 ) ? Yes : No; } -int KMessageBox::warningYesNoCancel( QWidget* parent, const QString& text, const QString& caption, - const QString& button1, const QString& button2 ) +int KMessageBox::warningYesNoCancel( TQWidget* tqparent, const TQString& text, const TQString& caption, + const TQString& button1, const TQString& button2 ) { - int val = QMessageBox::warning( parent, caption, text, + int val = TQMessageBox::warning( tqparent, caption, text, button1, button2, i18n("Cancel") ); if ( val==0 ) return Yes; if ( val==1 ) return No; @@ -160,9 +160,9 @@ int KMessageBox::warningYesNoCancel( QWidget* parent, const QString& text, const } -KDialogBase::KDialogBase( int, const QString& caption, int, int, QWidget* parent, const char* name, +KDialogBase::KDialogBase( int, const TQString& caption, int, int, TQWidget* tqparent, const char* name, bool /*modal*/, bool ) -: QTabDialog( parent, name, true /* modal */ ) +: TQTabDialog( tqparent, name, true /* modal */ ) { setCaption( caption ); setDefaultButton(); @@ -172,40 +172,40 @@ KDialogBase::KDialogBase( int, const QString& caption, int, int, QWidget* parent setOkButton(); setDefaultButton(); - connect( this, SIGNAL( defaultButtonPressed() ), this, SLOT(slotDefault()) ); - connect( this, SIGNAL( helpButtonPressed() ), this, SLOT(slotHelp())); - connect( this, SIGNAL( applyButtonPressed() ), this, SLOT( slotApply() )); + connect( this, TQT_SIGNAL( defaultButtonPressed() ), this, TQT_SLOT(slotDefault()) ); + connect( this, TQT_SIGNAL( helpButtonPressed() ), this, TQT_SLOT(slotHelp())); + connect( this, TQT_SIGNAL( applyButtonPressed() ), this, TQT_SLOT( slotApply() )); } KDialogBase::~KDialogBase() { } -void KDialogBase::incInitialSize ( const QSize& ) +void KDialogBase::incInitialSize ( const TQSize& ) { } -void KDialogBase::setHelp(const QString&, const QString& ) +void KDialogBase::setHelp(const TQString&, const TQString& ) { } -int KDialogBase::BarIcon(const QString& /*iconName*/, int ) +int KDialogBase::BarIcon(const TQString& /*iconName*/, int ) { return 0; // Not used for replacement. } -QVBox* KDialogBase::addVBoxPage( const QString& name, const QString& /*info*/, int ) +TQVBox* KDialogBase::addVBoxPage( const TQString& name, const TQString& /*info*/, int ) { - QVBox* p = new QVBox(this, name.ascii()); + TQVBox* p = new TQVBox(this, name.ascii()); addTab( p, name ); return p; } -QFrame* KDialogBase::addPage( const QString& name, const QString& /*info*/, int ) +TQFrame* KDialogBase::addPage( const TQString& name, const TQString& /*info*/, int ) { - QFrame* p = new QFrame( this, name.ascii() ); + TQFrame* p = new TQFrame( this, name.ascii() ); addTab( p, name ); return p; } @@ -226,7 +226,7 @@ void KDialogBase::accept() slotOk(); s_inAccept = false; if ( s_bAccepted ) - QTabDialog::accept(); + TQTabDialog::accept(); } else { @@ -252,37 +252,37 @@ void KDialogBase::slotHelp( ) showHelp(); } -KURL KFileDialog::getSaveURL( const QString &startDir, - const QString &filter, - QWidget *parent, const QString &caption) +KURL KFileDialog::getSaveURL( const TQString &startDir, + const TQString &filter, + TQWidget *tqparent, const TQString &caption) { - QString s = QFileDialog::getSaveFileName(startDir, filter, parent, 0, caption); + TQString s = TQFileDialog::getSaveFileName(startDir, filter, tqparent, 0, caption); return KURL(s); } -KURL KFileDialog::getOpenURL( const QString & startDir, - const QString & filter, - QWidget * parent, - const QString & caption ) +KURL KFileDialog::getOpenURL( const TQString & startDir, + const TQString & filter, + TQWidget * tqparent, + const TQString & caption ) { - QString s = QFileDialog::getOpenFileName(startDir, filter, parent, 0, caption); + TQString s = TQFileDialog::getOpenFileName(startDir, filter, tqparent, 0, caption); return KURL(s); } -KURL KFileDialog::getExistingURL( const QString & startDir, - QWidget * parent, - const QString & caption) +KURL KFileDialog::getExistingURL( const TQString & startDir, + TQWidget * tqparent, + const TQString & caption) { - QString s = QFileDialog::getExistingDirectory(startDir, parent, 0, caption); + TQString s = TQFileDialog::getExistingDirectory(startDir, tqparent, 0, caption); return KURL(s); } -QString KFileDialog::getSaveFileName (const QString &startDir, - const QString &filter, - QWidget *parent, - const QString &caption) +TQString KFileDialog::getSaveFileName (const TQString &startDir, + const TQString &filter, + TQWidget *tqparent, + const TQString &caption) { - return QFileDialog::getSaveFileName( startDir, filter, parent, 0, caption ); + return TQFileDialog::getSaveFileName( startDir, filter, tqparent, 0, caption ); } @@ -303,44 +303,44 @@ void KToolBar::setBarPos(BarPosition bp) else if ( bp == Top ) m_pMainWindow->moveDockWindow( this, DockTop ); } -KToolBar::KToolBar( QMainWindow* parent ) -: QToolBar( parent ) +KToolBar::KToolBar( TQMainWindow* tqparent ) +: TQToolBar( tqparent ) { - m_pMainWindow = parent; + m_pMainWindow = tqparent; } -KMainWindow::KMainWindow( QWidget* parent, const char* name ) -: QMainWindow( parent, name ), m_actionCollection(this) +KMainWindow::KMainWindow( TQWidget* tqparent, const char* name ) +: TQMainWindow( tqparent, name ), m_actionCollection(this) { - fileMenu = new QPopupMenu(); + fileMenu = new TQPopupMenu(); menuBar()->insertItem(i18n("&File"), fileMenu); - editMenu = new QPopupMenu(); + editMenu = new TQPopupMenu(); menuBar()->insertItem(i18n("&Edit"), editMenu); - directoryMenu = new QPopupMenu(); + directoryMenu = new TQPopupMenu(); menuBar()->insertItem(i18n("&Directory"), directoryMenu); dirCurrentItemMenu = 0; dirCurrentSyncItemMenu = 0; - movementMenu = new QPopupMenu(); + movementMenu = new TQPopupMenu(); menuBar()->insertItem(i18n("&Movement"), movementMenu); - diffMenu = new QPopupMenu(); + diffMenu = new TQPopupMenu(); menuBar()->insertItem(i18n("D&iffview"), diffMenu); - mergeMenu = new QPopupMenu(); + mergeMenu = new TQPopupMenu(); menuBar()->insertItem(i18n("&Merge"), mergeMenu); - windowsMenu = new QPopupMenu(); + windowsMenu = new TQPopupMenu(); menuBar()->insertItem(i18n("&Window"), windowsMenu); - settingsMenu = new QPopupMenu(); + settingsMenu = new TQPopupMenu(); menuBar()->insertItem(i18n("&Settings"), settingsMenu); - helpMenu = new QPopupMenu(); + helpMenu = new TQPopupMenu(); menuBar()->insertItem(i18n("&Help"), helpMenu); m_pToolBar = new KToolBar(this); - memberList = new QList<KMainWindow>; + memberList = new TQList<KMainWindow>; memberList->append(this); } -KToolBar* KMainWindow::toolBar(const QString&) +KToolBar* KMainWindow::toolBar(const TQString&) { return m_pToolBar; } @@ -352,17 +352,17 @@ KActionCollection* KMainWindow::actionCollection() void KMainWindow::createGUI() { - KStdAction::help(this, SLOT(slotHelp()), actionCollection()); - KStdAction::about(this, SLOT(slotAbout()), actionCollection()); - KStdAction::aboutQt(actionCollection()); + KStdAction::help(this, TQT_SLOT(slotHelp()), actionCollection()); + KStdAction::about(this, TQT_SLOT(slotAbout()), actionCollection()); + KStdAction::aboutTQt(actionCollection()); } void KMainWindow::slotAbout() { - QTabDialog d; + TQTabDialog d; d.setCaption("About " + s_appName); - QTextBrowser* tb1 = new QTextBrowser(&d); - tb1->setWordWrap( QTextEdit::NoWrap ); + TQTextBrowser* tb1 = new TQTextBrowser(&d); + tb1->setWordWrap( TQTextEdit::NoWrap ); tb1->setText( s_appName + " Version " + s_version + "\n\n" + s_description + @@ -374,7 +374,7 @@ void KMainWindow::slotAbout() std::list<KAboutData::AboutDataEntry>::iterator i; - QString s2; + TQString s2; for( i=s_pAboutData->m_authorList.begin(); i!=s_pAboutData->m_authorList.end(); ++i ) { if ( !i->m_name.isEmpty() ) s2 += i->m_name + "\n"; @@ -383,12 +383,12 @@ void KMainWindow::slotAbout() if ( !i->m_weblink.isEmpty() ) s2 += " " + i->m_weblink + "\n"; s2 += "\n"; } - QTextBrowser* tb2 = new QTextBrowser(&d); - tb2->setWordWrap( QTextEdit::NoWrap ); + TQTextBrowser* tb2 = new TQTextBrowser(&d); + tb2->setWordWrap( TQTextEdit::NoWrap ); tb2->setText(s2); d.addTab(tb2,i18n("A&uthor")); - QString s3; + TQString s3; for( i=s_pAboutData->m_creditList.begin(); i!=s_pAboutData->m_creditList.end(); ++i ) { if ( !i->m_name.isEmpty() ) s3 += i->m_name + "\n"; @@ -397,15 +397,15 @@ void KMainWindow::slotAbout() if ( !i->m_weblink.isEmpty() ) s3 += " " + i->m_weblink + "\n"; s3 += "\n"; } - QTextBrowser* tb3 = new QTextBrowser(&d); - tb3->setWordWrap( QTextEdit::NoWrap ); + TQTextBrowser* tb3 = new TQTextBrowser(&d); + tb3->setWordWrap( TQTextEdit::NoWrap ); tb3->setText(s3); d.addTab(tb3,i18n("&Thanks To")); d.resize(400,300); d.exec(); /* - QMessageBox::information( + TQMessageBox::information( this, "About " + s_appName, s_appName + " Version " + s_version + @@ -423,21 +423,21 @@ void KMainWindow::slotHelp() } -QString KStandardDirs::findResource(const QString& resource, const QString& /*appName*/) +TQString KStandardDirs::findResource(const TQString& resource, const TQString& /*appName*/) { if (resource=="config") { - QString home = QDir::homeDirPath(); + TQString home = TQDir::homeDirPath(); return home + "/.kdiff3rc"; } - return QString(); + return TQString(); } KConfig::KConfig() { } -void KConfig::readConfigFile( const QString& configFileName ) +void KConfig::readConfigFile( const TQString& configFileName ) { if ( !configFileName.isEmpty() ) { @@ -448,10 +448,10 @@ void KConfig::readConfigFile( const QString& configFileName ) m_fileName = KStandardDirs().findResource("config","kdiff3rc"); } - QFile f( m_fileName ); + TQFile f( m_fileName ); if ( f.open(IO_ReadOnly) ) { // file opened successfully - QTextStream t( &f ); // use a text stream + TQTextStream t( &f ); // use a text stream load(t); f.close(); } @@ -459,31 +459,31 @@ void KConfig::readConfigFile( const QString& configFileName ) KConfig::~KConfig() { - QFile f(m_fileName); + TQFile f(m_fileName); if ( f.open( IO_WriteOnly | IO_Translate ) ) { // file opened successfully - QTextStream t( &f ); // use a text stream + TQTextStream t( &f ); // use a text stream save(t); f.close(); } } -void KConfig::setGroup(const QString&) +void KConfig::setGroup(const TQString&) { } -void KAction::init(QObject* receiver, const char* slot, KActionCollection* actionCollection, +void KAction::init(TQObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bToggle, bool bMenu) { - QString n(name); + TQString n(name); KMainWindow* p = actionCollection->m_pMainWindow; if( slot!=0 ) { if (!bToggle) - connect(this, SIGNAL(activated()), receiver, slot); + connect(this, TQT_SIGNAL(activated()), receiver, slot); else { - connect(this, SIGNAL(toggled(bool)), receiver, slot); + connect(this, TQT_SIGNAL(toggled(bool)), receiver, slot); } } @@ -494,9 +494,9 @@ void KAction::init(QObject* receiver, const char* slot, KActionCollection* actio { if ( p->dirCurrentItemMenu==0 ) { - p->dirCurrentItemMenu = new QPopupMenu(); + p->dirCurrentItemMenu = new TQPopupMenu(); p->directoryMenu->insertItem(i18n("Current Item Merge Operation"), p->dirCurrentItemMenu); - p->dirCurrentSyncItemMenu = new QPopupMenu(); + p->dirCurrentSyncItemMenu = new TQPopupMenu(); p->directoryMenu->insertItem(i18n("Current Item Sync Operation"), p->dirCurrentSyncItemMenu); } addTo( p->dirCurrentItemMenu ); @@ -505,9 +505,9 @@ void KAction::init(QObject* receiver, const char* slot, KActionCollection* actio { if ( p->dirCurrentItemMenu==0 ) { - p->dirCurrentItemMenu = new QPopupMenu(); + p->dirCurrentItemMenu = new TQPopupMenu(); p->directoryMenu->insertItem(i18n("Current Item Merge Operation"), p->dirCurrentItemMenu); - p->dirCurrentSyncItemMenu = new QPopupMenu(); + p->dirCurrentSyncItemMenu = new TQPopupMenu(); p->directoryMenu->insertItem(i18n("Current Item Sync Operation"), p->dirCurrentSyncItemMenu); } addTo( p->dirCurrentSyncItemMenu ); @@ -521,11 +521,11 @@ void KAction::init(QObject* receiver, const char* slot, KActionCollection* actio } -KAction::KAction(const QString& text, const QIconSet& icon, int accel, - QObject* receiver, const char* slot, KActionCollection* actionCollection, +KAction::KAction(const TQString& text, const TQIconSet& icon, int accel, + TQObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bToggle, bool bMenu ) -: QAction ( text, icon, text, accel, actionCollection->m_pMainWindow, name, bToggle ) +: TQAction ( text, icon, text, accel, actionCollection->m_pMainWindow, name, bToggle ) { KMainWindow* p = actionCollection->m_pMainWindow; if ( !icon.isNull() && p ) this->addTo( p->m_pToolBar ); @@ -533,36 +533,36 @@ KAction::KAction(const QString& text, const QIconSet& icon, int accel, init(receiver,slot,actionCollection,name,bToggle,bMenu); } -KAction::KAction(const QString& text, int accel, - QObject* receiver, const char* slot, KActionCollection* actionCollection, +KAction::KAction(const TQString& text, int accel, + TQObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bToggle, bool bMenu ) -: QAction ( text, text, accel, actionCollection->m_pMainWindow, name, bToggle ) +: TQAction ( text, text, accel, actionCollection->m_pMainWindow, name, bToggle ) { init(receiver,slot,actionCollection,name,bToggle,bMenu); } -void KAction::setStatusText(const QString&) +void KAction::setStatusText(const TQString&) { } -void KAction::plug(QPopupMenu* menu) +void KAction::plug(TQPopupMenu* menu) { addTo(menu); } -KToggleAction::KToggleAction(const QString& text, const QIconSet& icon, int accel, QObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bMenu) +KToggleAction::KToggleAction(const TQString& text, const TQIconSet& icon, int accel, TQObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bMenu) : KAction( text, icon, accel, receiver, slot, actionCollection, name, true, bMenu) { } -KToggleAction::KToggleAction(const QString& text, int accel, QObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bMenu) +KToggleAction::KToggleAction(const TQString& text, int accel, TQObject* receiver, const char* slot, KActionCollection* actionCollection, const char* name, bool bMenu) : KAction( text, accel, receiver, slot, actionCollection, name, true, bMenu) { } -KToggleAction::KToggleAction(const QString& text, const QIconSet& icon, int accel, KActionCollection* actionCollection, const char* name, bool bMenu) +KToggleAction::KToggleAction(const TQString& text, const TQIconSet& icon, int accel, KActionCollection* actionCollection, const char* name, bool bMenu) : KAction( text, icon, accel, 0, 0, actionCollection, name, true, bMenu) { } @@ -582,144 +582,144 @@ bool KToggleAction::isChecked() //static -KAction* KStdAction::open( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KAction* KStdAction::open( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { #include "../xpm/fileopen.xpm" KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("Open"), QIconSet(QPixmap(fileopen)), Qt::CTRL+Qt::Key_O, parent, slot, actionCollection, "open", false, false); + KAction* a = new KAction( i18n("Open"), TQIconSet(TQPixmap(fileopen)), TQt::CTRL+TQt::Key_O, tqparent, slot, actionCollection, "open", false, false); if(p){ a->addTo( p->fileMenu ); } return a; } -KAction* KStdAction::save( QWidget* parent, const char* slot, KActionCollection* actionCollection ) +KAction* KStdAction::save( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection ) { #include "../xpm/filesave.xpm" KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("Save"), QIconSet(QPixmap(filesave)), Qt::CTRL+Qt::Key_S, parent, slot, actionCollection, "save", false, false); + KAction* a = new KAction( i18n("Save"), TQIconSet(TQPixmap(filesave)), TQt::CTRL+TQt::Key_S, tqparent, slot, actionCollection, "save", false, false); if(p){ a->addTo( p->fileMenu ); } return a; } -KAction* KStdAction::saveAs( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KAction* KStdAction::saveAs( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("Save As..."), 0, parent, slot, actionCollection, "saveas", false, false); + KAction* a = new KAction( i18n("Save As..."), 0, tqparent, slot, actionCollection, "saveas", false, false); if(p) a->addTo( p->fileMenu ); return a; } -KAction* KStdAction::print( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KAction* KStdAction::print( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { #include "../xpm/fileprint.xpm" KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("Print..."), QIconSet(QPixmap(fileprint)),Qt::CTRL+Qt::Key_P, parent, slot, actionCollection, "print", false, false); + KAction* a = new KAction( i18n("Print..."), TQIconSet(TQPixmap(fileprint)),TQt::CTRL+TQt::Key_P, tqparent, slot, actionCollection, "print", false, false); if(p) a->addTo( p->fileMenu ); return a; } -KAction* KStdAction::quit( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KAction* KStdAction::quit( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("Quit"), Qt::CTRL+Qt::Key_Q, parent, slot, actionCollection, "quit", false, false); + KAction* a = new KAction( i18n("Quit"), TQt::CTRL+TQt::Key_Q, tqparent, slot, actionCollection, "quit", false, false); if(p) a->addTo( p->fileMenu ); return a; } -KAction* KStdAction::cut( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KAction* KStdAction::cut( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("Cut"), Qt::CTRL+Qt::Key_X, parent, slot, actionCollection, "cut", false, false ); + KAction* a = new KAction( i18n("Cut"), TQt::CTRL+TQt::Key_X, tqparent, slot, actionCollection, "cut", false, false ); if(p) a->addTo( p->editMenu ); return a; } -KAction* KStdAction::copy( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KAction* KStdAction::copy( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("Copy"), Qt::CTRL+Qt::Key_C, parent, slot, actionCollection, "copy", false, false ); + KAction* a = new KAction( i18n("Copy"), TQt::CTRL+TQt::Key_C, tqparent, slot, actionCollection, "copy", false, false ); if(p) a->addTo( p->editMenu ); return a; } -KAction* KStdAction::paste( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KAction* KStdAction::paste( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("Paste"), Qt::CTRL+Qt::Key_V, parent, slot, actionCollection, "paste", false, false ); + KAction* a = new KAction( i18n("Paste"), TQt::CTRL+TQt::Key_V, tqparent, slot, actionCollection, "paste", false, false ); if(p) a->addTo( p->editMenu ); return a; } -KAction* KStdAction::selectAll( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KAction* KStdAction::selectAll( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("Select All"), Qt::CTRL+Qt::Key_A, parent, slot, actionCollection, "selectall", false, false ); + KAction* a = new KAction( i18n("Select All"), TQt::CTRL+TQt::Key_A, tqparent, slot, actionCollection, "selectall", false, false ); if(p) a->addTo( p->editMenu ); return a; } -KToggleAction* KStdAction::showToolbar( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KToggleAction* KStdAction::showToolbar( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { KMainWindow* p = actionCollection->m_pMainWindow; - KToggleAction* a = new KToggleAction( i18n("Show Toolbar"), 0, parent, slot, actionCollection, "showtoolbar", false ); + KToggleAction* a = new KToggleAction( i18n("Show Toolbar"), 0, tqparent, slot, actionCollection, "showtoolbar", false ); if(p) a->addTo( p->settingsMenu ); return a; } -KToggleAction* KStdAction::showStatusbar( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KToggleAction* KStdAction::showStatusbar( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { KMainWindow* p = actionCollection->m_pMainWindow; - KToggleAction* a = new KToggleAction( i18n("Show &Statusbar"), 0, parent, slot, actionCollection, "showstatusbar", false ); + KToggleAction* a = new KToggleAction( i18n("Show &Statusbar"), 0, tqparent, slot, actionCollection, "showstatusbar", false ); if(p) a->addTo( p->settingsMenu ); return a; } -KAction* KStdAction::preferences( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KAction* KStdAction::preferences( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("&Configure %1...").arg("KDiff3"), 0, parent, slot, actionCollection, "settings", false, false ); + KAction* a = new KAction( i18n("&Configure %1...").tqarg("KDiff3"), 0, tqparent, slot, actionCollection, "settings", false, false ); if(p) a->addTo( p->settingsMenu ); return a; } -KAction* KStdAction::keyBindings( QWidget*, const char*, KActionCollection*) +KAction* KStdAction::keyBindings( TQWidget*, const char*, KActionCollection*) { return 0; } -KAction* KStdAction::about( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KAction* KStdAction::about( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("About")+" KDiff3", 0, parent, slot, actionCollection, "about_kdiff3", false, false ); + KAction* a = new KAction( i18n("About")+" KDiff3", 0, tqparent, slot, actionCollection, "about_kdiff3", false, false ); if(p) a->addTo( p->helpMenu ); return a; } -KAction* KStdAction::aboutQt( KActionCollection* actionCollection ) +KAction* KStdAction::aboutTQt( KActionCollection* actionCollection ) { KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("About")+" Qt", 0, qApp, SLOT(aboutQt()), actionCollection, "about_qt", false, false ); + KAction* a = new KAction( i18n("About")+" TQt", 0, tqApp, TQT_SLOT(aboutTQt()), actionCollection, "about_qt", false, false ); if(p) a->addTo( p->helpMenu ); return a; } -KAction* KStdAction::help( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KAction* KStdAction::help( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("Help"), Qt::Key_F1, parent, slot, actionCollection, "help", false, false ); + KAction* a = new KAction( i18n("Help"), TQt::Key_F1, tqparent, slot, actionCollection, "help", false, false ); if(p) a->addTo( p->helpMenu ); return a; } -KAction* KStdAction::find( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KAction* KStdAction::tqfind( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("Find"), Qt::CTRL+Qt::Key_F, parent, slot, actionCollection, "find", false, false ); + KAction* a = new KAction( i18n("Find"), TQt::CTRL+TQt::Key_F, tqparent, slot, actionCollection, "tqfind", false, false ); if(p) a->addTo( p->editMenu ); return a; } -KAction* KStdAction::findNext( QWidget* parent, const char* slot, KActionCollection* actionCollection) +KAction* KStdAction::findNext( TQWidget* tqparent, const char* slot, KActionCollection* actionCollection) { KMainWindow* p = actionCollection->m_pMainWindow; - KAction* a = new KAction( i18n("Find Next"), Qt::Key_F3, parent, slot, actionCollection, "findNext", false, false ); + KAction* a = new KAction( i18n("Find Next"), TQt::Key_F3, tqparent, slot, actionCollection, "findNext", false, false ); if(p) a->addTo( p->editMenu ); return a; } @@ -727,16 +727,16 @@ KAction* KStdAction::findNext( QWidget* parent, const char* slot, KActionCollect -KFontChooser::KFontChooser( QWidget* pParent, const QString& /*name*/, bool, const QStringList&, bool, int ) -: QWidget(pParent) +KFontChooser::KFontChooser( TQWidget* pParent, const TQString& /*name*/, bool, const TQStringList&, bool, int ) +: TQWidget(pParent) { m_pParent = pParent; - QVBoxLayout* pLayout = new QVBoxLayout( this ); - m_pSelectFont = new QPushButton(i18n("Select Font"), this ); - connect(m_pSelectFont, SIGNAL(clicked()), this, SLOT(slotSelectFont())); + TQVBoxLayout* pLayout = new TQVBoxLayout( this ); + m_pSelectFont = new TQPushButton(i18n("Select Font"), this ); + connect(m_pSelectFont, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectFont())); pLayout->addWidget(m_pSelectFont); - m_pLabel = new QLabel( "", this ); + m_pLabel = new TQLabel( "", this ); m_pLabel->setFont( m_font ); m_pLabel->setMinimumWidth(200); m_pLabel->setText( "The quick brown fox jumps over the river\n" @@ -745,12 +745,12 @@ KFontChooser::KFontChooser( QWidget* pParent, const QString& /*name*/, bool, con pLayout->addWidget(m_pLabel); } -QFont KFontChooser::font() +TQFont KFontChooser::font() { - return m_font;//QFont("courier",10); + return m_font;//TQFont("courier",10); } -void KFontChooser::setFont( const QFont& font, bool ) +void KFontChooser::setFont( const TQFont& font, bool ) { m_font = font; m_pLabel->setFont( m_font ); @@ -762,9 +762,9 @@ void KFontChooser::slotSelectFont() for(;;) { bool bOk; - m_font = QFontDialog::getFont(&bOk, m_font ); + m_font = TQFontDialog::getFont(&bOk, m_font ); m_pLabel->setFont( m_font ); - QFontMetrics fm(m_font); + TQFontMetrics fm(m_font); // Variable width font. if ( fm.width('W')!=fm.width('i') ) @@ -785,27 +785,27 @@ void KFontChooser::slotSelectFont() } -KColorButton::KColorButton(QWidget* parent) -: QPushButton(parent) +KColorButton::KColorButton(TQWidget* tqparent) +: TQPushButton(tqparent) { - connect( this, SIGNAL(clicked()), this, SLOT(slotClicked())); + connect( this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClicked())); } -QColor KColorButton::color() +TQColor KColorButton::color() { return m_color; } -void KColorButton::setColor( const QColor& color ) +void KColorButton::setColor( const TQColor& color ) { m_color = color; update(); } -void KColorButton::paintEvent( QPaintEvent* e ) +void KColorButton::paintEvent( TQPaintEvent* e ) { - QPushButton::paintEvent(e); - QPainter p(this); + TQPushButton::paintEvent(e); + TQPainter p(this); int w = width(); int h = height(); @@ -816,7 +816,7 @@ void KColorButton::paintEvent( QPaintEvent* e ) void KColorButton::slotClicked() { // Under Windows ChooseColor() should be used. (Nicer if few colors exist.) - QColor c = QColorDialog::getColor ( m_color, this ); + TQColor c = TQColorDialog::getColor ( m_color, this ); if ( c.isValid() ) m_color = c; update(); } @@ -824,9 +824,9 @@ void KColorButton::slotClicked() KPrinter::KPrinter() { } -QValueList<int> KPrinter::pageList() +TQValueList<int> KPrinter::pageList() { - QValueList<int> vl; + TQValueList<int> vl; int to = toPage(); for(int i=fromPage(); i<=to; ++i) { @@ -842,14 +842,14 @@ void KPrinter::setPageSelection(e_PageSelection) } -QPixmap KIconLoader::loadIcon( const QString&, int ) +TQPixmap KIconLoader::loadIcon( const TQString&, int ) { - return QPixmap(); + return TQPixmap(); } -KAboutData::KAboutData( const QString& /*name*/, const QString& appName, const QString& version, - const QString& description, int, - const QString& copyright, int, const QString& homepage, const QString& email) +KAboutData::KAboutData( const TQString& /*name*/, const TQString& appName, const TQString& version, + const TQString& description, int, + const TQString& copyright, int, const TQString& homepage, const TQString& email) { s_copyright = copyright; s_email = email; @@ -859,7 +859,7 @@ KAboutData::KAboutData( const QString& /*name*/, const QString& appName, const Q s_homepage = homepage; } -KAboutData::KAboutData( const QString& /*name*/, const QString& /*appName*/, const QString& /*version*/ ) +KAboutData::KAboutData( const TQString& /*name*/, const TQString& /*appName*/, const TQString& /*version*/ ) { } @@ -913,16 +913,16 @@ int KCmdLineArgs::count() return s_vArg.size(); } -QString KCmdLineArgs::arg(int idx) +TQString KCmdLineArgs::arg(int idx) { - return QString::fromLocal8Bit( s_vArg[idx] ); + return TQString::fromLocal8Bit( s_vArg[idx] ); } void KCmdLineArgs::clear() { } -QString KCmdLineArgs::getOption( const QString& s ) +TQString KCmdLineArgs::getOption( const TQString& s ) { // Find the option int j=0; @@ -932,16 +932,16 @@ QString KCmdLineArgs::getOption( const QString& s ) const char* pos = strchr( optName,' ' ); int len = pos==0 ? strlen( optName ) : pos - optName; - if( s == (const char*)( QCString( optName, len+1) ) ) + if( s == (const char*)( TQCString( optName, len+1) ) ) { - return s_vOption[j].isEmpty() ? QString() : s_vOption[j].last(); + return s_vOption[j].isEmpty() ? TQString() : s_vOption[j].last(); } } assert(false); - return QString(); + return TQString(); } -QCStringList KCmdLineArgs::getOptionList( const QString& s ) +QCStringList KCmdLineArgs::getOptionList( const TQString& s ) { // Find the option int j=0; @@ -951,7 +951,7 @@ QCStringList KCmdLineArgs::getOptionList( const QString& s ) const char* pos = strchr( optName,' ' ); int len = pos==0 ? strlen( optName ) : pos - optName; - if( s == (const char*)( QCString( optName, len+1) ) ) + if( s == (const char*)( TQCString( optName, len+1) ) ) { return s_vOption[j]; } @@ -961,14 +961,14 @@ QCStringList KCmdLineArgs::getOptionList( const QString& s ) return QCStringList(); } -bool KCmdLineArgs::isSet(const QString& s) +bool KCmdLineArgs::isSet(const TQString& s) { // Find the option int j=0; for( j=0; j<(int)s_vOption.size(); ++j ) { const char* optName = s_pOptions[j].name; - if( s == QString( optName ) ) + if( s == TQString( optName ) ) { return ! s_vOption[j].isEmpty(); } @@ -981,7 +981,7 @@ bool KCmdLineArgs::isSet(const QString& s) KApplication* kapp; KApplication::KApplication() -: QApplication( s_argc,s_argv ) +: TQApplication( s_argc,s_argv ) { kapp = this; @@ -999,10 +999,10 @@ KApplication::KApplication() } // First find the option "-config" or "--config" to allow loading of options - QString configFileName; + TQString configFileName; for( i=1; i<s_argc-1; ++i ) { - QString arg = s_argv[i]; + TQString arg = s_argv[i]; if ( arg == "-config" || arg == "--config" ) { configFileName = s_argv[i+1]; @@ -1010,8 +1010,8 @@ KApplication::KApplication() } m_config.readConfigFile(configFileName); - QStringList ignorableCmdLineOptionsList = m_config.readListEntry("IgnorableCmdLineOptions", QString("-u;-query;-html;-abort"), '|'); - QString ignorableCmdLineOptions; + TQStringList ignorableCmdLineOptionsList = m_config.readListEntry("IgnorableCmdLineOptions", TQString("-u;-query;-html;-abort"), '|'); + TQString ignorableCmdLineOptions; if ( !ignorableCmdLineOptionsList.isEmpty() ) ignorableCmdLineOptions = ignorableCmdLineOptionsList.front() + ";"; @@ -1021,7 +1021,7 @@ KApplication::KApplication() { if ( s_argv[i][0]=='-' ) // An option { - if ( ignorableCmdLineOptions.contains(QString(s_argv[i])+";") ) + if ( ignorableCmdLineOptions.tqcontains(TQString(s_argv[i])+";") ) continue; // Find the option int j=0; @@ -1048,8 +1048,8 @@ KApplication::KApplication() } if (j==nofOptions) { - QString s; - s = QString("Unknown option: ") + s_argv[i] + "\n"; + TQString s; + s = TQString("Unknown option: ") + s_argv[i] + "\n"; s += "If KDiff3 should ignore this option, run KDiff3 normally and edit\n" "the \"Command line options to ignore\" in the \"Integration Settings\".\n\n"; @@ -1078,7 +1078,7 @@ KApplication::KApplication() if ( strlen(s_pOptions[j].name)>1 ) s += "-"; } s += s_pOptions[j].name; - s += QString().fill(' ', minMaxLimiter( 20 - ((int)s.length()-pos), 3, 20 ) ); + s += TQString().fill(' ', minMaxLimiter( 20 - ((int)s.length()-pos), 3, 20 ) ); s += s_pOptions[j].description; s +="\n"; pos=s.length(); @@ -1095,7 +1095,7 @@ KApplication::KApplication() s += "\n"+i18n("For more documentation, see the help-menu or the subdirectory doc.")+"\n"; #ifdef _WIN32 // A windows program has no console - if ( 0==QMessageBox::information(0, i18n("KDiff3-Usage"), s, i18n("Ignore"),i18n("Exit") ) ) + if ( 0==TQMessageBox::information(0, i18n("KDiff3-Usage"), s, i18n("Ignore"),i18n("Exit") ) ) continue; #else std::cerr << s.latin1() << std::endl; @@ -1163,18 +1163,18 @@ KLibLoader* KLibLoader::self() } extern "C" void* init_libkdiff3part(); -KLibFactory* KLibLoader::factory(QString const&) +KLibFactory* KLibLoader::factory(TQString const&) { return (KLibFactory*) init_libkdiff3part(); } -QObject* KLibFactory::create(QObject* pParent, const QString& name, const QString& classname ) +TQObject* KLibFactory::create(TQObject* pParent, const TQString& name, const TQString& classname ) { KParts::Factory* f = dynamic_cast<KParts::Factory*>(this); if (f!=0) - return f->createPartObject( (QWidget*)pParent, name.ascii(), + return f->createPartObject( (TQWidget*)pParent, name.ascii(), pParent, name.ascii(), - classname.ascii(), QStringList() ); + classname.ascii(), TQStringList() ); else return 0; } |