1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-08 15:24:01 +01:00
GPXSee/src/GUI/fileselectwidget.h

37 lines
658 B
C
Raw Normal View History

2016-05-24 03:01:22 +02:00
#ifndef FILESELECTWIDGET_H
#define FILESELECTWIDGET_H
#include <QWidget>
#include <QLineEdit>
2016-10-12 22:37:40 +02:00
class QPushButton;
2016-10-11 03:17:30 +02:00
class QToolButton;
2016-05-24 03:01:22 +02:00
class FileSelectWidget : public QWidget
{
Q_OBJECT
public:
FileSelectWidget(QWidget *parent = 0);
2020-09-27 00:34:38 +02:00
QString file() const {return _edit->text();}
2016-05-24 03:01:22 +02:00
void setFile(const QString &file) {_edit->setText(file);}
void setFilter(const QString &filter) {_filter = filter;}
2020-09-27 00:34:38 +02:00
bool checkFile(QString &error) const;
2016-05-24 03:01:22 +02:00
private slots:
void browse();
private:
QLineEdit *_edit;
2016-10-12 22:37:40 +02:00
#ifdef Q_OS_WIN32
QPushButton *_button;
#else // Q_OS_WIN32
2016-10-11 03:17:30 +02:00
QToolButton *_button;
2016-10-12 22:37:40 +02:00
#endif // Q_OS_WIN32
2016-05-24 03:01:22 +02:00
QString _filter;
};
#endif // FILESELECTWIDGET_H