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;
94 bool commitData( TQSessionManager& );
97 TQString newNote( const TQString& name = TQString(),
98 const TQString& text = TQString() );
99 TQString newNoteFromClipboard( const TQString& name = TQString() );
101 void hideAllNotes() const;
102 void showAllNotes() const;
105 void mousePressEvent( TQMouseEvent* );
106 void resizeEvent ( TQResizeEvent * );
107 void showEvent ( TQShowEvent * );
111 void slotWalkThroughNotes();
113 void slotOpenFindDialog();
116 void slotPreferences();
117 void slotConfigureAccels();
119 void slotNoteKilled( KCal::Journal *journal );
124 void showNote( KNote *note ) const;
126 void resizeTrayIcon();
129 void acceptConnection();
131 void saveNotes( const TQString & uid );
132 void updateNoteActions();
133 void updateGlobalAccels();
134 void updateNetworkListener();
137 void createNote( KCal::Journal *journal );
138 void killNote( KCal::Journal *journal );
141 class KNoteActionList : public TQPtrList<TDEAction>
144 virtual int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 );
147 KNotesResourceManager *m_manager;
149 KNotesAlarm *m_alarm;
150 KNetwork::TDEServerSocket *m_listener;
152 TQDict<KNote> m_noteList;
153 KNoteActionList m_noteActions;
156 TQDictIterator<KNote> *m_findPos;
158 TDEPopupMenu *m_note_menu;
159 TDEPopupMenu *m_context_menu;
161 TDEGlobalAccel *m_globalAccel;
162 KXMLGUIFactory *m_guiFactory;
163 KXMLGUIBuilder *m_guiBuilder;
165 TQDomDocument m_noteGUI;
166 TDEAction *m_findAction;
167 TQString m_noteUidModify;
|