26 #include <tqptrlist.h>
30 #include <kapplication.h>
31 #include <kxmlguiclient.h>
33 #include "KNotesAppIface.h"
44 class KNotesResourceManager;
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 * );
110 void slotWalkThroughNotes();
112 void slotOpenFindDialog();
115 void slotPreferences();
116 void slotConfigureAccels();
118 void slotNoteKilled( KCal::Journal *journal );
123 void showNote( KNote *note ) const;
127 void acceptConnection();
129 void saveNotes( const TQString & uid );
130 void updateNoteActions();
131 void updateGlobalAccels();
132 void updateNetworkListener();
135 void createNote( KCal::Journal *journal );
136 void killNote( KCal::Journal *journal );
139 class KNoteActionList : public TQPtrList<KAction>
142 virtual int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 );
145 KNotesResourceManager *m_manager;
147 KNotesAlarm *m_alarm;
148 KNetwork::KServerSocket *m_listener;
150 TQDict<KNote> m_noteList;
151 KNoteActionList m_noteActions;
154 TQDictIterator<KNote> *m_findPos;
156 KPopupMenu *m_note_menu;
157 KPopupMenu *m_context_menu;
159 KGlobalAccel *m_globalAccel;
160 KXMLGUIFactory *m_guiFactory;
161 KXMLGUIBuilder *m_guiBuilder;
163 TQDomDocument m_noteGUI;
164 KAction *m_findAction;
165 TQString m_noteUidModify;
|