Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
anonymous_namespace{main.cpp}::World Class Reference

The application the tools look at, and the changes made to it (the mutator). More...

Public Member Functions

 World (Random *random)
 Builds the starting application.
 World (const World &)=delete
World & operator= (const World &)=delete
 ~World ()
 Closes and destroys everything.
QString mutate ()
 Makes one random change, and says what it was.

Private Member Functions

QStandardItemModel * newModel ()
 A model of a few rows.
void prune ()
 Drops pointers to objects the tools deleted.
QWidget * container ()
 A container for a new widget: the main window or a dynamic window.
QString addWidget ()
 Adds a button, line edit or label to a container.
QString removeWidget ()
 Deletes a widget, at once or later.
QString reparentWidget ()
 Moves a widget to another container.
QString toggleVisible ()
 Shows or hides a widget.
QStandardItemModel * someModel ()
 A model that still exists, or nullptr.
QString addRows ()
 Inserts rows into a model.
QString removeRows ()
 Removes rows from a model.
QString resetModel ()
 Clears a model.
QString swapModel ()
 Gives a view, or the Quick list, another model.
QString addQuickItem ()
 Adds a Qt Quick item under the root or another item.
QString removeQuickItem ()
 Deletes a Qt Quick item, later.
QString window ()
 Opens a window, or closes or deletes one.
QString stall ()
 Blocks the main thread for a moment.

Private Attributes

Random * m_random
 Choices.
QPointer< QWidget > m_main
 The main window.
QVBoxLayout * m_layout = nullptr
 Its layout.
std::unique_ptr< QQuickView > m_quick
 The Qt Quick window.
QPointer< QObject > m_quickList
 Its ListView.
QList< QPointer< QWidget > > m_widgets
 Widgets added.
QList< QPointer< QWidget > > m_windows
 Windows opened.
QList< QPointer< QQuickItem > > m_items
 Quick items added.
QList< QPointer< QStandardItemModel > > m_models
 Models.
QList< QPointer< QAbstractItemView > > m_views
 Widget item views.
int m_counter = 0
 For unique names.

Detailed Description

The application the tools look at, and the changes made to it (the mutator).


The documentation for this class was generated from the following file:
  • tests/chaos/main.cpp