Tome
A generic data editor for games supporting arbitrary input and output formats.
listitemwindow.h
1 #ifndef LISTITEMWINDOW_H
2 #define LISTITEMWINDOW_H
3 
4 #include <QDialog>
5 
6 namespace Ui {
7  class ListItemWindow;
8 }
9 
10 namespace Tome
11 {
12  class CustomType;
13  class FieldValueWidget;
14  class FacetsController;
15  class ProjectController;
16  class RecordsController;
17  class TypesController;
18 }
19 
23 class ListItemWindow : public QDialog
24 {
25  Q_OBJECT
26 
27  public:
36  explicit ListItemWindow(Tome::FacetsController& facetsController,
37  Tome::ProjectController& projectController,
38  Tome::RecordsController& recordsController,
39  Tome::TypesController& typesController,
40  QWidget *parent = 0);
41  ~ListItemWindow();
42 
47  QVariant getValue() const;
48 
53  void setValue(const QVariant& value);
54 
59  void setFieldType(const QString& fieldType) const;
60 
61  public slots:
65  void accept() Q_DECL_OVERRIDE;
66 
67  protected:
72  virtual void showEvent(QShowEvent* event) Q_DECL_OVERRIDE;
73 
74  private:
75  Ui::ListItemWindow *ui;
76  Tome::FieldValueWidget* fieldValueWidget;
77 
78  Tome::FacetsController& facetsController;
79  Tome::ProjectController& projectController;
80  Tome::RecordsController& recordsController;
81  Tome::TypesController& typesController;
82 
83  bool validate();
84 };
85 
86 #endif // LISTITEMWINDOW_H
Definition: commandlineoptions.h:6
Controller for adding, updating and removing records.
Definition: recordscontroller.h:21
Definition: mainwindow.h:25
Changes its appearance depending on the specified type.
Definition: fieldvaluewidget.h:35
Controller for adding, updating and removing custom types.
Definition: typescontroller.h:14
Controller for validating type facets.
Definition: facetscontroller.h:16
Controller for creating, loading and saving projects.
Definition: projectcontroller.h:22
Window for editing the value of a single list item.
Definition: listitemwindow.h:23