You need to log in to create posts and topics.
Help also in subcircuits
feri@feri
59 Posts
#1 · February 14, 2026, 11:12 am
Quote from feri on February 14, 2026, 11:12 amWith a few changes it is possible to have help even in the subcircuits.
In component.h define a variable "QString m_typeid;".
In component.ccp initialize the variable:
Component::Component( QString type, QString id ) : CompBase( type, id ) , QGraphicsItem() { m_typeid = id.left(id.indexOf('-')); m_help = ""; m_Hflip = 1; m_Vflip = 1; m_color = QColor( Qt::white );Modify the "void Component::slotProperties()" function as follows:
void Component::slotProperties() { if( !m_propDialog ) { if( m_help == "" ) { QString name = m_type; if( m_type == "Subcircuit"|| m_type == "MCU" ) name = m_typeid; m_help = MainWindow::self()->getHelp( name, false ); } m_propDialog = new PropDialog( CircuitWidget::self(), m_help ); m_propDialog->setComponent( this ); } m_propDialog->show(); m_propDialog->adjustWidgets(); m_propDialog->raise(); }Greetings
With a few changes it is possible to have help even in the subcircuits.
In component.h define a variable "QString m_typeid;".
In component.ccp initialize the variable:
Component::Component( QString type, QString id )
: CompBase( type, id )
, QGraphicsItem()
{
m_typeid = id.left(id.indexOf('-'));
m_help = "";
m_Hflip = 1;
m_Vflip = 1;
m_color = QColor( Qt::white );
Modify the "void Component::slotProperties()" function as follows:
void Component::slotProperties()
{
if( !m_propDialog )
{
if( m_help == "" )
{
QString name = m_type;
if( m_type == "Subcircuit"|| m_type == "MCU" ) name = m_typeid;
m_help = MainWindow::self()->getHelp( name, false );
}
m_propDialog = new PropDialog( CircuitWidget::self(), m_help );
m_propDialog->setComponent( this );
}
m_propDialog->show();
m_propDialog->adjustWidgets();
m_propDialog->raise();
}
Greetings
Click for thumbs down.0Click for thumbs up.0
