Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
stock_icon_tool_button.h
1 /* stock_icon_tool_button.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #ifndef STOCKICONTOOLBUTTON_H
11 #define STOCKICONTOOLBUTTON_H
12 
13 #include <QToolButton>
14 
15 class StockIconToolButton : public QToolButton
16 {
17  Q_OBJECT
18 public:
19  explicit StockIconToolButton(QWidget * parent = 0, QString stock_icon_name = QString());
20 
21  void setIconMode(QIcon::Mode mode = QIcon::Normal);
22  void setStockIcon(QString icon_name);
23 
24 protected:
25  virtual bool event(QEvent *event);
26 
27 private:
28  QIcon base_icon_;
29  int leave_timer_;
30  static const int leave_interval_ = 500; // ms
31 };
32 
33 #endif // STOCKICONTOOLBUTTON_H
34 
35 /*
36  * Editor modelines
37  *
38  * Local Variables:
39  * c-basic-offset: 4
40  * tab-width: 8
41  * indent-tabs-mode: nil
42  * End:
43  *
44  * ex: set shiftwidth=4 tabstop=8 expandtab:
45  * :indentSize=4:tabSize=8:noTabs=true:
46  */
Definition: stock_icon_tool_button.h:15