Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
main.cpp File Reference

Notebook: a small note-taking application whose automation interface is done the way a release build should (notes/guide/release.md, design 0033). More...

#include "automation.h"
#include "notesstore.h"
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
#include <QtCore/QPointer>
#include <QtCore/QSettings>
#include <QtGui/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QDialog>
#include <QtWidgets/QDialogButtonBox>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QListWidget>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QMenuBar>
#include <QtWidgets/QMessageBox>
#include <QtWidgets/QPlainTextEdit>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QSplitter>
#include <QtWidgets/QStatusBar>
#include <QtWidgets/QVBoxLayout>

Classes

class  anonymous_namespace{main.cpp}::DialogAsker
 Asks the user with dialogs. More...
class  anonymous_namespace{main.cpp}::ClientsDialog
 The connected assistants, with a Disconnect button. More...
class  anonymous_namespace{main.cpp}::MainWindow
 The notebook's window. More...

Functions

QString anonymous_namespace{main.cpp}::clientLabel (const QString &name, const QString &version)
 "name version" of a client, as it says, or "An unnamed client".
QString anonymous_namespace{main.cpp}::peerLabel (const Sonde::SessionPeer &peer)
 What the operating system says about a client, for a person to read.
int main (int argc, char **argv)
 Starts Notebook, with its automation interface off unless the user turned it on.

Detailed Description

Notebook: a small note-taking application whose automation interface is done the way a release build should (notes/guide/release.md, design 0033).

  • Off by default. Settings > "Let AI assistants use this notebook" turns it on, and the choice is remembered; nothing in the environment turns it on.
  • Visible while on: the status bar says so, and how many assistants are connected. "Connected assistants..." lists them, with a Disconnect button.
  • Asks first: a dialog shows what an assistant says it is, and which program it runs in, before it can read anything.
  • Confirms what destroys data: note_delete waits for the user to agree, and every change an assistant makes can be undone (Edit > Undo).