-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
108 lines (101 loc) · 3.16 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "dialog.h"
#include <QListView>
#include <QProgressBar>
#include <QMainWindow>
#include <QDir>
#include "olistview.h"
#include "lineidentifire.h"
#include "linereader.h"
#include "preprocessor.h"
#include "scalevaraibles.h"
#include <qstringlistmodel.h>
#include <qmessagebox.h>
#include "progressWidget/progresswidget.h"
#include "charDebugWidget/chardebug.h"
#include <QMainWindow>
typedef QList<QImage> QImageList;
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
void readMemberVariable();
void initMemWidget();
void connectWidget();
void showBanglaText();
void setImage();
void updateOpenListView();
void loadBanglaText(QString resultTextFile);
bool mainImageToBinImage(QStringList &list);
void convertAndSave(QStringList m_openFileList,QImageList m_binImageList,int startIdxList,int endIdxList);
bool saveBinBrille(QString name,QStringList binData);
private slots:
void on_environmenVariableAction_triggered();
void on_DebugAction_triggered();
void onCnvrtClick();
void onCnvrtAllClick();
void removeForOpenView();
void removeForResultView();
void ontextBtnClicked();
void onimageBtnClicked();
void onOpenListViewItemClicked();
void onResultListViewItemClicked();
void on_openFiles();
void on_addFiles();
void on_saveFiles();
void on_saveBinFiles();
void on_savePDFFiles();
void on_Print();
protected:
void closeEvent(QCloseEvent *event);
bool event(QEvent *event) override;
private:
Ui::MainWindow *ui;
bool shouldProceed();
void createActions();
public:
// imageLabel
//ImageLabel *imageLabel;
// scrollArea
//QScrollArea *scrollArea;
// input position
QPoint inputPt;
// input box
//QLineEdit *inputBox;
// QListOpenListView
// OListView *openListView,*resultListView;
progressWidget progressWdgt;
// QPushButton
//QPushButton *convrt,*convrtAll;
CharDebug w;
// QLabel
//QLabel *brailleTextLabel,*brailleImageLabel;
// ------memberVariable-----------
QStringList m_openFileList,m_resultFileList,nameList;
QList<QString> _banglaText,_binText;
QImage m_imageToShow;
QImageList m_resultImagesList,m_binImageList;
QString m_textToShow;
//QPoint m_errDot,m_errCh,m_distBetDot,m_distBetCh;
//int m_minDotWidth,m_maxDotWidth;
QDir m_currentImageDir;
bool isSaving = false,binaryFiles=false;
//------------------model-------------------------
QStringListModel *resultModel = nullptr;
QMessageBox msgBox;
// --------------action for context menu------------
QAction *actionselectAllForOpen,*actionselectAllForResult,*actionRemoveFileForResult,*actionSaveFiles;
QAction *exportAsPdfForResult,*actionPrint;
// image processor
LineIdentifire lineIdentifire;
Linereader lineReader;
PreProcessor preProcessor;
ScaleVaraibles scaleVar;
};
#endif // MAINWINDOW_H