Removed obsolete code.
This commit is contained in:
parent
3e499b86c5
commit
77757ff3c6
@ -10,7 +10,7 @@
|
|||||||
ResultDialog::ResultDialog (const LanguageHelper &dictionary, QWidget *parent) :
|
ResultDialog::ResultDialog (const LanguageHelper &dictionary, QWidget *parent) :
|
||||||
QDialog (parent),
|
QDialog (parent),
|
||||||
ui (new Ui::ResultDialog),
|
ui (new Ui::ResultDialog),
|
||||||
dictionary_ (dictionary), isShowAtCapturePos_ (true),
|
dictionary_ (dictionary),
|
||||||
contextMenu_ (NULL), recognizeSubMenu_ (NULL), translateSubMenu_ (NULL),
|
contextMenu_ (NULL), recognizeSubMenu_ (NULL), translateSubMenu_ (NULL),
|
||||||
clipboardAction_ (NULL) {
|
clipboardAction_ (NULL) {
|
||||||
ui->setupUi (this);
|
ui->setupUi (this);
|
||||||
@ -88,21 +88,12 @@ void ResultDialog::showResult (ProcessingItem item) {
|
|||||||
|
|
||||||
QDesktopWidget *desktop = QApplication::desktop ();
|
QDesktopWidget *desktop = QApplication::desktop ();
|
||||||
Q_CHECK_PTR (desktop);
|
Q_CHECK_PTR (desktop);
|
||||||
if (isShowAtCapturePos_) {
|
QPoint correction = QPoint (ui->frame->lineWidth (), ui->frame->lineWidth ());
|
||||||
QPoint correction = QPoint (ui->frame->lineWidth (), ui->frame->lineWidth ());
|
move (item.screenPos - correction);
|
||||||
move (item.screenPos - correction);
|
QRect screenRect = desktop->screenGeometry (this);
|
||||||
QRect screenRect = desktop->screenGeometry (this);
|
int minY = screenRect.bottom () - height ();
|
||||||
int minY = screenRect.bottom () - height ();
|
if (y () > minY) {
|
||||||
if (y () > minY) {
|
move (x (), minY);
|
||||||
move (x (), minY);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
|
|
||||||
QRect screenRect = desktop->availableGeometry (this);
|
|
||||||
ST_ASSERT (screenRect.isValid ());
|
|
||||||
QPoint newPos (screenRect.width () - width (), screenRect.height () - height ());
|
|
||||||
move (newPos);
|
|
||||||
}
|
}
|
||||||
activateWindow ();
|
activateWindow ();
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,6 @@ class ResultDialog : public QDialog {
|
|||||||
private:
|
private:
|
||||||
Ui::ResultDialog *ui;
|
Ui::ResultDialog *ui;
|
||||||
const LanguageHelper &dictionary_;
|
const LanguageHelper &dictionary_;
|
||||||
bool isShowAtCapturePos_;
|
|
||||||
QMenu *contextMenu_;
|
QMenu *contextMenu_;
|
||||||
QMenu *recognizeSubMenu_;
|
QMenu *recognizeSubMenu_;
|
||||||
QMenu *translateSubMenu_;
|
QMenu *translateSubMenu_;
|
||||||
|
Loading…
Reference in New Issue
Block a user