GElementActionWidget.h

00001 /***************************************************************************
00002  *   Copyright (C) 2006 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 GELEMENTACTIONWIDGET_H
00026 #define GELEMENTACTIONWIDGET_H
00027 
00028 #include <GElementID.h>
00029 
00030 #include <QGroupBox>
00031 
00032 class QComboBox;
00033 class QTextEdit;
00034 class QLabel;
00035 class QPushButton;
00036 
00037 namespace GWE
00038 {
00039   class GActionInterface;
00040 }
00041 
00042 namespace GCE
00043 {
00044 
00053 class GElementActionWidget : public QGroupBox
00054 {
00055   Q_OBJECT
00056   protected:
00057   
00061     GWE::GActionInterface* ActionInterface;
00062   
00071     GCS::GElementID Element;
00072     
00076     QLabel* ElementLabel;
00077     
00083     QComboBox* Actions;
00084     
00089     QTextEdit* Parameters;
00090     
00094     QTextEdit* ActionDescription;
00095     
00099     QPushButton* PerformAction;
00100     
00101   public:
00102   
00106     GElementActionWidget(GWE::GActionInterface* interface, QWidget* parent = 0);
00107     
00111     virtual ~GElementActionWidget();
00112     
00113   protected slots:
00114   
00118     void selectedActionChanged(const QString& action);
00119   
00120   public slots:
00121   
00126     void setElement(const GCS::GElementID& element);
00127   
00132     void performAction();
00133     
00138     void performAction(QString action, QStringList params);
00139     
00143     void performAction(const GCS::GElementID& element, QString action, QStringList params);
00144     
00145   signals:
00146     
00152     void actionPerformed(const QString& action);
00153 };
00154 
00155 }
00156 
00157 #endif

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