Go to the documentation of this file.
5 #ifndef BALL_VIEW_DATATYPE_DATASET_H
6 #define BALL_VIEW_DATATYPE_DATASET_H
8 #ifndef BALL_DATATYPE_STRING_H
12 #ifndef BALL_DATATYPE_HASHMAP_H
16 #ifndef BALL_DATATYPE_HASHSET_H
20 #ifndef BALL_CONCEPT_EMBEDDABLE_H
24 #ifndef BALL_VIEW_KERNEL_UIOPERATIONMODE_H
28 #include <QtWidgets/QMenu>
29 #include <QtWidgets/QTreeWidgetItem>
131 #define BALL_CREATE_DATASET(TYPE)\
132 class BALL_VIEW_EXPORT TYPE##Dataset\
137 TYPE##Dataset(TYPE* data = 0)\
142 TYPE##Dataset(const TYPE##Dataset& set)\
147 TYPE* getData() { return data_;}\
149 void setData(TYPE* data) { data_ = data;}\
314 const String& description =
"", QKeySequence accel = QKeySequence(),
315 const QString& menu_hint =
"",
334 #endif // BALL_VIEW_DATATYPE_DATASET_H
void setName(String name)
void set(const Dataset &v)
virtual bool write()
Show a file dialog for writing the selected Dataset.
virtual bool insertDataset(Dataset *set)
HashMap class based on the STL map (containing serveral convenience functions)
bool hasDataset(Dataset *set)
DatasetControl * control_
vector< Dataset * > getDatasets()
Get all Datasets of this type in the DatasetControl.
Composite * getComposite() const
Dataset * getDataset(QTreeWidgetItem *item)
Get the Dataset for a QTreeWidgetItem.
virtual bool handle(DatasetMessage *msg)
Dataset * getSelectedDataset()
vector< QAction * > actions_
#define BALL_EMBEDDABLE(TYPE, BASE)
String getNameFromFileName_(String filename)
virtual bool createMenuEntries()
HashMap< QTreeWidgetItem *, Dataset * > item_to_dataset_
void setStatusbarText(const String &text, bool important=false)
virtual bool write(Dataset *, String, String)
HashSet< QAction * > actions_for_one_set_
bool hasItem(QTreeWidgetItem *item)
Test if a given QTreeWidgetItem corresponds to a registered Dataset.
virtual void checkMenu(MainControl &mc)
void setStatusbarText(const QString &text, bool important=false)
QAction * insertMenuEntry_(Position pid, const QString &name, const char *slot, const String &description="", QKeySequence accel=QKeySequence(), const QString &menu_hint="", UIOperationMode::OperationMode initial_mode=UIOperationMode::MODE_ALL)
virtual bool deleteDataset(Dataset *set)
void setType(String type)
void dump(std::ostream &s, Size depth) const
virtual Dataset * open(String, String)
vector< Dataset * > getSelectedDatasets()
Get all selected Datasets of this type in the DatasetControl.
Dataset(const Dataset &dataset)
virtual bool deleteDatasets()
Delete all Datasets.
virtual bool deleteDataset()
Delete the currently highlighted Dataset.
vector< String > getSupportedFileFormats()
virtual void deleteDataset_(Dataset *)
HashMap< Dataset *, QTreeWidgetItem * > dataset_to_item_
vector< String > file_formats_
DatasetControl * getDatasetControl()
virtual QMenu * buildContextMenu(QTreeWidgetItem *item)
void setComposite(Composite *composite)