DateColumn::DateColumn(Table* t, const QString& n) : TextColumn(t, n, 0) { QString text = valcon.format(QDate(2000, 9, 30)); width = t->fontMetrics().width(text); checkWidth(); }
TextColumn::TextColumn(Table* t, const QString& n, int chars, int a) : TableColumn(t, n, 0) { alignment = a; width = t->fontMetrics().width("x") * chars; checkWidth(); }
PriceColumn::PriceColumn(Table* t, const QString& n, int digits) : TextColumn(t, n, 0, Qt::AlignRight) { fixed number = pow(10.0, digits) - 1.0; QString text = valcon.format(Price(number)); width = t->fontMetrics().width(text); checkWidth(); }
PercentColumn::PercentColumn(Table* t, const QString& n, int digits) : NumberColumn(t, n, 0) { fixed number = pow(10.0, digits) - 1.0; QString text = PercentValcon().format(number); width = t->fontMetrics().width(text); checkWidth(); }
void PrefsTable::checkSize(int rowIndex, int colIndex, const QString& defValue) { checkHeight(rowIndex); checkWidth(rowIndex, colIndex, defValue); }
CheckColumn::CheckColumn(Table* t, const QString& n) : TableColumn(t, n, 0) { checkWidth(); }