BALL
1.4.1
|
#include <BALL/VIEW/DATATYPE/dataset.h>
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
virtual BALL::VIEW::DatasetController::~DatasetController | ( | ) | [virtual] |
virtual QMenu* BALL::VIEW::DatasetController::buildContextMenu | ( | QTreeWidgetItem * | item | ) | [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 void BALL::VIEW::DatasetController::checkMenu | ( | MainControl & | mc | ) | [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 bool BALL::VIEW::DatasetController::createMenuEntries | ( | ) | [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.
virtual bool BALL::VIEW::DatasetController::deleteDataset | ( | Dataset * | set | ) | [virtual] |
virtual bool BALL::VIEW::DatasetController::deleteDataset | ( | ) | [virtual, slot] |
Delete the currently highlighted Dataset.
virtual void BALL::VIEW::DatasetController::deleteDataset_ | ( | Dataset * | ) | [inline, protected, virtual] |
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.
virtual bool BALL::VIEW::DatasetController::deleteDatasets | ( | ) | [virtual, slot] |
Delete all Datasets.
Get the Dataset for a QTreeWidgetItem.
vector<Dataset*> BALL::VIEW::DatasetController::getDatasets | ( | ) |
Get all Datasets of this type in the DatasetControl.
String BALL::VIEW::DatasetController::getFileTypes_ | ( | ) | [protected] |
String BALL::VIEW::DatasetController::getNameFromFileName_ | ( | String | filename | ) | [protected] |
Get one selected Datasets of this type in the DatasetControl. If multiple entries are selected in the DatasetControl, 0 is returned.
Get all selected Datasets of this type in the DatasetControl.
vector<String> BALL::VIEW::DatasetController::getSupportedFileFormats | ( | ) | [inline] |
String BALL::VIEW::DatasetController::getType | ( | ) | [inline] |
virtual bool BALL::VIEW::DatasetController::handle | ( | DatasetMessage * | msg | ) | [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.
Test if a given QTreeWidgetItem corresponds to a registered Dataset.
virtual bool BALL::VIEW::DatasetController::insertDataset | ( | Dataset * | set | ) | [virtual] |
QAction* BALL::VIEW::DatasetController::insertMenuEntry_ | ( | Position | pid, |
const String & | name, | ||
const char * | slot, | ||
const String & | description = "" , |
||
QKeySequence | accel = QKeySequence() |
||
) | [protected] |
bool BALL::VIEW::DatasetController::open | ( | ) | [slot] |
Show a file dialog to open a data file. Calls open(String, String). Overload this method to support multiple file formats.
virtual Dataset* BALL::VIEW::DatasetController::open | ( | String | , |
String | |||
) | [protected, virtual] |
void BALL::VIEW::DatasetController::setDatasetControl | ( | DatasetControl * | dc | ) | [inline] |
void BALL::VIEW::DatasetController::setStatusbarText | ( | const String & | text, |
bool | important = false |
||
) | [protected] |
void BALL::VIEW::DatasetController::setStatusbarText | ( | const QString & | text, |
bool | important = false |
||
) | [protected] |
virtual bool BALL::VIEW::DatasetController::write | ( | ) | [virtual, slot] |
Show a file dialog for writing the selected Dataset.
Reimplemented in BALL::VIEW::RegularData3DController.
virtual bool BALL::VIEW::DatasetController::write | ( | Dataset * | , |
String | , | ||
String | |||
) | [protected, virtual] |
friend class DatasetControl [friend] |
vector<QAction*> BALL::VIEW::DatasetController::actions_ [protected] |
HashSet<QAction*> BALL::VIEW::DatasetController::actions_for_one_set_ [protected] |
DatasetControl* BALL::VIEW::DatasetController::control_ [protected] |
HashMap<Dataset*, QTreeWidgetItem*> BALL::VIEW::DatasetController::dataset_to_item_ [protected] |
vector<String> BALL::VIEW::DatasetController::file_formats_ [protected] |
HashMap<QTreeWidgetItem*, Dataset*> BALL::VIEW::DatasetController::item_to_dataset_ [protected] |
String BALL::VIEW::DatasetController::type_ [protected] |