GInformationInterface.h

00001 /***************************************************************************
00002  *   Copyright (C) 2006 by Raphael Langerhorst                             *
00003  *   raphael-langerhorst@gmx.at                                            *
00004  *                                                                         *
00005  *   Permission is hereby granted, free of charge, to any person obtaining *
00006  *   a copy of this software and associated documentation files (the       *
00007  *   "Software"), to deal in the Software without restriction, including   *
00008  *   without limitation the rights to use, copy, modify, merge, publish,   *
00009  *   distribute, sublicense, and/or sell copies of the Software, and to    *
00010  *   permit persons to whom the Software is furnished to do so, subject to *
00011  *   the following conditions:                                             *
00012  *                                                                         *
00013  *   The above copyright notice and this permission notice shall be        *
00014  *   included in all copies or substantial portions of the Software.       *
00015  *                                                                         *
00016  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
00017  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
00018  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*
00019  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
00020  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
00021  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
00022  *   OTHER DEALINGS IN THE SOFTWARE.                                       *
00023  ***************************************************************************/
00024 
00025 #ifndef GINFORMATIONINTERFACEH
00026 #define GINFORMATIONINTERFACEH
00027 
00028 #include <QObject>
00029 #include <QList>
00030 
00031 namespace GCS
00032 {
00033   class GElementID;
00034   class GElement;
00035   class GEnergy;
00036   class GForm;
00037   class GMatrix44;
00038   class GElementData;
00039 }
00040 
00041 namespace GWE
00042 {
00043 
00044 class GDataController;
00045 
00053 class GInformationInterface : public QObject
00054 {
00055   Q_OBJECT
00056   
00057   protected:
00058   
00065     GDataController* Data;
00066     
00067   public:
00068   
00074     GInformationInterface(QObject* parent = 0);
00075     
00079     virtual ~GInformationInterface();
00080     
00084     virtual const GCS::GElement* read(const GCS::GElementID& id) const;
00085     
00090     virtual GCS::GElementID getParent(const GCS::GElementID& child) const;
00091     
00096     virtual QList<GCS::GElementID> getChildren(const GCS::GElementID& parent) const;
00097     
00101     virtual GCS::GElementID getConnection(const GCS::GElementID& element) const;
00102     
00107     virtual QString getElementOwner(const GCS::GElementID& element) const;
00108     
00112     virtual void setDataController(GDataController* data);
00113     
00114   protected slots:
00115   
00120     virtual void collectParentChanged( const GCS::GElementID&, const GCS::GElementID&, const GCS::GMatrix44& );
00121   
00127     virtual void connectOpenedElement(const GCS::GElementID&);
00128     
00133     virtual void collectEnergyChanged(const GCS::GEnergy& energy);
00134     
00139     virtual void collectFormChanged(const GCS::GForm& form);
00140     
00145     virtual void collectElementDataChanged(const QString& xmlpath);
00146     
00151     virtual void collectElementAdded(const GCS::GElementID& );
00152   
00153   
00154   signals:
00155   
00156   
00157     //BEGIN SIGNALS FROM ELEMENTS THEMSELVES
00158   
00166     void elementChanged(const GCS::GElementID& element);
00167     
00172     void elementEnergyChanged(const GCS::GElementID& element, const GCS::GEnergy& changedEnergy);
00173 
00178     void elementFormChanged(const GCS::GElementID& element, const GCS::GForm& changedForm);
00179 
00184     void elementDataChanged(const GCS::GElementID& element, const QString& xmlpath);
00185   
00195     void elementParentChanged(const GCS::GElementID& element, const GCS::GElementID& new_parent, const GCS::GElementID& old_parent, const GCS::GMatrix44& transformation);
00196     
00197     //END SIGNALS FROM ELEMENTS THEMSELVES
00198     
00203     void elementAdded(const GCS::GElementID& element, const GCS::GElementID& parent);
00204     
00211     void elementUpdated(const GCS::GElementID& element);
00212     
00216     void elementRemoved(const GCS::GElementID& element);
00217 };
00218 
00219 }
00220 
00221 #endif

Generated on Thu Nov 16 07:49:12 2006 for G System by  doxygen 1.4.7