diff options
Diffstat (limited to 'lib/kotext/KoTextView.cpp')
-rw-r--r-- | lib/kotext/KoTextView.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/lib/kotext/KoTextView.cpp b/lib/kotext/KoTextView.cpp index 32e82b73..aadeff06 100644 --- a/lib/kotext/KoTextView.cpp +++ b/lib/kotext/KoTextView.cpp @@ -41,7 +41,7 @@ #include <tqapplication.h> #include <tqtimer.h> -#include <tqclipboard.h> +#include <clipboard.h> class KoTextView::KoTextViewPrivate { @@ -291,7 +291,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ break; } default: { - //kdDebug(32500) << "KoTextView::keyPressEvent ascii=" << e->ascii() << " text=" << e->text()[0].tqunicode() << " state=" << e->state() << endl; + //kdDebug(32500) << "KoTextView::keyPressEvent ascii=" << e->ascii() << " text=" << e->text()[0].unicode() << " state=" << e->state() << endl; if (e->key() == TQt::Key_Tab) { if (doToolTipCompletion(m_cursor, m_cursor->parag(), m_cursor->index() - 1, e->key()) ) @@ -331,7 +331,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ // Bidi support: need to reverse mirrored chars (e.g. parenthesis) KoTextParag *p = m_cursor->parag(); if ( p && p->string() && p->string()->isRightToLeft() ) { - TQChar *c = (TQChar *)text.tqunicode(); + TQChar *c = (TQChar *)text.unicode(); int l = text.length(); while( l-- ) { if ( c->mirrored() ) @@ -611,7 +611,7 @@ KoTextCursor KoTextView::selectWordUnderCursor( const KoTextCursor& cursor, int const bool isWordDelimiter = ch.isSpace() || ch.category() == TQChar::Punctuation_Open // e.g. '(' || ch.category() == TQChar::Punctuation_Close // e.g. ')' - || ch.category() == TQChar::Punctuation_Other // see http://www.fileformat.info/info/tqunicode/category/Po/list.htm + || ch.category() == TQChar::Punctuation_Other // see http://www.fileformat.info/info/unicode/category/Po/list.htm ; if( !beginFound && !isWordDelimiter ) @@ -643,9 +643,9 @@ KoTextCursor KoTextView::selectParagUnderCursor( const KoTextCursor& cursor, int { textObject()->selectionChangedNotify(); // Copy the selection. - TQApplication::tqclipboard()->setSelectionMode( true ); + TQApplication::clipboard()->setSelectionMode( true ); emit copy(); - TQApplication::tqclipboard()->setSelectionMode( false ); + TQApplication::clipboard()->setSelectionMode( false ); } return c2; } @@ -808,9 +808,9 @@ void KoTextView::handleMouseReleaseEvent() textObject()->selectionChangedNotify(); // Copy the selection. - TQApplication::tqclipboard()->setSelectionMode( true ); + TQApplication::clipboard()->setSelectionMode( true ); emit copy(); - TQApplication::tqclipboard()->setSelectionMode( false ); + TQApplication::clipboard()->setSelectionMode( false ); } inDoubleClick = FALSE; @@ -831,9 +831,9 @@ void KoTextView::handleMouseDoubleClickEvent( TQMouseEvent*ev, const TQPoint& i *m_cursor = selectWordUnderCursor( *m_cursor ); textObject()->selectionChangedNotify(); // Copy the selection. - TQApplication::tqclipboard()->setSelectionMode( true ); + TQApplication::clipboard()->setSelectionMode( true ); emit copy(); - TQApplication::tqclipboard()->setSelectionMode( false ); + TQApplication::clipboard()->setSelectionMode( false ); possibleTripleClick=true; @@ -900,8 +900,8 @@ bool KoTextView::insertParagraph(const TQPoint &pos) if ( pos.x() + f->width(' ') >= textDocument()->width()) { //FIXME me bidi. - //change parag tqalignment => right tqalignment - last->tqsetAlignment( TQt::AlignRight ); + //change parag alignment => right alignment + last->setAlignment( TQt::AlignRight ); } else { @@ -1207,7 +1207,7 @@ bool KoTextView::openLink( KoLinkVariable* variable ) } else { - KMessageBox::sorry( 0, i18n("%1 is not a valid link.").tqarg( variable->url() ) ); + KMessageBox::sorry( 0, i18n("%1 is not a valid link.").arg( variable->url() ) ); return false; } } @@ -1450,10 +1450,10 @@ void KoTextView::copyTextOfComment() { KURL::List lst; lst.append( var->note() ); - TQApplication::tqclipboard()->setSelectionMode(true); - TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) ); - TQApplication::tqclipboard()->setSelectionMode(false); - TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) ); + TQApplication::clipboard()->setSelectionMode(true); + TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) ); + TQApplication::clipboard()->setSelectionMode(false); + TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) ); } } @@ -1476,13 +1476,13 @@ KoParagStyle * KoTextView::createStyleFromSelection(const TQString & name) if ( textDocument()->hasSelection( KoTextDocument::Standard ) ) cursor = textDocument()->selectionStartCursor( KoTextDocument::Standard ); KoParagStyle * style = new KoParagStyle (name); - KoParagLayout tqlayout(cursor.parag()->paragLayout()); - tqlayout.style = style; + KoParagLayout layout(cursor.parag()->paragLayout()); + layout.style = style; style->setFollowingStyle( style ); style->format() = *(cursor.parag()->at(cursor.index())->format()); - style->paragLayout() = tqlayout; - // Select this new style - hmm only the parag tqlayout, we don't want to erase any text-formatting + style->paragLayout() = layout; + // Select this new style - hmm only the parag layout, we don't want to erase any text-formatting cursor.parag()->setParagLayout( style->paragLayout() ); return style; } @@ -1500,7 +1500,7 @@ void KoTextView::updateStyleFromSelection( KoParagStyle* style ) void KoTextView::addBookmarks(const TQString &url) { - TQString filename = locateLocal( "data", TQString::tqfromLatin1("konqueror/bookmarks.xml") ); + TQString filename = locateLocal( "data", TQString::fromLatin1("konqueror/bookmarks.xml") ); KBookmarkManager *bookManager = KBookmarkManager::managerForFile( filename,false ); KBookmarkGroup group = bookManager->root(); group.addBookmark( bookManager, url, KURL( url)); @@ -1515,10 +1515,10 @@ void KoTextView::copyLink() { KURL::List lst; lst.append( var->url() ); - TQApplication::tqclipboard()->setSelectionMode(true); - TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) ); - TQApplication::tqclipboard()->setSelectionMode(false); - TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) ); + TQApplication::clipboard()->setSelectionMode(true); + TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) ); + TQApplication::clipboard()->setSelectionMode(false); + TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) ); } } |