1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-24 23:23:54 +00:00
openmw/apps/opencs/view/doc/filewidget.hpp

46 lines
729 B
C++
Raw Normal View History

#ifndef CSV_DOC_FILEWIDGET_H
#define CSV_DOC_FILEWIDGET_H
2022-10-19 17:02:00 +00:00
#include <QString>
#include <QWidget>
#include <string>
class QLabel;
class QLineEdit;
namespace CSVDoc
{
class FileWidget : public QWidget
{
2022-09-22 18:26:05 +00:00
Q_OBJECT
2022-09-22 18:26:05 +00:00
bool mAddon;
QLineEdit* mInput;
QLabel* mType;
2022-09-22 18:26:05 +00:00
QString getExtension() const;
2022-09-22 18:26:05 +00:00
public:
FileWidget(QWidget* parent = nullptr);
2022-09-22 18:26:05 +00:00
void setType(bool addon);
2022-09-22 18:26:05 +00:00
QString getName() const;
2022-09-22 18:26:05 +00:00
void extensionLabelIsVisible(bool visible);
2022-09-22 18:26:05 +00:00
void setName(const std::string& text);
2022-09-22 18:26:05 +00:00
private slots:
2022-09-22 18:26:05 +00:00
void textChanged(const QString& text);
2022-09-22 18:26:05 +00:00
signals:
2022-09-22 18:26:05 +00:00
void nameChanged(const QString& file, bool addon);
};
}
#endif