summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/forms/widgets/kexidbtextedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/forms/widgets/kexidbtextedit.cpp')
-rw-r--r--kexi/plugins/forms/widgets/kexidbtextedit.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kexi/plugins/forms/widgets/kexidbtextedit.cpp b/kexi/plugins/forms/widgets/kexidbtextedit.cpp
index 8541fc01..6f6aa89d 100644
--- a/kexi/plugins/forms/widgets/kexidbtextedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidbtextedit.cpp
@@ -26,16 +26,16 @@
#include <kstdaccel.h>
#include <kdebug.h>
-#include <qpainter.h>
+#include <tqpainter.h>
-KexiDBTextEdit::KexiDBTextEdit(QWidget *parent, const char *name)
- : KTextEdit(parent, name)
+KexiDBTextEdit::KexiDBTextEdit(TQWidget *tqparent, const char *name)
+ : KTextEdit(tqparent, name)
, KexiDBTextWidgetInterface()
, KexiFormDataItemInterface()
- , m_menuExtender(this, this)
+ , m_menuExtender(TQT_TQOBJECT(this), this)
, m_slotTextChanged_enabled(true)
{
- connect(this, SIGNAL(textChanged()), this, SLOT(slotTextChanged()));
+ connect(this, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged()));
installEventFilter(this);
}
@@ -43,16 +43,16 @@ KexiDBTextEdit::~KexiDBTextEdit()
{
}
-void KexiDBTextEdit::setInvalidState( const QString& displayText )
+void KexiDBTextEdit::setInvalidState( const TQString& displayText )
{
setReadOnly(true);
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
- if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ if (focusPolicy() & TQ_TabFocus)
+ setFocusPolicy(TQ_ClickFocus);
KTextEdit::setText(displayText);
}
-void KexiDBTextEdit::setValueInternal(const QVariant& add, bool removeOld)
+void KexiDBTextEdit::setValueInternal(const TQVariant& add, bool removeOld)
{
if (m_columnInfo && m_columnInfo->field->type()==KexiDB::Field::Boolean) {
//! @todo temporary solution for booleans!
@@ -66,7 +66,7 @@ void KexiDBTextEdit::setValueInternal(const QVariant& add, bool removeOld)
}
}
-QVariant KexiDBTextEdit::value()
+TQVariant KexiDBTextEdit::value()
{
return text();
}
@@ -96,20 +96,20 @@ bool KexiDBTextEdit::isReadOnly() const
void KexiDBTextEdit::setReadOnly( bool readOnly )
{
KTextEdit::setReadOnly( readOnly );
- QPalette p = palette();
- QColor c(readOnly ? lighterGrayBackgroundColor(kapp->palette()) : p.color(QPalette::Normal, QColorGroup::Base));
+ TQPalette p = palette();
+ TQColor c(readOnly ? lighterGrayBackgroundColor(kapp->palette()) : p.color(TQPalette::Normal, TQColorGroup::Base));
setPaper( c );
- p.setColor(QColorGroup::Base, c);
- p.setColor(QColorGroup::Background, c);
+ p.setColor(TQColorGroup::Base, c);
+ p.setColor(TQColorGroup::Background, c);
setPalette( p );
}
-void KexiDBTextEdit::setText( const QString & text, const QString & context )
+void KexiDBTextEdit::setText( const TQString & text, const TQString & context )
{
KTextEdit::setText(text, context);
}
-QWidget* KexiDBTextEdit::widget()
+TQWidget* KexiDBTextEdit::widget()
{
return this;
}
@@ -130,7 +130,7 @@ bool KexiDBTextEdit::cursorAtEnd()
void KexiDBTextEdit::clear()
{
- setText(QString::null, QString::null);
+ setText(TQString(), TQString());
}
void KexiDBTextEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
@@ -141,16 +141,16 @@ void KexiDBTextEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
KexiDBTextWidgetInterface::setColumnInfo(m_columnInfo, this);
}
-void KexiDBTextEdit::paintEvent ( QPaintEvent *pe )
+void KexiDBTextEdit::paintEvent ( TQPaintEvent *pe )
{
KTextEdit::paintEvent( pe );
- QPainter p(this);
- KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() );
+ TQPainter p(this);
+ KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() );
}
-QPopupMenu * KexiDBTextEdit::createPopupMenu(const QPoint & pos)
+TQPopupMenu * KexiDBTextEdit::createPopupMenu(const TQPoint & pos)
{
- QPopupMenu *contextMenu = KTextEdit::createPopupMenu(pos);
+ TQPopupMenu *contextMenu = KTextEdit::createPopupMenu(pos);
m_menuExtender.createTitle(contextMenu);
return contextMenu;
}
@@ -160,21 +160,21 @@ void KexiDBTextEdit::undo()
cancelEditor();
}
-void KexiDBTextEdit::setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue)
+void KexiDBTextEdit::setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue)
{
KexiFormDataItemInterface::setDisplayDefaultValue(widget, displayDefaultValue);
// initialize display parameters for default / entered value
KexiDisplayUtils::DisplayParameters * const params
= displayDefaultValue ? m_displayParametersForDefaultValue : m_displayParametersForEnteredValue;
- QPalette pal(palette());
- pal.setColor(QPalette::Active, QColorGroup::Text, params->textColor);
+ TQPalette pal(palette());
+ pal.setColor(TQPalette::Active, TQColorGroup::Text, params->textColor);
setPalette(pal);
setFont(params->font);
//! @todo support rich text...
/* m_slotTextChanged_enabled = false;
//for rich text...
- const QString origText( text() );
- KTextEdit::setText(QString::null);
+ const TQString origText( text() );
+ KTextEdit::setText(TQString());
setCurrentFont(params->font);
setColor(params->textColor);
KTextEdit::setText(origText);
@@ -196,7 +196,7 @@ void KexiDBTextEdit::selectAll()
KTextEdit::selectAll();
}
-void KexiDBTextEdit::keyPressEvent( QKeyEvent *ke )
+void KexiDBTextEdit::keyPressEvent( TQKeyEvent *ke )
{
// for instance, Windows uses Ctrl+Tab for moving between tabs, so do not steal this shortcut
if (KStdAccel::tabNext().contains( KKey(ke) ) || KStdAccel::tabPrev().contains( KKey(ke) )) {