finish( bycat );
int boxline = 0;
- for( QVector<checkBoxListItem*>::iterator it = modules.begin();
- it != modules.end(); ++it )
- {
- layoutGroupBox->addWidget( (*it)->checkBox, boxline++, 0 );
- }
+ foreach ( checkBoxListItem *it, modules )
+ layoutGroupBox->addWidget( it->checkBox, boxline++, 0 );
layoutGroupBox->addWidget( text, boxline, 0 );
if( !l )
ModuleListConfigControl::~ModuleListConfigControl()
{
- for( QVector<checkBoxListItem*>::iterator it = modules.begin();
- it != modules.end(); ++it )
- {
- delete *it;
- }
+ qDeleteAll( modules );
+ modules.clear();
delete groupBox;
}
void ModuleListConfigControl::hide()
{
- for( QVector<checkBoxListItem*>::iterator it = modules.begin();
- it != modules.end(); ++it )
- {
- (*it)->checkBox->hide();
- }
+ foreach ( checkBoxListItem *it, modules )
+ it->checkBox->hide();
groupBox->hide();
}
void ModuleListConfigControl::show()
{
- for( QVector<checkBoxListItem*>::iterator it = modules.begin();
- it != modules.end(); ++it )
- {
- (*it)->checkBox->show();
- }
+ foreach ( checkBoxListItem *it, modules )
+ it->checkBox->show();
groupBox->show();
}
text->clear();
bool first = true;
- for( QVector<checkBoxListItem*>::iterator it = modules.begin();
- it != modules.end(); ++it )
+ foreach ( checkBoxListItem *it, modules )
{
- if( (*it)->checkBox->isChecked() )
+ if( it->checkBox->isChecked() )
{
if( first )
{
- text->setText( text->text() + (*it)->psz_module );
+ text->setText( text->text() + it->psz_module );
first = false;
}
else
{
- text->setText( text->text() + ":" + (*it)->psz_module );
+ text->setText( text->text() + ":" + it->psz_module );
}
}
}