Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
NotesStore Class Reference

The notes, in order, changed only through undoable commands, so a change made by an AI assistant can be undone like one made by hand. More...

#include <notesstore.h>

Inheritance diagram for NotesStore:

Public Member Functions

 NotesStore (QObject *parent=nullptr)
 An empty notebook.
const QList< Note > & notes () const
 The notes, in order.
qsizetype indexOf (const QString &title) const
 The index of the note titled title, or -1.
QUndoStack * undoStack ()
 The undo stack (for the Edit menu).
void append (const QString &title, const QString &text)
 Adds a note, or appends text to the note titled title. Undoable.
bool remove (const QString &title)
 Deletes the note titled title. Undoable.
void changed ()
 The notes changed.

Private Attributes

QList< Note > m_notes
 The notes, in order.
QUndoStack m_undo
 Every change, for undo.

Friends

class AppendCommand
class RemoveCommand

Detailed Description

The notes, in order, changed only through undoable commands, so a change made by an AI assistant can be undone like one made by hand.

Member Function Documentation

◆ remove()

bool NotesStore::remove ( const QString & title)

Deletes the note titled title. Undoable.

Returns
Whether there was one.

The documentation for this class was generated from the following files: