Empty branches are always unscrolled after import, relinking to scrolled branch doesn't open branch
3 #include "exportoofiledialog.h"
5 ExportOOFileDialog::ExportOOFileDialog():QFileDialog()
10 ExportOOFileDialog::ExportOOFileDialog (QWidget * parent, const QString &caption ):QFileDialog(parent, caption)
15 bool ExportOOFileDialog::foundConfig()
17 return !filters.isEmpty();
21 QString ExportOOFileDialog::selectedConfig()
23 QStringList::Iterator itpath=configPaths.begin();
24 QStringList::Iterator itf=filters.begin();
25 while (itf != filters.end())
27 if (*itf==selectedFilter()) return *itpath;
31 qWarning ("ExportOOFileDialog::selectedConfig No filter found!");
35 void ExportOOFileDialog::newConfigPath(const QString &s)
40 QString ExportOOFileDialog::selectedFile()
42 return QFileDialog::selectedFile();
46 void ExportOOFileDialog::show()
52 void ExportOOFileDialog::init()
54 setMode( QFileDialog::AnyFile );
56 d.setPath (vymBaseDir.path()+"/exports");
58 d.setPath (d.homeDirPath()+"/.vym/exports");
62 this,SIGNAL (filterSelected(const QString&)),
63 this, SLOT( newConfigPath(const QString &)));
66 void ExportOOFileDialog::addFilter(const QString &f)
72 void ExportOOFileDialog::scanExportConfigs(QDir dir)
74 // Scan existing export configurations
80 dir.setFilter(QDir::Files | QDir::Hidden | QDir::NoSymLinks);
82 QFileInfoList list = dir.entryInfoList();
83 for (int i = 0; i < list.size(); ++i) {
84 QFileInfo fi = list.at(i);
86 if (fi.fileName().endsWith(".conf") )
88 configPaths.append (fi.absFilePath());
90 set.readSettings (fi.absFilePath());
91 addFilter (set.readEntry(QString("Name")) + " (*.odp)");