26 #include <tqptrlist.h> 30 #include <tdeapplication.h> 31 #include <kxmlguiclient.h> 33 #include "KNotesAppIface.h" 44 class KNotesResourceManager; 51 class TDEServerSocket; 55 class KNotesApp : public TQLabel, public KSessionManaged, virtual public KXMLGUIClient, 56 virtual public KNotesAppIface 64 void showNote( const TQString& id ) const; 65 void hideNote( const TQString& id ) const; 67 void killNote( const TQString& id ); 68 void killNote( const TQString& id, bool force ); 70 TQString name( const TQString& id ) const; 71 TQString text( const TQString& id ) const; 73 void setName( const TQString& id, const TQString& newName ); 74 void setText( const TQString& id, const TQString& newText ); 76 TQString fgColor( const TQString& id ) const; 77 TQString bgColor( const TQString& id ) const; 79 void setColor( const TQString& id, const TQString& fgColor, 80 const TQString& bgColor ); 82 TQMap<TQString,TQString> notes() const; 84 int width( const TQString& noteId ) const; 85 int height( const TQString& noteId ) const; 87 void move( const TQString& noteId, int x, int y ) const; 88 void resize( const TQString& noteId, int width, int height ) const; 90 void sync( const TQString& app ); 91 bool isNew( const TQString& app, const TQString& id ) const; 92 bool isModified( const TQString& app, const TQString& id ) const; 93 TQDateTime getLastModified( const TQString& noteId ) const; 95 bool commitData( TQSessionManager& ); 98 TQString newNote( const TQString& name = TQString(), 99 const TQString& text = TQString() ); 100 TQString newNoteFromClipboard( const TQString& name = TQString() ); 102 void hideAllNotes() const; 103 void showAllNotes() const; 106 void mousePressEvent( TQMouseEvent* ); 107 void resizeEvent ( TQResizeEvent * ); 108 void showEvent ( TQShowEvent * ); 112 void slotWalkThroughNotes(); 114 void slotOpenFindDialog(); 117 void slotPreferences(); 118 void slotConfigureAccels(); 120 void slotNoteKilled( KCal::Journal *journal ); 125 void showNote( KNote *note ) const; 127 void resizeTrayIcon(); 130 void acceptConnection(); 132 void saveNotes( const TQString & uid ); 133 void updateNoteActions(); 134 void updateGlobalAccels(); 135 void updateNetworkListener(); 138 void createNote( KCal::Journal *journal ); 139 void killNote( KCal::Journal *journal ); 142 class KNoteActionList : public TQPtrList<TDEAction> 145 virtual int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 ); 148 KNotesResourceManager *m_manager; 150 KNotesAlarm *m_alarm; 151 KNetwork::TDEServerSocket *m_listener; 153 TQDict<KNote> m_noteList; 154 KNoteActionList m_noteActions; 157 TQDictIterator<KNote> *m_findPos; 159 TDEPopupMenu *m_note_menu; 160 TDEPopupMenu *m_context_menu; 162 TDEGlobalAccel *m_globalAccel; 163 KXMLGUIFactory *m_guiFactory; 164 KXMLGUIBuilder *m_guiBuilder; 166 TQDomDocument m_noteGUI; 167 TDEAction *m_findAction; 168 TQString m_noteUidModify;
|