1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00
openmw-tes3mp/apps/opencs/view/doc/filedialog.hpp

70 lines
1.3 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();
void signalUpdateCreateButton (bool, int);
void signalUpdateCreateButtonFlags(int);
private slots:
void slotUpdateCreateButton (int);
void slotUpdateCreateButton (const QString &, bool);
void slotRejected();
};
}
#endif // FILEDIALOG_HPP