InternDiffView

class InternDiffView : public QMainWindow

The InternDiffView class contains function that allows comparision of OCR image, Initial text and corrector output text.

Public Functions

InternDiffView(QWidget *parent, QString page, QString fpath)

Constructor for interndiffview.

Checks if the image file exists, if yes then loads the file to graphics view object and sets zoom configuration and sets relevant labels. Throws error message if file does not exists

bool validFilePath()

returns whether the file path is valid or invalid in a boolean variable

~InternDiffView()

Destructor.

Private Slots

void Load_comparePage(string page)

For the currently opened page, the function fetches - corresponding image file, initial text and corrector text and produces a final color coded text representing changes. The metrics are also calculated such as change percentage and accuracy.

See also

LevenshteinWithGraphemes(),GetGraphemesCount(), diff_main(), diff_prettyHtml()

Parameters:

page

void on_horizontalSlider_sliderMoved(int position)

This SLOT gets called when slider is moved.

It also zooms the image according to the slider value

Parameters:

value

void on_zoom_In_Button_clicked()

This functions zooms in the image.

void on_zoom_Out_Button_clicked()

This function zooms out the image.

void on_horizontalSlider_valueChanged(int value)

This SLOT gets called when value of horizontal slider gets changed.

Parameters:

value