Entry.h 884 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef ENTRY_H
  2. #define ENTRY_H
  3. #include <QString>
  4. #include <QStringList>
  5. #include <QMap>
  6. #include <QPair>
  7. #include "Decl.h"
  8. namespace experimental {
  9. /*!
  10. * \brief The Entry class encapsulates table metadata(table name, row id)
  11. * and data for new and existing entries in the database to operate on.
  12. */
  13. class Entry {
  14. public:
  15. DataPosition position;
  16. protected:
  17. TableData tableData;
  18. public:
  19. Entry() = default;
  20. Entry(const Entry&) = default;
  21. Entry& operator=(const Entry&) = default;
  22. Entry(DataPosition position_);
  23. void setData(TableData table_data);
  24. const TableData& getData();
  25. };
  26. class PilotEntry : public Entry {
  27. public:
  28. PilotEntry() = default;
  29. PilotEntry(const PilotEntry& pe);
  30. PilotEntry& operator=(const PilotEntry& pe) = default;
  31. PilotEntry(int row_id);
  32. PilotEntry(TableData fromNewPilotDialog);
  33. };
  34. }
  35. #endif // ENTRY_H