1 #ifndef CNOID_BASE_FILE_DIALOG_H
2 #define CNOID_BASE_FILE_DIALOG_H
4 #include <cnoid/Signal>
6 #include "exportdecl.h"
14 FileDialog(QWidget* parent, Qt::WindowFlags f = 0);
17 void updatePresetDirectories();
18 bool selectFilePath(
const std::string& filePath);
19 void insertOptionPanel(QWidget* panel);
24 virtual int exec()
override;
27 QFileDialog* fileDialog();
30 QDir directory()
const;
31 QStringList nameFilters()
const;
32 QStringList selectedFiles()
const;
33 void selectFile(
const QString& filename);
34 void selectFile(
const std::string& filename);
35 void setAcceptMode(QFileDialog::AcceptMode mode);
36 void setDirectory(
const QString& directory);
37 void setDirectory(
const std::string& directory);
38 void setFileMode(QFileDialog::FileMode mode);
39 void setLabelText(QFileDialog::DialogLabel label,
const QString& text);
40 void setNameFilter(
const QString& filter);
41 void setNameFilters(
const QStringList& filters);
42 void setOption(QFileDialog::Option option,
bool on =
true);
43 void setViewMode(QFileDialog::ViewMode mode);
46 void selectNameFilter(
int index);