~ubuntu-branches/debian/lenny/italc/lenny

« back to all changes in this revision

Viewing changes to ima/src/remote_control_widget.h

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Winnertz
  • Date: 2008-06-17 13:46:54 UTC
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20080617134654-2y5m7ki93r5c1ysf
Tags: upstream-1.0.9~rc3
ImportĀ upstreamĀ versionĀ 1.0.9~rc3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  remote_control_widget.h - widget containing a VNC-view and controls for it
 
3
 *
 
4
 *  Copyright (c) 2006-2007 Tobias Doerffel <tobydox/at/users/dot/sf/dot/net>
 
5
 *  
 
6
 *  This file is part of iTALC - http://italc.sourceforge.net
 
7
 *
 
8
 *  This is free software; you can redistribute it and/or modify
 
9
 *  it under the terms of the GNU General Public License as published by
 
10
 *  the Free Software Foundation; either version 2 of the License, or
 
11
 *  (at your option) any later version.
 
12
 *
 
13
 *  This software is distributed in the hope that it will be useful,
 
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 *  GNU General Public License for more details.
 
17
 *
 
18
 *  You should have received a copy of the GNU General Public License
 
19
 *  along with this software; if not, write to the Free Software
 
20
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
 
21
 *  USA.
 
22
 */
 
23
 
 
24
 
 
25
#ifndef _REMOTE_CONTROL_WIDGET_H
 
26
#define _REMOTE_CONTROL_WIDGET_H
 
27
 
 
28
 
 
29
#include <QtCore/QTime>
 
30
#include <QtGui/QWidget>
 
31
 
 
32
#include "fast_qimage.h"
 
33
 
 
34
 
 
35
class vncView;
 
36
class remoteControlWidget;
 
37
class mainWindow;
 
38
 
 
39
 
 
40
 
 
41
class remoteControlWidgetToolBar : public QWidget
 
42
{
 
43
        Q_OBJECT
 
44
public:
 
45
        remoteControlWidgetToolBar( remoteControlWidget * _parent,
 
46
                                                        bool _view_only );
 
47
        virtual ~remoteControlWidgetToolBar();
 
48
 
 
49
 
 
50
public slots:
 
51
        void appear( void );
 
52
        void disappear( void );
 
53
 
 
54
 
 
55
protected:
 
56
        virtual void leaveEvent( QEvent * _e )
 
57
        {
 
58
                disappear();
 
59
                QWidget::leaveEvent( _e );
 
60
        }
 
61
 
 
62
        virtual void paintEvent( QPaintEvent * _pe );
 
63
 
 
64
 
 
65
private slots:
 
66
        void updatePosition( void );
 
67
        void startConnection( void );
 
68
        void connectionEstablished( void );
 
69
 
 
70
 
 
71
private:
 
72
        remoteControlWidget * m_parent;
 
73
        bool m_disappear;
 
74
        bool m_connecting;
 
75
        QImage m_icon;
 
76
        fastQImage m_iconGray;
 
77
        QTime m_iconState;
 
78
 
 
79
} ;
 
80
 
 
81
 
 
82
 
 
83
 
 
84
 
 
85
class remoteControlWidget : public QWidget
 
86
{
 
87
        Q_OBJECT
 
88
public:
 
89
        remoteControlWidget( const QString & _host, bool _view_only = FALSE,
 
90
                                                mainWindow * _main_window = NULL );
 
91
        virtual ~remoteControlWidget();
 
92
 
 
93
        QString host( void ) const;
 
94
 
 
95
 
 
96
public slots:
 
97
        void lockStudent( bool );
 
98
        void toggleFullScreen( bool );
 
99
        void toggleViewOnly( bool );
 
100
        void takeSnapshot( void );
 
101
 
 
102
 
 
103
protected:
 
104
        void updateWindowTitle( void );
 
105
        virtual void resizeEvent( QResizeEvent * );
 
106
 
 
107
 
 
108
private slots:
 
109
        void checkKeyEvent( Q_UINT32, bool );
 
110
 
 
111
 
 
112
private:
 
113
        vncView * m_vncView;
 
114
        remoteControlWidgetToolBar * m_toolBar;
 
115
        mainWindow * m_mainWindow;
 
116
 
 
117
        Qt::WindowStates m_extraStates;
 
118
 
 
119
        friend class remoteControlWidgetToolBar;
 
120
 
 
121
} ;
 
122
 
 
123
 
 
124
#endif
 
125