summaryrefslogtreecommitdiffstats
path: root/ui/qt/widgets/stock_icon_tool_button.h
blob: 26db61f49965f2733c9e12ba5060a0e04e2846e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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