#include <QicsPasteValidator.h>
Public Member Functions | |
| virtual bool | validate (const QicsICell &dest_cell, const QicsSelectionList *source_selection, const QicsDataModel &source_items, const QicsDataModel *main_dm)=0 |
Abstract class for paste validator. This validator will be used when data is pasted into cell/cells(through drag&drop or QicsTable::paste() method).To use it you must subclass it and reimplement pure virtual method validate(const QicsDataModel&).
| virtual bool QicsPasteValidator::validate | ( | const QicsICell & | dest_cell, | |
| const QicsSelectionList * | source_selection, | |||
| const QicsDataModel & | source_items, | |||
| const QicsDataModel * | main_dm | |||
| ) | [pure virtual] |
Reimplement this method for your own paste validator. dest_cell - destination cell where data is going to be pasted. source_selection - selection from what data is going to be pasted(through drag&drop). When you are pasting data through QicsTable::copy() and QicsTable::paste() methods or data from external applications source_selection will be a NULL pointer. source_items - const reference to data model that contains items to be pasted. main_dm - pointer to main table's data model.