| 1927 | QArray<UData> item_cycle; |
| 1928 | |
| 1929 | int datumWidth(const UData& uitem) |
| 1930 | { |
| 1931 | if (uitem.text) { |
| 1932 | int width=fontMetrics().width(uitem.text)+3; |
| 1933 | if (uitem.attr) { |
| 1934 | // XXX Too expensive to do properly, because |
| 1935 | // XXX we have to set the font of the widget |
| 1936 | // XXX just to get the font metrics information! |
| 1937 | // XXX Could hold a fake widget for that |
| 1938 | // XXX purpose, but this hack is less ugly. |
| 1939 | width+=width/10; |
| 1940 | } |
| 1941 | return width; |
| 1942 | } else { |
| 1943 | return 0; |
| 1944 | } |
| 1945 | } |
| 1946 | |
| 1947 | virtual void setupPainter(QPainter *p) |
| 1948 | { |