alignwin.cpp 593 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include "alignwin.h"
  2. AlignWin::AlignWin(QWidget *parent)
  3. : QWidget(parent)
  4. {
  5. ui.setupUi(this);
  6. }
  7. AlignWin::~AlignWin()
  8. {}
  9. void AlignWin::slot_ok()
  10. {
  11. bool ok = true;
  12. bool ok1 = true;
  13. int leftStart = ui.leftStart->text().toInt(&ok) - 1;
  14. int leftEnd = ui.leftEnd->text().toInt(&ok1) - 1;
  15. if(!ok || !ok1)
  16. {
  17. return;
  18. }
  19. if((leftStart < 0) || (leftStart > leftEnd))
  20. {
  21. return;
  22. }
  23. int type = 0;
  24. //0最简单的,两边错开分别单独显示,对方一侧做对齐行展示
  25. emit alignLine(type, leftStart, leftEnd);
  26. close();
  27. }