##// END OF EJS Templates
Fix the problem of calling the zoom at wheel event on the color scale
Fix the problem of calling the zoom at wheel event on the color scale

File last commit:

r1372:79bf37fd2aff
r1390:ed0f1486704f
Show More
CatalogueExplorerHelper.cpp
30 lines | 950 B | text/x-c | CppLexer
/ gui / src / Catalogue / CatalogueExplorerHelper.cpp
#include "Catalogue/CatalogueExplorerHelper.h"
#include <QBoxLayout>
#include <QToolButton>
QWidget *CatalogueExplorerHelper::buildValidationWidget(QWidget *parent, std::function<void()> save,
std::function<void()> discard)
{
auto widget = new QWidget{parent};
auto layout = new QHBoxLayout{widget};
auto btnValid = new QToolButton{widget};
btnValid->setIcon(QIcon{":/icones/save"});
btnValid->setAutoRaise(true);
QObject::connect(btnValid, &QToolButton::clicked, save);
layout->addWidget(btnValid);
auto btnDiscard = new QToolButton{widget};
btnDiscard->setIcon(QIcon{":/icones/discard"});
btnDiscard->setAutoRaise(true);
QObject::connect(btnDiscard, &QToolButton::clicked, discard);
layout->addWidget(btnDiscard);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
return widget;
}