knotes
KNotesApp Class Reference
Inheritance diagram for KNotesApp:

Detailed Description
Definition at line 55 of file knotesapp.h.
Public Slots | |
QString | newNote (const QString &name=QString::null, const QString &text=QString::null) |
QString | newNoteFromClipboard (const QString &name=QString::null) |
void | hideAllNotes () const |
void | showAllNotes () const |
Public Member Functions | |
KNotesApp () | |
~KNotesApp () | |
void | showNote (const QString &id) const |
void | hideNote (const QString &id) const |
void | killNote (const QString &id) |
void | killNote (const QString &id, bool force) |
QString | name (const QString &id) const |
QString | text (const QString &id) const |
void | setName (const QString &id, const QString &newName) |
void | setText (const QString &id, const QString &newText) |
QString | fgColor (const QString &id) const |
QString | bgColor (const QString &id) const |
void | setColor (const QString &id, const QString &fgColor, const QString &bgColor) |
QMap< QString, QString > | notes () const |
int | width (const QString ¬eId) const |
int | height (const QString ¬eId) const |
void | move (const QString ¬eId, int x, int y) const |
void | resize (const QString ¬eId, int width, int height) const |
void | sync (const QString &app) |
bool | isNew (const QString &app, const QString &id) const |
bool | isModified (const QString &app, const QString &id) const |
bool | commitData (QSessionManager &) |
Protected Slots | |
void | slotShowNote () |
void | slotWalkThroughNotes () |
void | slotOpenFindDialog () |
void | slotFindNext () |
void | slotPreferences () |
void | slotConfigureAccels () |
void | slotNoteKilled (KCal::Journal *journal) |
void | slotQuit () |
Protected Member Functions | |
void | mousePressEvent (QMouseEvent *) |
Member Function Documentation
void KNotesApp::showNote | ( | const QString & | id | ) | const [virtual] |
Show a note as if it had been selected from the "notes" menu.
- Parameters:
-
noteId the id of the note to show
Implements KNotesAppIface.
Definition at line 278 of file knotesapp.cpp.
void KNotesApp::hideNote | ( | const QString & | id | ) | const [virtual] |
Hide a note.
- Parameters:
-
noteId the id of the note to hide
Implements KNotesAppIface.
Definition at line 287 of file knotesapp.cpp.
void KNotesApp::killNote | ( | const QString & | id | ) | [virtual] |
Deletes a note forever.
- Parameters:
-
noteId the id of the note to kill
Implements KNotesAppIface.
Definition at line 306 of file knotesapp.cpp.
void KNotesApp::killNote | ( | const QString & | id, | |
bool | force | |||
) | [virtual] |
Deletes a note forever.
- Parameters:
-
noteId the id of the note to kill force do not request confirmation
Implements KNotesAppIface.
Definition at line 296 of file knotesapp.cpp.
QString KNotesApp::name | ( | const QString & | id | ) | const [virtual] |
Returns the title/name of a note.
- Parameters:
-
noteId the id of the note in question
- Returns:
- the name as a QString
Implements KNotesAppIface.
Definition at line 322 of file knotesapp.cpp.
QString KNotesApp::text | ( | const QString & | id | ) | const [virtual] |
Returns the text of a note.
- Parameters:
-
noteId the id of the note in question
- Returns:
- the body as a QString
Implements KNotesAppIface.
Definition at line 331 of file knotesapp.cpp.
void KNotesApp::setName | ( | const QString & | id, | |
const QString & | newName | |||
) | [virtual] |
Changes the title/name of a note.
- Parameters:
-
noteId the id of the note to be modified newName the new title
Implements KNotesAppIface.
Definition at line 340 of file knotesapp.cpp.
void KNotesApp::setText | ( | const QString & | id, | |
const QString & | newText | |||
) | [virtual] |
Sets the text of a note.
This will delete the old text!
- Parameters:
-
noteId the id of the note newText the new text for the note
Implements KNotesAppIface.
Definition at line 349 of file knotesapp.cpp.
QString KNotesApp::fgColor | ( | const QString & | id | ) | const [virtual] |
Returns the foreground/text color of a note.
- Parameters:
-
noteId the id of the note in question
- Returns:
- the foreground/text color as a QString
Implements KNotesAppIface.
Definition at line 358 of file knotesapp.cpp.
QString KNotesApp::bgColor | ( | const QString & | id | ) | const [virtual] |
Returns the background color of a note.
- Parameters:
-
noteId the id of the note in question
- Returns:
- the background color as a QString
Implements KNotesAppIface.
Definition at line 367 of file knotesapp.cpp.
void KNotesApp::setColor | ( | const QString & | id, | |
const QString & | fgColor, | |||
const QString & | bgColor | |||
) | [virtual] |
Sets the color (foreground and background color) of a note.
- Parameters:
-
noteId the id of the note fgColor the new text color for the note bgColor the new background color for the note
Implements KNotesAppIface.
Definition at line 376 of file knotesapp.cpp.
QMap< QString, QString > KNotesApp::notes | ( | ) | const [virtual] |
Get all the notes including their ids.
- Returns:
- a QMap that maps the id of a note to its name
Implements KNotesAppIface.
Definition at line 311 of file knotesapp.cpp.
int KNotesApp::width | ( | const QString & | noteId | ) | const [virtual] |
Returns the width of a note.
- Parameters:
-
noteId the id of the note in question
- Returns:
- the width as a uint
Implements KNotesAppIface.
Definition at line 385 of file knotesapp.cpp.
int KNotesApp::height | ( | const QString & | noteId | ) | const [virtual] |
Returns the height of a note.
- Parameters:
-
noteId the id of the note in question
- Returns:
- the height as a uint
Implements KNotesAppIface.
Definition at line 394 of file knotesapp.cpp.
void KNotesApp::move | ( | const QString & | noteId, | |
int | x, | |||
int | y | |||
) | const [virtual] |
Repositions a note.
- Parameters:
-
noteId the id of the note to be moved x the new x-coordinate of the note y the new y-coordinate of the note
Implements KNotesAppIface.
Definition at line 403 of file knotesapp.cpp.
void KNotesApp::resize | ( | const QString & | noteId, | |
int | width, | |||
int | height | |||
) | const [virtual] |
Changes the size of a note.
- Parameters:
-
noteId the id of the note to be resized width the new width of the note height the new height of the note
Implements KNotesAppIface.
Definition at line 412 of file knotesapp.cpp.
void KNotesApp::sync | ( | const QString & | app | ) | [virtual] |
This tells KNotes that a specific app has synchronized with all the notes.
- Parameters:
-
app the app that has synced with KNotes
Implements KNotesAppIface.
Definition at line 421 of file knotesapp.cpp.
bool KNotesApp::isNew | ( | const QString & | app, | |
const QString & | id | |||
) | const [virtual] |
Test if a note was created new after the last sync.
- Parameters:
-
app the app that wants to get the status since the last sync noteId the id of the note
- Returns:
- true if the note is new, false if not or if the note does not exist
Implements KNotesAppIface.
Definition at line 429 of file knotesapp.cpp.
bool KNotesApp::isModified | ( | const QString & | app, | |
const QString & | id | |||
) | const [virtual] |
Test if a note was modified since the last sync.
- Parameters:
-
app the app that wants to get the status since the last sync noteId the id of the note
- Returns:
- true if modified (note that this will return true if the note is new as well!) and false if the note is not modified or doesn't exist
Implements KNotesAppIface.
Definition at line 438 of file knotesapp.cpp.
QString KNotesApp::newNote | ( | const QString & | name = QString::null , |
|
const QString & | text = QString::null | |||
) | [virtual, slot] |
Create a new note.
- Parameters:
-
name the name (title) of the new note, if it is empty, KNotes will choose an appropriate name text the body of the new note
- Returns:
- the new notes' id
Implements KNotesAppIface.
Definition at line 234 of file knotesapp.cpp.
QString KNotesApp::newNoteFromClipboard | ( | const QString & | name = QString::null |
) | [virtual, slot] |
Create a new note and inserts the current text in the clipboard as text.
- Parameters:
-
name the name (title) of the new note, if it is empty, KNotes will choose an appropriate name
- Returns:
- the new notes' id
Implements KNotesAppIface.
Definition at line 255 of file knotesapp.cpp.
void KNotesApp::hideAllNotes | ( | ) | const [virtual, slot] |
void KNotesApp::showAllNotes | ( | ) | const [virtual, slot] |
Show all notes on their respective desktops.
Implements KNotesAppIface.
Definition at line 268 of file knotesapp.cpp.
The documentation for this class was generated from the following files: