{
switch (col) {
case 0:
- return 20;
+ return fontMetrics().width("All ");
break; case 1:
- return 16;
+ return fontMetrics().width(" m ");
break; case 2:
return qt_settings->glyphs().width();
break; case 3:
{
if (item[i].Selectable()) {
item[i].selected = !item[i].selected;
+ if ( !item[i].selected )
+ item[i].count=-1;
updateCell(i,3);
if (how==PICK_ONE) {
dialog->Accept();
switch (col) {
case 0:
- if (i.count>=0) {
- char text[16];
- sprintf(text,"%d",i.count);
+ if ( i.ch || i.attr!=ATR_INVERSE ) {
+ QString text;
+ if ( i.selected && i.count == -1 ) {
+ if ( i.str[0]>='0' && i.str[0]<='9' )
+ text = "All";
+ else
+ text = "*";
+ } else if ( i.count<0 ) {
+ text = "-";
+ } else {
+ text.sprintf("%d",i.count);
+ }
painter->drawText(0,0,cellWidth(col),cellHeight(),
- AlignHCenter|AlignVCenter,text);
+ AlignHCenter|AlignVCenter,text);
}
break; case 1:
if ((signed char)i.ch >= 0) {
pressed=row;
was_sel=item[row].selected;
ToggleSelect(row);
+ updateCell(row,0);
}
}
}