openmw-tes3coop/apps/opencs/view/doc/filedialog.hpp
2013-10-22 21:52:35 -05:00

71 lines
1.2 KiB
C++

#ifndef FILEDIALOG_HPP
#define FILEDIALOG_HPP
#include <QDialog>
#include <QModelIndex>
#include "ui_filedialog.h"
class DataFilesModel;
class PluginsProxyModel;
namespace ContentSelectorView
{
class ContentSelector;
}
namespace CSVDoc
{
class FileWidget;
class FileDialog : public QDialog
{
Q_OBJECT
public:
enum DialogType
{
DialogType_New,
DialogType_Open
};
private:
ContentSelectorView::ContentSelector *mSelector;
Ui::FileDialog ui;
DialogType mDialogType;
FileWidget *mFileWidget;
public:
explicit FileDialog(QWidget *parent = 0);
void showDialog (DialogType dialogType);
void addFiles (const QString &path);
QString filename() const;
QStringList selectedFilePaths();
private:
void buildNewFileView();
void buildOpenFileView();
signals:
void openFiles();
void createNewFile();
public slots:
void slotRejected();
private slots:
void slotUpdateCreateButton (int);
void slotUpdateCreateButton (const QString &, bool);
};
}
#endif // FILEDIALOG_HPP