datasetControl.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: datasetControl.h,v 1.19.16.1 2007/03/25 21:26:18 oliver Exp $
00005 //
00006 
00007 #ifndef BALL_VIEW_WIDGETS_DATASETCONTROL_H
00008 #define BALL_VIEW_WIDGETS_DATASETCONTROL_H
00009 
00010 #ifndef BALL_KERNEL_SYSTEM_H
00011 # include <BALL/KERNEL/system.h>
00012 #endif
00013 
00014 #ifndef BALL_VIEW_WIDGETS_GENERICCONTROL_H
00015 # include <BALL/VIEW/WIDGETS/genericControl.h>
00016 #endif
00017 
00018 #include <QtGui/QTreeWidgetItem>
00019 
00020 namespace BALL
00021 {
00022   namespace VIEW
00023   {
00024     class Dataset;
00025     class DatasetController;
00026     class Message;
00027 
00036     class BALL_VIEW_EXPORT DatasetControl
00037       : public GenericControl
00038     {
00039       Q_OBJECT
00040 
00041       public:
00042 
00043       BALL_EMBEDDABLE(DatasetControl,GenericControl)
00044 
00045       
00051       DatasetControl(QWidget* parent = 0, const char* name = 0);
00052       
00055       virtual ~DatasetControl();
00056 
00061       virtual void onNotify(Message *message);
00062 
00065       virtual void initializeWidget(MainControl& main_control);
00066 
00070       virtual void checkMenu(MainControl& main_control);
00071 
00078       virtual bool canHandle(const String& fileformat) const;
00079 
00085       virtual bool openFile(const String& filename);
00086 
00091       virtual bool registerController(DatasetController* con);
00092 
00095       DatasetController* getController(const String& type);
00096 
00100       DatasetController* getController(QTreeWidgetItem* item);
00101 
00106       vector<Dataset*> getDatasets(const String& type);
00107 
00109       Size getSelectionSize();
00110 
00112       String getType(QTreeWidgetItem* item);
00113 
00115       virtual void deleteCurrentItems();
00116 
00117       public slots:
00118         
00119       // Overloaded from GenericControl 
00120 //        virtual void deleteCurrentItems();
00121 
00122       protected slots:
00123 
00124       virtual void showGuestContextMenu(const QPoint& pos);
00125       
00129       void updateSelection();
00130 
00131       protected:
00132       
00133       // only for Python Interface
00134       DatasetControl(const DatasetControl& control);
00135 
00136       vector<DatasetController*> controllers_;
00137     };
00138     
00139 } } // namespaces
00140 
00141 #endif // BALL_VIEW_WIDGETS_DATASETCONTROL_H