BALL
1.4.79
|
#include <BALL/VIEW/DATATYPE/dataset.h>
Public Slots | |
virtual bool | write () |
Show a file dialog for writing the selected Dataset. More... | |
bool | open () |
virtual bool | deleteDatasets () |
Delete all Datasets. More... | |
virtual bool | deleteDataset () |
Delete the currently highlighted Dataset. More... | |
Protected Member Functions | |
void | setStatusbarText (const String &text, bool important=false) |
void | setStatusbarText (const QString &text, bool important=false) |
virtual bool | write (Dataset *, String, String) |
virtual Dataset * | open (String, String) |
String | getFileTypes_ () |
String | getNameFromFileName_ (String filename) |
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 void | deleteDataset_ (Dataset *) |
Protected Attributes | |
String | type_ |
vector< String > | file_formats_ |
DatasetControl * | control_ |
vector< QAction * > | actions_ |
HashSet< QAction * > | actions_for_one_set_ |
HashMap< QTreeWidgetItem *, Dataset * > | item_to_dataset_ |
HashMap< Dataset *, QTreeWidgetItem * > | dataset_to_item_ |
Friends | |
class | DatasetControl |
Additional Inherited Members | |
Public Types inherited from BALL::Embeddable | |
typedef std::vector< Embeddable * > | EmbeddableVector |
Static Protected Member Functions inherited from BALL::Embeddable | |
static void | registerInstance_ (const std::type_info &type, const Embeddable *instance) |
static void | unregisterInstance_ (const Embeddable *instance) |
static Size | countInstances_ (const std::type_info &type) |
static Embeddable * | getInstance_ (const std::type_info &type, Position index) |
static Embeddable * | getInstance_ (const std::type_info &type, const String &identifier) |
Controller base class for one type of Dataset A DatasetController provides all neccessary means to manage and manipulate a kind of data in the DatasetControl. The class has the following features:
To use this class, derive a new class from it and overload/create the following methods:
Furthermore
BALL::VIEW::DatasetController::DatasetController | ( | ) |
BALL::VIEW::DatasetController::DatasetController | ( | DatasetController & | dc | ) |
|
virtual |
|
virtual |
Create a context menu for this data type. Initial support for deleting and saving entries is included. Overload this method for providing further entries.
Reimplemented in BALL::VIEW::RaytraceableGridController, BALL::VIEW::VectorGridController, BALL::VIEW::DockResultController, BALL::VIEW::TrajectoryController, and BALL::VIEW::RegularData3DController.
|
virtual |
Check the menu entries for this data type. If the MainControl is currently busy, all entries are disabled. If multiple entries are selected, it is tested, if an QAction is included in actions_for_one_set_. If true, this QAction is disabled. Overload this method for more sophisticated behaviour.
|
virtual |
Create menu entries for this data type. Initial support for open file menu entry is included. Overload this method for providing further entries.
Reimplemented in BALL::VIEW::RaytraceableGridController, BALL::VIEW::VectorGridController, BALL::VIEW::DockResultController, BALL::VIEW::TrajectoryController, and BALL::VIEW::RegularData3DController.
|
virtualslot |
Delete the currently highlighted Dataset.
|
inlineprotectedvirtual |
In the derived class: cast to concrete type and delete the data!
Reimplemented in BALL::VIEW::RaytraceableGridController, BALL::VIEW::VectorGridController, BALL::VIEW::DockResultController, BALL::VIEW::TrajectoryController, and BALL::VIEW::RegularData3DController.
|
virtualslot |
Delete all Datasets.
Dataset* BALL::VIEW::DatasetController::getDataset | ( | QTreeWidgetItem * | item | ) |
Get the Dataset for a QTreeWidgetItem.
|
inline |
vector<Dataset*> BALL::VIEW::DatasetController::getDatasets | ( | ) |
Get all Datasets of this type in the DatasetControl.
|
protected |
Dataset* BALL::VIEW::DatasetController::getSelectedDataset | ( | ) |
Get one selected Datasets of this type in the DatasetControl. If multiple entries are selected in the DatasetControl, 0 is returned.
vector<Dataset*> BALL::VIEW::DatasetController::getSelectedDatasets | ( | ) |
Get all selected Datasets of this type in the DatasetControl.
|
inline |
|
inline |
|
virtual |
Message handling. If a DatasetControl receives a DatasetMessage, it queries the data type and calls this method in the corresponding DatasetController. This method has intial support for DatasetMessage::ADD and DatasetMessage::REMOVE. For these cases, it calls insertDataset or respectively deleteDataset.
Test if a Dataset is registered in this controller.
bool BALL::VIEW::DatasetController::hasItem | ( | QTreeWidgetItem * | item | ) |
Test if a given QTreeWidgetItem corresponds to a registered Dataset.
|
protected |
|
slot |
Show a file dialog to open a data file. Calls open(String, String). Overload this method to support multiple file formats.
|
inline |
|
protected |
|
protected |
|
virtualslot |
Show a file dialog for writing the selected Dataset.
Reimplemented in BALL::VIEW::RegularData3DController.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |