2 * \file FileDialog_private.C
3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
13 #include <qapplication.h>
14 #include <qfiledialog.h>
16 #include "QtLyXView.h"
18 #include "funcrequest.h"
20 #include "FileDialog_private.h"
22 LyXFileDialog::LyXFileDialog(LyXView * lv, kb_action a,
23 string const & p, string const & m, string const & t)
24 : QFileDialog(p.c_str(), m.c_str(), qApp->mainWidget(), t.c_str(),
25 a == LFUN_SELECT_FILE_SYNC),
28 setCaption(t.c_str());
32 void LyXFileDialog::done(int what)
34 lyxerr[Debug::GUI] << "Done FileDialog, value " << what << std::endl;
36 if (action_ == LFUN_SELECT_FILE_SYNC) {
41 if (what == QDialog::Accepted)
42 lv_->getLyXFunc().dispatch(FuncRequest(action_, selectedFile().data()));