~wosh-dev/wosh/trunk

« back to all changes in this revision

Viewing changes to src/framework/gui/components/WidgetCommunication.h

  • Committer: alexpls
  • Date: 2011-01-17 06:02:56 UTC
  • Revision ID: svn-v4:9c797490-39bb-4552-981d-a380e5b88e28:trunk:494
commit 2/2

see changelog 0.8.711

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @class   wosh::gui::WidgetCommunication
 
3
 * @brief   
 
4
 *          
 
5
 *          
 
6
 *
 
7
 ****************************************************************************
 
8
 * @version $Id: WidgetCommunication.h 3775 2011-01-01 16:38:17Z alex $
 
9
 * @author  Alessandro Polo
 
10
 ****************************************************************************/
 
11
/* Copyright (c) 2007-2011, WOSH - Wide Open Smart Home 
 
12
 * by Alessandro Polo - OpenSmartHome.com
 
13
 * All rights reserved.
 
14
 *
 
15
 * Redistribution and use in source and binary forms, with or without
 
16
 * modification, are permitted provided that the following conditions are met:
 
17
 *     * Redistributions of source code must retain the above copyright
 
18
 *       notice, this list of conditions and the following disclaimer.
 
19
 *     * Redistributions in binary form must reproduce the above copyright
 
20
 *       notice, this list of conditions and the following disclaimer in the
 
21
 *       documentation and/or other materials provided with the distribution.
 
22
 *     * Neither the name of the OpenSmartHome.com WOSH nor the
 
23
 *       names of its contributors may be used to endorse or promote products
 
24
 *       derived from this software without specific prior written permission.
 
25
 *
 
26
 * THIS SOFTWARE IS PROVIDED BY Alessandro Polo ''AS IS'' AND ANY
 
27
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
28
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 
29
 * DISCLAIMED. IN NO EVENT SHALL Alessandro Polo BE LIABLE FOR ANY
 
30
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 
31
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 
32
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 
33
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 
34
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 
35
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
36
 ****************************************************************************/
 
37
 
 
38
#ifndef __WOSH_Gui_WidgetCommunication_H__
 
39
 #define __WOSH_Gui_WidgetCommunication_H__
 
40
 
 
41
 #include <framework/gui/IWidget.h>
 
42
 #include <QtGui/QWidget>
 
43
 
 
44
 
 
45
namespace Ui {
 
46
 class WidgetCommunication;
 
47
};
 
48
namespace wosh {
 
49
 namespace gui {
 
50
 
 
51
class WidgetCommunication :     public QWidget,
 
52
                                                        public virtual IWidget
 
53
 {
 
54
        Q_OBJECT
 
55
        WOSH_GUI( wosh::gui::WidgetCommunication, 0, false )
 
56
 
 
57
        public:
 
58
                WidgetCommunication(QWidget *parent = 0);
 
59
                virtual ~WidgetCommunication();
 
60
 
 
61
        public:
 
62
                virtual inline QWidget* asQWidget()                                             { return this; }
 
63
                virtual WRESULT setFlag( long flag, bool value = true );
 
64
                virtual inline long getFlags() const                                    { return this->flags; }
 
65
 
 
66
        public slots:
 
67
                virtual WRESULT init( long options = INIT_BUS_DEFERRED );
 
68
                virtual WRESULT deinit( long options = INIT_NONE );
 
69
 
 
70
                virtual WRESULT refresh( long options = REFRESH_DEFAULT );
 
71
 
 
72
 
 
73
        protected:
 
74
                void changeEvent(QEvent *e);
 
75
                void closeEvent( QCloseEvent* e );
 
76
 
 
77
        private:
 
78
                Ui::WidgetCommunication *m_ui;
 
79
                long flags;
 
80
 
 
81
}; // class def
 
82
 
 
83
 
 
84
 
 
85
 
 
86
 }; // namespace gui
 
87
}; // namespace wosh
 
88
 
 
89
 
 
90
#endif //__WOSH_Gui_WidgetCommunication_H__