00001 /** 00002 * @class wosh::gui::WidgetWoshSystem 00003 * @brief 00004 * 00005 * 00006 * 00007 **************************************************************************** 00008 * @version $Id: WidgetWoshSystem.h 3775 2011-01-01 16:38:17Z alex $ 00009 * @author Alessandro Polo 00010 ****************************************************************************/ 00011 /* Copyright (c) 2007-2011, WOSH - Wide Open Smart Home 00012 * by Alessandro Polo - OpenSmartHome.com 00013 * All rights reserved. 00014 * 00015 * Redistribution and use in source and binary forms, with or without 00016 * modification, are permitted provided that the following conditions are met: 00017 * * Redistributions of source code must retain the above copyright 00018 * notice, this list of conditions and the following disclaimer. 00019 * * Redistributions in binary form must reproduce the above copyright 00020 * notice, this list of conditions and the following disclaimer in the 00021 * documentation and/or other materials provided with the distribution. 00022 * * Neither the name of the OpenSmartHome.com WOSH nor the 00023 * names of its contributors may be used to endorse or promote products 00024 * derived from this software without specific prior written permission. 00025 * 00026 * THIS SOFTWARE IS PROVIDED BY Alessandro Polo ''AS IS'' AND ANY 00027 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00028 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00029 * DISCLAIMED. IN NO EVENT SHALL Alessandro Polo BE LIABLE FOR ANY 00030 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00031 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00032 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00033 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00034 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00035 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00036 ****************************************************************************/ 00037 00038 #ifndef __WOSH_Gui_WidgetWoshSystem_H__ 00039 #define __WOSH_Gui_WidgetWoshSystem_H__ 00040 00041 #include <framework/gui/IWidget.h> 00042 #include <QtGui/QWidget> 00043 00044 00045 namespace Ui { 00046 class WidgetWoshSystem; 00047 }; 00048 namespace wosh { 00049 namespace gui { 00050 00051 class WidgetWoshSystem : public QWidget, 00052 public virtual IWidget 00053 { 00054 Q_OBJECT 00055 WOSH_GUI( wosh::gui::WidgetWoshSystem, 0, false ) 00056 00057 public: 00058 WidgetWoshSystem(QWidget *parent = 0); 00059 virtual ~WidgetWoshSystem(); 00060 00061 public: 00062 virtual inline QWidget* asQWidget() { return this; } 00063 virtual WRESULT setFlag( long flag, bool value = true ); 00064 virtual inline long getFlags() const { return this->flags; } 00065 00066 public slots: 00067 virtual WRESULT init( long options = INIT_BUS_DEFERRED ); 00068 virtual WRESULT deinit( long options = INIT_NONE ); 00069 00070 virtual WRESULT refresh( long options = REFRESH_DEFAULT ); 00071 00072 00073 protected: 00074 void changeEvent(QEvent *e); 00075 void closeEvent( QCloseEvent* e ); 00076 00077 private: 00078 Ui::WidgetWoshSystem *m_ui; 00079 long flags; 00080 00081 }; // class def 00082 00083 00084 00085 00086 }; // namespace gui 00087 }; // namespace wosh 00088 00089 00090 #endif //__WOSH_Gui_WidgetWoshSystem_H__