10 setObjectName(
"US_RemoveDistros" );
15 setWindowTitle( tr(
"Remove Model Distributions" ) );
22 QLabel* lb_mtitle =
us_banner( tr(
"Select Models to Remove" ) );
34 mainLayout ->addWidget( lb_mtitle, row++, 0, 1, 5 );
46 this, SLOT(
remove() ) );
49 connect(
pb_help, SIGNAL( clicked() ),
50 this, SLOT(
help() ) );
52 this, SLOT( reject() ) );
56 connect(
lw_distrs, SIGNAL( itemSelectionChanged() ),
63 for (
int jj = 0; jj <
nd_orig; jj++ )
65 QString runid =
distros[ jj ].run_name;
66 QString analy =
distros[ jj ].analys_name;
67 QString method =
distros[ jj ].method;
68 QString edid = analy.section(
"_", 0, -4 );
69 QString anid = analy.section(
"_", -3, -3 );
70 QString iter = analy.section(
"_", -2, -1 );
71 QString mdesc = runid +
"." + edid +
"_" + anid +
"_" + method
76 maxdlen = qMax( maxdlen, mdesc.length() );
83 QFontMetrics fm( font );
84 int fhigh = fm.lineSpacing();
85 int fwide = fm.width( QChar(
'6' ) );
86 int lhigh = fhigh * 10 + 12;
87 int lwide = fwide * ( maxdlen + 2 );
91 lw_distrs->setSelectionMode( QAbstractItemView::ExtendedSelection );
93 te_status->setMaximumHeight( fhigh * 2 + 12 );
97 tr(
"The list shows all the original %1 distributions.\n"
98 "No models are currently selected for removal." ).arg( nd_orig ) );
101 int wwide = qMax( 500, lwide );
102 int whigh = size().height();
103 resize( wwide, whigh );
104 qApp->processEvents();
111 QList< QListWidgetItem* > selitems =
lw_distrs->selectedItems();
119 tr(
"The list shows all the original %1 distributions.\n"
120 "No models are currently selected for removal." )
127 tr(
"The list shows all the original %1 distributions.\n"
128 "One model is currently selected for removal." )
135 tr(
"The list shows all the original %1 distributions.\n"
136 "%2 models are currently selected for removal." )
146 tr(
"The list shows distributions with %1 removed.\n"
147 "No more models are currently selected for removal." )
154 tr(
"The list shows distributions with %1 removed.\n"
155 "One more model is currently selected for removal." )
162 tr(
"The list shows distributions with %1 removed.\n"
163 "%2 more models are currently selected for removal." )
178 QList< QListWidgetItem* > selitems =
lw_distrs->selectedItems();
184 QListWidgetItem* item = selitems[ jj ];
185 QString mdesc = item->text();
210 tr(
"The list shows all the original %1 distributions.\n"
211 "No models are currently selected for removal." ).arg(
nd_orig ) );
223 if ( QMessageBox::Yes == QMessageBox::warning(
this,
224 tr(
"Outstanding Selections" ),
225 tr(
"You have selected distributions,\n"
226 "but did not click on the Remove button.\n"
227 "Do you want to remove the selected distributions?" ),
228 QMessageBox::No | QMessageBox::Yes, QMessageBox::Yes ) )
234 for (
int jj =
nd_orig - 1; jj >= 0; jj-- )