GElementInfoWidget.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by the G System Team                               *
00003  *   http://www.g-system.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 GELEMENTINFOWIDGET_H
00026 #define GELEMENTINFOWIDGET_H
00027 
00028 namespace GCS
00029 {
00030   class GEnergy;
00031   class GForm;
00032   class GElement;
00033 }
00034 
00035 #include <GElementID.h>
00036 
00037 #include <QWidget>
00038 #include <QVBoxLayout>
00039 #include <QList>
00040 
00041 class QLabel;
00042 class QListWidget;
00043 
00044 namespace GCE
00045 {
00046 
00058 class GElementInfoWidget : public QWidget
00059 {
00060   Q_OBJECT
00061   protected:
00062     
00066     const GCS::GElement* Element;
00067     
00071     QLabel* EnergyLevel;
00072     
00076     QLabel* EnergyAmount;
00077     
00081     QLabel* EnergySigma;
00082     
00086     QLabel* FormPositionX;
00087     
00091     QLabel* FormPositionY;
00092     
00096     QLabel* FormPositionZ;
00097     
00101     QLabel* Parent;
00102     
00106     QLabel* ElementID;
00107     
00111     QListWidget* Children;
00112     
00116     QLabel* Connection;
00117     
00118   protected:
00119     
00123 //     virtual void showEnergy();
00124     
00128 //     virtual void showForm();
00129     
00133 //     virtual void showChildren();
00134     
00135   
00136     
00137   public:
00138     
00142     GElementInfoWidget(QWidget* parent = 0);
00143     
00147     virtual ~GElementInfoWidget();
00148     
00149   protected slots:
00150     
00151     virtual void updateEnergy(const GCS::GEnergy& energy);
00152     
00153     virtual void updateForm(const GCS::GForm& form);
00154     
00155     virtual void updateParent(const GCS::GElementID& new_parent);
00156     
00165     virtual void updateChildrenGetFromElement();
00166     
00167     virtual void updateChildren(QList<GCS::GElementID> children);
00168     
00169     virtual void updateConnection(const GCS::GElementID& connection);
00170     
00171   public slots:
00172     
00173     virtual void setElement(const GCS::GElement* element);
00174 };
00175 
00176 }
00177 
00178 #endif

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