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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
725 B
C++
Raw Normal View History

#ifndef CSV_DOC_FILEWIDGET_H
#define CSV_DOC_FILEWIDGET_H
#include <QWidget>
#include <string>
class QLabel;
class QString;
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