OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
contentselector.hpp
Go to the documentation of this file.
1 #ifndef CONTENTSELECTOR_HPP
2 #define CONTENTSELECTOR_HPP
3 
4 #include <QDialog>
5 
6 #include "ui_contentselector.h"
8 
10 
11 namespace ContentSelectorView
12 {
13  class ContentSelector : public QObject
14  {
15  Q_OBJECT
16 
18 
19  protected:
20 
23 
24  public:
25 
26  explicit ContentSelector(QWidget *parent = 0);
27 
28  QString currentFile() const;
29 
30  void addFiles(const QString &path);
31  void clearFiles();
32  void setProfileContent (const QStringList &fileList);
33 
34  void clearCheckStates();
35  void setEncoding (const QString &encoding);
36  void setContentList(const QStringList &list);
37 
39 
40  void setGameFile (const QString &filename = QString(""));
41 
42  bool isGamefileSelected() const
43  { return ui.gameFileView->currentIndex() != -1; }
44 
45  QWidget *uiWidget() const
46  { return ui.contentGroupBox; }
47 
48 
49  private:
50 
51  Ui::ContentSelector ui;
52 
53  void buildContentModel();
54  void buildGameFileView();
55  void buildAddonView();
56  void buildContextMenu();
57  void setGameFileSelected(int index, bool selected);
58  void setCheckStateForMultiSelectedItems(bool checked);
59 
60  signals:
62 
63  void signalAddonDataChanged (const QModelIndex& topleft, const QModelIndex& bottomright);
64  void signalSelectedFilesChanged(QStringList selectedFiles);
65 
66  private slots:
67 
68  void slotCurrentGameFileIndexChanged(int index);
69  void slotAddonTableItemActivated(const QModelIndex& index);
70  void slotShowContextMenu(const QPoint& pos);
74  };
75 }
76 
77 #endif // CONTENTSELECTOR_HPP
bool isGamefileSelected() const
Definition: contentselector.hpp:42
Definition: contentselector.hpp:13
QSortFilterProxyModel * mAddonProxyModel
Definition: contentselector.hpp:22
void buildAddonView()
Definition: contentselector.cpp:46
void buildContextMenu()
Definition: contentselector.cpp:63
QMenu * mContextMenu
Definition: contentselector.hpp:17
static const struct @8 signals[]
void slotAddonTableItemActivated(const QModelIndex &index)
Definition: contentselector.cpp:206
void signalAddonDataChanged(const QModelIndex &topleft, const QModelIndex &bottomright)
void slotCopySelectedItemsPaths()
Definition: contentselector.cpp:251
int list(Bsa::BSAFile &bsa, Arguments &info)
Definition: bsatool.cpp:182
void buildContentModel()
Definition: contentselector.cpp:27
void setEncoding(const QString &encoding)
Definition: contentselector.cpp:116
void setContentList(const QStringList &list)
Definition: contentselector.cpp:121
ContentSelector(QWidget *parent=0)
Definition: contentselector.cpp:16
void clearCheckStates()
Definition: contentselector.cpp:111
void setGameFileSelected(int index, bool selected)
Definition: contentselector.cpp:195
ContentSelectorModel::ContentFileList selectedFiles() const
Definition: contentselector.cpp:132
Ui::ContentSelector ui
Definition: contentselector.hpp:51
QList< EsmFile * > ContentFileList
Definition: contentmodel.hpp:12
Definition: contentmodel.hpp:22
void addFiles(const QString &path)
Definition: contentselector.cpp:140
void slotShowContextMenu(const QPoint &pos)
Definition: contentselector.cpp:222
void setGameFile(const QString &filename=QString(""))
Definition: contentselector.cpp:91
void setCheckStateForMultiSelectedItems(bool checked)
Definition: contentselector.cpp:228
void buildGameFileView()
Definition: contentselector.cpp:33
void slotCheckMultiSelectedItems()
Definition: contentselector.cpp:246
QString currentFile() const
Definition: contentselector.cpp:164
void slotCurrentGameFileIndexChanged(int index)
Definition: contentselector.cpp:175
QWidget * uiWidget() const
Definition: contentselector.hpp:45
void signalSelectedFilesChanged(QStringList selectedFiles)
ContentSelectorModel::ContentModel * mContentModel
Definition: contentselector.hpp:21
void clearFiles()
Definition: contentselector.cpp:159
void setProfileContent(const QStringList &fileList)
Definition: contentselector.cpp:74
void slotUncheckMultiSelectedItems()
Definition: contentselector.cpp:241