mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-13 02:15:10 +02:00
Added basic PDF export settings
This commit is contained in:
27
src/fileselectwidget.cpp
Normal file
27
src/fileselectwidget.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include <QPushButton>
|
||||
#include <QFileDialog>
|
||||
#include <QHBoxLayout>
|
||||
#include "fileselectwidget.h"
|
||||
|
||||
|
||||
FileSelectWidget::FileSelectWidget(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
_edit = new QLineEdit();
|
||||
_button = new QPushButton(tr("Browse..."));
|
||||
connect(_button, SIGNAL(clicked()), this, SLOT(browse()));
|
||||
|
||||
QHBoxLayout *layout = new QHBoxLayout();
|
||||
layout->setMargin(0);
|
||||
layout->addWidget(_edit);
|
||||
layout->addWidget(_button);
|
||||
setLayout(layout);
|
||||
}
|
||||
|
||||
void FileSelectWidget::browse()
|
||||
{
|
||||
QString fileName = QFileDialog::getSaveFileName(this, tr("Select file"),
|
||||
QDir::currentPath(), _filter);
|
||||
|
||||
if (!fileName.isEmpty())
|
||||
_edit->setText(fileName);
|
||||
}
|
Reference in New Issue
Block a user