📄 toolbutton.h
字号:
#ifndef __TOOLBUTTON_H__#define __TOOLBUTTON_H__#include <QToolButton>class QIcon;class QPixmap;class QString;namespace gui {/** Class wrapping QToolButton, adding button ID and providing also a different constructors (with QPixmap or QIcon)<br> Also, emits clicked(id) signal in addition to normal clicked() signal \brief Pushbutton in application toolbar */class ToolButton : public QToolButton { Q_OBJECTpublic: ToolButton(const QPixmap *icon, const QString tooltip, QWidget *parent=0); ToolButton(const QIcon *iconSet, const QString tooltip, QWidget *parent=0); void setTextLabel(const QString &label); virtual QSize sizeHint();public slots: void setSizes(int newSize);protected slots: void slotClicked();protected: virtual void enterEvent(QEvent *e); virtual void leaveEvent(QEvent *e);private: void init();private: /** preferred button size */ QSize bSize;signals: /** Signal emitted when clicked on this button. The button sends pointer to itself @param self Button that caused the click */ void clicked(ToolButton *self); /** Send help message when mouse cursor enters/leaves the button. Help message is sent on enter and QString::null on leave. @param message Help message */ void helpText(const QString &message);};} // namespace gui#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -