Engauge Digitizer 2
Loading...
Searching...
No Matches
FileCmdAbstract Class Referenceabstract

Base class for 'file commands' that are used specifically for regression testing of file import/open/export features. More...

#include <FileCmdAbstract.h>

Inheritance diagram for FileCmdAbstract:
Inheritance graph
Collaboration diagram for FileCmdAbstract:
Collaboration graph

Public Member Functions

 FileCmdAbstract (const QString &cmdDescription)
 Single constructor.
virtual ~FileCmdAbstract ()
virtual void redo (MainWindow &mainWindow)=0
 Apply this command, through MainWindow.

Protected Member Functions

QString cmdDescription () const
 Command description for logging.

Detailed Description

Base class for 'file commands' that are used specifically for regression testing of file import/open/export features.

These commands operate outside of the normal undo/redo command framework, since that framework uses commands that are attached to an open Document. The file commands follow special rules:

  1. Never generated by the code
  2. Created by manually editing a 'file command' xml file, which does NOT have a Document (so error report files cannot be used unless pretty much everything is removed)
  3. Are only read during regression testing normally. Although they can be loaded otherwise, there is no point in doing so
  4. These commands operate in the forward direction only, since undoing a File Close could be quite messy

Definition at line 22 of file FileCmdAbstract.h.

Constructor & Destructor Documentation

◆ FileCmdAbstract()

FileCmdAbstract::FileCmdAbstract ( const QString & cmdDescription)

Single constructor.

Definition at line 12 of file FileCmdAbstract.cpp.

12 :
13 m_cmdDescription (cmdDescription)
14{
15}
QString cmdDescription() const
Command description for logging.

◆ ~FileCmdAbstract()

FileCmdAbstract::~FileCmdAbstract ( )
virtual

Definition at line 17 of file FileCmdAbstract.cpp.

18{
19}

Member Function Documentation

◆ cmdDescription()

QString FileCmdAbstract::cmdDescription ( ) const
protected

Command description for logging.

Definition at line 21 of file FileCmdAbstract.cpp.

22{
23 return m_cmdDescription;
24}

◆ redo()

virtual void FileCmdAbstract::redo ( MainWindow & mainWindow)
pure virtual

Apply this command, through MainWindow.

Implemented in FileCmdClose, FileCmdExport, FileCmdImport, and FileCmdOpen.


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