QString fileName = aResMgr->path( "resources", "SUPERVGUI", "ICO_NODE_INLINE" );
myIcon = GLViewer_Drawer::loadTexture( fileName );
-
myColor = aResMgr->colorValue( "SUPERVGraph", "NodeBody", DEF_MAIN_BACK );
- setState(myNode->getEngine()->State());
+ // setState(myNode->getEngine()->State());
+ setState(SUPERV_Running);
//updatePorts(); // method for ports' presentations creation
}
setTextFormat( DTF_TEXTURE_SCALABLE );
- QFont aFont( "Helvetica", 12 );
+ QFont aFont( "Helvetica", 10 );
aFont.setStyleHint( QFont::Helvetica );
aFont.setStyleStrategy( QFont::PreferQuality );
setFont( aFont );
{
myXScale = xScale;
myYScale = yScale;
+
+ // GLViewer_Group* group = new GLViewer_Group();
QValueList<GLViewer_Object*>::Iterator it;
for( it = myObjects.begin(); it != myObjects.end(); it++ ) {
else if( object->isHighlighted() )
drawBoundaryBox( rect, gap, myStippleHPattern );
- QColor primingColor = myPrimingColor;
-
- primingColor = Qt::white;
- //drawRectangle( rect, myLineWidth, 0, myNColor, true, primingColor );
-
- QString name = "computing node";//object->getName();
- if ( textFormat() == DTF_TEXTURE_SCALABLE && name.length() > 15 )
- name = name.left( 12 ) + QString( "..." );
-
- drawGLText( name, (rect->left()-rect->right())/2, rect->top()-5, GLText_Center, GLText_Center );
-
- QFont* aFont = new QFont( "Helvetica", 12 );
- aFont->setStyleHint( QFont::Helvetica );
- aFont->setStyleStrategy( QFont::PreferQuality );
- drawText( name, (rect->left()-rect->right())/2, rect->top()-25, Qt::black, aFont, 0 );
-
- GLViewer_PntList pnts;
- pnts.push_back( GLViewer_Pnt( rect->left(), rect->top() ) );
- pnts.push_back( GLViewer_Pnt( rect->left(), rect->bottom() ) );
- pnts.push_back( GLViewer_Pnt( rect->right(), rect->bottom() ) );
- pnts.push_back( GLViewer_Pnt( rect->right(), rect->top() ) );
- drawPolygon( pnts, Qt::black );
+ const int fieldHeight = 30;
+ GLViewer_Rect frect( *rect );
+ frect.setBottom( rect->top() - fieldHeight );
+ drawRectangle( &frect, 1., 0., Qt::black, true, Qt::cyan );
+ frect.setTop( rect->top() - fieldHeight );
+ frect.setBottom( rect->top() - 2*fieldHeight );
+ drawRectangle( &frect, 1., 0., Qt::black, true, Qt::yellow );
+ frect.setTop( rect->top() - 2*fieldHeight );
+ frect.setBottom( rect->top() - 3*fieldHeight );
+ drawRectangle( &frect, 1., 0., Qt::black, true, Qt::yellow );
+ // drawing Gate ports must be moved down, after drawing ports..
+ frect.setTop( rect->top() - 3*fieldHeight );
+ frect.setBottom( rect->top() - 4*fieldHeight );
+ drawRectangle( &frect, 1., 0., Qt::black, true, Qt::green );
+
+ drawGLText( "DTF_TEXTURE_SCALABLE text", rect->left()+5, rect->top()-5, GLText_Right, GLText_Center );
float iconSize = 16;
drawTexture( object->getIcon(), (int)iconSize,