summaryrefslogtreecommitdiffstats
path: root/kregexpeditor/characterswidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-23 01:42:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-23 01:42:07 +0000
commita2277b6bc715464e83882b90c2a058139b8a6b54 (patch)
treeab09b14014f59b4d8e2ddd12226aa0b22e4dfc5d /kregexpeditor/characterswidget.cpp
parentd3f79e04b34bd1f70a458b81b28fc8799498c8dc (diff)
downloadtdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.tar.gz
tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.zip
TQt4 port kdeutils
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kregexpeditor/characterswidget.cpp')
-rw-r--r--kregexpeditor/characterswidget.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kregexpeditor/characterswidget.cpp b/kregexpeditor/characterswidget.cpp
index e0de760..f8a6870 100644
--- a/kregexpeditor/characterswidget.cpp
+++ b/kregexpeditor/characterswidget.cpp
@@ -16,7 +16,7 @@
* Boston, MA 02110-1301, USA.
**/
-#ifdef QT_ONLY
+#ifdef TQT_ONLY
#include "compat.h"
#else
#include <kdialogbase.h>
@@ -39,16 +39,16 @@
CharacterEdits* CharactersWidget::_configWindow = 0;
-CharactersWidget::CharactersWidget(RegExpEditorWindow* editorWindow, TQWidget *parent,
+CharactersWidget::CharactersWidget(RegExpEditorWindow* editorWindow, TQWidget *tqparent,
const char *name)
- : RegExpWidget(editorWindow, parent, name)
+ : RegExpWidget(editorWindow, tqparent, name)
{
_regexp = new TextRangeRegExp( false /* not used */);
}
CharactersWidget::CharactersWidget( TextRangeRegExp* regexp, RegExpEditorWindow* editorWindow,
- TQWidget* parent, const char* name )
- : RegExpWidget( editorWindow, parent, name )
+ TQWidget* tqparent, const char* name )
+ : RegExpWidget( editorWindow, tqparent, name )
{
_regexp = dynamic_cast<TextRangeRegExp*>( regexp->clone() );
Q_ASSERT( _regexp );
@@ -60,7 +60,7 @@ CharactersWidget::~CharactersWidget()
}
-TQSize CharactersWidget::sizeHint() const
+TQSize CharactersWidget::tqsizeHint() const
{
TQFontMetrics metrics = fontMetrics();
_textSize = HackCalculateFontSize(metrics, title());
@@ -72,13 +72,13 @@ TQSize CharactersWidget::sizeHint() const
_contentSize = HackCalculateFontSize(metrics,text());
// _contentSize = metrics.size(0, text());
- return TQSize(QMAX(headerSize.width(), bdSize + _contentSize.width() + bdSize+ 2*pw),
+ return TQSize(TQMAX(headerSize.width(), bdSize + _contentSize.width() + bdSize+ 2*pw),
headerSize.height() + bdSize + _contentSize.height() + bdSize + 2*pw);
}
void CharactersWidget::paintEvent(TQPaintEvent *e)
{
- TQSize mySize = sizeHint();
+ TQSize mySize = tqsizeHint();
TQPainter painter(this);
drawPossibleSelection( painter, mySize );
@@ -118,7 +118,7 @@ RegExp* CharactersWidget::regExp() const
TQString CharactersWidget::text() const
{
- TQString res = TQString::fromLatin1("");
+ TQString res = TQString::tqfromLatin1("");
if (_regexp->wordChar())
res += i18n("- A word character\n");
@@ -171,7 +171,7 @@ TQString CharactersWidget::title() const
RegExpWidget* CharactersWidget::findWidgetToEdit( TQPoint globalPos )
{
- if ( TQRect(mapToGlobal(TQPoint(0,0)), size()).contains( globalPos ) )
+ if ( TQRect(mapToGlobal(TQPoint(0,0)), size()).tqcontains( globalPos ) )
return this;
else
return 0;
@@ -181,13 +181,13 @@ int CharactersWidget::edit()
{
if ( _configWindow == 0 ) {
TQApplication::setOverrideCursor( WaitCursor );
- // No parent here, as this window should continue to exists.
+ // No tqparent here, as this window should continue to exists.
_configWindow = new CharacterEdits( 0, "CharactersWidget::_configWindow" );
TQApplication::restoreOverrideCursor();
}
- _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->sizeHint().width()/2,
- _configWindow->sizeHint().height()/2));
+ _configWindow->move(TQCursor::pos() - TQPoint(_configWindow->tqsizeHint().width()/2,
+ _configWindow->tqsizeHint().height()/2));
int ret = _configWindow->exec(_regexp );
if ( ret == TQDialog::Accepted ) {
_editorWindow->updateContent( 0 );
@@ -282,8 +282,8 @@ int CharacterEdits::exec( TextRangeRegExp* regexp )
}
-CharacterEdits::CharacterEdits( TQWidget *parent, const char *name)
- : KDialogBase( parent, name == 0 ? "CharacterEdits" : name, true,
+CharacterEdits::CharacterEdits( TQWidget *tqparent, const char *name)
+ : KDialogBase( tqparent, name == 0 ? "CharacterEdits" : name, true,
i18n("Specify Characters"),
KDialogBase::Ok | KDialogBase::Cancel)
{
@@ -377,13 +377,13 @@ void CharacterEdits::slotOK()
}
-SingleEntry::SingleEntry(TQWidget* parent, const char* name )
- :KMultiFormListBoxEntry( parent, name )
+SingleEntry::SingleEntry(TQWidget* tqparent, const char* name )
+ :KMultiFormListBoxEntry( tqparent, name )
{
- TQHBoxLayout* layout = new TQHBoxLayout( this, 3, 6 );
+ TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 3, 6 );
_selector = new CharSelector( this );
- layout->addWidget( _selector );
- layout->addStretch(1);
+ tqlayout->addWidget( _selector );
+ tqlayout->addStretch(1);
}
TQString SingleEntry::text() const
@@ -402,22 +402,22 @@ bool SingleEntry::isEmpty() const
}
-RangeEntry::RangeEntry(TQWidget* parent, const char* name )
- :KMultiFormListBoxEntry( parent, name )
+RangeEntry::RangeEntry(TQWidget* tqparent, const char* name )
+ :KMultiFormListBoxEntry( tqparent, name )
{
- TQHBoxLayout* layout = new TQHBoxLayout( this, 3, 6 );
+ TQHBoxLayout* tqlayout = new TQHBoxLayout( this, 3, 6 );
TQLabel* label = new TQLabel(i18n("From:"), this );
_from = new CharSelector( this );
- layout->addWidget( label );
- layout->addWidget( _from );
+ tqlayout->addWidget( label );
+ tqlayout->addWidget( _from );
- layout->addStretch(1);
+ tqlayout->addStretch(1);
label = new TQLabel(i18n("end of range","To:"), this );
_to = new CharSelector( this );
- layout->addWidget( label );
- layout->addWidget( _to );
+ tqlayout->addWidget( label );
+ tqlayout->addWidget( _to );
}
TQString RangeEntry::fromText() const