diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/plugins/forms/widgets/kexidbtextedit.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/plugins/forms/widgets/kexidbtextedit.cpp')
-rw-r--r-- | kexi/plugins/forms/widgets/kexidbtextedit.cpp | 56 |
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) )) { |