Exemplo n.º 1
0
bool WEXPORT MFamily::hasSwitches( bool setable )
{
    int icount = _switches.count();
    for( int i=0; i<icount; i++ ) {
        MSwitch* sw = (MSwitch*)_switches[i];
        if( !setable || ( sw->text().size() > 0 && sw->text()[0] != ' ' ) ) {
            return TRUE;
        }
    }
    return FALSE;
}
Exemplo n.º 2
0
void MFamily::addSwitches( WVList& list, const char* mask, bool setable )
{
    MSwitch* lastSw = NULL;
    int icount = _switches.count();
    for( int i=0; i<icount; i++ ) {
        MSwitch* sw = (MSwitch*)_switches[i];
        bool hasText = sw->hasText();
        if( !setable || hasText ) {
            if( !lastSw || !hasText || lastSw->text() != sw->text() ) {
                if( sw->addSwitch( list, mask ) ) {
                    lastSw = sw;
                }
            }
        }
    }
}