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/widget/tableview/kexitimetableedit.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/widget/tableview/kexitimetableedit.cpp')
-rw-r--r-- | kexi/widget/tableview/kexitimetableedit.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/kexi/widget/tableview/kexitimetableedit.cpp b/kexi/widget/tableview/kexitimetableedit.cpp index 3238c58e..5f3313f7 100644 --- a/kexi/widget/tableview/kexitimetableedit.cpp +++ b/kexi/widget/tableview/kexitimetableedit.cpp @@ -19,20 +19,20 @@ #include "kexitimetableedit.h" -#include <qapplication.h> -#include <qpainter.h> -#include <qvariant.h> -#include <qrect.h> -#include <qpalette.h> -#include <qcolor.h> -#include <qfontmetrics.h> -#include <qdatetime.h> -#include <qcursor.h> -#include <qpoint.h> -#include <qlayout.h> -#include <qtoolbutton.h> -#include <qdatetimeedit.h> -#include <qclipboard.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqvariant.h> +#include <tqrect.h> +#include <tqpalette.h> +#include <tqcolor.h> +#include <tqfontmetrics.h> +#include <tqdatetime.h> +#include <tqcursor.h> +#include <tqpoint.h> +#include <tqlayout.h> +#include <tqtoolbutton.h> +#include <tqdatetimeedit.h> +#include <tqclipboard.h> #include <kdebug.h> #include <klocale.h> @@ -45,12 +45,12 @@ #include <kexiutils/utils.h> -KexiTimeTableEdit::KexiTimeTableEdit(KexiTableViewColumn &column, QWidget *parent) - : KexiInputTableEdit(column, parent) +KexiTimeTableEdit::KexiTimeTableEdit(KexiTableViewColumn &column, TQWidget *tqparent) + : KexiInputTableEdit(column, tqparent) { setName("KexiTimeTableEdit"); -//! @todo add QValidator so time like "99:88:77" cannot be even entered +//! @todo add TQValidator so time like "99:88:77" cannot be even entered m_lineedit->setInputMask( m_formatter.inputMask() ); } @@ -59,20 +59,20 @@ KexiTimeTableEdit::~KexiTimeTableEdit() { } -void KexiTimeTableEdit::setValueInInternalEditor(const QVariant &value) +void KexiTimeTableEdit::setValueInInternalEditor(const TQVariant &value) { if (value.isValid() && value.toTime().isValid()) m_lineedit->setText( m_formatter.timeToString( value.toTime() ) ); else - m_lineedit->setText( QString::null ); + m_lineedit->setText( TQString() ); } -void KexiTimeTableEdit::setValueInternal(const QVariant& add_, bool removeOld) +void KexiTimeTableEdit::setValueInternal(const TQVariant& add_, bool removeOld) { if (removeOld) { //new time entering... just fill the line edit //! @todo cut string if too long.. - QString add(add_.toString()); + TQString add(add_.toString()); m_lineedit->setText(add); m_lineedit->setCursorPosition(add.length()); return; @@ -81,20 +81,20 @@ void KexiTimeTableEdit::setValueInternal(const QVariant& add_, bool removeOld) m_lineedit->setCursorPosition(0); //ok? } -void KexiTimeTableEdit::setupContents( QPainter *p, bool focused, const QVariant& val, - QString &txt, int &align, int &x, int &y_offset, int &w, int &h ) +void KexiTimeTableEdit::setupContents( TQPainter *p, bool focused, const TQVariant& val, + TQString &txt, int &align, int &x, int &y_offset, int &w, int &h ) { Q_UNUSED(p); Q_UNUSED(focused); Q_UNUSED(x); Q_UNUSED(w); Q_UNUSED(h); -#ifdef Q_WS_WIN +#ifdef TQ_WS_WIN y_offset = -1; #else y_offset = 0; #endif - if (!val.isNull() && val.canCast(QVariant::Time)) + if (!val.isNull() && val.canCast(TQVariant::Time)) txt = m_formatter.timeToString(val.toTime()); align |= AlignLeft; } @@ -111,12 +111,12 @@ bool KexiTimeTableEdit::valueIsEmpty() return valueIsNull();// OK? TODO (nonsense?) } -QTime KexiTimeTableEdit::timeValue() +TQTime KexiTimeTableEdit::timeValue() { return m_formatter.stringToTime( m_lineedit->text() ); } -QVariant KexiTimeTableEdit::value() +TQVariant KexiTimeTableEdit::value() { return m_formatter.stringToVariant( m_lineedit->text() ); } @@ -128,21 +128,21 @@ bool KexiTimeTableEdit::valueIsValid() return m_formatter.stringToTime( m_lineedit->text() ).isValid(); } -void KexiTimeTableEdit::handleCopyAction(const QVariant& value, const QVariant& visibleValue) +void KexiTimeTableEdit::handleCopyAction(const TQVariant& value, const TQVariant& visibleValue) { Q_UNUSED(visibleValue); if (!value.isNull() && value.toTime().isValid()) - qApp->clipboard()->setText( m_formatter.timeToString(value.toTime()) ); + tqApp->clipboard()->setText( m_formatter.timeToString(value.toTime()) ); else - qApp->clipboard()->setText( QString::null ); + tqApp->clipboard()->setText( TQString() ); } -void KexiTimeTableEdit::handleAction(const QString& actionName) +void KexiTimeTableEdit::handleAction(const TQString& actionName) { const bool alreadyVisible = m_lineedit->isVisible(); if (actionName=="edit_paste") { - const QVariant newValue( m_formatter.stringToTime( qApp->clipboard()->text() ) ); + const TQVariant newValue( m_formatter.stringToTime( tqApp->clipboard()->text() ) ); if (!alreadyVisible) { //paste as the entire text if the cell was not in edit mode emit editRequested(); m_lineedit->clear(); |