ScreenTranslator/ResultDialog.h

52 lines
1.2 KiB
C
Raw Normal View History

2013-11-26 13:44:00 +07:00
#ifndef RESULTDIALOG_H
#define RESULTDIALOG_H
#include <QDialog>
#include <QMenu>
2013-11-26 13:44:00 +07:00
#include "ProcessingItem.h"
namespace Ui {
class ResultDialog;
}
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:
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
signals:
void requestRecognize (ProcessingItem item);
void requestTranslate (ProcessingItem item);
void requestClipboard (); // Assume that slot will be called immediately.
void requestImageClipboard (); // Assume that slot will be called immediately.
void requestEdition (ProcessingItem item);
2013-11-26 13:44:00 +07:00
public:
const ProcessingItem &item () const;
2013-11-26 13:44:00 +07:00
bool eventFilter (QObject *object, QEvent *event);
public slots:
void showResult (ProcessingItem item);
void applySettings ();
private:
void createContextMenu ();
2013-11-26 13:44:00 +07:00
private:
Ui::ResultDialog *ui;
const LanguageHelper &dictionary_;
QMenu *contextMenu_;
QMenu *recognizeSubMenu_;
QMenu *translateSubMenu_;
QAction *clipboardAction_;
QAction *imageClipboardAction_;
QAction *correctAction_;
ProcessingItem item_;
2013-11-26 13:44:00 +07:00
};
#endif // RESULTDIALOG_H