diff options
Diffstat (limited to 'knotes/knotesapp.cpp')
| -rw-r--r-- | knotes/knotesapp.cpp | 92 | 
1 files changed, 46 insertions, 46 deletions
| 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 ); | 
