blob: 5c7b949daa230a6d0d27f3b18c2853a17148e771 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
// -*- c++ -*-
#ifndef KRFBCANVAS_H
#define KRFBCANVAS_H
#include <qscrollview.h>
#include <qurl.h>
class KRFBConnection;
class KRFBServer;
/**
* Displays data from an KRFBDecoder, and sends events to the
* KRFBConnection.
*/
class KRFBCanvas : public QScrollView
{
Q_OBJECT
public:
KRFBCanvas( QWidget *parent, const char *name=0 );
~KRFBCanvas();
void setConnection( KRFBConnection * );
KRFBConnection *connection() { return connection_; };
public slots:
void openConnection (KRFBServer);
void openURL( const QUrl & );
void closeConnection();
void refresh();
void bell();
void sendCtlAltDel(void);
void markRightClick(void);
void markDoubleClick(void);
protected:
virtual void keyPressEvent( QKeyEvent * );
virtual void keyReleaseEvent( QKeyEvent * );
virtual void contentsMousePressEvent( QMouseEvent * );
virtual void contentsMouseReleaseEvent( QMouseEvent * );
virtual void contentsMouseMoveEvent( QMouseEvent * );
virtual void viewportPaintEvent( QPaintEvent *e );
protected slots:
void loggedIn();
void viewportUpdate( int x, int y, int w, int h );
void clipboardChanged();
private:
int nextRightClick;
int nextDoubleClick;
KRFBConnection *connection_;
QString password;
bool loggedIn_;
};
#endif // KRFBCANVAS_H
|