Tome
A generic data editor for games supporting arbitrary input and output formats.
duplicaterecordwindow.h
1 #ifndef DUPLICATERECORDWINDOW_H
2 #define DUPLICATERECORDWINDOW_H
3 
4 #include "../../Records/Controller/recordnamevalidator.h"
5 
6 #include <QDialog>
7 
8 namespace Ui {
10 }
11 
15 class DuplicateRecordWindow : public QDialog
16 {
17  Q_OBJECT
18 
19  public:
24  explicit DuplicateRecordWindow(QWidget *parent = 0);
26 
31  QString getRecordId() const;
32 
37  void setDisallowedRecordIds(const QStringList disallowedRecordIds);
38 
43  void setRecordId(const QString& id);
44 
45  public slots:
49  void accept();
50 
51  protected:
56  void showEvent(QShowEvent* event);
57 
58  private:
59  Ui::DuplicateRecordWindow *ui;
60 
61  QStringList disallowedRecordIds;
62  Tome::RecordNameValidator nameValidator;
63 
64  bool validate();
65 };
66 
67 #endif // DUPLICATERECORDWINDOW_H
Definition: mainwindow.h:25
Validates record names, ensuring they&#39;re not empty and don&#39;t start or end with spaces.
Definition: recordnamevalidator.h:11
Window for duplicating an existing record, including all of its field values.
Definition: duplicaterecordwindow.h:15