| 2751 | } |
| 2752 | |
| 2753 | void addGridLines(QGridLayout *grid, QColor gridColor) |
| 2754 | { |
| 2755 | QString style = |
| 2756 | QFormatStr( |
| 2757 | "QLabel { border: solid #%1%2%3; border-bottom-width: 1px; border-right-width: 1px;") |
| 2758 | .arg(gridColor.red(), 2, 16, QLatin1Char('0')) |
| 2759 | .arg(gridColor.green(), 2, 16, QLatin1Char('0')) |
| 2760 | .arg(gridColor.blue(), 2, 16, QLatin1Char('0')); |
| 2761 | |
| 2762 | for(int y = 0; y < grid->rowCount(); y++) |
| 2763 | { |
| 2764 | for(int x = 0; x < grid->columnCount(); x++) |
| 2765 | { |
| 2766 | QLayoutItem *item = grid->itemAtPosition(y, x); |
| 2767 | |
| 2768 | if(item == NULL) |
| 2769 | continue; |
| 2770 | |
| 2771 | QWidget *w = item->widget(); |
| 2772 | |
| 2773 | if(w == NULL) |
| 2774 | continue; |
| 2775 | |
| 2776 | QString cellStyle = style; |
| 2777 | |
| 2778 | if(x == 0) |
| 2779 | cellStyle += lit("border-left-width: 1px;"); |
| 2780 | if(y == 0) |
| 2781 | cellStyle += lit("border-top-width: 1px;"); |
| 2782 | |
| 2783 | cellStyle += lit(" };"); |
| 2784 | |
| 2785 | w->setStyleSheet(cellStyle); |
| 2786 | } |
| 2787 | } |
| 2788 | } |
| 2789 | |
| 2790 | int Formatter::m_minFigures = 2, Formatter::m_maxFigures = 5, Formatter::m_expNegCutoff = 5, |
| 2791 | Formatter::m_expPosCutoff = 7; |
no test coverage detected