12 #include <QHBoxLayout>
13 #include <QToolButton>
16 QWidget* parent, QString defaultButtonIconPath )
17 : QFrame(parent), m_comboBox(new QComboBox()), m_button(new QToolButton()) {
18 setLayout(
new QHBoxLayout());
19 layout()->setContentsMargins(0, 0, 0, 0);
29 m_button->setIcon(QIcon(defaultButtonIconPath));
39 const QMap<QString, QString>& texturePathMap) {
46 for (QMap<QString, QString>::const_iterator
path =
47 texturePathMap.constBegin();
48 path != texturePathMap.constEnd(); ++
path) {
52 connect(
m_comboBox, SIGNAL(activated(
int)),
this,
58 connect(
m_button, SIGNAL(clicked()),
this,
64 const QString& textureFilepath) {
66 m_comboBox->addItem(textureFilename, textureFilepath);
82 int pos =
m_comboBox->findData(textureFilepath);
QString getTexturefilePath(int index) const
QToolButton * m_button
Spawn color scale editor button.
void setSelectedTexturefile(QString textureFilepath)
Sets selected combo box item (scale) by UUID.
void textureFileSelected(int)
Signal emitted when a texture file item is selected.
void addItem(const QString &textureFilename, const QString &textureFilepath)
QComboBox * m_comboBox
Color scales combo-box.
void textureFileEditorSummoned()
ecvTextureFileSelector(QWidget *parent, QString defaultButtonIconPath=QString())
Default constructor.
void init(const QMap< QString, QString > &texturePathMap)
Inits selector with the Empty texture file path.
Tensor Maximum(const Tensor &input, const Tensor &other)
Computes the element-wise maximum of input and other. The tensors must have same data type and device...
static const std::string path