Geometrize  1.0
An application for geometrizing images into geometric primitives
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | List of all members
geometrize::dialog::ScriptConsole Class Reference

The ScriptConsole class models a command line and output window. More...

#include <scriptconsole.h>

Inheritance diagram for geometrize::dialog::ScriptConsole:
Inheritance graph
[legend]
Collaboration diagram for geometrize::dialog::ScriptConsole:
Collaboration graph
[legend]

Classes

class  ScriptConsoleImpl
 

Public Member Functions

 ScriptConsole (QWidget *parent=nullptr)
 
virtual ~ScriptConsole ()
 
void setEngine (chaiscript::ChaiScript *engine)
 
std::vector< std::string > getHistory () const
 
void setHistory (const std::vector< std::string > &history)
 
void appendString (const std::string &str)
 appendString Appends a string to the console output window More...
 

Static Public Attributes

static const std::string launchConsoleHistoryFilename = "launch_console_command_history.json"
 The name of the console history settings file used by the console embedded in the launch window. More...
 

Protected Member Functions

void changeEvent (QEvent *) override
 

Private Attributes

std::unique_ptr< ScriptConsoleImpld
 

Detailed Description

The ScriptConsole class models a command line and output window.

Constructor & Destructor Documentation

◆ ScriptConsole()

geometrize::dialog::ScriptConsole::ScriptConsole ( QWidget *  parent = nullptr)
explicit
114  : QWidget(parent), d{std::make_unique<ScriptConsole::ScriptConsoleImpl>(this)}
115 {
116 }

◆ ~ScriptConsole()

geometrize::dialog::ScriptConsole::~ScriptConsole ( )
virtual
119 {
120 }

Member Function Documentation

◆ appendString()

void geometrize::dialog::ScriptConsole::appendString ( const std::string &  str)

appendString Appends a string to the console output window

Parameters
strThe string to append to the output window
138 {
139  d->append(QString::fromStdString(str));
140 }
Here is the caller graph for this function:

◆ changeEvent()

void geometrize::dialog::ScriptConsole::changeEvent ( QEvent *  event)
overrideprotected
143 {
144  if (event->type() == QEvent::LanguageChange) {
145  d->onLanguageChange();
146  }
147  QWidget::changeEvent(event);
148 }

◆ getHistory()

std::vector< std::string > geometrize::dialog::ScriptConsole::getHistory ( ) const
128 {
129  return d->getHistory();
130 }

◆ setEngine()

void geometrize::dialog::ScriptConsole::setEngine ( chaiscript::ChaiScript *  engine)
123 {
124  d->setEngine(engine);
125 }

◆ setHistory()

void geometrize::dialog::ScriptConsole::setHistory ( const std::vector< std::string > &  history)
133 {
134  d->setHistory(history);
135 }

Member Data Documentation

◆ d

std::unique_ptr<ScriptConsoleImpl> geometrize::dialog::ScriptConsole::d
private

◆ launchConsoleHistoryFilename

const std::string geometrize::dialog::ScriptConsole::launchConsoleHistoryFilename = "launch_console_command_history.json"
static

The name of the console history settings file used by the console embedded in the launch window.


The documentation for this class was generated from the following files:
geometrize::dialog::ScriptConsole::d
std::unique_ptr< ScriptConsoleImpl > d
Definition: scriptconsole.h:49