15 QFileDialog(parent), p_filterList(filterList), p_dir(directory) {
20 this->setOptions(QFileDialog::DontUseNativeDialog);
22 this->setWindowTitle(title);
23 this->setFileMode(QFileDialog::ExistingFiles);
25 parent->installEventFilter(
this);
26 p_appName = parent->windowTitle();
28 connect(
this, SIGNAL(accepted()),
this, SLOT(
sendSignal()));
31 this->setNameFilters(p_filterList);
33 this->setViewMode(QFileDialog::Detail);
34 if(directory.exists()) {
35 this->setDirectory(directory);
38 this->setDirectory(QDir::current());
41 p_comboBoxes = this->findChildren<QComboBox *>();
42 p_comboBoxes[0]->setEditable(
true);
43 p_comboBoxes[1]->setEditable(
true);
45 QLineEdit *lineEdit = p_comboBoxes[1]->lineEdit();
47 disconnect(lineEdit, 0, 0, 0);
48 connect(lineEdit, SIGNAL(textChanged(
const QString &)), p_comboBoxes[1],
49 SIGNAL(activated(
const QString &)));
50 connect(lineEdit, SIGNAL(editingFinished()),
this,
54 p_allPButtons = this->findChildren<QPushButton *>();
55 for(
int i = 0; i < p_allPButtons.size(); i++) {
57 disconnect(p_allPButtons[i], 0, 0, 0);
58 if(p_allPButtons[i]->text().contains(
"Open", Qt::CaseInsensitive)) {
59 connect(p_allPButtons[i], SIGNAL(clicked()),
this, SLOT(
done()));
61 if(p_allPButtons[i]->text().contains(
"Cancel", Qt::CaseInsensitive)) {
64 connect(p_allPButtons[i], SIGNAL(clicked()),
this, SLOT(
cancel()));
151 if(p_appName ==
"") {
152 p_appName = this->windowTitle();
155 QString instanceName = this->windowTitle();
157 Isis::FileName config(
"$HOME/.Isis/" + p_appName +
"/" + instanceName +
".config");
158 QSettings settings(config.expanded(), QSettings::NativeFormat);
159 QPoint pos = settings.value(
"pos", QPoint(300, 100)).toPoint();
160 QSize size = settings.value(
"size", QSize(355, 350)).toSize();