1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 19:55:53 +01:00
GPXSee/src/fileselectwidget.h

36 lines
613 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);
2016-05-25 23:27:07 +02:00
QString file() {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;}
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