OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
filedialog.hpp
Go to the documentation of this file.
1 #ifndef FILEDIALOG_HPP
2 #define FILEDIALOG_HPP
3 
4 #include <QDialog>
5 #include <QModelIndex>
6 
7 #include <boost/filesystem/path.hpp>
8 #include "adjusterwidget.hpp"
9 
10 #ifndef CS_QT_BOOST_FILESYSTEM_PATH_DECLARED
11 #define CS_QT_BOOST_FILESYSTEM_PATH_DECLARED
12 Q_DECLARE_METATYPE (boost::filesystem::path)
13 #endif
14 
15 #include "ui_filedialog.h"
16 
17 namespace ContentSelectorView
18 {
19  class ContentSelector;
20 }
21 
22 namespace CSVDoc
23 {
24  class FileWidget;
25 
26  class FileDialog : public QDialog
27  {
28  Q_OBJECT
29 
30  private:
31 
33  Ui::FileDialog ui;
38 
39  public:
40 
41  explicit FileDialog(QWidget *parent = 0);
42  void showDialog (ContentAction action);
43 
44  void addFiles (const QString &path);
45  void clearFiles ();
46 
47  QString filename() const;
48  QStringList selectedFilePaths();
49 
50  void setLocalData (const boost::filesystem::path& localData);
51 
52  private:
53 
54  void buildNewFileView();
55  void buildOpenFileView();
56 
57  signals:
58 
59  void signalOpenFiles (const boost::filesystem::path &path);
60  void signalCreateNewFile (const boost::filesystem::path &path);
61 
62  void signalUpdateAcceptButton (bool, int);
63 
64  private slots:
65 
66  void slotNewFile();
67  void slotOpenFile();
68  void slotUpdateAcceptButton (int);
69  void slotUpdateAcceptButton (const QString &, bool);
70  void slotRejected();
71  void slotAddonDataChanged(const QModelIndex& topleft, const QModelIndex& bottomright);
72  };
73 }
74 #endif // FILEDIALOG_HPP
Definition: adjusterwidget.hpp:19
Definition: filedialog.hpp:26
ContentAction
Definition: adjusterwidget.hpp:12
void slotUpdateAcceptButton(int)
Definition: filedialog.cpp:142
static const struct @2 signals[]
Definition: contentselector.hpp:13
void addFiles(const QString &path)
Definition: filedialog.cpp:31
void buildNewFileView()
Definition: filedialog.cpp:93
void slotOpenFile()
Definition: filedialog.cpp:204
bool mDialogBuilt
Definition: filedialog.hpp:37
void showDialog(ContentAction action)
Definition: filedialog.cpp:56
void signalOpenFiles(const boost::filesystem::path &path)
ContentAction mAction
Definition: filedialog.hpp:34
FileDialog(QWidget *parent=0)
Definition: filedialog.cpp:20
Definition: filewidget.hpp:14
FileWidget * mFileWidget
Definition: filedialog.hpp:35
QStringList selectedFilePaths()
Definition: filedialog.cpp:41
void setLocalData(const boost::filesystem::path &localData)
Definition: filedialog.cpp:51
void clearFiles()
Definition: filedialog.cpp:36
QString filename() const
Definition: filedialog.cpp:171
AdjusterWidget * mAdjusterWidget
Definition: filedialog.hpp:36
ContentSelectorView::ContentSelector * mSelector
Definition: filedialog.hpp:32
void slotRejected()
Definition: filedialog.cpp:179
Ui::FileDialog ui
Definition: filedialog.hpp:33
void signalUpdateAcceptButton(bool, int)
void buildOpenFileView()
Definition: filedialog.cpp:120
void slotNewFile()
Definition: filedialog.cpp:192
void signalCreateNewFile(const boost::filesystem::path &path)
void slotAddonDataChanged(const QModelIndex &topleft, const QModelIndex &bottomright)
Definition: filedialog.cpp:137