diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:32:11 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:32:11 -0600 |
commit | 94844816550ad672ccfcdc25659c625546239998 (patch) | |
tree | e35fc60fd736c645d59f6408af032774ad8023d3 /kexi/kexiutils | |
parent | 2a811c38c74c03648ecf857e566c44483cbad706 (diff) | |
download | koffice-94844816550ad672ccfcdc25659c625546239998.tar.gz koffice-94844816550ad672ccfcdc25659c625546239998.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kexi/kexiutils')
-rw-r--r-- | kexi/kexiutils/debuggui.cpp | 2 | ||||
-rw-r--r-- | kexi/kexiutils/identifier.cpp | 12 | ||||
-rw-r--r-- | kexi/kexiutils/longlongvalidator.cpp | 2 | ||||
-rw-r--r-- | kexi/kexiutils/styleproxy.h | 28 | ||||
-rw-r--r-- | kexi/kexiutils/transliteration_table.h | 2 | ||||
-rw-r--r-- | kexi/kexiutils/tristate.h | 4 | ||||
-rw-r--r-- | kexi/kexiutils/utils.cpp | 28 | ||||
-rw-r--r-- | kexi/kexiutils/utils.h | 4 | ||||
-rw-r--r-- | kexi/kexiutils/validator.cpp | 2 |
9 files changed, 42 insertions, 42 deletions
diff --git a/kexi/kexiutils/debuggui.cpp b/kexi/kexiutils/debuggui.cpp index cbee692d..23e2aaeb 100644 --- a/kexi/kexiutils/debuggui.cpp +++ b/kexi/kexiutils/debuggui.cpp @@ -21,7 +21,7 @@ #include "utils_p.h" #include <tqheader.h> -#include <tqlayout.h> +#include <layout.h> #include <ktabwidget.h> #include <klistview.h> diff --git a/kexi/kexiutils/identifier.cpp b/kexi/kexiutils/identifier.cpp index da5f7f96..ed1afdcb 100644 --- a/kexi/kexiutils/identifier.cpp +++ b/kexi/kexiutils/identifier.cpp @@ -27,7 +27,7 @@ bool KexiUtils::isIdentifier(const TQString& s) { uint i; for (i=0; i<s.length(); i++) { - TQChar c = s.tqat(i).lower(); + TQChar c = s.at(i).lower(); if (!((int)c=='_' || (int)c>='a' && (int)c<='z' || i>0 && (int)c>='0' && (int)c<='9')) break; } @@ -45,10 +45,10 @@ TQString KexiUtils::string2FileName(const TQString &s) inline TQString char2Identifier(const TQChar& c) { - if (c.tqunicode() >= TRANSLITERATION_TABLE_SIZE) + if (c.unicode() >= TRANSLITERATION_TABLE_SIZE) return TQString(TQChar('_')); - const char *const s = transliteration_table[c.tqunicode()]; - return s ? TQString::tqfromLatin1(s) : TQString(TQChar('_')); + const char *const s = transliteration_table[c.unicode()]; + return s ? TQString::fromLatin1(s) : TQString(TQChar('_')); } TQString KexiUtils::string2Identifier(const TQString &s) @@ -87,8 +87,8 @@ TQString KexiUtils::string2Identifier(const TQString &s) TQString KexiUtils::identifierExpectedMessage(const TQString &valueName, const TQVariant& v) { - return "<p>"+i18n("Value of \"%1\" column must be an identifier.").tqarg(valueName) - +"</p><p>"+i18n("\"%1\" is not a valid identifier.").tqarg(v.toString())+"</p>"; + return "<p>"+i18n("Value of \"%1\" column must be an identifier.").arg(valueName) + +"</p><p>"+i18n("\"%1\" is not a valid identifier.").arg(v.toString())+"</p>"; } //-------------------------------------------------------------------------------- diff --git a/kexi/kexiutils/longlongvalidator.cpp b/kexi/kexiutils/longlongvalidator.cpp index ca3a42dd..e7cce867 100644 --- a/kexi/kexiutils/longlongvalidator.cpp +++ b/kexi/kexiutils/longlongvalidator.cpp @@ -53,7 +53,7 @@ TQValidator::State LongLongValidator::validate( TQString &str, int & ) const if (m_base > 10) newStr = newStr.upper(); - if (newStr == TQString::tqfromLatin1("-")) {// a special case + if (newStr == TQString::fromLatin1("-")) {// a special case if ((m_min || m_max) && m_min >= 0) ok = false; else diff --git a/kexi/kexiutils/styleproxy.h b/kexi/kexiutils/styleproxy.h index 867ef23d..cf3eea50 100644 --- a/kexi/kexiutils/styleproxy.h +++ b/kexi/kexiutils/styleproxy.h @@ -67,10 +67,10 @@ class KEXIUTILS_EXPORT StyleProxy : public TQStyle virtual void polishPopupMenu( TQPopupMenu* p ) { m_style->polishPopupMenu(p); } - virtual TQRect tqitemRect( TQPainter *p, const TQRect &r, + virtual TQRect itemRect( TQPainter *p, const TQRect &r, int flags, bool enabled, const TQPixmap *pixmap, const TQString &text, int len = -1 ) const { - return m_style->tqitemRect( p, r, flags, enabled, pixmap, text, len ); + return m_style->itemRect( p, r, flags, enabled, pixmap, text, len ); } virtual void drawItem( TQPainter *p, const TQRect &r, @@ -87,18 +87,18 @@ class KEXIUTILS_EXPORT StyleProxy : public TQStyle m_style->tqdrawPrimitive( pe, p, r, cg, flags, option ); } - virtual void tqdrawControl( TQ_ControlElement element, + virtual void drawControl( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags how = Style_Default, const TQStyleOption& option = TQStyleOption::Default ) const { - m_style->tqdrawControl( element, p, widget, r, cg, how, option ); + m_style->drawControl( element, p, widget, r, cg, how, option ); } - virtual void tqdrawControlMask( TQ_ControlElement element, + virtual void drawControlMask( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& option = TQStyleOption::Default ) const { - m_style->tqdrawControlMask( element, p, widget, r, option ); + m_style->drawControlMask( element, p, widget, r, option ); } virtual TQRect subRect( SubRect r, const TQWidget *widget ) const @@ -106,7 +106,7 @@ class KEXIUTILS_EXPORT StyleProxy : public TQStyle return m_style->subRect( r, widget ); } - virtual void tqdrawComplexControl( TQ_ComplexControl control, + virtual void drawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags how = Style_Default, #ifdef TQ_TQDOC @@ -116,14 +116,14 @@ class KEXIUTILS_EXPORT StyleProxy : public TQStyle #endif SCFlags subActive = SC_None, const TQStyleOption& option = TQStyleOption::Default ) const { - tqdrawComplexControl( control, p, widget, r, cg, how, sub, subActive, option ); + drawComplexControl( control, p, widget, r, cg, how, sub, subActive, option ); } - virtual void tqdrawComplexControlMask( TQ_ComplexControl control, + virtual void drawComplexControlMask( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& option = TQStyleOption::Default ) const { - m_style->tqdrawComplexControlMask( control, p, widget, r, option ); + m_style->drawComplexControlMask( control, p, widget, r, option ); } virtual TQRect querySubControlMetrics( TQ_ComplexControl control, @@ -140,10 +140,10 @@ class KEXIUTILS_EXPORT StyleProxy : public TQStyle return m_style->querySubControl( control, widget, pos, option ); } - virtual int tqpixelMetric( PixelMetric metric, + virtual int pixelMetric( PixelMetric metric, const TQWidget *widget = 0 ) const { - return m_style->tqpixelMetric( metric, widget ); + return m_style->pixelMetric( metric, widget ); } virtual TQSize tqsizeFromContents( ContentsType contents, @@ -153,11 +153,11 @@ class KEXIUTILS_EXPORT StyleProxy : public TQStyle return m_style->tqsizeFromContents( contents, widget, contentsSize, option ); } - virtual int tqstyleHint( TQ_StyleHint stylehint, + virtual int styleHint( TQ_StyleHint stylehint, const TQWidget *widget = 0, const TQStyleOption& option = TQStyleOption::Default, TQStyleHintReturn* returnData = 0 ) const { - return m_style->tqstyleHint( stylehint, widget, option, returnData ); + return m_style->styleHint( stylehint, widget, option, returnData ); } virtual TQPixmap stylePixmap( StylePixmap stylepixmap, diff --git a/kexi/kexiutils/transliteration_table.h b/kexi/kexiutils/transliteration_table.h index 0eece11c..5be7dadc 100644 --- a/kexi/kexiutils/transliteration_table.h +++ b/kexi/kexiutils/transliteration_table.h @@ -1,4 +1,4 @@ -/* Transliteration table of 65535 tqunicode characters +/* Transliteration table of 65535 unicode characters Do not edit this file, it is generated by ./generate_transliteration_table.sh script. */ diff --git a/kexi/kexiutils/tristate.h b/kexi/kexiutils/tristate.h index 0a8df95c..f3864849 100644 --- a/kexi/kexiutils/tristate.h +++ b/kexi/kexiutils/tristate.h @@ -165,8 +165,8 @@ public: */ TQString toString() const { if (m_value==False) - return TQString::tqfromLatin1("false"); - return m_value==True ? TQString::tqfromLatin1("true") : TQString::tqfromLatin1("cancelled"); + return TQString::fromLatin1("false"); + return m_value==True ? TQString::fromLatin1("true") : TQString::fromLatin1("cancelled"); } private: diff --git a/kexi/kexiutils/utils.cpp b/kexi/kexiutils/utils.cpp index 7a1ab0f7..dca4998b 100644 --- a/kexi/kexiutils/utils.cpp +++ b/kexi/kexiutils/utils.cpp @@ -226,7 +226,7 @@ TQMap<TQString,TQString> KexiUtils::deserializeMap(const TQString& string) TQCString cstr(string.latin1()); TQByteArray array( size ); for (uint i=0; i<size; i++) { - array[i] = char(string[i].tqunicode()-1); + array[i] = char(string[i].unicode()-1); } TQMap<TQString,TQString> map; TQDataStream ds(array, IO_ReadOnly); @@ -244,17 +244,17 @@ TQString KexiUtils::stringToFileName(const TQString& string) void KexiUtils::simpleCrypt(TQString& string) { for (uint i=0; i<string.length(); i++) - string[i] = TQChar( string[i].tqunicode() + 47 + i ); + string[i] = TQChar( string[i].unicode() + 47 + i ); } void KexiUtils::simpleDecrypt(TQString& string) { for (uint i=0; i<string.length(); i++) - string[i] = TQChar( string[i].tqunicode() - 47 - i ); + string[i] = TQChar( string[i].unicode() - 47 - i ); } void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, - const TQPixmap& pixmap, int tqalignment, bool scaledContents, bool keepAspectRatio) + const TQPixmap& pixmap, int alignment, bool scaledContents, bool keepAspectRatio) { if (pixmap.isNull()) return; @@ -285,21 +285,21 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, img = img.smoothScale(w, h, TQ_ScaleMin); pos = rect.topLeft(); //0, 0); if (img.width() < w) { - int hAlign = TQApplication::horizontalAlignment( tqalignment ); + int hAlign = TQApplication::horizontalAlignment( alignment ); if ( hAlign & TQt::AlignRight ) pos.setX(pos.x() + w-img.width()); else if ( hAlign & TQt::AlignHCenter ) pos.setX(pos.x() + w/2-img.width()/2); } else if (img.height() < h) { - if ( tqalignment & TQt::AlignBottom ) + if ( alignment & TQt::AlignBottom ) pos.setY(pos.y() + h-img.height()); - else if ( tqalignment & TQt::AlignVCenter ) + else if ( alignment & TQt::AlignVCenter ) pos.setY(pos.y() + h/2-img.height()/2); } pixmapBuffer.convertFromImage(img); if (!fast) { - p2.tqbegin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.tqdevice()); + p2.begin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.device()); } else target->drawPixmap(pos, pixmapBuffer); @@ -307,7 +307,7 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, else { if (!fast) { pixmapBuffer.resize(rect.size()-TQSize(lineWidth, lineWidth)); - p2.tqbegin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.tqdevice()); + p2.begin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.device()); p2.drawPixmap(TQRect(rect.x(), rect.y(), w, h), pixmap); } else @@ -315,7 +315,7 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, } } else { - int hAlign = TQApplication::horizontalAlignment( tqalignment ); + int hAlign = TQApplication::horizontalAlignment( alignment ); if ( hAlign & TQt::AlignRight ) pos.setX(pos.x() + w-pixmap.width()); else if ( hAlign & TQt::AlignHCenter ) @@ -323,9 +323,9 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, else //left, etc. pos.setX(pos.x()); - if ( tqalignment & TQt::AlignBottom ) + if ( alignment & TQt::AlignBottom ) pos.setY(pos.y() + h-pixmap.height()); - else if ( tqalignment & TQt::AlignVCenter ) + else if ( alignment & TQt::AlignVCenter ) pos.setY(pos.y() + h/2-pixmap.height()/2); else //top, etc. pos.setY(pos.y()); @@ -339,8 +339,8 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, bitBlt( p.device(), // pos.x(), // pos.y(), - (int)p.tqworldMatrix().dx() + rect.x() + lineWidth + pos.x(), - (int)p.tqworldMatrix().dy() + rect.y() + lineWidth + pos.y(), + (int)p.worldMatrix().dx() + rect.x() + lineWidth + pos.x(), + (int)p.worldMatrix().dy() + rect.y() + lineWidth + pos.y(), &pixmapBuffer); } } diff --git a/kexi/kexiutils/utils.h b/kexi/kexiutils/utils.h index d7bdbae8..81e4f41e 100644 --- a/kexi/kexiutils/utils.h +++ b/kexi/kexiutils/utils.h @@ -184,7 +184,7 @@ namespace KexiUtils KEXIUTILS_EXPORT TQString stringToFileName(const TQString& string); /*! Performs a simple \a string encryption using rot47-like algorithm. - Each character's tqunicode value is increased by 47 + i (where i is index of the character). + Each character's unicode value is increased by 47 + i (where i is index of the character). The resulting string still contains redable characters. Do not use this for data that can be accessed by attackers! */ KEXIUTILS_EXPORT void simpleCrypt(TQString& string); @@ -212,7 +212,7 @@ namespace KexiUtils //! Draws pixmap on painter \a p using predefined parameters. //! Used in KexiDBImageBox and KexiBlobTableEdit. KEXIUTILS_EXPORT void drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, - const TQPixmap& pixmap, int tqalignment, bool scaledContents, bool keepAspectRatio); + const TQPixmap& pixmap, int alignment, bool scaledContents, bool keepAspectRatio); //! @internal KEXIUTILS_EXPORT TQString ptrToStringInternal(void* ptr, uint size); diff --git a/kexi/kexiutils/validator.cpp b/kexi/kexiutils/validator.cpp index bec7a1ec..919a3b61 100644 --- a/kexi/kexiutils/validator.cpp +++ b/kexi/kexiutils/validator.cpp @@ -36,7 +36,7 @@ Validator::Result Validator::check(const TQString &valueName, const TQVariant& v { if (v.isNull() || v.type()==TQVariant::String && v.toString().isEmpty()) { if (!m_acceptsEmptyValue) { - message = Validator::msgColumnNotEmpty().tqarg(valueName); + message = Validator::msgColumnNotEmpty().arg(valueName); return Error; } return Ok; |