void MainWindow::updateCoordinates() { x_ = xSpinBox_.value(); y_ = ySpinBox_.value(); width_ = widthSpinBox_.value(); height_ = heightSpinBox_.value(); deviceScale_ = retinaBox_.checkState() ? 2.f : 1.f; generateCursorImage(); desktopSelectionWindow_->getDesktopSelectionView()->getDesktopSelectionRectangle()->setCoordinates( x_, y_, width_, height_ ); }
MainWindow::MainWindow() : dcStream_(0) , desktopSelectionWindow_(new DesktopSelectionWindow()) , x_(0) , y_(0) , width_(0) , height_(0) , deviceScale_(1.f) { generateCursorImage(); setupUI(); // Receive changes from the selection rectangle connect(desktopSelectionWindow_->getDesktopSelectionView()->getDesktopSelectionRectangle(), SIGNAL(coordinatesChanged(QRect)), this, SLOT(setCoordinates(QRect))); connect(desktopSelectionWindow_, SIGNAL(windowVisible(bool)), showDesktopSelectionWindowAction_, SLOT(setChecked(bool))); }