void DialogVideoPlayer::resizeEvent (QResizeEvent *event) {
    QDialog::resizeEvent(event);

    qDebug() << " resize event ";
    repaintAll();

}
Пример #2
0
void TransFunc1DRampEditor::causeVolumeRenderingRepaint() {
    // this informs the owner about change in transfer function texture
    property_->notifyChange();

    // this signal causes a repaint of the volume rendering
    emit transferFunctionChanged();

    repaintAll();
}
Пример #3
0
void ThumbnailAsideEffect::addThumbnail( EffectWindow* w )
    {
    repaintAll(); // repaint old areas
    Data d;
    d.window = w;
    d.index = windows.count();
    windows[ w ] = d;
    arrange();
    }
Пример #4
0
void TransFunc1DKeysEditor::updateFromProperty() {
    tgtAssert(property_, "No property");

    // check whether new transfer function object has been assigned
    if (property_->get() != transferFuncIntensity_) {
        transferFuncIntensity_ = dynamic_cast<TransFunc1DKeys*>(property_->get());
        // propagate transfer function to mapping canvas and texture painter
        texturePainter_->setTransFunc(transferFuncIntensity_);
        transCanvas_->setTransFunc(transferFuncIntensity_);

        updateDataBounds();
        updateMappingSpin(true);
        updateThresholdFromProperty();

        if (property_->get() && !transferFuncIntensity_) {
            if (isEnabled()) {
                LWARNING("Current transfer function not supported by this editor. Disabling.");
                setEnabled(false);
            }
        }
    }

    // check whether the volume associated with the TransFuncProperty has changed
    const VolumeBase* newHandle = property_->getVolumeHandle();
    if (newHandle != volume_) {
        volume_ = newHandle;
        volumeChanged();
    }

    alwaysFit_->blockSignals(true);
    if(property_->getAlwaysFitToDomain())
        alwaysFit_->setCheckState(Qt::Checked);
    else
        alwaysFit_->setCheckState(Qt::Unchecked);
    alwaysFit_->blockSignals(false);

    if (transferFuncIntensity_) {
        setEnabled(true);

        // update treshold widgets from tf
        updateDataBounds();
        updateMappingSpin(true);
        updateThresholdFromProperty();

        // repaint control elements
        repaintAll();
    }
    else {
        setEnabled(false);
    }
}
Пример #5
0
void ThumbnailAsideEffect::removeThumbnail( EffectWindow* w )
    {
    if( !windows.contains( w ))
        return;
    repaintAll(); // repaint old areas
    int index = windows[ w ].index;
    windows.remove( w );
    for( QHash< EffectWindow*, Data >::Iterator it = windows.begin();
         it != windows.end();
         ++it )
        {
        Data& d = *it;
        if( d.index > index )
            --d.index;
        }
    arrange();
    }
