The maker of “Thomas & Friends Wooden Railway” toys has agreed to pay $30 million to settle a nationwide class-action lawsuit by thousands of families who purchased lead-tainted products, a plaintiffs’ attorney said Wednesday.

Under the deal, Oak Brook-based RC2 Brands will offer cash refunds or replacements toys, plus what the company calls a bonus toy; it also promises to implement new quality controls, said Jay Edelson, a plaintiffs’ attorney in the case.

“We believe this really is the first step toward cleaning up the problem of lead paint in toys,” the Chicago attorney said. “It will put a lot of pressure on other companies to step up and act morally. We hope this becomes a problem of the past.”

The lawsuit was filed in the Circuit Court of Cook County last year, and the court gave the settlement preliminary approval on Tuesday. The judge is expected to give final approval at a hearing set for May 6, Edelson said.

RC2 CEO Curt Stoelting welcomed the preliminary agreement, saying in a statement that it “builds upon the many steps that we’ve taken to replace recalled products and improve product safety” and will help “continue to build parents’ trust.”

In June of last year, the Consumer Product Safety Commission announced that RC2 was voluntarily recalling about 1.5 million items in what would become the first of several major roundups involving lead paint on toys made in China.

Children who ingest even small amounts of lead can suffer brain damage; large doses can kill.

By mid-September, RC2 had recovered about 1 million items, sending bonus gifts to customers who returned a product.

But that goodwill gesture flopped when further testing showed that lead in the paint on about 2,000 “Toad” train cars in the bonus shipment was up to four times higher than acceptable levels. RC2 then recalled the affected Toads, along with about 200,000 other Thomas items.

The company – which had 2006 sales of about $500 million – has dropped its supplier, Hansheng Wood Products, which made the Toad pieces as well as the items in the first recall.