ScreenTranslator/SelectionDialog.h

42 lines
790 B
C
Raw Normal View History

2013-11-23 13:48:34 +07:00
#ifndef SELECTIONDIALOG_H
#define SELECTIONDIALOG_H
#include <QDialog>
#include <QPixmap>
#include <QMenu>
2013-11-23 13:48:34 +07:00
2013-11-26 13:44:00 +07:00
#include "ProcessingItem.h"
2013-11-23 13:48:34 +07:00
namespace Ui {
class SelectionDialog;
}
class LanguageHelper;
2013-11-23 13:48:34 +07:00
class SelectionDialog : public QDialog
{
Q_OBJECT
public:
explicit SelectionDialog(const LanguageHelper& dictionary, QWidget *parent = 0);
2013-11-23 13:48:34 +07:00
~SelectionDialog();
bool eventFilter (QObject *object, QEvent *event);
signals:
2013-11-26 13:44:00 +07:00
void selected (ProcessingItem pixmap);
2013-11-23 13:48:34 +07:00
public slots:
void setPixmap (QPixmap pixmap);
void updateMenu ();
2013-11-23 13:48:34 +07:00
private:
Ui::SelectionDialog *ui;
const LanguageHelper& dictionary_;
2013-11-23 13:48:34 +07:00
QPoint startSelectPos_;
QPoint currentSelectPos_;
QPixmap currentPixmap_;
QMenu* languageMenu_;
2013-11-23 13:48:34 +07:00
};
#endif // SELECTIONDIALOG_H