Пример #6
0
void TransFunc1DRampEditor::updateFromProperty() {

    // check whether new transfer function object has been assigned
    if (property_->get() != transferFuncIntensity_) {
        transferFuncIntensity_ = dynamic_cast<TransFunc1DKeys*>(property_->get());

        // ramp only applicable for two keys
        if (transferFuncIntensity_ && transferFuncIntensity_->getNumKeys() > 2)
            transferFuncIntensity_ = 0;

        // propagate transfer function to mapping canvas and texture painter
        texturePainter_->setTransFunc(transferFuncIntensity_);
        transCanvas_->setTransFunc(transferFuncIntensity_);

        // disable, if tf type unsupported
        if (property_->get() && !transferFuncIntensity_) {
            if (isEnabled()) {
                LWARNING("Current transfer function not supported by this editor. Disabling.");
                setEnabled(false);
            }
        }
    }

    // check whether the volume associated with the TransFuncProperty has changed
    const VolumeBase* newHandle = property_->getVolumeHandle();
    if (newHandle != volumeHandle_) {
        volumeHandle_ = newHandle;
        volumeChanged();
    }

    if (transferFuncIntensity_) {
        setEnabled(true);

        // update treshold widgets from tf
        restoreThresholds();

        // repaint control elements
        repaintAll();
    }
    else {
        setEnabled(false);
    }

}
void TransFuncEditorIntensityPet::updateFromProperty() {
    // check whether the volume associated with the TransFuncProperty has changed
    const VolumeHandleBase* newHandle = property_->getVolumeHandle();
    if (newHandle != volumeHandle_) {
        volumeHandle_ = newHandle;
        volumeChanged();
    }

    if (transferFuncGradient_) {
        transferFuncGradient_->resize(maximumIntensity_ + 1);

        bool emitRepaint = false;
        // adjust tf when not all keys have maximum alpha
        if (!transferFunctionCorrect()) {
            LINFO("The transfer function contains keys that don't have maximum alpha. "
                   << "The alpha value of these keys is set to 255.");
            rectifyTransferFunction();

            emitRepaint = true;
        }

        // update threshold control elements when necessary
        if (transferFuncIntensity_->getThresholds() != tgt::vec2(0.f, 1.f)) {
            restoreThresholds();
            emitRepaint = true;
        }

        if (emitRepaint) {
            property_->notifyChange();
            emit transferFunctionChanged();
        }

        // repaint control elements
        repaintAll();
    }
    else
        resetEditor();
}
Пример #8
0
//----------------------------------------------------------------------------------------------
//      small functions
//----------------------------------------------------------------------------------------------
void TransFunc1DKeysEditor::causeVolumeRenderingRepaint() {
    // this informs the owner about change in transfer function texture
    property_->notifyChange();
    repaintAll();
    emit transferFunctionChanged();
}
void DialogVideoPlayer::sliderDotSizeChanged() {
    dotSizePercentage = (double)ui->sliderDotSize->value() / (double)10;
    resizeDisplay();
    repaintAll();
}
void DialogVideoPlayer::spinBoxTimeOffsetChanged(int value) {
    movieOffsetMS = value;
    repaintAll();
}
Пример #11
0
MRESULT EXPENTRY threadTimerMgrProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) {
   if (msg == WM_TIMER) {
      switch (LONGFROMMP(mp1)) {
      // scadenza ritardo sparizione puntatore mouse ---------------------
         case TID_MOUSEPTR:
            g.is.hidePtrTmr = 0;
            WinStopTimer(g.timerThrd.hab, g.timerThrd.hwnd, TID_MOUSEPTR);
            msg = _sysValue(SV_POINTERLEVEL);
            if (!msg) {
               WinShowPointer(HWND_DESKTOP, FALSE);
               WinShowPointer(HWND_DESKTOP, FALSE);
            } else if (msg > 0x7fff) {
               do {
                  WinShowPointer(HWND_DESKTOP, FALSE);
               } while (_sysValue(SV_POINTERLEVEL) > 0x7fff);
               WinShowPointer(HWND_DESKTOP, FALSE);
            } /* endif */
            g.is.ptrHidden = 1;
            break;
      // scadenza ritardo attivazione automatica finestre ----------------
         case TID_AUTOFOCUS:
            _resetTimer(g.hwnd.autoFocus, TID_AUTOFOCUS);
            break;
      // scadenza ritardo sparizione barra titolo ------------------------
         case TID_HIDETITLE:
            _resetTimer(g.hwnd.hideTitle, TID_HIDETITLE);
            break;
      // scadenza ritardo apparizione barra titolo -----------------------
         case TID_UNHIDETITLE:
            _resetTimer(g.hwnd.unhideTitle, TID_UNHIDETITLE);
            break;
      // scadenza ritardo attivazione automatica barra menu --------------
//         case TID_MENUACTIVATE:
//            _resetTimer(g.hwndActMenu, TID_MENUACTIVATE);
//            break;
      } /* endswitch */
      return (MRESULT)FALSE;
   } /* endif */
   // reset all the bitmaps
   if (msg == SMWM_RESETBITMAPS) {
      HINI hini;
      if (o.tb.on || o.tb.htbar || o.tb.roll) {
         if (freeBitmapResources() &&
             (NULLHANDLE != (hini = stlrOpenProfile()))) {
            initResources(hini, FALSE);
            repaintAll();
            PrfCloseProfile(hini);
         } /* endif */
      } /* endif */
      return (MRESULT)FALSE;
   } /* endif */
   if ((msg == SMWM_DISABLE) && ((HWND)mp2 == hwnd)) {
      if ((BOOL)mp1) { // disabilita tutte le funzioni
         o.gen.disabled = 1;
         g.hwnd.menu = 0;
         g.is.cinitmenu = 0;
         freeBitmapResources();
         stlrStopHitTestCheck();
      } else if (!g.is.expired) {         // riabilita funzioni
         HINI hini;
         o.gen.disabled = 0;
         if (NULLHANDLE != (hini = stlrOpenProfile()))
            initResources(hini, FALSE);
      } /* endif */
      WinBroadcastMsg(HWND_DESKTOP, WM_STYLER2, (MPARAM)STLR_DISABLED,
                      (MPARAM)o.gen.disabled,
                      BMSG_POST | BMSG_FRAMEONLY | BMSG_DESCENDANTS);
      return (MRESULT)FALSE;
   } // end if
   if (msg == WM_STYLER2) {
      if ((ULONG)mp1 == STLR_HIDEALL) {
         g.is.hideall = !g.is.hideall;
         _stlrMsgPostAll(STLR_HIDEALL, 0);
      } else if ((ULONG)mp1 == STLR_ROLLALL) {
         g.is.rollall = !g.is.rollall;
         _stlrMsgPostAll(STLR_ROLLALL, 0);
      } /* endif */
      return (MRESULT)FALSE;
   } /* endif */
   return WinDefWindowProc(hwnd, msg, mp1, mp2);
}