Example #1
0
 void updateForChangedInput(Rule::Semantic input)
 {
     if(isHorizontalInput(input))
     {
         updateDimension(Rule::Left, Rule::Right, Rule::Width, Rule::AnchorX,
                         OutLeft, OutRight, OutWidth);
     }
     else
     {
         updateDimension(Rule::Top, Rule::Bottom, Rule::Height, Rule::AnchorY,
                         OutTop, OutBottom, OutHeight);
     }
 }
Example #2
0
/*-----------------------------------------------------------------------------
 *  Gestionnaire d'évènements
 *-----------------------------------------------------------------------------*/
void PictoProcedure::processAction( QAction* action, QGraphicsSceneContextMenuEvent* event )
{/*{{{*/
     if( action == getContextMenuAction("Details") ) {
          detail_ = !detail_;
          prepareGeometryChange();
          updateDimension();

     } else if ( action == getContextMenuAction("EmptyDetails") ) {
          emptyDetail_ = !emptyDetail_;
          prepareGeometryChange();
          updateDimension();

     } else {
          Pictogramme::processAction( action, event );
     }
}/*}}}*/
Example #3
0
/*-----------------------------------------------------------------------------
 *  Constructeurs / Destructeurs
 *-----------------------------------------------------------------------------*/
PictoProcedure::PictoProcedure( QString titre,
                                QString preCondition,
                                QString postCondition,
                                QGraphicsItem* parent ) :
     Pictogramme( parent ), detail_( true ), emptyDetail_( true )
{/*{{{*/
     labels_ << new LabelItem( preCondition, 150, 15, 50, this );
     labels_ << new LabelItem( titre, 200, 50, 50, this );
     labels_ << new LabelItem( postCondition, 150, 15, 50, this );

     setAnchorType( AncreItem::Up );
     posBottomAnchor_.setY( 55 );
     posUpAnchor_.setY( 5 );
     updateDimension();

     addContextMenuEntry("Details", "Masquer les assertions", true);
     addContextMenuEntry("EmptyDetails", "Masquer les assertions vides", true);
}/*}}}*/