diff options
Diffstat (limited to 'knotes')
32 files changed, 206 insertions, 366 deletions
diff --git a/knotes/CMakeL10n.txt b/knotes/CMakeL10n.txt index 4cb63049..984b1fee 100644 --- a/knotes/CMakeL10n.txt +++ b/knotes/CMakeL10n.txt @@ -1,3 +1,9 @@ ##### create translation templates ############## tde_l10n_create_template( "knotes" ) + +tde_l10n_create_template( + CATALOG "desktop_files/knotes-desktops/" + SOURCES *.desktop + DESTINATION "${CMAKE_SOURCE_DIR}/translations" +) diff --git a/knotes/CMakeLists.txt b/knotes/CMakeLists.txt index 198d124e..92708c36 100644 --- a/knotes/CMakeLists.txt +++ b/knotes/CMakeLists.txt @@ -39,11 +39,25 @@ install( FILES KNotesIface.h KNotesAppIface.h DESTINATION ${INCLUDE_INSTALL_DIR} ##### other data ################################ -install( FILES knotes.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) +tde_create_translated_desktop( + SOURCE knotes.desktop + PO_DIR knotes-desktops +) + install( FILES knoteconfig.kcfg knotesglobalconfig.kcfg DESTINATION ${KCFG_INSTALL_DIR} ) install( FILES knotesappui.rc knotesui.rc DESTINATION ${DATA_INSTALL_DIR}/knotes ) -install( FILES local.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/knotes ) -install( FILES knotes_manager.desktop DESTINATION ${SERVICES_INSTALL_DIR}/tderesources ) + +tde_create_translated_desktop( + SOURCE local.desktop + DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/knotes + PO_DIR knotes-desktops +) + +tde_create_translated_desktop( + SOURCE knotes_manager.desktop + DESTINATION ${SERVICES_INSTALL_DIR}/tderesources + PO_DIR knotes-desktops +) ##### knotes (executable) ####################### diff --git a/knotes/knote.cpp b/knotes/knote.cpp index 2a78d718..e0ac842a 100644 --- a/knotes/knote.cpp +++ b/knotes/knote.cpp @@ -44,10 +44,10 @@ #include <kcolordrag.h> #include <kiconeffect.h> #include <tdelocale.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdemessagebox.h> #include <kfind.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <kinputdialog.h> #include <kmdcodec.h> #include <tdeglobalsettings.h> @@ -105,47 +105,47 @@ KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *parent, 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 TDEAction( i18n("New"), "document-new", 0, - TQT_TQOBJECT(this),TQT_SLOT(slotRequestNewNote()) , actionCollection(), "new_note" ); + this,TQ_SLOT(slotRequestNewNote()) , actionCollection(), "new_note" ); new TDEAction( i18n("Rename..."), "text", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotRename()), actionCollection(), "rename_note" ); + this, TQ_SLOT(slotRename()), actionCollection(), "rename_note" ); m_readOnly = new TDEToggleAction( i18n("Lock"), "system-lock-screen" , 0, - TQT_TQOBJECT(this), TQT_SLOT(slotUpdateReadOnly()), actionCollection(), "lock_note" ); + this, TQ_SLOT(slotUpdateReadOnly()), actionCollection(), "lock_note" ); m_readOnly->setCheckedState( KGuiItem( i18n("Unlock"), "unlock" ) ); new TDEAction( i18n("Hide"), "window-close" , Key_Escape, - TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection(), "hide_note" ); + this, TQ_SLOT(slotClose()), actionCollection(), "hide_note" ); new TDEAction( i18n("Delete"), "knotes_delete", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotKill()), actionCollection(), "delete_note" ); + this, TQ_SLOT(slotKill()), actionCollection(), "delete_note" ); new TDEAction( i18n("Insert Date"), "knotes_date", 0 , - TQT_TQOBJECT(this), TQT_SLOT(slotInsDate()), actionCollection(), "insert_date" ); + this, TQ_SLOT(slotInsDate()), actionCollection(), "insert_date" ); new TDEAction( i18n("Set Alarm..."), "knotes_alarm", 0 , - TQT_TQOBJECT(this), TQT_SLOT(slotSetAlarm()), actionCollection(), "set_alarm" ); + this, TQ_SLOT(slotSetAlarm()), actionCollection(), "set_alarm" ); new TDEAction( i18n("Send..."), "network", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotSend()), actionCollection(), "send_note" ); + this, TQ_SLOT(slotSend()), actionCollection(), "send_note" ); new TDEAction( i18n("Mail..."), "mail-send", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotMail()), actionCollection(), "mail_note" ); + this, TQ_SLOT(slotMail()), actionCollection(), "mail_note" ); new TDEAction( i18n("Save As..."), "document-save-as", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotSaveAs()), actionCollection(), "save_note" ); - KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), actionCollection(), "print_note" ); + this, TQ_SLOT(slotSaveAs()), actionCollection(), "save_note" ); + KStdAction::print( this, TQ_SLOT(slotPrint()), actionCollection(), "print_note" ); new TDEAction( i18n("Preferences..."), "configure", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()), actionCollection(), "configure_note" ); + this, TQ_SLOT(slotPreferences()), actionCollection(), "configure_note" ); m_keepAbove = new TDEToggleAction( i18n("Keep Above Others"), "go-up", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_above" ); + this, TQ_SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_above" ); m_keepAbove->setExclusiveGroup( "keepAB" ); m_keepBelow = new TDEToggleAction( i18n("Keep Below Others"), "go-down", 0, - TQT_TQOBJECT(this), TQT_SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_below" ); + this, TQ_SLOT(slotUpdateKeepAboveBelow()), actionCollection(), "keep_below" ); m_keepBelow->setExclusiveGroup( "keepAB" ); m_toDesktop = new TDEListAction( i18n("To Desktop"), 0, - TQT_TQOBJECT(this), TQT_SLOT(slotPopupActionToDesktop(int)), actionCollection(), "to_desktop" ); - connect( m_toDesktop->popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateDesktopActions()) ); + this, TQ_SLOT(slotPopupActionToDesktop(int)), actionCollection(), "to_desktop" ); + connect( m_toDesktop->popupMenu(), TQ_SIGNAL(aboutToShow()), this, TQ_SLOT(slotUpdateDesktopActions()) ); // invisible action to walk through the notes to make this configurable new TDEAction( i18n("Walk Through Notes"), 0, SHIFT+Key_BackTab, - TQT_TQOBJECT(this), TQT_SIGNAL(sigShowNextNote()), actionCollection(), "walk_notes" ); + this, TQ_SIGNAL(sigShowNextNote()), actionCollection(), "walk_notes" ); // create the note header, button and label... m_label = new TQLabel( this ); @@ -155,17 +155,17 @@ KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *parent, 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()), TQT_TQOBJECT(this), TQT_SLOT(slotClose()) ); + connect( m_button, TQ_SIGNAL(clicked()), this, TQ_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 )), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateViewport( int, int ))); + connect( m_editor, TQ_SIGNAL(contentsMoving( int, int )), this, TQ_SLOT(slotUpdateViewport( int, int ))); KXMLGUIBuilder builder( this ); - KXMLGUIFactory factory( &builder, TQT_TQOBJECT(this) ); + KXMLGUIFactory factory( &builder, this ); factory.addClient( this ); m_menu = dynamic_cast<TDEPopupMenu*>(factory.container( "note_context", this )); @@ -292,7 +292,7 @@ KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *parent, const char * // let KWin do the placement if the position is illegal--at least 10 pixels // of a note need to be visible const TQPoint& position = m_config->position(); - TQRect desk = kapp->desktop()->rect(); + TQRect desk = tdeApp->desktop()->rect(); desk.addCoords( 10, 10, -10, -10 ); if ( desk.intersects( TQRect( position, TQSize( width, height ) ) ) ) move( position ); // do before calling show() to avoid flicker @@ -360,8 +360,8 @@ KNote::KNote( TQDomDocument buildDoc, Journal *j, TQWidget *parent, const char * // HACK: update the icon color - again after showing the note, to make kicker aware of the new colors TDEIconEffect effect; - TQPixmap icon = effect.apply( kapp->icon(), TDEIconEffect::Colorize, 1, m_config->bgColor(), false ); - TQPixmap miniIcon = effect.apply( kapp->miniIcon(), TDEIconEffect::Colorize, 1, m_config->bgColor(), false ); + TQPixmap icon = effect.apply( tdeApp->icon(), TDEIconEffect::Colorize, 1, m_config->bgColor(), false ); + TQPixmap miniIcon = effect.apply( tdeApp->miniIcon(), TDEIconEffect::Colorize, 1, m_config->bgColor(), false ); KWin::setIcons( winId(), icon, miniIcon ); } @@ -576,8 +576,8 @@ void KNote::setColor( const TQColor& fg, const TQColor& bg ) // update the icon color TDEIconEffect effect; - TQPixmap icon = effect.apply( kapp->icon(), TDEIconEffect::Colorize, 1, bg, false ); - TQPixmap miniIcon = effect.apply( kapp->miniIcon(), TDEIconEffect::Colorize, 1, bg, false ); + TQPixmap icon = effect.apply( tdeApp->icon(), TDEIconEffect::Colorize, 1, bg, false ); + TQPixmap miniIcon = effect.apply( tdeApp->miniIcon(), TDEIconEffect::Colorize, 1, bg, false ); KWin::setIcons( winId(), icon, miniIcon ); // set the color for the selection used to highlight the find stuff @@ -600,9 +600,9 @@ void KNote::find( const TQString& pattern, long options ) delete m_find; m_find = new KFind( pattern, options, this ); - connect( m_find, TQT_SIGNAL(highlight( const TQString &, int, int )), - TQT_TQOBJECT(this), TQT_SLOT(slotHighlight( const TQString &, int, int )) ); - connect( m_find, TQT_SIGNAL(findNext()), TQT_TQOBJECT(this), TQT_SLOT(slotFindNext()) ); + connect( m_find, TQ_SIGNAL(highlight( const TQString &, int, int )), + this, TQ_SLOT(slotHighlight( const TQString &, int, int )) ); + connect( m_find, TQ_SIGNAL(findNext()), this, TQ_SLOT(slotFindNext()) ); m_find->setData( plainText() ); slotFindNext(); @@ -816,8 +816,8 @@ void KNote::slotPreferences() // create a new preferences dialog... KNoteConfigDlg *dialog = new KNoteConfigDlg( m_config, name(), this, noteId().utf8() ); - connect( dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotApplyConfig()) ); - connect( this, TQT_SIGNAL(sigNameChanged()), dialog, TQT_SLOT(slotUpdateCaption()) ); + connect( dialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(slotApplyConfig()) ); + connect( this, TQ_SIGNAL(sigNameChanged()), dialog, TQ_SLOT(slotUpdateCaption()) ); dialog->show(); } @@ -1285,7 +1285,7 @@ void KNote::resizeEvent( TQResizeEvent *qre ) void KNote::closeEvent( TQCloseEvent *event ) { - if(kapp->sessionSaving()) + if(tdeApp->sessionSaving()) return; event->ignore(); //We don't want to close (and delete the widget). Just hide it slotClose(); @@ -1339,7 +1339,7 @@ bool KNote::eventFilter( TQObject *o, TQEvent *ev ) return true; } - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_label) ) + if ( o == m_label ) { TQMouseEvent *e = (TQMouseEvent *)ev; @@ -1349,12 +1349,12 @@ bool KNote::eventFilter( TQObject *o, TQEvent *ev ) slotRename(); } if ( ev->type() == TQEvent::MouseButtonPress && - (e->button() == Qt::LeftButton || e->button() == Qt::MidButton)) + (e->button() == TQt::LeftButton || e->button() == TQt::MidButton)) { - e->button() == Qt::LeftButton ? KWin::raiseWindow( winId() ) + e->button() == TQt::LeftButton ? KWin::raiseWindow( winId() ) : KWin::lowerWindow( winId() ); - XUngrabPointer( tqt_xdisplay(), GET_QT_X_TIME() ); + XUngrabPointer( tqt_xdisplay(), get_tqt_x_time() ); NETRootInfo wm_root( tqt_xdisplay(), NET::WMMoveResize ); wm_root.moveResizeRequest( winId(), e->globalX(), e->globalY(), NET::Move ); return true; @@ -1370,7 +1370,7 @@ bool KNote::eventFilter( TQObject *o, TQEvent *ev ) #endif if ( m_menu && ( ev->type() == TQEvent::MouseButtonPress ) - && ( e->button() == Qt::RightButton ) ) + && ( e->button() == TQt::RightButton ) ) { m_menu->popup( TQCursor::pos() ); return true; @@ -1379,9 +1379,9 @@ bool KNote::eventFilter( TQObject *o, TQEvent *ev ) return false; } - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editor) ) { + if ( o == m_editor ) { if ( ev->type() == TQEvent::FocusOut ) { - TQFocusEvent *fe = TQT_TQFOCUSEVENT(ev); + TQFocusEvent *fe = static_cast<TQFocusEvent*>(ev); if ( fe->reason() != TQFocusEvent::Popup && fe->reason() != TQFocusEvent::Mouse ) { updateFocus(); @@ -1398,11 +1398,11 @@ bool KNote::eventFilter( TQObject *o, TQEvent *ev ) return false; } - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editor->viewport()) ) + if ( o == m_editor->viewport() ) { if ( m_edit_menu && ev->type() == TQEvent::MouseButtonPress && - ((TQMouseEvent *)ev)->button() == Qt::RightButton ) + ((TQMouseEvent *)ev)->button() == TQt::RightButton ) { m_edit_menu->popup( TQCursor::pos() ); return true; diff --git a/knotes/knote.h b/knotes/knote.h index 201c7f79..73ca8f4a 100644 --- a/knotes/knote.h +++ b/knotes/knote.h @@ -50,7 +50,7 @@ namespace KCal { class KNote : public TQFrame, virtual public KXMLGUIClient { - Q_OBJECT + TQ_OBJECT public: KNote( TQDomDocument buildDoc, KCal::Journal *journal, TQWidget *parent = 0, diff --git a/knotes/knotealarmdlg.cpp b/knotes/knotealarmdlg.cpp index 4496da26..5e43a86a 100644 --- a/knotes/knotealarmdlg.cpp +++ b/knotes/knotealarmdlg.cpp @@ -49,7 +49,7 @@ KNoteAlarmDlg::KNoteAlarmDlg( const TQString& caption, TQWidget *parent, const c : KDialogBase( parent, name, true, caption, Ok|Cancel, Ok ) { TQVBox *page = makeVBoxMainWidget(); - TQGroupBox *group = new TQGroupBox( 3, Qt::Vertical, i18n("Scheduled Alarm"), page ); + TQGroupBox *group = new TQGroupBox( 3, TQt::Vertical, i18n("Scheduled Alarm"), page ); m_buttons = new TQButtonGroup( page ); m_buttons->hide(); @@ -72,7 +72,7 @@ KNoteAlarmDlg::KNoteAlarmDlg( const TQString& caption, TQWidget *parent, const c label_in->setEnabled( false ); // TODO in->hide(); //show it and enable it when feature will implement - connect( m_buttons, TQT_SIGNAL(clicked( int )), TQT_SLOT(slotButtonChanged( int )) ); + connect( m_buttons, TQ_SIGNAL(clicked( int )), TQ_SLOT(slotButtonChanged( int )) ); } diff --git a/knotes/knotealarmdlg.h b/knotes/knotealarmdlg.h index b018418a..a64f2daa 100644 --- a/knotes/knotealarmdlg.h +++ b/knotes/knotealarmdlg.h @@ -45,7 +45,7 @@ namespace KCal { class KNoteAlarmDlg : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: KNoteAlarmDlg( const TQString& caption, TQWidget *parent=0, const char *name=0 ); diff --git a/knotes/knotebutton.cpp b/knotes/knotebutton.cpp index ff89b2de..47d64a3e 100644 --- a/knotes/knotebutton.cpp +++ b/knotes/knotebutton.cpp @@ -33,7 +33,7 @@ KNoteButton::KNoteButton( const TQString& icon, TQWidget *parent, const char *name ) : TQPushButton( parent, name ) { - setFocusPolicy( TQ_NoFocus ); + setFocusPolicy( TQWidget::NoFocus ); setSizePolicy( 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().tqdrawPrimitive( TQStyle::PE_ButtonTool, p, rect(), colorGroup(), flags ); + style().drawPrimitive( TQStyle::PE_ButtonTool, p, rect(), colorGroup(), flags ); drawButtonLabel( p ); } diff --git a/knotes/knotebutton.h b/knotes/knotebutton.h index 5d1739ae..1b5d4960 100644 --- a/knotes/knotebutton.h +++ b/knotes/knotebutton.h @@ -30,7 +30,7 @@ class TQResizeEvent; class KNoteButton: public TQPushButton { - Q_OBJECT + TQ_OBJECT public: KNoteButton( const TQString& icon, TQWidget *parent=0, const char *name=0 ); diff --git a/knotes/knoteconfigdlg.cpp b/knotes/knoteconfigdlg.cpp index bd388c38..2f16a378 100644 --- a/knotes/knoteconfigdlg.cpp +++ b/knotes/knoteconfigdlg.cpp @@ -47,7 +47,7 @@ KNoteConfigDlg::KNoteConfigDlg( KNoteConfig *config, const TQString& title, config ? Default|Ok|Apply|Cancel : Default|Ok|Cancel, Ok ) { setCaption( title ); - KWin::setIcons( winId(), kapp->icon(), kapp->miniIcon() ); + KWin::setIcons( winId(), tdeApp->icon(), tdeApp->miniIcon() ); setIconListAllVisible( true ); enableButtonSeparator( true ); @@ -81,7 +81,7 @@ KNoteConfigDlg::~KNoteConfigDlg() void KNoteConfigDlg::slotUpdateCaption() { - KNote *note = ::tqqt_cast<KNote *>(sender()); + KNote *note = ::tqt_cast<KNote *>(sender()); if ( note ) setCaption( note->name() ); } diff --git a/knotes/knoteconfigdlg.h b/knotes/knoteconfigdlg.h index a72859a1..97c4ae9e 100644 --- a/knotes/knoteconfigdlg.h +++ b/knotes/knoteconfigdlg.h @@ -29,7 +29,7 @@ class KNoteConfig; class KNoteConfigDlg : public TDEConfigDialog { - Q_OBJECT + TQ_OBJECT public: KNoteConfigDlg( KNoteConfig *config, const TQString &title, diff --git a/knotes/knoteedit.cpp b/knotes/knoteedit.cpp index 1316bc3a..4ef1274d 100644 --- a/knotes/knoteedit.cpp +++ b/knotes/knoteedit.cpp @@ -45,27 +45,27 @@ KNoteEdit::KNoteEdit( TDEActionCollection *actions, TQWidget *parent, const char setLinkUnderline( true ); setCheckSpellingEnabled(false); // create the actions for the RMB menu - undo = KStdAction::undo( TQT_TQOBJECT(this), TQT_SLOT(undo()), actions ); - redo = KStdAction::redo( TQT_TQOBJECT(this), TQT_SLOT(redo()), actions ); + undo = KStdAction::undo( this, TQ_SLOT(undo()), actions ); + redo = KStdAction::redo( this, TQ_SLOT(redo()), actions ); undo->setEnabled( isUndoAvailable() ); redo->setEnabled( isRedoAvailable() ); - 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 = KStdAction::cut( this, TQ_SLOT(cut()), actions ); + m_copy = KStdAction::copy( this, TQ_SLOT(copy()), actions ); + m_paste = KStdAction::paste( this, TQ_SLOT(paste()), actions ); m_cut->setEnabled( false ); m_copy->setEnabled( false ); m_paste->setEnabled( true ); - 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, TQ_SIGNAL(undoAvailable(bool)), this, TQ_SLOT(setEnabledUndo(bool)) ); + connect( this, TQ_SIGNAL(redoAvailable(bool)), this, TQ_SLOT(setEnabledRedo(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)) ); + connect( this, TQ_SIGNAL(copyAvailable(bool)), this, TQ_SLOT( slotCutEnabled( bool ) ) ); + connect( this, TQ_SIGNAL(copyAvailable(bool)), m_copy, TQ_SLOT(setEnabled(bool)) ); - new TDEAction( KStdGuiItem::clear(), 0, TQT_TQOBJECT(this), TQT_SLOT(clear()), actions, "edit_clear" ); - KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT(selectAll()), actions ); + new TDEAction( KStdGuiItem::clear(), 0, this, TQ_SLOT(clear()), actions, "edit_clear" ); + KStdAction::selectAll( this, TQ_SLOT(selectAll()), actions ); // create the actions modifying the text format m_textBold = new TDEToggleAction( i18n("Bold"), "format-text-bold", CTRL + Key_B, 0, 0, @@ -77,23 +77,23 @@ KNoteEdit::KNoteEdit( TDEActionCollection *actions, TQWidget *parent, const char m_textStrikeOut = new TDEToggleAction( i18n("Strike Out"), "format-text-strikethrough", CTRL + Key_S, 0, 0, actions, "format_strikeout" ); - connect( m_textBold, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setBold(bool)) ); - connect( m_textItalic, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setItalic(bool)) ); - connect( m_textUnderline, TQT_SIGNAL(toggled(bool)), TQT_SLOT(setUnderline(bool)) ); - connect( m_textStrikeOut, TQT_SIGNAL(toggled(bool)), TQT_SLOT(textStrikeOut(bool)) ); + connect( m_textBold, TQ_SIGNAL(toggled(bool)), TQ_SLOT(setBold(bool)) ); + connect( m_textItalic, TQ_SIGNAL(toggled(bool)), TQ_SLOT(setItalic(bool)) ); + connect( m_textUnderline, TQ_SIGNAL(toggled(bool)), TQ_SLOT(setUnderline(bool)) ); + connect( m_textStrikeOut, TQ_SIGNAL(toggled(bool)), TQ_SLOT(textStrikeOut(bool)) ); m_textAlignLeft = new TDEToggleAction( i18n("Align Left"), "format-text-direction-ltr", ALT + Key_L, - TQT_TQOBJECT(this), TQT_SLOT(textAlignLeft()), + this, TQ_SLOT(textAlignLeft()), actions, "format_alignleft" ); m_textAlignLeft->setChecked( true ); // just a dummy, will be updated later m_textAlignCenter = new TDEToggleAction( i18n("Align Center"), "text_center", ALT + Key_C, - TQT_TQOBJECT(this), TQT_SLOT(textAlignCenter()), + this, TQ_SLOT(textAlignCenter()), actions, "format_aligncenter" ); m_textAlignRight = new TDEToggleAction( i18n("Align Right"), "format-text-direction-rtl", ALT + Key_R, - TQT_TQOBJECT(this), TQT_SLOT(textAlignRight()), + this, TQ_SLOT(textAlignRight()), actions, "format_alignright" ); m_textAlignBlock = new TDEToggleAction( i18n("Align Block"), "text_block", ALT + Key_B, - TQT_TQOBJECT(this), TQT_SLOT(textAlignBlock()), + this, TQ_SLOT(textAlignBlock()), actions, "format_alignblock" ); m_textAlignLeft->setExclusiveGroup( "align" ); @@ -102,16 +102,16 @@ KNoteEdit::KNoteEdit( TDEActionCollection *actions, TQWidget *parent, const char m_textAlignBlock->setExclusiveGroup( "align" ); m_textList = new TDEToggleAction( i18n("List"), "enum_list", 0, - TQT_TQOBJECT(this), TQT_SLOT(textList()), + this, TQ_SLOT(textList()), actions, "format_list" ); m_textList->setExclusiveGroup( "style" ); m_textSuper = new TDEToggleAction( i18n("Superscript"), "text_super", 0, - TQT_TQOBJECT(this), TQT_SLOT(textSuperScript()), + this, TQ_SLOT(textSuperScript()), actions, "format_super" ); m_textSub = new TDEToggleAction( i18n("Subscript"), "text_sub", 0, - TQT_TQOBJECT(this), TQT_SLOT(textSubScript()), + this, TQ_SLOT(textSubScript()), actions, "format_sub" ); m_textSuper->setExclusiveGroup( "valign" ); @@ -120,38 +120,38 @@ KNoteEdit::KNoteEdit( TDEActionCollection *actions, TQWidget *parent, const char // There is no easy possibility to implement text indenting with TQTextEdit // // m_textIncreaseIndent = new TDEAction( i18n("Increase Indent"), "format_increaseindent", 0, -// TQT_TQOBJECT(this), TQT_SLOT(textIncreaseIndent()), +// this, TQ_SLOT(textIncreaseIndent()), // actions, "format_increaseindent" ); // // m_textDecreaseIndent = new TDEAction( i18n("Decrease Indent"), "format_decreaseindent", 0, -// TQT_TQOBJECT(this), TQT_SLOT(textDecreaseIndent()), +// this, TQ_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 TDEAction( i18n("Text Color..."), pix, 0, TQT_TQOBJECT(this), - TQT_SLOT(textColor()), actions, "format_color" ); + m_textColor = new TDEAction( i18n("Text Color..."), pix, 0, this, + TQ_SLOT(textColor()), actions, "format_color" ); m_textFont = new TDEFontAction( i18n("Text Font"), "text", KKey(), actions, "format_font" ); - connect( m_textFont, TQT_SIGNAL(activated( const TQString & )), - TQT_TQOBJECT(this), TQT_SLOT(setFamily( const TQString & )) ); + connect( m_textFont, TQ_SIGNAL(activated( const TQString & )), + this, TQ_SLOT(setFamily( const TQString & )) ); m_textSize = new TDEFontSizeAction( i18n("Text Size"), KKey(), actions, "format_size" ); - connect( m_textSize, TQT_SIGNAL(fontSizeChanged( int )), - TQT_TQOBJECT(this), TQT_SLOT(setPointSize( int )) ); + connect( m_textSize, TQ_SIGNAL(fontSizeChanged( int )), + this, TQ_SLOT(setPointSize( int )) ); // TQTextEdit connections - connect( this, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed()) ); - connect( this, TQT_SIGNAL(currentFontChanged( const TQFont & )), - TQT_TQOBJECT(this), TQT_SLOT(fontChanged( const TQFont & )) ); - connect( this, TQT_SIGNAL(currentColorChanged( const TQColor & )), - TQT_TQOBJECT(this), TQT_SLOT(colorChanged( const TQColor & )) ); - connect( this, TQT_SIGNAL(currentAlignmentChanged( int )), - TQT_TQOBJECT(this), TQT_SLOT(alignmentChanged( int )) ); - connect( this, TQT_SIGNAL(currentVerticalAlignmentChanged( VerticalAlignment )), - TQT_TQOBJECT(this), TQT_SLOT(verticalAlignmentChanged( VerticalAlignment )) ); + connect( this, TQ_SIGNAL(returnPressed()), TQ_SLOT(slotReturnPressed()) ); + connect( this, TQ_SIGNAL(currentFontChanged( const TQFont & )), + this, TQ_SLOT(fontChanged( const TQFont & )) ); + connect( this, TQ_SIGNAL(currentColorChanged( const TQColor & )), + this, TQ_SLOT(colorChanged( const TQColor & )) ); + connect( this, TQ_SIGNAL(currentAlignmentChanged( int )), + this, TQ_SLOT(alignmentChanged( int )) ); + connect( this, TQ_SIGNAL(currentVerticalAlignmentChanged( VerticalAlignment )), + this, TQ_SLOT(verticalAlignmentChanged( VerticalAlignment )) ); } KNoteEdit::~KNoteEdit() @@ -541,13 +541,13 @@ TQPopupMenu *KNoteEdit::createPopupMenu( const TQPoint &pos ) menu->insertSeparator(); id = menu->insertItem( SmallIconSet( "tools-check-spelling" ), i18n( "Check Spelling..." ), - TQT_TQOBJECT(this), TQT_SLOT( checkSpelling() ) ); + this, TQ_SLOT( checkSpelling() ) ); if( text().isEmpty() ) menu->setItemEnabled( id, false ); menu->insertSeparator(); - id=menu->insertItem(i18n("Allow Tabulations"),this,TQT_SLOT(slotAllowTab())); + id=menu->insertItem(i18n("Allow Tabulations"),this,TQ_SLOT(slotAllowTab())); menu->setItemChecked(id, !tabChangesFocus()); } diff --git a/knotes/knoteedit.h b/knotes/knoteedit.h index caa2c51a..259cba82 100644 --- a/knotes/knoteedit.h +++ b/knotes/knoteedit.h @@ -37,7 +37,7 @@ class TDEFontSizeAction; class KNoteEdit : public KTextEdit { - Q_OBJECT + TQ_OBJECT public: KNoteEdit( TDEActionCollection *actions, TQWidget *parent=0, const char *name=0 ); diff --git a/knotes/knotehostdlg.cpp b/knotes/knotehostdlg.cpp index 9d8fff97..c840dae4 100644 --- a/knotes/knotehostdlg.cpp +++ b/knotes/knotehostdlg.cpp @@ -38,8 +38,8 @@ #include <kdebug.h> #include <tdeglobal.h> #include <tdelocale.h> -#include <kstandarddirs.h> -#include <ksimpleconfig.h> +#include <tdestandarddirs.h> +#include <tdesimpleconfig.h> #include <kcombobox.h> #include "knotehostdlg.h" @@ -60,8 +60,8 @@ KNoteHostDlg::KNoteHostDlg( const TQString &caption, TQWidget *parent, const cha m_hostCombo->setHistoryItems( KNotesGlobalConfig::knownHosts(), true ); m_hostCombo->setFocus(); //m_hostCombo->completionObject()->setItems( KNotesGlobalConfig::hostCompletions() ); - connect( m_hostCombo->lineEdit(), TQT_SIGNAL( textChanged ( const TQString & ) ), - this, TQT_SLOT( slotTextChanged( const TQString & ) ) ); + connect( m_hostCombo->lineEdit(), TQ_SIGNAL( textChanged ( const TQString & ) ), + this, TQ_SLOT( slotTextChanged( const TQString & ) ) ); slotTextChanged( m_hostCombo->lineEdit()->text() ); } diff --git a/knotes/knotehostdlg.h b/knotes/knotehostdlg.h index 03a83dcb..81afc6c5 100644 --- a/knotes/knotehostdlg.h +++ b/knotes/knotehostdlg.h @@ -43,7 +43,7 @@ class KHistoryCombo; */ class KNoteHostDlg : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: KNoteHostDlg( const TQString& caption, TQWidget *parent=0, const char *name=0 ); diff --git a/knotes/knotes.desktop b/knotes/knotes.desktop index 22787783..b94a1171 100644 --- a/knotes/knotes.desktop +++ b/knotes/knotes.desktop @@ -5,86 +5,10 @@ Icon=knotes Terminal=false Type=Application -GenericName=Popup Notes -GenericName[af]=Opspring Notas -GenericName[ar]=الملاحظات المنبثقة -GenericName[bg]=Лепящи се бележки -GenericName[bs]=Popup bilješke -GenericName[ca]=Notes emergents -GenericName[cs]=Vyskakovací poznámky -GenericName[cy]=Naid-nodiadau -GenericName[da]=Popop-noter -GenericName[de]=Haftnotizen -GenericName[el]=Αναδυόμενες σημειώσεις -GenericName[eo]=Glunotoj -GenericName[es]=Notas emergentes -GenericName[et]=Hüpikmärkmed -GenericName[eu]=Laster-lehio oharrak -GenericName[fa]=یادداشتهای بالاپر -GenericName[fi]=Muistilaput -GenericName[fr]=Éditeur de petites notes -GenericName[fy]=Notysjes -GenericName[gl]=Notas Emerxentes -GenericName[he]=פתקים מוקפצים -GenericName[hi]=पॉप-अप टीप -GenericName[hr]=Skočne bilješke -GenericName[hu]=Jegyzettömb -GenericName[is]=Litlir gulir miðar -GenericName[it]=Note a comparsa -GenericName[ja]=ポップアップメモ -GenericName[kk]=Қалқымалы жазбалар -GenericName[km]=ចំណាំលេចឡើង -GenericName[lt]=Pastabos lapeliuose -GenericName[lv]=Izlecošās Piezīmes -GenericName[mk]=Скок-белешки -GenericName[ms]=Nota Popup -GenericName[mt]=Noti żgħar -GenericName[nb]=Sprettopp-notater -GenericName[nds]=Opduk-Notizen -GenericName[ne]=पपअप टिपोट -GenericName[nl]=Notities -GenericName[nn]=Sprettoppnotat -GenericName[nso]=Ditshwao tsa Thlarogo -GenericName[pl]=Żółte karteczki -GenericName[pt]=Notas -GenericName[pt_BR]=Notas instantâneas -GenericName[ro]=Notiţe personale -GenericName[ru]=Всплывающие заметки -GenericName[sk]=Vyskakujúce poznámky -GenericName[sl]=Prilepljajoče se notice -GenericName[sr]=Искачуће напомене -GenericName[sr@Latn]=Iskačuće napomene -GenericName[sv]=Anteckningslappar -GenericName[ta]=தோன்றும் குறிப்புகள் -GenericName[tg]=Хабарҳои ошкоршаванда -GenericName[th]=บันทึกช่วยจำแบบป๊อพอัพ -GenericName[tr]=Seyyar Notlar -GenericName[uk]=Вигулькні нотатки -GenericName[vi]=Ghi chép Popup -GenericName[xh]=Ivelisa iincwadana -GenericName[zh_CN]=弹出式记事本 -GenericName[zh_TW]=彈出式筆記本 -GenericName[zu]=Amapheshana Abhaliwe Aziphumelayo - -Name=KNotes -Name[af]=Knotas -Name[be]=K Нататкі -Name[cy]=KNodiadau -Name[eo]=Notoj -Name[hi]=के-नोट्स -Name[hr]=Bilješka -Name[lv]=KPiezīmes -Name[mk]=КБелешки -Name[ne]=केडीई टिपोट -Name[nso]=KDitshwao -Name[pl]=Notatki -Name[ro]=Notiţe -Name[sl]=KNotice -Name[sv]=Knotes -Name[ta]=கேகுறிப்புகள் -Name[th]=บันทึกช่วยจำ -Name[zh_TW]=KNotes 便利貼 - X-TDE-StartupNotify=true X-DCOP-ServiceType=Unique Categories=Qt;TDE;Utility;X-TDE-Utilities-Desktop; + +Name=KNotes + +GenericName=Popup Notes diff --git a/knotes/knotes_manager.desktop b/knotes/knotes_manager.desktop index bf962a93..c6e80eb4 100644 --- a/knotes/knotes_manager.desktop +++ b/knotes/knotes_manager.desktop @@ -1,60 +1,6 @@ [Desktop Entry] Name=Notes -Name[af]=Notas -Name[ar]=الملاحظات -Name[be]=Нататкі -Name[bg]=Бележки -Name[br]=Notennoù -Name[bs]=Bilješke -Name[cs]=Poznámky -Name[cy]=Nodiadau -Name[da]=Noter -Name[de]=Notizen -Name[el]=Σημειώσεις -Name[eo]=Notoj -Name[es]=Notas -Name[et]=Märkmed -Name[eu]=Oharrak -Name[fa]=یادداشتها -Name[fi]=Muistio -Name[fy]=Notysjes -Name[ga]=Nótaí -Name[gl]=Notas -Name[he]=פתקים -Name[hi]=टीप -Name[hu]=Feljegyzések -Name[is]=Minnismiðar -Name[it]=Note -Name[ja]=メモ -Name[kk]=Жазбалар -Name[km]=ចំណាំ -Name[lt]=Užrašai -Name[mk]=Белешки -Name[ms]=Nota -Name[nds]=Notizen -Name[ne]=टिपोट -Name[nl]=Notities -Name[nn]=Notat -Name[pl]=Notatki -Name[pt]=Notas -Name[pt_BR]=Notas -Name[ro]=Notiţe -Name[ru]=Заметки -Name[se]=Nohtat -Name[sk]=Poznámky -Name[sl]=Notice -Name[sr]=Белешке -Name[sr@Latn]=Beleške -Name[sv]=Anteckningar -Name[ta]=குறிப்புகள் -Name[tg]=Ахборот -Name[th]=บันทึกช่วยจำ -Name[tr]=Notlar -Name[uk]=Примітки -Name[uz]=Ёзма хотира -Name[zh_CN]=便笺 -Name[zh_TW]=備忘錄 + Type=Service X-TDE-ServiceTypes=TDEResources/Manager - X-TDE-ResourceFamily=notes diff --git a/knotes/knotesalarm.cpp b/knotes/knotesalarm.cpp index c2d1bd1c..99f05cd9 100644 --- a/knotes/knotesalarm.cpp +++ b/knotes/knotesalarm.cpp @@ -49,7 +49,7 @@ KNotesAlarm::KNotesAlarm( KNotesResourceManager *manager, TQObject *parent, cons { // TODO: fix timezone stuff? - connect( &m_checkTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAlarms()) ); + connect( &m_checkTimer, TQ_SIGNAL(timeout()), TQ_SLOT(checkAlarms()) ); m_checkTimer.start( 1000 * KNotesGlobalConfig::self()->checkInterval() ); // interval in seconds } diff --git a/knotes/knotesalarm.h b/knotes/knotesalarm.h index 84bfff50..c173f880 100644 --- a/knotes/knotesalarm.h +++ b/knotes/knotesalarm.h @@ -44,7 +44,7 @@ namespace KCal { class KNotesAlarm : public TQObject { - Q_OBJECT + TQ_OBJECT public: KNotesAlarm( KNotesResourceManager *manager, TQObject *parent = 0, const char *name = 0 ); diff --git a/knotes/knotesapp.cpp b/knotes/knotesapp.cpp index 4590e704..aa322df3 100644 --- a/knotes/knotesapp.cpp +++ b/knotes/knotesapp.cpp @@ -29,14 +29,14 @@ #include <ksystemtray.h> #include <tdelocale.h> #include <kiconeffect.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdepopupmenu.h> #include <khelpmenu.h> #include <kfind.h> #include <kfinddialog.h> #include <kkeydialog.h> -#include <kglobalaccel.h> -#include <ksimpleconfig.h> +#include <tdeglobalaccel.h> +#include <tdesimpleconfig.h> #include <twin.h> #include <kbufferedsocket.h> #include <kserversocket.h> @@ -65,7 +65,7 @@ public: { m_keyChooser = new KKeyChooser( globals, this ); setMainWidget( m_keyChooser ); - connect( this, TQT_SIGNAL(defaultClicked()), m_keyChooser, TQT_SLOT(allDefault()) ); + connect( this, TQ_SIGNAL(defaultClicked()), m_keyChooser, TQ_SLOT(allDefault()) ); } void insert( TDEActionCollection *actions ) @@ -96,7 +96,7 @@ KNotesApp::KNotesApp() : DCOPObject("KNotesIface"), TQLabel( 0, 0, WType_TopLevel ), m_alarm( 0 ), m_listener( 0 ), m_find( 0 ), m_findPos( 0 ) { - connect( kapp, TQT_SIGNAL(lastWindowClosed()), kapp, TQT_SLOT(quit()) ); + connect( tdeApp, TQ_SIGNAL(lastWindowClosed()), tdeApp, TQ_SLOT(quit()) ); m_noteList.setAutoDelete( true ); m_noteActions.setAutoDelete( true ); @@ -112,25 +112,25 @@ KNotesApp::KNotesApp() // create the GUI... new TDEAction( i18n("New Note"), "document-new", 0, - TQT_TQOBJECT(this), TQT_SLOT(newNote()), actionCollection(), "new_note" ); + this, TQ_SLOT(newNote()), actionCollection(), "new_note" ); new TDEAction( i18n("New Note From Clipboard"), "edit-paste", 0, - TQT_TQOBJECT(this), TQT_SLOT(newNoteFromClipboard()), actionCollection(), "new_note_clipboard" ); + this, TQ_SLOT(newNoteFromClipboard()), actionCollection(), "new_note_clipboard" ); new TDEAction( i18n("Show All Notes"), "knotes", 0, - TQT_TQOBJECT(this), TQT_SLOT(showAllNotes()), actionCollection(), "show_all_notes" ); + this, TQ_SLOT(showAllNotes()), actionCollection(), "show_all_notes" ); new TDEAction( i18n("Hide All Notes"), "window-close", 0, - TQT_TQOBJECT(this), TQT_SLOT(hideAllNotes()), actionCollection(), "hide_all_notes" ); - new KHelpMenu( this, kapp->aboutData(), false, actionCollection() ); + this, TQ_SLOT(hideAllNotes()), actionCollection(), "hide_all_notes" ); + new KHelpMenu( this, tdeApp->aboutData(), false, 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() ); + m_findAction = KStdAction::find( this, TQ_SLOT(slotOpenFindDialog()), actionCollection() ); + KStdAction::preferences( this, TQ_SLOT(slotPreferences()), actionCollection() ); + KStdAction::keyBindings( this, TQ_SLOT(slotConfigureAccels()), actionCollection() ); //FIXME: no shortcut removing!? - KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actionCollection() )->setShortcut( 0 ); + KStdAction::quit( this, TQ_SLOT(slotQuit()), actionCollection() )->setShortcut( 0 ); setXMLFile( instance()->instanceName() + "appui.rc" ); m_guiBuilder = new KXMLGUIBuilder( this ); - m_guiFactory = new KXMLGUIFactory( m_guiBuilder, TQT_TQOBJECT(this) ); + m_guiFactory = new KXMLGUIFactory( m_guiBuilder, this ); m_guiFactory->addClient( this ); m_context_menu = static_cast<TDEPopupMenu*>(m_guiFactory->container( "knotes_context", this )); @@ -147,19 +147,19 @@ KNotesApp::KNotesApp() m_noteGUI.setContent( doc ); // create accels for global shortcuts - m_globalAccel = new TDEGlobalAccel( TQT_TQOBJECT(this), "global accel" ); + m_globalAccel = new TDEGlobalAccel( this, "global accel" ); m_globalAccel->insert( "global_new_note", i18n("New Note"), "", TDEShortcut(), TDEShortcut(), - TQT_TQOBJECT(this), TQT_SLOT(newNote()), true, true ); + this, TQ_SLOT(newNote()), true, true ); m_globalAccel->insert( "global_new_note_clipboard", i18n("New Note From Clipboard"), "", TDEShortcut(), TDEShortcut(), - TQT_TQOBJECT(this), TQT_SLOT(newNoteFromClipboard()), true, true ); + this, TQ_SLOT(newNoteFromClipboard()), true, true ); m_globalAccel->insert( "global_hide_all_notes", i18n("Hide All Notes"), "", TDEShortcut(), TDEShortcut(), - TQT_TQOBJECT(this), TQT_SLOT(hideAllNotes()), true, true ); + this, TQ_SLOT(hideAllNotes()), true, true ); m_globalAccel->insert( "global_show_all_notes", i18n("Show All Notes"), "", TDEShortcut(), TDEShortcut(), - TQT_TQOBJECT(this), TQT_SLOT(showAllNotes()), true, true ); + this, TQ_SLOT(showAllNotes()), true, true ); m_globalAccel->readSettings(); @@ -174,10 +174,10 @@ KNotesApp::KNotesApp() // create the resource manager m_manager = new KNotesResourceManager(); - connect( m_manager, TQT_SIGNAL(sigRegisteredNote( KCal::Journal * )), - this, TQT_SLOT(createNote( KCal::Journal * )) ); - connect( m_manager, TQT_SIGNAL(sigDeregisteredNote( KCal::Journal * )), - this, TQT_SLOT(killNote( KCal::Journal * )) ); + connect( m_manager, TQ_SIGNAL(sigRegisteredNote( KCal::Journal * )), + this, TQ_SLOT(createNote( KCal::Journal * )) ); + connect( m_manager, TQ_SIGNAL(sigDeregisteredNote( KCal::Journal * )), + this, TQ_SLOT(killNote( KCal::Journal * )) ); // read the notes m_manager->load(); @@ -196,15 +196,15 @@ 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, TQT_TQOBJECT(this) ); + m_alarm = new KNotesAlarm( m_manager, this ); // create the socket and possibly start listening for connections m_listener = new TDEServerSocket(); m_listener->setResolutionEnabled( true ); - connect( m_listener, TQT_SIGNAL(readyAccept()), TQT_SLOT(acceptConnection()) ); + connect( m_listener, TQ_SIGNAL(readyAccept()), TQ_SLOT(acceptConnection()) ); updateNetworkListener(); - if ( m_noteList.count() == 0 && !kapp->isRestored() ) + if ( m_noteList.count() == 0 && !tdeApp->isRestored() ) newNote(); updateNoteActions(); @@ -486,7 +486,7 @@ void KNotesApp::mousePressEvent( TQMouseEvent* e ) switch ( e->button() ) { - case Qt::LeftButton: + case TQt::LeftButton: if ( m_noteList.count() == 1 ) { TQDictIterator<KNote> it( m_noteList ); @@ -495,10 +495,10 @@ void KNotesApp::mousePressEvent( TQMouseEvent* e ) else if ( m_note_menu->count() > 0 ) m_note_menu->popup( e->globalPos() ); break; - case Qt::MidButton: + case TQt::MidButton: newNote(); break; - case Qt::RightButton: + case TQt::RightButton: m_context_menu->popup( e->globalPos() ); default: break; } @@ -509,7 +509,7 @@ void KNotesApp::mousePressEvent( TQMouseEvent* e ) void KNotesApp::slotShowNote() { // tell the WM to give this note focus - showNote( TQString::fromUtf8( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() ) ); + showNote( TQString::fromUtf8( sender()->name() ) ); } void KNotesApp::slotWalkThroughNotes() @@ -575,8 +575,8 @@ void KNotesApp::slotPreferences() // create a new preferences dialog... KNoteConfigDlg *dialog = new KNoteConfigDlg( 0, i18n("Settings"), this, "KNotes Settings" ); - connect( dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(updateNetworkListener()) ); - connect( dialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(updateStyle()) ); + connect( dialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(updateNetworkListener()) ); + connect( dialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(updateStyle()) ); dialog->show(); } @@ -629,7 +629,7 @@ void KNotesApp::slotQuit() (*it)->saveData(false); saveConfigs(); - kapp->quit(); + tdeApp->quit(); } @@ -657,14 +657,14 @@ void KNotesApp::createNote( KCal::Journal *journal ) KNote *newNote = new KNote( m_noteGUI, journal, 0, journal->uid().utf8() ); m_noteList.insert( newNote->noteId(), newNote ); - connect( newNote, TQT_SIGNAL(sigRequestNewNote()), TQT_SLOT(newNote()) ); - connect( newNote, TQT_SIGNAL(sigShowNextNote()), TQT_SLOT(slotWalkThroughNotes()) ); - connect( newNote, TQT_SIGNAL(sigKillNote( KCal::Journal* )), - TQT_SLOT(slotNoteKilled( KCal::Journal* )) ); - connect( newNote, TQT_SIGNAL(sigNameChanged()), TQT_SLOT(updateNoteActions()) ); - connect( newNote, TQT_SIGNAL(sigDataChanged(const TQString &)), TQT_SLOT(saveNotes(const TQString &)) ); - connect( newNote, TQT_SIGNAL(sigColorChanged()), TQT_SLOT(updateNoteActions()) ); - connect( newNote, TQT_SIGNAL(sigFindFinished()), TQT_SLOT(slotFindNext()) ); + connect( newNote, TQ_SIGNAL(sigRequestNewNote()), TQ_SLOT(newNote()) ); + connect( newNote, TQ_SIGNAL(sigShowNextNote()), TQ_SLOT(slotWalkThroughNotes()) ); + connect( newNote, TQ_SIGNAL(sigKillNote( KCal::Journal* )), + TQ_SLOT(slotNoteKilled( KCal::Journal* )) ); + connect( newNote, TQ_SIGNAL(sigNameChanged()), TQ_SLOT(updateNoteActions()) ); + connect( newNote, TQ_SIGNAL(sigDataChanged(const TQString &)), TQ_SLOT(saveNotes(const TQString &)) ); + connect( newNote, TQ_SIGNAL(sigColorChanged()), TQ_SLOT(updateNoteActions()) ); + connect( newNote, TQ_SIGNAL(sigFindFinished()), TQ_SLOT(slotFindNext()) ); // don't call this during startup for each and every loaded note if ( m_alarm ) @@ -693,8 +693,8 @@ void KNotesApp::acceptConnection() if ( s ) { KNotesNetworkReceiver *recv = new KNotesNetworkReceiver( s ); - connect( recv, TQT_SIGNAL(sigNoteReceived( const TQString &, const TQString & )), - TQT_TQOBJECT(this), TQT_SLOT(newNote( const TQString &, const TQString & )) ); + connect( recv, TQ_SIGNAL(sigNoteReceived( const TQString &, const TQString & )), + this, TQ_SLOT(newNote( const TQString &, const TQString & )) ); } } @@ -725,11 +725,11 @@ void KNotesApp::updateNoteActions() for ( TQDictIterator<KNote> it( m_noteList ); it.current(); ++it ) { TDEAction *action = new TDEAction( it.current()->name().replace("&", "&&"), - TDEShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotShowNote()), + TDEShortcut(), this, TQ_SLOT(slotShowNote()), (TQObject *)0, it.current()->noteId().utf8() ); TDEIconEffect effect; - TQPixmap icon = effect.apply( kapp->miniIcon(), TDEIconEffect::Colorize, 1, + TQPixmap icon = effect.apply( tdeApp->miniIcon(), TDEIconEffect::Colorize, 1, it.current()->paletteBackgroundColor(), false ); action->setIconSet( icon ); m_noteActions.append( action ); diff --git a/knotes/knotesapp.h b/knotes/knotesapp.h index 649b4b0b..a6acb034 100644 --- a/knotes/knotesapp.h +++ b/knotes/knotesapp.h @@ -55,7 +55,7 @@ namespace KNetwork { class KNotesApp : public TQLabel, public KSessionManaged, virtual public KXMLGUIClient, virtual public KNotesAppIface { - Q_OBJECT + TQ_OBJECT public: KNotesApp(); diff --git a/knotes/knoteslegacy.cpp b/knotes/knoteslegacy.cpp index fb832a5b..ebe3f3ae 100644 --- a/knotes/knoteslegacy.cpp +++ b/knotes/knoteslegacy.cpp @@ -29,8 +29,8 @@ #include <tdeapplication.h> #include <tdeglobal.h> #include <kurl.h> -#include <kstandarddirs.h> -#include <ksimpleconfig.h> +#include <tdestandarddirs.h> +#include <tdesimpleconfig.h> #include <tdeio/netaccess.h> #include <unistd.h> @@ -52,7 +52,7 @@ void KNotesLegacy::cleanUp() // remove old (KDE 1.x) local config file if it still exists TQString configfile = TDEGlobal::dirs()->saveLocation( "config" ) + "knotesrc"; if ( TQFile::exists( configfile ) ) { - KSimpleConfig *test = new KSimpleConfig( configfile ); + TDESimpleConfig *test = new TDESimpleConfig( configfile ); test->setGroup( "General" ); double version = test->readDoubleNumEntry( "version", 1.0 ); delete test; @@ -76,7 +76,7 @@ bool KNotesLegacy::convert( CalendarLocal *calendar ) for ( TQStringList::ConstIterator note = notes.constBegin(); note != notes.constEnd(); ++note ) { TQString file = noteDir.absFilePath( *note ); - KSimpleConfig* test = new KSimpleConfig( file ); + TDESimpleConfig* test = new TDESimpleConfig( file ); test->setGroup( "General" ); double version = test->readDoubleNumEntry( "version", 1.0 ); diff --git a/knotes/knotesnetrecv.cpp b/knotes/knotesnetrecv.cpp index 48bb791f..d1ae1237 100644 --- a/knotes/knotesnetrecv.cpp +++ b/knotes/knotesnetrecv.cpp @@ -70,15 +70,15 @@ KNotesNetworkReceiver::KNotesNetworkReceiver( TDEBufferedSocket *s ) .arg( date ); // Setup the communications - connect( m_sock, TQT_SIGNAL(readyRead()), TQT_SLOT(slotDataAvailable()) ); - connect( m_sock, TQT_SIGNAL(closed()), TQT_SLOT(slotConnectionClosed()) ); - connect( m_sock, TQT_SIGNAL(gotError( int )), TQT_SLOT(slotError( int )) ); + connect( m_sock, TQ_SIGNAL(readyRead()), TQ_SLOT(slotDataAvailable()) ); + connect( m_sock, TQ_SIGNAL(closed()), TQ_SLOT(slotConnectionClosed()) ); + connect( m_sock, TQ_SIGNAL(gotError( int )), TQ_SLOT(slotError( int )) ); m_sock->enableRead( true ); // Setup the timer m_timer = new TQTimer( this, "m_timer" ); - connect( m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotReceptionTimeout()) ); + connect( m_timer, TQ_SIGNAL(timeout()), TQ_SLOT(slotReceptionTimeout()) ); m_timer->start( MAXTIME, true ); } diff --git a/knotes/knotesnetrecv.h b/knotes/knotesnetrecv.h index 927abac8..85647fe2 100644 --- a/knotes/knotesnetrecv.h +++ b/knotes/knotesnetrecv.h @@ -43,7 +43,7 @@ namespace KNetwork { class KNotesNetworkReceiver : public TQObject { - Q_OBJECT + TQ_OBJECT public: KNotesNetworkReceiver( KNetwork::TDEBufferedSocket * ); diff --git a/knotes/knotesnetsend.cpp b/knotes/knotesnetsend.cpp index 26d2b8f7..55dc75c3 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!!! - QObject::connect( TQT_TQOBJECT(this), TQT_SIGNAL(connected( const KResolverEntry& )), - TQT_SLOT(slotConnected( const KResolverEntry& )) ); - 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()) ); + TQObject::connect( this, TQ_SIGNAL(connected( const KResolverEntry& )), + TQ_SLOT(slotConnected( const KResolverEntry& )) ); + TQObject::connect( this, TQ_SIGNAL(gotError( int )), TQ_SLOT(slotError( int )) ); + TQObject::connect( this, TQ_SIGNAL(closed()), TQ_SLOT(slotClosed()) ); + TQObject::connect( this, TQ_SIGNAL(readyWrite()), TQ_SLOT(slotReadyWrite()) ); } void KNotesNetworkSender::setSenderId( const TQString& sender ) diff --git a/knotes/knotesnetsend.h b/knotes/knotesnetsend.h index ba867911..7d7c6dad 100644 --- a/knotes/knotesnetsend.h +++ b/knotes/knotesnetsend.h @@ -42,7 +42,7 @@ using namespace KNetwork; class KNotesNetworkSender : public KNetwork::TDEBufferedSocket { - Q_OBJECT + TQ_OBJECT public: KNotesNetworkSender( const TQString& host, int port ); diff --git a/knotes/local.desktop b/knotes/local.desktop index d0512ca0..f3b2743a 100644 --- a/knotes/local.desktop +++ b/knotes/local.desktop @@ -1,58 +1,8 @@ [Desktop Entry] Name=Notes in Local File -Name[af]=Notas in plaaslike lêer -Name[ar]=الملاحظات في الملف المحلّي -Name[be]=Нататкі ў лякальным файле -Name[bg]=Бележки в локален файл -Name[br]=Notennoù e rstr lec'hel -Name[bs]=Bilješke u lokalnoj datoteci -Name[ca]=Notes en fitxer local -Name[cs]=Poznámky v lokálním souboru -Name[da]=Noter i lokal fil -Name[de]=Notizen in lokaler Datei -Name[el]=Σημειώσεις σε τοπικό αρχείο -Name[eo]=Notoj en loka dosiero -Name[es]=Avisos sobre el archivo local -Name[et]=Märkmed kohalikus failis -Name[eu]=Oharrak fitxategi lokalean -Name[fa]=یادداشتها در پروندۀ محلی -Name[fi]=Muistiot paikallisessa tiedostossa -Name[fr]=Notes dans un fichier local -Name[fy]=Notysjes yn lokale triem -Name[ga]=Nótaí i gComhad Logánta -Name[gl]=Notas en Ficheiro Local -Name[he]=פתקים בקובץ מקומי -Name[hu]=Helyi fájlban tárolt feljegyzések -Name[is]=Minnismiðar í staðbundinni skrá -Name[it]=Note in file locale -Name[ja]=ローカルファイルのメモ -Name[kk]=Жергілікті файлдағы жазбалар -Name[km]=ចំណាំក្នុងឯកសារមូលដ្ឋាន -Name[lt]=Užrašai vietinėje byloje -Name[mk]=Белешки во локална датотека -Name[ms]=Nota dalam fail setempat -Name[nb]=Notater i lokal fil -Name[nds]=Notizen in lokaal Datei -Name[ne]=स्थानीय फाइलका टिपोट -Name[nl]=Notities in lokaal bestand -Name[nn]=Notat i lokal fil -Name[pl]=Notatki w pliku lokalnym -Name[pt]=Notas num Ficheiro Local -Name[pt_BR]=Notas em Arquivo Local -Name[ru]=Заметки в локальном файле -Name[sk]=Poznámky v lokálnom súbore -Name[sl]=Notice v krajevni datoteki -Name[sr]=Забелешке у локалном фајлу -Name[sr@Latn]=Zabeleške u lokalnom fajlu -Name[sv]=Anteckningar i lokal fil -Name[ta]=உள் கோப்பில் உள்ள குறிப்புகள் -Name[tg]=Хабарҳо дар файли локалӣ -Name[tr]=Yerel Dosyadaki Notlar -Name[uk]=Нотатки у локальному файлі -Name[zh_CN]=本地文件中的便笺 -Name[zh_TW]=本地檔備忘錄 -X-TDE-Library=knotes_local + Type=Service +X-TDE-Library=knotes_local X-TDE-ServiceTypes=TDEResources/Plugin X-TDE-ResourceFamily=notes X-TDE-ResourceType=file diff --git a/knotes/main.cpp b/knotes/main.cpp index e809a8f7..5f045a38 100644 --- a/knotes/main.cpp +++ b/knotes/main.cpp @@ -18,7 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *******************************************************************/ -#include <kuniqueapplication.h> +#include <tdeuniqueapplication.h> #include <tdecmdlineargs.h> #include <tdeaboutdata.h> #include <tdelocale.h> @@ -48,7 +48,7 @@ void remove_sm_from_client_leader() TQWidget w; KXErrorHandler handler; // ignore X errors status = XGetWindowProperty( tqt_xdisplay(), w.winId(), atoms[ 0 ], 0, 10000, - FALSE, XA_WINDOW, &type, &format, + false, XA_WINDOW, &type, &format, &nitems, &extra, &data ); if (status == Success && !handler.error( false )) @@ -64,7 +64,7 @@ void remove_sm_from_client_leader() Application::Application() - : KUniqueApplication(), mMainWindow( 0 ) + : TDEUniqueApplication(), mMainWindow( 0 ) { } @@ -83,7 +83,7 @@ int Application::newInstance() else mMainWindow->newNote(); - return KUniqueApplication::newInstance(); + return TDEUniqueApplication::newInstance(); } int main( int argc, char* argv[] ) @@ -119,10 +119,10 @@ int main( int argc, char* argv[] ) TDECmdLineArgs::init( argc, argv, &aboutData ); - KUniqueApplication::addCmdLineOptions(); + TDEUniqueApplication::addCmdLineOptions(); Application app; - app.connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) ); + app.connect( &app, TQ_SIGNAL( lastWindowClosed() ), &app, TQ_SLOT( quit() ) ); remove_sm_from_client_leader(); diff --git a/knotes/main.h b/knotes/main.h index 7e7af105..7a1f4d1c 100644 --- a/knotes/main.h +++ b/knotes/main.h @@ -21,12 +21,12 @@ #ifndef MAIN_H #define MAIN_H -#include <kuniqueapplication.h> +#include <tdeuniqueapplication.h> class KNotesApp; -class Application : public KUniqueApplication +class Application : public TDEUniqueApplication { public: Application(); diff --git a/knotes/resourcelocal.cpp b/knotes/resourcelocal.cpp index e5d4d6e5..5f797ef9 100644 --- a/knotes/resourcelocal.cpp +++ b/knotes/resourcelocal.cpp @@ -33,7 +33,7 @@ #include <tdelocale.h> #include <tdemessagebox.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <libkcal/icalformat.h> diff --git a/knotes/resourcelocalconfig.h b/knotes/resourcelocalconfig.h index ab78cd68..680f5146 100644 --- a/knotes/resourcelocalconfig.h +++ b/knotes/resourcelocalconfig.h @@ -27,7 +27,7 @@ class KURLRequester; class ResourceLocalConfig : public KRES::ConfigWidget { - Q_OBJECT + TQ_OBJECT public: ResourceLocalConfig( TQWidget *parent = 0, const char *name = 0 ); diff --git a/knotes/resourcemanager.h b/knotes/resourcemanager.h index 423ee7a9..fc82b9a0 100644 --- a/knotes/resourcemanager.h +++ b/knotes/resourcemanager.h @@ -49,7 +49,7 @@ namespace KCal { class KNotesResourceManager : public TQObject, public KRES::ManagerObserver<ResourceNotes> { - Q_OBJECT + TQ_OBJECT public: KNotesResourceManager(); diff --git a/knotes/resourcenotes.h b/knotes/resourcenotes.h index d33b3423..8ac01f49 100644 --- a/knotes/resourcenotes.h +++ b/knotes/resourcenotes.h @@ -34,7 +34,7 @@ #define RESOURCENOTES_H #include <tderesources/resource.h> -#include <tdepimmacros.h> +#include <tdemacros.h> #include <libkcal/alarm.h> class TDEConfig; @@ -52,7 +52,7 @@ namespace KCal { * \warning This code is still under heavy development. Don't expect source or * binary compatibility in future versions. */ -class KDE_EXPORT ResourceNotes : public KRES::Resource +class TDE_EXPORT ResourceNotes : public KRES::Resource { public: ResourceNotes( const TDEConfig * ); |