void paint(QPainter* p, const QColorGroup& cg, bool act, bool /*enabled*/, int x, int y, int w, int h)
{
- if ( !act ) {
- p->fillRect( x, y+1, w, h-2, cg.mid() );
- p->drawRect( x, y+1, w, h-2 );
- }
- else {
- p->fillRect( x, y+1, w, h-2, cg.midlight() );
- QPen oldPen = p->pen();
- p->setPen( cg.mid() );
- p->drawRect( x, y+1, w, h-2 );
- p->setPen( oldPen );
- }
+ p->save();
+ p->fillRect( x, y, w, h, act ? cg.highlight() : cg.mid() );
+ p->setPen( act ? cg.highlightedText() : cg.buttonText() );
p->setFont( myFont );
- p->drawText( x, y, w, h, AlignHCenter | AlignVCenter | ShowPrefix | DontClip, myString );
+ p->drawText( x, y, w, h, AlignHCenter | AlignVCenter | ShowPrefix | DontClip | SingleLine, myString );
+ p->restore();
}
QSize sizeHint()
{
- return QFontMetrics( myFont ).size( AlignHCenter | AlignVCenter | ShowPrefix | DontClip, myString );
+ return QFontMetrics( myFont ).size( AlignHCenter | AlignVCenter | ShowPrefix | DontClip | SingleLine, myString );
+ }
+
+ bool fullSpan() const
+ {
+ return true;
}
private:
QString myString;
QFont myFont;
-
};
//=======================================================================
theCommandID == 607 || // MENU REPAIR - REMOVE INTERNAL WIRES
theCommandID == 608 || // MENU REPAIR - ADD POINT ON EDGE
theCommandID == 609 || // MENU REPAIR - FREE BOUNDARIES
+ theCommandID == 610 || // MENU REPAIR - FREE FACES
theCommandID == 602 ) { // MENU REPAIR - GLUE FACES
library = geomGUI->getLibrary( "libRepairGUI.so" );
}
- else if( theCommandID == 701 || // MENU MEASURE - PROPERTIES
- theCommandID == 702 || // MENU MEASURE - CDG
- theCommandID == 703 || // MENU MEASURE - INERTIA
- theCommandID == 7041 || // MENU MEASURE - BOUNDING BOX
- theCommandID == 7042 || // MENU MEASURE - MIN DISTANCE
- theCommandID == 705 || // MENU MEASURE - TOLERANCE
- theCommandID == 706 || // MENU MEASURE - WHATIS
- theCommandID == 707 || // MENU MEASURE - CHECK
+ else if( theCommandID == 701 || // MENU MEASURE - PROPERTIES
+ theCommandID == 702 || // MENU MEASURE - CDG
+ theCommandID == 703 || // MENU MEASURE - INERTIA
+ theCommandID == 7041 || // MENU MEASURE - BOUNDING BOX
+ theCommandID == 7042 || // MENU MEASURE - MIN DISTANCE
+ theCommandID == 705 || // MENU MEASURE - TOLERANCE
+ theCommandID == 706 || // MENU MEASURE - WHATIS
+ theCommandID == 707 || // MENU MEASURE - CHECK
+ theCommandID == 7072 || // MENU MEASURE - CHECK COMPOUND OF BLOCKS
theCommandID == 708 ) { // MENU MEASURE - POINT COORDINATES
library = geomGUI->getLibrary( "libMeasureGUI.so" );
}
theCommandID == 801 ) { // MENU GROUP - EDIT
library = geomGUI->getLibrary( "libGroupGUI.so" );
}
- else if( theCommandID == 9999 || // MENU BLOCKS - HEXAHEDRAL SOLID
- theCommandID == 9998 || // MENU BLOCKS - MULTI-TRANSFORMATION
- theCommandID == 9997 || // MENU BLOCKS - QUADRANGLE FACE
+ else if( theCommandID == 9999 || // MENU BLOCKS - HEXAHEDRAL SOLID
+ theCommandID == 9998 || // MENU BLOCKS - MULTI-TRANSFORMATION
+ theCommandID == 9997 || // MENU BLOCKS - QUADRANGLE FACE
+ theCommandID == 99991 || // MENU BLOCKS - PROPAGATE
theCommandID == 9995 ) { // MENU BLOCKS - EXPLODE ON BLOCKS
library = geomGUI->getLibrary( "libBlocksGUI.so" );
}
if ( theObject == "Component" ) {
////// menu for component
- popup->removeItem( QAD_DisplayOnly_Popup_ID );
if ( !isOCCViewer && !isVTKViewer ) {
+ popup->removeItem( QAD_DisplayOnly_Popup_ID );
popup->removeItem( QAD_Display_Popup_ID );
popup->removeItem( QAD_Erase_Popup_ID );
}
popup->removeItem( QAD_TopLabel_Popup_ID );
if ( theParent == "Viewer" && !objectName.isEmpty() && popup->count() > 0 ) {
// set bold font for popup menu's title
- QFont f = QApplication::font(); f.setBold( TRUE );
+ QFont f = popup->font(); f.setBold( TRUE );
popup->removeItem( QAD_TopLabel_Popup_ID );
popup->insertItem( new CustomItem( objectName, f ), QAD_TopLabel_Popup_ID, topItem );
}
Mb->setItemEnabled( 604, ViewOCC ); // SuppressHole
Mb->setItemEnabled( 606, ViewOCC ); // CloseContour
Mb->setItemEnabled( 413, ViewOCC ); // Isos Settings
+ Mb->setItemEnabled( 800, ViewOCC ); // Create Group
+ Mb->setItemEnabled( 801, ViewOCC ); // Edit Group
Mb->setItemEnabled(9998, ViewOCC ); // MENU BLOCKS - MULTI-TRANSFORMATION
geomGUI->EmitSignalCloseAllDialogs();