libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
pappso::UiMonitorInterface Class Referenceabstract

#include <uimonitorinterface.h>

Inheritance diagram for pappso::UiMonitorInterface:
pappso::UiMonitorText pappso::UiMonitorVoid pappso::UiMonitorTextPercent

Public Member Functions

virtual bool shouldIstop ()=0
 should the procces be stopped ? If true, then cancel process Use this function at strategic point of your process in order to interrupt it cleanly Implementation must take care of thread resistance if implemented
 
virtual void setTotalSteps (std::size_t total_number_of_steps)
 use it if the number of steps is known in an algorithm the total number of steps is usefull to report to the user a progress message in percents or with a progress bar
 
virtual void count ()=0
 count steps report when a step is computed in an algorithm
 
virtual void setTitle (const QString &title)=0
 current kind of process running
 
virtual void setStatus (const QString &status)=0
 current status of the process
 
virtual void appendText (const QString &text)=0
 append a text to a long report
 

Protected Attributes

std::size_t m_totalSteps = 0
 

Detailed Description

Todo:
pure virtual user interface class to monitor any long process it contains :
  • title, status, progress messages
  • callback functions to interrupt long process it does not contains any error messages functions : use pappso::ExceptionInterrupted to handle this

Definition at line 49 of file uimonitorinterface.h.

Member Function Documentation

◆ appendText()

virtual void pappso::UiMonitorInterface::appendText ( const QString &  text)
pure virtual

append a text to a long report

Parameters
textstring to append in a long report

Implemented in pappso::UiMonitorText, and pappso::UiMonitorVoid.

Referenced by pappso::TandemWrapperRun::readyReadStandardError(), and pappso::TandemWrapperRun::readyReadStandardOutput().

◆ count()

◆ setStatus()

◆ setTitle()

virtual void pappso::UiMonitorInterface::setTitle ( const QString &  title)
pure virtual

current kind of process running

Parameters
titleprocess title

Implemented in pappso::UiMonitorText, and pappso::UiMonitorVoid.

◆ setTotalSteps()

virtual void pappso::UiMonitorInterface::setTotalSteps ( std::size_t  total_number_of_steps)
inlinevirtual

use it if the number of steps is known in an algorithm the total number of steps is usefull to report to the user a progress message in percents or with a progress bar

Parameters
total_number_of_stepsthe total number of steps

Reimplemented in pappso::UiMonitorText, pappso::UiMonitorTextPercent, and pappso::UiMonitorVoid.

Definition at line 66 of file uimonitorinterface.h.

67 {
68 m_totalSteps = total_number_of_steps;
69 };

Referenced by pappso::MsRunXicExtractorInterface::extractXicCoordSPtrList(), pappso::MsRunXicExtractorInterface::extractXicCoordSPtrListParallelized(), pappso::TimsDirectXicExtractor::protectedExtractXicCoordSPtrList(), pappso::UiMonitorText::setTotalSteps(), and pappso::MzxmlOutput::write().

◆ shouldIstop()

virtual bool pappso::UiMonitorInterface::shouldIstop ( )
pure virtual

should the procces be stopped ? If true, then cancel process Use this function at strategic point of your process in order to interrupt it cleanly Implementation must take care of thread resistance if implemented

Implemented in pappso::UiMonitorText, and pappso::UiMonitorVoid.

Referenced by pappso::TimsDirectXicExtractor::protectedExtractXicCoordSPtrList(), pappso::MsRunXicExtractor::protectedExtractXicCoordSPtrList(), pappso::TandemWrapperRun::readyReadStandardError(), pappso::TandemWrapperRun::readyReadStandardOutput(), and pappso::TandemWrapperRun::runTandem().

Member Data Documentation

◆ m_totalSteps

std::size_t pappso::UiMonitorInterface::m_totalSteps = 0
protected

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