JeVois  1.18
JeVois Smart Embedded Machine Vision Toolkit
Share this page:

#include <jevois/GPU/GUIeditor.H>

Editor panel for JeVois-Pro GUI.

This panel allows one to select one of several files, and to edit it.

Definition at line 46 of file GUIeditor.H.

Inheritance diagram for jevois::GUIeditor:
Collaboration diagram for jevois::GUIeditor:

Public Member Functions

 GUIeditor (GUIhelper *helper, std::string const &imguiid, std::vector< EditorItem > &&fixeditems, std::string const &scanpath, std::string const &prefix, std::set< std::string > &&extensions)
 Constructor. More...
 
virtual ~GUIeditor ()
 Destructor. More...
 
void draw ()
 Draw the editor into ImGui. More...
 
void loadFile (std::filesystem::path const &fn, std::string const &failtxt)
 Load a file. More...
 
void saveFile ()
 Save a file. More...
 
void refresh ()
 Refresh list of files. More...
 

Related Functions

(Note that these are not member functions.)

enum  EditorSaveAction
 Helper enum for actions to execute after saving a config file. More...
 

Constructor & Destructor Documentation

◆ GUIeditor()

jevois::GUIeditor::GUIeditor ( GUIhelper helper,
std::string const &  imguiid,
std::vector< EditorItem > &&  fixeditems,
std::string const &  scanpath,
std::string const &  prefix,
std::set< std::string > &&  extensions 
)

Constructor.

Definition at line 31 of file GUIeditor.C.

References saveFile().

◆ ~GUIeditor()

jevois::GUIeditor::~GUIeditor ( )
virtual

Destructor.

Definition at line 46 of file GUIeditor.C.

Member Function Documentation

◆ draw()

void jevois::GUIeditor::draw ( )

Draw the editor into ImGui.

Definition at line 102 of file GUIeditor.C.

◆ loadFile()

void jevois::GUIeditor::loadFile ( std::filesystem::path const &  fn,
std::string const &  failtxt 
)

Load a file.

If the load fails, we can either display failtxt in the editor and make it read-only, or, if failtxt is empty, assume that we want to create a new file (e.g., module's params.cfg) and hence set the editor read-write.

Definition at line 339 of file GUIeditor.C.

References LINFO.

◆ refresh()

void jevois::GUIeditor::refresh ( )

Refresh list of files.

Definition at line 50 of file GUIeditor.C.

References jevois::absolutePath().

◆ saveFile()

void jevois::GUIeditor::saveFile ( )

Save a file.

Definition at line 375 of file GUIeditor.C.

References LINFO.

Referenced by GUIeditor().

Friends And Related Function Documentation

◆ EditorSaveAction

enum EditorSaveAction
related

Helper enum for actions to execute after saving a config file.

Definition at line 34 of file GUIeditor.H.


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