diff options
Diffstat (limited to 'src/kvirc/ui/kvi_input.cpp')
-rw-r--r-- | src/kvirc/ui/kvi_input.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/kvirc/ui/kvi_input.cpp b/src/kvirc/ui/kvi_input.cpp index 5d2e1c6..94afb59 100644 --- a/src/kvirc/ui/kvi_input.cpp +++ b/src/kvirc/ui/kvi_input.cpp @@ -317,7 +317,7 @@ TQSize KviInputEditor::sizeHint() const TQSize( w + m, h + m ). expandedTo(TQApplication::globalStrut()),this)); #else - return (tqstyle().tqsizeFromContents(TQStyle::CT_LineEdit, this, + return (style().tqsizeFromContents(TQStyle::CT_LineEdit, this, TQSize( w + m, h + m ). expandedTo(TQApplication::globalStrut()))); #endif @@ -454,7 +454,7 @@ void KviInputEditor::drawContents(TQPainter *p) { pa.setPen(KVI_OPTION_COLOR(KviOption_colorInputControl)); - TQString s = getSubstituteChar(m_szTextBuffer[charIdx].tqunicode()); + TQString s = getSubstituteChar(m_szTextBuffer[charIdx].unicode()); // the block width is 4 pixels more than the actual character @@ -523,9 +523,9 @@ void KviInputEditor::drawContents(TQPainter *p) { TQChar c = m_szTextBuffer.at(m_iBlockLen); #ifdef COMPILE_USE_QT4 - m_iLastCursorXPosition+= c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c); + m_iLastCursorXPosition+= c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c); #else - m_iLastCursorXPosition+= (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c); + m_iLastCursorXPosition+= (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); #endif m_iBlockLen++; } @@ -626,7 +626,7 @@ void KviInputEditor::extractNextBlock(int idx,TQFontMetrics & fm,int curXPos,int TQChar c = m_szTextBuffer[idx]; - if((c.tqunicode() > 32) || + if((c.unicode() > 32) || ((c != TQChar(KVI_TEXT_COLOR)) && (c != TQChar(KVI_TEXT_BOLD)) && (c != TQChar(KVI_TEXT_UNDERLINE)) && (c != TQChar(KVI_TEXT_RESET)) && (c != TQChar(KVI_TEXT_REVERSE)) && @@ -637,7 +637,7 @@ void KviInputEditor::extractNextBlock(int idx,TQFontMetrics & fm,int curXPos,int while((idx < ((int)(m_szTextBuffer.length()))) && (curXPos < maxXPos)) { c = m_szTextBuffer[idx]; - if((c.tqunicode() > 32) || + if((c.unicode() > 32) || ((c != TQChar(KVI_TEXT_COLOR)) && (c != TQChar(KVI_TEXT_BOLD)) && (c != TQChar(KVI_TEXT_UNDERLINE)) && (c != TQChar(KVI_TEXT_RESET)) && (c != TQChar(KVI_TEXT_REVERSE)) && (c != TQChar(KVI_TEXT_CRYPTESCAPE)) && @@ -645,9 +645,9 @@ void KviInputEditor::extractNextBlock(int idx,TQFontMetrics & fm,int curXPos,int { m_iBlockLen++; #ifdef COMPILE_USE_QT4 - int xxx = c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);; + int xxx = c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; #else - int xxx = (c.tqunicode() < 256 ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c)); + int xxx = (c.unicode() < 256 ? g_iInputFontCharWidth[c.unicode()] : fm.width(c)); #endif m_iBlockWidth +=xxx; curXPos +=xxx; @@ -658,9 +658,9 @@ void KviInputEditor::extractNextBlock(int idx,TQFontMetrics & fm,int curXPos,int } else { m_bControlBlock = true; m_iBlockLen = 1; - m_iBlockWidth = g_iInputFontCharWidth[c.tqunicode()]; + m_iBlockWidth = g_iInputFontCharWidth[c.unicode()]; //Control code - switch(c.tqunicode()) + switch(c.unicode()) { case KVI_TEXT_BOLD: m_bCurBold = ! m_bCurBold; @@ -716,7 +716,7 @@ void KviInputEditor::runUpToTheFirstVisibleChar() register int idx = 0; while(idx < m_iFirstVisibleChar) { - unsigned short c = m_szTextBuffer[idx].tqunicode(); + unsigned short c = m_szTextBuffer[idx].unicode(); if(c < 32) { switch(c) @@ -789,7 +789,7 @@ void KviInputEditor::mousePressEvent(TQMouseEvent *e) TQString szClip; - TQClipboard * c = TQApplication::tqclipboard(); + TQClipboard * c = TQApplication::clipboard(); if(c) { szClip = c->text(TQClipboard::Clipboard); @@ -918,7 +918,7 @@ bool KviInputEditor::hasSelection() void KviInputEditor::copyToClipboard() { if(!hasSelection())return; - TQClipboard * c = TQApplication::tqclipboard(); + TQClipboard * c = TQApplication::clipboard(); if(!c)return; TQString szTxt = m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1); c->setText(szTxt,TQClipboard::Clipboard); @@ -928,7 +928,7 @@ void KviInputEditor::copyToClipboard() void KviInputEditor::copyToSelection(bool bDonNotCopyToClipboard) { if(!hasSelection())return; - TQClipboard * c = TQApplication::tqclipboard(); + TQClipboard * c = TQApplication::clipboard(); if(!c)return; TQString szTxt = m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1); if(c->supportsSelection()) @@ -969,7 +969,7 @@ void KviInputEditor::removeSelected() void KviInputEditor::cut() { if(!hasSelection())return; - TQClipboard * c = TQApplication::tqclipboard(); + TQClipboard * c = TQApplication::clipboard(); if(!c)return; c->setText(m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1),TQClipboard::Clipboard); m_szTextBuffer.remove(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1); @@ -1042,7 +1042,7 @@ int KviInputEditor::replaceSegment(int start, int length, const TQString &text) void KviInputEditor::pasteClipboardWithConfirmation() { - TQClipboard * c = TQApplication::tqclipboard(); + TQClipboard * c = TQApplication::clipboard(); if(!c)return; TQString szText = c->text(TQClipboard::Clipboard); @@ -1057,7 +1057,7 @@ void KviInputEditor::pasteClipboardWithConfirmation() void KviInputEditor::pasteSelectionWithConfirmation() { - TQClipboard * c = TQApplication::tqclipboard(); + TQClipboard * c = TQApplication::clipboard(); if(!c)return; TQString szText = c->text(c->supportsSelection() ? TQClipboard::Selection : TQClipboard::Clipboard); @@ -1819,7 +1819,7 @@ void KviInputEditor::completion(bool bShift) bool bIsDir = false; bool bIsNick = false; - unsigned short uc = word[0].tqunicode(); + unsigned short uc = word[0].unicode(); if(uc == '/') { @@ -1845,7 +1845,7 @@ void KviInputEditor::completion(bool bShift) { if(m_pKviWindow) { - if( (word.length()==1) && (m_pKviWindow->windowName()[0].tqunicode()==uc)) + if( (word.length()==1) && (m_pKviWindow->windowName()[0].unicode()==uc)) { match=m_pKviWindow->windowName(); match.append(" "); @@ -1911,8 +1911,8 @@ void KviInputEditor::completion(bool bShift) const TQChar * b2 = KviTQString::nullTerminatedArray(match) + wLen; const TQChar * c1 = b1; const TQChar * c2 = b2; - if(bIsDir)while(c1->tqunicode() && (c1->tqunicode() == c2->tqunicode()))c1++,c2++; - else while(c1->tqunicode() && (c1->lower().tqunicode() == c2->lower().tqunicode()))c1++,c2++; + if(bIsDir)while(c1->unicode() && (c1->unicode() == c2->unicode()))c1++,c2++; + else while(c1->unicode() && (c1->lower().unicode() == c2->lower().unicode()))c1++,c2++; int len = wLen + (c1 - b1); if(len < ((int)(match.length())))match.remove(len,match.length() - len); if(!all.isEmpty())all.append(", "); @@ -2084,17 +2084,17 @@ void KviInputEditor::moveRightFirstVisibleCharToShowCursor() TQChar c = m_szTextBuffer.at(m_iCursorPosition); #ifdef COMPILE_USE_QT4 - m_iLastCursorXPosition += c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);; + m_iLastCursorXPosition += c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; #else - m_iLastCursorXPosition += (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c); + m_iLastCursorXPosition += (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); #endif while(m_iLastCursorXPosition >= contentsRect().width()-2*KVI_INPUT_MARGIN) { c = m_szTextBuffer.at(m_iFirstVisibleChar); #ifdef COMPILE_USE_QT4 - m_iLastCursorXPosition -= c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);; + m_iLastCursorXPosition -= c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; #else - m_iLastCursorXPosition -= (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c); + m_iLastCursorXPosition -= (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); #endif m_iFirstVisibleChar++; } @@ -2127,9 +2127,9 @@ int KviInputEditor::charIndexFromXPosition(int xPos) { TQChar c = m_szTextBuffer.at(curChar); #ifdef COMPILE_USE_QT4 - int widthCh = c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);; + int widthCh = c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; #else - int widthCh = (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c); + int widthCh = (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); #endif if(xPos < (curXPos+(widthCh/2)))return curChar; else if(xPos < (curXPos+widthCh))return (curChar+1); @@ -2150,9 +2150,9 @@ int KviInputEditor::xPositionFromCharIndex(TQFontMetrics& fm,int chIdx,bool bCo { TQChar c = m_szTextBuffer.at(curChar); #ifdef COMPILE_USE_QT4 - curXPos += c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);; + curXPos += c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; #else - curXPos += (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c); + curXPos += (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); #endif curChar++; } @@ -2170,9 +2170,9 @@ int KviInputEditor::xPositionFromCharIndex(int chIdx,bool bContentsCoords) { TQChar c = m_szTextBuffer.at(curChar); #ifdef COMPILE_USE_QT4 - curXPos += c.tqunicode() < 32 ? g_pLastFontMetrics->width(getSubstituteChar(c.tqunicode())) + 3 : g_pLastFontMetrics->width(c); + curXPos += c.unicode() < 32 ? g_pLastFontMetrics->width(getSubstituteChar(c.unicode())) + 3 : g_pLastFontMetrics->width(c); #else - curXPos += (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : g_pLastFontMetrics->width(c); + curXPos += (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : g_pLastFontMetrics->width(c); #endif curChar++; } @@ -2336,8 +2336,8 @@ KviInput::KviInput(KviWindow *par,KviUserListView * view) #ifdef COMPILE_USE_QT4 m_pButtonContainer->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Preferred)); -// if(m_pButtonContainer->tqlayout()) -// m_pButtonContainer->tqlayout()->setSizeConstraint(TQLayout::SetMinimumSize); +// if(m_pButtonContainer->layout()) +// m_pButtonContainer->layout()->setSizeConstraint(TQLayout::SetMinimumSize); #endif m_pHistoryButton = new KviStyledToolButton(m_pButtonContainer,"historybutton"); |