diff options
Diffstat (limited to 'kexi/widget/tableview/kexidatetimetableedit.cpp')
-rw-r--r-- | kexi/widget/tableview/kexidatetimetableedit.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kexi/widget/tableview/kexidatetimetableedit.cpp b/kexi/widget/tableview/kexidatetimetableedit.cpp index fbca7cd6..46f687f0 100644 --- a/kexi/widget/tableview/kexidatetimetableedit.cpp +++ b/kexi/widget/tableview/kexidatetimetableedit.cpp @@ -21,20 +21,20 @@ #include "kexidatetimetableedit.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> @@ -47,12 +47,12 @@ #include <kexiutils/utils.h> -KexiDateTimeTableEdit::KexiDateTimeTableEdit(KexiTableViewColumn &column, QWidget *parent) - : KexiInputTableEdit(column, parent) +KexiDateTimeTableEdit::KexiDateTimeTableEdit(KexiTableViewColumn &column, TQWidget *tqparent) + : KexiInputTableEdit(column, tqparent) { setName("KexiDateTimeTableEdit"); -//! @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( dateTimeInputMask( m_dateFormatter, m_timeFormatter ) ); @@ -62,22 +62,22 @@ KexiDateTimeTableEdit::~KexiDateTimeTableEdit() { } -void KexiDateTimeTableEdit::setValueInInternalEditor(const QVariant &value) +void KexiDateTimeTableEdit::setValueInInternalEditor(const TQVariant &value) { if (value.isValid() && value.toDateTime().isValid()) m_lineedit->setText( m_dateFormatter.dateToString( value.toDateTime().date() ) + " " + m_timeFormatter.timeToString( value.toDateTime().time() ) ); else - m_lineedit->setText( QString::null ); + m_lineedit->setText( TQString() ); } -void KexiDateTimeTableEdit::setValueInternal(const QVariant& add_, bool removeOld) +void KexiDateTimeTableEdit::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; @@ -86,15 +86,15 @@ void KexiDateTimeTableEdit::setValueInternal(const QVariant& add_, bool removeOl m_lineedit->setCursorPosition(0); //ok? } -void KexiDateTimeTableEdit::setupContents( QPainter *p, bool focused, const QVariant& val, - QString &txt, int &align, int &x, int &y_offset, int &w, int &h ) +void KexiDateTimeTableEdit::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; @@ -117,10 +117,10 @@ bool KexiDateTimeTableEdit::valueIsEmpty() return valueIsNull();//js OK? TODO (nonsense?) } -QVariant KexiDateTimeTableEdit::value() +TQVariant KexiDateTimeTableEdit::value() { if (textIsEmpty()) - return QVariant(); + return TQVariant(); return stringToDateTime(m_dateFormatter, m_timeFormatter, m_lineedit->text()); } @@ -134,22 +134,22 @@ bool KexiDateTimeTableEdit::textIsEmpty() const return dateTimeIsEmpty( m_dateFormatter, m_timeFormatter, m_lineedit->text() ); } -void KexiDateTimeTableEdit::handleCopyAction(const QVariant& value, const QVariant& visibleValue) +void KexiDateTimeTableEdit::handleCopyAction(const TQVariant& value, const TQVariant& visibleValue) { Q_UNUSED(visibleValue); if (!value.isNull() && value.toDateTime().isValid()) - qApp->clipboard()->setText( m_dateFormatter.dateToString(value.toDateTime().date()) + " " + tqApp->clipboard()->setText( m_dateFormatter.dateToString(value.toDateTime().date()) + " " + m_timeFormatter.timeToString(value.toDateTime().time()) ); else - qApp->clipboard()->setText( QString::null ); + tqApp->clipboard()->setText( TQString() ); } -void KexiDateTimeTableEdit::handleAction(const QString& actionName) +void KexiDateTimeTableEdit::handleAction(const TQString& actionName) { const bool alreadyVisible = m_lineedit->isVisible(); if (actionName=="edit_paste") { - const QVariant newValue( stringToDateTime(m_dateFormatter, m_timeFormatter, qApp->clipboard()->text()) ); + const TQVariant newValue( stringToDateTime(m_dateFormatter, m_timeFormatter, tqApp->clipboard()->text()) ); if (!alreadyVisible) { //paste as the entire text if the cell was not in edit mode emit editRequested(); m_lineedit->clear(); |