namespace tabular_decoder {
+// When adding an entry here, don't forget to update SaveTypeNames as well
+enum SaveType {
+ SaveTypeCSVEscaped,
+ SaveTypeCSVQuoted,
+ SaveTypeCount // Indicates how many save types there are, must always be last
+};
+
+extern const char* SaveTypeNames[SaveTypeCount];
+
+
class AnnotationCollectionModel : public QAbstractTableModel, public GlobalSettingsInterface
{
Q_OBJECT
public:
AnnotationCollectionModel(QObject* parent = nullptr);
+ QVariant data_from_ann(const Annotation* ann, int index) const;
QVariant data(const QModelIndex& index, int role) const override;
Qt::ItemFlags flags(const QModelIndex& index) const override;
void reset_data();
void update_data();
- void save_data() const;
+ void save_data_as_csv(unsigned int save_type) const;
private Q_SLOTS:
void on_selected_decoder_changed(int index);
void on_actionSave_triggered(QAction* action = nullptr);
+ void on_table_item_clicked(const QModelIndex& index);
+ void on_table_item_double_clicked(const QModelIndex& index);
+ void on_table_header_requested(const QPoint& pos);
+ void on_table_header_toggled(bool checked);
+
virtual void perform_delayed_view_update();
private:
data::DecodeSignal* signal_;
const data::decode::Decoder* decoder_;
- bool updating_data_;
};
} // namespace tabular_decoder