openmw/apps/opencs/view/doc/filewidget.hpp

46 lines
729 B
C++
Raw Permalink Normal View History

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