void FalagardAnimate::drawSelf(float z) { if( d_needsRedraw ) { d_renderCache.clearCachedImagery(); d_needsRedraw = false; // normal 状态是作为永远显示模式出现的 drawNormal( z ); if (isDisabled(true) ) { drawDisabled(z); } else { //If pushed or checked draw "Pushed" Layer if (isPushed() ) { drawPushed(z); } //Draw "Hover" Layer if (isHovering() ) { drawHover(z); } } } Window::drawSelf(z); }
void BoardGame::hoverPixmap(QPixmap *cache, QPixmap *hover, const int player) { QRect rect = pointRect(cache->size(), QPoint(0, 0)); hover->resize(rect.size()); QPainter painter(hover); drawHover(hover, &painter, player); if (boardType() != EdgeLine) return; painter.setPen(COLOR_LINE); painter.setBrush(NoBrush); painter.drawRect(hover->rect()); }
/************************************************************************* Draw method *************************************************************************/ void TabButton::drawSelf(float z) { if (isDisabled()) { drawDisabled(z); } else if (isHovering()) { drawHover(z); } else if (d_selected) { drawPushed(z); } else { drawNormal(z); } }
/************************************************************************* Perform the rendering for this widget. *************************************************************************/ void ButtonBase::drawSelf(float z) { if (isHovering()) { drawHover(z); } else if (isPushed()) { drawPushed(z); } else if (isDisabled()) { drawDisabled(z); } else { drawNormal(z); } }
void FalagardActionButton::drawSelf( float z ) { if (d_needsRedraw ) { d_renderCache.clearCachedImagery(); d_needsRedraw = false; const StateImagery* imagery; // get WidgetLookFeel for the assigned look. const WidgetLookFeel& wlf = WidgetLookManager::getSingleton().getWidgetLook(d_lookName); if( wlf.isStateImageryPresent( "BackgroundImage" ) ) { imagery = &wlf.getStateImagery( "BackgroundImage" ); // peform the rendering operation. imagery->render(*this); } // 画背景 d_BackImage.draw(d_renderCache); //Empty if(isEmpty()) { if((isHovering() || isPushed()) && !isDisabled(true) )//&& !isGloom()) { drawHover(z); } } else { //Draw normal image drawNormal(z); //Draw percentage Img if(isPercentagePresent()) { drawPercentageImg(z); } //Notin Dragging if(d_dragging && !isGloom()) { drawPushed(z); } else { //Draw disable mask only when disabled if (isDisabled(true) || isGloom() ) { drawDisabled(z); if (isPushed() || isChecked()) { drawPushed(z); } drawAnimate(z); } else { //If pushed or checked draw "Pushed" Layer if (isPushed() || isChecked()) { drawPushed(z); } //Draw "Hover" Layer if (isHovering() && !isChecked()) { drawHover(z); } drawAnimate(z); // If default if(isDefault()) { drawDefault(z); } } //Draw corner character drawCorner(z); drawFlash( z ); } } } Window::drawSelf(z); }
void FalagardActionButton::drawSelf( float z ) { if (d_needsRedraw ) { d_renderCache.clearCachedImagery(); d_needsRedraw = false; //Empty if(isEmpty()) { if((isHovering() || isPushed()) && !isDisabled(true) )//&& !isGloom()) { drawHover(z); } } else { //Draw normal image drawNormal(z); //Notin Dragging if(d_dragging && !isGloom()) { drawPushed(z); } else { //Draw disable mask only when disabled if (isDisabled(true) || isGloom() ) { drawDisabled(z); if (isPushed() || isChecked()) { drawPushed(z); } } else { //If pushed or checked draw "Pushed" Layer if (isPushed() || isChecked()) { drawPushed(z); } //Draw "Hover" Layer if (isHovering() && !isChecked()) { drawHover(z); } drawAnimate(z); // If default if(isDefault()) { drawDefault(z); } } //Draw corner character drawCorner(z); } } } Window::drawSelf(z); }