ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvTextureFileSelector.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #include <QFrame>
9 
10 class QComboBox;
11 class QToolButton;
12 
14 
16 class ecvTextureFileSelector : public QFrame {
17  Q_OBJECT
18 
19 public:
21  ecvTextureFileSelector(QWidget* parent,
22  QString defaultButtonIconPath = QString());
23 
25  void init(const QMap<QString, QString>& texturePathMap);
26 
27  bool isEmpty() const;
28 
29  void addItem(const QString& textureFilename,
30  const QString& textureFilepath);
31 
33  void setSelectedTexturefile(QString textureFilepath);
34 
35  QString getTexturefilePath(int index) const;
36 
37 signals:
38 
41 
45 
46 protected:
48  QComboBox* m_comboBox;
49 
51  QToolButton* m_button;
52 };
#define signals
Advanced editor for color scales.
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.
ecvTextureFileSelector(QWidget *parent, QString defaultButtonIconPath=QString())
Default constructor.
void init(const QMap< QString, QString > &texturePathMap)
Inits selector with the Empty texture file path.