diff options
Diffstat (limited to 'ui/qt/widgets/stock_icon_tool_button.h')
-rw-r--r-- | ui/qt/widgets/stock_icon_tool_button.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ui/qt/widgets/stock_icon_tool_button.h b/ui/qt/widgets/stock_icon_tool_button.h new file mode 100644 index 0000000..26db61f --- /dev/null +++ b/ui/qt/widgets/stock_icon_tool_button.h @@ -0,0 +1,31 @@ +/** @file + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef STOCKICONTOOLBUTTON_H +#define STOCKICONTOOLBUTTON_H + +#include <QToolButton> + +class StockIconToolButton : public QToolButton +{ +public: + explicit StockIconToolButton(QWidget * parent = 0, QString stock_icon_name = QString()); + + void setIconMode(QIcon::Mode mode = QIcon::Normal); + void setStockIcon(QString icon_name = QString()); + +protected: + virtual bool event(QEvent *event); + +private: + QIcon base_icon_; + QString icon_name_; +}; + +#endif // STOCKICONTOOLBUTTON_H |