2013-11-26 13:44:00 +07:00
|
|
|
#ifndef RESULTDIALOG_H
|
|
|
|
#define RESULTDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2015-10-01 00:38:55 +07:00
|
|
|
#include <QMenu>
|
2013-11-26 13:44:00 +07:00
|
|
|
|
|
|
|
#include "ProcessingItem.h"
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ResultDialog;
|
|
|
|
}
|
2015-10-01 00:38:55 +07:00
|
|
|
class LanguageHelper;
|
2013-11-26 13:44:00 +07:00
|
|
|
|
2015-09-23 01:41:08 +07:00
|
|
|
class ResultDialog : public QDialog {
|
|
|
|
Q_OBJECT
|
2013-11-26 13:44:00 +07:00
|
|
|
|
|
|
|
public:
|
2015-10-01 00:38:55 +07:00
|
|
|
explicit ResultDialog (const LanguageHelper &dictionary, QWidget *parent = 0);
|
2015-09-23 01:41:08 +07:00
|
|
|
~ResultDialog ();
|
2013-11-26 13:44:00 +07:00
|
|
|
|
2015-10-01 00:38:55 +07:00
|
|
|
signals:
|
|
|
|
void requestRecognize (ProcessingItem item);
|
|
|
|
|
2013-11-26 13:44:00 +07:00
|
|
|
public:
|
2015-10-01 00:49:05 +07:00
|
|
|
const ProcessingItem &item () const;
|
2013-11-26 13:44:00 +07:00
|
|
|
bool eventFilter (QObject *object, QEvent *event);
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void showResult (ProcessingItem item);
|
2015-10-01 00:38:55 +07:00
|
|
|
void applySettings ();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void createContextMenu ();
|
2013-11-26 13:44:00 +07:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::ResultDialog *ui;
|
2015-10-01 00:38:55 +07:00
|
|
|
const LanguageHelper &dictionary_;
|
2013-11-26 13:44:00 +07:00
|
|
|
bool isShowAtCapturePos_;
|
2015-10-01 00:38:55 +07:00
|
|
|
QMenu *contextMenu_;
|
|
|
|
QMenu *recognizeSubMenu_;
|
2015-10-01 00:49:05 +07:00
|
|
|
ProcessingItem item_;
|
2013-11-26 13:44:00 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // RESULTDIALOG_H
|