//
// Created by Krad on 2021/10/8.
//

#ifndef GUI_GUIMACROS_H
#define GUI_GUIMACROS_H
#define ADD_TOOL_SIZE_BTN_TO_LAYOUT(name,img,size,layout)\
    QToolButton* btn##name= new QToolButton(this);\
    btn##name->setToolButtonStyle(Qt::ToolButtonIconOnly);\
    btn##name->setIcon(QIcon(img));\
    btn##name->setIconSize(QSize(size,size));\
    btn##name->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);\
    layout->addWidget(btn##name);

#define ADD_TOOL_BTN_TO_LAYOUT(name,img,layout)\
    ADD_TOOL_SIZE_BTN_TO_LAYOUT(name,img,120,layout)


#define ADD_TOOL_BTN(name,img)\
    ADD_TOOL_BTN_TO_LAYOUT(name,img,layout)
#endif //GUI_GUIMACROS_H
