ScreenTranslator/SelectionDialog.h

41 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
2015-09-23 01:41:08 +07:00
class SelectionDialog : public QDialog {
Q_OBJECT
2013-11-23 13:48:34 +07:00
public:
2015-09-23 01:41:08 +07:00
explicit SelectionDialog (const LanguageHelper &dictionary, QWidget *parent = 0);
~SelectionDialog ();
2013-11-23 13:48:34 +07:00
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;
2015-09-23 01:41:08 +07:00
const LanguageHelper &dictionary_;
2013-11-23 13:48:34 +07:00
QPoint startSelectPos_;
QPoint currentSelectPos_;
QPixmap currentPixmap_;
2015-09-23 01:41:08 +07:00
QMenu *languageMenu_;
2013-11-23 13:48:34 +07:00
};
#endif // SELECTIONDIALOG_H