[fb0c1d86f4] | 1 | /* |
---|
| 2 | * TSPSG: TSP Solver and Generator |
---|
| 3 | * Copyright (C) 2007-2013 Oleksii Serdiuk <contacts[at]oleksii[dot]name> |
---|
| 4 | * |
---|
| 5 | * $Id: $Format:%h %ai %an$ $ |
---|
| 6 | * $URL: http://tspsg.info/ $ |
---|
| 7 | * |
---|
| 8 | * This file is part of TSPSG. |
---|
| 9 | * |
---|
| 10 | * TSPSG is free software: you can redistribute it and/or modify |
---|
| 11 | * it under the terms of the GNU General Public License as published by |
---|
| 12 | * the Free Software Foundation, either version 2 of the License, or |
---|
| 13 | * (at your option) any later version. |
---|
| 14 | * |
---|
| 15 | * TSPSG is distributed in the hope that it will be useful, |
---|
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 18 | * GNU General Public License for more details. |
---|
| 19 | * |
---|
| 20 | * You should have received a copy of the GNU General Public License |
---|
| 21 | * along with TSPSG. If not, see <http://www.gnu.org/licenses/>. |
---|
| 22 | */ |
---|
| 23 | |
---|
[7ed8b57eea] | 24 | #include "bb10proxystyle.h" |
---|
| 25 | |
---|
| 26 | BB10ProxyStyle::BB10ProxyStyle(QStyle *style) |
---|
| 27 | : QProxyStyle(style) {} |
---|
| 28 | |
---|
| 29 | int BB10ProxyStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const |
---|
| 30 | { |
---|
| 31 | switch (metric) { |
---|
| 32 | case QStyle::PM_ButtonIconSize: |
---|
| 33 | return 42; |
---|
| 34 | case QStyle::PM_SmallIconSize: |
---|
| 35 | return 42; |
---|
| 36 | case QStyle::PM_LargeIconSize: |
---|
| 37 | return 64; |
---|
| 38 | default: |
---|
| 39 | return QProxyStyle::pixelMetric(metric, option, widget); |
---|
| 40 | } |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | int BB10ProxyStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const |
---|
| 44 | { |
---|
| 45 | if (hint == QStyle::SH_UnderlineShortcut) |
---|
| 46 | return 0; |
---|
| 47 | return QProxyStyle::styleHint(hint, option, widget, returnData); |
---|
| 48 | } |
---|