示例#1
0
bool RearMirrorTools::mousePressEvent(int x, int y) {
    if (_windowed) {
        if (_closeIconRect.contains(x, y)) {
            _windowed = false;
            emit closeView();
            return true;
        }

        /* Disabled for now https://worklist.net/19548
        if (_resetIconRect.contains(x, y)) {
            emit resetView();
            return true;
        }
        */
        
        if (_headZoomIconRect.contains(x, y)) {
            _zoomLevel = HEAD;
            Application::getInstance()->bumpSettings();
            return true;
        }
        
        if (_bodyZoomIconRect.contains(x, y)) {
            _zoomLevel = BODY;
            Application::getInstance()->bumpSettings();
            return true;
        }

        if (_bounds.contains(x, y)) {
            _windowed = false;
            emit restoreView();
            return true;
        }
    }
    
    if (_fullScreen) {
        if (_shrinkIconRect.contains(x, y)) {
            _fullScreen = false;
            emit shrinkView();
            return true;
        }
    }
    return false;
}
示例#2
0
bool RearMirrorTools::mousePressEvent(int x, int y) {
    if (_windowed) {
        if (_closeIconRect.contains(x, y)) {
            _windowed = false;
            emit closeView();
            return true;
        }
        
        if (_resetIconRect.contains(x, y)) {
            emit resetView();
            return true;
        }
        
        if (_headZoomIconRect.contains(x, y)) {
            _zoomLevel = HEAD;
            return true;
        }
        
        if (_bodyZoomIconRect.contains(x, y)) {
            _zoomLevel = BODY;
            return true;
        }
        
        if (_bounds.contains(x, y)) {
            _windowed = false;
            emit restoreView();
            return true;
        }
    }
    
    if (_fullScreen) {
        if (_shrinkIconRect.contains(x, y)) {
            _fullScreen = false;
            emit shrinkView();
            return true;
        }
    }
    return false;
}