diff options
Diffstat (limited to 'knotes')
-rw-r--r-- | knotes/knote.cpp | 90 | ||||
-rw-r--r-- | knotes/knotealarmdlg.cpp | 2 | ||||
-rw-r--r-- | knotes/knotebutton.cpp | 8 | ||||
-rw-r--r-- | knotes/knoteconfigdlg.cpp | 2 | ||||
-rw-r--r-- | knotes/knoteedit.cpp | 54 | ||||
-rw-r--r-- | knotes/knoteprinter.cpp | 2 | ||||
-rw-r--r-- | knotes/knotesapp.cpp | 50 | ||||
-rw-r--r-- | knotes/knotesnetrecv.cpp | 6 | ||||
-rw-r--r-- | knotes/knotesnetsend.cpp | 10 | ||||
-rw-r--r-- | knotes/resourcelocal.cpp | 2 |
10 files changed, 112 insertions, 114 deletions
diff --git a/knotes/knote.cpp b/knotes/knote.cpp index 0f0ec426c..4281f713d 100644 --- a/knotes/knote.cpp +++ b/knotes/knote.cpp @@ -77,8 +77,6 @@ using namespace KCal; -extern Time qt_x_time; - int KNote::s_ppOffset = 0; KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *tqparent, const char *name ) @@ -107,47 +105,47 @@ KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *tqparent, const char // create the menu items for the note - not the editor... // rename, mail, print, save as, insert date, alarm, close, delete, new note new KAction( i18n("New"), "filenew", 0, - this,TQT_SLOT(slotRequestNewNote()) , actionCollection(), "new_note" ); + TQT_TQOBJECT(this),TQT_SLOT(slotRequestNewNote()) , actionCollection(), "new_note" ); new KAction( i18n("Rename..."), "text", 0, - this, TQT_SLOT(slotRename()), actionCollection(), "rename_note" ); + TQT_TQOBJECT(this), TQT_SLOT(slotRename()), actionCollection(), "rename_note" ); m_readOnly = new KToggleAction( i18n("Lock"), "lock" , 0, - this, TQT_SLOT(slotUpdateReadOnly()), actionCollection(), "lock_note" ); + TQT_TQOBJECT(this), TQT_SLOT(slotUpdateReadOnly()), actionCollection(), "lock_note" ); m_readOnly->setCheckedState( KGuiItem( i18n("Unlock"), "unlock" ) ); new KAction( i18n("Hide"), "fileclose" , Key_Escape, - this, TQT_SLOT(slotClose()), actionCollection(), "hide_note" ); + TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection(), "hide_note" ); new KAction( i18n("Delete"), "knotes_delete", 0, - this, TQT_SLOT(slotKill()), actionCollection(), "delete_note" ); + TQT_TQOBJECT(this), TQT_SLOT(slotKill()), actionCollection(), "delete_note" ); new KAction( i18n("Insert Date"), "knotes_date", 0 , - this, TQT_SLOT(slotInsDate()), actionCollection(), "insert_date" ); + TQT_TQOBJECT(this), TQT_SLOT(slotInsDate()), actionCollection(), "insert_date" ); new KAction( i18n("Set Alarm..."), "knotes_alarm", 0 , - this, TQT_SLOT(slotSetAlarm()), actionCollection(), "set_alarm" ); + TQT_TQOBJECT(this), TQT_SLOT(slotSetAlarm()), actionCollection(), "set_alarm" ); new KAction( i18n("Send..."), "network", 0, - this, TQT_SLOT(slotSend()), actionCollection(), "send_note" ); + TQT_TQOBJECT(this), TQT_SLOT(slotSend()), actionCollection(), "send_note" ); new KAction( i18n("Mail..."), "mail_send", 0, - this, TQT_SLOT(slotMail()), actionCollection(), "mail_note" ); + TQT_TQOBJECT(this), TQT_SLOT(slotMail()), actionCollection(), "mail_note" ); new KAction( i18n("Save As..."), "filesaveas", 0, - this, TQT_SLOT(slotSaveAs()), actionCollection(), "save_note" ); - KStdAction::print( this, TQT_SLOT(slotPrint()), actionCollection(), "print_note" ); + TQT_TQOBJECT(this), TQT_SLOT(slotSaveAs()), actionCollection(), "save_note" ); + KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), actionCollection(), "print_note" ); new KAction( i18n("Preferences..."), "configure", 0, - this, TQT_SLOT(slotPreferences()), actionCollection(), "configure_note" ); + TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()), actionCollection(), "configure_note" ); m_keepAbove = new KToggleAction( i18n("Keep Above Others"), "up", 0, - this, TQT_SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_above" ); + TQT_TQOBJECT(this), TQT_SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_above" ); m_keepAbove->setExclusiveGroup( "keepAB" ); m_keepBelow = new KToggleAction( i18n("Keep Below Others"), "down", 0, - this, TQT_SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_below" ); + TQT_TQOBJECT(this), TQT_SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_below" ); m_keepBelow->setExclusiveGroup( "keepAB" ); m_toDesktop = new KListAction( i18n("To Desktop"), 0, - this, TQT_SLOT(slotPopupActionToDesktop(int)), actionCollection(), "to_desktop" ); - connect( m_toDesktop->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotUpdateDesktopActions()) ); + TQT_TQOBJECT(this), TQT_SLOT(slotPopupActionToDesktop(int)), actionCollection(), "to_desktop" ); + connect( m_toDesktop->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateDesktopActions()) ); // invisible action to walk through the notes to make this configurable new KAction( i18n("Walk Through Notes"), 0, SHIFT+Key_BackTab, - this, TQT_SIGNAL(sigShowNextNote()), actionCollection(), "walk_notes" ); + TQT_TQOBJECT(this), TQT_SIGNAL(sigShowNextNote()), actionCollection(), "walk_notes" ); // create the note header, button and label... m_label = new TQLabel( this ); @@ -157,17 +155,17 @@ KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *tqparent, const char setName( m_journal->summary() ); // don't worry, no signals are connected at this stage yet m_button = new KNoteButton( "knotes_close", this ); - connect( m_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClose()) ); + connect( m_button, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotClose()) ); // create the note editor m_editor = new KNoteEdit( actionCollection(), this ); m_editor->setNote( this ); m_editor->installEventFilter( this ); // receive events (for modified) m_editor->viewport()->installEventFilter( this ); - connect( m_editor, TQT_SIGNAL(contentsMoving( int, int )), this, TQT_SLOT(slotUpdateViewport( int, int ))); + connect( m_editor, TQT_SIGNAL(contentsMoving( int, int )), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateViewport( int, int ))); KXMLGUIBuilder builder( this ); - KXMLGUIFactory factory( &builder, this ); + KXMLGUIFactory factory( &builder, TQT_TQOBJECT(this) ); factory.addClient( this ); m_menu = dynamic_cast<KPopupMenu*>(factory.container( "note_context", this )); @@ -395,7 +393,7 @@ void KNote::slotKill( bool force ) m_blockEmitDataChanged = true; if ( !force && KMessageBox::warningContinueCancel( this, - i18n("<qt>Do you really want to delete note <b>%1</b>?</qt>").arg( m_label->text() ), + i18n("<qt>Do you really want to delete note <b>%1</b>?</qt>").tqarg( m_label->text() ), i18n("Confirm Delete"), KGuiItem( i18n("&Delete"), "editdelete" ), "ConfirmDeleteNote" ) @@ -583,8 +581,8 @@ void KNote::tqfind( const TQString& pattern, long options ) m_tqfind = new KFind( pattern, options, this ); connect( m_tqfind, TQT_SIGNAL(highlight( const TQString &, int, int )), - this, TQT_SLOT(slotHighlight( const TQString &, int, int )) ); - connect( m_tqfind, TQT_SIGNAL(findNext()), this, TQT_SLOT(slotFindNext()) ); + TQT_TQOBJECT(this), TQT_SLOT(slotHighlight( const TQString &, int, int )) ); + connect( m_tqfind, TQT_SIGNAL(findNext()), TQT_TQOBJECT(this), TQT_SLOT(slotFindNext()) ); m_tqfind->setData( plainText() ); slotFindNext(); @@ -596,7 +594,7 @@ void KNote::slotFindNext() // TODO: dialogClosed() -> delete m_tqfind // Let KFind inspect the text fragment, and display a dialog if a match is found - KFind::Result res = m_tqfind->tqfind(); + KFind::Result res = m_tqfind->find(); if ( res == KFind::NoMatch ) // i.e. at end-pos { @@ -798,7 +796,7 @@ void KNote::slotPreferences() // create a new preferences dialog... KNoteConfigDlg *dialog = new KNoteConfigDlg( m_config, name(), this, noteId().utf8() ); - connect( dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotApplyConfig()) ); + connect( dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotApplyConfig()) ); connect( this, TQT_SIGNAL(sigNameChanged()), dialog, TQT_SLOT(slotUpdateCaption()) ); dialog->show(); } @@ -806,7 +804,7 @@ void KNote::slotPreferences() void KNote::slotSend() { // pop up dialog to get the IP - KNoteHostDlg hostDlg( i18n("Send \"%1\"").arg( name() ), this ); + KNoteHostDlg hostDlg( i18n("Send \"%1\"").tqarg( name() ), this ); aboutToEnterEventLoop(); bool ok = (hostDlg.exec() == TQDialog::Accepted); eventLoopLeft(); @@ -893,7 +891,7 @@ void KNote::slotSaveAs() if ( file.exists() && KMessageBox::warningContinueCancel( this, i18n("<qt>A file named <b>%1</b> already exists.<br>" - "Are you sure you want to overwrite it?</qt>").arg( TQFileInfo(file).fileName() ) ) + "Are you sure you want to overwrite it?</qt>").tqarg( TQFileInfo(file).fileName() ) ) != KMessageBox::Continue ) { m_blockEmitDataChanged = false; @@ -988,7 +986,7 @@ void KNote::slotUpdateDesktopActions() int count = wm_root.numberOfDesktops(); for ( int n = 1; n <= count; n++ ) - desktops.append( TQString("&%1 %2").arg( n ).arg( TQString::fromUtf8(wm_root.desktopName( n )) ) ); + desktops.append( TQString("&%1 %2").tqarg( n ).tqarg( TQString::fromUtf8(wm_root.desktopName( n )) ) ); m_toDesktop->setItems( desktops ); @@ -1022,7 +1020,7 @@ void KNote::createFold() TQPixmap fold( 15, 15 ); TQPainter foldp( &fold ); foldp.setPen( TQt::NoPen ); - foldp.setBrush( palette().active().dark() ); + foldp.setBrush( tqpalette().active().dark() ); TQPointArray foldpoints( 3 ); foldpoints.putPoints( 0, 3, 0, 0, 14, 0, 0, 14 ); foldp.drawPolygon( foldpoints ); @@ -1044,7 +1042,7 @@ void KNote::updateFocus() { if ( hasFocus() ) { - m_label->setBackgroundColor( palette().active().shadow() ); + m_label->setBackgroundColor( tqpalette().active().shadow() ); m_button->show(); if ( !m_editor->isReadOnly() ) @@ -1080,11 +1078,11 @@ void KNote::updateFocus() if ( s_ppOffset ) { - m_label->setBackgroundColor( palette().active().midlight() ); + m_label->setBackgroundColor( tqpalette().active().midlight() ); m_fold->show(); } else - m_label->setBackgroundColor( palette().active().background() ); + m_label->setBackgroundColor( tqpalette().active().background() ); } } @@ -1137,7 +1135,7 @@ void KNote::updateBackground( int y_offset ) TQImage grad_img( w, h, 32 ); TQRgb rgbcol; - TQColor bg = palette().active().background(); + TQColor bg = tqpalette().active().background(); for ( int i = 0; i < h; ++i ) { @@ -1171,7 +1169,7 @@ void KNote::updateLayout() if ( s_ppOffset ) { if ( !m_editor->paper().pixmap() ) // just changed the style - setColor( palette().active().foreground(), palette().active().background() ); + setColor( tqpalette().active().foreground(), tqpalette().active().background() ); m_pushpin->show(); setFrameStyle( Panel | Raised ); @@ -1184,7 +1182,7 @@ void KNote::updateLayout() else { if ( m_editor->paper().pixmap() ) // just changed the style - setColor( palette().active().foreground(), palette().active().background() ); + setColor( tqpalette().active().foreground(), tqpalette().active().background() ); setFrameStyle( WinPanel | Raised ); m_pushpin->hide(); @@ -1318,7 +1316,7 @@ bool KNote::eventFilter( TQObject *o, TQEvent *ev ) return true; } - if ( o == m_label ) + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_label) ) { TQMouseEvent *e = (TQMouseEvent *)ev; @@ -1328,12 +1326,12 @@ bool KNote::eventFilter( TQObject *o, TQEvent *ev ) slotRename(); } if ( ev->type() == TQEvent::MouseButtonPress && - (e->button() == LeftButton || e->button() == MidButton)) + (e->button() == Qt::LeftButton || e->button() == Qt::MidButton)) { - e->button() == LeftButton ? KWin::raiseWindow( winId() ) + e->button() == Qt::LeftButton ? KWin::raiseWindow( winId() ) : KWin::lowerWindow( winId() ); - XUngrabPointer( qt_xdisplay(), qt_x_time ); + XUngrabPointer( qt_xdisplay(), GET_QT_X_TIME() ); NETRootInfo wm_root( qt_xdisplay(), NET::WMMoveResize ); wm_root.moveResizeRequest( winId(), e->globalX(), e->globalY(), NET::Move ); return true; @@ -1349,7 +1347,7 @@ bool KNote::eventFilter( TQObject *o, TQEvent *ev ) #endif if ( m_menu && ( ev->type() == TQEvent::MouseButtonPress ) - && ( e->button() == RightButton ) ) + && ( e->button() == Qt::RightButton ) ) { m_menu->popup( TQCursor::pos() ); return true; @@ -1358,9 +1356,9 @@ bool KNote::eventFilter( TQObject *o, TQEvent *ev ) return false; } - if ( o == m_editor ) { + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editor) ) { if ( ev->type() == TQEvent::FocusOut ) { - TQFocusEvent *fe = static_cast<TQFocusEvent *>(ev); + TQFocusEvent *fe = TQT_TQFOCUSEVENT(ev); if ( fe->reason() != TQFocusEvent::Popup && fe->reason() != TQFocusEvent::Mouse ) { updateFocus(); @@ -1377,11 +1375,11 @@ bool KNote::eventFilter( TQObject *o, TQEvent *ev ) return false; } - if ( o == m_editor->viewport() ) + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editor->viewport()) ) { if ( m_edit_menu && ev->type() == TQEvent::MouseButtonPress && - ((TQMouseEvent *)ev)->button() == RightButton ) + ((TQMouseEvent *)ev)->button() == Qt::RightButton ) { m_edit_menu->popup( TQCursor::pos() ); return true; diff --git a/knotes/knotealarmdlg.cpp b/knotes/knotealarmdlg.cpp index ca4d74e84..6ce39e4a0 100644 --- a/knotes/knotealarmdlg.cpp +++ b/knotes/knotealarmdlg.cpp @@ -49,7 +49,7 @@ KNoteAlarmDlg::KNoteAlarmDlg( const TQString& caption, TQWidget *tqparent, const : KDialogBase( tqparent, name, true, caption, Ok|Cancel, Ok ) { TQVBox *page = makeVBoxMainWidget(); - TQGroupBox *group = new TQGroupBox( 3, Vertical, i18n("Scheduled Alarm"), page ); + TQGroupBox *group = new TQGroupBox( 3, Qt::Vertical, i18n("Scheduled Alarm"), page ); m_buttons = new TQButtonGroup( page ); m_buttons->hide(); diff --git a/knotes/knotebutton.cpp b/knotes/knotebutton.cpp index d9a6205e9..846dc503e 100644 --- a/knotes/knotebutton.cpp +++ b/knotes/knotebutton.cpp @@ -33,7 +33,7 @@ KNoteButton::KNoteButton( const TQString& icon, TQWidget *tqparent, const char *name ) : TQPushButton( tqparent, name ) { - setFocusPolicy( NoFocus ); + setFocusPolicy( Qt::NoFocus ); tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); m_flat = true; @@ -78,7 +78,7 @@ void KNoteButton::drawButton( TQPainter* p ) if ( !m_flat ) flags |= TQStyle::Style_MouseOver; - style().drawPrimitive( TQStyle::PE_ButtonTool, p, rect(), tqcolorGroup(), flags ); + tqstyle().tqdrawPrimitive( TQStyle::PE_ButtonTool, p, rect(), tqcolorGroup(), flags ); drawButtonLabel( p ); } @@ -102,8 +102,8 @@ void KNoteButton::drawButtonLabel( TQPainter* p ) // Shift button contents if pushed. if ( isOn() || isDown() ) { - dx += style().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal, this ); - dy += style().tqpixelMetric( TQStyle::PM_ButtonShiftVertical, this ); + dx += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal, this ); + dy += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftVertical, this ); } p->drawPixmap( dx, dy, pix ); diff --git a/knotes/knoteconfigdlg.cpp b/knotes/knoteconfigdlg.cpp index 950b9a9b1..abb379a03 100644 --- a/knotes/knoteconfigdlg.cpp +++ b/knotes/knoteconfigdlg.cpp @@ -81,7 +81,7 @@ KNoteConfigDlg::~KNoteConfigDlg() void KNoteConfigDlg::slotUpdateCaption() { - KNote *note = ::qt_cast<KNote *>(sender()); + KNote *note = ::tqqt_cast<KNote *>(sender()); if ( note ) setCaption( note->name() ); } diff --git a/knotes/knoteedit.cpp b/knotes/knoteedit.cpp index 2796c2975..55f1c6ff0 100644 --- a/knotes/knoteedit.cpp +++ b/knotes/knoteedit.cpp @@ -45,27 +45,27 @@ KNoteEdit::KNoteEdit( KActionCollection *actions, TQWidget *tqparent, const char setLinkUnderline( true ); setCheckSpellingEnabled(false); // create the actions for the RMB menu - undo = KStdAction::undo( this, TQT_SLOT(undo()), actions ); - redo = KStdAction::redo( this, TQT_SLOT(redo()), actions ); + undo = KStdAction::undo( TQT_TQOBJECT(this), TQT_SLOT(undo()), actions ); + redo = KStdAction::redo( TQT_TQOBJECT(this), TQT_SLOT(redo()), actions ); undo->setEnabled( isUndoAvailable() ); redo->setEnabled( isRedoAvailable() ); - m_cut = KStdAction::cut( this, TQT_SLOT(cut()), actions ); - m_copy = KStdAction::copy( this, TQT_SLOT(copy()), actions ); - m_paste = KStdAction::paste( this, TQT_SLOT(paste()), actions ); + m_cut = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT(cut()), actions ); + m_copy = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(copy()), actions ); + m_paste = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT(paste()), actions ); m_cut->setEnabled( false ); m_copy->setEnabled( false ); m_paste->setEnabled( true ); - connect( this, TQT_SIGNAL(undoAvailable(bool)), this, TQT_SLOT(setEnabledUndo(bool)) ); - connect( this, TQT_SIGNAL(redoAvailable(bool)), this, TQT_SLOT(setEnabledRedo(bool)) ); + connect( this, TQT_SIGNAL(undoAvailable(bool)), TQT_TQOBJECT(this), TQT_SLOT(setEnabledUndo(bool)) ); + connect( this, TQT_SIGNAL(redoAvailable(bool)), TQT_TQOBJECT(this), TQT_SLOT(setEnabledRedo(bool)) ); - connect( this, TQT_SIGNAL(copyAvailable(bool)), this, TQT_SLOT( slotCutEnabled( bool ) ) ); + connect( this, TQT_SIGNAL(copyAvailable(bool)), TQT_TQOBJECT(this), TQT_SLOT( slotCutEnabled( bool ) ) ); connect( this, TQT_SIGNAL(copyAvailable(bool)), m_copy, TQT_SLOT(setEnabled(bool)) ); - new KAction( KStdGuiItem::clear(), 0, this, TQT_SLOT(clear()), actions, "edit_clear" ); - KStdAction::selectAll( this, TQT_SLOT(selectAll()), actions ); + new KAction( KStdGuiItem::clear(), 0, TQT_TQOBJECT(this), TQT_SLOT(clear()), actions, "edit_clear" ); + KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT(selectAll()), actions ); // create the actions modifying the text format m_textBold = new KToggleAction( i18n("Bold"), "text_bold", CTRL + Key_B, 0, 0, @@ -83,17 +83,17 @@ KNoteEdit::KNoteEdit( KActionCollection *actions, TQWidget *tqparent, const char connect( m_textStrikeOut, TQT_SIGNAL(toggled(bool)), TQT_SLOT(textStrikeOut(bool)) ); m_textAlignLeft = new KToggleAction( i18n("Align Left"), "text_left", ALT + Key_L, - this, TQT_SLOT(textAlignLeft()), + TQT_TQOBJECT(this), TQT_SLOT(textAlignLeft()), actions, "format_alignleft" ); m_textAlignLeft->setChecked( true ); // just a dummy, will be updated later m_textAlignCenter = new KToggleAction( i18n("Align Center"), "text_center", ALT + Key_C, - this, TQT_SLOT(textAlignCenter()), + TQT_TQOBJECT(this), TQT_SLOT(textAlignCenter()), actions, "format_aligncenter" ); m_textAlignRight = new KToggleAction( i18n("Align Right"), "text_right", ALT + Key_R, - this, TQT_SLOT(textAlignRight()), + TQT_TQOBJECT(this), TQT_SLOT(textAlignRight()), actions, "format_alignright" ); m_textAlignBlock = new KToggleAction( i18n("Align Block"), "text_block", ALT + Key_B, - this, TQT_SLOT(textAlignBlock()), + TQT_TQOBJECT(this), TQT_SLOT(textAlignBlock()), actions, "format_alignblock" ); m_textAlignLeft->setExclusiveGroup( "align" ); @@ -102,16 +102,16 @@ KNoteEdit::KNoteEdit( KActionCollection *actions, TQWidget *tqparent, const char m_textAlignBlock->setExclusiveGroup( "align" ); m_textList = new KToggleAction( i18n("List"), "enum_list", 0, - this, TQT_SLOT(textList()), + TQT_TQOBJECT(this), TQT_SLOT(textList()), actions, "format_list" ); m_textList->setExclusiveGroup( "style" ); m_textSuper = new KToggleAction( i18n("Superscript"), "text_super", 0, - this, TQT_SLOT(textSuperScript()), + TQT_TQOBJECT(this), TQT_SLOT(textSuperScript()), actions, "format_super" ); m_textSub = new KToggleAction( i18n("Subscript"), "text_sub", 0, - this, TQT_SLOT(textSubScript()), + TQT_TQOBJECT(this), TQT_SLOT(textSubScript()), actions, "format_sub" ); m_textSuper->setExclusiveGroup( "valign" ); @@ -120,38 +120,38 @@ KNoteEdit::KNoteEdit( KActionCollection *actions, TQWidget *tqparent, const char // There is no easy possibility to implement text indenting with TQTextEdit // // m_textIncreaseIndent = new KAction( i18n("Increase Indent"), "format_increaseindent", 0, -// this, TQT_SLOT(textIncreaseIndent()), +// TQT_TQOBJECT(this), TQT_SLOT(textIncreaseIndent()), // actions, "format_increaseindent" ); // // m_textDecreaseIndent = new KAction( i18n("Decrease Indent"), "format_decreaseindent", 0, -// this, TQT_SLOT(textDecreaseIndent()), +// TQT_TQOBJECT(this), TQT_SLOT(textDecreaseIndent()), // actions, "format_decreaseindent" ); TQPixmap pix( ICON_SIZE, ICON_SIZE ); pix.fill( black ); // just a dummy, gets updated before widget is shown - m_textColor = new KAction( i18n("Text Color..."), pix, 0, this, + m_textColor = new KAction( i18n("Text Color..."), pix, 0, TQT_TQOBJECT(this), TQT_SLOT(textColor()), actions, "format_color" ); m_textFont = new KFontAction( i18n("Text Font"), "text", KKey(), actions, "format_font" ); connect( m_textFont, TQT_SIGNAL(activated( const TQString & )), - this, TQT_SLOT(setFamily( const TQString & )) ); + TQT_TQOBJECT(this), TQT_SLOT(setFamily( const TQString & )) ); m_textSize = new KFontSizeAction( i18n("Text Size"), KKey(), actions, "format_size" ); connect( m_textSize, TQT_SIGNAL(fontSizeChanged( int )), - this, TQT_SLOT(setPointSize( int )) ); + TQT_TQOBJECT(this), TQT_SLOT(setPointSize( int )) ); // TQTextEdit connections connect( this, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed()) ); connect( this, TQT_SIGNAL(currentFontChanged( const TQFont & )), - this, TQT_SLOT(fontChanged( const TQFont & )) ); + TQT_TQOBJECT(this), TQT_SLOT(fontChanged( const TQFont & )) ); connect( this, TQT_SIGNAL(currentColorChanged( const TQColor & )), - this, TQT_SLOT(colorChanged( const TQColor & )) ); + TQT_TQOBJECT(this), TQT_SLOT(colorChanged( const TQColor & )) ); connect( this, TQT_SIGNAL(currentAlignmentChanged( int )), - this, TQT_SLOT(tqalignmentChanged( int )) ); + TQT_TQOBJECT(this), TQT_SLOT(tqalignmentChanged( int )) ); connect( this, TQT_SIGNAL(currentVerticalAlignmentChanged( VerticalAlignment )), - this, TQT_SLOT(verticalAlignmentChanged( VerticalAlignment )) ); + TQT_TQOBJECT(this), TQT_SLOT(verticalAlignmentChanged( VerticalAlignment )) ); } KNoteEdit::~KNoteEdit() @@ -541,7 +541,7 @@ TQPopupMenu *KNoteEdit::createPopupMenu( const TQPoint &pos ) menu->insertSeparator(); id = menu->insertItem( SmallIconSet( "spellcheck" ), i18n( "Check Spelling..." ), - this, TQT_SLOT( checkSpelling() ) ); + TQT_TQOBJECT(this), TQT_SLOT( checkSpelling() ) ); if( text().isEmpty() ) menu->setItemEnabled( id, false ); diff --git a/knotes/knoteprinter.cpp b/knotes/knoteprinter.cpp index 69ddb35b5..6b2868174 100644 --- a/knotes/knoteprinter.cpp +++ b/knotes/knoteprinter.cpp @@ -117,7 +117,7 @@ void KNotePrinter::printNote( const TQString& name, const TQString& content ) co KPrinter printer; printer.setFullPage( true ); - if ( !printer.setup( 0, i18n("Print %1").arg(name) ) ) + if ( !printer.setup( 0, i18n("Print %1").tqarg(name) ) ) return; TQPainter painter; painter.begin( &printer ); diff --git a/knotes/knotesapp.cpp b/knotes/knotesapp.cpp index 79a3ca994..3423e7cd8 100644 --- a/knotes/knotesapp.cpp +++ b/knotes/knotesapp.cpp @@ -112,25 +112,25 @@ KNotesApp::KNotesApp() // create the GUI... new KAction( i18n("New Note"), "filenew", 0, - this, TQT_SLOT(newNote()), actionCollection(), "new_note" ); + TQT_TQOBJECT(this), TQT_SLOT(newNote()), actionCollection(), "new_note" ); new KAction( i18n("New Note From Clipboard"), "editpaste", 0, - this, TQT_SLOT(newNoteFromClipboard()), actionCollection(), "new_note_clipboard" ); + TQT_TQOBJECT(this), TQT_SLOT(newNoteFromClipboard()), actionCollection(), "new_note_clipboard" ); new KAction( i18n("Show All Notes"), "knotes", 0, - this, TQT_SLOT(showAllNotes()), actionCollection(), "show_all_notes" ); + TQT_TQOBJECT(this), TQT_SLOT(showAllNotes()), actionCollection(), "show_all_notes" ); new KAction( i18n("Hide All Notes"), "fileclose", 0, - this, TQT_SLOT(hideAllNotes()), actionCollection(), "hide_all_notes" ); + TQT_TQOBJECT(this), TQT_SLOT(hideAllNotes()), actionCollection(), "hide_all_notes" ); new KHelpMenu( this, kapp->aboutData(), false, actionCollection() ); - m_findAction = KStdAction::tqfind( this, TQT_SLOT(slotOpenFindDialog()), actionCollection() ); - KStdAction::preferences( this, TQT_SLOT(slotPreferences()), actionCollection() ); - KStdAction::keyBindings( this, TQT_SLOT(slotConfigureAccels()), actionCollection() ); + m_findAction = KStdAction::find( TQT_TQOBJECT(this), TQT_SLOT(slotOpenFindDialog()), actionCollection() ); + KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()), actionCollection() ); + KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT(slotConfigureAccels()), actionCollection() ); //FIXME: no shortcut removing!? - KStdAction::quit( this, TQT_SLOT(slotQuit()), actionCollection() )->setShortcut( 0 ); + KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actionCollection() )->setShortcut( 0 ); setXMLFile( instance()->instanceName() + "appui.rc" ); m_guiBuilder = new KXMLGUIBuilder( this ); - m_guiFactory = new KXMLGUIFactory( m_guiBuilder, this ); + m_guiFactory = new KXMLGUIFactory( m_guiBuilder, TQT_TQOBJECT(this) ); m_guiFactory->addClient( this ); m_context_menu = static_cast<KPopupMenu*>(m_guiFactory->container( "knotes_context", this )); @@ -147,19 +147,19 @@ KNotesApp::KNotesApp() m_noteGUI.setContent( doc ); // create accels for global shortcuts - m_globalAccel = new KGlobalAccel( this, "global accel" ); + m_globalAccel = new KGlobalAccel( TQT_TQOBJECT(this), "global accel" ); m_globalAccel->insert( "global_new_note", i18n("New Note"), "", ALT+SHIFT+Key_N, ALT+SHIFT+Key_N , - this, TQT_SLOT(newNote()), true, true ); + TQT_TQOBJECT(this), TQT_SLOT(newNote()), true, true ); m_globalAccel->insert( "global_new_note_clipboard", i18n("New Note From Clipboard"), "", ALT+SHIFT+Key_C, ALT+SHIFT+Key_C, - this, TQT_SLOT(newNoteFromClipboard()), true, true ); + TQT_TQOBJECT(this), TQT_SLOT(newNoteFromClipboard()), true, true ); m_globalAccel->insert( "global_hide_all_notes", i18n("Hide All Notes"), "", ALT+SHIFT+Key_H, ALT+SHIFT+Key_H , - this, TQT_SLOT(hideAllNotes()), true, true ); + TQT_TQOBJECT(this), TQT_SLOT(hideAllNotes()), true, true ); m_globalAccel->insert( "global_show_all_notes", i18n("Show All Notes"), "", ALT+SHIFT+Key_S, ALT+SHIFT+Key_S, - this, TQT_SLOT(showAllNotes()), true, true ); + TQT_TQOBJECT(this), TQT_SLOT(showAllNotes()), true, true ); m_globalAccel->readSettings(); @@ -196,7 +196,7 @@ KNotesApp::KNotesApp() // set up the alarm reminder - do it after loading the notes because this // is used as a check if updateNoteActions has to be called for a new note - m_alarm = new KNotesAlarm( m_manager, this ); + m_alarm = new KNotesAlarm( m_manager, TQT_TQOBJECT(this) ); // create the socket and possibly start listening for connections m_listener = new KServerSocket(); @@ -266,7 +266,7 @@ TQString KNotesApp::newNote( const TQString& name, const TQString& text ) TQString KNotesApp::newNoteFromClipboard( const TQString& name ) { - const TQString& text = KApplication::clipboard()->text(); + const TQString& text = KApplication::tqclipboard()->text(); return newNote( name, text ); } @@ -460,12 +460,12 @@ bool KNotesApp::isModified( const TQString& app, const TQString& id ) const void KNotesApp::mousePressEvent( TQMouseEvent* e ) { - if ( !rect().tqcontains( e->pos() ) ) + if ( !rect().contains( e->pos() ) ) return; switch ( e->button() ) { - case LeftButton: + case Qt::LeftButton: if ( m_noteList.count() == 1 ) { TQDictIterator<KNote> it( m_noteList ); @@ -474,10 +474,10 @@ void KNotesApp::mousePressEvent( TQMouseEvent* e ) else if ( m_note_menu->count() > 0 ) m_note_menu->popup( e->globalPos() ); break; - case MidButton: + case Qt::MidButton: newNote(); break; - case RightButton: + case Qt::RightButton: m_context_menu->popup( e->globalPos() ); default: break; } @@ -488,7 +488,7 @@ void KNotesApp::mousePressEvent( TQMouseEvent* e ) void KNotesApp::slotShowNote() { // tell the WM to give this note focus - showNote( TQString::fromUtf8( sender()->name() ) ); + showNote( TQString::fromUtf8( TQT_TQOBJECT(sender())->name() ) ); } void KNotesApp::slotWalkThroughNotes() @@ -554,8 +554,8 @@ void KNotesApp::slotPreferences() // create a new preferences dialog... KNoteConfigDlg *dialog = new KNoteConfigDlg( 0, i18n("Settings"), this, "KNotes Settings" ); - connect( dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(updateNetworkListener()) ); - connect( dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(updateStyle()) ); + connect( dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(updateNetworkListener()) ); + connect( dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(updateStyle()) ); dialog->show(); } @@ -673,7 +673,7 @@ void KNotesApp::acceptConnection() { KNotesNetworkReceiver *recv = new KNotesNetworkReceiver( s ); connect( recv, TQT_SIGNAL(sigNoteReceived( const TQString &, const TQString & )), - this, TQT_SLOT(newNote( const TQString &, const TQString & )) ); + TQT_TQOBJECT(this), TQT_SLOT(newNote( const TQString &, const TQString & )) ); } } @@ -704,7 +704,7 @@ void KNotesApp::updateNoteActions() for ( TQDictIterator<KNote> it( m_noteList ); it.current(); ++it ) { KAction *action = new KAction( it.current()->name().tqreplace("&", "&&"), - KShortcut(), this, TQT_SLOT(slotShowNote()), + KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotShowNote()), (TQObject *)0, it.current()->noteId().utf8() ); KIconEffect effect; diff --git a/knotes/knotesnetrecv.cpp b/knotes/knotesnetrecv.cpp index ce4aafa42..829398ba0 100644 --- a/knotes/knotesnetrecv.cpp +++ b/knotes/knotesnetrecv.cpp @@ -66,8 +66,8 @@ KNotesNetworkReceiver::KNotesNetworkReceiver( KBufferedSocket *s ) // Add the remote IP or hostname and the date to the title, to help the // user guess who wrote it. m_titleAddon = TQString(" [%1, %2]") - .arg( m_sock->peerAddress().nodeName() ) - .arg( date ); + .tqarg( m_sock->peerAddress().nodeName() ) + .tqarg( date ); // Setup the communications connect( m_sock, TQT_SIGNAL(readyRead()), TQT_SLOT(slotDataAvailable()) ); @@ -145,7 +145,7 @@ void KNotesNetworkReceiver::slotConnectionClosed() void KNotesNetworkReceiver::slotError( int err ) { kdWarning() << k_funcinfo - << m_sock->errorString( static_cast<KSocketBase::SocketError>(err) ) + << m_sock->KNetwork::KSocketBase::errorString( static_cast<KSocketBase::SocketError>(err) ) << endl; } diff --git a/knotes/knotesnetsend.cpp b/knotes/knotesnetsend.cpp index fafcebac1..ca3005d6a 100644 --- a/knotes/knotesnetsend.cpp +++ b/knotes/knotesnetsend.cpp @@ -48,11 +48,11 @@ KNotesNetworkSender::KNotesNetworkSender( const TQString& hostname, int port ) // TQObject:: prefix needed, otherwise the KStreamSocket::connect() // mehtod is called!!! - TQObject::connect( this, TQT_SIGNAL(connected( const KResolverEntry& )), + QObject::connect( TQT_TQOBJECT(this), TQT_SIGNAL(connected( const KResolverEntry& )), TQT_SLOT(slotConnected( const KResolverEntry& )) ); - TQObject::connect( this, TQT_SIGNAL(gotError( int )), TQT_SLOT(slotError( int )) ); - TQObject::connect( this, TQT_SIGNAL(closed()), TQT_SLOT(slotClosed()) ); - TQObject::connect( this, TQT_SIGNAL(readyWrite()), TQT_SLOT(slotReadyWrite()) ); + QObject::connect( TQT_TQOBJECT(this), TQT_SIGNAL(gotError( int )), TQT_SLOT(slotError( int )) ); + QObject::connect( TQT_TQOBJECT(this), TQT_SIGNAL(closed()), TQT_SLOT(slotClosed()) ); + QObject::connect( TQT_TQOBJECT(this), TQT_SIGNAL(readyWrite()), TQT_SLOT(slotReadyWrite()) ); } void KNotesNetworkSender::setSenderId( const TQString& sender ) @@ -91,7 +91,7 @@ void KNotesNetworkSender::slotReadyWrite() void KNotesNetworkSender::slotError( int err ) { KMessageBox::sorry( 0, i18n("Communication error: %1") - .arg( errorString( static_cast<KSocketBase::SocketError>(err) ) ) + .tqarg( TQString(KNetwork::KSocketBase::errorString( static_cast<KSocketBase::SocketError>(err) )) ) ); slotClosed(); } diff --git a/knotes/resourcelocal.cpp b/knotes/resourcelocal.cpp index 960362127..aed70e236 100644 --- a/knotes/resourcelocal.cpp +++ b/knotes/resourcelocal.cpp @@ -89,7 +89,7 @@ bool ResourceLocal::save() i18n("<qt>Unable to save the notes to <b>%1</b>. " "Check that there is sufficient disk space." "<br>There should be a backup in the same directory " - "though.</qt>").arg( mURL.path() ) ); + "though.</qt>").tqarg( mURL.path() ) ); return false; } |