summaryrefslogtreecommitdiffstats
path: root/src/optiondialog.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-27 05:58:16 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-27 05:58:16 +0000
commitf636ba5ba2df9d34d56b1c85f24c6598fa1cb645 (patch)
tree5365045e6bce685a7cbaeb81b4797a719e86089f /src/optiondialog.cpp
parent63862fdfcb61f302ef69e86d40772bb1318d3763 (diff)
downloadkdiff3-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/optiondialog.cpp')
-rw-r--r--src/optiondialog.cpp662
1 files changed, 331 insertions, 331 deletions
diff --git a/src/optiondialog.cpp b/src/optiondialog.cpp
index 698763e..445fbb0 100644
--- a/src/optiondialog.cpp
+++ b/src/optiondialog.cpp
@@ -18,20 +18,20 @@
*
*/
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qfont.h>
-#include <qframe.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qvbox.h>
-#include <qvalidator.h>
-#include <qtooltip.h>
-#include <qtextcodec.h>
-#include <qradiobutton.h>
-#include <qvbuttongroup.h>
-#include <qsettings.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqfont.h>
+#include <tqframe.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqvbox.h>
+#include <tqvalidator.h>
+#include <tqtooltip.h>
+#include <tqtextcodec.h>
+#include <tqradiobutton.h>
+#include <tqvbuttongroup.h>
+#include <tqsettings.h>
#include <kapplication.h>
#include <kcolorbtn.h>
@@ -55,10 +55,10 @@
#include <kglobalsettings.h>
#endif
-static QString s_historyEntryStartRegExpToolTip;
-static QString s_historyEntryStartSortKeyOrderToolTip;
-static QString s_autoMergeRegExpToolTip;
-static QString s_historyStartRegExpToolTip;
+static TQString s_historyEntryStartRegExpToolTip;
+static TQString s_historyEntryStartSortKeyOrderToolTip;
+static TQString s_autoMergeRegExpToolTip;
+static TQString s_historyStartRegExpToolTip;
void OptionDialog::addOptionItem(OptionItem* p)
{
@@ -68,7 +68,7 @@ void OptionDialog::addOptionItem(OptionItem* p)
class OptionItem
{
public:
- OptionItem( OptionDialog* pOptionDialog, const QString& saveName )
+ OptionItem( OptionDialog* pOptionDialog, const TQString& saveName )
{
assert(pOptionDialog!=0);
pOptionDialog->addOptionItem( this );
@@ -80,17 +80,17 @@ public:
virtual void apply()=0;
virtual void write(ValueMap*)=0;
virtual void read(ValueMap*)=0;
- QString getSaveName(){return m_saveName;}
+ TQString getSaveName(){return m_saveName;}
protected:
- QString m_saveName;
+ TQString m_saveName;
};
-class OptionCheckBox : public QCheckBox, public OptionItem
+class OptionCheckBox : public TQCheckBox, public OptionItem
{
public:
- OptionCheckBox( QString text, bool bDefaultVal, const QString& saveName, bool* pbVar,
- QWidget* pParent, OptionDialog* pOD )
- : QCheckBox( text, pParent ), OptionItem( pOD, saveName )
+ OptionCheckBox( TQString text, bool bDefaultVal, const TQString& saveName, bool* pbVar,
+ TQWidget* pParent, OptionDialog* pOD )
+ : TQCheckBox( text, pParent ), OptionItem( pOD, saveName )
{
m_pbVar = pbVar;
m_bDefaultVal = bDefaultVal;
@@ -106,12 +106,12 @@ private:
bool m_bDefaultVal;
};
-class OptionRadioButton : public QRadioButton, public OptionItem
+class OptionRadioButton : public TQRadioButton, public OptionItem
{
public:
- OptionRadioButton( QString text, bool bDefaultVal, const QString& saveName, bool* pbVar,
- QWidget* pParent, OptionDialog* pOD )
- : QRadioButton( text, pParent ), OptionItem( pOD, saveName )
+ OptionRadioButton( TQString text, bool bDefaultVal, const TQString& saveName, bool* pbVar,
+ TQWidget* pParent, OptionDialog* pOD )
+ : TQRadioButton( text, pParent ), OptionItem( pOD, saveName )
{
m_pbVar = pbVar;
m_bDefaultVal = bDefaultVal;
@@ -132,13 +132,13 @@ template<class T>
class OptionT : public OptionItem
{
public:
- OptionT( const T& defaultVal, const QString& saveName, T* pVar, OptionDialog* pOD )
+ OptionT( const T& defaultVal, const TQString& saveName, T* pVar, OptionDialog* pOD )
: OptionItem( pOD, saveName )
{
m_pVar = pVar;
*m_pVar = defaultVal;
}
- OptionT( const QString& saveName, T* pVar, OptionDialog* pOD )
+ OptionT( const TQString& saveName, T* pVar, OptionDialog* pOD )
: OptionItem( pOD, saveName )
{
m_pVar = pVar;
@@ -153,26 +153,26 @@ private:
T* m_pVar;
};
-template <class T> void writeEntry(ValueMap* vm, const QString& saveName, const T& v ) { vm->writeEntry( saveName, v ); }
-static void writeEntry(ValueMap* vm, const QString& saveName, const QStringList& v ) { vm->writeEntry( saveName, v, '|' ); }
+template <class T> void writeEntry(ValueMap* vm, const TQString& saveName, const T& v ) { vm->writeEntry( saveName, v ); }
+static void writeEntry(ValueMap* vm, const TQString& saveName, const TQStringList& v ) { vm->writeEntry( saveName, v, '|' ); }
-static void readEntry(ValueMap* vm, const QString& saveName, bool& v ) { v = vm->readBoolEntry( saveName, v ); }
-static void readEntry(ValueMap* vm, const QString& saveName, int& v ) { v = vm->readNumEntry( saveName, v ); }
-static void readEntry(ValueMap* vm, const QString& saveName, QSize& v ) { v = vm->readSizeEntry( saveName, &v ); }
-static void readEntry(ValueMap* vm, const QString& saveName, QPoint& v ) { v = vm->readPointEntry( saveName, &v ); }
-static void readEntry(ValueMap* vm, const QString& saveName, QStringList& v ){ v = vm->readListEntry( saveName, QStringList(), '|' ); }
+static void readEntry(ValueMap* vm, const TQString& saveName, bool& v ) { v = vm->readBoolEntry( saveName, v ); }
+static void readEntry(ValueMap* vm, const TQString& saveName, int& v ) { v = vm->readNumEntry( saveName, v ); }
+static void readEntry(ValueMap* vm, const TQString& saveName, TQSize& v ) { v = vm->readSizeEntry( saveName, &v ); }
+static void readEntry(ValueMap* vm, const TQString& saveName, TQPoint& v ) { v = vm->readPointEntry( saveName, &v ); }
+static void readEntry(ValueMap* vm, const TQString& saveName, TQStringList& v ){ v = vm->readListEntry( saveName, TQStringList(), '|' ); }
typedef OptionT<bool> OptionToggleAction;
typedef OptionT<int> OptionNum;
-typedef OptionT<QPoint> OptionPoint;
-typedef OptionT<QSize> OptionSize;
-typedef OptionT<QStringList> OptionStringList;
+typedef OptionT<TQPoint> OptionPoint;
+typedef OptionT<TQSize> OptionSize;
+typedef OptionT<TQStringList> OptionStringList;
class OptionFontChooser : public KFontChooser, public OptionItem
{
public:
- OptionFontChooser( const QFont& defaultVal, const QString& saveName, QFont* pbVar, QWidget* pParent, OptionDialog* pOD )
- :KFontChooser( pParent,"font",true/*onlyFixed*/,QStringList(),false,6 ),
+ OptionFontChooser( const TQFont& defaultVal, const TQString& saveName, TQFont* pbVar, TQWidget* pParent, OptionDialog* pOD )
+ :KFontChooser( pParent,"font",true/*onlyFixed*/,TQStringList(),false,6 ),
OptionItem( pOD, saveName )
{
m_pbVar = pbVar;
@@ -186,14 +186,14 @@ public:
void read (ValueMap* config){ *m_pbVar = config->readFontEntry( m_saveName, m_pbVar ); }
private:
OptionFontChooser( const OptionToggleAction& ); // private copy constructor without implementation
- QFont* m_pbVar;
- QFont m_default;
+ TQFont* m_pbVar;
+ TQFont m_default;
};
class OptionColorButton : public KColorButton, public OptionItem
{
public:
- OptionColorButton( QColor defaultVal, const QString& saveName, QColor* pVar, QWidget* pParent, OptionDialog* pOD )
+ OptionColorButton( TQColor defaultVal, const TQString& saveName, TQColor* pVar, TQWidget* pParent, OptionDialog* pOD )
: KColorButton( pParent ), OptionItem( pOD, saveName )
{
m_pVar = pVar;
@@ -206,16 +206,16 @@ public:
void read (ValueMap* config){ *m_pVar = config->readColorEntry( m_saveName, m_pVar ); }
private:
OptionColorButton( const OptionColorButton& ); // private copy constructor without implementation
- QColor* m_pVar;
- QColor m_defaultVal;
+ TQColor* m_pVar;
+ TQColor m_defaultVal;
};
-class OptionLineEdit : public QComboBox, public OptionItem
+class OptionLineEdit : public TQComboBox, public OptionItem
{
public:
- OptionLineEdit( const QString& defaultVal, const QString& saveName, QString* pVar,
- QWidget* pParent, OptionDialog* pOD )
- : QComboBox( pParent ), OptionItem( pOD, saveName )
+ OptionLineEdit( const TQString& defaultVal, const TQString& saveName, TQString* pVar,
+ TQWidget* pParent, OptionDialog* pOD )
+ : TQComboBox( pParent ), OptionItem( pOD, saveName )
{
setMinimumWidth(50);
setEditable(true);
@@ -237,7 +237,7 @@ public:
private:
void insertText()
{ // Check if the text exists. If yes remove it and push it in as first element
- QString current = currentText();
+ TQString current = currentText();
m_list.remove( current );
m_list.push_front( current );
clear();
@@ -246,32 +246,32 @@ private:
insertStringList(m_list);
}
OptionLineEdit( const OptionLineEdit& ); // private copy constructor without implementation
- QString* m_pVar;
- QString m_defaultVal;
- QStringList m_list;
+ TQString* m_pVar;
+ TQString m_defaultVal;
+ TQStringList m_list;
};
-#if defined QT_NO_VALIDATOR
+#if defined TQT_NO_VALIDATOR
#error No validator
#endif
-class OptionIntEdit : public QLineEdit, public OptionItem
+class OptionIntEdit : public TQLineEdit, public OptionItem
{
public:
- OptionIntEdit( int defaultVal, const QString& saveName, int* pVar, int rangeMin, int rangeMax,
- QWidget* pParent, OptionDialog* pOD )
- : QLineEdit( pParent ), OptionItem( pOD, saveName )
+ OptionIntEdit( int defaultVal, const TQString& saveName, int* pVar, int rangeMin, int rangeMax,
+ TQWidget* pParent, OptionDialog* pOD )
+ : TQLineEdit( pParent ), OptionItem( pOD, saveName )
{
m_pVar = pVar;
m_defaultVal = defaultVal;
- QIntValidator* v = new QIntValidator(this);
+ TQIntValidator* v = new TQIntValidator(TQT_TQOBJECT(this));
v->setRange( rangeMin, rangeMax );
setValidator( v );
}
- void setToDefault(){ QString s; s.setNum(m_defaultVal); setText( s ); }
- void setToCurrent(){ QString s; s.setNum(*m_pVar); setText( s ); }
- void apply() { const QIntValidator* v=static_cast<const QIntValidator*>(validator());
+ void setToDefault(){ TQString s; s.setNum(m_defaultVal); setText( s ); }
+ void setToCurrent(){ TQString s; s.setNum(*m_pVar); setText( s ); }
+ void apply() { const TQIntValidator* v=static_cast<const TQIntValidator*>(validator());
*m_pVar = minMaxLimiter( text().toInt(), v->bottom(), v->top());
- setText( QString::number(*m_pVar) ); }
+ setText( TQString::number(*m_pVar) ); }
void write(ValueMap* config){ config->writeEntry(m_saveName, *m_pVar ); }
void read (ValueMap* config){ *m_pVar = config->readNumEntry( m_saveName, *m_pVar ); }
private:
@@ -280,12 +280,12 @@ private:
int m_defaultVal;
};
-class OptionComboBox : public QComboBox, public OptionItem
+class OptionComboBox : public TQComboBox, public OptionItem
{
public:
- OptionComboBox( int defaultVal, const QString& saveName, int* pVarNum,
- QWidget* pParent, OptionDialog* pOD )
- : QComboBox( pParent ), OptionItem( pOD, saveName )
+ OptionComboBox( int defaultVal, const TQString& saveName, int* pVarNum,
+ TQWidget* pParent, OptionDialog* pOD )
+ : TQComboBox( pParent ), OptionItem( pOD, saveName )
{
setMinimumWidth(50);
m_pVarNum = pVarNum;
@@ -293,9 +293,9 @@ public:
m_defaultVal = defaultVal;
setEditable(false);
}
- OptionComboBox( int defaultVal, const QString& saveName, QString* pVarStr,
- QWidget* pParent, OptionDialog* pOD )
- : QComboBox( pParent ), OptionItem( pOD, saveName )
+ OptionComboBox( int defaultVal, const TQString& saveName, TQString* pVarStr,
+ TQWidget* pParent, OptionDialog* pOD )
+ : TQComboBox( pParent ), OptionItem( pOD, saveName )
{
m_pVarNum = 0;
m_pVarStr = pVarStr;
@@ -330,10 +330,10 @@ public:
private:
OptionComboBox( const OptionIntEdit& ); // private copy constructor without implementation
int* m_pVarNum;
- QString* m_pVarStr;
+ TQString* m_pVarStr;
int m_defaultVal;
- void setText(const QString& s)
+ void setText(const TQString& s)
{
// Find the string in the combobox-list, don't change the value if nothing fits.
for( int i=0; i<count(); ++i )
@@ -349,41 +349,41 @@ private:
}
};
-class OptionEncodingComboBox : public QComboBox, public OptionItem
+class OptionEncodingComboBox : public TQComboBox, public OptionItem
{
- std::vector<QTextCodec*> m_codecVec;
- QTextCodec** m_ppVarCodec;
+ std::vector<TQTextCodec*> m_codecVec;
+ TQTextCodec** m_ppVarCodec;
public:
- OptionEncodingComboBox( const QString& saveName, QTextCodec** ppVarCodec,
- QWidget* pParent, OptionDialog* pOD )
- : QComboBox( pParent ), OptionItem( pOD, saveName )
+ OptionEncodingComboBox( const TQString& saveName, TQTextCodec** ppVarCodec,
+ TQWidget* pParent, OptionDialog* pOD )
+ : TQComboBox( pParent ), OptionItem( pOD, saveName )
{
m_ppVarCodec = ppVarCodec;
- insertCodec( i18n("Unicode, 8 bit"), QTextCodec::codecForName("UTF-8") );
- insertCodec( i18n("Unicode"), QTextCodec::codecForName("iso-10646-UCS-2") );
- insertCodec( i18n("Latin1"), QTextCodec::codecForName("iso 8859-1") );
+ insertCodec( i18n("Unicode, 8 bit"), TQTextCodec::codecForName("UTF-8") );
+ insertCodec( i18n("Unicode"), TQTextCodec::codecForName("iso-10646-UCS-2") );
+ insertCodec( i18n("Latin1"), TQTextCodec::codecForName("iso 8859-1") );
// First sort codec names:
- std::map<QString, QTextCodec*> names;
+ std::map<TQString, TQTextCodec*> names;
int i;
for(i=0;;++i)
{
- QTextCodec* c = QTextCodec::codecForIndex(i);
+ TQTextCodec* c = TQTextCodec::codecForIndex(i);
if ( c==0 ) break;
- else names[QString(c->name()).upper()]=c;
+ else names[TQString(c->name()).upper()]=c;
}
- std::map<QString, QTextCodec*>::iterator it;
+ std::map<TQString, TQTextCodec*>::iterator it;
for(it=names.begin();it!=names.end();++it)
{
insertCodec( "", it->second );
}
- QToolTip::add( this, i18n(
+ TQToolTip::add( this, i18n(
"Change this if non-ASCII characters are not displayed correctly."
));
}
- void insertCodec( const QString& visibleCodecName, QTextCodec* c )
+ void insertCodec( const TQString& visibleCodecName, TQTextCodec* c )
{
if (c!=0)
{
@@ -392,17 +392,17 @@ public:
if ( c==m_codecVec[i] )
return; // don't insert any codec twice
}
- insertItem( visibleCodecName.isEmpty() ? QString(c->name()) : visibleCodecName+" ("+c->name()+")", m_codecVec.size() );
+ insertItem( visibleCodecName.isEmpty() ? TQString(c->name()) : visibleCodecName+" ("+c->name()+")", m_codecVec.size() );
m_codecVec.push_back( c );
}
}
void setToDefault()
{
- QString defaultName = QTextCodec::codecForLocale()->name();
+ TQString defaultName = TQTextCodec::codecForLocale()->name();
for(int i=0;i<count();++i)
{
if (defaultName==text(i) &&
- m_codecVec[i]==QTextCodec::codecForLocale())
+ m_codecVec[i]==TQTextCodec::codecForLocale())
{
setCurrentItem(i);
if (m_ppVarCodec!=0){ *m_ppVarCodec=m_codecVec[i]; }
@@ -437,7 +437,7 @@ public:
}
void read (ValueMap* config)
{
- QString codecName = config->readEntry( m_saveName, m_codecVec[ currentItem() ]->name() );
+ TQString codecName = config->readEntry( m_saveName, m_codecVec[ currentItem() ]->name() );
for(unsigned int i=0; i<m_codecVec.size(); ++i)
{
if ( codecName == m_codecVec[i]->name() )
@@ -451,11 +451,11 @@ public:
};
-OptionDialog::OptionDialog( bool bShowDirMergeSettings, QWidget *parent, char *name )
+OptionDialog::OptionDialog( bool bShowDirMergeSettings, TQWidget *tqparent, char *name )
:KDialogBase( IconList, i18n("Configure"), Help|Default|Apply|Ok|Cancel,
- Ok, parent, name, true /*modal*/, true )
+ Ok, tqparent, name, true /*modal*/, true )
{
- setHelp( "kdiff3/index.html", QString::null );
+ setHelp( "kdiff3/index.html", TQString() );
setupFontPage();
setupColorPage();
@@ -495,8 +495,8 @@ void OptionDialog::setupOtherOptions()
new OptionToggleAction( true, "Show Statusbar", &m_bShowStatusBar, this );
new OptionNum( (int)KToolBar::Top, "ToolBarPos", &m_toolBarPos, this );
- new OptionSize( QSize(600,400),"Geometry", &m_geometry, this );
- new OptionPoint( QPoint(0,22), "Position", &m_position, this );
+ new OptionSize( TQSize(600,400),"Geometry", &m_tqgeometry, this );
+ new OptionPoint( TQPoint(0,22), "Position", &m_position, this );
new OptionToggleAction( false, "WindowStateMaximised", &m_bMaximised, this );
new OptionStringList( "RecentAFiles", &m_recentAFiles, this );
@@ -507,16 +507,16 @@ void OptionDialog::setupOtherOptions()
void OptionDialog::setupFontPage( void )
{
- QFrame *page = addPage( i18n("Font"), i18n("Editor & Diff Output Font" ),
+ TQFrame *page = addPage( i18n("Font"), i18n("Editor & Diff Output Font" ),
BarIcon("fonts", KIcon::SizeMedium ) );
- QVBoxLayout *topLayout = new QVBoxLayout( page, 5, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 5, spacingHint() );
- QFont defaultFont =
+ TQFont defaultFont =
#ifdef _WIN32
- QFont("Courier New", 10 );
+ TQFont("Courier New", 10 );
#elif defined( KREPLACEMENTS_H )
- QFont("Courier", 10 );
+ TQFont("Courier", 10 );
#else
KGlobalSettings::fixedFont();
#endif
@@ -524,13 +524,13 @@ void OptionDialog::setupFontPage( void )
OptionFontChooser* pFontChooser = new OptionFontChooser( defaultFont, "Font", &m_font, page, this );
topLayout->addWidget( pFontChooser );
- QGridLayout *gbox = new QGridLayout( 1, 2 );
+ TQGridLayout *gbox = new TQGridLayout( 1, 2 );
topLayout->addLayout( gbox );
int line=0;
OptionCheckBox* pItalicDeltas = new OptionCheckBox( i18n("Italic font for deltas"), false, "ItalicForDeltas", &m_bItalicForDeltas, page, this );
gbox->addMultiCellWidget( pItalicDeltas, line, line, 0, 1 );
- QToolTip::add( pItalicDeltas, i18n(
+ TQToolTip::add( pItalicDeltas, i18n(
"Selects the italic version of the font for differences.\n"
"If the font doesn't support italic characters, then this does nothing.")
);
@@ -539,126 +539,126 @@ void OptionDialog::setupFontPage( void )
void OptionDialog::setupColorPage( void )
{
- QFrame *page = addPage( i18n("Color"), i18n("Colors Settings"),
+ TQFrame *page = addPage( i18n("Color"), i18n("Colors Settings"),
BarIcon("colorize", KIcon::SizeMedium ) );
- QVBoxLayout *topLayout = new QVBoxLayout( page, 5, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 5, spacingHint() );
- QGridLayout *gbox = new QGridLayout( 7, 2 );
+ TQGridLayout *gbox = new TQGridLayout( 7, 2 );
gbox->setColStretch(1,5);
topLayout->addLayout(gbox);
- QLabel* label;
+ TQLabel* label;
int line = 0;
- int depth = QColor::numBitPlanes();
+ int depth = TQColor::numBitPlanes();
bool bLowColor = depth<=8;
- label = new QLabel( i18n("Editor and Diff Views:"), page );
+ label = new TQLabel( i18n("Editor and Diff Views:"), page );
gbox->addWidget( label, line, 0 );
- QFont f( label->font() );
+ TQFont f( label->font() );
f.setBold(true);
label->setFont(f);
++line;
- OptionColorButton* pFgColor = new OptionColorButton( Qt::black,"FgColor", &m_fgColor, page, this );
- label = new QLabel( pFgColor, i18n("Foreground color:"), page );
+ OptionColorButton* pFgColor = new OptionColorButton( TQt::black,"FgColor", &m_fgColor, page, this );
+ label = new TQLabel( pFgColor, i18n("Foreground color:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pFgColor, line, 1 );
++line;
- OptionColorButton* pBgColor = new OptionColorButton( Qt::white, "BgColor", &m_bgColor, page, this );
- label = new QLabel( pBgColor, i18n("Background color:"), page );
+ OptionColorButton* pBgColor = new OptionColorButton( TQt::white, "BgColor", &m_bgColor, page, this );
+ label = new TQLabel( pBgColor, i18n("Background color:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pBgColor, line, 1 );
++line;
OptionColorButton* pDiffBgColor = new OptionColorButton(
- bLowColor ? Qt::lightGray : qRgb(224,224,224), "DiffBgColor", &m_diffBgColor, page, this );
- label = new QLabel( pDiffBgColor, i18n("Diff background color:"), page );
+ bLowColor ? TQt::lightGray : tqRgb(224,224,224), "DiffBgColor", &m_diffBgColor, page, this );
+ label = new TQLabel( pDiffBgColor, i18n("Diff background color:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pDiffBgColor, line, 1 );
++line;
OptionColorButton* pColorA = new OptionColorButton(
- bLowColor ? qRgb(0,0,255) : qRgb(0,0,200)/*blue*/, "ColorA", &m_colorA, page, this );
- label = new QLabel( pColorA, i18n("Color A:"), page );
+ bLowColor ? tqRgb(0,0,255) : tqRgb(0,0,200)/*blue*/, "ColorA", &m_colorA, page, this );
+ label = new TQLabel( pColorA, i18n("Color A:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pColorA, line, 1 );
++line;
OptionColorButton* pColorB = new OptionColorButton(
- bLowColor ? qRgb(0,128,0) : qRgb(0,150,0)/*green*/, "ColorB", &m_colorB, page, this );
- label = new QLabel( pColorB, i18n("Color B:"), page );
+ bLowColor ? tqRgb(0,128,0) : tqRgb(0,150,0)/*green*/, "ColorB", &m_colorB, page, this );
+ label = new TQLabel( pColorB, i18n("Color B:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pColorB, line, 1 );
++line;
OptionColorButton* pColorC = new OptionColorButton(
- bLowColor ? qRgb(128,0,128) : qRgb(150,0,150)/*magenta*/, "ColorC", &m_colorC, page, this );
- label = new QLabel( pColorC, i18n("Color C:"), page );
+ bLowColor ? tqRgb(128,0,128) : tqRgb(150,0,150)/*magenta*/, "ColorC", &m_colorC, page, this );
+ label = new TQLabel( pColorC, i18n("Color C:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pColorC, line, 1 );
++line;
- OptionColorButton* pColorForConflict = new OptionColorButton( Qt::red, "ColorForConflict", &m_colorForConflict, page, this );
- label = new QLabel( pColorForConflict, i18n("Conflict color:"), page );
+ OptionColorButton* pColorForConflict = new OptionColorButton( TQt::red, "ColorForConflict", &m_colorForConflict, page, this );
+ label = new TQLabel( pColorForConflict, i18n("Conflict color:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pColorForConflict, line, 1 );
++line;
OptionColorButton* pColor = new OptionColorButton(
- bLowColor ? qRgb(192,192,192) : qRgb(220,220,100), "CurrentRangeBgColor", &m_currentRangeBgColor, page, this );
- label = new QLabel( pColor, i18n("Current range background color:"), page );
+ bLowColor ? tqRgb(192,192,192) : tqRgb(220,220,100), "CurrentRangeBgColor", &m_currentRangeBgColor, page, this );
+ label = new TQLabel( pColor, i18n("Current range background color:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pColor, line, 1 );
++line;
pColor = new OptionColorButton(
- bLowColor ? qRgb(255,255,0) : qRgb(255,255,150), "CurrentRangeDiffBgColor", &m_currentRangeDiffBgColor, page, this );
- label = new QLabel( pColor, i18n("Current range diff background color:"), page );
+ bLowColor ? tqRgb(255,255,0) : tqRgb(255,255,150), "CurrentRangeDiffBgColor", &m_currentRangeDiffBgColor, page, this );
+ label = new TQLabel( pColor, i18n("Current range diff background color:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pColor, line, 1 );
++line;
- pColor = new OptionColorButton( qRgb(0xff,0xd0,0x80), "ManualAlignmentRangeColor", &m_manualHelpRangeColor, page, this );
- label = new QLabel( pColor, i18n("Color for manually aligned difference ranges:"), page );
+ pColor = new OptionColorButton( tqRgb(0xff,0xd0,0x80), "ManualAlignmentRangeColor", &m_manualHelpRangeColor, page, this );
+ label = new TQLabel( pColor, i18n("Color for manually aligned difference ranges:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pColor, line, 1 );
++line;
- label = new QLabel( i18n("Directory Comparison View:"), page );
+ label = new TQLabel( i18n("Directory Comparison View:"), page );
gbox->addWidget( label, line, 0 );
label->setFont(f);
++line;
- pColor = new OptionColorButton( qRgb(0,0xd0,0), "NewestFileColor", &m_newestFileColor, page, this );
- label = new QLabel( pColor, i18n("Newest file color:"), page );
+ pColor = new OptionColorButton( tqRgb(0,0xd0,0), "NewestFileColor", &m_newestFileColor, page, this );
+ label = new TQLabel( pColor, i18n("Newest file color:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pColor, line, 1 );
- QString dirColorTip = i18n( "Changing this color will only be effective when starting the next directory comparison.");
- QToolTip::add( label, dirColorTip );
+ TQString dirColorTip = i18n( "Changing this color will only be effective when starting the next directory comparison.");
+ TQToolTip::add( label, dirColorTip );
++line;
- pColor = new OptionColorButton( qRgb(0xf0,0,0), "OldestFileColor", &m_oldestFileColor, page, this );
- label = new QLabel( pColor, i18n("Oldest file color:"), page );
+ pColor = new OptionColorButton( tqRgb(0xf0,0,0), "OldestFileColor", &m_oldestFileColor, page, this );
+ label = new TQLabel( pColor, i18n("Oldest file color:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pColor, line, 1 );
- QToolTip::add( label, dirColorTip );
+ TQToolTip::add( label, dirColorTip );
++line;
- pColor = new OptionColorButton( qRgb(0xc0,0xc0,0), "MidAgeFileColor", &m_midAgeFileColor, page, this );
- label = new QLabel( pColor, i18n("Middle age file color:"), page );
+ pColor = new OptionColorButton( tqRgb(0xc0,0xc0,0), "MidAgeFileColor", &m_midAgeFileColor, page, this );
+ label = new TQLabel( pColor, i18n("Middle age file color:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pColor, line, 1 );
- QToolTip::add( label, dirColorTip );
+ TQToolTip::add( label, dirColorTip );
++line;
- pColor = new OptionColorButton( qRgb(0,0,0), "MissingFileColor", &m_missingFileColor, page, this );
- label = new QLabel( pColor, i18n("Color for missing files:"), page );
+ pColor = new OptionColorButton( tqRgb(0,0,0), "MissingFileColor", &m_missingFileColor, page, this );
+ label = new TQLabel( pColor, i18n("Color for missing files:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pColor, line, 1 );
- QToolTip::add( label, dirColorTip );
+ TQToolTip::add( label, dirColorTip );
++line;
topLayout->addStretch(10);
@@ -667,46 +667,46 @@ void OptionDialog::setupColorPage( void )
void OptionDialog::setupEditPage( void )
{
- QFrame *page = addPage( i18n("Editor"), i18n("Editor Behavior"),
+ TQFrame *page = addPage( i18n("Editor"), i18n("Editor Behavior"),
BarIcon("edit", KIcon::SizeMedium ) );
- QVBoxLayout *topLayout = new QVBoxLayout( page, 5, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 5, spacingHint() );
- QGridLayout *gbox = new QGridLayout( 4, 2 );
+ TQGridLayout *gbox = new TQGridLayout( 4, 2 );
gbox->setColStretch(1,5);
topLayout->addLayout( gbox );
- QLabel* label;
+ TQLabel* label;
int line=0;
OptionCheckBox* pReplaceTabs = new OptionCheckBox( i18n("Tab inserts spaces"), false, "ReplaceTabs", &m_bReplaceTabs, page, this );
gbox->addMultiCellWidget( pReplaceTabs, line, line, 0, 1 );
- QToolTip::add( pReplaceTabs, i18n(
+ TQToolTip::add( pReplaceTabs, i18n(
"On: Pressing tab generates the appropriate number of spaces.\n"
"Off: A Tab-character will be inserted.")
);
++line;
OptionIntEdit* pTabSize = new OptionIntEdit( 8, "TabSize", &m_tabSize, 1, 100, page, this );
- label = new QLabel( pTabSize, i18n("Tab size:"), page );
+ label = new TQLabel( pTabSize, i18n("Tab size:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pTabSize, line, 1 );
++line;
OptionCheckBox* pAutoIndentation = new OptionCheckBox( i18n("Auto indentation"), true, "AutoIndentation", &m_bAutoIndentation, page, this );
gbox->addMultiCellWidget( pAutoIndentation, line, line, 0, 1 );
- QToolTip::add( pAutoIndentation, i18n(
+ TQToolTip::add( pAutoIndentation, i18n(
"On: The indentation of the previous line is used for a new line.\n"
));
++line;
OptionCheckBox* pAutoCopySelection = new OptionCheckBox( i18n("Auto copy selection"), false, "AutoCopySelection", &m_bAutoCopySelection, page, this );
gbox->addMultiCellWidget( pAutoCopySelection, line, line, 0, 1 );
- QToolTip::add( pAutoCopySelection, i18n(
+ TQToolTip::add( pAutoCopySelection, i18n(
"On: Any selection is immediately written to the clipboard.\n"
"Off: You must explicitely copy e.g. via Ctrl-C."
));
++line;
- label = new QLabel( i18n("Line end style:"), page );
+ label = new TQLabel( i18n("Line end style:"), page );
gbox->addWidget( label, line, 0 );
#ifdef _WIN32
int defaultLineEndStyle = eLineEndDos;
@@ -717,7 +717,7 @@ void OptionDialog::setupEditPage( void )
gbox->addWidget( pLineEndStyle, line, 1 );
pLineEndStyle->insertItem( "Unix", eLineEndUnix );
pLineEndStyle->insertItem( "Dos/Windows", eLineEndDos );
- QToolTip::add( label, i18n(
+ TQToolTip::add( label, i18n(
"Sets the line endings for when an edited file is saved.\n"
"DOS/Windows: CR+LF; UNIX: LF; with CR=0D, LF=0A")
);
@@ -729,29 +729,29 @@ void OptionDialog::setupEditPage( void )
void OptionDialog::setupDiffPage( void )
{
- QFrame *page = addPage( i18n("Diff"), i18n("Diff Settings"),
+ TQFrame *page = addPage( i18n("Diff"), i18n("Diff Settings"),
BarIcon("misc", KIcon::SizeMedium ) );
- QVBoxLayout *topLayout = new QVBoxLayout( page, 5, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 5, spacingHint() );
- QGridLayout *gbox = new QGridLayout( 3, 2 );
+ TQGridLayout *gbox = new TQGridLayout( 3, 2 );
gbox->setColStretch(1,5);
topLayout->addLayout( gbox );
int line=0;
- QLabel* label=0;
+ TQLabel* label=0;
// OptionCheckBox* pPreserveCarriageReturn = new OptionCheckBox( i18n("Preserve carriage return"), false, "PreserveCarriageReturn", &m_bPreserveCarriageReturn, page, this );
// gbox->addMultiCellWidget( pPreserveCarriageReturn, line, line, 0, 1 );
-// QToolTip::add( pPreserveCarriageReturn, i18n(
+// TQToolTip::add( pPreserveCarriageReturn, i18n(
// "Show carriage return characters '\\r' if they exist.\n"
// "Helps to compare files that were modified under different operating systems.")
// );
// ++line;
- QString treatAsWhiteSpace = " ("+i18n("Treat as white space.")+")";
+ TQString treatAsWhiteSpace = " ("+i18n("Treat as white space.")+")";
OptionCheckBox* pIgnoreNumbers = new OptionCheckBox( i18n("Ignore numbers")+treatAsWhiteSpace, false, "IgnoreNumbers", &m_bIgnoreNumbers, page, this );
gbox->addMultiCellWidget( pIgnoreNumbers, line, line, 0, 1 );
- QToolTip::add( pIgnoreNumbers, i18n(
+ TQToolTip::add( pIgnoreNumbers, i18n(
"Ignore number characters during line matching phase. (Similar to Ignore white space.)\n"
"Might help to compare files with numeric data.")
);
@@ -759,34 +759,34 @@ void OptionDialog::setupDiffPage( void )
OptionCheckBox* pIgnoreComments = new OptionCheckBox( i18n("Ignore C/C++ comments")+treatAsWhiteSpace, false, "IgnoreComments", &m_bIgnoreComments, page, this );
gbox->addMultiCellWidget( pIgnoreComments, line, line, 0, 1 );
- QToolTip::add( pIgnoreComments, i18n( "Treat C/C++ comments like white space.")
+ TQToolTip::add( pIgnoreComments, i18n( "Treat C/C++ comments like white space.")
);
++line;
OptionCheckBox* pIgnoreCase = new OptionCheckBox( i18n("Ignore case")+treatAsWhiteSpace, false, "IgnoreCase", &m_bIgnoreCase, page, this );
gbox->addMultiCellWidget( pIgnoreCase, line, line, 0, 1 );
- QToolTip::add( pIgnoreCase, i18n(
+ TQToolTip::add( pIgnoreCase, i18n(
"Treat case differences like white space changes. ('a'<=>'A')")
);
++line;
- label = new QLabel( i18n("Preprocessor command:"), page );
+ label = new TQLabel( i18n("Preprocessor command:"), page );
gbox->addWidget( label, line, 0 );
OptionLineEdit* pLE = new OptionLineEdit( "", "PreProcessorCmd", &m_PreProcessorCmd, page, this );
gbox->addWidget( pLE, line, 1 );
- QToolTip::add( label, i18n("User defined pre-processing. (See the docs for details.)") );
+ TQToolTip::add( label, i18n("User defined pre-processing. (See the docs for details.)") );
++line;
- label = new QLabel( i18n("Line-matching preprocessor command:"), page );
+ label = new TQLabel( i18n("Line-matching preprocessor command:"), page );
gbox->addWidget( label, line, 0 );
pLE = new OptionLineEdit( "", "LineMatchingPreProcessorCmd", &m_LineMatchingPreProcessorCmd, page, this );
gbox->addWidget( pLE, line, 1 );
- QToolTip::add( label, i18n("This pre-processor is only used during line matching.\n(See the docs for details.)") );
+ TQToolTip::add( label, i18n("This pre-processor is only used during line matching.\n(See the docs for details.)") );
++line;
OptionCheckBox* pTryHard = new OptionCheckBox( i18n("Try hard (slower)"), true, "TryHard", &m_bTryHard, page, this );
gbox->addMultiCellWidget( pTryHard, line, line, 0, 1 );
- QToolTip::add( pTryHard, i18n(
+ TQToolTip::add( pTryHard, i18n(
"Enables the --minimal option for the external diff.\n"
"The analysis of big files will be much slower.")
);
@@ -797,43 +797,43 @@ void OptionDialog::setupDiffPage( void )
void OptionDialog::setupMergePage( void )
{
- QFrame *page = addPage( i18n("Merge"), i18n("Merge Settings"),
+ TQFrame *page = addPage( i18n("Merge"), i18n("Merge Settings"),
BarIcon("misc", KIcon::SizeMedium ) );
- QVBoxLayout *topLayout = new QVBoxLayout( page );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page );
topLayout->setMargin( 5 );
topLayout->setSpacing( spacingHint() );
- QGridLayout *gbox = new QGridLayout();
+ TQGridLayout *gbox = new TQGridLayout();
gbox->setColStretch(1,5);
topLayout->addLayout( gbox );
int line=0;
- QLabel* label=0;
+ TQLabel* label=0;
- label = new QLabel( i18n("Auto advance delay (ms):"), page );
+ label = new TQLabel( i18n("Auto advance delay (ms):"), page );
gbox->addWidget( label, line, 0 );
OptionIntEdit* pAutoAdvanceDelay = new OptionIntEdit( 500, "AutoAdvanceDelay", &m_autoAdvanceDelay, 0, 2000, page, this );
gbox->addWidget( pAutoAdvanceDelay, line, 1 );
- QToolTip::add( label,i18n(
+ TQToolTip::add( label,i18n(
"When in Auto-Advance mode the result of the current selection is shown \n"
"for the specified time, before jumping to the next conflict. Range: 0-2000 ms")
);
++line;
- label = new QLabel( i18n("White space 2-file merge default:"), page );
+ label = new TQLabel( i18n("White space 2-file merge default:"), page );
gbox->addWidget( label, line, 0 );
OptionComboBox* pWhiteSpace2FileMergeDefault = new OptionComboBox( 0, "WhiteSpace2FileMergeDefault", &m_whiteSpace2FileMergeDefault, page, this );
gbox->addWidget( pWhiteSpace2FileMergeDefault, line, 1 );
pWhiteSpace2FileMergeDefault->insertItem( i18n("Manual Choice"), 0 );
pWhiteSpace2FileMergeDefault->insertItem( "A", 1 );
pWhiteSpace2FileMergeDefault->insertItem( "B", 2 );
- QToolTip::add( label, i18n(
+ TQToolTip::add( label, i18n(
"Allow the merge algorithm to automatically select an input for "
"white-space-only changes." )
);
++line;
- label = new QLabel( i18n("White space 3-file merge default:"), page );
+ label = new TQLabel( i18n("White space 3-file merge default:"), page );
gbox->addWidget( label, line, 0 );
OptionComboBox* pWhiteSpace3FileMergeDefault = new OptionComboBox( 0, "WhiteSpace3FileMergeDefault", &m_whiteSpace3FileMergeDefault, page, this );
gbox->addWidget( pWhiteSpace3FileMergeDefault, line, 1 );
@@ -841,61 +841,61 @@ void OptionDialog::setupMergePage( void )
pWhiteSpace3FileMergeDefault->insertItem( "A", 1 );
pWhiteSpace3FileMergeDefault->insertItem( "B", 2 );
pWhiteSpace3FileMergeDefault->insertItem( "C", 3 );
- QToolTip::add( label, i18n(
+ TQToolTip::add( label, i18n(
"Allow the merge algorithm to automatically select an input for "
"white-space-only changes." )
);
++line;
- QGroupBox* pGroupBox = new QGroupBox( 2, Qt::Horizontal, i18n("Automatic Merge Regular Expression"), page);
+ TQGroupBox* pGroupBox = new TQGroupBox( 2, Qt::Horizontal, i18n("Automatic Merge Regular Expression"), page);
gbox->addMultiCellWidget( pGroupBox, line,line,0,1);
++line;
{
- QWidget* page = new QWidget( pGroupBox );
- QGridLayout* gbox = new QGridLayout( page, 2, 2, spacingHint() );
+ TQWidget* page = new TQWidget( pGroupBox );
+ TQGridLayout* gbox = new TQGridLayout( page, 2, 2, spacingHint() );
gbox->setColStretch(1,10);
int line = 0;
- label = new QLabel( i18n("Auto merge regular expression:"), page );
+ label = new TQLabel( i18n("Auto merge regular expression:"), page );
gbox->addWidget( label, line, 0 );
m_pAutoMergeRegExpLineEdit = new OptionLineEdit( ".*\\$(Version|Header|Date|Author).*\\$.*", "AutoMergeRegExp", &m_autoMergeRegExp, page, this );
gbox->addWidget( m_pAutoMergeRegExpLineEdit, line, 1 );
s_autoMergeRegExpToolTip = i18n("Regular expression for lines where KDiff3 should automatically choose one source.\n"
"When a line with a conflict matches the regular expression then\n"
"- if available - C, otherwise B will be chosen.");
- QToolTip::add( label, s_autoMergeRegExpToolTip );
+ TQToolTip::add( label, s_autoMergeRegExpToolTip );
++line;
OptionCheckBox* pAutoMergeRegExp = new OptionCheckBox( i18n("Run regular expression auto merge on merge start"), false, "RunRegExpAutoMergeOnMergeStart", &m_bRunRegExpAutoMergeOnMergeStart, page, this );
gbox->addMultiCellWidget( pAutoMergeRegExp, line, line, 0, 1 );
- QToolTip::add( pAutoMergeRegExp, i18n( "Run the merge for auto merge regular expressions\n"
+ TQToolTip::add( pAutoMergeRegExp, i18n( "Run the merge for auto merge regular expressions\n"
"immediately when a merge starts.\n"));
++line;
}
- pGroupBox = new QGroupBox( 2, Qt::Horizontal, i18n("Version Control History Merging"), page);
+ pGroupBox = new TQGroupBox( 2, Qt::Horizontal, i18n("Version Control History Merging"), page);
gbox->addMultiCellWidget( pGroupBox, line,line,0,1);
++line;
{
- QWidget* page = new QWidget( pGroupBox );
- QGridLayout* gbox = new QGridLayout( page, 2, 2, spacingHint() );
+ TQWidget* page = new TQWidget( pGroupBox );
+ TQGridLayout* gbox = new TQGridLayout( page, 2, 2, spacingHint() );
gbox->setColStretch(1,10);
int line = 0;
- label = new QLabel( i18n("History start regular expression:"), page );
+ label = new TQLabel( i18n("History start regular expression:"), page );
gbox->addWidget( label, line, 0 );
m_pHistoryStartRegExpLineEdit = new OptionLineEdit( ".*\\$Log.*\\$.*", "HistoryStartRegExp", &m_historyStartRegExp, page, this );
gbox->addWidget( m_pHistoryStartRegExpLineEdit, line, 1 );
s_historyStartRegExpToolTip = i18n("Regular expression for the start of the version control history entry.\n"
"Usually this line contains the \"$Log$\"-keyword.\n"
"Default value: \".*\\$Log.*\\$.*\"");
- QToolTip::add( label, s_historyStartRegExpToolTip );
+ TQToolTip::add( label, s_historyStartRegExpToolTip );
++line;
- label = new QLabel( i18n("History entry start regular expression:"), page );
+ label = new TQLabel( i18n("History entry start regular expression:"), page );
gbox->addWidget( label, line, 0 );
// Example line: "** \main\rolle_fsp_dev_008\1 17 Aug 2001 10:45:44 rolle"
- QString historyEntryStartDefault =
+ TQString historyEntryStartDefault =
"\\s*\\\\main\\\\(\\S+)\\s+" // Start with "\main\"
"([0-9]+) " // day
"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) " //month
@@ -906,62 +906,62 @@ void OptionDialog::setupMergePage( void )
gbox->addWidget( m_pHistoryEntryStartRegExpLineEdit, line, 1 );
s_historyEntryStartRegExpToolTip = i18n("A version control history entry consists of several lines.\n"
"Specify the regular expression to detect the first line (without the leading comment).\n"
- "Use parentheses to group the keys you want to use for sorting.\n"
+ "Use tqparentheses to group the keys you want to use for sorting.\n"
"If left empty, then KDiff3 assumes that empty lines separate history entries.\n"
"See the documentation for details.");
- QToolTip::add( label, s_historyEntryStartRegExpToolTip );
+ TQToolTip::add( label, s_historyEntryStartRegExpToolTip );
++line;
m_pHistoryMergeSorting = new OptionCheckBox( i18n("History merge sorting"), false, "HistoryMergeSorting", &m_bHistoryMergeSorting, page, this );
gbox->addMultiCellWidget( m_pHistoryMergeSorting, line, line, 0, 1 );
- QToolTip::add( m_pHistoryMergeSorting, i18n("Sort version control history by a key.") );
+ TQToolTip::add( m_pHistoryMergeSorting, i18n("Sort version control history by a key.") );
++line;
- //QString branch = newHistoryEntry.cap(1);
+ //TQString branch = newHistoryEntry.cap(1);
//int day = newHistoryEntry.cap(2).toInt();
- //int month = QString("Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec").find(newHistoryEntry.cap(3))/4 + 1;
+ //int month = TQString("Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec").tqfind(newHistoryEntry.cap(3))/4 + 1;
//int year = newHistoryEntry.cap(4).toInt();
- //QString time = newHistoryEntry.cap(5);
- //QString name = newHistoryEntry.cap(6);
- QString defaultSortKeyOrder = "4,3,2,5,1,6"; //QDate(year,month,day).toString(Qt::ISODate) +" "+ time + " " + branch + " " + name;
+ //TQString time = newHistoryEntry.cap(5);
+ //TQString name = newHistoryEntry.cap(6);
+ TQString defaultSortKeyOrder = "4,3,2,5,1,6"; //TQDate(year,month,day).toString(Qt::ISODate) +" "+ time + " " + branch + " " + name;
- label = new QLabel( i18n("History entry start sort key order:"), page );
+ label = new TQLabel( i18n("History entry start sort key order:"), page );
gbox->addWidget( label, line, 0 );
m_pHistorySortKeyOrderLineEdit = new OptionLineEdit( defaultSortKeyOrder, "HistoryEntryStartSortKeyOrder", &m_historyEntryStartSortKeyOrder, page, this );
gbox->addWidget( m_pHistorySortKeyOrderLineEdit, line, 1 );
- s_historyEntryStartSortKeyOrderToolTip = i18n("Each parentheses used in the regular expression for the history start entry\n"
+ s_historyEntryStartSortKeyOrderToolTip = i18n("Each tqparentheses used in the regular expression for the history start entry\n"
"groups a key that can be used for sorting.\n"
"Specify the list of keys (that are numbered in order of occurrence\n"
"starting with 1) using ',' as separator (e.g. \"4,5,6,1,2,3,7\").\n"
"If left empty, then no sorting will be done.\n"
"See the documentation for details.");
- QToolTip::add( label, s_historyEntryStartSortKeyOrderToolTip );
+ TQToolTip::add( label, s_historyEntryStartSortKeyOrderToolTip );
m_pHistorySortKeyOrderLineEdit->setEnabled(false);
- connect( m_pHistoryMergeSorting, SIGNAL(toggled(bool)), m_pHistorySortKeyOrderLineEdit, SLOT(setEnabled(bool)));
+ connect( m_pHistoryMergeSorting, TQT_SIGNAL(toggled(bool)), m_pHistorySortKeyOrderLineEdit, TQT_SLOT(setEnabled(bool)));
++line;
m_pHistoryAutoMerge = new OptionCheckBox( i18n("Merge version control history on merge start"), false, "RunHistoryAutoMergeOnMergeStart", &m_bRunHistoryAutoMergeOnMergeStart, page, this );
gbox->addMultiCellWidget( m_pHistoryAutoMerge, line, line, 0, 1 );
- QToolTip::add( m_pHistoryAutoMerge, i18n("Run version control history automerge on merge start.") );
+ TQToolTip::add( m_pHistoryAutoMerge, i18n("Run version control history automerge on merge start.") );
++line;
OptionIntEdit* pMaxNofHistoryEntries = new OptionIntEdit( -1, "MaxNofHistoryEntries", &m_maxNofHistoryEntries, -1, 1000, page, this );
- label = new QLabel( pMaxNofHistoryEntries, i18n("Max number of history entries:"), page );
+ label = new TQLabel( pMaxNofHistoryEntries, i18n("Max number of history entries:"), page );
gbox->addWidget( label, line, 0 );
gbox->addWidget( pMaxNofHistoryEntries, line, 1 );
- QToolTip::add( pMaxNofHistoryEntries, i18n("Cut off after specified number. Use -1 for infinite number of entries.") );
+ TQToolTip::add( pMaxNofHistoryEntries, i18n("Cut off after specified number. Use -1 for infinite number of entries.") );
++line;
}
- QPushButton* pButton = new QPushButton( i18n("Test your regular expressions"), page );
+ TQPushButton* pButton = new TQPushButton( i18n("Test your regular expressions"), page );
gbox->addWidget( pButton, line, 0 );
- connect( pButton, SIGNAL(clicked()), this, SLOT(slotHistoryMergeRegExpTester()));
+ connect( pButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHistoryMergeRegExpTester()));
++line;
- label = new QLabel( i18n("Irrelevant merge command:"), page );
+ label = new TQLabel( i18n("Irrelevant merge command:"), page );
gbox->addWidget( label, line, 0 );
OptionLineEdit* pLE = new OptionLineEdit( "", "IrrelevantMergeCmd", &m_IrrelevantMergeCmd, page, this );
gbox->addWidget( pLE, line, 1 );
- QToolTip::add( label, i18n("If specified this script is run after automerge\n"
+ TQToolTip::add( label, i18n("If specified this script is run after automerge\n"
"when no other relevant changes were detected.\n"
"Called with the parameters: filename1 filename2 filename3") );
++line;
@@ -970,7 +970,7 @@ void OptionDialog::setupMergePage( void )
OptionCheckBox* pAutoSaveAndQuit = new OptionCheckBox( i18n("Auto save and quit on merge without conflicts"), false,
"AutoSaveAndQuitOnMergeWithoutConflicts", &m_bAutoSaveAndQuitOnMergeWithoutConflicts, page, this );
gbox->addMultiCellWidget( pAutoSaveAndQuit, line, line, 0, 1 );
- QToolTip::add( pAutoSaveAndQuit, i18n("When KDiff3 was started for a file-merge from the commandline and all\n"
+ TQToolTip::add( pAutoSaveAndQuit, i18n("When KDiff3 was started for a file-merge from the commandline and all\n"
"conflicts are solvable without user interaction then automatically save and quit.\n"
"(Similar to command line option \"--auto\".") );
++line;
@@ -980,46 +980,46 @@ void OptionDialog::setupMergePage( void )
void OptionDialog::setupDirectoryMergePage( void )
{
- QFrame *page = addPage( i18n("Directory Merge"), i18n("Directory Merge"),
+ TQFrame *page = addPage( i18n("Directory Merge"), i18n("Directory Merge"),
BarIcon("folder", KIcon::SizeMedium ) );
- QVBoxLayout *topLayout = new QVBoxLayout( page, 5, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 5, spacingHint() );
- QGridLayout *gbox = new QGridLayout( 11, 2 );
+ TQGridLayout *gbox = new TQGridLayout( 11, 2 );
gbox->setColStretch(1,5);
topLayout->addLayout( gbox );
int line=0;
OptionCheckBox* pRecursiveDirs = new OptionCheckBox( i18n("Recursive directories"), true, "RecursiveDirs", &m_bDmRecursiveDirs, page, this );
gbox->addMultiCellWidget( pRecursiveDirs, line, line, 0, 1 );
- QToolTip::add( pRecursiveDirs, i18n("Whether to analyze subdirectories or not.") );
+ TQToolTip::add( pRecursiveDirs, i18n("Whether to analyze subdirectories or not.") );
++line;
- QLabel* label = new QLabel( i18n("File pattern(s):"), page );
+ TQLabel* label = new TQLabel( i18n("File pattern(s):"), page );
gbox->addWidget( label, line, 0 );
OptionLineEdit* pFilePattern = new OptionLineEdit( "*", "FilePattern", &m_DmFilePattern, page, this );
gbox->addWidget( pFilePattern, line, 1 );
- QToolTip::add( label, i18n(
+ TQToolTip::add( label, i18n(
"Pattern(s) of files to be analyzed. \n"
"Wildcards: '*' and '?'\n"
"Several Patterns can be specified by using the separator: ';'"
));
++line;
- label = new QLabel( i18n("File-anti-pattern(s):"), page );
+ label = new TQLabel( i18n("File-anti-pattern(s):"), page );
gbox->addWidget( label, line, 0 );
OptionLineEdit* pFileAntiPattern = new OptionLineEdit( "*.orig;*.o;*.obj", "FileAntiPattern", &m_DmFileAntiPattern, page, this );
gbox->addWidget( pFileAntiPattern, line, 1 );
- QToolTip::add( label, i18n(
+ TQToolTip::add( label, i18n(
"Pattern(s) of files to be excluded from analysis. \n"
"Wildcards: '*' and '?'\n"
"Several Patterns can be specified by using the separator: ';'"
));
++line;
- label = new QLabel( i18n("Dir-anti-pattern(s):"), page );
+ label = new TQLabel( i18n("Dir-anti-pattern(s):"), page );
gbox->addWidget( label, line, 0 );
OptionLineEdit* pDirAntiPattern = new OptionLineEdit( "CVS;.deps;.svn", "DirAntiPattern", &m_DmDirAntiPattern, page, this );
gbox->addWidget( pDirAntiPattern, line, 1 );
- QToolTip::add( label, i18n(
+ TQToolTip::add( label, i18n(
"Pattern(s) of directories to be excluded from analysis. \n"
"Wildcards: '*' and '?'\n"
"Several Patterns can be specified by using the separator: ';'"
@@ -1028,7 +1028,7 @@ void OptionDialog::setupDirectoryMergePage( void )
OptionCheckBox* pUseCvsIgnore = new OptionCheckBox( i18n("Use .cvsignore"), false, "UseCvsIgnore", &m_bDmUseCvsIgnore, page, this );
gbox->addMultiCellWidget( pUseCvsIgnore, line, line, 0, 1 );
- QToolTip::add( pUseCvsIgnore, i18n(
+ TQToolTip::add( pUseCvsIgnore, i18n(
"Extends the antipattern to anything that would be ignored by CVS.\n"
"Via local \".cvsignore\"-files this can be directory specific."
));
@@ -1037,15 +1037,15 @@ void OptionDialog::setupDirectoryMergePage( void )
OptionCheckBox* pFindHidden = new OptionCheckBox( i18n("Find hidden files and directories"), true, "FindHidden", &m_bDmFindHidden, page, this );
gbox->addMultiCellWidget( pFindHidden, line, line, 0, 1 );
#ifdef _WIN32
- QToolTip::add( pFindHidden, i18n("Finds files and directories with the hidden attribute.") );
+ TQToolTip::add( pFindHidden, i18n("Finds files and directories with the hidden attribute.") );
#else
- QToolTip::add( pFindHidden, i18n("Finds files and directories starting with '.'.") );
+ TQToolTip::add( pFindHidden, i18n("Finds files and directories starting with '.'.") );
#endif
++line;
OptionCheckBox* pFollowFileLinks = new OptionCheckBox( i18n("Follow file links"), false, "FollowFileLinks", &m_bDmFollowFileLinks, page, this );
gbox->addMultiCellWidget( pFollowFileLinks, line, line, 0, 1 );
- QToolTip::add( pFollowFileLinks, i18n(
+ TQToolTip::add( pFollowFileLinks, i18n(
"On: Compare the file the link points to.\n"
"Off: Compare the links."
));
@@ -1053,7 +1053,7 @@ void OptionDialog::setupDirectoryMergePage( void )
OptionCheckBox* pFollowDirLinks = new OptionCheckBox( i18n("Follow directory links"), false, "FollowDirLinks", &m_bDmFollowDirLinks, page, this );
gbox->addMultiCellWidget( pFollowDirLinks, line, line, 0, 1 );
- QToolTip::add( pFollowDirLinks, i18n(
+ TQToolTip::add( pFollowDirLinks, i18n(
"On: Compare the directory the link points to.\n"
"Off: Compare the links."
));
@@ -1061,7 +1061,7 @@ void OptionDialog::setupDirectoryMergePage( void )
//OptionCheckBox* pShowOnlyDeltas = new OptionCheckBox( i18n("List only deltas"),false,"ListOnlyDeltas", &m_bDmShowOnlyDeltas, page, this );
//gbox->addMultiCellWidget( pShowOnlyDeltas, line, line, 0, 1 );
- //QToolTip::add( pShowOnlyDeltas, i18n(
+ //TQToolTip::add( pShowOnlyDeltas, i18n(
// "Files and directories without change will not appear in the list."));
//++line;
@@ -1072,40 +1072,40 @@ void OptionDialog::setupDirectoryMergePage( void )
#endif
OptionCheckBox* pCaseSensitiveFileNames = new OptionCheckBox( i18n("Case sensitive filename comparison"),bCaseSensitiveFilenameComparison,"CaseSensitiveFilenameComparison", &m_bDmCaseSensitiveFilenameComparison, page, this );
gbox->addMultiCellWidget( pCaseSensitiveFileNames, line, line, 0, 1 );
- QToolTip::add( pCaseSensitiveFileNames, i18n(
+ TQToolTip::add( pCaseSensitiveFileNames, i18n(
"The directory comparison will compare files or directories when their names match.\n"
"Set this option if the case of the names must match. (Default for Windows is off, otherwise on.)"));
++line;
- QVButtonGroup* pBG = new QVButtonGroup(i18n("File Comparison Mode"),page);
+ TQVButtonGroup* pBG = new TQVButtonGroup(i18n("File Comparison Mode"),page);
gbox->addMultiCellWidget( pBG, line, line, 0, 1 );
++line;
OptionRadioButton* pBinaryComparison = new OptionRadioButton( i18n("Binary comparison"), true, "BinaryComparison", &m_bDmBinaryComparison, pBG, this );
- QToolTip::add( pBinaryComparison, i18n("Binary comparison of each file. (Default)") );
+ TQToolTip::add( pBinaryComparison, i18n("Binary comparison of each file. (Default)") );
OptionRadioButton* pFullAnalysis = new OptionRadioButton( i18n("Full analysis"), false, "FullAnalysis", &m_bDmFullAnalysis, pBG, this );
- QToolTip::add( pFullAnalysis, i18n("Do a full analysis and show statistics information in extra columns.\n"
+ TQToolTip::add( pFullAnalysis, i18n("Do a full analysis and show statistics information in extra columns.\n"
"(Slower than a binary comparison, much slower for binary files.)") );
OptionRadioButton* pTrustDate = new OptionRadioButton( i18n("Trust the size and modification date (unsafe)"), false, "TrustDate", &m_bDmTrustDate, pBG, this );
- QToolTip::add( pTrustDate, i18n("Assume that files are equal if the modification date and file length are equal.\n"
+ TQToolTip::add( pTrustDate, i18n("Assume that files are equal if the modification date and file length are equal.\n"
"Files with equal contents but different modification dates will appear as different.\n"
"Useful for big directories or slow networks.") );
OptionRadioButton* pTrustDateFallbackToBinary = new OptionRadioButton( i18n("Trust the size and date, but use binary comparison if date doesn't match (unsafe)"), false, "TrustDateFallbackToBinary", &m_bDmTrustDateFallbackToBinary, pBG, this );
- QToolTip::add( pTrustDateFallbackToBinary, i18n("Assume that files are equal if the modification date and file length are equal.\n"
+ TQToolTip::add( pTrustDateFallbackToBinary, i18n("Assume that files are equal if the modification date and file length are equal.\n"
"If the date isn't equal but the sizes are, use binary comparison.\n"
"Useful for big directories or slow networks.") );
OptionRadioButton* pTrustSize = new OptionRadioButton( i18n("Trust the size (unsafe)"), false, "TrustSize", &m_bDmTrustSize, pBG, this );
- QToolTip::add( pTrustSize, i18n("Assume that files are equal if their file lengths are equal.\n"
+ TQToolTip::add( pTrustSize, i18n("Assume that files are equal if their file lengths are equal.\n"
"Useful for big directories or slow networks when the date is modified during download.") );
// Some two Dir-options: Affects only the default actions.
OptionCheckBox* pSyncMode = new OptionCheckBox( i18n("Synchronize directories"), false,"SyncMode", &m_bDmSyncMode, page, this );
gbox->addMultiCellWidget( pSyncMode, line, line, 0, 1 );
- QToolTip::add( pSyncMode, i18n(
+ TQToolTip::add( pSyncMode, i18n(
"Offers to store files in both directories so that\n"
"both directories are the same afterwards.\n"
"Works only when comparing two directories without specifying a destination." ) );
@@ -1114,16 +1114,16 @@ void OptionDialog::setupDirectoryMergePage( void )
// Allow white-space only differences to be considered equal
OptionCheckBox* pWhiteSpaceDiffsEqual = new OptionCheckBox( i18n("White space differences considered equal"), true,"WhiteSpaceEqual", &m_bDmWhiteSpaceEqual, page, this );
gbox->addMultiCellWidget( pWhiteSpaceDiffsEqual, line, line, 0, 1 );
- QToolTip::add( pWhiteSpaceDiffsEqual, i18n(
+ TQToolTip::add( pWhiteSpaceDiffsEqual, i18n(
"If files differ only by white space consider them equal.\n"
"This is only active when full analysis is chosen." ) );
- connect(pFullAnalysis, SIGNAL(toggled(bool)), pWhiteSpaceDiffsEqual, SLOT(setEnabled(bool)));
+ connect(pFullAnalysis, TQT_SIGNAL(toggled(bool)), pWhiteSpaceDiffsEqual, TQT_SLOT(setEnabled(bool)));
pWhiteSpaceDiffsEqual->setEnabled(false);
++line;
OptionCheckBox* pCopyNewer = new OptionCheckBox( i18n("Copy newer instead of merging (unsafe)"), false, "CopyNewer", &m_bDmCopyNewer, page, this );
gbox->addMultiCellWidget( pCopyNewer, line, line, 0, 1 );
- QToolTip::add( pCopyNewer, i18n(
+ TQToolTip::add( pCopyNewer, i18n(
"Don't look inside, just take the newer file.\n"
"(Use this only if you know what you are doing!)\n"
"Only effective when comparing two directories." ) );
@@ -1131,7 +1131,7 @@ void OptionDialog::setupDirectoryMergePage( void )
OptionCheckBox* pCreateBakFiles = new OptionCheckBox( i18n("Backup files (.orig)"), true, "CreateBakFiles", &m_bDmCreateBakFiles, page, this );
gbox->addMultiCellWidget( pCreateBakFiles, line, line, 0, 1 );
- QToolTip::add( pCreateBakFiles, i18n(
+ TQToolTip::add( pCreateBakFiles, i18n(
"When a file would be saved over an old file, then the old file\n"
"will be renamed with a '.orig'-extension instead of being deleted."));
++line;
@@ -1141,37 +1141,37 @@ void OptionDialog::setupDirectoryMergePage( void )
/*
static void insertCodecs(OptionComboBox* p)
{
- std::multimap<QString,QString> m; // Using the multimap for case-insensitive sorting.
+ std::multimap<TQString,TQString> m; // Using the multimap for case-insensitive sorting.
int i;
for(i=0;;++i)
{
- QTextCodec* pCodec = QTextCodec::codecForIndex ( i );
- if ( pCodec != 0 ) m.insert( std::make_pair( QString(pCodec->mimeName()).upper(), pCodec->mimeName()) );
+ TQTextCodec* pCodec = TQTextCodec::codecForIndex ( i );
+ if ( pCodec != 0 ) m.insert( std::make_pair( TQString(pCodec->mimeName()).upper(), pCodec->mimeName()) );
else break;
}
p->insertItem( i18n("Auto"), 0 );
- std::multimap<QString,QString>::iterator mi;
+ std::multimap<TQString,TQString>::iterator mi;
for(mi=m.begin(), i=0; mi!=m.end(); ++mi, ++i)
p->insertItem(mi->second, i+1);
}
*/
// UTF8-Codec that saves a BOM
-class Utf8BOMCodec : public QTextCodec
+class Utf8BOMCodec : public TQTextCodec
{
public:
const char * name () const { return "UTF-8-BOM"; }
int mibEnum () const { return 2123; }
int heuristicContentMatch(const char*, int) const { return 0; }
- class UTF8BOMEncoder : public QTextEncoder
+ class UTF8BOMEncoder : public TQTextEncoder
{
bool bBOMAdded;
public:
UTF8BOMEncoder() { bBOMAdded=false; }
- QCString fromUnicode(const QString& uc, int& lenInOut )
+ TQCString fromUnicode(const TQString& uc, int& lenInOut )
{
- QCString r;
+ TQCString r;
if (!bBOMAdded)
{
r += "\xEF\xBB\xBF";
@@ -1182,25 +1182,25 @@ class Utf8BOMCodec : public QTextCodec
return r;
}
};
- QTextEncoder* makeEncoder() const
+ TQTextEncoder* makeEncoder() const
{
return new UTF8BOMEncoder;
}
- class UTF8BOMDecoder : public QTextDecoder
+ class UTF8BOMDecoder : public TQTextDecoder
{
- QTextDecoder *m_pDecoder;
+ TQTextDecoder *m_pDecoder;
public:
- UTF8BOMDecoder() { m_pDecoder = QTextCodec::codecForName("UTF-8")->makeDecoder(); }
+ UTF8BOMDecoder() { m_pDecoder = TQTextCodec::codecForName("UTF-8")->makeDecoder(); }
~UTF8BOMDecoder() {
delete m_pDecoder;
}
- QString toUnicode( const char* p, int len)
+ TQString toUnicode( const char* p, int len)
{
return m_pDecoder->toUnicode( p, len );
}
};
- QTextDecoder* makeDecoder() const
+ TQTextDecoder* makeDecoder() const
{
return new UTF8BOMDecoder;
}
@@ -1210,16 +1210,16 @@ void OptionDialog::setupRegionalPage( void )
{
new Utf8BOMCodec();
- QFrame *page = addPage( i18n("Regional Settings"), i18n("Regional Settings"),
+ TQFrame *page = addPage( i18n("Regional Settings"), i18n("Regional Settings"),
BarIcon("locale"/*"charset"*/, KIcon::SizeMedium ) );
- QVBoxLayout *topLayout = new QVBoxLayout( page, 5, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 5, spacingHint() );
- QGridLayout *gbox = new QGridLayout( 3, 2 );
+ TQGridLayout *gbox = new TQGridLayout( 3, 2 );
gbox->setColStretch(1,5);
topLayout->addLayout( gbox );
int line=0;
- QLabel* label;
+ TQLabel* label;
#ifdef KREPLACEMENTS_H
@@ -1306,7 +1306,7 @@ static char* countryMap[]={
"zu Zulu"
};
- label = new QLabel( i18n("Language (restart required)"), page );
+ label = new TQLabel( i18n("Language (restart required)"), page );
gbox->addWidget( label, line, 0 );
OptionComboBox* pLanguage = new OptionComboBox( 0, "Language", &m_language, page, this );
gbox->addWidget( pLanguage, line, 1 );
@@ -1320,14 +1320,14 @@ static char* countryMap[]={
t_DirectoryList::iterator i;
for( i=dirList.begin(); i!=dirList.end(); ++i)
{
- QString fileName = i->fileName();
+ TQString fileName = i->fileName();
// Skip the "kdiff3_" and omit the .qm
- QString languageId = fileName.mid(7, fileName.length()-10 );
+ TQString languageId = fileName.mid(7, fileName.length()-10 );
unsigned int countryIdx=0;
for(countryIdx=0; countryIdx< sizeof(countryMap)/sizeof(countryMap[0]); ++countryIdx )
{
- QString fullName = countryMap[countryIdx];
+ TQString fullName = countryMap[countryIdx];
if ( languageId+" " == fullName.left(languageId.length()+1) )
{
languageId += " (" + fullName.mid(languageId.length()+1) + ")";
@@ -1337,18 +1337,18 @@ static char* countryMap[]={
pLanguage->insertItem( languageId );
}
- QToolTip::add( label, i18n(
+ TQToolTip::add( label, i18n(
"Choose the language of the GUI-strings or \"Auto\".\n"
"For a change of language to take place, quit and restart KDiff3.")
);
++line;
/*
- label = new QLabel( i18n("Codec for file contents"), page );
+ label = new TQLabel( i18n("Codec for file contents"), page );
gbox->addWidget( label, line, 0 );
OptionComboBox* pFileCodec = new OptionComboBox( 0, "FileCodec", &m_fileCodec, page, this );
gbox->addWidget( pFileCodec, line, 1 );
insertCodecs( pFileCodec );
- QToolTip::add( label, i18n(
+ TQToolTip::add( label, i18n(
"Choose the codec that should be used for your input files\n"
"or \"Auto\" if unsure." )
);
@@ -1358,74 +1358,74 @@ static char* countryMap[]={
m_pSameEncoding = new OptionCheckBox( i18n("Use the same encoding for everything:"), true, "SameEncoding", &m_bSameEncoding, page, this );
gbox->addMultiCellWidget( m_pSameEncoding, line, line, 0, 1 );
- QToolTip::add( m_pSameEncoding, i18n(
+ TQToolTip::add( m_pSameEncoding, i18n(
"Enable this allows to change all encodings by changing the first only.\n"
"Disable this if different individual settings are needed."
) );
++line;
- label = new QLabel( i18n("Note: Local Encoding is ") + "\"" + QTextCodec::codecForLocale()->name() + "\"", page );
+ label = new TQLabel( i18n("Note: Local Encoding is ") + "\"" + TQTextCodec::codecForLocale()->name() + "\"", page );
gbox->addWidget( label, line, 0 );
++line;
- label = new QLabel( i18n("File Encoding for A:"), page );
+ label = new TQLabel( i18n("File Encoding for A:"), page );
gbox->addWidget( label, line, 0 );
m_pEncodingAComboBox = new OptionEncodingComboBox( "EncodingForA", &m_pEncodingA, page, this );
gbox->addWidget( m_pEncodingAComboBox, line, 1 );
- QString autoDetectToolTip = i18n(
+ TQString autoDetectToolTip = i18n(
"If enabled then Unicode (UTF-16 or UTF-8) encoding will be detected.\n"
"If the file encoding is not detected then the selected encoding will be used as fallback.\n"
"(Unicode detection depends on the first bytes of a file - the byte order mark \"BOM\".)"
);
m_pAutoDetectUnicodeA = new OptionCheckBox( i18n("Auto Detect Unicode"), true, "AutoDetectUnicodeA", &m_bAutoDetectUnicodeA, page, this );
gbox->addWidget( m_pAutoDetectUnicodeA, line, 2 );
- QToolTip::add( m_pAutoDetectUnicodeA, autoDetectToolTip );
+ TQToolTip::add( m_pAutoDetectUnicodeA, autoDetectToolTip );
++line;
- label = new QLabel( i18n("File Encoding for B:"), page );
+ label = new TQLabel( i18n("File Encoding for B:"), page );
gbox->addWidget( label, line, 0 );
m_pEncodingBComboBox = new OptionEncodingComboBox( "EncodingForB", &m_pEncodingB, page, this );
gbox->addWidget( m_pEncodingBComboBox, line, 1 );
m_pAutoDetectUnicodeB = new OptionCheckBox( i18n("Auto Detect Unicode"), true, "AutoDetectUnicodeB", &m_bAutoDetectUnicodeB, page, this );
gbox->addWidget( m_pAutoDetectUnicodeB, line, 2 );
- QToolTip::add( m_pAutoDetectUnicodeB, autoDetectToolTip );
+ TQToolTip::add( m_pAutoDetectUnicodeB, autoDetectToolTip );
++line;
- label = new QLabel( i18n("File Encoding for C:"), page );
+ label = new TQLabel( i18n("File Encoding for C:"), page );
gbox->addWidget( label, line, 0 );
m_pEncodingCComboBox = new OptionEncodingComboBox( "EncodingForC", &m_pEncodingC, page, this );
gbox->addWidget( m_pEncodingCComboBox, line, 1 );
m_pAutoDetectUnicodeC = new OptionCheckBox( i18n("Auto Detect Unicode"), true, "AutoDetectUnicodeC", &m_bAutoDetectUnicodeC, page, this );
gbox->addWidget( m_pAutoDetectUnicodeC, line, 2 );
- QToolTip::add( m_pAutoDetectUnicodeC, autoDetectToolTip );
+ TQToolTip::add( m_pAutoDetectUnicodeC, autoDetectToolTip );
++line;
- label = new QLabel( i18n("File Encoding for Merge Output and Saving:"), page );
+ label = new TQLabel( i18n("File Encoding for Merge Output and Saving:"), page );
gbox->addWidget( label, line, 0 );
m_pEncodingOutComboBox = new OptionEncodingComboBox( "EncodingForOutput", &m_pEncodingOut, page, this );
gbox->addWidget( m_pEncodingOutComboBox, line, 1 );
m_pAutoSelectOutEncoding = new OptionCheckBox( i18n("Auto Select"), true, "AutoSelectOutEncoding", &m_bAutoSelectOutEncoding, page, this );
gbox->addWidget( m_pAutoSelectOutEncoding, line, 2 );
- QToolTip::add( m_pAutoSelectOutEncoding, i18n(
+ TQToolTip::add( m_pAutoSelectOutEncoding, i18n(
"If enabled then the encoding from the input files is used.\n"
"In ambiguous cases a dialog will ask the user to choose the encoding for saving."
) );
++line;
- label = new QLabel( i18n("File Encoding for Preprocessor Files:"), page );
+ label = new TQLabel( i18n("File Encoding for Preprocessor Files:"), page );
gbox->addWidget( label, line, 0 );
m_pEncodingPPComboBox = new OptionEncodingComboBox( "EncodingForPP", &m_pEncodingPP, page, this );
gbox->addWidget( m_pEncodingPPComboBox, line, 1 );
++line;
- connect(m_pSameEncoding, SIGNAL(toggled(bool)), this, SLOT(slotEncodingChanged()));
- connect(m_pEncodingAComboBox, SIGNAL(activated(int)), this, SLOT(slotEncodingChanged()));
- connect(m_pAutoDetectUnicodeA, SIGNAL(toggled(bool)), this, SLOT(slotEncodingChanged()));
- connect(m_pAutoSelectOutEncoding, SIGNAL(toggled(bool)), this, SLOT(slotEncodingChanged()));
+ connect(m_pSameEncoding, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEncodingChanged()));
+ connect(m_pEncodingAComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotEncodingChanged()));
+ connect(m_pAutoDetectUnicodeA, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEncodingChanged()));
+ connect(m_pAutoSelectOutEncoding, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEncodingChanged()));
OptionCheckBox* pRightToLeftLanguage = new OptionCheckBox( i18n("Right To Left Language"), false, "RightToLeftLanguage", &m_bRightToLeftLanguage, page, this );
gbox->addMultiCellWidget( pRightToLeftLanguage, line, line, 0, 1 );
- QToolTip::add( pRightToLeftLanguage, i18n(
+ TQToolTip::add( pRightToLeftLanguage, i18n(
"Some languages are read from right to left.\n"
"This setting will change the viewer and editor accordingly."));
++line;
@@ -1440,21 +1440,21 @@ static char* countryMap[]={
void OptionDialog::setupIntegrationPage( void )
{
- QFrame *page = addPage( i18n("Integration"), i18n("Integration Settings"),
+ TQFrame *page = addPage( i18n("Integration"), i18n("Integration Settings"),
BarIcon("launch"/*"charset"*/, KIcon::SizeMedium ) );
- QVBoxLayout *topLayout = new QVBoxLayout( page, 5, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 5, spacingHint() );
- QGridLayout *gbox = new QGridLayout( 3, 3 );
+ TQGridLayout *gbox = new TQGridLayout( 3, 3 );
gbox->setColStretch(2,5);
topLayout->addLayout( gbox );
int line=0;
- QLabel* label;
- label = new QLabel( i18n("Command line options to ignore:"), page );
+ TQLabel* label;
+ label = new TQLabel( i18n("Command line options to ignore:"), page );
gbox->addWidget( label, line, 0 );
OptionLineEdit* pIgnorableCmdLineOptions = new OptionLineEdit( "-u;-query;-html;-abort", "IgnorableCmdLineOptions", &m_ignorableCmdLineOptions, page, this );
gbox->addMultiCellWidget( pIgnorableCmdLineOptions, line, line, 1,2 );
- QToolTip::add( label, i18n(
+ TQToolTip::add( label, i18n(
"List of command line options that should be ignored when KDiff3 is used by other tools.\n"
"Several values can be specified if separated via ';'\n"
"This will suppress the \"Unknown option\"-error."
@@ -1462,20 +1462,20 @@ void OptionDialog::setupIntegrationPage( void )
++line;
#ifdef _WIN32
- QPushButton* pIntegrateWithClearCase = new QPushButton( i18n("Integrate with ClearCase"), page);
+ TQPushButton* pIntegrateWithClearCase = new TQPushButton( i18n("Integrate with ClearCase"), page);
gbox->addWidget( pIntegrateWithClearCase, line, 0 );
- QToolTip::add( pIntegrateWithClearCase, i18n(
+ TQToolTip::add( pIntegrateWithClearCase, i18n(
"Integrate with Rational ClearCase from IBM.\n"
"Modifies the \"map\" file in ClearCase-subdir \"lib/mgrs\"\n"
"(Only enabled when ClearCase \"bin\" directory is in the path.)"));
- connect(pIntegrateWithClearCase, SIGNAL(clicked()),this, SLOT(slotIntegrateWithClearCase()) );
+ connect(pIntegrateWithClearCase, TQT_SIGNAL(clicked()),this, TQT_SLOT(slotIntegrateWithClearCase()) );
pIntegrateWithClearCase->setEnabled( integrateWithClearCase( "existsClearCase", "" )!=0 );
- QPushButton* pRemoveClearCaseIntegration = new QPushButton( i18n("Remove ClearCase Integration"), page);
+ TQPushButton* pRemoveClearCaseIntegration = new TQPushButton( i18n("Remove ClearCase Integration"), page);
gbox->addWidget( pRemoveClearCaseIntegration, line, 1 );
- QToolTip::add( pRemoveClearCaseIntegration, i18n(
+ TQToolTip::add( pRemoveClearCaseIntegration, i18n(
"Restore the old \"map\" file from before doing the Clearcase integration."));
- connect(pRemoveClearCaseIntegration, SIGNAL(clicked()),this, SLOT(slotRemoveClearCaseIntegration()) );
+ connect(pRemoveClearCaseIntegration, TQT_SIGNAL(clicked()),this, TQT_SLOT(slotRemoveClearCaseIntegration()) );
pRemoveClearCaseIntegration->setEnabled( integrateWithClearCase( "existsClearCase", "" )!=0 );
++line;
@@ -1536,11 +1536,11 @@ void OptionDialog::slotEncodingChanged()
void OptionDialog::setupKeysPage( void )
{
- //QVBox *page = addVBoxPage( i18n("Keys"), i18n("KeyDialog" ),
+ //TQVBox *page = addVBoxPage( i18n("Keys"), i18n("KeyDialog" ),
// BarIcon("fonts", KIcon::SizeMedium ) );
- //QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
- // new KFontChooser( page,"font",false/*onlyFixed*/,QStringList(),false,6 );
+ //TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
+ // new KFontChooser( page,"font",false/*onlyFixed*/,TQStringList(),false,6 );
//m_pKeyDialog=new KKeyDialog( false, 0 );
//topLayout->addWidget( m_pKeyDialog );
}
@@ -1550,8 +1550,8 @@ void OptionDialog::slotOk( void )
slotApply();
// My system returns variable width fonts even though I
- // disabled this. Even QFont::fixedPitch() doesn't work.
- QFontMetrics fm(m_font);
+ // disabled this. Even TQFont::fixedPitch() doesn't work.
+ TQFontMetrics fm(m_font);
if ( fm.width('W')!=fm.width('i') )
{
int result = KMessageBox::warningYesNo(this, i18n(
@@ -1581,13 +1581,13 @@ void OptionDialog::slotApply( void )
emit applyClicked();
#ifdef _WIN32
- QString locale = m_language;
+ TQString locale = m_language;
if ( locale == "Auto" || locale.isEmpty() )
- locale = locale = QTextCodec::locale();
- int spacePos = locale.find(' ');
+ locale = locale = TQTextCodec::locale();
+ int spacePos = locale.tqfind(' ');
if (spacePos>0) locale = locale.left(spacePos);
- QSettings settings;
- settings.setPath("KDiff3", "diff-ext", QSettings::User );
+ TQSettings settings;
+ settings.setPath("KDiff3", "diff-ext", TQSettings::User );
settings.writeEntry( "Language", locale );
#endif
}
@@ -1631,24 +1631,24 @@ private:
public:
ConfigValueMap( KConfig* pConfig ) { m_pConfig = pConfig; }
- void writeEntry(const QString& s, const QFont& v ){ m_pConfig->writeEntry(s,v); }
- void writeEntry(const QString& s, const QColor& v ){ m_pConfig->writeEntry(s,v); }
- void writeEntry(const QString& s, const QSize& v ){ m_pConfig->writeEntry(s,v); }
- void writeEntry(const QString& s, const QPoint& v ){ m_pConfig->writeEntry(s,v); }
- void writeEntry(const QString& s, int v ) { m_pConfig->writeEntry(s,v); }
- void writeEntry(const QString& s, bool v ) { m_pConfig->writeEntry(s,v); }
- void writeEntry(const QString& s, const QStringList& v, char separator ){ m_pConfig->writeEntry(s,v,separator); }
- void writeEntry(const QString& s, const QString& v ){ m_pConfig->writeEntry(s,v); }
- void writeEntry(const QString& s, const char* v ) { m_pConfig->writeEntry(s,v); }
-
- QFont readFontEntry (const QString& s, QFont* defaultVal ) { return m_pConfig->readFontEntry(s,defaultVal); }
- QColor readColorEntry(const QString& s, QColor* defaultVal ){ return m_pConfig->readColorEntry(s,defaultVal); }
- QSize readSizeEntry (const QString& s, QSize* defaultVal ) { return m_pConfig->readSizeEntry(s,defaultVal); }
- QPoint readPointEntry(const QString& s, QPoint* defaultVal) { return m_pConfig->readPointEntry(s,defaultVal); }
- bool readBoolEntry (const QString& s, bool defaultVal ) { return m_pConfig->readBoolEntry(s,defaultVal); }
- int readNumEntry (const QString& s, int defaultVal ) { return m_pConfig->readNumEntry(s,defaultVal); }
- QStringList readListEntry (const QString& s, const QStringList& def, char separator ) { return m_pConfig->readListEntry(s.latin1(),def,separator); }
- QString readEntry (const QString& s, const QString& defaultVal){ return m_pConfig->readEntry(s,defaultVal); }
+ void writeEntry(const TQString& s, const TQFont& v ){ m_pConfig->writeEntry(s,v); }
+ void writeEntry(const TQString& s, const TQColor& v ){ m_pConfig->writeEntry(s,v); }
+ void writeEntry(const TQString& s, const TQSize& v ){ m_pConfig->writeEntry(s,v); }
+ void writeEntry(const TQString& s, const TQPoint& v ){ m_pConfig->writeEntry(s,v); }
+ void writeEntry(const TQString& s, int v ) { m_pConfig->writeEntry(s,v); }
+ void writeEntry(const TQString& s, bool v ) { m_pConfig->writeEntry(s,v); }
+ void writeEntry(const TQString& s, const TQStringList& v, char separator ){ m_pConfig->writeEntry(s,v,separator); }
+ void writeEntry(const TQString& s, const TQString& v ){ m_pConfig->writeEntry(s,v); }
+ void writeEntry(const TQString& s, const char* v ) { m_pConfig->writeEntry(s,v); }
+
+ TQFont readFontEntry (const TQString& s, TQFont* defaultVal ) { return m_pConfig->readFontEntry(s,defaultVal); }
+ TQColor readColorEntry(const TQString& s, TQColor* defaultVal ){ return m_pConfig->readColorEntry(s,defaultVal); }
+ TQSize readSizeEntry (const TQString& s, TQSize* defaultVal ) { return m_pConfig->readSizeEntry(s,defaultVal); }
+ TQPoint readPointEntry(const TQString& s, TQPoint* defaultVal) { return m_pConfig->readPointEntry(s,defaultVal); }
+ bool readBoolEntry (const TQString& s, bool defaultVal ) { return m_pConfig->readBoolEntry(s,defaultVal); }
+ int readNumEntry (const TQString& s, int defaultVal ) { return m_pConfig->readNumEntry(s,defaultVal); }
+ TQStringList readListEntry (const TQString& s, const TQStringList& def, char separator ) { return m_pConfig->readListEntry(s.latin1(),def,separator); }
+ TQString readEntry (const TQString& s, const TQString& defaultVal){ return m_pConfig->readEntry(s,defaultVal); }
};
void OptionDialog::saveOptions( KConfig* config )
@@ -1686,19 +1686,19 @@ void OptionDialog::slotHelp( void )
KDialogBase::slotHelp();
}
-QString OptionDialog::parseOptions( const QCStringList& optionList )
+TQString OptionDialog::parseOptions( const QCStringList& optionList )
{
- QString result;
+ TQString result;
QCStringList::const_iterator i;
for ( i=optionList.begin(); i!=optionList.end(); ++i )
{
- QString s = *i;
+ TQString s = *i;
- int pos = s.find('=');
+ int pos = s.tqfind('=');
if( pos > 0 ) // seems not to have a tag
{
- QString key = s.left(pos);
- QString val = s.mid(pos+1);
+ TQString key = s.left(pos);
+ TQString val = s.mid(pos+1);
std::list<OptionItem*>::iterator j;
bool bFound = false;
for(j=m_optionItemList.begin(); j!=m_optionItemList.end(); ++j)
@@ -1725,7 +1725,7 @@ QString OptionDialog::parseOptions( const QCStringList& optionList )
return result;
}
-QString OptionDialog::calcOptionHelp()
+TQString OptionDialog::calcOptionHelp()
{
ValueMap config;
std::list<OptionItem*>::iterator j;